@graphrefly/graphrefly 0.6.0 → 0.7.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.
Files changed (75) hide show
  1. package/README.md +30 -14
  2. package/dist/{chunk-5X3LAO3B.js → chunk-3EVXOI5C.js} +50 -5
  3. package/dist/chunk-3EVXOI5C.js.map +1 -0
  4. package/dist/chunk-47YJEZUJ.js +106 -0
  5. package/dist/chunk-47YJEZUJ.js.map +1 -0
  6. package/dist/{chunk-6W5SGIGB.js → chunk-BLCXEMAD.js} +129 -25
  7. package/dist/chunk-BLCXEMAD.js.map +1 -0
  8. package/dist/{chunk-QW7H3ICI.js → chunk-FGLZ5QID.js} +4 -4
  9. package/dist/{chunk-CP6MNKAA.js → chunk-ISGMZ2T3.js} +10 -4
  10. package/dist/{chunk-CP6MNKAA.js.map → chunk-ISGMZ2T3.js.map} +1 -1
  11. package/dist/{chunk-HP7OKEOE.js → chunk-L4J2K2RT.js} +3 -3
  12. package/dist/chunk-L4J2K2RT.js.map +1 -0
  13. package/dist/{chunk-V3UACY6A.js → chunk-ONLYF6GA.js} +790 -203
  14. package/dist/chunk-ONLYF6GA.js.map +1 -0
  15. package/dist/{chunk-Z4Y4FMQN.js → chunk-OSR3G3DP.js} +7 -7
  16. package/dist/{chunk-KWXPDASV.js → chunk-PEBORXRA.js} +2 -2
  17. package/dist/chunk-WZ2Z2CRV.js +32 -0
  18. package/dist/chunk-WZ2Z2CRV.js.map +1 -0
  19. package/dist/compat/nestjs/index.cjs +226 -41
  20. package/dist/compat/nestjs/index.cjs.map +1 -1
  21. package/dist/compat/nestjs/index.d.cts +4 -4
  22. package/dist/compat/nestjs/index.d.ts +4 -4
  23. package/dist/compat/nestjs/index.js +8 -7
  24. package/dist/core/index.cjs +134 -20
  25. package/dist/core/index.cjs.map +1 -1
  26. package/dist/core/index.d.cts +2 -2
  27. package/dist/core/index.d.ts +2 -2
  28. package/dist/core/index.js +10 -4
  29. package/dist/extra/index.cjs +863 -206
  30. package/dist/extra/index.cjs.map +1 -1
  31. package/dist/extra/index.d.cts +4 -4
  32. package/dist/extra/index.d.ts +4 -4
  33. package/dist/extra/index.js +22 -3
  34. package/dist/graph/index.cjs +226 -41
  35. package/dist/graph/index.cjs.map +1 -1
  36. package/dist/graph/index.d.cts +3 -3
  37. package/dist/graph/index.d.ts +3 -3
  38. package/dist/graph/index.js +4 -4
  39. package/dist/{graph-CL_ZDAj9.d.cts → graph-B3BoJjcb.d.cts} +58 -7
  40. package/dist/{graph-D18qmsNm.d.ts → graph-CmiUuhaN.d.ts} +58 -7
  41. package/dist/{index-B7eOdgEx.d.ts → index-Bf2X1YSI.d.ts} +3 -3
  42. package/dist/{index-BvhgZRHK.d.cts → index-Bl7hJcc3.d.cts} +4 -2
  43. package/dist/{index-Bvy_6CaN.d.ts → index-BrgtEG-C.d.ts} +47 -4
  44. package/dist/{index-D_geH2Bm.d.cts → index-BsuKSs4L.d.cts} +3 -3
  45. package/dist/{index-BtK55IE2.d.ts → index-CsUq2rrK.d.ts} +4 -2
  46. package/dist/{index-C3BMRmmp.d.cts → index-D0cx-Yht.d.cts} +3 -3
  47. package/dist/{index-Bk_idZm1.d.cts → index-D1hgSTzr.d.cts} +406 -61
  48. package/dist/{index-C5mqLhMX.d.cts → index-D8NIq6om.d.cts} +47 -4
  49. package/dist/{index-CP_QvbWu.d.ts → index-DFFNKYig.d.ts} +3 -3
  50. package/dist/{index-B2jmzVxL.d.ts → index-Pm68AYPh.d.ts} +406 -61
  51. package/dist/index.cjs +2929 -1775
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.cts +112 -14
  54. package/dist/index.d.ts +112 -14
  55. package/dist/index.js +392 -27
  56. package/dist/index.js.map +1 -1
  57. package/dist/{meta-BsF6Sag9.d.cts → meta-BJEU8fYz.d.cts} +31 -4
  58. package/dist/{meta-BsF6Sag9.d.ts → meta-BJEU8fYz.d.ts} +31 -4
  59. package/dist/patterns/reactive-layout/index.cjs +226 -41
  60. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  61. package/dist/patterns/reactive-layout/index.d.cts +3 -3
  62. package/dist/patterns/reactive-layout/index.d.ts +3 -3
  63. package/dist/patterns/reactive-layout/index.js +4 -4
  64. package/dist/{reactive-log-BfvfNWQh.d.cts → reactive-log-CAXzJ7hw.d.cts} +2 -2
  65. package/dist/{reactive-log-ohLmTXoZ.d.ts → reactive-log-DwNhOe0g.d.ts} +2 -2
  66. package/package.json +29 -18
  67. package/dist/chunk-5X3LAO3B.js.map +0 -1
  68. package/dist/chunk-6W5SGIGB.js.map +0 -1
  69. package/dist/chunk-HP7OKEOE.js.map +0 -1
  70. package/dist/chunk-O3PI7W45.js +0 -68
  71. package/dist/chunk-O3PI7W45.js.map +0 -1
  72. package/dist/chunk-V3UACY6A.js.map +0 -1
  73. /package/dist/{chunk-QW7H3ICI.js.map → chunk-FGLZ5QID.js.map} +0 -0
  74. /package/dist/{chunk-Z4Y4FMQN.js.map → chunk-OSR3G3DP.js.map} +0 -0
  75. /package/dist/{chunk-KWXPDASV.js.map → chunk-PEBORXRA.js.map} +0 -0
