@fedify/fedify 2.4.0-dev.1488 → 2.4.0-dev.1504

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 (109) hide show
  1. package/README.md +3 -4
  2. package/dist/{assert-OguE97r2.mjs → assert-DvVHoIZ0.mjs} +1 -1
  3. package/dist/{assert_instance_of-DBC5X09g.mjs → assert_instance_of-CxoC8bVq.mjs} +1 -1
  4. package/dist/{assert_not_equals-DkVK8oqV.mjs → assert_not_equals-C8vcTTA3.mjs} +1 -1
  5. package/dist/{assert_rejects-DN60FHPX.mjs → assert_rejects-DAdaaIWM.mjs} +2 -2
  6. package/dist/{assert_strict_equals-XEgZAlrj.mjs → assert_strict_equals-BzqyKuYL.mjs} +1 -1
  7. package/dist/{assert_throws-BOkhLGYc.mjs → assert_throws-zN79lgIC.mjs} +1 -1
  8. package/dist/{builder-Dcr6y6XD.mjs → builder-Ck0Fl_a5.mjs} +23 -3
  9. package/dist/codec-CmlPqjNX.mjs +103 -0
  10. package/dist/compat/mod.d.cts +1 -1
  11. package/dist/compat/mod.d.ts +1 -1
  12. package/dist/compat/outgoing-jsonld.test.mjs +3 -3
  13. package/dist/compat/public-audience.test.mjs +3 -3
  14. package/dist/compat/transformers.test.mjs +5 -5
  15. package/dist/{context-DVoTs_wM.mjs → context-BBRTgkrs.mjs} +8 -2
  16. package/dist/{context-BU6jSQdo.d.ts → context-BF5B4ZDk.d.ts} +529 -259
  17. package/dist/{context-BBVLF7lx.d.cts → context-CYF8X0ft.d.cts} +530 -259
  18. package/dist/{deno-BCFGf8NR.mjs → deno-D3gb4X9v.mjs} +1 -1
  19. package/dist/{docloader-DWEwaGqF.mjs → docloader-DUKu0GzG.mjs} +3 -3
  20. package/dist/federation/builder.test.mjs +5 -5
  21. package/dist/federation/circuit-breaker.test.mjs +5 -5
  22. package/dist/federation/collection.test.mjs +3 -3
  23. package/dist/federation/handler.test.mjs +13 -13
  24. package/dist/federation/idempotency.test.mjs +6 -6
  25. package/dist/federation/inbox.test.mjs +3 -3
  26. package/dist/federation/keycache.test.mjs +5 -5
  27. package/dist/federation/kv.test.mjs +3 -3
  28. package/dist/federation/metrics.test.mjs +4 -4
  29. package/dist/federation/middleware.test.mjs +200 -19
  30. package/dist/federation/mod.cjs +3 -259
  31. package/dist/federation/mod.d.cts +4 -4
  32. package/dist/federation/mod.d.ts +4 -4
  33. package/dist/federation/mod.js +1 -257
  34. package/dist/federation/mq.test.mjs +103 -261
  35. package/dist/federation/negotiation.test.mjs +4 -4
  36. package/dist/federation/retry.test.mjs +3 -3
  37. package/dist/federation/router.test.mjs +5 -5
  38. package/dist/federation/send.test.mjs +10 -10
  39. package/dist/federation/tasks/codec.test.d.mts +2 -0
  40. package/dist/federation/tasks/codec.test.mjs +292 -0
  41. package/dist/federation/tasks/enqueue.test.d.mts +2 -0
  42. package/dist/federation/tasks/enqueue.test.mjs +992 -0
  43. package/dist/federation/tasks/tasks.test.d.mts +2 -0
  44. package/dist/federation/tasks/tasks.test.mjs +555 -0
  45. package/dist/federation/temporal.test.mjs +4 -4
  46. package/dist/federation/webfinger.test.mjs +6 -6
  47. package/dist/{http-RriziGDE.mjs → http-BNFQkiEZ.mjs} +4 -4
  48. package/dist/{http-DaVoLyyA.js → http-CrZzUAtV.js} +7 -17
  49. package/dist/{http-DLqxhQg1.cjs → http-D9p2_d2X.cjs} +7 -17
  50. package/dist/{key-Bkg8Zg36.mjs → key-BM_SRwBV.mjs} +8 -18
  51. package/dist/{kv-cache-BR--9V4L.mjs → kv-cache-BE1QIPdL.mjs} +1 -1
  52. package/dist/{kv-cache-DxlFLMiU.js → kv-cache-Ch_Zv5Yq.js} +1 -1
  53. package/dist/{kv-cache-Fw-iwKjy.cjs → kv-cache-Cna211RR.cjs} +1 -1
  54. package/dist/{ld-BjsmbqO7.mjs → ld-ubkf03eb.mjs} +3 -3
  55. package/dist/{metrics-BLoa2pab.mjs → metrics-BXR36qzu.mjs} +1 -1
  56. package/dist/{middleware-V-r1QH5Z.cjs → middleware-DUNeIkXN.cjs} +694 -51
  57. package/dist/{middleware-D3kuDjvb.mjs → middleware-iP9VRMus.mjs} +310 -67
  58. package/dist/{middleware-_9t5HVBi.js → middleware-lB4vtShP.js} +683 -52
  59. package/dist/{middleware-DNR3YBCi.mjs → middleware-pzCP79He.mjs} +1 -1
  60. package/dist/{mod-vPYVoa5n.d.ts → mod-4WGAuR6X.d.ts} +1 -1
  61. package/dist/{mod-C0F6kvgS.d.cts → mod-BHEB3xhE.d.cts} +1 -1
  62. package/dist/mod.cjs +6 -6
  63. package/dist/mod.d.cts +5 -5
  64. package/dist/mod.d.ts +5 -5
  65. package/dist/mod.js +5 -5
  66. package/dist/mq-03vS-C9P.mjs +276 -0
  67. package/dist/{mq-D8uSFzxe.d.cts → mq-B5_hohs7.d.ts} +34 -0
  68. package/dist/{mq-D-nlpY04.d.ts → mq-DXMt_qCY.d.cts} +34 -0
  69. package/dist/nodeinfo/client.test.mjs +3 -3
  70. package/dist/nodeinfo/handler.test.mjs +5 -5
  71. package/dist/nodeinfo/types.test.mjs +4 -4
  72. package/dist/otel/exporter.test.mjs +3 -3
  73. package/dist/{outgoing-jsonld-L_DbOaFe.mjs → outgoing-jsonld-BNL8AC14.mjs} +1 -1
  74. package/dist/{owner-NK2p1ihR.mjs → owner-Bf1KkncT.mjs} +2 -2
  75. package/dist/{proof-D7WVwQzs.js → proof-BMcsi8q_.js} +1 -1
  76. package/dist/{proof-CRXqo703.mjs → proof-Q781Ks5q.mjs} +5 -5
  77. package/dist/{proof-2WI6mMbC.cjs → proof-yeAU1MyT.cjs} +1 -1
  78. package/dist/{send-CTaPzl8L.mjs → send-DFV0S_n9.mjs} +3 -3
  79. package/dist/sig/accept.test.mjs +1 -1
  80. package/dist/sig/http.test.mjs +8 -8
  81. package/dist/sig/key.test.mjs +6 -56
  82. package/dist/sig/ld.test.mjs +7 -7
  83. package/dist/sig/mod.cjs +2 -2
  84. package/dist/sig/mod.js +2 -2
  85. package/dist/sig/owner.test.mjs +6 -6
  86. package/dist/sig/proof.test.mjs +8 -8
  87. package/dist/{std__assert-BBjXFNOb.mjs → std__assert-Dh6uLf_q.mjs} +4 -4
  88. package/dist/{temporal-C8M0Y7v9.mjs → temporal-CyOjsqPj.mjs} +1 -1
  89. package/dist/testing/mod.d.mts +1037 -8
  90. package/dist/testing/mod.mjs +3 -2
  91. package/dist/testing-Dy-WhqpN.mjs +77 -0
  92. package/dist/utils/docloader.test.mjs +6 -6
  93. package/dist/utils/kv-cache.test.mjs +1 -1
  94. package/dist/utils/mod.cjs +1 -1
  95. package/dist/utils/mod.js +1 -1
  96. package/package.json +13 -8
  97. /package/dist/{accept-CPkZzmGN.mjs → accept-CgDcxvjV.mjs} +0 -0
  98. /package/dist/{activity-listener-tztVvlNb.mjs → activity-listener-BeTGV3wc.mjs} +0 -0
  99. /package/dist/{assert_equals-C-ZRDbaf.mjs → assert_equals-PBVKNMJd.mjs} +0 -0
  100. /package/dist/{circuit-breaker-CSWsyoef.mjs → circuit-breaker-hJBB6jwA.mjs} +0 -0
  101. /package/dist/{client-ByXmQhYD.mjs → client-B_A6mfn3.mjs} +0 -0
  102. /package/dist/{collection-Cc3DVAhE.mjs → collection-Dp5ky45w.mjs} +0 -0
  103. /package/dist/{keycache-BeU0LCII.mjs → keycache-CaOR6NYg.mjs} +0 -0
  104. /package/dist/{keys-DGu1NFwu.mjs → keys-CSYsOMFG.mjs} +0 -0
  105. /package/dist/{kv-rV3vodCc.mjs → kv-CIvR3Non.mjs} +0 -0
  106. /package/dist/{negotiation-DDstyBvc.mjs → negotiation-m_L2nyS3.mjs} +0 -0
  107. /package/dist/{public-audience-Cvbr2Gzt.mjs → public-audience-c9zmYKgA.mjs} +0 -0
  108. /package/dist/{retry-CXg_MBI-.mjs → retry-DI4O-zYl.mjs} +0 -0
  109. /package/dist/{types-J53Kw7so.mjs → types-BFowWFTT.mjs} +0 -0
