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

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 (47) hide show
  1. package/dist/{builder-BC3eRIbe.mjs → builder-D6LGNjSj.mjs} +3 -3
  2. package/dist/compat/transformers.test.mjs +1 -1
  3. package/dist/{deno-Dv6PIwH_.mjs → deno-DnlTCwP9.mjs} +1 -1
  4. package/dist/{docloader-BgHM-JLc.mjs → docloader-ClA1cBXp.mjs} +2 -2
  5. package/dist/federation/builder.test.mjs +1 -1
  6. package/dist/federation/handler.test.mjs +6 -6
  7. package/dist/federation/idempotency.test.mjs +2 -2
  8. package/dist/federation/inbox.test.mjs +1 -1
  9. package/dist/federation/middleware.test.mjs +385 -6
  10. package/dist/federation/mod.cjs +1 -1
  11. package/dist/federation/mod.js +1 -1
  12. package/dist/federation/send.test.mjs +3 -3
  13. package/dist/federation/temporal.test.mjs +1 -1
  14. package/dist/federation/webfinger.test.mjs +1 -1
  15. package/dist/{http-D69BMfAn.cjs → http-CUyMHX68.cjs} +1 -1
  16. package/dist/{http-CrEB4I8A.js → http-Cqbz1vSQ.js} +1 -1
  17. package/dist/{http-BWoAqky4.mjs → http-pcUSzQJO.mjs} +2 -2
  18. package/dist/{inbox-0Dbv0QVc.mjs → inbox-Dvd92fR4.mjs} +1 -1
  19. package/dist/{key-ChKDZfvS.mjs → key-WbbcbEg2.mjs} +1 -1
  20. package/dist/{kv-cache-B0JZ30EF.cjs → kv-cache-C2CZ0wo0.cjs} +1 -1
  21. package/dist/{kv-cache-CDvE8__9.js → kv-cache-CFnt0ze9.js} +1 -1
  22. package/dist/{ld-DbSNiv8Q.mjs → ld-CQIFcE4D.mjs} +2 -2
  23. package/dist/{middleware-C_fDk_dx.cjs → middleware-BW7yDR0N.cjs} +46 -30
  24. package/dist/{middleware-CEufJR5k.js → middleware-C1wIK-Eo.js} +45 -29
  25. package/dist/{middleware-DCtCNota.cjs → middleware-CNSvd_Yd.cjs} +1 -1
  26. package/dist/{middleware-BA9cM-vz.mjs → middleware-DdgQlj3K.mjs} +1 -1
  27. package/dist/{middleware-C849kmHB.mjs → middleware-pG3fni-8.mjs} +53 -37
  28. package/dist/mod.cjs +4 -4
  29. package/dist/mod.js +4 -4
  30. package/dist/nodeinfo/handler.test.mjs +1 -1
  31. package/dist/{owner-BJeJfxnT.mjs → owner-U2uzi8vw.mjs} +2 -2
  32. package/dist/{proof-DNgQwz9E.cjs → proof-Czu16ywv.cjs} +1 -1
  33. package/dist/{proof-DwooE8kV.js → proof-DlcTuXU1.js} +1 -1
  34. package/dist/{proof-CaMBdk_x.mjs → proof-DuGHbMbs.mjs} +2 -2
  35. package/dist/{send-CYrAOC1K.mjs → send-JCtYxtYm.mjs} +2 -2
  36. package/dist/sig/http.test.mjs +2 -2
  37. package/dist/sig/key.test.mjs +2 -2
  38. package/dist/sig/ld.test.mjs +2 -2
  39. package/dist/sig/mod.cjs +2 -2
  40. package/dist/sig/mod.js +2 -2
  41. package/dist/sig/owner.test.mjs +1 -1
  42. package/dist/sig/proof.test.mjs +2 -2
  43. package/dist/{temporal-BJoGKOXy.mjs → temporal-B7Rg3f1o.mjs} +1 -1
  44. package/dist/utils/docloader.test.mjs +2 -2
  45. package/dist/utils/mod.cjs +1 -1
  46. package/dist/utils/mod.js +1 -1
  47. package/package.json +5 -5
