chore: update workspace config and memory

This commit is contained in:
arin
2026-03-30 19:30:25 +09:00
commit f3726b39d1
3479 changed files with 346874 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
// src/middleware/request-id/index.ts
import { requestId } from "./request-id.js";
export {
requestId
};

View File

@@ -0,0 +1,21 @@
// src/middleware/request-id/request-id.ts
var requestId = ({
limitLength = 255,
headerName = "X-Request-Id",
generator = () => crypto.randomUUID()
} = {}) => {
return async function requestId2(c, next) {
let reqId = headerName ? c.req.header(headerName) : void 0;
if (!reqId || reqId.length > limitLength || /[^\w\-=]/.test(reqId)) {
reqId = generator(c);
}
c.set("requestId", reqId);
if (headerName) {
c.header(headerName, reqId);
}
await next();
};
};
export {
requestId
};