@aikidosec/ci-api-client 1.0.6 → 1.0.7

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.
@@ -118,7 +118,7 @@ export const scan = async ({ repoId, baseCommitId, headCommitId, branchName, opt
118
118
  pollStatus();
119
119
  };
120
120
  const parseCliOptions = (userCliOptions) => {
121
- const apiOptions = { version: '1.0.6' };
121
+ const apiOptions = { version: '1.0.7' };
122
122
  const cliOptions = { pollInterval: 5 };
123
123
  if (userCliOptions.pullRequestTitle) {
124
124
  apiOptions.pull_request_metadata = {
@@ -115,7 +115,7 @@ export const scan = async ({ repoId, commitId, options, pollInterval = 10, onSta
115
115
  pollStatus();
116
116
  };
117
117
  const parseCliOptions = (userCliOptions) => {
118
- const apiOptions = { version: '1.0.6' };
118
+ const apiOptions = { version: '1.0.7' };
119
119
  const cliOptions = { pollInterval: 10 };
120
120
  if (userCliOptions.pullRequestTitle) {
121
121
  apiOptions.pull_request_metadata = {
package/lib/index.js CHANGED
@@ -11,7 +11,7 @@ export const program = new Command();
11
11
  program
12
12
  .name('Aikido API Client')
13
13
  .description('CLI api client to easily integrate the Aikido public CI API into custom deploy scripts')
14
- .version('1.0.6');
14
+ .version('1.0.7');
15
15
  apiKey.cliSetup(program);
16
16
  scan.cliSetup(program);
17
17
  scanRelease.cliSetup(program);
@@ -26,6 +26,11 @@ program
26
26
  .on('option:debug', function () {
27
27
  process.env.CLI_DEBUG = true;
28
28
  });
29
+ program
30
+ .option('--plain-output', 'Disables the formatting on output')
31
+ .on('option:plain-output', function () {
32
+ chalk.level = 0;
33
+ });
29
34
  program.option('--apikey <apikey>', 'Use a cli apikey instead of reading the key from the configuration');
30
35
  program.configureOutput({
31
36
  outputError: (str, write) => write(chalk.red(str)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikidosec/ci-api-client",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "CLI api client to easily integrate the Aikido public CI API into custom deploy scripts",
5
5
  "license": "MIT",
6
6
  "author": "Bert Devriese <bert@builtinbruges.com>",
@@ -245,7 +245,7 @@ export const scan = async ({
245
245
  const parseCliOptions = (userCliOptions: TScanUserCliOptions) => {
246
246
  // Version provided to the API corresponds with the version in package.json
247
247
  // of the cli client
248
- const apiOptions: TScanApiOptions = { version: '1.0.6' };
248
+ const apiOptions: TScanApiOptions = { version: '1.0.7' };
249
249
  const cliOptions: TScanCliOptions = { pollInterval: 5 };
250
250
 
251
251
  if (userCliOptions.pullRequestTitle) {
@@ -238,7 +238,7 @@ export const scan = async ({
238
238
  const parseCliOptions = (userCliOptions: TScanUserCliOptions) => {
239
239
  // Version provided to the API corresponds with the version in package.json
240
240
  // of the cli client
241
- const apiOptions: TScanApiOptions = { version: '1.0.6' };
241
+ const apiOptions: TScanApiOptions = { version: '1.0.7' };
242
242
  const cliOptions: TScanCliOptions = { pollInterval: 10 };
243
243
 
244
244
  if (userCliOptions.pullRequestTitle) {
package/src/index.ts CHANGED
@@ -20,7 +20,7 @@ program
20
20
  .description(
21
21
  'CLI api client to easily integrate the Aikido public CI API into custom deploy scripts'
22
22
  )
23
- .version('1.0.6');
23
+ .version('1.0.7');
24
24
 
25
25
  // Load in all app commands and set them up in the `program` instance
26
26
  apiKey.cliSetup(program);
@@ -53,6 +53,13 @@ program
53
53
  process.env.CLI_DEBUG = true;
54
54
  });
55
55
 
56
+ // Add global option "--plain-output"
57
+ program
58
+ .option('--plain-output', 'Disables the formatting on output')
59
+ .on('option:plain-output', function () {
60
+ chalk.level = 0 // Disables all formatting for chalk
61
+ });
62
+
56
63
  // Add global option "--apikey"
57
64
  program.option(
58
65
  '--apikey <apikey>',