@fedify/fedify 2.3.0-dev.1119 → 2.3.0-dev.1137

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 (116) hide show
  1. package/README.md +3 -0
  2. package/dist/{assert-DikXweDx.mjs → assert-OguE97r2.mjs} +1 -1
  3. package/dist/{assert_instance_of-C4Ri6VuN.mjs → assert_instance_of-DBC5X09g.mjs} +1 -1
  4. package/dist/{assert_not_equals--wG9hV7u.mjs → assert_not_equals-DkVK8oqV.mjs} +1 -1
  5. package/dist/{assert_rejects-DQP-q39h.mjs → assert_rejects-DN60FHPX.mjs} +2 -2
  6. package/dist/{assert_strict_equals-Dmjbg-bA.mjs → assert_strict_equals-XEgZAlrj.mjs} +1 -1
  7. package/dist/{assert_throws-4NwKEy2q.mjs → assert_throws-BOkhLGYc.mjs} +1 -1
  8. package/dist/{builder-Ond_h57y.mjs → builder-BCkBXxky.mjs} +60 -41
  9. package/dist/compat/mod.d.cts +1 -1
  10. package/dist/compat/mod.d.ts +1 -1
  11. package/dist/compat/outgoing-jsonld.test.mjs +3 -3
  12. package/dist/compat/public-audience.test.mjs +3 -3
  13. package/dist/compat/transformers.test.mjs +5 -5
  14. package/dist/{context-cSUMk2da.d.ts → context-DCtsSHDv.d.ts} +4 -293
  15. package/dist/{context-Ch-ZLyTQ.d.cts → context-DI2gRbyN.d.cts} +3 -294
  16. package/dist/{context-BAE7AKLA.mjs → context-DVoTs_wM.mjs} +1 -1
  17. package/dist/{deno-DVsHS7rA.mjs → deno-B_9yJW3w.mjs} +1 -1
  18. package/dist/{docloader-WsWfKaE5.mjs → docloader-BT89tyFr.mjs} +3 -3
  19. package/dist/federation/builder.test.mjs +138 -10
  20. package/dist/federation/collection.test.mjs +3 -3
  21. package/dist/federation/handler.test.mjs +12 -12
  22. package/dist/federation/idempotency.test.mjs +6 -6
  23. package/dist/federation/inbox.test.mjs +3 -3
  24. package/dist/federation/keycache.test.mjs +5 -5
  25. package/dist/federation/kv.test.mjs +3 -3
  26. package/dist/federation/metrics.test.mjs +231 -3
  27. package/dist/federation/middleware.test.mjs +88 -18
  28. package/dist/federation/mod.cjs +155 -3
  29. package/dist/federation/mod.d.cts +3 -2
  30. package/dist/federation/mod.d.ts +3 -2
  31. package/dist/federation/mod.js +153 -1
  32. package/dist/federation/mq.test.mjs +5 -5
  33. package/dist/federation/negotiation.test.mjs +4 -4
  34. package/dist/federation/retry.test.mjs +3 -3
  35. package/dist/federation/router.test.mjs +190 -9
  36. package/dist/federation/send.test.mjs +16 -16
  37. package/dist/federation/webfinger.test.mjs +5 -5
  38. package/dist/{getMachineId-bsd-BY01PL1n.mjs → getMachineId-bsd-etIyxDet.mjs} +1 -1
  39. package/dist/{getMachineId-darwin-Dr1gkBkp.mjs → getMachineId-darwin-D23zTf4g.mjs} +1 -1
  40. package/dist/{getMachineId-win-QEYwcJiy.mjs → getMachineId-win-Dpap6v5i.mjs} +1 -1
  41. package/dist/{http-CouJSFVK.js → http-CToqG5ap.js} +252 -20
  42. package/dist/{http-CubOB9wq.cjs → http-CWoeyogl.cjs} +263 -19
  43. package/dist/{http-DUV8ysti.mjs → http-Cyx5SNuu.mjs} +8 -6
  44. package/dist/{http-D6LP89UO.d.ts → http-VyDTd4G3.d.cts} +8 -1
  45. package/dist/{http-D6aw3j2U.d.cts → http-lf8Hsd91.d.ts} +8 -1
  46. package/dist/{key-BoWaYRHm.mjs → key-CkkMJBjF.mjs} +42 -17
  47. package/dist/{kv-cache-DBNpsneh.js → kv-cache-CuCn2xvM.js} +19 -2
  48. package/dist/{kv-cache-Dz31ATUT.cjs → kv-cache-DuEwFYcN.cjs} +19 -2
  49. package/dist/{kv-cache-DihufyAQ.mjs → kv-cache-VHFP42vY.mjs} +19 -1
  50. package/dist/{ld-B5K1mSuG.mjs → ld-k8yqD2a-.mjs} +3 -3
  51. package/dist/{metrics-C4attqv0.mjs → metrics-iRBg8jTk.mjs} +209 -2
  52. package/dist/{middleware-CmsDtIHI.cjs → middleware-BWLUrbS9.cjs} +137 -210
  53. package/dist/{middleware-BDKFRjue.mjs → middleware-CztxpARM.mjs} +1 -1
  54. package/dist/{middleware-Dtjz-hSk.js → middleware-D7FrhN9q.js} +101 -162
  55. package/dist/{middleware-t0jC8I99.mjs → middleware-DQEgdr83.mjs} +64 -36
  56. package/dist/{mod-BDhgfjP7.d.cts → mod-B0hW12_O.d.cts} +1 -1
  57. package/dist/mod-C504qevA.d.cts +173 -0
  58. package/dist/{mod-B-Lin9Sy.d.ts → mod-COIAjwRS.d.ts} +1 -1
  59. package/dist/{mod-DLrRb0dx.d.ts → mod-DFvNJcNb.d.ts} +54 -3
  60. package/dist/mod-wYfuXeDE.d.ts +173 -0
  61. package/dist/{mod-BR_BB0bh.d.cts → mod-yvIXFAEi.d.cts} +54 -3
  62. package/dist/mod.cjs +6 -6
  63. package/dist/mod.d.cts +6 -5
  64. package/dist/mod.d.ts +6 -5
  65. package/dist/mod.js +5 -5
  66. package/dist/mq-D-nlpY04.d.ts +208 -0
  67. package/dist/mq-D8uSFzxe.d.cts +208 -0
  68. package/dist/nodeinfo/client.test.mjs +4 -4
  69. package/dist/nodeinfo/handler.test.mjs +5 -5
  70. package/dist/nodeinfo/types.test.mjs +4 -4
  71. package/dist/otel/exporter.test.mjs +3 -3
  72. package/dist/{outgoing-jsonld-BNL8AC14.mjs → outgoing-jsonld-BgFLCJQ_.mjs} +1 -1
  73. package/dist/{owner-hDxI0ufu.mjs → owner-nmXdvXpc.mjs} +2 -2
  74. package/dist/{proof-BUWfVr6Q.cjs → proof-CcsIJLTn.cjs} +1 -1
  75. package/dist/{proof-DhVuz4bc.mjs → proof-DpwO1T4S.mjs} +5 -5
  76. package/dist/{proof-n60t8o9P.js → proof-NRmtrTDu.js} +1 -1
  77. package/dist/{send-BPhyR5Oo.mjs → send-DvX2tYyZ.mjs} +3 -3
  78. package/dist/sig/accept.test.mjs +1 -1
  79. package/dist/sig/http.test.mjs +13 -9
  80. package/dist/sig/key.test.mjs +104 -7
  81. package/dist/sig/ld.test.mjs +7 -7
  82. package/dist/sig/mod.cjs +2 -2
  83. package/dist/sig/mod.d.cts +2 -2
  84. package/dist/sig/mod.d.ts +2 -2
  85. package/dist/sig/mod.js +2 -2
  86. package/dist/sig/owner.test.mjs +6 -6
  87. package/dist/sig/proof.test.mjs +8 -8
  88. package/dist/{std__assert-BTEgfoJo.mjs → std__assert-BBjXFNOb.mjs} +4 -4
  89. package/dist/testing/mod.d.mts +1 -0
  90. package/dist/testing/mod.mjs +1 -1
  91. package/dist/utils/docloader.test.mjs +7 -7
  92. package/dist/utils/kv-cache.test.mjs +67 -2
  93. package/dist/utils/mod.cjs +1 -1
  94. package/dist/utils/mod.d.cts +1 -1
  95. package/dist/utils/mod.d.ts +1 -1
  96. package/dist/utils/mod.js +1 -1
  97. package/package.json +6 -7
  98. package/dist/mod-C6E8rkcz.d.ts +0 -63
  99. package/dist/mod-P9tE2WmM.d.cts +0 -63
  100. package/dist/router-BT_F5748.mjs +0 -114
  101. /package/dist/{accept-CgDcxvjV.mjs → accept-CceiKpCy.mjs} +0 -0
  102. /package/dist/{activity-listener-BeTGV3wc.mjs → activity-listener-tztVvlNb.mjs} +0 -0
  103. /package/dist/{assert_equals-Ew3jOFa3.mjs → assert_equals-C-ZRDbaf.mjs} +0 -0
  104. /package/dist/{client-Bneh_DYR.mjs → client-B_A6mfn3.mjs} +0 -0
  105. /package/dist/{collection-Cc3DVAhE.mjs → collection-CA3V5zyK.mjs} +0 -0
  106. /package/dist/{esm-sdtqOUPu.mjs → esm-BQRw925N.mjs} +0 -0
  107. /package/dist/{execAsync-Dxb7rNf3.mjs → execAsync-DCBrgFiV.mjs} +0 -0
  108. /package/dist/{getMachineId-linux-Bbhofx-s.mjs → getMachineId-linux-ObI47Hql.mjs} +0 -0
  109. /package/dist/{getMachineId-unsupported-dIOte2Ct.mjs → getMachineId-unsupported-Ddu-PFeh.mjs} +0 -0
  110. /package/dist/{keycache-BeU0LCII.mjs → keycache-BYMd8q7F.mjs} +0 -0
  111. /package/dist/{keys-CSYsOMFG.mjs → keys-C3kae-6B.mjs} +0 -0
  112. /package/dist/{kv-QHE0oeM3.mjs → kv-x2IvBUyq.mjs} +0 -0
  113. /package/dist/{negotiation-DDstyBvc.mjs → negotiation-CDW-_gUU.mjs} +0 -0
  114. /package/dist/{public-audience-c9zmYKgA.mjs → public-audience-N3pyOx2p.mjs} +0 -0
  115. /package/dist/{retry-_VvV0h9f.mjs → retry-v_sGLH1d.mjs} +0 -0
  116. /package/dist/{types-D09GN0uZ.mjs → types-BFowWFTT.mjs} +0 -0
