@socketsecurity/cli-with-sentry 1.0.85 → 1.0.86
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/README.md +41 -52
- package/dist/cli.js +322 -326
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +20 -48
- package/dist/constants.js.map +1 -1
- package/dist/flags.js +5 -4
- package/dist/flags.js.map +1 -1
- package/dist/socket-completion.bash +0 -2
- package/dist/utils.js +73 -93
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +381 -381
- package/external/@coana-tech/cli/cli.mjs +25295 -30074
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +39 -1
- package/external/@socketsecurity/registry/external/browserslist.js +7 -1
- package/external/@socketsecurity/registry/external/libnpmpack.js +93488 -97365
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +4689 -7729
- package/external/@socketsecurity/registry/external/pacote.js +51922 -72554
- package/external/@socketsecurity/registry/lib/constants/env.js +4 -4
- package/external/@socketsecurity/registry/lib/npm.js +2 -4
- package/external/@socketsecurity/registry/lib/path.js +17 -0
- package/package.json +12 -12
- package/dist/tsconfig.dts.tsbuildinfo +0 -1
- package/dist/types/cli.d.mts +0 -3
- package/dist/types/cli.d.mts.map +0 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -10
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/handle-analytics.d.mts +0 -9
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +0 -28
- package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -10
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -15
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -9
- package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -22
- package/dist/types/commands/audit-log/output-audit-log.d.mts.map +0 -1
- package/dist/types/commands/ci/cmd-ci.d.mts +0 -10
- package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -4
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
- package/dist/types/commands/ci/handle-ci.d.mts +0 -2
- package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-auto.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-get.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-list.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-set.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-unset.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config.d.mts +0 -3
- package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
- package/dist/types/commands/config/discover-config-value.d.mts +0 -3
- package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-auto.d.mts +0 -7
- package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-get.d.mts +0 -7
- package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-set.d.mts +0 -8
- package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-unset.d.mts +0 -7
- package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-auto.d.mts +0 -4
- package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-get.d.mts +0 -4
- package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-list.d.mts +0 -6
- package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-set.d.mts +0 -3
- package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-unset.d.mts +0 -3
- package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
- package/dist/types/commands/fix/agent-fix.d.mts +0 -42
- package/dist/types/commands/fix/agent-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +0 -10
- package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/coana-fix.d.mts +0 -6
- package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/fix-branch-helpers.d.mts +0 -4
- package/dist/types/commands/fix/fix-branch-helpers.d.mts.map +0 -1
- package/dist/types/commands/fix/fix-env-helpers.d.mts +0 -13
- package/dist/types/commands/fix/fix-env-helpers.d.mts.map +0 -1
- package/dist/types/commands/fix/get-actual-tree.d.mts +0 -3
- package/dist/types/commands/fix/get-actual-tree.d.mts.map +0 -1
- package/dist/types/commands/fix/handle-fix.d.mts +0 -11
- package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/npm-fix.d.mts +0 -7
- package/dist/types/commands/fix/npm-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/output-fix-result.d.mts +0 -3
- package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts +0 -7
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/pull-request.d.mts +0 -47
- package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
- package/dist/types/commands/fix/shared.d.mts +0 -8
- package/dist/types/commands/fix/shared.d.mts.map +0 -1
- package/dist/types/commands/fix/socket-git.d.mts +0 -32
- package/dist/types/commands/fix/socket-git.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +0 -10
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install.d.mts +0 -3
- package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
- package/dist/types/commands/install/handle-install-completion.d.mts +0 -2
- package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/output-install-completion.d.mts +0 -12
- package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/setup-tab-completion.d.mts +0 -13
- package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/json/cmd-json.d.mts +0 -10
- package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/handle-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/output-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/login/apply-login.d.mts +0 -2
- package/dist/types/commands/login/apply-login.d.mts.map +0 -1
- package/dist/types/commands/login/attempt-login.d.mts +0 -6
- package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
- package/dist/types/commands/login/cmd-login.d.mts +0 -10
- package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
- package/dist/types/commands/logout/apply-logout.d.mts +0 -2
- package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/attempt-logout.d.mts +0 -2
- package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/cmd-logout.d.mts +0 -10
- package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -8
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -7
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -8
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -13
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -9
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -9
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -2
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -3
- package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-requirements.d.mts +0 -6
- package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -2
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -3
- package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
- package/dist/types/commands/npm/cmd-npm.d.mts +0 -10
- package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
- package/dist/types/commands/npx/cmd-npx.d.mts +0 -10
- package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
- package/dist/types/commands/oops/cmd-oops.d.mts +0 -10
- package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
- package/dist/types/commands/optimize/add-overrides.d.mts +0 -20
- package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
- package/dist/types/commands/optimize/apply-optimization.d.mts +0 -14
- package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
- package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -10
- package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -5
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -3
- package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -42
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/handle-optimize.d.mts +0 -8
- package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -13
- package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -9
- package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
- package/dist/types/commands/optimize/shared.d.mts +0 -2
- package/dist/types/commands/optimize/shared.d.mts.map +0 -1
- package/dist/types/commands/optimize/types.d.mts +0 -9
- package/dist/types/commands/optimize/types.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-lockfile.d.mts +0 -11
- package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-dependencies.d.mts +0 -12
- package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -8
- package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-quota.d.mts +0 -8
- package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-dependencies.d.mts +0 -7
- package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-license-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-organization-list.d.mts +0 -3
- package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-quota.d.mts +0 -3
- package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-security-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-dependencies.d.mts +0 -8
- package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/output-license-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-organization-list.d.mts +0 -4
- package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/output-quota.d.mts +0 -4
- package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/output-security-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-score.d.mts +0 -10
- package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -17
- package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package.d.mts +0 -3
- package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -51
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -8
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -3
- package/dist/types/commands/package/handle-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -6
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -5
- package/dist/types/commands/package/output-purls-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -29
- package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -9
- package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -10
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -2
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -10
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -2
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository.d.mts +0 -3
- package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -10
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -15
- package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-create-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts +0 -11
- package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-update-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-view-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-create-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-delete-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-list-repos.d.mts +0 -4
- package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/output-update-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-view-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -12
- package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -20
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -18
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +0 -17
- package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -8
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan.d.mts +0 -4
- package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -8
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +0 -1
- package/dist/types/commands/scan/generate-report.d.mts +0 -43
- package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -12
- package/dist/types/commands/scan/handle-create-github-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -21
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -3
- package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -10
- package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts +0 -13
- package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-config.d.mts +0 -2
- package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -8
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-report.d.mts +0 -12
- package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -4
- package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-delete-scan.d.mts +0 -4
- package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +0 -4
- package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-github.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-report.d.mts +0 -20
- package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts +0 -3
- package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/stream-scan.d.mts +0 -7
- package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-repo-slug.d.mts +0 -9
- package/dist/types/commands/scan/suggest-repo-slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_target.d.mts +0 -2
- package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -10
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -4
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/types.d.mts +0 -15
- package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -9
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -3
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -2
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -2
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -10
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
- package/dist/types/constants.d.mts +0 -149
- package/dist/types/constants.d.mts.map +0 -1
- package/dist/types/flags.d.mts +0 -17
- package/dist/types/flags.d.mts.map +0 -1
- package/dist/types/instrument-with-sentry.d.mts +0 -2
- package/dist/types/instrument-with-sentry.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/index.d.mts +0 -8
- package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -35
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/types.d.mts +0 -123
- package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -39
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
- package/dist/types/shadow/npm/bin.d.mts +0 -2
- package/dist/types/shadow/npm/bin.d.mts.map +0 -1
- package/dist/types/shadow/npm/inject.d.mts +0 -2
- package/dist/types/shadow/npm/inject.d.mts.map +0 -1
- package/dist/types/shadow/npm/install.d.mts +0 -13
- package/dist/types/shadow/npm/install.d.mts.map +0 -1
- package/dist/types/shadow/npm/link.d.mts +0 -2
- package/dist/types/shadow/npm/link.d.mts.map +0 -1
- package/dist/types/shadow/npm/paths.d.mts +0 -7
- package/dist/types/shadow/npm/paths.d.mts.map +0 -1
- package/dist/types/types.d.mts +0 -29
- package/dist/types/types.d.mts.map +0 -1
- package/dist/types/utils/agent.d.mts +0 -12
- package/dist/types/utils/agent.d.mts.map +0 -1
- package/dist/types/utils/alert/artifact.d.mts +0 -35
- package/dist/types/utils/alert/artifact.d.mts.map +0 -1
- package/dist/types/utils/alert/fix.d.mts +0 -6
- package/dist/types/utils/alert/fix.d.mts.map +0 -1
- package/dist/types/utils/alert/severity.d.mts +0 -14
- package/dist/types/utils/alert/severity.d.mts.map +0 -1
- package/dist/types/utils/alerts-map.d.mts +0 -24
- package/dist/types/utils/alerts-map.d.mts.map +0 -1
- package/dist/types/utils/api.d.mts +0 -18
- package/dist/types/utils/api.d.mts.map +0 -1
- package/dist/types/utils/check-input.d.mts +0 -9
- package/dist/types/utils/check-input.d.mts.map +0 -1
- package/dist/types/utils/cmd.d.mts +0 -5
- package/dist/types/utils/cmd.d.mts.map +0 -1
- package/dist/types/utils/coana.d.mts +0 -4
- package/dist/types/utils/coana.d.mts.map +0 -1
- package/dist/types/utils/color-or-markdown.d.mts +0 -16
- package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
- package/dist/types/utils/completion.d.mts +0 -11
- package/dist/types/utils/completion.d.mts.map +0 -1
- package/dist/types/utils/config.d.mts +0 -32
- package/dist/types/utils/config.d.mts.map +0 -1
- package/dist/types/utils/determine-org-slug.d.mts +0 -2
- package/dist/types/utils/determine-org-slug.d.mts.map +0 -1
- package/dist/types/utils/errors.d.mts +0 -14
- package/dist/types/utils/errors.d.mts.map +0 -1
- package/dist/types/utils/fail-msg-with-badge.d.mts +0 -2
- package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
- package/dist/types/utils/fs.d.mts +0 -9
- package/dist/types/utils/fs.d.mts.map +0 -1
- package/dist/types/utils/get-output-kind.d.mts +0 -3
- package/dist/types/utils/get-output-kind.d.mts.map +0 -1
- package/dist/types/utils/git.d.mts +0 -29
- package/dist/types/utils/git.d.mts.map +0 -1
- package/dist/types/utils/glob.d.mts +0 -16
- package/dist/types/utils/glob.d.mts.map +0 -1
- package/dist/types/utils/lockfile.d.mts +0 -2
- package/dist/types/utils/lockfile.d.mts.map +0 -1
- package/dist/types/utils/map-to-object.d.mts +0 -10
- package/dist/types/utils/map-to-object.d.mts.map +0 -1
- package/dist/types/utils/markdown.d.mts +0 -10
- package/dist/types/utils/markdown.d.mts.map +0 -1
- package/dist/types/utils/meow-with-subcommands.d.mts +0 -47
- package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
- package/dist/types/utils/ms-at-home.d.mts +0 -2
- package/dist/types/utils/ms-at-home.d.mts.map +0 -1
- package/dist/types/utils/npm-config.d.mts +0 -14
- package/dist/types/utils/npm-config.d.mts.map +0 -1
- package/dist/types/utils/npm-package-arg.d.mts +0 -4
- package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
- package/dist/types/utils/npm-paths.d.mts +0 -7
- package/dist/types/utils/npm-paths.d.mts.map +0 -1
- package/dist/types/utils/objects.d.mts +0 -3
- package/dist/types/utils/objects.d.mts.map +0 -1
- package/dist/types/utils/output-formatting.d.mts +0 -16
- package/dist/types/utils/output-formatting.d.mts.map +0 -1
- package/dist/types/utils/package-environment.d.mts +0 -57
- package/dist/types/utils/package-environment.d.mts.map +0 -1
- package/dist/types/utils/path-resolve.d.mts +0 -14
- package/dist/types/utils/path-resolve.d.mts.map +0 -1
- package/dist/types/utils/pnpm.d.mts +0 -11
- package/dist/types/utils/pnpm.d.mts.map +0 -1
- package/dist/types/utils/purl.d.mts +0 -15
- package/dist/types/utils/purl.d.mts.map +0 -1
- package/dist/types/utils/sdk.d.mts +0 -13
- package/dist/types/utils/sdk.d.mts.map +0 -1
- package/dist/types/utils/semver.d.mts +0 -8
- package/dist/types/utils/semver.d.mts.map +0 -1
- package/dist/types/utils/serialize-result-json.d.mts +0 -5
- package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
- package/dist/types/utils/socket-package-alert.d.mts +0 -77
- package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
- package/dist/types/utils/socket-url.d.mts +0 -7
- package/dist/types/utils/socket-url.d.mts.map +0 -1
- package/dist/types/utils/socketjson.d.mts +0 -56
- package/dist/types/utils/socketjson.d.mts.map +0 -1
- package/dist/types/utils/spec.d.mts +0 -5
- package/dist/types/utils/spec.d.mts.map +0 -1
- package/dist/types/utils/strings.d.mts +0 -2
- package/dist/types/utils/strings.d.mts.map +0 -1
- package/dist/types/utils/tildify.d.mts +0 -4
- package/dist/types/utils/tildify.d.mts.map +0 -1
- package/dist/types/utils/translations.d.mts +0 -593
- package/dist/types/utils/translations.d.mts.map +0 -1
- package/dist/types/utils/walk-nested-map.d.mts +0 -7
- package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
package/dist/utils.js
CHANGED
|
@@ -815,6 +815,9 @@ function getOutputKind(json, markdown) {
|
|
|
815
815
|
return 'text';
|
|
816
816
|
}
|
|
817
817
|
|
|
818
|
+
function camelToKebab(string) {
|
|
819
|
+
return string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
820
|
+
}
|
|
818
821
|
function getFlagListOutput(list, options) {
|
|
819
822
|
const {
|
|
820
823
|
keyPrefix = '--'
|
|
@@ -833,7 +836,7 @@ function getHelpListOutput(list, options) {
|
|
|
833
836
|
const {
|
|
834
837
|
indent = 6,
|
|
835
838
|
keyPrefix = '',
|
|
836
|
-
padName =
|
|
839
|
+
padName = 20
|
|
837
840
|
} = {
|
|
838
841
|
__proto__: null,
|
|
839
842
|
...options
|
|
@@ -846,7 +849,8 @@ function getHelpListOutput(list, options) {
|
|
|
846
849
|
continue;
|
|
847
850
|
}
|
|
848
851
|
const description = (require$$7.isObject(entry) ? entry.description : entry) || '';
|
|
849
|
-
|
|
852
|
+
const printedName = keyPrefix + camelToKebab(name);
|
|
853
|
+
result += ''.padEnd(indent) + printedName.padEnd(Math.max(printedName.length + 2, padName)) + description + '\n';
|
|
850
854
|
}
|
|
851
855
|
return result.trim() || '(none)';
|
|
852
856
|
}
|
|
@@ -890,16 +894,16 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
890
894
|
// Try to support `socket <purl>` as a shorthand for `socket package score <purl>`
|
|
891
895
|
if (!isRootCommand) {
|
|
892
896
|
if (commandOrAliasName?.startsWith('pkg:')) {
|
|
893
|
-
logger.logger.info('
|
|
897
|
+
logger.logger.info('Invoking `socket package score`.');
|
|
894
898
|
return await meowWithSubcommands(subcommands, {
|
|
895
899
|
...options,
|
|
896
900
|
argv: ['package', 'deep', ...argv]
|
|
897
901
|
});
|
|
898
902
|
}
|
|
899
|
-
// Support `socket npm/
|
|
903
|
+
// Support `socket npm/lodash` or whatever as a shorthand, too.
|
|
900
904
|
// Accept any ecosystem and let the remote sort it out.
|
|
901
905
|
if (/^[a-z]+\//.test(commandOrAliasName || '')) {
|
|
902
|
-
logger.logger.info('
|
|
906
|
+
logger.logger.info('Invoking `socket package score`.');
|
|
903
907
|
return await meowWithSubcommands(subcommands, {
|
|
904
908
|
...options,
|
|
905
909
|
argv: ['package', 'deep', `pkg:${commandOrAliasName}`, ...rawCommandArgv]
|
|
@@ -908,28 +912,28 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
908
912
|
}
|
|
909
913
|
if (isRootCommand) {
|
|
910
914
|
flags$1['help'] = {
|
|
911
|
-
|
|
912
|
-
hidden: false
|
|
913
|
-
// Only show on root
|
|
914
|
-
description: 'Give you detailed help information about any sub-command'
|
|
915
|
+
...flags$1['help'],
|
|
916
|
+
hidden: false
|
|
915
917
|
};
|
|
916
918
|
flags$1['config'] = {
|
|
917
|
-
|
|
918
|
-
hidden: false
|
|
919
|
-
// Only show on root
|
|
920
|
-
description: 'Allows you to temp overrides the internal CLI config'
|
|
919
|
+
...flags$1['config'],
|
|
920
|
+
hidden: false
|
|
921
921
|
};
|
|
922
922
|
flags$1['dryRun'] = {
|
|
923
|
-
|
|
924
|
-
hidden: false
|
|
925
|
-
|
|
926
|
-
|
|
923
|
+
...flags$1['dryRun'],
|
|
924
|
+
hidden: false
|
|
925
|
+
};
|
|
926
|
+
flags$1['maxOldSpaceSize'] = {
|
|
927
|
+
...flags$1['maxOldSpaceSize'],
|
|
928
|
+
hidden: false
|
|
929
|
+
};
|
|
930
|
+
flags$1['maxSemiSpaceSize'] = {
|
|
931
|
+
...flags$1['maxSemiSpaceSize'],
|
|
932
|
+
hidden: false
|
|
927
933
|
};
|
|
928
934
|
flags$1['version'] = {
|
|
929
|
-
|
|
930
|
-
hidden: false
|
|
931
|
-
// Only show on root
|
|
932
|
-
description: 'Show version of CLI'
|
|
935
|
+
...flags$1['version'],
|
|
936
|
+
hidden: false
|
|
933
937
|
};
|
|
934
938
|
delete flags$1['json'];
|
|
935
939
|
delete flags$1['markdown'];
|
|
@@ -939,20 +943,19 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
939
943
|
}
|
|
940
944
|
|
|
941
945
|
// This is basically a dry-run parse of cli args and flags. We use this to
|
|
942
|
-
// determine config overrides and expected
|
|
943
|
-
const cli1 = vendor.meow(
|
|
946
|
+
// determine config overrides and expected o mode.
|
|
947
|
+
const cli1 = vendor.meow({
|
|
944
948
|
argv,
|
|
945
949
|
importMeta,
|
|
946
950
|
...additionalOptions,
|
|
947
951
|
flags: flags$1,
|
|
948
|
-
//
|
|
952
|
+
// Ensure we don't check unknown flags.
|
|
949
953
|
allowUnknownFlags: true,
|
|
950
|
-
|
|
951
|
-
// We want to detect whether a bool flag is given at all.
|
|
952
|
-
// We will emit help when we're ready
|
|
953
|
-
// Plus, if we allow this then meow() can just exit here.
|
|
954
|
+
// Prevent meow from potentially exiting early.
|
|
954
955
|
autoHelp: false,
|
|
955
|
-
autoVersion: false
|
|
956
|
+
autoVersion: false,
|
|
957
|
+
// We want to detect whether a bool flag is given at all.
|
|
958
|
+
booleanDefault: undefined
|
|
956
959
|
});
|
|
957
960
|
const orgFlag = String(cli1.flags['org'] || '') || undefined;
|
|
958
961
|
|
|
@@ -991,7 +994,7 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
991
994
|
return;
|
|
992
995
|
}
|
|
993
996
|
|
|
994
|
-
// If we got at least some args, then lets find
|
|
997
|
+
// If we got at least some args, then lets find o if we can find a command.
|
|
995
998
|
if (commandOrAliasName) {
|
|
996
999
|
const alias = aliases[commandOrAliasName];
|
|
997
1000
|
// First: Resolve argv data from alias if its an alias that's been given.
|
|
@@ -1005,7 +1008,7 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
1005
1008
|
});
|
|
1006
1009
|
}
|
|
1007
1010
|
}
|
|
1008
|
-
|
|
1011
|
+
const formatCommandsForHelp = isRootCommand => {
|
|
1009
1012
|
if (!isRootCommand) {
|
|
1010
1013
|
return getHelpListOutput({
|
|
1011
1014
|
...require$$7.toSortedObject(Object.fromEntries(Object.entries(subcommands).filter(({
|
|
@@ -1025,7 +1028,11 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
1025
1028
|
}
|
|
1026
1029
|
|
|
1027
1030
|
// "Bucket" some commands for easier usage.
|
|
1028
|
-
const commands = new Set(['analytics', 'audit-log', '
|
|
1031
|
+
const commands = new Set(['analytics', 'audit-log', 'ci', 'cdxgen', 'config', 'deps', 'fix', 'install',
|
|
1032
|
+
//'json',
|
|
1033
|
+
'license', 'login', 'logout', 'manifest', 'npm', 'npx', 'optimize', 'organization', 'package', 'raw-npm', 'raw-npx', 'repository', 'scan',
|
|
1034
|
+
//'security',
|
|
1035
|
+
'threat-feed', 'uninstall', 'wrapper']);
|
|
1029
1036
|
Object.entries(subcommands).filter(([_name, subcommand]) => !subcommand.hidden).map(([name]) => name).forEach(name => {
|
|
1030
1037
|
if (commands.has(name)) {
|
|
1031
1038
|
commands.delete(name);
|
|
@@ -1039,64 +1046,33 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
1039
1046
|
// test snapshots we use joinAnd.
|
|
1040
1047
|
arrays.joinAnd(Array.from(commands).sort(sorts.naturalCompare).map(c => `'${c}'`)));
|
|
1041
1048
|
}
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
out.push('');
|
|
1064
|
-
out.push(' fix Update dependencies with "fixable" Socket alerts');
|
|
1065
|
-
out.push(' manifest Generate a dependency manifest for certain languages');
|
|
1066
|
-
out.push(' npm npm wrapper functionality');
|
|
1067
|
-
out.push(' npx npx wrapper functionality');
|
|
1068
|
-
out.push(' optimize Optimize dependencies with @socketregistry overrides');
|
|
1069
|
-
out.push(' raw-npm Temporarily disable the Socket npm wrapper');
|
|
1070
|
-
out.push(' raw-npx Temporarily disable the Socket npx wrapper');
|
|
1071
|
-
out.push('');
|
|
1072
|
-
out.push(' CLI configuration');
|
|
1073
|
-
out.push('');
|
|
1074
|
-
out.push(' config Manage the CLI configuration directly');
|
|
1075
|
-
out.push(' install Manually install CLI tab completion on your system');
|
|
1076
|
-
out.push(' login Socket API login and CLI setup');
|
|
1077
|
-
out.push(' logout Socket API logout');
|
|
1078
|
-
out.push(' uninstall Remove the CLI tab completion from your system');
|
|
1079
|
-
out.push(' wrapper Enable or disable the Socket npm/npx wrapper');
|
|
1080
|
-
return out.join('\n');
|
|
1049
|
+
return ['(Note: All commands have their own --help)', '', ' Main commands', ``, ` socket login ${subcommands['login']?.description}`, ` socket scan create Create a new Socket scan and report`, ` socket npm/lodash@4.17.21 Request the Socket score of a package`, ` socket ci ${subcommands['ci']?.description}`, ``, ' Socket API', '', ` analytics ${subcommands['analytics']?.description}`, ` audit-log ${subcommands['audit-log']?.description}`, ` organization ${subcommands['organization']?.description}`, ` package ${subcommands['package']?.description}`, ` repository ${subcommands['repository']?.description}`, ` scan ${subcommands['scan']?.description}`, ` threat-feed ${subcommands['threat-feed']?.description}`, ``, ' Local tools', '', ` fix ${subcommands['fix']?.description}`, ` manifest ${subcommands['manifest']?.description}`, ` npm ${subcommands['npm']?.description}`, ` npx ${subcommands['npx']?.description}`, ` optimize ${subcommands['optimize']?.description}`, ` raw-npm ${subcommands['raw-npm']?.description}`, ` raw-npx ${subcommands['raw-npx']?.description}`, '', ' CLI configuration', '', ` config ${subcommands['config']?.description}`, ` install ${subcommands['install']?.description}`, ` login Socket API login and CLI setup`, ` logout ${subcommands['logout']?.description}`, ` uninstall ${subcommands['uninstall']?.description}`, ` wrapper ${subcommands['wrapper']?.description}`].join('\n');
|
|
1050
|
+
};
|
|
1051
|
+
const lines = ['', ' Usage', '', ` $ ${name} <command>`];
|
|
1052
|
+
if (isRootCommand) {
|
|
1053
|
+
lines.push(` $ ${name} scan create --json`, ` $ ${name} package score npm lodash --markdown`);
|
|
1054
|
+
}
|
|
1055
|
+
lines.push('');
|
|
1056
|
+
if (!isRootCommand) {
|
|
1057
|
+
lines.push(' Commands', '');
|
|
1058
|
+
}
|
|
1059
|
+
lines.push(` ${formatCommandsForHelp(isRootCommand)}`, '', ' Options');
|
|
1060
|
+
if (isRootCommand) {
|
|
1061
|
+
lines.push(' (Note: All commands have these flags even when not displayed in their help)', '');
|
|
1062
|
+
} else {
|
|
1063
|
+
lines.push('');
|
|
1064
|
+
}
|
|
1065
|
+
lines.push(` ${getFlagListOutput(flags$1, {
|
|
1066
|
+
padName: 28
|
|
1067
|
+
})}`);
|
|
1068
|
+
if (isRootCommand) {
|
|
1069
|
+
lines.push('', ' Environment variables', '', ' SOCKET_CLI_ACCEPT_RISKS Accept risks of a safe-npm or safe-npx run', ' SOCKET_CLI_API_TOKEN Set the Socket API token', ' SOCKET_CLI_CONFIG A JSON stringified Socket configuration object', ' 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_VIEW_ALL_RISKS View all risks of a safe-npm or safe-npx run', '', ' Environment variables for development', '', ' SOCKET_CLI_API_BASE_URL Change the base URL for all API-calls', ` ${vendor.yoctocolorsCjsExports.italic('Defaults:')} The "apiBaseUrl" value of socket/settings local app data`, ' if present, else https://api.socket.dev/v0/', ' SOCKET_CLI_API_PROXY Set the proxy all 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_DEBUG Enable debug logging in Socket CLI', ` DEBUG Enable debug logging based on the ${vendor.terminalLinkExports('debug', 'https://socket.dev/npm/package/debug')} package`);
|
|
1081
1070
|
}
|
|
1082
1071
|
|
|
1083
1072
|
// Parse it again. Config overrides should now be applied (may affect help).
|
|
1084
1073
|
// Note: this is displayed as help screen if the command does not override it
|
|
1085
1074
|
// (which is the case for most sub-commands with sub-commands)
|
|
1086
|
-
const cli2 = vendor.meow(
|
|
1087
|
-
Usage
|
|
1088
|
-
$ ${name} <command>
|
|
1089
|
-
${isRootCommand ? '' : '\n Commands'}
|
|
1090
|
-
${formatCommandsForHelp(isRootCommand)}
|
|
1091
|
-
|
|
1092
|
-
${isRootCommand ? ' Options' : ' Options'}${isRootCommand ? ' (Note: all CLI commands have these flags even when not displayed in their help)\n' : ''}
|
|
1093
|
-
${getFlagListOutput(flags$1, {
|
|
1094
|
-
padName: 25
|
|
1095
|
-
})}
|
|
1096
|
-
|
|
1097
|
-
Examples
|
|
1098
|
-
$ ${name} --help
|
|
1099
|
-
${isRootCommand ? ` $ ${name} scan create --json` : ''}${isRootCommand ? `\n $ ${name} package score npm left-pad --markdown` : ''}`, {
|
|
1075
|
+
const cli2 = vendor.meow({
|
|
1100
1076
|
argv,
|
|
1101
1077
|
importMeta,
|
|
1102
1078
|
...additionalOptions,
|
|
@@ -1104,11 +1080,12 @@ ${isRootCommand ? ` $ ${name} scan create --json` : ''}${isRootCommand ? `\
|
|
|
1104
1080
|
// Do not strictly check for flags here.
|
|
1105
1081
|
allowUnknownFlags: true,
|
|
1106
1082
|
// We will emit help when we're ready.
|
|
1107
|
-
// Plus, if we allow this then meow
|
|
1083
|
+
// Plus, if we allow this then meow may exit here.
|
|
1108
1084
|
autoHelp: false,
|
|
1109
1085
|
autoVersion: false,
|
|
1110
1086
|
// We want to detect whether a bool flag is given at all.
|
|
1111
|
-
booleanDefault: undefined
|
|
1087
|
+
booleanDefault: undefined,
|
|
1088
|
+
help: lines.join('\n')
|
|
1112
1089
|
});
|
|
1113
1090
|
|
|
1114
1091
|
// ...else we provide basic instructions and help.
|
|
@@ -1142,11 +1119,11 @@ function meowOrExit({
|
|
|
1142
1119
|
// This exits if .printHelp() is called either by meow itself or by us.
|
|
1143
1120
|
const cli = vendor.meow({
|
|
1144
1121
|
argv,
|
|
1122
|
+
// Prevent meow from potentially exiting early.
|
|
1145
1123
|
autoHelp: false,
|
|
1146
|
-
// meow will exit(0) before printing the banner.
|
|
1147
1124
|
autoVersion: false,
|
|
1148
|
-
booleanDefault: undefined,
|
|
1149
1125
|
// We want to detect whether a bool flag is given at all.
|
|
1126
|
+
booleanDefault: undefined,
|
|
1150
1127
|
collectUnknownFlags: true,
|
|
1151
1128
|
description: config.description,
|
|
1152
1129
|
flags: config.flags,
|
|
@@ -1167,6 +1144,7 @@ function meowOrExit({
|
|
|
1167
1144
|
// meow({
|
|
1168
1145
|
// argv,
|
|
1169
1146
|
// allowUnknownFlags: false,
|
|
1147
|
+
// // Prevent meow from potentially exiting early.
|
|
1170
1148
|
// autoHelp: false,
|
|
1171
1149
|
// autoVersion: false,
|
|
1172
1150
|
// description: config.description,
|
|
@@ -1198,6 +1176,7 @@ function meowOrExit({
|
|
|
1198
1176
|
// As per https://github.com/sindresorhus/meow/issues/178
|
|
1199
1177
|
// Setting `allowUnknownFlags: false` makes it reject camel cased flags.
|
|
1200
1178
|
allowUnknownFlags: Boolean(allowUnknownFlags),
|
|
1179
|
+
// Prevent meow from potentially exiting early.
|
|
1201
1180
|
autoHelp: false,
|
|
1202
1181
|
autoVersion: false,
|
|
1203
1182
|
description: config.description,
|
|
@@ -1246,7 +1225,8 @@ function getAsciiHeader(command, orgFlag) {
|
|
|
1246
1225
|
|__ | ${readOnlyConfig} | _| '_| -_| _| | Node: ${nodeVersion}, API token: ${shownToken}, ${orgPart}
|
|
1247
1226
|
|_____|___|___|_,_|___|_|.dev | Command: \`${command}\`, cwd: ${relCwd}
|
|
1248
1227
|
`.trim();
|
|
1249
|
-
|
|
1228
|
+
// Note: logger will auto-append a newline.
|
|
1229
|
+
return ` ${body}`;
|
|
1250
1230
|
}
|
|
1251
1231
|
|
|
1252
1232
|
function msAtHome(isoTimeStamp) {
|
|
@@ -1400,7 +1380,7 @@ async function determineOrgSlug(orgFlag, interactive, dryRun) {
|
|
|
1400
1380
|
async function getDefaultOrgSlug() {
|
|
1401
1381
|
const defaultOrgResult = getConfigValueOrUndef('defaultOrg');
|
|
1402
1382
|
if (defaultOrgResult) {
|
|
1403
|
-
require$$6.debugFn('notice', 'use: org from defaultOrg value of socket/settings local app data', defaultOrgResult);
|
|
1383
|
+
require$$6.debugFn('notice', 'use: org from "defaultOrg" value of socket/settings local app data', defaultOrgResult);
|
|
1404
1384
|
return {
|
|
1405
1385
|
ok: true,
|
|
1406
1386
|
data: defaultOrgResult
|
|
@@ -1439,7 +1419,7 @@ async function getDefaultOrgSlug() {
|
|
|
1439
1419
|
data: `Cannot determine the default organization for the API token. Unable to continue.`
|
|
1440
1420
|
};
|
|
1441
1421
|
}
|
|
1442
|
-
require$$6.debugFn('notice', 'resolve: org from API', slug);
|
|
1422
|
+
require$$6.debugFn('notice', 'resolve: org from Socket API', slug);
|
|
1443
1423
|
return {
|
|
1444
1424
|
ok: true,
|
|
1445
1425
|
message: 'Retrieved default org from server',
|
|
@@ -3876,5 +3856,5 @@ exports.tildify = tildify;
|
|
|
3876
3856
|
exports.updateConfigValue = updateConfigValue;
|
|
3877
3857
|
exports.walkNestedMap = walkNestedMap;
|
|
3878
3858
|
exports.writeSocketJson = writeSocketJson;
|
|
3879
|
-
//# debugId=
|
|
3859
|
+
//# debugId=ec2e8ef0-0177-431b-8e50-81dd3b03fdee
|
|
3880
3860
|
//# sourceMappingURL=utils.js.map
|