@@ -1,7 +1,7 @@
1
- export { o as observeGraph$, c as observeNode$, t as toMessages$, d as toObservable } from '../../reactive-log-BfvfNWQh.cjs';
2
- export { A as ACTOR_KEY, a as ActorExtractor, C as COMMAND_HANDLERS, b as CQRS_EVENT_HANDLERS, d as CRON_HANDLERS, e as CommandHandler, f as CommandHandlerMeta, E as EVENT_HANDLERS, g as EventHandler, h as EventHandlerMeta, G as GRAPHREFLY_REQUEST_GRAPH, j as GRAPHREFLY_ROOT_GRAPH, k as GraphCron, l as GraphCronMeta, m as GraphInterval, n as GraphIntervalMeta, o as GraphReflyCqrsOptions, p as GraphReflyEventExplorer, q as GraphReflyFeatureOptions, r as GraphReflyGuard, s as GraphReflyGuardImpl, t as GraphReflyModule, u as GraphReflyRootOptions, I as INTERVAL_HANDLERS, v as InjectCqrsGraph, w as InjectGraph, x as InjectNode, O as ObserveGateway, y as ObserveGatewayOptions, z as ObserveSSEOptions, B as ObserveSubscriptionOptions, D as ObserveWsCommand, F as ObserveWsMessage, H as OnGraphEvent, J as OnGraphEventMeta, Q as QUERY_HANDLERS, K as QueryHandler, L as QueryHandlerMeta, S as SAGA_HANDLERS, M as SagaHandler, N as SagaHandlerMeta, P as fromHeader, R as fromJwtPayload, T as getActor, U as getGraphToken, V as getNodeToken, W as observeSSE, X as observeSubscription } from '../../index-D_geH2Bm.cjs';
1
+ export { o as observeGraph$, c as observeNode$, t as toMessages$, d as toObservable } from '../../reactive-log-CAXzJ7hw.cjs';
2
+ export { A as ACTOR_KEY, a as ActorExtractor, C as COMMAND_HANDLERS, b as CQRS_EVENT_HANDLERS, d as CRON_HANDLERS, e as CommandHandler, f as CommandHandlerMeta, E as EVENT_HANDLERS, g as EventHandler, h as EventHandlerMeta, G as GRAPHREFLY_REQUEST_GRAPH, j as GRAPHREFLY_ROOT_GRAPH, k as GraphCron, l as GraphCronMeta, m as GraphInterval, n as GraphIntervalMeta, o as GraphReflyCqrsOptions, p as GraphReflyEventExplorer, q as GraphReflyFeatureOptions, r as GraphReflyGuard, s as GraphReflyGuardImpl, t as GraphReflyModule, u as GraphReflyRootOptions, I as INTERVAL_HANDLERS, v as InjectCqrsGraph, w as InjectGraph, x as InjectNode, O as ObserveGateway, y as ObserveGatewayOptions, z as ObserveSSEOptions, B as ObserveSubscriptionOptions, D as ObserveWsCommand, F as ObserveWsMessage, H as OnGraphEvent, J as OnGraphEventMeta, Q as QUERY_HANDLERS, K as QueryHandler, L as QueryHandlerMeta, S as SAGA_HANDLERS, M as SagaHandler, N as SagaHandlerMeta, P as fromHeader, R as fromJwtPayload, T as getActor, U as getGraphToken, V as getNodeToken, W as observeSSE, X as observeSubscription } from '../../index-BsuKSs4L.cjs';
3
3
  import 'rxjs';
