@crvouga/mockingbird-service-firstpromoter 1.0.2 → 1.1.1
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 +19 -1
- package/dist/{chunk-B7YWDW5W.js → chunk-JRVTG2BN.js} +39 -27
- package/dist/{chunk-B7YWDW5W.js.map → chunk-JRVTG2BN.js.map} +2 -2
- package/dist/{chunk-U767RJZB.js → chunk-XSSCP4UE.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-U767RJZB.js.map → chunk-XSSCP4UE.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-firstpromoter
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.1.1 (2026-09-29)
|
|
4
|
+
|
|
5
|
+
### Fixes and improvements
|
|
6
|
+
|
|
7
|
+
- sign and retry webhooks on the injected clock ([1091bde](https://github.com/crvouga/mockingbird/commit/1091bde0df69d9cc3eba2062d8523755e6caca14))
|
|
8
|
+
|
|
9
|
+
## 1.1.0 (2026-09-29)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- let a scalar naming a later branch's enum value pick that branch ([30ade3a](https://github.com/crvouga/mockingbird/commit/30ade3a28a5b6b273ffbf261216b821acac8e961))
|
|
14
|
+
|
|
15
|
+
### Fixes and improvements
|
|
16
|
+
|
|
17
|
+
- stop cleared webhook deliveries from rescheduling forever ([424b78f](https://github.com/crvouga/mockingbird/commit/424b78f29317b162e3bf7d0049cc19be5b977026))
|
|
18
|
+
- serialize immediate webhook attempts to fix reorder flake ([625c82b](https://github.com/crvouga/mockingbird/commit/625c82b5a8a7992c1cf93e9df68e77af08b353e3))
|
|
19
|
+
- flush drains webhook retries scheduled while it runs ([c58cede](https://github.com/crvouga/mockingbird/commit/c58cede1b6ba7ae5ed3f8721ad9b7cd7bc0b1ca7))
|
|
20
|
+
|
|
21
|
+
## 1.0.2 (2026-09-25)
|
|
4
22
|
|
|
5
23
|
### Fixes and improvements
|
|
6
24
|
|
|
@@ -1553,7 +1553,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
|
|
|
1553
1553
|
};
|
|
1554
1554
|
|
|
1555
1555
|
// ../core/dist/version.js
|
|
1556
|
-
var PACKAGE_VERSION = true ? "1.
|
|
1556
|
+
var PACKAGE_VERSION = true ? "1.1.1" : UNRELEASED_VERSION;
|
|
1557
1557
|
|
|
1558
1558
|
// ../core/dist/signing.js
|
|
1559
1559
|
var encoder = new TextEncoder();
|
|
@@ -1646,6 +1646,7 @@ var createWebhookHub = (options) => {
|
|
|
1646
1646
|
const faults = /* @__PURE__ */ new Map();
|
|
1647
1647
|
const held = /* @__PURE__ */ new Map();
|
|
1648
1648
|
const inFlight = /* @__PURE__ */ new Set();
|
|
1649
|
+
let immediate = Promise.resolve();
|
|
1649
1650
|
const track = (work) => {
|
|
1650
1651
|
inFlight.add(work);
|
|
1651
1652
|
void work.finally(() => inFlight.delete(work));
|
|
@@ -1708,22 +1709,28 @@ var createWebhookHub = (options) => {
|
|
|
1708
1709
|
pending.delete(delivery.id);
|
|
1709
1710
|
return;
|
|
1710
1711
|
}
|
|
1711
|
-
const
|
|
1712
|
-
|
|
1713
|
-
|
|
1712
|
+
const settle = async () => {
|
|
1713
|
+
if (!payloads.has(delivery.id))
|
|
1714
|
+
return;
|
|
1715
|
+
await attempt(delivery).then((ok) => {
|
|
1714
1716
|
if (ok)
|
|
1715
1717
|
delivery.state = "delivered";
|
|
1716
1718
|
else
|
|
1717
1719
|
schedule(delivery);
|
|
1718
|
-
})
|
|
1720
|
+
});
|
|
1719
1721
|
};
|
|
1720
1722
|
const delay = delays[index] ?? 0;
|
|
1721
1723
|
if (delay <= 0) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
+
const task = immediate.then(settle);
|
|
1725
|
+
immediate = task.catch(() => {
|
|
1726
|
+
});
|
|
1727
|
+
track(task);
|
|
1724
1728
|
return;
|
|
1725
1729
|
}
|
|
1726
|
-
const timer = scheduleTimer(
|
|
1730
|
+
const timer = scheduleTimer(() => {
|
|
1731
|
+
pending.delete(delivery.id);
|
|
1732
|
+
track(settle());
|
|
1733
|
+
}, delay);
|
|
1727
1734
|
unref(timer);
|
|
1728
1735
|
pending.set(delivery.id, timer);
|
|
1729
1736
|
};
|
|
@@ -1819,25 +1826,30 @@ var createWebhookHub = (options) => {
|
|
|
1819
1826
|
return delivery;
|
|
1820
1827
|
},
|
|
1821
1828
|
async flush() {
|
|
1822
|
-
for (
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1829
|
+
for (; ; ) {
|
|
1830
|
+
for (const namespace of [...held.keys()])
|
|
1831
|
+
releaseHeld(namespace);
|
|
1832
|
+
const waiting = [...pending.entries()];
|
|
1833
|
+
for (const [id2, timer] of waiting) {
|
|
1834
|
+
if (timer === void 0)
|
|
1835
|
+
continue;
|
|
1836
|
+
cancel(timer);
|
|
1837
|
+
pending.delete(id2);
|
|
1838
|
+
const delivery = deliveries.get(id2);
|
|
1839
|
+
if (!delivery)
|
|
1840
|
+
continue;
|
|
1841
|
+
track(attempt(delivery).then((ok) => {
|
|
1842
|
+
if (ok)
|
|
1843
|
+
delivery.state = "delivered";
|
|
1844
|
+
else
|
|
1845
|
+
schedule(delivery);
|
|
1846
|
+
}));
|
|
1847
|
+
}
|
|
1848
|
+
await hub.idle();
|
|
1849
|
+
const scheduled = [...pending.values()].some((timer) => timer !== void 0);
|
|
1850
|
+
if (held.size === 0 && !scheduled)
|
|
1851
|
+
return;
|
|
1839
1852
|
}
|
|
1840
|
-
await hub.idle();
|
|
1841
1853
|
},
|
|
1842
1854
|
async idle() {
|
|
1843
1855
|
while (inFlight.size > 0)
|
|
@@ -3326,4 +3338,4 @@ export {
|
|
|
3326
3338
|
FIRSTPROMOTER_NAMESPACE,
|
|
3327
3339
|
FirstPromoterAPI
|
|
3328
3340
|
};
|
|
3329
|
-
//# sourceMappingURL=chunk-
|
|
3341
|
+
//# sourceMappingURL=chunk-JRVTG2BN.js.map
|