()
| 12 | } |
| 13 | |
| 14 | export const requireKey = (): string => { |
| 15 | const key = resolveApiKey(); |
| 16 | if (!key) { |
| 17 | printError("Not logged in. Run: polli auth login"); |
| 18 | printError( |
| 19 | "Or pipe a key: printf '%s' '<your-key>' | polli auth login --with-token", |
| 20 | ); |
| 21 | process.exit(1); |
| 22 | } |
| 23 | return key; |
| 24 | }; |
| 25 | |
| 26 | interface RequestOptions { |
| 27 | method?: string; |
no test coverage detected