@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.
- package/lib/commands/apiKey.js +1 -1
- package/lib/commands/scan.js +1 -1
- package/lib/commands/scanRelease.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/commands/apiKey.ts +1 -1
- package/src/commands/scan.ts +1 -1
- package/src/commands/scanRelease.ts +1 -1
- package/src/index.ts +1 -1
package/lib/commands/apiKey.js
CHANGED
|
@@ -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_[
|
|
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) {
|
package/lib/commands/scan.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
14
|
+
.version('1.0.11');
|
|
15
15
|
apiKey.cliSetup(program);
|
|
16
16
|
scan.cliSetup(program);
|
|
17
17
|
scanRelease.cliSetup(program);
|
package/package.json
CHANGED
package/src/commands/apiKey.ts
CHANGED
|
@@ -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_[
|
|
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 =
|
package/src/commands/scan.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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);
|