@ethlete/query-devtools 1.0.0-next.2 → 1.0.0-next.3
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/CHANGELOG.md +17 -0
- package/fesm2022/ethlete-query-devtools-toggle.mjs +2 -2
- package/fesm2022/ethlete-query-devtools-toggle.mjs.map +1 -1
- package/fesm2022/ethlete-query-devtools.mjs +624 -377
- package/fesm2022/ethlete-query-devtools.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ethlete-query-devtools.d.ts +103 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, WritableSignal, OnInit } from '@angular/core';
|
|
3
3
|
import * as _ethlete_query from '@ethlete/query';
|
|
4
|
-
import { JsonPath, QueryDevtoolsOverridesRecorder, QueryRefreshCause, QueryRepositoryEntryDestroyedCause, Query, QueryRepositoryCacheEntry, HttpRequestRetryState, HttpRequestLoadingProgressState, QueryDevtoolsStats, QueryDevtoolsStatsHandle, QueryDevtoolsEntry, QueryRepository, QueryClient, QueryKeyLockState, QueryDevtoolsFeature, QueryDevtoolsFault, AnyQueryStack, AnyPagedQueryStack, QuerySequence, AnyBearerAuthProvider, WebSocketDevtoolsHandle, QueryDevtoolsFormHandle, QuerySequenceStatus, AnyQuerySnapshot, QueryDevtoolsRun, QueryDevtoolsRunError, WebSocketDevtoolsMessage, QueryDevtoolsStorageScope } from '@ethlete/query';
|
|
4
|
+
import { JsonPath, QueryDevtoolsOverridesRecorder, QueryRefreshCause, QueryRepositoryEntryDestroyedCause, Query, QueryRepositoryCacheEntry, HttpRequestRetryState, HttpRequestLoadingProgressState, QueryDevtoolsStats, QueryDevtoolsStatsHandle, QueryDevtoolsEntry, AnyQueryBatchItemResult, QueryRepository, QueryClient, QueryKeyLockState, QueryDevtoolsFeature, QueryDevtoolsFault, AnyQueryStack, AnyPagedQueryStack, QuerySequence, AnyQueryBatch, AnyBearerAuthProvider, WebSocketDevtoolsHandle, QueryDevtoolsFormHandle, QuerySequenceStatus, AnyQuerySnapshot, QueryDevtoolsRun, QueryDevtoolsRunError, WebSocketDevtoolsMessage, QueryDevtoolsStorageScope } from '@ethlete/query';
|
|
5
5
|
import { ResizeEdge, DragMoveEvent, ResizeMoveEvent } from '@ethlete/core';
|
|
6
6
|
|
|
7
7
|
type AboutRow = {
|
|
@@ -202,7 +202,7 @@ type QueryDevtoolsSelection = {
|
|
|
202
202
|
* to count, so the badge/overflow logic would push it behind **More** - it is reached from the header's
|
|
203
203
|
* gear instead.
|
|
204
204
|
*/
|
|
205
|
-
type DevtoolsTab = 'queries' | 'stacks' | 'sequences' | 'forms' | 'auth' | 'ws' | 'cache' | 'locks' | 'timeline' | 'events' | 'faults' | 'mocks' | 'about' | 'settings';
|
|
205
|
+
type DevtoolsTab = 'queries' | 'stacks' | 'sequences' | 'batches' | 'forms' | 'auth' | 'ws' | 'cache' | 'locks' | 'timeline' | 'events' | 'faults' | 'mocks' | 'about' | 'settings';
|
|
206
206
|
/**
|
|
207
207
|
* The sections of the query detail drawer. The head and its actions stay pinned above them - the detail
|
|
208
208
|
* holds more than fits a column, and everything below the actions is reading material.
|
|
@@ -261,6 +261,20 @@ type QueryLink = {
|
|
|
261
261
|
clientBaseUrl: string;
|
|
262
262
|
stats?: QueryDevtoolsStatsHandle;
|
|
263
263
|
};
|
|
264
|
+
/** One settled item of a query batch, with the route the args it was sent with resolve to. */
|
|
265
|
+
type BatchItemRow = {
|
|
266
|
+
result: AnyQueryBatchItemResult;
|
|
267
|
+
segments: RouteSegment[];
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* A batch's settled items as its card lists them. Capped, and `hidden` says by how much - a bulk run
|
|
271
|
+
* settles more items than a list can hold, and a truncated one must not read as the whole run.
|
|
272
|
+
*/
|
|
273
|
+
type BatchItemView = {
|
|
274
|
+
rows: BatchItemRow[];
|
|
275
|
+
total: number;
|
|
276
|
+
hidden: number;
|
|
277
|
+
};
|
|
264
278
|
/**
|
|
265
279
|
* Query stats plus the numbers the panel derives from them rather than storing: an execution that never
|
|
266
280
|
* reached the network was answered from the cache, and the averages come from the running totals.
|
|
@@ -391,6 +405,7 @@ type QueryDevtoolsHost = {
|
|
|
391
405
|
queryEntries: Signal<QueryDevtoolsEntry[]>;
|
|
392
406
|
stackEntries: Signal<QueryDevtoolsEntry[]>;
|
|
393
407
|
sequenceEntries: Signal<QueryDevtoolsEntry[]>;
|
|
408
|
+
batchEntries: Signal<QueryDevtoolsEntry[]>;
|
|
394
409
|
formEntries: Signal<QueryDevtoolsEntry[]>;
|
|
395
410
|
authEntries: Signal<QueryDevtoolsEntry[]>;
|
|
396
411
|
wsEntries: Signal<QueryDevtoolsEntry[]>;
|
|
@@ -450,6 +465,7 @@ type QueryDevtoolsHost = {
|
|
|
450
465
|
asStack(entry: QueryDevtoolsEntry): AnyQueryStack;
|
|
451
466
|
asPagedStack(entry: QueryDevtoolsEntry): AnyPagedQueryStack;
|
|
452
467
|
asSequence(entry: QueryDevtoolsEntry): QuerySequence<unknown[]>;
|
|
468
|
+
asBatch(entry: QueryDevtoolsEntry): AnyQueryBatch;
|
|
453
469
|
asAuth(entry: QueryDevtoolsEntry): AnyBearerAuthProvider;
|
|
454
470
|
asWs(entry: QueryDevtoolsEntry): WebSocketDevtoolsHandle;
|
|
455
471
|
asForm(entry: QueryDevtoolsEntry): QueryDevtoolsFormHandle;
|
|
@@ -492,6 +508,30 @@ type QueryDevtoolsHost = {
|
|
|
492
508
|
/** Whether a sequence step's in/out detail (`<entryId>:<stepIndex>`) is expanded - persisted. */
|
|
493
509
|
isStepExpanded(entryId: string, index: number): boolean;
|
|
494
510
|
toggleStep(entryId: string, index: number): void;
|
|
511
|
+
/** A batch's route with its path params left as `:name` - a batch fills them in per item, not once. */
|
|
512
|
+
batchRouteSegments(entry: QueryDevtoolsEntry): RouteSegment[];
|
|
513
|
+
/**
|
|
514
|
+
* The batch entry that created a query, or `null` for a query no batch did. What lets the Queries list
|
|
515
|
+
* fold a bulk run's items under one row instead of listing whatever it has in flight.
|
|
516
|
+
*/
|
|
517
|
+
batchOf(entry: QueryDevtoolsEntry): QueryDevtoolsEntry | null;
|
|
518
|
+
/**
|
|
519
|
+
* The item queries a batch has in flight. Only those: a batch destroys each item's query the moment
|
|
520
|
+
* that item settles, so a settled item is read from {@link batchItems} instead.
|
|
521
|
+
*/
|
|
522
|
+
queriesForBatch(entry: QueryDevtoolsEntry): QueryLink[];
|
|
523
|
+
/** A batch's settled items, failures first and capped - see {@link BatchItemView}. */
|
|
524
|
+
batchItems(entry: QueryDevtoolsEntry): BatchItemView;
|
|
525
|
+
/**
|
|
526
|
+
* The registry entry of one of a batch's items, or `null` once it has fallen out of the batch's capped
|
|
527
|
+
* tombstone tail - which is what makes an item row openable only while its query is still kept.
|
|
528
|
+
*/
|
|
529
|
+
batchItemQueryId(entry: QueryDevtoolsEntry, index: number): string | null;
|
|
530
|
+
/** An item's throughput line (`12.4 items/s · ~8s left`), or `null` before there is a rate to show. */
|
|
531
|
+
batchThroughput(batch: AnyQueryBatch): string | null;
|
|
532
|
+
/** Whether a batch item's args/response detail (`<entryId>:<itemIndex>`) is expanded - persisted. */
|
|
533
|
+
isBatchItemExpanded(entryId: string, index: number): boolean;
|
|
534
|
+
toggleBatchItem(entryId: string, index: number): void;
|
|
495
535
|
/** Keys of the Queries-list groups of identical rows the user opened - persisted. */
|
|
496
536
|
expandedQueryGroups: Signal<ReadonlySet<string>>;
|
|
497
537
|
toggleQueryGroup(key: string): void;
|
|
@@ -632,6 +672,16 @@ type QueryDevtoolsHost = {
|
|
|
632
672
|
entry: QueryDevtoolsEntry;
|
|
633
673
|
query: AnyQuery;
|
|
634
674
|
} | null>;
|
|
675
|
+
batchSelectedQueryId: WritableSignal<string | null>;
|
|
676
|
+
batchSelectedQuery: Signal<{
|
|
677
|
+
entry: QueryDevtoolsEntry;
|
|
678
|
+
query: AnyQuery;
|
|
679
|
+
} | null>;
|
|
680
|
+
eventSelectedQueryId: WritableSignal<string | null>;
|
|
681
|
+
eventSelectedQuery: Signal<{
|
|
682
|
+
entry: QueryDevtoolsEntry;
|
|
683
|
+
query: AnyQuery;
|
|
684
|
+
} | null>;
|
|
635
685
|
formSelectedQueryId: WritableSignal<string | null>;
|
|
636
686
|
formSelectedQuery: Signal<{
|
|
637
687
|
entry: QueryDevtoolsEntry;
|
|
@@ -792,6 +842,12 @@ type PersistedState = {
|
|
|
792
842
|
detailTab?: DetailTab;
|
|
793
843
|
selectedClientName?: string | null;
|
|
794
844
|
selectedQueryId?: string | null;
|
|
845
|
+
stackSelectedQueryId?: string | null;
|
|
846
|
+
sequenceSelectedQueryId?: string | null;
|
|
847
|
+
batchSelectedQueryId?: string | null;
|
|
848
|
+
eventSelectedQueryId?: string | null;
|
|
849
|
+
formSelectedQueryId?: string | null;
|
|
850
|
+
timelineSelectedQueryId?: string | null;
|
|
795
851
|
selectedFormId?: string | null;
|
|
796
852
|
inspectFilterIds?: string[] | null;
|
|
797
853
|
queryFilter?: string;
|
|
@@ -804,6 +860,7 @@ type PersistedState = {
|
|
|
804
860
|
socketFilter?: string;
|
|
805
861
|
jsonSearch?: string;
|
|
806
862
|
expandedSteps?: string[];
|
|
863
|
+
expandedBatchItems?: string[];
|
|
807
864
|
expandedQueryGroups?: string[];
|
|
808
865
|
jsonExpanded?: string[];
|
|
809
866
|
jsonCollapsed?: string[];
|
|
@@ -876,6 +933,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
876
933
|
} | {
|
|
877
934
|
id: "sequences";
|
|
878
935
|
label: string;
|
|
936
|
+
} | {
|
|
937
|
+
id: "batches";
|
|
938
|
+
label: string;
|
|
879
939
|
} | {
|
|
880
940
|
id: "forms";
|
|
881
941
|
label: string;
|
|
@@ -1050,6 +1110,8 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1050
1110
|
selectedFormId: WritableSignal<string | null>;
|
|
1051
1111
|
stackSelectedQueryId: WritableSignal<string | null>;
|
|
1052
1112
|
sequenceSelectedQueryId: WritableSignal<string | null>;
|
|
1113
|
+
batchSelectedQueryId: WritableSignal<string | null>;
|
|
1114
|
+
eventSelectedQueryId: WritableSignal<string | null>;
|
|
1053
1115
|
formSelectedQueryId: WritableSignal<string | null>;
|
|
1054
1116
|
timelineSelectedQueryId: WritableSignal<string | null>;
|
|
1055
1117
|
/** Free-text narrowing of the Queries list. Every whitespace-separated term has to match. */
|
|
@@ -1095,6 +1157,8 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1095
1157
|
private socketEmitError;
|
|
1096
1158
|
/** Keys (`<entryId>:<stepIndex>`) of the sequence steps whose in/out detail is expanded. */
|
|
1097
1159
|
private expandedSteps;
|
|
1160
|
+
/** Keys (`<entryId>:<itemIndex>`) of the batch items whose args/response detail is expanded. */
|
|
1161
|
+
private expandedBatchItems;
|
|
1098
1162
|
/** Keys of the Queries-list groups the user opened - the tab is rebuilt on every switch back. */
|
|
1099
1163
|
expandedQueryGroups: WritableSignal<ReadonlySet<string>>;
|
|
1100
1164
|
/** Shared value-explorer search term. */
|
|
@@ -1168,6 +1232,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1168
1232
|
protected panelTampered: _angular_core.Signal<boolean>;
|
|
1169
1233
|
stackEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
|
|
1170
1234
|
sequenceEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
|
|
1235
|
+
batchEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
|
|
1171
1236
|
formEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
|
|
1172
1237
|
authEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
|
|
1173
1238
|
wsEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
|
|
@@ -1225,6 +1290,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1225
1290
|
} | {
|
|
1226
1291
|
id: "sequences";
|
|
1227
1292
|
label: string;
|
|
1293
|
+
} | {
|
|
1294
|
+
id: "batches";
|
|
1295
|
+
label: string;
|
|
1228
1296
|
} | {
|
|
1229
1297
|
id: "forms";
|
|
1230
1298
|
label: string;
|
|
@@ -1266,6 +1334,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1266
1334
|
} | {
|
|
1267
1335
|
id: "sequences";
|
|
1268
1336
|
label: string;
|
|
1337
|
+
} | {
|
|
1338
|
+
id: "batches";
|
|
1339
|
+
label: string;
|
|
1269
1340
|
} | {
|
|
1270
1341
|
id: "forms";
|
|
1271
1342
|
label: string;
|
|
@@ -1309,6 +1380,14 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1309
1380
|
entry: QueryDevtoolsEntry;
|
|
1310
1381
|
query: AnyQuery;
|
|
1311
1382
|
} | null>;
|
|
1383
|
+
batchSelectedQuery: _angular_core.Signal<{
|
|
1384
|
+
entry: QueryDevtoolsEntry;
|
|
1385
|
+
query: AnyQuery;
|
|
1386
|
+
} | null>;
|
|
1387
|
+
eventSelectedQuery: _angular_core.Signal<{
|
|
1388
|
+
entry: QueryDevtoolsEntry;
|
|
1389
|
+
query: AnyQuery;
|
|
1390
|
+
} | null>;
|
|
1312
1391
|
formSelectedQuery: _angular_core.Signal<{
|
|
1313
1392
|
entry: QueryDevtoolsEntry;
|
|
1314
1393
|
query: AnyQuery;
|
|
@@ -1611,6 +1690,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1611
1690
|
asStack(entry: QueryDevtoolsEntry): AnyQueryStack;
|
|
1612
1691
|
asPagedStack(entry: QueryDevtoolsEntry): AnyPagedQueryStack;
|
|
1613
1692
|
asSequence(entry: QueryDevtoolsEntry): QuerySequence<unknown[]>;
|
|
1693
|
+
asBatch(entry: QueryDevtoolsEntry): AnyQueryBatch;
|
|
1614
1694
|
asAuth(entry: QueryDevtoolsEntry): AnyBearerAuthProvider;
|
|
1615
1695
|
asWs(entry: QueryDevtoolsEntry): WebSocketDevtoolsHandle;
|
|
1616
1696
|
/**
|
|
@@ -1675,6 +1755,19 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1675
1755
|
expandQueryGroup(key: string): void;
|
|
1676
1756
|
isStepExpanded(entryId: string, index: number): boolean;
|
|
1677
1757
|
toggleStep(entryId: string, index: number): void;
|
|
1758
|
+
/** A batch's route with its path params left as `:name` - a batch fills them in per item, not once. */
|
|
1759
|
+
batchRouteSegments(entry: QueryDevtoolsEntry): RouteSegment[];
|
|
1760
|
+
batchOf(entry: QueryDevtoolsEntry): QueryDevtoolsEntry | null;
|
|
1761
|
+
queriesForBatch(entry: QueryDevtoolsEntry): QueryLink[];
|
|
1762
|
+
/**
|
|
1763
|
+
* The registry entry of one of a batch's items, or `null` once it has fallen out of the batch's capped
|
|
1764
|
+
* tombstone tail - which is what makes an item row openable only while its query is still kept.
|
|
1765
|
+
*/
|
|
1766
|
+
batchItemQueryId(entry: QueryDevtoolsEntry, index: number): string | null;
|
|
1767
|
+
batchItems(entry: QueryDevtoolsEntry): BatchItemView;
|
|
1768
|
+
batchThroughput(batch: AnyQueryBatch): string | null;
|
|
1769
|
+
isBatchItemExpanded(entryId: string, index: number): boolean;
|
|
1770
|
+
toggleBatchItem(entryId: string, index: number): void;
|
|
1678
1771
|
/** Dedents a GraphQL document (template-literal indentation) for readable display. */
|
|
1679
1772
|
gqlDocument(doc: string): string;
|
|
1680
1773
|
featureLabel(type: string): string;
|
|
@@ -1700,6 +1793,12 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1700
1793
|
content: string;
|
|
1701
1794
|
type: string;
|
|
1702
1795
|
}): void;
|
|
1796
|
+
/**
|
|
1797
|
+
* The same route rendered from a set of args rather than from a query, which is what a batch item leaves
|
|
1798
|
+
* behind: the batch destroys its query the moment the item settles.
|
|
1799
|
+
*/
|
|
1800
|
+
private argsRouteSegments;
|
|
1801
|
+
private renderRoute;
|
|
1703
1802
|
/**
|
|
1704
1803
|
* Takes - or gives back - the lock whose name only this tab can have produced. Its `clientId` in the
|
|
1705
1804
|
* snapshot is what tells this tab's rows from another tab's: `LockInfo` carries no tab identity, and
|
|
@@ -1792,6 +1891,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1792
1891
|
private sessionQuery;
|
|
1793
1892
|
private sessionActivity;
|
|
1794
1893
|
private sessionSequence;
|
|
1894
|
+
private sessionBatch;
|
|
1795
1895
|
private sessionForm;
|
|
1796
1896
|
/**
|
|
1797
1897
|
* An auth provider without its tokens. A session report is a file that gets attached to a ticket, and
|
|
@@ -1843,7 +1943,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1843
1943
|
declare const QUERY_DEVTOOLS_IMPORTS: readonly [typeof QueryDevtoolsComponent];
|
|
1844
1944
|
|
|
1845
1945
|
/** The version of `@ethlete/query-devtools` this build was cut from. */
|
|
1846
|
-
declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.
|
|
1946
|
+
declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.3";
|
|
1847
1947
|
|
|
1848
1948
|
export { QUERY_DEVTOOLS_IMPORTS, QUERY_DEVTOOLS_VERSION, QueryDevtoolsAboutComponent, QueryDevtoolsComponent, QueryDevtoolsJsonComponent, QueryDevtoolsJsonStylesComponent, QueryDevtoolsSettingsComponent, QueryDevtoolsTimelineStylesComponent, clampFloatToPeek, kindOf, resizedFloatRect, settledFloatRect };
|
|
1849
1949
|
export type { JsonKind };
|