@fedify/fedify 2.0.0-pr.435.1667 → 2.0.0-pr.445.1694

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 (147) hide show
  1. package/dist/{actor-C3gJhZJj.cjs → actor-CwZ2m5rG.cjs} +7263 -2440
  2. package/dist/{actor-DMgu-ZjT.d.cts → actor-D6K058Tb.d.cts} +1 -1
  3. package/dist/{actor-Cpal85xW.js → actor-D8gCwLzv.js} +1 -1
  4. package/dist/{actor-CnVfp1Hp.js → actor-DoMcqXsW.js} +7263 -2440
  5. package/dist/{actor-C22bXuuC.d.ts → actor-T6RyhRgk.d.ts} +1 -1
  6. package/dist/{assert_rejects-7UF4R_Qs.js → assert_rejects-DiIiJbZn.js} +1 -1
  7. package/dist/{assert_throws-53_pKeP3.js → assert_throws-BOO88avQ.js} +1 -1
  8. package/dist/{authdocloader-DWnwkjvZ.js → authdocloader-Cv_qEn1G.js} +3 -3
  9. package/dist/{authdocloader-Df2BFefL.js → authdocloader-DYTNpaMA.js} +3 -3
  10. package/dist/{authdocloader-DPCGwidE.cjs → authdocloader-bsmVF6eO.cjs} +3 -3
  11. package/dist/{builder-CMxichO9.js → builder-1_skw-d2.js} +10 -4
  12. package/dist/{client-BqyuOGiQ.js → client-D5CBsPrc.js} +1 -1
  13. package/dist/compat/mod.d.cts +7 -7
  14. package/dist/compat/mod.d.ts +7 -7
  15. package/dist/compat/transformers.test.js +18 -17
  16. package/dist/{context-CDSZdQHD.d.ts → context-DBKpNBnc.d.ts} +66 -12
  17. package/dist/{context-Dq8aCtMH.d.cts → context-DiqjMRef.d.cts} +66 -12
  18. package/dist/{docloader-B1O1Z5OK.cjs → docloader-CYnQRIXv.cjs} +2 -2
  19. package/dist/{docloader-xJVzq9O0.js → docloader-Czl3xV10.js} +2 -2
  20. package/dist/{esm-BBznxjVc.js → esm-Dl5T1RNE.js} +1 -1
  21. package/dist/federation/builder.test.js +10 -10
  22. package/dist/federation/collection.test.js +8 -8
  23. package/dist/federation/handler.test.js +26 -145
  24. package/dist/federation/idempotency.test.d.ts +3 -0
  25. package/dist/federation/idempotency.test.js +202 -0
  26. package/dist/federation/inbox.test.js +6 -6
  27. package/dist/federation/keycache.test.js +4 -4
  28. package/dist/federation/kv.test.js +8 -8
  29. package/dist/federation/middleware.test.js +238 -44
  30. package/dist/federation/mod.cjs +10 -10
  31. package/dist/federation/mod.d.cts +7 -7
  32. package/dist/federation/mod.d.ts +7 -7
  33. package/dist/federation/mod.js +10 -10
  34. package/dist/federation/mq.test.js +10 -10
  35. package/dist/federation/negotiation.test.d.ts +3 -0
  36. package/dist/federation/negotiation.test.js +28 -0
  37. package/dist/federation/retry.test.js +5 -5
  38. package/dist/federation/router.test.js +8 -8
  39. package/dist/federation/send.test.js +15 -15
  40. package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
  41. package/dist/{http-Hw9HJp9i.cjs → http-CAusBl_3.cjs} +3 -3
  42. package/dist/{http-CovAm6we.js → http-C_Qc2neP.js} +3 -3
  43. package/dist/{http-y7khnX5Q.js → http-CuS-d4U0.js} +2 -2
  44. package/dist/{http-BS6766zs.d.cts → http-D-e6AFwR.d.cts} +1 -1
  45. package/dist/{http-DqSNLFNY.d.ts → http-D6Uj2x2y.d.ts} +1 -1
  46. package/dist/{inbox-DpcYOzs8.js → inbox-IETv_Qez.js} +24 -7
  47. package/dist/{key-BRmlopJL.js → key-BNJQQm3h.js} +2 -2
  48. package/dist/{key-lapZwBwG.js → key-C_ruQbbl.js} +4 -4
  49. package/dist/key-DIMJMxf4.cjs +10 -0
  50. package/dist/{key-DORX19Bl.js → key-DnqhSgAv.js} +2 -2
  51. package/dist/{key-jf6dIIF-.js → key-DpFjiItf.js} +3 -3
  52. package/dist/{key-CzF9SAEI.cjs → key-DuXv64tg.cjs} +2 -2
  53. package/dist/{keycache-AH1uj1j-.js → keycache-CSBkusP8.js} +1 -1
  54. package/dist/{keys-B3fzLXBG.js → keys-D3_MDK7n.js} +1 -1
  55. package/dist/{ld-D3cq9xO1.js → ld-Isot0tiW.js} +2 -2
  56. package/dist/{lookup-BrhURkmj.js → lookup-CbtuFbtg.js} +21 -12
  57. package/dist/{lookup-7u217Q3H.cjs → lookup-D6dro5Au.cjs} +1 -1
  58. package/dist/{lookup-CfU0DgLr.js → lookup-Dhm78GlK.js} +1 -1
  59. package/dist/middleware-BpR6186a.js +26 -0
  60. package/dist/{middleware-DXWUGrBQ.js → middleware-BuHr2fzh.js} +73 -81
  61. package/dist/middleware-DDMxdtWM.cjs +17 -0
  62. package/dist/{middleware-BDN7YoYJ.js → middleware-DQYscW90.js} +47 -142
  63. package/dist/{middleware-Gsxukxs5.cjs → middleware-Dgmdgrvb.cjs} +73 -81
  64. package/dist/middleware-T-knSMwl.js +17 -0
  65. package/dist/{mod-Drmz72EK.d.ts → mod-BhUKmBJD.d.ts} +2 -2
  66. package/dist/{mod-BhMnAkFX.d.cts → mod-Bpb5QLaZ.d.cts} +2 -2
  67. package/dist/{mod-TFoH2Ql8.d.ts → mod-CerN_Sza.d.ts} +1 -1
  68. package/dist/{mod-Dc_-mf8s.d.cts → mod-Cj1tHXBR.d.cts} +1 -1
  69. package/dist/{mod-evzlRVZq.d.cts → mod-CxkWO3Mg.d.cts} +19 -1
  70. package/dist/{mod-RI3-KvUI.d.ts → mod-D_y2y32N.d.ts} +2 -2
  71. package/dist/{mod-BClfg3ej.d.cts → mod-Djzcw2ry.d.cts} +2 -2
  72. package/dist/{mod-Cxt4Kpf6.d.ts → mod-DlU8ISoa.d.ts} +19 -1
  73. package/dist/mod.cjs +10 -10
  74. package/dist/mod.d.cts +10 -10
  75. package/dist/mod.d.ts +10 -10
  76. package/dist/mod.js +10 -10
  77. package/dist/negotiation-5NPJL6zp.js +71 -0
  78. package/dist/nodeinfo/client.test.js +10 -10
  79. package/dist/nodeinfo/handler.test.js +23 -22
  80. package/dist/nodeinfo/mod.cjs +2 -2
  81. package/dist/nodeinfo/mod.js +2 -2
  82. package/dist/nodeinfo/types.test.js +8 -8
  83. package/dist/{owner-B-7Ptt_m.d.cts → owner-BN_tO3cY.d.cts} +2 -2
  84. package/dist/{owner-NFlQJyvM.js → owner-ChSL4aJ7.js} +2 -2
  85. package/dist/{owner-CQPnQVtf.d.ts → owner-hd9lvQcP.d.ts} +2 -2
  86. package/dist/{proof-Be1oOYEh.js → proof-BiSCuwyA.js} +3 -3
  87. package/dist/{proof-Gip91fK7.cjs → proof-ONNmhInb.cjs} +3 -3
  88. package/dist/{proof-ar9xgPWi.js → proof-x3IBewan.js} +2 -2
  89. package/dist/runtime/authdocloader.test.js +14 -14
  90. package/dist/runtime/docloader.test.js +9 -9
  91. package/dist/runtime/key.test.js +10 -10
  92. package/dist/runtime/langstr.test.js +8 -8
  93. package/dist/runtime/link.test.js +3 -3
  94. package/dist/runtime/mod.cjs +6 -6
  95. package/dist/runtime/mod.d.cts +3 -3
  96. package/dist/runtime/mod.d.ts +3 -3
  97. package/dist/runtime/mod.js +6 -6
  98. package/dist/runtime/multibase/multibase.test.js +8 -8
  99. package/dist/runtime/url.test.js +5 -5
  100. package/dist/{send-DkwkMFjJ.js → send-D5fjmUEj.js} +2 -2
  101. package/dist/sig/http.test.js +13 -13
  102. package/dist/sig/key.test.js +11 -11
  103. package/dist/sig/ld.test.js +10 -10
  104. package/dist/sig/mod.cjs +6 -6
  105. package/dist/sig/mod.d.cts +5 -5
  106. package/dist/sig/mod.d.ts +5 -5
  107. package/dist/sig/mod.js +6 -6
  108. package/dist/sig/owner.test.js +12 -12
  109. package/dist/sig/proof.test.js +12 -12
  110. package/dist/testing/docloader.test.js +8 -8
  111. package/dist/testing/mod.d.ts +272 -0
  112. package/dist/testing/mod.js +3 -3
  113. package/dist/{testing-BMBhkcz9.js → testing-tWr1VQxx.js} +2 -2
  114. package/dist/{type-FCer_9yh.js → type-DaUr3Il7.js} +6944 -2121
  115. package/dist/{types-CZ_qo9KW.cjs → types-D2Nyz0tR.cjs} +1 -1
  116. package/dist/{types-CNWeAz8v.js → types-DQuSDtDg.js} +1 -1
  117. package/dist/vocab/actor.test.js +10 -10
  118. package/dist/vocab/lookup.test.js +259 -9
  119. package/dist/vocab/mod.cjs +4 -4
  120. package/dist/vocab/mod.d.cts +3 -3
  121. package/dist/vocab/mod.d.ts +3 -3
  122. package/dist/vocab/mod.js +4 -4
  123. package/dist/vocab/type.test.js +3 -3
  124. package/dist/vocab/vocab.test.js +402 -13
  125. package/dist/{vocab-SOE1ifCr.d.ts → vocab-BI0Ak5lL.d.ts} +290 -0
  126. package/dist/{vocab-9MjZjuZb.cjs → vocab-Dd4VMrr0.cjs} +23 -14
  127. package/dist/{vocab-DJTYMqyU.d.cts → vocab-Dw1-yVGg.d.cts} +290 -0
  128. package/dist/{vocab-gpwUU9fc.js → vocab-w--qk7HF.js} +23 -14
  129. package/dist/webfinger/handler.test.js +23 -22
  130. package/dist/webfinger/lookup.test.js +9 -9
  131. package/dist/webfinger/mod.cjs +2 -2
  132. package/dist/webfinger/mod.js +2 -2
  133. package/dist/x/cfworkers.test.js +8 -8
  134. package/dist/x/hono.d.cts +6 -6
  135. package/dist/x/hono.d.ts +6 -6
  136. package/dist/x/sveltekit.d.cts +6 -6
  137. package/dist/x/sveltekit.d.ts +6 -6
  138. package/package.json +1 -1
  139. package/dist/key-CV3FT32G.cjs +0 -10
  140. package/dist/middleware-CV-OPMlZ.js +0 -17
  141. package/dist/middleware-DGqnaAbp.cjs +0 -17
  142. package/dist/middleware-cCdfTTMv.js +0 -25
  143. /package/dist/{assert_is_error-B035L3om.js → assert_is_error-BPGph1Jx.js} +0 -0
  144. /package/dist/{assert_not_equals-C80BG-_5.js → assert_not_equals-f3m3epl3.js} +0 -0
  145. /package/dist/{denokv-jZ0Z2h0M.js → denokv-Bv33Xxea.js} +0 -0
  146. /package/dist/{retry-CfF8Gn4d.js → retry-D4GJ670a.js} +0 -0
  147. /package/dist/{std__assert-DWivtrGR.js → std__assert-X-_kMxKM.js} +0 -0
