@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
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var Node = require('./node');
|
|
14
|
+
var Element = require('./element');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Text
|
|
@@ -19,19 +19,19 @@ const Element = require('./element')
|
|
|
19
19
|
|
|
20
20
|
function Text(options) {
|
|
21
21
|
if (!(this instanceof Node)) {
|
|
22
|
-
return new Text(options)
|
|
22
|
+
return new Text(options);
|
|
23
23
|
}
|
|
24
|
-
options = options || {}
|
|
25
|
-
options.shrink = true
|
|
26
|
-
Element.call(this, options)
|
|
24
|
+
options = options || {};
|
|
25
|
+
options.shrink = true;
|
|
26
|
+
Element.call(this, options);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
Object.setPrototypeOf(Text.prototype, Element.prototype)
|
|
29
|
+
Object.setPrototypeOf(Text.prototype, Element.prototype);
|
|
30
30
|
|
|
31
|
-
Text.prototype.type = 'text'
|
|
31
|
+
Text.prototype.type = 'text';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Expose
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
module.exports = Text
|
|
37
|
+
module.exports = Text;
|
|
@@ -10,369 +10,335 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
var unicode = require('../unicode');
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
var nextTick = global.setImmediate || process.nextTick.bind(process);
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
var Node = require('./node');
|
|
18
|
+
var Input = require('./input');
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Textarea
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
function Textarea(options) {
|
|
25
|
-
|
|
25
|
+
var self = this;
|
|
26
26
|
|
|
27
27
|
if (!(this instanceof Node)) {
|
|
28
|
-
return new Textarea(options)
|
|
28
|
+
return new Textarea(options);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
options = options || {}
|
|
31
|
+
options = options || {};
|
|
32
32
|
|
|
33
|
-
options.scrollable = options.scrollable !== false
|
|
33
|
+
options.scrollable = options.scrollable !== false;
|
|
34
34
|
|
|
35
|
-
Input.call(this, options)
|
|
35
|
+
Input.call(this, options);
|
|
36
36
|
|
|
37
|
-
this.screen._listenKeys(this)
|
|
37
|
+
this.screen._listenKeys(this);
|
|
38
38
|
|
|
39
|
-
this.value = options.value || ''
|
|
39
|
+
this.value = options.value || '';
|
|
40
40
|
|
|
41
|
-
this.__updateCursor = this._updateCursor.bind(this)
|
|
42
|
-
this.on('resize', this.__updateCursor)
|
|
43
|
-
this.on('move', this.__updateCursor)
|
|
41
|
+
this.__updateCursor = this._updateCursor.bind(this);
|
|
42
|
+
this.on('resize', this.__updateCursor);
|
|
43
|
+
this.on('move', this.__updateCursor);
|
|
44
44
|
|
|
45
45
|
if (options.inputOnFocus) {
|
|
46
|
-
this.on('focus', this.readInput.bind(this, null))
|
|
46
|
+
this.on('focus', this.readInput.bind(this, null));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (!options.inputOnFocus && options.keys) {
|
|
50
|
-
this.on('keypress', function
|
|
51
|
-
if (self._reading)
|
|
52
|
-
return
|
|
53
|
-
}
|
|
50
|
+
this.on('keypress', function(ch, key) {
|
|
51
|
+
if (self._reading) return;
|
|
54
52
|
if (key.name === 'enter' || (options.vi && key.name === 'i')) {
|
|
55
|
-
return self.readInput()
|
|
53
|
+
return self.readInput();
|
|
56
54
|
}
|
|
57
55
|
if (key.name === 'e') {
|
|
58
|
-
return self.readEditor()
|
|
56
|
+
return self.readEditor();
|
|
59
57
|
}
|
|
60
|
-
})
|
|
58
|
+
});
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
if (options.mouse) {
|
|
64
|
-
this.on('click', function
|
|
65
|
-
if (self._reading)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
self.readEditor()
|
|
72
|
-
})
|
|
62
|
+
this.on('click', function(data) {
|
|
63
|
+
if (self._reading) return;
|
|
64
|
+
if (data.button !== 'right') return;
|
|
65
|
+
self.readEditor();
|
|
66
|
+
});
|
|
73
67
|
}
|
|
74
68
|
}
|
|
75
69
|
|
|
76
|
-
Object.setPrototypeOf(Textarea.prototype, Input.prototype)
|
|
70
|
+
Object.setPrototypeOf(Textarea.prototype, Input.prototype);
|
|
77
71
|
|
|
78
|
-
Textarea.prototype.type = 'textarea'
|
|
72
|
+
Textarea.prototype.type = 'textarea';
|
|
79
73
|
|
|
80
|
-
Textarea.prototype._updateCursor = function
|
|
74
|
+
Textarea.prototype._updateCursor = function(get) {
|
|
81
75
|
if (this.screen.focused !== this) {
|
|
82
|
-
return
|
|
76
|
+
return;
|
|
83
77
|
}
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
if (!lpos)
|
|
87
|
-
return
|
|
88
|
-
}
|
|
79
|
+
var lpos = get ? this.lpos : this._getCoords();
|
|
80
|
+
if (!lpos) return;
|
|
89
81
|
|
|
90
|
-
|
|
91
|
-
program = this.screen.program
|
|
92
|
-
line
|
|
93
|
-
cx
|
|
94
|
-
cy
|
|
82
|
+
var last = this._clines[this._clines.length - 1]
|
|
83
|
+
, program = this.screen.program
|
|
84
|
+
, line
|
|
85
|
+
, cx
|
|
86
|
+
, cy;
|
|
95
87
|
|
|
96
88
|
// Stop a situation where the textarea begins scrolling
|
|
97
89
|
// and the last cline appears to always be empty from the
|
|
98
90
|
// _typeScroll `+ '\n'` thing.
|
|
99
91
|
// Maybe not necessary anymore?
|
|
100
92
|
if (last === '' && this.value[this.value.length - 1] !== '\n') {
|
|
101
|
-
last = this._clines[this._clines.length - 2] || ''
|
|
93
|
+
last = this._clines[this._clines.length - 2] || '';
|
|
102
94
|
}
|
|
103
95
|
|
|
104
96
|
line = Math.min(
|
|
105
97
|
this._clines.length - 1 - (this.childBase || 0),
|
|
106
|
-
lpos.yl - lpos.yi - this.iheight - 1
|
|
107
|
-
)
|
|
98
|
+
(lpos.yl - lpos.yi) - this.iheight - 1);
|
|
108
99
|
|
|
109
100
|
// When calling clearValue() on a full textarea with a border, the first
|
|
110
101
|
// argument in the above Math.min call ends up being -2. Make sure we stay
|
|
111
102
|
// positive.
|
|
112
|
-
line = Math.max(0, line)
|
|
103
|
+
line = Math.max(0, line);
|
|
113
104
|
|
|
114
|
-
cy = lpos.yi + this.itop + line
|
|
115
|
-
cx = lpos.xi + this.ileft + this.strWidth(last)
|
|
105
|
+
cy = lpos.yi + this.itop + line;
|
|
106
|
+
cx = lpos.xi + this.ileft + this.strWidth(last);
|
|
116
107
|
|
|
117
108
|
// XXX Not sure, but this may still sometimes
|
|
118
109
|
// cause problems when leaving editor.
|
|
119
110
|
if (cy === program.y && cx === program.x) {
|
|
120
|
-
return
|
|
111
|
+
return;
|
|
121
112
|
}
|
|
122
113
|
|
|
123
114
|
if (cy === program.y) {
|
|
124
115
|
if (cx > program.x) {
|
|
125
|
-
program.cuf(cx - program.x)
|
|
116
|
+
program.cuf(cx - program.x);
|
|
126
117
|
} else if (cx < program.x) {
|
|
127
|
-
program.cub(program.x - cx)
|
|
118
|
+
program.cub(program.x - cx);
|
|
128
119
|
}
|
|
129
120
|
} else if (cx === program.x) {
|
|
130
121
|
if (cy > program.y) {
|
|
131
|
-
program.cud(cy - program.y)
|
|
122
|
+
program.cud(cy - program.y);
|
|
132
123
|
} else if (cy < program.y) {
|
|
133
|
-
program.cuu(program.y - cy)
|
|
124
|
+
program.cuu(program.y - cy);
|
|
134
125
|
}
|
|
135
126
|
} else {
|
|
136
|
-
program.cup(cy, cx)
|
|
127
|
+
program.cup(cy, cx);
|
|
137
128
|
}
|
|
138
|
-
}
|
|
129
|
+
};
|
|
139
130
|
|
|
140
131
|
Textarea.prototype.input =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
focused = this.screen.focused === this
|
|
146
|
-
|
|
147
|
-
if (this._reading) {
|
|
148
|
-
return
|
|
149
|
-
}
|
|
150
|
-
this._reading = true
|
|
132
|
+
Textarea.prototype.setInput =
|
|
133
|
+
Textarea.prototype.readInput = function(callback) {
|
|
134
|
+
var self = this
|
|
135
|
+
, focused = this.screen.focused === this;
|
|
151
136
|
|
|
152
|
-
|
|
137
|
+
if (this._reading) return;
|
|
138
|
+
this._reading = true;
|
|
153
139
|
|
|
154
|
-
|
|
155
|
-
this.screen.saveFocus()
|
|
156
|
-
this.focus()
|
|
157
|
-
}
|
|
140
|
+
this._callback = callback;
|
|
158
141
|
|
|
159
|
-
|
|
142
|
+
if (!focused) {
|
|
143
|
+
this.screen.saveFocus();
|
|
144
|
+
this.focus();
|
|
145
|
+
}
|
|
160
146
|
|
|
161
|
-
|
|
162
|
-
this.screen.program.showCursor()
|
|
163
|
-
//this.screen.program.sgr('normal');
|
|
147
|
+
this.screen.grabKeys = true;
|
|
164
148
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
149
|
+
this._updateCursor();
|
|
150
|
+
this.screen.program.showCursor();
|
|
151
|
+
//this.screen.program.sgr('normal');
|
|
169
152
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
fn.done = true
|
|
153
|
+
this._done = function fn(err, value) {
|
|
154
|
+
if (!self._reading) return;
|
|
174
155
|
|
|
175
|
-
|
|
156
|
+
if (fn.done) return;
|
|
157
|
+
fn.done = true;
|
|
176
158
|
|
|
177
|
-
|
|
178
|
-
delete self._done
|
|
159
|
+
self._reading = false;
|
|
179
160
|
|
|
180
|
-
|
|
181
|
-
|
|
161
|
+
delete self._callback;
|
|
162
|
+
delete self._done;
|
|
182
163
|
|
|
183
|
-
|
|
184
|
-
|
|
164
|
+
self.removeListener('keypress', self.__listener);
|
|
165
|
+
delete self.__listener;
|
|
185
166
|
|
|
186
|
-
|
|
187
|
-
|
|
167
|
+
self.removeListener('blur', self.__done);
|
|
168
|
+
delete self.__done;
|
|
188
169
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
170
|
+
self.screen.program.hideCursor();
|
|
171
|
+
self.screen.grabKeys = false;
|
|
192
172
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
173
|
+
if (!focused) {
|
|
174
|
+
self.screen.restoreFocus();
|
|
175
|
+
}
|
|
196
176
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
177
|
+
if (self.options.inputOnFocus) {
|
|
178
|
+
self.screen.rewindFocus();
|
|
179
|
+
}
|
|
201
180
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
} else if (value != null) {
|
|
205
|
-
self.emit('submit', value)
|
|
206
|
-
} else {
|
|
207
|
-
self.emit('cancel', value)
|
|
208
|
-
}
|
|
209
|
-
self.emit('action', value)
|
|
181
|
+
// Ugly
|
|
182
|
+
if (err === 'stop') return;
|
|
210
183
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
184
|
+
if (err) {
|
|
185
|
+
self.emit('error', err);
|
|
186
|
+
} else if (value != null) {
|
|
187
|
+
self.emit('submit', value);
|
|
188
|
+
} else {
|
|
189
|
+
self.emit('cancel', value);
|
|
190
|
+
}
|
|
191
|
+
self.emit('action', value);
|
|
214
192
|
|
|
215
|
-
|
|
216
|
-
}
|
|
193
|
+
if (!callback) return;
|
|
217
194
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
self.on('keypress', self.__listener)
|
|
223
|
-
})
|
|
195
|
+
return err
|
|
196
|
+
? callback(err)
|
|
197
|
+
: callback(null, value);
|
|
198
|
+
};
|
|
224
199
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
200
|
+
// Put this in a nextTick so the current
|
|
201
|
+
// key event doesn't trigger any keys input.
|
|
202
|
+
nextTick(function() {
|
|
203
|
+
self.__listener = self._listener.bind(self);
|
|
204
|
+
self.on('keypress', self.__listener);
|
|
205
|
+
});
|
|
228
206
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
207
|
+
this.__done = this._done.bind(this, null, null);
|
|
208
|
+
this.on('blur', this.__done);
|
|
209
|
+
};
|
|
232
210
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
211
|
+
Textarea.prototype._listener = function(ch, key) {
|
|
212
|
+
var done = this._done
|
|
213
|
+
, value = this.value;
|
|
214
|
+
|
|
215
|
+
if (key.name === 'return') return;
|
|
236
216
|
if (key.name === 'enter') {
|
|
237
|
-
ch = '\n'
|
|
217
|
+
ch = '\n';
|
|
238
218
|
}
|
|
239
219
|
|
|
240
220
|
// TODO: Handle directional keys.
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
key.name === 'up' ||
|
|
245
|
-
key.name === 'down'
|
|
246
|
-
) {
|
|
221
|
+
if (key.name === 'left' || key.name === 'right'
|
|
222
|
+
|| key.name === 'up' || key.name === 'down') {
|
|
223
|
+
;
|
|
247
224
|
}
|
|
248
225
|
|
|
249
226
|
if (this.options.keys && key.ctrl && key.name === 'e') {
|
|
250
|
-
return this.readEditor()
|
|
227
|
+
return this.readEditor();
|
|
251
228
|
}
|
|
252
229
|
|
|
253
230
|
// TODO: Optimize typing by writing directly
|
|
254
231
|
// to the screen and screen buffer here.
|
|
255
232
|
if (key.name === 'escape') {
|
|
256
|
-
done(null, null)
|
|
233
|
+
done(null, null);
|
|
257
234
|
} else if (key.name === 'backspace') {
|
|
258
235
|
if (this.value.length) {
|
|
259
236
|
if (this.screen.fullUnicode) {
|
|
260
237
|
if (unicode.isSurrogate(this.value, this.value.length - 2)) {
|
|
261
|
-
|
|
262
|
-
this.value = this.value.slice(0, -2)
|
|
238
|
+
// || unicode.isCombining(this.value, this.value.length - 1)) {
|
|
239
|
+
this.value = this.value.slice(0, -2);
|
|
263
240
|
} else {
|
|
264
|
-
this.value = this.value.slice(0, -1)
|
|
241
|
+
this.value = this.value.slice(0, -1);
|
|
265
242
|
}
|
|
266
243
|
} else {
|
|
267
|
-
this.value = this.value.slice(0, -1)
|
|
244
|
+
this.value = this.value.slice(0, -1);
|
|
268
245
|
}
|
|
269
246
|
}
|
|
270
247
|
} else if (ch) {
|
|
271
248
|
if (!/^[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f]$/.test(ch)) {
|
|
272
|
-
this.value += ch
|
|
249
|
+
this.value += ch;
|
|
273
250
|
}
|
|
274
251
|
}
|
|
275
252
|
|
|
276
253
|
if (this.value !== value) {
|
|
277
|
-
this.screen.render()
|
|
254
|
+
this.screen.render();
|
|
278
255
|
}
|
|
279
|
-
}
|
|
256
|
+
};
|
|
280
257
|
|
|
281
|
-
Textarea.prototype._typeScroll = function
|
|
258
|
+
Textarea.prototype._typeScroll = function() {
|
|
282
259
|
// XXX Workaround
|
|
283
|
-
|
|
260
|
+
var height = this.height - this.iheight;
|
|
284
261
|
if (this._clines.length - this.childBase > height) {
|
|
285
|
-
this.scroll(this._clines.length)
|
|
262
|
+
this.scroll(this._clines.length);
|
|
286
263
|
}
|
|
287
|
-
}
|
|
264
|
+
};
|
|
288
265
|
|
|
289
|
-
Textarea.prototype.getValue = function
|
|
290
|
-
return this.value
|
|
291
|
-
}
|
|
266
|
+
Textarea.prototype.getValue = function() {
|
|
267
|
+
return this.value;
|
|
268
|
+
};
|
|
292
269
|
|
|
293
|
-
Textarea.prototype.setValue = function
|
|
270
|
+
Textarea.prototype.setValue = function(value) {
|
|
294
271
|
if (value == null) {
|
|
295
|
-
value = this.value
|
|
272
|
+
value = this.value;
|
|
296
273
|
}
|
|
297
274
|
if (this._value !== value) {
|
|
298
|
-
this.value = value
|
|
299
|
-
this._value = value
|
|
300
|
-
this.setContent(this.value)
|
|
301
|
-
this._typeScroll()
|
|
302
|
-
this._updateCursor()
|
|
275
|
+
this.value = value;
|
|
276
|
+
this._value = value;
|
|
277
|
+
this.setContent(this.value);
|
|
278
|
+
this._typeScroll();
|
|
279
|
+
this._updateCursor();
|
|
303
280
|
}
|
|
304
|
-
}
|
|
281
|
+
};
|
|
305
282
|
|
|
306
|
-
Textarea.prototype.clearInput =
|
|
307
|
-
|
|
308
|
-
|
|
283
|
+
Textarea.prototype.clearInput =
|
|
284
|
+
Textarea.prototype.clearValue = function() {
|
|
285
|
+
return this.setValue('');
|
|
286
|
+
};
|
|
309
287
|
|
|
310
|
-
Textarea.prototype.submit = function
|
|
311
|
-
if (!this.__listener)
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
return this.__listener('\x1b', { name: 'escape' })
|
|
315
|
-
}
|
|
288
|
+
Textarea.prototype.submit = function() {
|
|
289
|
+
if (!this.__listener) return;
|
|
290
|
+
return this.__listener('\x1b', { name: 'escape' });
|
|
291
|
+
};
|
|
316
292
|
|
|
317
|
-
Textarea.prototype.cancel = function
|
|
318
|
-
if (!this.__listener)
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
return this.__listener('\x1b', { name: 'escape' })
|
|
322
|
-
}
|
|
293
|
+
Textarea.prototype.cancel = function() {
|
|
294
|
+
if (!this.__listener) return;
|
|
295
|
+
return this.__listener('\x1b', { name: 'escape' });
|
|
296
|
+
};
|
|
323
297
|
|
|
324
|
-
Textarea.prototype.render = function
|
|
325
|
-
this.setValue()
|
|
326
|
-
return this._render()
|
|
327
|
-
}
|
|
298
|
+
Textarea.prototype.render = function() {
|
|
299
|
+
this.setValue();
|
|
300
|
+
return this._render();
|
|
301
|
+
};
|
|
328
302
|
|
|
329
303
|
Textarea.prototype.editor =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
const self = this
|
|
334
|
-
|
|
335
|
-
if (this._reading) {
|
|
336
|
-
const _cb = this._callback,
|
|
337
|
-
cb = callback
|
|
338
|
-
|
|
339
|
-
this._done('stop')
|
|
340
|
-
|
|
341
|
-
callback = function (err, value) {
|
|
342
|
-
if (_cb) {
|
|
343
|
-
_cb(err, value)
|
|
344
|
-
}
|
|
345
|
-
if (cb) {
|
|
346
|
-
cb(err, value)
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
304
|
+
Textarea.prototype.setEditor =
|
|
305
|
+
Textarea.prototype.readEditor = function(callback) {
|
|
306
|
+
var self = this;
|
|
350
307
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
308
|
+
if (this._reading) {
|
|
309
|
+
var _cb = this._callback
|
|
310
|
+
, cb = callback;
|
|
354
311
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
312
|
+
this._done('stop');
|
|
313
|
+
|
|
314
|
+
callback = function(err, value) {
|
|
315
|
+
if (_cb) _cb(err, value);
|
|
316
|
+
if (cb) cb(err, value);
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (!callback) {
|
|
321
|
+
callback = function() {};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return this.screen.readEditor({ value: this.value }, function(err, value) {
|
|
325
|
+
if (err) {
|
|
326
|
+
if (err.message === 'Unsuccessful.') {
|
|
327
|
+
self.screen.render();
|
|
328
|
+
return self.readInput(callback);
|
|
329
|
+
}
|
|
330
|
+
self.screen.render();
|
|
331
|
+
self.readInput(callback);
|
|
332
|
+
return callback(err);
|
|
372
333
|
}
|
|
334
|
+
self.setValue(value);
|
|
335
|
+
self.screen.render();
|
|
336
|
+
return self.readInput(callback);
|
|
337
|
+
});
|
|
338
|
+
};
|
|
373
339
|
|
|
374
340
|
/**
|
|
375
341
|
* Expose
|
|
376
342
|
*/
|
|
377
343
|
|
|
378
|
-
module.exports = Textarea
|
|
344
|
+
module.exports = Textarea;
|