@aikidosec/ci-api-client 1.0.10 → 1.0.14

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.
@@ -17,13 +17,13 @@ jobs:
17
17
  node-version: "20.x"
18
18
  registry-url: "https://registry.npmjs.org"
19
19
  scope: "@aikidosec"
20
- cache: 'yarn'
20
+ cache: 'npm'
21
21
 
22
22
  - name: Install dependencies
23
- run: yarn install
23
+ run: npm ci
24
24
 
25
25
  - name: Build the library
26
- run: yarn build
26
+ run: npm run build
27
27
 
28
28
  - name: Get the version
29
29
  id: get_version
@@ -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.12');
15
15
  apiKey.cliSetup(program);
16
16
  scan.cliSetup(program);
17
17
  scanRelease.cliSetup(program);