UNPKG

@code-pushup/cli

Version:

A CLI to run all kinds of code quality measurements to align your team with company goals

26 lines 966 B
import { bold, gray } from 'ansis'; import { upload } from '@code-pushup/core'; import { ui } from '@code-pushup/utils'; import { CLI_NAME } from '../constants.js'; import { renderIntegratePortalHint, uploadSuccessfulLog, } from '../implementation/logging.js'; export function yargsUploadCommandObject() { const command = 'upload'; return { command, describe: 'Upload report results to the portal', handler: async (args) => { ui().logger.log(bold(CLI_NAME)); ui().logger.info(gray(`Run ${command}...`)); const options = args; if (options.upload == null) { renderIntegratePortalHint(); throw new Error('Upload configuration not set'); } const report = await upload(options); if (report?.url) { uploadSuccessfulLog(report.url); } }, }; } //# sourceMappingURL=upload-command.js.map