@@ -1,25 +1,25 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as RouterError } from "../router-BT_F5748.mjs";
5
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import { r as assertExists } from "../std__assert-BTEgfoJo.mjs";
7
- import { r as assertFalse, t as assertRejects } from "../assert_rejects-DQP-q39h.mjs";
8
- import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
9
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
10
- import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
11
- import { t as assertStrictEquals } from "../assert_strict_equals-Dmjbg-bA.mjs";
12
- import { t as assert } from "../assert-DikXweDx.mjs";
13
- import { t as esm_default } from "../esm-sdtqOUPu.mjs";
14
- import { l as verifyRequest, s as signRequest } from "../http-DUV8ysti.mjs";
15
- import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CSYsOMFG.mjs";
16
- import { t as getAuthenticatedDocumentLoader } from "../docloader-WsWfKaE5.mjs";
17
- import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-B5K1mSuG.mjs";
18
- import { t as doesActorOwnKey } from "../owner-hDxI0ufu.mjs";
19
- import { i as verifyObject, r as signObject } from "../proof-DhVuz4bc.mjs";
20
- import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
21
- import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-t0jC8I99.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { r as assertExists } from "../std__assert-BBjXFNOb.mjs";
6
+ import { r as assertFalse, t as assertRejects } from "../assert_rejects-DN60FHPX.mjs";
7
+ import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
8
+ import { t as assertThrows } from "../assert_throws-BOkhLGYc.mjs";
9
+ import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
10
+ import { t as assertStrictEquals } from "../assert_strict_equals-XEgZAlrj.mjs";
11
+ import { t as assert } from "../assert-OguE97r2.mjs";
12
+ import { t as esm_default } from "../esm-BQRw925N.mjs";
13
+ import { l as verifyRequest, s as signRequest } from "../http-Cyx5SNuu.mjs";
14
+ import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-C3kae-6B.mjs";
15
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-BT89tyFr.mjs";
16
+ import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-k8yqD2a-.mjs";
17
+ import { t as doesActorOwnKey } from "../owner-nmXdvXpc.mjs";
18
+ import { i as verifyObject, r as signObject } from "../proof-DpwO1T4S.mjs";
19
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
20
+ import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-DQEgdr83.mjs";
22
21
  import { configure, reset } from "@logtape/logtape";
