@fedify/fedify 2.3.9-dev.2048 → 2.3.10

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.
Files changed (85) hide show
  1. package/dist/{builder-BfY2wZ4V.mjs → builder-Bal9bfuM.mjs} +10 -2
  2. package/dist/{client-DYDoDpMa.mjs → client-Ccbsek6u.mjs} +7 -3
  3. package/dist/compat/mod.d.cts +1 -1
  4. package/dist/compat/mod.d.ts +1 -1
  5. package/dist/compat/transformers.test.mjs +1 -1
  6. package/dist/{context-CAKnQy1x.d.ts → context-BWbdE_MZ.d.ts} +1 -1
  7. package/dist/{context-BepjCFHN.mjs → context-CxbCIptr.mjs} +2 -1
  8. package/dist/{context-CSIggG9_.d.cts → context-MOrCC7yl.d.cts} +1 -1
  9. package/dist/{deno-ayal9buz.mjs → deno-DUgFsCmM.mjs} +1 -1
  10. package/dist/docloader-w72ipM49.mjs +79 -0
  11. package/dist/federation/builder.test.mjs +38 -2
  12. package/dist/federation/circuit-breaker.test.mjs +1 -1
  13. package/dist/federation/collection.test.mjs +1 -1
  14. package/dist/federation/handler.test.mjs +7 -7
  15. package/dist/federation/idempotency.test.mjs +3 -3
  16. package/dist/federation/kv.test.mjs +1 -1
  17. package/dist/federation/metrics.test.mjs +2 -2
  18. package/dist/federation/middleware.test.mjs +302 -8
  19. package/dist/federation/mod.cjs +1 -1
  20. package/dist/federation/mod.d.cts +3 -3
  21. package/dist/federation/mod.d.ts +3 -3
  22. package/dist/federation/mod.js +1 -1
  23. package/dist/federation/mq.test.mjs +98 -43
  24. package/dist/federation/negotiation.test.mjs +1 -1
  25. package/dist/federation/router.test.mjs +1 -1
  26. package/dist/federation/send.test.mjs +85 -4
  27. package/dist/federation/temporal.test.mjs +2 -2
  28. package/dist/federation/webfinger.test.mjs +3 -3
  29. package/dist/{http-B2u6PvNX.mjs → http-BNDHRNJP.mjs} +8 -4
  30. package/dist/{http-BPPCh0xN.js → http-BY8PpQzP.js} +6 -2
  31. package/dist/{http-BGP2QCbe.cjs → http-CTYio50W.cjs} +6 -2
  32. package/dist/{key-C9DkrWwb.mjs → key-BbuFo4CW.mjs} +2 -2
  33. package/dist/{kv-D6hNiMTK.d.ts → kv-CZKl1IUS.d.cts} +3 -2
  34. package/dist/{kv-gJ8LYbxX.d.cts → kv-CxaI4eGo.d.ts} +3 -2
  35. package/dist/{kv-cache-qJSjfLGm.mjs → kv-cache-CNZOaZYq.mjs} +1 -1
  36. package/dist/{kv-cache-C1TC_e9y.cjs → kv-cache-CrcqGkT-.cjs} +34 -8
  37. package/dist/{kv-cache-Cl1q1aA9.js → kv-cache-DNnjnc9t.js} +35 -9
  38. package/dist/{ld-DNl7KwLY.mjs → ld-BYV2Luge.mjs} +4 -4
  39. package/dist/{metrics-Ce55disp.mjs → metrics-QrVsKSG9.mjs} +1 -1
  40. package/dist/{middleware-C96wm_7x.mjs → middleware-54KSGAQA.mjs} +1 -1
  41. package/dist/{middleware-C_utyVa_.js → middleware-B4FNnN3W.js} +36 -11
  42. package/dist/{middleware-BCG2BX1n.mjs → middleware-Bj9s3J_0.mjs} +22 -19
  43. package/dist/{middleware-BZojifnF.cjs → middleware-Dv-L7Plm.cjs} +36 -11
  44. package/dist/{mod-PVR75MeU.d.cts → mod-B6PwkUMU.d.cts} +1 -1
  45. package/dist/{mod-DHgc4ygG.d.ts → mod-Br8yJNcE.d.ts} +3 -1
  46. package/dist/{mod-1TuoXkGs.d.cts → mod-Co1M3Ux0.d.cts} +3 -1
  47. package/dist/{mod-CFuyfw3c.d.ts → mod-LmD03uRA.d.ts} +1 -1
  48. package/dist/mod.cjs +5 -5
  49. package/dist/mod.d.cts +4 -4
  50. package/dist/mod.d.ts +4 -4
  51. package/dist/mod.js +5 -5
  52. package/dist/nodeinfo/client.test.mjs +50 -2
  53. package/dist/nodeinfo/handler.test.mjs +3 -3
  54. package/dist/nodeinfo/mod.cjs +1 -1
  55. package/dist/nodeinfo/mod.js +1 -1
  56. package/dist/nodeinfo/types.test.mjs +1 -1
  57. package/dist/otel/exporter.test.mjs +1 -1
  58. package/dist/otel/mod.d.cts +1 -1
  59. package/dist/otel/mod.d.ts +1 -1
  60. package/dist/{owner-DqqDBw-l.mjs → owner-BsBzJADO.mjs} +2 -2
  61. package/dist/{proof-Dz9ObvUq.js → proof-BxS2Xa8B.js} +2 -2
  62. package/dist/{proof-I6YcKRRq.cjs → proof-CGKQFT2M.cjs} +2 -2
  63. package/dist/{proof-D5vP7VIN.mjs → proof-cXVkPBIU.mjs} +3 -3
  64. package/dist/{send-CBtR8DQK.mjs → send-omt23uTA.mjs} +18 -4
  65. package/dist/sig/http.test.mjs +43 -3
  66. package/dist/sig/key.test.mjs +2 -2
  67. package/dist/sig/ld.test.mjs +5 -2
  68. package/dist/sig/mod.cjs +2 -2
  69. package/dist/sig/mod.js +2 -2
  70. package/dist/sig/owner.test.mjs +2 -2
  71. package/dist/sig/proof.test.mjs +2 -2
  72. package/dist/{std__assert-BBjXFNOb.mjs → std__assert-BvGuO4xO.mjs} +2 -27
  73. package/dist/{temporal-B9t2tY9A.mjs → temporal-ZUAQe754.mjs} +1 -1
  74. package/dist/testing/mod.mjs +1 -1
  75. package/dist/{types-DWs-qZaY.cjs → types-DRPjmHVV.cjs} +7 -3
  76. package/dist/{types-sXITXcWa.js → types-miAYfiGO.js} +7 -3
  77. package/dist/utils/docloader.test.mjs +299 -3
  78. package/dist/utils/kv-cache.test.mjs +1 -1
  79. package/dist/utils/mod.cjs +1 -1
  80. package/dist/utils/mod.d.cts +1 -1
  81. package/dist/utils/mod.d.ts +1 -1
  82. package/dist/utils/mod.js +1 -1
  83. package/dist/vocab/cjs.test.mjs +1 -1
  84. package/package.json +7 -7
  85. package/dist/docloader-C-JrNL14.mjs +0 -53
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-ayal9buz.mjs";
4
+ import { n as version, t as name } from "./deno-DUgFsCmM.mjs";
5
5
  import { t as ActivityListenerSet } from "./activity-listener-ell7W1s9.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
