@gloom-sh/terminal 0.20.17 → 0.20.19
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/package.json +3 -1
- package/src/account/auth-dialog.tsx +19 -1
- package/src/account/billing.ts +2 -1
- package/src/account/heard-from-question.tsx +235 -0
- package/src/account/heard-from.ts +97 -0
- package/src/api-client/cot.ts +5 -6
- package/src/api-client/data.ts +14 -3
- package/src/api-client/heard-from.ts +72 -0
- package/src/api-client/index.ts +64 -6
- package/src/api-client/mna.ts +18 -0
- package/src/api-client/request.ts +162 -40
- package/src/api-client/supply-chain.ts +9 -0
- package/src/api-client/types/billing.ts +35 -1
- package/src/api-client/types/news.ts +45 -0
- package/src/api-client/types/world-venues.ts +9 -0
- package/src/app/global-shortcuts.ts +5 -3
- package/src/app/pro-welcome/keys.ts +27 -0
- package/src/app/pro-welcome/model.ts +158 -0
- package/src/app/pro-welcome/row.tsx +176 -0
- package/src/app/pro-welcome/use-pro-welcome.ts +156 -0
- package/src/app/runtime/external-profile-changes.ts +135 -0
- package/src/app.tsx +37 -4
- package/src/architecture/core-builtin-allowlist.json +1 -1
- package/src/architecture/floating-promise-allowlist.json +1 -2
- package/src/architecture/shortcut-labels-allowlist.json +1 -0
- package/src/cli/alert-listing.ts +98 -0
- package/src/cli/commands/market.ts +191 -39
- package/src/cli/commands/overview.ts +7 -1
- package/src/cli/commands/plugins.ts +3 -2
- package/src/cli/commands/search.ts +30 -6
- package/src/cli/commands/ticker.ts +13 -6
- package/src/cli/context.ts +24 -5
- package/src/cli/csv-export.ts +2 -1
- package/src/cli/desktop-pane-shot-browser.ts +3 -1
- package/src/cli/desktop-pane-shot-view.ts +0 -1
- package/src/cli/desktop-pane-shot.ts +276 -52
- package/src/cli/errors.ts +3 -9
- package/src/cli/exit-codes.ts +1 -1
- package/src/cli/glossary.ts +65 -11
- package/src/cli/help.ts +1 -1
- package/src/cli/history-demergers.ts +117 -0
- package/src/cli/history-rows.ts +8 -4
- package/src/cli/index.ts +2 -1
- package/src/cli/known-gaps.ts +16 -0
- package/src/cli/known-us-stocks.ts +18 -0
- package/src/cli/listing-arg.ts +192 -38
- package/src/cli/pane-functions/catalog-snapshot-build.ts +83 -0
- package/src/cli/pane-functions/catalog-snapshot.json +877 -0
- package/src/cli/pane-functions/catalog-snapshot.ts +62 -0
- package/src/cli/pane-functions/catalog.ts +50 -16
- package/src/cli/pane-functions/data.ts +16 -4
- package/src/cli/pane-functions/dom.ts +54 -8
- package/src/cli/pane-functions/freshness.ts +39 -4
- package/src/cli/pane-functions/function-help.ts +3 -3
- package/src/cli/pane-functions/headless.ts +9 -1
- package/src/cli/pane-functions/index.ts +175 -50
- package/src/cli/pane-functions/report-notices.ts +10 -0
- package/src/cli/pane-functions/resolver.ts +11 -7
- package/src/cli/pane-functions/screenshot-assessment.ts +38 -10
- package/src/cli/pane-functions/screenshot-data-evidence.ts +7 -15
- package/src/cli/pane-functions/screenshot-payload.ts +36 -1
- package/src/cli/pane-functions/screenshot-render.ts +24 -9
- package/src/cli/pane-functions/screenshot-types.ts +9 -0
- package/src/cli/quote-answer.ts +33 -17
- package/src/cli/registry.ts +22 -2
- package/src/cli/result.ts +22 -4
- package/src/cli/scroll-truncation.ts +7 -2
- package/src/cli/series-search.ts +45 -6
- package/src/cli/shot-temp-dir.ts +4 -9
- package/src/cli/ticker-resolution.ts +1 -1
- package/src/cli/unreachable.ts +21 -0
- package/src/components/chart/composite/drawing-store.ts +11 -7
- package/src/components/chart/composite/format.ts +1 -0
- package/src/components/chart/composite/legend.tsx +48 -20
- package/src/components/chart/composite/panel-surface/panel-cursor.tsx +3 -3
- package/src/components/chart/composite/panel-surface/plot-gestures.ts +9 -2
- package/src/components/chart/composite/panel-surface.tsx +1 -1
- package/src/components/chart/composite/price-axis-labels.tsx +7 -5
- package/src/components/chart/composite/tools.ts +164 -39
- package/src/components/chart-table/header.tsx +11 -2
- package/src/components/chart-table/layout.ts +16 -17
- package/src/components/command-bar/pane-templates/items.ts +17 -1
- package/src/components/command-bar/routes/root/provider-search.ts +10 -1
- package/src/components/command-bar/routes/root/results.ts +34 -2
- package/src/components/command-bar/routes/root/runtime.ts +19 -4
- package/src/components/command-bar/routes/ticker-search/results.ts +5 -0
- package/src/components/command-bar/routes/ticker-search/route.ts +5 -0
- package/src/components/command-bar/selection-runtime.ts +29 -5
- package/src/components/command-bar/surface/index.tsx +4 -1
- package/src/components/command-bar/workflow/alert.ts +32 -13
- package/src/components/data-table/view.tsx +15 -2
- package/src/components/form-modal/content.tsx +9 -4
- package/src/components/index.ts +1 -1
- package/src/components/layout/header.tsx +9 -5
- package/src/components/layout/pane/capture-status.ts +6 -0
- package/src/components/layout/pane/footer/index.tsx +2 -0
- package/src/components/layout/pane/footer/model.ts +123 -17
- package/src/components/layout/pane/header.tsx +16 -2
- package/src/components/layout/pane/status-footer.ts +24 -0
- package/src/components/market-board/index.tsx +4 -2
- package/src/components/onboarding/onboarding-frame.tsx +6 -2
- package/src/components/onboarding/onboarding-keyboard.ts +7 -1
- package/src/components/onboarding/onboarding-wizard.tsx +3 -1
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +24 -15
- package/src/components/onboarding/setup-cards.ts +36 -0
- package/src/components/onboarding/use-onboarding-progress.ts +22 -1
- package/src/components/onboarding/wizard-account.ts +6 -1
- package/src/components/onboarding/wizard-model.ts +32 -6
- package/src/components/onboarding/wizard-positions.ts +1 -1
- package/src/components/price-performance.tsx +26 -8
- package/src/components/reader/article-reader.tsx +12 -5
- package/src/components/sign-in-gate.tsx +3 -1
- package/src/components/toggle-list.tsx +6 -8
- package/src/components/ui/confirm-dialog.tsx +47 -7
- package/src/components/ui/data-table/opentui/index.tsx +7 -0
- package/src/components/ui/data-table/types.ts +8 -0
- package/src/components/ui/display.tsx +17 -2
- package/src/components/ui/index.ts +1 -1
- package/src/components/ui/stat-grid.tsx +4 -0
- package/src/components/ui/status.tsx +13 -1
- package/src/components/ui/table-layout.ts +34 -2
- package/src/components/use-pane-notice-footer.tsx +16 -3
- package/src/data/config/store/index.ts +31 -0
- package/src/data/config/store/node.ts +61 -11
- package/src/data/config/store/normalize.ts +4 -6
- package/src/data/config/store/shared-file.ts +309 -0
- package/src/data/profile-merge.ts +299 -0
- package/src/data/sqlite/checkpointer.ts +11 -1
- package/src/data/sqlite/database.ts +1 -1
- package/src/data/ticker-repository.ts +134 -10
- package/src/data/ticker-store.ts +67 -0
- package/src/data/ticker-writes.ts +5 -0
- package/src/i18n/es.ts +27 -0
- package/src/i18n/ja.ts +27 -0
- package/src/i18n/ko.ts +27 -0
- package/src/i18n/zh-cn.ts +27 -0
- package/src/i18n/zh-tw.ts +27 -0
- package/src/layout-marketplace/gallery-desktop.tsx +2 -2
- package/src/market-data/ah-pair.ts +122 -0
- package/src/market-data/coordinator/entries.ts +6 -4
- package/src/market-data/coordinator/index.ts +14 -3
- package/src/market-data/depositary-pair.ts +6 -2
- package/src/market-data/futures-board.ts +36 -29
- package/src/market-data/futures-contract.ts +37 -1
- package/src/market-data/hooks.tsx +33 -2
- package/src/market-data/market/change-basis.ts +11 -1
- package/src/market-data/market/header-market.ts +11 -0
- package/src/market-data/market/status.ts +40 -4
- package/src/market-data/performance.ts +127 -32
- package/src/market-data/quotes/time.ts +5 -2
- package/src/market-data/split-terms.ts +28 -0
- package/src/news/types.ts +28 -0
- package/src/notifications/app-badge.ts +2 -3
- package/src/notifications/app-notifier.ts +5 -0
- package/src/plugins/builtin/account-management/footer.ts +1 -1
- package/src/plugins/builtin/account-management/keyboard.ts +4 -0
- package/src/plugins/builtin/account-management/model.ts +1 -0
- package/src/plugins/builtin/account-management/pane.tsx +75 -7
- package/src/plugins/builtin/account-management/payment-recovery-row.tsx +12 -5
- package/src/plugins/builtin/account-management/pro-cancel.tsx +197 -0
- package/src/plugins/builtin/account-management/trial-cancel.ts +1 -1
- package/src/plugins/builtin/alerts/cli-move.ts +2 -2
- package/src/plugins/builtin/alerts/cli.ts +101 -48
- package/src/plugins/builtin/alerts/command.ts +39 -9
- package/src/plugins/builtin/alerts/constants.ts +10 -0
- package/src/plugins/builtin/alerts/earnings-listing.ts +20 -0
- package/src/plugins/builtin/alerts/event-rows.ts +9 -3
- package/src/plugins/builtin/alerts/events-pane.tsx +16 -10
- package/src/plugins/builtin/alerts/format.ts +24 -8
- package/src/plugins/builtin/alerts/headless.ts +12 -6
- package/src/plugins/builtin/alerts/index.tsx +97 -16
- package/src/plugins/builtin/alerts/move-checks.ts +7 -0
- package/src/plugins/builtin/alerts/option-contract.ts +197 -0
- package/src/plugins/builtin/alerts/pane.tsx +1 -1
- package/src/plugins/builtin/alerts/price.ts +30 -5
- package/src/plugins/builtin/alerts/pro-rules.ts +62 -0
- package/src/plugins/builtin/alerts/quotes.ts +26 -2
- package/src/plugins/builtin/alerts/research-builder.ts +5 -10
- package/src/plugins/builtin/alerts/scheduled.ts +6 -1
- package/src/plugins/builtin/alerts/types.ts +7 -0
- package/src/plugins/builtin/analytics/account-returns.ts +1 -1
- package/src/plugins/builtin/analytics/manual-value.ts +61 -0
- package/src/plugins/builtin/analytics/pane-model.ts +2 -2
- package/src/plugins/builtin/analytics/risk-book.ts +7 -7
- package/src/plugins/builtin/analytics/risk-client.ts +27 -14
- package/src/plugins/builtin/analytics/risk-headless.ts +13 -8
- package/src/plugins/builtin/analytics/risk-model.ts +92 -4
- package/src/plugins/builtin/analytics/risk-pane.tsx +85 -38
- package/src/plugins/builtin/awards/pane.tsx +1 -1
- package/src/plugins/builtin/broker-trading/orders.tsx +2 -2
- package/src/plugins/builtin/buildout/company/pane.tsx +4 -14
- package/src/plugins/builtin/catalysts/model.ts +2 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +8 -2
- package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -3
- package/src/plugins/builtin/chart-composer/chart-spec.ts +5 -0
- package/src/plugins/builtin/chart-composer/cli-options.ts +9 -5
- package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +2 -6
- package/src/plugins/builtin/chart-composer/headless-schema.ts +14 -10
- package/src/plugins/builtin/chart-composer/headless.ts +2 -0
- package/src/plugins/builtin/chart-composer/index.tsx +17 -5
- package/src/plugins/builtin/chart-composer/pane.tsx +19 -6
- package/src/plugins/builtin/chart-composer/viewport-labels.ts +2 -17
- package/src/plugins/builtin/chat/controller/notifications.ts +1 -0
- package/src/plugins/builtin/chat/index.tsx +0 -1
- package/src/plugins/builtin/cloud/auth-actions.tsx +11 -6
- package/src/plugins/builtin/cloud/company-picker.tsx +5 -3
- package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
- package/src/plugins/builtin/commodities-energy/index.tsx +1 -1
- package/src/plugins/builtin/company-kpis/headless.ts +10 -5
- package/src/plugins/builtin/company-kpis/latest.ts +45 -0
- package/src/plugins/builtin/company-kpis/model.ts +57 -15
- package/src/plugins/builtin/company-kpis/pane.tsx +22 -8
- package/src/plugins/builtin/composite/alt-data.ts +20 -0
- package/src/plugins/builtin/composite/application.ts +14 -0
- package/src/plugins/builtin/composite/broker.ts +12 -0
- package/src/plugins/builtin/composite/credit.ts +33 -0
- package/src/plugins/builtin/composite/crypto.ts +10 -0
- package/src/plugins/builtin/composite/earnings.ts +12 -0
- package/src/plugins/builtin/composite/filings.ts +13 -0
- package/src/plugins/builtin/composite/futures-commodities.ts +23 -0
- package/src/plugins/builtin/composite/global-markets.ts +12 -0
- package/src/plugins/builtin/composite/options-volatility.ts +23 -0
- package/src/plugins/builtin/composite/ownership.ts +23 -0
- package/src/plugins/builtin/composite/portfolio.ts +10 -0
- package/src/plugins/builtin/composite/quant.ts +15 -0
- package/src/plugins/builtin/composite/rates-macro.ts +30 -0
- package/src/plugins/builtin/composite/screeners.ts +11 -0
- package/src/plugins/builtin/composite/shared.ts +11 -0
- package/src/plugins/builtin/composite/ticker-core.ts +36 -0
- package/src/plugins/builtin/congress-trades/headless.ts +31 -3
- package/src/plugins/builtin/congress-trades/model.ts +9 -5
- package/src/plugins/builtin/correlation/index.tsx +13 -17
- package/src/plugins/builtin/correlation/matrix/model.ts +18 -0
- package/src/plugins/builtin/cot/client.ts +2 -3
- package/src/plugins/builtin/cot/headless.ts +16 -16
- package/src/plugins/builtin/cot/index.tsx +6 -6
- package/src/plugins/builtin/cot/model.ts +25 -5
- package/src/plugins/builtin/cot/pane.tsx +11 -6
- package/src/plugins/builtin/cot/series.ts +11 -8
- package/src/plugins/builtin/cpi/model.ts +15 -4
- package/src/plugins/builtin/cpi/pane.tsx +29 -7
- package/src/plugins/builtin/dividend-yield/client.ts +57 -16
- package/src/plugins/builtin/dividend-yield/headless.ts +17 -11
- package/src/plugins/builtin/dividend-yield/model.ts +4 -3
- package/src/plugins/builtin/dividend-yield/pane.tsx +22 -18
- package/src/plugins/builtin/dividend-yield/ranking.ts +1 -1
- package/src/plugins/builtin/dividend-yield/types.ts +4 -0
- package/src/plugins/builtin/dividend-yield/view.ts +23 -12
- package/src/plugins/builtin/doe/model.ts +30 -0
- package/src/plugins/builtin/doe/pane.tsx +8 -2
- package/src/plugins/builtin/earnings/board-table.ts +9 -4
- package/src/plugins/builtin/earnings/fiscal-quarter.ts +39 -0
- package/src/plugins/builtin/earnings/headless.ts +16 -6
- package/src/plugins/builtin/earnings/history-model.ts +6 -4
- package/src/plugins/builtin/earnings/history-table.ts +7 -4
- package/src/plugins/builtin/earnings-calls/calendar.tsx +4 -3
- package/src/plugins/builtin/earnings-calls/pane.tsx +8 -2
- package/src/plugins/builtin/earnings-ripple/pane.tsx +2 -2
- package/src/plugins/builtin/econ/calendar-model.ts +16 -0
- package/src/plugins/builtin/econ/index.tsx +7 -2
- package/src/plugins/builtin/equity-screener/headless.ts +4 -1
- package/src/plugins/builtin/equity-screener/model.ts +7 -6
- package/src/plugins/builtin/estimate-revisions/headless.ts +1 -1
- package/src/plugins/builtin/exposure/model.ts +10 -0
- package/src/plugins/builtin/exposure/pane.tsx +10 -3
- package/src/plugins/builtin/futures/model.ts +14 -1
- package/src/plugins/builtin/futures/series.ts +1 -8
- package/src/plugins/builtin/fx-matrix/amount.ts +15 -1
- package/src/plugins/builtin/fx-matrix/headless.ts +12 -6
- package/src/plugins/builtin/fx-matrix/index.tsx +25 -7
- package/src/plugins/builtin/fx-matrix/settings.ts +9 -4
- package/src/plugins/builtin/insider/detail.tsx +36 -7
- package/src/plugins/builtin/insider/filing-stories.ts +110 -0
- package/src/plugins/builtin/insider/headless.ts +37 -2
- package/src/plugins/builtin/insider/index.tsx +79 -10
- package/src/plugins/builtin/insider/model.ts +43 -5
- package/src/plugins/builtin/ipo-calendar/client.ts +11 -1
- package/src/plugins/builtin/ipo-calendar/model.ts +3 -7
- package/src/plugins/builtin/jobs/headless.ts +2 -1
- package/src/plugins/builtin/jobs/model.ts +6 -0
- package/src/plugins/builtin/jobs/pane.tsx +8 -3
- package/src/plugins/builtin/kelly-sizer/pane.tsx +9 -4
- package/src/plugins/builtin/market-valuation/pane.tsx +22 -10
- package/src/plugins/builtin/mna/detail.tsx +67 -6
- package/src/plugins/builtin/mna/headless.ts +128 -13
- package/src/plugins/builtin/mna/model.ts +219 -16
- package/src/plugins/builtin/mna/pane.tsx +34 -6
- package/src/plugins/builtin/money-markets/model.ts +14 -5
- package/src/plugins/builtin/money-markets/pane.tsx +4 -3
- package/src/plugins/builtin/news/wire/news/detail-view.tsx +118 -10
- package/src/plugins/builtin/news/wire/news/footer.ts +3 -8
- package/src/plugins/builtin/news/wire/news/story-evidence.ts +178 -0
- package/src/plugins/builtin/options/analytics.ts +1 -1
- package/src/plugins/builtin/options/view.tsx +18 -11
- package/src/plugins/builtin/options-positioning/model.ts +11 -0
- package/src/plugins/builtin/options-positioning/pane.tsx +22 -1
- package/src/plugins/builtin/options-scenario/client.ts +49 -8
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +22 -6
- package/src/plugins/builtin/options-scenario/csp-screen.ts +39 -12
- package/src/plugins/builtin/options-scenario/headless.ts +7 -3
- package/src/plugins/builtin/options-scenario/model.ts +33 -2
- package/src/plugins/builtin/options-scenario/pane.tsx +3 -4
- package/src/plugins/builtin/options-scenario/strategy-screen.ts +7 -5
- package/src/plugins/builtin/pe-band/client.ts +13 -1
- package/src/plugins/builtin/pe-band/headless.ts +2 -2
- package/src/plugins/builtin/pe-band/model.ts +63 -10
- package/src/plugins/builtin/pe-band/pane.tsx +5 -5
- package/src/plugins/builtin/perps/cascade.ts +4 -3
- package/src/plugins/builtin/perps/markets-section.tsx +5 -2
- package/src/plugins/builtin/perps/model.ts +4 -3
- package/src/plugins/builtin/portfolio-list/allocation-rows.ts +26 -7
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +66 -13
- package/src/plugins/builtin/portfolio-list/cli/render.ts +76 -33
- package/src/plugins/builtin/portfolio-list/headless.ts +69 -22
- package/src/plugins/builtin/portfolio-list/pane/data.ts +3 -3
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +29 -14
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/table.tsx +3 -2
- package/src/plugins/builtin/relative-rotation/pane.tsx +2 -3
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +33 -14
- package/src/plugins/builtin/research/event-model.ts +43 -19
- package/src/plugins/builtin/research/headless.ts +8 -1
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +19 -17
- package/src/plugins/builtin/research-search/index.tsx +3 -1
- package/src/plugins/builtin/scanner/denied.tsx +16 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
- package/src/plugins/builtin/scanner/hilo-pane.tsx +1 -1
- package/src/plugins/builtin/sec/filing-display.tsx +14 -2
- package/src/plugins/builtin/sec/headless.ts +42 -4
- package/src/plugins/builtin/sec/index.tsx +21 -1
- package/src/plugins/builtin/sectors/index.tsx +6 -9
- package/src/plugins/builtin/sectors/sector-model.ts +1 -1
- package/src/plugins/builtin/shared/cloud-upgrade.ts +1 -1
- package/src/plugins/builtin/shared/earnings-report.ts +49 -5
- package/src/plugins/builtin/shared/options-pro-copy.ts +34 -0
- package/src/plugins/builtin/shared/report-freshness.ts +2 -3
- package/src/plugins/builtin/shared/statement-currency.ts +23 -0
- package/src/plugins/builtin/shared/ticker-surface.ts +1 -1
- package/src/plugins/builtin/supply-chain/client.ts +34 -9
- package/src/plugins/builtin/supply-chain/evidence.ts +3 -2
- package/src/plugins/builtin/supply-chain/flow.tsx +4 -3
- package/src/plugins/builtin/supply-chain/graph-model.ts +14 -7
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +3 -1
- package/src/plugins/builtin/supply-chain/graph.tsx +6 -3
- package/src/plugins/builtin/supply-chain/headless.ts +19 -4
- package/src/plugins/builtin/supply-chain/model.ts +50 -6
- package/src/plugins/builtin/supply-chain/pane.tsx +79 -18
- package/src/plugins/builtin/themes/headless.ts +4 -4
- package/src/plugins/builtin/themes/model.ts +11 -8
- package/src/plugins/builtin/themes/pane.tsx +2 -2
- package/src/plugins/builtin/ticker-detail/adr-pair/ah.ts +62 -0
- package/src/plugins/builtin/ticker-detail/adr-pair/headless.ts +119 -20
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +51 -1
- package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +25 -14
- package/src/plugins/builtin/ticker-detail/financials/model.ts +22 -32
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +7 -9
- package/src/plugins/builtin/ticker-detail/headless-schema.ts +2 -0
- package/src/plugins/builtin/ticker-detail/headless.ts +28 -12
- package/src/plugins/builtin/ticker-detail/overview/board-lot.ts +21 -0
- package/src/plugins/builtin/ticker-detail/overview/model.ts +28 -2
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +8 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +68 -13
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +9 -2
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +5 -2
- package/src/plugins/builtin/volatility/model.ts +17 -0
- package/src/plugins/builtin/volatility/pane.tsx +16 -7
- package/src/plugins/builtin/world-indices/index.tsx +2 -0
- package/src/plugins/builtin/world-indices/table.tsx +15 -0
- package/src/plugins/builtin/world-venue-map/evidence.ts +3 -2
- package/src/plugins/builtin/world-venue-map/headless.ts +32 -18
- package/src/plugins/builtin/world-venue-map/index.ts +19 -6
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +9 -5
- package/src/plugins/builtin/world-venue-map/layers.ts +33 -11
- package/src/plugins/builtin/world-venue-map/map.tsx +12 -0
- package/src/plugins/builtin/world-venue-map/model.ts +6 -1
- package/src/plugins/builtin/world-venue-map/pane.tsx +35 -6
- package/src/plugins/builtin/world-venue-map/place.ts +119 -0
- package/src/plugins/builtin/world-venue-map/venue-header.tsx +5 -3
- package/src/plugins/catalog-browser.ts +10 -1
- package/src/plugins/catalog-data.ts +20 -0
- package/src/plugins/catalog-lazy.ts +51 -0
- package/src/plugins/catalog-ui.ts +16 -18
- package/src/plugins/host-smoke.ts +5 -2
- package/src/portfolio/allocation.ts +79 -19
- package/src/portfolio/cash-balances.ts +76 -0
- package/src/portfolio/mutations.ts +43 -8
- package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
- package/src/renderers/browser/activity.ts +16 -0
- package/src/renderers/browser/app-badge-host.ts +14 -0
- package/src/renderers/browser/main.tsx +5 -0
- package/src/renderers/browser/notifications.ts +103 -0
- package/src/renderers/browser/ui-host.tsx +4 -0
- package/src/renderers/desktop/window-layouts.ts +14 -0
- package/src/renderers/dom/data-table/index.tsx +27 -4
- package/src/renderers/dom/data-table/row.tsx +2 -0
- package/src/renderers/dom/host/tabs.tsx +57 -8
- package/src/renderers/dom/styles.css +13 -5
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +4 -0
- package/src/renderers/electrobun/bun/desktop/backend.ts +22 -1
- package/src/renderers/electrobun/bun/window/native-min-size.ts +6 -1
- package/src/renderers/electrobun/shared/protocol.ts +4 -0
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +50 -12
- package/src/renderers/electrobun/view/http-fetch.ts +3 -2
- package/src/renderers/electrobun/view/remote/ticker-repository.ts +10 -0
- package/src/series/standalone-catalog.ts +5 -4
- package/src/series/standalone.ts +13 -7
- package/src/sources/gloomberb-cloud/index.ts +22 -9
- package/src/sources/gloomberb-cloud/news.ts +35 -0
- package/src/sources/gloomberb-cloud/perpetuals.ts +60 -3
- package/src/sources/provider-errors.ts +34 -7
- package/src/sources/provider-router/financials.ts +20 -13
- package/src/sources/provider-router/history.ts +32 -6
- package/src/sources/provider-router/index.ts +4 -0
- package/src/sources/provider-router/search.ts +1 -0
- package/src/sync/collections-contributor.ts +3 -1
- package/src/sync/config-merge.ts +10 -1
- package/src/sync/sanitize.ts +26 -2
- package/src/tickers/company-name-listing.ts +16 -2
- package/src/tickers/listing-fate.ts +12 -8
- package/src/tickers/renamed-listings.ts +43 -10
- package/src/tickers/search/home-listing.ts +28 -0
- package/src/tickers/search/index.ts +19 -7
- package/src/tickers/terminal-codes.ts +11 -1
- package/src/time-series/base-series.ts +39 -6
- package/src/time-series/chart-seed.ts +2 -2
- package/src/time-series/history-quality.ts +4 -1
- package/src/time-series/hooks.ts +2 -0
- package/src/time-series/price-comparison.ts +17 -23
- package/src/time-series/reporting.ts +1 -1
- package/src/time-series/resolution.ts +13 -0
- package/src/time-series/resolve-context.ts +6 -0
- package/src/time-series/resolve.ts +42 -3
- package/src/time-series/spec.ts +2 -2
- package/src/time-series/types.ts +3 -2
- package/src/types/data-provider.ts +11 -0
- package/src/types/financials.ts +48 -4
- package/src/types/headless.ts +1 -0
- package/src/types/issuer-listings.ts +2 -0
- package/src/types/plugin-notifications.ts +3 -0
- package/src/types/price-history.ts +6 -4
- package/src/types/ticker.ts +10 -2
- package/src/ui/host.tsx +2 -0
- package/src/utils/cli-output.ts +1 -1
- package/src/utils/declared-dividends.ts +13 -1
- package/src/utils/dividend-cash.ts +5 -1
- package/src/utils/exchange-announcements.ts +7 -2
- package/src/utils/forward-dividend.ts +4 -3
- package/src/utils/fundamentals.ts +40 -0
- package/src/utils/network-failure.ts +2 -0
- package/src/utils/price-history-integrity.ts +9 -1
- package/src/utils/remove-folder.ts +37 -0
- package/src/utils/trailing-dividend.ts +1 -1
- package/src/plugins/builtin/composite-plugins.ts +0 -285
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
type TickerSearchCandidate,
|
|
23
23
|
} from "../../tickers/search";
|
|
24
24
|
import { initMarketData, withMarketData } from "../context";
|
|
25
|
-
import { listingChangeLine, loadListingFate, loadNoQuoteEnding, noLongerListedNote, noQuoteLastTradeNote, type NoQuoteEnding } from "../../tickers/listing-fate";
|
|
25
|
+
import { listingChangeLine, loadListingFate, loadNoQuoteEnding, noLongerListedNote, noQuoteLastTradeNote, tradingListing, type NoQuoteEnding } from "../../tickers/listing-fate";
|
|
26
26
|
import { formatMarketPriceWithCurrency, quoteFormatOptions, withCurrencyMinorDigits } from "../../market-data/market/format";
|
|
27
27
|
import { formerIssuerLine, startTickerChangeLookup, type TickerChangeLookup } from "../../tickers/ticker-changes";
|
|
28
28
|
import { fail, failRetryable, failWithError, isCliFailure, unreachableError } from "../errors";
|
|
@@ -48,6 +48,7 @@ import { hasNonLatinLetters } from "../../utils/typed-text";
|
|
|
48
48
|
import { isKanjiOnlyName, japaneseNameReadAs, readExactJapaneseName, readJapaneseName, type JapaneseNameListing } from "../../tickers/search/japanese-names";
|
|
49
49
|
|
|
50
50
|
interface SearchCommandDependencies {
|
|
51
|
+
limit?: number;
|
|
51
52
|
initMarketData?: () => Promise<MarketContext>;
|
|
52
53
|
fail?: (message: string, details?: string) => never;
|
|
53
54
|
printResult?: CliCommandContext["printResult"];
|
|
@@ -128,7 +129,7 @@ export async function searchCandidatesForCli({
|
|
|
128
129
|
localLimit,
|
|
129
130
|
// Every company's listing of a symbol several use (CAR's ASX line is past the first ten), cut after ordering.
|
|
130
131
|
totalLimit: Math.max(totalLimit, LISTING_SEARCH_LIMIT),
|
|
131
|
-
searchContext: { limit: LISTING_SEARCH_LIMIT },
|
|
132
|
+
searchContext: { limit: Math.max(totalLimit, LISTING_SEARCH_LIMIT), perpetuals: "always" },
|
|
132
133
|
});
|
|
133
134
|
const symbol = trimmedQuery.toUpperCase();
|
|
134
135
|
// A bare symbol search lists asks for the quote `quote SYM` reads, once, for its venue and its name:
|
|
@@ -139,7 +140,9 @@ export async function searchCandidatesForCli({
|
|
|
139
140
|
: null;
|
|
140
141
|
// A word written as a name (`Aeon`) whose company search leads with keeps it first, as `quote Aeon` reads it.
|
|
141
142
|
const named = leadsWithNamedCompany(trimmedQuery, candidates, quote);
|
|
142
|
-
const ordered =
|
|
143
|
+
const ordered = withLiveCompanyPrimary(symbol,
|
|
144
|
+
withQuotedNames(symbol, withUsLineOfPrimary(withHomeListingPrimary(trimmedQuery, withPrimaryListingFirst(symbol, candidates, named ? null : quote))), quote),
|
|
145
|
+
quote);
|
|
143
146
|
return cutKeepingCompanies(withOtherCompaniesApart(ordered, named ? trimmedQuery : null), totalLimit, symbol);
|
|
144
147
|
} catch (error) {
|
|
145
148
|
// Not "No matches found": a script or a reader would take that for a name nothing lists.
|
|
@@ -350,6 +353,26 @@ function withPrimaryListingFirst(
|
|
|
350
353
|
));
|
|
351
354
|
}
|
|
352
355
|
|
|
356
|
+
/**
|
|
357
|
+
* A symbol whose own line stopped trading (DBS, the silver fund delisted in
|
|
358
|
+
* 2023) leads with the company the service marks by it that still trades
|
|
359
|
+
* (DBS Group Holdings' home line, D05 on SGX), as `quote DBS` asks after it;
|
|
360
|
+
* the stopped line is another match. A saved row is the user's choice and
|
|
361
|
+
* stays.
|
|
362
|
+
*/
|
|
363
|
+
function withLiveCompanyPrimary(symbol: string, candidates: TickerSearchCandidate[], quote: Quote | null, now = Date.now()): TickerSearchCandidate[] {
|
|
364
|
+
const primary = candidates.find((candidate) => candidate.category === "Primary Listing");
|
|
365
|
+
if (!primary || primary.saved || primary.kind !== "search" || primary.symbol.toUpperCase() !== symbol) return candidates;
|
|
366
|
+
if (!primary.delisted && (!quote || tradingListing(quote, now))) return candidates;
|
|
367
|
+
const marked = (candidate: TickerSearchCandidate) => candidate !== primary && candidate.kind === "search" && !candidate.delisted
|
|
368
|
+
&& candidate.symbol.toUpperCase() !== symbol && !!candidate.searchAliases?.some((alias) => alias.toUpperCase() === symbol);
|
|
369
|
+
const live = candidates.find((candidate) => marked(candidate) && candidate.homeListing === true) ?? candidates.find(marked);
|
|
370
|
+
if (!live) return candidates;
|
|
371
|
+
const rest = candidates.filter((candidate) => candidate !== live && candidate !== primary);
|
|
372
|
+
const at = Math.min(candidates.indexOf(primary), rest.length);
|
|
373
|
+
return [...rest.slice(0, at), { ...live, category: "Primary Listing" as const }, ...rest.slice(at), { ...primary, category: "Other Matches" as const }];
|
|
374
|
+
}
|
|
375
|
+
|
|
353
376
|
/**
|
|
354
377
|
* One company's lines of a symbol lead with the one the service marks as its
|
|
355
378
|
* home, never a thin secondary line search ranked first: DHL is DHL Group's
|
|
@@ -426,11 +449,10 @@ function withHomeListingPrimary(query: string, candidates: TickerSearchCandidate
|
|
|
426
449
|
function withUsLineOfPrimary(candidates: TickerSearchCandidate[]): TickerSearchCandidate[] {
|
|
427
450
|
const primary = candidates.find((candidate) => candidate.category === "Primary Listing");
|
|
428
451
|
if (!primary || primary.kind !== "search" || isUsListingExchange(candidateExchange(primary))) return candidates;
|
|
429
|
-
const symbol = primary.symbol.toUpperCase();
|
|
430
452
|
const company = resolveSearchName(primary);
|
|
431
453
|
const us = candidates.find((candidate) => candidate !== primary && candidate.kind === "search" && !candidate.contractKey
|
|
432
|
-
&& candidate.category !== "Funds & Derivatives"
|
|
433
|
-
&& isUsListingExchange(candidateExchange(candidate)) &&
|
|
454
|
+
&& candidate.category !== "Funds & Derivatives"
|
|
455
|
+
&& isUsListingExchange(candidateExchange(candidate)) && sameCompanyName(resolveSearchName(candidate), company));
|
|
434
456
|
if (!us) return candidates;
|
|
435
457
|
const rest = candidates.filter((candidate) => candidate !== us);
|
|
436
458
|
const at = rest.indexOf(primary) + 1;
|
|
@@ -882,6 +904,7 @@ export async function search(query: string, dependencies: SearchCommandDependenc
|
|
|
882
904
|
query: index?.symbol ?? trimmedQuery,
|
|
883
905
|
tickers,
|
|
884
906
|
dataProvider,
|
|
907
|
+
totalLimit: dependencies.limit,
|
|
885
908
|
...quote ? { quote } : {},
|
|
886
909
|
}).catch((error: unknown) => failTickerLookup(error, trimmedQuery, !dependencies.printResult));
|
|
887
910
|
// A name in kanji alone is the service's to read first (中電 is CLP in Hong Kong); a Tokyo company's whole name it
|
|
@@ -898,6 +921,7 @@ export async function search(query: string, dependencies: SearchCommandDependenc
|
|
|
898
921
|
const bank = searchedCentralBank(trimmedQuery);
|
|
899
922
|
// A query that names no ticker may name what a function does.
|
|
900
923
|
const functions = await searchedFunctions(trimmedQuery, candidates, fate, dependencies.plugins, context);
|
|
924
|
+
if (!candidates.length && !fate.stopped && !series.length && !functions.length && !bank && !commandPointer(trimmedQuery)) process.exitCode = 1;
|
|
901
925
|
if (dependencies.printResult) {
|
|
902
926
|
const warnings = searchNotes(trimmedQuery, candidates, functions, fate);
|
|
903
927
|
dependencies.printResult({
|
|
@@ -5,7 +5,7 @@ import { formatReportedMoney, REPORTING_CURRENCY_NOT_SOURCED } from "../../utils
|
|
|
5
5
|
import {
|
|
6
6
|
appTtmRate, computedEnterpriseValueNote, convertedPriceEarningsNote, enterpriseValueLabel,
|
|
7
7
|
enterpriseValueReconciliationNote,
|
|
8
|
-
epsConversionNote, financialEnterpriseValue, fundamentalsCurrency, isFinancialEnterpriseValueReason, reportedEnterpriseValue, trailingEpsFiscalYear, trailingEpsSourceNote, ttmAtAppRate, ttmConversionNote,
|
|
8
|
+
epsConversionNote, financialEnterpriseValue, fundamentalsCurrency, isFinancialEnterpriseValueReason, reportedEnterpriseValue, trailingEpsFiscalYear, trailingEpsSourceNote, trailingPeriodNote, ttmAtAppRate, ttmConversionNote,
|
|
9
9
|
withFinancialEnterpriseValue,
|
|
10
10
|
} from "../../utils/fundamentals";
|
|
11
11
|
import { latestFinancialPeriod } from "../../utils/latest-financial-period";
|
|
@@ -38,15 +38,17 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
EXTENDED_SESSION_LABELS,
|
|
40
40
|
exchangeShortName,
|
|
41
|
+
extendedPrintTime,
|
|
41
42
|
getExtendedSessionDisplay,
|
|
42
43
|
getQuoteSessionFields,
|
|
43
44
|
getRegularSessionDisplay,
|
|
45
|
+
headlineCloseDate,
|
|
44
46
|
quoteBookSessionLabel,
|
|
45
47
|
quoteHeadlineTime,
|
|
46
48
|
quoteMarketStateLabel,
|
|
47
49
|
} from "../../market-data/market/status";
|
|
48
50
|
import type { FuturesContractTermsPayload } from "../../api-client/futures-curve";
|
|
49
|
-
import { changeBasisJson, futuresQuoteFromSettle, quoteChangeBasis, quotePreviousCloseDate, quoteSettleText } from "../../market-data/market/change-basis";
|
|
51
|
+
import { changeBasisJson, closeDayLabel, futuresQuoteFromSettle, quoteChangeBasis, quotePreviousCloseDate, quoteSettleText } from "../../market-data/market/change-basis";
|
|
50
52
|
import {
|
|
51
53
|
futuresContractLines, futuresPricePer, futuresTickOption, isFuturesInstrument, loadFuturesContractTerms, loadUsdPerMmbtu, usdPerMmbtuText, type UsdPerMmbtu,
|
|
52
54
|
} from "../../market-data/futures-contract";
|
|
@@ -1004,6 +1006,8 @@ function fundamentalsNotes(
|
|
|
1004
1006
|
? marketCapBasisNote(viewMarketCapitalization(priced.quote, fundamentals, regularSessionValuationPrice(priced.quote)))
|
|
1005
1007
|
: undefined;
|
|
1006
1008
|
const conversion = [...TRAILING_MONEY_METRICS].some(shown) ? ttmConversionNote(fundamentals) : undefined;
|
|
1009
|
+
// Which twelve months the revenue, net income and margin are, as Financials' TTM column names them.
|
|
1010
|
+
const period = shown("Revenue (TTM)") || shown("Net Income (TTM)") ? trailingPeriodNote(fundamentals) : undefined;
|
|
1007
1011
|
const eps = metrics.some((metric) => metricName(metric.label) === "EPS (TTM)" && metric.text !== "—") ? epsConversionNote(fundamentals) : undefined;
|
|
1008
1012
|
const epsSource = trailingEpsSourceNote(fundamentals, { eps: shown("EPS (TTM)"), pe: shown("P/E (TTM)") });
|
|
1009
1013
|
const priceEarnings = metrics.some((metric) => metricName(metric.label) === "P/E (TTM)" && typeof metric.value === "number")
|
|
@@ -1019,7 +1023,7 @@ function fundamentalsNotes(
|
|
|
1019
1023
|
: undefined;
|
|
1020
1024
|
// A cap Gloom Cloud withheld says why, as RV and EQS do.
|
|
1021
1025
|
const withheld = withheldMarketCap(fundamentals)?.note;
|
|
1022
|
-
return [withheld, shareBasis, enterpriseValue, conversion, eps, epsSource, priceEarnings, withdrawnMultiplesNote(fundamentals, metrics),
|
|
1026
|
+
return [withheld, shareBasis, enterpriseValue, conversion, period, eps, epsSource, priceEarnings, withdrawnMultiplesNote(fundamentals, metrics),
|
|
1023
1027
|
unsourcedCurrencyNote(metrics)]
|
|
1024
1028
|
.filter((note): note is string => !!note);
|
|
1025
1029
|
}
|
|
@@ -1473,11 +1477,14 @@ export async function buildTickerReport({
|
|
|
1473
1477
|
// As the Overview reads it: the regular session, then the extended-hours print against its close.
|
|
1474
1478
|
const session = getRegularSessionDisplay(quote)!;
|
|
1475
1479
|
const extended = getExtendedSessionDisplay(quote);
|
|
1480
|
+
// Each price says when it is from: Last a completed session's close by its day, the extended print by its time.
|
|
1481
|
+
const closeDate = futuresContract ? null : headlineCloseDate(quote);
|
|
1482
|
+
const extendedTime = extendedPrintTime(quote);
|
|
1476
1483
|
const extendedRow = (kind: "PRE" | "POST") => extended?.session === kind
|
|
1477
|
-
? colorBySign(
|
|
1484
|
+
? `${colorBySign(
|
|
1478
1485
|
`${formatMarketPriceWithCurrency(extended.price, quote.currency, quoteOptions)} (${formatPercentRaw(extended.changePercent)})`,
|
|
1479
1486
|
extended.change,
|
|
1480
|
-
)
|
|
1487
|
+
)}${extendedTime != null ? cliStyles.muted(` at ${formatTimestamp(extendedTime)}`) : ""}`
|
|
1481
1488
|
: "—";
|
|
1482
1489
|
const volume = reportedQuoteVolume(quote);
|
|
1483
1490
|
// A coin's volume is traded value in its quote currency (BTC-USD: US dollars), not a count of coins, and its
|
|
@@ -1491,7 +1498,7 @@ export async function buildTickerReport({
|
|
|
1491
1498
|
// A futures price is its latest trade; the exchange settlement is its own row, dated by its session.
|
|
1492
1499
|
appendMetricSection(lines, "Quote", [
|
|
1493
1500
|
// A price in cents says what it is per: 314.95¢/lb.
|
|
1494
|
-
["Last", colorBySign(`${formatMarketPriceWithCurrency(session.price, quote.currency, quoteOptions)}${futuresPricePer(futuresContract, quote.currency)}`, session.change)],
|
|
1501
|
+
["Last", `${colorBySign(`${formatMarketPriceWithCurrency(session.price, quote.currency, quoteOptions)}${futuresPricePer(futuresContract, quote.currency)}`, session.change)}${closeDate ? cliStyles.muted(` (${closeDayLabel(closeDate)})`) : ""}`],
|
|
1495
1502
|
...futuresContract
|
|
1496
1503
|
? [["Settle", quoteSettleText(quote, futuresContract)] as [string, string]]
|
|
1497
1504
|
: [],
|
package/src/cli/context.ts
CHANGED
|
@@ -9,20 +9,29 @@ import { createAppServices } from "../core/app-services";
|
|
|
9
9
|
import type { PluginCapability } from "../capabilities";
|
|
10
10
|
import type { AppConfig } from "../types/config";
|
|
11
11
|
import type { GloomPlugin } from "../types/plugin";
|
|
12
|
-
import { standaloneSeriesCatalog, standaloneSeriesInvoker, standaloneSeriesNamed } from "../series/standalone";
|
|
12
|
+
import { standaloneSeriesCatalog, standaloneSeriesInvoker, standaloneSeriesNamed, type SeriesPlugins } from "../series/standalone";
|
|
13
13
|
import { setStandaloneSeriesCatalog } from "../series/standalone-catalog";
|
|
14
14
|
import type { PluginRegistry } from "../plugins/registry";
|
|
15
15
|
import type { LoadedExternalPlugin } from "../plugins/loader";
|
|
16
16
|
import { apiClient } from "../api-client";
|
|
17
17
|
import { fail } from "./errors";
|
|
18
|
+
import { isKnownUsStock } from "./known-us-stocks";
|
|
18
19
|
import { resolvePersistedCloudSessionToken } from "./pane-functions/cloud-session";
|
|
19
20
|
import { cloudStatementReportSources } from "./statement-filings";
|
|
20
21
|
import type { ConfigContext, MarketContext } from "./types";
|
|
22
|
+
import { attachFuturesTermsPersistence } from "../market-data/futures-contract";
|
|
23
|
+
import { createCommandPluginPersistence } from "./saved-copy-persistence";
|
|
24
|
+
|
|
25
|
+
/** Where a command keeps the futures terms it read, beside the app's other saved copies. */
|
|
26
|
+
const FUTURES_TERMS_NAMESPACE = "market:futures-terms";
|
|
21
27
|
|
|
22
28
|
export { withCliServices, withConfigData, withMarketData } from "./scoped-context";
|
|
23
29
|
|
|
24
30
|
interface CliContextOptions {
|
|
25
|
-
|
|
31
|
+
/** Every plugin that runs here. Read only once a series is looked up, so a command that never charts one loads none of them. */
|
|
32
|
+
plugins?: SeriesPlugins;
|
|
33
|
+
/** The plugins whose asset-data and news capabilities feed the data provider; every plugin when not given. */
|
|
34
|
+
dataPlugins?: GloomPlugin[];
|
|
26
35
|
}
|
|
27
36
|
|
|
28
37
|
interface CliServicesOptions {
|
|
@@ -41,7 +50,7 @@ export async function ensureCliServicesReady<T extends { ready: Promise<unknown>
|
|
|
41
50
|
}
|
|
42
51
|
}
|
|
43
52
|
|
|
44
|
-
function resolveCliCapabilities(config: AppConfig, plugins: GloomPlugin[]): PluginCapability[] {
|
|
53
|
+
function resolveCliCapabilities(config: AppConfig, plugins: readonly GloomPlugin[]): PluginCapability[] {
|
|
45
54
|
const disabledPlugins = new Set(config.disabledPlugins ?? []);
|
|
46
55
|
const disabledSources = new Set(config.disabledSources ?? []);
|
|
47
56
|
return plugins
|
|
@@ -115,8 +124,17 @@ function applyPersistedCloudSession(context: Pick<MarketContext, "persistence">)
|
|
|
115
124
|
export async function initMarketData(options: CliContextOptions = {}): Promise<MarketContext> {
|
|
116
125
|
const context = await initConfigData();
|
|
117
126
|
applyPersistedCloudSession(context);
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
// The futures terms a command reads are kept in the profile, so a later run the service cannot answer still has them.
|
|
128
|
+
attachFuturesTermsPersistence(createCommandPluginPersistence(context.persistence.resources, FUTURES_TERMS_NAMESPACE));
|
|
129
|
+
const plugins: SeriesPlugins = options.plugins ?? (() => (require("../plugins/catalog") as typeof import("../plugins/catalog")).getLoadablePlugins());
|
|
130
|
+
const capabilities = resolveCliCapabilities(context.config, options.dataPlugins ?? (typeof plugins === "function" ? plugins() : plugins));
|
|
131
|
+
// A lookup of a symbol the shipped listings show to be a US stock asks for no perpetual contracts.
|
|
132
|
+
const { GloomberbCloudProvider } = require("../sources/gloomberb-cloud") as typeof import("../sources/gloomberb-cloud");
|
|
133
|
+
for (const capability of capabilities) {
|
|
134
|
+
if (capability.kind === "asset-data" && "provider" in capability && capability.provider instanceof GloomberbCloudProvider) {
|
|
135
|
+
capability.provider.knownUsStock = isKnownUsStock;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
120
138
|
const dataProvider = new AssetDataRouter(null, [], context.persistence.resources);
|
|
121
139
|
const registryAdapter: Pick<PluginRegistry, "brokers" | "getEnabledCapabilities"> = {
|
|
122
140
|
brokers: new Map(),
|
|
@@ -148,6 +166,7 @@ export async function initCliServices(options: CliServicesOptions = {}) {
|
|
|
148
166
|
services.providerRouter.setBackgroundRevalidation(false);
|
|
149
167
|
await ensureCliServicesReady(services);
|
|
150
168
|
applyPersistedCloudSession(services);
|
|
169
|
+
attachFuturesTermsPersistence(createCommandPluginPersistence(services.persistence.resources, FUTURES_TERMS_NAMESPACE));
|
|
151
170
|
return {
|
|
152
171
|
config,
|
|
153
172
|
dataDir,
|
package/src/cli/csv-export.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cliText } from "../utils/cli-output";
|
|
1
2
|
import { csvDecimal, serializeCsv } from "../utils/csv";
|
|
2
3
|
import { splitCsvFooter } from "./report-tables";
|
|
3
4
|
|
|
@@ -58,7 +59,7 @@ export function portableCsv(text: string, warnings: readonly string[] = [], extr
|
|
|
58
59
|
let sectionKey = "section", notesKey = "export_notes";
|
|
59
60
|
while (usedNames.has(sectionKey)) sectionKey = `_${sectionKey}`;
|
|
60
61
|
while (usedNames.has(notesKey)) notesKey = `_${notesKey}`;
|
|
61
|
-
const notes = [...new Set([...footer, ...extraNotes.flatMap((note) => note.split(/\r\n?|\n/).filter(Boolean).map((line) => `note: ${line}`)), ...warnings.map((warning) => `warning: ${warning}`)].map((note) => note.replace(/\r\n?|\n/g, " | ")))].join(" | ");
|
|
62
|
+
const notes = [...new Set([...footer, ...extraNotes.flatMap((note) => note.split(/\r\n?|\n/).filter(Boolean).map((line) => `note: ${line}`)), ...warnings.map((warning) => `warning: ${warning}`)].map((note) => cliText(note.replace(/\r\n?|\n/g, " | "))))].join(" | ");
|
|
62
63
|
const header = [...columns, ...tagged ? [sectionKey] : [], notesKey];
|
|
63
64
|
const rows = tables.flatMap((table) => {
|
|
64
65
|
const indices = columns.map((column) => table.columns.indexOf(column));
|
|
@@ -151,7 +151,9 @@ const CHROME_ARGS = [
|
|
|
151
151
|
"--disable-default-apps",
|
|
152
152
|
"--disable-extensions",
|
|
153
153
|
"--disable-popup-blocking",
|
|
154
|
-
"--
|
|
154
|
+
"--mute-audio",
|
|
155
|
+
// The profile is throwaway: on macOS Chrome's first start would otherwise store a key in the keychain, and with none to hold it that opens a dialog.
|
|
156
|
+
"--use-mock-keychain",
|
|
155
157
|
"--no-first-run",
|
|
156
158
|
"--no-default-browser-check",
|
|
157
159
|
"--allow-file-access-from-files",
|
|
@@ -63,7 +63,6 @@ export async function packShotView(dir: string): Promise<Uint8Array> {
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Serve the page from the archive at `archivePath` rather than building it.
|
|
66
|
-
* @knipignore Called by the entry scripts/build.ts writes for the release binary.
|
|
67
66
|
*/
|
|
68
67
|
export function usePrebuiltShotView(archivePath: string): void {
|
|
69
68
|
prebuiltArchive = archivePath;
|