22
+ import { RouterError } from "@fedify/uri-template";
23
23
  import * as vocab from "@fedify/vocab";
24
24
  import { getTypeId, lookupObject } from "@fedify/vocab";
25
25
  import { SpanStatusCode } from "@opentelemetry/api";
@@ -938,6 +938,18 @@ test("Federation.fetch()", async (t) => {
938
938
  assertEquals(inbox, []);
939
939
  assertEquals(response.status, 404);
940
940
  });
941
+ await t.step("empty identifier segment is Not Found, dispatcher not invoked", async () => {
942
+ const { federation, dispatches } = createTestContext();
943
+ assertEquals((await federation.fetch(new Request("https://example.com/users/", {
944
+ method: "GET",
945
+ headers: { "Accept": "application/activity+json" }
946
+ }), { contextData: void 0 })).status, 404);
947
+ assertEquals((await federation.fetch(new Request("https://example.com/users//inbox", {
948
+ method: "POST",
949
+ headers: { "accept": "application/ld+json" }
950
+ }), { contextData: void 0 })).status, 404);
951
+ assertEquals(dispatches.includes(""), false);
952
+ });
941
953
  await t.step("onNotAcceptable with GET", async () => {
942
954
  const { federation } = createTestContext();
943
955
  let notAcceptableCalled = false;
@@ -4129,5 +4141,63 @@ test("KvSpecDeterminer", async (t) => {
4129
4141
  assertEquals(spec, "rfc9421");
4130
4142
  });
4131
4143
  });
