@ethlete/query-devtools 1.0.0-next.1 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/query-devtools",
3
- "version": "1.0.0-next.1",
3
+ "version": "1.0.0-next.3",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -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;
@@ -785,12 +835,19 @@ type PersistedState = {
785
835
  listHeight?: number | null;
786
836
  drawerHeight?: number | null;
787
837
  dock?: DevtoolsDock;
838
+ reservesSpace?: boolean;
788
839
  floatRect?: FloatRect;
789
840
  floatParked?: boolean;
790
841
  activeTab?: DevtoolsTab;
791
842
  detailTab?: DetailTab;
792
843
  selectedClientName?: string | null;
793
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;
794
851
  selectedFormId?: string | null;
795
852
  inspectFilterIds?: string[] | null;
796
853
  queryFilter?: string;
@@ -803,6 +860,7 @@ type PersistedState = {
803
860
  socketFilter?: string;
804
861
  jsonSearch?: string;
805
862
  expandedSteps?: string[];
863
+ expandedBatchItems?: string[];
806
864
  expandedQueryGroups?: string[];
807
865
  jsonExpanded?: string[];
808
866
  jsonCollapsed?: string[];
@@ -875,6 +933,9 @@ declare class QueryDevtoolsComponent implements OnInit {
875
933
  } | {
876
934
  id: "sequences";
877
935
  label: string;
936
+ } | {
937
+ id: "batches";
938
+ label: string;
878
939
  } | {
879
940
  id: "forms";
880
941
  label: string;
@@ -992,6 +1053,11 @@ declare class QueryDevtoolsComponent implements OnInit {
992
1053
  readonly label: "Pop out";
993
1054
  readonly hint: "Move the panel into a window of its own - the same live panel, on your other screen";
994
1055
  }>;
1056
+ /**
1057
+ * Whether a docked panel takes its size out of the page instead of covering it - so the last rows of a
1058
+ * long page can still be scrolled to. Only docks can: a float sits wherever it was dragged.
1059
+ */
1060
+ protected reservesSpace: WritableSignal<boolean>;
995
1061
  /** Where the floating panel sits and how big it is. Kept while docked, so a return to float restores it. */
996
1062
  private floatRect;
997
1063
  /** The rect a resize gesture started from, or `null` outside one. */
@@ -1029,6 +1095,13 @@ declare class QueryDevtoolsComponent implements OnInit {
1029
1095
  /** The floating panel's offset from the viewport's top-left, or `null` while it is docked. */
1030
1096
  protected panelInsetBlock: _angular_core.Signal<number | null>;
1031
1097
  protected panelInsetInline: _angular_core.Signal<number | null>;
1098
+ /**
1099
+ * The panel's rendered size, not its dragged one - the stylesheet clamps a dock (`min-block-size`,
1100
+ * `max-block-size: 90vh`) and it is the clamped size the page has to give up.
1101
+ */
1102
+ private panelSize;
1103
+ /** Which padding a docked panel asks of the page and how much, or `null` when it asks for none. */
1104
+ private pageReservation;
1032
1105
  /** Which section of the query detail is showing. Shared by the Queries tab and both drawers. */
1033
1106
  detailTab: WritableSignal<DetailTab>;
1034
1107
  selectedClientName: WritableSignal<string | null>;
@@ -1037,6 +1110,8 @@ declare class QueryDevtoolsComponent implements OnInit {
1037
1110
  selectedFormId: WritableSignal<string | null>;
1038
1111
  stackSelectedQueryId: WritableSignal<string | null>;
1039
1112
  sequenceSelectedQueryId: WritableSignal<string | null>;
1113
+ batchSelectedQueryId: WritableSignal<string | null>;
1114
+ eventSelectedQueryId: WritableSignal<string | null>;
1040
1115
  formSelectedQueryId: WritableSignal<string | null>;
1041
1116
  timelineSelectedQueryId: WritableSignal<string | null>;
1042
1117
  /** Free-text narrowing of the Queries list. Every whitespace-separated term has to match. */
@@ -1082,6 +1157,8 @@ declare class QueryDevtoolsComponent implements OnInit {
1082
1157
  private socketEmitError;
1083
1158
  /** Keys (`<entryId>:<stepIndex>`) of the sequence steps whose in/out detail is expanded. */
1084
1159
  private expandedSteps;
1160
+ /** Keys (`<entryId>:<itemIndex>`) of the batch items whose args/response detail is expanded. */
1161
+ private expandedBatchItems;
1085
1162
  /** Keys of the Queries-list groups the user opened - the tab is rebuilt on every switch back. */
1086
1163
  expandedQueryGroups: WritableSignal<ReadonlySet<string>>;
1087
1164
  /** Shared value-explorer search term. */
@@ -1155,6 +1232,7 @@ declare class QueryDevtoolsComponent implements OnInit {
1155
1232
  protected panelTampered: _angular_core.Signal<boolean>;
1156
1233
  stackEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
1157
1234
  sequenceEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
1235
+ batchEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
1158
1236
  formEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
1159
1237
  authEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
1160
1238
  wsEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
@@ -1212,6 +1290,9 @@ declare class QueryDevtoolsComponent implements OnInit {
1212
1290
  } | {
1213
1291
  id: "sequences";
1214
1292
  label: string;
1293
+ } | {
1294
+ id: "batches";
1295
+ label: string;
1215
1296
  } | {
1216
1297
  id: "forms";
1217
1298
  label: string;
@@ -1253,6 +1334,9 @@ declare class QueryDevtoolsComponent implements OnInit {
1253
1334
  } | {
1254
1335
  id: "sequences";
1255
1336
  label: string;
1337
+ } | {
1338
+ id: "batches";
1339
+ label: string;
1256
1340
  } | {
1257
1341
  id: "forms";
1258
1342
  label: string;
@@ -1296,6 +1380,14 @@ declare class QueryDevtoolsComponent implements OnInit {
1296
1380
  entry: QueryDevtoolsEntry;
1297
1381
  query: AnyQuery;
1298
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>;
1299
1391
  formSelectedQuery: _angular_core.Signal<{
1300
1392
  entry: QueryDevtoolsEntry;
1301
1393
  query: AnyQuery;
@@ -1598,6 +1690,7 @@ declare class QueryDevtoolsComponent implements OnInit {
1598
1690
  asStack(entry: QueryDevtoolsEntry): AnyQueryStack;
1599
1691
  asPagedStack(entry: QueryDevtoolsEntry): AnyPagedQueryStack;
1600
1692
  asSequence(entry: QueryDevtoolsEntry): QuerySequence<unknown[]>;
1693
+ asBatch(entry: QueryDevtoolsEntry): AnyQueryBatch;
1601
1694
  asAuth(entry: QueryDevtoolsEntry): AnyBearerAuthProvider;
1602
1695
  asWs(entry: QueryDevtoolsEntry): WebSocketDevtoolsHandle;
1603
1696
  /**
@@ -1662,6 +1755,19 @@ declare class QueryDevtoolsComponent implements OnInit {
1662
1755
  expandQueryGroup(key: string): void;
1663
1756
  isStepExpanded(entryId: string, index: number): boolean;
1664
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;
1665
1771
  /** Dedents a GraphQL document (template-literal indentation) for readable display. */
1666
1772
  gqlDocument(doc: string): string;
1667
1773
  featureLabel(type: string): string;
@@ -1687,6 +1793,12 @@ declare class QueryDevtoolsComponent implements OnInit {
1687
1793
  content: string;
1688
1794
  type: string;
1689
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;
1690
1802
  /**
1691
1803
  * Takes - or gives back - the lock whose name only this tab can have produced. Its `clientId` in the
1692
1804
  * snapshot is what tells this tab's rows from another tab's: `LockInfo` carries no tab identity, and
@@ -1779,6 +1891,7 @@ declare class QueryDevtoolsComponent implements OnInit {
1779
1891
  private sessionQuery;
1780
1892
  private sessionActivity;
1781
1893
  private sessionSequence;
1894
+ private sessionBatch;
1782
1895
  private sessionForm;
1783
1896
  /**
1784
1897
  * An auth provider without its tokens. A session report is a file that gets attached to a ticket, and
@@ -1830,7 +1943,7 @@ declare class QueryDevtoolsComponent implements OnInit {
1830
1943
  declare const QUERY_DEVTOOLS_IMPORTS: readonly [typeof QueryDevtoolsComponent];
1831
1944
 
1832
1945
  /** The version of `@ethlete/query-devtools` this build was cut from. */
1833
- declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.1";
1946
+ declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.3";
1834
1947
 
1835
1948
  export { QUERY_DEVTOOLS_IMPORTS, QUERY_DEVTOOLS_VERSION, QueryDevtoolsAboutComponent, QueryDevtoolsComponent, QueryDevtoolsJsonComponent, QueryDevtoolsJsonStylesComponent, QueryDevtoolsSettingsComponent, QueryDevtoolsTimelineStylesComponent, clampFloatToPeek, kindOf, resizedFloatRect, settledFloatRect };
1836
1949
  export type { JsonKind };