| 5 | const { runtime } = require('../core/contracts'); |
| 6 | |
| 7 | function parseArgs(argv) { |
| 8 | const args = { json: false, runtimeId: null }; |
| 9 | for (let index = 2; index < argv.length; index++) { |
| 10 | const arg = argv[index]; |
| 11 | const value = argv[index + 1]; |
| 12 | if (arg === '--runtime') { args.runtimeId = value; index++; } |
| 13 | else if (arg === '--json') args.json = true; |
| 14 | else if (arg === '--help' || arg === '-h') args.help = true; |
| 15 | } |
| 16 | return args; |
| 17 | } |
| 18 | |
| 19 | function usage() { |
| 20 | return 'Usage: node scripts/runtime-matrix.js [--runtime codex] [--json]'; |