inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
export { };
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/server/instrumentation/types.ts"],"sourcesContent":["export type RequestErrorContext = {\n routerKind: 'Pages Router' | 'App Router'\n routePath: string // the route file path, e.g. /app/blog/[dynamic]\n routeType: 'render' | 'route' | 'action' | 'middleware'\n renderSource?:\n | 'react-server-components'\n | 'react-server-components-payload'\n | 'server-rendering'\n revalidateReason: 'on-demand' | 'stale' | undefined\n // TODO: other future instrumentation context\n}\n\nexport type InstrumentationOnRequestError = (\n error: unknown,\n errorRequest: Readonly<{\n path: string\n method: string\n headers: NodeJS.Dict<string | string[]>\n }>,\n errorContext: Readonly<RequestErrorContext>\n) => void | Promise<void>\n\nexport type InstrumentationModule = {\n register?(): void\n onRequestError?: InstrumentationOnRequestError\n}\n\nexport namespace Instrumentation {\n export type onRequestError = InstrumentationOnRequestError\n}\n"],"names":[],"mappings":"AA2BA,WAEC"}

View File

@@ -0,0 +1,11 @@
export function getRevalidateReason(params) {
if (params.isOnDemandRevalidate) {
return 'on-demand';
}
if (params.isRevalidate) {
return 'stale';
}
return undefined;
}
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/server/instrumentation/utils.ts"],"sourcesContent":["export function getRevalidateReason(params: {\n isOnDemandRevalidate?: boolean\n isRevalidate?: boolean\n}): 'on-demand' | 'stale' | undefined {\n if (params.isOnDemandRevalidate) {\n return 'on-demand'\n }\n if (params.isRevalidate) {\n return 'stale'\n }\n return undefined\n}\n"],"names":["getRevalidateReason","params","isOnDemandRevalidate","isRevalidate","undefined"],"mappings":"AAAA,OAAO,SAASA,oBAAoBC,MAGnC;IACC,IAAIA,OAAOC,oBAAoB,EAAE;QAC/B,OAAO;IACT;IACA,IAAID,OAAOE,YAAY,EAAE;QACvB,OAAO;IACT;IACA,OAAOC;AACT"}