socket 1.0.72 → 1.0.74
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 +22 -19
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +37 -7
- package/dist/constants.js.map +1 -1
- package/dist/shadow-npm-bin.js +18 -24
- package/dist/shadow-npm-bin.js.map +1 -1
- package/dist/shadow-npm-inject.js +3 -2
- package/dist/shadow-npm-inject.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
- package/dist/types/constants.d.mts +3 -0
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/shadow/npm/bin.d.mts.map +1 -1
- package/dist/utils.js +4 -3
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +4 -3
- package/external/@coana-tech/cli/cli.mjs +1 -1
- package/external/@socketsecurity/registry/external/libnpmpack.js +20520 -4658
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +7702 -4384
- package/external/@socketsecurity/registry/external/pacote.js +20310 -4448
- package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +2 -2
- package/external/@socketsecurity/registry/lib/spawn.js +25 -2
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -30,6 +30,7 @@ var require$$1 = require('node:util');
|
|
|
30
30
|
var os = require('node:os');
|
|
31
31
|
var promises = require('node:stream/promises');
|
|
32
32
|
|
|
33
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
33
34
|
async function fetchOrgAnalyticsData(time, options) {
|
|
34
35
|
const {
|
|
35
36
|
sdkOptions
|
|
@@ -66,7 +67,7 @@ async function fetchRepoAnalyticsData(repo, time, options) {
|
|
|
66
67
|
|
|
67
68
|
// Note: Widgets does not seem to actually work as code :'(
|
|
68
69
|
|
|
69
|
-
const require$5 = require$$5.createRequire(
|
|
70
|
+
const require$5 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
|
|
70
71
|
const METRICS = ['total_critical_alerts', 'total_high_alerts', 'total_medium_alerts', 'total_low_alerts', 'total_critical_added', 'total_medium_added', 'total_low_added', 'total_high_added', 'total_critical_prevented', 'total_high_prevented', 'total_medium_prevented', 'total_low_prevented'];
|
|
71
72
|
|
|
72
73
|
// Note: This maps `new Date(date).getMonth()` to English three letters
|
|
@@ -498,7 +499,7 @@ async function fetchAuditLog(config, options) {
|
|
|
498
499
|
});
|
|
499
500
|
}
|
|
500
501
|
|
|
501
|
-
const require$4 = require$$5.createRequire(
|
|
502
|
+
const require$4 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
|
|
502
503
|
const {
|
|
503
504
|
REDACTED
|
|
504
505
|
} = constants;
|
|
@@ -4655,6 +4656,9 @@ async function handleFix({
|
|
|
4655
4656
|
}, outputKind);
|
|
4656
4657
|
return;
|
|
4657
4658
|
}
|
|
4659
|
+
debug.debugDir('inspect', {
|
|
4660
|
+
pkgEnvDetails
|
|
4661
|
+
});
|
|
4658
4662
|
|
|
4659
4663
|
// Lazily access constants.
|
|
4660
4664
|
const {
|
|
@@ -4966,7 +4970,7 @@ async function setupTabCompletion(targetName) {
|
|
|
4966
4970
|
};
|
|
4967
4971
|
}
|
|
4968
4972
|
function getTabCompletionScriptRaw() {
|
|
4969
|
-
const sourceDir = path.dirname(require$$0.fileURLToPath(
|
|
4973
|
+
const sourceDir = path.dirname(require$$0.fileURLToPath((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href))));
|
|
4970
4974
|
const sourcePath = path.join(sourceDir, 'socket-completion.bash');
|
|
4971
4975
|
if (!fs$1.existsSync(sourcePath)) {
|
|
4972
4976
|
return {
|
|
@@ -7003,7 +7007,7 @@ async function run$v(argv, importMeta, {
|
|
|
7003
7007
|
});
|
|
7004
7008
|
}
|
|
7005
7009
|
|
|
7006
|
-
const require$3 = require$$5.createRequire(
|
|
7010
|
+
const require$3 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
|
|
7007
7011
|
const {
|
|
7008
7012
|
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$u
|
|
7009
7013
|
} = constants;
|
|
@@ -7056,7 +7060,7 @@ async function run$u(argv, importMeta, {
|
|
|
7056
7060
|
await shadowBin('npm', argv);
|
|
7057
7061
|
}
|
|
7058
7062
|
|
|
7059
|
-
const require$2 = require$$5.createRequire(
|
|
7063
|
+
const require$2 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
|
|
7060
7064
|
const {
|
|
7061
7065
|
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$t
|
|
7062
7066
|
} = constants;
|
|
@@ -13653,7 +13657,7 @@ async function fetchThreatFeed({
|
|
|
13653
13657
|
return await utils.queryApiSafeJson(`orgs/${orgSlug}/threat-feed?${queryParams}`, 'the Threat Feed data');
|
|
13654
13658
|
}
|
|
13655
13659
|
|
|
13656
|
-
const require$1 = require$$5.createRequire(
|
|
13660
|
+
const require$1 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
|
|
13657
13661
|
async function outputThreatFeed(result, outputKind) {
|
|
13658
13662
|
if (!result.ok) {
|
|
13659
13663
|
process.exitCode = result.code ?? 1;
|
|
@@ -14435,17 +14439,15 @@ async function run(argv, importMeta, {
|
|
|
14435
14439
|
}
|
|
14436
14440
|
}
|
|
14437
14441
|
|
|
14438
|
-
const __filename$1 = require$$0.fileURLToPath(
|
|
14439
|
-
const {
|
|
14440
|
-
SOCKET_CLI_BIN_NAME
|
|
14441
|
-
} = constants;
|
|
14442
|
+
const __filename$1 = require$$0.fileURLToPath((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
|
|
14442
14443
|
void (async () => {
|
|
14443
14444
|
const registryUrl = vendor.registryUrl();
|
|
14444
14445
|
await vendor.updater({
|
|
14445
14446
|
authInfo: vendor.registryAuthTokenExports(registryUrl, {
|
|
14446
14447
|
recursive: true
|
|
14447
14448
|
}),
|
|
14448
|
-
|
|
14449
|
+
// Lazily access constants.SOCKET_CLI_BIN_NAME.
|
|
14450
|
+
name: constants.SOCKET_CLI_BIN_NAME,
|
|
14449
14451
|
registryUrl,
|
|
14450
14452
|
ttl: 86_400_000 /* 24 hours in milliseconds */,
|
|
14451
14453
|
|
|
@@ -14454,6 +14456,8 @@ void (async () => {
|
|
|
14454
14456
|
});
|
|
14455
14457
|
try {
|
|
14456
14458
|
await utils.meowWithSubcommands({
|
|
14459
|
+
analytics: cmdAnalytics,
|
|
14460
|
+
'audit-log': cmdAuditLog,
|
|
14457
14461
|
ci: cmdCI,
|
|
14458
14462
|
config: cmdConfig,
|
|
14459
14463
|
fix: cmdFix,
|
|
@@ -14467,16 +14471,14 @@ void (async () => {
|
|
|
14467
14471
|
optimize: cmdOptimize,
|
|
14468
14472
|
organization: cmdOrganization,
|
|
14469
14473
|
package: cmdPackage,
|
|
14474
|
+
manifest: cmdManifest,
|
|
14475
|
+
scan: cmdScan,
|
|
14470
14476
|
'raw-npm': cmdRawNpm,
|
|
14471
14477
|
'raw-npx': cmdRawNpx,
|
|
14472
|
-
wrapper: cmdWrapper,
|
|
14473
|
-
scan: cmdScan,
|
|
14474
|
-
'audit-log': cmdAuditLog,
|
|
14475
14478
|
repos: cmdRepository,
|
|
14476
|
-
analytics: cmdAnalytics,
|
|
14477
14479
|
'threat-feed': cmdThreatFeed,
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
+
uninstall: cmdUninstall,
|
|
14481
|
+
wrapper: cmdWrapper
|
|
14480
14482
|
}, {
|
|
14481
14483
|
aliases: {
|
|
14482
14484
|
audit: {
|
|
@@ -14571,7 +14573,8 @@ void (async () => {
|
|
|
14571
14573
|
}
|
|
14572
14574
|
},
|
|
14573
14575
|
argv: process.argv.slice(2),
|
|
14574
|
-
|
|
14576
|
+
// Lazily access constants.SOCKET_CLI_BIN_NAME.
|
|
14577
|
+
name: constants.SOCKET_CLI_BIN_NAME,
|
|
14575
14578
|
importMeta: {
|
|
14576
14579
|
url: `${require$$0.pathToFileURL(__filename$1)}`
|
|
14577
14580
|
}
|
|
@@ -14631,5 +14634,5 @@ void (async () => {
|
|
|
14631
14634
|
await utils.captureException(e);
|
|
14632
14635
|
}
|
|
14633
14636
|
})();
|
|
14634
|
-
//# debugId=
|
|
14637
|
+
//# debugId=ba4215ca-3cc8-45b8-8900-a36e38e6cc4a
|
|
14635
14638
|
//# sourceMappingURL=cli.js.map
|