()
| 20 | const { parseHandoff } = require('../core/fleet/parse-handoff'); |
| 21 | |
| 22 | function main() { |
| 23 | const args = process.argv.slice(2); |
| 24 | let inputFile = null; |
| 25 | |
| 26 | for (let i = 0; i < args.length; i++) { |
| 27 | if (args[i] === '--input' && args[i + 1]) { |
| 28 | inputFile = args[i + 1]; |
| 29 | i++; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | const text = inputFile |
| 34 | ? fs.readFileSync(inputFile, 'utf8') |
| 35 | : fs.readFileSync(0, 'utf8'); |
| 36 | |
| 37 | process.stdout.write(JSON.stringify(parseHandoff(text), null, 2)); |
| 38 | } |
| 39 | |
| 40 | main(); |
no test coverage detected