socket 1.1.9 → 1.1.11
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 +68 -44
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +7 -7
- package/dist/constants.js.map +1 -1
- package/dist/flags.js +16 -17
- package/dist/flags.js.map +1 -1
- package/dist/shadow-npm-inject.js +3 -3
- package/dist/shadow-npm-inject.js.map +1 -1
- package/dist/socket-completion.bash +0 -0
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts +2 -3
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +1 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +2 -3
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +1 -1
- package/dist/types/commands/ci/cmd-ci.d.mts +2 -3
- package/dist/types/commands/ci/cmd-ci.d.mts.map +1 -1
- package/dist/types/commands/config/cmd-config-auto.d.mts +2 -3
- package/dist/types/commands/config/cmd-config-auto.d.mts.map +1 -1
- package/dist/types/commands/config/cmd-config-get.d.mts +2 -3
- package/dist/types/commands/config/cmd-config-get.d.mts.map +1 -1
- package/dist/types/commands/config/cmd-config-list.d.mts +2 -3
- package/dist/types/commands/config/cmd-config-list.d.mts.map +1 -1
- package/dist/types/commands/config/cmd-config-set.d.mts +2 -3
- package/dist/types/commands/config/cmd-config-set.d.mts.map +1 -1
- package/dist/types/commands/config/cmd-config-unset.d.mts +2 -3
- package/dist/types/commands/config/cmd-config-unset.d.mts.map +1 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +2 -3
- package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/env-helpers.d.mts +1 -1
- package/dist/types/commands/fix/env-helpers.d.mts.map +1 -1
- package/dist/types/commands/fix/git.d.mts +1 -1
- package/dist/types/commands/fix/git.d.mts.map +1 -1
- package/dist/types/commands/fix/pull-request.d.mts +1 -1
- package/dist/types/commands/fix/pull-request.d.mts.map +1 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +2 -3
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +1 -1
- package/dist/types/commands/json/cmd-json.d.mts +2 -3
- package/dist/types/commands/json/cmd-json.d.mts.map +1 -1
- package/dist/types/commands/login/cmd-login.d.mts +2 -3
- package/dist/types/commands/login/cmd-login.d.mts.map +1 -1
- package/dist/types/commands/logout/cmd-logout.d.mts +2 -3
- package/dist/types/commands/logout/cmd-logout.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts +2 -3
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +1 -1
- package/dist/types/commands/npm/cmd-npm.d.mts +2 -3
- package/dist/types/commands/npm/cmd-npm.d.mts.map +1 -1
- package/dist/types/commands/npx/cmd-npx.d.mts +2 -3
- package/dist/types/commands/npx/cmd-npx.d.mts.map +1 -1
- package/dist/types/commands/oops/cmd-oops.d.mts +2 -3
- package/dist/types/commands/oops/cmd-oops.d.mts.map +1 -1
- package/dist/types/commands/optimize/cmd-optimize.d.mts +2 -3
- package/dist/types/commands/optimize/cmd-optimize.d.mts.map +1 -1
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +2 -3
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +1 -1
- package/dist/types/commands/organization/cmd-organization-list.d.mts +2 -3
- package/dist/types/commands/organization/cmd-organization-list.d.mts.map +1 -1
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +2 -3
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +1 -1
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +2 -3
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +1 -1
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +2 -3
- package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +1 -1
- package/dist/types/commands/package/cmd-package-score.d.mts +2 -3
- package/dist/types/commands/package/cmd-package-score.d.mts.map +1 -1
- package/dist/types/commands/package/cmd-package-shallow.d.mts +2 -3
- package/dist/types/commands/package/cmd-package-shallow.d.mts.map +1 -1
- package/dist/types/commands/patch/cmd-patch.d.mts +2 -3
- package/dist/types/commands/patch/cmd-patch.d.mts.map +1 -1
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +2 -3
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +1 -1
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +2 -3
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts +2 -3
- package/dist/types/commands/repository/cmd-repository-create.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts +2 -3
- package/dist/types/commands/repository/cmd-repository-del.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-list.d.mts +2 -3
- package/dist/types/commands/repository/cmd-repository-list.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts +2 -3
- package/dist/types/commands/repository/cmd-repository-update.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts +2 -3
- package/dist/types/commands/repository/cmd-repository-view.d.mts.map +1 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts +2 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repository/output-list-repos.d.mts +2 -1
- package/dist/types/commands/repository/output-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repository/types.d.mts +2 -0
- package/dist/types/commands/repository/types.d.mts.map +1 -0
- package/dist/types/commands/scan/cmd-scan-create.d.mts +2 -3
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-del.d.mts +2 -3
- package/dist/types/commands/scan/cmd-scan-del.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +2 -3
- package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-github.d.mts +2 -3
- package/dist/types/commands/scan/cmd-scan-github.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts +2 -3
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-report.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-setup.d.mts +2 -3
- package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-view.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +2 -3
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +1 -1
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +2 -3
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +1 -1
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +2 -3
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +1 -1
- package/dist/types/commands.d.mts +21 -63
- package/dist/types/commands.d.mts.map +1 -1
- package/dist/types/flags.d.mts.map +1 -1
- package/dist/types/utils/alerts-map.d.mts.map +1 -1
- package/dist/types/utils/cmd.d.mts +25 -1
- package/dist/types/utils/cmd.d.mts.map +1 -1
- package/dist/types/utils/config.d.mts +1 -1
- package/dist/types/utils/config.d.mts.map +1 -1
- package/dist/types/utils/git.d.mts +4 -4
- package/dist/types/utils/git.d.mts.map +1 -1
- package/dist/types/utils/lockfile.d.mts +1 -1
- package/dist/types/utils/lockfile.d.mts.map +1 -1
- package/dist/types/utils/meow-with-subcommands.d.mts +16 -1
- package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
- package/dist/types/utils/npm-config.d.mts +1 -1
- package/dist/types/utils/npm-config.d.mts.map +1 -1
- package/dist/types/utils/npm-package-arg.d.mts +1 -1
- package/dist/types/utils/npm-package-arg.d.mts.map +1 -1
- package/dist/types/utils/output-formatting.d.mts.map +1 -1
- package/dist/types/utils/pnpm.d.mts +2 -2
- package/dist/types/utils/pnpm.d.mts.map +1 -1
- package/dist/types/utils/purl.d.mts +6 -6
- package/dist/types/utils/purl.d.mts.map +1 -1
- package/dist/types/utils/sdk.d.mts.map +1 -1
- package/dist/types/utils/semver.d.mts +2 -2
- package/dist/types/utils/semver.d.mts.map +1 -1
- package/dist/types/utils/strings.d.mts +2 -0
- package/dist/types/utils/strings.d.mts.map +1 -0
- package/dist/utils.js +168 -47
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +42168 -50461
- package/external/blessed/lib/tput.js +13 -13
- package/external/blessed/lib/widgets/ansiimage.js +1 -1
- package/external/blessed/lib/widgets/bigtext.js +1 -1
- package/external/blessed/lib/widgets/box.js +1 -1
- package/external/blessed/lib/widgets/button.js +1 -1
- package/external/blessed/lib/widgets/checkbox.js +1 -1
- package/external/blessed/lib/widgets/element.js +1 -1
- package/external/blessed/lib/widgets/filemanager.js +1 -1
- package/external/blessed/lib/widgets/form.js +1 -1
- package/external/blessed/lib/widgets/image.js +1 -1
- package/external/blessed/lib/widgets/input.js +1 -1
- package/external/blessed/lib/widgets/layout.js +1 -1
- package/external/blessed/lib/widgets/line.js +1 -1
- package/external/blessed/lib/widgets/list.js +1 -1
- package/external/blessed/lib/widgets/listbar.js +1 -1
- package/external/blessed/lib/widgets/listtable.js +1 -1
- package/external/blessed/lib/widgets/loading.js +1 -1
- package/external/blessed/lib/widgets/log.js +1 -1
- package/external/blessed/lib/widgets/message.js +1 -1
- package/external/blessed/lib/widgets/node.js +3 -2
- package/external/blessed/lib/widgets/overlayimage.js +1 -1
- package/external/blessed/lib/widgets/progressbar.js +1 -1
- package/external/blessed/lib/widgets/prompt.js +1 -1
- package/external/blessed/lib/widgets/question.js +1 -1
- package/external/blessed/lib/widgets/radiobutton.js +1 -1
- package/external/blessed/lib/widgets/radioset.js +1 -1
- package/external/blessed/lib/widgets/screen.js +8 -6
- package/external/blessed/lib/widgets/scrollablebox.js +1 -1
- package/external/blessed/lib/widgets/scrollabletext.js +1 -1
- package/external/blessed/lib/widgets/table.js +1 -1
- package/external/blessed/lib/widgets/terminal.js +1 -1
- package/external/blessed/lib/widgets/text.js +1 -1
- package/external/blessed/lib/widgets/textarea.js +1 -1
- package/external/blessed/lib/widgets/textbox.js +1 -1
- package/external/blessed/lib/widgets/video.js +1 -1
- package/external/blessed/vendor/tng.js +11 -4
- package/external/blessed-contrib/lib/widget/charts/bar.js +4 -4
- package/external/blessed-contrib/lib/widget/charts/line.js +4 -4
- package/logo-dark.png +0 -0
- package/logo-light.png +0 -0
- package/package.json +62 -93
- package/shadow-bin/npm +0 -0
- package/shadow-bin/npx +0 -0
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ var require$$9 = require('../external/@socketsecurity/registry/lib/debug');
|
|
|
7
7
|
var logger = require('../external/@socketsecurity/registry/lib/logger');
|
|
8
8
|
var utils = require('./utils.js');
|
|
9
9
|
var fs = require('node:fs/promises');
|
|
10
|
-
var
|
|
10
|
+
var require$$5 = require('node:module');
|
|
11
11
|
var constants = require('./constants.js');
|
|
12
12
|
var flags = require('./flags.js');
|
|
13
13
|
var path = require('node:path');
|
|
@@ -68,7 +68,7 @@ async function fetchRepoAnalyticsData(repo, time, options) {
|
|
|
68
68
|
|
|
69
69
|
// Note: Widgets does not seem to actually work as code :'(
|
|
70
70
|
|
|
71
|
-
const require$5 =
|
|
71
|
+
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)));
|
|
72
72
|
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'];
|
|
73
73
|
|
|
74
74
|
// Note: This maps `new Date(date).getMonth()` to English three letters
|
|
@@ -500,7 +500,7 @@ async function fetchAuditLog(config, options) {
|
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
-
const require$4 =
|
|
503
|
+
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)));
|
|
504
504
|
async function outputAuditLog(result, {
|
|
505
505
|
logType,
|
|
506
506
|
orgSlug,
|
|
@@ -3263,7 +3263,7 @@ async function openSocketFixPr(owner, repo, branch, ghsaIds, options) {
|
|
|
3263
3263
|
}
|
|
3264
3264
|
require$$9.debugFn('error', message);
|
|
3265
3265
|
}
|
|
3266
|
-
return
|
|
3266
|
+
return undefined;
|
|
3267
3267
|
}
|
|
3268
3268
|
async function getSocketFixPrs(owner, repo, options) {
|
|
3269
3269
|
return (await getSocketFixPrsWithContext(owner, repo, options)).map(d => d.match);
|
|
@@ -3388,7 +3388,7 @@ function ciRepoInfo() {
|
|
|
3388
3388
|
const ownerSlashRepo = GITHUB_REPOSITORY;
|
|
3389
3389
|
const slashIndex = ownerSlashRepo.indexOf('/');
|
|
3390
3390
|
if (slashIndex === -1) {
|
|
3391
|
-
return
|
|
3391
|
+
return undefined;
|
|
3392
3392
|
}
|
|
3393
3393
|
return {
|
|
3394
3394
|
owner: ownerSlashRepo.slice(0, slashIndex),
|
|
@@ -3411,7 +3411,7 @@ async function getFixEnv() {
|
|
|
3411
3411
|
const envVars = [...(constants.default.ENV.CI ? [] : ['process.env.CI']), ...(gitEmail ? [] : ['process.env.SOCKET_CLI_GIT_USER_EMAIL']), ...(gitUser ? [] : ['process.env.SOCKET_CLI_GIT_USER_NAME']), ...(githubToken ? [] : ['process.env.GITHUB_TOKEN'])];
|
|
3412
3412
|
require$$9.debugFn('notice', `miss: fixEnv.isCi is false, expected ${arrays.joinAnd(envVars)} to be set`);
|
|
3413
3413
|
}
|
|
3414
|
-
let repoInfo
|
|
3414
|
+
let repoInfo;
|
|
3415
3415
|
if (isCi) {
|
|
3416
3416
|
repoInfo = ciRepoInfo();
|
|
3417
3417
|
}
|
|
@@ -4055,7 +4055,7 @@ async function setupTabCompletion(targetName) {
|
|
|
4055
4055
|
};
|
|
4056
4056
|
}
|
|
4057
4057
|
function getTabCompletionScriptRaw() {
|
|
4058
|
-
const sourceDir = path.dirname(require$$0.fileURLToPath(
|
|
4058
|
+
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))));
|
|
4059
4059
|
const sourcePath = path.join(sourceDir, 'socket-completion.bash');
|
|
4060
4060
|
if (!fs$1.existsSync(sourcePath)) {
|
|
4061
4061
|
return {
|
|
@@ -4533,7 +4533,6 @@ function argvToArray(argvObj) {
|
|
|
4533
4533
|
return result;
|
|
4534
4534
|
}
|
|
4535
4535
|
async function runCdxgen(argvObj) {
|
|
4536
|
-
let cleanupPackageLock = false;
|
|
4537
4536
|
const argvMutable = {
|
|
4538
4537
|
__proto__: null,
|
|
4539
4538
|
...argvObj
|
|
@@ -4546,6 +4545,7 @@ async function runCdxgen(argvObj) {
|
|
|
4546
4545
|
},
|
|
4547
4546
|
stdio: 'inherit'
|
|
4548
4547
|
};
|
|
4548
|
+
let cleanupPackageLock = false;
|
|
4549
4549
|
if (argvMutable['type'] !== YARN && nodejsPlatformTypes.has(argvMutable['type']) && fs$1.existsSync(`./${YARN_LOCK}`)) {
|
|
4550
4550
|
if (fs$1.existsSync(`./${PACKAGE_LOCK_JSON}`)) {
|
|
4551
4551
|
argvMutable['type'] = constants.NPM;
|
|
@@ -4787,9 +4787,13 @@ const cmdManifestCdxgen = {
|
|
|
4787
4787
|
hidden: config$e.hidden,
|
|
4788
4788
|
run: run$D
|
|
4789
4789
|
};
|
|
4790
|
-
async function run$D(argv, importMeta, {
|
|
4791
|
-
|
|
4792
|
-
|
|
4790
|
+
async function run$D(argv, importMeta, context) {
|
|
4791
|
+
const {
|
|
4792
|
+
parentName
|
|
4793
|
+
} = {
|
|
4794
|
+
__proto__: null,
|
|
4795
|
+
...context
|
|
4796
|
+
};
|
|
4793
4797
|
const cli = utils.meowOrExit({
|
|
4794
4798
|
// Don't let meow take over --help.
|
|
4795
4799
|
argv: argv.filter(a => !utils.isHelpFlag(a)),
|
|
@@ -4797,11 +4801,17 @@ async function run$D(argv, importMeta, {
|
|
|
4797
4801
|
importMeta,
|
|
4798
4802
|
parentName
|
|
4799
4803
|
});
|
|
4800
|
-
const
|
|
4804
|
+
const {
|
|
4805
|
+
dryRun
|
|
4806
|
+
} = cli.flags;
|
|
4801
4807
|
|
|
4802
|
-
//
|
|
4808
|
+
// Filter Socket flags from argv but keep --no-banner and --help for cdxgen
|
|
4809
|
+
const argsToProcess = utils.filterFlags(argv, {
|
|
4810
|
+
...flags.commonFlags,
|
|
4811
|
+
...flags.outputFlags
|
|
4812
|
+
}, ['--no-banner', '--help', '-h']);
|
|
4803
4813
|
const yargv = {
|
|
4804
|
-
...vendor.yargsParser(
|
|
4814
|
+
...vendor.yargsParser(argsToProcess, yargsConfig)
|
|
4805
4815
|
};
|
|
4806
4816
|
const pathArgs = [];
|
|
4807
4817
|
const unknowns = [];
|
|
@@ -6107,7 +6117,7 @@ async function run$w(argv, importMeta, {
|
|
|
6107
6117
|
});
|
|
6108
6118
|
}
|
|
6109
6119
|
|
|
6110
|
-
const require$3 =
|
|
6120
|
+
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)));
|
|
6111
6121
|
const CMD_NAME$p = constants.NPM;
|
|
6112
6122
|
const description$u = 'Run npm with the Socket wrapper';
|
|
6113
6123
|
const hidden$o = false;
|
|
@@ -6116,9 +6126,13 @@ const cmdNpm = {
|
|
|
6116
6126
|
hidden: hidden$o,
|
|
6117
6127
|
run: run$v
|
|
6118
6128
|
};
|
|
6119
|
-
async function run$v(argv, importMeta, {
|
|
6120
|
-
|
|
6121
|
-
|
|
6129
|
+
async function run$v(argv, importMeta, context) {
|
|
6130
|
+
const {
|
|
6131
|
+
parentName
|
|
6132
|
+
} = {
|
|
6133
|
+
__proto__: null,
|
|
6134
|
+
...context
|
|
6135
|
+
};
|
|
6122
6136
|
const config = {
|
|
6123
6137
|
commandName: CMD_NAME$p,
|
|
6124
6138
|
description: description$u,
|
|
@@ -6156,9 +6170,15 @@ async function run$v(argv, importMeta, {
|
|
|
6156
6170
|
}
|
|
6157
6171
|
const shadowBin = /*@__PURE__*/require$3(constants.default.shadowNpmBinPath);
|
|
6158
6172
|
process.exitCode = 1;
|
|
6173
|
+
|
|
6174
|
+
// Filter Socket flags from argv but keep --json for npm
|
|
6175
|
+
const argsToForward = utils.filterFlags(argv, {
|
|
6176
|
+
...flags.commonFlags,
|
|
6177
|
+
...flags.outputFlags
|
|
6178
|
+
}, ['--json']);
|
|
6159
6179
|
const {
|
|
6160
6180
|
spawnPromise
|
|
6161
|
-
} = await shadowBin(constants.NPM,
|
|
6181
|
+
} = await shadowBin(constants.NPM, argsToForward, {
|
|
6162
6182
|
stdio: 'inherit'
|
|
6163
6183
|
});
|
|
6164
6184
|
|
|
@@ -6174,7 +6194,7 @@ async function run$v(argv, importMeta, {
|
|
|
6174
6194
|
await spawnPromise;
|
|
6175
6195
|
}
|
|
6176
6196
|
|
|
6177
|
-
const require$2 =
|
|
6197
|
+
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)));
|
|
6178
6198
|
const CMD_NAME$o = constants.NPX;
|
|
6179
6199
|
const description$t = 'Run npx with the Socket wrapper';
|
|
6180
6200
|
const hidden$n = false;
|
|
@@ -9837,25 +9857,26 @@ async function run$f(argv, importMeta, {
|
|
|
9837
9857
|
},
|
|
9838
9858
|
org: {
|
|
9839
9859
|
type: 'string',
|
|
9860
|
+
default: '',
|
|
9840
9861
|
description: 'Force override the organization slug, overrides the default org from config'
|
|
9841
9862
|
},
|
|
9842
9863
|
perPage: {
|
|
9843
9864
|
type: 'number',
|
|
9844
|
-
shortFlag: 'pp',
|
|
9845
9865
|
default: 30,
|
|
9846
|
-
description: 'Number of results per page'
|
|
9866
|
+
description: 'Number of results per page',
|
|
9867
|
+
shortFlag: 'pp'
|
|
9847
9868
|
},
|
|
9848
9869
|
page: {
|
|
9849
9870
|
type: 'number',
|
|
9850
|
-
shortFlag: 'p',
|
|
9851
9871
|
default: 1,
|
|
9852
|
-
description: 'Page number'
|
|
9872
|
+
description: 'Page number',
|
|
9873
|
+
shortFlag: 'p'
|
|
9853
9874
|
},
|
|
9854
9875
|
sort: {
|
|
9855
9876
|
type: 'string',
|
|
9856
|
-
shortFlag: 's',
|
|
9857
9877
|
default: 'created_at',
|
|
9858
|
-
description: 'Sorting option'
|
|
9878
|
+
description: 'Sorting option',
|
|
9879
|
+
shortFlag: 's'
|
|
9859
9880
|
}
|
|
9860
9881
|
},
|
|
9861
9882
|
help: (command, config) => `
|
|
@@ -9882,16 +9903,19 @@ async function run$f(argv, importMeta, {
|
|
|
9882
9903
|
const {
|
|
9883
9904
|
all,
|
|
9884
9905
|
direction = 'desc',
|
|
9906
|
+
dryRun,
|
|
9907
|
+
interactive,
|
|
9885
9908
|
json,
|
|
9886
9909
|
markdown,
|
|
9887
|
-
org: orgFlag
|
|
9910
|
+
org: orgFlag,
|
|
9911
|
+
page,
|
|
9912
|
+
perPage,
|
|
9913
|
+
sort
|
|
9888
9914
|
} = cli.flags;
|
|
9889
|
-
const dryRun = !!cli.flags['dryRun'];
|
|
9890
|
-
const interactive = !!cli.flags['interactive'];
|
|
9891
9915
|
const hasApiToken = utils.hasDefaultApiToken();
|
|
9892
9916
|
const {
|
|
9893
9917
|
0: orgSlug
|
|
9894
|
-
} = await utils.determineOrgSlug(
|
|
9918
|
+
} = await utils.determineOrgSlug(orgFlag, interactive, dryRun);
|
|
9895
9919
|
const outputKind = utils.getOutputKind(json, markdown);
|
|
9896
9920
|
const wasValidInput = utils.checkCommandInput(outputKind, {
|
|
9897
9921
|
nook: true,
|
|
@@ -9922,13 +9946,13 @@ async function run$f(argv, importMeta, {
|
|
|
9922
9946
|
return;
|
|
9923
9947
|
}
|
|
9924
9948
|
await handleListRepos({
|
|
9925
|
-
all
|
|
9926
|
-
direction
|
|
9949
|
+
all,
|
|
9950
|
+
direction,
|
|
9927
9951
|
orgSlug,
|
|
9928
9952
|
outputKind,
|
|
9929
|
-
page
|
|
9930
|
-
perPage
|
|
9931
|
-
sort
|
|
9953
|
+
page,
|
|
9954
|
+
perPage,
|
|
9955
|
+
sort
|
|
9932
9956
|
});
|
|
9933
9957
|
}
|
|
9934
9958
|
|
|
@@ -11128,12 +11152,12 @@ async function run$a(argv, importMeta, {
|
|
|
11128
11152
|
const SOCKET_SBOM_URL_PREFIX_LENGTH = SOCKET_SBOM_URL_PREFIX.length;
|
|
11129
11153
|
const {
|
|
11130
11154
|
depth,
|
|
11155
|
+
dryRun,
|
|
11131
11156
|
file,
|
|
11132
11157
|
json,
|
|
11133
11158
|
markdown,
|
|
11134
11159
|
org: orgFlag
|
|
11135
11160
|
} = cli.flags;
|
|
11136
|
-
const dryRun = !!cli.flags['dryRun'];
|
|
11137
11161
|
const interactive = !!cli.flags['interactive'];
|
|
11138
11162
|
let [id1 = '', id2 = ''] = cli.input;
|
|
11139
11163
|
// Support dropping in full socket urls to an sbom.
|
|
@@ -11176,12 +11200,12 @@ async function run$a(argv, importMeta, {
|
|
|
11176
11200
|
return;
|
|
11177
11201
|
}
|
|
11178
11202
|
await handleDiffScan({
|
|
11179
|
-
id1
|
|
11180
|
-
id2
|
|
11181
|
-
depth
|
|
11203
|
+
id1,
|
|
11204
|
+
id2,
|
|
11205
|
+
depth,
|
|
11182
11206
|
orgSlug,
|
|
11183
11207
|
outputKind,
|
|
11184
|
-
file
|
|
11208
|
+
file
|
|
11185
11209
|
});
|
|
11186
11210
|
}
|
|
11187
11211
|
|
|
@@ -13210,7 +13234,7 @@ async function fetchScan(orgSlug, scanId) {
|
|
|
13210
13234
|
error: e,
|
|
13211
13235
|
line
|
|
13212
13236
|
});
|
|
13213
|
-
return
|
|
13237
|
+
return undefined;
|
|
13214
13238
|
}
|
|
13215
13239
|
});
|
|
13216
13240
|
if (ok) {
|
|
@@ -13485,7 +13509,7 @@ async function fetchThreatFeed({
|
|
|
13485
13509
|
return await utils.queryApiSafeJson(`orgs/${orgSlug}/threat-feed?${queryParams}`, 'the Threat Feed data');
|
|
13486
13510
|
}
|
|
13487
13511
|
|
|
13488
|
-
const require$1 =
|
|
13512
|
+
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)));
|
|
13489
13513
|
async function outputThreatFeed(result, outputKind) {
|
|
13490
13514
|
if (!result.ok) {
|
|
13491
13515
|
process.exitCode = result.code ?? 1;
|
|
@@ -14362,7 +14386,7 @@ const rootAliases = {
|
|
|
14362
14386
|
}
|
|
14363
14387
|
};
|
|
14364
14388
|
|
|
14365
|
-
const __filename$1 = require$$0.fileURLToPath(
|
|
14389
|
+
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)));
|
|
14366
14390
|
void (async () => {
|
|
14367
14391
|
const registryUrl = vendor.registryUrl();
|
|
14368
14392
|
await vendor.updater({
|
|
@@ -14440,5 +14464,5 @@ void (async () => {
|
|
|
14440
14464
|
await utils.captureException(e);
|
|
14441
14465
|
}
|
|
14442
14466
|
})();
|
|
14443
|
-
//# debugId=
|
|
14467
|
+
//# debugId=d42a0267-36a6-4b2d-a161-8a78c8038a13
|
|
14444
14468
|
//# sourceMappingURL=cli.js.map
|