(argv)
| 51 | // -- CLI argument parser ------------------------------------------------------ |
| 52 | |
| 53 | function parseArgs(argv) { |
| 54 | const opts = { |
| 55 | mode: null, |
| 56 | json: false, |
| 57 | intake: false, |
| 58 | }; |
| 59 | |
| 60 | for (const arg of argv) { |
| 61 | if (arg === '--scan') opts.mode = 'scan'; |
| 62 | if (arg === '--status') opts.mode = 'status'; |
| 63 | if (arg === '--reset') opts.mode = 'reset'; |
| 64 | if (arg === '--json') opts.json = true; |
| 65 | if (arg === '--intake') opts.intake = true; |
| 66 | } |
| 67 | |
| 68 | if (!opts.mode) { |
| 69 | console.error('Usage: node scripts/watch.js [--scan|--status|--reset] [--json] [--intake]'); |
| 70 | process.exit(1); |
| 71 | } |
| 72 | |
| 73 | return opts; |
| 74 | } |
| 75 | |
| 76 | // -- Marker identity ---------------------------------------------------------- |
| 77 |
no outgoing calls
no test coverage detected