@capraconsulting/cals-cli 3.11.3 → 3.12.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.
Files changed (43) hide show
  1. package/lib/cache.d.ts +1 -1
  2. package/lib/cals-cli.mjs +84 -91
  3. package/lib/cals-cli.mjs.map +1 -1
  4. package/lib/cli/commands/definition/dump-setup.d.ts +1 -1
  5. package/lib/cli/commands/definition/validate.d.ts +1 -1
  6. package/lib/cli/commands/definition.d.ts +1 -1
  7. package/lib/cli/commands/delete-cache.d.ts +1 -1
  8. package/lib/cli/commands/getting-started.d.ts +1 -1
  9. package/lib/cli/commands/github/analyze-directory.d.ts +1 -1
  10. package/lib/cli/commands/github/configure.d.ts +1 -1
  11. package/lib/cli/commands/github/generate-clone-commands.d.ts +1 -1
  12. package/lib/cli/commands/github/list-pull-requests-stats.d.ts +1 -1
  13. package/lib/cli/commands/github/list-repos.d.ts +1 -1
  14. package/lib/cli/commands/github/list-webhooks.d.ts +1 -1
  15. package/lib/cli/commands/github/set-token.d.ts +1 -1
  16. package/lib/cli/commands/github/sync.d.ts +2 -2
  17. package/lib/cli/commands/github/util.d.ts +2 -2
  18. package/lib/cli/commands/github.d.ts +1 -1
  19. package/lib/cli/commands/snyk/report.d.ts +1 -1
  20. package/lib/cli/commands/snyk/set-token.d.ts +1 -1
  21. package/lib/cli/commands/snyk/sync.d.ts +1 -1
  22. package/lib/cli/commands/snyk.d.ts +1 -1
  23. package/lib/cli/util.d.ts +1 -1
  24. package/lib/config.d.ts +1 -1
  25. package/lib/definition/definition.d.ts +1 -1
  26. package/lib/definition/types.d.ts +1 -1
  27. package/lib/github/changeset/changeset.d.ts +4 -4
  28. package/lib/github/changeset/execute.d.ts +3 -3
  29. package/lib/github/changeset/types.d.ts +1 -1
  30. package/lib/github/index.d.ts +1 -1
  31. package/lib/github/service.d.ts +4 -4
  32. package/lib/github/types.d.ts +1 -1
  33. package/lib/github/util.d.ts +1 -1
  34. package/lib/index.es.js +32 -42
  35. package/lib/index.es.js.map +1 -1
  36. package/lib/index.js +32 -42
  37. package/lib/index.js.map +1 -1
  38. package/lib/snyk/service.d.ts +4 -4
  39. package/lib/snyk/util.d.ts +1 -1
  40. package/lib/sonarcloud/index.d.ts +1 -1
  41. package/lib/sonarcloud/service.d.ts +2 -2
  42. package/lib/testing/lib.d.ts +1 -1
  43. package/package.json +14 -21
