@socketsecurity/cli-with-sentry 0.15.43 → 0.15.45

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 (58) hide show
  1. package/dist/cli.js +617 -467
  2. package/dist/cli.js.map +1 -1
  3. package/dist/constants.js +3 -3
  4. package/dist/constants.js.map +1 -1
  5. package/dist/shadow-inject.js +10 -3
  6. package/dist/shadow-inject.js.map +1 -1
  7. package/dist/types/commands/fix/git.d.mts +12 -5
  8. package/dist/types/commands/fix/git.d.mts.map +1 -1
  9. package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
  10. package/dist/types/commands/fix/open-pr.d.mts +2 -4
  11. package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
  12. package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
  13. package/dist/types/commands/package/output-purls-shallow-score.d.mts +2 -2
  14. package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +1 -1
  15. package/dist/types/commands/scan/cmd-scan-reach.d.mts +10 -0
  16. package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +1 -0
  17. package/dist/types/commands/scan/cmd-scan.d.mts.map +1 -1
  18. package/dist/types/commands/scan/fetch-report-data.d.mts +2 -2
  19. package/dist/types/commands/scan/fetch-report-data.d.mts.map +1 -1
  20. package/dist/types/commands/scan/fetch-scan.d.mts +2 -2
  21. package/dist/types/commands/scan/fetch-scan.d.mts.map +1 -1
  22. package/dist/types/commands/scan/generate-report.d.mts +2 -2
  23. package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
  24. package/dist/types/commands/scan/handle-reach-scan.d.mts +3 -0
  25. package/dist/types/commands/scan/handle-reach-scan.d.mts.map +1 -0
  26. package/dist/types/commands/scan/output-scan-reach.d.mts +3 -0
  27. package/dist/types/commands/scan/output-scan-reach.d.mts.map +1 -0
  28. package/dist/types/commands/scan/output-scan-report.d.mts +2 -2
  29. package/dist/types/commands/scan/output-scan-report.d.mts.map +1 -1
  30. package/dist/types/commands/scan/output-scan-view.d.mts +2 -2
  31. package/dist/types/commands/scan/output-scan-view.d.mts.map +1 -1
  32. package/dist/types/commands/scan/scan-reachability.d.mts +3 -0
  33. package/dist/types/commands/scan/scan-reachability.d.mts.map +1 -0
  34. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +1 -1
  35. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +1 -1
  36. package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +1 -1
  37. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +1 -1
  38. package/dist/types/shadow/npm/arborist-helpers.d.mts +2 -2
  39. package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
  40. package/dist/types/utils/alert/artifact.d.mts +1 -0
  41. package/dist/types/utils/alert/artifact.d.mts.map +1 -1
  42. package/dist/types/utils/alerts-map.d.mts +3 -3
  43. package/dist/types/utils/alerts-map.d.mts.map +1 -1
  44. package/dist/types/utils/api.d.mts.map +1 -1
  45. package/dist/types/utils/fs.d.mts.map +1 -1
  46. package/dist/types/utils/glob.d.mts.map +1 -1
  47. package/dist/types/utils/purl.d.mts +95 -1
  48. package/dist/types/utils/purl.d.mts.map +1 -1
  49. package/dist/types/utils/socket-package-alert.d.mts +7 -6
  50. package/dist/types/utils/socket-package-alert.d.mts.map +1 -1
  51. package/dist/types/utils/socket-url.d.mts +4 -6
  52. package/dist/types/utils/socket-url.d.mts.map +1 -1
  53. package/dist/types/utils/spec.d.mts +2 -1
  54. package/dist/types/utils/spec.d.mts.map +1 -1
  55. package/dist/utils.js +167 -149
  56. package/dist/utils.js.map +1 -1
  57. package/dist/vendor.js +11381 -7009
  58. package/package.json +10 -10
