@aikidosec/ci-api-client 1.0.10 → 1.0.11

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.
@@ -1,7 +1,7 @@
1
1
  import { Argument } from 'commander';
2
2
  import { setApiKey } from '../configuration.js';
3
3
  import { outputError, outputLog } from '../output.js';
4
- const API_KEY_REGEX = /^AIK_CI_[a-zA-Z0-9]{64}$/g;
4
+ const API_KEY_REGEX = /^(?:AIK_CI_|AIK_CI_US_|AIK_CI_ME_)[A-Za-z0-9]{64}$/;
5
5
  function cli(apiKey) {
6
6
  const isValidApiKey = API_KEY_REGEX.test(apiKey) || apiKey.trim().length === 128;
7
7
  if (apiKey && !isValidApiKey) {
@@ -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.10' };
121
+ const apiOptions = { version: '1.0.11' };
122
122
  const cliOptions = { pollInterval: 5 };
123
123
  if (userCliOptions.pullRequestTitle) {
124
124
  apiOptions.pull_request_metadata = {
@@ -120,7 +120,7 @@ export const scan = async ({ repoId, commitId, options, pollInterval = 10, onSta
120
120
  pollStatus();
121
121
  };
122
122
  const parseCliOptions = (userCliOptions) => {
123
- const apiOptions = { version: '1.0.10' };
123
+ const apiOptions = { version: '1.0.11' };
124
124
  const cliOptions = { pollInterval: 10 };
125
125
  if (userCliOptions.pullRequestTitle) {
126
126
  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.10');
14
+ .version('1.0.11');
15
15
  apiKey.cliSetup(program);
16
16
  scan.cliSetup(program);
17
17
  scanRelease.cliSetup(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikidosec/ci-api-client",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
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>",
@@ -2,7 +2,7 @@ import { Argument, Command } from 'commander';
2
2
  import { setApiKey } from '../configuration.js';
3
3
  import { outputError, outputLog } from '../output.js';
4
4
 
5
- const API_KEY_REGEX = /^AIK_CI_[a-zA-Z0-9]{64}$/g;
5
+ const API_KEY_REGEX = /^(?:AIK_CI_|AIK_CI_US_|AIK_CI_ME_)[A-Za-z0-9]{64}$/;
6
6
 
7
7
  function cli(apiKey: string): void {
8
8
  const isValidApiKey =
@@ -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.10' };
248
+ const apiOptions: TScanApiOptions = { version: '1.0.11' };
249
249
  const cliOptions: TScanCliOptions = { pollInterval: 5 };
250
250
 
251
251
  if (userCliOptions.pullRequestTitle) {
@@ -239,7 +239,7 @@ export const scan = async ({
239
239
  const parseCliOptions = (userCliOptions: TScanUserCliOptions) => {
240
240
  // Version provided to the API corresponds with the version in package.json
241
241
  // of the cli client
242
- const apiOptions: TScanApiOptions = { version: '1.0.10' };
242
+ const apiOptions: TScanApiOptions = { version: '1.0.11' };
243
243
  const cliOptions: TScanCliOptions = { pollInterval: 10 };
244
244
 
245
245
  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.10');
23
+ .version('1.0.11');
24
24
 
25
25
  // Load in all app commands and set them up in the `program` instance
26
26
  apiKey.cliSetup(program);