@ethlete/query-devtools 1.0.0-next.0 → 1.0.0-next.1
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
|
@@ -167,6 +167,30 @@ type QueryDevtoolsDiff = {
|
|
|
167
167
|
truncated: boolean;
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
+
/** Which SDK feature a lock name belongs to, or `other` for one the panel did not put there. */
|
|
171
|
+
type DevtoolsLockKind = 'auth' | 'poll' | 'other';
|
|
172
|
+
/** Where the tab the panel is open in stands on one lock. */
|
|
173
|
+
type DevtoolsLockStanding = 'holder' | 'queued' | 'absent' | 'unknown';
|
|
174
|
+
/** One lock name, with every client that holds or waits for it folded into a single row. */
|
|
175
|
+
type DevtoolsLockRow = {
|
|
176
|
+
/** The raw name, so a lock the panel cannot decode is still greppable from the row. */
|
|
177
|
+
name: string;
|
|
178
|
+
/** What the name means: the provider for an auth lock, the cache key for a poll lock. */
|
|
179
|
+
label: string;
|
|
180
|
+
kind: DevtoolsLockKind;
|
|
181
|
+
/** The sync channel a poll lock belongs to, or `null` for a name that carries no such part. */
|
|
182
|
+
channel: string | null;
|
|
183
|
+
/**
|
|
184
|
+
* Held plus queued on this name. Every participant requests the same lock and exactly one gets it, so
|
|
185
|
+
* this is the number of tabs, workers and service workers taking part - the same arithmetic the auth
|
|
186
|
+
* provider's own `instanceCount` does.
|
|
187
|
+
*/
|
|
188
|
+
tabs: number;
|
|
189
|
+
standing: DevtoolsLockStanding;
|
|
190
|
+
/** This tab's 1-based place in the queue, or `null` unless {@link standing} is `queued`. */
|
|
191
|
+
queuePlace: number | null;
|
|
192
|
+
};
|
|
193
|
+
|
|
170
194
|
type AnyQuery = Query<any>;
|
|
171
195
|
/** The query a detail pane is showing, together with the registry entry it was registered as. */
|
|
172
196
|
type QueryDevtoolsSelection = {
|
|
@@ -178,7 +202,7 @@ type QueryDevtoolsSelection = {
|
|
|
178
202
|
* to count, so the badge/overflow logic would push it behind **More** - it is reached from the header's
|
|
179
203
|
* gear instead.
|
|
180
204
|
*/
|
|
181
|
-
type DevtoolsTab = 'queries' | 'stacks' | 'sequences' | 'forms' | 'auth' | 'ws' | 'cache' | 'timeline' | 'events' | 'faults' | 'mocks' | 'about' | 'settings';
|
|
205
|
+
type DevtoolsTab = 'queries' | 'stacks' | 'sequences' | 'forms' | 'auth' | 'ws' | 'cache' | 'locks' | 'timeline' | 'events' | 'faults' | 'mocks' | 'about' | 'settings';
|
|
182
206
|
/**
|
|
183
207
|
* The sections of the query detail drawer. The head and its actions stay pinned above them - the detail
|
|
184
208
|
* holds more than fits a column, and everything below the actions is reading material.
|
|
@@ -208,11 +232,11 @@ type RouteSegment = {
|
|
|
208
232
|
name?: string;
|
|
209
233
|
};
|
|
210
234
|
/**
|
|
211
|
-
*
|
|
212
|
-
* the caveats the label has no room for
|
|
213
|
-
* tab count is.
|
|
235
|
+
* A one-line verdict the panel renders as a chip - which tab refreshes an auth provider's tokens, where
|
|
236
|
+
* this tab stands on a lock. `title` carries the caveats the label has no room for: why every tab reads
|
|
237
|
+
* as the leader, or how approximate a tab count is.
|
|
214
238
|
*/
|
|
215
|
-
type
|
|
239
|
+
type QueryDevtoolsChip = {
|
|
216
240
|
label: string;
|
|
217
241
|
tone: 'success' | 'muted';
|
|
218
242
|
title: string;
|
|
@@ -391,6 +415,14 @@ type QueryDevtoolsHost = {
|
|
|
391
415
|
clearPersistedQueries(client: QueryClient): void;
|
|
392
416
|
/** The features of the client behind a cache tab card, or `null` for a client without any. */
|
|
393
417
|
clientFeatures(client: QueryClient | null | undefined): QueryDevtoolsFeature[] | null;
|
|
418
|
+
/**
|
|
419
|
+
* Every Web Lock held or queued across this origin, decoded, or `null` in a browser without the Web
|
|
420
|
+
* Locks API. Empty while the Locks tab has not read its first snapshot - it polls, because Web Locks
|
|
421
|
+
* has no change event to listen to.
|
|
422
|
+
*/
|
|
423
|
+
lockRows: Signal<DevtoolsLockRow[] | null>;
|
|
424
|
+
/** Where this tab stands on one lock, as a chip: whether it holds it, waits for it, or is not in it. */
|
|
425
|
+
lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip;
|
|
394
426
|
/** Unique client names present across queries and auth providers, for the Queries/Timeline pickers. */
|
|
395
427
|
clientNames: Signal<string[]>;
|
|
396
428
|
/** What each tab holds - also drives the tab bar's own badges, so it lives here rather than per-tab. */
|
|
@@ -426,7 +458,7 @@ type QueryDevtoolsHost = {
|
|
|
426
458
|
/** The access-token expiry the app acts on, plus the lifetime the panel has armed over it. */
|
|
427
459
|
authTokenLifetime(entry: QueryDevtoolsEntry): QueryDevtoolsTokenLifetime;
|
|
428
460
|
/** The multi-tab leadership chip, or `null` for a provider without `withBearerAuthMultiTabSync`. */
|
|
429
|
-
authLeadership(auth: AnyBearerAuthProvider):
|
|
461
|
+
authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null;
|
|
430
462
|
queryStatus(query: AnyQuery): 'idle' | 'loading' | 'success' | 'error';
|
|
431
463
|
isStale(query: AnyQuery): boolean;
|
|
432
464
|
/** Whether an entry is showing an armed response override or a devtools-faulted outcome. */
|
|
@@ -821,6 +853,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
821
853
|
private destroyRef;
|
|
822
854
|
private document;
|
|
823
855
|
private viewport;
|
|
856
|
+
private isDocumentVisible;
|
|
824
857
|
/**
|
|
825
858
|
* Opens the panel as soon as it is created, whatever the stored view state says. Set by
|
|
826
859
|
* `<et-query-devtools-lazy>`, which downloads the panel on the click that was meant to open it.
|
|
@@ -854,6 +887,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
854
887
|
} | {
|
|
855
888
|
id: "cache";
|
|
856
889
|
label: string;
|
|
890
|
+
} | {
|
|
891
|
+
id: "locks";
|
|
892
|
+
label: string;
|
|
857
893
|
} | {
|
|
858
894
|
id: "timeline";
|
|
859
895
|
label: string;
|
|
@@ -1088,6 +1124,15 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1088
1124
|
private copiedReset$;
|
|
1089
1125
|
/** 1-second tick driving the cache freshness countdowns. */
|
|
1090
1126
|
private clock;
|
|
1127
|
+
/**
|
|
1128
|
+
* The probe lock behind every Locks row's "this tab" answer, and the last snapshot read through it.
|
|
1129
|
+
* Both only exist while the Locks tab is on screen - see the polling stream in the constructor.
|
|
1130
|
+
*/
|
|
1131
|
+
private probeLocks;
|
|
1132
|
+
private probeId;
|
|
1133
|
+
private probeHold;
|
|
1134
|
+
private lockSnapshot;
|
|
1135
|
+
lockRows: _angular_core.Signal<DevtoolsLockRow[] | null>;
|
|
1091
1136
|
/** "Inspect" mode: hover the live UI to find the query that a component created. */
|
|
1092
1137
|
protected inspectActive: WritableSignal<boolean>;
|
|
1093
1138
|
protected inspectHover: WritableSignal<{
|
|
@@ -1179,6 +1224,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1179
1224
|
} | {
|
|
1180
1225
|
id: "cache";
|
|
1181
1226
|
label: string;
|
|
1227
|
+
} | {
|
|
1228
|
+
id: "locks";
|
|
1229
|
+
label: string;
|
|
1182
1230
|
} | {
|
|
1183
1231
|
id: "timeline";
|
|
1184
1232
|
label: string;
|
|
@@ -1217,6 +1265,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1217
1265
|
} | {
|
|
1218
1266
|
id: "cache";
|
|
1219
1267
|
label: string;
|
|
1268
|
+
} | {
|
|
1269
|
+
id: "locks";
|
|
1270
|
+
label: string;
|
|
1220
1271
|
} | {
|
|
1221
1272
|
id: "timeline";
|
|
1222
1273
|
label: string;
|
|
@@ -1591,11 +1642,13 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1591
1642
|
authTokenPayload(auth: AnyBearerAuthProvider): Record<string, unknown> | null;
|
|
1592
1643
|
queriesForStack(stack: AnyQueryStack | AnyPagedQueryStack): QueryLink[];
|
|
1593
1644
|
authQueryKeys(auth: AnyBearerAuthProvider): string[];
|
|
1645
|
+
/** Where this tab stands on one lock, as a chip. @see lockRows */
|
|
1646
|
+
lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip;
|
|
1594
1647
|
/**
|
|
1595
1648
|
* Which tab refreshes this provider's tokens, as a chip: whether it is this one, how many tabs are
|
|
1596
1649
|
* in the election, and - when there is no election - why every tab reads as the leader.
|
|
1597
1650
|
*/
|
|
1598
|
-
authLeadership(auth: AnyBearerAuthProvider):
|
|
1651
|
+
authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null;
|
|
1599
1652
|
/**
|
|
1600
1653
|
* The access token's expiry as the app sees it, plus whatever the panel is doing to it: an armed
|
|
1601
1654
|
* lifetime replaces the countdown, and the token's own is reported next to it so the card never claims
|
|
@@ -1634,6 +1687,12 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1634
1687
|
content: string;
|
|
1635
1688
|
type: string;
|
|
1636
1689
|
}): void;
|
|
1690
|
+
/**
|
|
1691
|
+
* Takes - or gives back - the lock whose name only this tab can have produced. Its `clientId` in the
|
|
1692
|
+
* snapshot is what tells this tab's rows from another tab's: `LockInfo` carries no tab identity, and
|
|
1693
|
+
* the platform offers no way to ask for one's own client id.
|
|
1694
|
+
*/
|
|
1695
|
+
private holdProbeLock;
|
|
1637
1696
|
/**
|
|
1638
1697
|
* The two runs the diff compares, oldest first - normalised by run index, so picking a pair in either
|
|
1639
1698
|
* order reads the same way round as the `#before → #after` header prints it.
|
|
@@ -1771,7 +1830,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1771
1830
|
declare const QUERY_DEVTOOLS_IMPORTS: readonly [typeof QueryDevtoolsComponent];
|
|
1772
1831
|
|
|
1773
1832
|
/** The version of `@ethlete/query-devtools` this build was cut from. */
|
|
1774
|
-
declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.
|
|
1833
|
+
declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.1";
|
|
1775
1834
|
|
|
1776
1835
|
export { QUERY_DEVTOOLS_IMPORTS, QUERY_DEVTOOLS_VERSION, QueryDevtoolsAboutComponent, QueryDevtoolsComponent, QueryDevtoolsJsonComponent, QueryDevtoolsJsonStylesComponent, QueryDevtoolsSettingsComponent, QueryDevtoolsTimelineStylesComponent, clampFloatToPeek, kindOf, resizedFloatRect, settledFloatRect };
|
|
1777
1836
|
export type { JsonKind };
|