(flag: string)
| 42 | } |
| 43 | |
| 44 | const get = (flag: string): string | undefined => { |
| 45 | const idx = args.indexOf(flag); |
| 46 | if (idx === -1 || idx + 1 >= args.length) return undefined; |
| 47 | return args[idx + 1]; |
| 48 | }; |
| 49 | |
| 50 | const sandbox = get("--sandbox"); |
| 51 | const apiUrl = get("--api-url") ?? "https://api.hindsight.vectorize.io"; |