@ethlete/query-devtools 1.0.0-next.10 → 1.0.0-next.11

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,13 +1,13 @@
1
1
  {
2
2
  "name": "@ethlete/query-devtools",
3
- "version": "1.0.0-next.10",
3
+ "version": "1.0.0-next.11",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "@analogjs/vitest-angular": "2.6.3",
8
- "@angular/common": "22.0.7",
9
- "@angular/compiler": "22.0.7",
10
- "@angular/core": "22.0.7",
8
+ "@angular/common": "22.1.6",
9
+ "@angular/compiler": "22.1.6",
10
+ "@angular/core": "22.1.6",
11
11
  "@ethlete/components": "^1.0.0-next.42",
12
12
  "@ethlete/core": "^5.0.0-beta.11",
13
13
  "@ethlete/query": "^6.0.0-beta.8",
@@ -5,6 +5,9 @@ import * as _angular_core from '@angular/core';
5
5
  * first asked for, then downloads `<et-query-devtools>` as its own chunk and hands over. Use it instead
6
6
  * of `<et-query-devtools>` to keep the panel out of the bundle an application ships to its users.
7
7
  *
8
+ * Without `provideQueryDevtools()` it renders nothing at all - no toggle, no shortcut, and the panel
9
+ * chunk is never requested - so it can be left mounted in a production build.
10
+ *
8
11
  * Everything else is identical - the same toggle, the same `Ctrl/Cmd + Alt + Q` shortcut, and a panel
9
12
  * that was open when the tab last stored its state comes back open without a click.
10
13
  *
@@ -16,10 +19,15 @@ import * as _angular_core from '@angular/core';
16
19
  declare class QueryDevtoolsLazyComponent {
17
20
  private document;
18
21
  /**
19
- * Whether the panel was already open in this tab. It has to be answered before the panel exists, which
20
- * is why the stored view state is read here rather than asked of the panel.
22
+ * Whether `provideQueryDevtools()` is in the application. Everything else here is gated on it - the
23
+ * stored view state read, the shortcut listener and the template - so a build that ships the shell
24
+ * without the provider renders nothing and can never load the panel.
25
+ */
26
+ protected enabled: boolean;
27
+ /**
28
+ * Whether the panel is wanted. Whether it was already open has to be answered before the panel exists,
29
+ * which is why the stored view state is read here rather than asked of the panel.
21
30
  */
22
- private restoredOpen;
23
31
  protected load: _angular_core.WritableSignal<boolean>;
24
32
  /** A restored panel opens because it was open; one that was clicked open has to be told to. */
25
33
  protected openOnLoad: _angular_core.WritableSignal<boolean>;
@@ -19,6 +19,8 @@ type AboutGroup = {
19
19
  declare class QueryDevtoolsAboutComponent {
20
20
  protected readonly groups: AboutGroup[];
21
21
  protected copied: _angular_core.WritableSignal<boolean>;
22
+ private copiedReset$;
23
+ constructor();
22
24
  protected copy(): void;
23
25
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<QueryDevtoolsAboutComponent, never>;
24
26
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<QueryDevtoolsAboutComponent, "et-query-devtools-about", never, {}, {}, never, never, true, never>;
@@ -719,6 +721,12 @@ type QueryDevtoolsHost = {
719
721
  entry: QueryDevtoolsEntry;
720
722
  query: AnyQuery;
721
723
  } | null>;
724
+ /**
725
+ * The type annotations of each seeded mock body, by mock id. A mock only stores the *name* it was
726
+ * seeded from, and a body seeded from an inline schema has none, so this is the only thing that can
727
+ * label such a body - and it has to outlive the Mocks tab being switched away from.
728
+ */
729
+ seededTypes: WritableSignal<Record<string, ReadonlyMap<string, string>>>;
722
730
  paneAxis: Signal<PaneAxis>;
723
731
  listWidth: Signal<number | null>;
724
732
  drawerWidth: Signal<number | null>;
@@ -778,6 +786,8 @@ declare class QueryDevtoolsSettingsComponent {
778
786
  protected sessionCount: _angular_core.Signal<number>;
779
787
  protected armedMockCount: _angular_core.Signal<number>;
780
788
  protected armedFaultCount: _angular_core.Signal<number>;
789
+ /** The same keys the Events tab's own picker offers - see {@link queryDevtoolsEventClients}. */
790
+ protected eventClients: _angular_core.Signal<string[]>;
781
791
  protected resetConfirming: _angular_core.WritableSignal<boolean>;
782
792
  protected readonly FORGET_SESSIONS: () => void;
783
793
  /** The backends the application declared, or an empty list - the card renders only for a declared one. */
@@ -801,6 +811,8 @@ declare class QueryDevtoolsSettingsComponent {
801
811
  protected limitOf(key: LimitKey): number;
802
812
  /** What the picked scope means beyond where the state is kept, or `null` while it means nothing extra. */
803
813
  protected warningFor(row: ScopeRow, scope: QueryDevtoolsStorageScope): string | null;
814
+ /** Why one scope is not on offer for a row, for the button's title, or `null` while it is. */
815
+ protected unavailableReason(row: ScopeRow, scope: QueryDevtoolsStorageScope): "Unavailable outside a development build: live access and refresh tokens, and the credentials you typed in, must not outlive this tab on a deployed origin. Session keeps the vault for as long as the tab." | null;
804
816
  protected setScope(key: ScopeKey, scope: QueryDevtoolsStorageScope): void;
805
817
  protected setLimit(key: LimitKey, value: string): void;
806
818
  protected setResponseHistory(value: string): void;
@@ -1127,6 +1139,12 @@ declare class QueryDevtoolsComponent implements OnInit {
1127
1139
  selectedQueryId: WritableSignal<string | null>;
1128
1140
  /** The form whose detail the Forms tab has expanded. */
1129
1141
  selectedFormId: WritableSignal<string | null>;
1142
+ /**
1143
+ * The type annotations of each seeded mock body, by mock id. It lives here rather than on the Mocks
1144
+ * tab because a tab is destroyed the moment another one is selected, and a body seeded from an inline
1145
+ * schema has no `schemaName` to recover its labels from.
1146
+ */
1147
+ seededTypes: WritableSignal<Record<string, ReadonlyMap<string, string>>>;
1130
1148
  stackSelectedQueryId: WritableSignal<string | null>;
1131
1149
  sequenceSelectedQueryId: WritableSignal<string | null>;
1132
1150
  batchSelectedQueryId: WritableSignal<string | null>;
@@ -1218,7 +1236,12 @@ declare class QueryDevtoolsComponent implements OnInit {
1218
1236
  copiedGql: WritableSignal<boolean>;
1219
1237
  copiedRoute: WritableSignal<boolean>;
1220
1238
  private copiedReset$;
1221
- /** 1-second tick driving the cache freshness countdowns. */
1239
+ /**
1240
+ * 1-second tick driving the cache freshness countdowns. Gated the way the locks poll is: an ungated
1241
+ * `interval` is a periodic macrotask zone.js counts forever, so a mounted panel would tick the host
1242
+ * application once a second and keep `ApplicationRef.whenStable()` from ever resolving. Every reader
1243
+ * sits inside `@if (open())`, so there is nothing to drive while the panel is shut or the tab hidden.
1244
+ */
1222
1245
  private clock;
1223
1246
  /**
1224
1247
  * The probe lock behind every Locks row's "this tab" answer, and the last snapshot read through it.
@@ -1258,7 +1281,11 @@ declare class QueryDevtoolsComponent implements OnInit {
1258
1281
  wsEntries: _angular_core.Signal<QueryDevtoolsEntry[]>;
1259
1282
  /** Unique client names present across queries and auth providers, for the Queries-tab picker. */
1260
1283
  clientNames: _angular_core.Signal<string[]>;
1261
- /** Unique repositories (with their client name + base URL) used by the Cache and Events tabs. */
1284
+ /**
1285
+ * Unique repositories (with their client name + base URL) used by the Cache and Events tabs. A
1286
+ * tombstone keeps its `meta.repository`, so a destroyed client would otherwise keep its Cache card
1287
+ * and its **Evict all** long after its injector died.
1288
+ */
1262
1289
  private repositories;
1263
1290
  /**
1264
1291
  * Every client the Faults tab can arm, with the fault it currently carries. Clients with nothing armed
@@ -1585,7 +1612,7 @@ declare class QueryDevtoolsComponent implements OnInit {
1585
1612
  * What a run's status dot and timeline bar colour by. `pending` reuses the panel's loading colour;
1586
1613
  * `aborted` matches no rule and so falls back to the neutral one.
1587
1614
  */
1588
- runStatus(run: QueryDevtoolsRun): "error" | "loading" | "success" | "aborted";
1615
+ runStatus(run: QueryDevtoolsRun): "loading" | "success" | "error" | "aborted";
1589
1616
  /**
1590
1617
  * Whether a run can be an end of the diff: it still holds its body, and so does some other run of the
1591
1618
  * same query. Deliberately not "an *older* run" - a free pair means the oldest body held is pickable
@@ -1678,8 +1705,8 @@ declare class QueryDevtoolsComponent implements OnInit {
1678
1705
  * holds, the event log, the cache totals and anything armed in the Faults tab. Unlike **Copy report**
1679
1706
  * this is not scoped to one query - it is the attachment for a bug report about a screen.
1680
1707
  *
1681
- * Deliberately unfiltered: a report is read by someone who was not there, and a dump that silently
1682
- * left out the client you were not looking at is worse than no dump.
1708
+ * Deliberately unfiltered apart from credentials: a report is read by someone who was not there, and a
1709
+ * dump that silently left out the client you were not looking at is worse than no dump.
1683
1710
  */
1684
1711
  protected downloadSession(): void;
1685
1712
  openResponseEditor(query: AnyQuery): void;
@@ -1925,6 +1952,12 @@ declare class QueryDevtoolsComponent implements OnInit {
1925
1952
  */
1926
1953
  private insomniaHeaders;
1927
1954
  private sessionClients;
1955
+ /**
1956
+ * A bearer auth provider's login and token-refresh queries are ordinary registered queries, so the
1957
+ * export has to be told which ones they are before it can leave their bodies out. The provider's own
1958
+ * entry lists them by client, method and route, which is what a query entry is matched on.
1959
+ */
1960
+ private sessionAuthQueryKeys;
1928
1961
  /** Every registered entry, described by whatever its kind carries. */
1929
1962
  private sessionEntries;
1930
1963
  private sessionQuery;
@@ -1982,7 +2015,7 @@ declare class QueryDevtoolsComponent implements OnInit {
1982
2015
  declare const QUERY_DEVTOOLS_IMPORTS: readonly [typeof QueryDevtoolsComponent];
1983
2016
 
1984
2017
  /** The version of `@ethlete/query-devtools` this build was cut from. */
1985
- declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.10";
2018
+ declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.11";
1986
2019
 
1987
2020
  export { QUERY_DEVTOOLS_IMPORTS, QUERY_DEVTOOLS_VERSION, QueryDevtoolsAboutComponent, QueryDevtoolsComponent, QueryDevtoolsJsonComponent, QueryDevtoolsJsonStylesComponent, QueryDevtoolsSettingsComponent, QueryDevtoolsTimelineStylesComponent, clampFloatToPeek, kindOf, resizedFloatRect, settledFloatRect };
1988
2021
  export type { JsonKind };