@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,36 +10,36 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
var Node = require('./node');
|
|
14
|
+
var Box = require('./box');
|
|
15
|
+
var List = require('./list');
|
|
16
|
+
var Table = require('./table');
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* ListTable
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
function ListTable(options) {
|
|
23
|
-
|
|
23
|
+
var self = this;
|
|
24
24
|
|
|
25
25
|
if (!(this instanceof Node)) {
|
|
26
|
-
return new ListTable(options)
|
|
26
|
+
return new ListTable(options);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
options = options || {}
|
|
30
|
-
options.shrink = true
|
|
31
|
-
options.normalShrink = true
|
|
32
|
-
options.style = options.style || {}
|
|
33
|
-
options.style.border = options.style.border || {}
|
|
34
|
-
options.style.header = options.style.header || {}
|
|
35
|
-
options.style.cell = options.style.cell || {}
|
|
36
|
-
this.__align = options.align || 'center'
|
|
37
|
-
delete options.align
|
|
29
|
+
options = options || {};
|
|
30
|
+
options.shrink = true;
|
|
31
|
+
options.normalShrink = true;
|
|
32
|
+
options.style = options.style || {};
|
|
33
|
+
options.style.border = options.style.border || {};
|
|
34
|
+
options.style.header = options.style.header || {};
|
|
35
|
+
options.style.cell = options.style.cell || {};
|
|
36
|
+
this.__align = options.align || 'center';
|
|
37
|
+
delete options.align;
|
|
38
38
|
|
|
39
|
-
options.style.selected = options.style.cell.selected
|
|
40
|
-
options.style.item = options.style.cell
|
|
39
|
+
options.style.selected = options.style.cell.selected;
|
|
40
|
+
options.style.item = options.style.cell;
|
|
41
41
|
|
|
42
|
-
List.call(this, options)
|
|
42
|
+
List.call(this, options);
|
|
43
43
|
|
|
44
44
|
this._header = new Box({
|
|
45
45
|
parent: this,
|
|
@@ -49,219 +49,206 @@ function ListTable(options) {
|
|
|
49
49
|
height: 1,
|
|
50
50
|
style: options.style.header,
|
|
51
51
|
tags: options.parseTags || options.tags
|
|
52
|
-
})
|
|
52
|
+
});
|
|
53
53
|
|
|
54
|
-
this.on('scroll', function
|
|
55
|
-
self._header.setFront()
|
|
56
|
-
self._header.rtop = self.childBase
|
|
54
|
+
this.on('scroll', function() {
|
|
55
|
+
self._header.setFront();
|
|
56
|
+
self._header.rtop = self.childBase;
|
|
57
57
|
if (!self.screen.autoPadding) {
|
|
58
|
-
self._header.rtop = self.childBase + (self.border ? 1 : 0)
|
|
58
|
+
self._header.rtop = self.childBase + (self.border ? 1 : 0);
|
|
59
59
|
}
|
|
60
|
-
})
|
|
60
|
+
});
|
|
61
61
|
|
|
62
|
-
this.pad = options.pad != null
|
|
62
|
+
this.pad = options.pad != null
|
|
63
|
+
? options.pad
|
|
64
|
+
: 2;
|
|
63
65
|
|
|
64
|
-
this.setData(options.rows || options.data)
|
|
66
|
+
this.setData(options.rows || options.data);
|
|
65
67
|
|
|
66
|
-
this.on('attach', function
|
|
67
|
-
self.setData(self.rows)
|
|
68
|
-
})
|
|
68
|
+
this.on('attach', function() {
|
|
69
|
+
self.setData(self.rows);
|
|
70
|
+
});
|
|
69
71
|
|
|
70
|
-
this.on('resize', function
|
|
71
|
-
|
|
72
|
-
self.setData(self.rows)
|
|
73
|
-
self.select(selected)
|
|
74
|
-
self.screen.render()
|
|
75
|
-
})
|
|
72
|
+
this.on('resize', function() {
|
|
73
|
+
var selected = self.selected;
|
|
74
|
+
self.setData(self.rows);
|
|
75
|
+
self.select(selected);
|
|
76
|
+
self.screen.render();
|
|
77
|
+
});
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
Object.setPrototypeOf(ListTable.prototype, List.prototype)
|
|
80
|
+
Object.setPrototypeOf(ListTable.prototype, List.prototype);
|
|
79
81
|
|
|
80
|
-
ListTable.prototype.type = 'list-table'
|
|
82
|
+
ListTable.prototype.type = 'list-table';
|
|
81
83
|
|
|
82
|
-
ListTable.prototype._calculateMaxes = Table.prototype._calculateMaxes
|
|
84
|
+
ListTable.prototype._calculateMaxes = Table.prototype._calculateMaxes;
|
|
83
85
|
|
|
84
|
-
ListTable.prototype.setRows =
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
ListTable.prototype.setRows =
|
|
87
|
+
ListTable.prototype.setData = function(rows) {
|
|
88
|
+
var self = this
|
|
89
|
+
, align = this.__align;
|
|
87
90
|
|
|
88
91
|
if (this.visible && this.lpos) {
|
|
89
|
-
this.clearPos()
|
|
92
|
+
this.clearPos();
|
|
90
93
|
}
|
|
91
94
|
|
|
92
|
-
this.clearItems()
|
|
95
|
+
this.clearItems();
|
|
93
96
|
|
|
94
|
-
this.rows = rows || []
|
|
97
|
+
this.rows = rows || [];
|
|
95
98
|
|
|
96
|
-
this._calculateMaxes()
|
|
99
|
+
this._calculateMaxes();
|
|
97
100
|
|
|
98
|
-
if (!this._maxes)
|
|
99
|
-
return
|
|
100
|
-
}
|
|
101
|
+
if (!this._maxes) return;
|
|
101
102
|
|
|
102
|
-
this.addItem('')
|
|
103
|
+
this.addItem('');
|
|
103
104
|
|
|
104
|
-
this.rows.forEach(function
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
row.forEach(function
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
this.rows.forEach(function(row, i) {
|
|
106
|
+
var isHeader = i === 0;
|
|
107
|
+
var text = '';
|
|
108
|
+
row.forEach(function(cell, i) {
|
|
109
|
+
var width = self._maxes[i];
|
|
110
|
+
var clen = self.strWidth(cell);
|
|
110
111
|
|
|
111
112
|
if (i !== 0) {
|
|
112
|
-
text += ' '
|
|
113
|
+
text += ' ';
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
while (clen < width) {
|
|
116
117
|
if (align === 'center') {
|
|
117
|
-
cell = ' ' + cell + ' '
|
|
118
|
-
clen += 2
|
|
118
|
+
cell = ' ' + cell + ' ';
|
|
119
|
+
clen += 2;
|
|
119
120
|
} else if (align === 'left') {
|
|
120
|
-
cell = cell + ' '
|
|
121
|
-
clen += 1
|
|
121
|
+
cell = cell + ' ';
|
|
122
|
+
clen += 1;
|
|
122
123
|
} else if (align === 'right') {
|
|
123
|
-
cell = ' ' + cell
|
|
124
|
-
clen += 1
|
|
124
|
+
cell = ' ' + cell;
|
|
125
|
+
clen += 1;
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
if (clen > width) {
|
|
129
130
|
if (align === 'center') {
|
|
130
|
-
cell = cell.substring(1)
|
|
131
|
-
clen
|
|
131
|
+
cell = cell.substring(1);
|
|
132
|
+
clen--;
|
|
132
133
|
} else if (align === 'left') {
|
|
133
|
-
cell = cell.slice(0, -1)
|
|
134
|
-
clen
|
|
134
|
+
cell = cell.slice(0, -1);
|
|
135
|
+
clen--;
|
|
135
136
|
} else if (align === 'right') {
|
|
136
|
-
cell = cell.substring(1)
|
|
137
|
-
clen
|
|
137
|
+
cell = cell.substring(1);
|
|
138
|
+
clen--;
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
text += cell
|
|
142
|
-
})
|
|
142
|
+
text += cell;
|
|
143
|
+
});
|
|
143
144
|
if (isHeader) {
|
|
144
|
-
self._header.setContent(text)
|
|
145
|
+
self._header.setContent(text);
|
|
145
146
|
} else {
|
|
146
|
-
self.addItem(text)
|
|
147
|
+
self.addItem(text);
|
|
147
148
|
}
|
|
148
|
-
})
|
|
149
|
+
});
|
|
149
150
|
|
|
150
|
-
this._header.setFront()
|
|
151
|
+
this._header.setFront();
|
|
151
152
|
|
|
152
|
-
this.select(0)
|
|
153
|
-
}
|
|
153
|
+
this.select(0);
|
|
154
|
+
};
|
|
154
155
|
|
|
155
|
-
ListTable.prototype._select = ListTable.prototype.select
|
|
156
|
-
ListTable.prototype.select = function
|
|
156
|
+
ListTable.prototype._select = ListTable.prototype.select;
|
|
157
|
+
ListTable.prototype.select = function(i) {
|
|
157
158
|
if (i === 0) {
|
|
158
|
-
i = 1
|
|
159
|
+
i = 1;
|
|
159
160
|
}
|
|
160
161
|
if (i <= this.childBase) {
|
|
161
|
-
this.setScroll(this.childBase - 1)
|
|
162
|
+
this.setScroll(this.childBase - 1);
|
|
162
163
|
}
|
|
163
|
-
return this._select(i)
|
|
164
|
-
}
|
|
164
|
+
return this._select(i);
|
|
165
|
+
};
|
|
165
166
|
|
|
166
|
-
ListTable.prototype.render = function
|
|
167
|
-
|
|
167
|
+
ListTable.prototype.render = function() {
|
|
168
|
+
var self = this;
|
|
168
169
|
|
|
169
|
-
|
|
170
|
-
if (!coords)
|
|
171
|
-
return
|
|
172
|
-
}
|
|
170
|
+
var coords = this._render();
|
|
171
|
+
if (!coords) return;
|
|
173
172
|
|
|
174
|
-
this._calculateMaxes()
|
|
173
|
+
this._calculateMaxes();
|
|
175
174
|
|
|
176
|
-
if (!this._maxes)
|
|
177
|
-
return coords
|
|
178
|
-
}
|
|
175
|
+
if (!this._maxes) return coords;
|
|
179
176
|
|
|
180
|
-
|
|
181
|
-
xi = coords.xi
|
|
182
|
-
yi = coords.yi
|
|
183
|
-
rx
|
|
184
|
-
ry
|
|
185
|
-
i
|
|
177
|
+
var lines = this.screen.lines
|
|
178
|
+
, xi = coords.xi
|
|
179
|
+
, yi = coords.yi
|
|
180
|
+
, rx
|
|
181
|
+
, ry
|
|
182
|
+
, i;
|
|
186
183
|
|
|
187
|
-
|
|
184
|
+
var battr = this.sattr(this.style.border);
|
|
188
185
|
|
|
189
|
-
|
|
186
|
+
var height = coords.yl - coords.yi - this.ibottom;
|
|
190
187
|
|
|
191
|
-
if (!this.border || this.options.noCellBorders)
|
|
192
|
-
return coords
|
|
193
|
-
}
|
|
188
|
+
if (!this.border || this.options.noCellBorders) return coords;
|
|
194
189
|
|
|
195
190
|
// Draw border with correct angles.
|
|
196
|
-
ry = 0
|
|
191
|
+
ry = 0;
|
|
197
192
|
for (i = 0; i < height + 1; i++) {
|
|
198
|
-
if (!lines[yi + ry])
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
rx += max
|
|
204
|
-
if (!lines[yi + ry][xi + rx + 1]) {
|
|
205
|
-
return
|
|
206
|
-
}
|
|
193
|
+
if (!lines[yi + ry]) break;
|
|
194
|
+
rx = 0;
|
|
195
|
+
self._maxes.slice(0, -1).forEach(function(max) {
|
|
196
|
+
rx += max;
|
|
197
|
+
if (!lines[yi + ry][xi + rx + 1]) return;
|
|
207
198
|
// center
|
|
208
199
|
if (ry === 0) {
|
|
209
200
|
// top
|
|
210
|
-
rx
|
|
211
|
-
lines[yi + ry][xi + rx][0] = battr
|
|
212
|
-
lines[yi + ry][xi + rx][1] = '\u252c' // '┬'
|
|
201
|
+
rx++;
|
|
202
|
+
lines[yi + ry][xi + rx][0] = battr;
|
|
203
|
+
lines[yi + ry][xi + rx][1] = '\u252c'; // '┬'
|
|
213
204
|
// XXX If we alter iheight and itop for no borders - nothing should be written here
|
|
214
205
|
if (!self.border.top) {
|
|
215
|
-
lines[yi + ry][xi + rx][1] = '\u2502' // '│'
|
|
206
|
+
lines[yi + ry][xi + rx][1] = '\u2502'; // '│'
|
|
216
207
|
}
|
|
217
|
-
lines[yi + ry].dirty = true
|
|
208
|
+
lines[yi + ry].dirty = true;
|
|
218
209
|
} else if (ry === height) {
|
|
219
210
|
// bottom
|
|
220
|
-
rx
|
|
221
|
-
lines[yi + ry][xi + rx][0] = battr
|
|
222
|
-
lines[yi + ry][xi + rx][1] = '\u2534' // '┴'
|
|
211
|
+
rx++;
|
|
212
|
+
lines[yi + ry][xi + rx][0] = battr;
|
|
213
|
+
lines[yi + ry][xi + rx][1] = '\u2534'; // '┴'
|
|
223
214
|
// XXX If we alter iheight and ibottom for no borders - nothing should be written here
|
|
224
215
|
if (!self.border.bottom) {
|
|
225
|
-
lines[yi + ry][xi + rx][1] = '\u2502' // '│'
|
|
216
|
+
lines[yi + ry][xi + rx][1] = '\u2502'; // '│'
|
|
226
217
|
}
|
|
227
|
-
lines[yi + ry].dirty = true
|
|
218
|
+
lines[yi + ry].dirty = true;
|
|
228
219
|
} else {
|
|
229
220
|
// middle
|
|
230
|
-
rx
|
|
221
|
+
rx++;
|
|
231
222
|
}
|
|
232
|
-
})
|
|
233
|
-
ry += 1
|
|
223
|
+
});
|
|
224
|
+
ry += 1;
|
|
234
225
|
}
|
|
235
226
|
|
|
236
227
|
// Draw internal borders.
|
|
237
228
|
for (ry = 1; ry < height; ry++) {
|
|
238
|
-
if (!lines[yi + ry])
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
rx += max
|
|
244
|
-
if (!lines[yi + ry][xi + rx + 1]) {
|
|
245
|
-
return
|
|
246
|
-
}
|
|
229
|
+
if (!lines[yi + ry]) break;
|
|
230
|
+
rx = 0;
|
|
231
|
+
self._maxes.slice(0, -1).forEach(function(max) {
|
|
232
|
+
rx += max;
|
|
233
|
+
if (!lines[yi + ry][xi + rx + 1]) return;
|
|
247
234
|
if (self.options.fillCellBorders !== false) {
|
|
248
|
-
|
|
249
|
-
rx
|
|
250
|
-
lines[yi + ry][xi + rx][0] = (battr & ~0x1ff) | lbg
|
|
235
|
+
var lbg = lines[yi + ry][xi + rx][0] & 0x1ff;
|
|
236
|
+
rx++;
|
|
237
|
+
lines[yi + ry][xi + rx][0] = (battr & ~0x1ff) | lbg;
|
|
251
238
|
} else {
|
|
252
|
-
rx
|
|
253
|
-
lines[yi + ry][xi + rx][0] = battr
|
|
239
|
+
rx++;
|
|
240
|
+
lines[yi + ry][xi + rx][0] = battr;
|
|
254
241
|
}
|
|
255
|
-
lines[yi + ry][xi + rx][1] = '\u2502' // '│'
|
|
256
|
-
lines[yi + ry].dirty = true
|
|
257
|
-
})
|
|
242
|
+
lines[yi + ry][xi + rx][1] = '\u2502'; // '│'
|
|
243
|
+
lines[yi + ry].dirty = true;
|
|
244
|
+
});
|
|
258
245
|
}
|
|
259
246
|
|
|
260
|
-
return coords
|
|
261
|
-
}
|
|
247
|
+
return coords;
|
|
248
|
+
};
|
|
262
249
|
|
|
263
250
|
/**
|
|
264
251
|
* Expose
|
|
265
252
|
*/
|
|
266
253
|
|
|
267
|
-
module.exports = ListTable
|
|
254
|
+
module.exports = ListTable;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
var Node = require('./node');
|
|
14
|
+
var Box = require('./box');
|
|
15
|
+
var Text = require('./text');
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Loading
|
|
@@ -20,12 +20,12 @@ const Text = require('./text')
|
|
|
20
20
|
|
|
21
21
|
function Loading(options) {
|
|
22
22
|
if (!(this instanceof Node)) {
|
|
23
|
-
return new Loading(options)
|
|
23
|
+
return new Loading(options);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
options = options || {}
|
|
26
|
+
options = options || {};
|
|
27
27
|
|
|
28
|
-
Box.call(this, options)
|
|
28
|
+
Box.call(this, options);
|
|
29
29
|
|
|
30
30
|
this._.icon = new Text({
|
|
31
31
|
parent: this,
|
|
@@ -35,56 +35,56 @@ function Loading(options) {
|
|
|
35
35
|
right: 1,
|
|
36
36
|
height: 1,
|
|
37
37
|
content: '|'
|
|
38
|
-
})
|
|
38
|
+
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
Object.setPrototypeOf(Loading.prototype, Box.prototype)
|
|
41
|
+
Object.setPrototypeOf(Loading.prototype, Box.prototype);
|
|
42
42
|
|
|
43
|
-
Loading.prototype.type = 'loading'
|
|
43
|
+
Loading.prototype.type = 'loading';
|
|
44
44
|
|
|
45
|
-
Loading.prototype.load = function
|
|
46
|
-
|
|
45
|
+
Loading.prototype.load = function(text) {
|
|
46
|
+
var self = this;
|
|
47
47
|
|
|
48
48
|
// XXX Keep above:
|
|
49
49
|
// var parent = this.parent;
|
|
50
50
|
// this.detach();
|
|
51
51
|
// parent.append(this);
|
|
52
52
|
|
|
53
|
-
this.show()
|
|
54
|
-
this.setContent(text)
|
|
53
|
+
this.show();
|
|
54
|
+
this.setContent(text);
|
|
55
55
|
|
|
56
56
|
if (this._.timer) {
|
|
57
|
-
this.stop()
|
|
57
|
+
this.stop();
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
this.screen.lockKeys = true
|
|
60
|
+
this.screen.lockKeys = true;
|
|
61
61
|
|
|
62
|
-
this._.timer = setInterval(function
|
|
62
|
+
this._.timer = setInterval(function() {
|
|
63
63
|
if (self._.icon.content === '|') {
|
|
64
|
-
self._.icon.setContent('/')
|
|
64
|
+
self._.icon.setContent('/');
|
|
65
65
|
} else if (self._.icon.content === '/') {
|
|
66
|
-
self._.icon.setContent('-')
|
|
66
|
+
self._.icon.setContent('-');
|
|
67
67
|
} else if (self._.icon.content === '-') {
|
|
68
|
-
self._.icon.setContent('\\')
|
|
68
|
+
self._.icon.setContent('\\');
|
|
69
69
|
} else if (self._.icon.content === '\\') {
|
|
70
|
-
self._.icon.setContent('|')
|
|
70
|
+
self._.icon.setContent('|');
|
|
71
71
|
}
|
|
72
|
-
self.screen.render()
|
|
73
|
-
}, 200)
|
|
74
|
-
}
|
|
72
|
+
self.screen.render();
|
|
73
|
+
}, 200);
|
|
74
|
+
};
|
|
75
75
|
|
|
76
|
-
Loading.prototype.stop = function
|
|
77
|
-
this.screen.lockKeys = false
|
|
78
|
-
this.hide()
|
|
76
|
+
Loading.prototype.stop = function() {
|
|
77
|
+
this.screen.lockKeys = false;
|
|
78
|
+
this.hide();
|
|
79
79
|
if (this._.timer) {
|
|
80
|
-
clearInterval(this._.timer)
|
|
81
|
-
delete this._.timer
|
|
80
|
+
clearInterval(this._.timer);
|
|
81
|
+
delete this._.timer;
|
|
82
82
|
}
|
|
83
|
-
this.screen.render()
|
|
84
|
-
}
|
|
83
|
+
this.screen.render();
|
|
84
|
+
};
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Expose
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
module.exports = Loading
|
|
90
|
+
module.exports = Loading;
|
|
@@ -10,75 +10,76 @@
|
|
|
10
10
|
* Modules
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
var util = require('util');
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
var nextTick = global.setImmediate || process.nextTick.bind(process);
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
var Node = require('./node');
|
|
18
|
+
var ScrollableText = require('./scrollabletext');
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Log
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
function Log(options) {
|
|
25
|
-
|
|
25
|
+
var self = this;
|
|
26
26
|
|
|
27
27
|
if (!(this instanceof Node)) {
|
|
28
|
-
return new Log(options)
|
|
28
|
+
return new Log(options);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
options = options || {}
|
|
31
|
+
options = options || {};
|
|
32
32
|
|
|
33
|
-
ScrollableText.call(this, options)
|
|
33
|
+
ScrollableText.call(this, options);
|
|
34
34
|
|
|
35
|
-
this.scrollback = options.scrollback != null
|
|
36
|
-
|
|
35
|
+
this.scrollback = options.scrollback != null
|
|
36
|
+
? options.scrollback
|
|
37
|
+
: Infinity;
|
|
38
|
+
this.scrollOnInput = options.scrollOnInput;
|
|
37
39
|
|
|
38
|
-
this.on('set content', function
|
|
40
|
+
this.on('set content', function() {
|
|
39
41
|
if (!self._userScrolled || self.scrollOnInput) {
|
|
40
|
-
nextTick(function
|
|
41
|
-
self.setScrollPerc(100)
|
|
42
|
-
self._userScrolled = false
|
|
43
|
-
self.screen.render()
|
|
44
|
-
})
|
|
42
|
+
nextTick(function() {
|
|
43
|
+
self.setScrollPerc(100);
|
|
44
|
+
self._userScrolled = false;
|
|
45
|
+
self.screen.render();
|
|
46
|
+
});
|
|
45
47
|
}
|
|
46
|
-
})
|
|
48
|
+
});
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
Object.setPrototypeOf(Log.prototype, ScrollableText.prototype)
|
|
51
|
+
Object.setPrototypeOf(Log.prototype, ScrollableText.prototype);
|
|
50
52
|
|
|
51
|
-
Log.prototype.type = 'log'
|
|
53
|
+
Log.prototype.type = 'log';
|
|
52
54
|
|
|
53
|
-
Log.prototype.log =
|
|
54
|
-
|
|
55
|
+
Log.prototype.log =
|
|
56
|
+
Log.prototype.add = function() {
|
|
57
|
+
var args = Array.prototype.slice.call(arguments);
|
|
55
58
|
if (typeof args[0] === 'object') {
|
|
56
|
-
args[0] = util.inspect(args[0], true, 20, true)
|
|
59
|
+
args[0] = util.inspect(args[0], true, 20, true);
|
|
57
60
|
}
|
|
58
|
-
|
|
59
|
-
this.emit('log', text)
|
|
60
|
-
|
|
61
|
+
var text = util.format.apply(util, args);
|
|
62
|
+
this.emit('log', text);
|
|
63
|
+
var ret = this.pushLine(text);
|
|
61
64
|
if (this._clines.fake.length > this.scrollback) {
|
|
62
|
-
this.shiftLine(0, (this.scrollback / 3) | 0)
|
|
65
|
+
this.shiftLine(0, (this.scrollback / 3) | 0);
|
|
63
66
|
}
|
|
64
|
-
return ret
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
Log.prototype._scroll = Log.prototype.scroll
|
|
68
|
-
Log.prototype.scroll = function
|
|
69
|
-
if (offset === 0)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this._userScrolled = true
|
|
73
|
-
const ret = this._scroll(offset, always)
|
|
67
|
+
return ret;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
Log.prototype._scroll = Log.prototype.scroll;
|
|
71
|
+
Log.prototype.scroll = function(offset, always) {
|
|
72
|
+
if (offset === 0) return this._scroll(offset, always);
|
|
73
|
+
this._userScrolled = true;
|
|
74
|
+
var ret = this._scroll(offset, always);
|
|
74
75
|
if (this.getScrollPerc() === 100) {
|
|
75
|
-
this._userScrolled = false
|
|
76
|
+
this._userScrolled = false;
|
|
76
77
|
}
|
|
77
|
-
return ret
|
|
78
|
-
}
|
|
78
|
+
return ret;
|
|
79
|
+
};
|
|
79
80
|
|
|
80
81
|
/**
|
|
81
82
|
* Expose
|
|
82
83
|
*/
|
|
83
84
|
|
|
84
|
-
module.exports = Log
|
|
85
|
+
module.exports = Log;
|