@socketsecurity/cli-with-sentry 1.1.25 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -218
- package/README.md +41 -74
- package/dist/cli.js.bz +0 -0
- package/dist/cli.js.bz.sha256 +1 -0
- package/dist/index.js +2 -0
- package/package.json +31 -274
- package/bin/cli.js +0 -52
- package/bin/npm-cli.js +0 -29
- package/bin/npx-cli.js +0 -29
- package/bin/pnpm-cli.js +0 -29
- package/bin/yarn-cli.js +0 -29
- package/dist/cli.js +0 -14999
- package/dist/cli.js.map +0 -1
- package/dist/constants.js +0 -845
- package/dist/constants.js.map +0 -1
- package/dist/flags.js +0 -212
- package/dist/flags.js.map +0 -1
- package/dist/init.gradle +0 -250
- package/dist/instrument-with-sentry.js +0 -44
- package/dist/instrument-with-sentry.js.map +0 -1
- package/dist/npm-cli.js +0 -30
- package/dist/npm-cli.js.map +0 -1
- package/dist/npx-cli.js +0 -26
- package/dist/npx-cli.js.map +0 -1
- package/dist/pnpm-cli.js +0 -30
- package/dist/pnpm-cli.js.map +0 -1
- package/dist/shadow-npm-bin.js +0 -8
- package/dist/shadow-npm-bin.js.map +0 -1
- package/dist/shadow-npm-bin2.js +0 -102
- package/dist/shadow-npm-bin2.js.map +0 -1
- package/dist/shadow-npm-inject.js +0 -307
- package/dist/shadow-npm-inject.js.map +0 -1
- package/dist/shadow-npx-bin.js +0 -12
- package/dist/shadow-npx-bin.js.map +0 -1
- package/dist/shadow-pnpm-bin.js +0 -8
- package/dist/shadow-pnpm-bin.js.map +0 -1
- package/dist/shadow-pnpm-bin2.js +0 -300
- package/dist/shadow-pnpm-bin2.js.map +0 -1
- package/dist/shadow-yarn-bin.js +0 -96
- package/dist/shadow-yarn-bin.js.map +0 -1
- package/dist/tsconfig.dts.tsbuildinfo +0 -1
- package/dist/types/cli.d.mts +0 -3
- package/dist/types/cli.d.mts.map +0 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -10
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/handle-analytics.d.mts +0 -10
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +0 -29
- package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -10
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -15
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -9
- package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -22
- package/dist/types/commands/audit-log/output-audit-log.d.mts.map +0 -1
- package/dist/types/commands/ci/cmd-ci.d.mts +0 -9
- package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -4
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
- package/dist/types/commands/ci/handle-ci.d.mts +0 -2
- package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-auto.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-get.d.mts +0 -9
- package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-list.d.mts +0 -9
- package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-set.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-unset.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config.d.mts +0 -3
- package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
- package/dist/types/commands/config/discover-config-value.d.mts +0 -3
- package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-auto.d.mts +0 -7
- package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-get.d.mts +0 -7
- package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-set.d.mts +0 -8
- package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-unset.d.mts +0 -7
- package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-auto.d.mts +0 -4
- package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-get.d.mts +0 -4
- package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-list.d.mts +0 -6
- package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-set.d.mts +0 -3
- package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-unset.d.mts +0 -3
- package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +0 -10
- package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/coana-fix.d.mts +0 -6
- package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/env-helpers.d.mts +0 -26
- package/dist/types/commands/fix/env-helpers.d.mts.map +0 -1
- package/dist/types/commands/fix/git.d.mts +0 -13
- package/dist/types/commands/fix/git.d.mts.map +0 -1
- package/dist/types/commands/fix/handle-fix.d.mts +0 -20
- package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/output-fix-result.d.mts +0 -3
- package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
- package/dist/types/commands/fix/pull-request.d.mts +0 -31
- package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
- package/dist/types/commands/fix/types.d.mts +0 -21
- package/dist/types/commands/fix/types.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +0 -9
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install.d.mts +0 -3
- package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
- package/dist/types/commands/install/handle-install-completion.d.mts +0 -2
- package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/output-install-completion.d.mts +0 -12
- package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/setup-tab-completion.d.mts +0 -13
- package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/json/cmd-json.d.mts +0 -9
- package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/handle-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/output-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/login/apply-login.d.mts +0 -2
- package/dist/types/commands/login/apply-login.d.mts.map +0 -1
- package/dist/types/commands/login/attempt-login.d.mts +0 -6
- package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
- package/dist/types/commands/login/cmd-login.d.mts +0 -10
- package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
- package/dist/types/commands/logout/apply-logout.d.mts +0 -2
- package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/attempt-logout.d.mts +0 -2
- package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/cmd-logout.d.mts +0 -9
- package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -9
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -8
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -7
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -8
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -13
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -9
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -9
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -2
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -3
- package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-requirements.d.mts +0 -6
- package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -6
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -3
- package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
- package/dist/types/commands/npm/cmd-npm.d.mts +0 -10
- package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
- package/dist/types/commands/npx/cmd-npx.d.mts +0 -9
- package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
- package/dist/types/commands/oops/cmd-oops.d.mts +0 -9
- package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
- package/dist/types/commands/optimize/add-overrides.d.mts +0 -20
- package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
- package/dist/types/commands/optimize/apply-optimization.d.mts +0 -14
- package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
- package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -10
- package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -5
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -3
- package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -42
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/handle-optimize.d.mts +0 -8
- package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -13
- package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -9
- package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
- package/dist/types/commands/optimize/shared.d.mts +0 -2
- package/dist/types/commands/optimize/shared.d.mts.map +0 -1
- package/dist/types/commands/optimize/types.d.mts +0 -9
- package/dist/types/commands/optimize/types.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-lockfile.d.mts +0 -11
- package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -9
- package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-dependencies.d.mts +0 -12
- package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -20
- package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-quota.d.mts +0 -8
- package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-dependencies.d.mts +0 -7
- package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-license-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-organization-list.d.mts +0 -3
- package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-quota.d.mts +0 -3
- package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-security-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-dependencies.d.mts +0 -8
- package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/output-license-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-organization-list.d.mts +0 -4
- package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/output-quota.d.mts +0 -4
- package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/output-security-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-score.d.mts +0 -10
- package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -17
- package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package.d.mts +0 -3
- package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -51
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -8
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -3
- package/dist/types/commands/package/handle-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -6
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -5
- package/dist/types/commands/package/output-purls-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -29
- package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -9
- package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
- package/dist/types/commands/patch/cmd-patch.d.mts +0 -10
- package/dist/types/commands/patch/cmd-patch.d.mts.map +0 -1
- package/dist/types/commands/patch/handle-patch.d.mts +0 -12
- package/dist/types/commands/patch/handle-patch.d.mts.map +0 -1
- package/dist/types/commands/patch/manifest-schema.d.mts +0 -34
- package/dist/types/commands/patch/manifest-schema.d.mts.map +0 -1
- package/dist/types/commands/patch/output-patch-result.d.mts +0 -5
- package/dist/types/commands/patch/output-patch-result.d.mts.map +0 -1
- package/dist/types/commands/pnpm/cmd-pnpm.d.mts +0 -10
- package/dist/types/commands/pnpm/cmd-pnpm.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -9
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -2
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -9
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -2
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository.d.mts +0 -3
- package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -10
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -15
- package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-create-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts +0 -12
- package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-update-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-view-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-create-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-delete-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-list-repos.d.mts +0 -5
- package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/output-update-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-view-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/types.d.mts +0 -2
- package/dist/types/commands/repository/types.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -9
- package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -4
- package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -12
- package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -20
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -18
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +0 -17
- package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -8
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan.d.mts +0 -4
- package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -10
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +0 -1
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts +0 -12
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/generate-report.d.mts +0 -44
- package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -12
- package/dist/types/commands/scan/handle-create-github-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -29
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -3
- package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -10
- package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts +0 -13
- package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-config.d.mts +0 -2
- package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -12
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-report.d.mts +0 -14
- package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -10
- package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-delete-scan.d.mts +0 -4
- package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +0 -4
- package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-github.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts +0 -7
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-report.d.mts +0 -22
- package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts +0 -27
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +0 -1
- package/dist/types/commands/scan/reachability-flags.d.mts +0 -3
- package/dist/types/commands/scan/reachability-flags.d.mts.map +0 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts +0 -3
- package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/stream-scan.d.mts +0 -7
- package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_target.d.mts +0 -2
- package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
- package/dist/types/commands/scan/types.d.mts +0 -3
- package/dist/types/commands/scan/types.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -10
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -4
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/types.d.mts +0 -15
- package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -8
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -3
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -2
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -2
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -9
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/yarn/cmd-yarn.d.mts +0 -10
- package/dist/types/commands/yarn/cmd-yarn.d.mts.map +0 -1
- package/dist/types/commands.d.mts +0 -203
- package/dist/types/commands.d.mts.map +0 -1
- package/dist/types/constants.d.mts +0 -299
- package/dist/types/constants.d.mts.map +0 -1
- package/dist/types/flags.d.mts +0 -18
- package/dist/types/flags.d.mts.map +0 -1
- package/dist/types/instrument-with-sentry.d.mts +0 -2
- package/dist/types/instrument-with-sentry.d.mts.map +0 -1
- package/dist/types/npm-cli.d.mts +0 -3
- package/dist/types/npm-cli.d.mts.map +0 -1
- package/dist/types/npx-cli.d.mts +0 -3
- package/dist/types/npx-cli.d.mts.map +0 -1
- package/dist/types/pnpm-cli.d.mts +0 -3
- package/dist/types/pnpm-cli.d.mts.map +0 -1
- package/dist/types/sea/bootstrap.d.mts +0 -2
- package/dist/types/sea/bootstrap.d.mts.map +0 -1
- package/dist/types/sea/build-sea.d.mts +0 -27
- package/dist/types/sea/build-sea.d.mts.map +0 -1
- package/dist/types/shadow/common.d.mts +0 -23
- package/dist/types/shadow/common.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/index.d.mts +0 -8
- package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -35
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/types.d.mts +0 -123
- package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -24
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
- package/dist/types/shadow/npm/bin.d.mts +0 -5
- package/dist/types/shadow/npm/bin.d.mts.map +0 -1
- package/dist/types/shadow/npm/inject.d.mts +0 -2
- package/dist/types/shadow/npm/inject.d.mts.map +0 -1
- package/dist/types/shadow/npm/install.d.mts +0 -13
- package/dist/types/shadow/npm/install.d.mts.map +0 -1
- package/dist/types/shadow/npm/paths.d.mts +0 -6
- package/dist/types/shadow/npm/paths.d.mts.map +0 -1
- package/dist/types/shadow/npm-base.d.mts +0 -11
- package/dist/types/shadow/npm-base.d.mts.map +0 -1
- package/dist/types/shadow/npx/bin.d.mts +0 -5
- package/dist/types/shadow/npx/bin.d.mts.map +0 -1
- package/dist/types/shadow/pnpm/bin.d.mts +0 -10
- package/dist/types/shadow/pnpm/bin.d.mts.map +0 -1
- package/dist/types/shadow/stdio-ipc.d.mts +0 -7
- package/dist/types/shadow/stdio-ipc.d.mts.map +0 -1
- package/dist/types/shadow/yarn/bin.d.mts +0 -10
- package/dist/types/shadow/yarn/bin.d.mts.map +0 -1
- package/dist/types/test/json-output-validation.d.mts +0 -37
- package/dist/types/test/json-output-validation.d.mts.map +0 -1
- package/dist/types/test/mocks/socket-auth.d.mts +0 -88
- package/dist/types/test/mocks/socket-auth.d.mts.map +0 -1
- package/dist/types/types.d.mts +0 -29
- package/dist/types/types.d.mts.map +0 -1
- package/dist/types/utils/agent.d.mts +0 -12
- package/dist/types/utils/agent.d.mts.map +0 -1
- package/dist/types/utils/alert/artifact.d.mts +0 -21
- package/dist/types/utils/alert/artifact.d.mts.map +0 -1
- package/dist/types/utils/alert/fix.d.mts +0 -6
- package/dist/types/utils/alert/fix.d.mts.map +0 -1
- package/dist/types/utils/alert/severity.d.mts +0 -14
- package/dist/types/utils/alert/severity.d.mts.map +0 -1
- package/dist/types/utils/alerts-map.d.mts +0 -27
- package/dist/types/utils/alerts-map.d.mts.map +0 -1
- package/dist/types/utils/api.d.mts +0 -44
- package/dist/types/utils/api.d.mts.map +0 -1
- package/dist/types/utils/check-input.d.mts +0 -9
- package/dist/types/utils/check-input.d.mts.map +0 -1
- package/dist/types/utils/cmd.d.mts +0 -50
- package/dist/types/utils/cmd.d.mts.map +0 -1
- package/dist/types/utils/coana.d.mts +0 -2
- package/dist/types/utils/coana.d.mts.map +0 -1
- package/dist/types/utils/color-or-markdown.d.mts +0 -16
- package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
- package/dist/types/utils/completion.d.mts +0 -11
- package/dist/types/utils/completion.d.mts.map +0 -1
- package/dist/types/utils/config.d.mts +0 -34
- package/dist/types/utils/config.d.mts.map +0 -1
- package/dist/types/utils/cve-to-ghsa.d.mts +0 -6
- package/dist/types/utils/cve-to-ghsa.d.mts.map +0 -1
- package/dist/types/utils/debug.d.mts +0 -45
- package/dist/types/utils/debug.d.mts.map +0 -1
- package/dist/types/utils/determine-org-slug.d.mts +0 -2
- package/dist/types/utils/determine-org-slug.d.mts.map +0 -1
- package/dist/types/utils/dlx-binary.d.mts +0 -58
- package/dist/types/utils/dlx-binary.d.mts.map +0 -1
- package/dist/types/utils/dlx-detection.d.mts +0 -29
- package/dist/types/utils/dlx-detection.d.mts.map +0 -1
- package/dist/types/utils/dlx.d.mts +0 -36
- package/dist/types/utils/dlx.d.mts.map +0 -1
- package/dist/types/utils/ecosystem.d.mts +0 -20
- package/dist/types/utils/ecosystem.d.mts.map +0 -1
- package/dist/types/utils/errors.d.mts +0 -62
- package/dist/types/utils/errors.d.mts.map +0 -1
- package/dist/types/utils/extract-names.d.mts +0 -15
- package/dist/types/utils/extract-names.d.mts.map +0 -1
- package/dist/types/utils/fail-msg-with-badge.d.mts +0 -2
- package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
- package/dist/types/utils/filter-config.d.mts +0 -5
- package/dist/types/utils/filter-config.d.mts.map +0 -1
- package/dist/types/utils/fs.d.mts +0 -8
- package/dist/types/utils/fs.d.mts.map +0 -1
- package/dist/types/utils/get-output-kind.d.mts +0 -3
- package/dist/types/utils/get-output-kind.d.mts.map +0 -1
- package/dist/types/utils/git.d.mts +0 -35
- package/dist/types/utils/git.d.mts.map +0 -1
- package/dist/types/utils/github.d.mts +0 -38
- package/dist/types/utils/github.d.mts.map +0 -1
- package/dist/types/utils/glob.d.mts +0 -15
- package/dist/types/utils/glob.d.mts.map +0 -1
- package/dist/types/utils/lockfile.d.mts +0 -2
- package/dist/types/utils/lockfile.d.mts.map +0 -1
- package/dist/types/utils/map-to-object.d.mts +0 -10
- package/dist/types/utils/map-to-object.d.mts.map +0 -1
- package/dist/types/utils/markdown.d.mts +0 -27
- package/dist/types/utils/markdown.d.mts.map +0 -1
- package/dist/types/utils/meow-with-subcommands.d.mts +0 -83
- package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
- package/dist/types/utils/ms-at-home.d.mts +0 -2
- package/dist/types/utils/ms-at-home.d.mts.map +0 -1
- package/dist/types/utils/npm-config.d.mts +0 -14
- package/dist/types/utils/npm-config.d.mts.map +0 -1
- package/dist/types/utils/npm-package-arg.d.mts +0 -8
- package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
- package/dist/types/utils/npm-paths.d.mts +0 -7
- package/dist/types/utils/npm-paths.d.mts.map +0 -1
- package/dist/types/utils/npm-spec.d.mts +0 -57
- package/dist/types/utils/npm-spec.d.mts.map +0 -1
- package/dist/types/utils/objects.d.mts +0 -3
- package/dist/types/utils/objects.d.mts.map +0 -1
- package/dist/types/utils/organization.d.mts +0 -5
- package/dist/types/utils/organization.d.mts.map +0 -1
- package/dist/types/utils/output-formatting.d.mts +0 -20
- package/dist/types/utils/output-formatting.d.mts.map +0 -1
- package/dist/types/utils/package-environment.d.mts +0 -57
- package/dist/types/utils/package-environment.d.mts.map +0 -1
- package/dist/types/utils/path-resolve.d.mts +0 -14
- package/dist/types/utils/path-resolve.d.mts.map +0 -1
- package/dist/types/utils/pnpm-paths.d.mts +0 -5
- package/dist/types/utils/pnpm-paths.d.mts.map +0 -1
- package/dist/types/utils/pnpm.d.mts +0 -11
- package/dist/types/utils/pnpm.d.mts.map +0 -1
- package/dist/types/utils/purl-to-ghsa.d.mts +0 -6
- package/dist/types/utils/purl-to-ghsa.d.mts.map +0 -1
- package/dist/types/utils/purl.d.mts +0 -71
- package/dist/types/utils/purl.d.mts.map +0 -1
- package/dist/types/utils/requirements.d.mts +0 -125
- package/dist/types/utils/requirements.d.mts.map +0 -1
- package/dist/types/utils/sdk.d.mts +0 -17
- package/dist/types/utils/sdk.d.mts.map +0 -1
- package/dist/types/utils/semver.d.mts +0 -7
- package/dist/types/utils/semver.d.mts.map +0 -1
- package/dist/types/utils/serialize-result-json.d.mts +0 -5
- package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
- package/dist/types/utils/shadow-links.d.mts +0 -5
- package/dist/types/utils/shadow-links.d.mts.map +0 -1
- package/dist/types/utils/socket-json.d.mts +0 -59
- package/dist/types/utils/socket-json.d.mts.map +0 -1
- package/dist/types/utils/socket-package-alert.d.mts +0 -80
- package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
- package/dist/types/utils/socket-url.d.mts +0 -8
- package/dist/types/utils/socket-url.d.mts.map +0 -1
- package/dist/types/utils/spec.d.mts +0 -5
- package/dist/types/utils/spec.d.mts.map +0 -1
- package/dist/types/utils/strings.d.mts +0 -14
- package/dist/types/utils/strings.d.mts.map +0 -1
- package/dist/types/utils/terminal-link.d.mts +0 -52
- package/dist/types/utils/terminal-link.d.mts.map +0 -1
- package/dist/types/utils/tildify.d.mts +0 -2
- package/dist/types/utils/tildify.d.mts.map +0 -1
- package/dist/types/utils/translations.d.mts +0 -617
- package/dist/types/utils/translations.d.mts.map +0 -1
- package/dist/types/utils/walk-nested-map.d.mts +0 -7
- package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
- package/dist/types/utils/yarn-paths.d.mts +0 -5
- package/dist/types/utils/yarn-paths.d.mts.map +0 -1
- package/dist/types/utils/yarn-version.d.mts +0 -2
- package/dist/types/utils/yarn-version.d.mts.map +0 -1
- package/dist/types/yarn-cli.d.mts +0 -3
- package/dist/types/yarn-cli.d.mts.map +0 -1
- package/dist/utils.js +0 -6146
- package/dist/utils.js.map +0 -1
- package/dist/vendor.js +0 -162074
- package/dist/yarn-cli.js +0 -30
- package/dist/yarn-cli.js.map +0 -1
- package/external/@socketsecurity/registry/LICENSE +0 -21
- package/external/@socketsecurity/registry/README.md +0 -9
- package/external/@socketsecurity/registry/extensions.json +0 -28
- package/external/@socketsecurity/registry/external/@inquirer/confirm.js +0 -3165
- package/external/@socketsecurity/registry/external/@inquirer/input.js +0 -3202
- package/external/@socketsecurity/registry/external/@inquirer/password.js +0 -3307
- package/external/@socketsecurity/registry/external/@inquirer/search.js +0 -3519
- package/external/@socketsecurity/registry/external/@inquirer/select.js +0 -3655
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +0 -21406
- package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/read-package.js +0 -183
- package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/sort.js +0 -274
- package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +0 -704
- package/external/@socketsecurity/registry/external/@socketregistry/is-unicode-supported.js +0 -54
- package/external/@socketsecurity/registry/external/@socketregistry/packageurl-js.js +0 -4516
- package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +0 -453
- package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +0 -1406
- package/external/@socketsecurity/registry/external/browserslist.js +0 -20496
- package/external/@socketsecurity/registry/external/cacache.js +0 -16208
- package/external/@socketsecurity/registry/external/debug.js +0 -1163
- package/external/@socketsecurity/registry/external/fast-glob.js +0 -7994
- package/external/@socketsecurity/registry/external/fast-sort.js +0 -181
- package/external/@socketsecurity/registry/external/libnpmpack.js +0 -106271
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +0 -38997
- package/external/@socketsecurity/registry/external/normalize-package-data.js +0 -5343
- package/external/@socketsecurity/registry/external/npm-package-arg.js +0 -5773
- package/external/@socketsecurity/registry/external/pacote.js +0 -74109
- package/external/@socketsecurity/registry/external/picomatch.js +0 -2307
- package/external/@socketsecurity/registry/external/semver.js +0 -2618
- package/external/@socketsecurity/registry/external/signal-exit.js +0 -336
- package/external/@socketsecurity/registry/external/spdx-correct.js +0 -1457
- package/external/@socketsecurity/registry/external/spdx-expression-parse.js +0 -1043
- package/external/@socketsecurity/registry/external/streaming-iterables.js +0 -326
- package/external/@socketsecurity/registry/external/validate-npm-package-name.js +0 -108
- package/external/@socketsecurity/registry/external/which.js +0 -405
- package/external/@socketsecurity/registry/external/yoctocolors-cjs.js +0 -101
- package/external/@socketsecurity/registry/index.js +0 -31
- package/external/@socketsecurity/registry/lib/agent.js +0 -390
- package/external/@socketsecurity/registry/lib/arrays.js +0 -89
- package/external/@socketsecurity/registry/lib/bin.js +0 -650
- package/external/@socketsecurity/registry/lib/constants/abort-controller.js +0 -15
- package/external/@socketsecurity/registry/lib/constants/abort-signal.js +0 -27
- package/external/@socketsecurity/registry/lib/constants/at-latest.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/biome-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/bun-lock.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/bun.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ci.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/column-limit.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/copy-left-licenses.js +0 -27
- package/external/@socketsecurity/registry/lib/constants/darwin.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/dot-package-lock-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/empty-file.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/empty-value.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/env.js +0 -59
- package/external/@socketsecurity/registry/lib/constants/eslint-config-js.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/esnext.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/exec-path.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-cjs.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-cmd.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-cts.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-dts.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-js.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-lock.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-lockb.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-md.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-mjs.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-mts.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-ps1.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/ext-yml.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/extensions-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/extensions.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/get-ipc.js +0 -10
- package/external/@socketsecurity/registry/lib/constants/gitignore.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/index.js +0 -139
- package/external/@socketsecurity/registry/lib/constants/ipc-handler.js +0 -19
- package/external/@socketsecurity/registry/lib/constants/ipc-object.js +0 -6
- package/external/@socketsecurity/registry/lib/constants/ipc-promise.js +0 -47
- package/external/@socketsecurity/registry/lib/constants/ipc-target.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/k-internals-symbol.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/latest.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-glob.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-original-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-original-glob.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license-original.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/license.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/lifecycle-script-names.js +0 -18
- package/external/@socketsecurity/registry/lib/constants/loop-sentinel.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/maintained-node-versions.js +0 -47
- package/external/@socketsecurity/registry/lib/constants/manifest-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/mit.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-auth-token.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-debug-flags.js +0 -9
- package/external/@socketsecurity/registry/lib/constants/node-env.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-harden-flags.js +0 -29
- package/external/@socketsecurity/registry/lib/constants/node-modules-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-modules.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/node-no-warnings-flags.js +0 -16
- package/external/@socketsecurity/registry/lib/constants/node-version.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +0 -6
- package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/npm.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/npx.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/overrides.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-default-node-range.js +0 -6
- package/external/@socketsecurity/registry/lib/constants/package-default-socket-categories.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-default-version.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-extensions.js +0 -47
- package/external/@socketsecurity/registry/lib/constants/package-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/package-lock-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/packument-cache.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/pacote-cache-path.js +0 -9
- package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/pnpm.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/pre-commit.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/readme-glob-recursive.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/readme-glob.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/readme-md.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/registry-scope-delimiter.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/registry.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/resolutions.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-github-org.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-ipc-handshake.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-override-scope.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-public-api-token.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-npm-org.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-package-name.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-repo-name.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-registry-scope.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/socket-security-scope.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/spinner.js +0 -4
- package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-api.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-env-var.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-disable-warning-flag.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-permission-flag.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-node-require-module.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/supports-node-run.js +0 -8
- package/external/@socketsecurity/registry/lib/constants/supports-process-send.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/ts-libs-available.js +0 -22
- package/external/@socketsecurity/registry/lib/constants/ts-types-available.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/tsconfig-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/undefined-token.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unknown-error.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unknown-value.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unlicenced.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/unlicensed.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/utf8.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/vitest.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/vlt.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/win32.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +0 -5
- package/external/@socketsecurity/registry/lib/constants/yarn-lock.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/yarn.js +0 -3
- package/external/@socketsecurity/registry/lib/debug.js +0 -264
- package/external/@socketsecurity/registry/lib/env.js +0 -62
- package/external/@socketsecurity/registry/lib/fs.js +0 -556
- package/external/@socketsecurity/registry/lib/functions.js +0 -20
- package/external/@socketsecurity/registry/lib/globs.js +0 -145
- package/external/@socketsecurity/registry/lib/json.js +0 -69
- package/external/@socketsecurity/registry/lib/logger.js +0 -534
- package/external/@socketsecurity/registry/lib/objects.js +0 -422
- package/external/@socketsecurity/registry/lib/packages.js +0 -1376
- package/external/@socketsecurity/registry/lib/path.js +0 -231
- package/external/@socketsecurity/registry/lib/promises.js +0 -286
- package/external/@socketsecurity/registry/lib/prompts.js +0 -63
- package/external/@socketsecurity/registry/lib/regexps.js +0 -23
- package/external/@socketsecurity/registry/lib/sorts.js +0 -70
- package/external/@socketsecurity/registry/lib/spawn.js +0 -252
- package/external/@socketsecurity/registry/lib/spinner.js +0 -205
- package/external/@socketsecurity/registry/lib/streams.js +0 -84
- package/external/@socketsecurity/registry/lib/strings.js +0 -235
- package/external/@socketsecurity/registry/lib/url.js +0 -68
- package/external/@socketsecurity/registry/lib/words.js +0 -45
- package/external/@socketsecurity/registry/manifest.json +0 -1875
- package/external/blessed/LICENSE +0 -20
- package/external/blessed/README.md +0 -2421
- package/external/blessed/lib/alias.js +0 -528
- package/external/blessed/lib/blessed.js +0 -34
- package/external/blessed/lib/colors.js +0 -532
- package/external/blessed/lib/events.js +0 -191
- package/external/blessed/lib/gpmclient.js +0 -223
- package/external/blessed/lib/helpers.js +0 -167
- package/external/blessed/lib/keys.js +0 -341
- package/external/blessed/lib/program.js +0 -4297
- package/external/blessed/lib/tput.js +0 -3020
- package/external/blessed/lib/unicode.js +0 -792
- package/external/blessed/lib/widget.js +0 -62
- package/external/blessed/lib/widgets/ansiimage.js +0 -169
- package/external/blessed/lib/widgets/bigtext.js +0 -161
- package/external/blessed/lib/widgets/box.js +0 -36
- package/external/blessed/lib/widgets/button.js +0 -64
- package/external/blessed/lib/widgets/checkbox.js +0 -93
- package/external/blessed/lib/widgets/element.js +0 -2572
- package/external/blessed/lib/widgets/filemanager.js +0 -214
- package/external/blessed/lib/widgets/form.js +0 -269
- package/external/blessed/lib/widgets/image.js +0 -63
- package/external/blessed/lib/widgets/input.js +0 -36
- package/external/blessed/lib/widgets/layout.js +0 -235
- package/external/blessed/lib/widgets/line.js +0 -58
- package/external/blessed/lib/widgets/list.js +0 -601
- package/external/blessed/lib/widgets/listbar.js +0 -413
- package/external/blessed/lib/widgets/listtable.js +0 -254
- package/external/blessed/lib/widgets/loading.js +0 -90
- package/external/blessed/lib/widgets/log.js +0 -85
- package/external/blessed/lib/widgets/message.js +0 -125
- package/external/blessed/lib/widgets/node.js +0 -284
- package/external/blessed/lib/widgets/overlayimage.js +0 -719
- package/external/blessed/lib/widgets/progressbar.js +0 -159
- package/external/blessed/lib/widgets/prompt.js +0 -122
- package/external/blessed/lib/widgets/question.js +0 -118
- package/external/blessed/lib/widgets/radiobutton.js +0 -63
- package/external/blessed/lib/widgets/radioset.js +0 -38
- package/external/blessed/lib/widgets/screen.js +0 -2300
- package/external/blessed/lib/widgets/scrollablebox.js +0 -391
- package/external/blessed/lib/widgets/scrollabletext.js +0 -37
- package/external/blessed/lib/widgets/table.js +0 -356
- package/external/blessed/lib/widgets/terminal.js +0 -414
- package/external/blessed/lib/widgets/text.js +0 -37
- package/external/blessed/lib/widgets/textarea.js +0 -344
- package/external/blessed/lib/widgets/textbox.js +0 -79
- package/external/blessed/lib/widgets/video.js +0 -128
- package/external/blessed/usr/fonts/AUTHORS +0 -1
- package/external/blessed/usr/fonts/LICENSE +0 -94
- package/external/blessed/usr/fonts/README +0 -340
- package/external/blessed/usr/fonts/ter-u14b.json +0 -17826
- package/external/blessed/usr/fonts/ter-u14n.json +0 -17826
- package/external/blessed/usr/linux +0 -0
- package/external/blessed/usr/windows-ansi +0 -0
- package/external/blessed/usr/xterm +0 -0
- package/external/blessed/usr/xterm-256color +0 -0
- package/external/blessed/usr/xterm.termcap +0 -243
- package/external/blessed/usr/xterm.terminfo +0 -1977
- package/external/blessed/vendor/tng.js +0 -1757
- package/external/blessed-contrib/LICENSE.md +0 -21
- package/external/blessed-contrib/lib/layout/grid.js +0 -409
- package/external/blessed-contrib/lib/widget/charts/bar.js +0 -8370
- package/external/blessed-contrib/lib/widget/charts/line.js +0 -17924
- package/external/blessed-contrib/lib/widget/table.js +0 -187
- package/shadow-bin/npm +0 -27
- package/shadow-bin/npx +0 -27
- package/shadow-bin/pnpm +0 -27
- package/shadow-bin/yarn +0 -27
- /package/{translations.json → data/alert-translations.json} +0 -0
- /package/{requirements.json → data/command-api-requirements.json} +0 -0
- /package/{dist → data}/socket-completion.bash +0 -0
|
@@ -1,556 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { isArray: ArrayIsArray } = Array
|
|
4
|
-
const { freeze: ObjectFreeze } = Object
|
|
5
|
-
|
|
6
|
-
const { defaultIgnore, getGlobMatcher } = /*@__PURE__*/ require('./globs')
|
|
7
|
-
const { jsonParse } = /*@__PURE__*/ require('./json')
|
|
8
|
-
const { naturalCompare } = /*@__PURE__*/ require('./sorts')
|
|
9
|
-
const { pathLikeToString } = /*@__PURE__*/ require('./path')
|
|
10
|
-
|
|
11
|
-
const defaultRemoveOptions = ObjectFreeze({
|
|
12
|
-
__proto__: null,
|
|
13
|
-
force: true,
|
|
14
|
-
maxRetries: 3,
|
|
15
|
-
recursive: true,
|
|
16
|
-
retryDelay: 200
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
let _fs
|
|
20
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
21
|
-
function getFs() {
|
|
22
|
-
if (_fs === undefined) {
|
|
23
|
-
// Use non-'node:' prefixed require to avoid Webpack errors.
|
|
24
|
-
// eslint-disable-next-line n/prefer-node-protocol
|
|
25
|
-
_fs = /*@__PURE__*/ require('fs')
|
|
26
|
-
}
|
|
27
|
-
return _fs
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
let _path
|
|
31
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
32
|
-
function getPath() {
|
|
33
|
-
if (_path === undefined) {
|
|
34
|
-
// Use non-'node:' prefixed require to avoid Webpack errors.
|
|
35
|
-
// eslint-disable-next-line n/prefer-node-protocol
|
|
36
|
-
_path = /*@__PURE__*/ require('path')
|
|
37
|
-
}
|
|
38
|
-
return _path
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Find a file or directory by traversing up parent directories.
|
|
43
|
-
* @param {string | string[]} name - Name(s) to search for.
|
|
44
|
-
* @param {FindUpOptions} [options] - Search options.
|
|
45
|
-
* @returns {Promise<string | undefined>} Path to found file/directory.
|
|
46
|
-
* @typedef {{cwd?: string; onlyDirectories?: boolean; onlyFiles?: boolean; signal?: AbortSignal}} FindUpOptions
|
|
47
|
-
*/
|
|
48
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
49
|
-
async function findUp(name, options) {
|
|
50
|
-
const {
|
|
51
|
-
cwd = process.cwd(),
|
|
52
|
-
signal = /*@__PURE__*/ require('./constants/abort-signal')
|
|
53
|
-
} = { __proto__: null, ...options }
|
|
54
|
-
let { onlyDirectories = false, onlyFiles = true } = {
|
|
55
|
-
__proto__: null,
|
|
56
|
-
...options
|
|
57
|
-
}
|
|
58
|
-
if (onlyDirectories) {
|
|
59
|
-
onlyFiles = false
|
|
60
|
-
}
|
|
61
|
-
if (onlyFiles) {
|
|
62
|
-
onlyDirectories = false
|
|
63
|
-
}
|
|
64
|
-
const fs = getFs()
|
|
65
|
-
const path = getPath()
|
|
66
|
-
let dir = path.resolve(cwd)
|
|
67
|
-
const { root } = path.parse(dir)
|
|
68
|
-
const names = ArrayIsArray(name) ? name : [name]
|
|
69
|
-
while (dir && dir !== root) {
|
|
70
|
-
for (const n of names) {
|
|
71
|
-
if (signal?.aborted) {
|
|
72
|
-
return undefined
|
|
73
|
-
}
|
|
74
|
-
const thePath = path.join(dir, n)
|
|
75
|
-
try {
|
|
76
|
-
// eslint-disable-next-line no-await-in-loop
|
|
77
|
-
const stats = await fs.promises.stat(thePath)
|
|
78
|
-
if (!onlyDirectories && stats.isFile()) {
|
|
79
|
-
return thePath
|
|
80
|
-
}
|
|
81
|
-
if (!onlyFiles && stats.isDirectory()) {
|
|
82
|
-
return thePath
|
|
83
|
-
}
|
|
84
|
-
} catch {}
|
|
85
|
-
}
|
|
86
|
-
dir = path.dirname(dir)
|
|
87
|
-
}
|
|
88
|
-
return undefined
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Synchronously find a file or directory by traversing up parent directories.
|
|
93
|
-
* @param {string | string[]} name - Name(s) to search for.
|
|
94
|
-
* @param {Omit<FindUpOptions, 'signal'>} [options] - Search options.
|
|
95
|
-
* @returns {string | undefined} Path to found file/directory.
|
|
96
|
-
*/
|
|
97
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
98
|
-
function findUpSync(name, options) {
|
|
99
|
-
const { cwd = process.cwd() } = { __proto__: null, ...options }
|
|
100
|
-
let { onlyDirectories = false, onlyFiles = true } = {
|
|
101
|
-
__proto__: null,
|
|
102
|
-
...options
|
|
103
|
-
}
|
|
104
|
-
if (onlyDirectories) {
|
|
105
|
-
onlyFiles = false
|
|
106
|
-
}
|
|
107
|
-
if (onlyFiles) {
|
|
108
|
-
onlyDirectories = false
|
|
109
|
-
}
|
|
110
|
-
const fs = getFs()
|
|
111
|
-
const path = getPath()
|
|
112
|
-
let dir = path.resolve(cwd)
|
|
113
|
-
const { root } = path.parse(dir)
|
|
114
|
-
const names = ArrayIsArray(name) ? name : [name]
|
|
115
|
-
while (dir && dir !== root) {
|
|
116
|
-
for (const n of names) {
|
|
117
|
-
const thePath = path.join(dir, n)
|
|
118
|
-
try {
|
|
119
|
-
const stats = fs.statSync(thePath)
|
|
120
|
-
if (!onlyDirectories && stats.isFile()) {
|
|
121
|
-
return thePath
|
|
122
|
-
}
|
|
123
|
-
if (!onlyFiles && stats.isDirectory()) {
|
|
124
|
-
return thePath
|
|
125
|
-
}
|
|
126
|
-
} catch {}
|
|
127
|
-
}
|
|
128
|
-
dir = path.dirname(dir)
|
|
129
|
-
}
|
|
130
|
-
return undefined
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Process directory entries and filter for directories.
|
|
135
|
-
* @param {import('fs').Dirent[]} dirents - Directory entries to process.
|
|
136
|
-
* @param {ReadDirOptions} [options] - Options for filtering and sorting.
|
|
137
|
-
* @returns {string[]} Array of directory names.
|
|
138
|
-
* @private
|
|
139
|
-
*/
|
|
140
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
141
|
-
function innerReadDirNames(dirents, options) {
|
|
142
|
-
const {
|
|
143
|
-
ignore,
|
|
144
|
-
includeEmpty = false,
|
|
145
|
-
sort = true
|
|
146
|
-
} = { __proto__: null, ...options }
|
|
147
|
-
const path = getPath()
|
|
148
|
-
const names = dirents
|
|
149
|
-
.filter(
|
|
150
|
-
d =>
|
|
151
|
-
d.isDirectory() &&
|
|
152
|
-
(includeEmpty ||
|
|
153
|
-
!isDirEmptySync(path.join(d.parentPath, d.name), { ignore }))
|
|
154
|
-
)
|
|
155
|
-
.map(d => d.name)
|
|
156
|
-
return sort ? names.sort(naturalCompare) : names
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Check if a path is a directory synchronously.
|
|
161
|
-
* @param {import('fs').PathLike} filepath - Path to check.
|
|
162
|
-
* @returns {boolean} True if the path is a directory.
|
|
163
|
-
*/
|
|
164
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
165
|
-
function isDirSync(filepath) {
|
|
166
|
-
const fs = getFs()
|
|
167
|
-
return fs.existsSync(filepath) && !!safeStatsSync(filepath)?.isDirectory()
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Check if a directory is empty synchronously.
|
|
172
|
-
* @param {import('fs').PathLike} dirname - Directory path to check.
|
|
173
|
-
* @param {IsDirEmptyOptions} [options] - Options with ignore patterns.
|
|
174
|
-
* @returns {boolean} True if the directory is empty or only contains ignored files.
|
|
175
|
-
* @typedef {{ignore?: string[] | readonly string[]}} IsDirEmptyOptions
|
|
176
|
-
*/
|
|
177
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
178
|
-
function isDirEmptySync(dirname, options) {
|
|
179
|
-
const { ignore = defaultIgnore } = { __proto__: null, ...options }
|
|
180
|
-
const fs = getFs()
|
|
181
|
-
try {
|
|
182
|
-
const files = fs.readdirSync(dirname)
|
|
183
|
-
const { length } = files
|
|
184
|
-
if (length === 0) {
|
|
185
|
-
return true
|
|
186
|
-
}
|
|
187
|
-
const matcher = getGlobMatcher(ignore, { cwd: pathLikeToString(dirname) })
|
|
188
|
-
let ignoredCount = 0
|
|
189
|
-
for (let i = 0; i < length; i += 1) {
|
|
190
|
-
if (matcher(files[i])) {
|
|
191
|
-
ignoredCount += 1
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
return ignoredCount === length
|
|
195
|
-
} catch (e) {
|
|
196
|
-
return e?.code === 'ENOENT'
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Check if a path is a symbolic link synchronously.
|
|
202
|
-
* @param {import('fs').PathLike} filepath - Path to check.
|
|
203
|
-
* @returns {boolean} True if the path is a symbolic link.
|
|
204
|
-
*/
|
|
205
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
206
|
-
function isSymLinkSync(filepath) {
|
|
207
|
-
const fs = getFs()
|
|
208
|
-
try {
|
|
209
|
-
return fs.lstatSync(filepath).isSymbolicLink()
|
|
210
|
-
} catch {}
|
|
211
|
-
return false
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Read directory names asynchronously with filtering and sorting.
|
|
216
|
-
* @param {import('fs').PathLike} dirname - Directory to read.
|
|
217
|
-
* @param {ReadDirOptions} [options] - Options for filtering and sorting.
|
|
218
|
-
* @returns {Promise<string[]>} Array of directory names.
|
|
219
|
-
* @typedef {{ignore?: string[] | readonly string[]; includeEmpty?: boolean; sort?: boolean}} ReadDirOptions
|
|
220
|
-
*/
|
|
221
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
222
|
-
async function readDirNames(dirname, options) {
|
|
223
|
-
const fs = getFs()
|
|
224
|
-
try {
|
|
225
|
-
return innerReadDirNames(
|
|
226
|
-
await fs.promises.readdir(dirname, {
|
|
227
|
-
__proto__: null,
|
|
228
|
-
withFileTypes: true
|
|
229
|
-
}),
|
|
230
|
-
options
|
|
231
|
-
)
|
|
232
|
-
} catch {}
|
|
233
|
-
return []
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Read directory names synchronously with filtering and sorting.
|
|
238
|
-
* @param {import('fs').PathLike} dirname - Directory to read.
|
|
239
|
-
* @param {ReadDirOptions} [options] - Options for filtering and sorting.
|
|
240
|
-
* @returns {string[]} Array of directory names.
|
|
241
|
-
*/
|
|
242
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
243
|
-
function readDirNamesSync(dirname, options) {
|
|
244
|
-
const fs = getFs()
|
|
245
|
-
try {
|
|
246
|
-
return innerReadDirNames(
|
|
247
|
-
fs.readdirSync(dirname, { __proto__: null, withFileTypes: true }),
|
|
248
|
-
options
|
|
249
|
-
)
|
|
250
|
-
} catch {}
|
|
251
|
-
return []
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Read a file as binary data asynchronously.
|
|
256
|
-
* @param {import('fs').PathLike | import('fs/promises').FileHandle} filepath - Path to the file.
|
|
257
|
-
* @param {import('fs').ReadFileOptions} [options] - Read options.
|
|
258
|
-
* @returns {Promise<Buffer>} The file contents as a Buffer.
|
|
259
|
-
*/
|
|
260
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
261
|
-
async function readFileBinary(filepath, options) {
|
|
262
|
-
const fs = getFs()
|
|
263
|
-
return await fs.promises.readFile(filepath, {
|
|
264
|
-
signal: /*@__PURE__*/ require('./constants/abort-signal'),
|
|
265
|
-
...options,
|
|
266
|
-
encoding: 'binary'
|
|
267
|
-
})
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Read a file as UTF-8 text asynchronously.
|
|
272
|
-
* @param {import('fs').PathLike | import('fs/promises').FileHandle} filepath - Path to the file.
|
|
273
|
-
* @param {import('fs').ReadFileOptions} [options] - Read options.
|
|
274
|
-
* @returns {Promise<string>} The file contents as a string.
|
|
275
|
-
*/
|
|
276
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
277
|
-
async function readFileUtf8(filepath, options) {
|
|
278
|
-
const fs = getFs()
|
|
279
|
-
return await fs.promises.readFile(filepath, {
|
|
280
|
-
signal: /*@__PURE__*/ require('./constants/abort-signal'),
|
|
281
|
-
...options,
|
|
282
|
-
encoding: 'utf8'
|
|
283
|
-
})
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Read and parse a JSON file asynchronously.
|
|
288
|
-
* @param {import('fs').PathLike} filepath - Path to the JSON file.
|
|
289
|
-
* @param {ReadJsonOptions} [options] - Read and parse options.
|
|
290
|
-
* @returns {Promise<any>} The parsed JSON content.
|
|
291
|
-
* @typedef {{encoding?: string; throws?: boolean; reviver?: Function} & import('fs').ReadFileOptions} ReadJsonOptions
|
|
292
|
-
*/
|
|
293
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
294
|
-
async function readJson(filepath, options) {
|
|
295
|
-
if (typeof options === 'string') {
|
|
296
|
-
options = { encoding: options }
|
|
297
|
-
}
|
|
298
|
-
const { reviver, throws, ...fsOptions } = { __proto__: null, ...options }
|
|
299
|
-
const shouldThrow = throws === undefined || !!throws
|
|
300
|
-
const fs = getFs()
|
|
301
|
-
let content = ''
|
|
302
|
-
try {
|
|
303
|
-
content = await fs.promises.readFile(filepath, {
|
|
304
|
-
__proto__: null,
|
|
305
|
-
encoding: 'utf8',
|
|
306
|
-
...fsOptions
|
|
307
|
-
})
|
|
308
|
-
} catch (e) {
|
|
309
|
-
if (shouldThrow) {
|
|
310
|
-
throw e
|
|
311
|
-
}
|
|
312
|
-
return null
|
|
313
|
-
}
|
|
314
|
-
return jsonParse(content, {
|
|
315
|
-
filepath,
|
|
316
|
-
reviver,
|
|
317
|
-
throws: shouldThrow
|
|
318
|
-
})
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Read and parse a JSON file synchronously.
|
|
323
|
-
* @param {import('fs').PathLike} filepath - Path to the JSON file.
|
|
324
|
-
* @param {ReadJsonOptions} [options] - Read and parse options.
|
|
325
|
-
* @returns {any} The parsed JSON content.
|
|
326
|
-
*/
|
|
327
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
328
|
-
function readJsonSync(filepath, options) {
|
|
329
|
-
if (typeof options === 'string') {
|
|
330
|
-
options = { encoding: options }
|
|
331
|
-
}
|
|
332
|
-
const { reviver, throws, ...fsOptions } = { __proto__: null, ...options }
|
|
333
|
-
const shouldThrow = throws === undefined || !!throws
|
|
334
|
-
const fs = getFs()
|
|
335
|
-
let content = ''
|
|
336
|
-
try {
|
|
337
|
-
content = fs.readFileSync(filepath, {
|
|
338
|
-
__proto__: null,
|
|
339
|
-
encoding: 'utf8',
|
|
340
|
-
...fsOptions
|
|
341
|
-
})
|
|
342
|
-
} catch (e) {
|
|
343
|
-
if (shouldThrow) {
|
|
344
|
-
throw e
|
|
345
|
-
}
|
|
346
|
-
return null
|
|
347
|
-
}
|
|
348
|
-
return jsonParse(content, {
|
|
349
|
-
filepath,
|
|
350
|
-
reviver,
|
|
351
|
-
throws: shouldThrow
|
|
352
|
-
})
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Remove a file or directory asynchronously.
|
|
357
|
-
* @param {import('fs').PathLike} filepath - Path to remove.
|
|
358
|
-
* @param {import('fs').RmOptions} [options] - Remove options.
|
|
359
|
-
* @returns {Promise<void>}
|
|
360
|
-
*/
|
|
361
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
362
|
-
async function remove(filepath, options) {
|
|
363
|
-
// Attempt to workaround occasional ENOTEMPTY errors in Windows.
|
|
364
|
-
// https://github.com/jprichardson/node-fs-extra/issues/532#issuecomment-1178360589
|
|
365
|
-
const fs = getFs()
|
|
366
|
-
await fs.promises.rm(filepath, {
|
|
367
|
-
__proto__: null,
|
|
368
|
-
...defaultRemoveOptions,
|
|
369
|
-
...options
|
|
370
|
-
})
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Remove a file or directory synchronously.
|
|
375
|
-
* @param {import('fs').PathLike} filepath - Path to remove.
|
|
376
|
-
* @param {import('fs').RmOptions} [options] - Remove options.
|
|
377
|
-
* @returns {void}
|
|
378
|
-
*/
|
|
379
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
380
|
-
function removeSync(filepath, options) {
|
|
381
|
-
const fs = getFs()
|
|
382
|
-
fs.rmSync(filepath, {
|
|
383
|
-
__proto__: null,
|
|
384
|
-
...defaultRemoveOptions,
|
|
385
|
-
...options
|
|
386
|
-
})
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Safely read a file asynchronously, returning undefined on error.
|
|
391
|
-
* @param {import('fs').PathLike | import('fs/promises').FileHandle} filepath - Path to the file.
|
|
392
|
-
* @param {import('fs').ReadFileOptions | string} [options] - Read options or encoding.
|
|
393
|
-
* @returns {Promise<string | undefined>} The file contents or undefined if read fails.
|
|
394
|
-
*/
|
|
395
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
396
|
-
async function safeReadFile(filepath, options) {
|
|
397
|
-
const fs = getFs()
|
|
398
|
-
try {
|
|
399
|
-
return await fs.promises.readFile(filepath, {
|
|
400
|
-
encoding: 'utf8',
|
|
401
|
-
signal: /*@__PURE__*/ require('./constants/abort-signal'),
|
|
402
|
-
...(typeof options === 'string' ? { encoding: options } : options)
|
|
403
|
-
})
|
|
404
|
-
} catch {}
|
|
405
|
-
return undefined
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* Safely get file stats synchronously, returning undefined on error.
|
|
410
|
-
* @param {import('fs').PathLike} filepath - Path to stat.
|
|
411
|
-
* @param {import('fs').StatSyncOptions} [options] - Stat options.
|
|
412
|
-
* @returns {import('fs').Stats | undefined} File stats or undefined if stat fails.
|
|
413
|
-
*/
|
|
414
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
415
|
-
function safeStatsSync(filepath, options) {
|
|
416
|
-
const fs = getFs()
|
|
417
|
-
try {
|
|
418
|
-
return fs.statSync(filepath, {
|
|
419
|
-
__proto__: null,
|
|
420
|
-
throwIfNoEntry: false,
|
|
421
|
-
...options
|
|
422
|
-
})
|
|
423
|
-
} catch {}
|
|
424
|
-
return undefined
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Safely read a file synchronously, returning undefined on error.
|
|
429
|
-
* @param {import('fs').PathOrFileDescriptor} filepath - Path to the file.
|
|
430
|
-
* @param {import('fs').ReadFileOptions | string} [options] - Read options or encoding.
|
|
431
|
-
* @returns {string | Buffer | undefined} The file contents or undefined if read fails.
|
|
432
|
-
*/
|
|
433
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
434
|
-
function safeReadFileSync(filepath, options) {
|
|
435
|
-
const fs = getFs()
|
|
436
|
-
try {
|
|
437
|
-
return fs.readFileSync(filepath, {
|
|
438
|
-
__proto__: null,
|
|
439
|
-
encoding: 'utf8',
|
|
440
|
-
...(typeof options === 'string' ? { encoding: options } : options)
|
|
441
|
-
})
|
|
442
|
-
} catch {}
|
|
443
|
-
return undefined
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Stringify JSON with custom formatting options.
|
|
448
|
-
* @param {any} json - The JSON object to stringify.
|
|
449
|
-
* @param {string} [EOL='\n'] - End of line character.
|
|
450
|
-
* @param {boolean} [finalEOL=true] - Whether to add final EOL.
|
|
451
|
-
* @param {Function | null} [replacer=null] - JSON replacer function.
|
|
452
|
-
* @param {number | string} [spaces=2] - Indentation spaces.
|
|
453
|
-
* @returns {string} The formatted JSON string.
|
|
454
|
-
*/
|
|
455
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
456
|
-
function stringify(
|
|
457
|
-
json,
|
|
458
|
-
EOL = '\n',
|
|
459
|
-
finalEOL = true,
|
|
460
|
-
replacer = null,
|
|
461
|
-
spaces = 2
|
|
462
|
-
) {
|
|
463
|
-
const EOF = finalEOL ? EOL : ''
|
|
464
|
-
const str = JSON.stringify(json, replacer, spaces)
|
|
465
|
-
return `${str.replace(/\n/g, EOL)}${EOF}`
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Generate a unique filepath by prepending underscores if the path exists.
|
|
470
|
-
* @param {import('fs').PathLike} filepath - The desired filepath.
|
|
471
|
-
* @returns {string} A unique filepath that doesn't exist.
|
|
472
|
-
*/
|
|
473
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
474
|
-
function uniqueSync(filepath) {
|
|
475
|
-
const fs = getFs()
|
|
476
|
-
const path = getPath()
|
|
477
|
-
const dirname = path.dirname(filepath)
|
|
478
|
-
let basename = path.basename(filepath)
|
|
479
|
-
while (fs.existsSync(`${dirname}/${basename}`)) {
|
|
480
|
-
basename = `_${basename}`
|
|
481
|
-
}
|
|
482
|
-
return path.join(dirname, basename)
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Write JSON content to a file asynchronously with formatting.
|
|
487
|
-
* @param {import('fs').PathLike} filepath - Path to write to.
|
|
488
|
-
* @param {any} jsonContent - The JSON content to write.
|
|
489
|
-
* @param {WriteJsonOptions} [options] - Write and format options.
|
|
490
|
-
* @returns {Promise<void>}
|
|
491
|
-
* @typedef {{EOL?: string; finalEOL?: boolean; replacer?: Function; spaces?: number | string} & import('fs').WriteFileOptions} WriteJsonOptions
|
|
492
|
-
*/
|
|
493
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
494
|
-
async function writeJson(filepath, jsonContent, options) {
|
|
495
|
-
if (typeof options === 'string') {
|
|
496
|
-
options = { encoding: options }
|
|
497
|
-
}
|
|
498
|
-
const { EOL, finalEOL, replacer, spaces, ...fsOptions } = {
|
|
499
|
-
__proto__: null,
|
|
500
|
-
...options
|
|
501
|
-
}
|
|
502
|
-
const fs = getFs()
|
|
503
|
-
const jsonString = stringify(jsonContent, EOL, finalEOL, replacer, spaces)
|
|
504
|
-
await fs.promises.writeFile(filepath, jsonString, {
|
|
505
|
-
__proto__: null,
|
|
506
|
-
encoding: 'utf8',
|
|
507
|
-
...fsOptions
|
|
508
|
-
})
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Write JSON content to a file synchronously with formatting.
|
|
513
|
-
* @param {import('fs').PathLike} filepath - Path to write to.
|
|
514
|
-
* @param {any} jsonContent - The JSON content to write.
|
|
515
|
-
* @param {WriteJsonOptions} [options] - Write and format options.
|
|
516
|
-
* @returns {void}
|
|
517
|
-
*/
|
|
518
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
519
|
-
function writeJsonSync(filepath, jsonContent, options) {
|
|
520
|
-
if (typeof options === 'string') {
|
|
521
|
-
options = { encoding: options }
|
|
522
|
-
}
|
|
523
|
-
const { EOL, finalEOL, replacer, spaces, ...fsOptions } = {
|
|
524
|
-
__proto__: null,
|
|
525
|
-
...options
|
|
526
|
-
}
|
|
527
|
-
const fs = getFs()
|
|
528
|
-
const jsonString = stringify(jsonContent, EOL, finalEOL, replacer, spaces)
|
|
529
|
-
fs.writeFileSync(filepath, jsonString, {
|
|
530
|
-
__proto__: null,
|
|
531
|
-
encoding: 'utf8',
|
|
532
|
-
...fsOptions
|
|
533
|
-
})
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
module.exports = {
|
|
537
|
-
findUp,
|
|
538
|
-
findUpSync,
|
|
539
|
-
isDirSync,
|
|
540
|
-
isDirEmptySync,
|
|
541
|
-
isSymLinkSync,
|
|
542
|
-
readDirNames,
|
|
543
|
-
readDirNamesSync,
|
|
544
|
-
readFileBinary,
|
|
545
|
-
readFileUtf8,
|
|
546
|
-
readJson,
|
|
547
|
-
readJsonSync,
|
|
548
|
-
remove,
|
|
549
|
-
removeSync,
|
|
550
|
-
safeReadFile,
|
|
551
|
-
safeReadFileSync,
|
|
552
|
-
safeStatsSync,
|
|
553
|
-
uniqueSync,
|
|
554
|
-
writeJson,
|
|
555
|
-
writeJsonSync
|
|
556
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Wrap an async function to silently catch and ignore errors.
|
|
5
|
-
* @param {Function} fn - The async function to wrap.
|
|
6
|
-
* @returns {Function} The wrapped async function that returns undefined on error.
|
|
7
|
-
*/
|
|
8
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
9
|
-
function silentWrapAsync(fn) {
|
|
10
|
-
return async (...args) => {
|
|
11
|
-
try {
|
|
12
|
-
return await fn(...args)
|
|
13
|
-
} catch {}
|
|
14
|
-
return undefined
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
module.exports = {
|
|
19
|
-
silentWrapAsync
|
|
20
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { freeze: ObjectFreeze } = Object
|
|
4
|
-
|
|
5
|
-
const defaultIgnore = ObjectFreeze([
|
|
6
|
-
// Most of these ignored files can be included specifically if included in the
|
|
7
|
-
// files globs. Exceptions to this are:
|
|
8
|
-
// https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files
|
|
9
|
-
// These can NOT be included.
|
|
10
|
-
// https://github.com/npm/npm-packlist/blob/v10.0.0/lib/index.js#L280
|
|
11
|
-
'**/.git',
|
|
12
|
-
'**/.npmrc',
|
|
13
|
-
// '**/bun.lockb?',
|
|
14
|
-
'**/node_modules',
|
|
15
|
-
// '**/package-lock.json',
|
|
16
|
-
// '**/pnpm-lock.ya?ml',
|
|
17
|
-
// '**/yarn.lock',
|
|
18
|
-
// Include npm-packlist defaults:
|
|
19
|
-
// https://github.com/npm/npm-packlist/blob/v10.0.0/lib/index.js#L15-L38
|
|
20
|
-
'**/.DS_Store',
|
|
21
|
-
'**/.gitignore',
|
|
22
|
-
'**/.hg',
|
|
23
|
-
'**/.lock-wscript',
|
|
24
|
-
'**/.npmignore',
|
|
25
|
-
'**/.svn',
|
|
26
|
-
'**/.wafpickle-*',
|
|
27
|
-
'**/.*.swp',
|
|
28
|
-
'**/._*/**',
|
|
29
|
-
'**/archived-packages/**',
|
|
30
|
-
'**/build/config.gypi',
|
|
31
|
-
'**/CVS',
|
|
32
|
-
'**/npm-debug.log',
|
|
33
|
-
'**/*.orig',
|
|
34
|
-
// Inline generic socket-registry .gitignore entries.
|
|
35
|
-
'**/.env',
|
|
36
|
-
'**/.eslintcache',
|
|
37
|
-
'**/.nvm',
|
|
38
|
-
'**/.tap',
|
|
39
|
-
'**/.vscode',
|
|
40
|
-
'**/*.tsbuildinfo',
|
|
41
|
-
'**/Thumbs.db',
|
|
42
|
-
// Inline additional ignores.
|
|
43
|
-
'**/bower_components'
|
|
44
|
-
])
|
|
45
|
-
|
|
46
|
-
let _picomatch
|
|
47
|
-
/**
|
|
48
|
-
* Lazily load the picomatch module.
|
|
49
|
-
* @returns {import('picomatch')} The picomatch module.
|
|
50
|
-
* @private
|
|
51
|
-
*/
|
|
52
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
53
|
-
function getPicomatch() {
|
|
54
|
-
if (_picomatch === undefined) {
|
|
55
|
-
// The 'picomatch' package is browser safe.
|
|
56
|
-
_picomatch = /*@__PURE__*/ require('../external/picomatch')
|
|
57
|
-
}
|
|
58
|
-
return _picomatch
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
let _fastGlob
|
|
62
|
-
/**
|
|
63
|
-
* Lazily load the fast-glob module.
|
|
64
|
-
* @returns {import('fast-glob')} The fast-glob module.
|
|
65
|
-
* @private
|
|
66
|
-
*/
|
|
67
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
68
|
-
function getFastGlob() {
|
|
69
|
-
if (_fastGlob === undefined) {
|
|
70
|
-
_fastGlob = /*@__PURE__*/ require('../external/fast-glob')
|
|
71
|
-
}
|
|
72
|
-
return _fastGlob
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Create a stream of license file paths matching glob patterns.
|
|
77
|
-
* @param {string} dirname - The directory to search in.
|
|
78
|
-
* @param {{ignore?: string[]; ignoreOriginals?: boolean; recursive?: boolean}} [options] - Glob options.
|
|
79
|
-
* @returns {import('stream').Stream} Stream of matching file paths.
|
|
80
|
-
*/
|
|
81
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
82
|
-
function globStreamLicenses(dirname, options) {
|
|
83
|
-
const {
|
|
84
|
-
ignore: ignoreOpt,
|
|
85
|
-
ignoreOriginals,
|
|
86
|
-
recursive,
|
|
87
|
-
...globOptions
|
|
88
|
-
} = { __proto__: null, ...options }
|
|
89
|
-
const ignore = [
|
|
90
|
-
...(Array.isArray(ignoreOpt) ? ignoreOpt : defaultIgnore),
|
|
91
|
-
'**/*.{cjs,cts,js,json,mjs,mts,ts}'
|
|
92
|
-
]
|
|
93
|
-
if (ignoreOriginals) {
|
|
94
|
-
ignore.push(
|
|
95
|
-
/*@__PURE__*/ require('./constants/license-original-glob-recursive')
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
const fastGlob = getFastGlob()
|
|
99
|
-
return fastGlob.globStream(
|
|
100
|
-
[
|
|
101
|
-
recursive
|
|
102
|
-
? /*@__PURE__*/ require('./constants/license-glob-recursive')
|
|
103
|
-
: /*@__PURE__*/ require('./constants/license-glob')
|
|
104
|
-
],
|
|
105
|
-
{
|
|
106
|
-
__proto__: null,
|
|
107
|
-
absolute: true,
|
|
108
|
-
caseSensitiveMatch: false,
|
|
109
|
-
cwd: dirname,
|
|
110
|
-
...globOptions,
|
|
111
|
-
...(ignore ? { ignore } : {})
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const matcherCache = new Map()
|
|
117
|
-
/**
|
|
118
|
-
* Get a cached glob matcher function.
|
|
119
|
-
* @param {string | string[]} glob - Glob pattern(s) to match.
|
|
120
|
-
* @param {Object} [options] - Picomatch options.
|
|
121
|
-
* @returns {Function} The glob matcher function.
|
|
122
|
-
*/
|
|
123
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
124
|
-
function getGlobMatcher(glob, options) {
|
|
125
|
-
const patterns = Array.isArray(glob) ? glob : [glob]
|
|
126
|
-
const key = JSON.stringify({ patterns, options })
|
|
127
|
-
let matcher = matcherCache.get(key)
|
|
128
|
-
if (matcher) {
|
|
129
|
-
return matcher
|
|
130
|
-
}
|
|
131
|
-
const picomatch = getPicomatch()
|
|
132
|
-
matcher = picomatch(patterns, {
|
|
133
|
-
dot: true,
|
|
134
|
-
nocase: true,
|
|
135
|
-
...options
|
|
136
|
-
})
|
|
137
|
-
matcherCache.set(key, matcher)
|
|
138
|
-
return matcher
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
module.exports = {
|
|
142
|
-
defaultIgnore,
|
|
143
|
-
getGlobMatcher,
|
|
144
|
-
globStreamLicenses
|
|
145
|
-
}
|