@@ -4,15 +4,15 @@
4
4
 
5
5
  const require_chunk = require('./chunk-DqRYRqnO.cjs');
6
6
  const require_transformers = require('./transformers-CoBS-oFG.cjs');
7
- const require_docloader = require('./docloader-B1O1Z5OK.cjs');
8
- const require_actor = require('./actor-C3gJhZJj.cjs');
9
- const require_lookup = require('./lookup-7u217Q3H.cjs');
10
- const require_key = require('./key-CzF9SAEI.cjs');
11
- const require_http = require('./http-Hw9HJp9i.cjs');
12
- const require_proof = require('./proof-Gip91fK7.cjs');
13
- const require_types = require('./types-CZ_qo9KW.cjs');
14
- const require_authdocloader = require('./authdocloader-DPCGwidE.cjs');
15
- const require_vocab = require('./vocab-9MjZjuZb.cjs');
7
+ const require_docloader = require('./docloader-CYnQRIXv.cjs');
8
+ const require_actor = require('./actor-CwZ2m5rG.cjs');
9
+ const require_lookup = require('./lookup-D6dro5Au.cjs');
10
+ const require_key = require('./key-DuXv64tg.cjs');
11
+ const require_http = require('./http-CAusBl_3.cjs');
12
+ const require_proof = require('./proof-ONNmhInb.cjs');
13
+ const require_types = require('./types-D2Nyz0tR.cjs');
14
+ const require_authdocloader = require('./authdocloader-bsmVF6eO.cjs');
15
+ const require_vocab = require('./vocab-Dd4VMrr0.cjs');
16
16
  const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
