/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
server
/
app-render
/
/opt/canhelp/node_modules/next/dist/server/app-render
mkdir
upload
Name
Size
Mode
Actions
metadata-insertion/
-
0755
rm
module-loading/
-
0755
rm
rsc/
-
0755
rm
action-async-storage-instance.d.ts
144
0644
edit
dl
rm
action-async-storage-instance.js
446
0644
edit
dl
rm
action-async-storage-instance.js.map
502
0644
edit
dl
rm
action-async-storage.external.d.ts
359
0644
edit
dl
rm
action-async-storage.external.js
399
0644
edit
dl
rm
action-async-storage.external.js.map
704
0644
edit
dl
rm
action-handler.d.ts
1807
0644
edit
dl
rm
action-handler.js
48691
0644
edit
dl
rm
action-handler.js.map
68350
0644
edit
dl
rm
action-utils.d.ts
518
0644
edit
dl
rm
action-utils.js
3867
0644
edit
dl
rm
action-utils.js.map
5488
0644
edit
dl
rm
after-task-async-storage-instance.d.ts
157
0644
edit
dl
rm
after-task-async-storage-instance.js
459
0644
edit
dl
rm
after-task-async-storage-instance.js.map
522
0644
edit
dl
rm
after-task-async-storage.external.d.ts
649
0644
edit
dl
rm
after-task-async-storage.external.js
419
0644
edit
dl
rm
after-task-async-storage.external.js.map
971
0644
edit
dl
rm
app-render-prerender-utils.d.ts
1889
0644
edit
dl
rm
app-render-prerender-utils.js
7252
0644
edit
dl
rm
app-render-prerender-utils.js.map
10883
0644
edit
dl
rm
app-render-render-utils.d.ts
335
0644
edit
dl
rm
app-render-render-utils.js
1152
0644
edit
dl
rm
app-render-render-utils.js.map
1608
0644
edit
dl
rm
app-render.d.ts
4106
0644
edit
dl
rm
app-render.js
165965
0644
edit
dl
rm
app-render.js.map
240673
0644
edit
dl
rm
async-local-storage.d.ts
316
0644
edit
dl
rm
async-local-storage.js
2071
0644
edit
dl
rm
async-local-storage.js.map
2799
0644
edit
dl
rm
cache-signal.d.ts
1279
0644
edit
dl
rm
cache-signal.js
5984
0644
edit
dl
rm
cache-signal.js.map
8141
0644
edit
dl
rm
collect-segment-data.d.ts
1125
0644
edit
dl
rm
collect-segment-data.js
13386
0644
edit
dl
rm
collect-segment-data.js.map
22382
0644
edit
dl
rm
create-component-styles-and-scripts.d.ts
410
0644
edit
dl
rm
create-component-styles-and-scripts.js
1689
0644
edit
dl
rm
create-component-styles-and-scripts.js.map
2420
0644
edit
dl
rm
create-component-tree.d.ts
1030
0644
edit
dl
rm
create-component-tree.js
41700
0644
edit
dl
rm
create-component-tree.js.map
59353
0644
edit
dl
rm
create-error-handler.d.ts
1390
0644
edit
dl
rm
create-error-handler.js
10386
0644
edit
dl
rm
create-error-handler.js.map
14097
0644
edit
dl
rm
create-flight-router-state-from-loader-tree.d.ts
500
0644
edit
dl
rm
create-flight-router-state-from-loader-tree.js
3821
0644
edit
dl
rm
create-flight-router-state-from-loader-tree.js.map
5715
0644
edit
dl
rm
csrf-protection.d.ts
104
0644
edit
dl
rm
csrf-protection.js
3021
0644
edit
dl
rm
csrf-protection.js.map
3937
0644
edit
dl
rm
dynamic-access-async-storage-instance.d.ts
163
0644
edit
dl
rm
dynamic-access-async-storage-instance.js
475
0644
edit
dl
rm
dynamic-access-async-storage-instance.js.map
536
0644
edit
dl
rm
dynamic-access-async-storage.external.d.ts
393
0644
edit
dl
rm
dynamic-access-async-storage.external.js
443
0644
edit
dl
rm
dynamic-access-async-storage.external.js.map
762
0644
edit
dl
rm
dynamic-rendering.d.ts
6174
0644
edit
dl
rm
dynamic-rendering.js
33117
0644
edit
dl
rm
dynamic-rendering.js.map
45831
0644
edit
dl
rm
encryption-utils-server.d.ts
141
0644
edit
dl
rm
encryption-utils-server.js
4823
0644
edit
dl
rm
encryption-utils-server.js.map
7153
0644
edit
dl
rm
encryption-utils.d.ts
1443
0644
edit
dl
rm
encryption-utils.js
7849
0644
edit
dl
rm
encryption-utils.js.map
11257
0644
edit
dl
rm
encryption.d.ts
241
0644
edit
dl
rm
encryption.js
11856
0644
edit
dl
rm
encryption.js.map
16682
0644
edit
dl
rm
entry-base.d.ts
2199
0644
edit
dl
rm
entry-base.js
8467
0644
edit
dl
rm
entry-base.js.map
6257
0644
edit
dl
rm
flight-render-result.d.ts
353
0644
edit
dl
rm
flight-render-result.js
794
0644
edit
dl
rm
flight-render-result.js.map
967
0644
edit
dl
rm
get-asset-query-string.d.ts
153
0644
edit
dl
rm
get-asset-query-string.js
999
0644
edit
dl
rm
get-asset-query-string.js.map
1591
0644
edit
dl
rm
get-css-inlined-link-tags.d.ts
524
0644
edit
dl
rm
get-css-inlined-link-tags.js
1549
0644
edit
dl
rm
get-css-inlined-link-tags.js.map
2576
0644
edit
dl
rm
get-layer-assets.d.ts
599
0644
edit
dl
rm
get-layer-assets.js
3329
0644
edit
dl
rm
get-layer-assets.js.map
5503
0644
edit
dl
rm
get-preloadable-fonts.d.ts
709
0644
edit
dl
rm
get-preloadable-fonts.js
1160
0644
edit
dl
rm
get-preloadable-fonts.js.map
2386
0644
edit
dl
rm
get-script-nonce-from-header.d.ts
94
0644
edit
dl
rm
get-script-nonce-from-header.js
2017
0644
edit
dl
rm
get-script-nonce-from-header.js.map
2785
0644
edit
dl
rm
get-segment-param.d.ts
228
0644
edit
dl
rm
get-segment-param.js
1524
0644
edit
dl
rm
get-segment-param.js.map
2340
0644
edit
dl
rm
get-short-dynamic-param-type.d.ts
362
0644
edit
dl
rm
get-short-dynamic-param-type.js
1069
0644
edit
dl
rm
get-short-dynamic-param-type.js.map
1199
0644
edit
dl
rm
has-loading-component-in-tree.d.ts
135
0644
edit
dl
rm
has-loading-component-in-tree.js
544
0644
edit
dl
rm
has-loading-component-in-tree.js.map
813
0644
edit
dl
rm
interop-default.d.ts
121
0644
edit
dl
rm
interop-default.js
391
0644
edit
dl
rm
interop-default.js.map
409
0644
edit
dl
rm
make-get-server-inserted-html.d.ts
500
0644
edit
dl
rm
make-get-server-inserted-html.js
4641
0644
edit
dl
rm
make-get-server-inserted-html.js.map
6518
0644
edit
dl
rm
parse-and-validate-flight-router-state.d.ts
388
0644
edit
dl
rm
parse-and-validate-flight-router-state.js
1835
0644
edit
dl
rm
parse-and-validate-flight-router-state.js.map
2429
0644
edit
dl
rm
parse-loader-tree.d.ts
430
0644
edit
dl
rm
parse-loader-tree.js
1009
0644
edit
dl
rm
parse-loader-tree.js.map
1426
0644
edit
dl
rm
postponed-state.d.ts
2153
0644
edit
dl
rm
postponed-state.js
6425
0644
edit
dl
rm
postponed-state.js.map
9211
0644
edit
dl
rm
prospective-render-utils.d.ts
115
0644
edit
dl
rm
prospective-render-utils.js
2587
0644
edit
dl
rm
prospective-render-utils.js.map
3412
0644
edit
dl
rm
react-large-shell-error.d.ts
107
0644
edit
dl
rm
react-large-shell-error.js
596
0644
edit
dl
rm
react-large-shell-error.js.map
789
0644
edit
dl
rm
react-server.node.d.ts
152
0644
edit
dl
rm
react-server.node.js
1111
0644
edit
dl
rm
react-server.node.js.map
714
0644
edit
dl
rm
render-css-resource.d.ts
612
0644
edit
dl
rm
render-css-resource.js
2460
0644
edit
dl
rm
render-css-resource.js.map
3947
0644
edit
dl
rm
required-scripts.d.ts
444
0644
edit
dl
rm
required-scripts.js
2855
0644
edit
dl
rm
required-scripts.js.map
4291
0644
edit
dl
rm
segment-explorer-path.d.ts
956
0644
edit
dl
rm
segment-explorer-path.js
3854
0644
edit
dl
rm
segment-explorer-path.js.map
5293
0644
edit
dl
rm
server-inserted-html.d.ts
293
0644
edit
dl
rm
server-inserted-html.js
1503
0644
edit
dl
rm
server-inserted-html.js.map
1771
0644
edit
dl
rm
strip-flight-headers.d.ts
245
0644
edit
dl
rm
strip-flight-headers.js
494
0644
edit
dl
rm
strip-flight-headers.js.map
725
0644
edit
dl
rm
types.d.ts
10185
0644
edit
dl
rm
types.js
2923
0644
edit
dl
rm
types.js.map
13265
0644
edit
dl
rm
use-flight-response.d.ts
1136
0644
edit
dl
rm
use-flight-response.js
6844
0644
edit
dl
rm
use-flight-response.js.map
11174
0644
edit
dl
rm
walk-tree-with-flight-router-state.d.ts
1394
0644
edit
dl
rm
walk-tree-with-flight-router-state.js
11174
0644
edit
dl
rm
walk-tree-with-flight-router-state.js.map
17316
0644
edit
dl
rm
work-async-storage-instance.d.ts
136
0644
edit
dl
rm
work-async-storage-instance.js
438
0644
edit
dl
rm
work-async-storage-instance.js.map
490
0644
edit
dl
rm
work-async-storage.external.d.ts
3745
0644
edit
dl
rm
work-async-storage.external.js
387
0644
edit
dl
rm
work-async-storage.external.js.map
4214
0644
edit
dl
rm
work-unit-async-storage-instance.d.ts
153
0644
edit
dl
rm
work-unit-async-storage-instance.js
455
0644
edit
dl
rm
work-unit-async-storage-instance.js.map
516
0644
edit
dl
rm
work-unit-async-storage.external.d.ts
12301
0644
edit
dl
rm
work-unit-async-storage.external.js
7822
0644
edit
dl
rm
work-unit-async-storage.external.js.map
21037
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/server/app-render/encryption-utils-server.js
(4823B)
// This file should never be bundled into application's runtime code and should // stay in the Next.js server. "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "generateEncryptionKeyBase64", { enumerable: true, get: function() { return generateEncryptionKeyBase64; } }); const _path = /*#__PURE__*/ _interop_require_default(require("path")); const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); const _cachedir = require("../cache-dir"); const _encryptionutils = require("./encryption-utils"); function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // Keep the key in memory as it should never change during the lifetime of the server in // both development and production. let __next_encryption_key_generation_promise = null; const CONFIG_FILE = '.rscinfo'; const ENCRYPTION_KEY = 'encryption.key'; const ENCRYPTION_EXPIRE_AT = 'encryption.expire_at'; const EXPIRATION = 1000 * 60 * 60 * 24 * 14 // 14 days ; async function writeCache(distDir, configValue) { const cacheBaseDir = (0, _cachedir.getStorageDirectory)(distDir); if (!cacheBaseDir) return; const configPath = _path.default.join(cacheBaseDir, CONFIG_FILE); if (!_fs.default.existsSync(cacheBaseDir)) { await _fs.default.promises.mkdir(cacheBaseDir, { recursive: true }); } await _fs.default.promises.writeFile(configPath, JSON.stringify({ [ENCRYPTION_KEY]: configValue, [ENCRYPTION_EXPIRE_AT]: Date.now() + EXPIRATION })); } // This utility is used to get a key for the cache directory. If the // key is not present, it will generate a new one and store it in the // cache directory inside dist. // The key will also expire after a certain amount of time. Once it // expires, a new one will be generated. // During the lifetime of the server, it will be reused and never refreshed. async function loadOrGenerateKey(distDir, isBuild, generateKey) { const cacheBaseDir = (0, _cachedir.getStorageDirectory)(distDir); if (!cacheBaseDir) { // There's no persistent storage available. We generate a new key. // This also covers development time. return await generateKey(); } const configPath = _path.default.join(cacheBaseDir, CONFIG_FILE); async function hasCachedKey() { if (!_fs.default.existsSync(configPath)) return false; try { const config = JSON.parse(await _fs.default.promises.readFile(configPath, 'utf8')); if (!config) return false; if (typeof config[ENCRYPTION_KEY] !== 'string' || typeof config[ENCRYPTION_EXPIRE_AT] !== 'number') { return false; } // For build time, we need to rotate the key if it's expired. Otherwise // (next start) we have to keep the key as it is so the runtime key matches // the build time key. if (isBuild && config[ENCRYPTION_EXPIRE_AT] < Date.now()) { return false; } const cachedKey = config[ENCRYPTION_KEY]; // If encryption key is provided via env, and it's not same as valid cache, // we should not use the cached key and respect the env key. if (cachedKey && process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY && cachedKey !== process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY) { return false; } return cachedKey; } catch { // Broken config file. We should generate a new key and overwrite it. return false; } } const maybeValidKey = await hasCachedKey(); if (typeof maybeValidKey === 'string') { return maybeValidKey; } const key = await generateKey(); await writeCache(distDir, key); return key; } async function generateEncryptionKeyBase64({ isBuild, distDir }) { // This avoids it being generated multiple times in parallel. if (!__next_encryption_key_generation_promise) { __next_encryption_key_generation_promise = loadOrGenerateKey(distDir, isBuild, async ()=>{ const providedKey = process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY; if (providedKey) { return providedKey; } const key = await crypto.subtle.generateKey({ name: 'AES-GCM', length: 256 }, true, [ 'encrypt', 'decrypt' ]); const exported = await crypto.subtle.exportKey('raw', key); return btoa((0, _encryptionutils.arrayBufferToString)(exported)); }); } return __next_encryption_key_generation_promise; } //# sourceMappingURL=encryption-utils-server.js.map
Save
cmd:
run