@crvouga/mockingbird-service-rxvortex 1.1.1 → 1.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/CHANGELOG.md CHANGED
@@ -1,6 +1,24 @@
1
1
  # Changelog — @crvouga/mockingbird-service-rxvortex
2
2
 
3
- ## 1.1.1 (2026-09-26)
3
+ ## 1.2.0 (2026-09-29)
4
+
5
+ ### Features
6
+
7
+ - let a scalar naming a later branch's enum value pick that branch ([30ade3a](https://github.com/crvouga/mockingbird/commit/30ade3a28a5b6b273ffbf261216b821acac8e961))
8
+
9
+ ### Fixes and improvements
10
+
11
+ - stop cleared webhook deliveries from rescheduling forever ([424b78f](https://github.com/crvouga/mockingbird/commit/424b78f29317b162e3bf7d0049cc19be5b977026))
12
+ - serialize immediate webhook attempts to fix reorder flake ([625c82b](https://github.com/crvouga/mockingbird/commit/625c82b5a8a7992c1cf93e9df68e77af08b353e3))
13
+ - flush drains webhook retries scheduled while it runs ([c58cede](https://github.com/crvouga/mockingbird/commit/c58cede1b6ba7ae5ed3f8721ad9b7cd7bc0b1ca7))
14
+
15
+ ## 1.1.2 (2026-09-25)
16
+
17
+ ### Fixes and improvements
18
+
19
+ - treat enum [""] branches as unset markers in form coercion ([7177835](https://github.com/crvouga/mockingbird/commit/7177835cc510e14245d6648ad2821daa694bb80c))
20
+
21
+ ## 1.1.1 (2026-09-25)
4
22
 
5
23
  ### Fixes and improvements
6
24
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRuntime,
3
3
  parseCatalog
4
- } from "./chunk-5KK6W2PE.js";
4
+ } from "./chunk-NSYJUTGY.js";
5
5
 
6
6
  // src/server.ts
7
7
  import { readFileSync } from "node:fs";
@@ -417,4 +417,4 @@ export {
417
417
  loadCatalogFile,
418
418
  serveTarget
419
419
  };
420
- //# sourceMappingURL=chunk-XAWKEXKJ.js.map
420
+ //# sourceMappingURL=chunk-5INSPQD2.js.map
@@ -1582,7 +1582,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
1582
1582
  };
1583
1583
 
1584
1584
  // ../core/dist/version.js
1585
- var PACKAGE_VERSION = true ? "1.1.1" : UNRELEASED_VERSION;
1585
+ var PACKAGE_VERSION = true ? "1.2.0" : UNRELEASED_VERSION;
1586
1586
 
1587
1587
  // ../core/dist/signing.js
1588
1588
  var encoder = new TextEncoder();
@@ -1675,6 +1675,7 @@ var createWebhookHub = (options) => {
1675
1675
  const faults = /* @__PURE__ */ new Map();
1676
1676
  const held = /* @__PURE__ */ new Map();
1677
1677
  const inFlight = /* @__PURE__ */ new Set();
1678
+ let immediate = Promise.resolve();
1678
1679
  const track = (work) => {
1679
1680
  inFlight.add(work);
1680
1681
  void work.finally(() => inFlight.delete(work));
@@ -1737,22 +1738,28 @@ var createWebhookHub = (options) => {
1737
1738
  pending.delete(delivery.id);
1738
1739
  return;
1739
1740
  }
1740
- const run = () => {
1741
- pending.delete(delivery.id);
1742
- track(attempt(delivery).then((ok) => {
1741
+ const settle = async () => {
1742
+ if (!payloads.has(delivery.id))
1743
+ return;
1744
+ await attempt(delivery).then((ok) => {
1743
1745
  if (ok)
1744
1746
  delivery.state = "delivered";
1745
1747
  else
1746
1748
  schedule(delivery);
1747
- }));
1749
+ });
1748
1750
  };
1749
1751
  const delay = delays[index] ?? 0;
1750
1752
  if (delay <= 0) {
1751
- pending.set(delivery.id, void 0);
1752
- run();
1753
+ const task = immediate.then(settle);
1754
+ immediate = task.catch(() => {
1755
+ });
1756
+ track(task);
1753
1757
  return;
1754
1758
  }
1755
- const timer = scheduleTimer(run, delay);
1759
+ const timer = scheduleTimer(() => {
1760
+ pending.delete(delivery.id);
1761
+ track(settle());
1762
+ }, delay);
1756
1763
  unref(timer);
1757
1764
  pending.set(delivery.id, timer);
1758
1765
  };
@@ -1848,25 +1855,30 @@ var createWebhookHub = (options) => {
1848
1855
  return delivery;
1849
1856
  },
1850
1857
  async flush() {
1851
- for (const namespace of [...held.keys()])
1852
- releaseHeld(namespace);
1853
- const waiting = [...pending.entries()];
1854
- for (const [id2, timer] of waiting) {
1855
- if (timer === void 0)
1856
- continue;
1857
- cancel(timer);
1858
- pending.delete(id2);
1859
- const delivery = deliveries.get(id2);
1860
- if (!delivery)
1861
- continue;
1862
- track(attempt(delivery).then((ok) => {
1863
- if (ok)
1864
- delivery.state = "delivered";
1865
- else
1866
- schedule(delivery);
1867
- }));
1858
+ for (; ; ) {
1859
+ for (const namespace of [...held.keys()])
1860
+ releaseHeld(namespace);
1861
+ const waiting = [...pending.entries()];
1862
+ for (const [id2, timer] of waiting) {
1863
+ if (timer === void 0)
1864
+ continue;
1865
+ cancel(timer);
1866
+ pending.delete(id2);
1867
+ const delivery = deliveries.get(id2);
1868
+ if (!delivery)
1869
+ continue;
1870
+ track(attempt(delivery).then((ok) => {
1871
+ if (ok)
1872
+ delivery.state = "delivered";
1873
+ else
1874
+ schedule(delivery);
1875
+ }));
1876
+ }
1877
+ await hub.idle();
1878
+ const scheduled = [...pending.values()].some((timer) => timer !== void 0);
1879
+ if (held.size === 0 && !scheduled)
1880
+ return;
1868
1881
  }
1869
- await hub.idle();
1870
1882
  },
1871
1883
  async idle() {
1872
1884
  while (inFlight.size > 0)
@@ -3366,4 +3378,4 @@ export {
3366
3378
  tokenCredential,
3367
3379
  RxVortexAPI
3368
3380
  };
3369
- //# sourceMappingURL=chunk-5KK6W2PE.js.map
3381
+ //# sourceMappingURL=chunk-NSYJUTGY.js.map