@aikidosec/ci-api-client 1.0.19 → 1.0.20
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/README.md +0 -2
- package/lib/aikidoApi.d.ts +0 -1
- package/lib/aikidoApi.js +0 -1
- package/lib/commands/scan.js +1 -1
- package/lib/commands/scanRelease.js +1 -1
- package/lib/commands/uploadCoverage.d.ts +0 -1
- package/lib/commands/uploadCoverage.js +0 -3
- package/lib/index.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/src/aikidoApi.ts +0 -2
- package/src/commands/scan.ts +1 -1
- package/src/commands/scanRelease.ts +1 -1
- package/src/commands/uploadCoverage.ts +0 -7
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -59,7 +59,6 @@ The example below shows how to use the `upload-coverage` command. The use case h
|
|
|
59
59
|
|
|
60
60
|
```sh
|
|
61
61
|
$ aikido-api-client upload-coverage \
|
|
62
|
-
--repo-name <owner/repo> \
|
|
63
62
|
--commit-sha <commit_sha> \
|
|
64
63
|
--branch-name <branch_name> \
|
|
65
64
|
--repository-id <repository_id> \
|
|
@@ -69,7 +68,6 @@ $ aikido-api-client upload-coverage \
|
|
|
69
68
|
Usage: Aikido API Client upload-coverage [options]
|
|
70
69
|
Upload LCOV or Cobertura coverage reports to Aikido (with repository_source_paths and EOF metadata).
|
|
71
70
|
Options:
|
|
72
|
-
-r, --repo-name <reponame> Repository name as owner/repo (e.g. org/my-repo)
|
|
73
71
|
-c, --commit-sha <commitsha> The commit SHA for this CI run
|
|
74
72
|
-b, --branch-name <branchname> The branch name for this CI run
|
|
75
73
|
-f, --file-paths <paths...> Path(s) to LCOV or Cobertura coverage report(s). Format is detected from each filename.
|
package/lib/aikidoApi.d.ts
CHANGED
package/lib/aikidoApi.js
CHANGED
|
@@ -69,7 +69,6 @@ export async function uploadCodeCoverage(data) {
|
|
|
69
69
|
method: 'POST',
|
|
70
70
|
data: {
|
|
71
71
|
repository_id: data.repository_id,
|
|
72
|
-
repo_name: data.repo_name,
|
|
73
72
|
commit_sha: data.commit_sha,
|
|
74
73
|
branch_name: data.branch_name,
|
|
75
74
|
repository_source_paths: data.repository_source_paths,
|
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.20' };
|
|
122
122
|
const cliOptions = { pollInterval: 5 };
|
|
123
123
|
if (userCliOptions.pullRequestTitle) {
|
|
124
124
|
apiOptions.pull_request_metadata = {
|
|
@@ -137,7 +137,7 @@ export const scan = async ({ repoId, commitId, options, pollInterval = 10, onSta
|
|
|
137
137
|
pollStatus();
|
|
138
138
|
};
|
|
139
139
|
const parseCliOptions = (userCliOptions) => {
|
|
140
|
-
const apiOptions = { version: '1.0.
|
|
140
|
+
const apiOptions = { version: '1.0.20' };
|
|
141
141
|
const cliOptions = { pollInterval: 10, json: false };
|
|
142
142
|
if (userCliOptions.pullRequestTitle) {
|
|
143
143
|
apiOptions.pull_request_metadata = {
|
|
@@ -7,7 +7,6 @@ async function cli(options) {
|
|
|
7
7
|
if (!apiKey) {
|
|
8
8
|
outputError('Please set an api key using: aikido-api-client apikey <key>');
|
|
9
9
|
return;
|
|
10
|
-
return;
|
|
11
10
|
}
|
|
12
11
|
const filePaths = normalizeFilePaths(options.filePaths);
|
|
13
12
|
if (filePaths.length === 0) {
|
|
@@ -31,7 +30,6 @@ async function cli(options) {
|
|
|
31
30
|
try {
|
|
32
31
|
await uploadCodeCoverage({
|
|
33
32
|
repository_id: options.repositoryId,
|
|
34
|
-
repo_name: options.repoName,
|
|
35
33
|
commit_sha: options.commitSha,
|
|
36
34
|
branch_name: options.branchName,
|
|
37
35
|
repository_source_paths: payload.repository_source_paths,
|
|
@@ -53,7 +51,6 @@ const normalizeFilePaths = (filePaths) => filePaths
|
|
|
53
51
|
.filter(Boolean);
|
|
54
52
|
export const cliSetup = (program) => program
|
|
55
53
|
.command('upload-coverage')
|
|
56
|
-
.requiredOption('-r, --repo-name <reponame>', 'Repository name as owner/repo (e.g. org/my-repo)')
|
|
57
54
|
.requiredOption('-c, --commit-sha <commitsha>', 'The commit SHA for this CI run')
|
|
58
55
|
.requiredOption('-b, --branch-name <branchname>', 'The branch name for this CI run')
|
|
59
56
|
.requiredOption('-f, --file-paths <paths...>', 'Path(s) to LCOV or Cobertura coverage report(s). Format is detected from each filename.')
|
package/lib/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export const program = new Command();
|
|
|
12
12
|
program
|
|
13
13
|
.name('Aikido API Client')
|
|
14
14
|
.description('CLI api client to easily integrate the Aikido public CI API into custom deploy scripts')
|
|
15
|
-
.version('1.0.
|
|
15
|
+
.version('1.0.20');
|
|
16
16
|
apiKey.cliSetup(program);
|
|
17
17
|
scan.cliSetup(program);
|
|
18
18
|
scanRelease.cliSetup(program);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikidosec/ci-api-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@aikidosec/ci-api-client",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.20",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "1.18.0",
|
package/package.json
CHANGED
package/src/aikidoApi.ts
CHANGED
|
@@ -198,7 +198,6 @@ export type TUploadCodeCoverageFile = {
|
|
|
198
198
|
|
|
199
199
|
export type TUploadCodeCoverageOptions = {
|
|
200
200
|
repository_id: string | number;
|
|
201
|
-
repo_name: string;
|
|
202
201
|
commit_sha: string;
|
|
203
202
|
branch_name: string;
|
|
204
203
|
repository_source_paths: string[];
|
|
@@ -213,7 +212,6 @@ export async function uploadCodeCoverage(data: TUploadCodeCoverageOptions){
|
|
|
213
212
|
method: 'POST',
|
|
214
213
|
data: {
|
|
215
214
|
repository_id: data.repository_id,
|
|
216
|
-
repo_name: data.repo_name,
|
|
217
215
|
commit_sha: data.commit_sha,
|
|
218
216
|
branch_name: data.branch_name,
|
|
219
217
|
repository_source_paths: data.repository_source_paths,
|
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.20' };
|
|
249
249
|
const cliOptions: TScanCliOptions = { pollInterval: 5 };
|
|
250
250
|
|
|
251
251
|
if (userCliOptions.pullRequestTitle) {
|
|
@@ -269,7 +269,7 @@ export const scan = async ({
|
|
|
269
269
|
const parseCliOptions = (userCliOptions: TScanUserCliOptions) => {
|
|
270
270
|
// Version provided to the API corresponds with the version in package.json
|
|
271
271
|
// of the cli client
|
|
272
|
-
const apiOptions: TScanApiOptions = { version: '1.0.
|
|
272
|
+
const apiOptions: TScanApiOptions = { version: '1.0.20' };
|
|
273
273
|
const cliOptions: TScanCliOptions = { pollInterval: 10, json: false };
|
|
274
274
|
|
|
275
275
|
if (userCliOptions.pullRequestTitle) {
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
} from '../output.js';
|
|
12
12
|
|
|
13
13
|
type TUploadCoverageUserCliOptions = {
|
|
14
|
-
repoName: string;
|
|
15
14
|
commitSha: string;
|
|
16
15
|
branchName: string;
|
|
17
16
|
filePaths: string[];
|
|
@@ -24,7 +23,6 @@ async function cli(options: TUploadCoverageUserCliOptions) {
|
|
|
24
23
|
if (!apiKey) {
|
|
25
24
|
outputError('Please set an api key using: aikido-api-client apikey <key>');
|
|
26
25
|
return;
|
|
27
|
-
return;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
const filePaths = normalizeFilePaths(options.filePaths);
|
|
@@ -60,7 +58,6 @@ async function cli(options: TUploadCoverageUserCliOptions) {
|
|
|
60
58
|
try {
|
|
61
59
|
await uploadCodeCoverage({
|
|
62
60
|
repository_id: options.repositoryId,
|
|
63
|
-
repo_name: options.repoName,
|
|
64
61
|
commit_sha: options.commitSha,
|
|
65
62
|
branch_name: options.branchName,
|
|
66
63
|
repository_source_paths: payload.repository_source_paths,
|
|
@@ -87,10 +84,6 @@ const normalizeFilePaths = (filePaths: string[]): string[] =>
|
|
|
87
84
|
export const cliSetup = (program: Command) =>
|
|
88
85
|
program
|
|
89
86
|
.command('upload-coverage')
|
|
90
|
-
.requiredOption(
|
|
91
|
-
'-r, --repo-name <reponame>',
|
|
92
|
-
'Repository name as owner/repo (e.g. org/my-repo)'
|
|
93
|
-
)
|
|
94
87
|
.requiredOption(
|
|
95
88
|
'-c, --commit-sha <commitsha>',
|
|
96
89
|
'The commit SHA for this CI run'
|
package/src/index.ts
CHANGED
|
@@ -21,7 +21,7 @@ program
|
|
|
21
21
|
.description(
|
|
22
22
|
'CLI api client to easily integrate the Aikido public CI API into custom deploy scripts'
|
|
23
23
|
)
|
|
24
|
-
.version('1.0.
|
|
24
|
+
.version('1.0.20');
|
|
25
25
|
|
|
26
26
|
// Load in all app commands and set them up in the `program` instance
|
|
27
27
|
apiKey.cliSetup(program);
|