Initial commit
This commit is contained in:
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/date.d.ts
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/date.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
52
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/date.js
generated
vendored
Normal file
52
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/date.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* We extend `Date` during builds and revalidates to ensure that prerenders don't observe the clock as a source of IO
|
||||
* When dynamicIO is enabled. The current time is a form of IO even though it resolves synchronously. When dyanmicIO is
|
||||
* enabled we need to ensure that clock time is excluded from prerenders unless it is cached.
|
||||
*
|
||||
* There is tension here because time is used for both output and introspection. While arbitrary we intend to reserve
|
||||
* `Date` for output use cases and `performance` for introspection use cases. If you want to measure
|
||||
* how long something takes use `performance.timeOrigin` and `performance.now()` rather than `Date.now()` for instance.
|
||||
*
|
||||
* The extensions here never error nor alter the underlying Date objects, strings, and numbers created and thus should be transparent to callers.
|
||||
*/ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const _utils = require("./utils");
|
||||
function createNow(originalNow) {
|
||||
return ({
|
||||
now: function now() {
|
||||
(0, _utils.io)('`Date.now()`', 'time');
|
||||
return originalNow();
|
||||
}
|
||||
})['now'.slice()].bind(null);
|
||||
}
|
||||
function createDate(originalConstructor) {
|
||||
const properties = Object.getOwnPropertyDescriptors(originalConstructor);
|
||||
properties.now.value = createNow(originalConstructor.now);
|
||||
const apply = Reflect.apply;
|
||||
const construct = Reflect.construct;
|
||||
const newConstructor = Object.defineProperties(// Ideally this should not minify the name.
|
||||
function Date1() {
|
||||
if (new.target === undefined) {
|
||||
(0, _utils.io)('`Date()`', 'time');
|
||||
return apply(originalConstructor, undefined, arguments);
|
||||
}
|
||||
if (arguments.length === 0) {
|
||||
(0, _utils.io)('`new Date()`', 'time');
|
||||
}
|
||||
return construct(originalConstructor, arguments, new.target);
|
||||
}, properties);
|
||||
Object.defineProperty(originalConstructor.prototype, 'constructor', {
|
||||
value: newConstructor
|
||||
});
|
||||
return newConstructor;
|
||||
}
|
||||
try {
|
||||
// eslint-disable-next-line no-native-reassign
|
||||
Date = createDate(Date);
|
||||
} catch {
|
||||
console.error('Failed to install `Date` class extension. When using `experimental.dynamicIO`, APIs that read the current time will not correctly trigger dynamic behavior.');
|
||||
}
|
||||
|
||||
//# sourceMappingURL=date.js.map
|
||||
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/date.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/date.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/server/node-environment-extensions/date.tsx"],"sourcesContent":["/**\n * We extend `Date` during builds and revalidates to ensure that prerenders don't observe the clock as a source of IO\n * When dynamicIO is enabled. The current time is a form of IO even though it resolves synchronously. When dyanmicIO is\n * enabled we need to ensure that clock time is excluded from prerenders unless it is cached.\n *\n * There is tension here because time is used for both output and introspection. While arbitrary we intend to reserve\n * `Date` for output use cases and `performance` for introspection use cases. If you want to measure\n * how long something takes use `performance.timeOrigin` and `performance.now()` rather than `Date.now()` for instance.\n *\n * The extensions here never error nor alter the underlying Date objects, strings, and numbers created and thus should be transparent to callers.\n */\nimport { io } from './utils'\n\nfunction createNow(originalNow: typeof Date.now) {\n return {\n now: function now() {\n io('`Date.now()`', 'time')\n return originalNow()\n },\n }['now'.slice() as 'now'].bind(null)\n}\n\nfunction createDate(originalConstructor: typeof Date): typeof Date {\n const properties = Object.getOwnPropertyDescriptors(originalConstructor)\n properties.now.value = createNow(originalConstructor.now)\n\n const apply = Reflect.apply\n const construct = Reflect.construct\n\n const newConstructor = Object.defineProperties(\n // Ideally this should not minify the name.\n function Date() {\n if (new.target === undefined) {\n io('`Date()`', 'time')\n return apply(originalConstructor, undefined, arguments)\n }\n if (arguments.length === 0) {\n io('`new Date()`', 'time')\n }\n return construct(originalConstructor, arguments, new.target)\n },\n properties\n )\n Object.defineProperty(originalConstructor.prototype, 'constructor', {\n value: newConstructor,\n })\n return newConstructor as typeof Date\n}\n\ntry {\n // eslint-disable-next-line no-native-reassign\n Date = createDate(Date)\n} catch {\n console.error(\n 'Failed to install `Date` class extension. When using `experimental.dynamicIO`, APIs that read the current time will not correctly trigger dynamic behavior.'\n )\n}\n"],"names":["createNow","originalNow","now","io","slice","bind","createDate","originalConstructor","properties","Object","getOwnPropertyDescriptors","value","apply","Reflect","construct","newConstructor","defineProperties","Date","undefined","arguments","length","defineProperty","prototype","console","error"],"mappings":"AAAA;;;;;;;;;;CAUC;;;;uBACkB;AAEnB,SAASA,UAAUC,WAA4B;IAC7C,OAAO,CAAA;QACLC,KAAK,SAASA;YACZC,IAAAA,SAAE,EAAC,gBAAgB;YACnB,OAAOF;QACT;IACF,CAAA,CAAC,CAAC,MAAMG,KAAK,GAAY,CAACC,IAAI,CAAC;AACjC;AAEA,SAASC,WAAWC,mBAAgC;IAClD,MAAMC,aAAaC,OAAOC,yBAAyB,CAACH;IACpDC,WAAWN,GAAG,CAACS,KAAK,GAAGX,UAAUO,oBAAoBL,GAAG;IAExD,MAAMU,QAAQC,QAAQD,KAAK;IAC3B,MAAME,YAAYD,QAAQC,SAAS;IAEnC,MAAMC,iBAAiBN,OAAOO,gBAAgB,CAC5C,2CAA2C;IAC3C,SAASC;QACP,IAAI,eAAeC,WAAW;YAC5Bf,IAAAA,SAAE,EAAC,YAAY;YACf,OAAOS,MAAML,qBAAqBW,WAAWC;QAC/C;QACA,IAAIA,UAAUC,MAAM,KAAK,GAAG;YAC1BjB,IAAAA,SAAE,EAAC,gBAAgB;QACrB;QACA,OAAOW,UAAUP,qBAAqBY,WAAW;IACnD,GACAX;IAEFC,OAAOY,cAAc,CAACd,oBAAoBe,SAAS,EAAE,eAAe;QAClEX,OAAOI;IACT;IACA,OAAOA;AACT;AAEA,IAAI;IACF,8CAA8C;IAC9CE,OAAOX,WAAWW;AACpB,EAAE,OAAM;IACNM,QAAQC,KAAK,CACX;AAEJ"}
|
||||
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/error-inspect.d.ts
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/error-inspect.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
8
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/error-inspect.js
generated
vendored
Normal file
8
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/error-inspect.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const _patcherrorinspect = require("../patch-error-inspect");
|
||||
(0, _patcherrorinspect.patchErrorInspectNodeJS)(globalThis.Error);
|
||||
|
||||
//# sourceMappingURL=error-inspect.js.map
|
||||
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/error-inspect.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/error-inspect.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/server/node-environment-extensions/error-inspect.tsx"],"sourcesContent":["import { patchErrorInspectNodeJS } from '../patch-error-inspect'\n\npatchErrorInspectNodeJS(globalThis.Error)\n"],"names":["patchErrorInspectNodeJS","globalThis","Error"],"mappings":";;;;mCAAwC;AAExCA,IAAAA,0CAAuB,EAACC,WAAWC,KAAK"}
|
||||
9
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/node-crypto.d.ts
generated
vendored
Normal file
9
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/node-crypto.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* We extend node:crypto APIs during builds and revalidates to ensure that prerenders don't observe random bytes
|
||||
* When dynamicIO is enabled. Random bytes are a form of IO even if they resolve synchronously. When dyanmicIO is
|
||||
* enabled we need to ensure that random bytes are excluded from prerenders unless they are cached.
|
||||
*
|
||||
*
|
||||
* The extensions here never error nor alter the underlying return values and thus should be transparent to callers.
|
||||
*/
|
||||
export {};
|
||||
98
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/node-crypto.js
generated
vendored
Normal file
98
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/node-crypto.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* We extend node:crypto APIs during builds and revalidates to ensure that prerenders don't observe random bytes
|
||||
* When dynamicIO is enabled. Random bytes are a form of IO even if they resolve synchronously. When dyanmicIO is
|
||||
* enabled we need to ensure that random bytes are excluded from prerenders unless they are cached.
|
||||
*
|
||||
*
|
||||
* The extensions here never error nor alter the underlying return values and thus should be transparent to callers.
|
||||
*/ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const _utils = require("./utils");
|
||||
if (process.env.NEXT_RUNTIME === 'edge') {
|
||||
// nothing to patch
|
||||
} else {
|
||||
const nodeCrypto = require('node:crypto');
|
||||
// require('node:crypto').getRandomValues is an alias for
|
||||
// crypto.getRandomValues which is extended in web-crypto.tsx
|
||||
// require('node:crypto').randomUUID is not an alias for crypto.randomUUID
|
||||
const randomUUIDExpression = "`require('node:crypto').randomUUID()`";
|
||||
try {
|
||||
const _randomUUID = nodeCrypto.randomUUID;
|
||||
nodeCrypto.randomUUID = function randomUUID() {
|
||||
(0, _utils.io)(randomUUIDExpression, 'random');
|
||||
return _randomUUID.apply(this, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${randomUUIDExpression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
const randomBytesExpression = "`require('node:crypto').randomBytes(size)`";
|
||||
try {
|
||||
const _randomBytes = nodeCrypto.randomBytes;
|
||||
nodeCrypto.randomBytes = function randomBytes() {
|
||||
if (typeof arguments[1] !== 'function') {
|
||||
// randomBytes is sync if the second arg is undefined
|
||||
(0, _utils.io)(randomBytesExpression, 'random');
|
||||
}
|
||||
return _randomBytes.apply(this, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${randomBytesExpression} extension. When using \`experimental.dynamicIO\` calling this function without a callback argument will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
const randomFillSyncExpression = "`require('node:crypto').randomFillSync(...)`";
|
||||
try {
|
||||
const _randomFillSync = nodeCrypto.randomFillSync;
|
||||
nodeCrypto.randomFillSync = function randomFillSync() {
|
||||
(0, _utils.io)(randomFillSyncExpression, 'random');
|
||||
return _randomFillSync.apply(this, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${randomFillSyncExpression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
const randomIntExpression = "`require('node:crypto').randomInt(min, max)`";
|
||||
try {
|
||||
const _randomInt = nodeCrypto.randomInt;
|
||||
nodeCrypto.randomInt = function randomInt() {
|
||||
if (typeof arguments[2] !== 'function') {
|
||||
// randomInt is sync if the third arg is undefined
|
||||
(0, _utils.io)(randomIntExpression, 'random');
|
||||
}
|
||||
return _randomInt.apply(this, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${randomBytesExpression} extension. When using \`experimental.dynamicIO\` calling this function without a callback argument will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
const generatePrimeSyncExpression = "`require('node:crypto').generatePrimeSync(...)`";
|
||||
try {
|
||||
const _generatePrimeSync = nodeCrypto.generatePrimeSync;
|
||||
nodeCrypto.generatePrimeSync = function generatePrimeSync() {
|
||||
(0, _utils.io)(generatePrimeSyncExpression, 'random');
|
||||
return _generatePrimeSync.apply(this, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${generatePrimeSyncExpression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
const generateKeyPairSyncExpression = "`require('node:crypto').generateKeyPairSync(...)`";
|
||||
try {
|
||||
const _generateKeyPairSync = nodeCrypto.generateKeyPairSync;
|
||||
nodeCrypto.generateKeyPairSync = function generateKeyPairSync() {
|
||||
(0, _utils.io)(generateKeyPairSyncExpression, 'random');
|
||||
return _generateKeyPairSync.apply(this, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${generateKeyPairSyncExpression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
const generateKeySyncExpression = "`require('node:crypto').generateKeySync(...)`";
|
||||
try {
|
||||
const _generateKeySync = nodeCrypto.generateKeySync;
|
||||
nodeCrypto.generateKeySync = function generateKeySync() {
|
||||
(0, _utils.io)(generateKeySyncExpression, 'random');
|
||||
return _generateKeySync.apply(this, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${generateKeySyncExpression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=node-crypto.js.map
|
||||
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/node-crypto.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/node-crypto.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/random.d.ts
generated
vendored
Normal file
8
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/random.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* We extend Math.random() during builds and revalidates to ensure that prerenders don't observe randomness
|
||||
* When dynamicIO is enabled. randomness is a form of IO even though it resolves synchronously. When dyanmicIO is
|
||||
* enabled we need to ensure that randomness is excluded from prerenders.
|
||||
*
|
||||
* The extensions here never error nor alter the random generation itself and thus should be transparent to callers.
|
||||
*/
|
||||
export {};
|
||||
28
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/random.js
generated
vendored
Normal file
28
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/random.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* We extend Math.random() during builds and revalidates to ensure that prerenders don't observe randomness
|
||||
* When dynamicIO is enabled. randomness is a form of IO even though it resolves synchronously. When dyanmicIO is
|
||||
* enabled we need to ensure that randomness is excluded from prerenders.
|
||||
*
|
||||
* The extensions here never error nor alter the random generation itself and thus should be transparent to callers.
|
||||
*/ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const _utils = require("./utils");
|
||||
const expression = '`Math.random()`';
|
||||
try {
|
||||
const _random = Math.random;
|
||||
Math.random = (function random() {
|
||||
(0, _utils.io)(expression, 'random');
|
||||
return _random.apply(null, arguments);
|
||||
// We bind here to alter the `toString` printing to match `Math.random`'s native `toString`.
|
||||
// eslint-disable-next-line no-extra-bind
|
||||
}).bind(null);
|
||||
Object.defineProperty(Math.random, 'name', {
|
||||
value: 'random'
|
||||
});
|
||||
} catch {
|
||||
console.error(`Failed to install ${expression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=random.js.map
|
||||
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/random.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/random.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/server/node-environment-extensions/random.tsx"],"sourcesContent":["/**\n * We extend Math.random() during builds and revalidates to ensure that prerenders don't observe randomness\n * When dynamicIO is enabled. randomness is a form of IO even though it resolves synchronously. When dyanmicIO is\n * enabled we need to ensure that randomness is excluded from prerenders.\n *\n * The extensions here never error nor alter the random generation itself and thus should be transparent to callers.\n */\n\nimport { io } from './utils'\n\nconst expression = '`Math.random()`'\ntry {\n const _random = Math.random\n Math.random = function random() {\n io(expression, 'random')\n return _random.apply(null, arguments as any)\n\n // We bind here to alter the `toString` printing to match `Math.random`'s native `toString`.\n // eslint-disable-next-line no-extra-bind\n }.bind(null)\n Object.defineProperty(Math.random, 'name', { value: 'random' })\n} catch {\n console.error(\n `Failed to install ${expression} extension. When using \\`experimental.dynamicIO\\` calling this function will not correctly trigger dynamic behavior.`\n )\n}\n"],"names":["expression","_random","Math","random","io","apply","arguments","bind","Object","defineProperty","value","console","error"],"mappings":"AAAA;;;;;;CAMC;;;;uBAEkB;AAEnB,MAAMA,aAAa;AACnB,IAAI;IACF,MAAMC,UAAUC,KAAKC,MAAM;IAC3BD,KAAKC,MAAM,GAAG,CAAA,SAASA;QACrBC,IAAAA,SAAE,EAACJ,YAAY;QACf,OAAOC,QAAQI,KAAK,CAAC,MAAMC;IAE3B,4FAA4F;IAC5F,yCAAyC;IAC3C,CAAA,EAAEC,IAAI,CAAC;IACPC,OAAOC,cAAc,CAACP,KAAKC,MAAM,EAAE,QAAQ;QAAEO,OAAO;IAAS;AAC/D,EAAE,OAAM;IACNC,QAAQC,KAAK,CACX,CAAC,kBAAkB,EAAEZ,WAAW,oHAAoH,CAAC;AAEzJ"}
|
||||
3
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/utils.d.ts
generated
vendored
Normal file
3
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
type ApiType = 'time' | 'random' | 'crypto';
|
||||
export declare function io(expression: string, type: ApiType): void;
|
||||
export {};
|
||||
58
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/utils.js
generated
vendored
Normal file
58
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/utils.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "io", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return io;
|
||||
}
|
||||
});
|
||||
const _workasyncstorageexternal = require("../app-render/work-async-storage.external");
|
||||
const _workunitasyncstorageexternal = require("../app-render/work-unit-async-storage.external");
|
||||
const _dynamicrendering = require("../app-render/dynamic-rendering");
|
||||
const _invarianterror = require("../../shared/lib/invariant-error");
|
||||
function io(expression, type) {
|
||||
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
||||
if (workUnitStore) {
|
||||
if (workUnitStore.type === 'prerender') {
|
||||
const prerenderSignal = workUnitStore.controller.signal;
|
||||
if (prerenderSignal.aborted === false) {
|
||||
// If the prerender signal is already aborted we don't need to construct any stacks
|
||||
// because something else actually terminated the prerender.
|
||||
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
||||
if (workStore) {
|
||||
let message;
|
||||
switch(type){
|
||||
case 'time':
|
||||
message = `Route "${workStore.route}" used ${expression} instead of using \`performance\` or without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time`;
|
||||
break;
|
||||
case 'random':
|
||||
message = `Route "${workStore.route}" used ${expression} outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random`;
|
||||
break;
|
||||
case 'crypto':
|
||||
message = `Route "${workStore.route}" used ${expression} outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto`;
|
||||
break;
|
||||
default:
|
||||
throw Object.defineProperty(new _invarianterror.InvariantError('Unknown expression type in abortOnSynchronousPlatformIOAccess.'), "__NEXT_ERROR_CODE", {
|
||||
value: "E526",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
const errorWithStack = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
||||
value: "E394",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
(0, _dynamicrendering.abortOnSynchronousPlatformIOAccess)(workStore.route, expression, errorWithStack, workUnitStore);
|
||||
}
|
||||
}
|
||||
} else if (workUnitStore.type === 'request' && workUnitStore.prerenderPhase === true) {
|
||||
const requestStore = workUnitStore;
|
||||
(0, _dynamicrendering.trackSynchronousPlatformIOAccessInDev)(requestStore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=utils.js.map
|
||||
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/utils.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/server/node-environment-extensions/utils.tsx"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'\nimport {\n abortOnSynchronousPlatformIOAccess,\n trackSynchronousPlatformIOAccessInDev,\n} from '../app-render/dynamic-rendering'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\ntype ApiType = 'time' | 'random' | 'crypto'\n\nexport function io(expression: string, type: ApiType) {\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n if (workUnitStore.type === 'prerender') {\n const prerenderSignal = workUnitStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // If the prerender signal is already aborted we don't need to construct any stacks\n // because something else actually terminated the prerender.\n const workStore = workAsyncStorage.getStore()\n if (workStore) {\n let message: string\n switch (type) {\n case 'time':\n message = `Route \"${workStore.route}\" used ${expression} instead of using \\`performance\\` or without explicitly calling \\`await connection()\\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time`\n break\n case 'random':\n message = `Route \"${workStore.route}\" used ${expression} outside of \\`\"use cache\"\\` and without explicitly calling \\`await connection()\\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random`\n break\n case 'crypto':\n message = `Route \"${workStore.route}\" used ${expression} outside of \\`\"use cache\"\\` and without explicitly calling \\`await connection()\\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto`\n break\n default:\n throw new InvariantError(\n 'Unknown expression type in abortOnSynchronousPlatformIOAccess.'\n )\n }\n const errorWithStack = new Error(message)\n\n abortOnSynchronousPlatformIOAccess(\n workStore.route,\n expression,\n errorWithStack,\n workUnitStore\n )\n }\n }\n } else if (\n workUnitStore.type === 'request' &&\n workUnitStore.prerenderPhase === true\n ) {\n const requestStore = workUnitStore\n trackSynchronousPlatformIOAccessInDev(requestStore)\n }\n }\n}\n"],"names":["io","expression","type","workUnitStore","workUnitAsyncStorage","getStore","prerenderSignal","controller","signal","aborted","workStore","workAsyncStorage","message","route","InvariantError","errorWithStack","Error","abortOnSynchronousPlatformIOAccess","prerenderPhase","requestStore","trackSynchronousPlatformIOAccessInDev"],"mappings":";;;;+BAUgBA;;;eAAAA;;;0CAViB;8CACI;kCAI9B;gCACwB;AAIxB,SAASA,GAAGC,UAAkB,EAAEC,IAAa;IAClD,MAAMC,gBAAgBC,kDAAoB,CAACC,QAAQ;IACnD,IAAIF,eAAe;QACjB,IAAIA,cAAcD,IAAI,KAAK,aAAa;YACtC,MAAMI,kBAAkBH,cAAcI,UAAU,CAACC,MAAM;YACvD,IAAIF,gBAAgBG,OAAO,KAAK,OAAO;gBACrC,mFAAmF;gBACnF,4DAA4D;gBAC5D,MAAMC,YAAYC,0CAAgB,CAACN,QAAQ;gBAC3C,IAAIK,WAAW;oBACb,IAAIE;oBACJ,OAAQV;wBACN,KAAK;4BACHU,UAAU,CAAC,OAAO,EAAEF,UAAUG,KAAK,CAAC,OAAO,EAAEZ,WAAW,mLAAmL,CAAC;4BAC5O;wBACF,KAAK;4BACHW,UAAU,CAAC,OAAO,EAAEF,UAAUG,KAAK,CAAC,OAAO,EAAEZ,WAAW,wKAAwK,CAAC;4BACjO;wBACF,KAAK;4BACHW,UAAU,CAAC,OAAO,EAAEF,UAAUG,KAAK,CAAC,OAAO,EAAEZ,WAAW,wKAAwK,CAAC;4BACjO;wBACF;4BACE,MAAM,qBAEL,CAFK,IAAIa,8BAAc,CACtB,mEADI,qBAAA;uCAAA;4CAAA;8CAAA;4BAEN;oBACJ;oBACA,MAAMC,iBAAiB,qBAAkB,CAAlB,IAAIC,MAAMJ,UAAV,qBAAA;+BAAA;oCAAA;sCAAA;oBAAiB;oBAExCK,IAAAA,oDAAkC,EAChCP,UAAUG,KAAK,EACfZ,YACAc,gBACAZ;gBAEJ;YACF;QACF,OAAO,IACLA,cAAcD,IAAI,KAAK,aACvBC,cAAce,cAAc,KAAK,MACjC;YACA,MAAMC,eAAehB;YACrBiB,IAAAA,uDAAqC,EAACD;QACxC;IACF;AACF"}
|
||||
9
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/web-crypto.d.ts
generated
vendored
Normal file
9
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/web-crypto.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* We extend Web Crypto APIs during builds and revalidates to ensure that prerenders don't observe random bytes
|
||||
* When dynamicIO is enabled. Random bytes are a form of IO even if they resolve synchronously. When dyanmicIO is
|
||||
* enabled we need to ensure that random bytes are excluded from prerenders unless they are cached.
|
||||
*
|
||||
*
|
||||
* The extensions here never error nor alter the underlying return values and thus should be transparent to callers.
|
||||
*/
|
||||
export {};
|
||||
44
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/web-crypto.js
generated
vendored
Normal file
44
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/web-crypto.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* We extend Web Crypto APIs during builds and revalidates to ensure that prerenders don't observe random bytes
|
||||
* When dynamicIO is enabled. Random bytes are a form of IO even if they resolve synchronously. When dyanmicIO is
|
||||
* enabled we need to ensure that random bytes are excluded from prerenders unless they are cached.
|
||||
*
|
||||
*
|
||||
* The extensions here never error nor alter the underlying return values and thus should be transparent to callers.
|
||||
*/ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const _utils = require("./utils");
|
||||
let webCrypto;
|
||||
if (process.env.NEXT_RUNTIME === 'edge') {
|
||||
webCrypto = crypto;
|
||||
} else {
|
||||
if (typeof crypto === 'undefined') {
|
||||
webCrypto = require('node:crypto').webcrypto;
|
||||
} else {
|
||||
webCrypto = crypto;
|
||||
}
|
||||
}
|
||||
const getRandomValuesExpression = '`crypto.getRandomValues()`';
|
||||
try {
|
||||
const _getRandomValues = webCrypto.getRandomValues;
|
||||
webCrypto.getRandomValues = function getRandomValues() {
|
||||
(0, _utils.io)(getRandomValuesExpression, 'crypto');
|
||||
return _getRandomValues.apply(webCrypto, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${getRandomValuesExpression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
const randomUUIDExpression = '`crypto.randomUUID()`';
|
||||
try {
|
||||
const _randomUUID = webCrypto.randomUUID;
|
||||
webCrypto.randomUUID = function randomUUID() {
|
||||
(0, _utils.io)(randomUUIDExpression, 'crypto');
|
||||
return _randomUUID.apply(webCrypto, arguments);
|
||||
};
|
||||
} catch {
|
||||
console.error(`Failed to install ${getRandomValuesExpression} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=web-crypto.js.map
|
||||
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/web-crypto.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/next/dist/server/node-environment-extensions/web-crypto.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/server/node-environment-extensions/web-crypto.tsx"],"sourcesContent":["/**\n * We extend Web Crypto APIs during builds and revalidates to ensure that prerenders don't observe random bytes\n * When dynamicIO is enabled. Random bytes are a form of IO even if they resolve synchronously. When dyanmicIO is\n * enabled we need to ensure that random bytes are excluded from prerenders unless they are cached.\n *\n *\n * The extensions here never error nor alter the underlying return values and thus should be transparent to callers.\n */\n\nimport { io } from './utils'\n\nlet webCrypto: typeof crypto\nif (process.env.NEXT_RUNTIME === 'edge') {\n webCrypto = crypto\n} else {\n if (typeof crypto === 'undefined') {\n webCrypto = require('node:crypto').webcrypto\n } else {\n webCrypto = crypto\n }\n}\n\nconst getRandomValuesExpression = '`crypto.getRandomValues()`'\ntry {\n const _getRandomValues = webCrypto.getRandomValues\n webCrypto.getRandomValues = function getRandomValues() {\n io(getRandomValuesExpression, 'crypto')\n return _getRandomValues.apply(webCrypto, arguments as any)\n }\n} catch {\n console.error(\n `Failed to install ${getRandomValuesExpression} extension. When using \\`experimental.dynamicIO\\` calling this function will not correctly trigger dynamic behavior.`\n )\n}\n\nconst randomUUIDExpression = '`crypto.randomUUID()`'\ntry {\n const _randomUUID = webCrypto.randomUUID\n webCrypto.randomUUID = function randomUUID() {\n io(randomUUIDExpression, 'crypto')\n return _randomUUID.apply(webCrypto, arguments as any)\n } as typeof _randomUUID\n} catch {\n console.error(\n `Failed to install ${getRandomValuesExpression} extension. When using \\`experimental.dynamicIO\\` calling this function will not correctly trigger dynamic behavior.`\n )\n}\n"],"names":["webCrypto","process","env","NEXT_RUNTIME","crypto","require","webcrypto","getRandomValuesExpression","_getRandomValues","getRandomValues","io","apply","arguments","console","error","randomUUIDExpression","_randomUUID","randomUUID"],"mappings":"AAAA;;;;;;;CAOC;;;;uBAEkB;AAEnB,IAAIA;AACJ,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;IACvCH,YAAYI;AACd,OAAO;IACL,IAAI,OAAOA,WAAW,aAAa;QACjCJ,YAAYK,QAAQ,eAAeC,SAAS;IAC9C,OAAO;QACLN,YAAYI;IACd;AACF;AAEA,MAAMG,4BAA4B;AAClC,IAAI;IACF,MAAMC,mBAAmBR,UAAUS,eAAe;IAClDT,UAAUS,eAAe,GAAG,SAASA;QACnCC,IAAAA,SAAE,EAACH,2BAA2B;QAC9B,OAAOC,iBAAiBG,KAAK,CAACX,WAAWY;IAC3C;AACF,EAAE,OAAM;IACNC,QAAQC,KAAK,CACX,CAAC,kBAAkB,EAAEP,0BAA0B,oHAAoH,CAAC;AAExK;AAEA,MAAMQ,uBAAuB;AAC7B,IAAI;IACF,MAAMC,cAAchB,UAAUiB,UAAU;IACxCjB,UAAUiB,UAAU,GAAG,SAASA;QAC9BP,IAAAA,SAAE,EAACK,sBAAsB;QACzB,OAAOC,YAAYL,KAAK,CAACX,WAAWY;IACtC;AACF,EAAE,OAAM;IACNC,QAAQC,KAAK,CACX,CAAC,kBAAkB,EAAEP,0BAA0B,oHAAoH,CAAC;AAExK"}
|
||||
Reference in New Issue
Block a user