.
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=types.js.map
|
||||
+1
@@ -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' | 'proxy'\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","ignoreList":[0]}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export function getRevalidateReason(params) {
|
||||
if (params.isOnDemandRevalidate) {
|
||||
return 'on-demand';
|
||||
}
|
||||
if (params.isStaticGeneration) {
|
||||
return 'stale';
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=utils.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/server/instrumentation/utils.ts"],"sourcesContent":["export function getRevalidateReason(params: {\n isOnDemandRevalidate?: boolean\n isStaticGeneration?: boolean\n}): 'on-demand' | 'stale' | undefined {\n if (params.isOnDemandRevalidate) {\n return 'on-demand'\n }\n if (params.isStaticGeneration) {\n return 'stale'\n }\n return undefined\n}\n"],"names":["getRevalidateReason","params","isOnDemandRevalidate","isStaticGeneration","undefined"],"mappings":"AAAA,OAAO,SAASA,oBAAoBC,MAGnC;IACC,IAAIA,OAAOC,oBAAoB,EAAE;QAC/B,OAAO;IACT;IACA,IAAID,OAAOE,kBAAkB,EAAE;QAC7B,OAAO;IACT;IACA,OAAOC;AACT","ignoreList":[0]}
|
||||
Reference in New Issue
Block a user