gloomberb 0.20.6 → 0.20.7
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 +1 -1
- package/src/api-client/fund-facts.ts +20 -4
- package/src/api-client/socket.ts +4 -4
- package/src/architecture/shortcut-labels-allowlist.json +1 -0
- package/src/cli/commands/market.ts +33 -17
- package/src/cli/commands/search.ts +19 -3
- package/src/cli/desktop-pane-shot.ts +61 -0
- package/src/cli/pane-functions/dom.ts +4 -4
- package/src/cli/pane-functions/freshness.ts +38 -5
- package/src/cli/pane-functions/screenshot-assessment.ts +16 -4
- package/src/cli/quote-answer.ts +57 -1
- package/src/cli/result.ts +17 -0
- package/src/docs/snapshot.json +55 -16
- package/src/i18n/es.ts +2 -0
- package/src/i18n/ja.ts +2 -0
- package/src/i18n/ko.ts +2 -0
- package/src/i18n/zh-cn.ts +2 -0
- package/src/i18n/zh-tw.ts +2 -0
- package/src/market-data/market/change-basis.ts +49 -8
- package/src/market-data/market/dated-previous-close.ts +133 -10
- package/src/market-data/market/freshness.ts +18 -6
- package/src/market-data/market/status.ts +9 -1
- package/src/market-data/published-nse-sessions.ts +16 -1
- package/src/market-data/quotes/freshness.ts +15 -0
- package/src/plugins/builtin/alerts/alert-engine.ts +15 -0
- package/src/plugins/builtin/alerts/cli.ts +22 -9
- package/src/plugins/builtin/alerts/headless.ts +1 -1
- package/src/plugins/builtin/alerts/index.tsx +5 -1
- package/src/plugins/builtin/alerts/metric-command.ts +1 -1
- package/src/plugins/builtin/holders/fund-holders.ts +22 -1
- package/src/plugins/builtin/holders/headless.ts +5 -4
- package/src/plugins/builtin/holders/pane.tsx +7 -3
- package/src/plugins/builtin/holders/report-header.ts +23 -0
- package/src/plugins/builtin/members/client.ts +1 -1
- package/src/plugins/builtin/members/headless.ts +2 -0
- package/src/plugins/builtin/members/model.ts +10 -8
- package/src/plugins/builtin/members/pane.tsx +4 -1
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +5 -2
- package/src/plugins/builtin/portfolio-list/cli/render.ts +66 -23
- package/src/plugins/builtin/portfolio-list/headless.ts +2 -1
- package/src/plugins/builtin/portfolio-list/income.ts +46 -22
- package/src/plugins/builtin/portfolio-list/pane/data.ts +16 -6
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +5 -4
- package/src/plugins/builtin/portfolio-list/use-throttled-ticker-order.ts +40 -3
- package/src/plugins/builtin/sec/fund-facts.ts +25 -5
- package/src/plugins/builtin/shared/report-freshness.ts +15 -6
- package/src/plugins/builtin/supply-chain/model.ts +18 -6
- package/src/portfolio/column-values.ts +3 -0
- package/src/portfolio/valuation-basis.ts +23 -1
- package/src/state/hooks/quote-streaming.ts +14 -6
- package/src/tickers/instrument-kind.ts +22 -1
- package/src/tickers/search/index.ts +5 -0
- package/src/tickers/terminal-codes.ts +17 -5
- package/src/time-series/fundamentals/current-valuation.ts +244 -0
- package/src/time-series/fundamentals/historical-valuation.ts +99 -0
- package/src/time-series/fundamentals/metric-ids.ts +61 -0
- package/src/time-series/fundamentals/period-points.ts +104 -0
- package/src/time-series/fundamentals/quarterly-ttm.ts +220 -0
- package/src/time-series/fundamentals/series.ts +164 -0
- package/src/time-series/fundamentals/source-statements.ts +177 -0
- package/src/time-series/fundamentals/statement-fields.ts +154 -0
- package/src/time-series/fundamentals/statement-merge.ts +124 -0
- package/src/time-series/fundamentals/statement.ts +114 -0
- package/src/time-series/fundamentals/valuation-multiples.ts +50 -0
- package/src/time-series/fundamentals.ts +18 -1407
- package/src/types/financials.ts +9 -0
- package/src/utils/debug-log.ts +29 -0
package/src/types/financials.ts
CHANGED
|
@@ -173,6 +173,15 @@ export interface Quote extends DepositaryReceiptFacts {
|
|
|
173
173
|
* previousClose is from (PreviousCloseDates): its move names no day.
|
|
174
174
|
*/
|
|
175
175
|
previousCloseUndated?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* A listing that did not trade in the session its price is from: the price
|
|
178
|
+
* and previous close are the venue's nominal prices (an HKEX counter's
|
|
179
|
+
* USD line, untraded for days), dated by its daily bars
|
|
180
|
+
* (PreviousCloseDates). `session` is the venue date whose nominal price it
|
|
181
|
+
* is; `lastTraded` the latest day its bars show a trade, null when they
|
|
182
|
+
* reach back to none. `lastUpdated` stays the last print.
|
|
183
|
+
*/
|
|
184
|
+
nominalPrice?: { session: string; lastTraded: string | null };
|
|
176
185
|
/** Official close of a completed regular session, in this quote's currency. */
|
|
177
186
|
regularClose?: number;
|
|
178
187
|
/** Exchange-local date of regularClose; separate from the daily previous-close reference. */
|
package/src/utils/debug-log.ts
CHANGED
|
@@ -10,6 +10,35 @@ export interface LogEntry {
|
|
|
10
10
|
data?: unknown;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/** How many items of a long list a log entry keeps; the rest is only counted. */
|
|
14
|
+
const LOG_LIST_PREVIEW_LENGTH = 5;
|
|
15
|
+
|
|
16
|
+
export interface ListPreview<T> {
|
|
17
|
+
count: number;
|
|
18
|
+
first: T[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A long list as its length and first few items. The log keeps each entry's
|
|
23
|
+
* data for its 5,000 entries, so one that names every row of a 300-row list
|
|
24
|
+
* holds those names for as long as the entry lives.
|
|
25
|
+
*/
|
|
26
|
+
export function previewList<T, R = T>(
|
|
27
|
+
items: readonly T[],
|
|
28
|
+
map: (item: T) => R = (item) => item as unknown as R,
|
|
29
|
+
): ListPreview<R> {
|
|
30
|
+
return { count: items.length, first: items.slice(0, LOG_LIST_PREVIEW_LENGTH).map(map) };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** `data` with each list longer than the preview replaced by its length and first items. */
|
|
34
|
+
export function previewLongLists(data: Record<string, unknown>): Record<string, unknown> {
|
|
35
|
+
const preview: Record<string, unknown> = {};
|
|
36
|
+
for (const [key, value] of Object.entries(data)) {
|
|
37
|
+
preview[key] = Array.isArray(value) && value.length > LOG_LIST_PREVIEW_LENGTH ? previewList(value) : value;
|
|
38
|
+
}
|
|
39
|
+
return preview;
|
|
40
|
+
}
|
|
41
|
+
|
|
13
42
|
type LogListener = (entry: LogEntry) => void;
|
|
14
43
|
type ConsoleMethod = (...args: unknown[]) => void;
|
|
15
44
|
|