package/dist/cli.js CHANGED
@@ -303,9 +303,9 @@ async function handleAnalytics({
303
303
  }
304
304
 
305
305
  const {
306
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$N
306
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$O
307
307
  } = constants;
308
- const config$S = {
308
+ const config$T = {
309
309
  commandName: 'analytics',
310
310
  description: `Look up analytics data`,
311
311
  hidden: false,
@@ -367,16 +367,16 @@ const config$S = {
367
367
  .replace(/\n(?: *\n)+/g, '\n\n')
368
368
  };
369
369
  const cmdAnalytics = {
370
- description: config$S.description,
371
- hidden: config$S.hidden,
372
- run: run$S
370
+ description: config$T.description,
371
+ hidden: config$T.hidden,
372
+ run: run$T
373
373
  };
374
- async function run$S(argv, importMeta, {
374
+ async function run$T(argv, importMeta, {
375
375
  parentName
376
376
  }) {
377
377
  const cli = utils.meowOrExit({
378
378
  argv,
379
- config: config$S,
379
+ config: config$T,
380
380
  importMeta,
381
381
  parentName
382
382
  });
@@ -480,7 +480,7 @@ async function run$S(argv, importMeta, {
480
480
  return;
481
481
  }
482
482
  if (cli.flags['dryRun']) {
483
- logger.logger.log(DRY_RUN_BAILING_NOW$N);
483
+ logger.logger.log(DRY_RUN_BAILING_NOW$O);
484
484
  return;
485
485
  }
486
486
  return await handleAnalytics({
@@ -660,10 +660,10 @@ async function handleAuditLog({
660
660
  }
661
661
 
662
662
  const {
663
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$M,
663
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$N,
664
664
  SOCKET_WEBSITE_URL: SOCKET_WEBSITE_URL$3
665
665
  } = constants;
666
- const config$R = {
666
+ const config$S = {
667
667
  commandName: 'audit-log',
668
668
  description: 'Look up the audit log for an organization',
669
669
  hidden: false,
@@ -717,16 +717,16 @@ const config$R = {
717
717
  `
718
718
  };
719
719
  const cmdAuditLog = {
720
- description: config$R.description,
721
- hidden: config$R.hidden,
722
- run: run$R
720
+ description: config$S.description,
721
+ hidden: config$S.hidden,
722
+ run: run$S
723
723
  };
724
- async function run$R(argv, importMeta, {
724
+ async function run$S(argv, importMeta, {
725
725
  parentName
726
726
  }) {
727
727
  const cli = utils.meowOrExit({
728
728
  argv,
729
- config: config$R,
729
+ config: config$S,
730
730
  importMeta,
731
731
  parentName
732
732
  });
@@ -767,7 +767,7 @@ async function run$R(argv, importMeta, {
767
767
  return;
768
768
  }
769
769
  if (cli.flags['dryRun']) {
770
- logger.logger.log(DRY_RUN_BAILING_NOW$M);
770
+ logger.logger.log(DRY_RUN_BAILING_NOW$N);
771
771
  return;
772
772
  }
773
773
  await handleAuditLog({
@@ -780,14 +780,14 @@ async function run$R(argv, importMeta, {
780
780
  }
781
781
 
782
782
  const {
783
- NPM: NPM$b,
783
+ NPM: NPM$9,
784
784
  NPX: NPX$1,
785
785
  PACKAGE_LOCK_JSON,
786
786
  PNPM: PNPM$8,
787
787
  YARN,
788
788
  YARN_LOCK
789
789
  } = constants;
790
- const nodejsPlatformTypes = new Set(['javascript', 'js', 'nodejs', NPM$b, PNPM$8, 'ts', 'tsx', 'typescript']);
790
+ const nodejsPlatformTypes = new Set(['javascript', 'js', 'nodejs', NPM$9, PNPM$8, 'ts', 'tsx', 'typescript']);
791
791
  function argvToArray(argv) {
792
792
  if (argv['help']) {
793
793
  return ['--help'];
@@ -829,7 +829,7 @@ async function runCdxgen(yargvWithYes) {
829
829
  const yesArgs = yes ? ['--yes'] : [];
830
830
  if (yargv.type !== YARN && nodejsPlatformTypes.has(yargv.type) && fs$1.existsSync(`./${YARN_LOCK}`)) {
831
831
  if (fs$1.existsSync(`./${PACKAGE_LOCK_JSON}`)) {
832
- yargv.type = NPM$b;
832
+ yargv.type = NPM$9;
833
833
  } else {
834
834
  // Use synp to create a package-lock.json from the yarn.lock,
835
835
  // based on the node_modules folder, for a more accurate SBOM.
@@ -837,7 +837,7 @@ async function runCdxgen(yargvWithYes) {
837
837
  await shadowBin(NPX$1, [...yesArgs,
838
838
  // Lazily access constants.ENV.INLINED_SYNP_VERSION.
839
839
  `synp@${constants.ENV.INLINED_SYNP_VERSION}`, '--source-file', `./${YARN_LOCK}`]);
840
- yargv.type = NPM$b;
840
+ yargv.type = NPM$9;
841
841
  cleanupPackageLock = true;
842
842
  } catch {}
843
843
  }
@@ -857,7 +857,7 @@ async function runCdxgen(yargvWithYes) {
857
857
  }
858
858
 
859
859
  const {
860
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$L
860
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$M
861
861
  } = constants;
862
862
 
863
863
  // TODO: Convert yargs to meow.
@@ -1059,7 +1059,7 @@ const yargsConfig = {
1059
1059
  'usages-slices-file' // hidden
1060
1060
  ]
1061
1061
  };
1062
- const config$Q = {
1062
+ const config$R = {
1063
1063
  commandName: 'cdxgen',
1064
1064
  description: 'Create an SBOM with CycloneDX generator (cdxgen)',
1065
1065
  hidden: false,
@@ -1069,17 +1069,17 @@ const config$Q = {
1069
1069
  help: () => ''
1070
1070
  };
1071
1071
  const cmdManifestCdxgen = {
1072
- description: config$Q.description,
1073
- hidden: config$Q.hidden,
1074
- run: run$Q
1072
+ description: config$R.description,
1073
+ hidden: config$R.hidden,
1074
+ run: run$R
1075
1075
  };
1076
- async function run$Q(argv, importMeta, {
1076
+ async function run$R(argv, importMeta, {
1077
1077
  parentName
1078
1078
  }) {
1079
1079
  const cli = utils.meowOrExit({
1080
1080
  // Don't let meow take over --help.
1081
1081
  argv: argv.filter(a => !utils.isHelpFlag(a)),
1082
- config: config$Q,
1082
+ config: config$R,
1083
1083
  importMeta,
1084
1084
  parentName
1085
1085
  });
@@ -1101,7 +1101,7 @@ async function run$Q(argv, importMeta, {
1101
1101
  return;
1102
1102
  }
1103
1103
  if (cli.flags['dryRun']) {
1104
- logger.logger.log(DRY_RUN_BAILING_NOW$L);
1104
+ logger.logger.log(DRY_RUN_BAILING_NOW$M);
1105
1105
  return;
1106
1106
  }
1107
1107
 
@@ -1130,15 +1130,15 @@ async function handleCdxgen(argv, importMeta, {
1130
1130
  });
1131
1131
  }
1132
1132
 
1133
- const config$P = {
1133
+ const config$Q = {
1134
1134
  description: 'Create an SBOM with CycloneDX generator (cdxgen)',
1135
1135
  hidden: true};
1136
1136
  const cmdCdxgen = {
1137
- description: config$P.description,
1138
- hidden: config$P.hidden,
1139
- run: run$P
1137
+ description: config$Q.description,
1138
+ hidden: config$Q.hidden,
1139
+ run: run$Q
1140
1140
  };
1141
- async function run$P(argv, importMeta, {
1141
+ async function run$Q(argv, importMeta, {
1142
1142
  parentName
1143
1143
  }) {
1144
1144
  logger.logger.warn('Warning: The `socket cdxgen` command moved to `socket manifest cdxgen` and will be removed as a toplevel command in the next major bump.');
@@ -2371,9 +2371,9 @@ async function handleCI(autoManifest) {
2371
2371
  }
2372
2372
 
2373
2373
  const {
2374
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$K
2374
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$L
2375
2375
  } = constants;
2376
- const config$O = {
2376
+ const config$P = {
2377
2377
  commandName: 'ci',
2378
2378
  description: 'Create a new scan and report whether it passes your security policy',
2379
2379
  hidden: true,
@@ -2391,7 +2391,7 @@ const config$O = {
2391
2391
  $ ${parentName}
2392
2392
 
2393
2393
  Options
2394
- ${utils.getFlagListOutput(config$O.flags, 6)}
2394
+ ${utils.getFlagListOutput(config$P.flags, 6)}
2395
2395
 
2396
2396
  This command is intended to use in CI runs to allow automated systems to
2397
2397
  accept or reject a current build. When the scan does not pass your security
@@ -2406,21 +2406,21 @@ const config$O = {
2406
2406
  `
2407
2407
  };
2408
2408
  const cmdCI = {
2409
- description: config$O.description,
2410
- hidden: config$O.hidden,
2411
- run: run$O
2409
+ description: config$P.description,
2410
+ hidden: config$P.hidden,
2411
+ run: run$P
2412
2412
  };
2413
- async function run$O(argv, importMeta, {
2413
+ async function run$P(argv, importMeta, {
2414
2414
  parentName
2415
2415
  }) {
2416
2416
  const cli = utils.meowOrExit({
2417
2417
  argv,
2418
- config: config$O,
2418
+ config: config$P,
2419
2419
  importMeta,
2420
2420
  parentName
2421
2421
  });
2422
2422
  if (cli.flags['dryRun']) {
2423
- logger.logger.log(DRY_RUN_BAILING_NOW$K);
2423
+ logger.logger.log(DRY_RUN_BAILING_NOW$L);
2424
2424
  return;
2425
2425
  }
2426
2426
  await handleCI(Boolean(cli.flags['autoManifest']));
@@ -2664,9 +2664,9 @@ async function handleConfigAuto({
2664
2664
  }
2665
2665
 
2666
2666
  const {
2667
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$J
2667
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$K
2668
2668
  } = constants;
2669
- const config$N = {
2669
+ const config$O = {
2670
2670
  commandName: 'auto',
2671
2671
  description: 'Automatically discover and set the correct value config item',
2672
2672
  hidden: false,
@@ -2695,16 +2695,16 @@ ${Array.from(utils.supportedConfigKeys.entries()).map(([key, desc]) => ` - $
2695
2695
  `
2696
2696
  };
2697
2697
  const cmdConfigAuto = {
2698
- description: config$N.description,
2699
- hidden: config$N.hidden,
2700
- run: run$N
2698
+ description: config$O.description,
2699
+ hidden: config$O.hidden,
2700
+ run: run$O
2701
2701
  };
2702
- async function run$N(argv, importMeta, {
2702
+ async function run$O(argv, importMeta, {
2703
2703
  parentName
2704
2704
  }) {
2705
2705
  const cli = utils.meowOrExit({
2706
2706
  argv,
2707
- config: config$N,
2707
+ config: config$O,
2708
2708
  importMeta,
2709
2709
  parentName
2710
2710
  });
@@ -2730,7 +2730,7 @@ async function run$N(argv, importMeta, {
2730
2730
  return;
2731
2731
  }
2732
2732
  if (cli.flags['dryRun']) {
2733
- logger.logger.log(DRY_RUN_BAILING_NOW$J);
2733
+ logger.logger.log(DRY_RUN_BAILING_NOW$K);
2734
2734
  return;
2735
2735
  }
2736
2736
  await handleConfigAuto({
@@ -2778,9 +2778,9 @@ async function handleConfigGet({
2778
2778
  }
2779
2779
 
2780
2780
  const {
2781
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$I
2781
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$J
2782
2782
  } = constants;
2783
- const config$M = {
2783
+ const config$N = {
2784
2784
  commandName: 'get',
2785
2785
  description: 'Get the value of a local CLI config item',
2786
2786
  hidden: false,
@@ -2804,16 +2804,16 @@ ${Array.from(utils.supportedConfigKeys.entries()).map(([key, desc]) => ` - $
2804
2804
  `
2805
2805
  };
2806
2806
  const cmdConfigGet = {
2807
- description: config$M.description,
2808
- hidden: config$M.hidden,
2809
- run: run$M
2807
+ description: config$N.description,
2808
+ hidden: config$N.hidden,
2809
+ run: run$N
2810
2810
  };
2811
- async function run$M(argv, importMeta, {
2811
+ async function run$N(argv, importMeta, {
2812
2812
  parentName
2813
2813
  }) {
2814
2814
  const cli = utils.meowOrExit({
2815
2815
  argv,
2816
- config: config$M,
2816
+ config: config$N,
2817
2817
  importMeta,
2818
2818
  parentName
2819
2819
  });
@@ -2839,7 +2839,7 @@ async function run$M(argv, importMeta, {
2839
2839
  return;
2840
2840
  }
2841
2841
  if (cli.flags['dryRun']) {
2842
- logger.logger.log(DRY_RUN_BAILING_NOW$I);
2842
+ logger.logger.log(DRY_RUN_BAILING_NOW$J);
2843
2843
  return;
2844
2844
  }
2845
2845
  await handleConfigGet({
@@ -2916,9 +2916,9 @@ async function outputConfigList({
2916
2916
  }
2917
2917
 
2918
2918
  const {
2919
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$H
2919
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$I
2920
2920
  } = constants;
2921
- const config$L = {
2921
+ const config$M = {
2922
2922
  commandName: 'list',
2923
2923
  description: 'Show all local CLI config items and their values',
2924
2924
  hidden: false,
@@ -2947,16 +2947,16 @@ ${Array.from(utils.supportedConfigKeys.entries()).map(([key, desc]) => ` - $
2947
2947
  `
2948
2948
  };
2949
2949
  const cmdConfigList = {
2950
- description: config$L.description,
2951
- hidden: config$L.hidden,
2952
- run: run$L
2950
+ description: config$M.description,
2951
+ hidden: config$M.hidden,
2952
+ run: run$M
2953
2953
  };
2954
- async function run$L(argv, importMeta, {
2954
+ async function run$M(argv, importMeta, {
2955
2955
  parentName
2956
2956
  }) {
2957
2957
  const cli = utils.meowOrExit({
2958
2958
  argv,
2959
- config: config$L,
2959
+ config: config$M,
2960
2960
  importMeta,
2961
2961
  parentName
2962
2962
  });
@@ -2977,7 +2977,7 @@ async function run$L(argv, importMeta, {
2977
2977
  return;
2978
2978
  }
2979
2979
  if (cli.flags['dryRun']) {
2980
- logger.logger.log(DRY_RUN_BAILING_NOW$H);
2980
+ logger.logger.log(DRY_RUN_BAILING_NOW$I);
2981
2981
  return;
2982
2982
  }
2983
2983
  await outputConfigList({
@@ -3026,9 +3026,9 @@ async function handleConfigSet({
3026
3026
  }
3027
3027
 
3028
3028
  const {
3029
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$G
3029
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$H
3030
3030
  } = constants;
3031
- const config$K = {
3031
+ const config$L = {
3032
3032
  commandName: 'set',
3033
3033
  description: 'Update the value of a local CLI config item',
3034
3034
  hidden: false,
@@ -3057,16 +3057,16 @@ ${Array.from(utils.supportedConfigKeys.entries()).map(([key, desc]) => ` - $
3057
3057
  `
3058
3058
  };
3059
3059
  const cmdConfigSet = {
3060
- description: config$K.description,
3061
- hidden: config$K.hidden,
3062
- run: run$K
3060
+ description: config$L.description,
3061
+ hidden: config$L.hidden,
3062
+ run: run$L
3063
3063
  };
3064
- async function run$K(argv, importMeta, {
3064
+ async function run$L(argv, importMeta, {
3065
3065
  parentName
3066
3066
  }) {
3067
3067
  const cli = utils.meowOrExit({
3068
3068
  argv,
3069
- config: config$K,
3069
+ config: config$L,
3070
3070
  importMeta,
3071
3071
  parentName
3072
3072
  });
@@ -3099,7 +3099,7 @@ async function run$K(argv, importMeta, {
3099
3099
  return;
3100
3100
  }
3101
3101
  if (cli.flags['dryRun']) {
3102
- logger.logger.log(DRY_RUN_BAILING_NOW$G);
3102
+ logger.logger.log(DRY_RUN_BAILING_NOW$H);
3103
3103
  return;
3104
3104
  }
3105
3105
  await handleConfigSet({
@@ -3148,9 +3148,9 @@ async function handleConfigUnset({
3148
3148
  }
3149
3149
 
3150
3150
  const {
3151
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$F
3151
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$G
3152
3152
  } = constants;
3153
- const config$J = {
3153
+ const config$K = {
3154
3154
  commandName: 'unset',
3155
3155
  description: 'Clear the value of a local CLI config item',
3156
3156
  hidden: false,
@@ -3174,16 +3174,16 @@ ${Array.from(utils.supportedConfigKeys.entries()).map(([key, desc]) => ` - $
3174
3174
  `
3175
3175
  };
3176
3176
  const cmdConfigUnset = {
3177
- description: config$J.description,
3178
- hidden: config$J.hidden,
3179
- run: run$J
3177
+ description: config$K.description,
3178
+ hidden: config$K.hidden,
3179
+ run: run$K
3180
3180
  };
3181
- async function run$J(argv, importMeta, {
3181
+ async function run$K(argv, importMeta, {
3182
3182
  parentName
3183
3183
  }) {
3184
3184
  const cli = utils.meowOrExit({
3185
3185
  argv,
3186
- config: config$J,
3186
+ config: config$K,
3187
3187
  importMeta,
3188
3188
  parentName
3189
3189
  });
@@ -3209,7 +3209,7 @@ async function run$J(argv, importMeta, {
3209
3209
  return;
3210
3210
  }
3211
3211
  if (cli.flags['dryRun']) {
3212
- logger.logger.log(DRY_RUN_BAILING_NOW$F);
3212
+ logger.logger.log(DRY_RUN_BAILING_NOW$G);
3213
3213
  return;
3214
3214
  }
3215
3215
  await handleConfigUnset({
@@ -3318,9 +3318,9 @@ async function handleDependencies({
3318
3318
  }
3319
3319
 
3320
3320
  const {
3321
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$E
3321
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$F
3322
3322
  } = constants;
3323
- const config$I = {
3323
+ const config$J = {
3324
3324
  commandName: 'dependencies',
3325
3325
  description: 'Search for any dependency that is being used in your organization',
3326
3326
  hidden: false,
@@ -3356,16 +3356,16 @@ const config$I = {
3356
3356
  `
3357
3357
  };
3358
3358
  const cmdScanCreate$1 = {
3359
- description: config$I.description,
3360
- hidden: config$I.hidden,
3361
- run: run$I
3359
+ description: config$J.description,
3360
+ hidden: config$J.hidden,
3361
+ run: run$J
3362
3362
  };
3363
- async function run$I(argv, importMeta, {
3363
+ async function run$J(argv, importMeta, {
3364
3364
  parentName
3365
3365
  }) {
3366
3366
  const cli = utils.meowOrExit({
3367
3367
  argv,
3368
- config: config$I,
3368
+ config: config$J,
3369
3369
  importMeta,
3370
3370
  parentName
3371
3371
  });
@@ -3394,7 +3394,7 @@ async function run$I(argv, importMeta, {
3394
3394
  return;
3395
3395
  }
3396
3396
  if (cli.flags['dryRun']) {
3397
- logger.logger.log(DRY_RUN_BAILING_NOW$E);
3397
+ logger.logger.log(DRY_RUN_BAILING_NOW$F);
3398
3398
  return;
3399
3399
  }
3400
3400
  await handleDependencies({
@@ -3491,9 +3491,9 @@ async function handleDiffScan$1({
3491
3491
  }
3492
3492
 
3493
3493
  const {
3494
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$D
3494
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$E
3495
3495
  } = constants;
3496
- const config$H = {
3496
+ const config$I = {
3497
3497
  commandName: 'get',
3498
3498
  description: 'Get a diff scan for an organization',
3499
3499
  hidden: false,
@@ -3552,16 +3552,16 @@ const config$H = {
3552
3552
  `
3553
3553
  };
3554
3554
  const cmdDiffScanGet = {
3555
- description: config$H.description,
3556
- hidden: config$H.hidden,
3557
- run: run$H
3555
+ description: config$I.description,
3556
+ hidden: config$I.hidden,
3557
+ run: run$I
3558
3558
  };
3559
- async function run$H(argv, importMeta, {
3559
+ async function run$I(argv, importMeta, {
3560
3560
  parentName
3561
3561
  }) {
3562
3562
  const cli = utils.meowOrExit({
3563
3563
  argv,
3564
- config: config$H,
3564
+ config: config$I,
3565
3565
  importMeta,
3566
3566
  parentName
3567
3567
  });
@@ -3606,7 +3606,7 @@ async function run$H(argv, importMeta, {
3606
3606
  }
3607
3607
  logger.logger.fail('Warning: this command is deprecated in favor of `socket scan diff` and will be removed in the next major bump.');
3608
3608
  if (cli.flags['dryRun']) {
3609
- logger.logger.log(DRY_RUN_BAILING_NOW$D);
3609
+ logger.logger.log(DRY_RUN_BAILING_NOW$E);
3610
3610
  return;
3611
3611
  }
3612
3612
  await handleDiffScan$1({
@@ -3658,7 +3658,7 @@ async function outputFixResult(result, outputKind) {
3658
3658
  }
3659
3659
 
3660
3660
  function formatBranchName(name) {
3661
- return name.replace(/[-_.\\/]+/g, '-').replace(/[^-a-zA-Z0-9]+/g, '').replace(/^-+|-+$/g, '');
3661
+ return name.replace(/[^-a-zA-Z0-9/._-]+/g, '+');
3662
3662
  }
3663
3663
  function getBaseGitBranch() {
3664
3664
  // Lazily access constants.ENV.GITHUB_REF_NAME.
@@ -3667,15 +3667,30 @@ function getBaseGitBranch() {
3667
3667
  // https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#about-the-default-branch
3668
3668
  'main';
3669
3669
  }
3670
- function getSocketBranchName(purl, newVersion, workspace) {
3670
+ function getSocketBranchPurlTypeComponent(purl) {
3671
3671
  const purlObj = utils.getPurlObject(purl);
3672
- const fmtType = formatBranchName(purlObj.type);
3673
- const fmtWorkspace = workspace ? `${formatBranchName(workspace)}` : 'root';
3672
+ return formatBranchName(purlObj.type);
3673
+ }
3674
+ function getSocketBranchFullNameComponent(pkgName) {
3675
+ const purlObj = utils.getPurlObject(typeof pkgName === 'string' && !pkgName.startsWith('pkg:') ? vendor.packageurlJsExports.PackageURL.fromString(`pkg:unknown/${pkgName}`) : pkgName);
3674
3676
  const fmtMaybeNamespace = purlObj.namespace ? `${formatBranchName(purlObj.namespace)}--` : '';
3675
- const fmtFullName = `${fmtMaybeNamespace}${formatBranchName(purlObj.name)}`;
3676
- const fmtVersion = formatBranchName(purlObj.version);
3677
+ return `${fmtMaybeNamespace}${formatBranchName(purlObj.name)}`;
3678
+ }
3679
+ function getSocketBranchPackageVersionComponent(version) {
3680
+ const purlObj = utils.getPurlObject(typeof version === 'string' && !version.startsWith('pkg:') ? vendor.packageurlJsExports.PackageURL.fromString(`pkg:unknown/unknown@${version}`) : version);
3681
+ return formatBranchName(purlObj.version);
3682
+ }
3683
+ function getSocketBranchWorkspaceComponent(workspace) {
3684
+ return workspace ? formatBranchName(workspace) : 'root';
3685
+ }
3686
+ function getSocketBranchName(purl, newVersion, workspace) {
3687
+ const purlObj = utils.getPurlObject(purl);
3688
+ const fmtType = getSocketBranchPurlTypeComponent(purlObj);
3689
+ const fmtWorkspace = getSocketBranchWorkspaceComponent(workspace);
3690
+ const fmtFullName = getSocketBranchFullNameComponent(purlObj);
3691
+ const fmtVersion = getSocketBranchPackageVersionComponent(purlObj.version);
3677
3692
  const fmtNewVersion = formatBranchName(newVersion);
3678
- return `socket/${fmtType}_${fmtWorkspace}_${fmtFullName}_${fmtVersion}_${fmtNewVersion}`;
3693
+ return `socket/${fmtType}/${fmtWorkspace}/${fmtFullName}_${fmtVersion}_${fmtNewVersion}`;
3679
3694
  }
3680
3695
  function getSocketBranchPattern(options) {
3681
3696
  const {
@@ -3693,12 +3708,11 @@ function getSocketBranchPattern(options) {
3693
3708
  const escFullName = purlObj ? `${escMaybeNamespace}${regexps.escapeRegExp(formatBranchName(purlObj.name))}` : '[^_]+';
3694
3709
  const escVersion = purlObj ? regexps.escapeRegExp(formatBranchName(purlObj.version)) : '[^_]+';
3695
3710
  const escNewVersion = newVersion ? regexps.escapeRegExp(formatBranchName(newVersion)) : '[^_]+';
3696
- return new RegExp(`^socket/(${escType})_(${escWorkspace})_(${escFullName})_(${escVersion})_(${escNewVersion})$`);
3711
+ return new RegExp(`^socket/(${escType})/(${escWorkspace})/(${escFullName})_(${escVersion})_(${escNewVersion})$`);
3697
3712
  }
3698
3713
  function createSocketBranchParser(options) {
3699
3714
  const pattern = getSocketBranchPattern(options);
3700
3715
  return function parse(branch) {
3701
- debug.debugFn('pattern', pattern.toString());
3702
3716
  const match = pattern.exec(branch);
3703
3717
  if (!match) {
3704
3718
  return null;
@@ -3711,26 +3725,28 @@ function createSocketBranchParser(options) {
3711
3725
  5: newVersion
3712
3726
  } = match;
3713
3727
  return {
3714
- newVersion,
3715
- purl: utils.getPurlObject(`pkg:${type}/${fullName}@${version}`),
3716
- workspace
3728
+ fullName,
3729
+ newVersion: vendor.semverExports.coerce(newVersion.replaceAll('+', '.'))?.version,
3730
+ type,
3731
+ workspace,
3732
+ version: vendor.semverExports.coerce(version.replaceAll('+', '.'))?.version
3717
3733
  };
3718
3734
  };
3719
3735
  }
3720
3736
  function getSocketPullRequestTitle(purl, newVersion, workspace) {
3721
3737
  const purlObj = utils.getPurlObject(purl);
3722
- const fullName = utils.getPkgFullNameFromPurlObj(purlObj);
3738
+ const fullName = utils.getPkgFullNameFromPurl(purlObj);
3723
3739
  return `Bump ${fullName} from ${purlObj.version} to ${newVersion}${workspace ? ` in ${workspace}` : ''}`;
3724
3740
  }
3725
3741
  function getSocketPullRequestBody(purl, newVersion, workspace) {
3726
3742
  const purlObj = utils.getPurlObject(purl);
3727
- const fullName = utils.getPkgFullNameFromPurlObj(purlObj);
3743
+ const fullName = utils.getPkgFullNameFromPurl(purlObj);
3728
3744
  const pkgOverviewUrl = utils.getSocketDevPackageOverviewUrlFromPurl(purlObj);
3729
3745
  return `Bump [${fullName}](${pkgOverviewUrl}) from ${purlObj.version} to ${newVersion}${workspace ? ` in ${workspace}` : ''}.`;
3730
3746
  }
3731
3747
  function getSocketCommitMessage(purl, newVersion, workspace) {
3732
3748
  const purlObj = utils.getPurlObject(purl);
3733
- const fullName = utils.getPkgFullNameFromPurlObj(purlObj);
3749
+ const fullName = utils.getPkgFullNameFromPurl(purlObj);
3734
3750
  return `socket: Bump ${fullName} from ${purlObj.version} to ${newVersion}${workspace ? ` in ${workspace}` : ''}`;
3735
3751
  }
3736
3752
  async function gitCleanFdx(cwd = process.cwd()) {
@@ -3929,16 +3945,19 @@ async function cleanupOpenPrs(owner, repo, options) {
3929
3945
  __proto__: null,
3930
3946
  ...options
3931
3947
  };
3948
+ const branchParser = createSocketBranchParser(options);
3932
3949
  const octokit = getOctokit();
3933
3950
  const settledMatches = await Promise.allSettled(contextualMatches.map(async ({
3934
3951
  context,
3935
3952
  match
3936
3953
  }) => {
3937
3954
  const {
3938
- newVersion: prToVersion,
3939
3955
  number: prNum
3940
3956
  } = match;
3941
3957
  const prRef = `PR #${prNum}`;
3958
+ const parsedBranch = branchParser(match.headRefName);
3959
+ const prToVersion = parsedBranch?.newVersion;
3960
+
3942
3961
  // Close older PRs.
3943
3962
  if (prToVersion && newVersion && vendor.semverExports.lt(prToVersion, newVersion)) {
3944
3963
  try {
@@ -4021,7 +4040,7 @@ async function enablePrAutoMerge({
4021
4040
  } catch (e) {
4022
4041
  error = e;
4023
4042
  }
4024
- if (error instanceof vendor.GraphqlResponseError && Array.isArray(error.errors)) {
4043
+ if (error instanceof vendor.GraphqlResponseError && Array.isArray(error.errors) && error.errors.length) {
4025
4044
  const details = error.errors.map(({
4026
4045
  message
4027
4046
  }) => message.trim());
@@ -4066,7 +4085,7 @@ async function getOpenSocketPrsWithContext(owner, repo, options_) {
4066
4085
  const checkAuthor = strings.isNonEmptyString(author);
4067
4086
  const octokit = getOctokit();
4068
4087
  const octokitGraphql = getOctokitGraphql();
4069
- const prBranchParser = createSocketBranchParser(options);
4088
+ const branchPattern = getSocketBranchPattern(options);
4070
4089
  const contextualMatches = [];
4071
4090
  try {
4072
4091
  // Optimistically fetch only the first 50 open PRs using GraphQL to minimize
@@ -4100,7 +4119,7 @@ async function getOpenSocketPrsWithContext(owner, repo, options_) {
4100
4119
  const node = nodes[i];
4101
4120
  const login = node.author?.login;
4102
4121
  const matchesAuthor = checkAuthor ? login === author : true;
4103
- const matchesBranch = prBranchParser(node.headRefName);
4122
+ const matchesBranch = branchPattern.test(node.headRefName);
4104
4123
  if (matchesAuthor && matchesBranch) {
4105
4124
  contextualMatches.push({
4106
4125
  context: {
@@ -4113,7 +4132,6 @@ async function getOpenSocketPrsWithContext(owner, repo, options_) {
4113
4132
  },
4114
4133
  match: {
4115
4134
  ...node,
4116
- ...matchesBranch,
4117
4135
  author: login ?? '<unknown>'
4118
4136
  }
4119
4137
  });
@@ -4144,7 +4162,7 @@ async function getOpenSocketPrsWithContext(owner, repo, options_) {
4144
4162
  const pr = allOpenPrs[i];
4145
4163
  const login = pr.user?.login;
4146
4164
  const matchesAuthor = checkAuthor ? login === author : true;
4147
- const matchesBranch = prBranchParser(pr.head.ref);
4165
+ const matchesBranch = branchPattern.test(pr.head.ref);
4148
4166
  if (matchesAuthor && matchesBranch) {
4149
4167
  contextualMatches.push({
4150
4168
  context: {
@@ -4156,7 +4174,6 @@ async function getOpenSocketPrsWithContext(owner, repo, options_) {
4156
4174
  parent: allOpenPrs
4157
4175
  },
4158
4176
  match: {
4159
- ...matchesBranch,
4160
4177
  author: login ?? '<unknown>',
4161
4178
  baseRefName: pr.base.ref,
4162
4179
  headRefName: pr.head.ref,
@@ -4198,7 +4215,7 @@ async function openPr(owner, repo, branch, purl, newVersion, options) {
4198
4215
  } catch (e) {
4199
4216
  let message = `Failed to open pull request`;
4200
4217
  const errors = e instanceof vendor.RequestError ? e.response?.data?.['errors'] : undefined;
4201
- if (Array.isArray(errors)) {
4218
+ if (Array.isArray(errors) && errors.length) {
4202
4219
  const details = errors.map(d => `- ${d.message?.trim() ?? `${d.resource}.${d.field} (${d.code})`}`).join('\n');
4203
4220
  message += `:\n${details}`;
4204
4221
  }
@@ -4252,9 +4269,6 @@ function getAlertsMapOptions(options = {}) {
4252
4269
  };
4253
4270
  }
4254
4271
 
4255
- const {
4256
- NPM: NPM$a
4257
- } = constants;
4258
4272
  async function install$1(arb, options) {
4259
4273
  const {
4260
4274
  cwd = process.cwd()
@@ -4329,10 +4343,10 @@ async function npmFix(pkgEnvDetails, {
4329
4343
  cause: e?.message || 'Unknown Socket batch PURL API error.'
4330
4344
  };
4331
4345
  }
4332
- const infoByPkgName = utils.getCveInfoFromAlertsMap(alertsMap, {
4346
+ const infoByPartialPurl = utils.getCveInfoFromAlertsMap(alertsMap, {
4333
4347
  limit: limit + openPrs.length
4334
4348
  });
4335
- if (!infoByPkgName) {
4349
+ if (!infoByPartialPurl) {
4336
4350
  spinner?.stop();
4337
4351
  logger.logger.info('No fixable vulns found.');
4338
4352
  return {
@@ -4343,11 +4357,12 @@ async function npmFix(pkgEnvDetails, {
4343
4357
  };
4344
4358
  }
4345
4359
  const baseBranch = isCi ? getBaseGitBranch() : '';
4360
+ const branchParser = isCi ? createSocketBranchParser() : null;
4346
4361
  const workspacePkgJsonPaths = await utils.globWorkspace(pkgEnvDetails.agent, rootPath);
4347
4362
  const pkgJsonPaths = [...workspacePkgJsonPaths,
4348
4363
  // Process the workspace root last since it will add an override to package.json.
4349
4364
  pkgEnvDetails.editablePkgJson.filename];
4350
- const sortedInfoEntries = [...infoByPkgName.entries()].sort((a, b) => sorts.naturalCompare(a[0], b[0]));
4365
+ const sortedInfoEntries = [...infoByPartialPurl.entries()].sort((a, b) => sorts.naturalCompare(a[0], b[0]));
4351
4366
  const handleInstallFail = () => {
4352
4367
  debug.debugFn(`fail: ${pkgEnvDetails.agent} install\n`);
4353
4368
  logger.logger.dedent();
@@ -4364,18 +4379,28 @@ async function npmFix(pkgEnvDetails, {
4364
4379
  } = sortedInfoEntries; i < length; i += 1) {
4365
4380
  const isLastInfoEntry = i === length - 1;
4366
4381
  const infoEntry = sortedInfoEntries[i];
4367
- const {
4368
- 0: name
4369
- } = infoEntry;
4370
- const openPrsForPkg = openPrs.filter(pr => name === packages.resolvePackageName(pr.purl));
4371
- const infos = [...infoEntry[1].values()].filter(info => !openPrsForPkg.find(pr => pr.newVersion === info.firstPatchedVersionIdentifier));
4382
+ const partialPurlObj = utils.getPurlObject(infoEntry[0]);
4383
+ const name = packages.resolvePackageName(partialPurlObj);
4384
+ let infos = [...infoEntry[1].values()];
4385
+ if (isCi) {
4386
+ const branchFullName = getSocketBranchFullNameComponent(partialPurlObj);
4387
+ const branchPurlType = getSocketBranchPurlTypeComponent(partialPurlObj);
4388
+ const activeBranches = [];
4389
+ for (const pr of openPrs) {
4390
+ const parsedBranch = branchParser(pr.headRefName);
4391
+ if (branchPurlType === parsedBranch?.type && branchFullName === parsedBranch?.fullName) {
4392
+ activeBranches.push(parsedBranch);
4393
+ }
4394
+ }
4395
+ infos = infos.filter(info => !activeBranches.find(b => b.newVersion === info.firstPatchedVersionIdentifier));
4396
+ }
4372
4397
  if (!infos.length) {
4373
4398
  continue infoEntriesLoop;
4374
4399
  }
4375
4400
  logger.logger.log(`Processing vulns for ${name}:`);
4376
4401
  logger.logger.indent();
4377
4402
  spinner?.indent();
4378
- if (registry.getManifestData(NPM$a, name)) {
4403
+ if (registry.getManifestData(partialPurlObj.type, name)) {
4379
4404
  debug.debugFn(`found: Socket Optimize variant for ${name}`);
4380
4405
  }
4381
4406
  // eslint-disable-next-line no-await-in-loop
@@ -4422,7 +4447,7 @@ async function npmFix(pkgEnvDetails, {
4422
4447
  }
4423
4448
  oldVersionsLoop: for (const oldVersion of oldVersions) {
4424
4449
  const oldId = `${name}@${oldVersion}`;
4425
- const oldPurl = utils.idToPurl(oldId);
4450
+ const oldPurl = utils.idToPurl(oldId, partialPurlObj.type);
4426
4451
  const node = shadowInject.findPackageNode(actualTree, name, oldVersion);
4427
4452
  if (!node) {
4428
4453
  debug.debugFn(`skip: ${oldId} not found`);
@@ -4673,7 +4698,6 @@ async function npmFix(pkgEnvDetails, {
4673
4698
  }
4674
4699
 
4675
4700
  const {
4676
- NPM: NPM$9,
4677
4701
  OVERRIDES: OVERRIDES$2,
4678
4702
  PNPM: PNPM$7
4679
4703
  } = constants;
@@ -4809,10 +4833,10 @@ async function pnpmFix(pkgEnvDetails, {
4809
4833
  cause: e?.message || 'Unknown Socket batch PURL API error.'
4810
4834
  };
4811
4835
  }
4812
- const infoByPkgName = utils.getCveInfoFromAlertsMap(alertsMap, {
4836
+ const infoByPartialPurl = utils.getCveInfoFromAlertsMap(alertsMap, {
4813
4837
  limit: limit + openPrs.length
4814
4838
  });
4815
- if (!infoByPkgName) {
4839
+ if (!infoByPartialPurl) {
4816
4840
  spinner?.stop();
4817
4841
  logger.logger.info('No fixable vulns found.');
4818
4842
  return {
@@ -4823,11 +4847,12 @@ async function pnpmFix(pkgEnvDetails, {
4823
4847
  };
4824
4848
  }
4825
4849
  const baseBranch = isCi ? getBaseGitBranch() : '';
4850
+ const branchParser = isCi ? createSocketBranchParser() : null;
4826
4851
  const workspacePkgJsonPaths = await utils.globWorkspace(pkgEnvDetails.agent, rootPath);
4827
4852
  const pkgJsonPaths = [...workspacePkgJsonPaths,
4828
4853
  // Process the workspace root last since it will add an override to package.json.
4829
4854
  pkgEnvDetails.editablePkgJson.filename];
4830
- const sortedInfoEntries = [...infoByPkgName.entries()].sort((a, b) => sorts.naturalCompare(a[0], b[0]));
4855
+ const sortedInfoEntries = [...infoByPartialPurl.entries()].sort((a, b) => sorts.naturalCompare(a[0], b[0]));
4831
4856
  const handleInstallFail = () => {
4832
4857
  logger.logger.dedent();
4833
4858
  spinner?.dedent();
@@ -4843,22 +4868,33 @@ async function pnpmFix(pkgEnvDetails, {
4843
4868
  } = sortedInfoEntries; i < length; i += 1) {
4844
4869
  const isLastInfoEntry = i === length - 1;
4845
4870
  const infoEntry = sortedInfoEntries[i];
4846
- const {
4847
- 0: name
4848
- } = infoEntry;
4849
- const openPrsForPkg = openPrs.filter(pr => name === packages.resolvePackageName(pr.purl));
4850
- const infos = [...infoEntry[1].values()].filter(info => {
4851
- debug.debugFn('pr.newVersion', openPrsForPkg.map(pr => pr.newVersion));
4852
- debug.debugFn('info.firstPatchedVersionIdentifier', info.firstPatchedVersionIdentifier);
4853
- return !openPrsForPkg.find(pr => pr.newVersion === info.firstPatchedVersionIdentifier);
4854
- });
4871
+ const partialPurlObj = utils.getPurlObject(infoEntry[0]);
4872
+ const name = packages.resolvePackageName(partialPurlObj);
4873
+ let infos = [...infoEntry[1].values()];
4874
+ if (isCi) {
4875
+ const branchFullName = getSocketBranchFullNameComponent(partialPurlObj);
4876
+ const branchPurlType = getSocketBranchPurlTypeComponent(partialPurlObj);
4877
+ const activeBranches = [];
4878
+ for (const pr of openPrs) {
4879
+ const parsedBranch = branchParser(pr.headRefName);
4880
+ if (branchPurlType === parsedBranch?.type && branchFullName === parsedBranch?.fullName) {
4881
+ activeBranches.push(parsedBranch);
4882
+ }
4883
+ }
4884
+ if (activeBranches.length) {
4885
+ debug.debugFn(`found: ${activeBranches.length} active branches\n`, activeBranches);
4886
+ } else {
4887
+ debug.debugFn('miss: 0 active branches found');
4888
+ }
4889
+ infos = infos.filter(info => !activeBranches.find(b => b.newVersion === info.firstPatchedVersionIdentifier));
4890
+ }
4855
4891
  if (!infos.length) {
4856
4892
  continue infoEntriesLoop;
4857
4893
  }
4858
4894
  logger.logger.log(`Processing vulns for ${name}:`);
4859
4895
  logger.logger.indent();
4860
4896
  spinner?.indent();
4861
- if (registry.getManifestData(NPM$9, name)) {
4897
+ if (registry.getManifestData(partialPurlObj.type, name)) {
4862
4898
  debug.debugFn(`found: Socket Optimize variant for ${name}`);
4863
4899
  }
4864
4900
  // eslint-disable-next-line no-await-in-loop
@@ -4935,7 +4971,7 @@ async function pnpmFix(pkgEnvDetails, {
4935
4971
  }
4936
4972
  oldVersionsLoop: for (const oldVersion of oldVersions) {
4937
4973
  const oldId = `${name}@${oldVersion}`;
4938
- const oldPurl = utils.idToPurl(oldId);
4974
+ const oldPurl = utils.idToPurl(oldId, partialPurlObj.type);
4939
4975
  const node = shadowInject.findPackageNode(actualTree, name, oldVersion);
4940
4976
  if (!node) {
4941
4977
  debug.debugFn(`skip: ${oldId} not found`);
@@ -5332,7 +5368,7 @@ async function handleFix({
5332
5368
  const {
5333
5369
  DRY_RUN_NOT_SAVING
5334
5370
  } = constants;
5335
- const config$G = {
5371
+ const config$H = {
5336
5372
  commandName: 'fix',
5337
5373
  description: 'Update dependencies with "fixable" Socket alerts',
5338
5374
  hidden: false,
@@ -5400,16 +5436,16 @@ const config$G = {
5400
5436
  `
5401
5437
  };
5402
5438
  const cmdFix = {
5403
- description: config$G.description,
5404
- hidden: config$G.hidden,
5405
- run: run$G
5439
+ description: config$H.description,
5440
+ hidden: config$H.hidden,
5441
+ run: run$H
5406
5442
  };
5407
- async function run$G(argv, importMeta, {
5443
+ async function run$H(argv, importMeta, {
5408
5444
  parentName
5409
5445
  }) {
5410
5446
  const cli = utils.meowOrExit({
5411
5447
  argv,
5412
- config: config$G,
5448
+ config: config$H,
5413
5449
  importMeta,
5414
5450
  parentName
5415
5451
  });
@@ -5611,9 +5647,9 @@ async function handlePackageInfo({
5611
5647
  }
5612
5648
 
5613
5649
  const {
5614
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$C
5650
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$D
5615
5651
  } = constants;
5616
- const config$F = {
5652
+ const config$G = {
5617
5653
  commandName: 'info',
5618
5654
  description: 'Look up info regarding a package',
5619
5655
  hidden: true,
@@ -5638,16 +5674,16 @@ const config$F = {
5638
5674
  `
5639
5675
  };
5640
5676
  const cmdInfo = {
5641
- description: config$F.description,
5642
- hidden: config$F.hidden,
5643
- run: run$F
5677
+ description: config$G.description,
5678
+ hidden: config$G.hidden,
5679
+ run: run$G
5644
5680
  };
5645
- async function run$F(argv, importMeta, {
5681
+ async function run$G(argv, importMeta, {
5646
5682
  parentName
5647
5683
  }) {
5648
5684
  const cli = utils.meowOrExit({
5649
5685
  argv,
5650
- config: config$F,
5686
+ config: config$G,
5651
5687
  importMeta,
5652
5688
  parentName
5653
5689
  });
@@ -5684,11 +5720,11 @@ async function run$F(argv, importMeta, {
5684
5720
  const pkgName = versionSeparator < 1 ? rawPkgName : rawPkgName.slice(0, versionSeparator);
5685
5721
  const pkgVersion = versionSeparator < 1 ? 'latest' : rawPkgName.slice(versionSeparator + 1);
5686
5722
  if (cli.flags['dryRun']) {
5687
- logger.logger.log(DRY_RUN_BAILING_NOW$C);
5723
+ logger.logger.log(DRY_RUN_BAILING_NOW$D);
5688
5724
  return;
5689
5725
  }
5690
5726
  await handlePackageInfo({
5691
- commandName: `${parentName} ${config$F.commandName}`,
5727
+ commandName: `${parentName} ${config$G.commandName}`,
5692
5728
  includeAllIssues: Boolean(all),
5693
5729
  outputKind,
5694
5730
  pkgName,
@@ -5816,9 +5852,9 @@ async function handleInstallCompletion(targetName) {
5816
5852
  }
5817
5853
 
5818
5854
  const {
5819
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$B
5855
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$C
5820
5856
  } = constants;
5821
- const config$E = {
5857
+ const config$F = {
5822
5858
  commandName: 'completion',
5823
5859
  description: 'Install bash completion for Socket CLI',
5824
5860
  hidden: true,
@@ -5856,22 +5892,22 @@ const config$E = {
5856
5892
  `
5857
5893
  };
5858
5894
  const cmdInstallCompletion = {
5859
- description: config$E.description,
5860
- hidden: config$E.hidden,
5861
- run: run$E
5895
+ description: config$F.description,
5896
+ hidden: config$F.hidden,
5897
+ run: run$F
5862
5898
  };
5863
- async function run$E(argv, importMeta, {
5899
+ async function run$F(argv, importMeta, {
5864
5900
  parentName
5865
5901
  }) {
5866
5902
  const cli = utils.meowOrExit({
5867
5903
  argv,
5868
- config: config$E,
5904
+ config: config$F,
5869
5905
  importMeta,
5870
5906
  parentName
5871
5907
  });
5872
5908
  const targetName = cli.input[0] || 'socket';
5873
5909
  if (cli.flags['dryRun']) {
5874
- logger.logger.log(DRY_RUN_BAILING_NOW$B);
5910
+ logger.logger.log(DRY_RUN_BAILING_NOW$C);
5875
5911
  return;
5876
5912
  }
5877
5913
  await handleInstallCompletion(String(targetName));
@@ -5989,9 +6025,9 @@ async function attemptLogin(apiBaseUrl, apiProxy) {
5989
6025
  }
5990
6026
 
5991
6027
  const {
5992
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$A
6028
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$B
5993
6029
  } = constants;
5994
- const config$D = {
6030
+ const config$E = {
5995
6031
  commandName: 'login',
5996
6032
  description: 'Socket API login',
5997
6033
  hidden: false,
@@ -6024,23 +6060,23 @@ const config$D = {
6024
6060
  `
6025
6061
  };
6026
6062
  const cmdLogin = {
6027
- description: config$D.description,
6028
- hidden: config$D.hidden,
6029
- run: run$D
6063
+ description: config$E.description,
6064
+ hidden: config$E.hidden,
6065
+ run: run$E
6030
6066
  };
6031
- async function run$D(argv, importMeta, {
6067
+ async function run$E(argv, importMeta, {
6032
6068
  parentName
6033
6069
  }) {
6034
6070
  const cli = utils.meowOrExit({
6035
6071
  argv,
6036
- config: config$D,
6072
+ config: config$E,
6037
6073
  importMeta,
6038
6074
  parentName
6039
6075
  });
6040
6076
  const apiBaseUrl = cli.flags['apiBaseUrl'];
6041
6077
  const apiProxy = cli.flags['apiProxy'];
6042
6078
  if (cli.flags['dryRun']) {
6043
- logger.logger.log(DRY_RUN_BAILING_NOW$A);
6079
+ logger.logger.log(DRY_RUN_BAILING_NOW$B);
6044
6080
  return;
6045
6081
  }
6046
6082
  if (!vendor.isInteractiveExports()) {
@@ -6070,9 +6106,9 @@ function attemptLogout() {
6070
6106
  }
6071
6107
 
6072
6108
  const {
6073
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$z
6109
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$A
6074
6110
  } = constants;
6075
- const config$C = {
6111
+ const config$D = {
6076
6112
  commandName: 'logout',
6077
6113
  description: 'Socket API logout',
6078
6114
  hidden: false,
@@ -6087,30 +6123,30 @@ const config$C = {
6087
6123
  `
6088
6124
  };
6089
6125
  const cmdLogout = {
6090
- description: config$C.description,
6091
- hidden: config$C.hidden,
6092
- run: run$C
6126
+ description: config$D.description,
6127
+ hidden: config$D.hidden,
6128
+ run: run$D
6093
6129
  };
6094
- async function run$C(argv, importMeta, {
6130
+ async function run$D(argv, importMeta, {
6095
6131
  parentName
6096
6132
  }) {
6097
6133
  const cli = utils.meowOrExit({
6098
6134
  argv,
6099
- config: config$C,
6135
+ config: config$D,
6100
6136
  importMeta,
6101
6137
  parentName
6102
6138
  });
6103
6139
  if (cli.flags['dryRun']) {
6104
- logger.logger.log(DRY_RUN_BAILING_NOW$z);
6140
+ logger.logger.log(DRY_RUN_BAILING_NOW$A);
6105
6141
  return;
6106
6142
  }
6107
6143
  attemptLogout();
6108
6144
  }
6109
6145
 
6110
6146
  const {
6111
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$y
6147
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$z
6112
6148
  } = constants;
6113
- const config$B = {
6149
+ const config$C = {
6114
6150
  commandName: 'auto',
6115
6151
  description: 'Auto-detect build and attempt to generate manifest file',
6116
6152
  hidden: false,
@@ -6143,16 +6179,16 @@ const config$B = {
6143
6179
  `
6144
6180
  };
6145
6181
  const cmdManifestAuto = {
6146
- description: config$B.description,
6147
- hidden: config$B.hidden,
6148
- run: run$B
6182
+ description: config$C.description,
6183
+ hidden: config$C.hidden,
6184
+ run: run$C
6149
6185
  };
6150
- async function run$B(argv, importMeta, {
6186
+ async function run$C(argv, importMeta, {
6151
6187
  parentName
6152
6188
  }) {
6153
6189
  const cli = utils.meowOrExit({
6154
6190
  argv,
6155
- config: config$B,
6191
+ config: config$C,
6156
6192
  importMeta,
6157
6193
  parentName
6158
6194
  });
@@ -6168,7 +6204,7 @@ async function run$B(argv, importMeta, {
6168
6204
  // If given path is absolute then cwd should not affect it.
6169
6205
  cwd = path.resolve(process.cwd(), cwd);
6170
6206
  if (verbose) {
6171
- logger.logger.group('- ', parentName, config$B.commandName, ':');
6207
+ logger.logger.group('- ', parentName, config$C.commandName, ':');
6172
6208
  logger.logger.group('- flags:', cli.flags);
6173
6209
  logger.logger.groupEnd();
6174
6210
  logger.logger.log('- input:', cli.input);
@@ -6179,7 +6215,7 @@ async function run$B(argv, importMeta, {
6179
6215
  const detected = await detectManifestActions(socketJson, cwd);
6180
6216
  debug.debugLog('[DEBUG]', detected);
6181
6217
  if (cli.flags['dryRun']) {
6182
- logger.logger.log(DRY_RUN_BAILING_NOW$y);
6218
+ logger.logger.log(DRY_RUN_BAILING_NOW$z);
6183
6219
  return;
6184
6220
  }
6185
6221
  if (!detected.count) {
@@ -6201,9 +6237,9 @@ async function run$B(argv, importMeta, {
6201
6237
  }
6202
6238
 
6203
6239
  const {
6204
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$x
6240
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$y
6205
6241
  } = constants;
6206
- const config$A = {
6242
+ const config$B = {
6207
6243
  commandName: 'conda',
6208
6244
  description: '[beta] Convert a Conda environment.yml file to a python requirements.txt',
6209
6245
  hidden: false,
@@ -6254,16 +6290,16 @@ const config$A = {
6254
6290
  `
6255
6291
  };
6256
6292
  const cmdManifestConda = {
6257
- description: config$A.description,
6258
- hidden: config$A.hidden,
6259
- run: run$A
6293
+ description: config$B.description,
6294
+ hidden: config$B.hidden,
6295
+ run: run$B
6260
6296
  };
6261
- async function run$A(argv, importMeta, {
6297
+ async function run$B(argv, importMeta, {
6262
6298
  parentName
6263
6299
  }) {
6264
6300
  const cli = utils.meowOrExit({
6265
6301
  argv,
6266
- config: config$A,
6302
+ config: config$B,
6267
6303
  importMeta,
6268
6304
  parentName
6269
6305
  });
@@ -6321,7 +6357,7 @@ async function run$A(argv, importMeta, {
6321
6357
  verbose = false;
6322
6358
  }
6323
6359
  if (verbose) {
6324
- logger.logger.group('- ', parentName, config$A.commandName, ':');
6360
+ logger.logger.group('- ', parentName, config$B.commandName, ':');
6325
6361
  logger.logger.group('- flags:', cli.flags);
6326
6362
  logger.logger.groupEnd();
6327
6363
  logger.logger.log('- target:', cwd);
@@ -6346,7 +6382,7 @@ async function run$A(argv, importMeta, {
6346
6382
  }
6347
6383
  logger.logger.warn('Warning: This will approximate your Conda dependencies using PyPI. We do not yet officially support Conda. Use at your own risk.');
6348
6384
  if (cli.flags['dryRun']) {
6349
- logger.logger.log(DRY_RUN_BAILING_NOW$x);
6385
+ logger.logger.log(DRY_RUN_BAILING_NOW$y);
6350
6386
  return;
6351
6387
  }
6352
6388
  await handleManifestConda({
@@ -6359,9 +6395,9 @@ async function run$A(argv, importMeta, {
6359
6395
  }
6360
6396
 
6361
6397
  const {
6362
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$w
6398
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$x
6363
6399
  } = constants;
6364
- const config$z = {
6400
+ const config$A = {
6365
6401
  commandName: 'gradle',
6366
6402
  description: '[beta] Use Gradle to generate a manifest file (`pom.xml`) for a Gradle/Java/Kotlin/etc project',
6367
6403
  hidden: false,
@@ -6414,16 +6450,16 @@ const config$z = {
6414
6450
  `
6415
6451
  };
6416
6452
  const cmdManifestGradle = {
6417
- description: config$z.description,
6418
- hidden: config$z.hidden,
6419
- run: run$z
6453
+ description: config$A.description,
6454
+ hidden: config$A.hidden,
6455
+ run: run$A
6420
6456
  };
6421
- async function run$z(argv, importMeta, {
6457
+ async function run$A(argv, importMeta, {
6422
6458
  parentName
6423
6459
  }) {
6424
6460
  const cli = utils.meowOrExit({
6425
6461
  argv,
6426
- config: config$z,
6462
+ config: config$A,
6427
6463
  importMeta,
6428
6464
  parentName
6429
6465
  });
@@ -6470,7 +6506,7 @@ async function run$z(argv, importMeta, {
6470
6506
  }
6471
6507
  }
6472
6508
  if (verbose) {
6473
- logger.logger.group('- ', parentName, config$z.commandName, ':');
6509
+ logger.logger.group('- ', parentName, config$A.commandName, ':');
6474
6510
  logger.logger.group('- flags:', cli.flags);
6475
6511
  logger.logger.groupEnd();
6476
6512
  logger.logger.log('- input:', cli.input);
@@ -6498,7 +6534,7 @@ async function run$z(argv, importMeta, {
6498
6534
  logger.logger.groupEnd();
6499
6535
  }
6500
6536
  if (cli.flags['dryRun']) {
6501
- logger.logger.log(DRY_RUN_BAILING_NOW$w);
6537
+ logger.logger.log(DRY_RUN_BAILING_NOW$x);
6502
6538
  return;
6503
6539
  }
6504
6540
  await convertGradleToMaven({
@@ -6510,7 +6546,7 @@ async function run$z(argv, importMeta, {
6510
6546
  }
6511
6547
 
6512
6548
  const {
6513
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$v
6549
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$w
6514
6550
  } = constants;
6515
6551
 
6516
6552
  // TODO: we may want to dedupe some pieces for all gradle languages. I think it
@@ -6518,7 +6554,7 @@ const {
6518
6554
  // sense for the help panels to note the requested language, rather than
6519
6555
  // `socket manifest kotlin` to print help screens with `gradle` as the
6520
6556
  // command. Room for improvement.
6521
- const config$y = {
6557
+ const config$z = {
6522
6558
  commandName: 'kotlin',
6523
6559
  description: '[beta] Use Gradle to generate a manifest file (`pom.xml`) for a Kotlin project',
6524
6560
  hidden: false,
@@ -6571,16 +6607,16 @@ const config$y = {
6571
6607
  `
6572
6608
  };
6573
6609
  const cmdManifestKotlin = {
6574
- description: config$y.description,
6575
- hidden: config$y.hidden,
6576
- run: run$y
6610
+ description: config$z.description,
6611
+ hidden: config$z.hidden,
6612
+ run: run$z
6577
6613
  };
6578
- async function run$y(argv, importMeta, {
6614
+ async function run$z(argv, importMeta, {
6579
6615
  parentName
6580
6616
  }) {
6581
6617
  const cli = utils.meowOrExit({
6582
6618
  argv,
6583
- config: config$y,
6619
+ config: config$z,
6584
6620
  importMeta,
6585
6621
  parentName
6586
6622
  });
@@ -6627,7 +6663,7 @@ async function run$y(argv, importMeta, {
6627
6663
  }
6628
6664
  }
6629
6665
  if (verbose) {
6630
- logger.logger.group('- ', parentName, config$y.commandName, ':');
6666
+ logger.logger.group('- ', parentName, config$z.commandName, ':');
6631
6667
  logger.logger.group('- flags:', cli.flags);
6632
6668
  logger.logger.groupEnd();
6633
6669
  logger.logger.log('- input:', cli.input);
@@ -6655,7 +6691,7 @@ async function run$y(argv, importMeta, {
6655
6691
  logger.logger.groupEnd();
6656
6692
  }
6657
6693
  if (cli.flags['dryRun']) {
6658
- logger.logger.log(DRY_RUN_BAILING_NOW$v);
6694
+ logger.logger.log(DRY_RUN_BAILING_NOW$w);
6659
6695
  return;
6660
6696
  }
6661
6697
  await convertGradleToMaven({
@@ -6667,9 +6703,9 @@ async function run$y(argv, importMeta, {
6667
6703
  }
6668
6704
 
6669
6705
  const {
6670
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$u
6706
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$v
6671
6707
  } = constants;
6672
- const config$x = {
6708
+ const config$y = {
6673
6709
  commandName: 'scala',
6674
6710
  description: "[beta] Generate a manifest file (`pom.xml`) from Scala's `build.sbt` file",
6675
6711
  hidden: false,
@@ -6735,16 +6771,16 @@ const config$x = {
6735
6771
  `
6736
6772
  };
6737
6773
  const cmdManifestScala = {
6738
- description: config$x.description,
6739
- hidden: config$x.hidden,
6740
- run: run$x
6774
+ description: config$y.description,
6775
+ hidden: config$y.hidden,
6776
+ run: run$y
6741
6777
  };
6742
- async function run$x(argv, importMeta, {
6778
+ async function run$y(argv, importMeta, {
6743
6779
  parentName
6744
6780
  }) {
6745
6781
  const cli = utils.meowOrExit({
6746
6782
  argv,
6747
- config: config$x,
6783
+ config: config$y,
6748
6784
  importMeta,
6749
6785
  parentName
6750
6786
  });
@@ -6805,7 +6841,7 @@ async function run$x(argv, importMeta, {
6805
6841
  verbose = false;
6806
6842
  }
6807
6843
  if (verbose) {
6808
- logger.logger.group('- ', parentName, config$x.commandName, ':');
6844
+ logger.logger.group('- ', parentName, config$y.commandName, ':');
6809
6845
  logger.logger.group('- flags:', cli.flags);
6810
6846
  logger.logger.groupEnd();
6811
6847
  logger.logger.log('- input:', cli.input);
@@ -6834,7 +6870,7 @@ async function run$x(argv, importMeta, {
6834
6870
  logger.logger.groupEnd();
6835
6871
  }
6836
6872
  if (cli.flags['dryRun']) {
6837
- logger.logger.log(DRY_RUN_BAILING_NOW$u);
6873
+ logger.logger.log(DRY_RUN_BAILING_NOW$v);
6838
6874
  return;
6839
6875
  }
6840
6876
  await convertSbtToMaven({
@@ -7250,9 +7286,9 @@ async function handleManifestSetup(cwd, defaultOnReadError) {
7250
7286
  }
7251
7287
 
7252
7288
  const {
7253
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$t
7289
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$u
7254
7290
  } = constants;
7255
- const config$w = {
7291
+ const config$x = {
7256
7292
  commandName: 'setup',
7257
7293
  description: 'Start interactive configurator to customize default flag values for `socket manifest` in this dir',
7258
7294
  hidden: false,
@@ -7296,16 +7332,16 @@ const config$w = {
7296
7332
  `
7297
7333
  };
7298
7334
  const cmdManifestSetup = {
7299
- description: config$w.description,
7300
- hidden: config$w.hidden,
7301
- run: run$w
7335
+ description: config$x.description,
7336
+ hidden: config$x.hidden,
7337
+ run: run$x
7302
7338
  };
7303
- async function run$w(argv, importMeta, {
7339
+ async function run$x(argv, importMeta, {
7304
7340
  parentName
7305
7341
  }) {
7306
7342
  const cli = utils.meowOrExit({
7307
7343
  argv,
7308
- config: config$w,
7344
+ config: config$x,
7309
7345
  importMeta,
7310
7346
  parentName
7311
7347
  });
@@ -7317,13 +7353,13 @@ async function run$w(argv, importMeta, {
7317
7353
  // If given path is absolute then cwd should not affect it.
7318
7354
  cwd = path.resolve(process.cwd(), cwd);
7319
7355
  if (cli.flags['dryRun']) {
7320
- logger.logger.log(DRY_RUN_BAILING_NOW$t);
7356
+ logger.logger.log(DRY_RUN_BAILING_NOW$u);
7321
7357
  return;
7322
7358
  }
7323
7359
  await handleManifestSetup(cwd, Boolean(defaultOnReadError));
7324
7360
  }
7325
7361
 
7326
- const config$v = {
7362
+ const config$w = {
7327
7363
  commandName: 'manifest',
7328
7364
  description: 'Generate a dependency manifest for given file or dir',
7329
7365
  hidden: false,
@@ -7331,11 +7367,11 @@ const config$v = {
7331
7367
  ...utils.commonFlags
7332
7368
  }};
7333
7369
  const cmdManifest = {
7334
- description: config$v.description,
7335
- hidden: config$v.hidden,
7336
- run: run$v
7370
+ description: config$w.description,
7371
+ hidden: config$w.hidden,
7372
+ run: run$w
7337
7373
  };
7338
- async function run$v(argv, importMeta, {
7374
+ async function run$w(argv, importMeta, {
7339
7375
  parentName
7340
7376
  }) {
7341
7377
  await utils.meowWithSubcommands({
@@ -7350,23 +7386,23 @@ async function run$v(argv, importMeta, {
7350
7386
  argv,
7351
7387
  aliases: {
7352
7388
  yolo: {
7353
- description: config$v.description,
7389
+ description: config$w.description,
7354
7390
  hidden: true,
7355
7391
  argv: ['auto']
7356
7392
  }
7357
7393
  },
7358
- description: config$v.description,
7394
+ description: config$w.description,
7359
7395
  importMeta,
7360
- flags: config$v.flags,
7361
- name: `${parentName} ${config$v.commandName}`
7396
+ flags: config$w.flags,
7397
+ name: `${parentName} ${config$w.commandName}`
7362
7398
  });
7363
7399
  }
7364
7400
 
7365
7401
  const require$3 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
7366
7402
  const {
7367
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$s
7403
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$t
7368
7404
  } = constants;
7369
- const config$u = {
7405
+ const config$v = {
7370
7406
  commandName: 'npm',
7371
7407
  description: `npm wrapper functionality`,
7372
7408
  hidden: false,
@@ -7379,21 +7415,21 @@ const config$u = {
7379
7415
  `
7380
7416
  };
7381
7417
  const cmdNpm = {
7382
- description: config$u.description,
7383
- hidden: config$u.hidden,
7384
- run: run$u
7418
+ description: config$v.description,
7419
+ hidden: config$v.hidden,
7420
+ run: run$v
7385
7421
  };
7386
- async function run$u(argv, importMeta, {
7422
+ async function run$v(argv, importMeta, {
7387
7423
  parentName
7388
7424
  }) {
7389
7425
  const cli = utils.meowOrExit({
7390
7426
  argv,
7391
- config: config$u,
7427
+ config: config$v,
7392
7428
  importMeta,
7393
7429
  parentName
7394
7430
  });
7395
7431
  if (cli.flags['dryRun']) {
7396
- logger.logger.log(DRY_RUN_BAILING_NOW$s);
7432
+ logger.logger.log(DRY_RUN_BAILING_NOW$t);
7397
7433
  return;
7398
7434
  }
7399
7435
 
@@ -7404,9 +7440,9 @@ async function run$u(argv, importMeta, {
7404
7440
 
7405
7441
  const require$2 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
7406
7442
  const {
7407
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$r
7443
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$s
7408
7444
  } = constants;
7409
- const config$t = {
7445
+ const config$u = {
7410
7446
  commandName: 'npx',
7411
7447
  description: `npx wrapper functionality`,
7412
7448
  hidden: false,
@@ -7419,21 +7455,21 @@ const config$t = {
7419
7455
  `
7420
7456
  };
7421
7457
  const cmdNpx = {
7422
- description: config$t.description,
7423
- hidden: config$t.hidden,
7424
- run: run$t
7458
+ description: config$u.description,
7459
+ hidden: config$u.hidden,
7460
+ run: run$u
7425
7461
  };
7426
- async function run$t(argv, importMeta, {
7462
+ async function run$u(argv, importMeta, {
7427
7463
  parentName
7428
7464
  }) {
7429
7465
  const cli = utils.meowOrExit({
7430
7466
  argv,
7431
- config: config$t,
7467
+ config: config$u,
7432
7468
  importMeta,
7433
7469
  parentName
7434
7470
  });
7435
7471
  if (cli.flags['dryRun']) {
7436
- logger.logger.log(DRY_RUN_BAILING_NOW$r);
7472
+ logger.logger.log(DRY_RUN_BAILING_NOW$s);
7437
7473
  return;
7438
7474
  }
7439
7475
 
@@ -7443,9 +7479,9 @@ async function run$t(argv, importMeta, {
7443
7479
  }
7444
7480
 
7445
7481
  const {
7446
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$q
7482
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$r
7447
7483
  } = constants;
7448
- const config$s = {
7484
+ const config$t = {
7449
7485
  commandName: 'oops',
7450
7486
  description: 'Trigger an intentional error (for development)',
7451
7487
  hidden: true,
@@ -7461,16 +7497,16 @@ const config$s = {
7461
7497
  `
7462
7498
  };
7463
7499
  const cmdOops = {
7464
- description: config$s.description,
7465
- hidden: config$s.hidden,
7466
- run: run$s
7500
+ description: config$t.description,
7501
+ hidden: config$t.hidden,
7502
+ run: run$t
7467
7503
  };
7468
- async function run$s(argv, importMeta, {
7504
+ async function run$t(argv, importMeta, {
7469
7505
  parentName
7470
7506
  }) {
7471
7507
  const cli = utils.meowOrExit({
7472
7508
  argv,
7473
- config: config$s,
7509
+ config: config$t,
7474
7510
  importMeta,
7475
7511
  parentName
7476
7512
  });
@@ -7479,7 +7515,7 @@ async function run$s(argv, importMeta, {
7479
7515
  markdown
7480
7516
  } = cli.flags;
7481
7517
  if (cli.flags['dryRun']) {
7482
- logger.logger.log(DRY_RUN_BAILING_NOW$q);
7518
+ logger.logger.log(DRY_RUN_BAILING_NOW$r);
7483
7519
  return;
7484
7520
  }
7485
7521
  if (json) {
@@ -7669,7 +7705,7 @@ function cleanupQueryStdout(stdout) {
7669
7705
  try {
7670
7706
  pkgs = JSON.parse(stdout);
7671
7707
  } catch {}
7672
- if (!Array.isArray(pkgs)) {
7708
+ if (!Array.isArray(pkgs) || !pkgs.length) {
7673
7709
  return '';
7674
7710
  }
7675
7711
  const names = new Set();
@@ -8235,9 +8271,9 @@ async function handleOptimize({
8235
8271
  }
8236
8272
 
8237
8273
  const {
8238
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$p
8274
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$q
8239
8275
  } = constants;
8240
- const config$r = {
8276
+ const config$s = {
8241
8277
  commandName: 'optimize',
8242
8278
  description: 'Optimize dependencies with @socketregistry overrides',
8243
8279
  hidden: false,
@@ -8267,16 +8303,16 @@ const config$r = {
8267
8303
  `
8268
8304
  };
8269
8305
  const cmdOptimize = {
8270
- description: config$r.description,
8271
- hidden: config$r.hidden,
8272
- run: run$r
8306
+ description: config$s.description,
8307
+ hidden: config$s.hidden,
8308
+ run: run$s
8273
8309
  };
8274
- async function run$r(argv, importMeta, {
8310
+ async function run$s(argv, importMeta, {
8275
8311
  parentName
8276
8312
  }) {
8277
8313
  const cli = utils.meowOrExit({
8278
8314
  argv,
8279
- config: config$r,
8315
+ config: config$s,
8280
8316
  importMeta,
8281
8317
  parentName
8282
8318
  });
@@ -8294,7 +8330,7 @@ async function run$r(argv, importMeta, {
8294
8330
  // If given path is absolute then cwd should not affect it.
8295
8331
  cwd = path.resolve(process.cwd(), cwd);
8296
8332
  if (cli.flags['dryRun']) {
8297
- logger.logger.log(DRY_RUN_BAILING_NOW$p);
8333
+ logger.logger.log(DRY_RUN_BAILING_NOW$q);
8298
8334
  return;
8299
8335
  }
8300
8336
  await handleOptimize({
@@ -8370,9 +8406,9 @@ async function handleOrganizationList(outputKind = 'text') {
8370
8406
  }
8371
8407
 
8372
8408
  const {
8373
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$o
8409
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$p
8374
8410
  } = constants;
8375
- const config$q = {
8411
+ const config$r = {
8376
8412
  commandName: 'list',
8377
8413
  description: 'List organizations associated with the API key used',
8378
8414
  hidden: false,
@@ -8389,20 +8425,20 @@ const config$q = {
8389
8425
  - Permissions: none (does need a token)
8390
8426
 
8391
8427
  Options
8392
- ${utils.getFlagListOutput(config$q.flags, 6)}
8428
+ ${utils.getFlagListOutput(config$r.flags, 6)}
8393
8429
  `
8394
8430
  };
8395
8431
  const cmdOrganizationList = {
8396
- description: config$q.description,
8397
- hidden: config$q.hidden,
8398
- run: run$q
8432
+ description: config$r.description,
8433
+ hidden: config$r.hidden,
8434
+ run: run$r
8399
8435
  };
8400
- async function run$q(argv, importMeta, {
8436
+ async function run$r(argv, importMeta, {
8401
8437
  parentName
8402
8438
  }) {
8403
8439
  const cli = utils.meowOrExit({
8404
8440
  argv,
8405
- config: config$q,
8441
+ config: config$r,
8406
8442
  importMeta,
8407
8443
  parentName
8408
8444
  });
@@ -8429,7 +8465,7 @@ async function run$q(argv, importMeta, {
8429
8465
  return;
8430
8466
  }
8431
8467
  if (cli.flags['dryRun']) {
8432
- logger.logger.log(DRY_RUN_BAILING_NOW$o);
8468
+ logger.logger.log(DRY_RUN_BAILING_NOW$p);
8433
8469
  return;
8434
8470
  }
8435
8471
  await handleOrganizationList(outputKind);
@@ -8475,11 +8511,11 @@ async function handleLicensePolicy(orgSlug, outputKind) {
8475
8511
  }
8476
8512
 
8477
8513
  const {
8478
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$n
8514
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$o
8479
8515
  } = constants;
8480
8516
 
8481
8517
  // TODO: secret toplevel alias `socket license policy`?
8482
- const config$p = {
8518
+ const config$q = {
8483
8519
  commandName: 'license',
8484
8520
  description: 'Retrieve the license policy of an organization',
8485
8521
  hidden: true,
@@ -8505,7 +8541,7 @@ const config$p = {
8505
8541
  - Permissions: license-policy:read
8506
8542
 
8507
8543
  Options
8508
- ${utils.getFlagListOutput(config$p.flags, 6)}
8544
+ ${utils.getFlagListOutput(config$q.flags, 6)}
8509
8545
 
8510
8546
  Your API token will need the \`license-policy:read\` permission otherwise
8511
8547
  the request will fail with an authentication error.
@@ -8516,16 +8552,16 @@ const config$p = {
8516
8552
  `
8517
8553
  };
8518
8554
  const cmdOrganizationPolicyLicense = {
8519
- description: config$p.description,
8520
- hidden: config$p.hidden,
8521
- run: run$p
8555
+ description: config$q.description,
8556
+ hidden: config$q.hidden,
8557
+ run: run$q
8522
8558
  };
8523
- async function run$p(argv, importMeta, {
8559
+ async function run$q(argv, importMeta, {
8524
8560
  parentName
8525
8561
  }) {
8526
8562
  const cli = utils.meowOrExit({
8527
8563
  argv,
8528
- config: config$p,
8564
+ config: config$q,
8529
8565
  importMeta,
8530
8566
  parentName
8531
8567
  });
@@ -8562,7 +8598,7 @@ async function run$p(argv, importMeta, {
8562
8598
  return;
8563
8599
  }
8564
8600
  if (cli.flags['dryRun']) {
8565
- logger.logger.log(DRY_RUN_BAILING_NOW$n);
8601
+ logger.logger.log(DRY_RUN_BAILING_NOW$o);
8566
8602
  return;
8567
8603
  }
8568
8604
  await handleLicensePolicy(orgSlug, outputKind);
@@ -8609,11 +8645,11 @@ async function handleSecurityPolicy(orgSlug, outputKind) {
8609
8645
  }
8610
8646
 
8611
8647
  const {
8612
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$m
8648
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$n
8613
8649
  } = constants;
8614
8650
 
8615
8651
  // TODO: secret toplevel alias `socket security policy`?
8616
- const config$o = {
8652
+ const config$p = {
8617
8653
  commandName: 'security',
8618
8654
  description: 'Retrieve the security policy of an organization',
8619
8655
  hidden: true,
@@ -8639,7 +8675,7 @@ const config$o = {
8639
8675
  - Permissions: security-policy:read
8640
8676
 
8641
8677
  Options
8642
- ${utils.getFlagListOutput(config$o.flags, 6)}
8678
+ ${utils.getFlagListOutput(config$p.flags, 6)}
8643
8679
 
8644
8680
  Your API token will need the \`security-policy:read\` permission otherwise
8645
8681
  the request will fail with an authentication error.
@@ -8650,16 +8686,16 @@ const config$o = {
8650
8686
  `
8651
8687
  };
8652
8688
  const cmdOrganizationPolicyPolicy = {
8653
- description: config$o.description,
8654
- hidden: config$o.hidden,
8655
- run: run$o
8689
+ description: config$p.description,
8690
+ hidden: config$p.hidden,
8691
+ run: run$p
8656
8692
  };
8657
- async function run$o(argv, importMeta, {
8693
+ async function run$p(argv, importMeta, {
8658
8694
  parentName
8659
8695
  }) {
8660
8696
  const cli = utils.meowOrExit({
8661
8697
  argv,
8662
- config: config$o,
8698
+ config: config$p,
8663
8699
  importMeta,
8664
8700
  parentName
8665
8701
  });
@@ -8696,7 +8732,7 @@ async function run$o(argv, importMeta, {
8696
8732
  return;
8697
8733
  }
8698
8734
  if (cli.flags['dryRun']) {
8699
- logger.logger.log(DRY_RUN_BAILING_NOW$m);
8735
+ logger.logger.log(DRY_RUN_BAILING_NOW$n);
8700
8736
  return;
8701
8737
  }
8702
8738
  await handleSecurityPolicy(orgSlug, outputKind);
@@ -8765,9 +8801,9 @@ async function handleQuota(outputKind = 'text') {
8765
8801
  }
8766
8802
 
8767
8803
  const {
8768
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$l
8804
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$m
8769
8805
  } = constants;
8770
- const config$n = {
8806
+ const config$o = {
8771
8807
  commandName: 'quota',
8772
8808
  description: 'List organizations associated with the API key used',
8773
8809
  hidden: true,
@@ -8780,20 +8816,20 @@ const config$n = {
8780
8816
  $ ${command}
8781
8817
 
8782
8818
  Options
8783
- ${utils.getFlagListOutput(config$n.flags, 6)}
8819
+ ${utils.getFlagListOutput(config$o.flags, 6)}
8784
8820
  `
8785
8821
  };
8786
8822
  const cmdOrganizationQuota = {
8787
- description: config$n.description,
8788
- hidden: config$n.hidden,
8789
- run: run$n
8823
+ description: config$o.description,
8824
+ hidden: config$o.hidden,
8825
+ run: run$o
8790
8826
  };
8791
- async function run$n(argv, importMeta, {
8827
+ async function run$o(argv, importMeta, {
8792
8828
  parentName
8793
8829
  }) {
8794
8830
  const cli = utils.meowOrExit({
8795
8831
  argv,
8796
- config: config$n,
8832
+ config: config$o,
8797
8833
  importMeta,
8798
8834
  parentName
8799
8835
  });
@@ -8818,7 +8854,7 @@ async function run$n(argv, importMeta, {
8818
8854
  return;
8819
8855
  }
8820
8856
  if (cli.flags['dryRun']) {
8821
- logger.logger.log(DRY_RUN_BAILING_NOW$l);
8857
+ logger.logger.log(DRY_RUN_BAILING_NOW$m);
8822
8858
  return;
8823
8859
  }
8824
8860
  await handleQuota(outputKind);
@@ -9066,9 +9102,9 @@ function parsePackageSpecifiers(ecosystem, pkgs) {
9066
9102
  }
9067
9103
 
9068
9104
  const {
9069
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$k
9105
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$l
9070
9106
  } = constants;
9071
- const config$m = {
9107
+ const config$n = {
9072
9108
  commandName: 'score',
9073
9109
  description: '[beta] Look up score for one package which reflects all of its transitive dependencies as well',
9074
9110
  hidden: false,
@@ -9110,16 +9146,16 @@ const config$m = {
9110
9146
  `
9111
9147
  };
9112
9148
  const cmdPackageScore = {
9113
- description: config$m.description,
9114
- hidden: config$m.hidden,
9115
- run: run$m
9149
+ description: config$n.description,
9150
+ hidden: config$n.hidden,
9151
+ run: run$n
9116
9152
  };
9117
- async function run$m(argv, importMeta, {
9153
+ async function run$n(argv, importMeta, {
9118
9154
  parentName
9119
9155
  }) {
9120
9156
  const cli = utils.meowOrExit({
9121
9157
  argv,
9122
- config: config$m,
9158
+ config: config$n,
9123
9159
  importMeta,
9124
9160
  parentName
9125
9161
  });
@@ -9161,7 +9197,7 @@ async function run$m(argv, importMeta, {
9161
9197
  return;
9162
9198
  }
9163
9199
  if (cli.flags['dryRun']) {
9164
- logger.logger.log(DRY_RUN_BAILING_NOW$k);
9200
+ logger.logger.log(DRY_RUN_BAILING_NOW$l);
9165
9201
  return;
9166
9202
  }
9167
9203
  await handlePurlDeepScore(purls[0] || '', outputKind);
@@ -9298,9 +9334,9 @@ async function handlePurlsShallowScore({
9298
9334
  }
9299
9335
 
9300
9336
  const {
9301
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$j
9337
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$k
9302
9338
  } = constants;
9303
- const config$l = {
9339
+ const config$m = {
9304
9340
  commandName: 'shallow',
9305
9341
  description: '[beta] Look up info regarding one or more packages but not their transitives',
9306
9342
  hidden: false,
@@ -9342,23 +9378,23 @@ const config$l = {
9342
9378
  `
9343
9379
  };
9344
9380
  const cmdPackageShallow = {
9345
- description: config$l.description,
9346
- hidden: config$l.hidden,
9381
+ description: config$m.description,
9382
+ hidden: config$m.hidden,
9347
9383
  alias: {
9348
9384
  shallowScore: {
9349
- description: config$l.description,
9385
+ description: config$m.description,
9350
9386
  hidden: true,
9351
9387
  argv: []
9352
9388
  }
9353
9389
  },
9354
- run: run$l
9390
+ run: run$m
9355
9391
  };
9356
- async function run$l(argv, importMeta, {
9392
+ async function run$m(argv, importMeta, {
9357
9393
  parentName
9358
9394
  }) {
9359
9395
  const cli = utils.meowOrExit({
9360
9396
  argv,
9361
- config: config$l,
9397
+ config: config$m,
9362
9398
  importMeta,
9363
9399
  parentName
9364
9400
  });
@@ -9393,7 +9429,7 @@ async function run$l(argv, importMeta, {
9393
9429
  return;
9394
9430
  }
9395
9431
  if (cli.flags['dryRun']) {
9396
- logger.logger.log(DRY_RUN_BAILING_NOW$j);
9432
+ logger.logger.log(DRY_RUN_BAILING_NOW$k);
9397
9433
  return;
9398
9434
  }
9399
9435
  await handlePurlsShallowScore({
@@ -9447,10 +9483,10 @@ async function runRawNpm(argv) {
9447
9483
  }
9448
9484
 
9449
9485
  const {
9450
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$i,
9486
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$j,
9451
9487
  NPM
9452
9488
  } = constants;
9453
- const config$k = {
9489
+ const config$l = {
9454
9490
  commandName: 'raw-npm',
9455
9491
  description: `Temporarily disable the Socket ${NPM} wrapper`,
9456
9492
  hidden: false,
@@ -9464,21 +9500,21 @@ const config$k = {
9464
9500
  `
9465
9501
  };
9466
9502
  const cmdRawNpm = {
9467
- description: config$k.description,
9468
- hidden: config$k.hidden,
9469
- run: run$k
9503
+ description: config$l.description,
9504
+ hidden: config$l.hidden,
9505
+ run: run$l
9470
9506
  };
9471
- async function run$k(argv, importMeta, {
9507
+ async function run$l(argv, importMeta, {
9472
9508
  parentName
9473
9509
  }) {
9474
9510
  const cli = utils.meowOrExit({
9475
9511
  argv,
9476
- config: config$k,
9512
+ config: config$l,
9477
9513
  importMeta,
9478
9514
  parentName
9479
9515
  });
9480
9516
  if (cli.flags['dryRun']) {
9481
- logger.logger.log(DRY_RUN_BAILING_NOW$i);
9517
+ logger.logger.log(DRY_RUN_BAILING_NOW$j);
9482
9518
  return;
9483
9519
  }
9484
9520
  await runRawNpm(argv);
@@ -9503,10 +9539,10 @@ async function runRawNpx(argv) {
9503
9539
  }
9504
9540
 
9505
9541
  const {
9506
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$h,
9542
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$i,
9507
9543
  NPX
9508
9544
  } = constants;
9509
- const config$j = {
9545
+ const config$k = {
9510
9546
  commandName: 'raw-npx',
9511
9547
  description: `Temporarily disable the Socket ${NPX} wrapper`,
9512
9548
  hidden: false,
@@ -9520,27 +9556,27 @@ const config$j = {
9520
9556
  `
9521
9557
  };
9522
9558
  const cmdRawNpx = {
9523
- description: config$j.description,
9524
- hidden: config$j.hidden,
9525
- run: run$j
9559
+ description: config$k.description,
9560
+ hidden: config$k.hidden,
9561
+ run: run$k
9526
9562
  };
9527
- async function run$j(argv, importMeta, {
9563
+ async function run$k(argv, importMeta, {
9528
9564
  parentName
9529
9565
  }) {
9530
9566
  const cli = utils.meowOrExit({
9531
9567
  argv,
9532
- config: config$j,
9568
+ config: config$k,
9533
9569
  importMeta,
9534
9570
  parentName
9535
9571
  });
9536
9572
  if (cli.flags['dryRun']) {
9537
- logger.logger.log(DRY_RUN_BAILING_NOW$h);
9573
+ logger.logger.log(DRY_RUN_BAILING_NOW$i);
9538
9574
  return;
9539
9575
  }
9540
9576
  await runRawNpx(argv);
9541
9577
  }
9542
9578
 
9543
- const config$i = {
9579
+ const config$j = {
9544
9580
  commandName: 'create',
9545
9581
  description: '[Deprecated] Create a project report',
9546
9582
  hidden: false,
@@ -9554,16 +9590,16 @@ const config$i = {
9554
9590
  `
9555
9591
  };
9556
9592
  const cmdReportCreate = {
9557
- description: config$i.description,
9558
- hidden: config$i.hidden,
9559
- run: run$i
9593
+ description: config$j.description,
9594
+ hidden: config$j.hidden,
9595
+ run: run$j
9560
9596
  };
9561
- async function run$i(argv, importMeta, {
9597
+ async function run$j(argv, importMeta, {
9562
9598
  parentName
9563
9599
  }) {
9564
9600
  utils.meowOrExit({
9565
9601
  argv,
9566
- config: config$i,
9602
+ config: config$j,
9567
9603
  importMeta,
9568
9604
  parentName
9569
9605
  });
@@ -9571,7 +9607,7 @@ async function run$i(argv, importMeta, {
9571
9607
  process.exitCode = 1;
9572
9608
  }
9573
9609
 
9574
- const config$h = {
9610
+ const config$i = {
9575
9611
  commandName: 'view',
9576
9612
  description: '[Deprecated] View a project report',
9577
9613
  hidden: false,
@@ -9585,16 +9621,16 @@ const config$h = {
9585
9621
  `
9586
9622
  };
9587
9623
  const cmdReportView = {
9588
- description: config$h.description,
9589
- hidden: config$h.hidden,
9590
- run: run$h
9624
+ description: config$i.description,
9625
+ hidden: config$i.hidden,
9626
+ run: run$i
9591
9627
  };
9592
- async function run$h(argv, importMeta, {
9628
+ async function run$i(argv, importMeta, {
9593
9629
  parentName
9594
9630
  }) {
9595
9631
  utils.meowOrExit({
9596
9632
  argv,
9597
- config: config$h,
9633
+ config: config$i,
9598
9634
  importMeta,
9599
9635
  parentName
9600
9636
  });
@@ -9682,9 +9718,9 @@ async function handleCreateRepo({
9682
9718
  }
9683
9719
 
9684
9720
  const {
9685
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$g
9721
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$h
9686
9722
  } = constants;
9687
- const config$g = {
9723
+ const config$h = {
9688
9724
  commandName: 'create',
9689
9725
  description: 'Create a repository in an organization',
9690
9726
  hidden: false,
@@ -9747,16 +9783,16 @@ const config$g = {
9747
9783
  `
9748
9784
  };
9749
9785
  const cmdReposCreate = {
9750
- description: config$g.description,
9751
- hidden: config$g.hidden,
9752
- run: run$g
9786
+ description: config$h.description,
9787
+ hidden: config$h.hidden,
9788
+ run: run$h
9753
9789
  };
9754
- async function run$g(argv, importMeta, {
9790
+ async function run$h(argv, importMeta, {
9755
9791
  parentName
9756
9792
  }) {
9757
9793
  const cli = utils.meowOrExit({
9758
9794
  argv,
9759
- config: config$g,
9795
+ config: config$h,
9760
9796
  importMeta,
9761
9797
  parentName
9762
9798
  });
@@ -9801,7 +9837,7 @@ async function run$g(argv, importMeta, {
9801
9837
  return;
9802
9838
  }
9803
9839
  if (dryRun) {
9804
- logger.logger.log(DRY_RUN_BAILING_NOW$g);
9840
+ logger.logger.log(DRY_RUN_BAILING_NOW$h);
9805
9841
  return;
9806
9842
  }
9807
9843
  await handleCreateRepo({
@@ -9844,9 +9880,9 @@ async function handleDeleteRepo(orgSlug, repoName, outputKind) {
9844
9880
  }
9845
9881
 
9846
9882
  const {
9847
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$f
9883
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$g
9848
9884
  } = constants;
9849
- const config$f = {
9885
+ const config$g = {
9850
9886
  commandName: 'del',
9851
9887
  description: 'Delete a repository in an organization',
9852
9888
  hidden: false,
@@ -9879,16 +9915,16 @@ const config$f = {
9879
9915
  `
9880
9916
  };
9881
9917
  const cmdReposDel = {
9882
- description: config$f.description,
9883
- hidden: config$f.hidden,
9884
- run: run$f
9918
+ description: config$g.description,
9919
+ hidden: config$g.hidden,
9920
+ run: run$g
9885
9921
  };
9886
- async function run$f(argv, importMeta, {
9922
+ async function run$g(argv, importMeta, {
9887
9923
  parentName
9888
9924
  }) {
9889
9925
  const cli = utils.meowOrExit({
9890
9926
  argv,
9891
- config: config$f,
9927
+ config: config$g,
9892
9928
  importMeta,
9893
9929
  parentName
9894
9930
  });
@@ -9925,7 +9961,7 @@ async function run$f(argv, importMeta, {
9925
9961
  return;
9926
9962
  }
9927
9963
  if (dryRun) {
9928
- logger.logger.log(DRY_RUN_BAILING_NOW$f);
9964
+ logger.logger.log(DRY_RUN_BAILING_NOW$g);
9929
9965
  return;
9930
9966
  }
9931
9967
  await handleDeleteRepo(orgSlug, repoName, outputKind);
@@ -10087,9 +10123,9 @@ async function handleListRepos({
10087
10123
  }
10088
10124
 
10089
10125
  const {
10090
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$e
10126
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$f
10091
10127
  } = constants;
10092
- const config$e = {
10128
+ const config$f = {
10093
10129
  commandName: 'list',
10094
10130
  description: 'List repositories in an organization',
10095
10131
  hidden: false,
@@ -10150,16 +10186,16 @@ const config$e = {
10150
10186
  `
10151
10187
  };
10152
10188
  const cmdReposList = {
10153
- description: config$e.description,
10154
- hidden: config$e.hidden,
10155
- run: run$e
10189
+ description: config$f.description,
10190
+ hidden: config$f.hidden,
10191
+ run: run$f
10156
10192
  };
10157
- async function run$e(argv, importMeta, {
10193
+ async function run$f(argv, importMeta, {
10158
10194
  parentName
10159
10195
  }) {
10160
10196
  const cli = utils.meowOrExit({
10161
10197
  argv,
10162
- config: config$e,
10198
+ config: config$f,
10163
10199
  importMeta,
10164
10200
  parentName
10165
10201
  });
@@ -10204,7 +10240,7 @@ async function run$e(argv, importMeta, {
10204
10240
  return;
10205
10241
  }
10206
10242
  if (cli.flags['dryRun']) {
10207
- logger.logger.log(DRY_RUN_BAILING_NOW$e);
10243
+ logger.logger.log(DRY_RUN_BAILING_NOW$f);
10208
10244
  return;
10209
10245
  }
10210
10246
  await handleListRepos({
@@ -10276,9 +10312,9 @@ async function handleUpdateRepo({
10276
10312
  }
10277
10313
 
10278
10314
  const {
10279
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$d
10315
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$e
10280
10316
  } = constants;
10281
- const config$d = {
10317
+ const config$e = {
10282
10318
  commandName: 'update',
10283
10319
  description: 'Update a repository in an organization',
10284
10320
  hidden: false,
@@ -10341,16 +10377,16 @@ const config$d = {
10341
10377
  `
10342
10378
  };
10343
10379
  const cmdReposUpdate = {
10344
- description: config$d.description,
10345
- hidden: config$d.hidden,
10346
- run: run$d
10380
+ description: config$e.description,
10381
+ hidden: config$e.hidden,
10382
+ run: run$e
10347
10383
  };
10348
- async function run$d(argv, importMeta, {
10384
+ async function run$e(argv, importMeta, {
10349
10385
  parentName
10350
10386
  }) {
10351
10387
  const cli = utils.meowOrExit({
10352
10388
  argv,
10353
- config: config$d,
10389
+ config: config$e,
10354
10390
  importMeta,
10355
10391
  parentName
10356
10392
  });
@@ -10395,7 +10431,7 @@ async function run$d(argv, importMeta, {
10395
10431
  return;
10396
10432
  }
10397
10433
  if (cli.flags['dryRun']) {
10398
- logger.logger.log(DRY_RUN_BAILING_NOW$d);
10434
+ logger.logger.log(DRY_RUN_BAILING_NOW$e);
10399
10435
  return;
10400
10436
  }
10401
10437
  await handleUpdateRepo({
@@ -10463,9 +10499,9 @@ async function handleViewRepo(orgSlug, repoName, outputKind) {
10463
10499
  }
10464
10500
 
10465
10501
  const {
10466
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$c
10502
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$d
10467
10503
  } = constants;
10468
- const config$c = {
10504
+ const config$d = {
10469
10505
  commandName: 'view',
10470
10506
  description: 'View repositories in an organization',
10471
10507
  hidden: false,
@@ -10503,16 +10539,16 @@ const config$c = {
10503
10539
  `
10504
10540
  };
10505
10541
  const cmdReposView = {
10506
- description: config$c.description,
10507
- hidden: config$c.hidden,
10508
- run: run$c
10542
+ description: config$d.description,
10543
+ hidden: config$d.hidden,
10544
+ run: run$d
10509
10545
  };
10510
- async function run$c(argv, importMeta, {
10546
+ async function run$d(argv, importMeta, {
10511
10547
  parentName
10512
10548
  }) {
10513
10549
  const cli = utils.meowOrExit({
10514
10550
  argv,
10515
- config: config$c,
10551
+ config: config$d,
10516
10552
  importMeta,
10517
10553
  parentName
10518
10554
  });
@@ -10562,7 +10598,7 @@ async function run$c(argv, importMeta, {
10562
10598
  return;
10563
10599
  }
10564
10600
  if (cli.flags['dryRun']) {
10565
- logger.logger.log(DRY_RUN_BAILING_NOW$c);
10601
+ logger.logger.log(DRY_RUN_BAILING_NOW$d);
10566
10602
  return;
10567
10603
  }
10568
10604
  await handleViewRepo(orgSlug, String(repoName), outputKind);
@@ -10610,9 +10646,9 @@ async function suggestTarget() {
10610
10646
  }
10611
10647
 
10612
10648
  const {
10613
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$b
10649
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$c
10614
10650
  } = constants;
10615
- const config$b = {
10651
+ const config$c = {
10616
10652
  commandName: 'create',
10617
10653
  description: 'Create a scan',
10618
10654
  hidden: false,
@@ -10744,16 +10780,16 @@ const config$b = {
10744
10780
  `
10745
10781
  };
10746
10782
  const cmdScanCreate = {
10747
- description: config$b.description,
10748
- hidden: config$b.hidden,
10749
- run: run$b
10783
+ description: config$c.description,
10784
+ hidden: config$c.hidden,
10785
+ run: run$c
10750
10786
  };
10751
- async function run$b(argv, importMeta, {
10787
+ async function run$c(argv, importMeta, {
10752
10788
  parentName
10753
10789
  }) {
10754
10790
  const cli = utils.meowOrExit({
10755
10791
  argv,
10756
- config: config$b,
10792
+ config: config$c,
10757
10793
  importMeta,
10758
10794
  parentName
10759
10795
  });
@@ -10904,7 +10940,7 @@ async function run$b(argv, importMeta, {
10904
10940
 
10905
10941
  // Note exiting earlier to skirt a hidden auth requirement
10906
10942
  if (dryRun) {
10907
- logger.logger.log(DRY_RUN_BAILING_NOW$b);
10943
+ logger.logger.log(DRY_RUN_BAILING_NOW$c);
10908
10944
  return;
10909
10945
  }
10910
10946
  await handleCreateNewScan({
@@ -10958,9 +10994,9 @@ async function handleDeleteScan(orgSlug, scanId, outputKind) {
10958
10994
  }
10959
10995
 
10960
10996
  const {
10961
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$a
10997
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$b
10962
10998
  } = constants;
10963
- const config$a = {
10999
+ const config$b = {
10964
11000
  commandName: 'del',
10965
11001
  description: 'Delete a scan',
10966
11002
  hidden: false,
@@ -10993,16 +11029,16 @@ const config$a = {
10993
11029
  `
10994
11030
  };
10995
11031
  const cmdScanDel = {
10996
- description: config$a.description,
10997
- hidden: config$a.hidden,
10998
- run: run$a
11032
+ description: config$b.description,
11033
+ hidden: config$b.hidden,
11034
+ run: run$b
10999
11035
  };
11000
- async function run$a(argv, importMeta, {
11036
+ async function run$b(argv, importMeta, {
11001
11037
  parentName
11002
11038
  }) {
11003
11039
  const cli = utils.meowOrExit({
11004
11040
  argv,
11005
- config: config$a,
11041
+ config: config$b,
11006
11042
  importMeta,
11007
11043
  parentName
11008
11044
  });
@@ -11039,7 +11075,7 @@ async function run$a(argv, importMeta, {
11039
11075
  return;
11040
11076
  }
11041
11077
  if (cli.flags['dryRun']) {
11042
- logger.logger.log(DRY_RUN_BAILING_NOW$a);
11078
+ logger.logger.log(DRY_RUN_BAILING_NOW$b);
11043
11079
  return;
11044
11080
  }
11045
11081
  await handleDeleteScan(orgSlug, scanId, outputKind);
@@ -11233,14 +11269,14 @@ async function handleDiffScan({
11233
11269
  }
11234
11270
 
11235
11271
  const {
11236
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$9,
11272
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$a,
11237
11273
  SOCKET_WEBSITE_URL: SOCKET_WEBSITE_URL$1
11238
11274
  } = constants;
11239
11275
  const SOCKET_SBOM_URL_PREFIX = `${SOCKET_WEBSITE_URL$1}/dashboard/org/SocketDev/sbom/`;
11240
11276
  const {
11241
11277
  length: SOCKET_SBOM_URL_PREFIX_LENGTH
11242
11278
  } = SOCKET_SBOM_URL_PREFIX;
11243
- const config$9 = {
11279
+ const config$a = {
11244
11280
  commandName: 'diff',
11245
11281
  description: 'See what changed between two Scans',
11246
11282
  hidden: false,
@@ -11292,16 +11328,16 @@ const config$9 = {
11292
11328
  `
11293
11329
  };
11294
11330
  const cmdScanDiff = {
11295
- description: config$9.description,
11296
- hidden: config$9.hidden,
11297
- run: run$9
11331
+ description: config$a.description,
11332
+ hidden: config$a.hidden,
11333
+ run: run$a
11298
11334
  };
11299
- async function run$9(argv, importMeta, {
11335
+ async function run$a(argv, importMeta, {
11300
11336
  parentName
11301
11337
  }) {
11302
11338
  const cli = utils.meowOrExit({
11303
11339
  argv,
11304
- config: config$9,
11340
+ config: config$a,
11305
11341
  importMeta,
11306
11342
  parentName
11307
11343
  });
@@ -11353,7 +11389,7 @@ async function run$9(argv, importMeta, {
11353
11389
  return;
11354
11390
  }
11355
11391
  if (cli.flags['dryRun']) {
11356
- logger.logger.log(DRY_RUN_BAILING_NOW$9);
11392
+ logger.logger.log(DRY_RUN_BAILING_NOW$a);
11357
11393
  return;
11358
11394
  }
11359
11395
  await handleDiffScan({
@@ -11985,9 +12021,9 @@ async function handleCreateGithubScan({
11985
12021
  }
11986
12022
 
11987
12023
  const {
11988
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$8
12024
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$9
11989
12025
  } = constants;
11990
- const config$8 = {
12026
+ const config$9 = {
11991
12027
  commandName: 'github',
11992
12028
  description: 'Create a scan for given GitHub repo',
11993
12029
  hidden: true,
@@ -12054,16 +12090,16 @@ const config$8 = {
12054
12090
  `
12055
12091
  };
12056
12092
  const cmdScanGithub = {
12057
- description: config$8.description,
12058
- hidden: config$8.hidden,
12059
- run: run$8
12093
+ description: config$9.description,
12094
+ hidden: config$9.hidden,
12095
+ run: run$9
12060
12096
  };
12061
- async function run$8(argv, importMeta, {
12097
+ async function run$9(argv, importMeta, {
12062
12098
  parentName
12063
12099
  }) {
12064
12100
  const cli = utils.meowOrExit({
12065
12101
  argv,
12066
- config: config$8,
12102
+ config: config$9,
12067
12103
  importMeta,
12068
12104
  parentName
12069
12105
  });
@@ -12171,7 +12207,7 @@ async function run$8(argv, importMeta, {
12171
12207
 
12172
12208
  // Note exiting earlier to skirt a hidden auth requirement
12173
12209
  if (dryRun) {
12174
- logger.logger.log(DRY_RUN_BAILING_NOW$8);
12210
+ logger.logger.log(DRY_RUN_BAILING_NOW$9);
12175
12211
  return;
12176
12212
  }
12177
12213
  await handleCreateGithubScan({
@@ -12288,9 +12324,9 @@ async function handleListScans({
12288
12324
  }
12289
12325
 
12290
12326
  const {
12291
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$7
12327
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$8
12292
12328
  } = constants;
12293
- const config$7 = {
12329
+ const config$8 = {
12294
12330
  commandName: 'list',
12295
12331
  description: 'List the scans for an organization',
12296
12332
  hidden: false,
@@ -12367,16 +12403,16 @@ const config$7 = {
12367
12403
  `
12368
12404
  };
12369
12405
  const cmdScanList = {
12370
- description: config$7.description,
12371
- hidden: config$7.hidden,
12372
- run: run$7
12406
+ description: config$8.description,
12407
+ hidden: config$8.hidden,
12408
+ run: run$8
12373
12409
  };
12374
- async function run$7(argv, importMeta, {
12410
+ async function run$8(argv, importMeta, {
12375
12411
  parentName
12376
12412
  }) {
12377
12413
  const cli = utils.meowOrExit({
12378
12414
  argv,
12379
- config: config$7,
12415
+ config: config$8,
12380
12416
  importMeta,
12381
12417
  parentName
12382
12418
  });
@@ -12415,7 +12451,7 @@ async function run$7(argv, importMeta, {
12415
12451
  return;
12416
12452
  }
12417
12453
  if (cli.flags['dryRun']) {
12418
- logger.logger.log(DRY_RUN_BAILING_NOW$7);
12454
+ logger.logger.log(DRY_RUN_BAILING_NOW$8);
12419
12455
  return;
12420
12456
  }
12421
12457
  await handleListScans({
@@ -12475,9 +12511,9 @@ async function handleOrgScanMetadata(orgSlug, scanId, outputKind) {
12475
12511
  }
12476
12512
 
12477
12513
  const {
12478
- DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$6
12514
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$7
12479
12515
  } = constants;
12480
- const config$6 = {
12516
+ const config$7 = {
12481
12517
  commandName: 'metadata',
12482
12518
  description: "Get a scan's metadata",
12483
12519
  hidden: false,
@@ -12510,16 +12546,16 @@ const config$6 = {
12510
12546
  `
12511
12547
  };
12512
12548
  const cmdScanMetadata = {
12513
- description: config$6.description,
12514
- hidden: config$6.hidden,
12515
- run: run$6
12549
+ description: config$7.description,
12550
+ hidden: config$7.hidden,
12551
+ run: run$7
12516
12552
  };
12517
- async function run$6(argv, importMeta, {
12553
+ async function run$7(argv, importMeta, {
12518
12554
  parentName
12519
12555
  }) {
12520
12556
  const cli = utils.meowOrExit({
12521
12557
  argv,
12522
- config: config$6,
12558
+ config: config$7,
12523
12559
  importMeta,
12524
12560
  parentName
12525
12561
  });
@@ -12562,12 +12598,105 @@ async function run$6(argv, importMeta, {
12562
12598
  return;
12563
12599
  }
12564
12600
  if (cli.flags['dryRun']) {
12565
- logger.logger.log(DRY_RUN_BAILING_NOW$6);
12601
+ logger.logger.log(DRY_RUN_BAILING_NOW$7);
12566
12602
  return;
12567
12603
  }
12568
12604
  await handleOrgScanMetadata(orgSlug, scanId, outputKind);
12569
12605
  }
12570
12606
 
12607
+ async function outputScanReach(result, cwd, outputKind) {
12608
+ if (!result.ok) {
12609
+ process.exitCode = result.code ?? 1;
12610
+ }
12611
+ if (outputKind === 'json') {
12612
+ logger.logger.log(utils.serializeResultJson(result));
12613
+ return;
12614
+ }
12615
+ if (!result.ok) {
12616
+ logger.logger.fail(utils.failMsgWithBadge(result.message, result.cause));
12617
+ return;
12618
+ }
12619
+ logger.logger.success('finished on', cwd);
12620
+ }
12621
+
12622
+ async function scanReachability(cwd) {
12623
+ logger.logger.log('Scanning now... as soon as you implement me! From', cwd);
12624
+ return {
12625
+ ok: true,
12626
+ data: undefined
12627
+ };
12628
+ }
12629
+
12630
+ async function handleScanReach(cwd, outputKind) {
12631
+ const result = await scanReachability(cwd);
12632
+ await outputScanReach(result, cwd, outputKind);
12633
+ }
12634
+
12635
+ const {
12636
+ DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$6
12637
+ } = constants;
12638
+ const config$6 = {
12639
+ commandName: 'reach',
12640
+ description: 'Compute tier 1 reachability',
12641
+ hidden: true,
12642
+ flags: {
12643
+ ...utils.commonFlags,
12644
+ ...utils.outputFlags,
12645
+ interactive: {
12646
+ type: 'boolean',
12647
+ default: true,
12648
+ description: 'Allow for interactive elements, asking for input. Use --no-interactive to prevent any input questions, defaulting them to cancel/no.'
12649
+ }
12650
+ },
12651
+ help: (command, config) => `
12652
+ Usage
12653
+ $ ${command} [CWD=.]
12654
+
12655
+ Options
12656
+ ${utils.getFlagListOutput(config.flags, 6)}
12657
+
12658
+ Examples
12659
+ $ ${command}
12660
+ $ ${command} ./proj
12661
+ `
12662
+ };
12663
+ const cmdScanReach = {
12664
+ description: config$6.description,
12665
+ hidden: config$6.hidden,
12666
+ run: run$6
12667
+ };
12668
+ async function run$6(argv, importMeta, {
12669
+ parentName
12670
+ }) {
12671
+ const cli = utils.meowOrExit({
12672
+ argv,
12673
+ config: config$6,
12674
+ importMeta,
12675
+ parentName
12676
+ });
12677
+ const {
12678
+ dryRun,
12679
+ interactive,
12680
+ json,
12681
+ markdown
12682
+ } = cli.flags;
12683
+ const outputKind = utils.getOutputKind(json, markdown);
12684
+ let [cwd = '.'] = cli.input;
12685
+ // Note: path.resolve vs .join:
12686
+ // If given path is absolute then cwd should not affect it.
12687
+ cwd = path.resolve(process.cwd(), cwd);
12688
+ logger.logger.info('If you dont have any interactive bits then drop the flag', interactive);
12689
+ const wasValidInput = utils.checkCommandInput(outputKind);
12690
+ if (!wasValidInput) {
12691
+ return;
12692
+ }
12693
+ if (dryRun) {
12694
+ logger.logger.log(DRY_RUN_BAILING_NOW$6);
12695
+ return;
12696
+ }
12697
+ await handleScanReach(cwd, outputKind);
12698
+ }
12699
+
12571
12700
  const {
12572
12701
  DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$5
12573
12702
  } = constants;
@@ -13315,6 +13444,7 @@ const cmdScan = {
13315
13444
  github: cmdScanGithub,
13316
13445
  list: cmdScanList,
13317
13446
  metadata: cmdScanMetadata,
13447
+ reach: cmdScanReach,
13318
13448
  report: cmdScanReport,
13319
13449
  setup: cmdScanSetup,
13320
13450
  view: cmdScanView
@@ -13815,12 +13945,15 @@ function addSocketWrapper(file) {
13815
13945
  if (err) {
13816
13946
  return new Error(`There was an error setting up the alias: ${err}`);
13817
13947
  }
13818
- // TODO: pretty sure you need to source the file or restart
13819
- // any terminal session before changes are reflected.
13820
- logger.logger.log(`
13821
- The alias was added to ${file}. Running 'npm install' will now be wrapped in Socket's "safe npm" 🎉
13822
- If you want to disable it at any time, run \`socket wrapper --disable\`
13823
- `.trim());
13948
+ logger.logger.success(`The alias was added to ${file}. Running 'npm install' will now be wrapped in Socket's "safe npm" 🎉`);
13949
+ logger.logger.log(` If you want to disable it at any time, run \`socket wrapper --disable\``);
13950
+ logger.logger.log('');
13951
+ logger.logger.info(`This will only be active in new terminal sessions going forward.`);
13952
+ logger.logger.log(` You will need to restart your terminal or run this command to activate the alias in the current session:`);
13953
+ logger.logger.log('');
13954
+ logger.logger.log(` source ${file}`);
13955
+ logger.logger.log('');
13956
+ logger.logger.log(`(You only need to do this once)`);
13824
13957
  });
13825
13958
  }
13826
13959
 
@@ -13828,7 +13961,12 @@ function checkSocketWrapperSetup(file) {
13828
13961
  const fileContent = fs$1.readFileSync(file, 'utf8');
13829
13962
  const linesWithSocketAlias = fileContent.split('\n').filter(l => l === 'alias npm="socket npm"' || l === 'alias npx="socket npx"');
13830
13963
  if (linesWithSocketAlias.length) {
13831
- logger.logger.log(`The Socket npm/npx wrapper is set up in your bash profile (${file})`);
13964
+ logger.logger.log(`The Socket npm/npx wrapper is set up in your bash profile (${file}).`);
13965
+ logger.logger.log('');
13966
+ logger.logger.log(`If you haven't already since enabling; Restart your terminal or run this command to activate it in the current session:`);
13967
+ logger.logger.log('');
13968
+ logger.logger.log(` source ${file}`);
13969
+ logger.logger.log('');
13832
13970
  return true;
13833
13971
  }
13834
13972
  return false;
@@ -13921,9 +14059,9 @@ function removeSocketWrapper(file) {
13921
14059
  logger.logger.error(err);
13922
14060
  return;
13923
14061
  }
13924
- // TODO: pretty sure you need to source the file or restart
13925
- // any terminal session before changes are reflected.
13926
- logger.logger.log(`The alias was removed from ${file}. Running 'npm install' will now run the standard npm command.`);
14062
+ logger.logger.success(`The alias was removed from ${file}. Running 'npm install' will now run the standard npm command in new terminals going forward.`);
14063
+ logger.logger.log('');
14064
+ logger.logger.info(`Note: We cannot deactivate the alias from current terminal sessions. You have to restart existing terminal sessions to finalize this step.`);
13927
14065
  });
13928
14066
  });
13929
14067
  }
@@ -13980,22 +14118,34 @@ async function run(argv, importMeta, {
13980
14118
  parentName
13981
14119
  });
13982
14120
  const {
13983
- disable,
13984
- enable,
13985
14121
  json,
13986
14122
  markdown
13987
14123
  } = cli.flags;
14124
+ let {
14125
+ disable,
14126
+ enable
14127
+ } = cli.flags;
13988
14128
  const outputKind = utils.getOutputKind(json, markdown); // TODO: impl json/md further
13989
14129
 
14130
+ if (utils.isTestingV1()) {
14131
+ const [arg] = cli.input;
14132
+ if (arg === 'on' || arg === 'enable' || arg === 'enabled') {
14133
+ enable = true;
14134
+ disable = false;
14135
+ } else if (arg === 'off' || arg === 'disable' || arg === 'disabled') {
14136
+ enable = false;
14137
+ disable = true;
14138
+ }
14139
+ }
13990
14140
  const wasValidInput = utils.checkCommandInput(outputKind, {
13991
14141
  test: !!(enable || disable),
13992
- message: 'Must use --enabled or --disable',
14142
+ message: utils.isTestingV1() ? 'Must use on or off argument' : 'Must use --enable or --disable',
13993
14143
  pass: 'ok',
13994
14144
  fail: 'missing'
13995
14145
  }, {
13996
14146
  nook: true,
13997
14147
  test: !enable || !disable,
13998
- message: 'Do not use both --enable and --disable',
14148
+ message: utils.isTestingV1() ? 'Do not use both on and off' : 'Do not use both --enable and --disable',
13999
14149
  pass: 'ok',
14000
14150
  fail: 'missing'
14001
14151
  });
@@ -14110,5 +14260,5 @@ void (async () => {
14110
14260
  await utils.captureException(e);
14111
14261
  }
14112
14262
  })();
14113
- //# debugId=be0da273-d5db-4d1d-8182-19605e9ce808
14263
+ //# debugId=a7078a69-7665-417e-a14a-4c06fdddafa4
14114
14264
  //# sourceMappingURL=cli.js.map