@aikidosec/ci-api-client 1.0.17 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ import apiKey from './commands/apiKey.js';
6
6
  import scan from './commands/scan.js';
7
7
  import scanRelease from './commands/scanRelease.js';
8
8
  import upload from './commands/upload.js';
9
+ import uploadCoverage from './commands/uploadCoverage.js';
9
10
 
10
11
  // Load all .env configuration variables and auto-inject them into process.env
11
12
  dotenv.config(
@@ -20,13 +21,14 @@ program
20
21
  .description(
21
22
  'CLI api client to easily integrate the Aikido public CI API into custom deploy scripts'
22
23
  )
23
- .version('1.0.16');
24
+ .version('1.0.18');
24
25
 
25
26
  // Load in all app commands and set them up in the `program` instance
26
27
  apiKey.cliSetup(program);
27
28
  scan.cliSetup(program);
28
29
  scanRelease.cliSetup(program);
29
30
  upload.cliSetup(program);
31
+ uploadCoverage.cliSetup(program);
30
32
 
31
33
  // Override global process.env type
32
34
  declare global {
package/src/output.ts CHANGED
@@ -10,6 +10,13 @@ export const outputLog = (message: string): void => {
10
10
  }
11
11
  };
12
12
 
13
+ // Output a machine readable result
14
+ // This ignores the global "quiet" option: it is the output that was asked
15
+ // for, not human readable progress information
16
+ export const outputJson = (data: unknown): void => {
17
+ console.log(JSON.stringify(data, null, 2));
18
+ };
19
+
13
20
  // Output some message, var, .. if --debug was provided
14
21
  export const outputDebug = (variable: any): void => {
15
22
  if (process.env.CLI_DEBUG == true || process.env.CLI_DEBUG == 'true') {