@socketsecurity/cli-with-sentry 0.15.11 → 0.15.12
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/bin/cli.js +6 -6
- package/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/cli.js +5731 -6607
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +274 -305
- package/dist/constants.js.map +1 -1
- package/dist/instrument-with-sentry.js +28 -34
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/shadow-bin.js +96 -123
- package/dist/shadow-bin.js.map +1 -1
- package/dist/shadow-inject.js +470 -580
- package/dist/shadow-inject.js.map +1 -1
- package/dist/socket-completion.bash +221 -0
- package/dist/types/cli.d.mts +2 -2
- package/dist/types/commands/analytics/cmd-analytics.d.mts +9 -15
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts +4 -6
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +4 -7
- package/dist/types/commands/analytics/handle-analytics.d.mts +9 -15
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +1 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +26 -46
- package/dist/types/commands/analytics/output-analytics.d.mts.map +1 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +9 -15
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts +10 -16
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +1 -1
- package/dist/types/commands/audit-log/handle-audit-log.d.mts +9 -15
- package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +1 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts +22 -47
- package/dist/types/commands/audit-log/output-audit-log.d.mts.map +1 -1
- package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts +9 -15
- package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts.map +1 -1
- package/dist/types/commands/cdxgen/handle-cdxgen.d.mts +4 -0
- package/dist/types/commands/cdxgen/handle-cdxgen.d.mts.map +1 -0
- package/dist/types/commands/ci/cmd-ci.d.mts +9 -15
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts +3 -3
- package/dist/types/commands/ci/handle-ci.d.mts +2 -2
- package/dist/types/commands/config/cmd-config-auto.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-get.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-list.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-set.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-unset.d.mts +9 -15
- package/dist/types/commands/config/cmd-config.d.mts +3 -3
- package/dist/types/commands/config/discover-config-value.d.mts +3 -5
- package/dist/types/commands/config/discover-config-value.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-auto.d.mts +7 -10
- package/dist/types/commands/config/handle-config-auto.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-get.d.mts +7 -10
- package/dist/types/commands/config/handle-config-get.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-set.d.mts +8 -12
- package/dist/types/commands/config/handle-config-set.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-unset.d.mts +7 -10
- package/dist/types/commands/config/handle-config-unset.d.mts.map +1 -1
- package/dist/types/commands/config/output-config-auto.d.mts +4 -8
- package/dist/types/commands/config/output-config-get.d.mts +4 -8
- package/dist/types/commands/config/output-config-list.d.mts +6 -9
- package/dist/types/commands/config/output-config-list.d.mts.map +1 -1
- package/dist/types/commands/config/output-config-set.d.mts +3 -6
- package/dist/types/commands/config/output-config-unset.d.mts +3 -6
- package/dist/types/commands/dependencies/cmd-dependencies.d.mts +9 -15
- package/dist/types/commands/dependencies/fetch-dependencies.d.mts +7 -10
- package/dist/types/commands/dependencies/fetch-dependencies.d.mts.map +1 -1
- package/dist/types/commands/dependencies/handle-dependencies.d.mts +7 -11
- package/dist/types/commands/dependencies/handle-dependencies.d.mts.map +1 -1
- package/dist/types/commands/dependencies/output-dependencies.d.mts +8 -15
- package/dist/types/commands/dependencies/output-dependencies.d.mts.map +1 -1
- package/dist/types/commands/diff-scan/cmd-diff-scan-get.d.mts +9 -15
- package/dist/types/commands/diff-scan/cmd-diff-scan.d.mts +3 -3
- package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts +8 -12
- package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/diff-scan/handle-diff-scan.d.mts +10 -17
- package/dist/types/commands/diff-scan/handle-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/diff-scan/output-diff-scan.d.mts +8 -15
- package/dist/types/commands/diff-scan/output-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +9 -15
- package/dist/types/commands/fix/git.d.mts +14 -49
- package/dist/types/commands/fix/npm-fix.d.mts +4 -16
- package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/open-pr.d.mts +20 -46
- package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts +4 -16
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/run-fix.d.mts +3 -3
- package/dist/types/commands/fix/shared.d.mts +9 -15
- package/dist/types/commands/fix/types.d.mts +16 -16
- package/dist/types/commands/info/cmd-info.d.mts +9 -15
- package/dist/types/commands/info/fetch-package-info.d.mts +3 -7
- package/dist/types/commands/info/handle-package-info.d.mts +15 -22
- package/dist/types/commands/info/handle-package-info.d.mts.map +1 -1
- package/dist/types/commands/info/output-package-info.d.mts +10 -18
- package/dist/types/commands/info/output-package-info.d.mts.map +1 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +10 -0
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +1 -0
- package/dist/types/commands/install/cmd-install.d.mts +3 -0
- package/dist/types/commands/install/cmd-install.d.mts.map +1 -0
- package/dist/types/commands/install/handle-install-completion.d.mts +2 -0
- package/dist/types/commands/install/handle-install-completion.d.mts.map +1 -0
- package/dist/types/commands/install/output-install-completion.d.mts +12 -0
- package/dist/types/commands/install/output-install-completion.d.mts.map +1 -0
- package/dist/types/commands/install/setup-tab-completion.d.mts +13 -0
- package/dist/types/commands/install/setup-tab-completion.d.mts.map +1 -0
- package/dist/types/commands/login/apply-login.d.mts +2 -7
- package/dist/types/commands/login/attempt-login.d.mts +2 -5
- package/dist/types/commands/login/attempt-login.d.mts.map +1 -1
- package/dist/types/commands/login/cmd-login.d.mts +9 -15
- package/dist/types/commands/logout/apply-logout.d.mts +2 -2
- package/dist/types/commands/logout/attempt-logout.d.mts +2 -2
- package/dist/types/commands/logout/cmd-logout.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +10 -0
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +1 -0
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +7 -15
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +2 -8
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +2 -8
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts +3 -9
- package/dist/types/commands/manifest/output-requirements.d.mts +6 -10
- package/dist/types/commands/{cdxgen → manifest}/run-cdxgen.d.mts +2 -2
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +1 -0
- package/dist/types/commands/npm/cmd-npm.d.mts +9 -15
- package/dist/types/commands/npx/cmd-npx.d.mts +9 -15
- package/dist/types/commands/oops/cmd-oops.d.mts +9 -15
- package/dist/types/commands/optimize/add-overrides.d.mts +18 -22
- package/dist/types/commands/optimize/apply-optimization.d.mts +2 -6
- package/dist/types/commands/optimize/cmd-optimize.d.mts +9 -15
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +4 -7
- package/dist/types/commands/optimize/get-dependency-entries.d.mts +3 -5
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +8 -11
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +3 -10
- package/dist/types/commands/optimize/ls-by-agent.d.mts +6 -13
- package/dist/types/commands/optimize/shared.d.mts +2 -2
- package/dist/types/commands/optimize/types.d.mts +7 -7
- package/dist/types/commands/optimize/update-lockfile.d.mts +9 -12
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +5 -11
- package/dist/types/commands/organization/cmd-organization-list.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization-policy.d.mts +3 -3
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization.d.mts +3 -3
- package/dist/types/commands/organization/fetch-license-policy.d.mts +4 -6
- package/dist/types/commands/organization/fetch-organization-list.d.mts +4 -6
- package/dist/types/commands/organization/fetch-quota.d.mts +4 -6
- package/dist/types/commands/organization/fetch-security-policy.d.mts +4 -6
- package/dist/types/commands/organization/handle-license-policy.d.mts +3 -6
- package/dist/types/commands/organization/handle-organization-list.d.mts +3 -5
- package/dist/types/commands/organization/handle-quota.d.mts +3 -3
- package/dist/types/commands/organization/handle-security-policy.d.mts +3 -6
- package/dist/types/commands/organization/output-license-policy.d.mts +4 -7
- package/dist/types/commands/organization/output-organization-list.d.mts +4 -7
- package/dist/types/commands/organization/output-quota.d.mts +4 -7
- package/dist/types/commands/organization/output-security-policy.d.mts +4 -7
- package/dist/types/commands/package/cmd-package-score.d.mts +9 -15
- package/dist/types/commands/package/cmd-package-shallow.d.mts +16 -22
- package/dist/types/commands/package/cmd-package.d.mts +3 -3
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts +49 -51
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +4 -6
- package/dist/types/commands/package/handle-purl-deep-score.d.mts +3 -6
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts +6 -9
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +1 -1
- package/dist/types/commands/package/output-purl-score.d.mts +4 -8
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +4 -8
- package/dist/types/commands/package/parse-package-specifiers.d.mts +5 -8
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +9 -15
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts +2 -4
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +9 -15
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts +2 -4
- package/dist/types/commands/report/cmd-report-create.d.mts +9 -15
- package/dist/types/commands/report/cmd-report-view.d.mts +9 -15
- package/dist/types/commands/report/cmd-report.d.mts +3 -3
- package/dist/types/commands/repos/cmd-repos-create.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-del.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-list.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-update.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-view.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos.d.mts +3 -3
- package/dist/types/commands/repos/fetch-create-repo.d.mts +11 -18
- package/dist/types/commands/repos/fetch-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-delete-repo.d.mts +4 -7
- package/dist/types/commands/repos/fetch-list-repos.d.mts +10 -16
- package/dist/types/commands/repos/fetch-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-update-repo.d.mts +11 -18
- package/dist/types/commands/repos/fetch-update-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-view-repo.d.mts +4 -7
- package/dist/types/commands/repos/handle-create-repo.d.mts +10 -20
- package/dist/types/commands/repos/handle-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/handle-delete-repo.d.mts +3 -7
- package/dist/types/commands/repos/handle-list-repos.d.mts +10 -17
- package/dist/types/commands/repos/handle-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repos/handle-update-repo.d.mts +10 -20
- package/dist/types/commands/repos/handle-update-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/handle-view-repo.d.mts +3 -7
- package/dist/types/commands/repos/output-create-repo.d.mts +4 -8
- package/dist/types/commands/repos/output-delete-repo.d.mts +4 -8
- package/dist/types/commands/repos/output-list-repos.d.mts +4 -7
- package/dist/types/commands/repos/output-update-repo.d.mts +4 -8
- package/dist/types/commands/repos/output-view-repo.d.mts +4 -7
- package/dist/types/commands/scan/cmd-scan-create.d.mts +9 -15
- package/dist/types/commands/scan/cmd-scan-del.d.mts +9 -15
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +9 -15
- package/dist/types/commands/scan/cmd-scan-list.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan-report.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan-view.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan.d.mts +3 -3
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +11 -26
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +4 -7
- package/dist/types/commands/scan/fetch-diff-scan.d.mts +8 -12
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +13 -22
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +8 -14
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +4 -7
- package/dist/types/commands/scan/fetch-scan.d.mts +4 -7
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +4 -6
- package/dist/types/commands/scan/generate-report.d.mts +36 -50
- package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts +20 -37
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts +3 -7
- package/dist/types/commands/scan/handle-diff-scan.d.mts +10 -17
- package/dist/types/commands/scan/handle-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts +13 -23
- package/dist/types/commands/scan/handle-list-scans.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts +3 -7
- package/dist/types/commands/scan/handle-scan-report.d.mts +12 -21
- package/dist/types/commands/scan/handle-scan-report.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts +3 -8
- package/dist/types/commands/scan/output-create-new-scan.d.mts +4 -8
- package/dist/types/commands/scan/output-delete-scan.d.mts +4 -7
- package/dist/types/commands/scan/output-diff-scan.d.mts +8 -15
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +4 -7
- package/dist/types/commands/scan/output-scan-metadata.d.mts +4 -8
- package/dist/types/commands/scan/output-scan-report.d.mts +20 -38
- package/dist/types/commands/scan/output-scan-report.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +4 -10
- package/dist/types/commands/scan/stream-scan.d.mts +2 -6
- package/dist/types/commands/scan/suggest-org-slug.d.mts +2 -2
- package/dist/types/commands/scan/suggest-repo-slug.d.mts +4 -4
- package/dist/types/commands/scan/suggest_branch_slug.d.mts +2 -4
- package/dist/types/commands/scan/suggest_target.d.mts +2 -2
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +9 -15
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +10 -16
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +10 -17
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts +4 -7
- package/dist/types/commands/threat-feed/types.d.mts +12 -12
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +9 -0
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +1 -0
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts +3 -0
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +1 -0
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +2 -0
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +1 -0
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +6 -0
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +1 -0
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +6 -0
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +1 -0
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +2 -2
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +2 -2
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +9 -15
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +2 -2
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +1 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +2 -2
- package/dist/types/constants.d.mts +125 -135
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/flags.d.mts +14 -17
- package/dist/types/flags.d.mts.map +1 -1
- package/dist/types/instrument-with-sentry.d.mts +2 -2
- package/dist/types/shadow/npm/arborist/index.d.mts +2 -2
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +19 -24
- package/dist/types/shadow/npm/arborist/lib/arborist/types.d.mts +43 -71
- package/dist/types/shadow/npm/arborist/lib/dep-valid.d.mts +3 -8
- package/dist/types/shadow/npm/arborist/lib/edge.d.mts +58 -71
- package/dist/types/shadow/npm/arborist/lib/node.d.mts +55 -91
- package/dist/types/shadow/npm/arborist/lib/override-set.d.mts +26 -32
- package/dist/types/shadow/npm/arborist-helpers.d.mts +33 -66
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
- package/dist/types/shadow/npm/bin.d.mts +2 -5
- package/dist/types/shadow/npm/inject.d.mts +2 -2
- package/dist/types/shadow/npm/install.d.mts +11 -16
- package/dist/types/shadow/npm/link.d.mts +2 -5
- package/dist/types/shadow/npm/paths.d.mts +7 -7
- package/dist/types/shadow/npm/proc-log/index.d.mts +3 -6
- package/dist/types/types.d.mts +15 -17
- package/dist/types/utils/agent.d.mts +11 -14
- package/dist/types/utils/alert/artifact.d.mts +32 -50
- package/dist/types/utils/alert/fix.d.mts +5 -5
- package/dist/types/utils/alert/severity.d.mts +12 -24
- package/dist/types/utils/alerts-map.d.mts +23 -36
- package/dist/types/utils/api.d.mts +11 -34
- package/dist/types/utils/check-input.d.mts +9 -12
- package/dist/types/utils/cmd.d.mts +4 -4
- package/dist/types/utils/color-or-markdown.d.mts +14 -23
- package/dist/types/utils/color-or-markdown.d.mts.map +1 -1
- package/dist/types/utils/completion.d.mts +11 -0
- package/dist/types/utils/completion.d.mts.map +1 -0
- package/dist/types/utils/config.d.mts +22 -31
- package/dist/types/utils/config.d.mts.map +1 -1
- package/dist/types/utils/determine-org-slug.d.mts +2 -7
- package/dist/types/utils/errors.d.mts +12 -21
- package/dist/types/utils/fail-msg-with-badge.d.mts +2 -5
- package/dist/types/utils/fs.d.mts +21 -52
- package/dist/types/utils/get-output-kind.d.mts +3 -6
- package/dist/types/utils/glob.d.mts +13 -24
- package/dist/types/utils/map-to-object.d.mts +4 -6
- package/dist/types/utils/markdown.d.mts +4 -15
- package/dist/types/utils/meow-with-subcommands.d.mts +34 -46
- package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
- package/dist/types/utils/npm-paths.d.mts +7 -7
- package/dist/types/utils/npm-paths.d.mts.map +1 -1
- package/dist/types/utils/objects.d.mts +3 -8
- package/dist/types/utils/output-formatting.d.mts +14 -24
- package/dist/types/utils/package-environment.d.mts +51 -72
- package/dist/types/utils/package-environment.d.mts.map +1 -1
- package/dist/types/utils/path-resolve.d.mts +9 -14
- package/dist/types/utils/pnpm.d.mts +9 -7
- package/dist/types/utils/pnpm.d.mts.map +1 -1
- package/dist/types/utils/sdk.d.mts +8 -12
- package/dist/types/utils/semver.d.mts +5 -17
- package/dist/types/utils/serialize-result-json.d.mts +3 -3
- package/dist/types/utils/socket-package-alert.d.mts +62 -81
- package/dist/types/utils/socket-url.d.mts +9 -15
- package/dist/types/utils/spec.d.mts +4 -7
- package/dist/types/utils/spec.d.mts.map +1 -1
- package/dist/types/utils/strings.d.mts +2 -5
- package/dist/types/utils/translations.d.mts +592 -592
- package/dist/types/utils/walk-nested-map.d.mts +7 -10
- package/dist/utils.js +1531 -1833
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +38333 -51605
- package/dist/vendor.js.map +1 -1
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +5 -8
- package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +2 -4
- package/external/@socketsecurity/registry/external/cacache.js +1 -2
- package/external/@socketsecurity/registry/external/libnpmpack.js +36 -76
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +31 -67
- package/external/@socketsecurity/registry/external/pacote.js +36 -76
- package/external/@socketsecurity/registry/external/tinyglobby.js +3 -6
- package/external/@socketsecurity/registry/external/which.js +2 -4
- package/external/@socketsecurity/registry/lib/logger.d.ts +3 -1
- package/external/@socketsecurity/registry/lib/logger.js +149 -69
- package/external/@socketsecurity/registry/package.json +2 -2
- package/external/blessed/lib/alias.js +475 -468
- package/external/blessed/lib/blessed.js +12 -12
- package/external/blessed/lib/colors.js +234 -194
- package/external/blessed/lib/events.js +64 -70
- package/external/blessed/lib/gpmclient.js +117 -141
- package/external/blessed/lib/helpers.js +89 -94
- package/external/blessed/lib/keys.js +169 -342
- package/external/blessed/lib/program.js +2130 -2365
- package/external/blessed/lib/tput.js +1183 -1276
- package/external/blessed/lib/unicode.js +400 -522
- package/external/blessed/lib/widget.js +14 -14
- package/external/blessed/lib/widgets/ansiimage.js +90 -96
- package/external/blessed/lib/widgets/bigtext.js +91 -102
- package/external/blessed/lib/widgets/box.js +8 -8
- package/external/blessed/lib/widgets/button.js +23 -23
- package/external/blessed/lib/widgets/checkbox.js +50 -54
- package/external/blessed/lib/widgets/element.js +1415 -1716
- package/external/blessed/lib/widgets/filemanager.js +107 -118
- package/external/blessed/lib/widgets/form.js +144 -178
- package/external/blessed/lib/widgets/image.js +26 -36
- package/external/blessed/lib/widgets/input.js +8 -8
- package/external/blessed/lib/widgets/layout.js +103 -119
- package/external/blessed/lib/widgets/line.js +17 -20
- package/external/blessed/lib/widgets/list.js +349 -402
- package/external/blessed/lib/widgets/listbar.js +265 -306
- package/external/blessed/lib/widgets/listtable.js +133 -146
- package/external/blessed/lib/widgets/loading.js +31 -31
- package/external/blessed/lib/widgets/log.js +41 -40
- package/external/blessed/lib/widgets/message.js +64 -86
- package/external/blessed/lib/widgets/node.js +175 -207
- package/external/blessed/lib/widgets/overlayimage.js +360 -437
- package/external/blessed/lib/widgets/progressbar.js +79 -88
- package/external/blessed/lib/widgets/prompt.js +54 -61
- package/external/blessed/lib/widgets/question.js +48 -61
- package/external/blessed/lib/widgets/radiobutton.js +26 -27
- package/external/blessed/lib/widgets/radioset.js +8 -8
- package/external/blessed/lib/widgets/screen.js +1186 -1375
- package/external/blessed/lib/widgets/scrollablebox.js +202 -228
- package/external/blessed/lib/widgets/scrollabletext.js +9 -9
- package/external/blessed/lib/widgets/table.js +187 -216
- package/external/blessed/lib/widgets/terminal.js +258 -298
- package/external/blessed/lib/widgets/text.js +9 -9
- package/external/blessed/lib/widgets/textarea.js +188 -222
- package/external/blessed/lib/widgets/textbox.js +34 -36
- package/external/blessed/lib/widgets/video.js +55 -59
- package/external/blessed/usr/fonts/ter-u14b.json +1 -1
- package/external/blessed/usr/fonts/ter-u14n.json +1 -1
- package/external/blessed/vendor/tng.js +1016 -1144
- package/external/blessed-contrib/lib/layout/grid.js +345 -377
- package/external/blessed-contrib/lib/widget/charts/bar.js +6612 -7139
- package/external/blessed-contrib/lib/widget/charts/line.js +16224 -23941
- package/external/blessed-contrib/lib/widget/table.js +78 -96
- package/package.json +8 -8
- package/dist/types/commands/cdxgen/run-cdxgen.d.mts.map +0 -1
package/dist/constants.js
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var fs = require('node:fs');
|
|
4
|
+
var Module = require('node:module');
|
|
5
|
+
var os = require('node:os');
|
|
6
|
+
var path = require('node:path');
|
|
7
|
+
var require$$0 = require('node:url');
|
|
8
|
+
var registryConstants = require('../external/@socketsecurity/registry/lib/constants');
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
)
|
|
15
|
-
const __filename$1 = require$$0.fileURLToPath(
|
|
16
|
-
typeof document === 'undefined'
|
|
17
|
-
? require$$0.pathToFileURL(__filename).href
|
|
18
|
-
: (_documentCurrentScript &&
|
|
19
|
-
_documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' &&
|
|
20
|
-
_documentCurrentScript.src) ||
|
|
21
|
-
new URL('constants.js', document.baseURI).href
|
|
22
|
-
)
|
|
23
|
-
const __dirname$1 = path.dirname(__filename$1)
|
|
10
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
11
|
+
const require$1 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
|
|
12
|
+
const __filename$1 = require$$0.fileURLToPath((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('constants.js', document.baseURI).href)));
|
|
13
|
+
const __dirname$1 = path.dirname(__filename$1);
|
|
24
14
|
const {
|
|
25
15
|
kInternalsSymbol,
|
|
26
16
|
[kInternalsSymbol]: {
|
|
@@ -28,60 +18,62 @@ const {
|
|
|
28
18
|
createConstantsObject,
|
|
29
19
|
getIpc
|
|
30
20
|
}
|
|
31
|
-
} = registryConstants
|
|
32
|
-
const ALERT_TYPE_CRITICAL_CVE = 'criticalCVE'
|
|
33
|
-
const ALERT_TYPE_CVE = 'cve'
|
|
34
|
-
const ALERT_TYPE_MEDIUM_CVE = 'mediumCVE'
|
|
35
|
-
const ALERT_TYPE_MILD_CVE = 'mildCVE'
|
|
36
|
-
const API_V0_URL = 'https://api.socket.dev/v0/'
|
|
37
|
-
const BINARY_LOCK_EXT = '.lockb'
|
|
38
|
-
const BUN = 'bun'
|
|
39
|
-
const CLI = 'cli'
|
|
40
|
-
const CVE_ALERT_PROPS_FIRST_PATCHED_VERSION_IDENTIFIER =
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
let _Sentry
|
|
21
|
+
} = registryConstants;
|
|
22
|
+
const ALERT_TYPE_CRITICAL_CVE = 'criticalCVE';
|
|
23
|
+
const ALERT_TYPE_CVE = 'cve';
|
|
24
|
+
const ALERT_TYPE_MEDIUM_CVE = 'mediumCVE';
|
|
25
|
+
const ALERT_TYPE_MILD_CVE = 'mildCVE';
|
|
26
|
+
const API_V0_URL = 'https://api.socket.dev/v0/';
|
|
27
|
+
const BINARY_LOCK_EXT = '.lockb';
|
|
28
|
+
const BUN = 'bun';
|
|
29
|
+
const CLI = 'cli';
|
|
30
|
+
const CVE_ALERT_PROPS_FIRST_PATCHED_VERSION_IDENTIFIER = 'firstPatchedVersionIdentifier';
|
|
31
|
+
const DRY_RUN_LABEL = '[DryRun]';
|
|
32
|
+
const DRY_RUN_BAILING_NOW = `${DRY_RUN_LABEL}: Bailing now`;
|
|
33
|
+
const DRY_RUN_NOT_SAVING = `${DRY_RUN_LABEL}: Not saving`;
|
|
34
|
+
const LOCALAPPDATA = 'LOCALAPPDATA';
|
|
35
|
+
const LOCK_EXT = '.lock';
|
|
36
|
+
const NPM_BUGGY_OVERRIDES_PATCHED_VERSION = '11.2.0';
|
|
37
|
+
const NPM_REGISTRY_URL = 'https://registry.npmjs.org';
|
|
38
|
+
const PNPM = 'pnpm';
|
|
39
|
+
const REDACTED = '<redacted>';
|
|
40
|
+
const SHADOW_BIN = 'shadow-bin';
|
|
41
|
+
const SHADOW_INJECT = 'shadow-inject';
|
|
42
|
+
const SOCKET = 'socket';
|
|
43
|
+
const SOCKET_CLI_ACCEPT_RISKS = 'SOCKET_CLI_ACCEPT_RISKS';
|
|
44
|
+
const SOCKET_CLI_BIN_NAME = 'socket';
|
|
45
|
+
const SOCKET_CLI_BIN_NAME_ALIAS = 'cli';
|
|
46
|
+
const SOCKET_CLI_FIX = 'SOCKET_CLI_FIX';
|
|
47
|
+
const SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues';
|
|
48
|
+
const SOCKET_CLI_LEGACY_PACKAGE_NAME = '@socketsecurity/cli';
|
|
49
|
+
const SOCKET_CLI_OPTIMIZE = 'SOCKET_CLI_OPTIMIZE';
|
|
50
|
+
const SOCKET_CLI_NPM_BIN_NAME = 'socket-npm';
|
|
51
|
+
const SOCKET_CLI_NPX_BIN_NAME = 'socket-npx';
|
|
52
|
+
const SOCKET_CLI_PACKAGE_NAME = 'socket';
|
|
53
|
+
const SOCKET_CLI_SAFE_BIN = 'SOCKET_CLI_SAFE_BIN';
|
|
54
|
+
const SOCKET_CLI_SAFE_PROGRESS = 'SOCKET_CLI_SAFE_PROGRESS';
|
|
55
|
+
const SOCKET_CLI_SENTRY_BIN_NAME = 'socket-with-sentry';
|
|
56
|
+
const SOCKET_CLI_SENTRY_BIN_NAME_ALIAS = 'cli-with-sentry';
|
|
57
|
+
const SOCKET_CLI_SENTRY_NPM_BIN_NAME = 'socket-npm-with-sentry';
|
|
58
|
+
const SOCKET_CLI_SENTRY_NPX_BIN_NAME = 'socket-npx-with-sentry';
|
|
59
|
+
const SOCKET_CLI_SENTRY_PACKAGE_NAME = '@socketsecurity/cli-with-sentry';
|
|
60
|
+
const SOCKET_CLI_VIEW_ALL_RISKS = 'SOCKET_CLI_VIEW_ALL_RISKS';
|
|
61
|
+
const SOCKET_WEBSITE_URL = 'https://socket.dev';
|
|
62
|
+
const VLT = 'vlt';
|
|
63
|
+
const WITH_SENTRY = 'with-sentry';
|
|
64
|
+
const YARN = 'yarn';
|
|
65
|
+
const YARN_BERRY = 'yarn/berry';
|
|
66
|
+
const YARN_CLASSIC = 'yarn/classic';
|
|
67
|
+
const YARN_LOCK = 'yarn.lock';
|
|
68
|
+
let _Sentry;
|
|
80
69
|
const LAZY_ENV = () => {
|
|
81
|
-
const {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
const {
|
|
71
|
+
envAsBoolean,
|
|
72
|
+
envAsString
|
|
73
|
+
} = require$1('../external/@socketsecurity/registry/lib/env');
|
|
74
|
+
const {
|
|
75
|
+
env
|
|
76
|
+
} = process;
|
|
85
77
|
// We inline some environment values so that they CANNOT be influenced by user
|
|
86
78
|
// provided environment variables.
|
|
87
79
|
return Object.freeze({
|
|
@@ -112,18 +104,16 @@ const LAZY_ENV = () => {
|
|
|
112
104
|
GITHUB_TOKEN: envAsString(env['GITHUB_TOKEN']),
|
|
113
105
|
// Comp-time inlined @cyclonedx/cdxgen package version.
|
|
114
106
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_CYCLONEDX_CDXGEN_VERSION']".
|
|
115
|
-
INLINED_CYCLONEDX_CDXGEN_VERSION: envAsString(
|
|
107
|
+
INLINED_CYCLONEDX_CDXGEN_VERSION: envAsString("11.3.1"),
|
|
116
108
|
// Comp-time inlined Socket package homepage.
|
|
117
109
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_HOMEPAGE']".
|
|
118
|
-
INLINED_SOCKET_CLI_HOMEPAGE: envAsString(
|
|
119
|
-
'https://github.com/SocketDev/socket-cli'
|
|
120
|
-
),
|
|
110
|
+
INLINED_SOCKET_CLI_HOMEPAGE: envAsString("https://github.com/SocketDev/socket-cli"),
|
|
121
111
|
// Comp-time inlined flag to determine if this is the Legacy build.
|
|
122
112
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_LEGACY_BUILD']".
|
|
123
113
|
INLINED_SOCKET_CLI_LEGACY_BUILD: envAsBoolean(false),
|
|
124
114
|
// Comp-time inlined Socket package name.
|
|
125
115
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_NAME']".
|
|
126
|
-
INLINED_SOCKET_CLI_NAME: envAsString(
|
|
116
|
+
INLINED_SOCKET_CLI_NAME: envAsString("@socketsecurity/cli"),
|
|
127
117
|
// Comp-time inlined flag to determine if this is a published build.
|
|
128
118
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']".
|
|
129
119
|
INLINED_SOCKET_CLI_PUBLISHED_BUILD: envAsBoolean(true),
|
|
@@ -132,15 +122,13 @@ const LAZY_ENV = () => {
|
|
|
132
122
|
INLINED_SOCKET_CLI_SENTRY_BUILD: envAsBoolean(true),
|
|
133
123
|
// Comp-time inlined Socket package version.
|
|
134
124
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
135
|
-
INLINED_SOCKET_CLI_VERSION: envAsString(
|
|
125
|
+
INLINED_SOCKET_CLI_VERSION: envAsString("0.15.12"),
|
|
136
126
|
// Comp-time inlined Socket package version hash.
|
|
137
127
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
|
|
138
|
-
INLINED_SOCKET_CLI_VERSION_HASH: envAsString(
|
|
139
|
-
'0.15.11:17d6da8:a5d3b04f:pub'
|
|
140
|
-
),
|
|
128
|
+
INLINED_SOCKET_CLI_VERSION_HASH: envAsString("0.15.12:e1d6f18:c57760a1:pub"),
|
|
141
129
|
// Comp-time inlined synp package version.
|
|
142
130
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SYNP_VERSION']".
|
|
143
|
-
INLINED_SYNP_VERSION: envAsString(
|
|
131
|
+
INLINED_SYNP_VERSION: envAsString("1.9.14"),
|
|
144
132
|
// The location of the %localappdata% folder on Windows used to store user-specific,
|
|
145
133
|
// non-roaming application data, like temporary files, cached data, and program
|
|
146
134
|
// settings, that are specific to the current machine and user.
|
|
@@ -148,11 +136,10 @@ const LAZY_ENV = () => {
|
|
|
148
136
|
// Flag to enable the module compile cache for the Node.js instance.
|
|
149
137
|
// https://nodejs.org/api/cli.html#node_compile_cachedir
|
|
150
138
|
NODE_COMPILE_CACHE:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
: '',
|
|
139
|
+
// Lazily access constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR.
|
|
140
|
+
constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR ?
|
|
141
|
+
// Lazily access constants.socketCachePath.
|
|
142
|
+
constants.socketCachePath : '',
|
|
156
143
|
// PATH is an environment variable that lists directories where executable
|
|
157
144
|
// programs are located. When a command is run, the system searches these
|
|
158
145
|
// directories to find the executable.
|
|
@@ -169,30 +156,26 @@ const LAZY_ENV = () => {
|
|
|
169
156
|
SOCKET_CLI_VIEW_ALL_RISKS: envAsBoolean(env[SOCKET_CLI_VIEW_ALL_RISKS]),
|
|
170
157
|
// Flag to change the base URL for all API-calls.
|
|
171
158
|
// https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development
|
|
172
|
-
SOCKET_SECURITY_API_BASE_URL:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
envAsString(env['SOCKET_CLI_API_BASE_URL']),
|
|
159
|
+
SOCKET_SECURITY_API_BASE_URL: envAsString(env['SOCKET_SECURITY_API_BASE_URL']) ||
|
|
160
|
+
// For consistency; allow socket_cli prefix too
|
|
161
|
+
envAsString(env['SOCKET_CLI_API_BASE_URL']),
|
|
176
162
|
// Flag to set the proxy all requests are routed through.
|
|
177
163
|
// https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development
|
|
178
|
-
SOCKET_SECURITY_API_PROXY:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
envAsString(env['SOCKET_CLI_API_BASE_URL']),
|
|
164
|
+
SOCKET_SECURITY_API_PROXY: envAsString(env['SOCKET_SECURITY_API_PROXY']) ||
|
|
165
|
+
// For consistency; allow socket_cli prefix too
|
|
166
|
+
envAsString(env['SOCKET_CLI_API_BASE_URL']),
|
|
182
167
|
// Flag to set the API token.
|
|
183
168
|
// https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables
|
|
184
169
|
SOCKET_SECURITY_API_TOKEN:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
envAsString(env['SOCKET_CLI_API_TOKEN']) ||
|
|
195
|
-
envAsString(env['SOCKET_CLI_API_KEY']),
|
|
170
|
+
// Note: These are SOCKET_SECURITY prefixed because they're not specific
|
|
171
|
+
// to the CLI. For the sake of consistency we'll also support the env
|
|
172
|
+
// keys that do have the SOCKET_CLI prefix, it's an easy mistake.
|
|
173
|
+
// In case multiple are supplied, the tokens supersede the keys and the
|
|
174
|
+
// security prefix supersedes the cli prefix. "Adventure mode" ;)
|
|
175
|
+
envAsString(env['SOCKET_SECURITY_API_TOKEN']) ||
|
|
176
|
+
// Keep 'SOCKET_SECURITY_API_KEY' alias.
|
|
177
|
+
// TODO: Remove 'SOCKET_SECURITY_API_KEY' alias.
|
|
178
|
+
envAsString(env['SOCKET_SECURITY_API_KEY']) || envAsString(env['SOCKET_CLI_API_TOKEN']) || envAsString(env['SOCKET_CLI_API_KEY']),
|
|
196
179
|
// A classic GitHub personal access token with the "repo" scope or a fine-grained
|
|
197
180
|
// access token with read/write permissions set for "Contents" and "Pull Request".
|
|
198
181
|
// https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
|
@@ -202,88 +185,78 @@ const LAZY_ENV = () => {
|
|
|
202
185
|
// The location of the base directory on Linux and MacOS used to store
|
|
203
186
|
// user-specific data files, defaulting to $HOME/.local/share if not set or empty.
|
|
204
187
|
XDG_DATA_HOME: envAsString(env['XDG_DATA_HOME'])
|
|
205
|
-
})
|
|
206
|
-
}
|
|
188
|
+
});
|
|
189
|
+
};
|
|
207
190
|
const lazyBashRcPath = () =>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
const lazyBlessedOptions = () =>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
})
|
|
191
|
+
// Lazily access constants.homePath.
|
|
192
|
+
path.join(constants.homePath, '.bashrc');
|
|
193
|
+
const lazyBlessedOptions = () => Object.freeze({
|
|
194
|
+
smartCSR: true,
|
|
195
|
+
// Lazily access constants.WIN32.
|
|
196
|
+
term: constants.WIN32 ? 'windows-ansi' : 'xterm',
|
|
197
|
+
useBCE: true
|
|
198
|
+
});
|
|
217
199
|
const lazyDistCliPath = () =>
|
|
218
|
-
|
|
219
|
-
|
|
200
|
+
// Lazily access constants.distPath.
|
|
201
|
+
path.join(constants.distPath, 'cli.js');
|
|
220
202
|
const lazyDistInstrumentWithSentryPath = () =>
|
|
221
|
-
|
|
222
|
-
|
|
203
|
+
// Lazily access constants.distPath.
|
|
204
|
+
path.join(constants.distPath, 'instrument-with-sentry.js');
|
|
223
205
|
const lazyDistShadowBinPath = () =>
|
|
224
|
-
|
|
225
|
-
|
|
206
|
+
// Lazily access constants.distPath.
|
|
207
|
+
path.join(constants.distPath, `${SHADOW_BIN}.js`);
|
|
226
208
|
const lazyDistShadowInjectPath = () =>
|
|
227
|
-
|
|
228
|
-
|
|
209
|
+
// Lazily access constants.distPath.
|
|
210
|
+
path.join(constants.distPath, `${SHADOW_INJECT}.js`);
|
|
229
211
|
const lazyGithubCachePath = () =>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
const lazyHomePath = () => os.homedir()
|
|
233
|
-
const lazyMinimumVersionByAgent = () =>
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
[VLT, '*']
|
|
253
|
-
])
|
|
212
|
+
// Lazily access constants.socketCachePath.
|
|
213
|
+
path.join(constants.socketCachePath, 'github');
|
|
214
|
+
const lazyHomePath = () => os.homedir();
|
|
215
|
+
const lazyMinimumVersionByAgent = () => new Map([
|
|
216
|
+
// Bun >=1.1.39 supports the text-based lockfile.
|
|
217
|
+
// https://bun.sh/blog/bun-lock-text-lockfile
|
|
218
|
+
[BUN, '1.1.39'],
|
|
219
|
+
// The npm version bundled with Node 18.
|
|
220
|
+
// https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch
|
|
221
|
+
['npm', '10.8.2'],
|
|
222
|
+
// 8.x is the earliest version to support Node 18.
|
|
223
|
+
// https://pnpm.io/installation#compatibility
|
|
224
|
+
// https://www.npmjs.com/package/pnpm?activeTab=versions
|
|
225
|
+
[PNPM, '8.15.7'],
|
|
226
|
+
// 4.x supports >= Node 18.12.0
|
|
227
|
+
// https://github.com/yarnpkg/berry/blob/%40yarnpkg/core/4.1.0/CHANGELOG.md#400
|
|
228
|
+
[YARN_BERRY, '4.0.0'],
|
|
229
|
+
// Latest 1.x.
|
|
230
|
+
// https://www.npmjs.com/package/yarn?activeTab=versions
|
|
231
|
+
[YARN_CLASSIC, '1.22.22'],
|
|
232
|
+
// vlt does not support overrides so we don't gate on it.
|
|
233
|
+
[VLT, '*']]);
|
|
254
234
|
const lazyNmBinPath = () =>
|
|
255
|
-
|
|
256
|
-
|
|
235
|
+
// Lazily access constants.rootPath.
|
|
236
|
+
path.join(constants.rootPath, 'node_modules/.bin');
|
|
257
237
|
|
|
258
238
|
// Redefine registryConstants.nodeHardenFlags to account for the
|
|
259
239
|
// INLINED_SOCKET_CLI_SENTRY_BUILD environment variable.
|
|
260
|
-
const lazyNodeHardenFlags = () =>
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
// Node's --frozen-intrinsics workable.
|
|
274
|
-
// √ https://github.com/SBoudrias/Inquirer.js/pull/1683
|
|
275
|
-
// √ https://github.com/pnpm/components/pull/23
|
|
276
|
-
'--frozen-intrinsics',
|
|
277
|
-
'--no-deprecation'
|
|
278
|
-
]
|
|
279
|
-
)
|
|
240
|
+
const lazyNodeHardenFlags = () => Object.freeze(
|
|
241
|
+
// Lazily access constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD.
|
|
242
|
+
constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD ||
|
|
243
|
+
// Lazily access constants.WIN32.
|
|
244
|
+
constants.WIN32 ? [] :
|
|
245
|
+
// Harden Node security.
|
|
246
|
+
// https://nodejs.org/en/learn/getting-started/security-best-practices
|
|
247
|
+
['--disable-proto', 'throw',
|
|
248
|
+
// We have contributed the following patches to our dependencies to make
|
|
249
|
+
// Node's --frozen-intrinsics workable.
|
|
250
|
+
// √ https://github.com/SBoudrias/Inquirer.js/pull/1683
|
|
251
|
+
// √ https://github.com/pnpm/components/pull/23
|
|
252
|
+
'--frozen-intrinsics', '--no-deprecation']);
|
|
280
253
|
const lazyRootBinPath = () =>
|
|
281
|
-
|
|
282
|
-
|
|
254
|
+
// Lazily access constants.rootPath.
|
|
255
|
+
path.join(constants.rootPath, 'bin');
|
|
283
256
|
const lazyDistPath = () =>
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
const lazyRootPath = () => path.join(fs.realpathSync.native(__dirname$1), '..')
|
|
257
|
+
// Lazily access constants.rootPath.
|
|
258
|
+
path.join(constants.rootPath, 'dist');
|
|
259
|
+
const lazyRootPath = () => path.join(fs.realpathSync.native(__dirname$1), '..');
|
|
287
260
|
const lazySocketAppDataPath = () => {
|
|
288
261
|
// Get the OS app data folder:
|
|
289
262
|
// - Win: %LOCALAPPDATA% or fail?
|
|
@@ -298,146 +271,142 @@ const lazySocketAppDataPath = () => {
|
|
|
298
271
|
// - Linux: %XDG_DATA_HOME%/socket/settings or "~/.local/share/socket/settings"
|
|
299
272
|
|
|
300
273
|
// Lazily access constants.WIN32.
|
|
301
|
-
const {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
274
|
+
const {
|
|
275
|
+
WIN32
|
|
276
|
+
} = constants;
|
|
277
|
+
let dataHome = WIN32 ?
|
|
278
|
+
// Lazily access constants.ENV.LOCALAPPDATA
|
|
279
|
+
constants.ENV.LOCALAPPDATA :
|
|
280
|
+
// Lazily access constants.ENV.XDG_DATA_HOME
|
|
281
|
+
constants.ENV.XDG_DATA_HOME;
|
|
307
282
|
if (!dataHome) {
|
|
308
283
|
if (WIN32) {
|
|
309
|
-
const logger = require$1(
|
|
310
|
-
|
|
311
|
-
)
|
|
312
|
-
logger.warn(`Missing %${LOCALAPPDATA}%`)
|
|
284
|
+
const logger = require$1('../external/@socketsecurity/registry/lib/logger');
|
|
285
|
+
logger.warn(`Missing %${LOCALAPPDATA}%`);
|
|
313
286
|
} else {
|
|
314
287
|
dataHome = path.join(
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
)
|
|
288
|
+
// Lazily access constants.homePath.
|
|
289
|
+
constants.homePath,
|
|
290
|
+
// Lazily access constants.DARWIN.
|
|
291
|
+
constants.DARWIN ? 'Library/Application Support' : '.local/share');
|
|
320
292
|
}
|
|
321
293
|
}
|
|
322
|
-
return dataHome ? path.join(dataHome, 'socket/settings') : undefined
|
|
323
|
-
}
|
|
294
|
+
return dataHome ? path.join(dataHome, 'socket/settings') : undefined;
|
|
295
|
+
};
|
|
324
296
|
const lazySocketCachePath = () =>
|
|
325
|
-
|
|
326
|
-
|
|
297
|
+
// Lazily access constants.rootPath.
|
|
298
|
+
path.join(constants.rootPath, '.cache');
|
|
327
299
|
const lazyShadowBinPath = () =>
|
|
328
|
-
|
|
329
|
-
|
|
300
|
+
// Lazily access constants.rootPath.
|
|
301
|
+
path.join(constants.rootPath, SHADOW_BIN);
|
|
330
302
|
const lazyZshRcPath = () =>
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
const constants = createConstantsObject(
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
303
|
+
// Lazily access constants.homePath.
|
|
304
|
+
path.join(constants.homePath, '.zshrc');
|
|
305
|
+
const constants = createConstantsObject({
|
|
306
|
+
...registryConstantsAttribs.props,
|
|
307
|
+
ALERT_TYPE_CRITICAL_CVE,
|
|
308
|
+
ALERT_TYPE_CVE,
|
|
309
|
+
ALERT_TYPE_MEDIUM_CVE,
|
|
310
|
+
ALERT_TYPE_MILD_CVE,
|
|
311
|
+
API_V0_URL,
|
|
312
|
+
BINARY_LOCK_EXT,
|
|
313
|
+
BUN,
|
|
314
|
+
CLI,
|
|
315
|
+
CVE_ALERT_PROPS_FIRST_PATCHED_VERSION_IDENTIFIER,
|
|
316
|
+
DRY_RUN_LABEL,
|
|
317
|
+
DRY_RUN_BAILING_NOW,
|
|
318
|
+
DRY_RUN_NOT_SAVING,
|
|
319
|
+
ENV: undefined,
|
|
320
|
+
LOCK_EXT,
|
|
321
|
+
NPM_BUGGY_OVERRIDES_PATCHED_VERSION,
|
|
322
|
+
NPM_REGISTRY_URL,
|
|
323
|
+
PNPM,
|
|
324
|
+
REDACTED,
|
|
325
|
+
SHADOW_BIN,
|
|
326
|
+
SHADOW_INJECT,
|
|
327
|
+
SOCKET,
|
|
328
|
+
SOCKET_CLI_ACCEPT_RISKS,
|
|
329
|
+
SOCKET_CLI_BIN_NAME,
|
|
330
|
+
SOCKET_CLI_BIN_NAME_ALIAS,
|
|
331
|
+
SOCKET_CLI_FIX,
|
|
332
|
+
SOCKET_CLI_ISSUES_URL,
|
|
333
|
+
SOCKET_CLI_SENTRY_BIN_NAME_ALIAS,
|
|
334
|
+
SOCKET_CLI_LEGACY_PACKAGE_NAME,
|
|
335
|
+
SOCKET_CLI_NPM_BIN_NAME,
|
|
336
|
+
SOCKET_CLI_NPX_BIN_NAME,
|
|
337
|
+
SOCKET_CLI_OPTIMIZE,
|
|
338
|
+
SOCKET_CLI_PACKAGE_NAME,
|
|
339
|
+
SOCKET_CLI_SAFE_BIN,
|
|
340
|
+
SOCKET_CLI_SAFE_PROGRESS,
|
|
341
|
+
SOCKET_CLI_SENTRY_BIN_NAME,
|
|
342
|
+
SOCKET_CLI_SENTRY_NPM_BIN_NAME,
|
|
343
|
+
SOCKET_CLI_SENTRY_NPX_BIN_NAME,
|
|
344
|
+
SOCKET_CLI_SENTRY_PACKAGE_NAME,
|
|
345
|
+
SOCKET_CLI_VIEW_ALL_RISKS,
|
|
346
|
+
SOCKET_WEBSITE_URL,
|
|
347
|
+
VLT,
|
|
348
|
+
WITH_SENTRY,
|
|
349
|
+
YARN,
|
|
350
|
+
YARN_BERRY,
|
|
351
|
+
YARN_CLASSIC,
|
|
352
|
+
YARN_LOCK,
|
|
353
|
+
bashRcPath: undefined,
|
|
354
|
+
blessedOptions: undefined,
|
|
355
|
+
distCliPath: undefined,
|
|
356
|
+
distInstrumentWithSentryPath: undefined,
|
|
357
|
+
distPath: undefined,
|
|
358
|
+
distShadowBinPath: undefined,
|
|
359
|
+
distShadowInjectPath: undefined,
|
|
360
|
+
githubCachePath: undefined,
|
|
361
|
+
homePath: undefined,
|
|
362
|
+
minimumVersionByAgent: undefined,
|
|
363
|
+
nmBinPath: undefined,
|
|
364
|
+
nodeHardenFlags: undefined,
|
|
365
|
+
rootBinPath: undefined,
|
|
366
|
+
rootPath: undefined,
|
|
367
|
+
shadowBinPath: undefined,
|
|
368
|
+
socketAppDataPath: undefined,
|
|
369
|
+
socketCachePath: undefined,
|
|
370
|
+
zshRcPath: undefined
|
|
371
|
+
}, {
|
|
372
|
+
getters: {
|
|
373
|
+
...registryConstantsAttribs.getters,
|
|
374
|
+
ENV: LAZY_ENV,
|
|
375
|
+
bashRcPath: lazyBashRcPath,
|
|
376
|
+
blessedOptions: lazyBlessedOptions,
|
|
377
|
+
distCliPath: lazyDistCliPath,
|
|
378
|
+
distInstrumentWithSentryPath: lazyDistInstrumentWithSentryPath,
|
|
379
|
+
distPath: lazyDistPath,
|
|
380
|
+
distShadowBinPath: lazyDistShadowBinPath,
|
|
381
|
+
distShadowInjectPath: lazyDistShadowInjectPath,
|
|
382
|
+
githubCachePath: lazyGithubCachePath,
|
|
383
|
+
homePath: lazyHomePath,
|
|
384
|
+
minimumVersionByAgent: lazyMinimumVersionByAgent,
|
|
385
|
+
nmBinPath: lazyNmBinPath,
|
|
386
|
+
nodeHardenFlags: lazyNodeHardenFlags,
|
|
387
|
+
rootBinPath: lazyRootBinPath,
|
|
388
|
+
rootPath: lazyRootPath,
|
|
389
|
+
shadowBinPath: lazyShadowBinPath,
|
|
390
|
+
socketAppDataPath: lazySocketAppDataPath,
|
|
391
|
+
socketCachePath: lazySocketCachePath,
|
|
392
|
+
zshRcPath: lazyZshRcPath
|
|
400
393
|
},
|
|
401
|
-
{
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
blessedOptions: lazyBlessedOptions,
|
|
407
|
-
distCliPath: lazyDistCliPath,
|
|
408
|
-
distInstrumentWithSentryPath: lazyDistInstrumentWithSentryPath,
|
|
409
|
-
distPath: lazyDistPath,
|
|
410
|
-
distShadowBinPath: lazyDistShadowBinPath,
|
|
411
|
-
distShadowInjectPath: lazyDistShadowInjectPath,
|
|
412
|
-
githubCachePath: lazyGithubCachePath,
|
|
413
|
-
homePath: lazyHomePath,
|
|
414
|
-
minimumVersionByAgent: lazyMinimumVersionByAgent,
|
|
415
|
-
nmBinPath: lazyNmBinPath,
|
|
416
|
-
nodeHardenFlags: lazyNodeHardenFlags,
|
|
417
|
-
rootBinPath: lazyRootBinPath,
|
|
418
|
-
rootPath: lazyRootPath,
|
|
419
|
-
shadowBinPath: lazyShadowBinPath,
|
|
420
|
-
socketAppPath: lazySocketAppDataPath,
|
|
421
|
-
socketCachePath: lazySocketCachePath,
|
|
422
|
-
zshRcPath: lazyZshRcPath
|
|
394
|
+
internals: {
|
|
395
|
+
...registryConstantsAttribs.internals,
|
|
396
|
+
getIpc,
|
|
397
|
+
getSentry() {
|
|
398
|
+
return _Sentry;
|
|
423
399
|
},
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
return _Sentry
|
|
429
|
-
},
|
|
430
|
-
setSentry(Sentry) {
|
|
431
|
-
if (_Sentry === undefined) {
|
|
432
|
-
_Sentry = Sentry
|
|
433
|
-
return true
|
|
434
|
-
}
|
|
435
|
-
return false
|
|
400
|
+
setSentry(Sentry) {
|
|
401
|
+
if (_Sentry === undefined) {
|
|
402
|
+
_Sentry = Sentry;
|
|
403
|
+
return true;
|
|
436
404
|
}
|
|
405
|
+
return false;
|
|
437
406
|
}
|
|
438
407
|
}
|
|
439
|
-
)
|
|
408
|
+
});
|
|
440
409
|
|
|
441
|
-
module.exports = constants
|
|
442
|
-
//# debugId=
|
|
410
|
+
module.exports = constants;
|
|
411
|
+
//# debugId=9f873df4-e24f-4e0f-bd94-5c873d017913
|
|
443
412
|
//# sourceMappingURL=constants.js.map
|