@socketsecurity/cli-with-sentry 1.1.25 → 2.0.0
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/CHANGELOG.md +51 -218
- package/README.md +41 -74
- package/dist/cli.js.bz +0 -0
- package/dist/cli.js.bz.sha256 +1 -0
- package/dist/index.js +2 -0
- package/package.json +31 -274
- package/bin/cli.js +0 -52
- package/bin/npm-cli.js +0 -29
- package/bin/npx-cli.js +0 -29
- package/bin/pnpm-cli.js +0 -29
- package/bin/yarn-cli.js +0 -29
- package/dist/cli.js +0 -14999
- package/dist/cli.js.map +0 -1
- package/dist/constants.js +0 -845
- package/dist/constants.js.map +0 -1
- package/dist/flags.js +0 -212
- package/dist/flags.js.map +0 -1
- package/dist/init.gradle +0 -250
- package/dist/instrument-with-sentry.js +0 -44
- package/dist/instrument-with-sentry.js.map +0 -1
- package/dist/npm-cli.js +0 -30
- package/dist/npm-cli.js.map +0 -1
- package/dist/npx-cli.js +0 -26
- package/dist/npx-cli.js.map +0 -1
- package/dist/pnpm-cli.js +0 -30
- package/dist/pnpm-cli.js.map +0 -1
- package/dist/shadow-npm-bin.js +0 -8
- package/dist/shadow-npm-bin.js.map +0 -1
- package/dist/shadow-npm-bin2.js +0 -102
- package/dist/shadow-npm-bin2.js.map +0 -1
- package/dist/shadow-npm-inject.js +0 -307
- package/dist/shadow-npm-inject.js.map +0 -1
- package/dist/shadow-npx-bin.js +0 -12
- package/dist/shadow-npx-bin.js.map +0 -1
- package/dist/shadow-pnpm-bin.js +0 -8
- package/dist/shadow-pnpm-bin.js.map +0 -1
- package/dist/shadow-pnpm-bin2.js +0 -300
- package/dist/shadow-pnpm-bin2.js.map +0 -1
- package/dist/shadow-yarn-bin.js +0 -96
- package/dist/shadow-yarn-bin.js.map +0 -1
- package/dist/tsconfig.dts.tsbuildinfo +0 -1
- package/dist/types/cli.d.mts +0 -3
- package/dist/types/cli.d.mts.map +0 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -10
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/handle-analytics.d.mts +0 -10
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +0 -29
- package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -10
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -15
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -9
- package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -22
- package/dist/types/commands/audit-log/output-audit-log.d.mts.map +0 -1
- package/dist/types/commands/ci/cmd-ci.d.mts +0 -9
- package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -4
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
- package/dist/types/commands/ci/handle-ci.d.mts +0 -2
- package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-auto.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-get.d.mts +0 -9
- package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-list.d.mts +0 -9
- package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-set.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-unset.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config.d.mts +0 -3
- package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
- package/dist/types/commands/config/discover-config-value.d.mts +0 -3
- package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-auto.d.mts +0 -7
- package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-get.d.mts +0 -7
- package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-set.d.mts +0 -8
- package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-unset.d.mts +0 -7
- package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-auto.d.mts +0 -4
- package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-get.d.mts +0 -4
- package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-list.d.mts +0 -6
- package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-set.d.mts +0 -3
- package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-unset.d.mts +0 -3
- package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +0 -10
- package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/coana-fix.d.mts +0 -6
- package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/env-helpers.d.mts +0 -26
- package/dist/types/commands/fix/env-helpers.d.mts.map +0 -1
- package/dist/types/commands/fix/git.d.mts +0 -13
- package/dist/types/commands/fix/git.d.mts.map +0 -1
- package/dist/types/commands/fix/handle-fix.d.mts +0 -20
- package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/output-fix-result.d.mts +0 -3
- package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
- package/dist/types/commands/fix/pull-request.d.mts +0 -31
- package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
- package/dist/types/commands/fix/types.d.mts +0 -21
- package/dist/types/commands/fix/types.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +0 -9
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install.d.mts +0 -3
- package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
- package/dist/types/commands/install/handle-install-completion.d.mts +0 -2
- package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/output-install-completion.d.mts +0 -12
- package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/setup-tab-completion.d.mts +0 -13
- package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/json/cmd-json.d.mts +0 -9
- package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/handle-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/output-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/login/apply-login.d.mts +0 -2
- package/dist/types/commands/login/apply-login.d.mts.map +0 -1
- package/dist/types/commands/login/attempt-login.d.mts +0 -6
- package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
- package/dist/types/commands/login/cmd-login.d.mts +0 -10
- package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
- package/dist/types/commands/logout/apply-logout.d.mts +0 -2
- package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/attempt-logout.d.mts +0 -2
- package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/cmd-logout.d.mts +0 -9
- package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -8
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -7
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -8
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -13
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -9
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -9
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -2
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -3
- package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-requirements.d.mts +0 -6
- package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -6
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -3
- package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
- package/dist/types/commands/npm/cmd-npm.d.mts +0 -10
- package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
- package/dist/types/commands/npx/cmd-npx.d.mts +0 -9
- package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
- package/dist/types/commands/oops/cmd-oops.d.mts +0 -9
- package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
- package/dist/types/commands/optimize/add-overrides.d.mts +0 -20
- package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
- package/dist/types/commands/optimize/apply-optimization.d.mts +0 -14
- package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
- package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -10
- package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -5
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -3
- package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -42
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/handle-optimize.d.mts +0 -8
- package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -13
- package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -9
- package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
- package/dist/types/commands/optimize/shared.d.mts +0 -2
- package/dist/types/commands/optimize/shared.d.mts.map +0 -1
- package/dist/types/commands/optimize/types.d.mts +0 -9
- package/dist/types/commands/optimize/types.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-lockfile.d.mts +0 -11
- package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -9
- package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-dependencies.d.mts +0 -12
- package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -20
- package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-quota.d.mts +0 -8
- package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-dependencies.d.mts +0 -7
- package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-license-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-organization-list.d.mts +0 -3
- package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-quota.d.mts +0 -3
- package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-security-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-dependencies.d.mts +0 -8
- package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/output-license-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-organization-list.d.mts +0 -4
- package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/output-quota.d.mts +0 -4
- package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/output-security-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-score.d.mts +0 -10
- package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -17
- package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package.d.mts +0 -3
- package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -51
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -8
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -3
- package/dist/types/commands/package/handle-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -6
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -5
- package/dist/types/commands/package/output-purls-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -29
- package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -9
- package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
- package/dist/types/commands/patch/cmd-patch.d.mts +0 -10
- package/dist/types/commands/patch/cmd-patch.d.mts.map +0 -1
- package/dist/types/commands/patch/handle-patch.d.mts +0 -12
- package/dist/types/commands/patch/handle-patch.d.mts.map +0 -1
- package/dist/types/commands/patch/manifest-schema.d.mts +0 -34
- package/dist/types/commands/patch/manifest-schema.d.mts.map +0 -1
- package/dist/types/commands/patch/output-patch-result.d.mts +0 -5
- package/dist/types/commands/patch/output-patch-result.d.mts.map +0 -1
- package/dist/types/commands/pnpm/cmd-pnpm.d.mts +0 -10
- package/dist/types/commands/pnpm/cmd-pnpm.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -9
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -2
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -9
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -2
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository.d.mts +0 -3
- package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -10
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -15
- package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-create-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts +0 -12
- package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-update-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-view-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-create-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-delete-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-list-repos.d.mts +0 -5
- package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/output-update-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-view-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/types.d.mts +0 -2
- package/dist/types/commands/repository/types.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -9
- package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -12
- package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -20
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -18
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +0 -17
- package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -8
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan.d.mts +0 -4
- package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -10
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +0 -1
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts +0 -12
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/generate-report.d.mts +0 -44
- package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -12
- package/dist/types/commands/scan/handle-create-github-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -29
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -3
- package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -10
- package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts +0 -13
- package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-config.d.mts +0 -2
- package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -12
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-report.d.mts +0 -14
- package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -10
- package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-delete-scan.d.mts +0 -4
- package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +0 -4
- package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-github.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts +0 -7
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-report.d.mts +0 -22
- package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts +0 -27
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +0 -1
- package/dist/types/commands/scan/reachability-flags.d.mts +0 -3
- package/dist/types/commands/scan/reachability-flags.d.mts.map +0 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts +0 -3
- package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/stream-scan.d.mts +0 -7
- package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_target.d.mts +0 -2
- package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
- package/dist/types/commands/scan/types.d.mts +0 -3
- package/dist/types/commands/scan/types.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -10
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -4
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/types.d.mts +0 -15
- package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -8
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -3
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -2
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -2
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -9
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/yarn/cmd-yarn.d.mts +0 -10
- package/dist/types/commands/yarn/cmd-yarn.d.mts.map +0 -1
- package/dist/types/commands.d.mts +0 -203
- package/dist/types/commands.d.mts.map +0 -1
- package/dist/types/constants.d.mts +0 -299
- package/dist/types/constants.d.mts.map +0 -1
- package/dist/types/flags.d.mts +0 -18
- package/dist/types/flags.d.mts.map +0 -1
- package/dist/types/instrument-with-sentry.d.mts +0 -2
- package/dist/types/instrument-with-sentry.d.mts.map +0 -1
- package/dist/types/npm-cli.d.mts +0 -3
- package/dist/types/npm-cli.d.mts.map +0 -1
- package/dist/types/npx-cli.d.mts +0 -3
- package/dist/types/npx-cli.d.mts.map +0 -1
- package/dist/types/pnpm-cli.d.mts +0 -3
- package/dist/types/pnpm-cli.d.mts.map +0 -1
- package/dist/types/sea/bootstrap.d.mts +0 -2
- package/dist/types/sea/bootstrap.d.mts.map +0 -1
- package/dist/types/sea/build-sea.d.mts +0 -27
- package/dist/types/sea/build-sea.d.mts.map +0 -1
- package/dist/types/shadow/common.d.mts +0 -23
- package/dist/types/shadow/common.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/index.d.mts +0 -8
- package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -35
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/types.d.mts +0 -123
- package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -24
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
- package/dist/types/shadow/npm/bin.d.mts +0 -5
- package/dist/types/shadow/npm/bin.d.mts.map +0 -1
- package/dist/types/shadow/npm/inject.d.mts +0 -2
- package/dist/types/shadow/npm/inject.d.mts.map +0 -1
- package/dist/types/shadow/npm/install.d.mts +0 -13
- package/dist/types/shadow/npm/install.d.mts.map +0 -1
- package/dist/types/shadow/npm/paths.d.mts +0 -6
- package/dist/types/shadow/npm/paths.d.mts.map +0 -1
- package/dist/types/shadow/npm-base.d.mts +0 -11
- package/dist/types/shadow/npm-base.d.mts.map +0 -1
- package/dist/types/shadow/npx/bin.d.mts +0 -5
- package/dist/types/shadow/npx/bin.d.mts.map +0 -1
- package/dist/types/shadow/pnpm/bin.d.mts +0 -10
- package/dist/types/shadow/pnpm/bin.d.mts.map +0 -1
- package/dist/types/shadow/stdio-ipc.d.mts +0 -7
- package/dist/types/shadow/stdio-ipc.d.mts.map +0 -1
- package/dist/types/shadow/yarn/bin.d.mts +0 -10
- package/dist/types/shadow/yarn/bin.d.mts.map +0 -1
- package/dist/types/test/json-output-validation.d.mts +0 -37
- package/dist/types/test/json-output-validation.d.mts.map +0 -1
- package/dist/types/test/mocks/socket-auth.d.mts +0 -88
- package/dist/types/test/mocks/socket-auth.d.mts.map +0 -1
- package/dist/types/types.d.mts +0 -29
- package/dist/types/types.d.mts.map +0 -1
- package/dist/types/utils/agent.d.mts +0 -12
- package/dist/types/utils/agent.d.mts.map +0 -1
- package/dist/types/utils/alert/artifact.d.mts +0 -21
- package/dist/types/utils/alert/artifact.d.mts.map +0 -1
- package/dist/types/utils/alert/fix.d.mts +0 -6
- package/dist/types/utils/alert/fix.d.mts.map +0 -1
- package/dist/types/utils/alert/severity.d.mts +0 -14
- package/dist/types/utils/alert/severity.d.mts.map +0 -1
- package/dist/types/utils/alerts-map.d.mts +0 -27
- package/dist/types/utils/alerts-map.d.mts.map +0 -1
- package/dist/types/utils/api.d.mts +0 -44
- package/dist/types/utils/api.d.mts.map +0 -1
- package/dist/types/utils/check-input.d.mts +0 -9
- package/dist/types/utils/check-input.d.mts.map +0 -1
- package/dist/types/utils/cmd.d.mts +0 -50
- package/dist/types/utils/cmd.d.mts.map +0 -1
- package/dist/types/utils/coana.d.mts +0 -2
- package/dist/types/utils/coana.d.mts.map +0 -1
- package/dist/types/utils/color-or-markdown.d.mts +0 -16
- package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
- package/dist/types/utils/completion.d.mts +0 -11
- package/dist/types/utils/completion.d.mts.map +0 -1
- package/dist/types/utils/config.d.mts +0 -34
- package/dist/types/utils/config.d.mts.map +0 -1
- package/dist/types/utils/cve-to-ghsa.d.mts +0 -6
- package/dist/types/utils/cve-to-ghsa.d.mts.map +0 -1
- package/dist/types/utils/debug.d.mts +0 -45
- package/dist/types/utils/debug.d.mts.map +0 -1
- package/dist/types/utils/determine-org-slug.d.mts +0 -2
- package/dist/types/utils/determine-org-slug.d.mts.map +0 -1
- package/dist/types/utils/dlx-binary.d.mts +0 -58
- package/dist/types/utils/dlx-binary.d.mts.map +0 -1
- package/dist/types/utils/dlx-detection.d.mts +0 -29
- package/dist/types/utils/dlx-detection.d.mts.map +0 -1
- package/dist/types/utils/dlx.d.mts +0 -36
- package/dist/types/utils/dlx.d.mts.map +0 -1
- package/dist/types/utils/ecosystem.d.mts +0 -20
- package/dist/types/utils/ecosystem.d.mts.map +0 -1
- package/dist/types/utils/errors.d.mts +0 -62
- package/dist/types/utils/errors.d.mts.map +0 -1
- package/dist/types/utils/extract-names.d.mts +0 -15
- package/dist/types/utils/extract-names.d.mts.map +0 -1
- package/dist/types/utils/fail-msg-with-badge.d.mts +0 -2
- package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
- package/dist/types/utils/filter-config.d.mts +0 -5
- package/dist/types/utils/filter-config.d.mts.map +0 -1
- package/dist/types/utils/fs.d.mts +0 -8
- package/dist/types/utils/fs.d.mts.map +0 -1
- package/dist/types/utils/get-output-kind.d.mts +0 -3
- package/dist/types/utils/get-output-kind.d.mts.map +0 -1
- package/dist/types/utils/git.d.mts +0 -35
- package/dist/types/utils/git.d.mts.map +0 -1
- package/dist/types/utils/github.d.mts +0 -38
- package/dist/types/utils/github.d.mts.map +0 -1
- package/dist/types/utils/glob.d.mts +0 -15
- package/dist/types/utils/glob.d.mts.map +0 -1
- package/dist/types/utils/lockfile.d.mts +0 -2
- package/dist/types/utils/lockfile.d.mts.map +0 -1
- package/dist/types/utils/map-to-object.d.mts +0 -10
- package/dist/types/utils/map-to-object.d.mts.map +0 -1
- package/dist/types/utils/markdown.d.mts +0 -27
- package/dist/types/utils/markdown.d.mts.map +0 -1
- package/dist/types/utils/meow-with-subcommands.d.mts +0 -83
- package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
- package/dist/types/utils/ms-at-home.d.mts +0 -2
- package/dist/types/utils/ms-at-home.d.mts.map +0 -1
- package/dist/types/utils/npm-config.d.mts +0 -14
- package/dist/types/utils/npm-config.d.mts.map +0 -1
- package/dist/types/utils/npm-package-arg.d.mts +0 -8
- package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
- package/dist/types/utils/npm-paths.d.mts +0 -7
- package/dist/types/utils/npm-paths.d.mts.map +0 -1
- package/dist/types/utils/npm-spec.d.mts +0 -57
- package/dist/types/utils/npm-spec.d.mts.map +0 -1
- package/dist/types/utils/objects.d.mts +0 -3
- package/dist/types/utils/objects.d.mts.map +0 -1
- package/dist/types/utils/organization.d.mts +0 -5
- package/dist/types/utils/organization.d.mts.map +0 -1
- package/dist/types/utils/output-formatting.d.mts +0 -20
- package/dist/types/utils/output-formatting.d.mts.map +0 -1
- package/dist/types/utils/package-environment.d.mts +0 -57
- package/dist/types/utils/package-environment.d.mts.map +0 -1
- package/dist/types/utils/path-resolve.d.mts +0 -14
- package/dist/types/utils/path-resolve.d.mts.map +0 -1
- package/dist/types/utils/pnpm-paths.d.mts +0 -5
- package/dist/types/utils/pnpm-paths.d.mts.map +0 -1
- package/dist/types/utils/pnpm.d.mts +0 -11
- package/dist/types/utils/pnpm.d.mts.map +0 -1
- package/dist/types/utils/purl-to-ghsa.d.mts +0 -6
- package/dist/types/utils/purl-to-ghsa.d.mts.map +0 -1
- package/dist/types/utils/purl.d.mts +0 -71
- package/dist/types/utils/purl.d.mts.map +0 -1
- package/dist/types/utils/requirements.d.mts +0 -125
- package/dist/types/utils/requirements.d.mts.map +0 -1
- package/dist/types/utils/sdk.d.mts +0 -17
- package/dist/types/utils/sdk.d.mts.map +0 -1
- package/dist/types/utils/semver.d.mts +0 -7
- package/dist/types/utils/semver.d.mts.map +0 -1
- package/dist/types/utils/serialize-result-json.d.mts +0 -5
- package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
- package/dist/types/utils/shadow-links.d.mts +0 -5
- package/dist/types/utils/shadow-links.d.mts.map +0 -1
- package/dist/types/utils/socket-json.d.mts +0 -59
- package/dist/types/utils/socket-json.d.mts.map +0 -1
- package/dist/types/utils/socket-package-alert.d.mts +0 -80
- package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
- package/dist/types/utils/socket-url.d.mts +0 -8
- package/dist/types/utils/socket-url.d.mts.map +0 -1
- package/dist/types/utils/spec.d.mts +0 -5
- package/dist/types/utils/spec.d.mts.map +0 -1
- package/dist/types/utils/strings.d.mts +0 -14
- package/dist/types/utils/strings.d.mts.map +0 -1
- package/dist/types/utils/terminal-link.d.mts +0 -52
- package/dist/types/utils/terminal-link.d.mts.map +0 -1
- package/dist/types/utils/tildify.d.mts +0 -2
- package/dist/types/utils/tildify.d.mts.map +0 -1
- package/dist/types/utils/translations.d.mts +0 -617
- package/dist/types/utils/translations.d.mts.map +0 -1
- package/dist/types/utils/walk-nested-map.d.mts +0 -7
- package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
- package/dist/types/utils/yarn-paths.d.mts +0 -5
- package/dist/types/utils/yarn-paths.d.mts.map +0 -1
- package/dist/types/utils/yarn-version.d.mts +0 -2
- package/dist/types/utils/yarn-version.d.mts.map +0 -1
- package/dist/types/yarn-cli.d.mts +0 -3
- package/dist/types/yarn-cli.d.mts.map +0 -1
- package/dist/utils.js +0 -6146
- package/dist/utils.js.map +0 -1
- package/dist/vendor.js +0 -162074
- package/dist/yarn-cli.js +0 -30
- package/dist/yarn-cli.js.map +0 -1
- package/external/@socketsecurity/registry/LICENSE +0 -21
- package/external/@socketsecurity/registry/README.md +0 -9
- package/external/@socketsecurity/registry/extensions.json +0 -28
- package/external/@socketsecurity/registry/external/@inquirer/confirm.js +0 -3165
- package/external/@socketsecurity/registry/external/@inquirer/input.js +0 -3202
- package/external/@socketsecurity/registry/external/@inquirer/password.js +0 -3307
- package/external/@socketsecurity/registry/external/@inquirer/search.js +0 -3519
- package/external/@socketsecurity/registry/external/@inquirer/select.js +0 -3655
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +0 -21406
- package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/read-package.js +0 -183
- package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/sort.js +0 -274
- package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +0 -704
- package/external/@socketsecurity/registry/external/@socketregistry/is-unicode-supported.js +0 -54
- package/external/@socketsecurity/registry/external/@socketregistry/packageurl-js.js +0 -4516
- package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +0 -453
- package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +0 -1406
- package/external/@socketsecurity/registry/external/browserslist.js +0 -20496
- package/external/@socketsecurity/registry/external/cacache.js +0 -16208
- package/external/@socketsecurity/registry/external/debug.js +0 -1163
- package/external/@socketsecurity/registry/external/fast-glob.js +0 -7994
- package/external/@socketsecurity/registry/external/fast-sort.js +0 -181
- package/external/@socketsecurity/registry/external/libnpmpack.js +0 -106271
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +0 -38997
- package/external/@socketsecurity/registry/external/normalize-package-data.js +0 -5343
- package/external/@socketsecurity/registry/external/npm-package-arg.js +0 -5773
- package/external/@socketsecurity/registry/external/pacote.js +0 -74109
- package/external/@socketsecurity/registry/external/picomatch.js +0 -2307
- package/external/@socketsecurity/registry/external/semver.js +0 -2618
- package/external/@socketsecurity/registry/external/signal-exit.js +0 -336
- package/external/@socketsecurity/registry/external/spdx-correct.js +0 -1457
- package/external/@socketsecurity/registry/external/spdx-expression-parse.js +0 -1043
- package/external/@socketsecurity/registry/external/streaming-iterables.js +0 -326
- package/external/@socketsecurity/registry/external/validate-npm-package-name.js +0 -108
- package/external/@socketsecurity/registry/external/which.js +0 -405
- package/external/@socketsecurity/registry/external/yoctocolors-cjs.js +0 -101
- package/external/@socketsecurity/registry/index.js +0 -31
- package/external/@socketsecurity/registry/lib/agent.js +0 -390
- package/external/@socketsecurity/registry/lib/arrays.js +0 -89
- package/external/@socketsecurity/registry/lib/bin.js +0 -650
- package/external/@socketsecurity/registry/lib/constants/abort-controller.js +0 -15
- package/external/@socketsecurity/registry/lib/constants/abort-signal.js +0 -27
- package/external/@socketsecurity/registry/lib/constants/at-latest.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/biome-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/bun-lock.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/bun.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ci.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/column-limit.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/copy-left-licenses.js +0 -27
- package/external/@socketsecurity/registry/lib/constants/darwin.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/dot-package-lock-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/empty-file.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/empty-value.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/env.js +0 -59
- package/external/@socketsecurity/registry/lib/constants/eslint-config-js.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/esnext.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/exec-path.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-cjs.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-cmd.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-cts.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-dts.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-js.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-lock.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-lockb.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-md.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-mjs.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-mts.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-ps1.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-yml.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/extensions-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/extensions.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/get-ipc.js +0 -10
- package/external/@socketsecurity/registry/lib/constants/gitignore.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/index.js +0 -139
- package/external/@socketsecurity/registry/lib/constants/ipc-handler.js +0 -19
- package/external/@socketsecurity/registry/lib/constants/ipc-object.js +0 -6
- package/external/@socketsecurity/registry/lib/constants/ipc-promise.js +0 -47
- package/external/@socketsecurity/registry/lib/constants/ipc-target.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/k-internals-symbol.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/latest.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-glob.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-original-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-original-glob.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-original.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/lifecycle-script-names.js +0 -18
- package/external/@socketsecurity/registry/lib/constants/loop-sentinel.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/maintained-node-versions.js +0 -47
- package/external/@socketsecurity/registry/lib/constants/manifest-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/mit.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-auth-token.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-debug-flags.js +0 -9
- package/external/@socketsecurity/registry/lib/constants/node-env.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-harden-flags.js +0 -29
- package/external/@socketsecurity/registry/lib/constants/node-modules-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-modules.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-no-warnings-flags.js +0 -16
- package/external/@socketsecurity/registry/lib/constants/node-version.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +0 -6
- package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/npm.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/npx.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/overrides.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-default-node-range.js +0 -6
- package/external/@socketsecurity/registry/lib/constants/package-default-socket-categories.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-default-version.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-extensions.js +0 -47
- package/external/@socketsecurity/registry/lib/constants/package-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-lock-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/packument-cache.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/pacote-cache-path.js +0 -9
- package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/pnpm.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/pre-commit.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/readme-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/readme-glob.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/readme-md.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/registry-scope-delimiter.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/registry.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/resolutions.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-github-org.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-ipc-handshake.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-override-scope.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-public-api-token.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-npm-org.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-package-name.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-repo-name.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-scope.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-security-scope.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/spinner.js +0 -4
- package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-api.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-env-var.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-disable-warning-flag.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-permission-flag.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-require-module.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/supports-node-run.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-process-send.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/ts-libs-available.js +0 -22
- package/external/@socketsecurity/registry/lib/constants/ts-types-available.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/tsconfig-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/undefined-token.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unknown-error.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unknown-value.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unlicenced.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unlicensed.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/utf8.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/vitest.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/vlt.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/win32.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/yarn-lock.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn.js +0 -3
- package/external/@socketsecurity/registry/lib/debug.js +0 -264
- package/external/@socketsecurity/registry/lib/env.js +0 -62
- package/external/@socketsecurity/registry/lib/fs.js +0 -556
- package/external/@socketsecurity/registry/lib/functions.js +0 -20
- package/external/@socketsecurity/registry/lib/globs.js +0 -145
- package/external/@socketsecurity/registry/lib/json.js +0 -69
- package/external/@socketsecurity/registry/lib/logger.js +0 -534
- package/external/@socketsecurity/registry/lib/objects.js +0 -422
- package/external/@socketsecurity/registry/lib/packages.js +0 -1376
- package/external/@socketsecurity/registry/lib/path.js +0 -231
- package/external/@socketsecurity/registry/lib/promises.js +0 -286
- package/external/@socketsecurity/registry/lib/prompts.js +0 -63
- package/external/@socketsecurity/registry/lib/regexps.js +0 -23
- package/external/@socketsecurity/registry/lib/sorts.js +0 -70
- package/external/@socketsecurity/registry/lib/spawn.js +0 -252
- package/external/@socketsecurity/registry/lib/spinner.js +0 -205
- package/external/@socketsecurity/registry/lib/streams.js +0 -84
- package/external/@socketsecurity/registry/lib/strings.js +0 -235
- package/external/@socketsecurity/registry/lib/url.js +0 -68
- package/external/@socketsecurity/registry/lib/words.js +0 -45
- package/external/@socketsecurity/registry/manifest.json +0 -1875
- package/external/blessed/LICENSE +0 -20
- package/external/blessed/README.md +0 -2421
- package/external/blessed/lib/alias.js +0 -528
- package/external/blessed/lib/blessed.js +0 -34
- package/external/blessed/lib/colors.js +0 -532
- package/external/blessed/lib/events.js +0 -191
- package/external/blessed/lib/gpmclient.js +0 -223
- package/external/blessed/lib/helpers.js +0 -167
- package/external/blessed/lib/keys.js +0 -341
- package/external/blessed/lib/program.js +0 -4297
- package/external/blessed/lib/tput.js +0 -3020
- package/external/blessed/lib/unicode.js +0 -792
- package/external/blessed/lib/widget.js +0 -62
- package/external/blessed/lib/widgets/ansiimage.js +0 -169
- package/external/blessed/lib/widgets/bigtext.js +0 -161
- package/external/blessed/lib/widgets/box.js +0 -36
- package/external/blessed/lib/widgets/button.js +0 -64
- package/external/blessed/lib/widgets/checkbox.js +0 -93
- package/external/blessed/lib/widgets/element.js +0 -2572
- package/external/blessed/lib/widgets/filemanager.js +0 -214
- package/external/blessed/lib/widgets/form.js +0 -269
- package/external/blessed/lib/widgets/image.js +0 -63
- package/external/blessed/lib/widgets/input.js +0 -36
- package/external/blessed/lib/widgets/layout.js +0 -235
- package/external/blessed/lib/widgets/line.js +0 -58
- package/external/blessed/lib/widgets/list.js +0 -601
- package/external/blessed/lib/widgets/listbar.js +0 -413
- package/external/blessed/lib/widgets/listtable.js +0 -254
- package/external/blessed/lib/widgets/loading.js +0 -90
- package/external/blessed/lib/widgets/log.js +0 -85
- package/external/blessed/lib/widgets/message.js +0 -125
- package/external/blessed/lib/widgets/node.js +0 -284
- package/external/blessed/lib/widgets/overlayimage.js +0 -719
- package/external/blessed/lib/widgets/progressbar.js +0 -159
- package/external/blessed/lib/widgets/prompt.js +0 -122
- package/external/blessed/lib/widgets/question.js +0 -118
- package/external/blessed/lib/widgets/radiobutton.js +0 -63
- package/external/blessed/lib/widgets/radioset.js +0 -38
- package/external/blessed/lib/widgets/screen.js +0 -2300
- package/external/blessed/lib/widgets/scrollablebox.js +0 -391
- package/external/blessed/lib/widgets/scrollabletext.js +0 -37
- package/external/blessed/lib/widgets/table.js +0 -356
- package/external/blessed/lib/widgets/terminal.js +0 -414
- package/external/blessed/lib/widgets/text.js +0 -37
- package/external/blessed/lib/widgets/textarea.js +0 -344
- package/external/blessed/lib/widgets/textbox.js +0 -79
- package/external/blessed/lib/widgets/video.js +0 -128
- package/external/blessed/usr/fonts/AUTHORS +0 -1
- package/external/blessed/usr/fonts/LICENSE +0 -94
- package/external/blessed/usr/fonts/README +0 -340
- package/external/blessed/usr/fonts/ter-u14b.json +0 -17826
- package/external/blessed/usr/fonts/ter-u14n.json +0 -17826
- package/external/blessed/usr/linux +0 -0
- package/external/blessed/usr/windows-ansi +0 -0
- package/external/blessed/usr/xterm +0 -0
- package/external/blessed/usr/xterm-256color +0 -0
- package/external/blessed/usr/xterm.termcap +0 -243
- package/external/blessed/usr/xterm.terminfo +0 -1977
- package/external/blessed/vendor/tng.js +0 -1757
- package/external/blessed-contrib/LICENSE.md +0 -21
- package/external/blessed-contrib/lib/layout/grid.js +0 -409
- package/external/blessed-contrib/lib/widget/charts/bar.js +0 -8370
- package/external/blessed-contrib/lib/widget/charts/line.js +0 -17924
- package/external/blessed-contrib/lib/widget/table.js +0 -187
- package/shadow-bin/npm +0 -27
- package/shadow-bin/npx +0 -27
- package/shadow-bin/pnpm +0 -27
- package/shadow-bin/yarn +0 -27
- /package/{translations.json → data/alert-translations.json} +0 -0
- /package/{requirements.json → data/command-api-requirements.json} +0 -0
- /package/{dist → data}/socket-completion.bash +0 -0
package/dist/shadow-npx-bin.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var constants = require('./constants.js');
|
|
4
|
-
var shadowNpmBin = require('./shadow-npm-bin2.js');
|
|
5
|
-
|
|
6
|
-
async function shadowNpxBin(args = process.argv.slice(2), options, extra) {
|
|
7
|
-
return await shadowNpmBin.shadowNpmBase(constants.NPX, args, options, extra);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
module.exports = shadowNpxBin;
|
|
11
|
-
//# debugId=78c6da12-4727-423f-9815-2c7486bbf7e5
|
|
12
|
-
//# sourceMappingURL=shadow-npx-bin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow-npx-bin.js","sources":["../src/shadow/npx/bin.mts"],"sourcesContent":["import { NPX } from '../../constants.mts'\nimport shadowNpmBase from '../npm-base.mts'\n\nimport type { ShadowBinOptions, ShadowBinResult } from '../npm-base.mts'\nimport type { SpawnExtra } from '@socketsecurity/registry/lib/spawn'\n\nexport type { ShadowBinOptions, ShadowBinResult }\n\nexport default async function shadowNpxBin(\n args: string[] | readonly string[] = process.argv.slice(2),\n options?: ShadowBinOptions | undefined,\n extra?: SpawnExtra | undefined,\n): Promise<ShadowBinResult> {\n return await shadowNpmBase(NPX, args, options, extra)\n}\n"],"names":[],"mappings":";;;;;AAQe;;AAMf;;","debugId":"78c6da12-4727-423f-9815-2c7486bbf7e5"}
|
package/dist/shadow-pnpm-bin.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow-pnpm-bin.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;","debugId":"26f08621-821f-4156-93c1-18cf372d6d32"}
|
package/dist/shadow-pnpm-bin2.js
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('node:fs');
|
|
4
|
-
var path = require('node:path');
|
|
5
|
-
var require$$0 = require('node:url');
|
|
6
|
-
var require$$9 = require('../external/@socketsecurity/registry/lib/debug');
|
|
7
|
-
var logger = require('../external/@socketsecurity/registry/lib/logger');
|
|
8
|
-
var spawn = require('../external/@socketsecurity/registry/lib/spawn');
|
|
9
|
-
var constants = require('./constants.js');
|
|
10
|
-
var utils = require('./utils.js');
|
|
11
|
-
var packages = require('../external/@socketsecurity/registry/lib/packages');
|
|
12
|
-
var shadowNpmBin = require('./shadow-npm-bin2.js');
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Extract package PURLs from command arguments for add/dlx commands where
|
|
16
|
-
* packages are specified as arguments.
|
|
17
|
-
* Used by: pnpm, yarn.
|
|
18
|
-
*/
|
|
19
|
-
function extractPackagePurlsFromCommandArgs(rawArgs) {
|
|
20
|
-
const packagePurls = [];
|
|
21
|
-
|
|
22
|
-
// For 'add package1 package2@version' or 'dlx package', get packages from args.
|
|
23
|
-
const packageArgs = rawArgs.slice(1).filter(a => !a.startsWith('-') && a !== '--');
|
|
24
|
-
for (const pkgSpec of packageArgs) {
|
|
25
|
-
const purl = utils.safeNpmSpecToPurl(pkgSpec);
|
|
26
|
-
if (purl) {
|
|
27
|
-
packagePurls.push(purl);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return packagePurls;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Extract package PURLs from package.json for install/update commands.
|
|
35
|
-
* Used by: pnpm, yarn.
|
|
36
|
-
*/
|
|
37
|
-
async function extractPackagePurlsFromPackageJson(cwd = process.cwd()) {
|
|
38
|
-
const packagePurls = [];
|
|
39
|
-
try {
|
|
40
|
-
const pkgJson = await packages.readPackageJson(cwd);
|
|
41
|
-
const allDeps = {
|
|
42
|
-
...pkgJson.dependencies,
|
|
43
|
-
...pkgJson.devDependencies,
|
|
44
|
-
...pkgJson.optionalDependencies,
|
|
45
|
-
...pkgJson.peerDependencies
|
|
46
|
-
};
|
|
47
|
-
for (const {
|
|
48
|
-
0: name,
|
|
49
|
-
1: version
|
|
50
|
-
} of Object.entries(allDeps)) {
|
|
51
|
-
const purl = utils.safeNpmSpecToPurl(typeof version === 'string' ? `${name}@${version}` : name);
|
|
52
|
-
if (purl) {
|
|
53
|
-
packagePurls.push(purl);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
utils.debugScan('start', packagePurls.length);
|
|
57
|
-
} catch (e) {
|
|
58
|
-
require$$9.debugFn('warn', `${constants.PACKAGE_JSON} not found or invalid during dependency scanning`);
|
|
59
|
-
require$$9.debugDir('error', e);
|
|
60
|
-
}
|
|
61
|
-
return packagePurls;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Scan packages and log alerts if found.
|
|
65
|
-
*/
|
|
66
|
-
async function scanPackagesAndLogAlerts(options) {
|
|
67
|
-
const {
|
|
68
|
-
acceptRisks,
|
|
69
|
-
command,
|
|
70
|
-
dlxCommands,
|
|
71
|
-
installCommands,
|
|
72
|
-
managerName,
|
|
73
|
-
nothrow = true,
|
|
74
|
-
rawArgs,
|
|
75
|
-
spinner,
|
|
76
|
-
viewAllRisks
|
|
77
|
-
} = options;
|
|
78
|
-
let {
|
|
79
|
-
cwd = process.cwd()
|
|
80
|
-
} = options;
|
|
81
|
-
if (cwd instanceof URL) {
|
|
82
|
-
cwd = require$$0.fileURLToPath(cwd);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Check if this is a command that needs security scanning.
|
|
86
|
-
const isDlxCommand = dlxCommands && command && dlxCommands.has(command);
|
|
87
|
-
const isInstallCommand = command && installCommands.has(command);
|
|
88
|
-
const needsScanning = isDlxCommand || isInstallCommand;
|
|
89
|
-
if (!needsScanning || rawArgs.includes(constants.FLAG_DRY_RUN)) {
|
|
90
|
-
return {
|
|
91
|
-
shouldExit: false
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Extract package names from command arguments before any downloads.
|
|
96
|
-
let packagePurls = [];
|
|
97
|
-
if (isDlxCommand || utils.isAddCommand(command)) {
|
|
98
|
-
packagePurls = extractPackagePurlsFromCommandArgs(rawArgs);
|
|
99
|
-
} else if (isInstallCommand) {
|
|
100
|
-
// For install/update, scan dependencies from package.json.
|
|
101
|
-
// Note: This scans direct dependencies only.
|
|
102
|
-
packagePurls = await extractPackagePurlsFromPackageJson(cwd);
|
|
103
|
-
}
|
|
104
|
-
if (!packagePurls.length) {
|
|
105
|
-
return {
|
|
106
|
-
shouldExit: false
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
utils.debugScan('start', packagePurls.length);
|
|
110
|
-
require$$9.debugDir('inspect', {
|
|
111
|
-
packagePurls
|
|
112
|
-
});
|
|
113
|
-
try {
|
|
114
|
-
const alertsMap = await utils.getAlertsMapFromPurls(packagePurls, {
|
|
115
|
-
filter: acceptRisks ? {
|
|
116
|
-
actions: ['error'],
|
|
117
|
-
blocked: true
|
|
118
|
-
} : {
|
|
119
|
-
actions: ['error', 'monitor', 'warn']
|
|
120
|
-
},
|
|
121
|
-
nothrow,
|
|
122
|
-
spinner
|
|
123
|
-
});
|
|
124
|
-
if (alertsMap.size) {
|
|
125
|
-
process.exitCode = 1;
|
|
126
|
-
spinner?.stop();
|
|
127
|
-
utils.logAlertsMap(alertsMap, {
|
|
128
|
-
hideAt: viewAllRisks ? 'none' : 'middle',
|
|
129
|
-
output: process.stderr
|
|
130
|
-
});
|
|
131
|
-
const errorMessage = `Socket ${managerName} exiting due to risks.${viewAllRisks ? '' : `\nView all risks - Rerun with environment variable ${constants.default.SOCKET_CLI_VIEW_ALL_RISKS}=1.`}${acceptRisks ? '' : `\nAccept risks - Rerun with environment variable ${constants.default.SOCKET_CLI_ACCEPT_RISKS}=1.`}`.trim();
|
|
132
|
-
logger.logger.error(errorMessage);
|
|
133
|
-
return {
|
|
134
|
-
alertsMap,
|
|
135
|
-
shouldExit: true
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
} catch (e) {
|
|
139
|
-
spinner?.stop();
|
|
140
|
-
// Re-throw process.exit errors from tests.
|
|
141
|
-
if (e instanceof Error && e.message === 'process.exit called') {
|
|
142
|
-
throw e;
|
|
143
|
-
}
|
|
144
|
-
utils.debugScan('error', undefined, e);
|
|
145
|
-
// Continue with installation if scanning fails.
|
|
146
|
-
}
|
|
147
|
-
utils.debugScan('complete', packagePurls.length);
|
|
148
|
-
require$$9.debugDir('inspect', {
|
|
149
|
-
args: rawArgs.slice(1)
|
|
150
|
-
});
|
|
151
|
-
return {
|
|
152
|
-
shouldExit: false
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
const DLX_COMMANDS = new Set(['dlx']);
|
|
157
|
-
const INSTALL_COMMANDS = new Set(['add', 'i', 'install', 'install-test', 'it', 'update', 'up']);
|
|
158
|
-
async function shadowPnpmBin(args = process.argv.slice(2), options, extra) {
|
|
159
|
-
const opts = {
|
|
160
|
-
__proto__: null,
|
|
161
|
-
...options
|
|
162
|
-
};
|
|
163
|
-
const {
|
|
164
|
-
env: spawnEnv,
|
|
165
|
-
ipc,
|
|
166
|
-
...spawnOpts
|
|
167
|
-
} = opts;
|
|
168
|
-
let {
|
|
169
|
-
cwd = process.cwd()
|
|
170
|
-
} = opts;
|
|
171
|
-
if (cwd instanceof URL) {
|
|
172
|
-
cwd = require$$0.fileURLToPath(cwd);
|
|
173
|
-
}
|
|
174
|
-
const terminatorPos = args.indexOf('--');
|
|
175
|
-
const rawPnpmArgs = terminatorPos === -1 ? args : args.slice(0, terminatorPos);
|
|
176
|
-
const {
|
|
177
|
-
spinner
|
|
178
|
-
} = opts;
|
|
179
|
-
const wasSpinning = !!spinner?.isSpinning;
|
|
180
|
-
|
|
181
|
-
// Check if this is a command that needs security scanning.
|
|
182
|
-
const command = rawPnpmArgs[0];
|
|
183
|
-
const isDlxCommand = command && DLX_COMMANDS.has(command);
|
|
184
|
-
const isInstallCommand = command && INSTALL_COMMANDS.has(command);
|
|
185
|
-
const needsScanning = isDlxCommand || isInstallCommand;
|
|
186
|
-
spinner?.start();
|
|
187
|
-
if (needsScanning && !rawPnpmArgs.includes(constants.FLAG_DRY_RUN)) {
|
|
188
|
-
const acceptRisks = !!constants.default.ENV.SOCKET_CLI_ACCEPT_RISKS;
|
|
189
|
-
const viewAllRisks = !!constants.default.ENV.SOCKET_CLI_VIEW_ALL_RISKS;
|
|
190
|
-
|
|
191
|
-
// Handle add and dlx commands with shared utility.
|
|
192
|
-
if (isDlxCommand || utils.isAddCommand(command)) {
|
|
193
|
-
const scanResult = await scanPackagesAndLogAlerts({
|
|
194
|
-
acceptRisks,
|
|
195
|
-
command,
|
|
196
|
-
cwd,
|
|
197
|
-
dlxCommands: DLX_COMMANDS,
|
|
198
|
-
installCommands: INSTALL_COMMANDS,
|
|
199
|
-
managerName: constants.PNPM,
|
|
200
|
-
rawArgs: rawPnpmArgs,
|
|
201
|
-
spinner,
|
|
202
|
-
viewAllRisks
|
|
203
|
-
});
|
|
204
|
-
if (scanResult.shouldExit) {
|
|
205
|
-
// eslint-disable-next-line n/no-process-exit
|
|
206
|
-
process.exit(1);
|
|
207
|
-
// This line is never reached in production, but helps tests.
|
|
208
|
-
throw new Error('process.exit called');
|
|
209
|
-
}
|
|
210
|
-
} else if (utils.isPnpmLockfileScanCommand(command)) {
|
|
211
|
-
// For install/update, scan all dependencies from pnpm-lock.yaml
|
|
212
|
-
const pnpmLockPath = path.join(cwd, constants.PNPM_LOCK_YAML);
|
|
213
|
-
if (fs.existsSync(pnpmLockPath)) {
|
|
214
|
-
try {
|
|
215
|
-
const lockfileContent = await utils.readPnpmLockfile(pnpmLockPath);
|
|
216
|
-
if (lockfileContent) {
|
|
217
|
-
const lockfile = utils.parsePnpmLockfile(lockfileContent);
|
|
218
|
-
if (lockfile) {
|
|
219
|
-
// Use existing function to scan the entire lockfile
|
|
220
|
-
require$$9.debugFn('notice', `scanning: all dependencies from ${constants.PNPM_LOCK_YAML}`);
|
|
221
|
-
const alertsMap = await utils.getAlertsMapFromPnpmLockfile(lockfile, {
|
|
222
|
-
nothrow: true,
|
|
223
|
-
filter: acceptRisks ? {
|
|
224
|
-
actions: ['error'],
|
|
225
|
-
blocked: true
|
|
226
|
-
} : {
|
|
227
|
-
actions: ['error', 'monitor', 'warn']
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
spinner?.stop();
|
|
231
|
-
if (alertsMap.size) {
|
|
232
|
-
process.exitCode = 1;
|
|
233
|
-
utils.logAlertsMap(alertsMap, {
|
|
234
|
-
hideAt: viewAllRisks ? 'none' : 'middle',
|
|
235
|
-
output: process.stderr
|
|
236
|
-
});
|
|
237
|
-
const errorMessage = `Socket ${constants.PNPM} exiting due to risks.${viewAllRisks ? '' : `\nView all risks - Rerun with environment variable ${constants.default.SOCKET_CLI_VIEW_ALL_RISKS}=1.`}${acceptRisks ? '' : `\nAccept risks - Rerun with environment variable ${constants.default.SOCKET_CLI_ACCEPT_RISKS}=1.`}`.trim();
|
|
238
|
-
logger.logger.error(errorMessage);
|
|
239
|
-
// eslint-disable-next-line n/no-process-exit
|
|
240
|
-
process.exit(1);
|
|
241
|
-
// This line is never reached in production, but helps tests.
|
|
242
|
-
throw new Error('process.exit called');
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// Return early since we've already done the scanning
|
|
246
|
-
require$$9.debugFn('notice', 'complete: lockfile scanning, proceeding with install');
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
} catch (e) {
|
|
250
|
-
require$$9.debugFn('error', `${constants.PNPM} lockfile scanning failed`);
|
|
251
|
-
require$$9.debugDir('error', e);
|
|
252
|
-
}
|
|
253
|
-
} else {
|
|
254
|
-
require$$9.debugFn('notice', `skip: no ${constants.PNPM_LOCK_YAML} found, skipping bulk install scanning`);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
require$$9.debugFn('notice', 'complete: scanning, proceeding with install');
|
|
258
|
-
}
|
|
259
|
-
const realPnpmPath = await utils.installPnpmLinks(constants.default.shadowBinPath);
|
|
260
|
-
const otherArgs = terminatorPos === -1 ? [] : args.slice(terminatorPos);
|
|
261
|
-
const suffixArgs = [...rawPnpmArgs, ...otherArgs];
|
|
262
|
-
require$$9.debugFn('notice', `spawn: ${constants.PNPM} shadow bin ${realPnpmPath} ${utils.cmdFlagsToString(suffixArgs)}`);
|
|
263
|
-
if (wasSpinning) {
|
|
264
|
-
spinner?.start();
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// Set up stdio with IPC channel.
|
|
268
|
-
const stdio = shadowNpmBin.ensureIpcInStdio(spawnOpts.stdio);
|
|
269
|
-
const spawnPromise = spawn.spawn(realPnpmPath, suffixArgs, {
|
|
270
|
-
...spawnOpts,
|
|
271
|
-
cwd,
|
|
272
|
-
env: {
|
|
273
|
-
...process.env,
|
|
274
|
-
...spawnEnv
|
|
275
|
-
},
|
|
276
|
-
stdio,
|
|
277
|
-
// On Windows, pnpm is often a .cmd file that requires shell execution.
|
|
278
|
-
// The spawn function from @socketsecurity/registry will handle this properly
|
|
279
|
-
// when shell is true.
|
|
280
|
-
shell: constants.default.WIN32
|
|
281
|
-
}, extra);
|
|
282
|
-
|
|
283
|
-
// Send IPC handshake.
|
|
284
|
-
spawnPromise.process.send({
|
|
285
|
-
[constants.default.SOCKET_IPC_HANDSHAKE]: {
|
|
286
|
-
[constants.default.SOCKET_CLI_SHADOW_API_TOKEN]: utils.getPublicApiToken(),
|
|
287
|
-
[constants.default.SOCKET_CLI_SHADOW_BIN]: constants.PNPM,
|
|
288
|
-
[constants.default.SOCKET_CLI_SHADOW_PROGRESS]: true,
|
|
289
|
-
...ipc
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
return {
|
|
293
|
-
spawnPromise
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
exports.scanPackagesAndLogAlerts = scanPackagesAndLogAlerts;
|
|
298
|
-
exports.shadowPnpmBin = shadowPnpmBin;
|
|
299
|
-
//# debugId=b4cf863e-3d5c-4dcc-ad18-e70648911b2
|
|
300
|
-
//# sourceMappingURL=shadow-pnpm-bin2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow-pnpm-bin2.js","sources":["../src/shadow/common.mts","../src/shadow/pnpm/bin.mts"],"sourcesContent":["import { fileURLToPath } from 'node:url'\n\nimport { debugDir, debugFn } from '@socketsecurity/registry/lib/debug'\nimport { logger } from '@socketsecurity/registry/lib/logger'\nimport { readPackageJson } from '@socketsecurity/registry/lib/packages'\n\nimport constants, { FLAG_DRY_RUN, PACKAGE_JSON } from '../constants.mts'\nimport { getAlertsMapFromPurls } from '../utils/alerts-map.mts'\nimport { isAddCommand } from '../utils/cmd.mts'\nimport { debugScan } from '../utils/debug.mts'\nimport { safeNpmSpecToPurl } from '../utils/npm-spec.mts'\nimport { logAlertsMap } from '../utils/socket-package-alert.mts'\n\nimport type { AlertsByPurl } from '../utils/socket-package-alert.mts'\nimport type { Spinner } from '@socketsecurity/registry/lib/spinner'\n\n/**\n * Extract package PURLs from command arguments for add/dlx commands where\n * packages are specified as arguments.\n * Used by: pnpm, yarn.\n */\nfunction extractPackagePurlsFromCommandArgs(\n rawArgs: string[] | readonly string[],\n): string[] {\n const packagePurls: string[] = []\n\n // For 'add package1 package2@version' or 'dlx package', get packages from args.\n const packageArgs = rawArgs\n .slice(1)\n .filter(a => !a.startsWith('-') && a !== '--')\n\n for (const pkgSpec of packageArgs) {\n const purl = safeNpmSpecToPurl(pkgSpec)\n if (purl) {\n packagePurls.push(purl)\n }\n }\n\n return packagePurls\n}\n\n/**\n * Extract package PURLs from package.json for install/update commands.\n * Used by: pnpm, yarn.\n */\nasync function extractPackagePurlsFromPackageJson(\n cwd = process.cwd(),\n): Promise<string[]> {\n const packagePurls: string[] = []\n\n try {\n const pkgJson = await readPackageJson(cwd)\n\n const allDeps = {\n ...pkgJson.dependencies,\n ...pkgJson.devDependencies,\n ...pkgJson.optionalDependencies,\n ...pkgJson.peerDependencies,\n }\n\n for (const { 0: name, 1: version } of Object.entries(allDeps)) {\n const purl = safeNpmSpecToPurl(\n typeof version === 'string' ? `${name}@${version}` : name,\n )\n if (purl) {\n packagePurls.push(purl)\n }\n }\n\n debugScan('start', packagePurls.length)\n } catch (e) {\n debugFn(\n 'warn',\n `${PACKAGE_JSON} not found or invalid during dependency scanning`,\n )\n debugDir('error', e)\n }\n\n return packagePurls\n}\n\nexport type PackageScanOptions = {\n acceptRisks: boolean\n command: string | undefined\n cwd?: string | URL\n dlxCommands?: Set<string>\n installCommands: Set<string>\n managerName: string\n nothrow?: boolean\n rawArgs: string[] | readonly string[]\n spinner?: Spinner | undefined\n viewAllRisks: boolean\n}\n\nexport type PackageScanResult = {\n alertsMap?: AlertsByPurl\n shouldExit: boolean\n}\n\n/**\n * Scan packages and log alerts if found.\n */\nexport async function scanPackagesAndLogAlerts(\n options: PackageScanOptions,\n): Promise<PackageScanResult> {\n const {\n acceptRisks,\n command,\n dlxCommands,\n installCommands,\n managerName,\n nothrow = true,\n rawArgs,\n spinner,\n viewAllRisks,\n } = options\n\n let { cwd = process.cwd() } = options\n if (cwd instanceof URL) {\n cwd = fileURLToPath(cwd)\n }\n\n // Check if this is a command that needs security scanning.\n const isDlxCommand = dlxCommands && command && dlxCommands.has(command)\n const isInstallCommand = command && installCommands.has(command)\n const needsScanning = isDlxCommand || isInstallCommand\n\n if (!needsScanning || rawArgs.includes(FLAG_DRY_RUN)) {\n return { shouldExit: false }\n }\n\n // Extract package names from command arguments before any downloads.\n let packagePurls: string[] = []\n\n if (isDlxCommand || isAddCommand(command)) {\n packagePurls = extractPackagePurlsFromCommandArgs(rawArgs)\n } else if (isInstallCommand) {\n // For install/update, scan dependencies from package.json.\n // Note: This scans direct dependencies only.\n packagePurls = await extractPackagePurlsFromPackageJson(cwd)\n }\n\n if (!packagePurls.length) {\n return { shouldExit: false }\n }\n\n debugScan('start', packagePurls.length)\n debugDir('inspect', { packagePurls })\n\n try {\n const alertsMap = await getAlertsMapFromPurls(packagePurls, {\n filter: acceptRisks\n ? { actions: ['error'], blocked: true }\n : { actions: ['error', 'monitor', 'warn'] },\n nothrow,\n spinner,\n })\n\n if (alertsMap.size) {\n process.exitCode = 1\n spinner?.stop()\n logAlertsMap(alertsMap, {\n hideAt: viewAllRisks ? 'none' : 'middle',\n output: process.stderr,\n })\n\n const errorMessage = `Socket ${managerName} exiting due to risks.${\n viewAllRisks\n ? ''\n : `\\nView all risks - Rerun with environment variable ${constants.SOCKET_CLI_VIEW_ALL_RISKS}=1.`\n }${\n acceptRisks\n ? ''\n : `\\nAccept risks - Rerun with environment variable ${constants.SOCKET_CLI_ACCEPT_RISKS}=1.`\n }`.trim()\n\n logger.error(errorMessage)\n return { alertsMap, shouldExit: true }\n }\n } catch (e) {\n spinner?.stop()\n // Re-throw process.exit errors from tests.\n if (e instanceof Error && e.message === 'process.exit called') {\n throw e\n }\n debugScan('error', undefined, e)\n // Continue with installation if scanning fails.\n }\n\n debugScan('complete', packagePurls.length)\n debugDir('inspect', { args: rawArgs.slice(1) })\n\n return { shouldExit: false }\n}\n","import { existsSync } from 'node:fs'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nimport { debugDir, debugFn } from '@socketsecurity/registry/lib/debug'\nimport { logger } from '@socketsecurity/registry/lib/logger'\nimport { spawn } from '@socketsecurity/registry/lib/spawn'\n\nimport constants, {\n FLAG_DRY_RUN,\n PNPM,\n PNPM_LOCK_YAML,\n} from '../../constants.mts'\nimport { getAlertsMapFromPnpmLockfile } from '../../utils/alerts-map.mts'\nimport {\n cmdFlagsToString,\n isAddCommand,\n isPnpmLockfileScanCommand,\n} from '../../utils/cmd.mts'\nimport { parsePnpmLockfile, readPnpmLockfile } from '../../utils/pnpm.mts'\nimport { getPublicApiToken } from '../../utils/sdk.mts'\nimport { installPnpmLinks } from '../../utils/shadow-links.mts'\nimport { logAlertsMap } from '../../utils/socket-package-alert.mts'\nimport { scanPackagesAndLogAlerts } from '../common.mts'\nimport { ensureIpcInStdio } from '../stdio-ipc.mts'\n\nimport type { IpcObject } from '../../constants.mts'\nimport type {\n SpawnExtra,\n SpawnOptions,\n SpawnResult,\n} from '@socketsecurity/registry/lib/spawn'\n\nexport type ShadowPnpmOptions = SpawnOptions & {\n ipc?: IpcObject | undefined\n}\n\nexport type ShadowPnpmResult = {\n spawnPromise: SpawnResult<string, SpawnExtra | undefined>\n}\n\nconst DLX_COMMANDS = new Set(['dlx'])\n\nconst INSTALL_COMMANDS = new Set([\n 'add',\n 'i',\n 'install',\n 'install-test',\n 'it',\n 'update',\n 'up',\n])\n\nexport default async function shadowPnpmBin(\n args: string[] | readonly string[] = process.argv.slice(2),\n options?: ShadowPnpmOptions | undefined,\n extra?: SpawnExtra | undefined,\n): Promise<ShadowPnpmResult> {\n const opts = { __proto__: null, ...options } as ShadowPnpmOptions\n const { env: spawnEnv, ipc, ...spawnOpts } = opts\n\n let { cwd = process.cwd() } = opts\n if (cwd instanceof URL) {\n cwd = fileURLToPath(cwd)\n }\n\n const terminatorPos = args.indexOf('--')\n const rawPnpmArgs = terminatorPos === -1 ? args : args.slice(0, terminatorPos)\n\n const { spinner } = opts\n const wasSpinning = !!spinner?.isSpinning\n\n // Check if this is a command that needs security scanning.\n const command = rawPnpmArgs[0]\n const isDlxCommand = command && DLX_COMMANDS.has(command)\n const isInstallCommand = command && INSTALL_COMMANDS.has(command)\n const needsScanning = isDlxCommand || isInstallCommand\n\n spinner?.start()\n\n if (needsScanning && !rawPnpmArgs.includes(FLAG_DRY_RUN)) {\n const acceptRisks = !!constants.ENV.SOCKET_CLI_ACCEPT_RISKS\n const viewAllRisks = !!constants.ENV.SOCKET_CLI_VIEW_ALL_RISKS\n\n // Handle add and dlx commands with shared utility.\n if (isDlxCommand || isAddCommand(command)) {\n const scanResult = await scanPackagesAndLogAlerts({\n acceptRisks,\n command,\n cwd,\n dlxCommands: DLX_COMMANDS,\n installCommands: INSTALL_COMMANDS,\n managerName: PNPM,\n rawArgs: rawPnpmArgs,\n spinner,\n viewAllRisks,\n })\n\n if (scanResult.shouldExit) {\n // eslint-disable-next-line n/no-process-exit\n process.exit(1)\n // This line is never reached in production, but helps tests.\n throw new Error('process.exit called')\n }\n } else if (isPnpmLockfileScanCommand(command)) {\n // For install/update, scan all dependencies from pnpm-lock.yaml\n const pnpmLockPath = path.join(cwd, PNPM_LOCK_YAML)\n if (existsSync(pnpmLockPath)) {\n try {\n const lockfileContent = await readPnpmLockfile(pnpmLockPath)\n if (lockfileContent) {\n const lockfile = parsePnpmLockfile(lockfileContent)\n if (lockfile) {\n // Use existing function to scan the entire lockfile\n debugFn(\n 'notice',\n `scanning: all dependencies from ${PNPM_LOCK_YAML}`,\n )\n\n const alertsMap = await getAlertsMapFromPnpmLockfile(lockfile, {\n nothrow: true,\n filter: acceptRisks\n ? { actions: ['error'], blocked: true }\n : { actions: ['error', 'monitor', 'warn'] },\n })\n\n spinner?.stop()\n\n if (alertsMap.size) {\n process.exitCode = 1\n logAlertsMap(alertsMap, {\n hideAt: viewAllRisks ? 'none' : 'middle',\n output: process.stderr,\n })\n\n const errorMessage = `Socket ${PNPM} exiting due to risks.${\n viewAllRisks\n ? ''\n : `\\nView all risks - Rerun with environment variable ${constants.SOCKET_CLI_VIEW_ALL_RISKS}=1.`\n }${\n acceptRisks\n ? ''\n : `\\nAccept risks - Rerun with environment variable ${constants.SOCKET_CLI_ACCEPT_RISKS}=1.`\n }`.trim()\n\n logger.error(errorMessage)\n // eslint-disable-next-line n/no-process-exit\n process.exit(1)\n // This line is never reached in production, but helps tests.\n throw new Error('process.exit called')\n }\n\n // Return early since we've already done the scanning\n debugFn(\n 'notice',\n 'complete: lockfile scanning, proceeding with install',\n )\n }\n }\n } catch (e) {\n debugFn('error', `${PNPM} lockfile scanning failed`)\n debugDir('error', e)\n }\n } else {\n debugFn(\n 'notice',\n `skip: no ${PNPM_LOCK_YAML} found, skipping bulk install scanning`,\n )\n }\n }\n\n debugFn('notice', 'complete: scanning, proceeding with install')\n }\n\n const realPnpmPath = await installPnpmLinks(constants.shadowBinPath)\n\n const otherArgs = terminatorPos === -1 ? [] : args.slice(terminatorPos)\n const suffixArgs = [...rawPnpmArgs, ...otherArgs]\n\n debugFn(\n 'notice',\n `spawn: ${PNPM} shadow bin ${realPnpmPath} ${cmdFlagsToString(suffixArgs)}`,\n )\n\n if (wasSpinning) {\n spinner?.start()\n }\n\n // Set up stdio with IPC channel.\n const stdio = ensureIpcInStdio(spawnOpts.stdio)\n\n const spawnPromise = spawn(\n realPnpmPath,\n suffixArgs,\n {\n ...spawnOpts,\n cwd,\n env: {\n ...process.env,\n ...spawnEnv,\n },\n stdio,\n // On Windows, pnpm is often a .cmd file that requires shell execution.\n // The spawn function from @socketsecurity/registry will handle this properly\n // when shell is true.\n shell: constants.WIN32,\n },\n extra,\n )\n\n // Send IPC handshake.\n spawnPromise.process.send({\n [constants.SOCKET_IPC_HANDSHAKE]: {\n [constants.SOCKET_CLI_SHADOW_API_TOKEN]: getPublicApiToken(),\n [constants.SOCKET_CLI_SHADOW_BIN]: PNPM,\n [constants.SOCKET_CLI_SHADOW_PROGRESS]: true,\n ...ipc,\n },\n })\n\n return { spawnPromise }\n}\n"],"names":["packagePurls","debugScan","debugFn","debugDir","nothrow","viewAllRisks","cwd","shouldExit","blocked","actions","spinner","hideAt","logger","args","__proto__","env","dlxCommands","installCommands","managerName","rawArgs","process","spawnPromise"],"mappings":";;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;AACA;AACA;;;AAKE;;AAKA;AACE;AACA;AACEA;AACF;AACF;AAEA;AACF;;AAEA;AACA;AACA;AACA;AACA;;;AAMI;AAEA;;;;AAIE;;AAGF;AAAa;AAAS;AAAW;AAC/B;AAGA;AACEA;AACF;AACF;AAEAC;;AAEAC;AAIAC;AACF;AAEA;AACF;AAoBA;AACA;AACA;AACO;;;;;;;AASHC;;;AAGAC;AACF;;AAEMC;AAAoB;;AAExBA;AACF;;AAEA;;;AAGA;;;AAGWC;;AACX;;AAEA;;AAGA;AACEP;;AAEA;AACA;AACAA;AACF;AAEA;;AACWO;;AACX;AAEAN;;AACsBD;AAAa;;AAGjC;;;AAE4BQ;AAAc;AAClCC;;;AAENC;AACF;;;;;AAMIC;;AAEF;AAEA;AAUAC;;;AACoBL;;AACtB;;;AAGA;;AAEE;AACF;AACAN;AACA;AACF;AAEAA;;AACsBY;AAAuB;;AAEpCN;;AACX;;ACxJA;AAEA;AAUe;AAKb;AAAeO;;;;AACPC;;;AAAiC;;AAEnCT;AAAoB;;AAExBA;AACF;AAEA;AACA;;AAEQI;AAAQ;AAChB;;AAEA;AACA;;;AAGA;;;;;;AAQE;AACA;AACE;;;;AAIEM;AACAC;AACAC;AACAC;;AAEAd;AACF;;AAGE;AACAe;AACA;AACA;AACF;AACF;AACE;;AAEA;;AAEI;AACA;AACE;AACA;AACE;AACAlB;AAKA;AACEE;;;AAE0BI;AAAc;AAClCC;AAAsC;AAC9C;;;;;AAOIE;;AAEF;AAEA;AAUAC;AACA;AACAQ;AACA;AACA;AACF;;AAEA;AACAlB;AAIF;AACF;;AAEAA;AACAC;AACF;AACF;AACED;AAIF;AACF;AAEAA;AACF;;AAIA;;AAGAA;AAKA;;AAEA;;AAEA;AACA;AAEA;AAII;;AAEAa;;;;;AAKA;AACA;AACA;;;;AAMJ;AACAM;;AAEI;AACA;AACA;;AAEF;AACF;;AAESA;;AACX;;;","debugId":"b4cf863e-3d5c-4dcc-ad18-e70648911b2"}
|
package/dist/shadow-yarn-bin.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var require$$0 = require('node:url');
|
|
4
|
-
var require$$9 = require('../external/@socketsecurity/registry/lib/debug');
|
|
5
|
-
var spawn = require('../external/@socketsecurity/registry/lib/spawn');
|
|
6
|
-
var constants = require('./constants.js');
|
|
7
|
-
var utils = require('./utils.js');
|
|
8
|
-
var shadowPnpmBin = require('./shadow-pnpm-bin2.js');
|
|
9
|
-
var shadowNpmBin = require('./shadow-npm-bin2.js');
|
|
10
|
-
|
|
11
|
-
const DLX_COMMANDS = new Set(['dlx']);
|
|
12
|
-
const INSTALL_COMMANDS = new Set(['add', 'install', 'up', 'upgrade', 'upgrade-interactive']);
|
|
13
|
-
async function shadowYarnBin(args = process.argv.slice(2), options, extra) {
|
|
14
|
-
const opts = {
|
|
15
|
-
__proto__: null,
|
|
16
|
-
...options
|
|
17
|
-
};
|
|
18
|
-
const {
|
|
19
|
-
env: spawnEnv,
|
|
20
|
-
ipc,
|
|
21
|
-
...spawnOpts
|
|
22
|
-
} = opts;
|
|
23
|
-
let {
|
|
24
|
-
cwd = process.cwd()
|
|
25
|
-
} = opts;
|
|
26
|
-
if (cwd instanceof URL) {
|
|
27
|
-
cwd = require$$0.fileURLToPath(cwd);
|
|
28
|
-
}
|
|
29
|
-
const terminatorPos = args.indexOf('--');
|
|
30
|
-
const rawYarnArgs = terminatorPos === -1 ? args : args.slice(0, terminatorPos);
|
|
31
|
-
const {
|
|
32
|
-
spinner
|
|
33
|
-
} = opts;
|
|
34
|
-
const wasSpinning = !!spinner?.isSpinning;
|
|
35
|
-
spinner?.start();
|
|
36
|
-
|
|
37
|
-
// Check for package scanning.
|
|
38
|
-
const command = rawYarnArgs[0];
|
|
39
|
-
const scanResult = await shadowPnpmBin.scanPackagesAndLogAlerts({
|
|
40
|
-
acceptRisks: !!constants.default.ENV.SOCKET_CLI_ACCEPT_RISKS,
|
|
41
|
-
command,
|
|
42
|
-
cwd,
|
|
43
|
-
dlxCommands: DLX_COMMANDS,
|
|
44
|
-
installCommands: INSTALL_COMMANDS,
|
|
45
|
-
managerName: constants.YARN,
|
|
46
|
-
rawArgs: rawYarnArgs,
|
|
47
|
-
spinner,
|
|
48
|
-
viewAllRisks: !!constants.default.ENV.SOCKET_CLI_VIEW_ALL_RISKS
|
|
49
|
-
});
|
|
50
|
-
if (scanResult.shouldExit) {
|
|
51
|
-
// eslint-disable-next-line n/no-process-exit
|
|
52
|
-
process.exit(1);
|
|
53
|
-
// This line is never reached in production, but helps tests.
|
|
54
|
-
throw new Error('process.exit called');
|
|
55
|
-
}
|
|
56
|
-
const realYarnPath = await utils.installYarnLinks(constants.default.shadowBinPath);
|
|
57
|
-
const otherArgs = terminatorPos === -1 ? [] : args.slice(terminatorPos);
|
|
58
|
-
const suffixArgs = [...rawYarnArgs, ...otherArgs];
|
|
59
|
-
require$$9.debugFn('notice', `spawn: ${constants.YARN} shadow bin ${realYarnPath} ${utils.cmdFlagsToString(suffixArgs)}`);
|
|
60
|
-
if (wasSpinning) {
|
|
61
|
-
spinner?.start();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Set up stdio with IPC channel.
|
|
65
|
-
const stdio = shadowNpmBin.ensureIpcInStdio(spawnOpts.stdio);
|
|
66
|
-
const spawnPromise = spawn.spawn(realYarnPath, suffixArgs, {
|
|
67
|
-
...spawnOpts,
|
|
68
|
-
cwd,
|
|
69
|
-
env: {
|
|
70
|
-
...process.env,
|
|
71
|
-
...spawnEnv
|
|
72
|
-
},
|
|
73
|
-
stdio,
|
|
74
|
-
// On Windows, yarn is often a .cmd file that requires shell execution.
|
|
75
|
-
// The spawn function from @socketsecurity/registry will handle this properly
|
|
76
|
-
// when shell is true.
|
|
77
|
-
shell: constants.default.WIN32
|
|
78
|
-
}, extra);
|
|
79
|
-
|
|
80
|
-
// Send IPC handshake.
|
|
81
|
-
spawnPromise.process.send({
|
|
82
|
-
[constants.default.SOCKET_IPC_HANDSHAKE]: {
|
|
83
|
-
[constants.default.SOCKET_CLI_SHADOW_API_TOKEN]: utils.getPublicApiToken(),
|
|
84
|
-
[constants.default.SOCKET_CLI_SHADOW_BIN]: constants.YARN,
|
|
85
|
-
[constants.default.SOCKET_CLI_SHADOW_PROGRESS]: true,
|
|
86
|
-
...ipc
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
return {
|
|
90
|
-
spawnPromise
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
module.exports = shadowYarnBin;
|
|
95
|
-
//# debugId=673b7dc1-02c4-46a2-b70b-e0f78c541d47
|
|
96
|
-
//# sourceMappingURL=shadow-yarn-bin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow-yarn-bin.js","sources":["../src/shadow/yarn/bin.mts"],"sourcesContent":["import { fileURLToPath } from 'node:url'\n\nimport { debugFn } from '@socketsecurity/registry/lib/debug'\nimport { spawn } from '@socketsecurity/registry/lib/spawn'\n\nimport constants, { YARN } from '../../constants.mts'\nimport { cmdFlagsToString } from '../../utils/cmd.mts'\nimport { getPublicApiToken } from '../../utils/sdk.mts'\nimport { installYarnLinks } from '../../utils/shadow-links.mts'\nimport { scanPackagesAndLogAlerts } from '../common.mts'\nimport { ensureIpcInStdio } from '../stdio-ipc.mts'\n\nimport type { IpcObject } from '../../constants.mts'\nimport type {\n SpawnExtra,\n SpawnOptions,\n SpawnResult,\n} from '@socketsecurity/registry/lib/spawn'\n\nexport type ShadowYarnOptions = SpawnOptions & {\n ipc?: IpcObject | undefined\n}\n\nexport type ShadowYarnResult = {\n spawnPromise: SpawnResult<string, SpawnExtra | undefined>\n}\n\nconst DLX_COMMANDS = new Set(['dlx'])\n\nconst INSTALL_COMMANDS = new Set([\n 'add',\n 'install',\n 'up',\n 'upgrade',\n 'upgrade-interactive',\n])\n\nexport default async function shadowYarnBin(\n args: string[] | readonly string[] = process.argv.slice(2),\n options?: ShadowYarnOptions | undefined,\n extra?: SpawnExtra | undefined,\n): Promise<ShadowYarnResult> {\n const opts = { __proto__: null, ...options } as ShadowYarnOptions\n const { env: spawnEnv, ipc, ...spawnOpts } = opts\n\n let { cwd = process.cwd() } = opts\n if (cwd instanceof URL) {\n cwd = fileURLToPath(cwd)\n }\n\n const terminatorPos = args.indexOf('--')\n const rawYarnArgs = terminatorPos === -1 ? args : args.slice(0, terminatorPos)\n\n const { spinner } = opts\n const wasSpinning = !!spinner?.isSpinning\n\n spinner?.start()\n\n // Check for package scanning.\n const command = rawYarnArgs[0]\n const scanResult = await scanPackagesAndLogAlerts({\n acceptRisks: !!constants.ENV.SOCKET_CLI_ACCEPT_RISKS,\n command,\n cwd,\n dlxCommands: DLX_COMMANDS,\n installCommands: INSTALL_COMMANDS,\n managerName: YARN,\n rawArgs: rawYarnArgs,\n spinner,\n viewAllRisks: !!constants.ENV.SOCKET_CLI_VIEW_ALL_RISKS,\n })\n\n if (scanResult.shouldExit) {\n // eslint-disable-next-line n/no-process-exit\n process.exit(1)\n // This line is never reached in production, but helps tests.\n throw new Error('process.exit called')\n }\n\n const realYarnPath = await installYarnLinks(constants.shadowBinPath)\n\n const otherArgs = terminatorPos === -1 ? [] : args.slice(terminatorPos)\n const suffixArgs = [...rawYarnArgs, ...otherArgs]\n\n debugFn(\n 'notice',\n `spawn: ${YARN} shadow bin ${realYarnPath} ${cmdFlagsToString(suffixArgs)}`,\n )\n\n if (wasSpinning) {\n spinner?.start()\n }\n\n // Set up stdio with IPC channel.\n const stdio = ensureIpcInStdio(spawnOpts.stdio)\n\n const spawnPromise = spawn(\n realYarnPath,\n suffixArgs,\n {\n ...spawnOpts,\n cwd,\n env: {\n ...process.env,\n ...spawnEnv,\n },\n stdio,\n // On Windows, yarn is often a .cmd file that requires shell execution.\n // The spawn function from @socketsecurity/registry will handle this properly\n // when shell is true.\n shell: constants.WIN32,\n },\n extra,\n )\n\n // Send IPC handshake.\n spawnPromise.process.send({\n [constants.SOCKET_IPC_HANDSHAKE]: {\n [constants.SOCKET_CLI_SHADOW_API_TOKEN]: getPublicApiToken(),\n [constants.SOCKET_CLI_SHADOW_BIN]: YARN,\n [constants.SOCKET_CLI_SHADOW_PROGRESS]: true,\n ...ipc,\n },\n })\n\n return { spawnPromise }\n}\n"],"names":["__proto__","env","cwd","spinner","acceptRisks","dlxCommands","installCommands","managerName","rawArgs","viewAllRisks","process","debugFn","spawnPromise"],"mappings":";;;;;;;;;;AA2BA;AAEA;AAQe;AAKb;AAAeA;;;;AACPC;;;AAAiC;;AAEnCC;AAAoB;;AAExBA;AACF;AAEA;AACA;;AAEQC;AAAQ;AAChB;;;AAIA;AACA;AACA;AACEC;;;AAGAC;AACAC;AACAC;AACAC;;AAEAC;AACF;;AAGE;AACAC;AACA;AACA;AACF;;AAIA;;AAGAC;AAKA;;AAEA;;AAEA;AACA;AAEA;AAII;;AAEAV;;;;;AAKA;AACA;AACA;;;;AAMJ;AACAW;;AAEI;AACA;AACA;;AAEF;AACF;;AAESA;;AACX;;","debugId":"673b7dc1-02c4-46a2-b70b-e0f78c541d47"}
|