@crvouga/mockingbird-service-daily 1.0.2 → 1.1.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-daily
2
2
 
3
- ## 1.0.2 (2026-09-26)
3
+ ## 1.1.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.0.3 (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.0.2 (2026-09-25)
4
22
 
5
23
  ### Fixes and improvements
6
24
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRuntime
3
- } from "./chunk-4PYYJPLY.js";
3
+ } from "./chunk-VQVXFF5R.js";
4
4
 
5
5
  // ../../adapters/node/dist/cli.js
6
6
  import { readFile } from "node:fs/promises";
@@ -420,4 +420,4 @@ export {
420
420
  createServer2 as createServer,
421
421
  serveTarget
422
422
  };
423
- //# sourceMappingURL=chunk-7ISM4UON.js.map
423
+ //# sourceMappingURL=chunk-5YRX45Z6.js.map
@@ -1572,7 +1572,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
1572
1572
  };
1573
1573
 
1574
1574
  // ../core/dist/version.js
1575
- var PACKAGE_VERSION = true ? "1.0.2" : UNRELEASED_VERSION;
1575
+ var PACKAGE_VERSION = true ? "1.1.0" : UNRELEASED_VERSION;
1576
1576
 
1577
1577
  // ../core/dist/signing.js
1578
1578
  var encoder = new TextEncoder();
@@ -1673,6 +1673,7 @@ var createWebhookHub = (options) => {
1673
1673
  const faults = /* @__PURE__ */ new Map();
1674
1674
  const held = /* @__PURE__ */ new Map();
1675
1675
  const inFlight = /* @__PURE__ */ new Set();
1676
+ let immediate = Promise.resolve();
1676
1677
  const track = (work) => {
1677
1678
  inFlight.add(work);
1678
1679
  void work.finally(() => inFlight.delete(work));
@@ -1735,22 +1736,28 @@ var createWebhookHub = (options) => {
1735
1736
  pending.delete(delivery.id);
1736
1737
  return;
1737
1738
  }
1738
- const run = () => {
1739
- pending.delete(delivery.id);
1740
- track(attempt(delivery).then((ok) => {
1739
+ const settle = async () => {
1740
+ if (!payloads.has(delivery.id))
1741
+ return;
1742
+ await attempt(delivery).then((ok) => {
1741
1743
  if (ok)
1742
1744
  delivery.state = "delivered";
1743
1745
  else
1744
1746
  schedule(delivery);
1745
- }));
1747
+ });
1746
1748
  };
1747
1749
  const delay = delays[index] ?? 0;
1748
1750
  if (delay <= 0) {
1749
- pending.set(delivery.id, void 0);
1750
- run();
1751
+ const task = immediate.then(settle);
1752
+ immediate = task.catch(() => {
1753
+ });
1754
+ track(task);
1751
1755
  return;
1752
1756
  }
1753
- const timer = scheduleTimer(run, delay);
1757
+ const timer = scheduleTimer(() => {
1758
+ pending.delete(delivery.id);
1759
+ track(settle());
1760
+ }, delay);
1754
1761
  unref(timer);
1755
1762
  pending.set(delivery.id, timer);
1756
1763
  };
@@ -1846,25 +1853,30 @@ var createWebhookHub = (options) => {
1846
1853
  return delivery;
1847
1854
  },
1848
1855
  async flush() {
1849
- for (const namespace of [...held.keys()])
1850
- releaseHeld(namespace);
1851
- const waiting = [...pending.entries()];
1852
- for (const [id2, timer] of waiting) {
1853
- if (timer === void 0)
1854
- continue;
1855
- cancel(timer);
1856
- pending.delete(id2);
1857
- const delivery = deliveries.get(id2);
1858
- if (!delivery)
1859
- continue;
1860
- track(attempt(delivery).then((ok) => {
1861
- if (ok)
1862
- delivery.state = "delivered";
1863
- else
1864
- schedule(delivery);
1865
- }));
1856
+ for (; ; ) {
1857
+ for (const namespace of [...held.keys()])
1858
+ releaseHeld(namespace);
1859
+ const waiting = [...pending.entries()];
1860
+ for (const [id2, timer] of waiting) {
1861
+ if (timer === void 0)
1862
+ continue;
1863
+ cancel(timer);
1864
+ pending.delete(id2);
1865
+ const delivery = deliveries.get(id2);
1866
+ if (!delivery)
1867
+ continue;
1868
+ track(attempt(delivery).then((ok) => {
1869
+ if (ok)
1870
+ delivery.state = "delivered";
1871
+ else
1872
+ schedule(delivery);
1873
+ }));
1874
+ }
1875
+ await hub.idle();
1876
+ const scheduled = [...pending.values()].some((timer) => timer !== void 0);
1877
+ if (held.size === 0 && !scheduled)
1878
+ return;
1866
1879
  }
1867
- await hub.idle();
1868
1880
  },
1869
1881
  async idle() {
1870
1882
  while (inFlight.size > 0)
@@ -3409,4 +3421,4 @@ export {
3409
3421
  DailyAPI,
3410
3422
  synthesizeTranscript
3411
3423
  };
3412
- //# sourceMappingURL=chunk-4PYYJPLY.js.map
3424
+ //# sourceMappingURL=chunk-VQVXFF5R.js.map