@socketsecurity/cli-with-sentry 1.0.85 → 1.0.87
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 +323 -327
- 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 +122 -119
- 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 +13 -13
- 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
|
|
@@ -842,11 +845,18 @@ function getHelpListOutput(list, options) {
|
|
|
842
845
|
const names = Object.keys(list).sort(sorts.naturalCompare);
|
|
843
846
|
for (const name of names) {
|
|
844
847
|
const entry = list[name];
|
|
845
|
-
|
|
848
|
+
const entryIsObj = require$$7.isObject(entry);
|
|
849
|
+
if (entryIsObj && 'hidden' in entry && entry?.hidden) {
|
|
846
850
|
continue;
|
|
847
851
|
}
|
|
848
|
-
const
|
|
849
|
-
|
|
852
|
+
const printedName = keyPrefix + camelToKebab(name);
|
|
853
|
+
const preDescription = `${''.padEnd(indent)}${printedName.padEnd(Math.max(printedName.length + 2, padName))}`;
|
|
854
|
+
result += preDescription;
|
|
855
|
+
const description = entryIsObj ? entry.description : String(entry);
|
|
856
|
+
if (description) {
|
|
857
|
+
result += strings.indentString(description, preDescription.length).trimStart();
|
|
858
|
+
}
|
|
859
|
+
result += '\n';
|
|
850
860
|
}
|
|
851
861
|
return result.trim() || '(none)';
|
|
852
862
|
}
|
|
@@ -857,6 +867,20 @@ function tildify(cwd) {
|
|
|
857
867
|
return cwd.replace(new RegExp(`^${regexps.escapeRegExp(constants.homePath)}(?:${path.sep}|$)`, 'i'), '~/');
|
|
858
868
|
}
|
|
859
869
|
|
|
870
|
+
// Property names are picked such that the name is at the top when the props
|
|
871
|
+
// get ordered by alphabet while flags is near the bottom and the help text
|
|
872
|
+
// at the bottom, because they tend ot occupy the most lines of code.
|
|
873
|
+
|
|
874
|
+
const HELP_INDENT = 2;
|
|
875
|
+
const HELP_PAD_NAME = 28;
|
|
876
|
+
function description(command) {
|
|
877
|
+
const description = command?.description;
|
|
878
|
+
const str = typeof description === 'string' ? description : String(description);
|
|
879
|
+
return strings.indentString(str, HELP_PAD_NAME).trimStart();
|
|
880
|
+
}
|
|
881
|
+
function trimNewlines(str) {
|
|
882
|
+
return str.replace(/^\n+|\n+$/g, '');
|
|
883
|
+
}
|
|
860
884
|
async function meowWithSubcommands(subcommands, options) {
|
|
861
885
|
const {
|
|
862
886
|
aliases = {},
|
|
@@ -890,16 +914,16 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
890
914
|
// Try to support `socket <purl>` as a shorthand for `socket package score <purl>`
|
|
891
915
|
if (!isRootCommand) {
|
|
892
916
|
if (commandOrAliasName?.startsWith('pkg:')) {
|
|
893
|
-
logger.logger.info('
|
|
917
|
+
logger.logger.info('Invoking `socket package score`.');
|
|
894
918
|
return await meowWithSubcommands(subcommands, {
|
|
895
919
|
...options,
|
|
896
920
|
argv: ['package', 'deep', ...argv]
|
|
897
921
|
});
|
|
898
922
|
}
|
|
899
|
-
// Support `socket npm/
|
|
923
|
+
// Support `socket npm/lodash` or whatever as a shorthand, too.
|
|
900
924
|
// Accept any ecosystem and let the remote sort it out.
|
|
901
925
|
if (/^[a-z]+\//.test(commandOrAliasName || '')) {
|
|
902
|
-
logger.logger.info('
|
|
926
|
+
logger.logger.info('Invoking `socket package score`.');
|
|
903
927
|
return await meowWithSubcommands(subcommands, {
|
|
904
928
|
...options,
|
|
905
929
|
argv: ['package', 'deep', `pkg:${commandOrAliasName}`, ...rawCommandArgv]
|
|
@@ -908,28 +932,28 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
908
932
|
}
|
|
909
933
|
if (isRootCommand) {
|
|
910
934
|
flags$1['help'] = {
|
|
911
|
-
|
|
912
|
-
hidden: false
|
|
913
|
-
// Only show on root
|
|
914
|
-
description: 'Give you detailed help information about any sub-command'
|
|
935
|
+
...flags$1['help'],
|
|
936
|
+
hidden: false
|
|
915
937
|
};
|
|
916
938
|
flags$1['config'] = {
|
|
917
|
-
|
|
918
|
-
hidden: false
|
|
919
|
-
// Only show on root
|
|
920
|
-
description: 'Allows you to temp overrides the internal CLI config'
|
|
939
|
+
...flags$1['config'],
|
|
940
|
+
hidden: false
|
|
921
941
|
};
|
|
922
942
|
flags$1['dryRun'] = {
|
|
923
|
-
|
|
924
|
-
hidden: false
|
|
925
|
-
|
|
926
|
-
|
|
943
|
+
...flags$1['dryRun'],
|
|
944
|
+
hidden: false
|
|
945
|
+
};
|
|
946
|
+
flags$1['maxOldSpaceSize'] = {
|
|
947
|
+
...flags$1['maxOldSpaceSize'],
|
|
948
|
+
hidden: false
|
|
949
|
+
};
|
|
950
|
+
flags$1['maxSemiSpaceSize'] = {
|
|
951
|
+
...flags$1['maxSemiSpaceSize'],
|
|
952
|
+
hidden: false
|
|
927
953
|
};
|
|
928
954
|
flags$1['version'] = {
|
|
929
|
-
|
|
930
|
-
hidden: false
|
|
931
|
-
// Only show on root
|
|
932
|
-
description: 'Show version of CLI'
|
|
955
|
+
...flags$1['version'],
|
|
956
|
+
hidden: false
|
|
933
957
|
};
|
|
934
958
|
delete flags$1['json'];
|
|
935
959
|
delete flags$1['markdown'];
|
|
@@ -939,20 +963,19 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
939
963
|
}
|
|
940
964
|
|
|
941
965
|
// 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(
|
|
966
|
+
// determine config overrides and expected o mode.
|
|
967
|
+
const cli1 = vendor.meow({
|
|
944
968
|
argv,
|
|
945
969
|
importMeta,
|
|
946
970
|
...additionalOptions,
|
|
947
971
|
flags: flags$1,
|
|
948
|
-
//
|
|
972
|
+
// Ensure we don't check unknown flags.
|
|
949
973
|
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.
|
|
974
|
+
// Prevent meow from potentially exiting early.
|
|
954
975
|
autoHelp: false,
|
|
955
|
-
autoVersion: false
|
|
976
|
+
autoVersion: false,
|
|
977
|
+
// We want to detect whether a bool flag is given at all.
|
|
978
|
+
booleanDefault: undefined
|
|
956
979
|
});
|
|
957
980
|
const orgFlag = String(cli1.flags['org'] || '') || undefined;
|
|
958
981
|
|
|
@@ -985,13 +1008,14 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
985
1008
|
}
|
|
986
1009
|
if (configOverrideResult?.ok === false) {
|
|
987
1010
|
emitBanner(name, orgFlag);
|
|
988
|
-
|
|
1011
|
+
// Add newline in stderr.
|
|
1012
|
+
logger.logger.error('');
|
|
989
1013
|
logger.logger.fail(configOverrideResult.message);
|
|
990
1014
|
process.exitCode = 2;
|
|
991
1015
|
return;
|
|
992
1016
|
}
|
|
993
1017
|
|
|
994
|
-
// If we got at least some args, then lets find
|
|
1018
|
+
// If we got at least some args, then lets find o if we can find a command.
|
|
995
1019
|
if (commandOrAliasName) {
|
|
996
1020
|
const alias = aliases[commandOrAliasName];
|
|
997
1021
|
// First: Resolve argv data from alias if its an alias that's been given.
|
|
@@ -1005,27 +1029,18 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
1005
1029
|
});
|
|
1006
1030
|
}
|
|
1007
1031
|
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
...require$$7.toSortedObject(Object.fromEntries(Object.entries(aliases).filter(({
|
|
1015
|
-
1: alias
|
|
1016
|
-
}) => {
|
|
1017
|
-
const {
|
|
1018
|
-
hidden
|
|
1019
|
-
} = alias;
|
|
1020
|
-
const cmdName = hidden ? '' : alias.argv[0];
|
|
1021
|
-
const subcommand = cmdName ? subcommands[cmdName] : undefined;
|
|
1022
|
-
return subcommand && !subcommand.hidden;
|
|
1023
|
-
})))
|
|
1024
|
-
});
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1032
|
+
const lines = ['', 'Usage', ` $ ${name} <command>`];
|
|
1033
|
+
if (isRootCommand) {
|
|
1034
|
+
lines.push(` $ ${name} scan create --json`, ` $ ${name} package score npm lodash --markdown`);
|
|
1035
|
+
}
|
|
1036
|
+
lines.push('');
|
|
1037
|
+
if (isRootCommand) {
|
|
1027
1038
|
// "Bucket" some commands for easier usage.
|
|
1028
|
-
const commands = new Set(['analytics', 'audit-log', '
|
|
1039
|
+
const commands = new Set(['analytics', 'audit-log', 'ci', 'cdxgen', 'config', 'deps', 'fix', 'install',
|
|
1040
|
+
//'json',
|
|
1041
|
+
'license', 'login', 'logout', 'manifest', 'npm', 'npx', 'optimize', 'organization', 'package', 'raw-npm', 'raw-npx', 'repository', 'scan',
|
|
1042
|
+
//'security',
|
|
1043
|
+
'threat-feed', 'uninstall', 'wrapper']);
|
|
1029
1044
|
Object.entries(subcommands).filter(([_name, subcommand]) => !subcommand.hidden).map(([name]) => name).forEach(name => {
|
|
1030
1045
|
if (commands.has(name)) {
|
|
1031
1046
|
commands.delete(name);
|
|
@@ -1039,64 +1054,46 @@ async function meowWithSubcommands(subcommands, options) {
|
|
|
1039
1054
|
// test snapshots we use joinAnd.
|
|
1040
1055
|
arrays.joinAnd(Array.from(commands).sort(sorts.naturalCompare).map(c => `'${c}'`)));
|
|
1041
1056
|
}
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
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');
|
|
1057
|
+
lines.push('Note: All commands have their own --help', '', 'Main commands', ` socket login ${description(subcommands['login'])}`, ` 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 ${description(subcommands['ci'])}`, ``, 'Socket API', ` analytics ${description(subcommands['analytics'])}`, ` audit-log ${description(subcommands['audit-log'])}`, ` organization ${description(subcommands['organization'])}`, ` package ${description(subcommands['package'])}`, ` repository ${description(subcommands['repository'])}`, ` scan ${description(subcommands['scan'])}`, ` threat-feed ${description(subcommands['threat-feed'])}`, ``, 'Local tools', ` fix ${description(subcommands['fix'])}`, ` manifest ${description(subcommands['manifest'])}`, ` npm ${description(subcommands['npm'])}`, ` npx ${description(subcommands['npx'])}`, ` optimize ${description(subcommands['optimize'])}`, ` raw-npm ${description(subcommands['raw-npm'])}`, ` raw-npx ${description(subcommands['raw-npx'])}`, '', 'CLI configuration', ` config ${description(subcommands['config'])}`, ` install ${description(subcommands['install'])}`, ` login Socket API login and CLI setup`, ` logout ${description(subcommands['logout'])}`, ` uninstall ${description(subcommands['uninstall'])}`, ` wrapper ${description(subcommands['wrapper'])}`);
|
|
1058
|
+
} else {
|
|
1059
|
+
lines.push('Commands');
|
|
1060
|
+
lines.push(` ${getHelpListOutput({
|
|
1061
|
+
...require$$7.toSortedObject(Object.fromEntries(Object.entries(subcommands).filter(({
|
|
1062
|
+
1: subcommand
|
|
1063
|
+
}) => !subcommand.hidden))),
|
|
1064
|
+
...require$$7.toSortedObject(Object.fromEntries(Object.entries(aliases).filter(({
|
|
1065
|
+
1: alias
|
|
1066
|
+
}) => {
|
|
1067
|
+
const {
|
|
1068
|
+
hidden
|
|
1069
|
+
} = alias;
|
|
1070
|
+
const cmdName = hidden ? '' : alias.argv[0];
|
|
1071
|
+
const subcommand = cmdName ? subcommands[cmdName] : undefined;
|
|
1072
|
+
return subcommand && !subcommand.hidden;
|
|
1073
|
+
})))
|
|
1074
|
+
}, {
|
|
1075
|
+
indent: HELP_INDENT,
|
|
1076
|
+
padName: HELP_PAD_NAME
|
|
1077
|
+
})}`);
|
|
1078
|
+
}
|
|
1079
|
+
lines.push('', 'Options');
|
|
1080
|
+
if (isRootCommand) {
|
|
1081
|
+
lines.push(' Note: All commands have these flags even when not displayed in their help', '');
|
|
1082
|
+
} else {
|
|
1083
|
+
lines.push('');
|
|
1084
|
+
}
|
|
1085
|
+
lines.push(` ${getFlagListOutput(flags$1, {
|
|
1086
|
+
indent: HELP_INDENT,
|
|
1087
|
+
padName: HELP_PAD_NAME
|
|
1088
|
+
})}`);
|
|
1089
|
+
if (isRootCommand) {
|
|
1090
|
+
lines.push('', 'Environment variables', ' 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_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 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
1091
|
}
|
|
1082
1092
|
|
|
1083
1093
|
// Parse it again. Config overrides should now be applied (may affect help).
|
|
1084
1094
|
// Note: this is displayed as help screen if the command does not override it
|
|
1085
1095
|
// (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` : ''}`, {
|
|
1096
|
+
const cli2 = vendor.meow({
|
|
1100
1097
|
argv,
|
|
1101
1098
|
importMeta,
|
|
1102
1099
|
...additionalOptions,
|
|
@@ -1104,11 +1101,12 @@ ${isRootCommand ? ` $ ${name} scan create --json` : ''}${isRootCommand ? `\
|
|
|
1104
1101
|
// Do not strictly check for flags here.
|
|
1105
1102
|
allowUnknownFlags: true,
|
|
1106
1103
|
// We will emit help when we're ready.
|
|
1107
|
-
// Plus, if we allow this then meow
|
|
1104
|
+
// Plus, if we allow this then meow may exit here.
|
|
1108
1105
|
autoHelp: false,
|
|
1109
1106
|
autoVersion: false,
|
|
1110
1107
|
// We want to detect whether a bool flag is given at all.
|
|
1111
|
-
booleanDefault: undefined
|
|
1108
|
+
booleanDefault: undefined,
|
|
1109
|
+
help: lines.map(l => strings.indentString(l, HELP_INDENT)).join('\n')
|
|
1112
1110
|
});
|
|
1113
1111
|
|
|
1114
1112
|
// ...else we provide basic instructions and help.
|
|
@@ -1142,20 +1140,21 @@ function meowOrExit({
|
|
|
1142
1140
|
// This exits if .printHelp() is called either by meow itself or by us.
|
|
1143
1141
|
const cli = vendor.meow({
|
|
1144
1142
|
argv,
|
|
1143
|
+
// Prevent meow from potentially exiting early.
|
|
1145
1144
|
autoHelp: false,
|
|
1146
|
-
// meow will exit(0) before printing the banner.
|
|
1147
1145
|
autoVersion: false,
|
|
1148
|
-
booleanDefault: undefined,
|
|
1149
1146
|
// We want to detect whether a bool flag is given at all.
|
|
1147
|
+
booleanDefault: undefined,
|
|
1150
1148
|
collectUnknownFlags: true,
|
|
1151
1149
|
description: config.description,
|
|
1152
1150
|
flags: config.flags,
|
|
1153
|
-
help: config.help(command, config),
|
|
1151
|
+
help: trimNewlines(config.help(command, config)),
|
|
1154
1152
|
importMeta
|
|
1155
1153
|
});
|
|
1156
1154
|
if (!cli.flags['nobanner']) {
|
|
1157
1155
|
emitBanner(command, String(cli.flags['org'] || '') || undefined);
|
|
1158
|
-
// Add
|
|
1156
|
+
// Add newline in stderr.
|
|
1157
|
+
// Meow help adds a newline too so we do it here.
|
|
1159
1158
|
logger.logger.error('');
|
|
1160
1159
|
}
|
|
1161
1160
|
|
|
@@ -1167,11 +1166,12 @@ function meowOrExit({
|
|
|
1167
1166
|
// meow({
|
|
1168
1167
|
// argv,
|
|
1169
1168
|
// allowUnknownFlags: false,
|
|
1169
|
+
// // Prevent meow from potentially exiting early.
|
|
1170
1170
|
// autoHelp: false,
|
|
1171
1171
|
// autoVersion: false,
|
|
1172
1172
|
// description: config.description,
|
|
1173
1173
|
// flags: config.flags,
|
|
1174
|
-
// help: config.help(command, config),
|
|
1174
|
+
// help: trimNewlines(config.help(command, config)),
|
|
1175
1175
|
// importMeta,
|
|
1176
1176
|
// })
|
|
1177
1177
|
// }
|
|
@@ -1198,10 +1198,11 @@ function meowOrExit({
|
|
|
1198
1198
|
// As per https://github.com/sindresorhus/meow/issues/178
|
|
1199
1199
|
// Setting `allowUnknownFlags: false` makes it reject camel cased flags.
|
|
1200
1200
|
allowUnknownFlags: Boolean(allowUnknownFlags),
|
|
1201
|
+
// Prevent meow from potentially exiting early.
|
|
1201
1202
|
autoHelp: false,
|
|
1202
1203
|
autoVersion: false,
|
|
1203
1204
|
description: config.description,
|
|
1204
|
-
help: config.help(command, config),
|
|
1205
|
+
help: trimNewlines(config.help(command, config)),
|
|
1205
1206
|
importMeta,
|
|
1206
1207
|
flags: config.flags
|
|
1207
1208
|
});
|
|
@@ -1246,7 +1247,8 @@ function getAsciiHeader(command, orgFlag) {
|
|
|
1246
1247
|
|__ | ${readOnlyConfig} | _| '_| -_| _| | Node: ${nodeVersion}, API token: ${shownToken}, ${orgPart}
|
|
1247
1248
|
|_____|___|___|_,_|___|_|.dev | Command: \`${command}\`, cwd: ${relCwd}
|
|
1248
1249
|
`.trim();
|
|
1249
|
-
|
|
1250
|
+
// Note: logger will auto-append a newline.
|
|
1251
|
+
return ` ${body}`;
|
|
1250
1252
|
}
|
|
1251
1253
|
|
|
1252
1254
|
function msAtHome(isoTimeStamp) {
|
|
@@ -1383,7 +1385,8 @@ async function determineOrgSlug(orgFlag, interactive, dryRun) {
|
|
|
1383
1385
|
// ask from server
|
|
1384
1386
|
logger.logger.warn('Unable to determine the target org. Trying to auto-discover it now...');
|
|
1385
1387
|
logger.logger.info('Note: you can run `socket login` to set a default org. You can also override it with the --org flag.');
|
|
1386
|
-
|
|
1388
|
+
// Add newline in stderr.
|
|
1389
|
+
logger.logger.error('');
|
|
1387
1390
|
if (dryRun) {
|
|
1388
1391
|
logger.logger.fail('Skipping auto-discovery of org in dry-run mode');
|
|
1389
1392
|
} else {
|
|
@@ -1400,7 +1403,7 @@ async function determineOrgSlug(orgFlag, interactive, dryRun) {
|
|
|
1400
1403
|
async function getDefaultOrgSlug() {
|
|
1401
1404
|
const defaultOrgResult = getConfigValueOrUndef('defaultOrg');
|
|
1402
1405
|
if (defaultOrgResult) {
|
|
1403
|
-
require$$6.debugFn('notice', 'use: org from defaultOrg value of socket/settings local app data', defaultOrgResult);
|
|
1406
|
+
require$$6.debugFn('notice', 'use: org from "defaultOrg" value of socket/settings local app data', defaultOrgResult);
|
|
1404
1407
|
return {
|
|
1405
1408
|
ok: true,
|
|
1406
1409
|
data: defaultOrgResult
|
|
@@ -1439,7 +1442,7 @@ async function getDefaultOrgSlug() {
|
|
|
1439
1442
|
data: `Cannot determine the default organization for the API token. Unable to continue.`
|
|
1440
1443
|
};
|
|
1441
1444
|
}
|
|
1442
|
-
require$$6.debugFn('notice', 'resolve: org from API', slug);
|
|
1445
|
+
require$$6.debugFn('notice', 'resolve: org from Socket API', slug);
|
|
1443
1446
|
return {
|
|
1444
1447
|
ok: true,
|
|
1445
1448
|
message: 'Retrieved default org from server',
|
|
@@ -3876,5 +3879,5 @@ exports.tildify = tildify;
|
|
|
3876
3879
|
exports.updateConfigValue = updateConfigValue;
|
|
3877
3880
|
exports.walkNestedMap = walkNestedMap;
|
|
3878
3881
|
exports.writeSocketJson = writeSocketJson;
|
|
3879
|
-
//# debugId=
|
|
3882
|
+
//# debugId=619636e9-83fa-428e-adf6-5923dee8d39b
|
|
3880
3883
|
//# sourceMappingURL=utils.js.map
|