@fedify/fedify 2.0.36-dev.2598 → 2.0.36-dev.2637

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 (57) hide show
  1. package/dist/{builder-B5hI5Xsn.mjs → builder-BC3eRIbe.mjs} +3 -3
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{context-lxjaUTAI.d.ts → context-C00pWP8x.d.ts} +6 -0
  6. package/dist/{context-CnoWxuoB.d.cts → context-ao-qb3eP.d.cts} +6 -0
  7. package/dist/{deno--OYa_lxj.mjs → deno-Dv6PIwH_.mjs} +1 -1
  8. package/dist/{docloader-BXR2f83H.mjs → docloader-BgHM-JLc.mjs} +2 -2
  9. package/dist/federation/builder.test.mjs +1 -1
  10. package/dist/federation/handler.test.mjs +6 -6
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/inbox.test.mjs +1 -1
  13. package/dist/federation/middleware.test.mjs +321 -6
  14. package/dist/federation/mod.cjs +1 -1
  15. package/dist/federation/mod.d.cts +2 -2
  16. package/dist/federation/mod.d.ts +2 -2
  17. package/dist/federation/mod.js +1 -1
  18. package/dist/federation/send.test.mjs +3 -3
  19. package/dist/federation/temporal.test.mjs +1 -1
  20. package/dist/federation/webfinger.test.mjs +1 -1
  21. package/dist/{http-C3d2DXwF.mjs → http-BWoAqky4.mjs} +2 -2
  22. package/dist/{http-CfyVeGgF.js → http-CrEB4I8A.js} +1 -1
  23. package/dist/{http-CO_IVq7x.cjs → http-D69BMfAn.cjs} +1 -1
  24. package/dist/{inbox-huUE3IP8.mjs → inbox-0Dbv0QVc.mjs} +1 -1
  25. package/dist/{key-D5e9c_yV.mjs → key-ChKDZfvS.mjs} +1 -1
  26. package/dist/{kv-cache-BMlo_kyv.cjs → kv-cache-B0JZ30EF.cjs} +1 -1
  27. package/dist/{kv-cache-Zw0soD-7.js → kv-cache-CDvE8__9.js} +1 -1
  28. package/dist/{ld-9qfz9rP_.mjs → ld-DbSNiv8Q.mjs} +2 -2
  29. package/dist/{middleware-CT1Lbohd.mjs → middleware-BA9cM-vz.mjs} +1 -1
  30. package/dist/{middleware-BhYpLGA_.mjs → middleware-C849kmHB.mjs} +52 -17
  31. package/dist/{middleware-BKs_a9P1.js → middleware-CEufJR5k.js} +44 -9
  32. package/dist/{middleware-CXoG7ZAW.cjs → middleware-C_fDk_dx.cjs} +45 -10
  33. package/dist/{middleware-Ad6kTSBf.cjs → middleware-DCtCNota.cjs} +1 -1
  34. package/dist/{mod-w1oyHseQ.d.cts → mod-6uJWdCc0.d.cts} +1 -1
  35. package/dist/{mod-I-34OMN3.d.ts → mod-DtRh015i.d.ts} +1 -1
  36. package/dist/mod.cjs +4 -4
  37. package/dist/mod.d.cts +2 -2
  38. package/dist/mod.d.ts +2 -2
  39. package/dist/mod.js +4 -4
  40. package/dist/nodeinfo/handler.test.mjs +1 -1
  41. package/dist/{owner-R4ffU9Ht.mjs → owner-BJeJfxnT.mjs} +2 -2
  42. package/dist/{proof-CiBs9Q4l.mjs → proof-CaMBdk_x.mjs} +2 -2
  43. package/dist/{proof-BrreJTRF.cjs → proof-DNgQwz9E.cjs} +1 -1
  44. package/dist/{proof-CE8nwTF6.js → proof-DwooE8kV.js} +1 -1
  45. package/dist/{send-DpvZgVSA.mjs → send-CYrAOC1K.mjs} +2 -2
  46. package/dist/sig/http.test.mjs +2 -2
  47. package/dist/sig/key.test.mjs +2 -2
  48. package/dist/sig/ld.test.mjs +2 -2
  49. package/dist/sig/mod.cjs +2 -2
  50. package/dist/sig/mod.js +2 -2
  51. package/dist/sig/owner.test.mjs +1 -1
  52. package/dist/sig/proof.test.mjs +2 -2
  53. package/dist/{temporal-Dd-J410Z.mjs → temporal-BJoGKOXy.mjs} +1 -1
  54. package/dist/utils/docloader.test.mjs +2 -2
  55. package/dist/utils/mod.cjs +1 -1
  56. package/dist/utils/mod.js +1 -1
  57. package/package.json +5 -5