@@ -65,6 +65,7 @@ var FederationBuilderImpl = class {
65
65
  * Symbol registry for unique identification of unnamed symbols.
66
66
  */
67
67
  #symbolRegistry = /* @__PURE__ */ new Map();
68
+ #collectionNames = /* @__PURE__ */ new Map();
68
69
  constructor() {
69
70
  this.router = new Router();
70
71
  this.objectCallbacks = {};
@@ -80,7 +81,7 @@ var FederationBuilderImpl = class {
80
81
  * specified.
81
82
  */
82
83
  async build(options) {
83
- const { FederationImpl } = await import("./middleware-C96wm_7x.mjs");
84
+ const { FederationImpl } = await import("./middleware-54KSGAQA.mjs");
84
85
  const f = new FederationImpl(options);
85
86
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
86
87
  f.router = this.router.clone();
@@ -93,6 +94,8 @@ var FederationBuilderImpl = class {
93
94
  f.objectTypeIds = { ...this.objectTypeIds };
94
95
  f.collectionCallbacks = { ...this.collectionCallbacks };
95
96
  f.collectionTypeIds = { ...this.collectionTypeIds };
97
+ f.#symbolRegistry = new Map(this.#symbolRegistry);
98
+ f.#collectionNames = new Map(this.#collectionNames);
96
99
  f.inboxPath = this.inboxPath;
97
100
  f.outboxPath = this.outboxPath;
98
101
  f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
@@ -572,6 +575,7 @@ var FederationBuilderImpl = class {
572
575
  if (this.collectionCallbacks[name] != null) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
573
576
  assertPath(path);
574
577
  if (Router.variables(path).size < 1) throw new RouterError("Path for collection dispatcher must have at least one variable.");
578
+ this.#collectionNames.set(routeName, name);
575
579
  this.router.add(path, routeName);
576
580
  const callbacks = { dispatcher };
577
581
  this.collectionCallbacks[name] = callbacks;
@@ -609,6 +613,10 @@ var FederationBuilderImpl = class {
609
613
  const routeName = this.#uniqueCollectionId(name);
610
614
  return this.router.build(`collection:${routeName}`, values) ?? this.router.build(`orderedCollection:${routeName}`, values);
611
615
  }
616
+ /** Resolves a custom collection route to its original name. */
617
+ getCollectionName(routeName) {
618
+ return this.#collectionNames.get(routeName) ?? routeName.replace(/^(collection|orderedCollection):/, "");
619
+ }
612
620
  setOutboxPermanentFailureHandler(handler) {
613
621
  this.outboxPermanentFailureHandler = handler;
614
622
  }
@@ -93,8 +93,8 @@ const DEFAULT_MAX_REDIRECTION = 5;
93
93
  * bounce the request to an internal address.
94
94
  * @param url The URL to fetch.
95
95
  * @param headers The request headers.
96
- * @returns The final response, or `null` if the URL is disallowed or there
97
- * are too many redirects.
96
+ * @returns The final response, or `null` if the URL is disallowed, its
97
+ * hostname cannot be resolved, or there are too many redirects.
98
98
  */
99
99
  async function fetchPublicUrl(url, headers) {
100
100
  let current = url instanceof URL ? url : new URL(url);
@@ -104,7 +104,11 @@ async function fetchPublicUrl(url, headers) {
104
104
  await validatePublicUrl(current.href);
105
105
  } catch (e) {
106
106
  if (e instanceof UrlError) {
107
- logger.error("Refused to fetch a private or invalid URL {url}: {error}", {
107
+ if (e.reason === "dns") logger.error("DNS lookup failed for {url}: {error}", {
108
+ url: current.href,
109
+ error: e
110
+ });
111
+ else logger.error("Refused to fetch a private or invalid URL {url}: {error}", {
108
112
  url: current.href,
109
113
  error: e
110
114
  });
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { jt as ActivityTransformer, n as Context } from "../context-CSIggG9_.cjs";
2
+ import { jt as ActivityTransformer, n as Context } from "../context-MOrCC7yl.cjs";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { jt as ActivityTransformer, n as Context } from "../context-CAKnQy1x.js";
2
+ import { jt as ActivityTransformer, n as Context } from "../context-BWbdE_MZ.js";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
5
  import { n as assertInstanceOf, t as assert } from "../assert-jSdZMYam.mjs";
6
6
  import { t as MemoryKvStore } from "../kv-CX8qfaad.mjs";
7
- import { b as autoIdAssigner, n as FederationImpl, y as actorDehydrator } from "../middleware-BCG2BX1n.mjs";
7
+ import { b as autoIdAssigner, n as FederationImpl, y as actorDehydrator } from "../middleware-Bj9s3J_0.mjs";
8
8
  import { Follow, Person } from "@fedify/vocab";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/compat/transformers.test.ts
@@ -2,7 +2,7 @@
2
2
  import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-CSddvgWN.js";
3
3
  import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-DQmNpfym.js";
4
4
  import { n as GetKeyOwnerOptions } from "./owner-CiBPcC6F.js";
5
- import { n as KvStore, t as KvKey } from "./kv-D6hNiMTK.js";
5
+ import { n as KvStore, t as KvKey } from "./kv-CxaI4eGo.js";
6
6
  import { r as MessageQueue } from "./mq-D-nlpY04.js";
7
7
  import { Router } from "@fedify/uri-template";
8
8
  import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
@@ -10,6 +10,7 @@ import { lookupObject, traverseCollection } from "@fedify/vocab";
10
10
  import { lookupWebFinger } from "@fedify/webfinger";
11
11
  import { metrics, trace } from "@opentelemetry/api";
12
12
  //#region ../fixture/dist/mod.js
13
+ const fixtureFetch = globalThis.fetch.bind(globalThis);
13
14
  const logger = getLogger(["fixture", "docloader"]);
14
15
  /**
15
16
  * A mock of the document loader. This does not make any actual HTTP requests
@@ -24,7 +25,7 @@ async function mockDocumentLoader(resource, _options) {
24
25
  if ("navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers") {
25
26
  const testUrl = new URL(url);
26
27
  testUrl.hostname += ".test";
27
- const resp = await fetch(testUrl);
28
+ const resp = await fixtureFetch(testUrl);
28
29
  if (resp.ok) {
29
30
  const document = await resp.json();
30
31
  logger.debug("Successfully fetched fixture {resource}: {status} {statusText}\n{body}", {
@@ -2,7 +2,7 @@
2
2
  import { o as JsonValue, s as NodeInfo, t as GetNodeInfoOptions } from "./client-CAM_bQXx.cjs";
3
3
  import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from "./http-DiWQB8Mr.cjs";
4
4
  import { n as GetKeyOwnerOptions } from "./owner-B3hNQCG8.cjs";
5
- import { n as KvStore, t as KvKey } from "./kv-gJ8LYbxX.cjs";
5
+ import { n as KvStore, t as KvKey } from "./kv-CZKl1IUS.cjs";
6
6
  import { r as MessageQueue } from "./mq-D8uSFzxe.cjs";
7
7
  import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
8
8
  import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
@@ -3,6 +3,6 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  //#region deno.json
5
5
  var name = "@fedify/fedify";
6
- var version = "2.3.9-dev.2048+c88fcc8c";
6
+ var version = "2.3.10";
7
7
  //#endregion
8
8
  export { version as n, name as t };
@@ -0,0 +1,79 @@
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { s as validateCryptoKey } from "./key-BbuFo4CW.mjs";
5
+ import { n as doubleKnock } from "./http-BNDHRNJP.mjs";
6
+ import { getLogger } from "@logtape/logtape";
7
+ import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
8
+ import { curry } from "es-toolkit";
9
+ //#region src/utils/docloader.ts
10
+ const logger = getLogger([
11
+ "fedify",
12
+ "utils",
13
+ "docloader"
14
+ ]);
15
+ const DEFAULT_MAX_REDIRECTION = 20;
16
+ /**
17
+ * Gets an authenticated {@link DocumentLoader} for the given identity.
18
+ * Note that an authenticated document loader intentionally does not cache
19
+ * the fetched documents.
20
+ * At most 20 HTTP redirects and alternate document links are followed in total
21
+ * per call. Revisiting a URL within that chain throws a {@link FetchError}.
22
+ * @param identity The identity to get the document loader for.
23
+ * The actor's key pair.
24
+ * @param options The options for the document loader.
25
+ * @returns The authenticated document loader.
26
+ * @throws {TypeError} If the key is invalid or unsupported.
27
+ * @since 0.4.0
28
+ */
29
+ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedirection, userAgent, specDeterminer, tracerProvider } = {}) {
30
+ validateCryptoKey(identity.privateKey);
31
+ async function load(url, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
32
+ options?.signal?.throwIfAborted();
33
+ let currentUrl = new URL(url).href;
34
+ await validateUrl(currentUrl);
35
+ visited.add(currentUrl);
36
+ const originalRequest = createActivityPubRequest(currentUrl, { userAgent });
37
+ function follow(nextUrl) {
38
+ options?.signal?.throwIfAborted();
39
+ if (redirected >= DEFAULT_MAX_REDIRECTION) throw new FetchError(currentUrl, `Too many redirections (${redirected + 1})`);
40
+ if (visited.has(nextUrl)) throw new FetchError(currentUrl, `Redirect loop detected: ${nextUrl}`);
41
+ redirected++;
42
+ }
43
+ const response = await doubleKnock(originalRequest, identity, {
44
+ maxRedirection,
45
+ specDeterminer,
46
+ log: curry(logRequest)(logger),
47
+ tracerProvider,
48
+ signal: options?.signal,
49
+ validateRedirect: async (nextUrl) => {
50
+ follow(nextUrl);
51
+ await validateUrl(nextUrl);
52
+ visited.add(nextUrl);
53
+ currentUrl = nextUrl;
54
+ }
55
+ });
56
+ return getRemoteDocument(currentUrl, response, (alternateUrl) => {
57
+ follow(alternateUrl);
58
+ return load(alternateUrl, options, redirected, visited);
59
+ });
60
+ }
61
+ async function validateUrl(url) {
62
+ if (!allowPrivateAddress) try {
63
+ await validatePublicUrl(url);
64
+ } catch (error) {
65
+ if (error instanceof UrlError) if (error.reason === "dns") logger.debug("DNS lookup failed for {url}", {
66
+ url,
67
+ error
68
+ });
69
+ else logger.error("Disallowed private URL: {url}", {
70
+ url,
71
+ error
72
+ });
73
+ throw error;
74
+ }
75
+ }
76
+ return (url, options) => load(url, options);
77
+ }
78
+ //#endregion
79
+ export { getAuthenticatedDocumentLoader as t };
@@ -2,10 +2,11 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
- import { r as assertExists } from "../std__assert-BBjXFNOb.mjs";
5
+ import { n as assertExists } from "../std__assert-BvGuO4xO.mjs";
6
6
  import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
7
+ import { t as assertStrictEquals } from "../assert_strict_equals-XEgZAlrj.mjs";
7
8
  import { t as MemoryKvStore } from "../kv-CX8qfaad.mjs";
8
- import { r as createFederationBuilder } from "../builder-BfY2wZ4V.mjs";
9
+ import { r as createFederationBuilder } from "../builder-Bal9bfuM.mjs";
9
10
  import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
10
11
  import { Activity, Note, Person } from "@fedify/vocab";
11
12
  import { test } from "@fedify/fixture";
@@ -344,6 +345,41 @@ test("FederationBuilder", async (t) => {
344
345
  assertEquals(impl.collectionTypeIds["test"], Note);
345
346
  assertEquals((await impl.fetch(new Request("https://example.com/c/x", { headers: { accept: "application/activity+json" } }), { contextData: void 0 })).status, 200);
346
347
  });
348
+ await t.step("preserves symbol-named collections through build()", async () => {
349
+ const builder = createFederationBuilder();
350
+ const collection = Symbol("saved");
351
+ const ordered = Symbol("saved");
352
+ builder.setCollectionDispatcher(collection, Note, "/users/{identifier}/saved", () => ({ items: [] }));
353
+ builder.setOrderedCollectionDispatcher(ordered, Note, "/users/{identifier}/ordered-saved", () => ({ items: [] }));
354
+ for (let build = 0; build < 2; build++) {
355
+ const federation = await builder.build({ kv: new MemoryKvStore() });
356
+ const ctx = federation.createContext(new URL("https://example.com/"));
357
+ for (const [name, path, type] of [[
358
+ collection,
359
+ "/users/alice/saved",
360
+ "collection"
361
+ ], [
362
+ ordered,
363
+ "/users/alice/ordered-saved",
364
+ "orderedCollection"
365
+ ]]) {
366
+ const uri = ctx.getCollectionUri(name, { identifier: "alice" });
367
+ assertEquals(uri.pathname, path);
368
+ const parsed = ctx.parseUri(uri);
369
+ assertEquals(parsed?.type, type);
370
+ if (parsed?.type !== "collection" && parsed?.type !== "orderedCollection") throw new Error("Expected a custom collection URI");
371
+ assertStrictEquals(parsed.name, name);
372
+ assertStrictEquals(parsed.class, Note);
373
+ assertEquals(parsed.values, { identifier: "alice" });
374
+ for (const cursor of [null, "next"]) {
375
+ const pageUri = new URL(uri);
376
+ if (cursor != null) pageUri.searchParams.set("cursor", cursor);
377
+ assertEquals((await federation.fetch(new Request(pageUri, { headers: { accept: "application/activity+json" } }), { contextData: void 0 })).status, 200);
378
+ }
379
+ }
380
+ assertThrows(() => federation.setCollectionDispatcher(collection, Note, "/users/{identifier}/duplicate", () => ({ items: [] })));
381
+ }
382
+ });
347
383
  });
348
384
  //#endregion
349
385
  export {};
@@ -2,7 +2,7 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
- import "../std__assert-BBjXFNOb.mjs";
5
+ import "../std__assert-BvGuO4xO.mjs";
6
6
  import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-CX8qfaad.mjs";
8
8
  import { n as normalizeCircuitBreakerOptions, r as parseCircuitBreakerKvState, t as CircuitBreaker } from "../circuit-breaker-CDABzqVf.mjs";
@@ -2,7 +2,7 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
- import "../std__assert-BBjXFNOb.mjs";
5
+ import "../std__assert-BvGuO4xO.mjs";
6
6
  import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-CA3V5zyK.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  import { decodeHex } from "byte-encodings/hex";
@@ -1,19 +1,19 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-BepjCFHN.mjs";
4
+ import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-CxbCIptr.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
6
- import "../std__assert-BBjXFNOb.mjs";
6
+ import "../std__assert-BvGuO4xO.mjs";
7
7
  import { n as assertGreaterOrEqual, t as assertRejects } from "../assert_rejects-DN60FHPX.mjs";
8
8
  import { n as assertInstanceOf, t as assert } from "../assert-jSdZMYam.mjs";
9
9
  import { r as parseAcceptSignature } from "../accept-Dd__NiUL.mjs";
10
- import { a as generateCryptoKeyPair } from "../key-C9DkrWwb.mjs";
11
- import { s as signRequest } from "../http-B2u6PvNX.mjs";
10
+ import { a as generateCryptoKeyPair } from "../key-BbuFo4CW.mjs";
11
+ import { s as signRequest } from "../http-BNDHRNJP.mjs";
12
12
  import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-BAK-tUlf.mjs";
13
- import { a as compactJsonLd, p as signJsonLd } from "../ld-DNl7KwLY.mjs";
14
- import { r as signObject } from "../proof-D5vP7VIN.mjs";
13
+ import { a as compactJsonLd, p as signJsonLd } from "../ld-BYV2Luge.mjs";
14
+ import { r as signObject } from "../proof-cXVkPBIU.mjs";
15
15
  import { t as MemoryKvStore } from "../kv-CX8qfaad.mjs";
16
- import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-BCG2BX1n.mjs";
16
+ import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-Bj9s3J_0.mjs";
17
17
  import { t as ActivityListenerSet } from "../activity-listener-ell7W1s9.mjs";
18
18
  import { Activity, Create, CryptographicKey, Multikey, Note, Person, Tombstone } from "@fedify/vocab";
19
19
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -2,11 +2,11 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
- import "../std__assert-BBjXFNOb.mjs";
5
+ import "../std__assert-BvGuO4xO.mjs";
6
6
  import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-BAK-tUlf.mjs";
7
- import { r as signObject } from "../proof-D5vP7VIN.mjs";
7
+ import { r as signObject } from "../proof-cXVkPBIU.mjs";
8
8
  import { t as MemoryKvStore } from "../kv-CX8qfaad.mjs";
9
- import { o as createFederation } from "../middleware-BCG2BX1n.mjs";
9
+ import { o as createFederation } from "../middleware-Bj9s3J_0.mjs";
10
10
  import { Create, Follow, Person } from "@fedify/vocab";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  //#region src/federation/idempotency.test.ts
@@ -2,7 +2,7 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
- import "../std__assert-BBjXFNOb.mjs";
5
+ import "../std__assert-BvGuO4xO.mjs";
6
6
  import { t as MemoryKvStore } from "../kv-CX8qfaad.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/federation/kv.test.ts
@@ -2,9 +2,9 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
- import "../std__assert-BBjXFNOb.mjs";
5
+ import "../std__assert-BvGuO4xO.mjs";
6
6
  import { t as assertRejects } from "../assert_rejects-DN60FHPX.mjs";
7
- import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-Ce55disp.mjs";
7
+ import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-QrVsKSG9.mjs";
8
8
  import { createTestMeterProvider, test } from "@fedify/fixture";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
10
10
  import { DataPointType, MeterProvider, MetricReader } from "@opentelemetry/sdk-metrics";