(argv)
| 8 | const distDir = process.env.NEXT_DIST_DIR?.trim() || DEFAULT_DIST_DIR; |
| 9 | |
| 10 | function readCliPort(argv) { |
| 11 | for (let index = 0; index < argv.length; index += 1) { |
| 12 | const arg = argv[index]; |
| 13 | if (arg === "--port" || arg === "-p") { |
| 14 | return argv[index + 1]; |
| 15 | } |
| 16 | if (arg.startsWith("--port=")) { |
| 17 | return arg.slice("--port=".length); |
| 18 | } |
| 19 | if (arg.startsWith("-p=")) { |
| 20 | return arg.slice("-p=".length); |
| 21 | } |
| 22 | } |
| 23 | return process.env.PORT?.trim(); |
| 24 | } |
| 25 | |
| 26 | function assertPublicRuntimeGuard() { |
| 27 | const [, , command, ...args] = process.argv; |
no outgoing calls
no test coverage detected