@socketsecurity/cli-with-sentry 0.15.43 → 0.15.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +592 -455
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/shadow-inject.js +10 -3
- package/dist/shadow-inject.js.map +1 -1
- package/dist/types/commands/fix/git.d.mts +12 -5
- package/dist/types/commands/fix/git.d.mts.map +1 -1
- package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/open-pr.d.mts +2 -4
- package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +2 -2
- package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts +10 -0
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +1 -0
- package/dist/types/commands/scan/cmd-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +2 -2
- package/dist/types/commands/scan/fetch-report-data.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-scan.d.mts +2 -2
- package/dist/types/commands/scan/fetch-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/generate-report.d.mts +2 -2
- package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-reach-scan.d.mts +3 -0
- package/dist/types/commands/scan/handle-reach-scan.d.mts.map +1 -0
- package/dist/types/commands/scan/output-scan-reach.d.mts +3 -0
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +1 -0
- package/dist/types/commands/scan/output-scan-report.d.mts +2 -2
- package/dist/types/commands/scan/output-scan-report.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +2 -2
- package/dist/types/commands/scan/output-scan-view.d.mts.map +1 -1
- package/dist/types/commands/scan/scan-reachability.d.mts +3 -0
- package/dist/types/commands/scan/scan-reachability.d.mts.map +1 -0
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +1 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts +2 -2
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
- package/dist/types/utils/alert/artifact.d.mts +1 -0
- package/dist/types/utils/alert/artifact.d.mts.map +1 -1
- package/dist/types/utils/alerts-map.d.mts +3 -3
- package/dist/types/utils/alerts-map.d.mts.map +1 -1
- package/dist/types/utils/api.d.mts.map +1 -1
- package/dist/types/utils/fs.d.mts.map +1 -1
- package/dist/types/utils/glob.d.mts.map +1 -1
- package/dist/types/utils/purl.d.mts +95 -1
- package/dist/types/utils/purl.d.mts.map +1 -1
- package/dist/types/utils/socket-package-alert.d.mts +7 -6
- package/dist/types/utils/socket-package-alert.d.mts.map +1 -1
- package/dist/types/utils/socket-url.d.mts +4 -6
- package/dist/types/utils/socket-url.d.mts.map +1 -1
- package/dist/types/utils/spec.d.mts +2 -1
- package/dist/types/utils/spec.d.mts.map +1 -1
- package/dist/utils.js +167 -149
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +11381 -7009
- 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$
|
|
306
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$O
|
|
307
307
|
} = constants;
|
|
308
|
-
const config$
|
|
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$
|
|
371
|
-
hidden: config$
|
|
372
|
-
run: run$
|
|
370
|
+
description: config$T.description,
|
|
371
|
+
hidden: config$T.hidden,
|
|
372
|
+
run: run$T
|
|
373
373
|
};
|
|
374
|
-
async function run$
|
|
374
|
+
async function run$T(argv, importMeta, {
|
|
375
375
|
parentName
|
|
376
376
|
}) {
|
|
377
377
|
const cli = utils.meowOrExit({
|
|
378
378
|
argv,
|
|
379
|
-
config: config$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
721
|
-
hidden: config$
|
|
722
|
-
run: run$
|
|
720
|
+
description: config$S.description,
|
|
721
|
+
hidden: config$S.hidden,
|
|
722
|
+
run: run$S
|
|
723
723
|
};
|
|
724
|
-
async function run$
|
|
724
|
+
async function run$S(argv, importMeta, {
|
|
725
725
|
parentName
|
|
726
726
|
}) {
|
|
727
727
|
const cli = utils.meowOrExit({
|
|
728
728
|
argv,
|
|
729
|
-
config: config$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
1073
|
-
hidden: config$
|
|
1074
|
-
run: run$
|
|
1072
|
+
description: config$R.description,
|
|
1073
|
+
hidden: config$R.hidden,
|
|
1074
|
+
run: run$R
|
|
1075
1075
|
};
|
|
1076
|
-
async function run$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
1138
|
-
hidden: config$
|
|
1139
|
-
run: run$
|
|
1137
|
+
description: config$Q.description,
|
|
1138
|
+
hidden: config$Q.hidden,
|
|
1139
|
+
run: run$Q
|
|
1140
1140
|
};
|
|
1141
|
-
async function run$
|
|
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$
|
|
2374
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$L
|
|
2375
2375
|
} = constants;
|
|
2376
|
-
const config$
|
|
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$
|
|
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$
|
|
2410
|
-
hidden: config$
|
|
2411
|
-
run: run$
|
|
2409
|
+
description: config$P.description,
|
|
2410
|
+
hidden: config$P.hidden,
|
|
2411
|
+
run: run$P
|
|
2412
2412
|
};
|
|
2413
|
-
async function run$
|
|
2413
|
+
async function run$P(argv, importMeta, {
|
|
2414
2414
|
parentName
|
|
2415
2415
|
}) {
|
|
2416
2416
|
const cli = utils.meowOrExit({
|
|
2417
2417
|
argv,
|
|
2418
|
-
config: config$
|
|
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$
|
|
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$
|
|
2667
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$K
|
|
2668
2668
|
} = constants;
|
|
2669
|
-
const config$
|
|
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$
|
|
2699
|
-
hidden: config$
|
|
2700
|
-
run: run$
|
|
2698
|
+
description: config$O.description,
|
|
2699
|
+
hidden: config$O.hidden,
|
|
2700
|
+
run: run$O
|
|
2701
2701
|
};
|
|
2702
|
-
async function run$
|
|
2702
|
+
async function run$O(argv, importMeta, {
|
|
2703
2703
|
parentName
|
|
2704
2704
|
}) {
|
|
2705
2705
|
const cli = utils.meowOrExit({
|
|
2706
2706
|
argv,
|
|
2707
|
-
config: config$
|
|
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$
|
|
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$
|
|
2781
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$J
|
|
2782
2782
|
} = constants;
|
|
2783
|
-
const config$
|
|
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$
|
|
2808
|
-
hidden: config$
|
|
2809
|
-
run: run$
|
|
2807
|
+
description: config$N.description,
|
|
2808
|
+
hidden: config$N.hidden,
|
|
2809
|
+
run: run$N
|
|
2810
2810
|
};
|
|
2811
|
-
async function run$
|
|
2811
|
+
async function run$N(argv, importMeta, {
|
|
2812
2812
|
parentName
|
|
2813
2813
|
}) {
|
|
2814
2814
|
const cli = utils.meowOrExit({
|
|
2815
2815
|
argv,
|
|
2816
|
-
config: config$
|
|
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$
|
|
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$
|
|
2919
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$I
|
|
2920
2920
|
} = constants;
|
|
2921
|
-
const config$
|
|
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$
|
|
2951
|
-
hidden: config$
|
|
2952
|
-
run: run$
|
|
2950
|
+
description: config$M.description,
|
|
2951
|
+
hidden: config$M.hidden,
|
|
2952
|
+
run: run$M
|
|
2953
2953
|
};
|
|
2954
|
-
async function run$
|
|
2954
|
+
async function run$M(argv, importMeta, {
|
|
2955
2955
|
parentName
|
|
2956
2956
|
}) {
|
|
2957
2957
|
const cli = utils.meowOrExit({
|
|
2958
2958
|
argv,
|
|
2959
|
-
config: config$
|
|
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$
|
|
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$
|
|
3029
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$H
|
|
3030
3030
|
} = constants;
|
|
3031
|
-
const config$
|
|
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$
|
|
3061
|
-
hidden: config$
|
|
3062
|
-
run: run$
|
|
3060
|
+
description: config$L.description,
|
|
3061
|
+
hidden: config$L.hidden,
|
|
3062
|
+
run: run$L
|
|
3063
3063
|
};
|
|
3064
|
-
async function run$
|
|
3064
|
+
async function run$L(argv, importMeta, {
|
|
3065
3065
|
parentName
|
|
3066
3066
|
}) {
|
|
3067
3067
|
const cli = utils.meowOrExit({
|
|
3068
3068
|
argv,
|
|
3069
|
-
config: config$
|
|
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$
|
|
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$
|
|
3151
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$G
|
|
3152
3152
|
} = constants;
|
|
3153
|
-
const config$
|
|
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$
|
|
3178
|
-
hidden: config$
|
|
3179
|
-
run: run$
|
|
3177
|
+
description: config$K.description,
|
|
3178
|
+
hidden: config$K.hidden,
|
|
3179
|
+
run: run$K
|
|
3180
3180
|
};
|
|
3181
|
-
async function run$
|
|
3181
|
+
async function run$K(argv, importMeta, {
|
|
3182
3182
|
parentName
|
|
3183
3183
|
}) {
|
|
3184
3184
|
const cli = utils.meowOrExit({
|
|
3185
3185
|
argv,
|
|
3186
|
-
config: config$
|
|
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$
|
|
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$
|
|
3321
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$F
|
|
3322
3322
|
} = constants;
|
|
3323
|
-
const config$
|
|
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$
|
|
3360
|
-
hidden: config$
|
|
3361
|
-
run: run$
|
|
3359
|
+
description: config$J.description,
|
|
3360
|
+
hidden: config$J.hidden,
|
|
3361
|
+
run: run$J
|
|
3362
3362
|
};
|
|
3363
|
-
async function run$
|
|
3363
|
+
async function run$J(argv, importMeta, {
|
|
3364
3364
|
parentName
|
|
3365
3365
|
}) {
|
|
3366
3366
|
const cli = utils.meowOrExit({
|
|
3367
3367
|
argv,
|
|
3368
|
-
config: config$
|
|
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$
|
|
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$
|
|
3494
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$E
|
|
3495
3495
|
} = constants;
|
|
3496
|
-
const config$
|
|
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$
|
|
3556
|
-
hidden: config$
|
|
3557
|
-
run: run$
|
|
3555
|
+
description: config$I.description,
|
|
3556
|
+
hidden: config$I.hidden,
|
|
3557
|
+
run: run$I
|
|
3558
3558
|
};
|
|
3559
|
-
async function run$
|
|
3559
|
+
async function run$I(argv, importMeta, {
|
|
3560
3560
|
parentName
|
|
3561
3561
|
}) {
|
|
3562
3562
|
const cli = utils.meowOrExit({
|
|
3563
3563
|
argv,
|
|
3564
|
-
config: config$
|
|
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$
|
|
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(/[
|
|
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,13 +3667,28 @@ 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
|
|
3670
|
+
function getSocketBranchPurlTypeComponent(purl) {
|
|
3671
3671
|
const purlObj = utils.getPurlObject(purl);
|
|
3672
|
-
|
|
3673
|
-
|
|
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
|
-
|
|
3676
|
-
|
|
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
3693
|
return `socket/${fmtType}_${fmtWorkspace}_${fmtFullName}_${fmtVersion}_${fmtNewVersion}`;
|
|
3679
3694
|
}
|
|
@@ -3698,7 +3713,6 @@ function getSocketBranchPattern(options) {
|
|
|
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
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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 =
|
|
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 =
|
|
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
|
|
4346
|
+
const infoByPartialPurl = utils.getCveInfoFromAlertsMap(alertsMap, {
|
|
4333
4347
|
limit: limit + openPrs.length
|
|
4334
4348
|
});
|
|
4335
|
-
if (!
|
|
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 = [...
|
|
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
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
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(
|
|
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
|
|
4836
|
+
const infoByPartialPurl = utils.getCveInfoFromAlertsMap(alertsMap, {
|
|
4813
4837
|
limit: limit + openPrs.length
|
|
4814
4838
|
});
|
|
4815
|
-
if (!
|
|
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 = [...
|
|
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,28 @@ 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
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
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
|
+
infos = infos.filter(info => !activeBranches.find(b => b.newVersion === info.firstPatchedVersionIdentifier));
|
|
4885
|
+
}
|
|
4855
4886
|
if (!infos.length) {
|
|
4856
4887
|
continue infoEntriesLoop;
|
|
4857
4888
|
}
|
|
4858
4889
|
logger.logger.log(`Processing vulns for ${name}:`);
|
|
4859
4890
|
logger.logger.indent();
|
|
4860
4891
|
spinner?.indent();
|
|
4861
|
-
if (registry.getManifestData(
|
|
4892
|
+
if (registry.getManifestData(partialPurlObj.type, name)) {
|
|
4862
4893
|
debug.debugFn(`found: Socket Optimize variant for ${name}`);
|
|
4863
4894
|
}
|
|
4864
4895
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -4935,7 +4966,7 @@ async function pnpmFix(pkgEnvDetails, {
|
|
|
4935
4966
|
}
|
|
4936
4967
|
oldVersionsLoop: for (const oldVersion of oldVersions) {
|
|
4937
4968
|
const oldId = `${name}@${oldVersion}`;
|
|
4938
|
-
const oldPurl = utils.idToPurl(oldId);
|
|
4969
|
+
const oldPurl = utils.idToPurl(oldId, partialPurlObj.type);
|
|
4939
4970
|
const node = shadowInject.findPackageNode(actualTree, name, oldVersion);
|
|
4940
4971
|
if (!node) {
|
|
4941
4972
|
debug.debugFn(`skip: ${oldId} not found`);
|
|
@@ -5332,7 +5363,7 @@ async function handleFix({
|
|
|
5332
5363
|
const {
|
|
5333
5364
|
DRY_RUN_NOT_SAVING
|
|
5334
5365
|
} = constants;
|
|
5335
|
-
const config$
|
|
5366
|
+
const config$H = {
|
|
5336
5367
|
commandName: 'fix',
|
|
5337
5368
|
description: 'Update dependencies with "fixable" Socket alerts',
|
|
5338
5369
|
hidden: false,
|
|
@@ -5400,16 +5431,16 @@ const config$G = {
|
|
|
5400
5431
|
`
|
|
5401
5432
|
};
|
|
5402
5433
|
const cmdFix = {
|
|
5403
|
-
description: config$
|
|
5404
|
-
hidden: config$
|
|
5405
|
-
run: run$
|
|
5434
|
+
description: config$H.description,
|
|
5435
|
+
hidden: config$H.hidden,
|
|
5436
|
+
run: run$H
|
|
5406
5437
|
};
|
|
5407
|
-
async function run$
|
|
5438
|
+
async function run$H(argv, importMeta, {
|
|
5408
5439
|
parentName
|
|
5409
5440
|
}) {
|
|
5410
5441
|
const cli = utils.meowOrExit({
|
|
5411
5442
|
argv,
|
|
5412
|
-
config: config$
|
|
5443
|
+
config: config$H,
|
|
5413
5444
|
importMeta,
|
|
5414
5445
|
parentName
|
|
5415
5446
|
});
|
|
@@ -5611,9 +5642,9 @@ async function handlePackageInfo({
|
|
|
5611
5642
|
}
|
|
5612
5643
|
|
|
5613
5644
|
const {
|
|
5614
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
5645
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$D
|
|
5615
5646
|
} = constants;
|
|
5616
|
-
const config$
|
|
5647
|
+
const config$G = {
|
|
5617
5648
|
commandName: 'info',
|
|
5618
5649
|
description: 'Look up info regarding a package',
|
|
5619
5650
|
hidden: true,
|
|
@@ -5638,16 +5669,16 @@ const config$F = {
|
|
|
5638
5669
|
`
|
|
5639
5670
|
};
|
|
5640
5671
|
const cmdInfo = {
|
|
5641
|
-
description: config$
|
|
5642
|
-
hidden: config$
|
|
5643
|
-
run: run$
|
|
5672
|
+
description: config$G.description,
|
|
5673
|
+
hidden: config$G.hidden,
|
|
5674
|
+
run: run$G
|
|
5644
5675
|
};
|
|
5645
|
-
async function run$
|
|
5676
|
+
async function run$G(argv, importMeta, {
|
|
5646
5677
|
parentName
|
|
5647
5678
|
}) {
|
|
5648
5679
|
const cli = utils.meowOrExit({
|
|
5649
5680
|
argv,
|
|
5650
|
-
config: config$
|
|
5681
|
+
config: config$G,
|
|
5651
5682
|
importMeta,
|
|
5652
5683
|
parentName
|
|
5653
5684
|
});
|
|
@@ -5684,11 +5715,11 @@ async function run$F(argv, importMeta, {
|
|
|
5684
5715
|
const pkgName = versionSeparator < 1 ? rawPkgName : rawPkgName.slice(0, versionSeparator);
|
|
5685
5716
|
const pkgVersion = versionSeparator < 1 ? 'latest' : rawPkgName.slice(versionSeparator + 1);
|
|
5686
5717
|
if (cli.flags['dryRun']) {
|
|
5687
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
5718
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$D);
|
|
5688
5719
|
return;
|
|
5689
5720
|
}
|
|
5690
5721
|
await handlePackageInfo({
|
|
5691
|
-
commandName: `${parentName} ${config$
|
|
5722
|
+
commandName: `${parentName} ${config$G.commandName}`,
|
|
5692
5723
|
includeAllIssues: Boolean(all),
|
|
5693
5724
|
outputKind,
|
|
5694
5725
|
pkgName,
|
|
@@ -5816,9 +5847,9 @@ async function handleInstallCompletion(targetName) {
|
|
|
5816
5847
|
}
|
|
5817
5848
|
|
|
5818
5849
|
const {
|
|
5819
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
5850
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$C
|
|
5820
5851
|
} = constants;
|
|
5821
|
-
const config$
|
|
5852
|
+
const config$F = {
|
|
5822
5853
|
commandName: 'completion',
|
|
5823
5854
|
description: 'Install bash completion for Socket CLI',
|
|
5824
5855
|
hidden: true,
|
|
@@ -5856,22 +5887,22 @@ const config$E = {
|
|
|
5856
5887
|
`
|
|
5857
5888
|
};
|
|
5858
5889
|
const cmdInstallCompletion = {
|
|
5859
|
-
description: config$
|
|
5860
|
-
hidden: config$
|
|
5861
|
-
run: run$
|
|
5890
|
+
description: config$F.description,
|
|
5891
|
+
hidden: config$F.hidden,
|
|
5892
|
+
run: run$F
|
|
5862
5893
|
};
|
|
5863
|
-
async function run$
|
|
5894
|
+
async function run$F(argv, importMeta, {
|
|
5864
5895
|
parentName
|
|
5865
5896
|
}) {
|
|
5866
5897
|
const cli = utils.meowOrExit({
|
|
5867
5898
|
argv,
|
|
5868
|
-
config: config$
|
|
5899
|
+
config: config$F,
|
|
5869
5900
|
importMeta,
|
|
5870
5901
|
parentName
|
|
5871
5902
|
});
|
|
5872
5903
|
const targetName = cli.input[0] || 'socket';
|
|
5873
5904
|
if (cli.flags['dryRun']) {
|
|
5874
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
5905
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$C);
|
|
5875
5906
|
return;
|
|
5876
5907
|
}
|
|
5877
5908
|
await handleInstallCompletion(String(targetName));
|
|
@@ -5989,9 +6020,9 @@ async function attemptLogin(apiBaseUrl, apiProxy) {
|
|
|
5989
6020
|
}
|
|
5990
6021
|
|
|
5991
6022
|
const {
|
|
5992
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
6023
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$B
|
|
5993
6024
|
} = constants;
|
|
5994
|
-
const config$
|
|
6025
|
+
const config$E = {
|
|
5995
6026
|
commandName: 'login',
|
|
5996
6027
|
description: 'Socket API login',
|
|
5997
6028
|
hidden: false,
|
|
@@ -6024,23 +6055,23 @@ const config$D = {
|
|
|
6024
6055
|
`
|
|
6025
6056
|
};
|
|
6026
6057
|
const cmdLogin = {
|
|
6027
|
-
description: config$
|
|
6028
|
-
hidden: config$
|
|
6029
|
-
run: run$
|
|
6058
|
+
description: config$E.description,
|
|
6059
|
+
hidden: config$E.hidden,
|
|
6060
|
+
run: run$E
|
|
6030
6061
|
};
|
|
6031
|
-
async function run$
|
|
6062
|
+
async function run$E(argv, importMeta, {
|
|
6032
6063
|
parentName
|
|
6033
6064
|
}) {
|
|
6034
6065
|
const cli = utils.meowOrExit({
|
|
6035
6066
|
argv,
|
|
6036
|
-
config: config$
|
|
6067
|
+
config: config$E,
|
|
6037
6068
|
importMeta,
|
|
6038
6069
|
parentName
|
|
6039
6070
|
});
|
|
6040
6071
|
const apiBaseUrl = cli.flags['apiBaseUrl'];
|
|
6041
6072
|
const apiProxy = cli.flags['apiProxy'];
|
|
6042
6073
|
if (cli.flags['dryRun']) {
|
|
6043
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
6074
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$B);
|
|
6044
6075
|
return;
|
|
6045
6076
|
}
|
|
6046
6077
|
if (!vendor.isInteractiveExports()) {
|
|
@@ -6070,9 +6101,9 @@ function attemptLogout() {
|
|
|
6070
6101
|
}
|
|
6071
6102
|
|
|
6072
6103
|
const {
|
|
6073
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
6104
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$A
|
|
6074
6105
|
} = constants;
|
|
6075
|
-
const config$
|
|
6106
|
+
const config$D = {
|
|
6076
6107
|
commandName: 'logout',
|
|
6077
6108
|
description: 'Socket API logout',
|
|
6078
6109
|
hidden: false,
|
|
@@ -6087,30 +6118,30 @@ const config$C = {
|
|
|
6087
6118
|
`
|
|
6088
6119
|
};
|
|
6089
6120
|
const cmdLogout = {
|
|
6090
|
-
description: config$
|
|
6091
|
-
hidden: config$
|
|
6092
|
-
run: run$
|
|
6121
|
+
description: config$D.description,
|
|
6122
|
+
hidden: config$D.hidden,
|
|
6123
|
+
run: run$D
|
|
6093
6124
|
};
|
|
6094
|
-
async function run$
|
|
6125
|
+
async function run$D(argv, importMeta, {
|
|
6095
6126
|
parentName
|
|
6096
6127
|
}) {
|
|
6097
6128
|
const cli = utils.meowOrExit({
|
|
6098
6129
|
argv,
|
|
6099
|
-
config: config$
|
|
6130
|
+
config: config$D,
|
|
6100
6131
|
importMeta,
|
|
6101
6132
|
parentName
|
|
6102
6133
|
});
|
|
6103
6134
|
if (cli.flags['dryRun']) {
|
|
6104
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
6135
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$A);
|
|
6105
6136
|
return;
|
|
6106
6137
|
}
|
|
6107
6138
|
attemptLogout();
|
|
6108
6139
|
}
|
|
6109
6140
|
|
|
6110
6141
|
const {
|
|
6111
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
6142
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$z
|
|
6112
6143
|
} = constants;
|
|
6113
|
-
const config$
|
|
6144
|
+
const config$C = {
|
|
6114
6145
|
commandName: 'auto',
|
|
6115
6146
|
description: 'Auto-detect build and attempt to generate manifest file',
|
|
6116
6147
|
hidden: false,
|
|
@@ -6143,16 +6174,16 @@ const config$B = {
|
|
|
6143
6174
|
`
|
|
6144
6175
|
};
|
|
6145
6176
|
const cmdManifestAuto = {
|
|
6146
|
-
description: config$
|
|
6147
|
-
hidden: config$
|
|
6148
|
-
run: run$
|
|
6177
|
+
description: config$C.description,
|
|
6178
|
+
hidden: config$C.hidden,
|
|
6179
|
+
run: run$C
|
|
6149
6180
|
};
|
|
6150
|
-
async function run$
|
|
6181
|
+
async function run$C(argv, importMeta, {
|
|
6151
6182
|
parentName
|
|
6152
6183
|
}) {
|
|
6153
6184
|
const cli = utils.meowOrExit({
|
|
6154
6185
|
argv,
|
|
6155
|
-
config: config$
|
|
6186
|
+
config: config$C,
|
|
6156
6187
|
importMeta,
|
|
6157
6188
|
parentName
|
|
6158
6189
|
});
|
|
@@ -6168,7 +6199,7 @@ async function run$B(argv, importMeta, {
|
|
|
6168
6199
|
// If given path is absolute then cwd should not affect it.
|
|
6169
6200
|
cwd = path.resolve(process.cwd(), cwd);
|
|
6170
6201
|
if (verbose) {
|
|
6171
|
-
logger.logger.group('- ', parentName, config$
|
|
6202
|
+
logger.logger.group('- ', parentName, config$C.commandName, ':');
|
|
6172
6203
|
logger.logger.group('- flags:', cli.flags);
|
|
6173
6204
|
logger.logger.groupEnd();
|
|
6174
6205
|
logger.logger.log('- input:', cli.input);
|
|
@@ -6179,7 +6210,7 @@ async function run$B(argv, importMeta, {
|
|
|
6179
6210
|
const detected = await detectManifestActions(socketJson, cwd);
|
|
6180
6211
|
debug.debugLog('[DEBUG]', detected);
|
|
6181
6212
|
if (cli.flags['dryRun']) {
|
|
6182
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
6213
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$z);
|
|
6183
6214
|
return;
|
|
6184
6215
|
}
|
|
6185
6216
|
if (!detected.count) {
|
|
@@ -6201,9 +6232,9 @@ async function run$B(argv, importMeta, {
|
|
|
6201
6232
|
}
|
|
6202
6233
|
|
|
6203
6234
|
const {
|
|
6204
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
6235
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$y
|
|
6205
6236
|
} = constants;
|
|
6206
|
-
const config$
|
|
6237
|
+
const config$B = {
|
|
6207
6238
|
commandName: 'conda',
|
|
6208
6239
|
description: '[beta] Convert a Conda environment.yml file to a python requirements.txt',
|
|
6209
6240
|
hidden: false,
|
|
@@ -6254,16 +6285,16 @@ const config$A = {
|
|
|
6254
6285
|
`
|
|
6255
6286
|
};
|
|
6256
6287
|
const cmdManifestConda = {
|
|
6257
|
-
description: config$
|
|
6258
|
-
hidden: config$
|
|
6259
|
-
run: run$
|
|
6288
|
+
description: config$B.description,
|
|
6289
|
+
hidden: config$B.hidden,
|
|
6290
|
+
run: run$B
|
|
6260
6291
|
};
|
|
6261
|
-
async function run$
|
|
6292
|
+
async function run$B(argv, importMeta, {
|
|
6262
6293
|
parentName
|
|
6263
6294
|
}) {
|
|
6264
6295
|
const cli = utils.meowOrExit({
|
|
6265
6296
|
argv,
|
|
6266
|
-
config: config$
|
|
6297
|
+
config: config$B,
|
|
6267
6298
|
importMeta,
|
|
6268
6299
|
parentName
|
|
6269
6300
|
});
|
|
@@ -6321,7 +6352,7 @@ async function run$A(argv, importMeta, {
|
|
|
6321
6352
|
verbose = false;
|
|
6322
6353
|
}
|
|
6323
6354
|
if (verbose) {
|
|
6324
|
-
logger.logger.group('- ', parentName, config$
|
|
6355
|
+
logger.logger.group('- ', parentName, config$B.commandName, ':');
|
|
6325
6356
|
logger.logger.group('- flags:', cli.flags);
|
|
6326
6357
|
logger.logger.groupEnd();
|
|
6327
6358
|
logger.logger.log('- target:', cwd);
|
|
@@ -6346,7 +6377,7 @@ async function run$A(argv, importMeta, {
|
|
|
6346
6377
|
}
|
|
6347
6378
|
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
6379
|
if (cli.flags['dryRun']) {
|
|
6349
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
6380
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$y);
|
|
6350
6381
|
return;
|
|
6351
6382
|
}
|
|
6352
6383
|
await handleManifestConda({
|
|
@@ -6359,9 +6390,9 @@ async function run$A(argv, importMeta, {
|
|
|
6359
6390
|
}
|
|
6360
6391
|
|
|
6361
6392
|
const {
|
|
6362
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
6393
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$x
|
|
6363
6394
|
} = constants;
|
|
6364
|
-
const config$
|
|
6395
|
+
const config$A = {
|
|
6365
6396
|
commandName: 'gradle',
|
|
6366
6397
|
description: '[beta] Use Gradle to generate a manifest file (`pom.xml`) for a Gradle/Java/Kotlin/etc project',
|
|
6367
6398
|
hidden: false,
|
|
@@ -6414,16 +6445,16 @@ const config$z = {
|
|
|
6414
6445
|
`
|
|
6415
6446
|
};
|
|
6416
6447
|
const cmdManifestGradle = {
|
|
6417
|
-
description: config$
|
|
6418
|
-
hidden: config$
|
|
6419
|
-
run: run$
|
|
6448
|
+
description: config$A.description,
|
|
6449
|
+
hidden: config$A.hidden,
|
|
6450
|
+
run: run$A
|
|
6420
6451
|
};
|
|
6421
|
-
async function run$
|
|
6452
|
+
async function run$A(argv, importMeta, {
|
|
6422
6453
|
parentName
|
|
6423
6454
|
}) {
|
|
6424
6455
|
const cli = utils.meowOrExit({
|
|
6425
6456
|
argv,
|
|
6426
|
-
config: config$
|
|
6457
|
+
config: config$A,
|
|
6427
6458
|
importMeta,
|
|
6428
6459
|
parentName
|
|
6429
6460
|
});
|
|
@@ -6470,7 +6501,7 @@ async function run$z(argv, importMeta, {
|
|
|
6470
6501
|
}
|
|
6471
6502
|
}
|
|
6472
6503
|
if (verbose) {
|
|
6473
|
-
logger.logger.group('- ', parentName, config$
|
|
6504
|
+
logger.logger.group('- ', parentName, config$A.commandName, ':');
|
|
6474
6505
|
logger.logger.group('- flags:', cli.flags);
|
|
6475
6506
|
logger.logger.groupEnd();
|
|
6476
6507
|
logger.logger.log('- input:', cli.input);
|
|
@@ -6498,7 +6529,7 @@ async function run$z(argv, importMeta, {
|
|
|
6498
6529
|
logger.logger.groupEnd();
|
|
6499
6530
|
}
|
|
6500
6531
|
if (cli.flags['dryRun']) {
|
|
6501
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
6532
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$x);
|
|
6502
6533
|
return;
|
|
6503
6534
|
}
|
|
6504
6535
|
await convertGradleToMaven({
|
|
@@ -6510,7 +6541,7 @@ async function run$z(argv, importMeta, {
|
|
|
6510
6541
|
}
|
|
6511
6542
|
|
|
6512
6543
|
const {
|
|
6513
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
6544
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$w
|
|
6514
6545
|
} = constants;
|
|
6515
6546
|
|
|
6516
6547
|
// TODO: we may want to dedupe some pieces for all gradle languages. I think it
|
|
@@ -6518,7 +6549,7 @@ const {
|
|
|
6518
6549
|
// sense for the help panels to note the requested language, rather than
|
|
6519
6550
|
// `socket manifest kotlin` to print help screens with `gradle` as the
|
|
6520
6551
|
// command. Room for improvement.
|
|
6521
|
-
const config$
|
|
6552
|
+
const config$z = {
|
|
6522
6553
|
commandName: 'kotlin',
|
|
6523
6554
|
description: '[beta] Use Gradle to generate a manifest file (`pom.xml`) for a Kotlin project',
|
|
6524
6555
|
hidden: false,
|
|
@@ -6571,16 +6602,16 @@ const config$y = {
|
|
|
6571
6602
|
`
|
|
6572
6603
|
};
|
|
6573
6604
|
const cmdManifestKotlin = {
|
|
6574
|
-
description: config$
|
|
6575
|
-
hidden: config$
|
|
6576
|
-
run: run$
|
|
6605
|
+
description: config$z.description,
|
|
6606
|
+
hidden: config$z.hidden,
|
|
6607
|
+
run: run$z
|
|
6577
6608
|
};
|
|
6578
|
-
async function run$
|
|
6609
|
+
async function run$z(argv, importMeta, {
|
|
6579
6610
|
parentName
|
|
6580
6611
|
}) {
|
|
6581
6612
|
const cli = utils.meowOrExit({
|
|
6582
6613
|
argv,
|
|
6583
|
-
config: config$
|
|
6614
|
+
config: config$z,
|
|
6584
6615
|
importMeta,
|
|
6585
6616
|
parentName
|
|
6586
6617
|
});
|
|
@@ -6627,7 +6658,7 @@ async function run$y(argv, importMeta, {
|
|
|
6627
6658
|
}
|
|
6628
6659
|
}
|
|
6629
6660
|
if (verbose) {
|
|
6630
|
-
logger.logger.group('- ', parentName, config$
|
|
6661
|
+
logger.logger.group('- ', parentName, config$z.commandName, ':');
|
|
6631
6662
|
logger.logger.group('- flags:', cli.flags);
|
|
6632
6663
|
logger.logger.groupEnd();
|
|
6633
6664
|
logger.logger.log('- input:', cli.input);
|
|
@@ -6655,7 +6686,7 @@ async function run$y(argv, importMeta, {
|
|
|
6655
6686
|
logger.logger.groupEnd();
|
|
6656
6687
|
}
|
|
6657
6688
|
if (cli.flags['dryRun']) {
|
|
6658
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
6689
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$w);
|
|
6659
6690
|
return;
|
|
6660
6691
|
}
|
|
6661
6692
|
await convertGradleToMaven({
|
|
@@ -6667,9 +6698,9 @@ async function run$y(argv, importMeta, {
|
|
|
6667
6698
|
}
|
|
6668
6699
|
|
|
6669
6700
|
const {
|
|
6670
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
6701
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$v
|
|
6671
6702
|
} = constants;
|
|
6672
|
-
const config$
|
|
6703
|
+
const config$y = {
|
|
6673
6704
|
commandName: 'scala',
|
|
6674
6705
|
description: "[beta] Generate a manifest file (`pom.xml`) from Scala's `build.sbt` file",
|
|
6675
6706
|
hidden: false,
|
|
@@ -6735,16 +6766,16 @@ const config$x = {
|
|
|
6735
6766
|
`
|
|
6736
6767
|
};
|
|
6737
6768
|
const cmdManifestScala = {
|
|
6738
|
-
description: config$
|
|
6739
|
-
hidden: config$
|
|
6740
|
-
run: run$
|
|
6769
|
+
description: config$y.description,
|
|
6770
|
+
hidden: config$y.hidden,
|
|
6771
|
+
run: run$y
|
|
6741
6772
|
};
|
|
6742
|
-
async function run$
|
|
6773
|
+
async function run$y(argv, importMeta, {
|
|
6743
6774
|
parentName
|
|
6744
6775
|
}) {
|
|
6745
6776
|
const cli = utils.meowOrExit({
|
|
6746
6777
|
argv,
|
|
6747
|
-
config: config$
|
|
6778
|
+
config: config$y,
|
|
6748
6779
|
importMeta,
|
|
6749
6780
|
parentName
|
|
6750
6781
|
});
|
|
@@ -6805,7 +6836,7 @@ async function run$x(argv, importMeta, {
|
|
|
6805
6836
|
verbose = false;
|
|
6806
6837
|
}
|
|
6807
6838
|
if (verbose) {
|
|
6808
|
-
logger.logger.group('- ', parentName, config$
|
|
6839
|
+
logger.logger.group('- ', parentName, config$y.commandName, ':');
|
|
6809
6840
|
logger.logger.group('- flags:', cli.flags);
|
|
6810
6841
|
logger.logger.groupEnd();
|
|
6811
6842
|
logger.logger.log('- input:', cli.input);
|
|
@@ -6834,7 +6865,7 @@ async function run$x(argv, importMeta, {
|
|
|
6834
6865
|
logger.logger.groupEnd();
|
|
6835
6866
|
}
|
|
6836
6867
|
if (cli.flags['dryRun']) {
|
|
6837
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
6868
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$v);
|
|
6838
6869
|
return;
|
|
6839
6870
|
}
|
|
6840
6871
|
await convertSbtToMaven({
|
|
@@ -7250,9 +7281,9 @@ async function handleManifestSetup(cwd, defaultOnReadError) {
|
|
|
7250
7281
|
}
|
|
7251
7282
|
|
|
7252
7283
|
const {
|
|
7253
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
7284
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$u
|
|
7254
7285
|
} = constants;
|
|
7255
|
-
const config$
|
|
7286
|
+
const config$x = {
|
|
7256
7287
|
commandName: 'setup',
|
|
7257
7288
|
description: 'Start interactive configurator to customize default flag values for `socket manifest` in this dir',
|
|
7258
7289
|
hidden: false,
|
|
@@ -7296,16 +7327,16 @@ const config$w = {
|
|
|
7296
7327
|
`
|
|
7297
7328
|
};
|
|
7298
7329
|
const cmdManifestSetup = {
|
|
7299
|
-
description: config$
|
|
7300
|
-
hidden: config$
|
|
7301
|
-
run: run$
|
|
7330
|
+
description: config$x.description,
|
|
7331
|
+
hidden: config$x.hidden,
|
|
7332
|
+
run: run$x
|
|
7302
7333
|
};
|
|
7303
|
-
async function run$
|
|
7334
|
+
async function run$x(argv, importMeta, {
|
|
7304
7335
|
parentName
|
|
7305
7336
|
}) {
|
|
7306
7337
|
const cli = utils.meowOrExit({
|
|
7307
7338
|
argv,
|
|
7308
|
-
config: config$
|
|
7339
|
+
config: config$x,
|
|
7309
7340
|
importMeta,
|
|
7310
7341
|
parentName
|
|
7311
7342
|
});
|
|
@@ -7317,13 +7348,13 @@ async function run$w(argv, importMeta, {
|
|
|
7317
7348
|
// If given path is absolute then cwd should not affect it.
|
|
7318
7349
|
cwd = path.resolve(process.cwd(), cwd);
|
|
7319
7350
|
if (cli.flags['dryRun']) {
|
|
7320
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
7351
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$u);
|
|
7321
7352
|
return;
|
|
7322
7353
|
}
|
|
7323
7354
|
await handleManifestSetup(cwd, Boolean(defaultOnReadError));
|
|
7324
7355
|
}
|
|
7325
7356
|
|
|
7326
|
-
const config$
|
|
7357
|
+
const config$w = {
|
|
7327
7358
|
commandName: 'manifest',
|
|
7328
7359
|
description: 'Generate a dependency manifest for given file or dir',
|
|
7329
7360
|
hidden: false,
|
|
@@ -7331,11 +7362,11 @@ const config$v = {
|
|
|
7331
7362
|
...utils.commonFlags
|
|
7332
7363
|
}};
|
|
7333
7364
|
const cmdManifest = {
|
|
7334
|
-
description: config$
|
|
7335
|
-
hidden: config$
|
|
7336
|
-
run: run$
|
|
7365
|
+
description: config$w.description,
|
|
7366
|
+
hidden: config$w.hidden,
|
|
7367
|
+
run: run$w
|
|
7337
7368
|
};
|
|
7338
|
-
async function run$
|
|
7369
|
+
async function run$w(argv, importMeta, {
|
|
7339
7370
|
parentName
|
|
7340
7371
|
}) {
|
|
7341
7372
|
await utils.meowWithSubcommands({
|
|
@@ -7350,23 +7381,23 @@ async function run$v(argv, importMeta, {
|
|
|
7350
7381
|
argv,
|
|
7351
7382
|
aliases: {
|
|
7352
7383
|
yolo: {
|
|
7353
|
-
description: config$
|
|
7384
|
+
description: config$w.description,
|
|
7354
7385
|
hidden: true,
|
|
7355
7386
|
argv: ['auto']
|
|
7356
7387
|
}
|
|
7357
7388
|
},
|
|
7358
|
-
description: config$
|
|
7389
|
+
description: config$w.description,
|
|
7359
7390
|
importMeta,
|
|
7360
|
-
flags: config$
|
|
7361
|
-
name: `${parentName} ${config$
|
|
7391
|
+
flags: config$w.flags,
|
|
7392
|
+
name: `${parentName} ${config$w.commandName}`
|
|
7362
7393
|
});
|
|
7363
7394
|
}
|
|
7364
7395
|
|
|
7365
7396
|
const require$3 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
|
|
7366
7397
|
const {
|
|
7367
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
7398
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$t
|
|
7368
7399
|
} = constants;
|
|
7369
|
-
const config$
|
|
7400
|
+
const config$v = {
|
|
7370
7401
|
commandName: 'npm',
|
|
7371
7402
|
description: `npm wrapper functionality`,
|
|
7372
7403
|
hidden: false,
|
|
@@ -7379,21 +7410,21 @@ const config$u = {
|
|
|
7379
7410
|
`
|
|
7380
7411
|
};
|
|
7381
7412
|
const cmdNpm = {
|
|
7382
|
-
description: config$
|
|
7383
|
-
hidden: config$
|
|
7384
|
-
run: run$
|
|
7413
|
+
description: config$v.description,
|
|
7414
|
+
hidden: config$v.hidden,
|
|
7415
|
+
run: run$v
|
|
7385
7416
|
};
|
|
7386
|
-
async function run$
|
|
7417
|
+
async function run$v(argv, importMeta, {
|
|
7387
7418
|
parentName
|
|
7388
7419
|
}) {
|
|
7389
7420
|
const cli = utils.meowOrExit({
|
|
7390
7421
|
argv,
|
|
7391
|
-
config: config$
|
|
7422
|
+
config: config$v,
|
|
7392
7423
|
importMeta,
|
|
7393
7424
|
parentName
|
|
7394
7425
|
});
|
|
7395
7426
|
if (cli.flags['dryRun']) {
|
|
7396
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
7427
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$t);
|
|
7397
7428
|
return;
|
|
7398
7429
|
}
|
|
7399
7430
|
|
|
@@ -7404,9 +7435,9 @@ async function run$u(argv, importMeta, {
|
|
|
7404
7435
|
|
|
7405
7436
|
const require$2 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
|
|
7406
7437
|
const {
|
|
7407
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
7438
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$s
|
|
7408
7439
|
} = constants;
|
|
7409
|
-
const config$
|
|
7440
|
+
const config$u = {
|
|
7410
7441
|
commandName: 'npx',
|
|
7411
7442
|
description: `npx wrapper functionality`,
|
|
7412
7443
|
hidden: false,
|
|
@@ -7419,21 +7450,21 @@ const config$t = {
|
|
|
7419
7450
|
`
|
|
7420
7451
|
};
|
|
7421
7452
|
const cmdNpx = {
|
|
7422
|
-
description: config$
|
|
7423
|
-
hidden: config$
|
|
7424
|
-
run: run$
|
|
7453
|
+
description: config$u.description,
|
|
7454
|
+
hidden: config$u.hidden,
|
|
7455
|
+
run: run$u
|
|
7425
7456
|
};
|
|
7426
|
-
async function run$
|
|
7457
|
+
async function run$u(argv, importMeta, {
|
|
7427
7458
|
parentName
|
|
7428
7459
|
}) {
|
|
7429
7460
|
const cli = utils.meowOrExit({
|
|
7430
7461
|
argv,
|
|
7431
|
-
config: config$
|
|
7462
|
+
config: config$u,
|
|
7432
7463
|
importMeta,
|
|
7433
7464
|
parentName
|
|
7434
7465
|
});
|
|
7435
7466
|
if (cli.flags['dryRun']) {
|
|
7436
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
7467
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$s);
|
|
7437
7468
|
return;
|
|
7438
7469
|
}
|
|
7439
7470
|
|
|
@@ -7443,9 +7474,9 @@ async function run$t(argv, importMeta, {
|
|
|
7443
7474
|
}
|
|
7444
7475
|
|
|
7445
7476
|
const {
|
|
7446
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
7477
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$r
|
|
7447
7478
|
} = constants;
|
|
7448
|
-
const config$
|
|
7479
|
+
const config$t = {
|
|
7449
7480
|
commandName: 'oops',
|
|
7450
7481
|
description: 'Trigger an intentional error (for development)',
|
|
7451
7482
|
hidden: true,
|
|
@@ -7461,16 +7492,16 @@ const config$s = {
|
|
|
7461
7492
|
`
|
|
7462
7493
|
};
|
|
7463
7494
|
const cmdOops = {
|
|
7464
|
-
description: config$
|
|
7465
|
-
hidden: config$
|
|
7466
|
-
run: run$
|
|
7495
|
+
description: config$t.description,
|
|
7496
|
+
hidden: config$t.hidden,
|
|
7497
|
+
run: run$t
|
|
7467
7498
|
};
|
|
7468
|
-
async function run$
|
|
7499
|
+
async function run$t(argv, importMeta, {
|
|
7469
7500
|
parentName
|
|
7470
7501
|
}) {
|
|
7471
7502
|
const cli = utils.meowOrExit({
|
|
7472
7503
|
argv,
|
|
7473
|
-
config: config$
|
|
7504
|
+
config: config$t,
|
|
7474
7505
|
importMeta,
|
|
7475
7506
|
parentName
|
|
7476
7507
|
});
|
|
@@ -7479,7 +7510,7 @@ async function run$s(argv, importMeta, {
|
|
|
7479
7510
|
markdown
|
|
7480
7511
|
} = cli.flags;
|
|
7481
7512
|
if (cli.flags['dryRun']) {
|
|
7482
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
7513
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$r);
|
|
7483
7514
|
return;
|
|
7484
7515
|
}
|
|
7485
7516
|
if (json) {
|
|
@@ -7669,7 +7700,7 @@ function cleanupQueryStdout(stdout) {
|
|
|
7669
7700
|
try {
|
|
7670
7701
|
pkgs = JSON.parse(stdout);
|
|
7671
7702
|
} catch {}
|
|
7672
|
-
if (!Array.isArray(pkgs)) {
|
|
7703
|
+
if (!Array.isArray(pkgs) || !pkgs.length) {
|
|
7673
7704
|
return '';
|
|
7674
7705
|
}
|
|
7675
7706
|
const names = new Set();
|
|
@@ -8235,9 +8266,9 @@ async function handleOptimize({
|
|
|
8235
8266
|
}
|
|
8236
8267
|
|
|
8237
8268
|
const {
|
|
8238
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
8269
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$q
|
|
8239
8270
|
} = constants;
|
|
8240
|
-
const config$
|
|
8271
|
+
const config$s = {
|
|
8241
8272
|
commandName: 'optimize',
|
|
8242
8273
|
description: 'Optimize dependencies with @socketregistry overrides',
|
|
8243
8274
|
hidden: false,
|
|
@@ -8267,16 +8298,16 @@ const config$r = {
|
|
|
8267
8298
|
`
|
|
8268
8299
|
};
|
|
8269
8300
|
const cmdOptimize = {
|
|
8270
|
-
description: config$
|
|
8271
|
-
hidden: config$
|
|
8272
|
-
run: run$
|
|
8301
|
+
description: config$s.description,
|
|
8302
|
+
hidden: config$s.hidden,
|
|
8303
|
+
run: run$s
|
|
8273
8304
|
};
|
|
8274
|
-
async function run$
|
|
8305
|
+
async function run$s(argv, importMeta, {
|
|
8275
8306
|
parentName
|
|
8276
8307
|
}) {
|
|
8277
8308
|
const cli = utils.meowOrExit({
|
|
8278
8309
|
argv,
|
|
8279
|
-
config: config$
|
|
8310
|
+
config: config$s,
|
|
8280
8311
|
importMeta,
|
|
8281
8312
|
parentName
|
|
8282
8313
|
});
|
|
@@ -8294,7 +8325,7 @@ async function run$r(argv, importMeta, {
|
|
|
8294
8325
|
// If given path is absolute then cwd should not affect it.
|
|
8295
8326
|
cwd = path.resolve(process.cwd(), cwd);
|
|
8296
8327
|
if (cli.flags['dryRun']) {
|
|
8297
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
8328
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$q);
|
|
8298
8329
|
return;
|
|
8299
8330
|
}
|
|
8300
8331
|
await handleOptimize({
|
|
@@ -8370,9 +8401,9 @@ async function handleOrganizationList(outputKind = 'text') {
|
|
|
8370
8401
|
}
|
|
8371
8402
|
|
|
8372
8403
|
const {
|
|
8373
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
8404
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$p
|
|
8374
8405
|
} = constants;
|
|
8375
|
-
const config$
|
|
8406
|
+
const config$r = {
|
|
8376
8407
|
commandName: 'list',
|
|
8377
8408
|
description: 'List organizations associated with the API key used',
|
|
8378
8409
|
hidden: false,
|
|
@@ -8389,20 +8420,20 @@ const config$q = {
|
|
|
8389
8420
|
- Permissions: none (does need a token)
|
|
8390
8421
|
|
|
8391
8422
|
Options
|
|
8392
|
-
${utils.getFlagListOutput(config$
|
|
8423
|
+
${utils.getFlagListOutput(config$r.flags, 6)}
|
|
8393
8424
|
`
|
|
8394
8425
|
};
|
|
8395
8426
|
const cmdOrganizationList = {
|
|
8396
|
-
description: config$
|
|
8397
|
-
hidden: config$
|
|
8398
|
-
run: run$
|
|
8427
|
+
description: config$r.description,
|
|
8428
|
+
hidden: config$r.hidden,
|
|
8429
|
+
run: run$r
|
|
8399
8430
|
};
|
|
8400
|
-
async function run$
|
|
8431
|
+
async function run$r(argv, importMeta, {
|
|
8401
8432
|
parentName
|
|
8402
8433
|
}) {
|
|
8403
8434
|
const cli = utils.meowOrExit({
|
|
8404
8435
|
argv,
|
|
8405
|
-
config: config$
|
|
8436
|
+
config: config$r,
|
|
8406
8437
|
importMeta,
|
|
8407
8438
|
parentName
|
|
8408
8439
|
});
|
|
@@ -8429,7 +8460,7 @@ async function run$q(argv, importMeta, {
|
|
|
8429
8460
|
return;
|
|
8430
8461
|
}
|
|
8431
8462
|
if (cli.flags['dryRun']) {
|
|
8432
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
8463
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$p);
|
|
8433
8464
|
return;
|
|
8434
8465
|
}
|
|
8435
8466
|
await handleOrganizationList(outputKind);
|
|
@@ -8475,11 +8506,11 @@ async function handleLicensePolicy(orgSlug, outputKind) {
|
|
|
8475
8506
|
}
|
|
8476
8507
|
|
|
8477
8508
|
const {
|
|
8478
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
8509
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$o
|
|
8479
8510
|
} = constants;
|
|
8480
8511
|
|
|
8481
8512
|
// TODO: secret toplevel alias `socket license policy`?
|
|
8482
|
-
const config$
|
|
8513
|
+
const config$q = {
|
|
8483
8514
|
commandName: 'license',
|
|
8484
8515
|
description: 'Retrieve the license policy of an organization',
|
|
8485
8516
|
hidden: true,
|
|
@@ -8505,7 +8536,7 @@ const config$p = {
|
|
|
8505
8536
|
- Permissions: license-policy:read
|
|
8506
8537
|
|
|
8507
8538
|
Options
|
|
8508
|
-
${utils.getFlagListOutput(config$
|
|
8539
|
+
${utils.getFlagListOutput(config$q.flags, 6)}
|
|
8509
8540
|
|
|
8510
8541
|
Your API token will need the \`license-policy:read\` permission otherwise
|
|
8511
8542
|
the request will fail with an authentication error.
|
|
@@ -8516,16 +8547,16 @@ const config$p = {
|
|
|
8516
8547
|
`
|
|
8517
8548
|
};
|
|
8518
8549
|
const cmdOrganizationPolicyLicense = {
|
|
8519
|
-
description: config$
|
|
8520
|
-
hidden: config$
|
|
8521
|
-
run: run$
|
|
8550
|
+
description: config$q.description,
|
|
8551
|
+
hidden: config$q.hidden,
|
|
8552
|
+
run: run$q
|
|
8522
8553
|
};
|
|
8523
|
-
async function run$
|
|
8554
|
+
async function run$q(argv, importMeta, {
|
|
8524
8555
|
parentName
|
|
8525
8556
|
}) {
|
|
8526
8557
|
const cli = utils.meowOrExit({
|
|
8527
8558
|
argv,
|
|
8528
|
-
config: config$
|
|
8559
|
+
config: config$q,
|
|
8529
8560
|
importMeta,
|
|
8530
8561
|
parentName
|
|
8531
8562
|
});
|
|
@@ -8562,7 +8593,7 @@ async function run$p(argv, importMeta, {
|
|
|
8562
8593
|
return;
|
|
8563
8594
|
}
|
|
8564
8595
|
if (cli.flags['dryRun']) {
|
|
8565
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
8596
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$o);
|
|
8566
8597
|
return;
|
|
8567
8598
|
}
|
|
8568
8599
|
await handleLicensePolicy(orgSlug, outputKind);
|
|
@@ -8609,11 +8640,11 @@ async function handleSecurityPolicy(orgSlug, outputKind) {
|
|
|
8609
8640
|
}
|
|
8610
8641
|
|
|
8611
8642
|
const {
|
|
8612
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
8643
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$n
|
|
8613
8644
|
} = constants;
|
|
8614
8645
|
|
|
8615
8646
|
// TODO: secret toplevel alias `socket security policy`?
|
|
8616
|
-
const config$
|
|
8647
|
+
const config$p = {
|
|
8617
8648
|
commandName: 'security',
|
|
8618
8649
|
description: 'Retrieve the security policy of an organization',
|
|
8619
8650
|
hidden: true,
|
|
@@ -8639,7 +8670,7 @@ const config$o = {
|
|
|
8639
8670
|
- Permissions: security-policy:read
|
|
8640
8671
|
|
|
8641
8672
|
Options
|
|
8642
|
-
${utils.getFlagListOutput(config$
|
|
8673
|
+
${utils.getFlagListOutput(config$p.flags, 6)}
|
|
8643
8674
|
|
|
8644
8675
|
Your API token will need the \`security-policy:read\` permission otherwise
|
|
8645
8676
|
the request will fail with an authentication error.
|
|
@@ -8650,16 +8681,16 @@ const config$o = {
|
|
|
8650
8681
|
`
|
|
8651
8682
|
};
|
|
8652
8683
|
const cmdOrganizationPolicyPolicy = {
|
|
8653
|
-
description: config$
|
|
8654
|
-
hidden: config$
|
|
8655
|
-
run: run$
|
|
8684
|
+
description: config$p.description,
|
|
8685
|
+
hidden: config$p.hidden,
|
|
8686
|
+
run: run$p
|
|
8656
8687
|
};
|
|
8657
|
-
async function run$
|
|
8688
|
+
async function run$p(argv, importMeta, {
|
|
8658
8689
|
parentName
|
|
8659
8690
|
}) {
|
|
8660
8691
|
const cli = utils.meowOrExit({
|
|
8661
8692
|
argv,
|
|
8662
|
-
config: config$
|
|
8693
|
+
config: config$p,
|
|
8663
8694
|
importMeta,
|
|
8664
8695
|
parentName
|
|
8665
8696
|
});
|
|
@@ -8696,7 +8727,7 @@ async function run$o(argv, importMeta, {
|
|
|
8696
8727
|
return;
|
|
8697
8728
|
}
|
|
8698
8729
|
if (cli.flags['dryRun']) {
|
|
8699
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
8730
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$n);
|
|
8700
8731
|
return;
|
|
8701
8732
|
}
|
|
8702
8733
|
await handleSecurityPolicy(orgSlug, outputKind);
|
|
@@ -8765,9 +8796,9 @@ async function handleQuota(outputKind = 'text') {
|
|
|
8765
8796
|
}
|
|
8766
8797
|
|
|
8767
8798
|
const {
|
|
8768
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
8799
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$m
|
|
8769
8800
|
} = constants;
|
|
8770
|
-
const config$
|
|
8801
|
+
const config$o = {
|
|
8771
8802
|
commandName: 'quota',
|
|
8772
8803
|
description: 'List organizations associated with the API key used',
|
|
8773
8804
|
hidden: true,
|
|
@@ -8780,20 +8811,20 @@ const config$n = {
|
|
|
8780
8811
|
$ ${command}
|
|
8781
8812
|
|
|
8782
8813
|
Options
|
|
8783
|
-
${utils.getFlagListOutput(config$
|
|
8814
|
+
${utils.getFlagListOutput(config$o.flags, 6)}
|
|
8784
8815
|
`
|
|
8785
8816
|
};
|
|
8786
8817
|
const cmdOrganizationQuota = {
|
|
8787
|
-
description: config$
|
|
8788
|
-
hidden: config$
|
|
8789
|
-
run: run$
|
|
8818
|
+
description: config$o.description,
|
|
8819
|
+
hidden: config$o.hidden,
|
|
8820
|
+
run: run$o
|
|
8790
8821
|
};
|
|
8791
|
-
async function run$
|
|
8822
|
+
async function run$o(argv, importMeta, {
|
|
8792
8823
|
parentName
|
|
8793
8824
|
}) {
|
|
8794
8825
|
const cli = utils.meowOrExit({
|
|
8795
8826
|
argv,
|
|
8796
|
-
config: config$
|
|
8827
|
+
config: config$o,
|
|
8797
8828
|
importMeta,
|
|
8798
8829
|
parentName
|
|
8799
8830
|
});
|
|
@@ -8818,7 +8849,7 @@ async function run$n(argv, importMeta, {
|
|
|
8818
8849
|
return;
|
|
8819
8850
|
}
|
|
8820
8851
|
if (cli.flags['dryRun']) {
|
|
8821
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
8852
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$m);
|
|
8822
8853
|
return;
|
|
8823
8854
|
}
|
|
8824
8855
|
await handleQuota(outputKind);
|
|
@@ -9066,9 +9097,9 @@ function parsePackageSpecifiers(ecosystem, pkgs) {
|
|
|
9066
9097
|
}
|
|
9067
9098
|
|
|
9068
9099
|
const {
|
|
9069
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
9100
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$l
|
|
9070
9101
|
} = constants;
|
|
9071
|
-
const config$
|
|
9102
|
+
const config$n = {
|
|
9072
9103
|
commandName: 'score',
|
|
9073
9104
|
description: '[beta] Look up score for one package which reflects all of its transitive dependencies as well',
|
|
9074
9105
|
hidden: false,
|
|
@@ -9110,16 +9141,16 @@ const config$m = {
|
|
|
9110
9141
|
`
|
|
9111
9142
|
};
|
|
9112
9143
|
const cmdPackageScore = {
|
|
9113
|
-
description: config$
|
|
9114
|
-
hidden: config$
|
|
9115
|
-
run: run$
|
|
9144
|
+
description: config$n.description,
|
|
9145
|
+
hidden: config$n.hidden,
|
|
9146
|
+
run: run$n
|
|
9116
9147
|
};
|
|
9117
|
-
async function run$
|
|
9148
|
+
async function run$n(argv, importMeta, {
|
|
9118
9149
|
parentName
|
|
9119
9150
|
}) {
|
|
9120
9151
|
const cli = utils.meowOrExit({
|
|
9121
9152
|
argv,
|
|
9122
|
-
config: config$
|
|
9153
|
+
config: config$n,
|
|
9123
9154
|
importMeta,
|
|
9124
9155
|
parentName
|
|
9125
9156
|
});
|
|
@@ -9161,7 +9192,7 @@ async function run$m(argv, importMeta, {
|
|
|
9161
9192
|
return;
|
|
9162
9193
|
}
|
|
9163
9194
|
if (cli.flags['dryRun']) {
|
|
9164
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
9195
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$l);
|
|
9165
9196
|
return;
|
|
9166
9197
|
}
|
|
9167
9198
|
await handlePurlDeepScore(purls[0] || '', outputKind);
|
|
@@ -9298,9 +9329,9 @@ async function handlePurlsShallowScore({
|
|
|
9298
9329
|
}
|
|
9299
9330
|
|
|
9300
9331
|
const {
|
|
9301
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
9332
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$k
|
|
9302
9333
|
} = constants;
|
|
9303
|
-
const config$
|
|
9334
|
+
const config$m = {
|
|
9304
9335
|
commandName: 'shallow',
|
|
9305
9336
|
description: '[beta] Look up info regarding one or more packages but not their transitives',
|
|
9306
9337
|
hidden: false,
|
|
@@ -9342,23 +9373,23 @@ const config$l = {
|
|
|
9342
9373
|
`
|
|
9343
9374
|
};
|
|
9344
9375
|
const cmdPackageShallow = {
|
|
9345
|
-
description: config$
|
|
9346
|
-
hidden: config$
|
|
9376
|
+
description: config$m.description,
|
|
9377
|
+
hidden: config$m.hidden,
|
|
9347
9378
|
alias: {
|
|
9348
9379
|
shallowScore: {
|
|
9349
|
-
description: config$
|
|
9380
|
+
description: config$m.description,
|
|
9350
9381
|
hidden: true,
|
|
9351
9382
|
argv: []
|
|
9352
9383
|
}
|
|
9353
9384
|
},
|
|
9354
|
-
run: run$
|
|
9385
|
+
run: run$m
|
|
9355
9386
|
};
|
|
9356
|
-
async function run$
|
|
9387
|
+
async function run$m(argv, importMeta, {
|
|
9357
9388
|
parentName
|
|
9358
9389
|
}) {
|
|
9359
9390
|
const cli = utils.meowOrExit({
|
|
9360
9391
|
argv,
|
|
9361
|
-
config: config$
|
|
9392
|
+
config: config$m,
|
|
9362
9393
|
importMeta,
|
|
9363
9394
|
parentName
|
|
9364
9395
|
});
|
|
@@ -9393,7 +9424,7 @@ async function run$l(argv, importMeta, {
|
|
|
9393
9424
|
return;
|
|
9394
9425
|
}
|
|
9395
9426
|
if (cli.flags['dryRun']) {
|
|
9396
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
9427
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$k);
|
|
9397
9428
|
return;
|
|
9398
9429
|
}
|
|
9399
9430
|
await handlePurlsShallowScore({
|
|
@@ -9447,10 +9478,10 @@ async function runRawNpm(argv) {
|
|
|
9447
9478
|
}
|
|
9448
9479
|
|
|
9449
9480
|
const {
|
|
9450
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
9481
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$j,
|
|
9451
9482
|
NPM
|
|
9452
9483
|
} = constants;
|
|
9453
|
-
const config$
|
|
9484
|
+
const config$l = {
|
|
9454
9485
|
commandName: 'raw-npm',
|
|
9455
9486
|
description: `Temporarily disable the Socket ${NPM} wrapper`,
|
|
9456
9487
|
hidden: false,
|
|
@@ -9464,21 +9495,21 @@ const config$k = {
|
|
|
9464
9495
|
`
|
|
9465
9496
|
};
|
|
9466
9497
|
const cmdRawNpm = {
|
|
9467
|
-
description: config$
|
|
9468
|
-
hidden: config$
|
|
9469
|
-
run: run$
|
|
9498
|
+
description: config$l.description,
|
|
9499
|
+
hidden: config$l.hidden,
|
|
9500
|
+
run: run$l
|
|
9470
9501
|
};
|
|
9471
|
-
async function run$
|
|
9502
|
+
async function run$l(argv, importMeta, {
|
|
9472
9503
|
parentName
|
|
9473
9504
|
}) {
|
|
9474
9505
|
const cli = utils.meowOrExit({
|
|
9475
9506
|
argv,
|
|
9476
|
-
config: config$
|
|
9507
|
+
config: config$l,
|
|
9477
9508
|
importMeta,
|
|
9478
9509
|
parentName
|
|
9479
9510
|
});
|
|
9480
9511
|
if (cli.flags['dryRun']) {
|
|
9481
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
9512
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$j);
|
|
9482
9513
|
return;
|
|
9483
9514
|
}
|
|
9484
9515
|
await runRawNpm(argv);
|
|
@@ -9503,10 +9534,10 @@ async function runRawNpx(argv) {
|
|
|
9503
9534
|
}
|
|
9504
9535
|
|
|
9505
9536
|
const {
|
|
9506
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
9537
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$i,
|
|
9507
9538
|
NPX
|
|
9508
9539
|
} = constants;
|
|
9509
|
-
const config$
|
|
9540
|
+
const config$k = {
|
|
9510
9541
|
commandName: 'raw-npx',
|
|
9511
9542
|
description: `Temporarily disable the Socket ${NPX} wrapper`,
|
|
9512
9543
|
hidden: false,
|
|
@@ -9520,27 +9551,27 @@ const config$j = {
|
|
|
9520
9551
|
`
|
|
9521
9552
|
};
|
|
9522
9553
|
const cmdRawNpx = {
|
|
9523
|
-
description: config$
|
|
9524
|
-
hidden: config$
|
|
9525
|
-
run: run$
|
|
9554
|
+
description: config$k.description,
|
|
9555
|
+
hidden: config$k.hidden,
|
|
9556
|
+
run: run$k
|
|
9526
9557
|
};
|
|
9527
|
-
async function run$
|
|
9558
|
+
async function run$k(argv, importMeta, {
|
|
9528
9559
|
parentName
|
|
9529
9560
|
}) {
|
|
9530
9561
|
const cli = utils.meowOrExit({
|
|
9531
9562
|
argv,
|
|
9532
|
-
config: config$
|
|
9563
|
+
config: config$k,
|
|
9533
9564
|
importMeta,
|
|
9534
9565
|
parentName
|
|
9535
9566
|
});
|
|
9536
9567
|
if (cli.flags['dryRun']) {
|
|
9537
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
9568
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$i);
|
|
9538
9569
|
return;
|
|
9539
9570
|
}
|
|
9540
9571
|
await runRawNpx(argv);
|
|
9541
9572
|
}
|
|
9542
9573
|
|
|
9543
|
-
const config$
|
|
9574
|
+
const config$j = {
|
|
9544
9575
|
commandName: 'create',
|
|
9545
9576
|
description: '[Deprecated] Create a project report',
|
|
9546
9577
|
hidden: false,
|
|
@@ -9554,16 +9585,16 @@ const config$i = {
|
|
|
9554
9585
|
`
|
|
9555
9586
|
};
|
|
9556
9587
|
const cmdReportCreate = {
|
|
9557
|
-
description: config$
|
|
9558
|
-
hidden: config$
|
|
9559
|
-
run: run$
|
|
9588
|
+
description: config$j.description,
|
|
9589
|
+
hidden: config$j.hidden,
|
|
9590
|
+
run: run$j
|
|
9560
9591
|
};
|
|
9561
|
-
async function run$
|
|
9592
|
+
async function run$j(argv, importMeta, {
|
|
9562
9593
|
parentName
|
|
9563
9594
|
}) {
|
|
9564
9595
|
utils.meowOrExit({
|
|
9565
9596
|
argv,
|
|
9566
|
-
config: config$
|
|
9597
|
+
config: config$j,
|
|
9567
9598
|
importMeta,
|
|
9568
9599
|
parentName
|
|
9569
9600
|
});
|
|
@@ -9571,7 +9602,7 @@ async function run$i(argv, importMeta, {
|
|
|
9571
9602
|
process.exitCode = 1;
|
|
9572
9603
|
}
|
|
9573
9604
|
|
|
9574
|
-
const config$
|
|
9605
|
+
const config$i = {
|
|
9575
9606
|
commandName: 'view',
|
|
9576
9607
|
description: '[Deprecated] View a project report',
|
|
9577
9608
|
hidden: false,
|
|
@@ -9585,16 +9616,16 @@ const config$h = {
|
|
|
9585
9616
|
`
|
|
9586
9617
|
};
|
|
9587
9618
|
const cmdReportView = {
|
|
9588
|
-
description: config$
|
|
9589
|
-
hidden: config$
|
|
9590
|
-
run: run$
|
|
9619
|
+
description: config$i.description,
|
|
9620
|
+
hidden: config$i.hidden,
|
|
9621
|
+
run: run$i
|
|
9591
9622
|
};
|
|
9592
|
-
async function run$
|
|
9623
|
+
async function run$i(argv, importMeta, {
|
|
9593
9624
|
parentName
|
|
9594
9625
|
}) {
|
|
9595
9626
|
utils.meowOrExit({
|
|
9596
9627
|
argv,
|
|
9597
|
-
config: config$
|
|
9628
|
+
config: config$i,
|
|
9598
9629
|
importMeta,
|
|
9599
9630
|
parentName
|
|
9600
9631
|
});
|
|
@@ -9682,9 +9713,9 @@ async function handleCreateRepo({
|
|
|
9682
9713
|
}
|
|
9683
9714
|
|
|
9684
9715
|
const {
|
|
9685
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
9716
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$h
|
|
9686
9717
|
} = constants;
|
|
9687
|
-
const config$
|
|
9718
|
+
const config$h = {
|
|
9688
9719
|
commandName: 'create',
|
|
9689
9720
|
description: 'Create a repository in an organization',
|
|
9690
9721
|
hidden: false,
|
|
@@ -9747,16 +9778,16 @@ const config$g = {
|
|
|
9747
9778
|
`
|
|
9748
9779
|
};
|
|
9749
9780
|
const cmdReposCreate = {
|
|
9750
|
-
description: config$
|
|
9751
|
-
hidden: config$
|
|
9752
|
-
run: run$
|
|
9781
|
+
description: config$h.description,
|
|
9782
|
+
hidden: config$h.hidden,
|
|
9783
|
+
run: run$h
|
|
9753
9784
|
};
|
|
9754
|
-
async function run$
|
|
9785
|
+
async function run$h(argv, importMeta, {
|
|
9755
9786
|
parentName
|
|
9756
9787
|
}) {
|
|
9757
9788
|
const cli = utils.meowOrExit({
|
|
9758
9789
|
argv,
|
|
9759
|
-
config: config$
|
|
9790
|
+
config: config$h,
|
|
9760
9791
|
importMeta,
|
|
9761
9792
|
parentName
|
|
9762
9793
|
});
|
|
@@ -9801,7 +9832,7 @@ async function run$g(argv, importMeta, {
|
|
|
9801
9832
|
return;
|
|
9802
9833
|
}
|
|
9803
9834
|
if (dryRun) {
|
|
9804
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
9835
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$h);
|
|
9805
9836
|
return;
|
|
9806
9837
|
}
|
|
9807
9838
|
await handleCreateRepo({
|
|
@@ -9844,9 +9875,9 @@ async function handleDeleteRepo(orgSlug, repoName, outputKind) {
|
|
|
9844
9875
|
}
|
|
9845
9876
|
|
|
9846
9877
|
const {
|
|
9847
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
9878
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$g
|
|
9848
9879
|
} = constants;
|
|
9849
|
-
const config$
|
|
9880
|
+
const config$g = {
|
|
9850
9881
|
commandName: 'del',
|
|
9851
9882
|
description: 'Delete a repository in an organization',
|
|
9852
9883
|
hidden: false,
|
|
@@ -9879,16 +9910,16 @@ const config$f = {
|
|
|
9879
9910
|
`
|
|
9880
9911
|
};
|
|
9881
9912
|
const cmdReposDel = {
|
|
9882
|
-
description: config$
|
|
9883
|
-
hidden: config$
|
|
9884
|
-
run: run$
|
|
9913
|
+
description: config$g.description,
|
|
9914
|
+
hidden: config$g.hidden,
|
|
9915
|
+
run: run$g
|
|
9885
9916
|
};
|
|
9886
|
-
async function run$
|
|
9917
|
+
async function run$g(argv, importMeta, {
|
|
9887
9918
|
parentName
|
|
9888
9919
|
}) {
|
|
9889
9920
|
const cli = utils.meowOrExit({
|
|
9890
9921
|
argv,
|
|
9891
|
-
config: config$
|
|
9922
|
+
config: config$g,
|
|
9892
9923
|
importMeta,
|
|
9893
9924
|
parentName
|
|
9894
9925
|
});
|
|
@@ -9925,7 +9956,7 @@ async function run$f(argv, importMeta, {
|
|
|
9925
9956
|
return;
|
|
9926
9957
|
}
|
|
9927
9958
|
if (dryRun) {
|
|
9928
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
9959
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$g);
|
|
9929
9960
|
return;
|
|
9930
9961
|
}
|
|
9931
9962
|
await handleDeleteRepo(orgSlug, repoName, outputKind);
|
|
@@ -10087,9 +10118,9 @@ async function handleListRepos({
|
|
|
10087
10118
|
}
|
|
10088
10119
|
|
|
10089
10120
|
const {
|
|
10090
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
10121
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$f
|
|
10091
10122
|
} = constants;
|
|
10092
|
-
const config$
|
|
10123
|
+
const config$f = {
|
|
10093
10124
|
commandName: 'list',
|
|
10094
10125
|
description: 'List repositories in an organization',
|
|
10095
10126
|
hidden: false,
|
|
@@ -10150,16 +10181,16 @@ const config$e = {
|
|
|
10150
10181
|
`
|
|
10151
10182
|
};
|
|
10152
10183
|
const cmdReposList = {
|
|
10153
|
-
description: config$
|
|
10154
|
-
hidden: config$
|
|
10155
|
-
run: run$
|
|
10184
|
+
description: config$f.description,
|
|
10185
|
+
hidden: config$f.hidden,
|
|
10186
|
+
run: run$f
|
|
10156
10187
|
};
|
|
10157
|
-
async function run$
|
|
10188
|
+
async function run$f(argv, importMeta, {
|
|
10158
10189
|
parentName
|
|
10159
10190
|
}) {
|
|
10160
10191
|
const cli = utils.meowOrExit({
|
|
10161
10192
|
argv,
|
|
10162
|
-
config: config$
|
|
10193
|
+
config: config$f,
|
|
10163
10194
|
importMeta,
|
|
10164
10195
|
parentName
|
|
10165
10196
|
});
|
|
@@ -10204,7 +10235,7 @@ async function run$e(argv, importMeta, {
|
|
|
10204
10235
|
return;
|
|
10205
10236
|
}
|
|
10206
10237
|
if (cli.flags['dryRun']) {
|
|
10207
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
10238
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$f);
|
|
10208
10239
|
return;
|
|
10209
10240
|
}
|
|
10210
10241
|
await handleListRepos({
|
|
@@ -10276,9 +10307,9 @@ async function handleUpdateRepo({
|
|
|
10276
10307
|
}
|
|
10277
10308
|
|
|
10278
10309
|
const {
|
|
10279
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
10310
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$e
|
|
10280
10311
|
} = constants;
|
|
10281
|
-
const config$
|
|
10312
|
+
const config$e = {
|
|
10282
10313
|
commandName: 'update',
|
|
10283
10314
|
description: 'Update a repository in an organization',
|
|
10284
10315
|
hidden: false,
|
|
@@ -10341,16 +10372,16 @@ const config$d = {
|
|
|
10341
10372
|
`
|
|
10342
10373
|
};
|
|
10343
10374
|
const cmdReposUpdate = {
|
|
10344
|
-
description: config$
|
|
10345
|
-
hidden: config$
|
|
10346
|
-
run: run$
|
|
10375
|
+
description: config$e.description,
|
|
10376
|
+
hidden: config$e.hidden,
|
|
10377
|
+
run: run$e
|
|
10347
10378
|
};
|
|
10348
|
-
async function run$
|
|
10379
|
+
async function run$e(argv, importMeta, {
|
|
10349
10380
|
parentName
|
|
10350
10381
|
}) {
|
|
10351
10382
|
const cli = utils.meowOrExit({
|
|
10352
10383
|
argv,
|
|
10353
|
-
config: config$
|
|
10384
|
+
config: config$e,
|
|
10354
10385
|
importMeta,
|
|
10355
10386
|
parentName
|
|
10356
10387
|
});
|
|
@@ -10395,7 +10426,7 @@ async function run$d(argv, importMeta, {
|
|
|
10395
10426
|
return;
|
|
10396
10427
|
}
|
|
10397
10428
|
if (cli.flags['dryRun']) {
|
|
10398
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
10429
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$e);
|
|
10399
10430
|
return;
|
|
10400
10431
|
}
|
|
10401
10432
|
await handleUpdateRepo({
|
|
@@ -10463,9 +10494,9 @@ async function handleViewRepo(orgSlug, repoName, outputKind) {
|
|
|
10463
10494
|
}
|
|
10464
10495
|
|
|
10465
10496
|
const {
|
|
10466
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
10497
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$d
|
|
10467
10498
|
} = constants;
|
|
10468
|
-
const config$
|
|
10499
|
+
const config$d = {
|
|
10469
10500
|
commandName: 'view',
|
|
10470
10501
|
description: 'View repositories in an organization',
|
|
10471
10502
|
hidden: false,
|
|
@@ -10503,16 +10534,16 @@ const config$c = {
|
|
|
10503
10534
|
`
|
|
10504
10535
|
};
|
|
10505
10536
|
const cmdReposView = {
|
|
10506
|
-
description: config$
|
|
10507
|
-
hidden: config$
|
|
10508
|
-
run: run$
|
|
10537
|
+
description: config$d.description,
|
|
10538
|
+
hidden: config$d.hidden,
|
|
10539
|
+
run: run$d
|
|
10509
10540
|
};
|
|
10510
|
-
async function run$
|
|
10541
|
+
async function run$d(argv, importMeta, {
|
|
10511
10542
|
parentName
|
|
10512
10543
|
}) {
|
|
10513
10544
|
const cli = utils.meowOrExit({
|
|
10514
10545
|
argv,
|
|
10515
|
-
config: config$
|
|
10546
|
+
config: config$d,
|
|
10516
10547
|
importMeta,
|
|
10517
10548
|
parentName
|
|
10518
10549
|
});
|
|
@@ -10562,7 +10593,7 @@ async function run$c(argv, importMeta, {
|
|
|
10562
10593
|
return;
|
|
10563
10594
|
}
|
|
10564
10595
|
if (cli.flags['dryRun']) {
|
|
10565
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
10596
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$d);
|
|
10566
10597
|
return;
|
|
10567
10598
|
}
|
|
10568
10599
|
await handleViewRepo(orgSlug, String(repoName), outputKind);
|
|
@@ -10610,9 +10641,9 @@ async function suggestTarget() {
|
|
|
10610
10641
|
}
|
|
10611
10642
|
|
|
10612
10643
|
const {
|
|
10613
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
10644
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$c
|
|
10614
10645
|
} = constants;
|
|
10615
|
-
const config$
|
|
10646
|
+
const config$c = {
|
|
10616
10647
|
commandName: 'create',
|
|
10617
10648
|
description: 'Create a scan',
|
|
10618
10649
|
hidden: false,
|
|
@@ -10744,16 +10775,16 @@ const config$b = {
|
|
|
10744
10775
|
`
|
|
10745
10776
|
};
|
|
10746
10777
|
const cmdScanCreate = {
|
|
10747
|
-
description: config$
|
|
10748
|
-
hidden: config$
|
|
10749
|
-
run: run$
|
|
10778
|
+
description: config$c.description,
|
|
10779
|
+
hidden: config$c.hidden,
|
|
10780
|
+
run: run$c
|
|
10750
10781
|
};
|
|
10751
|
-
async function run$
|
|
10782
|
+
async function run$c(argv, importMeta, {
|
|
10752
10783
|
parentName
|
|
10753
10784
|
}) {
|
|
10754
10785
|
const cli = utils.meowOrExit({
|
|
10755
10786
|
argv,
|
|
10756
|
-
config: config$
|
|
10787
|
+
config: config$c,
|
|
10757
10788
|
importMeta,
|
|
10758
10789
|
parentName
|
|
10759
10790
|
});
|
|
@@ -10904,7 +10935,7 @@ async function run$b(argv, importMeta, {
|
|
|
10904
10935
|
|
|
10905
10936
|
// Note exiting earlier to skirt a hidden auth requirement
|
|
10906
10937
|
if (dryRun) {
|
|
10907
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
10938
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$c);
|
|
10908
10939
|
return;
|
|
10909
10940
|
}
|
|
10910
10941
|
await handleCreateNewScan({
|
|
@@ -10958,9 +10989,9 @@ async function handleDeleteScan(orgSlug, scanId, outputKind) {
|
|
|
10958
10989
|
}
|
|
10959
10990
|
|
|
10960
10991
|
const {
|
|
10961
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
10992
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$b
|
|
10962
10993
|
} = constants;
|
|
10963
|
-
const config$
|
|
10994
|
+
const config$b = {
|
|
10964
10995
|
commandName: 'del',
|
|
10965
10996
|
description: 'Delete a scan',
|
|
10966
10997
|
hidden: false,
|
|
@@ -10993,16 +11024,16 @@ const config$a = {
|
|
|
10993
11024
|
`
|
|
10994
11025
|
};
|
|
10995
11026
|
const cmdScanDel = {
|
|
10996
|
-
description: config$
|
|
10997
|
-
hidden: config$
|
|
10998
|
-
run: run$
|
|
11027
|
+
description: config$b.description,
|
|
11028
|
+
hidden: config$b.hidden,
|
|
11029
|
+
run: run$b
|
|
10999
11030
|
};
|
|
11000
|
-
async function run$
|
|
11031
|
+
async function run$b(argv, importMeta, {
|
|
11001
11032
|
parentName
|
|
11002
11033
|
}) {
|
|
11003
11034
|
const cli = utils.meowOrExit({
|
|
11004
11035
|
argv,
|
|
11005
|
-
config: config$
|
|
11036
|
+
config: config$b,
|
|
11006
11037
|
importMeta,
|
|
11007
11038
|
parentName
|
|
11008
11039
|
});
|
|
@@ -11039,7 +11070,7 @@ async function run$a(argv, importMeta, {
|
|
|
11039
11070
|
return;
|
|
11040
11071
|
}
|
|
11041
11072
|
if (cli.flags['dryRun']) {
|
|
11042
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
11073
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$b);
|
|
11043
11074
|
return;
|
|
11044
11075
|
}
|
|
11045
11076
|
await handleDeleteScan(orgSlug, scanId, outputKind);
|
|
@@ -11233,14 +11264,14 @@ async function handleDiffScan({
|
|
|
11233
11264
|
}
|
|
11234
11265
|
|
|
11235
11266
|
const {
|
|
11236
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
11267
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$a,
|
|
11237
11268
|
SOCKET_WEBSITE_URL: SOCKET_WEBSITE_URL$1
|
|
11238
11269
|
} = constants;
|
|
11239
11270
|
const SOCKET_SBOM_URL_PREFIX = `${SOCKET_WEBSITE_URL$1}/dashboard/org/SocketDev/sbom/`;
|
|
11240
11271
|
const {
|
|
11241
11272
|
length: SOCKET_SBOM_URL_PREFIX_LENGTH
|
|
11242
11273
|
} = SOCKET_SBOM_URL_PREFIX;
|
|
11243
|
-
const config$
|
|
11274
|
+
const config$a = {
|
|
11244
11275
|
commandName: 'diff',
|
|
11245
11276
|
description: 'See what changed between two Scans',
|
|
11246
11277
|
hidden: false,
|
|
@@ -11292,16 +11323,16 @@ const config$9 = {
|
|
|
11292
11323
|
`
|
|
11293
11324
|
};
|
|
11294
11325
|
const cmdScanDiff = {
|
|
11295
|
-
description: config$
|
|
11296
|
-
hidden: config$
|
|
11297
|
-
run: run$
|
|
11326
|
+
description: config$a.description,
|
|
11327
|
+
hidden: config$a.hidden,
|
|
11328
|
+
run: run$a
|
|
11298
11329
|
};
|
|
11299
|
-
async function run$
|
|
11330
|
+
async function run$a(argv, importMeta, {
|
|
11300
11331
|
parentName
|
|
11301
11332
|
}) {
|
|
11302
11333
|
const cli = utils.meowOrExit({
|
|
11303
11334
|
argv,
|
|
11304
|
-
config: config$
|
|
11335
|
+
config: config$a,
|
|
11305
11336
|
importMeta,
|
|
11306
11337
|
parentName
|
|
11307
11338
|
});
|
|
@@ -11353,7 +11384,7 @@ async function run$9(argv, importMeta, {
|
|
|
11353
11384
|
return;
|
|
11354
11385
|
}
|
|
11355
11386
|
if (cli.flags['dryRun']) {
|
|
11356
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
11387
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$a);
|
|
11357
11388
|
return;
|
|
11358
11389
|
}
|
|
11359
11390
|
await handleDiffScan({
|
|
@@ -11985,9 +12016,9 @@ async function handleCreateGithubScan({
|
|
|
11985
12016
|
}
|
|
11986
12017
|
|
|
11987
12018
|
const {
|
|
11988
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
12019
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$9
|
|
11989
12020
|
} = constants;
|
|
11990
|
-
const config$
|
|
12021
|
+
const config$9 = {
|
|
11991
12022
|
commandName: 'github',
|
|
11992
12023
|
description: 'Create a scan for given GitHub repo',
|
|
11993
12024
|
hidden: true,
|
|
@@ -12054,16 +12085,16 @@ const config$8 = {
|
|
|
12054
12085
|
`
|
|
12055
12086
|
};
|
|
12056
12087
|
const cmdScanGithub = {
|
|
12057
|
-
description: config$
|
|
12058
|
-
hidden: config$
|
|
12059
|
-
run: run$
|
|
12088
|
+
description: config$9.description,
|
|
12089
|
+
hidden: config$9.hidden,
|
|
12090
|
+
run: run$9
|
|
12060
12091
|
};
|
|
12061
|
-
async function run$
|
|
12092
|
+
async function run$9(argv, importMeta, {
|
|
12062
12093
|
parentName
|
|
12063
12094
|
}) {
|
|
12064
12095
|
const cli = utils.meowOrExit({
|
|
12065
12096
|
argv,
|
|
12066
|
-
config: config$
|
|
12097
|
+
config: config$9,
|
|
12067
12098
|
importMeta,
|
|
12068
12099
|
parentName
|
|
12069
12100
|
});
|
|
@@ -12171,7 +12202,7 @@ async function run$8(argv, importMeta, {
|
|
|
12171
12202
|
|
|
12172
12203
|
// Note exiting earlier to skirt a hidden auth requirement
|
|
12173
12204
|
if (dryRun) {
|
|
12174
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
12205
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$9);
|
|
12175
12206
|
return;
|
|
12176
12207
|
}
|
|
12177
12208
|
await handleCreateGithubScan({
|
|
@@ -12288,9 +12319,9 @@ async function handleListScans({
|
|
|
12288
12319
|
}
|
|
12289
12320
|
|
|
12290
12321
|
const {
|
|
12291
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
12322
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$8
|
|
12292
12323
|
} = constants;
|
|
12293
|
-
const config$
|
|
12324
|
+
const config$8 = {
|
|
12294
12325
|
commandName: 'list',
|
|
12295
12326
|
description: 'List the scans for an organization',
|
|
12296
12327
|
hidden: false,
|
|
@@ -12367,16 +12398,16 @@ const config$7 = {
|
|
|
12367
12398
|
`
|
|
12368
12399
|
};
|
|
12369
12400
|
const cmdScanList = {
|
|
12370
|
-
description: config$
|
|
12371
|
-
hidden: config$
|
|
12372
|
-
run: run$
|
|
12401
|
+
description: config$8.description,
|
|
12402
|
+
hidden: config$8.hidden,
|
|
12403
|
+
run: run$8
|
|
12373
12404
|
};
|
|
12374
|
-
async function run$
|
|
12405
|
+
async function run$8(argv, importMeta, {
|
|
12375
12406
|
parentName
|
|
12376
12407
|
}) {
|
|
12377
12408
|
const cli = utils.meowOrExit({
|
|
12378
12409
|
argv,
|
|
12379
|
-
config: config$
|
|
12410
|
+
config: config$8,
|
|
12380
12411
|
importMeta,
|
|
12381
12412
|
parentName
|
|
12382
12413
|
});
|
|
@@ -12415,7 +12446,7 @@ async function run$7(argv, importMeta, {
|
|
|
12415
12446
|
return;
|
|
12416
12447
|
}
|
|
12417
12448
|
if (cli.flags['dryRun']) {
|
|
12418
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
12449
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$8);
|
|
12419
12450
|
return;
|
|
12420
12451
|
}
|
|
12421
12452
|
await handleListScans({
|
|
@@ -12475,9 +12506,9 @@ async function handleOrgScanMetadata(orgSlug, scanId, outputKind) {
|
|
|
12475
12506
|
}
|
|
12476
12507
|
|
|
12477
12508
|
const {
|
|
12478
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$
|
|
12509
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$7
|
|
12479
12510
|
} = constants;
|
|
12480
|
-
const config$
|
|
12511
|
+
const config$7 = {
|
|
12481
12512
|
commandName: 'metadata',
|
|
12482
12513
|
description: "Get a scan's metadata",
|
|
12483
12514
|
hidden: false,
|
|
@@ -12510,16 +12541,16 @@ const config$6 = {
|
|
|
12510
12541
|
`
|
|
12511
12542
|
};
|
|
12512
12543
|
const cmdScanMetadata = {
|
|
12513
|
-
description: config$
|
|
12514
|
-
hidden: config$
|
|
12515
|
-
run: run$
|
|
12544
|
+
description: config$7.description,
|
|
12545
|
+
hidden: config$7.hidden,
|
|
12546
|
+
run: run$7
|
|
12516
12547
|
};
|
|
12517
|
-
async function run$
|
|
12548
|
+
async function run$7(argv, importMeta, {
|
|
12518
12549
|
parentName
|
|
12519
12550
|
}) {
|
|
12520
12551
|
const cli = utils.meowOrExit({
|
|
12521
12552
|
argv,
|
|
12522
|
-
config: config$
|
|
12553
|
+
config: config$7,
|
|
12523
12554
|
importMeta,
|
|
12524
12555
|
parentName
|
|
12525
12556
|
});
|
|
@@ -12562,12 +12593,105 @@ async function run$6(argv, importMeta, {
|
|
|
12562
12593
|
return;
|
|
12563
12594
|
}
|
|
12564
12595
|
if (cli.flags['dryRun']) {
|
|
12565
|
-
logger.logger.log(DRY_RUN_BAILING_NOW$
|
|
12596
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$7);
|
|
12566
12597
|
return;
|
|
12567
12598
|
}
|
|
12568
12599
|
await handleOrgScanMetadata(orgSlug, scanId, outputKind);
|
|
12569
12600
|
}
|
|
12570
12601
|
|
|
12602
|
+
async function outputScanReach(result, cwd, outputKind) {
|
|
12603
|
+
if (!result.ok) {
|
|
12604
|
+
process.exitCode = result.code ?? 1;
|
|
12605
|
+
}
|
|
12606
|
+
if (outputKind === 'json') {
|
|
12607
|
+
logger.logger.log(utils.serializeResultJson(result));
|
|
12608
|
+
return;
|
|
12609
|
+
}
|
|
12610
|
+
if (!result.ok) {
|
|
12611
|
+
logger.logger.fail(utils.failMsgWithBadge(result.message, result.cause));
|
|
12612
|
+
return;
|
|
12613
|
+
}
|
|
12614
|
+
logger.logger.success('finished on', cwd);
|
|
12615
|
+
}
|
|
12616
|
+
|
|
12617
|
+
async function scanReachability(cwd) {
|
|
12618
|
+
logger.logger.log('Scanning now... as soon as you implement me! From', cwd);
|
|
12619
|
+
return {
|
|
12620
|
+
ok: true,
|
|
12621
|
+
data: undefined
|
|
12622
|
+
};
|
|
12623
|
+
}
|
|
12624
|
+
|
|
12625
|
+
async function handleScanReach(cwd, outputKind) {
|
|
12626
|
+
const result = await scanReachability(cwd);
|
|
12627
|
+
await outputScanReach(result, cwd, outputKind);
|
|
12628
|
+
}
|
|
12629
|
+
|
|
12630
|
+
const {
|
|
12631
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$6
|
|
12632
|
+
} = constants;
|
|
12633
|
+
const config$6 = {
|
|
12634
|
+
commandName: 'reach',
|
|
12635
|
+
description: 'Compute tier 1 reachability',
|
|
12636
|
+
hidden: true,
|
|
12637
|
+
flags: {
|
|
12638
|
+
...utils.commonFlags,
|
|
12639
|
+
...utils.outputFlags,
|
|
12640
|
+
interactive: {
|
|
12641
|
+
type: 'boolean',
|
|
12642
|
+
default: true,
|
|
12643
|
+
description: 'Allow for interactive elements, asking for input. Use --no-interactive to prevent any input questions, defaulting them to cancel/no.'
|
|
12644
|
+
}
|
|
12645
|
+
},
|
|
12646
|
+
help: (command, config) => `
|
|
12647
|
+
Usage
|
|
12648
|
+
$ ${command} [CWD=.]
|
|
12649
|
+
|
|
12650
|
+
Options
|
|
12651
|
+
${utils.getFlagListOutput(config.flags, 6)}
|
|
12652
|
+
|
|
12653
|
+
Examples
|
|
12654
|
+
$ ${command}
|
|
12655
|
+
$ ${command} ./proj
|
|
12656
|
+
`
|
|
12657
|
+
};
|
|
12658
|
+
const cmdScanReach = {
|
|
12659
|
+
description: config$6.description,
|
|
12660
|
+
hidden: config$6.hidden,
|
|
12661
|
+
run: run$6
|
|
12662
|
+
};
|
|
12663
|
+
async function run$6(argv, importMeta, {
|
|
12664
|
+
parentName
|
|
12665
|
+
}) {
|
|
12666
|
+
const cli = utils.meowOrExit({
|
|
12667
|
+
argv,
|
|
12668
|
+
config: config$6,
|
|
12669
|
+
importMeta,
|
|
12670
|
+
parentName
|
|
12671
|
+
});
|
|
12672
|
+
const {
|
|
12673
|
+
dryRun,
|
|
12674
|
+
interactive,
|
|
12675
|
+
json,
|
|
12676
|
+
markdown
|
|
12677
|
+
} = cli.flags;
|
|
12678
|
+
const outputKind = utils.getOutputKind(json, markdown);
|
|
12679
|
+
let [cwd = '.'] = cli.input;
|
|
12680
|
+
// Note: path.resolve vs .join:
|
|
12681
|
+
// If given path is absolute then cwd should not affect it.
|
|
12682
|
+
cwd = path.resolve(process.cwd(), cwd);
|
|
12683
|
+
logger.logger.info('If you dont have any interactive bits then drop the flag', interactive);
|
|
12684
|
+
const wasValidInput = utils.checkCommandInput(outputKind);
|
|
12685
|
+
if (!wasValidInput) {
|
|
12686
|
+
return;
|
|
12687
|
+
}
|
|
12688
|
+
if (dryRun) {
|
|
12689
|
+
logger.logger.log(DRY_RUN_BAILING_NOW$6);
|
|
12690
|
+
return;
|
|
12691
|
+
}
|
|
12692
|
+
await handleScanReach(cwd, outputKind);
|
|
12693
|
+
}
|
|
12694
|
+
|
|
12571
12695
|
const {
|
|
12572
12696
|
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$5
|
|
12573
12697
|
} = constants;
|
|
@@ -13315,6 +13439,7 @@ const cmdScan = {
|
|
|
13315
13439
|
github: cmdScanGithub,
|
|
13316
13440
|
list: cmdScanList,
|
|
13317
13441
|
metadata: cmdScanMetadata,
|
|
13442
|
+
reach: cmdScanReach,
|
|
13318
13443
|
report: cmdScanReport,
|
|
13319
13444
|
setup: cmdScanSetup,
|
|
13320
13445
|
view: cmdScanView
|
|
@@ -13980,22 +14105,34 @@ async function run(argv, importMeta, {
|
|
|
13980
14105
|
parentName
|
|
13981
14106
|
});
|
|
13982
14107
|
const {
|
|
13983
|
-
disable,
|
|
13984
|
-
enable,
|
|
13985
14108
|
json,
|
|
13986
14109
|
markdown
|
|
13987
14110
|
} = cli.flags;
|
|
14111
|
+
let {
|
|
14112
|
+
disable,
|
|
14113
|
+
enable
|
|
14114
|
+
} = cli.flags;
|
|
13988
14115
|
const outputKind = utils.getOutputKind(json, markdown); // TODO: impl json/md further
|
|
13989
14116
|
|
|
14117
|
+
if (utils.isTestingV1()) {
|
|
14118
|
+
const [arg] = cli.input;
|
|
14119
|
+
if (arg === 'on' || arg === 'enable' || arg === 'enabled') {
|
|
14120
|
+
enable = true;
|
|
14121
|
+
disable = false;
|
|
14122
|
+
} else if (arg === 'off' || arg === 'disable' || arg === 'disabled') {
|
|
14123
|
+
enable = false;
|
|
14124
|
+
disable = true;
|
|
14125
|
+
}
|
|
14126
|
+
}
|
|
13990
14127
|
const wasValidInput = utils.checkCommandInput(outputKind, {
|
|
13991
14128
|
test: !!(enable || disable),
|
|
13992
|
-
message: 'Must use --
|
|
14129
|
+
message: utils.isTestingV1() ? 'Must use on or off argument' : 'Must use --enable or --disable',
|
|
13993
14130
|
pass: 'ok',
|
|
13994
14131
|
fail: 'missing'
|
|
13995
14132
|
}, {
|
|
13996
14133
|
nook: true,
|
|
13997
14134
|
test: !enable || !disable,
|
|
13998
|
-
message: 'Do not use both --enable and --disable',
|
|
14135
|
+
message: utils.isTestingV1() ? 'Do not use both on and off' : 'Do not use both --enable and --disable',
|
|
13999
14136
|
pass: 'ok',
|
|
14000
14137
|
fail: 'missing'
|
|
14001
14138
|
});
|
|
@@ -14110,5 +14247,5 @@ void (async () => {
|
|
|
14110
14247
|
await utils.captureException(e);
|
|
14111
14248
|
}
|
|
14112
14249
|
})();
|
|
14113
|
-
//# debugId=
|
|
14250
|
+
//# debugId=4d928533-b1b0-4544-a736-d405169a5523
|
|
14114
14251
|
//# sourceMappingURL=cli.js.map
|