4144
+ test("createFederation() instruments documentLoader with activitypub.document.fetch", async () => {
4145
+ const [meterProvider, recorder] = createTestMeterProvider();
4146
+ await createFederation({
4147
+ kv: new MemoryKvStore(),
4148
+ meterProvider,
4149
+ documentLoaderFactory: () => mockDocumentLoader,
4150
+ contextLoaderFactory: () => mockDocumentLoader
4151
+ }).createContext(new URL("https://example.com/"), void 0).documentLoader("https://example.com/object");
4152
+ const counters = recorder.getMeasurements("activitypub.document.fetch");
4153
+ assertEquals(counters.length, 1);
4154
+ assertEquals(counters[0].attributes["activitypub.lookup.kind"], "object");
4155
+ assertEquals(counters[0].attributes["activitypub.lookup.result"], "fetched");
4156
+ assertEquals(counters[0].attributes["activitypub.remote.host"], "example.com");
4157
+ assertFalse("activitypub.cache.enabled" in counters[0].attributes);
4158
+ });
4159
+ test("createFederation() records kind=context on contextLoader fetches", async () => {
4160
+ const [meterProvider, recorder] = createTestMeterProvider();
4161
+ await createFederation({
4162
+ kv: new MemoryKvStore(),
4163
+ meterProvider,
4164
+ documentLoaderFactory: () => mockDocumentLoader,
4165
+ contextLoaderFactory: () => mockDocumentLoader
4166
+ }).createContext(new URL("https://example.com/"), void 0).contextLoader("https://example.com/object");
4167
+ const counters = recorder.getMeasurements("activitypub.document.fetch");
4168
+ assertEquals(counters.length, 1);
4169
+ assertEquals(counters[0].attributes["activitypub.lookup.kind"], "context");
4170
+ });
4171
+ test("createFederation() forwards DocumentLoaderFactoryOptions to a user-supplied authenticatedDocumentLoaderFactory", () => {
4172
+ const kv = new MemoryKvStore();
4173
+ const seen = [];
4174
+ createFederation({
4175
+ kv,
4176
+ authenticatedDocumentLoaderFactory: (_identity, opts) => {
4177
+ seen.push(opts);
4178
+ return mockDocumentLoader;
4179
+ }
4180
+ }).authenticatedDocumentLoaderFactory({
4181
+ keyId: new URL("https://example.com/users/alice#main-key"),
4182
+ privateKey: {}
4183
+ }, {
4184
+ allowPrivateAddress: true,
4185
+ userAgent: "test-ua"
4186
+ });
4187
+ assertEquals(seen.length, 1);
4188
+ assertEquals(seen[0], {
4189
+ allowPrivateAddress: true,
4190
+ userAgent: "test-ua"
4191
+ });
4192
+ });
4193
+ test("createFederation() omits instrumentation when no meterProvider is set", () => {
4194
+ const ctx = createFederation({
4195
+ kv: new MemoryKvStore(),
4196
+ documentLoaderFactory: () => mockDocumentLoader,
4197
+ contextLoaderFactory: () => mockDocumentLoader
4198
+ }).createContext(new URL("https://example.com/"), void 0);
4199
+ assertStrictEquals(ctx.documentLoader, mockDocumentLoader);
4200
+ assertStrictEquals(ctx.contextLoader, mockDocumentLoader);
4201
+ });
4132
4202
  //#endregion