4
- import '../../meta-BsF6Sag9.cjs';
5
- import '../../graph-CL_ZDAj9.cjs';
4
+ import '../../meta-BJEU8fYz.cjs';
5
+ import '../../graph-B3BoJjcb.cjs';
6
6
  import '@nestjs/common';
7
7
  import '@nestjs/core';
@@ -1,7 +1,7 @@
1
- export { o as observeGraph$, c as observeNode$, t as toMessages$, d as toObservable } from '../../reactive-log-ohLmTXoZ.js';
2
- export { A as ACTOR_KEY, a as ActorExtractor, C as COMMAND_HANDLERS, b as CQRS_EVENT_HANDLERS, d as CRON_HANDLERS, e as CommandHandler, f as CommandHandlerMeta, E as EVENT_HANDLERS, g as EventHandler, h as EventHandlerMeta, G as GRAPHREFLY_REQUEST_GRAPH, j as GRAPHREFLY_ROOT_GRAPH, k as GraphCron, l as GraphCronMeta, m as GraphInterval, n as GraphIntervalMeta, o as GraphReflyCqrsOptions, p as GraphReflyEventExplorer, q as GraphReflyFeatureOptions, r as GraphReflyGuard, s as GraphReflyGuardImpl, t as GraphReflyModule, u as GraphReflyRootOptions, I as INTERVAL_HANDLERS, v as InjectCqrsGraph, w as InjectGraph, x as InjectNode, O as ObserveGateway, y as ObserveGatewayOptions, z as ObserveSSEOptions, B as ObserveSubscriptionOptions, D as ObserveWsCommand, F as ObserveWsMessage, H as OnGraphEvent, J as OnGraphEventMeta, Q as QUERY_HANDLERS, K as QueryHandler, L as QueryHandlerMeta, S as SAGA_HANDLERS, M as SagaHandler, N as SagaHandlerMeta, P as fromHeader, R as fromJwtPayload, T as getActor, U as getGraphToken, V as getNodeToken, W as observeSSE, X as observeSubscription } from '../../index-CP_QvbWu.js';
1
+ export { o as observeGraph$, c as observeNode$, t as toMessages$, d as toObservable } from '../../reactive-log-DwNhOe0g.js';
2
+ export { A as ACTOR_KEY, a as ActorExtractor, C as COMMAND_HANDLERS, b as CQRS_EVENT_HANDLERS, d as CRON_HANDLERS, e as CommandHandler, f as CommandHandlerMeta, E as EVENT_HANDLERS, g as EventHandler, h as EventHandlerMeta, G as GRAPHREFLY_REQUEST_GRAPH, j as GRAPHREFLY_ROOT_GRAPH, k as GraphCron, l as GraphCronMeta, m as GraphInterval, n as GraphIntervalMeta, o as GraphReflyCqrsOptions, p as GraphReflyEventExplorer, q as GraphReflyFeatureOptions, r as GraphReflyGuard, s as GraphReflyGuardImpl, t as GraphReflyModule, u as GraphReflyRootOptions, I as INTERVAL_HANDLERS, v as InjectCqrsGraph, w as InjectGraph, x as InjectNode, O as ObserveGateway, y as ObserveGatewayOptions, z as ObserveSSEOptions, B as ObserveSubscriptionOptions, D as ObserveWsCommand, F as ObserveWsMessage, H as OnGraphEvent, J as OnGraphEventMeta, Q as QUERY_HANDLERS, K as QueryHandler, L as QueryHandlerMeta, S as SAGA_HANDLERS, M as SagaHandler, N as SagaHandlerMeta, P as fromHeader, R as fromJwtPayload, T as getActor, U as getGraphToken, V as getNodeToken, W as observeSSE, X as observeSubscription } from '../../index-DFFNKYig.js';
3
3
  import 'rxjs';
