()
| 7 | } from '../implementation/logging.js'; |
| 8 | |
| 9 | export function yargsUploadCommandObject() { |
| 10 | const command = 'upload'; |
| 11 | return { |
| 12 | command, |
| 13 | describe: 'Upload report results to the portal', |
| 14 | handler: async <T>(args: ArgumentsCamelCase<T>) => { |
| 15 | printCliCommand(command); |
| 16 | |
| 17 | const options = args as unknown as UploadOptions; |
| 18 | if (options.upload == null) { |
| 19 | logger.newline(); |
| 20 | renderPortalHint(); |
| 21 | logger.newline(); |
| 22 | throw new Error('Upload to Portal is missing configuration'); |
| 23 | } |
| 24 | await upload(options); |
| 25 | }, |
| 26 | } satisfies CommandModule; |
| 27 | } |
no test coverage detected