This commit is contained in:
Kismet Hasanaj
2026-05-02 20:07:02 +02:00
parent ce8672e283
commit 34dc9aec52
9428 changed files with 1733330 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
export type RequestErrorContext = {
routerKind: 'Pages Router' | 'App Router';
routePath: string;
routeType: 'render' | 'route' | 'action' | 'proxy';
renderSource?: 'react-server-components' | 'react-server-components-payload' | 'server-rendering';
revalidateReason: 'on-demand' | 'stale' | undefined;
};
export type InstrumentationOnRequestError = (error: unknown, errorRequest: Readonly<{
path: string;
method: string;
headers: NodeJS.Dict<string | string[]>;
}>, errorContext: Readonly<RequestErrorContext>) => void | Promise<void>;
export type InstrumentationModule = {
register?(): void;
onRequestError?: InstrumentationOnRequestError;
};
export declare namespace Instrumentation {
type onRequestError = InstrumentationOnRequestError;
}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
//# sourceMappingURL=types.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","ignoreList":[]}
+4
View File
@@ -0,0 +1,4 @@
export declare function getRevalidateReason(params: {
isOnDemandRevalidate?: boolean;
isStaticGeneration?: boolean;
}): 'on-demand' | 'stale' | undefined;
+21
View File
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getRevalidateReason", {
enumerable: true,
get: function() {
return getRevalidateReason;
}
});
function getRevalidateReason(params) {
if (params.isOnDemandRevalidate) {
return 'on-demand';
}
if (params.isStaticGeneration) {
return 'stale';
}
return undefined;
}
//# sourceMappingURL=utils.js.map
+1
View File
@@ -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":";;;;+BAAgBA;;;eAAAA;;;AAAT,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]}