@@ -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--OYa_lxj.mjs";
4
+ import { n as version, t as name } from "./deno-Dv6PIwH_.mjs";
5
5
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-CO_IVq7x.cjs");
4
+ const require_http = require("./http-D69BMfAn.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { l as validateCryptoKey, t as doubleKnockScoped } from "./http-CfyVeGgF.js";
3
+ import { l as validateCryptoKey, t as doubleKnockScoped } from "./http-CrEB4I8A.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { curry } from "es-toolkit";
6
6
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts } 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 { n as version, t as name } from "./deno--OYa_lxj.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-D5e9c_yV.mjs";
4
+ import { n as version, t as name } from "./deno-Dv6PIwH_.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-ChKDZfvS.mjs";
6
6
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-BhYpLGA_.mjs";
4
+ import { n as FederationImpl } from "./middleware-C849kmHB.mjs";
5
5
  export { FederationImpl };
@@ -2,24 +2,24 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as RouterError } from "./router-CrMLXoOr.mjs";
5
- import { n as version, t as name } from "./deno--OYa_lxj.mjs";
6
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-D5e9c_yV.mjs";
7
- import { u as verifyRequest } from "./http-C3d2DXwF.mjs";
8
- import { n as getAuthenticatedDocumentLoader } from "./docloader-BXR2f83H.mjs";
5
+ import { n as version, t as name } from "./deno-Dv6PIwH_.mjs";
6
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-ChKDZfvS.mjs";
7
+ import { u as verifyRequest } from "./http-BWoAqky4.mjs";
8
+ import { n as getAuthenticatedDocumentLoader } from "./docloader-BgHM-JLc.mjs";
9
9
  import { n as kvCache } from "./kv-cache-BrjuJue8.mjs";
10
- import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-9qfz9rP_.mjs";
11
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-R4ffU9Ht.mjs";
12
- import { n as signObject, r as verifyObject } from "./proof-CiBs9Q4l.mjs";
10
+ import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-DbSNiv8Q.mjs";
11
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-BJeJfxnT.mjs";
12
+ import { n as signObject, r as verifyObject } from "./proof-CaMBdk_x.mjs";
13
13
  import { d as MAX_BODY_SIZE, f as readBoundedText, t as getNodeInfo, u as BodyTooLargeError } from "./client-DGNacEx_.mjs";
14
14
  import { t as nodeInfoToJson } from "./types-MNlFfxjv.mjs";
15
- import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-huUE3IP8.mjs";
16
- import { t as FederationBuilderImpl } from "./builder-B5hI5Xsn.mjs";
15
+ import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-0Dbv0QVc.mjs";
16
+ import { t as FederationBuilderImpl } from "./builder-BC3eRIbe.mjs";
17
17
  import { t as buildCollectionSynchronizationHeader } from "./collection-DI6YzYpd.mjs";
18
18
  import { t as KvKeyCache } from "./keycache-DBD6fzl1.mjs";
19
19
  import { t as acceptsJsonLd } from "./negotiation-TWEs6Cl8.mjs";
20
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-Dd-J410Z.mjs";
20
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BJoGKOXy.mjs";
21
21
  import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
22
- import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-DpvZgVSA.mjs";
22
+ import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-CYrAOC1K.mjs";
23
23
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
24
24
  import { lookupWebFinger } from "@fedify/webfinger";