4133
4203
  export {};
@@ -2,7 +2,9 @@ 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-CmsDtIHI.cjs");
5
+ const require_middleware = require("../middleware-BWLUrbS9.cjs");
6
+ let _logtape_logtape = require("@logtape/logtape");
7
+ let _fedify_uri_template = require("@fedify/uri-template");
6
8
  let es_toolkit = require("es-toolkit");
7
9
  //#region src/federation/kv.ts
8
10
  /**
@@ -347,11 +349,161 @@ var ParallelMessageQueue = class ParallelMessageQueue {
347
349
  }
348
350
  };
349
351
  //#endregion
352
+ //#region src/federation/router.ts
353
+ const logger = (0, _logtape_logtape.getLogger)([
354
+ "fedify",
355
+ "federation",
356
+ "router",
357
+ "deprecated"
358
+ ]);
359
+ let deprecationWarned = false;
360
+ function warnDeprecated() {
361
+ if (deprecationWarned) return;
362
+ deprecationWarned = true;
363
+ logger.warn("The `Router` and `RouterError` classes from `@fedify/fedify` are deprecated. Please use `Router` from `@fedify/uri-template` instead.");
364
+ }
365
+ /**
366
+ * URL router and constructor based on URI Template
367
+ * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
368
+ *
369
+ * @deprecated Import `Router` from `@fedify/uri-template` instead. This class
370
+ * remains only for compatibility with older Fedify code. The
371
+ * `@fedify/uri-template` router is the replacement implementation
372
+ * and should be used directly in new code.
373
+ */
374
+ var Router = class Router {
375
+ #router;
376
+ /**
377
+ * Create a new {@link Router}.
378
+ * @param options Options for the router.
379
+ * @deprecated Use `new Router(options)` from `@fedify/uri-template`
380
+ * instead.
381
+ */
382
+ constructor(options) {
383
+ this.#router = convertRouterError(() => new _fedify_uri_template.Router(options));
384
+ }
385
+ /**
386
+ * Whether to ignore trailing slashes when matching paths.
387
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. This
388
+ * accessor forwards to the underlying `@fedify/uri-template`
389
+ * router so that post-construction mutation keeps working as
390
+ * in older Fedify code.
391
+ */
392
+ get trailingSlashInsensitive() {
393
+ return this.#router.trailingSlashInsensitive;
394
+ }
395
+ set trailingSlashInsensitive(value) {
396
+ this.#router.trailingSlashInsensitive = value;
397
+ }
398
+ /**
399
+ * Clones this router.
400
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
401
+ */
402
+ clone() {
403
+ return convertRouterError(() => {
404
+ const clone = new Router();
405
+ clone.#router = this.#router.clone();
406
+ return clone;
407
+ });
408
+ }
409
+ /**
410
+ * Checks if a path name exists in the router.
411
+ * @param name The name of the path.
412
+ * @returns `true` if the path name exists, otherwise `false`.
413
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
414
+ */
415
+ has(name) {
416
+ return convertRouterError(() => this.#router.has(name));
417
+ }
418
+ /**
419
+ * Adds a new path rule to the router.
420
+ * @param template The path pattern.
421
+ * @param name The name of the path.
422
+ * @returns The names of the variables in the path pattern.
423
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. In this
424
+ * compatibility class, `add()` both registers the route and
425
+ * returns the variables in the path pattern. In
426
+ * `@fedify/uri-template`, these two responsibilities are split:
427
+ * `router.add(template, name)` registers the route and returns
428
+ * `void`, while the pure static method
429
+ * `Router.variables(template)` returns the variable names. To
430
+ * migrate, call `Router.variables(template)` when variables are
431
+ * needed, then call `router.add(template, name)` to register the
432
+ * route.
433
+ */
434
+ add(template, name) {
435
+ return convertRouterError(() => {
436
+ (0, _fedify_uri_template.assertPath)(template);
437
+ this.#router.add(template, name);
438
+ return _fedify_uri_template.Router.variables(template);
439
+ });
440
+ }
441
+ /**
442
+ * Resolves a path name and values from a URL, if any match.
443
+ * @param url The URL to resolve.
444
+ * @returns The name of the path and its values, if any match. Otherwise,
445
+ * `null`.
446
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. Unlike the
447
+ * stricter `@fedify/uri-template` router, this compatibility
448
+ * method keeps the old Fedify 2.x contract of returning `null`
449
+ * (rather than throwing) for inputs that are not router paths.
450
+ */
451
+ route(url) {
452
+ return convertRouterError(() => {
453
+ if (!(0, _fedify_uri_template.isPath)(url)) return null;
454
+ return this.#router.route(url);
455
+ });
456
+ }
457
+ /**
458
+ * Constructs a URL/path from a path name and values.
459
+ * @param name The name of the path.
460
+ * @param values The values to expand the path with.
461
+ * @returns The URL/path, if the name exists. Otherwise, `null`.
462
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
463
+ */
464
+ build(name, values) {
465
+ return convertRouterError(() => this.#router.build(name, values));
466
+ }
467
+ };
468
+ /**
469
+ * An error thrown by the {@link Router}.
470
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
471
+ */
472
+ var RouterError = class extends _fedify_uri_template.RouterError {
473
+ /**
474
+ * Treats every `RouterError` from `@fedify/uri-template` as an instance of
475
+ * this deprecated class.
476
+ *
477
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
478
+ */
479
+ static [Symbol.hasInstance](instance) {
480
+ return instance instanceof _fedify_uri_template.RouterError;
481
+ }
482
+ /**
483
+ * Create a new {@link RouterError}.
484
+ * @param message The error message.
485
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
486
+ */
487
+ constructor(message) {
488
+ super(message);
489
+ warnDeprecated();
490
+ }
491
+ };
492
+ function convertRouterError(func) {
493
+ try {
494
+ warnDeprecated();
495
+ return func();
496
+ } catch (error) {
497
+ if (error instanceof _fedify_uri_template.RouterError) throw new RouterError(error.message);
498
+ throw error;
499
+ }
500
+ }
501
+ //#endregion
350
502
  exports.InProcessMessageQueue = InProcessMessageQueue;
351
503
  exports.MemoryKvStore = MemoryKvStore;
352
504
  exports.ParallelMessageQueue = ParallelMessageQueue;
353
- exports.Router = require_middleware.Router;
354
- exports.RouterError = require_middleware.RouterError;
505
+ exports.Router = Router;
506
+ exports.RouterError = RouterError;
355
507
  exports.SendActivityError = require_middleware.SendActivityError;
356
508
  exports.buildCollectionSynchronizationHeader = require_middleware.buildCollectionSynchronizationHeader;
357
509
  exports.createExponentialBackoffPolicy = require_middleware.createExponentialBackoffPolicy;
@@ -1,5 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-Ch-ZLyTQ.cjs";
2
+ import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "../context-DI2gRbyN.cjs";
3
3
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-gJ8LYbxX.cjs";
4
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-P9tE2WmM.cjs";
4
+ import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "../mq-D8uSFzxe.cjs";
5
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-C504qevA.cjs";
5
6
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,5 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-cSUMk2da.js";
2
+ import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "../context-DCtsSHDv.js";
3
3
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-D6hNiMTK.js";
4
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-C6E8rkcz.js";
4
+ import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "../mq-D-nlpY04.js";
5
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-wYfuXeDE.js";
5
6
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,6 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-Dtjz-hSk.js";
3
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-D7FrhN9q.js";
4
+ import { getLogger } from "@logtape/logtape";
5
+ import { Router as Router$1, RouterError as RouterError$1, assertPath, isPath } from "@fedify/uri-template";
4
6
  import { isEqual } from "es-toolkit";
5
7
  //#region src/federation/kv.ts
6
8
  /**
@@ -345,4 +347,154 @@ var ParallelMessageQueue = class ParallelMessageQueue {
345
347
  }
346
348
  };
347
349
  //#endregion
350
+ //#region src/federation/router.ts
351
+ const logger = getLogger([
352
+ "fedify",
353
+ "federation",
354
+ "router",
355
+ "deprecated"
356
+ ]);
357
+ let deprecationWarned = false;
358
+ function warnDeprecated() {
359
+ if (deprecationWarned) return;
360
+ deprecationWarned = true;
361
+ logger.warn("The `Router` and `RouterError` classes from `@fedify/fedify` are deprecated. Please use `Router` from `@fedify/uri-template` instead.");
362
+ }
363
+ /**
364
+ * URL router and constructor based on URI Template
365
+ * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
366
+ *
367
+ * @deprecated Import `Router` from `@fedify/uri-template` instead. This class
368
+ * remains only for compatibility with older Fedify code. The
369
+ * `@fedify/uri-template` router is the replacement implementation
370
+ * and should be used directly in new code.
371
+ */
372
+ var Router = class Router {
373
+ #router;
374
+ /**
375
+ * Create a new {@link Router}.
376
+ * @param options Options for the router.
377
+ * @deprecated Use `new Router(options)` from `@fedify/uri-template`
378
+ * instead.
379
+ */
380
+ constructor(options) {
381
+ this.#router = convertRouterError(() => new Router$1(options));
382
+ }
383
+ /**
384
+ * Whether to ignore trailing slashes when matching paths.
385
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. This
386
+ * accessor forwards to the underlying `@fedify/uri-template`
387
+ * router so that post-construction mutation keeps working as
388
+ * in older Fedify code.
389
+ */
390
+ get trailingSlashInsensitive() {
391
+ return this.#router.trailingSlashInsensitive;
392
+ }
393
+ set trailingSlashInsensitive(value) {
394
+ this.#router.trailingSlashInsensitive = value;
395
+ }
396
+ /**
397
+ * Clones this router.
398
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
399
+ */
400
+ clone() {
401
+ return convertRouterError(() => {
402
+ const clone = new Router();
403
+ clone.#router = this.#router.clone();
404
+ return clone;
405
+ });
406
+ }
407
+ /**
408
+ * Checks if a path name exists in the router.
409
+ * @param name The name of the path.
410
+ * @returns `true` if the path name exists, otherwise `false`.
411
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
412
+ */
413
+ has(name) {
414
+ return convertRouterError(() => this.#router.has(name));
415
+ }
416
+ /**
417
+ * Adds a new path rule to the router.
418
+ * @param template The path pattern.
419
+ * @param name The name of the path.
420
+ * @returns The names of the variables in the path pattern.
421
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. In this
422
+ * compatibility class, `add()` both registers the route and
423
+ * returns the variables in the path pattern. In
424
+ * `@fedify/uri-template`, these two responsibilities are split:
425
+ * `router.add(template, name)` registers the route and returns
426
+ * `void`, while the pure static method
427
+ * `Router.variables(template)` returns the variable names. To
428
+ * migrate, call `Router.variables(template)` when variables are
429
+ * needed, then call `router.add(template, name)` to register the
430
+ * route.
431
+ */
432
+ add(template, name) {
433
+ return convertRouterError(() => {
434
+ assertPath(template);
435
+ this.#router.add(template, name);
436
+ return Router$1.variables(template);
437
+ });
438
+ }
439
+ /**
440
+ * Resolves a path name and values from a URL, if any match.
441
+ * @param url The URL to resolve.
442
+ * @returns The name of the path and its values, if any match. Otherwise,
443
+ * `null`.
444
+ * @deprecated Use `Router` from `@fedify/uri-template` instead. Unlike the
445
+ * stricter `@fedify/uri-template` router, this compatibility
446
+ * method keeps the old Fedify 2.x contract of returning `null`
447
+ * (rather than throwing) for inputs that are not router paths.
448
+ */
449
+ route(url) {
450
+ return convertRouterError(() => {
451
+ if (!isPath(url)) return null;
452
+ return this.#router.route(url);
453
+ });
454
+ }
455
+ /**
456
+ * Constructs a URL/path from a path name and values.
457
+ * @param name The name of the path.
458
+ * @param values The values to expand the path with.
459
+ * @returns The URL/path, if the name exists. Otherwise, `null`.
460
+ * @deprecated Use `Router` from `@fedify/uri-template` instead.
461
+ */
462
+ build(name, values) {
463
+ return convertRouterError(() => this.#router.build(name, values));
464
+ }
465
+ };
466
+ /**
467
+ * An error thrown by the {@link Router}.
468
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
469
+ */
470
+ var RouterError = class extends RouterError$1 {
471
+ /**
472
+ * Treats every `RouterError` from `@fedify/uri-template` as an instance of
473
+ * this deprecated class.
474
+ *
475
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
476
+ */
477
+ static [Symbol.hasInstance](instance) {
478
+ return instance instanceof RouterError$1;
479
+ }
480
+ /**
481
+ * Create a new {@link RouterError}.
482
+ * @param message The error message.
483
+ * @deprecated Import `RouterError` from `@fedify/uri-template` instead.
484
+ */
485
+ constructor(message) {
486
+ super(message);
487
+ warnDeprecated();
488
+ }
489
+ };
490
+ function convertRouterError(func) {
491
+ try {
492
+ warnDeprecated();
493
+ return func();
494
+ } catch (error) {
495
+ if (error instanceof RouterError$1) throw new RouterError(error.message);
496
+ throw error;
497
+ }
498
+ }
499
+ //#endregion
348
500
  export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,12 +1,12 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import { n as assertGreater } from "../std__assert-BTEgfoJo.mjs";
6
- import { n as assertGreaterOrEqual, r as assertFalse } from "../assert_rejects-DQP-q39h.mjs";
7
- import { t as assert } from "../assert-DikXweDx.mjs";
8
- import { delay } from "es-toolkit";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { n as assertGreater } from "../std__assert-BBjXFNOb.mjs";
6
+ import { n as assertGreaterOrEqual, r as assertFalse } from "../assert_rejects-DN60FHPX.mjs";
7
+ import { t as assert } from "../assert-OguE97r2.mjs";
9
8
  import { test } from "@fedify/fixture";
9
+ import { delay } from "es-toolkit";
10
10
  //#region src/federation/mq.ts
11
11
  /**
12
12
  * A message queue that processes messages in the same process.
@@ -1,10 +1,10 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import "../std__assert-BTEgfoJo.mjs";
5
- import { r as assertFalse } from "../assert_rejects-DQP-q39h.mjs";
6
- import { t as assert } from "../assert-DikXweDx.mjs";
7
- import { t as acceptsJsonLd } from "../negotiation-DDstyBvc.mjs";
4
+ import "../std__assert-BBjXFNOb.mjs";
5
+ import { r as assertFalse } from "../assert_rejects-DN60FHPX.mjs";
6
+ import { t as assert } from "../assert-OguE97r2.mjs";
7
+ import { t as acceptsJsonLd } from "../negotiation-CDW-_gUU.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/negotiation.test.ts
10
10
  test("acceptsJsonLd()", () => {
@@ -1,9 +1,9 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { l as AssertionError, t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
6
- import { t as createExponentialBackoffPolicy } from "../retry-_VvV0h9f.mjs";
4
+ import { l as AssertionError, t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
6
+ import { t as createExponentialBackoffPolicy } from "../retry-v_sGLH1d.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/federation/retry.test.ts
9
9
  test("createExponentialBackoffPolicy()", () => {