@@ -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-Dv6PIwH_.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-ChKDZfvS.mjs";
4
+ import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-WbbcbEg2.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";
@@ -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-D69BMfAn.cjs");
5
+ const require_http = require("./http-CUyMHX68.cjs");
6
6
  const require_types = require("./types-DOvyymM4.cjs");
7
- const require_proof = require("./proof-DNgQwz9E.cjs");
8
- const require_kv_cache = require("./kv-cache-B0JZ30EF.cjs");
7
+ const require_proof = require("./proof-Czu16ywv.cjs");
8
+ const require_kv_cache = require("./kv-cache-C2CZ0wo0.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-DCtCNota.cjs"));
354
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-CNSvd_Yd.cjs"));
355
355
  const f = new FederationImpl(options);
356
356
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
357
357
  f.router = this.router.clone();
@@ -2881,7 +2881,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2881
2881
  }
2882
2882
  }
2883
2883
  async _startQueueInternal(ctxData, signal, queue) {
2884
- if (this.inboxQueue == null && this.outboxQueue == null) return;
2884
+ if (this.inboxQueue == null && this.outboxQueue == null && this.fanoutQueue == null) return;
2885
2885
  const logger = (0, _logtape_logtape.getLogger)([
2886
2886
  "fedify",
2887
2887
  "federation",
@@ -3479,19 +3479,27 @@ var FederationImpl = class extends FederationBuilderImpl {
3479
3479
  activity: jsonLd
3480
3480
  });
3481
3481
  const promises = [];
3482
- for (const inbox in inboxes) promises.push(sendActivity({
3483
- allowPrivateAddress: this.allowPrivateAddress,
3484
- keys,
3485
- activity: jsonLd,
3486
- activityId: activity.id?.href,
3487
- activityType: (0, _fedify_vocab.getTypeId)(activity).href,
3488
- inbox: new URL(inbox),
3489
- sharedInbox: inboxes[inbox].sharedInbox,
3490
- headers: collectionSync == null ? void 0 : new Headers({ "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) }),
3491
- specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec, this.firstKnock),
3492
- tracerProvider: this.tracerProvider
3493
- }));
3494
- await Promise.all(promises);
3482
+ try {
3483
+ for (const inbox in inboxes) {
3484
+ const promise = sendActivity({
3485
+ allowPrivateAddress: this.allowPrivateAddress,
3486
+ keys,
3487
+ activity: jsonLd,
3488
+ activityId: activity.id?.href,
3489
+ activityType: (0, _fedify_vocab.getTypeId)(activity).href,
3490
+ inbox: new URL(inbox),
3491
+ sharedInbox: inboxes[inbox].sharedInbox,
3492
+ headers: collectionSync == null ? void 0 : new Headers({ "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) }),
3493
+ specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec, this.firstKnock),
3494
+ tracerProvider: this.tracerProvider
3495
+ });
3496
+ promise.catch(() => {});
3497
+ promises.push(promise);
3498
+ }
3499
+ await Promise.all(promises);
3500
+ } finally {
3501
+ await Promise.allSettled(promises);
3502
+ }
3495
3503
  return;
3496
3504
  }
3497
3505
  logger.debug("Enqueuing activity {activityId} to send later.", {
@@ -4695,18 +4703,26 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
4695
4703
  if (options?.immediate) logger.debug("Forwarding activity immediately without queue since immediate option is set.");
4696
4704
  else logger.debug("Forwarding activity immediately without queue since queue is not set.");
4697
4705
  const promises = [];
4698
- for (const inbox in inboxes) promises.push(sendActivity({
4699
- allowPrivateAddress: this.federation.allowPrivateAddress,
4700
- keys,
4701
- activity: this.activity,
4702
- activityId: this.activityId,
4703
- activityType: this.activityType,
4704
- inbox: new URL(inbox),
4705
- sharedInbox: inboxes[inbox].sharedInbox,
4706
- tracerProvider: this.tracerProvider,
4707
- specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec, this.federation.firstKnock)
4708
- }));
4709
- await Promise.all(promises);
4706
+ try {
4707
+ for (const inbox in inboxes) {
4708
+ const promise = sendActivity({
4709
+ allowPrivateAddress: this.federation.allowPrivateAddress,
4710
+ keys,
4711
+ activity: this.activity,
4712
+ activityId: this.activityId,
4713
+ activityType: this.activityType,
4714
+ inbox: new URL(inbox),
4715
+ sharedInbox: inboxes[inbox].sharedInbox,
4716
+ tracerProvider: this.tracerProvider,
4717
+ specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec, this.federation.firstKnock)
4718
+ });
4719
+ promise.catch(() => {});
4720
+ promises.push(promise);
4721
+ }
4722
+ await Promise.all(promises);
4723
+ } finally {
4724
+ await Promise.allSettled(promises);
4725
+ }
4710
4726
  return;
4711
4727
  }
4712
4728
  logger.debug("Enqueuing activity {activityId} to forward later.", {
@@ -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-CrEB4I8A.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-Cqbz1vSQ.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-DwooE8kV.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CDvE8__9.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-DlcTuXU1.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CFnt0ze9.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";
@@ -2887,7 +2887,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2887
2887
  }
2888
2888
  }
2889
2889
  async _startQueueInternal(ctxData, signal, queue) {
2890
- if (this.inboxQueue == null && this.outboxQueue == null) return;
2890
+ if (this.inboxQueue == null && this.outboxQueue == null && this.fanoutQueue == null) return;
2891
2891
  const logger = getLogger([
2892
2892
  "fedify",
2893
2893
  "federation",
@@ -3485,19 +3485,27 @@ var FederationImpl = class extends FederationBuilderImpl {
3485
3485
  activity: jsonLd
3486
3486
  });
3487
3487
  const promises = [];
3488
- for (const inbox in inboxes) promises.push(sendActivity({
3489
- allowPrivateAddress: this.allowPrivateAddress,
3490
- keys,
3491
- activity: jsonLd,
3492
- activityId: activity.id?.href,
3493
- activityType: getTypeId(activity).href,
3494
- inbox: new URL(inbox),
3495
- sharedInbox: inboxes[inbox].sharedInbox,
3496
- headers: collectionSync == null ? void 0 : new Headers({ "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) }),
3497
- specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec, this.firstKnock),
3498
- tracerProvider: this.tracerProvider
3499
- }));
3500
- await Promise.all(promises);
3488
+ try {
3489
+ for (const inbox in inboxes) {
3490
+ const promise = sendActivity({
3491
+ allowPrivateAddress: this.allowPrivateAddress,
3492
+ keys,
3493
+ activity: jsonLd,
3494
+ activityId: activity.id?.href,
3495
+ activityType: getTypeId(activity).href,
3496
+ inbox: new URL(inbox),
3497
+ sharedInbox: inboxes[inbox].sharedInbox,
3498
+ headers: collectionSync == null ? void 0 : new Headers({ "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) }),
3499
+ specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec, this.firstKnock),
3500
+ tracerProvider: this.tracerProvider
3501
+ });
3502
+ promise.catch(() => {});
3503
+ promises.push(promise);
3504
+ }
3505
+ await Promise.all(promises);
3506
+ } finally {
3507
+ await Promise.allSettled(promises);
3508
+ }
3501
3509
  return;
3502
3510
  }
3503
3511
  logger.debug("Enqueuing activity {activityId} to send later.", {
@@ -4701,18 +4709,26 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
4701
4709
  if (options?.immediate) logger.debug("Forwarding activity immediately without queue since immediate option is set.");
4702
4710
  else logger.debug("Forwarding activity immediately without queue since queue is not set.");
4703
4711
  const promises = [];
4704
- for (const inbox in inboxes) promises.push(sendActivity({
4705
- allowPrivateAddress: this.federation.allowPrivateAddress,
4706
- keys,
4707
- activity: this.activity,
4708
- activityId: this.activityId,
4709
- activityType: this.activityType,
4710
- inbox: new URL(inbox),
4711
- sharedInbox: inboxes[inbox].sharedInbox,
4712
- tracerProvider: this.tracerProvider,
4713
- specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec, this.federation.firstKnock)
4714
- }));
4715
- await Promise.all(promises);
4712
+ try {
4713
+ for (const inbox in inboxes) {
4714
+ const promise = sendActivity({
4715
+ allowPrivateAddress: this.federation.allowPrivateAddress,
4716
+ keys,
4717
+ activity: this.activity,
4718
+ activityId: this.activityId,
4719
+ activityType: this.activityType,
4720
+ inbox: new URL(inbox),
4721
+ sharedInbox: inboxes[inbox].sharedInbox,
4722
+ tracerProvider: this.tracerProvider,
4723
+ specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec, this.federation.firstKnock)
4724
+ });
4725
+ promise.catch(() => {});
4726
+ promises.push(promise);
4727
+ }
4728
+ await Promise.all(promises);
4729
+ } finally {
4730
+ await Promise.allSettled(promises);
4731
+ }
4716
4732
  return;
4717
4733
  }
4718
4734
  logger.debug("Enqueuing activity {activityId} to forward later.", {
@@ -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-C_fDk_dx.cjs");
3
+ const require_middleware = require("./middleware-BW7yDR0N.cjs");
4
4
  exports.FederationImpl = require_middleware.FederationImpl;
@@ -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-C849kmHB.mjs";
4
+ import { n as FederationImpl } from "./middleware-pG3fni-8.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-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";
5
+ import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
6
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-WbbcbEg2.mjs";
7
+ import { u as verifyRequest } from "./http-pcUSzQJO.mjs";
8
+ import { n as getAuthenticatedDocumentLoader } from "./docloader-ClA1cBXp.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-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";
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-CQIFcE4D.mjs";
11
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-U2uzi8vw.mjs";
12
+ import { n as signObject, r as verifyObject } from "./proof-DuGHbMbs.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-0Dbv0QVc.mjs";
16
- import { t as FederationBuilderImpl } from "./builder-BC3eRIbe.mjs";
15
+ import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-Dvd92fR4.mjs";
16
+ import { t as FederationBuilderImpl } from "./builder-D6LGNjSj.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-BJoGKOXy.mjs";
20
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-B7Rg3f1o.mjs";
21
21
  import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
22
- import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-CYrAOC1K.mjs";
22
+ import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-JCtYxtYm.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";
@@ -1550,7 +1550,7 @@ var FederationImpl = class extends FederationBuilderImpl {
1550
1550
  }
1551
1551
  }
1552
1552
  async _startQueueInternal(ctxData, signal, queue) {
1553
- if (this.inboxQueue == null && this.outboxQueue == null) return;
1553
+ if (this.inboxQueue == null && this.outboxQueue == null && this.fanoutQueue == null) return;
1554
1554
  const logger = getLogger([
1555
1555
  "fedify",
1556
1556
  "federation",
@@ -2148,19 +2148,27 @@ var FederationImpl = class extends FederationBuilderImpl {
2148
2148
  activity: jsonLd
2149
2149
  });
2150
2150
  const promises = [];
2151
- for (const inbox in inboxes) promises.push(sendActivity({
2152
- allowPrivateAddress: this.allowPrivateAddress,
2153
- keys,
2154
- activity: jsonLd,
2155
- activityId: activity.id?.href,
2156
- activityType: getTypeId(activity).href,
2157
- inbox: new URL(inbox),
2158
- sharedInbox: inboxes[inbox].sharedInbox,
2159
- headers: collectionSync == null ? void 0 : new Headers({ "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) }),
2160
- specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec, this.firstKnock),
2161
- tracerProvider: this.tracerProvider
2162
- }));
2163
- await Promise.all(promises);
2151
+ try {
2152
+ for (const inbox in inboxes) {
2153
+ const promise = sendActivity({
2154
+ allowPrivateAddress: this.allowPrivateAddress,
2155
+ keys,
2156
+ activity: jsonLd,
2157
+ activityId: activity.id?.href,
2158
+ activityType: getTypeId(activity).href,
2159
+ inbox: new URL(inbox),
2160
+ sharedInbox: inboxes[inbox].sharedInbox,
2161
+ headers: collectionSync == null ? void 0 : new Headers({ "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) }),
2162
+ specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec, this.firstKnock),
2163
+ tracerProvider: this.tracerProvider
2164
+ });
2165
+ promise.catch(() => {});
2166
+ promises.push(promise);
2167
+ }
2168
+ await Promise.all(promises);
2169
+ } finally {
2170
+ await Promise.allSettled(promises);
2171
+ }
2164
2172
  return;
2165
2173
  }
2166
2174
  logger.debug("Enqueuing activity {activityId} to send later.", {
@@ -3364,18 +3372,26 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
3364
3372
  if (options?.immediate) logger.debug("Forwarding activity immediately without queue since immediate option is set.");
3365
3373
  else logger.debug("Forwarding activity immediately without queue since queue is not set.");
3366
3374
  const promises = [];
3367
- for (const inbox in inboxes) promises.push(sendActivity({
3368
- allowPrivateAddress: this.federation.allowPrivateAddress,
3369
- keys,
3370
- activity: this.activity,
3371
- activityId: this.activityId,
3372
- activityType: this.activityType,
3373
- inbox: new URL(inbox),
3374
- sharedInbox: inboxes[inbox].sharedInbox,
3375
- tracerProvider: this.tracerProvider,
3376
- specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec, this.federation.firstKnock)
3377
- }));
3378
- await Promise.all(promises);
3375
+ try {
3376
+ for (const inbox in inboxes) {
3377
+ const promise = sendActivity({
3378
+ allowPrivateAddress: this.federation.allowPrivateAddress,
3379
+ keys,
3380
+ activity: this.activity,
3381
+ activityId: this.activityId,
3382
+ activityType: this.activityType,
3383
+ inbox: new URL(inbox),
3384
+ sharedInbox: inboxes[inbox].sharedInbox,
3385
+ tracerProvider: this.tracerProvider,
3386
+ specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec, this.federation.firstKnock)
3387
+ });
3388
+ promise.catch(() => {});
3389
+ promises.push(promise);
3390
+ }
3391
+ await Promise.all(promises);
3392
+ } finally {
3393
+ await Promise.allSettled(promises);
3394
+ }
3379
3395
  return;
3380
3396
  }
3381
3397
  logger.debug("Enqueuing activity {activityId} to forward later.", {
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-D69BMfAn.cjs");
8
- const require_middleware = require("./middleware-C_fDk_dx.cjs");
7
+ const require_http = require("./http-CUyMHX68.cjs");
8
+ const require_middleware = require("./middleware-BW7yDR0N.cjs");
9
9
  const require_types = require("./types-DOvyymM4.cjs");
10
- const require_proof = require("./proof-DNgQwz9E.cjs");
11
- const require_kv_cache = require("./kv-cache-B0JZ30EF.cjs");
10
+ const require_proof = require("./proof-Czu16ywv.cjs");
11
+ const require_kv_cache = require("./kv-cache-C2CZ0wo0.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.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-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";
6
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-Cqbz1vSQ.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-C1wIK-Eo.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-DwooE8kV.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CDvE8__9.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-DlcTuXU1.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CFnt0ze9.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-C849kmHB.mjs";
8
+ import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-pG3fni-8.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-Dv6PIwH_.mjs";
5
- import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-ChKDZfvS.mjs";
4
+ import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
5
+ import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-WbbcbEg2.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,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-D69BMfAn.cjs");
4
+ const require_http = require("./http-CUyMHX68.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-CrEB4I8A.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-Cqbz1vSQ.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 { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-Dv6PIwH_.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-ChKDZfvS.mjs";
4
+ import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-WbbcbEg2.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,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-Dv6PIwH_.mjs";
5
- import { r as doubleKnockScoped } from "./http-BWoAqky4.mjs";
4
+ import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
5
+ import { r as doubleKnockScoped } from "./http-pcUSzQJO.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-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";
10
+ import { t as exportJwk } from "../key-WbbcbEg2.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-pcUSzQJO.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-ChKDZfvS.mjs";
9
+ import { a as importJwk, i as generateCryptoKeyPair, o as validateCryptoKey, r as fetchKey, t as exportJwk } from "../key-WbbcbEg2.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-DbSNiv8Q.mjs";
11
+ import { g as wrapContextLoaderForJsonLd } from "../ld-CQIFcE4D.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-ChKDZfvS.mjs";
8
+ import { i as generateCryptoKeyPair } from "../key-WbbcbEg2.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-DbSNiv8Q.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-CQIFcE4D.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { CryptographicKey } from "@fedify/vocab";
13
13
  import { encodeBase64 } from "byte-encodings/base64";
package/dist/sig/mod.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const require_http = require("../http-D69BMfAn.cjs");
5
- const require_proof = require("../proof-DNgQwz9E.cjs");
4
+ const require_http = require("../http-CUyMHX68.cjs");
5
+ const require_proof = require("../proof-Czu16ywv.cjs");
6
6
  exports.attachSignature = require_proof.attachSignature;
7
7
  exports.createProof = require_proof.createProof;
8
8
  exports.createSignature = require_proof.createSignature;
package/dist/sig/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "../http-CrEB4I8A.js";
4
- 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";
3
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "../http-Cqbz1vSQ.js";
4
+ 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-DlcTuXU1.js";
5
5
  export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
@@ -6,7 +6,7 @@ import "../std__assert-DflMZha5.mjs";
6
6
  import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
7
7
  import { t as assert } from "../assert-BhQd8QHP.mjs";
8
8
  import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CCxRJhWa.mjs";
9
- import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-BJeJfxnT.mjs";
9
+ import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-U2uzi8vw.mjs";
10
10
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
12
12
  //#region src/sig/owner.test.ts
@@ -6,8 +6,8 @@ import "../std__assert-DflMZha5.mjs";
6
6
  import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
8
8
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
9
- import { f as signJsonLd, h as verifySignature, s as detachSignature } from "../ld-DbSNiv8Q.mjs";
10
- import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-CaMBdk_x.mjs";
9
+ import { f as signJsonLd, h as verifySignature, s as detachSignature } from "../ld-CQIFcE4D.mjs";
10
+ import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-DuGHbMbs.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { Create, DataIntegrityProof, Multikey, Note, Place } from "@fedify/vocab";
13
13
  import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { c as getNormalizationContextLoader } from "./ld-DbSNiv8Q.mjs";
4
+ import { c as getNormalizationContextLoader } from "./ld-CQIFcE4D.mjs";
5
5
  import jsonld from "@fedify/vocab-runtime/jsonld";
6
6
  import { normalizeDateTimeLiteral } from "@fedify/vocab-runtime/temporal";
7
7
  //#region src/federation/temporal.ts
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-DflMZha5.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
8
- import { u as verifyRequest } from "../http-BWoAqky4.mjs";
8
+ import { u as verifyRequest } from "../http-pcUSzQJO.mjs";
9
9
  import { i as rsaPrivateKey2 } from "../keys-CCxRJhWa.mjs";
10
- import { n as getAuthenticatedDocumentLoader, t as createAuthenticatedDocumentLoader } from "../docloader-BgHM-JLc.mjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as createAuthenticatedDocumentLoader } from "../docloader-ClA1cBXp.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
13
13
  import { openDirectFetch, openPublicFetch } from "@fedify/vocab-runtime/internal";
@@ -1,6 +1,6 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const require_kv_cache = require("../kv-cache-B0JZ30EF.cjs");
4
+ const require_kv_cache = require("../kv-cache-C2CZ0wo0.cjs");
5
5
  exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
6
6
  exports.kvCache = require_kv_cache.kvCache;
package/dist/utils/mod.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-CDvE8__9.js";
3
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-CFnt0ze9.js";
4
4
  export { getAuthenticatedDocumentLoader, kvCache };