(name, fallback = null)
| 13 | } = require('../core/codex/native-integrations'); |
| 14 | |
| 15 | function arg(name, fallback = null) { |
| 16 | const prefix = `${name}=`; |
| 17 | const inline = process.argv.find((value) => value.startsWith(prefix)); |
| 18 | if (inline) return inline.slice(prefix.length); |
| 19 | const idx = process.argv.indexOf(name); |
| 20 | return idx >= 0 ? process.argv[idx + 1] : fallback; |
| 21 | } |
| 22 | |
| 23 | function ensureDir(dir) { |
| 24 | fs.mkdirSync(dir, { recursive: true }); |
no outgoing calls
no test coverage detected