package/lib/cache.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Config } from "./config";
1
+ import type { Config } from "./config";
2
2
  interface CacheItem<T> {
3
3
  cacheTime: ReturnType<Date["getTime"]>;
4
4
  data: T;
package/lib/cals-cli.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import process$2 from 'node:process';
2
3
  import semver from 'semver';
3
4
  import yargs from 'yargs';
4
5
  import { hideBin } from 'yargs/helpers';
@@ -6,31 +7,50 @@ import fs from 'node:fs';
6
7
  import yaml from 'js-yaml';
7
8
  import pMap from 'p-map';
8
9
  import AJV from 'ajv';
10
+ import { Buffer } from 'node:buffer';
11
+ import { performance } from 'node:perf_hooks';
9
12
  import { Octokit } from '@octokit/rest';
10
13
  import fetch from 'node-fetch';
11
14
  import pLimit from 'p-limit';
12
- import keytar from 'keytar';
13
- import process$2 from 'node:process';
14
15
  import * as process$1 from 'process';
15
- import { performance } from 'perf_hooks';
16
- import { Buffer } from 'node:buffer';
17
- import { deprecate } from 'util';
18
- import path from 'path';
16
+ import keytar from 'keytar';
17
+ import { deprecate } from 'node:util';
18
+ import path from 'node:path';
19
+ import https from 'node:https';
20
+ import os from 'node:os';
19
21
  import cachedir from 'cachedir';
20
- import https from 'https';
21
- import os from 'os';
22
+ import readline from 'node:readline';
22
23
  import chalk from 'chalk';
23
- import readline from 'readline';
24
24
  import { sprintf } from 'sprintf-js';
25
25
  import { read } from 'read';
26
26
  import { findUp } from 'find-up';
27
27
  import { execa } from 'execa';
28
28
 
29
- var version = "3.11.3";
29
+ var version = "3.12.0";
30
30
  var engines = {
31
31
  node: ">=12.0.0"
32
32
  };
33
33
 
34
+ function groupBy(array, iteratee) {
35
+ return array.reduce((result, item) => {
36
+ const key = iteratee(item);
37
+ if (!result[key]) {
38
+ result[key] = [];
39
+ }
40
+ result[key].push(item);
41
+ return result;
42
+ }, {});
43
+ }
44
+ function uniq(array) {
45
+ return Array.from(new Set(array));
46
+ }
47
+ function sortBy(arr, getKey) {
48
+ return [...arr].sort((a, b) => getKey(a).localeCompare(getKey(b)));
49
+ }
50
+ function sumBy(array, iteratee) {
51
+ return array.reduce((sum, item) => sum + iteratee(item), 0);
52
+ }
53
+
34
54
  var type = "object";
35
55
  var properties = {
36
56
  snyk: {
@@ -325,26 +345,6 @@ var schema = {
325
345
  $schema: $schema
326
346
  };
327
347
 
328
- function groupBy(array, iteratee) {
329
- return array.reduce((result, item) => {
330
- const key = iteratee(item);
331
- if (!result[key]) {
332
- result[key] = [];
333
- }
334
- result[key].push(item);
335
- return result;
336
- }, {});
337
- }
338
- function uniq(array) {
339
- return Array.from(new Set(array));
340
- }
341
- function sortBy(arr, getKey) {
342
- return [...arr].sort((a, b) => getKey(a).localeCompare(getKey(b)));
343
- }
344
- function sumBy(array, iteratee) {
345
- return array.reduce((sum, item) => sum + iteratee(item), 0);
346
- }
347
-
348
348
  function getTeamId(org, teamName) {
349
349
  return `${org}/${teamName}`;
350
350
  }
@@ -378,8 +378,7 @@ function requireValidDefinition(definition) {
378
378
  }, []);
379
379
  // Verify team members exists as users.
380
380
  definition.github.teams
381
- .map((it) => it.teams)
382
- .flat()
381
+ .flatMap((it) => it.teams)
383
382
  .forEach((team) => {
384
383
  team.members.forEach((login) => {
385
384
  if (!loginList.includes(login)) {
@@ -415,9 +414,7 @@ function requireValidDefinition(definition) {
415
414
  });
416
415
  // Verify no duplicates in repos.
417
416
  definition.projects
418
- .flatMap((project) => project.github
419
- .map((org) => (org.repos || []).map((repo) => getRepoId(org.organization, repo.name)))
420
- .flat())
417
+ .flatMap((project) => project.github.flatMap((org) => (org.repos || []).map((repo) => getRepoId(org.organization, repo.name))))
421
418
  .reduce((acc, repoName) => {
422
419
  if (acc.includes(repoName)) {
423
420
  throw new Error(`Duplicate repo: ${repoName}`);
@@ -445,20 +442,18 @@ class DefinitionFile {
445
442
  function parseDefinition(value) {
446
443
  const result = checkAgainstSchema(yaml.load(value));
447
444
  if ("error" in result) {
448
- throw new Error("Definition content invalid: " + result.error);
445
+ throw new Error(`Definition content invalid: ${result.error}`);
449
446
  }
450
447
  requireValidDefinition(result.definition);
451
448
  return result.definition;
452
449
  }
453
450
  function getRepos(definition) {
454
- return definition.projects.flatMap((project) => project.github
455
- .map((org) => (org.repos || []).map((repo) => ({
451
+ return definition.projects.flatMap((project) => project.github.flatMap((org) => (org.repos || []).map((repo) => ({
456
452
  id: getRepoId(org.organization, repo.name),
457
453
  orgName: org.organization,
458
454
  project,
459
455
  repo,
460
- })))
461
- .flat());
456
+ }))));
462
457
  }
463
458
  function getGitHubOrgs(definition) {
464
459
  const githubOrganizations = definition.projects.flatMap((project) => project.github.map((it) => it.organization));
@@ -541,9 +536,7 @@ async function undefinedForNotFound(value) {
541
536
  if (e.name === "HttpError" && e.status === 404) {
542
537
  return undefined;
543
538
  }
544
- else {
545
- throw e;
546
- }
539
+ throw e;
547
540
  }
548
541
  }
549
542
 
@@ -663,11 +656,11 @@ class GitHubService {
663
656
  throw new Error(`Response from GitHub not OK (${response.status}): ${await response.text()}`);
664
657
  }
665
658
  const json = (await response.json());
666
- if (!!json.errors) {
659
+ if (json.errors) {
667
660
  throw new Error(`Error from GitHub GraphQL API: ${JSON.stringify(json.errors)}`);
668
661
  }
669
662
  if (json.data == null) {
670
- throw new Error(`No data received from GitHub GraphQL API (unknown reason)`);
663
+ throw new Error("No data received from GitHub GraphQL API (unknown reason)");
671
664
  }
672
665
  return json.data;
673
666
  }
@@ -1168,8 +1161,7 @@ function getGitHubRepo(snykProject) {
1168
1161
  name: match[2],
1169
1162
  };
1170
1163
  }
1171
- else if (snykProject.origin === "cli" &&
1172
- snykProject.remoteRepoUrl != null) {
1164
+ if (snykProject.origin === "cli" && snykProject.remoteRepoUrl != null) {
1173
1165
  // The remoteRepoUrl can be overridden when using the CLI, so don't
1174
1166
  // fail if we cannot extract the value.
1175
1167
  const match = /github.com\/([^/]+)\/(.+)\.git$/.exec(snykProject.remoteRepoUrl);
@@ -1181,9 +1173,7 @@ function getGitHubRepo(snykProject) {
1181
1173
  name: match[2],
1182
1174
  };
1183
1175
  }
1184
- else {
1185
- return undefined;
1186
- }
1176
+ return undefined;
1187
1177
  }
1188
1178
  function getGitHubRepoId(repo) {
1189
1179
  return repo ? `${repo.owner}/${repo.name}` : undefined;
@@ -1226,7 +1216,7 @@ class CacheProvider {
1226
1216
  const cacheItem = this.mustValidate
1227
1217
  ? undefined
1228
1218
  : this.retrieveJson(cachekey);
1229
- const expire = new Date(new Date().getTime() - cachetime * 1000).getTime();
1219
+ const expire = new Date(Date.now() - cachetime * 1000).getTime();
1230
1220
  if (cacheItem !== undefined && cacheItem.cacheTime > expire) {
1231
1221
  return cacheItem.data;
1232
1222
  }
@@ -1575,7 +1565,7 @@ function buildGitHubUsersList(definition, members) {
1575
1565
  });
1576
1566
  return reorderListToSimilarAsBefore(definition.github.users, result, (it) => it.login);
1577
1567
  }
1578
- async function dumpSetup(config, reporter, github, snyk, outfile, definitionFile) {
1568
+ async function dumpSetup(_config, reporter, github, snyk, outfile, definitionFile) {
1579
1569
  reporter.info("Fetching data. This might take some time");
1580
1570
  const definition = await definitionFile.getDefinition();
1581
1571
  const orgs = await getOrgs(github, getGitHubOrgs(definition));
@@ -1645,7 +1635,7 @@ const command$f = {
1645
1635
  .command(command$h)
1646
1636
  .command(command$g)
1647
1637
  .demandCommand()
1648
- .usage(`cals definition`),
1638
+ .usage("cals definition"),
1649
1639
  handler: () => {
1650
1640
  yargs(hideBin(process$2.argv)).showHelp();
1651
1641
  },
@@ -1717,7 +1707,7 @@ const command$c = {
1717
1707
  cache: createCacheProvider(config, argv),
1718
1708
  });
1719
1709
  const reporter = createReporter(argv);
1720
- return analyzeDirectory(reporter, config, github, argv["org"]);
1710
+ return analyzeDirectory(reporter, config, github, argv.org);
1721
1711
  },
1722
1712
  };
1723
1713
 
@@ -2070,27 +2060,28 @@ async function executeChangeSetItem(github, changeItem, reporter, lookup) {
2070
2060
  username: changeItem.user,
2071
2061
  });
2072
2062
  return true;
2073
- case "repo-update":
2063
+ case "repo-update": {
2074
2064
  const upd = {
2075
2065
  owner: changeItem.org,
2076
2066
  repo: changeItem.repo,
2077
2067
  };
2078
2068
  for (const attrib of changeItem.attribs) {
2079
2069
  if ("archived" in attrib) {
2080
- upd.archived = attrib["archived"];
2070
+ upd.archived = attrib.archived;
2081
2071
  }
2082
2072
  else if ("issues" in attrib) {
2083
- upd.has_issues = attrib["issues"];
2073
+ upd.has_issues = attrib.issues;
2084
2074
  }
2085
2075
  else if ("wiki" in attrib) {
2086
- upd.has_wiki = attrib["wiki"];
2076
+ upd.has_wiki = attrib.wiki;
2087
2077
  }
2088
2078
  else if ("private" in attrib) {
2089
- upd.private = attrib["private"];
2079
+ upd.private = attrib.private;
2090
2080
  }
2091
2081
  }
2092
2082
  await github.octokit.repos.update(upd);
2093
2083
  return true;
2084
+ }
2094
2085
  case "repo-team-remove":
2095
2086
  await github.octokit.teams.removeRepoInOrg({
2096
2087
  org: changeItem.org,
@@ -2135,18 +2126,16 @@ function createOrgGetter(github) {
2135
2126
  }
2136
2127
  return semaphores[orgName];
2137
2128
  }
2138
- return async function (orgName) {
2139
- return await getSemaphore(orgName)(async () => {
2140
- if (!(orgName in orgs)) {
2141
- const org = await github.getOrg(orgName);
2142
- orgs[orgName] = {
2143
- org,
2144
- teams: await github.getTeamList(org),
2145
- };
2146
- }
2147
- return orgs[orgName];
2148
- });
2149
- };
2129
+ return async (orgName) => await getSemaphore(orgName)(async () => {
2130
+ if (!(orgName in orgs)) {
2131
+ const org = await github.getOrg(orgName);
2132
+ orgs[orgName] = {
2133
+ org,
2134
+ teams: await github.getTeamList(org),
2135
+ };
2136
+ }
2137
+ return orgs[orgName];
2138
+ });
2150
2139
  }
2151
2140
  async function process(reporter, github, definition, getOrg, execute, limitToOrg) {
2152
2141
  let changes = [];
@@ -2174,16 +2163,16 @@ async function process(reporter, github, definition, getOrg, execute, limitToOrg
2174
2163
  if (ignored.length > 0) {
2175
2164
  reporter.info("Not implemented:");
2176
2165
  for (const change of ignored) {
2177
- reporter.info(" - " + JSON.stringify(change));
2166
+ reporter.info(` - ${JSON.stringify(change)}`);
2178
2167
  }
2179
2168
  }
2180
2169
  if (changes.length === 0) {
2181
- reporter.info(`No actions to be performed`);
2170
+ reporter.info("No actions to be performed");
2182
2171
  }
2183
2172
  else {
2184
- reporter.info(`To be performed:`);
2173
+ reporter.info("To be performed:");
2185
2174
  for (const change of changes) {
2186
- reporter.info(" - " + JSON.stringify(change));
2175
+ reporter.info(` - ${JSON.stringify(change)}`);
2187
2176
  }
2188
2177
  }
2189
2178
  if (execute && changes.length > 0) {
@@ -2224,7 +2213,7 @@ const command$b = {
2224
2213
  const definition = await getDefinitionFile(argv).getDefinition();
2225
2214
  await reportRateLimit(reporter, github, async () => {
2226
2215
  const orgGetter = createOrgGetter(github);
2227
- await process(reporter, github, definition, orgGetter, !!argv["execute"], argv["org"]);
2216
+ await process(reporter, github, definition, orgGetter, !!argv.execute, argv.org);
2228
2217
  });
2229
2218
  },
2230
2219
  };
@@ -2315,7 +2304,7 @@ const command$a = {
2315
2304
  topic: argv.topic,
2316
2305
  excludeExisting: !!argv["exclude-existing"],
2317
2306
  group: argv.group,
2318
- org: argv["org"],
2307
+ org: argv.org,
2319
2308
  });
2320
2309
  },
2321
2310
  };
@@ -2324,7 +2313,7 @@ async function listPullRequestsStats({ reporter, github, }) {
2324
2313
  // This is only an initial attempt to get some insights into
2325
2314
  // open pull requests. Feel free to change.
2326
2315
  const pulls = await github.getSearchedPullRequestList("capralifecycle");
2327
- const cutoffOld = new Date(new Date().getTime() - 86400 * 1000 * 60);
2316
+ const cutoffOld = new Date(Date.now() - 86400 * 1000 * 60);
2328
2317
  const categories = pulls
2329
2318
  .reduce((acc, cur) => {
2330
2319
  const key = `${cur.baseRepository.owner.login}/${cur.baseRepository.name}`;
@@ -2502,13 +2491,13 @@ const command$8 = {
2502
2491
  topic: argv.topic,
2503
2492
  compact: !!argv.compact,
2504
2493
  csv: !!argv.csv,
2505
- org: argv["org"],
2494
+ org: argv.org,
2506
2495
  });
2507
2496
  },
2508
2497
  };
2509
2498
 
2510
2499
  const e = encodeURIComponent;
2511
- async function listWebhooks(reporter, cache, github, org) {
2500
+ async function listWebhooks(reporter, _cache, github, org) {
2512
2501
  const repos = (await github.getOrgRepoList({ org })).filter((it) => !it.isArchived);
2513
2502
  for (const repo of repos) {
2514
2503
  reporter.log("");
@@ -2549,7 +2538,7 @@ const command$7 = {
2549
2538
  handler: async (argv) => {
2550
2539
  const config = createConfig();
2551
2540
  const cacheProvider = createCacheProvider(config, argv);
2552
- await listWebhooks(createReporter(argv), cacheProvider, await createGitHubService({ config, cache: cacheProvider }), argv["org"]);
2541
+ await listWebhooks(createReporter(argv), cacheProvider, await createGitHubService({ config, cache: cacheProvider }), argv.org);
2553
2542
  },
2554
2543
  };
2555
2544
 
@@ -2605,7 +2594,7 @@ function parseShortlogSummary(value) {
2605
2594
  const matches = [...value.matchAll(/^\s*(\d+)\s+(.+)$/gm)];
2606
2595
  return matches.map((it) => ({
2607
2596
  name: it[2],
2608
- count: parseInt(it[1]),
2597
+ count: Number.parseInt(it[1]),
2609
2598
  }));
2610
2599
  }
2611
2600
 
@@ -2771,9 +2760,7 @@ function formatAuthorAndCount(reporter, name, count) {
2771
2760
  if (isBotAuthor(name)) {
2772
2761
  return reporter.format.grey(text);
2773
2762
  }
2774
- else {
2775
- return reporter.format.greenBright(text);
2776
- }
2763
+ return reporter.format.greenBright(text);
2777
2764
  }
2778
2765
  async function updateRepos(reporter, foundRepos) {
2779
2766
  const updateResults = await updateReposInParallel(reporter, foundRepos);
@@ -2860,12 +2847,12 @@ function getExpectedRepo(item) {
2860
2847
  }
2861
2848
  function getGitRepo(rootdir, relpath) {
2862
2849
  return new GitRepo(path.resolve(rootdir, relpath), async (result) => {
2863
- await appendFile(path.resolve(rootdir, CALS_LOG), JSON.stringify({
2850
+ await appendFile(path.resolve(rootdir, CALS_LOG), `${JSON.stringify({
2864
2851
  time: new Date().toISOString(),
2865
2852
  context: relpath,
2866
2853
  type: "exec-result",
2867
2854
  payload: result,
2868
- }) + "\n");
2855
+ })}\n`);
2869
2856
  });
2870
2857
  }
2871
2858
  function getDefinitionRepo(rootdir, reposInOrg, cals) {
@@ -3089,7 +3076,8 @@ const command$5 = {
3089
3076
  .option("ask-move", {
3090
3077
  describe: "Ask to actual move renamed repos",
3091
3078
  type: "boolean",
3092
- }).usage(`cals github sync
3079
+ })
3080
+ .usage(`cals github sync
3093
3081
 
3094
3082
  Synchronize all checked out GitHub repositories within the working directory
3095
3083
  grouped by the project in the resource definition file. The command can also
@@ -3157,7 +3145,8 @@ const command$4 = {
3157
3145
  .command(command$7)
3158
3146
  .command(command$6)
3159
3147
  .command(command$5)
3160
- .demandCommand().usage(`cals github
3148
+ .demandCommand()
3149
+ .usage(`cals github
3161
3150
 
3162
3151
  Notes:
3163
3152
  Before doing anything against GitHub you need to configure a token
@@ -3311,7 +3300,11 @@ const command$1 = {
3311
3300
  const command = {
3312
3301
  command: "snyk",
3313
3302
  describe: "Integration with Snyk",
3314
- builder: (yargs) => yargs.command(command$2).command(command$3).command(command$1).demandCommand()
3303
+ builder: (yargs) => yargs
3304
+ .command(command$2)
3305
+ .command(command$3)
3306
+ .command(command$1)
3307
+ .demandCommand()
3315
3308
  .usage(`cals snyk
3316
3309
 
3317
3310
  Notes:
@@ -3330,7 +3323,7 @@ async function main() {
3330
3323
  process$2.exit(1);
3331
3324
  }
3332
3325
  await yargs(hideBin(process$2.argv))
3333
- .usage(`cals-cli v${version} (build: ${"2025-06-10T07:40:59+0000"})`)
3326
+ .usage(`cals-cli v${version} (build: ${"2025-07-01T10:17:26+0000"})`)
3334
3327
  .scriptName("cals")
3335
3328
  .locale("en")
3336
3329
  .help("help")
@@ -1 +1 @@
1
- {"version":3,"file":"cals-cli.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import { type CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import { type CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,5 +1,5 @@
1
- import { CommandModule } from "yargs";
2
- import { DefinitionRepo } from "../../../definition/types";
1
+ import type { CommandModule } from "yargs";
2
+ import type { DefinitionRepo } from "../../../definition/types";
3
3
  interface Alias {
4
4
  group: string;
5
5
  name: string;
@@ -1,3 +1,3 @@
1
- import { GitHubService } from "../../../github";
2
- import { Reporter } from "../../reporter";
1
+ import type { GitHubService } from "../../../github";
2
+ import type { Reporter } from "../../reporter";
3
3
  export declare function reportRateLimit(reporter: Reporter, github: GitHubService, block: () => Promise<void>): Promise<void>;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import { type CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import type { CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from "yargs";
1
+ import { type CommandModule } from "yargs";
2
2
  declare const command: CommandModule;
3
3
  export default command;
package/lib/cli/util.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Arguments, Options } from "yargs";
1
+ import type { Arguments, Options } from "yargs";
2
2
  import { CacheProvider } from "../cache";
3
3
  import { Config } from "../config";
4
4
  import { DefinitionFile } from "../definition";
package/lib/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import https from "https";
1
+ import https from "node:https";
2
2
  export declare class Config {
3
3
  cwd: string;
4
4
  configFile: string;
@@ -1,5 +1,5 @@
1
1
  import schema from "../definition-schema.json";
2
- import { Definition, GetReposResponse } from "./types";
2
+ import type { Definition, GetReposResponse } from "./types";
3
3
  export { schema };
4
4
  export declare function getRepoId(orgName: string, repoName: string): string;
5
5
  export declare class DefinitionFile {
@@ -1,4 +1,4 @@
1
- import { Permission } from "../github/types";
1
+ import type { Permission } from "../github/types";
2
2
  export interface Definition {
3
3
  snyk?: {
4
4
  accountId: string;
@@ -1,7 +1,7 @@
1
- import { Definition } from "../../definition/types";
2
- import { GitHubService } from "../service";
3
- import { OrgsGetResponse } from "../types";
4
- import { ChangeSetItem } from "./types";
1
+ import type { Definition } from "../../definition/types";
2
+ import type { GitHubService } from "../service";
3
+ import type { OrgsGetResponse } from "../types";
4
+ import type { ChangeSetItem } from "./types";
5
5
  /**
6
6
  * Generate change set items for projects.
7
7
  */
@@ -1,6 +1,6 @@
1
- import { Reporter } from "../../cli/reporter";
2
- import { GitHubService } from "../service";
3
- import { ChangeSetItem, RepoCreateItem } from "./types";
1
+ import type { Reporter } from "../../cli/reporter";
2
+ import type { GitHubService } from "../service";
3
+ import type { ChangeSetItem, RepoCreateItem } from "./types";
4
4
  type NotImplementedChangeSetItem = RepoCreateItem;
5
5
  export declare function isNotImplementedChangeSetItem(changeItem: ChangeSetItem): changeItem is NotImplementedChangeSetItem;
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { Permission } from "../types";
1
+ import type { Permission } from "../types";
2
2
  export interface RepoCreateItem {
3
3
  type: "repo-create";
4
4
  org: string;
@@ -1,3 +1,3 @@
1
- export { createGitHubService, GitHubService } from "./service";
2
1
  export type { SearchedPullRequestListItem } from "./service";
2
+ export { createGitHubService, GitHubService } from "./service";
3
3
  export type { RenovateDependencyDashboardIssue, VulnerabilityAlert, } from "./types";
@@ -1,8 +1,8 @@
1
1
  import { Octokit } from "@octokit/rest";
2
- import { CacheProvider } from "../cache";
3
- import { Config } from "../config";
4
- import { GitHubTokenProvider } from "./token";
5
- import { OrgMemberOrInvited, OrgsGetResponse, OrgsListMembersResponseItem, OrgsListPendingInvitationsResponseItem, RenovateDependencyDashboardIssue, Repo, ReposGetResponse, ReposListHooksResponseItem, ReposListTeamsResponseItem, TeamMemberOrInvited, TeamsListMembersResponseItem, TeamsListPendingInvitationsResponseItem, TeamsListResponseItem, VulnerabilityAlert } from "./types";
2
+ import type { CacheProvider } from "../cache";
3
+ import type { Config } from "../config";
4
+ import { type GitHubTokenProvider } from "./token";
5
+ import type { OrgMemberOrInvited, OrgsGetResponse, OrgsListMembersResponseItem, OrgsListPendingInvitationsResponseItem, RenovateDependencyDashboardIssue, Repo, ReposGetResponse, ReposListHooksResponseItem, ReposListTeamsResponseItem, TeamMemberOrInvited, TeamsListMembersResponseItem, TeamsListPendingInvitationsResponseItem, TeamsListResponseItem, VulnerabilityAlert } from "./types";
6
6
  interface SearchedPullRequestListQueryResult {
7
7
  search: {
8
8
  pageInfo: {
@@ -1,4 +1,4 @@
1
- import { Endpoints } from "@octokit/types";
1
+ import type { Endpoints } from "@octokit/types";
2
2
  export type OrgsGetResponse = Endpoints["GET /orgs/{org}"]["response"]["data"];
3
3
  export type OrgsListMembersResponseItem = Exclude<Endpoints["GET /orgs/{org}/members"]["response"]["data"][0], null>;
4
4
  export type OrgsListPendingInvitationsResponseItem = Endpoints["GET /orgs/{org}/invitations"]["response"]["data"][0];
@@ -1,4 +1,4 @@
1
- import { Repo } from "./types";
1
+ import type { Repo } from "./types";
2
2
  export declare function getGroup(repo: Repo): string | null;
3
3
  export declare function getGroupedRepos(repos: Repo[]): {
4
4
  name: string;
package/lib/index.es.js CHANGED
@@ -1,27 +1,27 @@
1
1
  import fs from 'node:fs';
2
- import path from 'path';
3
- import chalk from 'chalk';
4
- import readline from 'readline';
2
+ import path from 'node:path';
5
3
  import process$1 from 'node:process';
6
- import 'util';
4
+ import readline from 'node:readline';
5
+ import chalk from 'chalk';
6
+ import 'node:util';
7
+ import https from 'node:https';
8
+ import os from 'node:os';
7
9
  import cachedir from 'cachedir';
8
- import https from 'https';
9
- import os from 'os';
10
10
  import AJV from 'ajv';
11
11
  import yaml from 'js-yaml';
12
+ import { Buffer } from 'node:buffer';
13
+ import { performance } from 'node:perf_hooks';
12
14
  import { Octokit } from '@octokit/rest';
13
15
  import fetch from 'node-fetch';
14
16
  import pLimit from 'p-limit';
15
- import keytar from 'keytar';
16
17
  import * as process from 'process';
17
- import { performance } from 'perf_hooks';
18
- import { Buffer } from 'node:buffer';
19
- import { strict } from 'assert';
18
+ import keytar from 'keytar';
19
+ import { strict } from 'node:assert';
20
+ import { Transform } from 'node:stream';
20
21
  import { execa } from 'execa';
21
22
  import { read } from 'read';
22
- import { Transform } from 'stream';
23
23
 
24
- var version = "3.11.3";
24
+ var version = "3.12.0";
25
25
 
26
26
  class CacheProvider {
27
27
  constructor(config) {
@@ -60,7 +60,7 @@ class CacheProvider {
60
60
  const cacheItem = this.mustValidate
61
61
  ? undefined
62
62
  : this.retrieveJson(cachekey);
63
- const expire = new Date(new Date().getTime() - cachetime * 1000).getTime();
63
+ const expire = new Date(Date.now() - cachetime * 1000).getTime();
64
64
  if (cacheItem !== undefined && cacheItem.cacheTime > expire) {
65
65
  return cacheItem.data;
66
66
  }
@@ -159,6 +159,10 @@ class Config {
159
159
  }
160
160
  }
161
161
 
162
+ function uniq(array) {
163
+ return Array.from(new Set(array));
164
+ }
165
+
162
166
  var type = "object";
163
167
  var properties = {
164
168
  snyk: {
@@ -453,10 +457,6 @@ var schema = {
453
457
  $schema: $schema
454
458
  };
455
459
 
456
- function uniq(array) {
457
- return Array.from(new Set(array));
458
- }
459
-
460
460
  function getTeamId(org, teamName) {
461
461
  return `${org}/${teamName}`;
462
462
  }
@@ -490,8 +490,7 @@ function requireValidDefinition(definition) {
490
490
  }, []);
491
491
  // Verify team members exists as users.
492
492
  definition.github.teams
493
- .map((it) => it.teams)
494
- .flat()
493
+ .flatMap((it) => it.teams)
495
494
  .forEach((team) => {
496
495
  team.members.forEach((login) => {
497
496
  if (!loginList.includes(login)) {
@@ -527,9 +526,7 @@ function requireValidDefinition(definition) {
527
526
  });
528
527
  // Verify no duplicates in repos.
529
528
  definition.projects
530
- .flatMap((project) => project.github
531
- .map((org) => (org.repos || []).map((repo) => getRepoId(org.organization, repo.name)))
532
- .flat())
529
+ .flatMap((project) => project.github.flatMap((org) => (org.repos || []).map((repo) => getRepoId(org.organization, repo.name))))
533
530
  .reduce((acc, repoName) => {
534
531
  if (acc.includes(repoName)) {
535
532
  throw new Error(`Duplicate repo: ${repoName}`);
@@ -557,20 +554,18 @@ class DefinitionFile {
557
554
  function parseDefinition(value) {
558
555
  const result = checkAgainstSchema(yaml.load(value));
559
556
  if ("error" in result) {
560
- throw new Error("Definition content invalid: " + result.error);
557
+ throw new Error(`Definition content invalid: ${result.error}`);
561
558
  }
562
559
  requireValidDefinition(result.definition);
563
560
  return result.definition;
564
561
  }
565
562
  function getRepos(definition) {
566
- return definition.projects.flatMap((project) => project.github
567
- .map((org) => (org.repos || []).map((repo) => ({
563
+ return definition.projects.flatMap((project) => project.github.flatMap((org) => (org.repos || []).map((repo) => ({
568
564
  id: getRepoId(org.organization, repo.name),
569
565
  orgName: org.organization,
570
566
  project,
571
567
  repo,
572
- })))
573
- .flat());
568
+ }))));
574
569
  }
575
570
  function getGitHubOrgs(definition) {
576
571
  const githubOrganizations = definition.projects.flatMap((project) => project.github.map((it) => it.organization));
@@ -624,9 +619,7 @@ async function undefinedForNotFound(value) {
624
619
  if (e.name === "HttpError" && e.status === 404) {
625
620
  return undefined;
626
621
  }
627
- else {
628
- throw e;
629
- }
622
+ throw e;
630
623
  }
631
624
  }
632
625
 
@@ -746,11 +739,11 @@ class GitHubService {
746
739
  throw new Error(`Response from GitHub not OK (${response.status}): ${await response.text()}`);
747
740
  }
748
741
  const json = (await response.json());
749
- if (!!json.errors) {
742
+ if (json.errors) {
750
743
  throw new Error(`Error from GitHub GraphQL API: ${JSON.stringify(json.errors)}`);
751
744
  }
752
745
  if (json.data == null) {
753
- throw new Error(`No data received from GitHub GraphQL API (unknown reason)`);
746
+ throw new Error("No data received from GitHub GraphQL API (unknown reason)");
754
747
  }
755
748
  return json.data;
756
749
  }
@@ -1257,8 +1250,7 @@ function getGitHubRepo(snykProject) {
1257
1250
  name: match[2],
1258
1251
  };
1259
1252
  }
1260
- else if (snykProject.origin === "cli" &&
1261
- snykProject.remoteRepoUrl != null) {
1253
+ if (snykProject.origin === "cli" && snykProject.remoteRepoUrl != null) {
1262
1254
  // The remoteRepoUrl can be overridden when using the CLI, so don't
1263
1255
  // fail if we cannot extract the value.
1264
1256
  const match = /github.com\/([^/]+)\/(.+)\.git$/.exec(snykProject.remoteRepoUrl);
@@ -1270,9 +1262,7 @@ function getGitHubRepo(snykProject) {
1270
1262
  name: match[2],
1271
1263
  };
1272
1264
  }
1273
- else {
1274
- return undefined;
1275
- }
1265
+ return undefined;
1276
1266
  }
1277
1267
  function getGitHubRepoId(repo) {
1278
1268
  return repo ? `${repo.owner}/${repo.name}` : undefined;
@@ -1429,7 +1419,7 @@ class TestExecutor {
1429
1419
  process$1.exitCode = 1;
1430
1420
  }
1431
1421
  finally {
1432
- console.log(`Reached finally block`);
1422
+ console.log("Reached finally block");
1433
1423
  this.usingWithCleanupTasks = false;
1434
1424
  if (this.cleanupTask == null) {
1435
1425
  this.cleanupTask = this.runTasks();
@@ -1448,8 +1438,8 @@ function createTestExecutor() {
1448
1438
  * Gives a value formatted as "yyyymmdd-xxxxxx", e.g. "20200523-3f2c87".
1449
1439
  */
1450
1440
  function generateRunId() {
1451
- const low = parseInt("100000", 16);
1452
- const high = parseInt("ffffff", 16);
1441
+ const low = 0x100000;
1442
+ const high = 0xffffff;
1453
1443
  const range = high - low + 1;
1454
1444
  const now = new Date();
1455
1445
  return [
@@ -1610,7 +1600,7 @@ class OutputPrefixTransform extends Transform {
1610
1600
  if (result.endsWith("\n\u001B[0m")) {
1611
1601
  result = result.slice(0, -5) + result.slice(-4);
1612
1602
  }
1613
- result = prefix + result.replace(/\n/g, `\n${prefix}`) + "\n";
1603
+ result = `${prefix + result.replace(/\n/g, `\n${prefix}`)}\n`;
1614
1604
  callback(null, result);
1615
1605
  },
1616
1606
  });
@@ -1739,7 +1729,7 @@ async function startContainer({ executor, network, imageId, alias, env, dockerAr
1739
1729
  executor.registerCleanupTask(async () => {
1740
1730
  console.log(`Stopping container ${containerName}`);
1741
1731
  const r = execa("docker", ["stop", containerName]);
1742
- pipeToConsole(r, (alias ?? containerName) + " (stop)");
1732
+ pipeToConsole(r, `${alias ?? containerName} (stop)`);
1743
1733
  try {
1744
1734
  await r;
1745
1735
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.js CHANGED
@@ -1,27 +1,27 @@
1
1
  import fs from 'node:fs';
2
- import path from 'path';
3
- import chalk from 'chalk';
4
- import readline from 'readline';
2
+ import path from 'node:path';
5
3
  import process$1 from 'node:process';
6
- import 'util';
4
+ import readline from 'node:readline';
5
+ import chalk from 'chalk';
6
+ import 'node:util';
7
+ import https from 'node:https';
8
+ import os from 'node:os';
7
9
  import cachedir from 'cachedir';
8
- import https from 'https';
9
- import os from 'os';
10
10
  import AJV from 'ajv';
11
11
  import yaml from 'js-yaml';
12
+ import { Buffer } from 'node:buffer';
13
+ import { performance } from 'node:perf_hooks';
12
14
  import { Octokit } from '@octokit/rest';
13
15
  import fetch from 'node-fetch';
14
16
  import pLimit from 'p-limit';
15
- import keytar from 'keytar';
16
17
  import * as process from 'process';
17
- import { performance } from 'perf_hooks';
18
- import { Buffer } from 'node:buffer';
19
- import { strict } from 'assert';
18
+ import keytar from 'keytar';
19
+ import { strict } from 'node:assert';
20
+ import { Transform } from 'node:stream';
20
21
  import { execa } from 'execa';
21
22
  import { read } from 'read';
22
- import { Transform } from 'stream';
23
23
 
24
- var version = "3.11.3";
24
+ var version = "3.12.0";
25
25
 
26
26
  class CacheProvider {
27
27
  constructor(config) {
@@ -60,7 +60,7 @@ class CacheProvider {
60
60
  const cacheItem = this.mustValidate
61
61
  ? undefined
62
62
  : this.retrieveJson(cachekey);
63
- const expire = new Date(new Date().getTime() - cachetime * 1000).getTime();
63
+ const expire = new Date(Date.now() - cachetime * 1000).getTime();
64
64
  if (cacheItem !== undefined && cacheItem.cacheTime > expire) {
65
65
  return cacheItem.data;
66
66
  }
@@ -159,6 +159,10 @@ class Config {
159
159
  }
160
160
  }
161
161
 
162
+ function uniq(array) {
163
+ return Array.from(new Set(array));
164
+ }
165
+
162
166
  var type = "object";
163
167
  var properties = {
164
168
  snyk: {
@@ -453,10 +457,6 @@ var schema = {
453
457
  $schema: $schema
454
458
  };
455
459
 
456
- function uniq(array) {
457
- return Array.from(new Set(array));
458
- }
459
-
460
460
  function getTeamId(org, teamName) {
461
461
  return `${org}/${teamName}`;
462
462
  }
@@ -490,8 +490,7 @@ function requireValidDefinition(definition) {
490
490
  }, []);
491
491
  // Verify team members exists as users.
492
492
  definition.github.teams
493
- .map((it) => it.teams)
494
- .flat()
493
+ .flatMap((it) => it.teams)
495
494
  .forEach((team) => {
496
495
  team.members.forEach((login) => {
497
496
  if (!loginList.includes(login)) {
@@ -527,9 +526,7 @@ function requireValidDefinition(definition) {
527
526
  });
528
527
  // Verify no duplicates in repos.
529
528
  definition.projects
530
- .flatMap((project) => project.github
531
- .map((org) => (org.repos || []).map((repo) => getRepoId(org.organization, repo.name)))
532
- .flat())
529
+ .flatMap((project) => project.github.flatMap((org) => (org.repos || []).map((repo) => getRepoId(org.organization, repo.name))))
533
530
  .reduce((acc, repoName) => {
534
531
  if (acc.includes(repoName)) {
535
532
  throw new Error(`Duplicate repo: ${repoName}`);
@@ -557,20 +554,18 @@ class DefinitionFile {
557
554
  function parseDefinition(value) {
558
555
  const result = checkAgainstSchema(yaml.load(value));
559
556
  if ("error" in result) {
560
- throw new Error("Definition content invalid: " + result.error);
557
+ throw new Error(`Definition content invalid: ${result.error}`);
561
558
  }
562
559
  requireValidDefinition(result.definition);
563
560
  return result.definition;
564
561
  }
565
562
  function getRepos(definition) {
566
- return definition.projects.flatMap((project) => project.github
567
- .map((org) => (org.repos || []).map((repo) => ({
563
+ return definition.projects.flatMap((project) => project.github.flatMap((org) => (org.repos || []).map((repo) => ({
568
564
  id: getRepoId(org.organization, repo.name),
569
565
  orgName: org.organization,
570
566
  project,
571
567
  repo,
572
- })))
573
- .flat());
568
+ }))));
574
569
  }
575
570
  function getGitHubOrgs(definition) {
576
571
  const githubOrganizations = definition.projects.flatMap((project) => project.github.map((it) => it.organization));
@@ -624,9 +619,7 @@ async function undefinedForNotFound(value) {
624
619
  if (e.name === "HttpError" && e.status === 404) {
625
620
  return undefined;
626
621
  }
627
- else {
628
- throw e;
629
- }
622
+ throw e;
630
623
  }
631
624
  }
632
625
 
@@ -746,11 +739,11 @@ class GitHubService {
746
739
  throw new Error(`Response from GitHub not OK (${response.status}): ${await response.text()}`);
747
740
  }
748
741
  const json = (await response.json());
749
- if (!!json.errors) {
742
+ if (json.errors) {
750
743
  throw new Error(`Error from GitHub GraphQL API: ${JSON.stringify(json.errors)}`);
751
744
  }
752
745
  if (json.data == null) {
753
- throw new Error(`No data received from GitHub GraphQL API (unknown reason)`);
746
+ throw new Error("No data received from GitHub GraphQL API (unknown reason)");
754
747
  }
755
748
  return json.data;
756
749
  }
@@ -1257,8 +1250,7 @@ function getGitHubRepo(snykProject) {
1257
1250
  name: match[2],
1258
1251
  };
1259
1252
  }
1260
- else if (snykProject.origin === "cli" &&
1261
- snykProject.remoteRepoUrl != null) {
1253
+ if (snykProject.origin === "cli" && snykProject.remoteRepoUrl != null) {
1262
1254
  // The remoteRepoUrl can be overridden when using the CLI, so don't
1263
1255
  // fail if we cannot extract the value.
1264
1256
  const match = /github.com\/([^/]+)\/(.+)\.git$/.exec(snykProject.remoteRepoUrl);
@@ -1270,9 +1262,7 @@ function getGitHubRepo(snykProject) {
1270
1262
  name: match[2],
1271
1263
  };
1272
1264
  }
1273
- else {
1274
- return undefined;
1275
- }
1265
+ return undefined;
1276
1266
  }
1277
1267
  function getGitHubRepoId(repo) {
1278
1268
  return repo ? `${repo.owner}/${repo.name}` : undefined;
@@ -1429,7 +1419,7 @@ class TestExecutor {
1429
1419
  process$1.exitCode = 1;
1430
1420
  }
1431
1421
  finally {
1432
- console.log(`Reached finally block`);
1422
+ console.log("Reached finally block");
1433
1423
  this.usingWithCleanupTasks = false;
1434
1424
  if (this.cleanupTask == null) {
1435
1425
  this.cleanupTask = this.runTasks();
@@ -1448,8 +1438,8 @@ function createTestExecutor() {
1448
1438
  * Gives a value formatted as "yyyymmdd-xxxxxx", e.g. "20200523-3f2c87".
1449
1439
  */
1450
1440
  function generateRunId() {
1451
- const low = parseInt("100000", 16);
1452
- const high = parseInt("ffffff", 16);
1441
+ const low = 0x100000;
1442
+ const high = 0xffffff;
1453
1443
  const range = high - low + 1;
1454
1444
  const now = new Date();
1455
1445
  return [
@@ -1610,7 +1600,7 @@ class OutputPrefixTransform extends Transform {
1610
1600
  if (result.endsWith("\n\u001B[0m")) {
1611
1601
  result = result.slice(0, -5) + result.slice(-4);
1612
1602
  }
1613
- result = prefix + result.replace(/\n/g, `\n${prefix}`) + "\n";
1603
+ result = `${prefix + result.replace(/\n/g, `\n${prefix}`)}\n`;
1614
1604
  callback(null, result);
1615
1605
  },
1616
1606
  });
@@ -1739,7 +1729,7 @@ async function startContainer({ executor, network, imageId, alias, env, dockerAr
1739
1729
  executor.registerCleanupTask(async () => {
1740
1730
  console.log(`Stopping container ${containerName}`);
1741
1731
  const r = execa("docker", ["stop", containerName]);
1742
- pipeToConsole(r, (alias ?? containerName) + " (stop)");
1732
+ pipeToConsole(r, `${alias ?? containerName} (stop)`);
1743
1733
  try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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
- import { Config } from "../config";
2
- import { Definition } from "../definition";
3
- import { SnykTokenProvider } from "./token";
4
- import { SnykProject } from "./types";
1
+ import type { Config } from "../config";
2
+ import type { Definition } from "../definition";
3
+ import { type SnykTokenProvider } from "./token";
4
+ import type { SnykProject } from "./types";
5
5
  interface SnykServiceProps {
6
6
  config: Config;
7
7
  tokenProvider: SnykTokenProvider;
@@ -1,3 +1,3 @@
1
- import { SnykGitHubRepo, SnykProject } from "./types";
1
+ import type { SnykGitHubRepo, SnykProject } from "./types";
2
2
  export declare function getGitHubRepo(snykProject: SnykProject): SnykGitHubRepo | undefined;
3
3
  export declare function getGitHubRepoId(repo: SnykGitHubRepo | undefined): string | undefined;
@@ -1,3 +1,3 @@
1
1
  export { createSonarCloudService, SonarCloudService } from "./service";
2
- export { SonarCloudTokenCliProvider } from "./token";
3
2
  export type { SonarCloudTokenProvider } from "./token";
3
+ export { SonarCloudTokenCliProvider } from "./token";
@@ -1,5 +1,5 @@
1
- import { Config } from "../config";
2
- import { SonarCloudTokenProvider } from "./token";
1
+ import type { Config } from "../config";
2
+ import { type SonarCloudTokenProvider } from "./token";
3
3
  interface SonarCloudServiceProps {
4
4
  config: Config;
5
5
  tokenProvider: SonarCloudTokenProvider;
@@ -1,5 +1,5 @@
1
1
  import { type Subprocess } from "execa";
2
- import { TestExecutor } from "./executor";
2
+ import type { TestExecutor } from "./executor";
3
3
  export interface Container {
4
4
  id: string;
5
5
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capraconsulting/cals-cli",
3
- "version": "3.11.3",
3
+ "version": "3.12.0",
4
4
  "description": "CLI for repeatable tasks in CALS",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -9,10 +9,10 @@
9
9
  "build": "rollup -c",
10
10
  "test": "vitest run --coverage src",
11
11
  "test:watch": "vitest --coverage src",
12
- "lint": "eslint .",
13
- "lint:fix": "eslint --fix .",
12
+ "lint": "biome check",
13
+ "lint:fix": "biome check --fix",
14
+ "format": "biome format --write",
14
15
  "prepack": "./scripts/build-and-verify.sh",
15
- "prettier": "prettier --config .prettierrc --write .",
16
16
  "semantic-release": "semantic-release",
17
17
  "watch": "rollup -c -w"
18
18
  },
@@ -23,7 +23,7 @@
23
23
  "cals": "lib/cals-cli.mjs"
24
24
  },
25
25
  "dependencies": {
26
- "@octokit/rest": "^21.1.1",
26
+ "@octokit/rest": "^22.0.0",
27
27
  "@types/dateformat": "5.0.3",
28
28
  "ajv": "^8.11.0",
29
29
  "cachedir": "^2.4.0",
@@ -43,43 +43,36 @@
43
43
  },
44
44
  "overrides": {
45
45
  "semantic-release": {
46
- "@semantic-release/npm": "12.0.1"
46
+ "@semantic-release/npm": "12.0.2"
47
47
  }
48
48
  },
49
49
  "devDependencies": {
50
+ "@biomejs/biome": "2.0.6",
50
51
  "@commitlint/cli": "19.8.1",
51
52
  "@commitlint/config-conventional": "19.8.1",
52
- "@eslint/eslintrc": "^3.2.0",
53
- "@eslint/js": "^9.16.0",
54
53
  "@octokit/types": "14.1.0",
55
54
  "@rollup/plugin-alias": "5.1.1",
56
55
  "@rollup/plugin-json": "6.1.0",
57
56
  "@rollup/plugin-replace": "6.0.2",
58
57
  "@types/js-yaml": "4.0.9",
59
58
  "@types/lodash-es": "4.17.12",
60
- "@types/node": "22.15.30",
59
+ "@types/node": "24.0.8",
61
60
  "@types/node-fetch": "2.6.12",
62
61
  "@types/read": "0.0.32",
63
62
  "@types/semver": "7.7.0",
64
63
  "@types/sprintf-js": "1.1.4",
65
64
  "@types/yargs": "17.0.33",
66
- "@typescript-eslint/eslint-plugin": "8.33.1",
67
- "@typescript-eslint/parser": "8.33.1",
68
- "@vitest/coverage-v8": "3.2.2",
69
- "@vitest/ui": "3.2.2",
65
+ "@vitest/coverage-v8": "3.2.4",
66
+ "@vitest/ui": "3.2.4",
70
67
  "dateformat": "5.0.3",
71
- "eslint": "9.28.0",
72
- "eslint-config-prettier": "10.1.5",
73
- "eslint-plugin-prettier": "5.4.1",
74
68
  "husky": "9.1.7",
75
- "prettier": "3.5.3",
76
- "rollup": "4.42.0",
69
+ "rollup": "4.44.1",
77
70
  "rollup-plugin-typescript2": "0.36.0",
78
- "semantic-release": "24.2.5",
79
- "tsx": "4.19.4",
71
+ "semantic-release": "24.2.6",
72
+ "tsx": "4.20.3",
80
73
  "typescript": "5.8.3",
81
74
  "typescript-json-schema": "0.65.1",
82
- "vitest": "3.2.2"
75
+ "vitest": "3.2.4"
83
76
  },
84
77
  "files": [
85
78
  "lib"