@socketsecurity/cli-with-sentry 0.15.10 → 0.15.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +6 -6
- package/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/cli.js +5731 -6607
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +274 -305
- package/dist/constants.js.map +1 -1
- package/dist/instrument-with-sentry.js +28 -34
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/shadow-bin.js +96 -123
- package/dist/shadow-bin.js.map +1 -1
- package/dist/shadow-inject.js +470 -580
- package/dist/shadow-inject.js.map +1 -1
- package/dist/socket-completion.bash +221 -0
- package/dist/types/cli.d.mts +2 -2
- package/dist/types/commands/analytics/cmd-analytics.d.mts +9 -15
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts +4 -6
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +4 -7
- package/dist/types/commands/analytics/handle-analytics.d.mts +9 -15
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +1 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +26 -46
- package/dist/types/commands/analytics/output-analytics.d.mts.map +1 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +9 -15
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts +10 -16
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +1 -1
- package/dist/types/commands/audit-log/handle-audit-log.d.mts +9 -15
- package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +1 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts +22 -47
- package/dist/types/commands/audit-log/output-audit-log.d.mts.map +1 -1
- package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts +9 -15
- package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts.map +1 -1
- package/dist/types/commands/cdxgen/handle-cdxgen.d.mts +4 -0
- package/dist/types/commands/cdxgen/handle-cdxgen.d.mts.map +1 -0
- package/dist/types/commands/ci/cmd-ci.d.mts +9 -15
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts +3 -3
- package/dist/types/commands/ci/handle-ci.d.mts +2 -2
- package/dist/types/commands/config/cmd-config-auto.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-get.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-list.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-set.d.mts +9 -15
- package/dist/types/commands/config/cmd-config-unset.d.mts +9 -15
- package/dist/types/commands/config/cmd-config.d.mts +3 -3
- package/dist/types/commands/config/discover-config-value.d.mts +3 -5
- package/dist/types/commands/config/discover-config-value.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-auto.d.mts +7 -10
- package/dist/types/commands/config/handle-config-auto.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-get.d.mts +7 -10
- package/dist/types/commands/config/handle-config-get.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-set.d.mts +8 -12
- package/dist/types/commands/config/handle-config-set.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-unset.d.mts +7 -10
- package/dist/types/commands/config/handle-config-unset.d.mts.map +1 -1
- package/dist/types/commands/config/output-config-auto.d.mts +4 -8
- package/dist/types/commands/config/output-config-get.d.mts +4 -8
- package/dist/types/commands/config/output-config-list.d.mts +6 -9
- package/dist/types/commands/config/output-config-list.d.mts.map +1 -1
- package/dist/types/commands/config/output-config-set.d.mts +3 -6
- package/dist/types/commands/config/output-config-unset.d.mts +3 -6
- package/dist/types/commands/dependencies/cmd-dependencies.d.mts +9 -15
- package/dist/types/commands/dependencies/fetch-dependencies.d.mts +7 -10
- package/dist/types/commands/dependencies/fetch-dependencies.d.mts.map +1 -1
- package/dist/types/commands/dependencies/handle-dependencies.d.mts +7 -11
- package/dist/types/commands/dependencies/handle-dependencies.d.mts.map +1 -1
- package/dist/types/commands/dependencies/output-dependencies.d.mts +8 -15
- package/dist/types/commands/dependencies/output-dependencies.d.mts.map +1 -1
- package/dist/types/commands/diff-scan/cmd-diff-scan-get.d.mts +9 -15
- package/dist/types/commands/diff-scan/cmd-diff-scan.d.mts +3 -3
- package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts +8 -12
- package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/diff-scan/handle-diff-scan.d.mts +10 -17
- package/dist/types/commands/diff-scan/handle-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/diff-scan/output-diff-scan.d.mts +8 -15
- package/dist/types/commands/diff-scan/output-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +9 -15
- package/dist/types/commands/fix/git.d.mts +14 -49
- package/dist/types/commands/fix/npm-fix.d.mts +4 -16
- package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/open-pr.d.mts +20 -46
- package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts +4 -16
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/run-fix.d.mts +3 -3
- package/dist/types/commands/fix/shared.d.mts +9 -15
- package/dist/types/commands/fix/types.d.mts +16 -16
- package/dist/types/commands/info/cmd-info.d.mts +9 -15
- package/dist/types/commands/info/fetch-package-info.d.mts +3 -7
- package/dist/types/commands/info/handle-package-info.d.mts +15 -22
- package/dist/types/commands/info/handle-package-info.d.mts.map +1 -1
- package/dist/types/commands/info/output-package-info.d.mts +10 -18
- package/dist/types/commands/info/output-package-info.d.mts.map +1 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +10 -0
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +1 -0
- package/dist/types/commands/install/cmd-install.d.mts +3 -0
- package/dist/types/commands/install/cmd-install.d.mts.map +1 -0
- package/dist/types/commands/install/handle-install-completion.d.mts +2 -0
- package/dist/types/commands/install/handle-install-completion.d.mts.map +1 -0
- package/dist/types/commands/install/output-install-completion.d.mts +12 -0
- package/dist/types/commands/install/output-install-completion.d.mts.map +1 -0
- package/dist/types/commands/install/setup-tab-completion.d.mts +13 -0
- package/dist/types/commands/install/setup-tab-completion.d.mts.map +1 -0
- package/dist/types/commands/login/apply-login.d.mts +2 -7
- package/dist/types/commands/login/attempt-login.d.mts +2 -5
- package/dist/types/commands/login/attempt-login.d.mts.map +1 -1
- package/dist/types/commands/login/cmd-login.d.mts +9 -15
- package/dist/types/commands/logout/apply-logout.d.mts +2 -2
- package/dist/types/commands/logout/attempt-logout.d.mts +2 -2
- package/dist/types/commands/logout/cmd-logout.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +10 -0
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +1 -0
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest.d.mts +9 -15
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +7 -15
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +2 -8
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +2 -8
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts +3 -9
- package/dist/types/commands/manifest/output-requirements.d.mts +6 -10
- package/dist/types/commands/{cdxgen → manifest}/run-cdxgen.d.mts +2 -2
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +1 -0
- package/dist/types/commands/npm/cmd-npm.d.mts +9 -15
- package/dist/types/commands/npx/cmd-npx.d.mts +9 -15
- package/dist/types/commands/oops/cmd-oops.d.mts +9 -15
- package/dist/types/commands/optimize/add-overrides.d.mts +18 -22
- package/dist/types/commands/optimize/apply-optimization.d.mts +2 -6
- package/dist/types/commands/optimize/cmd-optimize.d.mts +9 -15
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +4 -7
- package/dist/types/commands/optimize/get-dependency-entries.d.mts +3 -5
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +8 -11
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +3 -10
- package/dist/types/commands/optimize/ls-by-agent.d.mts +6 -13
- package/dist/types/commands/optimize/shared.d.mts +2 -2
- package/dist/types/commands/optimize/types.d.mts +7 -7
- package/dist/types/commands/optimize/update-lockfile.d.mts +9 -12
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +5 -11
- package/dist/types/commands/organization/cmd-organization-list.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization-policy.d.mts +3 -3
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +9 -15
- package/dist/types/commands/organization/cmd-organization.d.mts +3 -3
- package/dist/types/commands/organization/fetch-license-policy.d.mts +4 -6
- package/dist/types/commands/organization/fetch-organization-list.d.mts +4 -6
- package/dist/types/commands/organization/fetch-quota.d.mts +4 -6
- package/dist/types/commands/organization/fetch-security-policy.d.mts +4 -6
- package/dist/types/commands/organization/handle-license-policy.d.mts +3 -6
- package/dist/types/commands/organization/handle-organization-list.d.mts +3 -5
- package/dist/types/commands/organization/handle-quota.d.mts +3 -3
- package/dist/types/commands/organization/handle-security-policy.d.mts +3 -6
- package/dist/types/commands/organization/output-license-policy.d.mts +4 -7
- package/dist/types/commands/organization/output-organization-list.d.mts +4 -7
- package/dist/types/commands/organization/output-quota.d.mts +4 -7
- package/dist/types/commands/organization/output-security-policy.d.mts +4 -7
- package/dist/types/commands/package/cmd-package-score.d.mts +9 -15
- package/dist/types/commands/package/cmd-package-shallow.d.mts +16 -22
- package/dist/types/commands/package/cmd-package.d.mts +3 -3
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts +49 -51
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +4 -6
- package/dist/types/commands/package/handle-purl-deep-score.d.mts +3 -6
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts +6 -9
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +1 -1
- package/dist/types/commands/package/output-purl-score.d.mts +4 -8
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +4 -8
- package/dist/types/commands/package/parse-package-specifiers.d.mts +5 -8
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +9 -15
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts +2 -4
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +9 -15
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts +2 -4
- package/dist/types/commands/report/cmd-report-create.d.mts +9 -15
- package/dist/types/commands/report/cmd-report-view.d.mts +9 -15
- package/dist/types/commands/report/cmd-report.d.mts +3 -3
- package/dist/types/commands/repos/cmd-repos-create.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-del.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-list.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-update.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos-view.d.mts +9 -15
- package/dist/types/commands/repos/cmd-repos.d.mts +3 -3
- package/dist/types/commands/repos/fetch-create-repo.d.mts +11 -18
- package/dist/types/commands/repos/fetch-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-delete-repo.d.mts +4 -7
- package/dist/types/commands/repos/fetch-list-repos.d.mts +10 -16
- package/dist/types/commands/repos/fetch-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-update-repo.d.mts +11 -18
- package/dist/types/commands/repos/fetch-update-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-view-repo.d.mts +4 -7
- package/dist/types/commands/repos/handle-create-repo.d.mts +10 -20
- package/dist/types/commands/repos/handle-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/handle-delete-repo.d.mts +3 -7
- package/dist/types/commands/repos/handle-list-repos.d.mts +10 -17
- package/dist/types/commands/repos/handle-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repos/handle-update-repo.d.mts +10 -20
- package/dist/types/commands/repos/handle-update-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/handle-view-repo.d.mts +3 -7
- package/dist/types/commands/repos/output-create-repo.d.mts +4 -8
- package/dist/types/commands/repos/output-delete-repo.d.mts +4 -8
- package/dist/types/commands/repos/output-list-repos.d.mts +4 -7
- package/dist/types/commands/repos/output-update-repo.d.mts +4 -8
- package/dist/types/commands/repos/output-view-repo.d.mts +4 -7
- package/dist/types/commands/scan/cmd-scan-create.d.mts +9 -15
- package/dist/types/commands/scan/cmd-scan-del.d.mts +9 -15
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +9 -15
- package/dist/types/commands/scan/cmd-scan-list.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan-report.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan-view.d.mts +3 -3
- package/dist/types/commands/scan/cmd-scan.d.mts +3 -3
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +11 -26
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +4 -7
- package/dist/types/commands/scan/fetch-diff-scan.d.mts +8 -12
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +13 -22
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +8 -14
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +4 -7
- package/dist/types/commands/scan/fetch-scan.d.mts +4 -7
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +4 -6
- package/dist/types/commands/scan/generate-report.d.mts +36 -50
- package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts +20 -37
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts +3 -7
- package/dist/types/commands/scan/handle-diff-scan.d.mts +10 -17
- package/dist/types/commands/scan/handle-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts +13 -23
- package/dist/types/commands/scan/handle-list-scans.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts +3 -7
- package/dist/types/commands/scan/handle-scan-report.d.mts +12 -21
- package/dist/types/commands/scan/handle-scan-report.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts +3 -8
- package/dist/types/commands/scan/output-create-new-scan.d.mts +4 -8
- package/dist/types/commands/scan/output-delete-scan.d.mts +4 -7
- package/dist/types/commands/scan/output-diff-scan.d.mts +8 -15
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +4 -7
- package/dist/types/commands/scan/output-scan-metadata.d.mts +4 -8
- package/dist/types/commands/scan/output-scan-report.d.mts +20 -38
- package/dist/types/commands/scan/output-scan-report.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +4 -10
- package/dist/types/commands/scan/stream-scan.d.mts +2 -6
- package/dist/types/commands/scan/suggest-org-slug.d.mts +2 -2
- package/dist/types/commands/scan/suggest-repo-slug.d.mts +4 -4
- package/dist/types/commands/scan/suggest_branch_slug.d.mts +2 -4
- package/dist/types/commands/scan/suggest_target.d.mts +2 -2
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +9 -15
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +10 -16
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +10 -17
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts +4 -7
- package/dist/types/commands/threat-feed/types.d.mts +12 -12
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +9 -0
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +1 -0
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts +3 -0
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +1 -0
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +2 -0
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +1 -0
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +6 -0
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +1 -0
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +6 -0
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +1 -0
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +2 -2
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +2 -2
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +9 -15
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +2 -2
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +1 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +2 -2
- package/dist/types/constants.d.mts +125 -135
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/flags.d.mts +14 -17
- package/dist/types/flags.d.mts.map +1 -1
- package/dist/types/instrument-with-sentry.d.mts +2 -2
- package/dist/types/shadow/npm/arborist/index.d.mts +2 -2
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +19 -24
- package/dist/types/shadow/npm/arborist/lib/arborist/types.d.mts +43 -71
- package/dist/types/shadow/npm/arborist/lib/dep-valid.d.mts +3 -8
- package/dist/types/shadow/npm/arborist/lib/edge.d.mts +58 -71
- package/dist/types/shadow/npm/arborist/lib/node.d.mts +55 -91
- package/dist/types/shadow/npm/arborist/lib/override-set.d.mts +26 -32
- package/dist/types/shadow/npm/arborist-helpers.d.mts +33 -66
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
- package/dist/types/shadow/npm/bin.d.mts +2 -5
- package/dist/types/shadow/npm/inject.d.mts +2 -2
- package/dist/types/shadow/npm/install.d.mts +11 -16
- package/dist/types/shadow/npm/link.d.mts +2 -5
- package/dist/types/shadow/npm/paths.d.mts +7 -7
- package/dist/types/shadow/npm/proc-log/index.d.mts +3 -6
- package/dist/types/types.d.mts +15 -17
- package/dist/types/utils/agent.d.mts +11 -14
- package/dist/types/utils/alert/artifact.d.mts +32 -50
- package/dist/types/utils/alert/fix.d.mts +5 -5
- package/dist/types/utils/alert/severity.d.mts +12 -24
- package/dist/types/utils/alerts-map.d.mts +23 -36
- package/dist/types/utils/api.d.mts +11 -34
- package/dist/types/utils/check-input.d.mts +9 -12
- package/dist/types/utils/cmd.d.mts +4 -4
- package/dist/types/utils/color-or-markdown.d.mts +14 -23
- package/dist/types/utils/color-or-markdown.d.mts.map +1 -1
- package/dist/types/utils/completion.d.mts +11 -0
- package/dist/types/utils/completion.d.mts.map +1 -0
- package/dist/types/utils/config.d.mts +22 -31
- package/dist/types/utils/config.d.mts.map +1 -1
- package/dist/types/utils/determine-org-slug.d.mts +2 -7
- package/dist/types/utils/errors.d.mts +12 -21
- package/dist/types/utils/fail-msg-with-badge.d.mts +2 -5
- package/dist/types/utils/fs.d.mts +21 -52
- package/dist/types/utils/get-output-kind.d.mts +3 -6
- package/dist/types/utils/glob.d.mts +13 -24
- package/dist/types/utils/map-to-object.d.mts +4 -6
- package/dist/types/utils/markdown.d.mts +4 -15
- package/dist/types/utils/meow-with-subcommands.d.mts +34 -46
- package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
- package/dist/types/utils/npm-paths.d.mts +7 -7
- package/dist/types/utils/npm-paths.d.mts.map +1 -1
- package/dist/types/utils/objects.d.mts +3 -8
- package/dist/types/utils/output-formatting.d.mts +14 -24
- package/dist/types/utils/package-environment.d.mts +51 -72
- package/dist/types/utils/package-environment.d.mts.map +1 -1
- package/dist/types/utils/path-resolve.d.mts +9 -14
- package/dist/types/utils/pnpm.d.mts +9 -7
- package/dist/types/utils/pnpm.d.mts.map +1 -1
- package/dist/types/utils/sdk.d.mts +8 -12
- package/dist/types/utils/semver.d.mts +5 -17
- package/dist/types/utils/serialize-result-json.d.mts +3 -3
- package/dist/types/utils/socket-package-alert.d.mts +62 -81
- package/dist/types/utils/socket-url.d.mts +9 -15
- package/dist/types/utils/spec.d.mts +4 -7
- package/dist/types/utils/spec.d.mts.map +1 -1
- package/dist/types/utils/strings.d.mts +2 -5
- package/dist/types/utils/translations.d.mts +592 -592
- package/dist/types/utils/walk-nested-map.d.mts +7 -10
- package/dist/utils.js +1531 -1833
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +38333 -51605
- package/dist/vendor.js.map +1 -1
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +5 -8
- package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +2 -4
- package/external/@socketsecurity/registry/external/cacache.js +1 -2
- package/external/@socketsecurity/registry/external/libnpmpack.js +36 -76
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +31 -67
- package/external/@socketsecurity/registry/external/pacote.js +36 -76
- package/external/@socketsecurity/registry/external/tinyglobby.js +3 -6
- package/external/@socketsecurity/registry/external/which.js +2 -4
- package/external/@socketsecurity/registry/lib/logger.d.ts +4 -1
- package/external/@socketsecurity/registry/lib/logger.js +160 -73
- package/external/@socketsecurity/registry/lib/spinner.js +5 -1
- package/external/@socketsecurity/registry/package.json +2 -2
- package/external/blessed/lib/alias.js +475 -468
- package/external/blessed/lib/blessed.js +12 -12
- package/external/blessed/lib/colors.js +234 -194
- package/external/blessed/lib/events.js +64 -70
- package/external/blessed/lib/gpmclient.js +117 -141
- package/external/blessed/lib/helpers.js +89 -94
- package/external/blessed/lib/keys.js +169 -342
- package/external/blessed/lib/program.js +2130 -2365
- package/external/blessed/lib/tput.js +1183 -1276
- package/external/blessed/lib/unicode.js +400 -522
- package/external/blessed/lib/widget.js +14 -14
- package/external/blessed/lib/widgets/ansiimage.js +90 -96
- package/external/blessed/lib/widgets/bigtext.js +91 -102
- package/external/blessed/lib/widgets/box.js +8 -8
- package/external/blessed/lib/widgets/button.js +23 -23
- package/external/blessed/lib/widgets/checkbox.js +50 -54
- package/external/blessed/lib/widgets/element.js +1415 -1716
- package/external/blessed/lib/widgets/filemanager.js +107 -118
- package/external/blessed/lib/widgets/form.js +144 -178
- package/external/blessed/lib/widgets/image.js +26 -36
- package/external/blessed/lib/widgets/input.js +8 -8
- package/external/blessed/lib/widgets/layout.js +103 -119
- package/external/blessed/lib/widgets/line.js +17 -20
- package/external/blessed/lib/widgets/list.js +349 -402
- package/external/blessed/lib/widgets/listbar.js +265 -306
- package/external/blessed/lib/widgets/listtable.js +133 -146
- package/external/blessed/lib/widgets/loading.js +31 -31
- package/external/blessed/lib/widgets/log.js +41 -40
- package/external/blessed/lib/widgets/message.js +64 -86
- package/external/blessed/lib/widgets/node.js +175 -207
- package/external/blessed/lib/widgets/overlayimage.js +360 -437
- package/external/blessed/lib/widgets/progressbar.js +79 -88
- package/external/blessed/lib/widgets/prompt.js +54 -61
- package/external/blessed/lib/widgets/question.js +48 -61
- package/external/blessed/lib/widgets/radiobutton.js +26 -27
- package/external/blessed/lib/widgets/radioset.js +8 -8
- package/external/blessed/lib/widgets/screen.js +1186 -1375
- package/external/blessed/lib/widgets/scrollablebox.js +202 -228
- package/external/blessed/lib/widgets/scrollabletext.js +9 -9
- package/external/blessed/lib/widgets/table.js +187 -216
- package/external/blessed/lib/widgets/terminal.js +258 -298
- package/external/blessed/lib/widgets/text.js +9 -9
- package/external/blessed/lib/widgets/textarea.js +188 -222
- package/external/blessed/lib/widgets/textbox.js +34 -36
- package/external/blessed/lib/widgets/video.js +55 -59
- package/external/blessed/usr/fonts/ter-u14b.json +1 -1
- package/external/blessed/usr/fonts/ter-u14n.json +1 -1
- package/external/blessed/vendor/tng.js +1016 -1144
- package/external/blessed-contrib/lib/layout/grid.js +345 -377
- package/external/blessed-contrib/lib/widget/charts/bar.js +6612 -7139
- package/external/blessed-contrib/lib/widget/charts/line.js +16224 -23941
- package/external/blessed-contrib/lib/widget/table.js +78 -96
- package/package.json +9 -9
- package/dist/types/commands/cdxgen/run-cdxgen.d.mts.map +0 -1
|
@@ -11,24 +11,24 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
function blessed() {
|
|
14
|
-
return blessed.program.apply(null, arguments)
|
|
14
|
+
return blessed.program.apply(null, arguments);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
blessed.program = blessed.Program = require('./program')
|
|
18
|
-
blessed.tput = blessed.Tput = require('./tput')
|
|
19
|
-
blessed.widget = require('./widget')
|
|
20
|
-
blessed.colors = require('./colors')
|
|
21
|
-
blessed.unicode = require('./unicode')
|
|
22
|
-
blessed.helpers = require('./helpers')
|
|
17
|
+
blessed.program = blessed.Program = require('./program');
|
|
18
|
+
blessed.tput = blessed.Tput = require('./tput');
|
|
19
|
+
blessed.widget = require('./widget');
|
|
20
|
+
blessed.colors = require('./colors');
|
|
21
|
+
blessed.unicode = require('./unicode');
|
|
22
|
+
blessed.helpers = require('./helpers');
|
|
23
23
|
|
|
24
|
-
blessed.helpers.sprintf = blessed.tput.sprintf
|
|
25
|
-
blessed.helpers.tryRead = blessed.tput.tryRead
|
|
26
|
-
blessed.helpers.merge(blessed, blessed.helpers)
|
|
24
|
+
blessed.helpers.sprintf = blessed.tput.sprintf;
|
|
25
|
+
blessed.helpers.tryRead = blessed.tput.tryRead;
|
|
26
|
+
blessed.helpers.merge(blessed, blessed.helpers);
|
|
27
27
|
|
|
28
|
-
blessed.helpers.merge(blessed, blessed.widget)
|
|
28
|
+
blessed.helpers.merge(blessed, blessed.widget);
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Expose
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
module.exports = blessed
|
|
34
|
+
module.exports = blessed;
|
|
@@ -6,83 +6,84 @@
|
|
|
6
6
|
* https://github.com/chjj/blessed
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
exports.match = function
|
|
9
|
+
exports.match = function(r1, g1, b1) {
|
|
10
10
|
if (typeof r1 === 'string') {
|
|
11
|
-
|
|
11
|
+
var hex = r1;
|
|
12
12
|
if (hex[0] !== '#') {
|
|
13
|
-
return -1
|
|
13
|
+
return -1;
|
|
14
14
|
}
|
|
15
|
-
hex = exports.hexToRGB(hex)
|
|
16
|
-
|
|
15
|
+
hex = exports.hexToRGB(hex);
|
|
16
|
+
r1 = hex[0], g1 = hex[1], b1 = hex[2];
|
|
17
17
|
} else if (Array.isArray(r1)) {
|
|
18
|
-
|
|
18
|
+
b1 = r1[2], g1 = r1[1], r1 = r1[0];
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
var hash = (r1 << 16) | (g1 << 8) | b1;
|
|
22
22
|
|
|
23
23
|
if (exports._cache[hash] != null) {
|
|
24
|
-
return exports._cache[hash]
|
|
24
|
+
return exports._cache[hash];
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
li = -1
|
|
29
|
-
i = 0
|
|
30
|
-
c
|
|
31
|
-
r2
|
|
32
|
-
g2
|
|
33
|
-
b2
|
|
34
|
-
diff
|
|
27
|
+
var ldiff = Infinity
|
|
28
|
+
, li = -1
|
|
29
|
+
, i = 0
|
|
30
|
+
, c
|
|
31
|
+
, r2
|
|
32
|
+
, g2
|
|
33
|
+
, b2
|
|
34
|
+
, diff;
|
|
35
35
|
|
|
36
36
|
for (; i < exports.vcolors.length; i++) {
|
|
37
|
-
c = exports.vcolors[i]
|
|
38
|
-
r2 = c[0]
|
|
39
|
-
g2 = c[1]
|
|
40
|
-
b2 = c[2]
|
|
37
|
+
c = exports.vcolors[i];
|
|
38
|
+
r2 = c[0];
|
|
39
|
+
g2 = c[1];
|
|
40
|
+
b2 = c[2];
|
|
41
41
|
|
|
42
|
-
diff = colorDistance(r1, g1, b1, r2, g2, b2)
|
|
42
|
+
diff = colorDistance(r1, g1, b1, r2, g2, b2);
|
|
43
43
|
|
|
44
44
|
if (diff === 0) {
|
|
45
|
-
li = i
|
|
46
|
-
break
|
|
45
|
+
li = i;
|
|
46
|
+
break;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (diff < ldiff) {
|
|
50
|
-
ldiff = diff
|
|
51
|
-
li = i
|
|
50
|
+
ldiff = diff;
|
|
51
|
+
li = i;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
return
|
|
56
|
-
}
|
|
55
|
+
return exports._cache[hash] = li;
|
|
56
|
+
};
|
|
57
57
|
|
|
58
|
-
exports.RGBToHex = function
|
|
58
|
+
exports.RGBToHex = function(r, g, b) {
|
|
59
59
|
if (Array.isArray(r)) {
|
|
60
|
-
|
|
60
|
+
b = r[2], g = r[1], r = r[0];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function hex(n) {
|
|
64
|
-
n = n.toString(16)
|
|
65
|
-
if (n.length < 2)
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
return n
|
|
64
|
+
n = n.toString(16);
|
|
65
|
+
if (n.length < 2) n = '0' + n;
|
|
66
|
+
return n;
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
return '#' + hex(r) + hex(g) + hex(b)
|
|
72
|
-
}
|
|
69
|
+
return '#' + hex(r) + hex(g) + hex(b);
|
|
70
|
+
};
|
|
73
71
|
|
|
74
|
-
exports.hexToRGB = function
|
|
72
|
+
exports.hexToRGB = function(hex) {
|
|
75
73
|
if (hex.length === 4) {
|
|
76
|
-
hex = hex[0]
|
|
74
|
+
hex = hex[0]
|
|
75
|
+
+ hex[1] + hex[1]
|
|
76
|
+
+ hex[2] + hex[2]
|
|
77
|
+
+ hex[3] + hex[3];
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
r = (col >> 16) & 0xff
|
|
81
|
-
g = (col >> 8) & 0xff
|
|
82
|
-
b = col & 0xff
|
|
80
|
+
var col = parseInt(hex.substring(1), 16)
|
|
81
|
+
, r = (col >> 16) & 0xff
|
|
82
|
+
, g = (col >> 8) & 0xff
|
|
83
|
+
, b = col & 0xff;
|
|
83
84
|
|
|
84
|
-
return [r, g, b]
|
|
85
|
-
}
|
|
85
|
+
return [r, g, b];
|
|
86
|
+
};
|
|
86
87
|
|
|
87
88
|
// As it happens, comparing how similar two colors are is really hard. Here is
|
|
88
89
|
// one of the simplest solutions, which doesn't require conversion to another
|
|
@@ -91,76 +92,64 @@ exports.hexToRGB = function (hex) {
|
|
|
91
92
|
// [1] http://stackoverflow.com/questions/1633828
|
|
92
93
|
|
|
93
94
|
function colorDistance(r1, g1, b1, r2, g2, b2) {
|
|
94
|
-
return (
|
|
95
|
-
Math.pow(
|
|
96
|
-
Math.pow(
|
|
97
|
-
Math.pow(11 * (b1 - b2), 2)
|
|
98
|
-
)
|
|
95
|
+
return Math.pow(30 * (r1 - r2), 2)
|
|
96
|
+
+ Math.pow(59 * (g1 - g2), 2)
|
|
97
|
+
+ Math.pow(11 * (b1 - b2), 2);
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
// This might work well enough for a terminal's colors: treat RGB as XYZ in a
|
|
102
101
|
// 3-dimensional space and go midway between the two points.
|
|
103
|
-
exports.mixColors = function
|
|
102
|
+
exports.mixColors = function(c1, c2, alpha) {
|
|
104
103
|
// if (c1 === 0x1ff) return c1;
|
|
105
104
|
// if (c2 === 0x1ff) return c1;
|
|
106
|
-
if (c1 === 0x1ff)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (c2 === 0x1ff) {
|
|
110
|
-
c2 = 0
|
|
111
|
-
}
|
|
112
|
-
if (alpha == null) {
|
|
113
|
-
alpha = 0.5
|
|
114
|
-
}
|
|
105
|
+
if (c1 === 0x1ff) c1 = 0;
|
|
106
|
+
if (c2 === 0x1ff) c2 = 0;
|
|
107
|
+
if (alpha == null) alpha = 0.5;
|
|
115
108
|
|
|
116
|
-
c1 = exports.vcolors[c1]
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
109
|
+
c1 = exports.vcolors[c1];
|
|
110
|
+
var r1 = c1[0];
|
|
111
|
+
var g1 = c1[1];
|
|
112
|
+
var b1 = c1[2];
|
|
120
113
|
|
|
121
|
-
c2 = exports.vcolors[c2]
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
114
|
+
c2 = exports.vcolors[c2];
|
|
115
|
+
var r2 = c2[0];
|
|
116
|
+
var g2 = c2[1];
|
|
117
|
+
var b2 = c2[2];
|
|
125
118
|
|
|
126
|
-
r1 += (
|
|
127
|
-
g1 += (
|
|
128
|
-
b1 += (
|
|
119
|
+
r1 += (r2 - r1) * alpha | 0;
|
|
120
|
+
g1 += (g2 - g1) * alpha | 0;
|
|
121
|
+
b1 += (b2 - b1) * alpha | 0;
|
|
129
122
|
|
|
130
|
-
return exports.match([r1, g1, b1])
|
|
131
|
-
}
|
|
123
|
+
return exports.match([r1, g1, b1]);
|
|
124
|
+
};
|
|
132
125
|
|
|
133
126
|
exports.blend = function blend(attr, attr2, alpha) {
|
|
134
|
-
|
|
127
|
+
var name, i, c, nc;
|
|
135
128
|
|
|
136
|
-
|
|
129
|
+
var bg = attr & 0x1ff;
|
|
137
130
|
if (attr2 != null) {
|
|
138
|
-
|
|
139
|
-
if (bg === 0x1ff)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (bg2 === 0x1ff) {
|
|
143
|
-
bg2 = 0
|
|
144
|
-
}
|
|
145
|
-
bg = exports.mixColors(bg, bg2, alpha)
|
|
131
|
+
var bg2 = attr2 & 0x1ff;
|
|
132
|
+
if (bg === 0x1ff) bg = 0;
|
|
133
|
+
if (bg2 === 0x1ff) bg2 = 0;
|
|
134
|
+
bg = exports.mixColors(bg, bg2, alpha);
|
|
146
135
|
} else {
|
|
147
136
|
if (blend._cache[bg] != null) {
|
|
148
|
-
bg = blend._cache[bg]
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
bg = blend._cache[bg];
|
|
138
|
+
// } else if (bg < 8) {
|
|
139
|
+
// bg += 8;
|
|
151
140
|
} else if (bg >= 8 && bg <= 15) {
|
|
152
|
-
bg -= 8
|
|
141
|
+
bg -= 8;
|
|
153
142
|
} else {
|
|
154
|
-
name = exports.ncolors[bg]
|
|
143
|
+
name = exports.ncolors[bg];
|
|
155
144
|
if (name) {
|
|
156
145
|
for (i = 0; i < exports.ncolors.length; i++) {
|
|
157
146
|
if (name === exports.ncolors[i] && i !== bg) {
|
|
158
|
-
c = exports.vcolors[bg]
|
|
159
|
-
nc = exports.vcolors[i]
|
|
147
|
+
c = exports.vcolors[bg];
|
|
148
|
+
nc = exports.vcolors[i];
|
|
160
149
|
if (nc[0] + nc[1] + nc[2] < c[0] + c[1] + c[2]) {
|
|
161
|
-
blend._cache[bg] = i
|
|
162
|
-
bg = i
|
|
163
|
-
break
|
|
150
|
+
blend._cache[bg] = i;
|
|
151
|
+
bg = i;
|
|
152
|
+
break;
|
|
164
153
|
}
|
|
165
154
|
}
|
|
166
155
|
}
|
|
@@ -168,43 +157,39 @@ exports.blend = function blend(attr, attr2, alpha) {
|
|
|
168
157
|
}
|
|
169
158
|
}
|
|
170
159
|
|
|
171
|
-
attr &= ~0x1ff
|
|
172
|
-
attr |= bg
|
|
160
|
+
attr &= ~0x1ff;
|
|
161
|
+
attr |= bg;
|
|
173
162
|
|
|
174
|
-
|
|
163
|
+
var fg = (attr >> 9) & 0x1ff;
|
|
175
164
|
if (attr2 != null) {
|
|
176
|
-
|
|
165
|
+
var fg2 = (attr2 >> 9) & 0x1ff;
|
|
177
166
|
// 0, 7, 188, 231, 251
|
|
178
167
|
if (fg === 0x1ff) {
|
|
179
168
|
// XXX workaround
|
|
180
|
-
fg = 248
|
|
169
|
+
fg = 248;
|
|
181
170
|
} else {
|
|
182
|
-
if (fg === 0x1ff)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
if (fg2 === 0x1ff) {
|
|
186
|
-
fg2 = 7
|
|
187
|
-
}
|
|
188
|
-
fg = exports.mixColors(fg, fg2, alpha)
|
|
171
|
+
if (fg === 0x1ff) fg = 7;
|
|
172
|
+
if (fg2 === 0x1ff) fg2 = 7;
|
|
173
|
+
fg = exports.mixColors(fg, fg2, alpha);
|
|
189
174
|
}
|
|
190
175
|
} else {
|
|
191
176
|
if (blend._cache[fg] != null) {
|
|
192
|
-
fg = blend._cache[fg]
|
|
193
|
-
|
|
194
|
-
|
|
177
|
+
fg = blend._cache[fg];
|
|
178
|
+
// } else if (fg < 8) {
|
|
179
|
+
// fg += 8;
|
|
195
180
|
} else if (fg >= 8 && fg <= 15) {
|
|
196
|
-
fg -= 8
|
|
181
|
+
fg -= 8;
|
|
197
182
|
} else {
|
|
198
|
-
name = exports.ncolors[fg]
|
|
183
|
+
name = exports.ncolors[fg];
|
|
199
184
|
if (name) {
|
|
200
185
|
for (i = 0; i < exports.ncolors.length; i++) {
|
|
201
186
|
if (name === exports.ncolors[i] && i !== fg) {
|
|
202
|
-
c = exports.vcolors[fg]
|
|
203
|
-
nc = exports.vcolors[i]
|
|
187
|
+
c = exports.vcolors[fg];
|
|
188
|
+
nc = exports.vcolors[i];
|
|
204
189
|
if (nc[0] + nc[1] + nc[2] < c[0] + c[1] + c[2]) {
|
|
205
|
-
blend._cache[fg] = i
|
|
206
|
-
fg = i
|
|
207
|
-
break
|
|
190
|
+
blend._cache[fg] = i;
|
|
191
|
+
fg = i;
|
|
192
|
+
break;
|
|
208
193
|
}
|
|
209
194
|
}
|
|
210
195
|
}
|
|
@@ -212,26 +197,26 @@ exports.blend = function blend(attr, attr2, alpha) {
|
|
|
212
197
|
}
|
|
213
198
|
}
|
|
214
199
|
|
|
215
|
-
attr &= ~(0x1ff << 9)
|
|
216
|
-
attr |= fg << 9
|
|
200
|
+
attr &= ~(0x1ff << 9);
|
|
201
|
+
attr |= fg << 9;
|
|
217
202
|
|
|
218
|
-
return attr
|
|
219
|
-
}
|
|
203
|
+
return attr;
|
|
204
|
+
};
|
|
220
205
|
|
|
221
|
-
exports.blend._cache = {}
|
|
206
|
+
exports.blend._cache = {};
|
|
222
207
|
|
|
223
|
-
exports._cache = {}
|
|
208
|
+
exports._cache = {};
|
|
224
209
|
|
|
225
|
-
exports.reduce = function
|
|
210
|
+
exports.reduce = function(color, total) {
|
|
226
211
|
if (color >= 16 && total <= 16) {
|
|
227
|
-
color = exports.ccolors[color]
|
|
212
|
+
color = exports.ccolors[color];
|
|
228
213
|
} else if (color >= 8 && total <= 8) {
|
|
229
|
-
color -= 8
|
|
214
|
+
color -= 8;
|
|
230
215
|
} else if (color >= 2 && total <= 2) {
|
|
231
|
-
color %= 2
|
|
216
|
+
color %= 2;
|
|
232
217
|
}
|
|
233
|
-
return color
|
|
234
|
-
}
|
|
218
|
+
return color;
|
|
219
|
+
};
|
|
235
220
|
|
|
236
221
|
// XTerm Colors
|
|
237
222
|
// These were actually tough to track down. The xterm source only uses color
|
|
@@ -253,79 +238,80 @@ exports.xterm = [
|
|
|
253
238
|
'#5c5cff', // rgb:5c/5c/ff
|
|
254
239
|
'#ff00ff', // magenta
|
|
255
240
|
'#00ffff', // cyan
|
|
256
|
-
'#ffffff'
|
|
257
|
-
]
|
|
241
|
+
'#ffffff' // white
|
|
242
|
+
];
|
|
258
243
|
|
|
259
244
|
// Seed all 256 colors. Assume xterm defaults.
|
|
260
245
|
// Ported from the xterm color generation script.
|
|
261
|
-
exports.colors = (function
|
|
262
|
-
|
|
263
|
-
_cols =
|
|
264
|
-
r
|
|
265
|
-
g
|
|
266
|
-
b
|
|
267
|
-
i
|
|
268
|
-
l
|
|
246
|
+
exports.colors = (function() {
|
|
247
|
+
var cols = exports.colors = []
|
|
248
|
+
, _cols = exports.vcolors = []
|
|
249
|
+
, r
|
|
250
|
+
, g
|
|
251
|
+
, b
|
|
252
|
+
, i
|
|
253
|
+
, l;
|
|
269
254
|
|
|
270
255
|
function hex(n) {
|
|
271
|
-
n = n.toString(16)
|
|
272
|
-
if (n.length < 2)
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
return n
|
|
256
|
+
n = n.toString(16);
|
|
257
|
+
if (n.length < 2) n = '0' + n;
|
|
258
|
+
return n;
|
|
276
259
|
}
|
|
277
260
|
|
|
278
261
|
function push(i, r, g, b) {
|
|
279
|
-
cols[i] = '#' + hex(r) + hex(g) + hex(b)
|
|
280
|
-
_cols[i] = [r, g, b]
|
|
262
|
+
cols[i] = '#' + hex(r) + hex(g) + hex(b);
|
|
263
|
+
_cols[i] = [r, g, b];
|
|
281
264
|
}
|
|
282
265
|
|
|
283
266
|
// 0 - 15
|
|
284
|
-
exports.xterm.forEach(function
|
|
285
|
-
c = parseInt(c.substring(1), 16)
|
|
286
|
-
push(i, (c >> 16) & 0xff, (c >> 8) & 0xff, c & 0xff)
|
|
287
|
-
})
|
|
267
|
+
exports.xterm.forEach(function(c, i) {
|
|
268
|
+
c = parseInt(c.substring(1), 16);
|
|
269
|
+
push(i, (c >> 16) & 0xff, (c >> 8) & 0xff, c & 0xff);
|
|
270
|
+
});
|
|
288
271
|
|
|
289
272
|
// 16 - 231
|
|
290
273
|
for (r = 0; r < 6; r++) {
|
|
291
274
|
for (g = 0; g < 6; g++) {
|
|
292
275
|
for (b = 0; b < 6; b++) {
|
|
293
|
-
i = 16 + r * 36 + g * 6 + b
|
|
294
|
-
push(i,
|
|
276
|
+
i = 16 + (r * 36) + (g * 6) + b;
|
|
277
|
+
push(i,
|
|
278
|
+
r ? (r * 40 + 55) : 0,
|
|
279
|
+
g ? (g * 40 + 55) : 0,
|
|
280
|
+
b ? (b * 40 + 55) : 0);
|
|
295
281
|
}
|
|
296
282
|
}
|
|
297
283
|
}
|
|
298
284
|
|
|
299
285
|
// 232 - 255 are grey.
|
|
300
286
|
for (g = 0; g < 24; g++) {
|
|
301
|
-
l = g * 10 + 8
|
|
302
|
-
i = 232 + g
|
|
303
|
-
push(i, l, l, l)
|
|
287
|
+
l = (g * 10) + 8;
|
|
288
|
+
i = 232 + g;
|
|
289
|
+
push(i, l, l, l);
|
|
304
290
|
}
|
|
305
291
|
|
|
306
|
-
return cols
|
|
307
|
-
})()
|
|
292
|
+
return cols;
|
|
293
|
+
})();
|
|
308
294
|
|
|
309
295
|
// Map higher colors to the first 8 colors.
|
|
310
296
|
// This allows translation of high colors to low colors on 8-color terminals.
|
|
311
|
-
exports.ccolors = (function
|
|
312
|
-
|
|
313
|
-
cols = exports.colors.slice()
|
|
314
|
-
out
|
|
297
|
+
exports.ccolors = (function() {
|
|
298
|
+
var _cols = exports.vcolors.slice()
|
|
299
|
+
, cols = exports.colors.slice()
|
|
300
|
+
, out;
|
|
315
301
|
|
|
316
|
-
exports.vcolors = exports.vcolors.slice(0, 8)
|
|
317
|
-
exports.colors = exports.colors.slice(0, 8)
|
|
302
|
+
exports.vcolors = exports.vcolors.slice(0, 8);
|
|
303
|
+
exports.colors = exports.colors.slice(0, 8);
|
|
318
304
|
|
|
319
|
-
out = cols.map(exports.match)
|
|
305
|
+
out = cols.map(exports.match);
|
|
320
306
|
|
|
321
|
-
exports.colors = cols
|
|
322
|
-
exports.vcolors = _cols
|
|
323
|
-
exports.ccolors = out
|
|
307
|
+
exports.colors = cols;
|
|
308
|
+
exports.vcolors = _cols;
|
|
309
|
+
exports.ccolors = out;
|
|
324
310
|
|
|
325
|
-
return out
|
|
326
|
-
})()
|
|
311
|
+
return out;
|
|
312
|
+
})();
|
|
327
313
|
|
|
328
|
-
|
|
314
|
+
var colorNames = exports.colorNames = {
|
|
329
315
|
// special
|
|
330
316
|
default: -1,
|
|
331
317
|
normal: -1,
|
|
@@ -365,24 +351,25 @@ const colorNames = (exports.colorNames = {
|
|
|
365
351
|
lightgray: 7,
|
|
366
352
|
brightgrey: 7,
|
|
367
353
|
brightgray: 7
|
|
368
|
-
}
|
|
354
|
+
};
|
|
369
355
|
|
|
370
|
-
exports.convert = function
|
|
356
|
+
exports.convert = function(color) {
|
|
371
357
|
if (typeof color === 'number') {
|
|
358
|
+
;
|
|
372
359
|
} else if (typeof color === 'string') {
|
|
373
|
-
color = color.replace(/[
|
|
360
|
+
color = color.replace(/[\- ]/g, '');
|
|
374
361
|
if (colorNames[color] != null) {
|
|
375
|
-
color = colorNames[color]
|
|
362
|
+
color = colorNames[color];
|
|
376
363
|
} else {
|
|
377
|
-
color = exports.match(color)
|
|
364
|
+
color = exports.match(color);
|
|
378
365
|
}
|
|
379
366
|
} else if (Array.isArray(color)) {
|
|
380
|
-
color = exports.match(color)
|
|
367
|
+
color = exports.match(color);
|
|
381
368
|
} else {
|
|
382
|
-
color = -1
|
|
369
|
+
color = -1;
|
|
383
370
|
}
|
|
384
|
-
return color !== -1 ? color : 0x1ff
|
|
385
|
-
}
|
|
371
|
+
return color !== -1 ? color : 0x1ff;
|
|
372
|
+
};
|
|
386
373
|
|
|
387
374
|
// Map higher colors to the first 8 colors.
|
|
388
375
|
// This allows translation of high colors to low colors on 8-color terminals.
|
|
@@ -439,7 +426,23 @@ exports.ccolors = {
|
|
|
439
426
|
],
|
|
440
427
|
|
|
441
428
|
cyan: [
|
|
442
|
-
6,
|
|
429
|
+
6,
|
|
430
|
+
14,
|
|
431
|
+
23,
|
|
432
|
+
30,
|
|
433
|
+
37,
|
|
434
|
+
44,
|
|
435
|
+
51,
|
|
436
|
+
66,
|
|
437
|
+
73,
|
|
438
|
+
80,
|
|
439
|
+
87,
|
|
440
|
+
109,
|
|
441
|
+
116,
|
|
442
|
+
123,
|
|
443
|
+
152,
|
|
444
|
+
159,
|
|
445
|
+
195
|
|
443
446
|
],
|
|
444
447
|
|
|
445
448
|
red: [
|
|
@@ -463,30 +466,67 @@ exports.ccolors = {
|
|
|
463
466
|
],
|
|
464
467
|
|
|
465
468
|
magenta: [
|
|
466
|
-
5,
|
|
469
|
+
5,
|
|
470
|
+
13,
|
|
471
|
+
53,
|
|
472
|
+
90,
|
|
473
|
+
96,
|
|
474
|
+
127,
|
|
475
|
+
133,
|
|
476
|
+
139,
|
|
477
|
+
164,
|
|
478
|
+
170,
|
|
479
|
+
176,
|
|
480
|
+
182,
|
|
481
|
+
201,
|
|
482
|
+
207,
|
|
483
|
+
213,
|
|
484
|
+
219,
|
|
467
485
|
225
|
|
468
486
|
],
|
|
469
487
|
|
|
470
|
-
yellow: [
|
|
488
|
+
yellow: [
|
|
489
|
+
3,
|
|
490
|
+
11,
|
|
491
|
+
58,
|
|
492
|
+
[100, 101],
|
|
493
|
+
[142, 144],
|
|
494
|
+
[184, 187],
|
|
495
|
+
[226, 230]
|
|
496
|
+
],
|
|
471
497
|
|
|
472
|
-
black: [
|
|
498
|
+
black: [
|
|
499
|
+
0,
|
|
500
|
+
8,
|
|
501
|
+
16,
|
|
502
|
+
59,
|
|
503
|
+
102,
|
|
504
|
+
[232, 243]
|
|
505
|
+
],
|
|
473
506
|
|
|
474
|
-
white: [
|
|
475
|
-
|
|
507
|
+
white: [
|
|
508
|
+
7,
|
|
509
|
+
15,
|
|
510
|
+
145,
|
|
511
|
+
188,
|
|
512
|
+
231,
|
|
513
|
+
[244, 255]
|
|
514
|
+
]
|
|
515
|
+
};
|
|
476
516
|
|
|
477
|
-
exports.ncolors = []
|
|
517
|
+
exports.ncolors = [];
|
|
478
518
|
|
|
479
|
-
Object.keys(exports.ccolors).forEach(function
|
|
480
|
-
exports.ccolors[name].forEach(function
|
|
519
|
+
Object.keys(exports.ccolors).forEach(function(name) {
|
|
520
|
+
exports.ccolors[name].forEach(function(offset) {
|
|
481
521
|
if (typeof offset === 'number') {
|
|
482
|
-
exports.ncolors[offset] = name
|
|
483
|
-
exports.ccolors[offset] = exports.colorNames[name]
|
|
484
|
-
return
|
|
522
|
+
exports.ncolors[offset] = name;
|
|
523
|
+
exports.ccolors[offset] = exports.colorNames[name];
|
|
524
|
+
return;
|
|
485
525
|
}
|
|
486
|
-
for (
|
|
487
|
-
exports.ncolors[i] = name
|
|
488
|
-
exports.ccolors[i] = exports.colorNames[name]
|
|
526
|
+
for (var i = offset[0], l = offset[1]; i <= l; i++) {
|
|
527
|
+
exports.ncolors[i] = name;
|
|
528
|
+
exports.ccolors[i] = exports.colorNames[name];
|
|
489
529
|
}
|
|
490
|
-
})
|
|
491
|
-
delete exports.ccolors[name]
|
|
492
|
-
})
|
|
530
|
+
});
|
|
531
|
+
delete exports.ccolors[name];
|
|
532
|
+
});
|