@socketsecurity/cli 1.15.0 → 1.16.1
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 +24 -0
- package/README.md +16 -9
- package/dist/.config/tsconfig.dts.tsbuildinfo +1 -0
- package/dist/cli.js +2467 -961
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +50 -19
- package/dist/constants.js.map +1 -1
- package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.deps.json +2 -1
- package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.dll +0 -0
- package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
- package/dist/types/cli.d.mts +0 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -1
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -1
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -1
- package/dist/types/commands/analytics/handle-analytics.d.mts +0 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +0 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -1
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -1
- package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -1
- package/dist/types/commands/ci/cmd-ci.d.mts +0 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -1
- package/dist/types/commands/ci/handle-ci.d.mts +0 -1
- package/dist/types/commands/config/cmd-config-auto.d.mts +0 -1
- package/dist/types/commands/config/cmd-config-get.d.mts +0 -1
- package/dist/types/commands/config/cmd-config-list.d.mts +0 -1
- package/dist/types/commands/config/cmd-config-set.d.mts +0 -1
- package/dist/types/commands/config/cmd-config-unset.d.mts +0 -1
- package/dist/types/commands/config/cmd-config.d.mts +0 -1
- package/dist/types/commands/config/discover-config-value.d.mts +0 -1
- package/dist/types/commands/config/handle-config-auto.d.mts +0 -1
- package/dist/types/commands/config/handle-config-get.d.mts +0 -1
- package/dist/types/commands/config/handle-config-set.d.mts +0 -1
- package/dist/types/commands/config/handle-config-unset.d.mts +0 -1
- package/dist/types/commands/config/output-config-auto.d.mts +0 -1
- package/dist/types/commands/config/output-config-get.d.mts +0 -1
- package/dist/types/commands/config/output-config-list.d.mts +0 -1
- package/dist/types/commands/config/output-config-set.d.mts +0 -1
- package/dist/types/commands/config/output-config-unset.d.mts +0 -1
- package/dist/types/commands/fix/branch-cleanup.d.mts +0 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +0 -1
- package/dist/types/commands/fix/coana-fix.d.mts +0 -1
- package/dist/types/commands/fix/env-helpers.d.mts +0 -1
- package/dist/types/commands/fix/generated-socket-facts.d.mts +2 -1
- package/dist/types/commands/fix/git.d.mts +0 -1
- package/dist/types/commands/fix/handle-fix.d.mts +0 -1
- package/dist/types/commands/fix/output-fix-result.d.mts +0 -1
- package/dist/types/commands/fix/pull-request.d.mts +0 -1
- package/dist/types/commands/fix/types.d.mts +0 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +0 -1
- package/dist/types/commands/install/cmd-install.d.mts +0 -1
- package/dist/types/commands/install/handle-install-completion.d.mts +0 -1
- package/dist/types/commands/install/output-install-completion.d.mts +0 -1
- package/dist/types/commands/install/setup-tab-completion.d.mts +0 -1
- package/dist/types/commands/json/cmd-json.d.mts +0 -1
- package/dist/types/commands/json/handle-cmd-json.d.mts +0 -1
- package/dist/types/commands/json/output-cmd-json.d.mts +0 -1
- package/dist/types/commands/login/apply-login.d.mts +0 -1
- package/dist/types/commands/login/attempt-login.d.mts +0 -1
- package/dist/types/commands/login/cmd-login.d.mts +0 -1
- package/dist/types/commands/logout/apply-logout.d.mts +0 -1
- package/dist/types/commands/logout/attempt-logout.d.mts +0 -1
- package/dist/types/commands/logout/cmd-logout.d.mts +0 -1
- package/dist/types/commands/manifest/bazel/bazel-socket-json-trust.d.mts +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-bin-detect.d.mts → bin-detect.d.mts} +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-cleanup.d.mts → cleanup.d.mts} +1 -2
- package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-cquery.d.mts → cquery.d.mts} +1 -2
- package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts +1 -2
- package/dist/types/commands/manifest/bazel/extract_bazel_to_pypi.d.mts +1 -1
- package/dist/types/commands/manifest/bazel/{bazel-java-shim.d.mts → java-shim.d.mts} +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-output-base-check.d.mts → output-base-check.d.mts} +0 -1
- package/dist/types/commands/manifest/bazel/paths/manifest.d.mts +7 -0
- package/dist/types/commands/manifest/bazel/{bazel-process.d.mts → process.d.mts} +1 -1
- package/dist/types/commands/manifest/bazel/{bazel-pypi-discovery.d.mts → pypi-discovery.d.mts} +1 -2
- package/dist/types/commands/manifest/bazel/{bazel-pypi-parser.d.mts → pypi-parser.d.mts} +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-python-shim.d.mts → python-shim.d.mts} +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-query-runner.d.mts → query-runner.d.mts} +5 -6
- package/dist/types/commands/manifest/bazel/{bazel-repo-discovery.d.mts → repo-discovery.d.mts} +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-workspace-detect.d.mts → workspace-detect.d.mts} +0 -1
- package/dist/types/commands/manifest/bazel/{bazel-workspace-walk.d.mts → workspace-walk.d.mts} +0 -1
- package/dist/types/commands/manifest/build-root-config.d.mts +27 -0
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-dotnet.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-dynamic-sbom-inference.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-maven.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -1
- package/dist/types/commands/manifest/convert-dotnet-to-facts.d.mts +0 -1
- package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts +0 -1
- package/dist/types/commands/manifest/convert-maven-to-facts.d.mts +0 -1
- package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts +0 -1
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -1
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -1
- package/dist/types/commands/manifest/discover-manifest-roots.d.mts +23 -8
- package/dist/types/commands/manifest/enumerate-workspaces.d.mts +3 -5
- package/dist/types/commands/manifest/expand-env-var-refs.d.mts +0 -1
- package/dist/types/commands/manifest/generate-recursive-manifests.d.mts +15 -7
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -1
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -1
- package/dist/types/commands/manifest/handle-manifest-dynamic-sbom-inference.d.mts +0 -1
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -1
- package/dist/types/commands/manifest/load-build.d.mts +19 -0
- package/dist/types/commands/manifest/manifest-flags.d.mts +0 -1
- package/dist/types/commands/manifest/output-manifest-dynamic-sbom-inference.d.mts +0 -1
- package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -1
- package/dist/types/commands/manifest/output-requirements.d.mts +0 -1
- package/dist/types/commands/manifest/parse-build-tool-opts.d.mts +0 -1
- package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -1
- package/dist/types/commands/manifest/run-manifest-facts.d.mts +3 -1
- package/dist/types/commands/manifest/scripts/assemble.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/build-tool.d.mts +9 -5
- package/dist/types/commands/manifest/scripts/exclude-paths-glob.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/facts.d.mts +4 -3
- package/dist/types/commands/manifest/scripts/records.d.mts +2 -1
- package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-ivy.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-maven.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-nuget.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/run.d.mts +0 -1
- package/dist/types/commands/manifest/scripts/sidecar.d.mts +1 -3
- package/dist/types/commands/manifest/scripts/test/assemble-records.d.mts +1 -0
- package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -1
- package/dist/types/commands/manifest/setup-recursive-manifest-config.d.mts +10 -65
- package/dist/types/commands/npm/cmd-npm.d.mts +0 -1
- package/dist/types/commands/npx/cmd-npx.d.mts +0 -1
- package/dist/types/commands/oops/cmd-oops.d.mts +0 -1
- package/dist/types/commands/optimize/add-overrides.d.mts +0 -1
- package/dist/types/commands/optimize/apply-optimization.d.mts +0 -1
- package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -1
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -1
- package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -1
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -1
- package/dist/types/commands/optimize/handle-optimize.d.mts +0 -1
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -1
- package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -1
- package/dist/types/commands/optimize/shared.d.mts +0 -1
- package/dist/types/commands/optimize/types.d.mts +0 -1
- package/dist/types/commands/optimize/update-lockfile.d.mts +0 -1
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -1
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -1
- package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -1
- package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -1
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -1
- package/dist/types/commands/organization/cmd-organization.d.mts +0 -1
- package/dist/types/commands/organization/dependencies-filters.d.mts +10 -0
- package/dist/types/commands/organization/fetch-dependencies.d.mts +1 -1
- package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -1
- package/dist/types/commands/organization/fetch-quota.d.mts +0 -1
- package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -1
- package/dist/types/commands/organization/handle-dependencies.d.mts +2 -2
- package/dist/types/commands/organization/handle-license-policy.d.mts +0 -1
- package/dist/types/commands/organization/handle-organization-list.d.mts +0 -1
- package/dist/types/commands/organization/handle-quota.d.mts +0 -1
- package/dist/types/commands/organization/handle-security-policy.d.mts +0 -1
- package/dist/types/commands/organization/output-dependencies.d.mts +0 -1
- package/dist/types/commands/organization/output-license-policy.d.mts +0 -1
- package/dist/types/commands/organization/output-organization-list.d.mts +0 -1
- package/dist/types/commands/organization/output-quota.d.mts +0 -1
- package/dist/types/commands/organization/output-security-policy.d.mts +0 -1
- package/dist/types/commands/package/cmd-package-score.d.mts +0 -1
- package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -1
- package/dist/types/commands/package/cmd-package.d.mts +0 -1
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -1
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -1
- package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -1
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -1
- package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -1
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -1
- package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -1
- package/dist/types/commands/patch/cmd-patch.d.mts +0 -1
- package/dist/types/commands/pnpm/cmd-pnpm.d.mts +0 -1
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -1
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -1
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -1
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -1
- package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -1
- package/dist/types/commands/repository/cmd-repository.d.mts +0 -1
- package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -1
- package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -1
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -1
- package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -1
- package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -1
- package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -1
- package/dist/types/commands/repository/handle-create-repo.d.mts +0 -1
- package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts +0 -1
- package/dist/types/commands/repository/handle-update-repo.d.mts +0 -1
- package/dist/types/commands/repository/handle-view-repo.d.mts +0 -1
- package/dist/types/commands/repository/output-create-repo.d.mts +0 -1
- package/dist/types/commands/repository/output-delete-repo.d.mts +0 -1
- package/dist/types/commands/repository/output-list-repos.d.mts +0 -1
- package/dist/types/commands/repository/output-update-repo.d.mts +0 -1
- package/dist/types/commands/repository/output-view-repo.d.mts +0 -1
- package/dist/types/commands/repository/types.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -1
- package/dist/types/commands/scan/cmd-scan.d.mts +0 -1
- package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -1
- package/dist/types/commands/scan/exclude-paths.d.mts +0 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -1
- package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +0 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -1
- package/dist/types/commands/scan/fetch-scan.d.mts +0 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -1
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts +0 -1
- package/dist/types/commands/scan/generate-report.d.mts +0 -1
- package/dist/types/commands/scan/generate-uv-member-sboms.d.mts +0 -1
- package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -1
- package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts +0 -1
- package/dist/types/commands/scan/handle-scan-config.d.mts +0 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -1
- package/dist/types/commands/scan/handle-scan-report.d.mts +0 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts +0 -1
- package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -1
- package/dist/types/commands/scan/output-delete-scan.d.mts +0 -1
- package/dist/types/commands/scan/output-diff-scan.d.mts +0 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +0 -1
- package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -1
- package/dist/types/commands/scan/output-scan-github.d.mts +0 -1
- package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts +0 -1
- package/dist/types/commands/scan/output-scan-report.d.mts +12 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +0 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts +0 -3
- package/dist/types/commands/scan/reach-advisories.d.mts +0 -1
- package/dist/types/commands/scan/reachability-flags.d.mts +0 -1
- package/dist/types/commands/scan/reachability-units.d.mts +0 -1
- package/dist/types/commands/scan/run-dynamic-sbom-inference.d.mts +5 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts +0 -1
- package/dist/types/commands/scan/stream-scan.d.mts +0 -1
- package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -1
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -1
- package/dist/types/commands/scan/suggest_target.d.mts +0 -1
- package/dist/types/commands/scan/types.d.mts +0 -1
- package/dist/types/commands/scan/validate-reachability-target.d.mts +0 -1
- package/dist/types/commands/scan/warn-socket-json-only-flags.d.mts +0 -1
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -1
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -1
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -1
- package/dist/types/commands/threat-feed/types.d.mts +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -1
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -1
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -1
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -1
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -1
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -1
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -1
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -1
- package/dist/types/commands/yarn/cmd-yarn.d.mts +0 -1
- package/dist/types/commands.d.mts +0 -1
- package/dist/types/constants.d.mts +7 -6
- package/dist/types/flags.d.mts +0 -1
- package/dist/types/instrument-with-sentry.d.mts +0 -1
- package/dist/types/npm-cli.d.mts +0 -1
- package/dist/types/npx-cli.d.mts +0 -1
- package/dist/types/pnpm-cli.d.mts +0 -1
- package/dist/types/sea/adapters/cdxgen.d.mts +8 -0
- package/dist/types/sea/adapters/synp.d.mts +9 -0
- package/dist/types/sea/archive-paths.d.mts +6 -0
- package/dist/types/sea/bootstrap.d.mts +0 -1
- package/dist/types/sea/build/lock.d.mts +2 -0
- package/dist/types/sea/build/publish.d.mts +13 -0
- package/dist/types/sea/build-sea.d.mts +14 -24
- package/dist/types/sea/capabilities.d.mts +21 -0
- package/dist/types/sea/download-bytes.d.mts +14 -0
- package/dist/types/sea/download-cache.d.mts +15 -0
- package/dist/types/sea/node-version.d.mts +1 -0
- package/dist/types/sea/readme-version.d.mts +4 -0
- package/dist/types/sea/runtime.d.mts +34 -0
- package/dist/types/sea/stage/synp.d.mts +15 -0
- package/dist/types/sea/stage/uv.d.mts +34 -0
- package/dist/types/sea/version.d.mts +34 -0
- package/dist/types/shadow/common.d.mts +0 -1
- package/dist/types/shadow/npm/arborist/index.d.mts +0 -1
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -1
- package/dist/types/shadow/npm/arborist/types.d.mts +0 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -1
- package/dist/types/shadow/npm/bin.d.mts +0 -1
- package/dist/types/shadow/npm/inject.d.mts +0 -1
- package/dist/types/shadow/npm/install.d.mts +0 -1
- package/dist/types/shadow/npm/paths.d.mts +0 -1
- package/dist/types/shadow/npm-base.d.mts +0 -1
- package/dist/types/shadow/npx/bin.d.mts +0 -1
- package/dist/types/shadow/pnpm/bin.d.mts +0 -1
- package/dist/types/shadow/stdio-ipc.d.mts +0 -1
- package/dist/types/shadow/yarn/bin.d.mts +0 -1
- package/dist/types/test/json-output-validation.d.mts +0 -1
- package/dist/types/test/mocks/socket-auth.d.mts +0 -1
- package/dist/types/types.d.mts +0 -1
- package/dist/types/utils/advisory-ids.d.mts +0 -1
- package/dist/types/utils/agent.d.mts +5 -11
- package/dist/types/utils/alert/artifact.d.mts +0 -1
- package/dist/types/utils/alert/fix.d.mts +0 -1
- package/dist/types/utils/alert/severity.d.mts +0 -1
- package/dist/types/utils/alerts-map.d.mts +0 -1
- package/dist/types/utils/api-transport.d.mts +0 -1
- package/dist/types/utils/api.d.mts +2 -1
- package/dist/types/utils/check-input.d.mts +0 -1
- package/dist/types/utils/cmd.d.mts +0 -1
- package/dist/types/utils/coana-release.d.mts +5 -1
- package/dist/types/utils/coana.d.mts +0 -1
- package/dist/types/utils/color-or-markdown.d.mts +0 -1
- package/dist/types/utils/completion.d.mts +0 -1
- package/dist/types/utils/config.d.mts +0 -1
- package/dist/types/utils/cve-to-ghsa.d.mts +0 -1
- package/dist/types/utils/debug.d.mts +0 -1
- package/dist/types/utils/determine-org-slug.d.mts +0 -1
- package/dist/types/utils/dlx-detection.d.mts +0 -1
- package/dist/types/utils/dlx.d.mts +0 -1
- package/dist/types/utils/ecosystem.d.mts +0 -1
- package/dist/types/utils/editable-json.d.mts +0 -1
- package/dist/types/utils/errors.d.mts +0 -1
- package/dist/types/utils/extract-names.d.mts +0 -1
- package/dist/types/utils/fail-msg-with-badge.d.mts +0 -1
- package/dist/types/utils/filter-config.d.mts +0 -1
- package/dist/types/utils/fs.d.mts +0 -1
- package/dist/types/utils/get-or-insert.d.mts +0 -1
- package/dist/types/utils/get-output-kind.d.mts +0 -1
- package/dist/types/utils/git.d.mts +0 -1
- package/dist/types/utils/github-errors.d.mts +0 -1
- package/dist/types/utils/github.d.mts +0 -1
- package/dist/types/utils/glob.d.mts +0 -1
- package/dist/types/utils/lockfile.d.mts +0 -1
- package/dist/types/utils/map-to-object.d.mts +0 -1
- package/dist/types/utils/markdown.d.mts +0 -1
- package/dist/types/utils/meow-with-subcommands.d.mts +0 -1
- package/dist/types/utils/ms-at-home.d.mts +0 -1
- package/dist/types/utils/npm-config.d.mts +0 -1
- package/dist/types/utils/npm-package-arg.d.mts +0 -1
- package/dist/types/utils/npm-paths.d.mts +0 -1
- package/dist/types/utils/npm-spec.d.mts +0 -1
- package/dist/types/utils/oauth.d.mts +0 -1
- package/dist/types/utils/objects.d.mts +0 -1
- package/dist/types/utils/organization.d.mts +0 -1
- package/dist/types/utils/output-formatting.d.mts +0 -1
- package/dist/types/utils/package-environment.d.mts +0 -1
- package/dist/types/utils/package-manager.d.mts +0 -1
- package/dist/types/utils/path-resolve.d.mts +0 -1
- package/dist/types/utils/pnpm-paths.d.mts +0 -1
- package/dist/types/utils/pnpm.d.mts +0 -1
- package/dist/types/utils/purl-to-ghsa.d.mts +0 -1
- package/dist/types/utils/purl.d.mts +0 -1
- package/dist/types/utils/quote-powershell.d.mts +2 -0
- package/dist/types/utils/requirements.d.mts +0 -1
- package/dist/types/utils/sdk.d.mts +0 -1
- package/dist/types/utils/self-update.d.mts +2 -1
- package/dist/types/utils/semver.d.mts +0 -1
- package/dist/types/utils/serialize-result-json.d.mts +0 -1
- package/dist/types/utils/shadow-links.d.mts +0 -1
- package/dist/types/utils/socket-json.d.mts +15 -5
- package/dist/types/utils/socket-package-alert.d.mts +0 -1
- package/dist/types/utils/socket-url.d.mts +0 -1
- package/dist/types/utils/spec.d.mts +0 -1
- package/dist/types/utils/strings.d.mts +0 -1
- package/dist/types/utils/telemetry/integration.d.mts +0 -1
- package/dist/types/utils/telemetry/service.d.mts +0 -1
- package/dist/types/utils/telemetry/types.d.mts +0 -1
- package/dist/types/utils/terminal-link.d.mts +0 -1
- package/dist/types/utils/tildify.d.mts +0 -1
- package/dist/types/utils/translations.d.mts +0 -1
- package/dist/types/utils/walk-nested-map.d.mts +0 -1
- package/dist/types/utils/yarn-paths.d.mts +0 -1
- package/dist/types/utils/yarn-version.d.mts +0 -1
- package/dist/types/yarn-cli.d.mts +0 -1
- package/dist/utils.js +519 -123
- package/dist/utils.js.map +1 -1
- package/external/@socketsecurity/registry/lib/packages.js +12 -9
- package/package.json +33 -10
- package/dist/tsconfig.dts.tsbuildinfo +0 -1
- package/dist/types/cli.d.mts.map +0 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
- package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
- package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
- package/dist/types/commands/fix/branch-cleanup.d.mts.map +0 -1
- package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/env-helpers.d.mts.map +0 -1
- package/dist/types/commands/fix/generated-socket-facts.d.mts.map +0 -1
- package/dist/types/commands/fix/git.d.mts.map +0 -1
- package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
- package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
- package/dist/types/commands/fix/types.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
- package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/login/apply-login.d.mts.map +0 -1
- package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
- package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
- package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-bin-detect.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-cleanup.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-cquery.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-java-shim.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-output-base-check.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-process.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-pypi-discovery.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-pypi-parser.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-python-shim.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-query-runner.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-repo-discovery.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-socket-json-trust.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-workspace-detect.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/bazel-workspace-walk.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/bazel/extract_bazel_to_pypi.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-dotnet.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-dynamic-sbom-inference.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-dotnet-to-facts.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-maven-to-facts.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
- package/dist/types/commands/manifest/discover-manifest-roots.d.mts.map +0 -1
- package/dist/types/commands/manifest/enumerate-workspaces.d.mts.map +0 -1
- package/dist/types/commands/manifest/expand-env-var-refs.d.mts.map +0 -1
- package/dist/types/commands/manifest/generate-recursive-manifests.d.mts.map +0 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-dynamic-sbom-inference.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/manifest-flags.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-manifest-dynamic-sbom-inference.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/parse-build-tool-opts.d.mts.map +0 -1
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/run-manifest-facts.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/assemble.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/build-tool.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/exclude-paths-glob.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/facts.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/records.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-ivy.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-nuget.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/resolution-report.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/run.d.mts.map +0 -1
- package/dist/types/commands/manifest/scripts/sidecar.d.mts.map +0 -1
- package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
- package/dist/types/commands/manifest/setup-recursive-manifest-config.d.mts.map +0 -1
- package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
- package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
- package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
- package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
- package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
- package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
- package/dist/types/commands/optimize/shared.d.mts.map +0 -1
- package/dist/types/commands/optimize/types.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
- package/dist/types/commands/patch/cmd-patch.d.mts.map +0 -1
- package/dist/types/commands/pnpm/cmd-pnpm.d.mts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/types.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
- package/dist/types/commands/scan/exclude-paths.d.mts.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
- package/dist/types/commands/scan/generate-uv-member-sboms.d.mts.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +0 -1
- package/dist/types/commands/scan/reach-advisories.d.mts.map +0 -1
- package/dist/types/commands/scan/reachability-flags.d.mts.map +0 -1
- package/dist/types/commands/scan/reachability-units.d.mts.map +0 -1
- package/dist/types/commands/scan/run-dynamic-sbom-inference.d.mts.map +0 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
- package/dist/types/commands/scan/types.d.mts.map +0 -1
- package/dist/types/commands/scan/validate-reachability-target.d.mts.map +0 -1
- package/dist/types/commands/scan/warn-socket-json-only-flags.d.mts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/yarn/cmd-yarn.d.mts.map +0 -1
- package/dist/types/commands.d.mts.map +0 -1
- package/dist/types/constants.d.mts.map +0 -1
- package/dist/types/flags.d.mts.map +0 -1
- package/dist/types/instrument-with-sentry.d.mts.map +0 -1
- package/dist/types/npm-cli.d.mts.map +0 -1
- package/dist/types/npx-cli.d.mts.map +0 -1
- package/dist/types/pnpm-cli.d.mts.map +0 -1
- package/dist/types/sea/bootstrap.d.mts.map +0 -1
- package/dist/types/sea/build-sea.d.mts.map +0 -1
- package/dist/types/shadow/common.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
- package/dist/types/shadow/npm/bin.d.mts.map +0 -1
- package/dist/types/shadow/npm/inject.d.mts.map +0 -1
- package/dist/types/shadow/npm/install.d.mts.map +0 -1
- package/dist/types/shadow/npm/paths.d.mts.map +0 -1
- package/dist/types/shadow/npm-base.d.mts.map +0 -1
- package/dist/types/shadow/npx/bin.d.mts.map +0 -1
- package/dist/types/shadow/pnpm/bin.d.mts.map +0 -1
- package/dist/types/shadow/stdio-ipc.d.mts.map +0 -1
- package/dist/types/shadow/yarn/bin.d.mts.map +0 -1
- package/dist/types/test/json-output-validation.d.mts.map +0 -1
- package/dist/types/test/mocks/socket-auth.d.mts.map +0 -1
- package/dist/types/types.d.mts.map +0 -1
- package/dist/types/utils/advisory-ids.d.mts.map +0 -1
- package/dist/types/utils/agent.d.mts.map +0 -1
- package/dist/types/utils/alert/artifact.d.mts.map +0 -1
- package/dist/types/utils/alert/fix.d.mts.map +0 -1
- package/dist/types/utils/alert/severity.d.mts.map +0 -1
- package/dist/types/utils/alerts-map.d.mts.map +0 -1
- package/dist/types/utils/api-transport.d.mts.map +0 -1
- package/dist/types/utils/api.d.mts.map +0 -1
- package/dist/types/utils/check-input.d.mts.map +0 -1
- package/dist/types/utils/cmd.d.mts.map +0 -1
- package/dist/types/utils/coana-release.d.mts.map +0 -1
- package/dist/types/utils/coana.d.mts.map +0 -1
- package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
- package/dist/types/utils/completion.d.mts.map +0 -1
- package/dist/types/utils/config.d.mts.map +0 -1
- package/dist/types/utils/cve-to-ghsa.d.mts.map +0 -1
- package/dist/types/utils/debug.d.mts.map +0 -1
- 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.map +0 -1
- package/dist/types/utils/dlx.d.mts.map +0 -1
- package/dist/types/utils/ecosystem.d.mts.map +0 -1
- package/dist/types/utils/editable-json.d.mts.map +0 -1
- package/dist/types/utils/errors.d.mts.map +0 -1
- package/dist/types/utils/extract-names.d.mts.map +0 -1
- package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
- package/dist/types/utils/filter-config.d.mts.map +0 -1
- package/dist/types/utils/fs.d.mts.map +0 -1
- package/dist/types/utils/get-or-insert.d.mts.map +0 -1
- package/dist/types/utils/get-output-kind.d.mts.map +0 -1
- package/dist/types/utils/git.d.mts.map +0 -1
- package/dist/types/utils/github-errors.d.mts.map +0 -1
- package/dist/types/utils/github.d.mts.map +0 -1
- package/dist/types/utils/glob.d.mts.map +0 -1
- package/dist/types/utils/lockfile.d.mts.map +0 -1
- package/dist/types/utils/map-to-object.d.mts.map +0 -1
- package/dist/types/utils/markdown.d.mts.map +0 -1
- package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
- package/dist/types/utils/ms-at-home.d.mts.map +0 -1
- package/dist/types/utils/npm-config.d.mts.map +0 -1
- package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
- package/dist/types/utils/npm-paths.d.mts.map +0 -1
- package/dist/types/utils/npm-spec.d.mts.map +0 -1
- package/dist/types/utils/oauth.d.mts.map +0 -1
- package/dist/types/utils/objects.d.mts.map +0 -1
- package/dist/types/utils/organization.d.mts.map +0 -1
- package/dist/types/utils/output-formatting.d.mts.map +0 -1
- package/dist/types/utils/package-environment.d.mts.map +0 -1
- package/dist/types/utils/package-manager.d.mts.map +0 -1
- package/dist/types/utils/path-resolve.d.mts.map +0 -1
- package/dist/types/utils/pnpm-paths.d.mts.map +0 -1
- package/dist/types/utils/pnpm.d.mts.map +0 -1
- package/dist/types/utils/purl-to-ghsa.d.mts.map +0 -1
- package/dist/types/utils/purl.d.mts.map +0 -1
- package/dist/types/utils/requirements.d.mts.map +0 -1
- package/dist/types/utils/sdk.d.mts.map +0 -1
- package/dist/types/utils/self-update.d.mts.map +0 -1
- package/dist/types/utils/semver.d.mts.map +0 -1
- package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
- package/dist/types/utils/shadow-links.d.mts.map +0 -1
- package/dist/types/utils/socket-json.d.mts.map +0 -1
- package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
- package/dist/types/utils/socket-url.d.mts.map +0 -1
- package/dist/types/utils/spec.d.mts.map +0 -1
- package/dist/types/utils/strings.d.mts.map +0 -1
- package/dist/types/utils/telemetry/integration.d.mts.map +0 -1
- package/dist/types/utils/telemetry/service.d.mts.map +0 -1
- package/dist/types/utils/telemetry/types.d.mts.map +0 -1
- package/dist/types/utils/terminal-link.d.mts.map +0 -1
- package/dist/types/utils/tildify.d.mts.map +0 -1
- package/dist/types/utils/translations.d.mts.map +0 -1
- package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
- package/dist/types/utils/yarn-paths.d.mts.map +0 -1
- package/dist/types/utils/yarn-version.d.mts.map +0 -1
- package/dist/types/yarn-cli.d.mts.map +0 -1
package/dist/utils.js
CHANGED
|
@@ -36,6 +36,7 @@ var promises = require('../external/@socketsecurity/registry/lib/promises');
|
|
|
36
36
|
var require$$13 = require('node:https');
|
|
37
37
|
var web = require('node:stream/web');
|
|
38
38
|
var require$$0$1 = require('node:url');
|
|
39
|
+
var node_worker_threads = require('node:worker_threads');
|
|
39
40
|
var globs = require('../external/@socketsecurity/registry/lib/globs');
|
|
40
41
|
var streams = require('../external/@socketsecurity/registry/lib/streams');
|
|
41
42
|
var require$$10 = require('node:util');
|
|
@@ -2796,12 +2797,17 @@ function getHttpsAgent() {
|
|
|
2796
2797
|
// SSL_CERT_FILE is configured) so requests do not inherit Node's global-agent
|
|
2797
2798
|
// keepAlive socket timeout.
|
|
2798
2799
|
|
|
2800
|
+
function resolveConfiguredSocketApiTimeout(timeout = constants.default.ENV.SOCKET_CLI_API_TIMEOUT) {
|
|
2801
|
+
return Number.isFinite(timeout) && timeout > 0 ? timeout : undefined;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2799
2804
|
// Internal httpsRequest-based fetch with redirect support.
|
|
2800
2805
|
function _httpsRequestFetch(url, init, agent, redirectCount) {
|
|
2801
2806
|
return new Promise((resolve, reject) => {
|
|
2802
2807
|
const headers = {
|
|
2803
2808
|
...init.headers
|
|
2804
2809
|
};
|
|
2810
|
+
let timedOutError;
|
|
2805
2811
|
// Set Content-Length for request bodies to avoid chunked transfer encoding.
|
|
2806
2812
|
if (init.body) {
|
|
2807
2813
|
headers['content-length'] = String(Buffer.byteLength(init.body));
|
|
@@ -2809,7 +2815,8 @@ function _httpsRequestFetch(url, init, agent, redirectCount) {
|
|
|
2809
2815
|
const req = require$$13.request(url, {
|
|
2810
2816
|
method: init.method || 'GET',
|
|
2811
2817
|
headers,
|
|
2812
|
-
agent
|
|
2818
|
+
agent,
|
|
2819
|
+
timeout: init.timeout
|
|
2813
2820
|
}, res => {
|
|
2814
2821
|
const {
|
|
2815
2822
|
statusCode
|
|
@@ -2846,7 +2853,8 @@ function _httpsRequestFetch(url, init, agent, redirectCount) {
|
|
|
2846
2853
|
headers: redirectHeaders
|
|
2847
2854
|
} : {
|
|
2848
2855
|
headers: redirectHeaders,
|
|
2849
|
-
method: 'GET'
|
|
2856
|
+
method: 'GET',
|
|
2857
|
+
timeout: init.timeout
|
|
2850
2858
|
}, agent, redirectCount + 1));
|
|
2851
2859
|
return;
|
|
2852
2860
|
}
|
|
@@ -2876,6 +2884,9 @@ function _httpsRequestFetch(url, init, agent, redirectCount) {
|
|
|
2876
2884
|
res.on('error', err => {
|
|
2877
2885
|
controller.error(err);
|
|
2878
2886
|
});
|
|
2887
|
+
res.on('aborted', () => {
|
|
2888
|
+
controller.error(timedOutError ?? new Error('Socket API response aborted'));
|
|
2889
|
+
});
|
|
2879
2890
|
},
|
|
2880
2891
|
cancel() {
|
|
2881
2892
|
res.destroy();
|
|
@@ -2887,6 +2898,14 @@ function _httpsRequestFetch(url, init, agent, redirectCount) {
|
|
|
2887
2898
|
headers: responseHeaders
|
|
2888
2899
|
}));
|
|
2889
2900
|
});
|
|
2901
|
+
if (init.timeout !== undefined) {
|
|
2902
|
+
req.on('timeout', () => {
|
|
2903
|
+
timedOutError = Object.assign(new Error(`Socket API request timed out after ${init.timeout} ms`), {
|
|
2904
|
+
code: 'ETIMEDOUT'
|
|
2905
|
+
});
|
|
2906
|
+
req.destroy(timedOutError);
|
|
2907
|
+
});
|
|
2908
|
+
}
|
|
2890
2909
|
if (init.body) {
|
|
2891
2910
|
req.write(init.body);
|
|
2892
2911
|
}
|
|
@@ -3113,8 +3132,10 @@ async function handleApiCall(value, options) {
|
|
|
3113
3132
|
async function queryApi(path, apiToken) {
|
|
3114
3133
|
const baseUrl = getDefaultApiBaseUrl();
|
|
3115
3134
|
const url = `${baseUrl}${baseUrl.endsWith('/') ? '' : '/'}${path}`;
|
|
3135
|
+
const timeout = resolveConfiguredSocketApiTimeout();
|
|
3116
3136
|
const result = await apiFetch(url, {
|
|
3117
3137
|
method: 'GET',
|
|
3138
|
+
timeout,
|
|
3118
3139
|
headers: {
|
|
3119
3140
|
Authorization: `Basic ${btoa(`${apiToken}:`)}`,
|
|
3120
3141
|
'User-Agent': getCliUserAgent()
|
|
@@ -3208,10 +3229,11 @@ async function queryApiSafeTextWithStatus(path, description, commandPath) {
|
|
|
3208
3229
|
} catch (e) {
|
|
3209
3230
|
debug$2.debugFn('error', 'Failed to read API response text');
|
|
3210
3231
|
debug$2.debugDir('error', e);
|
|
3232
|
+
const cause = isErrnoException(e) && e.code === 'ETIMEDOUT' ? `${getErrorCause(e)} (path: ${path})` : `Unexpected error reading response text (path: ${path})`;
|
|
3211
3233
|
return {
|
|
3212
3234
|
ok: false,
|
|
3213
3235
|
message: 'API request failed',
|
|
3214
|
-
cause
|
|
3236
|
+
cause
|
|
3215
3237
|
};
|
|
3216
3238
|
}
|
|
3217
3239
|
}
|
|
@@ -3289,8 +3311,10 @@ async function sendApiRequest(path, options) {
|
|
|
3289
3311
|
}
|
|
3290
3312
|
let result;
|
|
3291
3313
|
try {
|
|
3314
|
+
const timeout = resolveConfiguredSocketApiTimeout();
|
|
3292
3315
|
const fetchOptions = {
|
|
3293
3316
|
method,
|
|
3317
|
+
timeout,
|
|
3294
3318
|
headers: {
|
|
3295
3319
|
Authorization: `Basic ${btoa(`${apiToken}:`)}`,
|
|
3296
3320
|
'Content-Type': 'application/json',
|
|
@@ -3347,10 +3371,11 @@ async function sendApiRequest(path, options) {
|
|
|
3347
3371
|
} catch (e) {
|
|
3348
3372
|
debug$2.debugFn('error', 'Failed to parse API response JSON');
|
|
3349
3373
|
debug$2.debugDir('error', e);
|
|
3374
|
+
const cause = isErrnoException(e) && e.code === 'ETIMEDOUT' ? `${getErrorCause(e)} (path: ${path})` : `Unexpected error parsing response JSON (path: ${path})`;
|
|
3350
3375
|
return {
|
|
3351
3376
|
ok: false,
|
|
3352
3377
|
message: 'API request failed',
|
|
3353
|
-
cause
|
|
3378
|
+
cause
|
|
3354
3379
|
};
|
|
3355
3380
|
}
|
|
3356
3381
|
}
|
|
@@ -3572,17 +3597,10 @@ function socketDocsLink(docPath, text) {
|
|
|
3572
3597
|
*/
|
|
3573
3598
|
function socketPackageLink(ecosystem, packageName, version, text) {
|
|
3574
3599
|
let url;
|
|
3575
|
-
|
|
3576
|
-
// Check if version contains a path like 'files/1.0.0/CHANGELOG.md'.
|
|
3577
|
-
if (version.includes('/')) {
|
|
3578
|
-
url = `https://socket.dev/${ecosystem}/package/${packageName}/${version}`;
|
|
3579
|
-
} else {
|
|
3580
|
-
url = `https://socket.dev/${ecosystem}/package/${packageName}/overview/${version}`;
|
|
3581
|
-
}
|
|
3582
|
-
} else {
|
|
3600
|
+
{
|
|
3583
3601
|
url = `https://socket.dev/${ecosystem}/package/${packageName}`;
|
|
3584
3602
|
}
|
|
3585
|
-
return vendor.terminalLinkExports(text
|
|
3603
|
+
return vendor.terminalLinkExports(text, url);
|
|
3586
3604
|
}
|
|
3587
3605
|
|
|
3588
3606
|
/**
|
|
@@ -4224,7 +4242,7 @@ async function meowWithSubcommands(config, options) {
|
|
|
4224
4242
|
const showFullHelp = argv.includes(constants.FLAG_HELP_FULL);
|
|
4225
4243
|
if (showFullHelp) {
|
|
4226
4244
|
// Show full help with environment variables.
|
|
4227
|
-
lines.push('', 'Environment variables', ' SOCKET_CLI_API_TOKEN Set the Socket API token', ' SOCKET_CLI_CONFIG A JSON stringified Socket configuration object', ' SOCKET_CLI_GITHUB_API_URL Change the base URL for GitHub REST API calls', ' SOCKET_CLI_GIT_USER_EMAIL The git config `user.email` used by Socket CLI', ` ${vendor.yoctocolorsCjsExports.italic('Defaults:')} github-actions[bot]@users.noreply.github.com`, ' SOCKET_CLI_GIT_USER_NAME The git config `user.name` used by Socket CLI', ` ${vendor.yoctocolorsCjsExports.italic('Defaults:')} github-actions[bot]`, ` SOCKET_CLI_GITHUB_TOKEN A classic or fine-grained ${vendor.terminalLinkExports('GitHub personal access token', 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens')}`, ` ${vendor.yoctocolorsCjsExports.italic('Aliases:')} GITHUB_TOKEN`, ' SOCKET_CLI_NO_API_TOKEN Make the default API token `undefined`', ' SOCKET_CLI_NPM_PATH The absolute location of the npm directory', ' SOCKET_CLI_ORG_SLUG Specify the Socket organization slug', '', ' SOCKET_CLI_ACCEPT_RISKS Accept risks of a Socket wrapped npm/npx run', ' SOCKET_CLI_VIEW_ALL_RISKS View all risks of a Socket wrapped npm/npx run', '', 'Environment variables for development', ' SOCKET_CLI_API_BASE_URL Change the base URL for Socket API calls', ` ${vendor.yoctocolorsCjsExports.italic('Defaults:')} The "apiBaseUrl" value of socket/settings local app data`, ` if present, else ${constants.API_V0_URL}`, ' SOCKET_CLI_API_PROXY Set the proxy Socket API requests are routed through, e.g. if set to', ` ${vendor.terminalLinkExports('http://127.0.0.1:9090', 'https://docs.proxyman.io/troubleshooting/couldnt-see-any-requests-from-3rd-party-network-libraries')} then all request are passed through that proxy`, ` ${vendor.yoctocolorsCjsExports.italic('Aliases:')} HTTPS_PROXY, https_proxy, HTTP_PROXY, and http_proxy`, ' SOCKET_CLI_API_TIMEOUT Set the timeout in milliseconds for Socket API requests', ' SOCKET_CLI_DEBUG Enable debug logging in Socket CLI', ` DEBUG Enable debug logging based on the ${socketPackageLink('npm', 'debug', undefined, 'debug')} package`);
|
|
4245
|
+
lines.push('', 'Environment variables', ' SOCKET_CLI_API_TOKEN Set the Socket API token', ' SOCKET_CLI_CONFIG A JSON stringified Socket configuration object', ' SOCKET_CLI_GITHUB_API_URL Change the base URL for GitHub REST API calls', ' SOCKET_CLI_GIT_USER_EMAIL The git config `user.email` used by Socket CLI', ` ${vendor.yoctocolorsCjsExports.italic('Defaults:')} github-actions[bot]@users.noreply.github.com`, ' SOCKET_CLI_GIT_USER_NAME The git config `user.name` used by Socket CLI', ` ${vendor.yoctocolorsCjsExports.italic('Defaults:')} github-actions[bot]`, ` SOCKET_CLI_GITHUB_TOKEN A classic or fine-grained ${vendor.terminalLinkExports('GitHub personal access token', 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens')}`, ` ${vendor.yoctocolorsCjsExports.italic('Aliases:')} GITHUB_TOKEN`, ' SOCKET_CLI_NO_API_TOKEN Make the default API token `undefined`', ' SOCKET_CLI_NPM_PATH The absolute location of the npm directory', ' SOCKET_CLI_SOCKET_PATCH_PATH Executable socket-patch path for standalone builds', ' SOCKET_CLI_ORG_SLUG Specify the Socket organization slug', '', ' SOCKET_CLI_ACCEPT_RISKS Accept risks of a Socket wrapped npm/npx run', ' SOCKET_CLI_VIEW_ALL_RISKS View all risks of a Socket wrapped npm/npx run', '', 'Environment variables for development', ' SOCKET_CLI_API_BASE_URL Change the base URL for Socket API calls', ` ${vendor.yoctocolorsCjsExports.italic('Defaults:')} The "apiBaseUrl" value of socket/settings local app data`, ` if present, else ${constants.API_V0_URL}`, ' SOCKET_CLI_API_PROXY Set the proxy Socket API requests are routed through, e.g. if set to', ` ${vendor.terminalLinkExports('http://127.0.0.1:9090', 'https://docs.proxyman.io/troubleshooting/couldnt-see-any-requests-from-3rd-party-network-libraries')} then all request are passed through that proxy`, ` ${vendor.yoctocolorsCjsExports.italic('Aliases:')} HTTPS_PROXY, https_proxy, HTTP_PROXY, and http_proxy`, ' SOCKET_CLI_API_TIMEOUT Set the timeout in milliseconds for Socket API requests', ' SOCKET_CLI_DEBUG Enable debug logging in Socket CLI', ` DEBUG Enable debug logging based on the ${socketPackageLink('npm', 'debug', undefined, 'debug')} package`);
|
|
4228
4246
|
} else {
|
|
4229
4247
|
// Show condensed help with hint about --help-full.
|
|
4230
4248
|
lines.push('', 'Environment variables [more...]', ` Use ${vendor.yoctocolorsCjsExports.bold(constants.FLAG_HELP_FULL)} to view all environment variables`);
|
|
@@ -5244,6 +5262,18 @@ function ignoreFileLinesToGlobPatterns(lines, filepath, cwd) {
|
|
|
5244
5262
|
function ignoreFileToGlobPatterns(content, filepath, cwd) {
|
|
5245
5263
|
return ignoreFileLinesToGlobPatterns(content.split(/\r?\n/), filepath, cwd);
|
|
5246
5264
|
}
|
|
5265
|
+
function escapeMinimatchGroupStarts(pattern) {
|
|
5266
|
+
let escaped = '';
|
|
5267
|
+
let previousWasOddBackslash = false;
|
|
5268
|
+
for (const char of pattern) {
|
|
5269
|
+
if ((char === '{' || char === '(') && !previousWasOddBackslash) {
|
|
5270
|
+
escaped += '\\';
|
|
5271
|
+
}
|
|
5272
|
+
escaped += char;
|
|
5273
|
+
previousWasOddBackslash = char === '\\' ? !previousWasOddBackslash : false;
|
|
5274
|
+
}
|
|
5275
|
+
return escaped;
|
|
5276
|
+
}
|
|
5247
5277
|
|
|
5248
5278
|
// Based on `@eslint/compat` convertIgnorePatternToMinimatch.
|
|
5249
5279
|
// Apache v2.0 licensed
|
|
@@ -5267,7 +5297,7 @@ function ignorePatternToMinimatch(pattern) {
|
|
|
5267
5297
|
// For example, gitignore pattern `src/{a,b}.js` ignores file `src/{a,b}.js`.
|
|
5268
5298
|
// But, the same minimatch pattern `src/{a,b}.js` ignores files `src/a.js` and `src/b.js`.
|
|
5269
5299
|
// Minimatch pattern `src/\{a,b}.js` is equivalent to gitignore pattern `src/{a,b}.js`.
|
|
5270
|
-
const escapedPatternWithoutLeadingSlash = patternWithoutLeadingSlash
|
|
5300
|
+
const escapedPatternWithoutLeadingSlash = escapeMinimatchGroupStarts(patternWithoutLeadingSlash);
|
|
5271
5301
|
const matchInsideSuffix = patternToTest.endsWith('/**') ? '/*' : '';
|
|
5272
5302
|
return `${negatedPrefix}${matchEverywherePrefix}${escapedPatternWithoutLeadingSlash}${matchInsideSuffix}`;
|
|
5273
5303
|
}
|
|
@@ -5481,6 +5511,9 @@ async function globWithGitIgnore(patterns, options) {
|
|
|
5481
5511
|
// fast-glob, which does the whole match.
|
|
5482
5512
|
ignore: hasNegatedPattern ? [...globs.defaultIgnore, ...IGNORED_DIR_PATTERNS, ...venvGlobs, ...cliMinimatchIgnores] : [...ignores, ...cliMinimatchIgnores].map(stripTrailingSlash),
|
|
5483
5513
|
...additionalOptions,
|
|
5514
|
+
// fast-glob's uniqueness set retains every match before the streaming
|
|
5515
|
+
// filter runs. Filtered scans deduplicate only supported paths below.
|
|
5516
|
+
unique: filter ? false : additionalOptions.unique,
|
|
5484
5517
|
// Skip dirs the running user cannot read instead of aborting on the first
|
|
5485
5518
|
// `EACCES`. Pinned after `...additionalOptions` so a caller's options bag
|
|
5486
5519
|
// cannot flip it off; it is a safety invariant, not a tunable.
|
|
@@ -5530,7 +5563,7 @@ async function globWithGitIgnore(patterns, options) {
|
|
|
5530
5563
|
// optional caller filter drops non-matches before they accumulate. On the slow
|
|
5531
5564
|
// path each surviving entry is also re-checked against its gitignore ancestor
|
|
5532
5565
|
// chain, which carries the full negation support fast-glob lacks.
|
|
5533
|
-
const results =
|
|
5566
|
+
const results = new Set();
|
|
5534
5567
|
const stream = vendor.outExports.globStream(patterns, globOptions);
|
|
5535
5568
|
for await (const p of stream) {
|
|
5536
5569
|
if (matchersByDir) {
|
|
@@ -5544,9 +5577,9 @@ async function globWithGitIgnore(patterns, options) {
|
|
|
5544
5577
|
if (filter && !filter(p)) {
|
|
5545
5578
|
continue;
|
|
5546
5579
|
}
|
|
5547
|
-
results.
|
|
5580
|
+
results.add(p);
|
|
5548
5581
|
}
|
|
5549
|
-
return results;
|
|
5582
|
+
return [...results];
|
|
5550
5583
|
}
|
|
5551
5584
|
async function globWorkspace(agent, cwd = process.cwd()) {
|
|
5552
5585
|
const workspaceGlobs = await getWorkspaceGlobs(agent, cwd);
|
|
@@ -5816,6 +5849,311 @@ async function realpathOrResolved(target) {
|
|
|
5816
5849
|
}
|
|
5817
5850
|
}
|
|
5818
5851
|
|
|
5852
|
+
/**
|
|
5853
|
+
* SEA runtime adapters. Node 27 VFS Workers share the parent PID, so these are
|
|
5854
|
+
* for allowlisted JavaScript tools that are compatible with Worker threads;
|
|
5855
|
+
* native helpers use getBundledTool() and a real child process instead.
|
|
5856
|
+
*/
|
|
5857
|
+
|
|
5858
|
+
const sea = (() => {
|
|
5859
|
+
try {
|
|
5860
|
+
return require$$1.createRequire((typeof document === 'undefined' ? require$$0$1.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('utils.js', document.baseURI).href)))('node:sea');
|
|
5861
|
+
} catch {
|
|
5862
|
+
// The regular Socket CLI supports Node releases predating `node:sea`.
|
|
5863
|
+
return {};
|
|
5864
|
+
}
|
|
5865
|
+
})();
|
|
5866
|
+
const extractedToolDirectories = new Map();
|
|
5867
|
+
// These are the only JS entrypoints the Worker adapter may launch. The paths
|
|
5868
|
+
// are staged under the archive root by a later helper-payload build slice;
|
|
5869
|
+
// absent files remain unavailable and fail closed here.
|
|
5870
|
+
const embeddedJsToolEntrypoints = Object.freeze({
|
|
5871
|
+
cdxgen: 'tools/cdxgen/sea-worker.mjs',
|
|
5872
|
+
synp: 'tools/synp/bin/synp.js'
|
|
5873
|
+
});
|
|
5874
|
+
const embeddedNativeToolPaths = Object.freeze({
|
|
5875
|
+
uv: platform => `tools/uv/${platform === 'win32' ? 'uv.exe' : 'uv'}`
|
|
5876
|
+
});
|
|
5877
|
+
function getVfsRoot() {
|
|
5878
|
+
const root = globalThis.__socketSeaVfsRoot;
|
|
5879
|
+
if (!root) {
|
|
5880
|
+
throw new Error('The standalone Socket VFS root is not available');
|
|
5881
|
+
}
|
|
5882
|
+
return root;
|
|
5883
|
+
}
|
|
5884
|
+
function signalFromAbortReason(reason) {
|
|
5885
|
+
const code = reason !== null && typeof reason === 'object' ? reason.code : undefined;
|
|
5886
|
+
return typeof code === 'string' && ['SIGABRT', 'SIGALRM', 'SIGBUS', 'SIGCHLD', 'SIGCONT', 'SIGFPE', 'SIGHUP', 'SIGILL', 'SIGINT', 'SIGIO', 'SIGIOT', 'SIGKILL', 'SIGPIPE', 'SIGPOLL', 'SIGPROF', 'SIGPWR', 'SIGQUIT', 'SIGSEGV', 'SIGSTKFLT', 'SIGSTOP', 'SIGSYS', 'SIGTERM', 'SIGTRAP', 'SIGTSTP', 'SIGTTIN', 'SIGTTOU', 'SIGURG', 'SIGUSR1', 'SIGUSR2', 'SIGVTALRM', 'SIGWINCH', 'SIGXCPU', 'SIGXFSZ'].includes(code) ? code : null;
|
|
5887
|
+
}
|
|
5888
|
+
function isStandaloneSea() {
|
|
5889
|
+
return typeof sea.isSea === 'function' && sea.isSea();
|
|
5890
|
+
}
|
|
5891
|
+
function getEmbeddedAsset(id) {
|
|
5892
|
+
if (!isStandaloneSea()) {
|
|
5893
|
+
throw new Error(`Embedded asset '${id}' is available only in the standalone Socket build`);
|
|
5894
|
+
}
|
|
5895
|
+
const files = {
|
|
5896
|
+
'socket-patch': `resources/${process.platform === 'win32' ? 'socket-patch.exe' : 'socket-patch'}`,
|
|
5897
|
+
'socket-patch-sha256': 'resources/socket-patch.sha256'
|
|
5898
|
+
};
|
|
5899
|
+
const relative = files[id];
|
|
5900
|
+
const root = globalThis.__socketSeaVfsRoot;
|
|
5901
|
+
if (!relative || !root) {
|
|
5902
|
+
throw new Error(`Standalone Socket asset '${id}' is missing from this build`);
|
|
5903
|
+
}
|
|
5904
|
+
try {
|
|
5905
|
+
return u.readFileSync(path.join(root, relative));
|
|
5906
|
+
} catch {
|
|
5907
|
+
throw new Error(`Standalone Socket asset '${id}' is missing from this build`);
|
|
5908
|
+
}
|
|
5909
|
+
}
|
|
5910
|
+
|
|
5911
|
+
/** Fail closed unless the build manifest explicitly advertises this tool. */
|
|
5912
|
+
function assertEmbeddedToolAvailable(id, capability) {
|
|
5913
|
+
if (!isStandaloneSea()) {
|
|
5914
|
+
return;
|
|
5915
|
+
}
|
|
5916
|
+
const root = globalThis.__socketSeaVfsRoot;
|
|
5917
|
+
let capabilities;
|
|
5918
|
+
try {
|
|
5919
|
+
if (!root) {
|
|
5920
|
+
throw new Error('missing VFS root');
|
|
5921
|
+
}
|
|
5922
|
+
capabilities = JSON.parse(u.readFileSync(path.join(root, 'resources/capabilities.json'), 'utf8'));
|
|
5923
|
+
} catch {
|
|
5924
|
+
throw new Error(`Embedded ${id} is unavailable because tool capabilities are missing or invalid in this build.`);
|
|
5925
|
+
}
|
|
5926
|
+
if (capabilities === null || typeof capabilities !== 'object' || Array.isArray(capabilities) || !Array.isArray(capabilities.available) || !Array.isArray(capabilities.unavailable)) {
|
|
5927
|
+
throw new Error(`Embedded ${id} is unavailable because tool capabilities are missing or invalid in this build.`);
|
|
5928
|
+
}
|
|
5929
|
+
const manifest = capabilities;
|
|
5930
|
+
const required = capability ? [capability] : id === 'cdxgen' ? ['manifest-cdxgen-npm-lock-v3', 'manifest-cdxgen-yarn-classic'] : ['synp'];
|
|
5931
|
+
if (required.some(tool => manifest.available.includes(tool))) {
|
|
5932
|
+
return;
|
|
5933
|
+
}
|
|
5934
|
+
const unavailableIds = id === 'cdxgen' ? [...required, id] : [id];
|
|
5935
|
+
const reasons = manifest.unavailable.flatMap(entry => {
|
|
5936
|
+
if (entry === null || typeof entry !== 'object') {
|
|
5937
|
+
return [];
|
|
5938
|
+
}
|
|
5939
|
+
const {
|
|
5940
|
+
id: unavailableId,
|
|
5941
|
+
reason
|
|
5942
|
+
} = entry;
|
|
5943
|
+
return unavailableIds.includes(unavailableId) && typeof reason === 'string' ? [reason] : [];
|
|
5944
|
+
});
|
|
5945
|
+
const reason = reasons.length ? ` ${[...new Set(reasons)].join(' ')}` : '';
|
|
5946
|
+
throw new Error(`Embedded ${id} is unavailable in this standalone build.${reason}`);
|
|
5947
|
+
}
|
|
5948
|
+
async function getBundledTool(id) {
|
|
5949
|
+
if (id !== 'socket-patch' && id !== 'uv') {
|
|
5950
|
+
throw new Error(`Bundled tool '${id}' is not configured in this SEA foundation`);
|
|
5951
|
+
}
|
|
5952
|
+
if (!isStandaloneSea()) {
|
|
5953
|
+
throw new Error(`Bundled tool '${id}' is available only in the standalone Socket build`);
|
|
5954
|
+
}
|
|
5955
|
+
if (id === 'uv') {
|
|
5956
|
+
const relative = embeddedNativeToolPaths.uv(process.platform);
|
|
5957
|
+
const source = path.join(getVfsRoot(), relative);
|
|
5958
|
+
const binary = await u.promises.readFile(source);
|
|
5959
|
+
const expectedDigest = await u.promises.readFile(path.join(getVfsRoot(), 'tools/uv/uv.sha256'), 'utf8');
|
|
5960
|
+
const actualDigest = require$$0.createHash('sha256').update(binary).digest('hex');
|
|
5961
|
+
if (!/^[a-f0-9]{64}$/.test(expectedDigest.trim()) || actualDigest !== expectedDigest.trim()) {
|
|
5962
|
+
throw new Error('Embedded uv payload failed SHA-256 verification');
|
|
5963
|
+
}
|
|
5964
|
+
const directory = await u.promises.mkdtemp(path.join(os.tmpdir(), 'socket-cli-sea-'));
|
|
5965
|
+
const filename = path.join(directory, path.basename(relative));
|
|
5966
|
+
try {
|
|
5967
|
+
await u.promises.writeFile(filename, binary, {
|
|
5968
|
+
flag: 'wx',
|
|
5969
|
+
mode: 0o700
|
|
5970
|
+
});
|
|
5971
|
+
if (process.platform !== 'win32') {
|
|
5972
|
+
await u.promises.chmod(filename, 0o700);
|
|
5973
|
+
}
|
|
5974
|
+
extractedToolDirectories.set(filename, directory);
|
|
5975
|
+
return filename;
|
|
5976
|
+
} catch (error) {
|
|
5977
|
+
await u.promises.rm(directory, {
|
|
5978
|
+
recursive: true,
|
|
5979
|
+
force: true
|
|
5980
|
+
});
|
|
5981
|
+
throw error;
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5984
|
+
const binary = getEmbeddedAsset('socket-patch');
|
|
5985
|
+
const expectedDigest = getEmbeddedAsset('socket-patch-sha256').toString('utf8').trim();
|
|
5986
|
+
const actualDigest = require$$0.createHash('sha256').update(binary).digest('hex');
|
|
5987
|
+
if (!/^[a-f0-9]{64}$/.test(expectedDigest) || actualDigest !== expectedDigest) {
|
|
5988
|
+
throw new Error('Embedded socket-patch payload failed SHA-256 verification');
|
|
5989
|
+
}
|
|
5990
|
+
const directory = await u.promises.mkdtemp(path.join(os.tmpdir(), 'socket-cli-sea-'));
|
|
5991
|
+
const filename = path.join(directory, process.platform === 'win32' ? 'socket-patch.exe' : 'socket-patch');
|
|
5992
|
+
try {
|
|
5993
|
+
await u.promises.writeFile(filename, binary, {
|
|
5994
|
+
flag: 'wx',
|
|
5995
|
+
mode: 0o700
|
|
5996
|
+
});
|
|
5997
|
+
if (process.platform !== 'win32') {
|
|
5998
|
+
await u.promises.chmod(filename, 0o700);
|
|
5999
|
+
}
|
|
6000
|
+
extractedToolDirectories.set(filename, directory);
|
|
6001
|
+
return filename;
|
|
6002
|
+
} catch (error) {
|
|
6003
|
+
await u.promises.rm(directory, {
|
|
6004
|
+
recursive: true,
|
|
6005
|
+
force: true
|
|
6006
|
+
});
|
|
6007
|
+
throw error;
|
|
6008
|
+
}
|
|
6009
|
+
}
|
|
6010
|
+
async function cleanupBundledTool(filename) {
|
|
6011
|
+
const directory = extractedToolDirectories.get(filename);
|
|
6012
|
+
if (!directory) {
|
|
6013
|
+
return;
|
|
6014
|
+
}
|
|
6015
|
+
extractedToolDirectories.delete(filename);
|
|
6016
|
+
await u.promises.rm(directory, {
|
|
6017
|
+
recursive: true,
|
|
6018
|
+
force: true
|
|
6019
|
+
});
|
|
6020
|
+
}
|
|
6021
|
+
async function runEmbeddedJsTool(id, args, options = {}) {
|
|
6022
|
+
if (!isStandaloneSea()) {
|
|
6023
|
+
throw new Error(`Embedded JavaScript tool '${id}' is available only in the standalone Socket build`);
|
|
6024
|
+
}
|
|
6025
|
+
if (!Object.hasOwn(embeddedJsToolEntrypoints, id)) {
|
|
6026
|
+
throw new Error(`Embedded JavaScript tool '${id}' is not allowlisted`);
|
|
6027
|
+
}
|
|
6028
|
+
if (id === 'cdxgen' || id === 'synp') {
|
|
6029
|
+
assertEmbeddedToolAvailable(id);
|
|
6030
|
+
}
|
|
6031
|
+
if (options.signal?.aborted) {
|
|
6032
|
+
return {
|
|
6033
|
+
code: null,
|
|
6034
|
+
signal: signalFromAbortReason(options.signal.reason),
|
|
6035
|
+
cancelled: true
|
|
6036
|
+
};
|
|
6037
|
+
}
|
|
6038
|
+
|
|
6039
|
+
// Worker threads inherit cwd and Node does not support changing it per
|
|
6040
|
+
// Worker. Reject a different request rather than process.chdir() in the
|
|
6041
|
+
// shared parent process.
|
|
6042
|
+
const requestedCwd = options.cwd instanceof URL ? require$$0$1.fileURLToPath(options.cwd) : options.cwd;
|
|
6043
|
+
if (requestedCwd && path.resolve(requestedCwd) !== process.cwd()) {
|
|
6044
|
+
throw new Error(`Embedded JavaScript tool '${id}' cannot change cwd in a VFS Worker; ` + 'run Socket from the target project directory.');
|
|
6045
|
+
}
|
|
6046
|
+
const entrypoint = path.join(getVfsRoot(), embeddedJsToolEntrypoints[id]);
|
|
6047
|
+
if (!u.existsSync(entrypoint)) {
|
|
6048
|
+
throw new Error(`Embedded JavaScript tool '${id}' is unavailable because its VFS entrypoint is not bundled for this target.`);
|
|
6049
|
+
}
|
|
6050
|
+
const requestedStdio = options.stdio ?? 'inherit';
|
|
6051
|
+
if (requestedStdio !== 'inherit' && requestedStdio !== 'ignore' && requestedStdio !== 'pipe') {
|
|
6052
|
+
throw new Error(`Embedded JavaScript tool '${id}' supports only inherit, ignore, or pipe stdio in a VFS Worker.`);
|
|
6053
|
+
}
|
|
6054
|
+
const stdio = requestedStdio;
|
|
6055
|
+
const wantsStreams = stdio !== 'ignore';
|
|
6056
|
+
const pipeInput = options.stdin;
|
|
6057
|
+
const captureStdout = [];
|
|
6058
|
+
const captureStderr = [];
|
|
6059
|
+
const worker = new node_worker_threads.Worker(entrypoint, {
|
|
6060
|
+
argv: [...args],
|
|
6061
|
+
env: options.inheritEnv === false ? Object.fromEntries(Object.entries(options.env ?? {}).filter(entry => entry[1] !== undefined)) : {
|
|
6062
|
+
...process.env,
|
|
6063
|
+
...options.env
|
|
6064
|
+
},
|
|
6065
|
+
execArgv: [],
|
|
6066
|
+
workerData: {
|
|
6067
|
+
socketIpc: options.ipc
|
|
6068
|
+
},
|
|
6069
|
+
stdin: wantsStreams,
|
|
6070
|
+
// Always capture Worker stdio. In ignore mode we drain it below so it
|
|
6071
|
+
// cannot inherit the CLI's streams or stall on a full pipe.
|
|
6072
|
+
stdout: true,
|
|
6073
|
+
stderr: true
|
|
6074
|
+
});
|
|
6075
|
+
if (wantsStreams && worker.stdin) {
|
|
6076
|
+
if (pipeInput !== undefined) {
|
|
6077
|
+
const input = typeof pipeInput === 'string' || Buffer.isBuffer(pipeInput) ? require$$1$1.Readable.from([pipeInput]) : Symbol.asyncIterator in Object(pipeInput) ? require$$1$1.Readable.from(pipeInput) : pipeInput;
|
|
6078
|
+
input.pipe(worker.stdin);
|
|
6079
|
+
} else if (stdio === 'inherit') {
|
|
6080
|
+
process.stdin.pipe(worker.stdin);
|
|
6081
|
+
} else {
|
|
6082
|
+
worker.stdin.end();
|
|
6083
|
+
}
|
|
6084
|
+
}
|
|
6085
|
+
const outputTarget = kind => {
|
|
6086
|
+
const explicit = options[kind];
|
|
6087
|
+
if (explicit) {
|
|
6088
|
+
return explicit;
|
|
6089
|
+
}
|
|
6090
|
+
if (stdio === 'inherit') {
|
|
6091
|
+
return kind === 'stdout' ? process.stdout : process.stderr;
|
|
6092
|
+
}
|
|
6093
|
+
return undefined;
|
|
6094
|
+
};
|
|
6095
|
+
const stdoutTarget = outputTarget('stdout');
|
|
6096
|
+
const stderrTarget = outputTarget('stderr');
|
|
6097
|
+
if (!wantsStreams) {
|
|
6098
|
+
worker.stdout?.resume();
|
|
6099
|
+
worker.stderr?.resume();
|
|
6100
|
+
}
|
|
6101
|
+
if (wantsStreams && worker.stdout) {
|
|
6102
|
+
if (stdoutTarget) {
|
|
6103
|
+
worker.stdout.pipe(stdoutTarget, {
|
|
6104
|
+
end: false
|
|
6105
|
+
});
|
|
6106
|
+
} else if (stdio === 'pipe') {
|
|
6107
|
+
worker.stdout.on('data', chunk => captureStdout.push(Buffer.from(chunk)));
|
|
6108
|
+
}
|
|
6109
|
+
}
|
|
6110
|
+
if (wantsStreams && worker.stderr) {
|
|
6111
|
+
if (stderrTarget) {
|
|
6112
|
+
worker.stderr.pipe(stderrTarget, {
|
|
6113
|
+
end: false
|
|
6114
|
+
});
|
|
6115
|
+
} else if (stdio === 'pipe') {
|
|
6116
|
+
worker.stderr.on('data', chunk => captureStderr.push(Buffer.from(chunk)));
|
|
6117
|
+
}
|
|
6118
|
+
}
|
|
6119
|
+
let cancelled = false;
|
|
6120
|
+
const onAbort = () => {
|
|
6121
|
+
cancelled = true;
|
|
6122
|
+
void worker.terminate();
|
|
6123
|
+
};
|
|
6124
|
+
options.signal?.addEventListener('abort', onAbort, {
|
|
6125
|
+
once: true
|
|
6126
|
+
});
|
|
6127
|
+
try {
|
|
6128
|
+
const code = await new Promise((resolve, reject) => {
|
|
6129
|
+
worker.once('error', reject);
|
|
6130
|
+
worker.once('exit', resolve);
|
|
6131
|
+
});
|
|
6132
|
+
return {
|
|
6133
|
+
code: cancelled ? null : code,
|
|
6134
|
+
signal: cancelled ? signalFromAbortReason(options.signal?.reason) : null,
|
|
6135
|
+
...(cancelled ? {
|
|
6136
|
+
cancelled: true
|
|
6137
|
+
} : {}),
|
|
6138
|
+
...(stdio === 'pipe' ? {
|
|
6139
|
+
stdout: Buffer.concat(captureStdout).toString(),
|
|
6140
|
+
stderr: Buffer.concat(captureStderr).toString()
|
|
6141
|
+
} : {})
|
|
6142
|
+
};
|
|
6143
|
+
} finally {
|
|
6144
|
+
options.signal?.removeEventListener('abort', onAbort);
|
|
6145
|
+
if (stdio === 'inherit' && !pipeInput && worker.stdin) {
|
|
6146
|
+
process.stdin.unpipe(worker.stdin);
|
|
6147
|
+
}
|
|
6148
|
+
if (worker.stdout && stdoutTarget) {
|
|
6149
|
+
worker.stdout.unpipe(stdoutTarget);
|
|
6150
|
+
}
|
|
6151
|
+
if (worker.stderr && stderrTarget) {
|
|
6152
|
+
worker.stderr.unpipe(stderrTarget);
|
|
6153
|
+
}
|
|
6154
|
+
}
|
|
6155
|
+
}
|
|
6156
|
+
|
|
5819
6157
|
/**
|
|
5820
6158
|
* Coana CLI releases for Socket CLI.
|
|
5821
6159
|
* Runs the Coana CLI from the cache that Coana and the Socket CLIs share, and
|
|
@@ -5835,6 +6173,7 @@ const COANA_CACHE_SCRIPT = 'coana-cache.mjs';
|
|
|
5835
6173
|
const COMPONENT = 'cli';
|
|
5836
6174
|
const NOT_CACHED_EXIT_CODE = 4;
|
|
5837
6175
|
const SHA256_REGEXP = /^[0-9a-f]{64}$/;
|
|
6176
|
+
const TOKEN_VARIABLES = new Set([...constants.SOCKET_CLI_API_TOKEN_VARIABLES, 'SOCKET_CLI_CONFIG']);
|
|
5838
6177
|
function cacheResultToCResult(result) {
|
|
5839
6178
|
if (result.exitCode === 0) {
|
|
5840
6179
|
return {
|
|
@@ -5849,6 +6188,27 @@ function cacheResultToCResult(result) {
|
|
|
5849
6188
|
};
|
|
5850
6189
|
}
|
|
5851
6190
|
|
|
6191
|
+
/**
|
|
6192
|
+
* The user's `env` for Coana, without:
|
|
6193
|
+
* - the `npm_package_*` variables that npm, pnpm and yarn classic set for each
|
|
6194
|
+
* leaf of the cwd's package.json. Coana doesn't read them, and in a large
|
|
6195
|
+
* monorepo they can push argv and env past ARG_MAX, so that the spawn fails
|
|
6196
|
+
* with E2BIG.
|
|
6197
|
+
* - the variables socket-cli reads the API token from, and SOCKET_CLI_CONFIG,
|
|
6198
|
+
* which can carry one. Coana gets the token from socket-cli, and would pass
|
|
6199
|
+
* them on to the tools it runs.
|
|
6200
|
+
*
|
|
6201
|
+
* The registry's `spawn` spreads `process.env` under the env it is given, so
|
|
6202
|
+
* they are set to `undefined`, which Node drops.
|
|
6203
|
+
*/
|
|
6204
|
+
function coanaUserEnv(env) {
|
|
6205
|
+
const out = {};
|
|
6206
|
+
for (const key of Object.keys(env)) {
|
|
6207
|
+
out[key] = key.toLowerCase().startsWith('npm_package_') || TOKEN_VARIABLES.has(key.toUpperCase()) ? undefined : env[key];
|
|
6208
|
+
}
|
|
6209
|
+
return out;
|
|
6210
|
+
}
|
|
6211
|
+
|
|
5852
6212
|
/**
|
|
5853
6213
|
* Build a CResult error from a thrown spawn error, preserving exit code,
|
|
5854
6214
|
* signal, and stderr context.
|
|
@@ -6088,28 +6448,15 @@ async function runCoanaCache(args, env) {
|
|
|
6088
6448
|
}
|
|
6089
6449
|
}
|
|
6090
6450
|
|
|
6091
|
-
/**
|
|
6092
|
-
* `env` without the `npm_package_*` variables that npm, pnpm and yarn classic
|
|
6093
|
-
* set for each leaf of the cwd's package.json. Coana doesn't read them, and in
|
|
6094
|
-
* a large monorepo they can push argv and env past ARG_MAX, so that the spawn
|
|
6095
|
-
* fails with E2BIG.
|
|
6096
|
-
*
|
|
6097
|
-
* The registry's `spawn` spreads `process.env` under the env it is given, so
|
|
6098
|
-
* they are set to `undefined`, which Node drops.
|
|
6099
|
-
*/
|
|
6100
|
-
function withoutNpmPackageEnv(env) {
|
|
6101
|
-
const out = {};
|
|
6102
|
-
for (const key of Object.keys(env)) {
|
|
6103
|
-
out[key] = key.startsWith('npm_package_') ? undefined : env[key];
|
|
6104
|
-
}
|
|
6105
|
-
return out;
|
|
6106
|
-
}
|
|
6107
|
-
|
|
6108
6451
|
/**
|
|
6109
6452
|
* Run the Coana CLI, downloading it into the cache that Coana and the Socket
|
|
6110
6453
|
* CLIs share when the cache lacks the version. Returns a CResult with Coana's
|
|
6111
6454
|
* stdout.
|
|
6112
6455
|
*
|
|
6456
|
+
* Coana runs in the user's environment, less what coanaUserEnv leaves out, plus
|
|
6457
|
+
* the variables socket-cli sets for it. Coana passes its environment on to the
|
|
6458
|
+
* build tools it runs, after removing the variables it reads.
|
|
6459
|
+
*
|
|
6113
6460
|
* If SOCKET_CLI_COANA_LOCAL_PATH environment variable is set, uses the local
|
|
6114
6461
|
* Coana CLI at that path instead.
|
|
6115
6462
|
*/
|
|
@@ -6118,21 +6465,32 @@ async function spawnCoana(args, orgSlug, options) {
|
|
|
6118
6465
|
coanaVersion,
|
|
6119
6466
|
cwd,
|
|
6120
6467
|
env: spawnEnv,
|
|
6468
|
+
repoName,
|
|
6121
6469
|
spinner,
|
|
6122
6470
|
stdio = 'inherit'
|
|
6123
6471
|
} = {
|
|
6124
6472
|
__proto__: null,
|
|
6125
6473
|
...options
|
|
6126
6474
|
};
|
|
6127
|
-
const
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6475
|
+
const localPath = process.env['SOCKET_CLI_COANA_LOCAL_PATH'];
|
|
6476
|
+
const standaloneSea = isStandaloneSea();
|
|
6477
|
+
if (standaloneSea && !localPath) {
|
|
6478
|
+
return {
|
|
6479
|
+
ok: false,
|
|
6480
|
+
message: 'Coana is unavailable in the standalone Socket build',
|
|
6481
|
+
cause: 'Set SOCKET_CLI_COANA_LOCAL_PATH to a native Coana executable to run Coana from a standalone build.'
|
|
6482
|
+
};
|
|
6483
|
+
}
|
|
6484
|
+
if (standaloneSea && localPath && (localPath.endsWith('.js') || localPath.endsWith('.mjs'))) {
|
|
6485
|
+
return {
|
|
6486
|
+
ok: false,
|
|
6487
|
+
message: 'Cannot launch a JavaScript Coana CLI from the standalone Socket build',
|
|
6488
|
+
cause: 'SOCKET_CLI_COANA_LOCAL_PATH must name a native Coana executable; the standalone JavaScript Worker adapter is not configured.'
|
|
6489
|
+
};
|
|
6490
|
+
}
|
|
6491
|
+
let apiToken;
|
|
6134
6492
|
try {
|
|
6135
|
-
|
|
6493
|
+
apiToken = await resolveDefaultApiToken();
|
|
6136
6494
|
} catch (error) {
|
|
6137
6495
|
return {
|
|
6138
6496
|
ok: false,
|
|
@@ -6140,29 +6498,46 @@ async function spawnCoana(args, orgSlug, options) {
|
|
|
6140
6498
|
cause: error instanceof Error ? error.message : String(error)
|
|
6141
6499
|
};
|
|
6142
6500
|
}
|
|
6143
|
-
if (defaultApiToken) {
|
|
6144
|
-
mixinsEnv['SOCKET_CLI_API_TOKEN'] = defaultApiToken;
|
|
6145
|
-
}
|
|
6146
6501
|
const org = orgSlug ? {
|
|
6147
6502
|
ok: true,
|
|
6148
6503
|
data: orgSlug
|
|
6149
6504
|
} : await getDefaultOrgSlug();
|
|
6150
|
-
|
|
6151
|
-
|
|
6505
|
+
const socketCliVariables = {
|
|
6506
|
+
SOCKET_CALLER_USER_AGENT: getCliUserAgent(),
|
|
6507
|
+
SOCKET_CLI_API_BASE_URL: getDefaultApiBaseUrl$1(),
|
|
6508
|
+
SOCKET_CLI_API_PROXY: getDefaultProxyUrl(),
|
|
6509
|
+
SOCKET_CLI_API_TOKEN: apiToken,
|
|
6510
|
+
SOCKET_CLI_VERSION: constants.default.ENV.INLINED_SOCKET_CLI_VERSION,
|
|
6511
|
+
SOCKET_ORG_SLUG: org.ok ? org.data : undefined,
|
|
6512
|
+
// The default name would mix the cached configuration of unrelated
|
|
6513
|
+
// projects.
|
|
6514
|
+
SOCKET_REPO_NAME: repoName && repoName !== constants.default.SOCKET_DEFAULT_REPOSITORY ? repoName : undefined
|
|
6515
|
+
};
|
|
6516
|
+
const userEnv = coanaUserEnv(process.env);
|
|
6517
|
+
const env = {
|
|
6518
|
+
...userEnv
|
|
6519
|
+
};
|
|
6520
|
+
for (const {
|
|
6521
|
+
0: name,
|
|
6522
|
+
1: value
|
|
6523
|
+
} of Object.entries(socketCliVariables)) {
|
|
6524
|
+
// Unset ones leave the user's own, except SOCKET_CLI_API_TOKEN, which
|
|
6525
|
+
// coanaUserEnv removed: with no token from socket-cli, Coana gets none.
|
|
6526
|
+
if (value !== undefined) {
|
|
6527
|
+
env[name] = value;
|
|
6528
|
+
}
|
|
6152
6529
|
}
|
|
6153
|
-
const
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
}
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
});
|
|
6163
|
-
let scriptPath = process.env['SOCKET_CLI_COANA_LOCAL_PATH'];
|
|
6530
|
+
for (const {
|
|
6531
|
+
0: name,
|
|
6532
|
+
1: value
|
|
6533
|
+
} of Object.entries(coanaUserEnv(spawnEnv ?? {}))) {
|
|
6534
|
+
if (!TOKEN_VARIABLES.has(name.toUpperCase())) {
|
|
6535
|
+
env[name] = value;
|
|
6536
|
+
}
|
|
6537
|
+
}
|
|
6538
|
+
let scriptPath = localPath;
|
|
6164
6539
|
if (!scriptPath) {
|
|
6165
|
-
const coanaDirCResult = await getCoanaCliDir(coanaVersion || constants.COANA_CLI_VERSION, org,
|
|
6540
|
+
const coanaDirCResult = await getCoanaCliDir(coanaVersion || constants.COANA_CLI_VERSION, org, userEnv, spinner);
|
|
6166
6541
|
if (!coanaDirCResult.ok) {
|
|
6167
6542
|
return coanaDirCResult;
|
|
6168
6543
|
}
|
|
@@ -6174,7 +6549,7 @@ async function spawnCoana(args, orgSlug, options) {
|
|
|
6174
6549
|
try {
|
|
6175
6550
|
const spawnResult = await spawn.spawn(isBinary ? scriptPath : constants.default.execPath, isBinary ? args : [scriptPath, ...args], {
|
|
6176
6551
|
cwd,
|
|
6177
|
-
env
|
|
6552
|
+
env,
|
|
6178
6553
|
spinner,
|
|
6179
6554
|
stdio
|
|
6180
6555
|
});
|
|
@@ -6545,29 +6920,33 @@ function mergeManifestDefaults(base, override) {
|
|
|
6545
6920
|
};
|
|
6546
6921
|
}
|
|
6547
6922
|
|
|
6548
|
-
//
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6923
|
+
// Merges `defaults.manifest.*` of `chain`, the nearest winning field by field.
|
|
6924
|
+
function mergeSocketJsonChain(chain) {
|
|
6925
|
+
return chain.reduce((merged, {
|
|
6926
|
+
sockJson
|
|
6927
|
+
}) => mergeManifestDefaults(merged, sockJson), getDefaultSocketJson());
|
|
6928
|
+
}
|
|
6929
|
+
|
|
6930
|
+
// Every socket.json from the filesystem root down to `dir`, farthest first.
|
|
6931
|
+
function readSocketJsonChain(dir) {
|
|
6932
|
+
const chain = [];
|
|
6553
6933
|
let current = path.resolve(dir);
|
|
6554
|
-
|
|
6555
|
-
// increasing precedence and the nearest-to-dir file wins last.
|
|
6556
|
-
const ancestorsFarToNear = [];
|
|
6557
|
-
while (current !== boundary) {
|
|
6934
|
+
for (;;) {
|
|
6558
6935
|
if (u.existsSync(path.join(current, constants.SOCKET_JSON))) {
|
|
6559
6936
|
const jsonCResult = readSocketJsonSync(current, true);
|
|
6560
6937
|
if (jsonCResult.ok) {
|
|
6561
|
-
|
|
6938
|
+
chain.unshift({
|
|
6939
|
+
dir: current,
|
|
6940
|
+
sockJson: jsonCResult.data
|
|
6941
|
+
});
|
|
6562
6942
|
}
|
|
6563
6943
|
}
|
|
6564
6944
|
const parent = path.dirname(current);
|
|
6565
6945
|
if (parent === current) {
|
|
6566
|
-
|
|
6946
|
+
return chain;
|
|
6567
6947
|
}
|
|
6568
6948
|
current = parent;
|
|
6569
6949
|
}
|
|
6570
|
-
return ancestorsFarToNear.reduce(mergeManifestDefaults, rootSockJson);
|
|
6571
6950
|
}
|
|
6572
6951
|
function getDefaultSocketJson() {
|
|
6573
6952
|
return {
|
|
@@ -6756,7 +7135,7 @@ function findNpmDirPathSync(npmBinPath) {
|
|
|
6756
7135
|
*/
|
|
6757
7136
|
function normalizeScanInputPath(pathToNormalize, cwd) {
|
|
6758
7137
|
if (!path.isAbsolute(pathToNormalize)) {
|
|
6759
|
-
return pathToNormalize;
|
|
7138
|
+
return stripTrailingSlash(path$1.normalizePath(pathToNormalize));
|
|
6760
7139
|
}
|
|
6761
7140
|
const relativePath = path.relative(cwd, pathToNormalize);
|
|
6762
7141
|
const isInsideCwd = relativePath === '' || !relativePath.startsWith('..') && !path.isAbsolute(relativePath);
|
|
@@ -7563,6 +7942,12 @@ const {
|
|
|
7563
7942
|
* Automatically detects the appropriate package manager if not specified.
|
|
7564
7943
|
*/
|
|
7565
7944
|
async function spawnDlx(packageSpec, args, options, spawnExtra) {
|
|
7945
|
+
// Standalone builds must never turn a missing embedded helper into a
|
|
7946
|
+
// package-manager install. Keep this guard ahead of lockfile detection and
|
|
7947
|
+
// shadow-bin loading so every generic dlx caller fails closed consistently.
|
|
7948
|
+
if (isStandaloneSea()) {
|
|
7949
|
+
throw new Error(`Cannot run '${packageSpec.name}' from a standalone Socket CLI: this helper is not bundled for this target, and runtime package installation is disabled.`);
|
|
7950
|
+
}
|
|
7566
7951
|
const {
|
|
7567
7952
|
agent,
|
|
7568
7953
|
silent = false,
|
|
@@ -7909,71 +8294,47 @@ function shadowNpmInstall(options) {
|
|
|
7909
8294
|
return spawnPromise;
|
|
7910
8295
|
}
|
|
7911
8296
|
|
|
7912
|
-
/**
|
|
7913
|
-
* Package manager agent utilities for Socket CLI.
|
|
7914
|
-
* Manages package installation via different package managers.
|
|
7915
|
-
*
|
|
7916
|
-
* Key Functions:
|
|
7917
|
-
* - runAgentInstall: Execute package installation with detected agent
|
|
7918
|
-
*
|
|
7919
|
-
* Supported Agents:
|
|
7920
|
-
* - npm: Node Package Manager
|
|
7921
|
-
* - pnpm: Fast, disk space efficient package manager
|
|
7922
|
-
* - yarn: Alternative package manager
|
|
7923
|
-
*
|
|
7924
|
-
* Features:
|
|
7925
|
-
* - Automatic agent detection
|
|
7926
|
-
* - Shadow installation for security scanning
|
|
7927
|
-
* - Spinner support for progress indication
|
|
7928
|
-
*/
|
|
8297
|
+
/** Run detected package manager install commands with Socket's safe defaults. */
|
|
7929
8298
|
|
|
7930
|
-
|
|
8299
|
+
/** Run the detected package manager's install command with Socket's safe defaults. */
|
|
8300
|
+
function runAgentInstall(pkgEnvDetails, options = {}) {
|
|
7931
8301
|
const {
|
|
7932
8302
|
agent,
|
|
7933
8303
|
agentExecPath,
|
|
7934
8304
|
pkgPath
|
|
7935
8305
|
} = pkgEnvDetails;
|
|
8306
|
+
const {
|
|
8307
|
+
args = [],
|
|
8308
|
+
spinner,
|
|
8309
|
+
...spawnOptions
|
|
8310
|
+
} = options;
|
|
7936
8311
|
const isNpm = agent === constants.NPM;
|
|
7937
|
-
|
|
7938
|
-
// All package managers support the "install" command.
|
|
7939
|
-
if (isNpm) {
|
|
8312
|
+
if (isNpm && !isStandaloneSea()) {
|
|
7940
8313
|
return shadowNpmInstall({
|
|
7941
8314
|
agentExecPath,
|
|
7942
8315
|
cwd: pkgPath,
|
|
7943
|
-
|
|
8316
|
+
args,
|
|
8317
|
+
spinner,
|
|
8318
|
+
...spawnOptions
|
|
7944
8319
|
});
|
|
7945
8320
|
}
|
|
7946
|
-
const
|
|
7947
|
-
args = [],
|
|
7948
|
-
spinner,
|
|
7949
|
-
...spawnOpts
|
|
7950
|
-
} = {
|
|
7951
|
-
__proto__: null,
|
|
7952
|
-
...options
|
|
7953
|
-
};
|
|
8321
|
+
const isPnpm = agent === constants.PNPM;
|
|
7954
8322
|
const skipNodeHardenFlags = isPnpm && pkgEnvDetails.agentVersion.major < 11;
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
// Also add --config.confirmModulesPurge=false to avoid interactive prompts.
|
|
7958
|
-
const installArgs = isPnpm ? ['install', '--config.confirmModulesPurge=false', '--no-frozen-lockfile', ...args] : ['install', ...args];
|
|
8323
|
+
const installArgs = isNpm ? ['install', '--no-audit', '--no-fund', ...args] : isPnpm ? ['install', '--config.confirmModulesPurge=false', '--no-frozen-lockfile', ...args] : ['install', ...args];
|
|
8324
|
+
const nodeOptions = [process.env['NODE_OPTIONS'], ...(skipNodeHardenFlags ? [] : constants.default.nodeHardenFlags), ...constants.default.nodeNoWarningsFlags, '--disable-sigusr1'].filter(Boolean).join(' ');
|
|
7959
8325
|
return spawn.spawn(agentExecPath, installArgs, {
|
|
7960
8326
|
cwd: pkgPath,
|
|
7961
|
-
// On Windows, package managers are often .cmd files that require shell execution.
|
|
7962
|
-
// The spawn function from @socketsecurity/registry will handle this properly
|
|
7963
|
-
// when shell is true.
|
|
7964
8327
|
shell: constants.default.WIN32,
|
|
7965
8328
|
spinner,
|
|
7966
8329
|
stdio: 'inherit',
|
|
7967
|
-
...
|
|
8330
|
+
...spawnOptions,
|
|
7968
8331
|
env: {
|
|
7969
8332
|
...process.env,
|
|
7970
|
-
...constants.default.processEnv,
|
|
7971
|
-
// Set CI for pnpm to ensure non-interactive mode and consistent behavior.
|
|
7972
8333
|
...(isPnpm ? {
|
|
7973
8334
|
CI: '1'
|
|
7974
8335
|
} : {}),
|
|
7975
|
-
NODE_OPTIONS:
|
|
7976
|
-
...
|
|
8336
|
+
NODE_OPTIONS: nodeOptions,
|
|
8337
|
+
...spawnOptions.env
|
|
7977
8338
|
}
|
|
7978
8339
|
});
|
|
7979
8340
|
}
|
|
@@ -8034,7 +8395,19 @@ const readLockFileByAgent = (() => {
|
|
|
8034
8395
|
return undefined;
|
|
8035
8396
|
};
|
|
8036
8397
|
}
|
|
8037
|
-
const binaryReader = wrapReader(
|
|
8398
|
+
const binaryReader = wrapReader(async lockPath => {
|
|
8399
|
+
// registry 1.1.17 declares Buffer but decodes with `binary`, returning a
|
|
8400
|
+
// Latin-1 string at runtime. Restore the original byte buffer for Bun's
|
|
8401
|
+
// binary lockfile parser.
|
|
8402
|
+
const content = await fs.readFileBinary(lockPath);
|
|
8403
|
+
if (Buffer.isBuffer(content)) {
|
|
8404
|
+
return content;
|
|
8405
|
+
}
|
|
8406
|
+
if (typeof content === 'string') {
|
|
8407
|
+
return Buffer.from(content, 'latin1');
|
|
8408
|
+
}
|
|
8409
|
+
throw new TypeError('Expected binary lockfile content');
|
|
8410
|
+
});
|
|
8038
8411
|
const defaultReader = wrapReader(async lockPath => await fs.readFileUtf8(lockPath));
|
|
8039
8412
|
return new Map([[BUN, wrapReader(async (lockPath, agentExecPath, cwd = process.cwd()) => {
|
|
8040
8413
|
const ext = path.extname(lockPath);
|
|
@@ -8688,16 +9061,31 @@ fetchImpl = apiFetch) {
|
|
|
8688
9061
|
}
|
|
8689
9062
|
}
|
|
8690
9063
|
|
|
9064
|
+
/** Format a release notice for the current Socket distribution. */
|
|
9065
|
+
function formatUpdateNotice(current, latest) {
|
|
9066
|
+
return isStandaloneSea() ? `Socket ${current} → ${latest}. Run: socket update` : `Socket ${current} → ${latest}. Update with your favorite package manager.`;
|
|
9067
|
+
}
|
|
9068
|
+
|
|
8691
9069
|
// Check the public npm registry for a newer socket release.
|
|
8692
9070
|
async function runSelfUpdateCheck() {
|
|
9071
|
+
// Match the conventional opt-out used by update notifiers.
|
|
9072
|
+
if (process.env['NO_UPDATE_NOTIFIER']) {
|
|
9073
|
+
return;
|
|
9074
|
+
}
|
|
9075
|
+
|
|
9076
|
+
// A standalone executable cannot be updated through the npm package path.
|
|
9077
|
+
// Keep its startup independent from registry metadata and avoid suggesting
|
|
9078
|
+
// that an npm CLI update can replace this artifact.
|
|
9079
|
+
if (isStandaloneSea()) {
|
|
9080
|
+
return;
|
|
9081
|
+
}
|
|
8693
9082
|
await vendor.updater({
|
|
8694
9083
|
name: constants.default.SOCKET_CLI_BIN_NAME,
|
|
8695
9084
|
registryUrl: 'https://registry.npmjs.org/',
|
|
8696
|
-
ttl: 86_400_000 /* 24 hours in milliseconds */,
|
|
9085
|
+
ttl: process.env['SOCKET_CLI_FORCE_UPDATE_NOTIFIER'] === '1' ? 0 : 86_400_000 /* 24 hours in milliseconds */,
|
|
8697
9086
|
version: constants.default.ENV.INLINED_SOCKET_CLI_VERSION,
|
|
8698
|
-
logCallback: (
|
|
8699
|
-
logger.logger.log(
|
|
8700
|
-
logger.logger.log(`📝 ${socketPackageLink('npm', name, `files/${latest}/CHANGELOG.md`, 'View changelog')}`);
|
|
9087
|
+
logCallback: (_name, version, latest) => {
|
|
9088
|
+
logger.logger.log(formatUpdateNotice(version, latest));
|
|
8701
9089
|
}
|
|
8702
9090
|
});
|
|
8703
9091
|
}
|
|
@@ -9782,12 +10170,14 @@ exports.InputError = InputError;
|
|
|
9782
10170
|
exports.OAUTH_ISSUER = OAUTH_ISSUER;
|
|
9783
10171
|
exports.RangeStyles = RangeStyles;
|
|
9784
10172
|
exports.apiFetch = apiFetch;
|
|
10173
|
+
exports.assertEmbeddedToolAvailable = assertEmbeddedToolAvailable;
|
|
9785
10174
|
exports.beginOAuthLogin = beginOAuthLogin;
|
|
9786
10175
|
exports.cacheFetch = cacheFetch;
|
|
9787
10176
|
exports.camelToKebab = camelToKebab;
|
|
9788
10177
|
exports.captureException = captureException;
|
|
9789
10178
|
exports.checkCommandInput = checkCommandInput;
|
|
9790
10179
|
exports.classifyGitHubResponse = classifyGitHubResponse;
|
|
10180
|
+
exports.cleanupBundledTool = cleanupBundledTool;
|
|
9791
10181
|
exports.cmdFlagValueToArray = cmdFlagValueToArray;
|
|
9792
10182
|
exports.cmdFlagsToString = cmdFlagsToString;
|
|
9793
10183
|
exports.cmdPrefixMessage = cmdPrefixMessage;
|
|
@@ -9816,6 +10206,7 @@ exports.getAlertsMapFromPnpmLockfile = getAlertsMapFromPnpmLockfile;
|
|
|
9816
10206
|
exports.getAlertsMapFromPurls = getAlertsMapFromPurls;
|
|
9817
10207
|
exports.getBaseBranch = getBaseBranch;
|
|
9818
10208
|
exports.getBashrcDetails = getBashrcDetails;
|
|
10209
|
+
exports.getBundledTool = getBundledTool;
|
|
9819
10210
|
exports.getConfigValue = getConfigValue;
|
|
9820
10211
|
exports.getConfigValueOrUndef = getConfigValueOrUndef;
|
|
9821
10212
|
exports.getDefaultApiBaseUrl = getDefaultApiBaseUrl$1;
|
|
@@ -9839,6 +10230,7 @@ exports.getOrInsert = getOrInsert;
|
|
|
9839
10230
|
exports.getOrgSlugs = getOrgSlugs;
|
|
9840
10231
|
exports.getOutputKind = getOutputKind;
|
|
9841
10232
|
exports.getPackageFilesForScan = getPackageFilesForScan;
|
|
10233
|
+
exports.getPurlObject = getPurlObject;
|
|
9842
10234
|
exports.getReachabilityEcosystemChoices = getReachabilityEcosystemChoices;
|
|
9843
10235
|
exports.getRepoInfo = getRepoInfo;
|
|
9844
10236
|
exports.getRepoName = getRepoName;
|
|
@@ -9881,6 +10273,7 @@ exports.isReachabilityReportPath = isReachabilityReportPath;
|
|
|
9881
10273
|
exports.isReportSupportedFile = isReportSupportedFile;
|
|
9882
10274
|
exports.isSensitiveConfigKey = isSensitiveConfigKey;
|
|
9883
10275
|
exports.isSocketFactsFile = isSocketFactsFile;
|
|
10276
|
+
exports.isStandaloneSea = isStandaloneSea;
|
|
9884
10277
|
exports.isSupportedConfigKey = isSupportedConfigKey;
|
|
9885
10278
|
exports.isValidPackageManager = isValidPackageManager;
|
|
9886
10279
|
exports.isYarnBerry = isYarnBerry;
|
|
@@ -9894,7 +10287,9 @@ exports.mdTableOfPairs = mdTableOfPairs;
|
|
|
9894
10287
|
exports.mdTableStringNumber = mdTableStringNumber;
|
|
9895
10288
|
exports.meowOrExit = meowOrExit;
|
|
9896
10289
|
exports.meowWithSubcommands = meowWithSubcommands;
|
|
10290
|
+
exports.mergeSocketJsonChain = mergeSocketJsonChain;
|
|
9897
10291
|
exports.msAtHome = msAtHome;
|
|
10292
|
+
exports.normalizePurl = normalizePurl;
|
|
9898
10293
|
exports.parseEcosystemChoices = parseEcosystemChoices;
|
|
9899
10294
|
exports.parsePnpmLockfile = parsePnpmLockfile;
|
|
9900
10295
|
exports.parseReachEcosystems = parseReachEcosystems;
|
|
@@ -9904,12 +10299,13 @@ exports.queryApiSafeTextWithStatus = queryApiSafeTextWithStatus;
|
|
|
9904
10299
|
exports.readOrDefaultSocketJson = readOrDefaultSocketJson;
|
|
9905
10300
|
exports.readOrDefaultSocketJsonUp = readOrDefaultSocketJsonUp;
|
|
9906
10301
|
exports.readPnpmLockfile = readPnpmLockfile;
|
|
9907
|
-
exports.
|
|
10302
|
+
exports.readSocketJsonChain = readSocketJsonChain;
|
|
9908
10303
|
exports.readSocketJsonSync = readSocketJsonSync;
|
|
9909
10304
|
exports.realpathOrResolved = realpathOrResolved;
|
|
9910
10305
|
exports.resolveAdvisoryIds = resolveAdvisoryIds;
|
|
9911
10306
|
exports.resolvePublicApiToken = resolvePublicApiToken;
|
|
9912
10307
|
exports.runAgentInstall = runAgentInstall;
|
|
10308
|
+
exports.runEmbeddedJsTool = runEmbeddedJsTool;
|
|
9913
10309
|
exports.runSelfUpdateCheck = runSelfUpdateCheck;
|
|
9914
10310
|
exports.safeNpa = safeNpa$1;
|
|
9915
10311
|
exports.safeNpmSpecToPurl = safeNpmSpecToPurl;
|
|
@@ -9941,5 +10337,5 @@ exports.walkNestedMap = walkNestedMap;
|
|
|
9941
10337
|
exports.webLink = webLink;
|
|
9942
10338
|
exports.withTmpDir = withTmpDir;
|
|
9943
10339
|
exports.writeSocketJson = writeSocketJson;
|
|
9944
|
-
//# debugId=
|
|
10340
|
+
//# debugId=8c48c9c6-4344-4a65-8946-4ad5502411e9
|
|
9945
10341
|
//# sourceMappingURL=utils.js.map
|