(name, fallback = null)
| 10 | } = require('../core/codex/native-integrations'); |
| 11 | |
| 12 | function arg(name, fallback = null) { |
| 13 | const prefix = `${name}=`; |
| 14 | const inline = process.argv.find((value) => value.startsWith(prefix)); |
| 15 | if (inline) return inline.slice(prefix.length); |
| 16 | const idx = process.argv.indexOf(name); |
| 17 | return idx >= 0 ? process.argv[idx + 1] : fallback; |
| 18 | } |
| 19 | |
| 20 | function readStdin() { |
| 21 | try { |