BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/dist/server/node-environment-extensions
Run
Logout
Edit File
Size: 5.06 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/dist/server/node-environment-extensions/node-crypto.js
Text
Base64
/** * 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
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 18
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
date.d.ts
11 B
lrw-r--r--
2025-03-28 11:04:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
date.js
2.29 KB
lrw-r--r--
2025-03-28 11:04:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
date.js.map
3.37 KB
lrw-r--r--
2025-03-28 11:04:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error-inspect.d.ts
11 B
lrw-r--r--
2025-03-28 11:04:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error-inspect.js
252 B
lrw-r--r--
2025-03-28 11:04:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error-inspect.js.map
344 B
lrw-r--r--
2025-03-28 11:04:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
node-crypto.d.ts
469 B
lrw-r--r--
2025-03-28 11:04:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
node-crypto.js
5.06 KB
lrw-r--r--
2025-03-28 11:04:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
node-crypto.js.map
7.43 KB
lrw-r--r--
2025-03-28 11:04:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
random.d.ts
435 B
lrw-r--r--
2025-03-28 11:04:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
random.js
1.18 KB
lrw-r--r--
2025-03-28 11:04:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
random.js.map
1.67 KB
lrw-r--r--
2025-03-28 11:04:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.d.ts
125 B
lrw-r--r--
2025-03-28 11:04:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
2.84 KB
lrw-r--r--
2025-03-28 11:04:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js.map
3.42 KB
lrw-r--r--
2025-03-28 11:04:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
web-crypto.d.ts
468 B
lrw-r--r--
2025-03-28 11:04:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
web-crypto.js
1.79 KB
lrw-r--r--
2025-03-28 11:04:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
web-crypto.js.map
2.72 KB
lrw-r--r--
2025-03-28 11:04:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).