@hueest/xray 0.1.0 → 0.2.0

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/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { s as ViewCapture } from "./plate-DboxMKg-.js";
1
+ import { s as ViewCapture } from "./plate-Bv6W-GkA.js";
2
2
 
3
3
  //#region src/client.d.ts
4
4
  /**
@@ -34,8 +34,43 @@ interface ClientOptions {
34
34
  * Defaults to `true` — the plugin passes its own (off-by-default) policy.
35
35
  */
36
36
  capture?: boolean;
37
- /** Where finished captures go. */
38
- sink: (payload: CapturePayload) => void;
37
+ /**
38
+ * Where finished captures go. May be synchronous (fire-and-forget) or return
39
+ * a promise that resolves once the write is server-confirmed. Browse-time
40
+ * capture ignores the return value; the capture-all sweep awaits it so it
41
+ * does not advance to the next emulated width until the current writes have
42
+ * been accepted by the dev server (backpressure — capture-all-backpressure plan).
43
+ */
44
+ sink: (payload: CapturePayload) => void | Promise<void>;
45
+ /**
46
+ * Re-pull the on-disk per-plate coverage and feed it into the coverage store.
47
+ * The capture-all sweep calls this after each pass so the next `sweepWidths()`
48
+ * sees the breakpoints just written by that pass, rather than racing the
49
+ * async `xray:plate` HMR event (coverage freshness — capture-all-backpressure
50
+ * plan). Optional: browse-time capture never needs it, and the unit tests
51
+ * drive coverage directly through the store.
52
+ */
53
+ refreshCoverage?: () => void | Promise<void>;
54
+ /**
55
+ * Fixtures boot state (ADR 0015). `record` is when to write the live `data` to a
56
+ * sidecar (`'manual'` — HUD button only, the default; `'first-ready'`; or
57
+ * `'always'`); `replay` is whether to substitute a recorded Fixture for live
58
+ * `data` (`false`, `'prefer'`, or `'missing-only'`). The HUD overrides the
59
+ * replay toggle per tab. Absent ≡ defaults (`'manual'` / `false`).
60
+ */
61
+ record?: 'manual' | 'first-ready' | 'always';
62
+ replay?: false | 'prefer' | 'missing-only';
63
+ /**
64
+ * Where a recorded Fixture's OPAQUE devalue string is POSTed (the sidecar write
65
+ * endpoint). The client owns the devalue stringify; this only ships the bytes.
66
+ * Resolves once the write is server-confirmed, rejects on a non-2xx so the HUD
67
+ * Record button can surface a failed write. Absent ≡ Record is a no-op (the
68
+ * unit tests inject their own).
69
+ */
70
+ recordFixtureSink?: (payload: {
71
+ name: string;
72
+ data: string;
73
+ }) => void | Promise<void>;
39
74
  }
40
75
  declare function installXrayClient(options: ClientOptions): () => void;
41
76
  //#endregion