socket 1.0.60 → 1.0.62

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/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ var debug = require('../external/@socketsecurity/registry/lib/debug');
7
7
  var logger = require('../external/@socketsecurity/registry/lib/logger');
8
8
  var utils = require('./utils.js');
9
9
  var fs = require('node:fs/promises');
10
- var Module = require('node:module');
10
+ var require$$5 = require('node:module');
11
11
  var constants = require('./constants.js');
12
12
  var prompts = require('../external/@socketsecurity/registry/lib/prompts');
13
13
  var fs$1 = require('node:fs');
@@ -51,7 +51,7 @@ async function fetchRepoAnalyticsData(repo, time) {
51
51
 
52
52
  // Note: Widgets does not seem to actually work as code :'(
53
53
 
54
- const require$5 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
54
+ const require$5 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
55
55
  const METRICS = ['total_critical_alerts', 'total_high_alerts', 'total_medium_alerts', 'total_low_alerts', 'total_critical_added', 'total_medium_added', 'total_low_added', 'total_high_added', 'total_critical_prevented', 'total_high_prevented', 'total_medium_prevented', 'total_low_prevented'];
56
56
 
57
57
  // Note: This maps `new Date(date).getMonth()` to English three letters
@@ -471,7 +471,7 @@ async function fetchAuditLog({
471
471
  }), `audit log for ${orgSlug}`);
472
472
  }
473
473
 
474
- const require$4 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
474
+ const require$4 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
475
475
  const {
476
476
  REDACTED
477
477
  } = constants;
@@ -5803,7 +5803,7 @@ async function run$A(argv, importMeta, {
5803
5803
  test: cli.input.length <= 1,
5804
5804
  message: 'Can only accept one DIR (make sure to escape spaces!)',
5805
5805
  pass: 'ok',
5806
- fail: 'received ' + cli.input.length
5806
+ fail: `received ${cli.input.length}`
5807
5807
  }, {
5808
5808
  nook: true,
5809
5809
  test: !json || !markdown,
@@ -6833,7 +6833,7 @@ async function run$v(argv, importMeta, {
6833
6833
  });
6834
6834
  }
6835
6835
 
6836
- const require$3 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
6836
+ const require$3 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
6837
6837
  const {
6838
6838
  DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$u
6839
6839
  } = constants;
@@ -6886,7 +6886,7 @@ async function run$u(argv, importMeta, {
6886
6886
  await shadowBin('npm', argv);
6887
6887
  }
6888
6888
 
6889
- const require$2 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
6889
+ const require$2 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
6890
6890
  const {
6891
6891
  DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$t
6892
6892
  } = constants;
@@ -7387,7 +7387,6 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
7387
7387
  } else {
7388
7388
  overridesDataObjects.push(getOverridesDataNpm(pkgEnvDetails), getOverridesDataYarnClassic(pkgEnvDetails));
7389
7389
  }
7390
- spinner?.setText(`Adding overrides to ${workspace}...`);
7391
7390
  const depAliasMap = new Map();
7392
7391
  const depEntries = getDependencyEntries(pkgEnvDetails);
7393
7392
  const manifestEntries = manifestNpmOverrides.filter(({
@@ -7396,6 +7395,7 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
7396
7395
  // Roughly check Node range as semver.coerce will strip leading
7397
7396
  // v's, carets (^), comparators (<,<=,>,>=,=), and tildes (~).
7398
7397
  vendor.semverExports.coerce(data.engines.node), pkgEnvDetails.pkgRequirements.node));
7398
+ let loggedAddingText = false;
7399
7399
 
7400
7400
  // Chunk package names to process them in parallel 3 at a time.
7401
7401
  await require$$7.pEach(manifestEntries, 3, async ({
@@ -7434,6 +7434,10 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
7434
7434
  if (!isWorkspaceRoot) {
7435
7435
  state.addedInWorkspaces.add(workspace);
7436
7436
  }
7437
+ if (!loggedAddingText) {
7438
+ spinner?.setText(`Adding overrides to ${workspace}...`);
7439
+ loggedAddingText = true;
7440
+ }
7437
7441
  }
7438
7442
  depAliasMap.set(origPkgName, thisSpec);
7439
7443
  }
@@ -7491,6 +7495,10 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
7491
7495
  overrides[origPkgName] = newSpec;
7492
7496
  const addedOrUpdated = overrideExists ? 'updated' : 'added';
7493
7497
  state[addedOrUpdated].add(sockRegPkgName);
7498
+ if (!loggedAddingText) {
7499
+ spinner?.setText(`Adding overrides to ${workspace}...`);
7500
+ loggedAddingText = true;
7501
+ }
7494
7502
  }
7495
7503
  }
7496
7504
  });
@@ -13234,7 +13242,7 @@ async function fetchThreatFeed({
13234
13242
  return await utils.queryApiSafeJson(`orgs/${orgSlug}/threat-feed?${queryParams}`, 'the Threat Feed data');
13235
13243
  }
13236
13244
 
13237
- const require$1 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
13245
+ const require$1 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
13238
13246
  async function outputThreatFeed(result, outputKind) {
13239
13247
  if (!result.ok) {
13240
13248
  process.exitCode = result.code ?? 1;
@@ -14212,5 +14220,5 @@ void (async () => {
14212
14220
  await utils.captureException(e);
14213
14221
  }
14214
14222
  })();
14215
- //# debugId=3e924cea-502a-45fa-add8-c7154304d157
14223
+ //# debugId=b7b44255-1457-4053-b165-219fa42c4a9
14216
14224
  //# sourceMappingURL=cli.js.map