25
25
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -1532,6 +1532,23 @@ var FederationImpl = class extends FederationBuilderImpl {
1532
1532
  _getTracer() {
1533
1533
  return this.tracerProvider.getTracer(name, version);
1534
1534
  }
1535
+ /**
1536
+ * Starts listening on a queue, converting a synchronous throw into
1537
+ * a rejected promise.
1538
+ *
1539
+ * `MessageQueue.listen()` is documented to never reject, but some
1540
+ * implementations (e.g., `WorkersMessageQueue`) throw synchronously. Without
1541
+ * this normalization, one such throw aborts {@link _startQueueInternal} while
1542
+ * it is still collecting listener promises, so listeners started earlier are
1543
+ * never awaited and later queues are never started.
1544
+ */
1545
+ #listenQueue(queue, ctxData, signal) {
1546
+ try {
1547
+ return queue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal });
1548
+ } catch (error) {
1549
+ return Promise.reject(error);
1550
+ }
1551
+ }
1535
1552
  async _startQueueInternal(ctxData, signal, queue) {
1536
1553
  if (this.inboxQueue == null && this.outboxQueue == null) return;
1537
1554
  const logger = getLogger([
@@ -1543,20 +1560,38 @@ var FederationImpl = class extends FederationBuilderImpl {
1543
1560
  if (this.inboxQueue != null && (queue == null || queue === "inbox") && !this.inboxQueueStarted) {
1544
1561
  logger.debug("Starting an inbox task worker.");
1545
1562
  this.inboxQueueStarted = true;
1546
- promises.push(this.inboxQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
1563
+ promises.push(this.#listenQueue(this.inboxQueue, ctxData, signal));
1547
1564
  }
1548
1565
  if (this.outboxQueue != null && this.outboxQueue !== this.inboxQueue && (queue == null || queue === "outbox") && !this.outboxQueueStarted) {
1549
1566
  logger.debug("Starting an outbox task worker.");
1550
1567
  this.outboxQueueStarted = true;
1551
- promises.push(this.outboxQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
1568
+ promises.push(this.#listenQueue(this.outboxQueue, ctxData, signal));
1552
1569
  }
1553
1570
  if (this.fanoutQueue != null && this.fanoutQueue !== this.inboxQueue && this.fanoutQueue !== this.outboxQueue && (queue == null || queue === "fanout") && !this.fanoutQueueStarted) {
1554
1571
  logger.debug("Starting a fanout task worker.");
1555
1572
  this.fanoutQueueStarted = true;
1556
- promises.push(this.fanoutQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
1573
+ promises.push(this.#listenQueue(this.fanoutQueue, ctxData, signal));
1557
1574
  }
1558
1575
  await Promise.all(promises);
1559
1576
  }
1577
+ /**
1578
+ * Starts the queue workers automatically, reporting a failure instead of
1579
+ * leaving the returned promise unobserved.
1580
+ *
1581
+ * Automatic startup is best-effort: call sites cannot await it, so a failing
1582
+ * listener (e.g., `WorkersMessageQueue`, whose `listen()` throws) must not
1583
+ * become an unhandled rejection. {@link startQueue} keeps rejecting for
1584
+ * callers that start workers deliberately.
1585
+ */
1586
+ _startQueueAutomatically(ctxData) {
1587
+ this._startQueueInternal(ctxData).catch((error) => {
1588
+ getLogger([
1589
+ "fedify",
1590
+ "federation",
1591
+ "queue"
1592
+ ]).warn("Failed to start queue workers automatically: {error}", { error });
1593
+ });
1594
+ }
1560
1595
  processQueuedTask(contextData, message) {
1561
1596
  const tracer = this._getTracer();
1562
1597
  const extractedContext = propagation.extract(context.active(), message.traceContext);
@@ -2140,7 +2175,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2140
2175
  privateKey: privateKeyJwk
2141
2176
  });
2142
2177
  }
2143
- if (!this.manuallyStartQueue) this._startQueueInternal(ctx.data);
2178
+ if (!this.manuallyStartQueue) this._startQueueAutomatically(ctx.data);
2144
2179
  const carrier = {};
2145
2180
  propagation.inject(context.active(), carrier);
2146
2181
  const messages = [];
@@ -2352,7 +2387,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2352
2387
  const identity = await this.sharedInboxKeyDispatcher(context);
2353
2388
  if (identity != null) context = this.#createContext(request, contextData, { documentLoader: "identifier" in identity || "username" in identity ? await context.getDocumentLoader(identity) : context.getDocumentLoader(identity) });
2354
2389
  }
2355
- if (!this.manuallyStartQueue) this._startQueueInternal(contextData);
2390
+ if (!this.manuallyStartQueue) this._startQueueAutomatically(contextData);
2356
2391
  const inboxContextFactory = context.toInboxContext.bind(context);
2357
2392
  inboxContextFactory[rawInboxContextFactorySymbol] = context.toInboxContext.bind(context);
2358
2393
  return await handleInbox(request, {
@@ -2959,7 +2994,7 @@ var ContextImpl = class ContextImpl {
2959
2994
  orderingKey: options.orderingKey,
2960
2995
  traceContext: carrier
2961
2996
  };
2962
- if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
2997
+ if (!this.federation.manuallyStartQueue) this.federation._startQueueAutomatically(this.data);
2963
2998
  await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
2964
2999
  }
2965
3000
  async *getFollowers(identifier) {
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./chunk-CRNNMoPX.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
5
- import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnockScoped } from "./http-CfyVeGgF.js";
5
+ import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnockScoped } from "./http-CrEB4I8A.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-B1_pRFE_.js";
7
- import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-CE8nwTF6.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-Zw0soD-7.js";
7
+ import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-DwooE8kV.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CDvE8__9.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -2869,6 +2869,23 @@ var FederationImpl = class extends FederationBuilderImpl {
2869
2869
  _getTracer() {
2870
2870
  return this.tracerProvider.getTracer(name, version);
2871
2871
  }
2872
+ /**
2873
+ * Starts listening on a queue, converting a synchronous throw into
2874
+ * a rejected promise.
2875
+ *
2876
+ * `MessageQueue.listen()` is documented to never reject, but some
2877
+ * implementations (e.g., `WorkersMessageQueue`) throw synchronously. Without
2878
+ * this normalization, one such throw aborts {@link _startQueueInternal} while
2879
+ * it is still collecting listener promises, so listeners started earlier are
2880
+ * never awaited and later queues are never started.
2881
+ */
2882
+ #listenQueue(queue, ctxData, signal) {
2883
+ try {
2884
+ return queue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal });
2885
+ } catch (error) {
2886
+ return Promise.reject(error);
2887
+ }
2888
+ }
2872
2889
  async _startQueueInternal(ctxData, signal, queue) {
2873
2890
  if (this.inboxQueue == null && this.outboxQueue == null) return;
2874
2891
  const logger = getLogger([
@@ -2880,20 +2897,38 @@ var FederationImpl = class extends FederationBuilderImpl {
2880
2897
  if (this.inboxQueue != null && (queue == null || queue === "inbox") && !this.inboxQueueStarted) {
2881
2898
  logger.debug("Starting an inbox task worker.");
2882
2899
  this.inboxQueueStarted = true;
2883
- promises.push(this.inboxQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
2900
+ promises.push(this.#listenQueue(this.inboxQueue, ctxData, signal));
2884
2901
  }
2885
2902
  if (this.outboxQueue != null && this.outboxQueue !== this.inboxQueue && (queue == null || queue === "outbox") && !this.outboxQueueStarted) {
2886
2903
  logger.debug("Starting an outbox task worker.");
2887
2904
  this.outboxQueueStarted = true;
2888
- promises.push(this.outboxQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
2905
+ promises.push(this.#listenQueue(this.outboxQueue, ctxData, signal));
2889
2906
  }
2890
2907
  if (this.fanoutQueue != null && this.fanoutQueue !== this.inboxQueue && this.fanoutQueue !== this.outboxQueue && (queue == null || queue === "fanout") && !this.fanoutQueueStarted) {
2891
2908
  logger.debug("Starting a fanout task worker.");
2892
2909
  this.fanoutQueueStarted = true;
2893
- promises.push(this.fanoutQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
2910
+ promises.push(this.#listenQueue(this.fanoutQueue, ctxData, signal));
2894
2911
  }
2895
2912
  await Promise.all(promises);
2896
2913
  }
2914
+ /**
2915
+ * Starts the queue workers automatically, reporting a failure instead of
2916
+ * leaving the returned promise unobserved.
2917
+ *
2918
+ * Automatic startup is best-effort: call sites cannot await it, so a failing
2919
+ * listener (e.g., `WorkersMessageQueue`, whose `listen()` throws) must not
2920
+ * become an unhandled rejection. {@link startQueue} keeps rejecting for
2921
+ * callers that start workers deliberately.
2922
+ */
2923
+ _startQueueAutomatically(ctxData) {
2924
+ this._startQueueInternal(ctxData).catch((error) => {
2925
+ getLogger([
2926
+ "fedify",
2927
+ "federation",
2928
+ "queue"
2929
+ ]).warn("Failed to start queue workers automatically: {error}", { error });
2930
+ });
2931
+ }
2897
2932
  processQueuedTask(contextData, message) {
2898
2933
  const tracer = this._getTracer();
2899
2934
  const extractedContext = propagation.extract(context.active(), message.traceContext);
@@ -3477,7 +3512,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3477
3512
  privateKey: privateKeyJwk
3478
3513
  });
3479
3514
  }
3480
- if (!this.manuallyStartQueue) this._startQueueInternal(ctx.data);
3515
+ if (!this.manuallyStartQueue) this._startQueueAutomatically(ctx.data);
3481
3516
  const carrier = {};
3482
3517
  propagation.inject(context.active(), carrier);
3483
3518
  const messages = [];
@@ -3689,7 +3724,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3689
3724
  const identity = await this.sharedInboxKeyDispatcher(context);
3690
3725
  if (identity != null) context = this.#createContext(request, contextData, { documentLoader: "identifier" in identity || "username" in identity ? await context.getDocumentLoader(identity) : context.getDocumentLoader(identity) });
3691
3726
  }
3692
- if (!this.manuallyStartQueue) this._startQueueInternal(contextData);
3727
+ if (!this.manuallyStartQueue) this._startQueueAutomatically(contextData);
3693
3728
  const inboxContextFactory = context.toInboxContext.bind(context);
3694
3729
  inboxContextFactory[rawInboxContextFactorySymbol] = context.toInboxContext.bind(context);
3695
3730
  return await handleInbox(request, {
@@ -4296,7 +4331,7 @@ var ContextImpl = class ContextImpl {
4296
4331
  orderingKey: options.orderingKey,
4297
4332
  traceContext: carrier
4298
4333
  };
4299
- if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
4334
+ if (!this.federation.manuallyStartQueue) this.federation._startQueueAutomatically(this.data);
4300
4335
  await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
4301
4336
  }
4302
4337
  async *getFollowers(identifier) {
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  const require_chunk = require("./chunk-DDcVe30Y.cjs");
4
4
  const require_transformers = require("./transformers-NeAONrAq.cjs");
5
- const require_http = require("./http-CO_IVq7x.cjs");
5
+ const require_http = require("./http-D69BMfAn.cjs");
6
6
  const require_types = require("./types-DOvyymM4.cjs");
7
- const require_proof = require("./proof-BrreJTRF.cjs");
8
- const require_kv_cache = require("./kv-cache-BMlo_kyv.cjs");
7
+ const require_proof = require("./proof-DNgQwz9E.cjs");
8
+ const require_kv_cache = require("./kv-cache-B0JZ30EF.cjs");
9
9
  let _logtape_logtape = require("@logtape/logtape");
10
10
  let _fedify_vocab = require("@fedify/vocab");
11
11
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -351,7 +351,7 @@ var FederationBuilderImpl = class {
351
351
  this.collectionTypeIds = {};
352
352
  }
353
353
  async build(options) {
354
- const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-Ad6kTSBf.cjs"));
354
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-DCtCNota.cjs"));
355
355
  const f = new FederationImpl(options);
356
356
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
357
357
  f.router = this.router.clone();
@@ -2863,6 +2863,23 @@ var FederationImpl = class extends FederationBuilderImpl {
2863
2863
  _getTracer() {
2864
2864
  return this.tracerProvider.getTracer(require_http.name, require_http.version);
2865
2865
  }
2866
+ /**
2867
+ * Starts listening on a queue, converting a synchronous throw into
2868
+ * a rejected promise.
2869
+ *
2870
+ * `MessageQueue.listen()` is documented to never reject, but some
2871
+ * implementations (e.g., `WorkersMessageQueue`) throw synchronously. Without
2872
+ * this normalization, one such throw aborts {@link _startQueueInternal} while
2873
+ * it is still collecting listener promises, so listeners started earlier are
2874
+ * never awaited and later queues are never started.
2875
+ */
2876
+ #listenQueue(queue, ctxData, signal) {
2877
+ try {
2878
+ return queue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal });
2879
+ } catch (error) {
2880
+ return Promise.reject(error);
2881
+ }
2882
+ }
2866
2883
  async _startQueueInternal(ctxData, signal, queue) {
2867
2884
  if (this.inboxQueue == null && this.outboxQueue == null) return;
2868
2885
  const logger = (0, _logtape_logtape.getLogger)([
@@ -2874,20 +2891,38 @@ var FederationImpl = class extends FederationBuilderImpl {
2874
2891
  if (this.inboxQueue != null && (queue == null || queue === "inbox") && !this.inboxQueueStarted) {
2875
2892
  logger.debug("Starting an inbox task worker.");
2876
2893
  this.inboxQueueStarted = true;
2877
- promises.push(this.inboxQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
2894
+ promises.push(this.#listenQueue(this.inboxQueue, ctxData, signal));
2878
2895
  }
2879
2896
  if (this.outboxQueue != null && this.outboxQueue !== this.inboxQueue && (queue == null || queue === "outbox") && !this.outboxQueueStarted) {
2880
2897
  logger.debug("Starting an outbox task worker.");
2881
2898
  this.outboxQueueStarted = true;
2882
- promises.push(this.outboxQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
2899
+ promises.push(this.#listenQueue(this.outboxQueue, ctxData, signal));
2883
2900
  }
2884
2901
  if (this.fanoutQueue != null && this.fanoutQueue !== this.inboxQueue && this.fanoutQueue !== this.outboxQueue && (queue == null || queue === "fanout") && !this.fanoutQueueStarted) {
2885
2902
  logger.debug("Starting a fanout task worker.");
2886
2903
  this.fanoutQueueStarted = true;
2887
- promises.push(this.fanoutQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
2904
+ promises.push(this.#listenQueue(this.fanoutQueue, ctxData, signal));
2888
2905
  }
2889
2906
  await Promise.all(promises);
2890
2907
  }
2908
+ /**
2909
+ * Starts the queue workers automatically, reporting a failure instead of
2910
+ * leaving the returned promise unobserved.
2911
+ *
2912
+ * Automatic startup is best-effort: call sites cannot await it, so a failing
2913
+ * listener (e.g., `WorkersMessageQueue`, whose `listen()` throws) must not
2914
+ * become an unhandled rejection. {@link startQueue} keeps rejecting for
2915
+ * callers that start workers deliberately.
2916
+ */
2917
+ _startQueueAutomatically(ctxData) {
2918
+ this._startQueueInternal(ctxData).catch((error) => {
2919
+ (0, _logtape_logtape.getLogger)([
2920
+ "fedify",
2921
+ "federation",
2922
+ "queue"
2923
+ ]).warn("Failed to start queue workers automatically: {error}", { error });
2924
+ });
2925
+ }
2891
2926
  processQueuedTask(contextData, message) {
2892
2927
  const tracer = this._getTracer();
2893
2928
  const extractedContext = _opentelemetry_api.propagation.extract(_opentelemetry_api.context.active(), message.traceContext);
@@ -3471,7 +3506,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3471
3506
  privateKey: privateKeyJwk
3472
3507
  });
3473
3508
  }
3474
- if (!this.manuallyStartQueue) this._startQueueInternal(ctx.data);
3509
+ if (!this.manuallyStartQueue) this._startQueueAutomatically(ctx.data);
3475
3510
  const carrier = {};
3476
3511
  _opentelemetry_api.propagation.inject(_opentelemetry_api.context.active(), carrier);
3477
3512
  const messages = [];
@@ -3683,7 +3718,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3683
3718
  const identity = await this.sharedInboxKeyDispatcher(context);
3684
3719
  if (identity != null) context = this.#createContext(request, contextData, { documentLoader: "identifier" in identity || "username" in identity ? await context.getDocumentLoader(identity) : context.getDocumentLoader(identity) });
3685
3720
  }
3686
- if (!this.manuallyStartQueue) this._startQueueInternal(contextData);
3721
+ if (!this.manuallyStartQueue) this._startQueueAutomatically(contextData);
3687
3722
  const inboxContextFactory = context.toInboxContext.bind(context);
3688
3723
  inboxContextFactory[rawInboxContextFactorySymbol] = context.toInboxContext.bind(context);
3689
3724
  return await handleInbox(request, {
@@ -4290,7 +4325,7 @@ var ContextImpl = class ContextImpl {
4290
4325
  orderingKey: options.orderingKey,
4291
4326
  traceContext: carrier
4292
4327
  };
4293
- if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
4328
+ if (!this.federation.manuallyStartQueue) this.federation._startQueueAutomatically(this.data);
4294
4329
  await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
4295
4330
  }
4296
4331
  async *getFollowers(identifier) {
@@ -1,4 +1,4 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_middleware = require("./middleware-CXoG7ZAW.cjs");
3
+ const require_middleware = require("./middleware-C_fDk_dx.cjs");
4
4
  exports.FederationImpl = require_middleware.FederationImpl;
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-CnoWxuoB.cjs";
2
+ import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-ao-qb3eP.cjs";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-lxjaUTAI.js";
2
+ import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-C00pWP8x.js";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
package/dist/mod.cjs CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("./chunk-DDcVe30Y.cjs");
5
5
  const require_transformers = require("./transformers-NeAONrAq.cjs");
6
6
  require("./compat/mod.cjs");
7
- const require_http = require("./http-CO_IVq7x.cjs");
8
- const require_middleware = require("./middleware-CXoG7ZAW.cjs");
7
+ const require_http = require("./http-D69BMfAn.cjs");
8
+ const require_middleware = require("./middleware-C_fDk_dx.cjs");
9
9
  const require_types = require("./types-DOvyymM4.cjs");
10
- const require_proof = require("./proof-BrreJTRF.cjs");
11
- const require_kv_cache = require("./kv-cache-BMlo_kyv.cjs");
10
+ const require_proof = require("./proof-DNgQwz9E.cjs");
11
+ const require_kv_cache = require("./kv-cache-B0JZ30EF.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -2,10 +2,10 @@
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-BIBzqEIp.cjs";
3
3
  import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-DFqAb11b.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-B3hNQCG8.cjs";
5
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-CnoWxuoB.cjs";
5
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-ao-qb3eP.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CZKl1IUS.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-w1oyHseQ.cjs";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-6uJWdCc0.cjs";
9
9
  import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-BA6vqC2S.cjs";
10
10
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BPDfu4Ey.cjs";
11
11
  export * from "@fedify/vocab-runtime";
package/dist/mod.d.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-jE7oGvRh.js";
3
3
  import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-Cd8UD1ym.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CiBPcC6F.js";
5
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-lxjaUTAI.js";
5
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-C00pWP8x.js";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CxaI4eGo.js";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-I-34OMN3.js";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-DtRh015i.js";
9
9
  import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-CL9Ep0uo.js";
10
10
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DGP89q0u.js";
11
11
  export * from "@fedify/vocab-runtime";
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./chunk-CRNNMoPX.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
5
5
  import "./compat/mod.js";
6
- import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-CfyVeGgF.js";
7
- 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-BKs_a9P1.js";
6
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-CrEB4I8A.js";
7
+ 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-CEufJR5k.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-B1_pRFE_.js";
9
- import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-CE8nwTF6.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-Zw0soD-7.js";
9
+ import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-DwooE8kV.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CDvE8__9.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-DflMZha5.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
8
- import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-BhYpLGA_.mjs";
8
+ import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-C849kmHB.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -1,8 +1,8 @@
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--OYa_lxj.mjs";
5
- import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-D5e9c_yV.mjs";
4
+ import { n as version, t as name } from "./deno-Dv6PIwH_.mjs";
5
+ import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-ChKDZfvS.mjs";
6
6
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno--OYa_lxj.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-D5e9c_yV.mjs";
4
+ import { n as version, t as name } from "./deno-Dv6PIwH_.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-ChKDZfvS.mjs";
6
6
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getLogger } from "@logtape/logtape";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  const require_chunk = require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-CO_IVq7x.cjs");
4
+ const require_http = require("./http-D69BMfAn.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let _fedify_vocab = require("@fedify/vocab");
7
7
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as fetchActorDocument, d as name, f as version, i as exportJwk, l as validateCryptoKey, o as fetchKey, u as verifyKeyOwnership } from "./http-CfyVeGgF.js";
3
+ import { a as fetchActorDocument, d as name, f as version, i as exportJwk, l as validateCryptoKey, o as fetchKey, u as verifyKeyOwnership } from "./http-CrEB4I8A.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,8 +1,8 @@
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--OYa_lxj.mjs";
5
- import { r as doubleKnockScoped } from "./http-C3d2DXwF.mjs";
4
+ import { n as version, t as name } from "./deno-Dv6PIwH_.mjs";
5
+ import { r as doubleKnockScoped } from "./http-BWoAqky4.mjs";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
8
8
  import { openDirectFetch, openPublicFetch } from "@fedify/vocab-runtime/internal";
@@ -7,8 +7,8 @@ import { i as assertExists, t as assertStringIncludes } from "../std__assert-Dfl
7
7
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
8
8
  import { t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
10
- import { t as exportJwk } from "../key-D5e9c_yV.mjs";
11
- import { a as formatRfc9421SignatureParameters, c as signRequest, i as formatRfc9421Signature, l as timingSafeEqual, n as doubleKnock, o as parseRfc9421Signature, r as doubleKnockScoped, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as verifyRequest } from "../http-C3d2DXwF.mjs";
10
+ import { t as exportJwk } from "../key-ChKDZfvS.mjs";
11
+ import { a as formatRfc9421SignatureParameters, c as signRequest, i as formatRfc9421Signature, l as timingSafeEqual, n as doubleKnock, o as parseRfc9421Signature, r as doubleKnockScoped, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as verifyRequest } from "../http-BWoAqky4.mjs";
12
12
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CCxRJhWa.mjs";
13
13
  import { mockDocumentLoader, test } from "@fedify/fixture";
14
14
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -6,9 +6,9 @@ import { n as assertStrictEquals } from "../std__assert-DflMZha5.mjs";
6
6
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
7
7
  import { t as assert } from "../assert-BhQd8QHP.mjs";
8
8
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
9
- import { a as importJwk, i as generateCryptoKeyPair, o as validateCryptoKey, r as fetchKey, t as exportJwk } from "../key-D5e9c_yV.mjs";
9
+ import { a as importJwk, i as generateCryptoKeyPair, o as validateCryptoKey, r as fetchKey, t as exportJwk } from "../key-ChKDZfvS.mjs";
10
10
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
11
- import { g as wrapContextLoaderForJsonLd } from "../ld-9qfz9rP_.mjs";
11
+ import { g as wrapContextLoaderForJsonLd } from "../ld-DbSNiv8Q.mjs";
12
12
  import { mockDocumentLoader, test } from "@fedify/fixture";
13
13
  import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
14
14
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
6
6
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
8
- import { i as generateCryptoKeyPair } from "../key-D5e9c_yV.mjs";
8
+ import { i as generateCryptoKeyPair } from "../key-ChKDZfvS.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
10
- import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-9qfz9rP_.mjs";
10
+ import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-DbSNiv8Q.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { CryptographicKey } from "@fedify/vocab";
13
13
  import { encodeBase64 } from "byte-encodings/base64";