@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,294 +10,260 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var Node = require('./node');
|
|
14
|
+
var Box = require('./box');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Form
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
function Form(options) {
|
|
21
|
-
|
|
21
|
+
var self = this;
|
|
22
22
|
|
|
23
23
|
if (!(this instanceof Node)) {
|
|
24
|
-
return new Form(options)
|
|
24
|
+
return new Form(options);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
options = options || {}
|
|
27
|
+
options = options || {};
|
|
28
28
|
|
|
29
|
-
options.ignoreKeys = true
|
|
30
|
-
Box.call(this, options)
|
|
29
|
+
options.ignoreKeys = true;
|
|
30
|
+
Box.call(this, options);
|
|
31
31
|
|
|
32
32
|
if (options.keys) {
|
|
33
|
-
this.screen._listenKeys(this)
|
|
34
|
-
this.on('element keypress', function
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
(options.vi && key.name === 'j')
|
|
40
|
-
) {
|
|
33
|
+
this.screen._listenKeys(this);
|
|
34
|
+
this.on('element keypress', function(el, ch, key) {
|
|
35
|
+
if ((key.name === 'tab' && !key.shift)
|
|
36
|
+
|| (el.type === 'textbox' && options.autoNext && key.name === 'enter')
|
|
37
|
+
|| key.name === 'down'
|
|
38
|
+
|| (options.vi && key.name === 'j')) {
|
|
41
39
|
if (el.type === 'textbox' || el.type === 'textarea') {
|
|
42
|
-
if (key.name === 'j')
|
|
43
|
-
return
|
|
44
|
-
}
|
|
40
|
+
if (key.name === 'j') return;
|
|
45
41
|
if (key.name === 'tab') {
|
|
46
42
|
// Workaround, since we can't stop the tab from being added.
|
|
47
|
-
el.emit('keypress', null, { name: 'backspace' })
|
|
43
|
+
el.emit('keypress', null, { name: 'backspace' });
|
|
48
44
|
}
|
|
49
|
-
el.emit('keypress', '\x1b', { name: 'escape' })
|
|
45
|
+
el.emit('keypress', '\x1b', { name: 'escape' });
|
|
50
46
|
}
|
|
51
|
-
self.focusNext()
|
|
52
|
-
return
|
|
47
|
+
self.focusNext();
|
|
48
|
+
return;
|
|
53
49
|
}
|
|
54
50
|
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(options.vi && key.name === 'k')
|
|
59
|
-
) {
|
|
51
|
+
if ((key.name === 'tab' && key.shift)
|
|
52
|
+
|| key.name === 'up'
|
|
53
|
+
|| (options.vi && key.name === 'k')) {
|
|
60
54
|
if (el.type === 'textbox' || el.type === 'textarea') {
|
|
61
|
-
if (key.name === 'k')
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
el.emit('keypress', '\x1b', { name: 'escape' })
|
|
55
|
+
if (key.name === 'k') return;
|
|
56
|
+
el.emit('keypress', '\x1b', { name: 'escape' });
|
|
65
57
|
}
|
|
66
|
-
self.focusPrevious()
|
|
67
|
-
return
|
|
58
|
+
self.focusPrevious();
|
|
59
|
+
return;
|
|
68
60
|
}
|
|
69
61
|
|
|
70
62
|
if (key.name === 'escape') {
|
|
71
|
-
self.focus()
|
|
72
|
-
return
|
|
63
|
+
self.focus();
|
|
64
|
+
return;
|
|
73
65
|
}
|
|
74
|
-
})
|
|
66
|
+
});
|
|
75
67
|
}
|
|
76
68
|
}
|
|
77
69
|
|
|
78
|
-
Object.setPrototypeOf(Form.prototype, Box.prototype)
|
|
70
|
+
Object.setPrototypeOf(Form.prototype, Box.prototype);
|
|
79
71
|
|
|
80
|
-
Form.prototype.type = 'form'
|
|
72
|
+
Form.prototype.type = 'form';
|
|
81
73
|
|
|
82
|
-
Form.prototype._refresh = function
|
|
74
|
+
Form.prototype._refresh = function() {
|
|
83
75
|
// XXX Possibly remove this if statement and refresh on every focus.
|
|
84
76
|
// Also potentially only include *visible* focusable elements.
|
|
85
77
|
// This would remove the need to check for _selected.visible in previous()
|
|
86
78
|
// and next().
|
|
87
79
|
if (!this._children) {
|
|
88
|
-
|
|
80
|
+
var out = [];
|
|
89
81
|
|
|
90
82
|
this.children.forEach(function fn(el) {
|
|
91
|
-
if (el.keyable)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
el.children.forEach(fn)
|
|
95
|
-
})
|
|
83
|
+
if (el.keyable) out.push(el);
|
|
84
|
+
el.children.forEach(fn);
|
|
85
|
+
});
|
|
96
86
|
|
|
97
|
-
this._children = out
|
|
87
|
+
this._children = out;
|
|
98
88
|
}
|
|
99
|
-
}
|
|
89
|
+
};
|
|
100
90
|
|
|
101
|
-
Form.prototype._visible = function
|
|
102
|
-
return !!this._children.filter(function
|
|
103
|
-
return el.visible
|
|
104
|
-
}).length
|
|
105
|
-
}
|
|
91
|
+
Form.prototype._visible = function() {
|
|
92
|
+
return !!this._children.filter(function(el) {
|
|
93
|
+
return el.visible;
|
|
94
|
+
}).length;
|
|
95
|
+
};
|
|
106
96
|
|
|
107
|
-
Form.prototype.next = function
|
|
108
|
-
this._refresh()
|
|
97
|
+
Form.prototype.next = function() {
|
|
98
|
+
this._refresh();
|
|
109
99
|
|
|
110
|
-
if (!this._visible())
|
|
111
|
-
return
|
|
112
|
-
}
|
|
100
|
+
if (!this._visible()) return;
|
|
113
101
|
|
|
114
102
|
if (!this._selected) {
|
|
115
|
-
this._selected = this._children[0]
|
|
116
|
-
if (!this._selected.visible)
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
if (this.screen.focused !== this._selected) {
|
|
120
|
-
return this._selected
|
|
121
|
-
}
|
|
103
|
+
this._selected = this._children[0];
|
|
104
|
+
if (!this._selected.visible) return this.next();
|
|
105
|
+
if (this.screen.focused !== this._selected) return this._selected;
|
|
122
106
|
}
|
|
123
107
|
|
|
124
|
-
|
|
108
|
+
var i = this._children.indexOf(this._selected);
|
|
125
109
|
if (!~i || !this._children[i + 1]) {
|
|
126
|
-
this._selected = this._children[0]
|
|
127
|
-
if (!this._selected.visible)
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
return this._selected
|
|
110
|
+
this._selected = this._children[0];
|
|
111
|
+
if (!this._selected.visible) return this.next();
|
|
112
|
+
return this._selected;
|
|
131
113
|
}
|
|
132
114
|
|
|
133
|
-
this._selected = this._children[i + 1]
|
|
134
|
-
if (!this._selected.visible)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return this._selected
|
|
138
|
-
}
|
|
115
|
+
this._selected = this._children[i + 1];
|
|
116
|
+
if (!this._selected.visible) return this.next();
|
|
117
|
+
return this._selected;
|
|
118
|
+
};
|
|
139
119
|
|
|
140
|
-
Form.prototype.previous = function
|
|
141
|
-
this._refresh()
|
|
120
|
+
Form.prototype.previous = function() {
|
|
121
|
+
this._refresh();
|
|
142
122
|
|
|
143
|
-
if (!this._visible())
|
|
144
|
-
return
|
|
145
|
-
}
|
|
123
|
+
if (!this._visible()) return;
|
|
146
124
|
|
|
147
125
|
if (!this._selected) {
|
|
148
|
-
this._selected = this._children[this._children.length - 1]
|
|
149
|
-
if (!this._selected.visible)
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
if (this.screen.focused !== this._selected) {
|
|
153
|
-
return this._selected
|
|
154
|
-
}
|
|
126
|
+
this._selected = this._children[this._children.length - 1];
|
|
127
|
+
if (!this._selected.visible) return this.previous();
|
|
128
|
+
if (this.screen.focused !== this._selected) return this._selected;
|
|
155
129
|
}
|
|
156
130
|
|
|
157
|
-
|
|
131
|
+
var i = this._children.indexOf(this._selected);
|
|
158
132
|
if (!~i || !this._children[i - 1]) {
|
|
159
|
-
this._selected = this._children[this._children.length - 1]
|
|
160
|
-
if (!this._selected.visible)
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
return this._selected
|
|
133
|
+
this._selected = this._children[this._children.length - 1];
|
|
134
|
+
if (!this._selected.visible) return this.previous();
|
|
135
|
+
return this._selected;
|
|
164
136
|
}
|
|
165
137
|
|
|
166
|
-
this._selected = this._children[i - 1]
|
|
167
|
-
if (!this._selected.visible)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return this._selected
|
|
171
|
-
}
|
|
138
|
+
this._selected = this._children[i - 1];
|
|
139
|
+
if (!this._selected.visible) return this.previous();
|
|
140
|
+
return this._selected;
|
|
141
|
+
};
|
|
172
142
|
|
|
173
|
-
Form.prototype.focusNext = function
|
|
174
|
-
|
|
175
|
-
if (next)
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
}
|
|
143
|
+
Form.prototype.focusNext = function() {
|
|
144
|
+
var next = this.next();
|
|
145
|
+
if (next) next.focus();
|
|
146
|
+
};
|
|
179
147
|
|
|
180
|
-
Form.prototype.focusPrevious = function
|
|
181
|
-
|
|
182
|
-
if (previous)
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
}
|
|
148
|
+
Form.prototype.focusPrevious = function() {
|
|
149
|
+
var previous = this.previous();
|
|
150
|
+
if (previous) previous.focus();
|
|
151
|
+
};
|
|
186
152
|
|
|
187
|
-
Form.prototype.resetSelected = function
|
|
188
|
-
this._selected = null
|
|
189
|
-
}
|
|
153
|
+
Form.prototype.resetSelected = function() {
|
|
154
|
+
this._selected = null;
|
|
155
|
+
};
|
|
190
156
|
|
|
191
|
-
Form.prototype.focusFirst = function
|
|
192
|
-
this.resetSelected()
|
|
193
|
-
this.focusNext()
|
|
194
|
-
}
|
|
157
|
+
Form.prototype.focusFirst = function() {
|
|
158
|
+
this.resetSelected();
|
|
159
|
+
this.focusNext();
|
|
160
|
+
};
|
|
195
161
|
|
|
196
|
-
Form.prototype.focusLast = function
|
|
197
|
-
this.resetSelected()
|
|
198
|
-
this.focusPrevious()
|
|
199
|
-
}
|
|
162
|
+
Form.prototype.focusLast = function() {
|
|
163
|
+
this.resetSelected();
|
|
164
|
+
this.focusPrevious();
|
|
165
|
+
};
|
|
200
166
|
|
|
201
|
-
Form.prototype.submit = function
|
|
202
|
-
|
|
167
|
+
Form.prototype.submit = function() {
|
|
168
|
+
var out = {};
|
|
203
169
|
|
|
204
170
|
this.children.forEach(function fn(el) {
|
|
205
171
|
if (el.value != null) {
|
|
206
|
-
|
|
172
|
+
var name = el.name || el.type;
|
|
207
173
|
if (Array.isArray(out[name])) {
|
|
208
|
-
out[name].push(el.value)
|
|
174
|
+
out[name].push(el.value);
|
|
209
175
|
} else if (out[name]) {
|
|
210
|
-
out[name] = [out[name], el.value]
|
|
176
|
+
out[name] = [out[name], el.value];
|
|
211
177
|
} else {
|
|
212
|
-
out[name] = el.value
|
|
178
|
+
out[name] = el.value;
|
|
213
179
|
}
|
|
214
180
|
}
|
|
215
|
-
el.children.forEach(fn)
|
|
216
|
-
})
|
|
181
|
+
el.children.forEach(fn);
|
|
182
|
+
});
|
|
217
183
|
|
|
218
|
-
this.emit('submit', out)
|
|
184
|
+
this.emit('submit', out);
|
|
219
185
|
|
|
220
|
-
return
|
|
221
|
-
}
|
|
186
|
+
return this.submission = out;
|
|
187
|
+
};
|
|
222
188
|
|
|
223
|
-
Form.prototype.cancel = function
|
|
224
|
-
this.emit('cancel')
|
|
225
|
-
}
|
|
189
|
+
Form.prototype.cancel = function() {
|
|
190
|
+
this.emit('cancel');
|
|
191
|
+
};
|
|
226
192
|
|
|
227
|
-
Form.prototype.reset = function
|
|
193
|
+
Form.prototype.reset = function() {
|
|
228
194
|
this.children.forEach(function fn(el) {
|
|
229
195
|
switch (el.type) {
|
|
230
196
|
case 'screen':
|
|
231
|
-
break
|
|
197
|
+
break;
|
|
232
198
|
case 'box':
|
|
233
|
-
break
|
|
199
|
+
break;
|
|
234
200
|
case 'text':
|
|
235
|
-
break
|
|
201
|
+
break;
|
|
236
202
|
case 'line':
|
|
237
|
-
break
|
|
203
|
+
break;
|
|
238
204
|
case 'scrollable-box':
|
|
239
|
-
break
|
|
205
|
+
break;
|
|
240
206
|
case 'list':
|
|
241
|
-
el.select(0)
|
|
242
|
-
return
|
|
207
|
+
el.select(0);
|
|
208
|
+
return;
|
|
243
209
|
case 'form':
|
|
244
|
-
break
|
|
210
|
+
break;
|
|
245
211
|
case 'input':
|
|
246
|
-
break
|
|
212
|
+
break;
|
|
247
213
|
case 'textbox':
|
|
248
|
-
el.clearInput()
|
|
249
|
-
return
|
|
214
|
+
el.clearInput();
|
|
215
|
+
return;
|
|
250
216
|
case 'textarea':
|
|
251
|
-
el.clearInput()
|
|
252
|
-
return
|
|
217
|
+
el.clearInput();
|
|
218
|
+
return;
|
|
253
219
|
case 'button':
|
|
254
|
-
delete el.value
|
|
255
|
-
break
|
|
220
|
+
delete el.value;
|
|
221
|
+
break;
|
|
256
222
|
case 'progress-bar':
|
|
257
|
-
el.setProgress(0)
|
|
258
|
-
break
|
|
223
|
+
el.setProgress(0);
|
|
224
|
+
break;
|
|
259
225
|
case 'file-manager':
|
|
260
|
-
el.refresh(el.options.cwd)
|
|
261
|
-
return
|
|
226
|
+
el.refresh(el.options.cwd);
|
|
227
|
+
return;
|
|
262
228
|
case 'checkbox':
|
|
263
|
-
el.uncheck()
|
|
264
|
-
return
|
|
229
|
+
el.uncheck();
|
|
230
|
+
return;
|
|
265
231
|
case 'radio-set':
|
|
266
|
-
break
|
|
232
|
+
break;
|
|
267
233
|
case 'radio-button':
|
|
268
|
-
el.uncheck()
|
|
269
|
-
return
|
|
234
|
+
el.uncheck();
|
|
235
|
+
return;
|
|
270
236
|
case 'prompt':
|
|
271
|
-
break
|
|
237
|
+
break;
|
|
272
238
|
case 'question':
|
|
273
|
-
break
|
|
239
|
+
break;
|
|
274
240
|
case 'message':
|
|
275
|
-
break
|
|
241
|
+
break;
|
|
276
242
|
case 'info':
|
|
277
|
-
break
|
|
243
|
+
break;
|
|
278
244
|
case 'loading':
|
|
279
|
-
break
|
|
245
|
+
break;
|
|
280
246
|
case 'list-bar':
|
|
281
247
|
//el.select(0);
|
|
282
|
-
break
|
|
248
|
+
break;
|
|
283
249
|
case 'dir-manager':
|
|
284
|
-
el.refresh(el.options.cwd)
|
|
285
|
-
return
|
|
250
|
+
el.refresh(el.options.cwd);
|
|
251
|
+
return;
|
|
286
252
|
case 'terminal':
|
|
287
|
-
el.write('')
|
|
288
|
-
return
|
|
253
|
+
el.write('');
|
|
254
|
+
return;
|
|
289
255
|
case 'image':
|
|
290
256
|
//el.clearImage();
|
|
291
|
-
return
|
|
257
|
+
return;
|
|
292
258
|
}
|
|
293
|
-
el.children.forEach(fn)
|
|
294
|
-
})
|
|
259
|
+
el.children.forEach(fn);
|
|
260
|
+
});
|
|
295
261
|
|
|
296
|
-
this.emit('reset')
|
|
297
|
-
}
|
|
262
|
+
this.emit('reset');
|
|
263
|
+
};
|
|
298
264
|
|
|
299
265
|
/**
|
|
300
266
|
* Expose
|
|
301
267
|
*/
|
|
302
268
|
|
|
303
|
-
module.exports = Form
|
|
269
|
+
module.exports = Form;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var Node = require('./node');
|
|
14
|
+
var Box = require('./box');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Image
|
|
@@ -19,55 +19,45 @@ const Box = require('./box')
|
|
|
19
19
|
|
|
20
20
|
function Image(options) {
|
|
21
21
|
if (!(this instanceof Node)) {
|
|
22
|
-
return new Image(options)
|
|
22
|
+
return new Image(options);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
options = options || {}
|
|
26
|
-
options.type = options.itype || options.type || 'ansi'
|
|
25
|
+
options = options || {};
|
|
26
|
+
options.type = options.itype || options.type || 'ansi';
|
|
27
27
|
|
|
28
|
-
Box.call(this, options)
|
|
28
|
+
Box.call(this, options);
|
|
29
29
|
|
|
30
30
|
if (options.type === 'ansi' && this.type !== 'ansiimage') {
|
|
31
|
-
|
|
32
|
-
Object.getOwnPropertyNames(ANSIImage.prototype).forEach(function
|
|
33
|
-
if (key === 'type')
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Object.getOwnPropertyDescriptor(ANSIImage.prototype, key)
|
|
40
|
-
)
|
|
41
|
-
}, this)
|
|
42
|
-
ANSIImage.call(this, options)
|
|
43
|
-
return this
|
|
31
|
+
var ANSIImage = require('./ansiimage');
|
|
32
|
+
Object.getOwnPropertyNames(ANSIImage.prototype).forEach(function(key) {
|
|
33
|
+
if (key === 'type') return;
|
|
34
|
+
Object.defineProperty(this, key,
|
|
35
|
+
Object.getOwnPropertyDescriptor(ANSIImage.prototype, key));
|
|
36
|
+
}, this);
|
|
37
|
+
ANSIImage.call(this, options);
|
|
38
|
+
return this;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
41
|
if (options.type === 'overlay' && this.type !== 'overlayimage') {
|
|
47
|
-
|
|
48
|
-
Object.getOwnPropertyNames(OverlayImage.prototype).forEach(function
|
|
49
|
-
if (key === 'type')
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Object.getOwnPropertyDescriptor(OverlayImage.prototype, key)
|
|
56
|
-
)
|
|
57
|
-
}, this)
|
|
58
|
-
OverlayImage.call(this, options)
|
|
59
|
-
return this
|
|
42
|
+
var OverlayImage = require('./overlayimage');
|
|
43
|
+
Object.getOwnPropertyNames(OverlayImage.prototype).forEach(function(key) {
|
|
44
|
+
if (key === 'type') return;
|
|
45
|
+
Object.defineProperty(this, key,
|
|
46
|
+
Object.getOwnPropertyDescriptor(OverlayImage.prototype, key));
|
|
47
|
+
}, this);
|
|
48
|
+
OverlayImage.call(this, options);
|
|
49
|
+
return this;
|
|
60
50
|
}
|
|
61
51
|
|
|
62
|
-
throw new Error('`type` must either be `ansi` or `overlay`.')
|
|
52
|
+
throw new Error('`type` must either be `ansi` or `overlay`.');
|
|
63
53
|
}
|
|
64
54
|
|
|
65
|
-
Object.setPrototypeOf(Image.prototype, Box.prototype)
|
|
55
|
+
Object.setPrototypeOf(Image.prototype, Box.prototype);
|
|
66
56
|
|
|
67
|
-
Image.prototype.type = 'image'
|
|
57
|
+
Image.prototype.type = 'image';
|
|
68
58
|
|
|
69
59
|
/**
|
|
70
60
|
* Expose
|
|
71
61
|
*/
|
|
72
62
|
|
|
73
|
-
module.exports = Image
|
|
63
|
+
module.exports = Image;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var Node = require('./node');
|
|
14
|
+
var Box = require('./box');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Input
|
|
@@ -19,18 +19,18 @@ const Box = require('./box')
|
|
|
19
19
|
|
|
20
20
|
function Input(options) {
|
|
21
21
|
if (!(this instanceof Node)) {
|
|
22
|
-
return new Input(options)
|
|
22
|
+
return new Input(options);
|
|
23
23
|
}
|
|
24
|
-
options = options || {}
|
|
25
|
-
Box.call(this, options)
|
|
24
|
+
options = options || {};
|
|
25
|
+
Box.call(this, options);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
Object.setPrototypeOf(Input.prototype, Box.prototype)
|
|
28
|
+
Object.setPrototypeOf(Input.prototype, Box.prototype);
|
|
29
29
|
|
|
30
|
-
Input.prototype.type = 'input'
|
|
30
|
+
Input.prototype.type = 'input';
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Expose
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
module.exports = Input
|
|
36
|
+
module.exports = Input;
|