@coana-tech/cli 14.12.6 → 14.12.7

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/cli.mjs CHANGED
@@ -197989,12 +197989,14 @@ async function computeSocketFactArtifacts(rootDir, relativeManifestFilePaths) {
197989
197989
  return void 0;
197990
197990
  }
197991
197991
  }
197992
- async function registerAutofixOrUpgradePurlRun(manifestsTarHash, repositoryName, options, cliCommand) {
197992
+ async function registerAutofixOrUpgradePurlRun(manifestsTarHash, options, cliCommand) {
197993
197993
  try {
197994
197994
  const url2 = getSocketApiUrl(`orgs/${process.env.SOCKET_ORG_SLUG}/fixes/register-autofix-or-upgrade-cli-run`);
197995
197995
  const data2 = {
197996
197996
  manifestsTarHash,
197997
- repositoryName,
197997
+ // disabling rule to also catch case where process.env.SOCKET_REPO_NAME is the empty string.
197998
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
197999
+ repositoryName: process.env.SOCKET_REPO_NAME || "unknown-repo",
197998
198000
  options,
197999
198001
  cliCommand
198000
198002
  };
@@ -225602,7 +225604,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
225602
225604
  }
225603
225605
 
225604
225606
  // dist/version.js
225605
- var version2 = "14.12.6";
225607
+ var version2 = "14.12.7";
225606
225608
 
225607
225609
  // dist/cli-core.js
225608
225610
  var { mapValues, omit, partition, pick } = import_lodash15.default;
@@ -226293,7 +226295,7 @@ async function upgradePurl(path2, upgrades, options, logFile, cliFixRunId) {
226293
226295
  logger.silent = options.silent;
226294
226296
  let cliRunId = cliFixRunId;
226295
226297
  if (!cliRunId && options.manifestsTarHash) {
226296
- cliRunId = await getSocketAPI().registerAutofixOrUpgradePurlRun(options.manifestsTarHash, path2, options, "upgrade-purls");
226298
+ cliRunId = await getSocketAPI().registerAutofixOrUpgradePurlRun(options.manifestsTarHash, options, "upgrade-purls");
226297
226299
  }
226298
226300
  const upgradePurlRunId = cliRunId && await getSocketAPI().registerUpgradePurlRun(cliRunId, upgrades);
226299
226301
  Spinner.instance({ text: "Running Coana Upgrade Purl CLI", isSilent: options.silent }).start();
@@ -226423,7 +226425,7 @@ ${vulnerabilityFixes.map((fix) => ` ${fix.dependencyName} from ${fix.currentVers
226423
226425
 
226424
226426
  // dist/cli-compute-fixes-and-upgrade-purls.js
226425
226427
  async function computeFixesAndUpgradePurls(path2, options, logFile) {
226426
- const autofixRunId = options.manifestsTarHash && await getSocketAPI().registerAutofixOrUpgradePurlRun(options.manifestsTarHash, path2, options, "autofix");
226428
+ const autofixRunId = options.manifestsTarHash && await getSocketAPI().registerAutofixOrUpgradePurlRun(options.manifestsTarHash, options, "autofix");
226427
226429
  const { artifacts, ghsaToVulnerableArtifactIds } = await computeInputForComputingFixes(path2, options);
226428
226430
  if (Object.keys(ghsaToVulnerableArtifactIds).length === 0) {
226429
226431
  logger.info("No vulnerabilities to compute fixes for");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coana-tech/cli",
3
- "version": "14.12.6",
3
+ "version": "14.12.7",
4
4
  "description": "Coana CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -73399,12 +73399,14 @@ async function getLatestBucketsSocket(subprojectPath, workspacePath) {
73399
73399
  return void 0;
73400
73400
  }
73401
73401
  }
73402
- async function registerAutofixOrUpgradePurlRun(manifestsTarHash, repositoryName, options, cliCommand) {
73402
+ async function registerAutofixOrUpgradePurlRun(manifestsTarHash, options, cliCommand) {
73403
73403
  try {
73404
73404
  const url2 = getSocketApiUrl(`orgs/${process.env.SOCKET_ORG_SLUG}/fixes/register-autofix-or-upgrade-cli-run`);
73405
73405
  const data2 = {
73406
73406
  manifestsTarHash,
73407
- repositoryName,
73407
+ // disabling rule to also catch case where process.env.SOCKET_REPO_NAME is the empty string.
73408
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
73409
+ repositoryName: process.env.SOCKET_REPO_NAME || "unknown-repo",
73408
73410
  options,
73409
73411
  cliCommand
73410
73412
  };