@@ -11,7 +11,7 @@ let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conve
11
11
  let byte_encodings_base64 = require("byte-encodings/base64");
12
12
  //#region deno.json
13
13
  var name = "@fedify/fedify";
14
- var version = "2.4.0-dev.1488+a9fe1094";
14
+ var version = "2.4.0-dev.1504+756217cc";
15
15
  //#endregion
16
16
  //#region src/sig/accept.ts
17
17
  /**
@@ -1201,31 +1201,21 @@ async function resolveFetchedKey(document, cacheKey, keyId, cls, { documentLoade
1201
1201
  const keys = cls === _fedify_vocab.CryptographicKey ? object.getPublicKeys({
1202
1202
  documentLoader,
1203
1203
  contextLoader,
1204
- suppressError: true,
1205
1204
  tracerProvider
1206
1205
  }) : object.getAssertionMethods({
1207
1206
  documentLoader,
1208
1207
  contextLoader,
1209
- suppressError: true,
1210
1208
  tracerProvider
1211
1209
  });
1212
1210
  let length = 0;
1213
1211
  let lastKey = null;
1214
- try {
1215
- for await (const k of keys) {
1216
- length++;
1217
- lastKey = k;
1218
- if (k.id?.href === keyId) {
1219
- key = k;
1220
- break;
1221
- }
1212
+ for await (const k of keys) {
1213
+ length++;
1214
+ lastKey = k;
1215
+ if (k.id?.href === keyId) {
1216
+ key = k;
1217
+ break;
1222
1218
  }
1223
- } catch (e) {
1224
- if (!(e instanceof TypeError)) throw e;
1225
- logger.debug("Failed to verify; a malformed key was encountered while iterating the keys of {keyId}; treating it as a missing key: {error}", {
1226
- keyId,
1227
- error: e
1228
- });
1229
1219
  }
1230
1220
  const keyIdUrl = new URL(keyId);
1231
1221
  if (key == null && keyIdUrl.hash === "" && length === 1) key = lastKey;
@@ -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-BCFGf8NR.mjs";
5
- import { _ as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-BLoa2pab.mjs";
4
+ import { n as version, t as name } from "./deno-D3gb4X9v.mjs";
5
+ import { _ as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-BXR36qzu.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -248,31 +248,21 @@ async function resolveFetchedKey(document, cacheKey, keyId, cls, { documentLoade
248
248
  const keys = cls === CryptographicKey ? object.getPublicKeys({
249
249
  documentLoader,
250
250
  contextLoader,
251
- suppressError: true,
252
251
  tracerProvider
253
252
  }) : object.getAssertionMethods({
254
253
  documentLoader,
255
254
  contextLoader,
256
- suppressError: true,
257
255
  tracerProvider
258
256
  });
259
257
  let length = 0;
260
258
  let lastKey = null;
261
- try {
262
- for await (const k of keys) {
263
- length++;
264
- lastKey = k;
265
- if (k.id?.href === keyId) {
266
- key = k;
267
- break;
268
- }
259
+ for await (const k of keys) {
260
+ length++;
261
+ lastKey = k;
262
+ if (k.id?.href === keyId) {
263
+ key = k;
264
+ break;
269
265
  }
270
- } catch (e) {
271
- if (!(e instanceof TypeError)) throw e;
272
- logger.debug("Failed to verify; a malformed key was encountered while iterating the keys of {keyId}; treating it as a missing key: {error}", {
273
- keyId,
274
- error: e
275
- });
276
266
  }
277
267
  const keyIdUrl = new URL(keyId);
278
268
  if (key == null && keyIdUrl.hash === "" && length === 1) key = lastKey;
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { p as recordDocumentCache } from "./metrics-BLoa2pab.mjs";
4
+ import { p as recordDocumentCache } from "./metrics-BXR36qzu.mjs";
5
5
  import { getLogger } from "@logtape/logtape";
6
6
  import { preloadedContexts } from "@fedify/vocab-runtime";
7
7
  //#region src/utils/kv-cache.ts
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { C as recordDocumentCache, d as validateCryptoKey, t as doubleKnock } from "./http-DaVoLyyA.js";
3
+ import { C as recordDocumentCache, d as validateCryptoKey, t as doubleKnock } from "./http-CrZzUAtV.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { curry } from "es-toolkit";
6
6
  import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-DLqxhQg1.cjs");
4
+ const require_http = require("./http-D9p2_d2X.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
@@ -1,9 +1,9 @@
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-BCFGf8NR.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-BLoa2pab.mjs";
6
- import { n as fetchKey, o as validateCryptoKey } from "./key-Bkg8Zg36.mjs";
4
+ import { n as version, t as name } from "./deno-D3gb4X9v.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-BXR36qzu.mjs";
6
+ import { n as fetchKey, o as validateCryptoKey } from "./key-BM_SRwBV.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-BCFGf8NR.mjs";
4
+ import { n as version, t as name } from "./deno-D3gb4X9v.mjs";
5
5
  import { metrics } from "@opentelemetry/api";
6
6
  import { FetchError } from "@fedify/vocab-runtime";
7
7
  //#region src/federation/metrics.ts