@particle-academy/fancy-connector-core 0.8.0 → 0.8.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 +13 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,19 @@ All notable changes to `fancy-connector-core` are documented here, in
|
|
|
6
6
|
**This package is pre-1.0, so breaking changes land in MINOR releases.** The
|
|
7
7
|
version number is not a promise it can keep yet; the entries below are.
|
|
8
8
|
|
|
9
|
+
## [0.8.1] - 2026-09-15
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **`verifyDelivery` dispatches on a NAMED scheme kind and refuses one it does
|
|
14
|
+
not know.** `HmacScheme` gains an optional `kind?: "hmac"`; absent still
|
|
15
|
+
means HMAC, because every scheme written before 0.8.0 is one, and
|
|
16
|
+
`"shared-token"` still goes to the token check — but any other value is now
|
|
17
|
+
refused by name (`declares a verification scheme "jwt" this runtime does not
|
|
18
|
+
know`) rather than verified as HMAC. From Fancy's alignment review of
|
|
19
|
+
0.8.0: `"kind" in scheme` had made refusal-by-default depend on every future
|
|
20
|
+
scheme remembering to declare a kind. Connectors compile unchanged.
|
|
21
|
+
|
|
9
22
|
## [0.8.0] - 2026-09-15
|
|
10
23
|
|
|
11
24
|
The declaration half of the subscription vocabulary (Tynn #15), so a
|
package/dist/index.cjs
CHANGED
|
@@ -1795,6 +1795,13 @@ async function verifyDelivery(trigger, delivery, secret, now) {
|
|
|
1795
1795
|
if (isSharedTokenSpec(spec)) {
|
|
1796
1796
|
return verifySharedToken({ raw: delivery.raw, headers: delivery.headers, secret, scheme: spec.scheme });
|
|
1797
1797
|
}
|
|
1798
|
+
const kind = spec.scheme.kind ?? "hmac";
|
|
1799
|
+
if (kind !== "hmac") {
|
|
1800
|
+
return {
|
|
1801
|
+
ok: false,
|
|
1802
|
+
reason: `${trigger.service}.${trigger.operation} declares a verification scheme "${kind}" this runtime does not know \u2014 refusing rather than guessing.`
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1798
1805
|
const rawHeader = header2(delivery.headers, spec.signatureHeader);
|
|
1799
1806
|
const parsed = spec.parse && rawHeader ? spec.parse(rawHeader) : { signature: rawHeader };
|
|
1800
1807
|
const timestamp = parsed.timestamp ?? (spec.timestampHeader ? header2(delivery.headers, spec.timestampHeader) : void 0);
|