@capraconsulting/cals-cli 3.9.0 → 3.10.0
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/cals-cli.mjs +32 -30
- package/lib/cals-cli.mjs.map +1 -1
- package/lib/index.es.js +28 -26
- package/lib/index.es.js.map +1 -1
- package/lib/index.js +28 -26
- package/lib/index.js.map +1 -1
- package/package.json +9 -9
package/lib/cals-cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import semver from 'semver';
|
|
3
3
|
import yargs from 'yargs';
|
|
4
4
|
import { hideBin } from 'yargs/helpers';
|
|
5
|
-
import fs from 'fs';
|
|
5
|
+
import fs from 'node:fs';
|
|
6
6
|
import yaml from 'js-yaml';
|
|
7
7
|
import pMap from 'p-map';
|
|
8
8
|
import AJV from 'ajv';
|
|
@@ -10,8 +10,10 @@ import { Octokit } from '@octokit/rest';
|
|
|
10
10
|
import fetch from 'node-fetch';
|
|
11
11
|
import pLimit from 'p-limit';
|
|
12
12
|
import keytar from 'keytar';
|
|
13
|
-
import
|
|
13
|
+
import process$2 from 'node:process';
|
|
14
|
+
import * as process$1 from 'process';
|
|
14
15
|
import { performance } from 'perf_hooks';
|
|
16
|
+
import { Buffer } from 'node:buffer';
|
|
15
17
|
import { deprecate } from 'util';
|
|
16
18
|
import path from 'path';
|
|
17
19
|
import rimraf from 'rimraf';
|
|
@@ -25,7 +27,7 @@ import read from 'read';
|
|
|
25
27
|
import findUp from 'find-up';
|
|
26
28
|
import execa from 'execa';
|
|
27
29
|
|
|
28
|
-
var version = "3.
|
|
30
|
+
var version = "3.10.0";
|
|
29
31
|
var engines = {
|
|
30
32
|
node: ">=12.0.0"
|
|
31
33
|
};
|
|
@@ -468,12 +470,12 @@ class GitHubTokenCliProvider {
|
|
|
468
470
|
keyringService = "cals";
|
|
469
471
|
keyringAccount = "github-token";
|
|
470
472
|
async getToken() {
|
|
471
|
-
if (process.env.CALS_GITHUB_TOKEN) {
|
|
472
|
-
return process.env.CALS_GITHUB_TOKEN;
|
|
473
|
+
if (process$2.env.CALS_GITHUB_TOKEN) {
|
|
474
|
+
return process$2.env.CALS_GITHUB_TOKEN;
|
|
473
475
|
}
|
|
474
476
|
const result = await keytar.getPassword(this.keyringService, this.keyringAccount);
|
|
475
477
|
if (result == null) {
|
|
476
|
-
process.stderr.write("No token found. Register using `cals github set-token`\n");
|
|
478
|
+
process$2.stderr.write("No token found. Register using `cals github set-token`\n");
|
|
477
479
|
return undefined;
|
|
478
480
|
}
|
|
479
481
|
return result;
|
|
@@ -651,7 +653,7 @@ class GitHubService {
|
|
|
651
653
|
return result;
|
|
652
654
|
});
|
|
653
655
|
if (response.status === 401) {
|
|
654
|
-
process$
|
|
656
|
+
process$1.stderr.write("Unauthorized\n");
|
|
655
657
|
await this.tokenProvider.markInvalid();
|
|
656
658
|
}
|
|
657
659
|
// If you get 502 after 10s, it is a timeout.
|
|
@@ -1047,12 +1049,12 @@ class SnykTokenCliProvider {
|
|
|
1047
1049
|
keyringService = "cals";
|
|
1048
1050
|
keyringAccount = "snyk-token";
|
|
1049
1051
|
async getToken() {
|
|
1050
|
-
if (process.env.CALS_SNYK_TOKEN) {
|
|
1051
|
-
return process.env.CALS_SNYK_TOKEN;
|
|
1052
|
+
if (process$2.env.CALS_SNYK_TOKEN) {
|
|
1053
|
+
return process$2.env.CALS_SNYK_TOKEN;
|
|
1052
1054
|
}
|
|
1053
1055
|
const result = await keytar.getPassword(this.keyringService, this.keyringAccount);
|
|
1054
1056
|
if (result == null) {
|
|
1055
|
-
process.stderr.write("No token found. Register using `cals snyk set-token`\n");
|
|
1057
|
+
process$2.stderr.write("No token found. Register using `cals snyk set-token`\n");
|
|
1056
1058
|
return undefined;
|
|
1057
1059
|
}
|
|
1058
1060
|
return result;
|
|
@@ -1110,7 +1112,7 @@ class SnykService {
|
|
|
1110
1112
|
agent: this.config.agent,
|
|
1111
1113
|
});
|
|
1112
1114
|
if (response.status === 401) {
|
|
1113
|
-
process.stderr.write("Unauthorized - removing token\n");
|
|
1115
|
+
process$2.stderr.write("Unauthorized - removing token\n");
|
|
1114
1116
|
await this.tokenProvider.markInvalid();
|
|
1115
1117
|
}
|
|
1116
1118
|
if (!response.ok) {
|
|
@@ -1242,7 +1244,7 @@ class CacheProvider {
|
|
|
1242
1244
|
}
|
|
1243
1245
|
|
|
1244
1246
|
class Config {
|
|
1245
|
-
cwd = path.resolve(process.cwd());
|
|
1247
|
+
cwd = path.resolve(process$2.cwd());
|
|
1246
1248
|
configFile = path.join(os.homedir(), ".cals-config.json");
|
|
1247
1249
|
cacheDir = cachedir("cals-cli");
|
|
1248
1250
|
agent = new https.Agent({
|
|
@@ -1301,8 +1303,8 @@ class Reporter {
|
|
|
1301
1303
|
this.nonInteractive = !!opts.nonInteractive;
|
|
1302
1304
|
this.isVerbose = !!opts.verbose;
|
|
1303
1305
|
}
|
|
1304
|
-
stdout = process.stdout;
|
|
1305
|
-
stderr = process.stderr;
|
|
1306
|
+
stdout = process$2.stdout;
|
|
1307
|
+
stderr = process$2.stderr;
|
|
1306
1308
|
nonInteractive;
|
|
1307
1309
|
isVerbose;
|
|
1308
1310
|
format = chalk;
|
|
@@ -1646,7 +1648,7 @@ const command$f = {
|
|
|
1646
1648
|
.demandCommand()
|
|
1647
1649
|
.usage(`cals definition`),
|
|
1648
1650
|
handler: () => {
|
|
1649
|
-
yargs(hideBin(process.argv)).showHelp();
|
|
1651
|
+
yargs(hideBin(process$2.argv)).showHelp();
|
|
1650
1652
|
},
|
|
1651
1653
|
};
|
|
1652
1654
|
|
|
@@ -2164,7 +2166,7 @@ function createOrgGetter(github) {
|
|
|
2164
2166
|
});
|
|
2165
2167
|
};
|
|
2166
2168
|
}
|
|
2167
|
-
async function process
|
|
2169
|
+
async function process(reporter, github, definition, getOrg, execute, limitToOrg) {
|
|
2168
2170
|
let changes = [];
|
|
2169
2171
|
for (const orgName of getGitHubOrgs(definition)) {
|
|
2170
2172
|
if (limitToOrg !== undefined && limitToOrg !== orgName) {
|
|
@@ -2248,14 +2250,14 @@ const command$b = {
|
|
|
2248
2250
|
const definition = await getDefinitionFile(argv).getDefinition();
|
|
2249
2251
|
await reportRateLimit(reporter, github, async () => {
|
|
2250
2252
|
const orgGetter = createOrgGetter(github);
|
|
2251
|
-
await process
|
|
2253
|
+
await process(reporter, github, definition, orgGetter, !!argv["execute"], argv["org"]);
|
|
2252
2254
|
});
|
|
2253
2255
|
},
|
|
2254
2256
|
};
|
|
2255
2257
|
|
|
2256
2258
|
async function generateCloneCommands({ reporter, config, github, org, ...opt }) {
|
|
2257
2259
|
if (!opt.listGroups && !opt.all && opt.group === undefined) {
|
|
2258
|
-
yargs(hideBin(process.argv)).showHelp();
|
|
2260
|
+
yargs(hideBin(process$2.argv)).showHelp();
|
|
2259
2261
|
return;
|
|
2260
2262
|
}
|
|
2261
2263
|
const repos = await github.getOrgRepoList({ org });
|
|
@@ -2279,7 +2281,7 @@ async function generateCloneCommands({ reporter, config, github, org, ...opt })
|
|
|
2279
2281
|
.forEach((repo) => {
|
|
2280
2282
|
// The output of this is used to pipe into e.g. bash.
|
|
2281
2283
|
// We cannot use reporter.log as it adds additional characters.
|
|
2282
|
-
process.stdout.write(sprintf('[ ! -e "%s" ] && git clone %s\n', repo.name, repo.sshUrl));
|
|
2284
|
+
process$2.stdout.write(sprintf('[ ! -e "%s" ] && git clone %s\n', repo.name, repo.sshUrl));
|
|
2283
2285
|
});
|
|
2284
2286
|
});
|
|
2285
2287
|
}
|
|
@@ -2423,7 +2425,7 @@ async function listRepos({ reporter, github, includeArchived, name = undefined,
|
|
|
2423
2425
|
}
|
|
2424
2426
|
// All CSV output is done using direct stdout to avoid extra chars.
|
|
2425
2427
|
if (csv) {
|
|
2426
|
-
process.stdout.write("reponame,group\n");
|
|
2428
|
+
process$2.stdout.write("reponame,group\n");
|
|
2427
2429
|
}
|
|
2428
2430
|
getGroupedRepos(repos).forEach((group) => {
|
|
2429
2431
|
if (!csv && compact) {
|
|
@@ -2436,7 +2438,7 @@ async function listRepos({ reporter, github, includeArchived, name = undefined,
|
|
|
2436
2438
|
group.items.forEach((repo) => {
|
|
2437
2439
|
if (csv) {
|
|
2438
2440
|
// We assume we have no repos or group names with a comma in its name.
|
|
2439
|
-
process.stdout.write(`${repo.name},${group.name}\n`);
|
|
2441
|
+
process$2.stdout.write(`${repo.name},${group.name}\n`);
|
|
2440
2442
|
return;
|
|
2441
2443
|
}
|
|
2442
2444
|
if (compact) {
|
|
@@ -3002,7 +3004,7 @@ async function sync$1({ reporter, github, cals, rootdir, askClone, askMove, }) {
|
|
|
3002
3004
|
for (const it of archivedRepos) {
|
|
3003
3005
|
reporter.info(` ${it.actualRelpath}`);
|
|
3004
3006
|
}
|
|
3005
|
-
const thisDirName = path.basename(process.cwd());
|
|
3007
|
+
const thisDirName = path.basename(process$2.cwd());
|
|
3006
3008
|
const archiveDir = `../${thisDirName}-archive`;
|
|
3007
3009
|
const hasArchiveDir = fs.existsSync(archiveDir);
|
|
3008
3010
|
if (hasArchiveDir) {
|
|
@@ -3084,7 +3086,7 @@ async function loadCalsManifest(config, reporter) {
|
|
|
3084
3086
|
const p = await findUp(CALS_YAML, { cwd: config.cwd });
|
|
3085
3087
|
if (p === undefined) {
|
|
3086
3088
|
reporter.error(`File ${CALS_YAML} not found. See help`);
|
|
3087
|
-
process.exitCode = 1;
|
|
3089
|
+
process$2.exitCode = 1;
|
|
3088
3090
|
return null;
|
|
3089
3091
|
}
|
|
3090
3092
|
// TODO: Verify file has expected contents.
|
|
@@ -3200,7 +3202,7 @@ Notes:
|
|
|
3200
3202
|
option to avoid stale cache. The cache can also be cleared with
|
|
3201
3203
|
the "cals delete-cache" command.`),
|
|
3202
3204
|
handler: () => {
|
|
3203
|
-
yargs(hideBin(process.argv)).showHelp();
|
|
3205
|
+
yargs(hideBin(process$2.argv)).showHelp();
|
|
3204
3206
|
},
|
|
3205
3207
|
};
|
|
3206
3208
|
|
|
@@ -3348,17 +3350,17 @@ Notes:
|
|
|
3348
3350
|
and provide a link to generate one:
|
|
3349
3351
|
$ cals snyk set-token`),
|
|
3350
3352
|
handler: () => {
|
|
3351
|
-
yargs(hideBin(process.argv)).showHelp();
|
|
3353
|
+
yargs(hideBin(process$2.argv)).showHelp();
|
|
3352
3354
|
},
|
|
3353
3355
|
};
|
|
3354
3356
|
|
|
3355
3357
|
async function main() {
|
|
3356
|
-
if (!semver.satisfies(process.version, engines.node)) {
|
|
3357
|
-
console.error(`Required node version ${engines.node} not satisfied with current version ${process.version}.`);
|
|
3358
|
-
process.exit(1);
|
|
3358
|
+
if (!semver.satisfies(process$2.version, engines.node)) {
|
|
3359
|
+
console.error(`Required node version ${engines.node} not satisfied with current version ${process$2.version}.`);
|
|
3360
|
+
process$2.exit(1);
|
|
3359
3361
|
}
|
|
3360
|
-
await yargs(hideBin(process.argv))
|
|
3361
|
-
.usage(`cals-cli v${version} (build: ${"2025-01-
|
|
3362
|
+
await yargs(hideBin(process$2.argv))
|
|
3363
|
+
.usage(`cals-cli v${version} (build: ${"2025-01-10T09:38:35+0000"})`)
|
|
3362
3364
|
.scriptName("cals")
|
|
3363
3365
|
.locale("en")
|
|
3364
3366
|
.help("help")
|
package/lib/cals-cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cals-cli.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cals-cli.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.es.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import rimraf from 'rimraf';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import readline from 'readline';
|
|
6
|
+
import process$1 from 'node:process';
|
|
6
7
|
import 'util';
|
|
7
8
|
import cachedir from 'cachedir';
|
|
8
9
|
import https from 'https';
|
|
@@ -13,14 +14,15 @@ import { Octokit } from '@octokit/rest';
|
|
|
13
14
|
import fetch from 'node-fetch';
|
|
14
15
|
import pLimit from 'p-limit';
|
|
15
16
|
import keytar from 'keytar';
|
|
16
|
-
import * as process
|
|
17
|
+
import * as process from 'process';
|
|
17
18
|
import { performance } from 'perf_hooks';
|
|
19
|
+
import { Buffer } from 'node:buffer';
|
|
18
20
|
import { strict } from 'assert';
|
|
19
21
|
import execa from 'execa';
|
|
20
22
|
import read from 'read';
|
|
21
23
|
import { Transform } from 'stream';
|
|
22
24
|
|
|
23
|
-
var version = "3.
|
|
25
|
+
var version = "3.10.0";
|
|
24
26
|
|
|
25
27
|
class CacheProvider {
|
|
26
28
|
constructor(config) {
|
|
@@ -85,8 +87,8 @@ class Reporter {
|
|
|
85
87
|
this.nonInteractive = !!opts.nonInteractive;
|
|
86
88
|
this.isVerbose = !!opts.verbose;
|
|
87
89
|
}
|
|
88
|
-
stdout = process.stdout;
|
|
89
|
-
stderr = process.stderr;
|
|
90
|
+
stdout = process$1.stdout;
|
|
91
|
+
stderr = process$1.stderr;
|
|
90
92
|
nonInteractive;
|
|
91
93
|
isVerbose;
|
|
92
94
|
format = chalk;
|
|
@@ -109,7 +111,7 @@ class Reporter {
|
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
class Config {
|
|
112
|
-
cwd = path.resolve(process.cwd());
|
|
114
|
+
cwd = path.resolve(process$1.cwd());
|
|
113
115
|
configFile = path.join(os.homedir(), ".cals-config.json");
|
|
114
116
|
cacheDir = cachedir("cals-cli");
|
|
115
117
|
agent = new https.Agent({
|
|
@@ -596,12 +598,12 @@ class GitHubTokenCliProvider {
|
|
|
596
598
|
keyringService = "cals";
|
|
597
599
|
keyringAccount = "github-token";
|
|
598
600
|
async getToken() {
|
|
599
|
-
if (process.env.CALS_GITHUB_TOKEN) {
|
|
600
|
-
return process.env.CALS_GITHUB_TOKEN;
|
|
601
|
+
if (process$1.env.CALS_GITHUB_TOKEN) {
|
|
602
|
+
return process$1.env.CALS_GITHUB_TOKEN;
|
|
601
603
|
}
|
|
602
604
|
const result = await keytar.getPassword(this.keyringService, this.keyringAccount);
|
|
603
605
|
if (result == null) {
|
|
604
|
-
process.stderr.write("No token found. Register using `cals github set-token`\n");
|
|
606
|
+
process$1.stderr.write("No token found. Register using `cals github set-token`\n");
|
|
605
607
|
return undefined;
|
|
606
608
|
}
|
|
607
609
|
return result;
|
|
@@ -734,7 +736,7 @@ class GitHubService {
|
|
|
734
736
|
return result;
|
|
735
737
|
});
|
|
736
738
|
if (response.status === 401) {
|
|
737
|
-
process
|
|
739
|
+
process.stderr.write("Unauthorized\n");
|
|
738
740
|
await this.tokenProvider.markInvalid();
|
|
739
741
|
}
|
|
740
742
|
// If you get 502 after 10s, it is a timeout.
|
|
@@ -1136,12 +1138,12 @@ class SnykTokenCliProvider {
|
|
|
1136
1138
|
keyringService = "cals";
|
|
1137
1139
|
keyringAccount = "snyk-token";
|
|
1138
1140
|
async getToken() {
|
|
1139
|
-
if (process.env.CALS_SNYK_TOKEN) {
|
|
1140
|
-
return process.env.CALS_SNYK_TOKEN;
|
|
1141
|
+
if (process$1.env.CALS_SNYK_TOKEN) {
|
|
1142
|
+
return process$1.env.CALS_SNYK_TOKEN;
|
|
1141
1143
|
}
|
|
1142
1144
|
const result = await keytar.getPassword(this.keyringService, this.keyringAccount);
|
|
1143
1145
|
if (result == null) {
|
|
1144
|
-
process.stderr.write("No token found. Register using `cals snyk set-token`\n");
|
|
1146
|
+
process$1.stderr.write("No token found. Register using `cals snyk set-token`\n");
|
|
1145
1147
|
return undefined;
|
|
1146
1148
|
}
|
|
1147
1149
|
return result;
|
|
@@ -1199,7 +1201,7 @@ class SnykService {
|
|
|
1199
1201
|
agent: this.config.agent,
|
|
1200
1202
|
});
|
|
1201
1203
|
if (response.status === 401) {
|
|
1202
|
-
process.stderr.write("Unauthorized - removing token\n");
|
|
1204
|
+
process$1.stderr.write("Unauthorized - removing token\n");
|
|
1203
1205
|
await this.tokenProvider.markInvalid();
|
|
1204
1206
|
}
|
|
1205
1207
|
if (!response.ok) {
|
|
@@ -1287,10 +1289,10 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
1287
1289
|
|
|
1288
1290
|
class SonarCloudTokenCliProvider {
|
|
1289
1291
|
async getToken() {
|
|
1290
|
-
if (process.env.CALS_SONARCLOUD_TOKEN) {
|
|
1291
|
-
return Promise.resolve(process.env.CALS_SONARCLOUD_TOKEN);
|
|
1292
|
+
if (process$1.env.CALS_SONARCLOUD_TOKEN) {
|
|
1293
|
+
return Promise.resolve(process$1.env.CALS_SONARCLOUD_TOKEN);
|
|
1292
1294
|
}
|
|
1293
|
-
process.stderr.write("No environmental variable found. Set variable `CALS_SONARCLOUD_TOKEN` to token value\n");
|
|
1295
|
+
process$1.stderr.write("No environmental variable found. Set variable `CALS_SONARCLOUD_TOKEN` to token value\n");
|
|
1294
1296
|
return undefined;
|
|
1295
1297
|
}
|
|
1296
1298
|
async markInvalid() {
|
|
@@ -1323,11 +1325,11 @@ class SonarCloudService {
|
|
|
1323
1325
|
agent: this.config.agent,
|
|
1324
1326
|
});
|
|
1325
1327
|
if (response.status === 401) {
|
|
1326
|
-
process.stderr.write("Unauthorized - removing token\n");
|
|
1328
|
+
process$1.stderr.write("Unauthorized - removing token\n");
|
|
1327
1329
|
await this.tokenProvider.markInvalid();
|
|
1328
1330
|
}
|
|
1329
1331
|
if (response.status === 404) {
|
|
1330
|
-
process.stderr.write(`Project ${sonarCloudProjectKey} does not exist in SonarCloud\n`);
|
|
1332
|
+
process$1.stderr.write(`Project ${sonarCloudProjectKey} does not exist in SonarCloud\n`);
|
|
1331
1333
|
return undefined;
|
|
1332
1334
|
}
|
|
1333
1335
|
if (!response.ok) {
|
|
@@ -1410,14 +1412,14 @@ class TestExecutor {
|
|
|
1410
1412
|
// This will not abort the running tasks until after
|
|
1411
1413
|
// we have completed the cleanup tasks. The running tasks
|
|
1412
1414
|
// can stop earlier by calling checkCanContinue.
|
|
1413
|
-
process.on("SIGINT", () => {
|
|
1415
|
+
process$1.on("SIGINT", () => {
|
|
1414
1416
|
console.warn("Caught interrupt signal - forcing termination");
|
|
1415
1417
|
if (this.cleanupTask != null) {
|
|
1416
1418
|
return;
|
|
1417
1419
|
}
|
|
1418
1420
|
this.shutdown = true;
|
|
1419
1421
|
this.cleanupTask = this.runTasks().then(() => {
|
|
1420
|
-
process.exit(1);
|
|
1422
|
+
process$1.exit(1);
|
|
1421
1423
|
});
|
|
1422
1424
|
});
|
|
1423
1425
|
await body(this);
|
|
@@ -1425,7 +1427,7 @@ class TestExecutor {
|
|
|
1425
1427
|
catch (error) {
|
|
1426
1428
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1427
1429
|
console.error(error.stack || error.message || error);
|
|
1428
|
-
process.exitCode = 1;
|
|
1430
|
+
process$1.exitCode = 1;
|
|
1429
1431
|
}
|
|
1430
1432
|
finally {
|
|
1431
1433
|
console.log(`Reached finally block`);
|
|
@@ -1618,14 +1620,14 @@ class OutputPrefixTransform extends Transform {
|
|
|
1618
1620
|
function pipeToConsole(result, name) {
|
|
1619
1621
|
result.stdout
|
|
1620
1622
|
?.pipe(new OutputPrefixTransform(`${name}: `))
|
|
1621
|
-
.pipe(process.stdout);
|
|
1623
|
+
.pipe(process$1.stdout);
|
|
1622
1624
|
result.stderr
|
|
1623
1625
|
?.pipe(new OutputPrefixTransform(`${name} (stderr): `))
|
|
1624
|
-
.pipe(process.stderr);
|
|
1626
|
+
.pipe(process$1.stderr);
|
|
1625
1627
|
}
|
|
1626
1628
|
function checkPidRunning(pid) {
|
|
1627
1629
|
try {
|
|
1628
|
-
process.kill(pid, 0);
|
|
1630
|
+
process$1.kill(pid, 0);
|
|
1629
1631
|
return true;
|
|
1630
1632
|
}
|
|
1631
1633
|
catch {
|
|
@@ -1768,7 +1770,7 @@ async function runNpmRunScript(name, options) {
|
|
|
1768
1770
|
* This likely does not cover all situations.
|
|
1769
1771
|
*/
|
|
1770
1772
|
async function getDockerHostAddress() {
|
|
1771
|
-
if (process.platform === "darwin" || process.platform === "win32") {
|
|
1773
|
+
if (process$1.platform === "darwin" || process$1.platform === "win32") {
|
|
1772
1774
|
return "host.docker.internal";
|
|
1773
1775
|
}
|
|
1774
1776
|
if (fs.existsSync("/.dockerenv")) {
|
package/lib/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import rimraf from 'rimraf';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import readline from 'readline';
|
|
6
|
+
import process$1 from 'node:process';
|
|
6
7
|
import 'util';
|
|
7
8
|
import cachedir from 'cachedir';
|
|
8
9
|
import https from 'https';
|
|
@@ -13,14 +14,15 @@ import { Octokit } from '@octokit/rest';
|
|
|
13
14
|
import fetch from 'node-fetch';
|
|
14
15
|
import pLimit from 'p-limit';
|
|
15
16
|
import keytar from 'keytar';
|
|
16
|
-
import * as process
|
|
17
|
+
import * as process from 'process';
|
|
17
18
|
import { performance } from 'perf_hooks';
|
|
19
|
+
import { Buffer } from 'node:buffer';
|
|
18
20
|
import { strict } from 'assert';
|
|
19
21
|
import execa from 'execa';
|
|
20
22
|
import read from 'read';
|
|
21
23
|
import { Transform } from 'stream';
|
|
22
24
|
|
|
23
|
-
var version = "3.
|
|
25
|
+
var version = "3.10.0";
|
|
24
26
|
|
|
25
27
|
class CacheProvider {
|
|
26
28
|
constructor(config) {
|
|
@@ -85,8 +87,8 @@ class Reporter {
|
|
|
85
87
|
this.nonInteractive = !!opts.nonInteractive;
|
|
86
88
|
this.isVerbose = !!opts.verbose;
|
|
87
89
|
}
|
|
88
|
-
stdout = process.stdout;
|
|
89
|
-
stderr = process.stderr;
|
|
90
|
+
stdout = process$1.stdout;
|
|
91
|
+
stderr = process$1.stderr;
|
|
90
92
|
nonInteractive;
|
|
91
93
|
isVerbose;
|
|
92
94
|
format = chalk;
|
|
@@ -109,7 +111,7 @@ class Reporter {
|
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
class Config {
|
|
112
|
-
cwd = path.resolve(process.cwd());
|
|
114
|
+
cwd = path.resolve(process$1.cwd());
|
|
113
115
|
configFile = path.join(os.homedir(), ".cals-config.json");
|
|
114
116
|
cacheDir = cachedir("cals-cli");
|
|
115
117
|
agent = new https.Agent({
|
|
@@ -596,12 +598,12 @@ class GitHubTokenCliProvider {
|
|
|
596
598
|
keyringService = "cals";
|
|
597
599
|
keyringAccount = "github-token";
|
|
598
600
|
async getToken() {
|
|
599
|
-
if (process.env.CALS_GITHUB_TOKEN) {
|
|
600
|
-
return process.env.CALS_GITHUB_TOKEN;
|
|
601
|
+
if (process$1.env.CALS_GITHUB_TOKEN) {
|
|
602
|
+
return process$1.env.CALS_GITHUB_TOKEN;
|
|
601
603
|
}
|
|
602
604
|
const result = await keytar.getPassword(this.keyringService, this.keyringAccount);
|
|
603
605
|
if (result == null) {
|
|
604
|
-
process.stderr.write("No token found. Register using `cals github set-token`\n");
|
|
606
|
+
process$1.stderr.write("No token found. Register using `cals github set-token`\n");
|
|
605
607
|
return undefined;
|
|
606
608
|
}
|
|
607
609
|
return result;
|
|
@@ -734,7 +736,7 @@ class GitHubService {
|
|
|
734
736
|
return result;
|
|
735
737
|
});
|
|
736
738
|
if (response.status === 401) {
|
|
737
|
-
process
|
|
739
|
+
process.stderr.write("Unauthorized\n");
|
|
738
740
|
await this.tokenProvider.markInvalid();
|
|
739
741
|
}
|
|
740
742
|
// If you get 502 after 10s, it is a timeout.
|
|
@@ -1136,12 +1138,12 @@ class SnykTokenCliProvider {
|
|
|
1136
1138
|
keyringService = "cals";
|
|
1137
1139
|
keyringAccount = "snyk-token";
|
|
1138
1140
|
async getToken() {
|
|
1139
|
-
if (process.env.CALS_SNYK_TOKEN) {
|
|
1140
|
-
return process.env.CALS_SNYK_TOKEN;
|
|
1141
|
+
if (process$1.env.CALS_SNYK_TOKEN) {
|
|
1142
|
+
return process$1.env.CALS_SNYK_TOKEN;
|
|
1141
1143
|
}
|
|
1142
1144
|
const result = await keytar.getPassword(this.keyringService, this.keyringAccount);
|
|
1143
1145
|
if (result == null) {
|
|
1144
|
-
process.stderr.write("No token found. Register using `cals snyk set-token`\n");
|
|
1146
|
+
process$1.stderr.write("No token found. Register using `cals snyk set-token`\n");
|
|
1145
1147
|
return undefined;
|
|
1146
1148
|
}
|
|
1147
1149
|
return result;
|
|
@@ -1199,7 +1201,7 @@ class SnykService {
|
|
|
1199
1201
|
agent: this.config.agent,
|
|
1200
1202
|
});
|
|
1201
1203
|
if (response.status === 401) {
|
|
1202
|
-
process.stderr.write("Unauthorized - removing token\n");
|
|
1204
|
+
process$1.stderr.write("Unauthorized - removing token\n");
|
|
1203
1205
|
await this.tokenProvider.markInvalid();
|
|
1204
1206
|
}
|
|
1205
1207
|
if (!response.ok) {
|
|
@@ -1287,10 +1289,10 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
1287
1289
|
|
|
1288
1290
|
class SonarCloudTokenCliProvider {
|
|
1289
1291
|
async getToken() {
|
|
1290
|
-
if (process.env.CALS_SONARCLOUD_TOKEN) {
|
|
1291
|
-
return Promise.resolve(process.env.CALS_SONARCLOUD_TOKEN);
|
|
1292
|
+
if (process$1.env.CALS_SONARCLOUD_TOKEN) {
|
|
1293
|
+
return Promise.resolve(process$1.env.CALS_SONARCLOUD_TOKEN);
|
|
1292
1294
|
}
|
|
1293
|
-
process.stderr.write("No environmental variable found. Set variable `CALS_SONARCLOUD_TOKEN` to token value\n");
|
|
1295
|
+
process$1.stderr.write("No environmental variable found. Set variable `CALS_SONARCLOUD_TOKEN` to token value\n");
|
|
1294
1296
|
return undefined;
|
|
1295
1297
|
}
|
|
1296
1298
|
async markInvalid() {
|
|
@@ -1323,11 +1325,11 @@ class SonarCloudService {
|
|
|
1323
1325
|
agent: this.config.agent,
|
|
1324
1326
|
});
|
|
1325
1327
|
if (response.status === 401) {
|
|
1326
|
-
process.stderr.write("Unauthorized - removing token\n");
|
|
1328
|
+
process$1.stderr.write("Unauthorized - removing token\n");
|
|
1327
1329
|
await this.tokenProvider.markInvalid();
|
|
1328
1330
|
}
|
|
1329
1331
|
if (response.status === 404) {
|
|
1330
|
-
process.stderr.write(`Project ${sonarCloudProjectKey} does not exist in SonarCloud\n`);
|
|
1332
|
+
process$1.stderr.write(`Project ${sonarCloudProjectKey} does not exist in SonarCloud\n`);
|
|
1331
1333
|
return undefined;
|
|
1332
1334
|
}
|
|
1333
1335
|
if (!response.ok) {
|
|
@@ -1410,14 +1412,14 @@ class TestExecutor {
|
|
|
1410
1412
|
// This will not abort the running tasks until after
|
|
1411
1413
|
// we have completed the cleanup tasks. The running tasks
|
|
1412
1414
|
// can stop earlier by calling checkCanContinue.
|
|
1413
|
-
process.on("SIGINT", () => {
|
|
1415
|
+
process$1.on("SIGINT", () => {
|
|
1414
1416
|
console.warn("Caught interrupt signal - forcing termination");
|
|
1415
1417
|
if (this.cleanupTask != null) {
|
|
1416
1418
|
return;
|
|
1417
1419
|
}
|
|
1418
1420
|
this.shutdown = true;
|
|
1419
1421
|
this.cleanupTask = this.runTasks().then(() => {
|
|
1420
|
-
process.exit(1);
|
|
1422
|
+
process$1.exit(1);
|
|
1421
1423
|
});
|
|
1422
1424
|
});
|
|
1423
1425
|
await body(this);
|
|
@@ -1425,7 +1427,7 @@ class TestExecutor {
|
|
|
1425
1427
|
catch (error) {
|
|
1426
1428
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1427
1429
|
console.error(error.stack || error.message || error);
|
|
1428
|
-
process.exitCode = 1;
|
|
1430
|
+
process$1.exitCode = 1;
|
|
1429
1431
|
}
|
|
1430
1432
|
finally {
|
|
1431
1433
|
console.log(`Reached finally block`);
|
|
@@ -1618,14 +1620,14 @@ class OutputPrefixTransform extends Transform {
|
|
|
1618
1620
|
function pipeToConsole(result, name) {
|
|
1619
1621
|
result.stdout
|
|
1620
1622
|
?.pipe(new OutputPrefixTransform(`${name}: `))
|
|
1621
|
-
.pipe(process.stdout);
|
|
1623
|
+
.pipe(process$1.stdout);
|
|
1622
1624
|
result.stderr
|
|
1623
1625
|
?.pipe(new OutputPrefixTransform(`${name} (stderr): `))
|
|
1624
|
-
.pipe(process.stderr);
|
|
1626
|
+
.pipe(process$1.stderr);
|
|
1625
1627
|
}
|
|
1626
1628
|
function checkPidRunning(pid) {
|
|
1627
1629
|
try {
|
|
1628
|
-
process.kill(pid, 0);
|
|
1630
|
+
process$1.kill(pid, 0);
|
|
1629
1631
|
return true;
|
|
1630
1632
|
}
|
|
1631
1633
|
catch {
|
|
@@ -1768,7 +1770,7 @@ async function runNpmRunScript(name, options) {
|
|
|
1768
1770
|
* This likely does not cover all situations.
|
|
1769
1771
|
*/
|
|
1770
1772
|
async function getDockerHostAddress() {
|
|
1771
|
-
if (process.platform === "darwin" || process.platform === "win32") {
|
|
1773
|
+
if (process$1.platform === "darwin" || process$1.platform === "win32") {
|
|
1772
1774
|
return "host.docker.internal";
|
|
1773
1775
|
}
|
|
1774
1776
|
if (fs.existsSync("/.dockerenv")) {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capraconsulting/cals-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "CLI for repeatable tasks in CALS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prepare": "tsx scripts/create-definition-schema.ts && husky",
|
|
9
9
|
"build": "rollup -c",
|
|
10
|
-
"test": "
|
|
11
|
-
"test:watch": "
|
|
10
|
+
"test": "vitest run --coverage src",
|
|
11
|
+
"test:watch": "vitest --coverage src",
|
|
12
12
|
"lint": "eslint .",
|
|
13
13
|
"lint:fix": "eslint --fix .",
|
|
14
14
|
"prepack": "./scripts/build-and-verify.sh",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"find-up": "^5.0.0",
|
|
33
33
|
"js-yaml": "^4.1.0",
|
|
34
34
|
"keytar": "^7.9.0",
|
|
35
|
-
"node-fetch": "^
|
|
35
|
+
"node-fetch": "^3.0.0",
|
|
36
36
|
"p-limit": "^3.0.0",
|
|
37
37
|
"p-map": "^4.0.0",
|
|
38
38
|
"process": "0.11.10",
|
|
@@ -56,10 +56,9 @@
|
|
|
56
56
|
"@rollup/plugin-alias": "5.1.1",
|
|
57
57
|
"@rollup/plugin-json": "6.1.0",
|
|
58
58
|
"@rollup/plugin-replace": "6.0.1",
|
|
59
|
-
"@types/jest": "29.5.14",
|
|
60
59
|
"@types/js-yaml": "4.0.9",
|
|
61
60
|
"@types/lodash-es": "4.17.12",
|
|
62
|
-
"@types/node": "22.10.
|
|
61
|
+
"@types/node": "22.10.5",
|
|
63
62
|
"@types/node-fetch": "2.6.12",
|
|
64
63
|
"@types/read": "0.0.32",
|
|
65
64
|
"@types/rimraf": "3.0.2",
|
|
@@ -68,21 +67,22 @@
|
|
|
68
67
|
"@types/yargs": "17.0.33",
|
|
69
68
|
"@typescript-eslint/eslint-plugin": "8.18.0",
|
|
70
69
|
"@typescript-eslint/parser": "8.18.0",
|
|
70
|
+
"@vitest/coverage-v8": "2.1.8",
|
|
71
|
+
"@vitest/ui": "2.1.8",
|
|
71
72
|
"dateformat": "4.6.3",
|
|
72
73
|
"eslint": "9.16.0",
|
|
73
74
|
"eslint-config-prettier": "9.1.0",
|
|
74
75
|
"eslint-plugin-prettier": "5.2.1",
|
|
75
76
|
"husky": "9.1.7",
|
|
76
|
-
"jest": "^29.6.1",
|
|
77
77
|
"prettier": "3.4.2",
|
|
78
78
|
"rollup": "2.79.2",
|
|
79
79
|
"rollup-plugin-typescript2": "0.36.0",
|
|
80
80
|
"semantic-release": "24.2.0",
|
|
81
81
|
"tempy": "1.0.1",
|
|
82
|
-
"ts-jest": "^29.1.1",
|
|
83
82
|
"tsx": "4.19.2",
|
|
84
83
|
"typescript": "5.7.2",
|
|
85
|
-
"typescript-json-schema": "0.65.1"
|
|
84
|
+
"typescript-json-schema": "0.65.1",
|
|
85
|
+
"vitest": "2.1.8"
|
|
86
86
|
},
|
|
87
87
|
"files": [
|
|
88
88
|
"lib"
|