4
- import '../../meta-BsF6Sag9.js';
5
- import '../../graph-D18qmsNm.js';
4
+ import '../../meta-BJEU8fYz.js';
5
+ import '../../graph-CmiUuhaN.js';
6
6
  import '@nestjs/common';
7
7
  import '@nestjs/core';
@@ -31,18 +31,19 @@ import {
31
31
  getNodeToken,
32
32
  observeSSE,
33
33
  observeSubscription
34
- } from "../../chunk-QW7H3ICI.js";
35
- import "../../chunk-CP6MNKAA.js";
36
- import "../../chunk-HP7OKEOE.js";
34
+ } from "../../chunk-FGLZ5QID.js";
35
+ import "../../chunk-ISGMZ2T3.js";
37
36
  import {
38
37
  observeGraph$,
39
38
  observeNode$,
40
39
  toMessages$,
41
40
  toObservable
42
- } from "../../chunk-KWXPDASV.js";
43
- import "../../chunk-6W5SGIGB.js";
44
- import "../../chunk-O3PI7W45.js";
45
- import "../../chunk-5X3LAO3B.js";
41
+ } from "../../chunk-PEBORXRA.js";
42
+ import "../../chunk-WZ2Z2CRV.js";
43
+ import "../../chunk-L4J2K2RT.js";
44
+ import "../../chunk-BLCXEMAD.js";
45
+ import "../../chunk-47YJEZUJ.js";
46
+ import "../../chunk-3EVXOI5C.js";
46
47
  export {
47
48
  ACTOR_KEY,
48
49
  COMMAND_HANDLERS,
@@ -31,6 +31,7 @@ __export(core_exports, {
31
31
  PAUSE: () => PAUSE,
32
32
  RESOLVED: () => RESOLVED,
33
33
  RESUME: () => RESUME,
34
+ ResettableTimer: () => ResettableTimer,
34
35
  TEARDOWN: () => TEARDOWN,
35
36
  accessHintForGuard: () => accessHintForGuard,
36
37
  advanceVersion: () => advanceVersion,
@@ -59,6 +60,7 @@ __export(core_exports, {
59
60
  policyFromRules: () => policyFromRules,
60
61
  producer: () => producer,
61
62
  propagatesToMeta: () => propagatesToMeta,
63
+ resolveDescribeFields: () => resolveDescribeFields,
62
64
  state: () => state,
63
65
  wallClockNs: () => wallClockNs
64
66
  });
@@ -227,10 +229,14 @@ function partitionForBatch(messages) {
227
229
  }
228
230
  return { immediate, deferred, terminal };
229
231
  }
230
- function emitWithBatch(emit, messages, phase = 2) {
232
+ function emitWithBatch(emit, messages, phase = 2, options) {
231
233
  if (messages.length === 0) {
232
234
  return;
233
235
  }
236
+ if (options?.strategy === "sequential") {
237
+ _emitSequential(emit, messages, phase);
238
+ return;
239
+ }
234
240
  const queue = phase === 3 ? pendingPhase3 : pendingPhase2;
235
241
  if (messages.length === 1) {
236
242
  const t = messages[0][0];
@@ -271,6 +277,29 @@ function emitWithBatch(emit, messages, phase = 2) {
271
277
  }
272
278
  }
273
279
  }
280
+ function _emitSequential(emit, messages, phase = 2) {
281
+ const dataQueue = phase === 3 ? pendingPhase3 : pendingPhase2;
282
+ for (const msg of messages) {
283
+ const tier = messageTier(msg[0]);
284
+ if (tier === 2) {
285
+ if (isBatching()) {
286
+ const m = msg;
287
+ dataQueue.push(() => emit([m]));
288
+ } else {
289
+ emit([msg]);
290
+ }
291
+ } else if (tier >= 3) {
292
+ if (isBatching()) {
293
+ const m = msg;
294
+ pendingPhase3.push(() => emit([m]));
295
+ } else {
296
+ emit([msg]);
297
+ }
298
+ } else {
299
+ emit([msg]);
300
+ }
301
+ }
302
+ }
274
303
 
275
304
  // src/core/clock.ts
276
305
  function monotonicNs() {
@@ -534,6 +563,7 @@ var NodeImpl = class {
534
563
  _producerStarted = false;
535
564
  _connecting = false;
536
565
  _manualEmitUsed = false;
566
+ _hasEmittedData = false;
537
567
  _sinkCount = 0;
538
568
  _singleDepSinkCount = 0;
539
569
  // --- Object/collection state ---
@@ -820,6 +850,7 @@ var NodeImpl = class {
820
850
  this._cleanup = void 0;
821
851
  cleanupFn?.();
822
852
  this._cached = void 0;
853
+ this._hasEmittedData = false;
823
854
  this._lastDepValues = void 0;
824
855
  }
825
856
  this._status = statusAfterMessage(this._status, m);
@@ -829,6 +860,7 @@ var NodeImpl = class {
829
860
  if (t === TEARDOWN) {
830
861
  if (this._opts.resetOnTeardown) {
831
862
  this._cached = void 0;
863
+ this._hasEmittedData = false;
832
864
  }
833
865
  const teardownCleanup = this._cleanup;
834
866
  this._cleanup = void 0;
@@ -859,7 +891,16 @@ var NodeImpl = class {
859
891
  }
860
892
  _emitAutoValue(value) {
861
893
  const wasDirty = this._status === "dirty";
862
- const unchanged = this._equals(this._cached, value);
894
+ let unchanged;
895
+ try {
896
+ unchanged = this._hasEmittedData && this._equals(this._cached, value);
897
+ } catch (eqErr) {
898
+ const eqMsg = eqErr instanceof Error ? eqErr.message : String(eqErr);
899
+ const wrapped = new Error(`Node "${this.name}": equals threw: ${eqMsg}`, { cause: eqErr });
900
+ this._downInternal([[ERROR, wrapped]]);
901
+ return;
902
+ }
903
+ this._hasEmittedData = true;
863
904
  if (unchanged) {
864
905
  this._downInternal(wasDirty ? [[RESOLVED]] : [[DIRTY], [RESOLVED]]);
865
906
  return;
@@ -906,7 +947,9 @@ var NodeImpl = class {
906
947
  if (out === void 0) return;
907
948
  this._emitAutoValue(out);
908
949
  } catch (err) {
909
- this._downInternal([[ERROR, err]]);
950
+ const errMsg = err instanceof Error ? err.message : String(err);
951
+ const wrapped = new Error(`Node "${this.name}": fn threw: ${errMsg}`, { cause: err });
952
+ this._downInternal([[ERROR, wrapped]]);
910
953
  }
911
954
  }
912
955
  _onDepDirty(index) {
@@ -941,7 +984,11 @@ var NodeImpl = class {
941
984
  try {
942
985
  if (this._onMessage(msg, index, this._actions)) continue;
943
986
  } catch (err) {
944
- this._downInternal([[ERROR, err]]);
987
+ const errMsg = err instanceof Error ? err.message : String(err);
988
+ const wrapped = new Error(`Node "${this.name}": onMessage threw: ${errMsg}`, {
989
+ cause: err
990
+ });
991
+ this._downInternal([[ERROR, wrapped]]);
945
992
  return;
946
993
  }
947
994
  }
@@ -1509,6 +1556,19 @@ var DynamicNodeImpl = class {
1509
1556
  };
1510
1557
 
1511
1558
  // src/core/meta.ts
1559
+ function resolveDescribeFields(detail, fields) {
1560
+ if (fields != null && fields.length > 0) return new Set(fields);
1561
+ switch (detail) {
1562
+ case "standard":
1563
+ return /* @__PURE__ */ new Set(["type", "status", "value", "deps", "meta", "v"]);
1564
+ case "full":
1565
+ return null;
1566
+ // null = include everything
1567
+ case "minimal":
1568
+ default:
1569
+ return /* @__PURE__ */ new Set(["type", "deps"]);
1570
+ }
1571
+ }
1512
1572
  function inferDescribeType(n) {
1513
1573
  if (n._describeKind != null) return n._describeKind;
1514
1574
  if (!n._hasDeps) return n._fn != null ? "producer" : "state";
@@ -1526,12 +1586,10 @@ function metaSnapshot(node2) {
1526
1586
  }
1527
1587
  return out;
1528
1588
  }
1529
- function describeNode(node2) {
1530
- const meta = { ...metaSnapshot(node2) };
1531
- const guard = node2 instanceof NodeImpl && node2._guard || node2 instanceof DynamicNodeImpl && node2._guard || void 0;
1532
- if (guard != null && meta.access === void 0) {
1533
- meta.access = accessHintForGuard(guard);
1534
- }
1589
+ function describeNode(node2, includeFields) {
1590
+ const all = includeFields == null;
1591
+ const metaKeys = !all && includeFields != null ? [...includeFields].filter((f) => f.startsWith("meta.")).map((f) => f.slice(5)) : null;
1592
+ const wantsMeta = all || includeFields.has("meta") || metaKeys != null && metaKeys.length > 0;
1535
1593
  let type = "state";
1536
1594
  let deps = [];
1537
1595
  if (node2 instanceof NodeImpl) {
@@ -1541,20 +1599,36 @@ function describeNode(node2) {
1541
1599
  type = node2._describeKind ?? "derived";
1542
1600
  deps = [];
1543
1601
  }
1544
- const out = {
1545
- type,
1546
- status: node2.status,
1547
- deps,
1548
- meta
1549
- };
1602
+ const out = { type, deps };
1603
+ if (all || includeFields.has("status")) {
1604
+ out.status = node2.status;
1605
+ }
1606
+ const guard = node2 instanceof NodeImpl && node2._guard || node2 instanceof DynamicNodeImpl && node2._guard || void 0;
1607
+ if (wantsMeta) {
1608
+ const rawMeta = { ...metaSnapshot(node2) };
1609
+ if (guard != null && rawMeta.access === void 0) {
1610
+ rawMeta.access = accessHintForGuard(guard);
1611
+ }
1612
+ if (metaKeys != null && metaKeys.length > 0 && !includeFields.has("meta")) {
1613
+ const filtered = {};
1614
+ for (const k of metaKeys) {
1615
+ if (k in rawMeta) filtered[k] = rawMeta[k];
1616
+ }
1617
+ out.meta = filtered;
1618
+ } else {
1619
+ out.meta = rawMeta;
1620
+ }
1621
+ }
1550
1622
  if (node2.name != null) {
1551
1623
  out.name = node2.name;
1552
1624
  }
1553
- try {
1554
- out.value = node2.get();
1555
- } catch {
1625
+ if (all || includeFields.has("value")) {
1626
+ try {
1627
+ out.value = node2.get();
1628
+ } catch {
1629
+ }
1556
1630
  }
1557
- if (node2.v != null) {
1631
+ if ((all || includeFields.has("v")) && node2.v != null) {
1558
1632
  const vInfo = { id: node2.v.id, version: node2.v.version };
1559
1633
  if ("cid" in node2.v) {
1560
1634
  vInfo.cid = node2.v.cid;
@@ -1562,6 +1636,16 @@ function describeNode(node2) {
1562
1636
  }
1563
1637
  out.v = vInfo;
1564
1638
  }
1639
+ if (all || includeFields.has("guard")) {
1640
+ if (guard != null) {
1641
+ out.guard = accessHintForGuard(guard);
1642
+ }
1643
+ }
1644
+ if (all || includeFields.has("lastMutation")) {
1645
+ if (node2.lastMutation != null) {
1646
+ out.lastMutation = node2.lastMutation;
1647
+ }
1648
+ }
1565
1649
  return out;
1566
1650
  }
1567
1651
 
@@ -1585,6 +1669,34 @@ function pipe(source, ...ops) {
1585
1669
  }
1586
1670
  return current;
1587
1671
  }
1672
+
1673
+ // src/core/timer.ts
1674
+ var ResettableTimer = class {
1675
+ _timer;
1676
+ _gen = 0;
1677
+ /** Schedule callback after delayMs. Cancels any pending timer. */
1678
+ start(delayMs, callback) {
1679
+ this.cancel();
1680
+ this._gen += 1;
1681
+ const gen = this._gen;
1682
+ this._timer = setTimeout(() => {
1683
+ this._timer = void 0;
1684
+ if (gen !== this._gen) return;
1685
+ callback();
1686
+ }, delayMs);
1687
+ }
1688
+ /** Cancel the pending timer (if any). */
1689
+ cancel() {
1690
+ if (this._timer !== void 0) {
1691
+ clearTimeout(this._timer);
1692
+ this._timer = void 0;
1693
+ }
1694
+ }
1695
+ /** Whether a timer is currently pending. */
1696
+ get pending() {
1697
+ return this._timer !== void 0;
1698
+ }
1699
+ };
1588
1700
  // Annotate the CommonJS export names for ESM import in node:
1589
1701
  0 && (module.exports = {
1590
1702
  COMPLETE,
@@ -1598,6 +1710,7 @@ function pipe(source, ...ops) {
1598
1710
  PAUSE,
1599
1711
  RESOLVED,
1600
1712
  RESUME,
1713
+ ResettableTimer,
1601
1714
  TEARDOWN,
1602
1715
  accessHintForGuard,
1603
1716
  advanceVersion,
@@ -1626,6 +1739,7 @@ function pipe(source, ...ops) {
1626
1739
  policyFromRules,
1627
1740
  producer,
1628
1741
  propagatesToMeta,
1742
+ resolveDescribeFields,
1629
1743
  state,
1630
1744
  wallClockNs
1631
1745
  });