/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
server
/
lib
/
/opt/canhelp/node_modules/next/dist/server/lib
mkdir
upload
Name
Size
Mode
Actions
cache-handlers/
-
0755
rm
experimental/
-
0755
rm
incremental-cache/
-
0755
rm
module-loader/
-
0755
rm
router-utils/
-
0755
rm
server-ipc/
-
0755
rm
trace/
-
0755
rm
app-dir-module.d.ts
623
0644
edit
dl
rm
app-dir-module.js
1675
0644
edit
dl
rm
app-dir-module.js.map
2632
0644
edit
dl
rm
app-info-log.d.ts
617
0644
edit
dl
rm
app-info-log.js
4846
0644
edit
dl
rm
app-info-log.js.map
5867
0644
edit
dl
rm
async-callback-set.d.ts
140
0644
edit
dl
rm
async-callback-set.js
733
0644
edit
dl
rm
async-callback-set.js.map
1113
0644
edit
dl
rm
cache-control.d.ts
572
0644
edit
dl
rm
cache-control.js
815
0644
edit
dl
rm
cache-control.js.map
1623
0644
edit
dl
rm
chrome-devtools-workspace.d.ts
418
0644
edit
dl
rm
chrome-devtools-workspace.js
4368
0644
edit
dl
rm
chrome-devtools-workspace.js.map
4190
0644
edit
dl
rm
clone-response.d.ts
531
0644
edit
dl
rm
clone-response.js
2641
0644
edit
dl
rm
clone-response.js.map
4441
0644
edit
dl
rm
cpu-profile.d.ts
112
0644
edit
dl
rm
cpu-profile.js
1034
0644
edit
dl
rm
cpu-profile.js.map
2062
0644
edit
dl
rm
decode-query-path-parameter.d.ts
189
0644
edit
dl
rm
decode-query-path-parameter.js
688
0644
edit
dl
rm
decode-query-path-parameter.js.map
755
0644
edit
dl
rm
dedupe-fetch.d.ts
147
0644
edit
dl
rm
dedupe-fetch.js
6785
0644
edit
dl
rm
dedupe-fetch.js.map
7396
0644
edit
dl
rm
dev-bundler-service.d.ts
1183
0644
edit
dl
rm
dev-bundler-service.js
3238
0644
edit
dl
rm
dev-bundler-service.js.map
5792
0644
edit
dl
rm
disk-lru-cache.external.d.ts
808
0644
edit
dl
rm
disk-lru-cache.external.js
1915
0644
edit
dl
rm
disk-lru-cache.external.js.map
3146
0644
edit
dl
rm
etag.d.ts
453
0644
edit
dl
rm
etag.js
1585
0644
edit
dl
rm
etag.js.map
2198
0644
edit
dl
rm
find-page-file.d.ts
1395
0644
edit
dl
rm
find-page-file.js
5421
0644
edit
dl
rm
find-page-file.js.map
9440
0644
edit
dl
rm
fix-mojibake.d.ts
60
0644
edit
dl
rm
fix-mojibake.js
727
0644
edit
dl
rm
fix-mojibake.js.map
1041
0644
edit
dl
rm
format-hostname.d.ts
215
0644
edit
dl
rm
format-hostname.js
408
0644
edit
dl
rm
format-hostname.js.map
610
0644
edit
dl
rm
i18n-provider.d.ts
2391
0644
edit
dl
rm
i18n-provider.js
5593
0644
edit
dl
rm
i18n-provider.js.map
9046
0644
edit
dl
rm
implicit-tags.d.ts
986
0644
edit
dl
rm
implicit-tags.js
2685
0644
edit
dl
rm
implicit-tags.js.map
5212
0644
edit
dl
rm
is-ipv6.d.ts
52
0644
edit
dl
rm
is-ipv6.js
2284
0644
edit
dl
rm
is-ipv6.js.map
3407
0644
edit
dl
rm
lazy-result.d.ts
565
0644
edit
dl
rm
lazy-result.js
1246
0644
edit
dl
rm
lazy-result.js.map
1907
0644
edit
dl
rm
lru-cache.d.ts
3661
0644
edit
dl
rm
lru-cache.js
6643
0644
edit
dl
rm
lru-cache.js.map
11358
0644
edit
dl
rm
match-next-data-pathname.d.ts
113
0644
edit
dl
rm
match-next-data-pathname.js
551
0644
edit
dl
rm
match-next-data-pathname.js.map
636
0644
edit
dl
rm
mock-request.d.ts
4125
0644
edit
dl
rm
mock-request.js
14495
0644
edit
dl
rm
mock-request.js.map
21269
0644
edit
dl
rm
node-fs-methods.d.ts
93
0644
edit
dl
rm
node-fs-methods.js
772
0644
edit
dl
rm
node-fs-methods.js.map
976
0644
edit
dl
rm
parse-stack.d.ts
293
0644
edit
dl
rm
parse-stack.js
1799
0644
edit
dl
rm
parse-stack.js.map
2991
0644
edit
dl
rm
patch-fetch.d.ts
958
0644
edit
dl
rm
patch-fetch.js
45960
0644
edit
dl
rm
patch-fetch.js.map
64710
0644
edit
dl
rm
patch-set-header.d.ts
464
0644
edit
dl
rm
patch-set-header.js
1452
0644
edit
dl
rm
patch-set-header.js.map
2463
0644
edit
dl
rm
render-server.d.ts
3803
0644
edit
dl
rm
render-server.js
3938
0644
edit
dl
rm
render-server.js.map
6377
0644
edit
dl
rm
router-server.d.ts
816
0644
edit
dl
rm
router-server.js
33071
0644
edit
dl
rm
router-server.js.map
46473
0644
edit
dl
rm
server-action-request-meta.d.ts
537
0644
edit
dl
rm
server-action-request-meta.js
2116
0644
edit
dl
rm
server-action-request-meta.js.map
3070
0644
edit
dl
rm
source-maps.d.ts
1976
0644
edit
dl
rm
source-maps.js
9010
0644
edit
dl
rm
source-maps.js.map
14908
0644
edit
dl
rm
start-server.d.ts
1060
0644
edit
dl
rm
start-server.js
19579
0644
edit
dl
rm
start-server.js.map
27600
0644
edit
dl
rm
streaming-metadata.d.ts
274
0644
edit
dl
rm
streaming-metadata.js
1137
0644
edit
dl
rm
streaming-metadata.js.map
1588
0644
edit
dl
rm
to-route.d.ts
506
0644
edit
dl
rm
to-route.js
778
0644
edit
dl
rm
to-route.js.map
863
0644
edit
dl
rm
types.d.ts
291
0644
edit
dl
rm
types.js
115
0644
edit
dl
rm
types.js.map
67
0644
edit
dl
rm
utils.d.ts
2966
0644
edit
dl
rm
utils.js
8312
0644
edit
dl
rm
utils.js.map
13658
0644
edit
dl
rm
worker-utils.d.ts
57
0644
edit
dl
rm
worker-utils.js
1128
0644
edit
dl
rm
worker-utils.js.map
1125
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/server/lib/utils.js
(8312B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { RESTART_EXIT_CODE: null, formatDebugAddress: null, formatNodeOptions: null, getFormattedDebugAddress: null, getFormattedNodeOptionsWithoutInspect: null, getMaxOldSpaceSize: null, getNodeDebugType: null, getParsedDebugAddress: null, getParsedNodeOptionsWithoutInspect: null, parseValidPositiveInteger: null, printAndExit: null, tokenizeArgs: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { RESTART_EXIT_CODE: function() { return RESTART_EXIT_CODE; }, formatDebugAddress: function() { return formatDebugAddress; }, formatNodeOptions: function() { return formatNodeOptions; }, getFormattedDebugAddress: function() { return getFormattedDebugAddress; }, getFormattedNodeOptionsWithoutInspect: function() { return getFormattedNodeOptionsWithoutInspect; }, getMaxOldSpaceSize: function() { return getMaxOldSpaceSize; }, getNodeDebugType: function() { return getNodeDebugType; }, getParsedDebugAddress: function() { return getParsedDebugAddress; }, getParsedNodeOptionsWithoutInspect: function() { return getParsedNodeOptionsWithoutInspect; }, parseValidPositiveInteger: function() { return parseValidPositiveInteger; }, printAndExit: function() { return printAndExit; }, tokenizeArgs: function() { return tokenizeArgs; } }); const _nodeutil = require("node:util"); const _commander = require("next/dist/compiled/commander"); function printAndExit(message, code = 1) { if (code === 0) { console.log(message); } else { console.error(message); } return process.exit(code); } const parseNodeArgs = (args)=>{ const { values, tokens } = (0, _nodeutil.parseArgs)({ args, strict: false, tokens: true }); // For the `NODE_OPTIONS`, we support arguments with values without the `=` // sign. We need to parse them manually. let orphan = null; for(let i = 0; i < tokens.length; i++){ const token = tokens[i]; if (token.kind === 'option-terminator') { break; } // When we encounter an option, if it's value is undefined, we should check // to see if the following tokens are positional parameters. If they are, // then the option is orphaned, and we can assign it. if (token.kind === 'option') { orphan = typeof token.value === 'undefined' ? token : null; continue; } // If the token isn't a positional one, then we can't assign it to the found // orphaned option. if (token.kind !== 'positional') { orphan = null; continue; } // If we don't have an orphan, then we can skip this token. if (!orphan) { continue; } // If the token is a positional one, and it has a value, so add it to the // values object. If it already exists, append it with a space. if (orphan.name in values && typeof values[orphan.name] === 'string') { values[orphan.name] += ` ${token.value}`; } else { values[orphan.name] = token.value; } } return values; }; const tokenizeArgs = (input)=>{ let args = []; let isInString = false; let willStartNewArg = true; for(let i = 0; i < input.length; i++){ let char = input[i]; // Skip any escaped characters in strings. if (char === '\\' && isInString) { // Ensure we don't have an escape character at the end. if (input.length === i + 1) { throw Object.defineProperty(new Error('Invalid escape character at the end.'), "__NEXT_ERROR_CODE", { value: "E168", enumerable: false, configurable: true }); } // Skip the next character. char = input[++i]; } else if (char === ' ' && !isInString) { willStartNewArg = true; continue; } else if (char === '"') { isInString = !isInString; continue; } // If we're starting a new argument, we should add it to the array. if (willStartNewArg) { args.push(char); willStartNewArg = false; } else { args[args.length - 1] += char; } } if (isInString) { throw Object.defineProperty(new Error('Unterminated string'), "__NEXT_ERROR_CODE", { value: "E208", enumerable: false, configurable: true }); } return args; }; /** * Get the node options from the environment variable `NODE_OPTIONS` and returns * them as an array of strings. * * @returns An array of strings with the node options. */ const getNodeOptionsArgs = ()=>{ if (!process.env.NODE_OPTIONS) return []; return tokenizeArgs(process.env.NODE_OPTIONS); }; const formatDebugAddress = ({ host, port })=>{ if (host) return `${host}:${port}`; return `${port}`; }; const getParsedDebugAddress = ()=>{ const args = getNodeOptionsArgs(); if (args.length === 0) return { host: undefined, port: 9229 }; const parsed = parseNodeArgs(args); // We expect to find the debug port in one of these options. The first one // found will be used. const address = parsed.inspect ?? parsed['inspect-brk'] ?? parsed['inspect_brk']; if (!address || typeof address !== 'string') { return { host: undefined, port: 9229 }; } // The address is in the form of `[host:]port`. Let's parse the address. if (address.includes(':')) { const [host, port] = address.split(':'); return { host, port: parseInt(port, 10) }; } return { host: undefined, port: parseInt(address, 10) }; }; const getFormattedDebugAddress = ()=>formatDebugAddress(getParsedDebugAddress()); function formatNodeOptions(args) { return Object.entries(args).map(([key, value])=>{ if (value === true) { return `--${key}`; } if (value) { return `--${key}=${// Values with spaces need to be quoted. We use JSON.stringify to // also escape any nested quotes. value.includes(' ') && !value.startsWith('"') ? JSON.stringify(value) : value}`; } return null; }).filter((arg)=>arg !== null).join(' '); } function getParsedNodeOptionsWithoutInspect() { const args = getNodeOptionsArgs(); if (args.length === 0) return {}; const parsed = parseNodeArgs(args); // Remove inspect options. delete parsed.inspect; delete parsed['inspect-brk']; delete parsed['inspect_brk']; return parsed; } function getFormattedNodeOptionsWithoutInspect() { const args = getParsedNodeOptionsWithoutInspect(); if (Object.keys(args).length === 0) return ''; return formatNodeOptions(args); } function parseValidPositiveInteger(value) { const parsedValue = parseInt(value, 10); if (isNaN(parsedValue) || !isFinite(parsedValue) || parsedValue < 0) { throw new _commander.InvalidArgumentError(`'${value}' is not a non-negative number.`); } return parsedValue; } const RESTART_EXIT_CODE = 77; function getNodeDebugType() { const args = [ ...process.execArgv, ...getNodeOptionsArgs() ]; if (args.length === 0) return; const parsed = parseNodeArgs(args); if (parsed.inspect) return 'inspect'; if (parsed['inspect-brk'] || parsed['inspect_brk']) return 'inspect-brk'; } function getMaxOldSpaceSize() { const args = getNodeOptionsArgs(); if (args.length === 0) return; const parsed = parseNodeArgs(args); const size = parsed['max-old-space-size'] || parsed['max_old_space_size']; if (!size || typeof size !== 'string') return; return parseInt(size, 10); } //# sourceMappingURL=utils.js.map
Save
cmd:
run