MCPcopy Create free account
hub / github.com/code-pushup/cli / yargsUploadCommandObject

Function yargsUploadCommandObject

packages/cli/src/lib/upload/upload-command.ts:9–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7} from '../implementation/logging.js';
8
9export 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}

Callers 2

commands.tsFile · 0.85

Calls 4

uploadFunction · 0.90
printCliCommandFunction · 0.85
renderPortalHintFunction · 0.85
newlineMethod · 0.80

Tested by

no test coverage detected