@fedify/fedify 2.0.28-dev.1979 → 2.0.28-dev.1982
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/dist/{assert_instance_of-C4Ri6VuN.mjs → assert-BhQd8QHP.mjs} +19 -1
- package/dist/{builder-CAAXTNeK.mjs → builder-DG5rS_Zv.mjs} +3 -3
- package/dist/{client-HLLGHiTU.mjs → client-glFHmpn4.mjs} +78 -4
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +3 -4
- package/dist/{context-DJ5oMnte.d.ts → context-B21klrfz.d.ts} +2 -2
- package/dist/{context-zLLwVY_G.d.cts → context-M_MxoQgC.d.cts} +2 -2
- package/dist/{deno-D3gZ1DsB.mjs → deno-eqaJj6JL.mjs} +1 -1
- package/dist/{docloader-DIk3fEXZ.mjs → docloader-BXUqhXNd.mjs} +2 -2
- package/dist/federation/builder.test.mjs +2 -2
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +125 -8
- package/dist/federation/idempotency.test.mjs +4 -4
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/keycache.test.mjs +44 -10
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +66 -10
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +1 -1
- package/dist/federation/negotiation.test.mjs +2 -2
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/router.test.mjs +1 -1
- package/dist/federation/send.test.mjs +5 -6
- package/dist/federation/temporal.test.mjs +2 -2
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{http-BLqv_3ue.cjs → http-BgOlx4n1.cjs} +163 -3
- package/dist/{http-C4D0ajx0.d.ts → http-Bs6thuCC.d.cts} +2 -2
- package/dist/{http-Bn3-am6C.mjs → http-Bu3NxfGb.mjs} +2 -2
- package/dist/{http-RYvZHWMc.d.cts → http-CDupyfOc.d.ts} +2 -2
- package/dist/{http-Cx5dD1D_.js → http-CwcG2wDs.js} +152 -4
- package/dist/{inbox-DC8NbYIj.mjs → inbox-Hou2ZAjv.mjs} +1 -1
- package/dist/{key-BQUnVMwc.mjs → key-bSphUqhB.mjs} +152 -4
- package/dist/{keycache-DaQ3ndaJ.mjs → keycache-D239uGT9.mjs} +12 -4
- package/dist/{kv-cache-CCEitzFw.cjs → kv-cache-B8GaLaNy.cjs} +1 -1
- package/dist/{kv-cache-DI4m-4xy.js → kv-cache-lbswb9pg.js} +1 -1
- package/dist/{ld-CVbwQ8Fz.mjs → ld-D0uFMLmq.mjs} +2 -2
- package/dist/{middleware-C7Afa66S.cjs → middleware-BKpP3cnZ.cjs} +1 -1
- package/dist/{middleware-D3a1JsO1.mjs → middleware-BuVM1K-J.mjs} +27 -19
- package/dist/{middleware-BqkNe0c6.mjs → middleware-DXPBIbm6.mjs} +1 -1
- package/dist/{middleware-Fcpx7tz6.cjs → middleware-D_7wZH27.cjs} +26 -10
- package/dist/{middleware-2Qp34eTb.js → middleware-DomxFoLd.js} +25 -9
- package/dist/{mod-B2zB0rDg.d.cts → mod-Bt0eg_Lv.d.cts} +1 -1
- package/dist/{mod-Du-UVCX_.d.ts → mod-D24V_w-K.d.ts} +1 -1
- package/dist/{mod-BtvLkCgb.d.cts → mod-Dp5dfH-i.d.cts} +1 -1
- package/dist/{mod-CiQNNAQL.d.ts → mod-E7YM72JZ.d.ts} +1 -1
- package/dist/{mod-CB6pc2pw.d.cts → mod-IOWUF5Yr.d.cts} +1 -1
- package/dist/{mod-CD1youdZ.d.ts → mod-XucBiDNd.d.ts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +6 -6
- package/dist/mod.d.ts +6 -6
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/client.test.mjs +28 -1
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/otel/exporter.test.mjs +1 -1
- package/dist/{owner-CnngXDNJ.d.ts → owner-B3hNQCG8.d.cts} +12 -1
- package/dist/owner-Bzg6w7eA.mjs +175 -0
- package/dist/{owner-DEvZuyOE.d.cts → owner-CiBPcC6F.d.ts} +12 -1
- package/dist/{proof-DZWmoF6Z.mjs → proof-CgLA51pO.mjs} +2 -2
- package/dist/{proof-EY-uItWr.js → proof-DsJHFTkx.js} +112 -58
- package/dist/{proof-liMyPvsb.cjs → proof-xCEe8t7U.cjs} +112 -58
- package/dist/{send-IMhmEkun.mjs → send-D89-FDX-.mjs} +2 -2
- package/dist/sig/http.test.mjs +4 -4
- package/dist/sig/key.test.mjs +169 -2
- package/dist/sig/ld.test.mjs +56 -4
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +105 -6
- package/dist/sig/proof.test.mjs +72 -3
- package/dist/{temporal-BovRWwqL.mjs → temporal-DPJlkHh3.mjs} +1 -1
- package/dist/{types-m8u9L86X.cjs → types-DWs-qZaY.cjs} +94 -2
- package/dist/{types-DTONwNqL.js → types-sXITXcWa.js} +78 -4
- package/dist/utils/docloader.test.mjs +28 -4
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +5 -5
- package/dist/assert-ddO5KLpe.mjs +0 -23
- package/dist/owner-D9CjMxWb.mjs +0 -120
- /package/dist/{collection-ChgDTHLz.mjs → collection-DI6YzYpd.mjs} +0 -0
- /package/dist/{keys-CtZLJq76.mjs → keys-CCxRJhWa.mjs} +0 -0
- /package/dist/{kv-cache-DqEKe5E0.mjs → kv-cache-BrjuJue8.mjs} +0 -0
- /package/dist/{kv-BrZHNugx.mjs → kv-mI4Ix2EU.mjs} +0 -0
- /package/dist/{negotiation-BehA2uul.mjs → negotiation-TWEs6Cl8.mjs} +0 -0
- /package/dist/{retry-B_E3V_Dx.mjs → retry-Ddbq3AcK.mjs} +0 -0
- /package/dist/{types-C37hquWI.mjs → types-MNlFfxjv.mjs} +0 -0
|
@@ -34,4 +34,22 @@ import { l as AssertionError } from "./assert_equals-Ew3jOFa3.mjs";
|
|
|
34
34
|
throw new AssertionError(msg);
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
|
-
|
|
37
|
+
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js
|
|
38
|
+
/**
|
|
39
|
+
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
40
|
+
*
|
|
41
|
+
* @example Usage
|
|
42
|
+
* ```ts no-eval
|
|
43
|
+
* import { assert } from "@std/assert/assert";
|
|
44
|
+
*
|
|
45
|
+
* assert("hello".includes("ello")); // Doesn't throw
|
|
46
|
+
* assert("hello".includes("world")); // Throws
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @param expr The expression to test.
|
|
50
|
+
* @param msg The optional message to display if the assertion fails.
|
|
51
|
+
*/ function assert(expr, msg = "") {
|
|
52
|
+
if (!expr) throw new AssertionError(msg);
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { assertInstanceOf as n, assert as t };
|
|
@@ -2,8 +2,8 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError, t as Router } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
6
|
-
import { t as InboxListenerSet } from "./inbox-
|
|
5
|
+
import { n as version, t as name } from "./deno-eqaJj6JL.mjs";
|
|
6
|
+
import { t as InboxListenerSet } from "./inbox-Hou2ZAjv.mjs";
|
|
7
7
|
import { getTypeId } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -42,7 +42,7 @@ var FederationBuilderImpl = class {
|
|
|
42
42
|
this.collectionTypeIds = {};
|
|
43
43
|
}
|
|
44
44
|
async build(options) {
|
|
45
|
-
const { FederationImpl } = await import("./middleware-
|
|
45
|
+
const { FederationImpl } = await import("./middleware-DXPBIbm6.mjs");
|
|
46
46
|
const f = new FederationImpl(options);
|
|
47
47
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
48
48
|
f.router = this.router.clone();
|
|
@@ -1,8 +1,82 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { UrlError, getUserAgent, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
4
|
+
import { FetchError, UrlError, getUserAgent, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
|
6
|
+
//#region src/utils/body.ts
|
|
7
|
+
/** Decoded JSON body limit: 16 MiB. @internal */
|
|
8
|
+
const MAX_BODY_SIZE = 16 * 1024 * 1024;
|
|
9
|
+
/** A body exceeded the byte limit. @internal */
|
|
10
|
+
var BodyTooLargeError = class extends FetchError {
|
|
11
|
+
/** Creates an error for a body exceeding the given limit. */
|
|
12
|
+
constructor(url, maxBytes) {
|
|
13
|
+
super(url, `Body exceeds the limit of ${maxBytes} bytes`);
|
|
14
|
+
this.name = "BodyTooLargeError";
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
/** Validates a finite, positive byte limit. @internal */
|
|
18
|
+
function validateBodySizeLimit(maxBytes) {
|
|
19
|
+
if (!Number.isSafeInteger(maxBytes) || maxBytes <= 0) throw new RangeError("The body size limit must be a positive safe integer.");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Reads UTF-8 text while limiting bytes received from the body stream.
|
|
23
|
+
* Fetch responses are already decompressed, so the stream count is authoritative.
|
|
24
|
+
* @param message The response or request to read.
|
|
25
|
+
* @param maxBytes The maximum number of decoded bytes to read.
|
|
26
|
+
* @param url The URL to include in errors and logs.
|
|
27
|
+
* @returns The decoded body text.
|
|
28
|
+
* @throws {BodyTooLargeError} If the body exceeds the limit.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
async function readBoundedText(message, maxBytes, url) {
|
|
32
|
+
validateBodySizeLimit(maxBytes);
|
|
33
|
+
const reader = message.body?.getReader();
|
|
34
|
+
const tooLarge = () => {
|
|
35
|
+
getLogger([
|
|
36
|
+
"fedify",
|
|
37
|
+
"runtime",
|
|
38
|
+
"body"
|
|
39
|
+
]).warn("Body from {url} exceeds the limit of {maxBytes} bytes.", {
|
|
40
|
+
url: url.toString(),
|
|
41
|
+
maxBytes
|
|
42
|
+
});
|
|
43
|
+
throw new BodyTooLargeError(url, maxBytes);
|
|
44
|
+
};
|
|
45
|
+
try {
|
|
46
|
+
const length = message.headers.get("Content-Length");
|
|
47
|
+
const encoding = message.headers.get("Content-Encoding");
|
|
48
|
+
if ((encoding == null || encoding.toLowerCase() === "identity") && length != null && /^\d+$/.test(length) && Number(length) > maxBytes) tooLarge();
|
|
49
|
+
if (reader == null) return "";
|
|
50
|
+
let size = 0;
|
|
51
|
+
const textReader = new ReadableStream({ async pull(controller) {
|
|
52
|
+
const { done, value } = await reader.read();
|
|
53
|
+
if (done) {
|
|
54
|
+
controller.close();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
size += value.byteLength;
|
|
58
|
+
if (size > maxBytes) tooLarge();
|
|
59
|
+
controller.enqueue(value);
|
|
60
|
+
} }, { highWaterMark: 0 }).pipeThrough(new TextDecoderStream()).getReader();
|
|
61
|
+
try {
|
|
62
|
+
const chunks = [];
|
|
63
|
+
while (true) {
|
|
64
|
+
const { done, value } = await textReader.read();
|
|
65
|
+
if (done) break;
|
|
66
|
+
chunks.push(value);
|
|
67
|
+
}
|
|
68
|
+
return chunks.join("");
|
|
69
|
+
} finally {
|
|
70
|
+
textReader.releaseLock();
|
|
71
|
+
}
|
|
72
|
+
} catch (error) {
|
|
73
|
+
if (reader != null) reader.cancel(error).catch(() => {});
|
|
74
|
+
throw error;
|
|
75
|
+
} finally {
|
|
76
|
+
reader?.releaseLock();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
6
80
|
//#region src/nodeinfo/client.ts
|
|
7
81
|
const logger = getLogger([
|
|
8
82
|
"fedify",
|
|
@@ -83,7 +157,7 @@ async function getNodeInfo(url, options = {}) {
|
|
|
83
157
|
});
|
|
84
158
|
return;
|
|
85
159
|
}
|
|
86
|
-
const wellKnownRd = await wellKnownResponse
|
|
160
|
+
const wellKnownRd = JSON.parse(await readBoundedText(wellKnownResponse, MAX_BODY_SIZE, wellKnownUrl));
|
|
87
161
|
const link = wellKnownRd?.links?.find((link) => link != null && "rel" in link && (link.rel === "http://nodeinfo.diaspora.software/ns/schema/2.0" || link.rel === "http://nodeinfo.diaspora.software/ns/schema/2.1") && "href" in link && link.href != null);
|
|
88
162
|
if (link == null || link.href == null) {
|
|
89
163
|
logger.error("Failed to find a NodeInfo document link from {url}: {resourceDescriptor}", {
|
|
@@ -107,7 +181,7 @@ async function getNodeInfo(url, options = {}) {
|
|
|
107
181
|
});
|
|
108
182
|
return;
|
|
109
183
|
}
|
|
110
|
-
const data = await response
|
|
184
|
+
const data = JSON.parse(await readBoundedText(response, MAX_BODY_SIZE, nodeInfoUrl));
|
|
111
185
|
if (options.parse === "none") return data;
|
|
112
186
|
return parseNodeInfo(data, { tryBestEffort: options.parse === "best-effort" }) ?? void 0;
|
|
113
187
|
} catch (error) {
|
|
@@ -311,4 +385,4 @@ function parseUsage(data, options = {}) {
|
|
|
311
385
|
};
|
|
312
386
|
}
|
|
313
387
|
//#endregion
|
|
314
|
-
export { parseProtocol as a, parseUsage as c, parseOutboundService as i, parseInboundService as n, parseServices as o, parseNodeInfo as r, parseSoftware as s, getNodeInfo as t };
|
|
388
|
+
export { parseProtocol as a, parseUsage as c, readBoundedText as d, parseOutboundService as i, BodyTooLargeError as l, parseInboundService as n, parseServices as o, parseNodeInfo as r, parseSoftware as s, getNodeInfo as t, MAX_BODY_SIZE as u };
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { bt as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { bt as ActivityTransformer, n as Context } from "../context-M_MxoQgC.cjs";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
package/dist/compat/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { bt as ActivityTransformer, n as Context } from "../context-
|
|
2
|
+
import { bt as ActivityTransformer, n as Context } from "../context-B21klrfz.js";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
|
@@ -2,10 +2,9 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-D3a1JsO1.mjs";
|
|
5
|
+
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
7
|
+
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-BuVM1K-J.mjs";
|
|
9
8
|
import { test } from "@fedify/fixture";
|
|
10
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
11
10
|
//#region src/compat/transformers.test.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-CSddvgWN.js";
|
|
3
|
-
import { t as HttpMessageSignaturesSpec } from "./http-
|
|
4
|
-
import { n as GetKeyOwnerOptions } from "./owner-
|
|
3
|
+
import { t as HttpMessageSignaturesSpec } from "./http-CDupyfOc.js";
|
|
4
|
+
import { n as GetKeyOwnerOptions } from "./owner-CiBPcC6F.js";
|
|
5
5
|
import { n as KvStore, t as KvKey } from "./kv-D6hNiMTK.js";
|
|
6
6
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
|
|
7
7
|
import { Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-CAM_bQXx.cjs";
|
|
3
|
-
import { t as HttpMessageSignaturesSpec } from "./http-
|
|
4
|
-
import { n as GetKeyOwnerOptions } from "./owner-
|
|
3
|
+
import { t as HttpMessageSignaturesSpec } from "./http-Bs6thuCC.cjs";
|
|
4
|
+
import { n as GetKeyOwnerOptions } from "./owner-B3hNQCG8.cjs";
|
|
5
5
|
import { n as KvStore, t as KvKey } from "./kv-gJ8LYbxX.cjs";
|
|
6
6
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
|
|
7
7
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import {
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { o as validateCryptoKey } from "./key-bSphUqhB.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-Bu3NxfGb.mjs";
|
|
6
6
|
import { curry } from "es-toolkit";
|
|
7
7
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { a as assertExists } from "../std__assert-Duiq_YC9.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { n as createFederationBuilder } from "../builder-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
8
|
+
import { n as createFederationBuilder } from "../builder-DG5rS_Zv.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/federation/builder.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-Duiq_YC9.mjs";
|
|
6
|
-
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-
|
|
6
|
+
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-DI6YzYpd.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { decodeHex } from "byte-encodings/hex";
|
|
9
9
|
//#region src/federation/collection.test.ts
|
|
@@ -5,15 +5,17 @@ import { n as createRequestContext, t as createInboxContext } from "../context-J
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-Duiq_YC9.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
|
-
import { t as assert } from "../assert-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
8
|
+
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
9
|
+
import { i as generateCryptoKeyPair } from "../key-bSphUqhB.mjs";
|
|
10
|
+
import { s as signRequest } from "../http-Bu3NxfGb.mjs";
|
|
11
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-CCxRJhWa.mjs";
|
|
12
|
+
import { a as compactJsonLd, f as signJsonLd } from "../ld-D0uFMLmq.mjs";
|
|
13
|
+
import { n as signObject } from "../proof-CgLA51pO.mjs";
|
|
14
|
+
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
15
|
+
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-BuVM1K-J.mjs";
|
|
16
|
+
import { t as InboxListenerSet } from "../inbox-Hou2ZAjv.mjs";
|
|
15
17
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
|
-
import { Create, Note, Person } from "@fedify/vocab";
|
|
18
|
+
import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
|
|
17
19
|
//#region src/federation/handler.test.ts
|
|
18
20
|
test("handleActor()", async () => {
|
|
19
21
|
let context = createRequestContext({
|
|
@@ -2856,5 +2858,120 @@ test("handleInbox() records OpenTelemetry span events", async () => {
|
|
|
2856
2858
|
assertEquals(recordedActivity.id, "https://example.com/activity");
|
|
2857
2859
|
assertEquals(recordedActivity.type, "Create");
|
|
2858
2860
|
});
|
|
2861
|
+
test("handleInbox() rejects forged key ownership", async () => {
|
|
2862
|
+
const impersonated = "https://example.com/person2";
|
|
2863
|
+
const attackerKeyId = new URL("https://attacker.example/key");
|
|
2864
|
+
const attackerMultikeyId = new URL("https://attacker.example/multikey");
|
|
2865
|
+
const { privateKey, publicKey } = await generateCryptoKeyPair("RSASSA-PKCS1-v1_5");
|
|
2866
|
+
const forgedKeyDocument = await new CryptographicKey({
|
|
2867
|
+
id: attackerKeyId,
|
|
2868
|
+
owner: new URL(impersonated),
|
|
2869
|
+
publicKey
|
|
2870
|
+
}).toJsonLd({ contextLoader: mockDocumentLoader });
|
|
2871
|
+
const ed25519 = await generateCryptoKeyPair("Ed25519");
|
|
2872
|
+
const forgedMultikeyDocument = await new Multikey({
|
|
2873
|
+
id: attackerMultikeyId,
|
|
2874
|
+
controller: new URL(impersonated),
|
|
2875
|
+
publicKey: ed25519.publicKey
|
|
2876
|
+
}).toJsonLd({ contextLoader: mockDocumentLoader });
|
|
2877
|
+
const documentLoader = (resource) => {
|
|
2878
|
+
if (resource === attackerKeyId.href) return Promise.resolve({
|
|
2879
|
+
contextUrl: null,
|
|
2880
|
+
documentUrl: resource,
|
|
2881
|
+
document: forgedKeyDocument
|
|
2882
|
+
});
|
|
2883
|
+
if (resource === attackerMultikeyId.href) return Promise.resolve({
|
|
2884
|
+
contextUrl: null,
|
|
2885
|
+
documentUrl: resource,
|
|
2886
|
+
document: forgedMultikeyDocument
|
|
2887
|
+
});
|
|
2888
|
+
return mockDocumentLoader(resource);
|
|
2889
|
+
};
|
|
2890
|
+
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
2891
|
+
const inboxOptions = {
|
|
2892
|
+
kv: new MemoryKvStore(),
|
|
2893
|
+
kvPrefixes: {
|
|
2894
|
+
activityIdempotence: ["_fedify", "activityIdempotence"],
|
|
2895
|
+
publicKey: ["_fedify", "publicKey"]
|
|
2896
|
+
},
|
|
2897
|
+
actorDispatcher: ((_ctx, identifier) => identifier === "someone" ? new Person({ name: "Someone" }) : null),
|
|
2898
|
+
inboxListeners: new InboxListenerSet(),
|
|
2899
|
+
onNotFound: () => new Response("Not found", { status: 404 }),
|
|
2900
|
+
signatureTimeWindow: { minutes: 5 },
|
|
2901
|
+
skipSignatureVerification: false
|
|
2902
|
+
};
|
|
2903
|
+
const handle = async (request) => {
|
|
2904
|
+
const context = createRequestContext({
|
|
2905
|
+
federation,
|
|
2906
|
+
request,
|
|
2907
|
+
url: new URL(request.url),
|
|
2908
|
+
data: void 0,
|
|
2909
|
+
documentLoader,
|
|
2910
|
+
contextLoader: mockDocumentLoader
|
|
2911
|
+
});
|
|
2912
|
+
return await handleInbox(request, {
|
|
2913
|
+
recipient: null,
|
|
2914
|
+
context,
|
|
2915
|
+
inboxContextFactory(_activity) {
|
|
2916
|
+
return createInboxContext({
|
|
2917
|
+
...context,
|
|
2918
|
+
clone: void 0
|
|
2919
|
+
});
|
|
2920
|
+
},
|
|
2921
|
+
...inboxOptions
|
|
2922
|
+
});
|
|
2923
|
+
};
|
|
2924
|
+
const activity = {
|
|
2925
|
+
"@context": [
|
|
2926
|
+
"https://www.w3.org/ns/activitystreams",
|
|
2927
|
+
"https://w3id.org/identity/v1",
|
|
2928
|
+
"https://w3id.org/security/v1",
|
|
2929
|
+
"https://w3id.org/security/data-integrity/v1"
|
|
2930
|
+
],
|
|
2931
|
+
id: "https://attacker.example/activities/1",
|
|
2932
|
+
type: "Create",
|
|
2933
|
+
actor: impersonated,
|
|
2934
|
+
object: {
|
|
2935
|
+
id: "https://attacker.example/notes/1",
|
|
2936
|
+
type: "Note",
|
|
2937
|
+
attributedTo: impersonated,
|
|
2938
|
+
content: "Hello World!"
|
|
2939
|
+
}
|
|
2940
|
+
};
|
|
2941
|
+
const httpSignedResponse = await handle(await signRequest(new Request("https://example.com/", {
|
|
2942
|
+
method: "POST",
|
|
2943
|
+
body: JSON.stringify(activity)
|
|
2944
|
+
}), privateKey, attackerKeyId));
|
|
2945
|
+
const ldSignedResponse = await handle(new Request("https://example.com/", {
|
|
2946
|
+
method: "POST",
|
|
2947
|
+
body: JSON.stringify(await signJsonLd(activity, privateKey, attackerKeyId, { contextLoader: mockDocumentLoader }))
|
|
2948
|
+
}));
|
|
2949
|
+
const signedObject = await signObject(await Create.fromJsonLd(activity, {
|
|
2950
|
+
documentLoader,
|
|
2951
|
+
contextLoader: mockDocumentLoader
|
|
2952
|
+
}), ed25519.privateKey, attackerMultikeyId, {
|
|
2953
|
+
documentLoader,
|
|
2954
|
+
contextLoader: mockDocumentLoader,
|
|
2955
|
+
context: ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"]
|
|
2956
|
+
});
|
|
2957
|
+
const proofSignedResponse = await handle(new Request("https://example.com/", {
|
|
2958
|
+
method: "POST",
|
|
2959
|
+
body: JSON.stringify(await signedObject.toJsonLd({
|
|
2960
|
+
format: "compact",
|
|
2961
|
+
contextLoader: mockDocumentLoader,
|
|
2962
|
+
context: ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"]
|
|
2963
|
+
}))
|
|
2964
|
+
}));
|
|
2965
|
+
assertEquals([
|
|
2966
|
+
httpSignedResponse.status,
|
|
2967
|
+
ldSignedResponse.status,
|
|
2968
|
+
proofSignedResponse.status
|
|
2969
|
+
], [
|
|
2970
|
+
401,
|
|
2971
|
+
401,
|
|
2972
|
+
401
|
|
2973
|
+
]);
|
|
2974
|
+
assertEquals(await httpSignedResponse.text(), "Failed to verify the request signature.");
|
|
2975
|
+
});
|
|
2859
2976
|
//#endregion
|
|
2860
2977
|
export {};
|
|
@@ -3,10 +3,10 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-Duiq_YC9.mjs";
|
|
6
|
-
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-
|
|
7
|
-
import { n as signObject } from "../proof-
|
|
8
|
-
import { t as MemoryKvStore } from "../kv-
|
|
9
|
-
import { a as createFederation } from "../middleware-
|
|
6
|
+
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
|
|
7
|
+
import { n as signObject } from "../proof-CgLA51pO.mjs";
|
|
8
|
+
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
9
|
+
import { a as createFederation } from "../middleware-BuVM1K-J.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, Follow, Person } from "@fedify/vocab";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
6
|
-
import { t as InboxListenerSet } from "../inbox-
|
|
6
|
+
import { t as InboxListenerSet } from "../inbox-Hou2ZAjv.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
|
|
9
9
|
//#region src/federation/inbox.test.ts
|
|
@@ -2,10 +2,9 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as KvKeyCache } from "../keycache-DaQ3ndaJ.mjs";
|
|
5
|
+
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
7
|
+
import { t as KvKeyCache } from "../keycache-D239uGT9.mjs";
|
|
9
8
|
import { test } from "@fedify/fixture";
|
|
10
9
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
11
10
|
//#region src/federation/keycache.test.ts
|
|
@@ -13,25 +12,41 @@ test("KvKeyCache.set()", async () => {
|
|
|
13
12
|
const kv = new MemoryKvStore();
|
|
14
13
|
const cache = new KvKeyCache(kv, ["pk"]);
|
|
15
14
|
await cache.set(new URL("https://example.com/key"), new CryptographicKey({ id: new URL("https://example.com/key") }));
|
|
16
|
-
assertEquals(await kv.get([
|
|
15
|
+
assertEquals(await kv.get([
|
|
16
|
+
"pk",
|
|
17
|
+
"2",
|
|
18
|
+
"https://example.com/key"
|
|
19
|
+
]), {
|
|
17
20
|
"@context": "https://w3id.org/security/v1",
|
|
18
21
|
id: "https://example.com/key",
|
|
19
22
|
type: "CryptographicKey"
|
|
20
23
|
});
|
|
21
24
|
await cache.set(new URL("https://example.com/key2"), new Multikey({ id: new URL("https://example.com/key2") }));
|
|
22
|
-
assertEquals(await kv.get([
|
|
25
|
+
assertEquals(await kv.get([
|
|
26
|
+
"pk",
|
|
27
|
+
"2",
|
|
28
|
+
"https://example.com/key2"
|
|
29
|
+
]), {
|
|
23
30
|
"@context": "https://w3id.org/security/multikey/v1",
|
|
24
31
|
id: "https://example.com/key2",
|
|
25
32
|
type: "Multikey"
|
|
26
33
|
});
|
|
27
34
|
await cache.set(new URL("https://example.com/null"), null);
|
|
28
35
|
assert(cache.nullKeys.has("https://example.com/null"));
|
|
29
|
-
assertEquals(await kv.get([
|
|
36
|
+
assertEquals(await kv.get([
|
|
37
|
+
"pk",
|
|
38
|
+
"2",
|
|
39
|
+
"https://example.com/null"
|
|
40
|
+
]), { _fedify: "key-unavailable" });
|
|
30
41
|
});
|
|
31
42
|
test("KvKeyCache.get()", async () => {
|
|
32
43
|
const kv = new MemoryKvStore();
|
|
33
44
|
const cache = new KvKeyCache(kv, ["pk"]);
|
|
34
|
-
await kv.set([
|
|
45
|
+
await kv.set([
|
|
46
|
+
"pk",
|
|
47
|
+
"2",
|
|
48
|
+
"https://example.com/key"
|
|
49
|
+
], {
|
|
35
50
|
"@context": "https://w3id.org/security/v1",
|
|
36
51
|
id: "https://example.com/key",
|
|
37
52
|
type: "CryptographicKey"
|
|
@@ -39,7 +54,11 @@ test("KvKeyCache.get()", async () => {
|
|
|
39
54
|
const cryptoKey = await cache.get(new URL("https://example.com/key"));
|
|
40
55
|
assertInstanceOf(cryptoKey, CryptographicKey);
|
|
41
56
|
assertEquals(cryptoKey?.id?.href, "https://example.com/key");
|
|
42
|
-
await kv.set([
|
|
57
|
+
await kv.set([
|
|
58
|
+
"pk",
|
|
59
|
+
"2",
|
|
60
|
+
"https://example.com/key2"
|
|
61
|
+
], {
|
|
43
62
|
"@context": "https://w3id.org/security/multikey/v1",
|
|
44
63
|
id: "https://example.com/key2",
|
|
45
64
|
type: "Multikey"
|
|
@@ -49,8 +68,23 @@ test("KvKeyCache.get()", async () => {
|
|
|
49
68
|
assertEquals(multikey?.id?.href, "https://example.com/key2");
|
|
50
69
|
cache.nullKeys.add("https://example.com/null");
|
|
51
70
|
assertEquals(await cache.get(new URL("https://example.com/null")), null);
|
|
52
|
-
await kv.set([
|
|
71
|
+
await kv.set([
|
|
72
|
+
"pk",
|
|
73
|
+
"2",
|
|
74
|
+
"https://example.com/null2"
|
|
75
|
+
], { _fedify: "key-unavailable" });
|
|
53
76
|
assertEquals(await new KvKeyCache(kv, ["pk"]).get(new URL("https://example.com/null2")), null);
|
|
54
77
|
});
|
|
78
|
+
test("KvKeyCache.get() ignores entries from an earlier generation", async () => {
|
|
79
|
+
const kv = new MemoryKvStore();
|
|
80
|
+
const cache = new KvKeyCache(kv, ["pk"]);
|
|
81
|
+
await kv.set(["pk", "https://example.com/key"], {
|
|
82
|
+
"@context": "https://w3id.org/security/v1",
|
|
83
|
+
id: "https://example.com/key",
|
|
84
|
+
owner: "https://example.com/impersonated",
|
|
85
|
+
type: "CryptographicKey"
|
|
86
|
+
});
|
|
87
|
+
assertEquals(await cache.get(new URL("https://example.com/key")), void 0);
|
|
88
|
+
});
|
|
55
89
|
//#endregion
|
|
56
90
|
export {};
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-Duiq_YC9.mjs";
|
|
6
|
-
import { t as MemoryKvStore } from "../kv-
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/federation/kv.test.ts
|
|
9
9
|
test("MemoryKvStore", async (t) => {
|
|
@@ -6,18 +6,17 @@ import { n as RouterError } from "../router-CrMLXoOr.mjs";
|
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { n as assertStrictEquals } from "../std__assert-Duiq_YC9.mjs";
|
|
8
8
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
10
10
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
11
11
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { t as
|
|
20
|
-
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-D3a1JsO1.mjs";
|
|
12
|
+
import { l as verifyRequest, s as signRequest } from "../http-Bu3NxfGb.mjs";
|
|
13
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
|
|
14
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-BXUqhXNd.mjs";
|
|
15
|
+
import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-D0uFMLmq.mjs";
|
|
16
|
+
import { t as doesActorOwnKey } from "../owner-Bzg6w7eA.mjs";
|
|
17
|
+
import { n as signObject, r as verifyObject } from "../proof-CgLA51pO.mjs";
|
|
18
|
+
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
19
|
+
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-BuVM1K-J.mjs";
|
|
21
20
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
22
21
|
import * as vocab from "@fedify/vocab";
|
|
23
22
|
import { Create, Offer, Person, getTypeId, lookupObject } from "@fedify/vocab";
|
|
@@ -3699,5 +3698,62 @@ test("ContextImpl.sendActivity() honors the private-address policy", async (t) =
|
|
|
3699
3698
|
}
|
|
3700
3699
|
});
|
|
3701
3700
|
});
|
|
3701
|
+
test("Federation.fetch() bounds inbox bodies before dispatch", async () => {
|
|
3702
|
+
let dispatched = false;
|
|
3703
|
+
const json = JSON.stringify({
|
|
3704
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
3705
|
+
id: "https://example.com/activities/bounded",
|
|
3706
|
+
type: "Create",
|
|
3707
|
+
actor: "https://example.com/actor"
|
|
3708
|
+
});
|
|
3709
|
+
const size = 16 * 1024 * 1024;
|
|
3710
|
+
const federation = createFederation({
|
|
3711
|
+
kv: new MemoryKvStore(),
|
|
3712
|
+
skipSignatureVerification: true,
|
|
3713
|
+
contextLoaderFactory: () => mockDocumentLoader
|
|
3714
|
+
});
|
|
3715
|
+
federation.setActorDispatcher("/actors/{identifier}", () => new Person({ id: new URL("https://example.com/actor") }));
|
|
3716
|
+
federation.setInboxListeners("/actors/{identifier}/inbox", "/inbox").on(Create, () => {
|
|
3717
|
+
dispatched = true;
|
|
3718
|
+
});
|
|
3719
|
+
for (const contentLength of [
|
|
3720
|
+
void 0,
|
|
3721
|
+
"1",
|
|
3722
|
+
String(size + 1)
|
|
3723
|
+
]) {
|
|
3724
|
+
assertEquals((await federation.fetch(new Request("https://example.com/inbox", {
|
|
3725
|
+
method: "POST",
|
|
3726
|
+
headers: contentLength == null ? {} : { "Content-Length": contentLength },
|
|
3727
|
+
body: json.padEnd(size + 1)
|
|
3728
|
+
}), { contextData: void 0 })).status, 413);
|
|
3729
|
+
assertFalse(dispatched);
|
|
3730
|
+
}
|
|
3731
|
+
let canceled = false;
|
|
3732
|
+
let pulls = 0;
|
|
3733
|
+
const body = new ReadableStream({
|
|
3734
|
+
pull(controller) {
|
|
3735
|
+
pulls++;
|
|
3736
|
+
controller.enqueue(new Uint8Array(64 * 1024));
|
|
3737
|
+
},
|
|
3738
|
+
cancel() {
|
|
3739
|
+
canceled = true;
|
|
3740
|
+
}
|
|
3741
|
+
}, { highWaterMark: 0 });
|
|
3742
|
+
const request = new Request("https://example.com/inbox", {
|
|
3743
|
+
method: "POST",
|
|
3744
|
+
body,
|
|
3745
|
+
duplex: "half"
|
|
3746
|
+
});
|
|
3747
|
+
assertEquals((await federation.fetch(request, { contextData: void 0 })).status, 413);
|
|
3748
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
3749
|
+
assert(canceled);
|
|
3750
|
+
assert(pulls <= 260);
|
|
3751
|
+
assertFalse(dispatched);
|
|
3752
|
+
assertEquals((await federation.fetch(new Request("https://example.com/inbox", {
|
|
3753
|
+
method: "POST",
|
|
3754
|
+
body: json
|
|
3755
|
+
}), { contextData: void 0 })).status, 202);
|
|
3756
|
+
assert(dispatched);
|
|
3757
|
+
});
|
|
3702
3758
|
//#endregion
|
|
3703
3759
|
export {};
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -2,7 +2,7 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
require("../chunk-DDcVe30Y.cjs");
|
|
5
|
-
const require_middleware = require("../middleware-
|
|
5
|
+
const require_middleware = require("../middleware-D_7wZH27.cjs");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
//#region src/federation/kv.ts
|
|
8
8
|
/**
|