17
17
  const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
18
18
  const byte_encodings_hex = require_chunk.__toESM(require("byte-encodings/hex"));
@@ -56,17 +56,34 @@ var InboxListenerSet = class InboxListenerSet {
56
56
  return this.dispatchWithClass(activity)?.listener ?? null;
57
57
  }
58
58
  };
59
- async function routeActivity({ context: ctx, json, activity, recipient, inboxListeners, inboxContextFactory, inboxErrorHandler, kv, kvPrefixes, queue, span, tracerProvider }) {
59
+ async function routeActivity({ context: ctx, json, activity, recipient, inboxListeners, inboxContextFactory, inboxErrorHandler, kv, kvPrefixes, queue, span, tracerProvider, idempotencyStrategy }) {
60
60
  const logger$1 = (0, __logtape_logtape.getLogger)([
61
61
  "fedify",
62
62
  "federation",
63
63
  "inbox"
64
64
  ]);
65
- const cacheKey = activity.id == null ? null : [
66
- ...kvPrefixes.activityIdempotence,
67
- ctx.origin,
68
- activity.id.href
69
- ];
65
+ let cacheKey = null;
66
+ if (activity.id != null) {
67
+ const inboxContext = inboxContextFactory(recipient, json, activity.id?.href, require_actor.getTypeId(activity).href);
68
+ const strategy = idempotencyStrategy ?? "per-inbox";
69
+ let keyString;
70
+ if (typeof strategy === "function") {
71
+ const result = await strategy(inboxContext, activity);
72
+ keyString = result;
73
+ } else switch (strategy) {
74
+ case "global":
75
+ keyString = activity.id.href;
76
+ break;
77
+ case "per-origin":
78
+ keyString = `${ctx.origin}\n${activity.id.href}`;
79
+ break;
80
+ case "per-inbox":
81
+ keyString = `${ctx.origin}\n${activity.id.href}\n${recipient == null ? "sharedInbox" : `inbox\n${recipient}`}`;
82
+ break;
83
+ default: keyString = `${ctx.origin}\n${activity.id.href}`;
84
+ }
85
+ if (keyString != null) cacheKey = [...kvPrefixes.activityIdempotence, keyString];
86
+ }
70
87
  if (cacheKey != null) {
71
88
  const cached = await kv.get(cacheKey);
72
89
  if (cached === true) {
@@ -308,6 +325,7 @@ var FederationBuilderImpl = class {
308
325
  inboxListeners;
309
326
  inboxErrorHandler;
310
327
  sharedInboxKeyDispatcher;
328
+ idempotencyStrategy;
311
329
  collectionTypeIds;
312
330
  collectionCallbacks;
313
331
  /**
@@ -322,7 +340,7 @@ var FederationBuilderImpl = class {
322
340
  this.collectionTypeIds = {};
323
341
  }
324
342
  async build(options) {
325
- const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-DGqnaAbp.cjs"));
343
+ const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-DDMxdtWM.cjs"));
326
344
  const f = new FederationImpl$1(options);
327
345
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
328
346
  f.router = this.router.clone();
@@ -344,6 +362,7 @@ var FederationBuilderImpl = class {
344
362
  f.inboxListeners = this.inboxListeners?.clone();
345
363
  f.inboxErrorHandler = this.inboxErrorHandler;
346
364
  f.sharedInboxKeyDispatcher = this.sharedInboxKeyDispatcher;
365
+ f.idempotencyStrategy = this.idempotencyStrategy;
347
366
  return f;
348
367
  }
349
368
  _getTracer() {
@@ -766,6 +785,10 @@ var FederationBuilderImpl = class {
766
785
  setSharedKeyDispatcher: (dispatcher) => {
767
786
  this.sharedInboxKeyDispatcher = dispatcher;
768
787
  return setters;
788
+ },
789
+ withIdempotency: (strategy) => {
790
+ this.idempotencyStrategy = strategy;
791
+ return setters;
769
792
  }
770
793
  };
771
794
  return setters;
@@ -980,9 +1003,6 @@ function preferredMediaTypes(accept) {
980
1003
  const accepts = parseAccept(accept === void 0 ? "*/*" : accept ?? "");
981
1004
  return accepts.filter(isQuality).sort(compareSpecs).map(getFullType);
982
1005
  }
983
-
984
- //#endregion
985
- //#region src/federation/handler.ts
986
1006
  function acceptsJsonLd(request) {
987
1007
  const accept = request.headers.get("Accept");
988
1008
  const types = accept ? preferredMediaTypes(accept) : ["*/*"];
@@ -990,6 +1010,9 @@ function acceptsJsonLd(request) {
990
1010
  if (types[0] === "text/html" || types[0] === "application/xhtml+xml") return false;
991
1011
  return types.includes("application/activity+json") || types.includes("application/ld+json") || types.includes("application/json");
992
1012
  }
1013
+
1014
+ //#endregion
1015
+ //#region src/federation/handler.ts
993
1016
  /**
994
1017
  * Handles an actor request.
995
1018
  * @template TContextData The context data to pass to the context.
@@ -997,7 +1020,7 @@ function acceptsJsonLd(request) {
997
1020
  * @param parameters The parameters for handling the actor.
998
1021
  * @returns A promise that resolves to an HTTP response.
999
1022
  */
1000
- async function handleActor(request, { identifier, context: context$2, actorDispatcher, authorizePredicate, onNotFound, onNotAcceptable, onUnauthorized }) {
1023
+ async function handleActor(request, { identifier, context: context$2, actorDispatcher, authorizePredicate, onNotFound, onUnauthorized }) {
1001
1024
  const logger$1 = (0, __logtape_logtape.getLogger)([
1002
1025
  "fedify",
1003
1026
  "federation",
@@ -1012,7 +1035,6 @@ async function handleActor(request, { identifier, context: context$2, actorDispa
1012
1035
  logger$1.debug("Actor {identifier} not found.", { identifier });
1013
1036
  return await onNotFound(request);
1014
1037
  }
1015
- if (!acceptsJsonLd(request)) return await onNotAcceptable(request);
1016
1038
  if (authorizePredicate != null) {
1017
1039
  let key = await context$2.getSignedKey();
1018
1040
  key = key?.clone({}, { $warning: {
@@ -1047,11 +1069,10 @@ async function handleActor(request, { identifier, context: context$2, actorDispa
1047
1069
  * @param parameters The parameters for handling the object.
1048
1070
  * @returns A promise that resolves to an HTTP response.
1049
1071
  */
1050
- async function handleObject(request, { values, context: context$2, objectDispatcher, authorizePredicate, onNotFound, onNotAcceptable, onUnauthorized }) {
1072
+ async function handleObject(request, { values, context: context$2, objectDispatcher, authorizePredicate, onNotFound, onUnauthorized }) {
1051
1073
  if (objectDispatcher == null) return await onNotFound(request);
1052
1074
  const object = await objectDispatcher(context$2, values);
1053
1075
  if (object == null) return await onNotFound(request);
1054
- if (!acceptsJsonLd(request)) return await onNotAcceptable(request);
1055
1076
  if (authorizePredicate != null) {
1056
1077
  let key = await context$2.getSignedKey();
1057
1078
  key = key?.clone({}, { $warning: {
@@ -1089,7 +1110,7 @@ async function handleObject(request, { values, context: context$2, objectDispatc
1089
1110
  * @param parameters The parameters for handling the collection.
1090
1111
  * @returns A promise that resolves to an HTTP response.
1091
1112
  */
1092
- async function handleCollection(request, { name, identifier, uriGetter, filter, filterPredicate, context: context$2, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound, onNotAcceptable }) {
1113
+ async function handleCollection(request, { name, identifier, uriGetter, filter, filterPredicate, context: context$2, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
1093
1114
  const spanName = name.trim().replace(/\s+/g, "_");
1094
1115
  tracerProvider = tracerProvider ?? __opentelemetry_api.trace.getTracerProvider();
1095
1116
  const tracer = tracerProvider.getTracer(require_docloader.deno_default.name, require_docloader.deno_default.version);
@@ -1202,7 +1223,6 @@ async function handleCollection(request, { name, identifier, uriGetter, filter,
1202
1223
  partOf
1203
1224
  });
1204
1225
  }
1205
- if (!acceptsJsonLd(request)) return await onNotAcceptable(request);
1206
1226
  if (collectionCallbacks.authorizePredicate != null) {
1207
1227
  let key = await context$2.getSignedKey();
1208
1228
  key = key?.clone({}, { $warning: {
@@ -1297,7 +1317,8 @@ async function handleInbox(request, options) {
1297
1317
  * @param span The OpenTelemetry span for tracing.
1298
1318
  * @returns A promise that resolves to an HTTP response.
1299
1319
  */
1300
- async function handleInboxInternal(request, { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, tracerProvider }, span) {
1320
+ async function handleInboxInternal(request, parameters, span) {
1321
+ const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, tracerProvider } = parameters;
1301
1322
  const logger$1 = (0, __logtape_logtape.getLogger)([
1302
1323
  "fedify",
1303
1324
  "federation",
@@ -1499,7 +1520,8 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
1499
1520
  kvPrefixes,
1500
1521
  queue,
1501
1522
  span,
1502
- tracerProvider
1523
+ tracerProvider,
1524
+ idempotencyStrategy: parameters.idempotencyStrategy
1503
1525
  });
1504
1526
  if (routeResult === "alreadyProcessed") return new Response(`Activity <${activity.id}> has already been processed.`, {
1505
1527
  status: 202,
@@ -1540,7 +1562,6 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
1540
1562
  const handleCustomCollection = exceptWrapper(_handleCustomCollection);
1541
1563
  async function _handleCustomCollection(request, { name, values, context: context$2, tracerProvider, collectionCallbacks: callbacks, filterPredicate }) {
1542
1564
  verifyDefined(callbacks);
1543
- verifyJsonLdRequest(request);
1544
1565
  await authIfNeeded(context$2, values, callbacks);
1545
1566
  const cursor = new URL(request.url).searchParams.get("cursor");
1546
1567
  return await new CustomCollectionHandler(name, values, context$2, callbacks, tracerProvider, require_actor.Collection, require_actor.CollectionPage, filterPredicate).fetchCollection(cursor).toJsonLd().then(respondAsActivity);
@@ -1559,7 +1580,6 @@ async function _handleCustomCollection(request, { name, values, context: context
1559
1580
  const handleOrderedCollection = exceptWrapper(_handleOrderedCollection);
1560
1581
  async function _handleOrderedCollection(request, { name, values, context: context$2, tracerProvider, collectionCallbacks: callbacks, filterPredicate }) {
1561
1582
  verifyDefined(callbacks);
1562
- verifyJsonLdRequest(request);
1563
1583
  await authIfNeeded(context$2, values, callbacks);
1564
1584
  const cursor = new URL(request.url).searchParams.get("cursor");
1565
1585
  return await new CustomCollectionHandler(name, values, context$2, callbacks, tracerProvider, require_actor.OrderedCollection, require_actor.OrderedCollectionPage, filterPredicate).fetchCollection(cursor).toJsonLd().then(respondAsActivity);
@@ -1837,10 +1857,9 @@ function exceptWrapper(handler) {
1837
1857
  try {
1838
1858
  return await handler(request, handlerParams);
1839
1859
  } catch (error) {
1840
- const { onNotFound, onNotAcceptable, onUnauthorized } = handlerParams;
1860
+ const { onNotFound, onUnauthorized } = handlerParams;
1841
1861
  switch (error?.constructor) {
1842
1862
  case ItemsNotFoundError: return await onNotFound(request);
1843
- case NotAcceptableError: return await onNotAcceptable(request);
1844
1863
  case UnauthorizedError: return await onUnauthorized(request);
1845
1864
  default: throw error;
1846
1865
  }
@@ -1858,15 +1877,6 @@ const verifyDefined = (callbacks) => {
1858
1877
  if (callbacks === void 0) throw new ItemsNotFoundError();
1859
1878
  };
1860
1879
  /**
1861
- * Verifies that a request accepts JSON-LD content type.
1862
- * @param request The HTTP request to verify.
1863
- * @throws {NotAcceptableError} If the request doesn't accept JSON-LD.
1864
- * @since 1.8.0
1865
- */
1866
- const verifyJsonLdRequest = (request) => {
1867
- if (!acceptsJsonLd(request)) throw new NotAcceptableError();
1868
- };
1869
- /**
1870
1880
  * Performs authorization if needed based on the authorization predicate.
1871
1881
  * @template TContextData The context data type.
1872
1882
  * @param {RequestContext<TContextData>} context The request context.
@@ -1950,15 +1960,6 @@ var ItemsNotFoundError = class extends HandlerError {
1950
1960
  }
1951
1961
  };
1952
1962
  /**
1953
- * Error thrown when the request is not acceptable (e.g., wrong content type).
1954
- * @since 1.8.0
1955
- */
1956
- var NotAcceptableError = class extends HandlerError {
1957
- constructor() {
1958
- super("The request is not acceptable.");
1959
- }
1960
- };
1961
- /**
1962
1963
  * Error thrown when access to a collection is unauthorized.
1963
1964
  * @since 1.8.0
1964
1965
  */
@@ -2350,7 +2351,6 @@ var FederationImpl = class extends FederationBuilderImpl {
2350
2351
  firstKnock;
2351
2352
  constructor(options) {
2352
2353
  super();
2353
- const logger$1 = (0, __logtape_logtape.getLogger)(["fedify", "federation"]);
2354
2354
  this.kv = options.kv;
2355
2355
  this.kvPrefixes = {
2356
2356
  activityIdempotence: ["_fedify", "activityIdempotence"],
@@ -2398,8 +2398,9 @@ var FederationImpl = class extends FederationBuilderImpl {
2398
2398
  this.router.trailingSlashInsensitive = options.trailingSlashInsensitive ?? false;
2399
2399
  this._initializeRouter();
2400
2400
  if (options.allowPrivateAddress || options.userAgent != null) {
2401
- if (options.contextLoader != null) throw new TypeError("Cannot set contextLoader with allowPrivateAddress or userAgent options.");
2402
- else if (options.authenticatedDocumentLoaderFactory != null) throw new TypeError("Cannot set authenticatedDocumentLoaderFactory with allowPrivateAddress or userAgent options.");
2401
+ if (options.documentLoaderFactory != null) throw new TypeError("Cannot set documentLoaderFactory with allowPrivateAddress or userAgent options.");
2402
+ if (options.contextLoaderFactory != null) throw new TypeError("Cannot set contextLoaderFactory with allowPrivateAddress or userAgent options.");
2403
+ if (options.authenticatedDocumentLoaderFactory != null) throw new TypeError("Cannot set authenticatedDocumentLoaderFactory with allowPrivateAddress or userAgent options.");
2403
2404
  }
2404
2405
  const { allowPrivateAddress, userAgent } = options;
2405
2406
  this.allowPrivateAddress = allowPrivateAddress ?? false;
@@ -2413,11 +2414,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2413
2414
  prefix: this.kvPrefixes.remoteDocument
2414
2415
  });
2415
2416
  });
2416
- if (options.contextLoader != null) {
2417
- if (options.contextLoaderFactory != null) throw new TypeError("Cannot set both contextLoader and contextLoaderFactory options at a time; use contextLoaderFactory only.");
2418
- this.contextLoaderFactory = () => options.contextLoader;
2419
- logger$1.warn("The contextLoader option is deprecated; use contextLoaderFactory option instead.");
2420
- } else this.contextLoaderFactory = options.contextLoaderFactory ?? this.documentLoaderFactory;
2417
+ this.contextLoaderFactory = options.contextLoaderFactory ?? this.documentLoaderFactory;
2421
2418
  this.authenticatedDocumentLoaderFactory = options.authenticatedDocumentLoaderFactory ?? ((identity) => require_authdocloader.getAuthenticatedDocumentLoader(identity, {
2422
2419
  allowPrivateAddress,
2423
2420
  userAgent,
@@ -2956,6 +2953,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2956
2953
  span,
2957
2954
  tracer
2958
2955
  });
2956
+ if (acceptsJsonLd(request)) response.headers.set("Vary", "Accept");
2959
2957
  } catch (error) {
2960
2958
  span.setStatus({
2961
2959
  code: __opentelemetry_api.SpanStatusCode.ERROR,
@@ -3019,6 +3017,9 @@ var FederationImpl = class extends FederationBuilderImpl {
3019
3017
  context: context$2,
3020
3018
  nodeInfoDispatcher: this.nodeInfoDispatcher
3021
3019
  });
3020
+ }
3021
+ if (request.method !== "POST" && !acceptsJsonLd(request)) return await onNotAcceptable(request);
3022
+ switch (routeName) {
3022
3023
  case "actor":
3023
3024
  context$2 = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier: route.values.identifier ?? route.values.handle } });
3024
3025
  return await handleActor(request, {
@@ -3027,8 +3028,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3027
3028
  actorDispatcher: this.actorCallbacks?.dispatcher,
3028
3029
  authorizePredicate: this.actorCallbacks?.authorizePredicate,
3029
3030
  onUnauthorized,
3030
- onNotFound,
3031
- onNotAcceptable
3031
+ onNotFound
3032
3032
  });
3033
3033
  case "object": {
3034
3034
  const typeId = route.name.replace(/^object:/, "");
@@ -3044,8 +3044,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3044
3044
  objectDispatcher: callbacks?.dispatcher,
3045
3045
  authorizePredicate: callbacks?.authorizePredicate,
3046
3046
  onUnauthorized,
3047
- onNotFound,
3048
- onNotAcceptable
3047
+ onNotFound
3049
3048
  });
3050
3049
  }
3051
3050
  case "outbox": return await handleCollection(request, {
@@ -3056,8 +3055,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3056
3055
  collectionCallbacks: this.outboxCallbacks,
3057
3056
  tracerProvider: this.tracerProvider,
3058
3057
  onUnauthorized,
3059
- onNotFound,
3060
- onNotAcceptable
3058
+ onNotFound
3061
3059
  });
3062
3060
  case "inbox":
3063
3061
  if (request.method !== "POST") return await handleCollection(request, {
@@ -3068,8 +3066,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3068
3066
  collectionCallbacks: this.inboxCallbacks,
3069
3067
  tracerProvider: this.tracerProvider,
3070
3068
  onUnauthorized,
3071
- onNotFound,
3072
- onNotAcceptable
3069
+ onNotFound
3073
3070
  });
3074
3071
  context$2 = this.#createContext(request, contextData, { documentLoader: await context$2.getDocumentLoader({ identifier: route.values.identifier ?? route.values.handle }) });
3075
3072
  case "sharedInbox":
@@ -3091,7 +3088,8 @@ var FederationImpl = class extends FederationBuilderImpl {
3091
3088
  onNotFound,
3092
3089
  signatureTimeWindow: this.signatureTimeWindow,
3093
3090
  skipSignatureVerification: this.skipSignatureVerification,
3094
- tracerProvider: this.tracerProvider
3091
+ tracerProvider: this.tracerProvider,
3092
+ idempotencyStrategy: this.idempotencyStrategy
3095
3093
  });
3096
3094
  case "following": return await handleCollection(request, {
3097
3095
  name: "following",
@@ -3101,8 +3099,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3101
3099
  collectionCallbacks: this.followingCallbacks,
3102
3100
  tracerProvider: this.tracerProvider,
3103
3101
  onUnauthorized,
3104
- onNotFound,
3105
- onNotAcceptable
3102
+ onNotFound
3106
3103
  });
3107
3104
  case "followers": {
3108
3105
  let baseUrl = url.searchParams.get("base-url");
@@ -3125,8 +3122,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3125
3122
  collectionCallbacks: this.followersCallbacks,
3126
3123
  tracerProvider: this.tracerProvider,
3127
3124
  onUnauthorized,
3128
- onNotFound,
3129
- onNotAcceptable
3125
+ onNotFound
3130
3126
  });
3131
3127
  }
3132
3128
  case "liked": return await handleCollection(request, {
@@ -3137,8 +3133,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3137
3133
  collectionCallbacks: this.likedCallbacks,
3138
3134
  tracerProvider: this.tracerProvider,
3139
3135
  onUnauthorized,
3140
- onNotFound,
3141
- onNotAcceptable
3136
+ onNotFound
3142
3137
  });
3143
3138
  case "featured": return await handleCollection(request, {
3144
3139
  name: "featured",
@@ -3148,8 +3143,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3148
3143
  collectionCallbacks: this.featuredCallbacks,
3149
3144
  tracerProvider: this.tracerProvider,
3150
3145
  onUnauthorized,
3151
- onNotFound,
3152
- onNotAcceptable
3146
+ onNotFound
3153
3147
  });
3154
3148
  case "featuredTags": return await handleCollection(request, {
3155
3149
  name: "featured tags",
@@ -3159,8 +3153,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3159
3153
  collectionCallbacks: this.featuredTagsCallbacks,
3160
3154
  tracerProvider: this.tracerProvider,
3161
3155
  onUnauthorized,
3162
- onNotFound,
3163
- onNotAcceptable
3156
+ onNotFound
3164
3157
  });
3165
3158
  case "collection": {
3166
3159
  const name = route.name.replace(/^collection:/, "");
@@ -3172,8 +3165,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3172
3165
  collectionCallbacks: callbacks,
3173
3166
  tracerProvider: this.tracerProvider,
3174
3167
  onUnauthorized,
3175
- onNotFound,
3176
- onNotAcceptable
3168
+ onNotFound
3177
3169
  });
3178
3170
  }
3179
3171
  case "orderedCollection": {
@@ -3186,8 +3178,7 @@ var FederationImpl = class extends FederationBuilderImpl {
3186
3178
  collectionCallbacks: callbacks,
3187
3179
  tracerProvider: this.tracerProvider,
3188
3180
  onUnauthorized,
3189
- onNotFound,
3190
- onNotAcceptable
3181
+ onNotFound
3191
3182
  });
3192
3183
  }
3193
3184
  default: {
@@ -3841,7 +3832,8 @@ var ContextImpl = class ContextImpl {
3841
3832
  kvPrefixes: this.federation.kvPrefixes,
3842
3833
  queue: this.federation.inboxQueue,
3843
3834
  span,
3844
- tracerProvider: options.tracerProvider ?? this.tracerProvider
3835
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
3836
+ idempotencyStrategy: this.federation.idempotencyStrategy
3845
3837
  });
3846
3838
  return routeResult === "alreadyProcessed" || routeResult === "enqueued" || routeResult === "unsupportedActivity" || routeResult === "success";
3847
3839
  }
@@ -0,0 +1,17 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+
5
+ import "./transformers-BFT6d7J5.js";
6
+ import "./docloader-Czl3xV10.js";
7
+ import "./actor-DoMcqXsW.js";
8
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BuHr2fzh.js";
9
+ import "./lookup-Dhm78GlK.js";
10
+ import "./key-BNJQQm3h.js";
11
+ import "./http-C_Qc2neP.js";
12
+ import "./proof-BiSCuwyA.js";
13
+ import "./types-DQuSDtDg.js";
14
+ import "./authdocloader-Cv_qEn1G.js";
15
+ import "./vocab-w--qk7HF.js";
16
+
17
+ export { FederationImpl };
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { DocumentLoader } from "./docloader-CxWcuWqQ.js";
4
- import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-SOE1ifCr.js";
5
- import { KeyCache } from "./http-DqSNLFNY.js";
4
+ import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-BI0Ak5lL.js";
5
+ import { KeyCache } from "./http-D6Uj2x2y.js";
6
6
  import { TracerProvider } from "@opentelemetry/api";
7
7
 
8
8
  //#region src/sig/ld.d.ts
@@ -1,5 +1,5 @@
1
- import { Activity } from "./vocab-DJTYMqyU.cjs";
2
- import { ActivityTransformer, Context } from "./context-Dq8aCtMH.cjs";
1
+ import { Activity } from "./vocab-Dw1-yVGg.cjs";
2
+ import { ActivityTransformer, Context } from "./context-DiqjMRef.cjs";
3
3
 
4
4
  //#region src/compat/transformers.d.ts
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-CxWcuWqQ.js";
4
- import { HttpMessageSignaturesSpecDeterminer } from "./http-DqSNLFNY.js";
4
+ import { HttpMessageSignaturesSpecDeterminer } from "./http-D6Uj2x2y.js";
5
5
  import { TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region src/runtime/authdocloader.d.ts
@@ -1,5 +1,5 @@
1
1
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-D-MrRyHl.cjs";
2
- import { HttpMessageSignaturesSpecDeterminer } from "./http-BS6766zs.cjs";
2
+ import { HttpMessageSignaturesSpecDeterminer } from "./http-D-e6AFwR.cjs";
3
3
  import { TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/runtime/authdocloader.d.ts
@@ -1,5 +1,5 @@
1
1
  import { DocumentLoader, GetUserAgentOptions } from "./docloader-D-MrRyHl.cjs";
2
- import { Collection, Link, Object as Object$1 } from "./vocab-DJTYMqyU.cjs";
2
+ import { Collection, Link, Object as Object$1 } from "./vocab-Dw1-yVGg.cjs";
3
3
  import { TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/vocab/lookup.d.ts
@@ -18,6 +18,24 @@ interface LookupObjectOptions {
18
18
  * @since 0.8.0
19
19
  */
20
20
  contextLoader?: DocumentLoader;
21
+ /**
22
+ * Whether to allow fetching an object with an `@id` having a different
23
+ * origin than the object's URL. This is not recommended, as it may
24
+ * lead to security issues. Only use this option if you know what you
25
+ * are doing.
26
+ *
27
+ * How to handle the case when an object's `@id` has a different origin
28
+ * than the object's URL:
29
+ *
30
+ * - `"ignore"` (default): Do not return the object, and log a warning.
31
+ * - `"throw"`: Throw an error.
32
+ * - `"trust"`: Bypass the check and return the object anyway. This
33
+ * is not recommended, as it may lead to security issues. Only use
34
+ * this option if you know what you are doing.
35
+ *
36
+ * @since 1.9.0
37
+ */
38
+ crossOrigin?: "ignore" | "throw" | "trust";
21
39
  /**
22
40
  * The options for making `User-Agent` header.
23
41
  * If a string is given, it is used as the `User-Agent` header value.
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { Activity } from "./vocab-SOE1ifCr.js";
4
- import { ActivityTransformer, Context } from "./context-CDSZdQHD.js";
3
+ import { Activity } from "./vocab-BI0Ak5lL.js";
4
+ import { ActivityTransformer, Context } from "./context-DBKpNBnc.js";
5
5
 
6
6
  //#region src/compat/transformers.d.ts
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { DocumentLoader } from "./docloader-D-MrRyHl.cjs";
2
- import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-DJTYMqyU.cjs";
3
- import { KeyCache } from "./http-BS6766zs.cjs";
2
+ import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-Dw1-yVGg.cjs";
3
+ import { KeyCache } from "./http-D-e6AFwR.cjs";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
5
 
6
6
  //#region src/sig/ld.d.ts
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { DocumentLoader, GetUserAgentOptions } from "./docloader-CxWcuWqQ.js";
4
- import { Collection, Link, Object as Object$1 } from "./vocab-SOE1ifCr.js";
4
+ import { Collection, Link, Object as Object$1 } from "./vocab-BI0Ak5lL.js";
5
5
  import { TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region src/vocab/lookup.d.ts
@@ -20,6 +20,24 @@ interface LookupObjectOptions {
20
20
  * @since 0.8.0
21
21
  */
22
22
  contextLoader?: DocumentLoader;
23
+ /**
24
+ * Whether to allow fetching an object with an `@id` having a different
25
+ * origin than the object's URL. This is not recommended, as it may
26
+ * lead to security issues. Only use this option if you know what you
27
+ * are doing.
28
+ *
29
+ * How to handle the case when an object's `@id` has a different origin
30
+ * than the object's URL:
31
+ *
32
+ * - `"ignore"` (default): Do not return the object, and log a warning.
33
+ * - `"throw"`: Throw an error.
34
+ * - `"trust"`: Bypass the check and return the object anyway. This
35
+ * is not recommended, as it may lead to security issues. Only use
36
+ * this option if you know what you are doing.
37
+ *
38
+ * @since 1.9.0
39
+ */
40
+ crossOrigin?: "ignore" | "throw" | "trust";
23
41
  /**
24
42
  * The options for making `User-Agent` header.
25
43
  * If a string is given, it is used as the `User-Agent` header value.
package/dist/mod.cjs CHANGED
@@ -4,17 +4,17 @@
4
4
 
5
5
  const require_transformers = require('./transformers-CoBS-oFG.cjs');
6
6
  require('./compat-DmDDELst.cjs');
7
- const require_docloader = require('./docloader-B1O1Z5OK.cjs');
8
- const require_actor = require('./actor-C3gJhZJj.cjs');
9
- const require_middleware = require('./middleware-Gsxukxs5.cjs');
10
- const require_lookup = require('./lookup-7u217Q3H.cjs');
11
- const require_key = require('./key-CzF9SAEI.cjs');
12
- const require_http = require('./http-Hw9HJp9i.cjs');
13
- const require_proof = require('./proof-Gip91fK7.cjs');
7
+ const require_docloader = require('./docloader-CYnQRIXv.cjs');
8
+ const require_actor = require('./actor-CwZ2m5rG.cjs');
9
+ const require_middleware = require('./middleware-Dgmdgrvb.cjs');
10
+ const require_lookup = require('./lookup-D6dro5Au.cjs');
11
+ const require_key = require('./key-DuXv64tg.cjs');
12
+ const require_http = require('./http-CAusBl_3.cjs');
13
+ const require_proof = require('./proof-ONNmhInb.cjs');
14
14
  const require_federation = require('./federation-H2_En3j5.cjs');
15
- const require_types = require('./types-CZ_qo9KW.cjs');
16
- const require_authdocloader = require('./authdocloader-DPCGwidE.cjs');
17
- const require_vocab = require('./vocab-9MjZjuZb.cjs');
15
+ const require_types = require('./types-D2Nyz0tR.cjs');
16
+ const require_authdocloader = require('./authdocloader-bsmVF6eO.cjs');
17
+ const require_vocab = require('./vocab-Dd4VMrr0.cjs');
18
18
  require('./nodeinfo-Co9lJrWl.cjs');
19
19
  require('./runtime-C58AJWSv.cjs');
20
20
  require('./sig-ByHXzqUi.cjs');
package/dist/mod.d.cts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-63Cil1MD.cjs";
2
2
  import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-D-MrRyHl.cjs";
3
3
  import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-CegPX0Rn.cjs";
4
- import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "./vocab-DJTYMqyU.cjs";
5
- import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-DMgu-ZjT.cjs";
6
- import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-BS6766zs.cjs";
7
- import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-B-7Ptt_m.cjs";
8
- import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-evzlRVZq.cjs";
4
+ import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "./vocab-Dw1-yVGg.cjs";
5
+ import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-D6K058Tb.cjs";
6
+ import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-D-e6AFwR.cjs";
7
+ import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-BN_tO3cY.cjs";
8
+ import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-CxkWO3Mg.cjs";
9
9
  import { ResourceDescriptor, lookupWebFinger } from "./mod-jQ4OODsl.cjs";
10
- import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-Dq8aCtMH.cjs";
10
+ import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-DiqjMRef.cjs";
11
11
  import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-B7R1Q-M5.cjs";
12
- import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-BhMnAkFX.cjs";
12
+ import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-Bpb5QLaZ.cjs";
13
13
  import "./mod-C2tOeRkN.cjs";
14
14
  import "./mod-FZd39qVq.cjs";
15
- import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-Dc_-mf8s.cjs";
16
- import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-BClfg3ej.cjs";
17
- export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
15
+ import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-Cj1tHXBR.cjs";
16
+ import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-Djzcw2ry.cjs";
17
+ export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };