@fedify/fedify 1.9.5 → 1.9.6

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 (101) hide show
  1. package/dist/{actor-BScoqM7M.js → actor-CEGEmRll.js} +187 -187
  2. package/dist/{actor-EEh71Njb.js → actor-DbpZ6pzg.js} +1 -1
  3. package/dist/{actor-Bpeh1XeR.cjs → actor-DlS-Q8hE.cjs} +187 -187
  4. package/dist/{authdocloader-zA6GeFTV.js → authdocloader-BLqMyboS.js} +3 -3
  5. package/dist/{authdocloader-Cln84bGw.cjs → authdocloader-CT_V4Z7G.cjs} +3 -3
  6. package/dist/{authdocloader-Dzg6OOeX.js → authdocloader-DUQcOTRS.js} +3 -3
  7. package/dist/{builder-vhQAUB_c.js → builder-BO61xeXE.js} +4 -4
  8. package/dist/{client-BjEfcq0Q.js → client-UG5wpNhG.js} +1 -1
  9. package/dist/compat/transformers.test.js +16 -16
  10. package/dist/{docloader-D_YsJgEb.cjs → docloader-BIFI3OS7.cjs} +31 -11
  11. package/dist/{docloader-ygR0HOEb.js → docloader-fJgJeqiX.js} +31 -11
  12. package/dist/{esm-CpGJtXU9.js → esm-C1EfGjSS.js} +1 -1
  13. package/dist/federation/builder.test.js +5 -5
  14. package/dist/federation/collection.test.js +3 -3
  15. package/dist/federation/handler.test.js +17 -17
  16. package/dist/federation/idempotency.test.js +17 -17
  17. package/dist/federation/inbox.test.js +4 -4
  18. package/dist/federation/keycache.test.js +8 -4
  19. package/dist/federation/kv.test.js +3 -3
  20. package/dist/federation/middleware.test.js +18 -18
  21. package/dist/federation/mod.cjs +10 -10
  22. package/dist/federation/mod.js +10 -10
  23. package/dist/federation/mq.test.js +3 -3
  24. package/dist/federation/retry.test.js +3 -3
  25. package/dist/federation/router.test.js +3 -3
  26. package/dist/federation/send.test.js +10 -10
  27. package/dist/{http-Ddo0ZppP.js → http-05HxN-lp.js} +17 -6
  28. package/dist/{http-BvRfZYTf.cjs → http-BgopPF-8.cjs} +18 -7
  29. package/dist/{http-Cstrlwgg.js → http-CR-Eg1Uq.js} +18 -7
  30. package/dist/{inbox-D2vwgPg3.js → inbox-DcJN1cxM.js} +1 -1
  31. package/dist/{key--6LDhz4H.js → key-BCUd8FWp.js} +4 -4
  32. package/dist/key-BUardnTH.cjs +10 -0
  33. package/dist/{key-s7VkHdD2.js → key-CPJcJjp-.js} +2 -2
  34. package/dist/{key-daNTxBaX.cjs → key-DjS1X9TG.cjs} +2 -2
  35. package/dist/{key-iV9rIe_w.js → key-Dr6H_e3K.js} +3 -3
  36. package/dist/{key-i1AKuYo2.js → key-ibMO03_0.js} +2 -2
  37. package/dist/{keycache-D-5tZgkF.js → keycache-CMUfqYqr.js} +11 -2
  38. package/dist/{keys-CfyZsHFW.js → keys-IZ5050fT.js} +1 -1
  39. package/dist/{ld-D08-gVSY.js → ld-DHNA2RSQ.js} +2 -2
  40. package/dist/{lookup-BY7ipa5A.js → lookup-BMAWLsP2.js} +1 -1
  41. package/dist/{lookup-B8OwEXPT.cjs → lookup-C4_dVYz7.cjs} +1 -1
  42. package/dist/{lookup-DKLV3BDT.js → lookup-CKZfuyxA.js} +1 -1
  43. package/dist/middleware-BJ83veqi.js +26 -0
  44. package/dist/{middleware-BPgbdjdi.cjs → middleware-CGbvIGvy.cjs} +20 -11
  45. package/dist/middleware-CJ4W2ir5.cjs +17 -0
  46. package/dist/{middleware-BU1AB564.js → middleware-DrhEvfTo.js} +13 -13
  47. package/dist/{middleware-DqaAsuyL.js → middleware-ODfDRN3q.js} +20 -11
  48. package/dist/middleware-Ve2mHJgo.js +17 -0
  49. package/dist/mod.cjs +10 -10
  50. package/dist/mod.js +10 -10
  51. package/dist/nodeinfo/client.test.js +5 -5
  52. package/dist/nodeinfo/handler.test.js +16 -16
  53. package/dist/nodeinfo/mod.cjs +2 -2
  54. package/dist/nodeinfo/mod.js +2 -2
  55. package/dist/nodeinfo/semver.test.js +3 -3
  56. package/dist/nodeinfo/types.test.js +3 -3
  57. package/dist/{owner-DwNbDv2o.js → owner-DDHsHYQO.js} +2 -2
  58. package/dist/{proof-Cf8y40Qt.cjs → proof-CX7ujFFX.cjs} +3 -3
  59. package/dist/{proof-D6yDDNPJ.js → proof-V1uQaB2y.js} +3 -3
  60. package/dist/{proof-CesqsPsI.js → proof-exgGRW88.js} +2 -2
  61. package/dist/runtime/authdocloader.test.js +9 -9
  62. package/dist/runtime/docloader.test.js +51 -4
  63. package/dist/runtime/key.test.js +5 -5
  64. package/dist/runtime/langstr.test.js +3 -3
  65. package/dist/runtime/link.test.js +3 -3
  66. package/dist/runtime/mod.cjs +6 -6
  67. package/dist/runtime/mod.js +6 -6
  68. package/dist/runtime/multibase/multibase.test.js +3 -3
  69. package/dist/runtime/url.test.js +3 -3
  70. package/dist/{send-CLRuMS0k.js → send-BfMYakUE.js} +2 -2
  71. package/dist/sig/http.test.js +51 -8
  72. package/dist/sig/key.test.js +6 -6
  73. package/dist/sig/ld.test.js +7 -7
  74. package/dist/sig/mod.cjs +6 -6
  75. package/dist/sig/mod.js +6 -6
  76. package/dist/sig/owner.test.js +7 -7
  77. package/dist/sig/proof.test.js +7 -7
  78. package/dist/testing/docloader.test.js +3 -3
  79. package/dist/testing/mod.js +3 -3
  80. package/dist/{testing-D3joI56Q.js → testing-RPOc_gVG.js} +2 -2
  81. package/dist/{type-CfOWb_f6.js → type-COPv6pMi.js} +216 -196
  82. package/dist/{types-CUQq-S-s.cjs → types-CGnM1vft.cjs} +1 -1
  83. package/dist/{types-C8K_AzLR.js → types-Cptev2nt.js} +1 -1
  84. package/dist/vocab/actor.test.js +5 -5
  85. package/dist/vocab/lookup.test.js +4 -4
  86. package/dist/vocab/mod.cjs +4 -4
  87. package/dist/vocab/mod.js +4 -4
  88. package/dist/vocab/type.test.js +3 -3
  89. package/dist/vocab/vocab.test.js +4 -4
  90. package/dist/{vocab-tt4hGhXv.cjs → vocab-BFy1CS5L.cjs} +3 -3
  91. package/dist/{vocab-YzUIufJF.js → vocab-BPFiQ650.js} +3 -3
  92. package/dist/webfinger/handler.test.js +16 -16
  93. package/dist/webfinger/lookup.test.js +4 -4
  94. package/dist/webfinger/mod.cjs +2 -2
  95. package/dist/webfinger/mod.js +2 -2
  96. package/dist/x/cfworkers.test.js +3 -3
  97. package/package.json +1 -1
  98. package/dist/key-sPbIt6SQ.cjs +0 -10
  99. package/dist/middleware-BNuGkCfG.js +0 -17
  100. package/dist/middleware-BVlxjlGK.js +0 -26
  101. package/dist/middleware-DGlXFNnB.cjs +0 -17
@@ -3,9 +3,9 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-CfOWb_f6.js";
7
- import { validateCryptoKey } from "./key-s7VkHdD2.js";
8
- import { doubleKnock } from "./http-Ddo0ZppP.js";
6
+ import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-COPv6pMi.js";
7
+ import { validateCryptoKey } from "./key-CPJcJjp-.js";
8
+ import { doubleKnock } from "./http-05HxN-lp.js";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
 
11
11
  //#region src/runtime/authdocloader.ts
@@ -3,9 +3,9 @@
3
3
  const { URLPattern } = require("urlpattern-polyfill");
4
4
 
5
5
  const require_chunk = require('./chunk-DqRYRqnO.cjs');
6
- const require_docloader = require('./docloader-D_YsJgEb.cjs');
7
- const require_key = require('./key-daNTxBaX.cjs');
8
- const require_http = require('./http-BvRfZYTf.cjs');
6
+ const require_docloader = require('./docloader-BIFI3OS7.cjs');
7
+ const require_key = require('./key-DjS1X9TG.cjs');
8
+ const require_http = require('./http-BgopPF-8.cjs');
9
9
  const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
10
10
 
11
11
  //#region src/runtime/authdocloader.ts
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-ygR0HOEb.js";
6
- import { validateCryptoKey } from "./key-i1AKuYo2.js";
7
- import { doubleKnock } from "./http-Cstrlwgg.js";
5
+ import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-fJgJeqiX.js";
6
+ import { validateCryptoKey } from "./key-ibMO03_0.js";
7
+ import { doubleKnock } from "./http-CR-Eg1Uq.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
 
10
10
  //#region src/runtime/authdocloader.ts
@@ -3,9 +3,9 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getTypeId } from "./type-CfOWb_f6.js";
7
- import { Router, RouterError } from "./lookup-BY7ipa5A.js";
8
- import { InboxListenerSet } from "./inbox-D2vwgPg3.js";
6
+ import { deno_default, getTypeId } from "./type-COPv6pMi.js";
7
+ import { Router, RouterError } from "./lookup-BMAWLsP2.js";
8
+ import { InboxListenerSet } from "./inbox-DcJN1cxM.js";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
11
11
 
@@ -43,7 +43,7 @@ var FederationBuilderImpl = class {
43
43
  this.collectionTypeIds = {};
44
44
  }
45
45
  async build(options) {
46
- const { FederationImpl } = await import("./middleware-BVlxjlGK.js");
46
+ const { FederationImpl } = await import("./middleware-BJ83veqi.js");
47
47
  const f = new FederationImpl(options);
48
48
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
49
49
  f.router = this.router.clone();
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { getUserAgent } from "./type-CfOWb_f6.js";
6
+ import { getUserAgent } from "./type-COPv6pMi.js";
7
7
  import { parseSemVer } from "./semver-dArNLkR9.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
 
@@ -3,30 +3,30 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Follow, Person } from "../type-CfOWb_f6.js";
6
+ import { Follow, Person } from "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-BU1AB564.js";
11
+ import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-DrhEvfTo.js";
12
12
  import "../semver-dArNLkR9.js";
13
- import "../client-BjEfcq0Q.js";
14
- import "../lookup-BY7ipa5A.js";
13
+ import "../client-UG5wpNhG.js";
14
+ import "../lookup-BMAWLsP2.js";
15
15
  import "../types-BIgY6c-l.js";
16
- import "../actor-EEh71Njb.js";
17
- import "../key-s7VkHdD2.js";
18
- import "../http-Ddo0ZppP.js";
19
- import "../authdocloader-zA6GeFTV.js";
20
- import "../ld-D08-gVSY.js";
21
- import "../owner-DwNbDv2o.js";
22
- import "../proof-CesqsPsI.js";
23
- import "../inbox-D2vwgPg3.js";
24
- import "../builder-vhQAUB_c.js";
16
+ import "../actor-DbpZ6pzg.js";
17
+ import "../key-CPJcJjp-.js";
18
+ import "../http-05HxN-lp.js";
19
+ import "../authdocloader-BLqMyboS.js";
20
+ import "../ld-DHNA2RSQ.js";
21
+ import "../owner-DDHsHYQO.js";
22
+ import "../proof-exgGRW88.js";
23
+ import "../inbox-DcJN1cxM.js";
24
+ import "../builder-BO61xeXE.js";
25
25
  import "../collection-CSzG2j1P.js";
26
- import "../keycache-D-5tZgkF.js";
26
+ import "../keycache-CMUfqYqr.js";
27
27
  import "../retry-D4GJ670a.js";
28
- import "../send-CLRuMS0k.js";
29
- import { test } from "../testing-D3joI56Q.js";
28
+ import "../send-BfMYakUE.js";
29
+ import { test } from "../testing-RPOc_gVG.js";
30
30
 
31
31
  //#region src/compat/transformers.test.ts
32
32
  const federation = new FederationImpl({ kv: new MemoryKvStore() });
@@ -10,7 +10,7 @@ const node_net = require_chunk.__toESM(require("node:net"));
10
10
 
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "1.9.5";
13
+ var version = "1.9.6";
14
14
  var license = "MIT";
15
15
  var exports$1 = {
16
16
  ".": "./src/mod.ts",
@@ -4525,6 +4525,7 @@ const logger = (0, __logtape_logtape.getLogger)([
4525
4525
  "runtime",
4526
4526
  "docloader"
4527
4527
  ]);
4528
+ const DEFAULT_MAX_REDIRECTION = 20;
4528
4529
  /**
4529
4530
  * Error thrown when fetching a JSON-LD document failed.
4530
4531
  */
@@ -4689,33 +4690,52 @@ async function getRemoteDocument(url, response, fetch$1) {
4689
4690
  * @since 1.3.0
4690
4691
  */
4691
4692
  function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAgent } = {}) {
4692
- async function load(url, options) {
4693
+ async function load(url, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
4693
4694
  options?.signal?.throwIfAborted();
4694
- if (!skipPreloadedContexts && url in contexts_default) {
4695
- logger.debug("Using preloaded context: {url}.", { url });
4695
+ const currentUrl = new URL(url).href;
4696
+ if (!skipPreloadedContexts && currentUrl in contexts_default) {
4697
+ logger.debug("Using preloaded context: {url}.", { url: currentUrl });
4696
4698
  return {
4697
4699
  contextUrl: null,
4698
- document: contexts_default[url],
4699
- documentUrl: url
4700
+ document: contexts_default[currentUrl],
4701
+ documentUrl: currentUrl
4700
4702
  };
4701
4703
  }
4702
4704
  if (!allowPrivateAddress) try {
4703
- await validatePublicUrl(url);
4705
+ await validatePublicUrl(currentUrl);
4704
4706
  } catch (error) {
4705
4707
  if (error instanceof UrlError) logger.error("Disallowed private URL: {url}", {
4706
- url,
4708
+ url: currentUrl,
4707
4709
  error
4708
4710
  });
4709
4711
  throw error;
4710
4712
  }
4711
- const request = createRequest(url, { userAgent });
4713
+ visited.add(currentUrl);
4714
+ const request = createRequest(currentUrl, { userAgent });
4712
4715
  logRequest(request);
4713
4716
  const response = await fetch(request, {
4714
4717
  redirect: "manual",
4715
4718
  signal: options?.signal
4716
4719
  });
4717
- if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) return load(response.headers.get("Location"), options);
4718
- return getRemoteDocument(url, response, load);
4720
+ if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
4721
+ if (redirected >= DEFAULT_MAX_REDIRECTION) {
4722
+ logger.error("Too many redirections ({redirections}) while fetching document.", {
4723
+ redirections: redirected + 1,
4724
+ url: currentUrl
4725
+ });
4726
+ throw new FetchError(currentUrl, `Too many redirections (${redirected + 1})`);
4727
+ }
4728
+ const redirectUrl = new URL(response.headers.get("Location"), response.url === "" ? currentUrl : response.url).href;
4729
+ if (visited.has(redirectUrl)) {
4730
+ logger.error("Detected a redirect loop while fetching document: {url} -> {redirectUrl}", {
4731
+ url: currentUrl,
4732
+ redirectUrl
4733
+ });
4734
+ throw new FetchError(currentUrl, `Redirect loop detected: ${redirectUrl}`);
4735
+ }
4736
+ return load(redirectUrl, options, redirected + 1, visited);
4737
+ }
4738
+ return getRemoteDocument(currentUrl, response, load);
4719
4739
  }
4720
4740
  return load;
4721
4741
  }
@@ -9,7 +9,7 @@ import { isIP } from "node:net";
9
9
 
10
10
  //#region deno.json
11
11
  var name = "@fedify/fedify";
12
- var version = "1.9.5";
12
+ var version = "1.9.6";
13
13
  var license = "MIT";
14
14
  var exports = {
15
15
  ".": "./src/mod.ts",
@@ -4524,6 +4524,7 @@ const logger = getLogger([
4524
4524
  "runtime",
4525
4525
  "docloader"
4526
4526
  ]);
4527
+ const DEFAULT_MAX_REDIRECTION = 20;
4527
4528
  /**
4528
4529
  * Error thrown when fetching a JSON-LD document failed.
4529
4530
  */
@@ -4688,33 +4689,52 @@ async function getRemoteDocument(url, response, fetch$1) {
4688
4689
  * @since 1.3.0
4689
4690
  */
4690
4691
  function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAgent } = {}) {
4691
- async function load(url, options) {
4692
+ async function load(url, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
4692
4693
  options?.signal?.throwIfAborted();
4693
- if (!skipPreloadedContexts && url in contexts_default) {
4694
- logger.debug("Using preloaded context: {url}.", { url });
4694
+ const currentUrl = new URL(url).href;
4695
+ if (!skipPreloadedContexts && currentUrl in contexts_default) {
4696
+ logger.debug("Using preloaded context: {url}.", { url: currentUrl });
4695
4697
  return {
4696
4698
  contextUrl: null,
4697
- document: contexts_default[url],
4698
- documentUrl: url
4699
+ document: contexts_default[currentUrl],
4700
+ documentUrl: currentUrl
4699
4701
  };
4700
4702
  }
4701
4703
  if (!allowPrivateAddress) try {
4702
- await validatePublicUrl(url);
4704
+ await validatePublicUrl(currentUrl);
4703
4705
  } catch (error) {
4704
4706
  if (error instanceof UrlError) logger.error("Disallowed private URL: {url}", {
4705
- url,
4707
+ url: currentUrl,
4706
4708
  error
4707
4709
  });
4708
4710
  throw error;
4709
4711
  }
4710
- const request = createRequest(url, { userAgent });
4712
+ visited.add(currentUrl);
4713
+ const request = createRequest(currentUrl, { userAgent });
4711
4714
  logRequest(request);
4712
4715
  const response = await fetch(request, {
4713
4716
  redirect: "manual",
4714
4717
  signal: options?.signal
4715
4718
  });
4716
- if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) return load(response.headers.get("Location"), options);
4717
- return getRemoteDocument(url, response, load);
4719
+ if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
4720
+ if (redirected >= DEFAULT_MAX_REDIRECTION) {
4721
+ logger.error("Too many redirections ({redirections}) while fetching document.", {
4722
+ redirections: redirected + 1,
4723
+ url: currentUrl
4724
+ });
4725
+ throw new FetchError(currentUrl, `Too many redirections (${redirected + 1})`);
4726
+ }
4727
+ const redirectUrl = new URL(response.headers.get("Location"), response.url === "" ? currentUrl : response.url).href;
4728
+ if (visited.has(redirectUrl)) {
4729
+ logger.error("Detected a redirect loop while fetching document: {url} -> {redirectUrl}", {
4730
+ url: currentUrl,
4731
+ redirectUrl
4732
+ });
4733
+ throw new FetchError(currentUrl, `Redirect loop detected: ${redirectUrl}`);
4734
+ }
4735
+ return load(redirectUrl, options, redirected + 1, visited);
4736
+ }
4737
+ return getRemoteDocument(currentUrl, response, load);
4718
4738
  }
4719
4739
  return load;
4720
4740
  }
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { __commonJS, __toESM } from "./type-CfOWb_f6.js";
6
+ import { __commonJS, __toESM } from "./type-COPv6pMi.js";
7
7
 
8
8
  //#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
9
9
  var require_glob_to_regexp = __commonJS({ "../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
@@ -3,16 +3,16 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, Note, Person } from "../type-CfOWb_f6.js";
6
+ import { Activity, Note, Person } from "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
11
  import { parseSemVer } from "../semver-dArNLkR9.js";
12
- import "../lookup-BY7ipa5A.js";
13
- import "../inbox-D2vwgPg3.js";
14
- import { createFederationBuilder } from "../builder-vhQAUB_c.js";
15
- import { test } from "../testing-D3joI56Q.js";
12
+ import "../lookup-BMAWLsP2.js";
13
+ import "../inbox-DcJN1cxM.js";
14
+ import { createFederationBuilder } from "../builder-BO61xeXE.js";
15
+ import { test } from "../testing-RPOc_gVG.js";
16
16
  import { assertExists } from "../std__assert-X-_kMxKM.js";
17
17
  import "../assert_rejects-DiIiJbZn.js";
18
18
  import "../assert_is_error-BPGph1Jx.js";
@@ -3,13 +3,13 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import "../type-CfOWb_f6.js";
6
+ import "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
- import "../lookup-BY7ipa5A.js";
10
+ import "../lookup-BMAWLsP2.js";
11
11
  import { buildCollectionSynchronizationHeader, digest } from "../collection-CSzG2j1P.js";
12
- import { test } from "../testing-D3joI56Q.js";
12
+ import { test } from "../testing-RPOc_gVG.js";
13
13
  import "../std__assert-X-_kMxKM.js";
14
14
  import "../assert_rejects-DiIiJbZn.js";
15
15
  import "../assert_is_error-BPGph1Jx.js";
@@ -3,36 +3,36 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Create, Note, Person } from "../type-CfOWb_f6.js";
6
+ import { Create, Note, Person } from "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BU1AB564.js";
11
+ import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DrhEvfTo.js";
12
12
  import "../semver-dArNLkR9.js";
13
- import "../client-BjEfcq0Q.js";
14
- import "../lookup-BY7ipa5A.js";
13
+ import "../client-UG5wpNhG.js";
14
+ import "../lookup-BMAWLsP2.js";
15
15
  import "../types-BIgY6c-l.js";
16
- import "../actor-EEh71Njb.js";
17
- import "../key-s7VkHdD2.js";
18
- import { signRequest } from "../http-Ddo0ZppP.js";
19
- import "../authdocloader-zA6GeFTV.js";
20
- import "../ld-D08-gVSY.js";
21
- import "../owner-DwNbDv2o.js";
22
- import "../proof-CesqsPsI.js";
23
- import { InboxListenerSet } from "../inbox-D2vwgPg3.js";
24
- import "../builder-vhQAUB_c.js";
16
+ import "../actor-DbpZ6pzg.js";
17
+ import "../key-CPJcJjp-.js";
18
+ import { signRequest } from "../http-05HxN-lp.js";
19
+ import "../authdocloader-BLqMyboS.js";
20
+ import "../ld-DHNA2RSQ.js";
21
+ import "../owner-DDHsHYQO.js";
22
+ import "../proof-exgGRW88.js";
23
+ import { InboxListenerSet } from "../inbox-DcJN1cxM.js";
24
+ import "../builder-BO61xeXE.js";
25
25
  import "../collection-CSzG2j1P.js";
26
- import "../keycache-D-5tZgkF.js";
26
+ import "../keycache-CMUfqYqr.js";
27
27
  import "../retry-D4GJ670a.js";
28
- import "../send-CLRuMS0k.js";
29
- import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-D3joI56Q.js";
28
+ import "../send-BfMYakUE.js";
29
+ import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-RPOc_gVG.js";
30
30
  import "../std__assert-X-_kMxKM.js";
31
31
  import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
32
32
  import "../assert_is_error-BPGph1Jx.js";
33
33
  import "../assert_not_equals-f3m3epl3.js";
34
34
  import "../assert_throws-BOO88avQ.js";
35
- import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-CfyZsHFW.js";
35
+ import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-IZ5050fT.js";
36
36
 
37
37
  //#region src/federation/handler.test.ts
38
38
  test("acceptsJsonLd()", () => {
@@ -3,36 +3,36 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Create, Follow, Person } from "../type-CfOWb_f6.js";
6
+ import { Create, Follow, Person } from "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import { createFederation } from "../middleware-BU1AB564.js";
11
+ import { createFederation } from "../middleware-DrhEvfTo.js";
12
12
  import "../semver-dArNLkR9.js";
13
- import "../client-BjEfcq0Q.js";
14
- import "../lookup-BY7ipa5A.js";
13
+ import "../client-UG5wpNhG.js";
14
+ import "../lookup-BMAWLsP2.js";
15
15
  import "../types-BIgY6c-l.js";
16
- import "../actor-EEh71Njb.js";
17
- import "../key-s7VkHdD2.js";
18
- import "../http-Ddo0ZppP.js";
19
- import "../authdocloader-zA6GeFTV.js";
20
- import "../ld-D08-gVSY.js";
21
- import "../owner-DwNbDv2o.js";
22
- import { signObject } from "../proof-CesqsPsI.js";
23
- import "../inbox-D2vwgPg3.js";
24
- import "../builder-vhQAUB_c.js";
16
+ import "../actor-DbpZ6pzg.js";
17
+ import "../key-CPJcJjp-.js";
18
+ import "../http-05HxN-lp.js";
19
+ import "../authdocloader-BLqMyboS.js";
20
+ import "../ld-DHNA2RSQ.js";
21
+ import "../owner-DDHsHYQO.js";
22
+ import { signObject } from "../proof-exgGRW88.js";
23
+ import "../inbox-DcJN1cxM.js";
24
+ import "../builder-BO61xeXE.js";
25
25
  import "../collection-CSzG2j1P.js";
26
- import "../keycache-D-5tZgkF.js";
26
+ import "../keycache-CMUfqYqr.js";
27
27
  import "../retry-D4GJ670a.js";
28
- import "../send-CLRuMS0k.js";
29
- import { mockDocumentLoader, test } from "../testing-D3joI56Q.js";
28
+ import "../send-BfMYakUE.js";
29
+ import { mockDocumentLoader, test } from "../testing-RPOc_gVG.js";
30
30
  import "../std__assert-X-_kMxKM.js";
31
31
  import "../assert_rejects-DiIiJbZn.js";
32
32
  import "../assert_is_error-BPGph1Jx.js";
33
33
  import "../assert_not_equals-f3m3epl3.js";
34
34
  import "../assert_throws-BOO88avQ.js";
35
- import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey } from "../keys-CfyZsHFW.js";
35
+ import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey } from "../keys-IZ5050fT.js";
36
36
 
37
37
  //#region src/federation/idempotency.test.ts
38
38
  const kv = new MemoryKvStore();
@@ -3,11 +3,11 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, Create, Invite, Offer, Update } from "../type-CfOWb_f6.js";
6
+ import { Activity, Create, Invite, Offer, Update } from "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
- import "../lookup-BY7ipa5A.js";
9
- import { InboxListenerSet } from "../inbox-D2vwgPg3.js";
10
- import { test } from "../testing-D3joI56Q.js";
8
+ import "../lookup-BMAWLsP2.js";
9
+ import { InboxListenerSet } from "../inbox-DcJN1cxM.js";
10
+ import { test } from "../testing-RPOc_gVG.js";
11
11
  import "../assert_is_error-BPGph1Jx.js";
12
12
  import { assertThrows } from "../assert_throws-BOO88avQ.js";
13
13
 
@@ -3,14 +3,14 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { CryptographicKey, Multikey } from "../type-CfOWb_f6.js";
6
+ import { CryptographicKey, Multikey } from "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import "../lookup-BY7ipa5A.js";
12
- import { KvKeyCache } from "../keycache-D-5tZgkF.js";
13
- import { test } from "../testing-D3joI56Q.js";
11
+ import "../lookup-BMAWLsP2.js";
12
+ import { KvKeyCache } from "../keycache-CMUfqYqr.js";
13
+ import { test } from "../testing-RPOc_gVG.js";
14
14
 
15
15
  //#region src/federation/keycache.test.ts
16
16
  test("KvKeyCache.set()", async () => {
@@ -30,6 +30,7 @@ test("KvKeyCache.set()", async () => {
30
30
  });
31
31
  await cache.set(new URL("https://example.com/null"), null);
32
32
  assert(cache.nullKeys.has("https://example.com/null"));
33
+ assertEquals(await kv.get(["pk", "https://example.com/null"]), { _fedify: "key-unavailable" });
33
34
  });
34
35
  test("KvKeyCache.get()", async () => {
35
36
  const kv = new MemoryKvStore();
@@ -52,6 +53,9 @@ test("KvKeyCache.get()", async () => {
52
53
  assertEquals(multikey?.id?.href, "https://example.com/key2");
53
54
  cache.nullKeys.add("https://example.com/null");
54
55
  assertEquals(await cache.get(new URL("https://example.com/null")), null);
56
+ await kv.set(["pk", "https://example.com/null2"], { _fedify: "key-unavailable" });
57
+ const cache2 = new KvKeyCache(kv, ["pk"]);
58
+ assertEquals(await cache2.get(new URL("https://example.com/null2")), null);
55
59
  });
56
60
 
57
61
  //#endregion
@@ -3,13 +3,13 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import "../type-CfOWb_f6.js";
6
+ import "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import "../lookup-BY7ipa5A.js";
12
- import { test } from "../testing-D3joI56Q.js";
11
+ import "../lookup-BMAWLsP2.js";
12
+ import { test } from "../testing-RPOc_gVG.js";
13
13
  import "../std__assert-X-_kMxKM.js";
14
14
  import "../assert_rejects-DiIiJbZn.js";
15
15
  import "../assert_is_error-BPGph1Jx.js";
@@ -3,37 +3,37 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-CfOWb_f6.js";
6
+ import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-COPv6pMi.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-BU1AB564.js";
11
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-DrhEvfTo.js";
12
12
  import "../semver-dArNLkR9.js";
13
- import "../client-BjEfcq0Q.js";
14
- import { RouterError, lookupObject } from "../lookup-BY7ipa5A.js";
13
+ import "../client-UG5wpNhG.js";
14
+ import { RouterError, lookupObject } from "../lookup-BMAWLsP2.js";
15
15
  import "../types-BIgY6c-l.js";
16
- import "../actor-EEh71Njb.js";
17
- import "../key-s7VkHdD2.js";
18
- import { signRequest, verifyRequest } from "../http-Ddo0ZppP.js";
19
- import { getAuthenticatedDocumentLoader } from "../authdocloader-zA6GeFTV.js";
20
- import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-D08-gVSY.js";
21
- import { doesActorOwnKey } from "../owner-DwNbDv2o.js";
22
- import { signObject, verifyObject } from "../proof-CesqsPsI.js";
23
- import "../inbox-D2vwgPg3.js";
24
- import "../builder-vhQAUB_c.js";
16
+ import "../actor-DbpZ6pzg.js";
17
+ import "../key-CPJcJjp-.js";
18
+ import { signRequest, verifyRequest } from "../http-05HxN-lp.js";
19
+ import { getAuthenticatedDocumentLoader } from "../authdocloader-BLqMyboS.js";
20
+ import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-DHNA2RSQ.js";
21
+ import { doesActorOwnKey } from "../owner-DDHsHYQO.js";
22
+ import { signObject, verifyObject } from "../proof-exgGRW88.js";
23
+ import "../inbox-DcJN1cxM.js";
24
+ import "../builder-BO61xeXE.js";
25
25
  import "../collection-CSzG2j1P.js";
26
- import "../keycache-D-5tZgkF.js";
26
+ import "../keycache-CMUfqYqr.js";
27
27
  import "../retry-D4GJ670a.js";
28
- import "../send-CLRuMS0k.js";
29
- import { mockDocumentLoader, test } from "../testing-D3joI56Q.js";
28
+ import "../send-BfMYakUE.js";
29
+ import { mockDocumentLoader, test } from "../testing-RPOc_gVG.js";
30
30
  import { assertStrictEquals } from "../std__assert-X-_kMxKM.js";
31
31
  import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
32
32
  import "../assert_is_error-BPGph1Jx.js";
33
33
  import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
34
34
  import { assertThrows } from "../assert_throws-BOO88avQ.js";
35
- import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-CfyZsHFW.js";
36
- import { esm_default } from "../esm-CpGJtXU9.js";
35
+ import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-IZ5050fT.js";
36
+ import { esm_default } from "../esm-C1EfGjSS.js";
37
37
 
38
38
  //#region src/testing/fixtures/example.com/person.json
39
39
  var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
@@ -3,17 +3,17 @@
3
3
  const { URLPattern } = require("urlpattern-polyfill");
4
4
 
5
5
  require('../transformers-CoBS-oFG.cjs');
6
- require('../docloader-D_YsJgEb.cjs');
7
- require('../actor-Bpeh1XeR.cjs');
8
- const require_middleware = require('../middleware-BPgbdjdi.cjs');
9
- require('../lookup-B8OwEXPT.cjs');
10
- require('../key-daNTxBaX.cjs');
11
- require('../http-BvRfZYTf.cjs');
12
- require('../proof-Cf8y40Qt.cjs');
6
+ require('../docloader-BIFI3OS7.cjs');
7
+ require('../actor-DlS-Q8hE.cjs');
8
+ const require_middleware = require('../middleware-CGbvIGvy.cjs');
9
+ require('../lookup-C4_dVYz7.cjs');
10
+ require('../key-DjS1X9TG.cjs');
11
+ require('../http-BgopPF-8.cjs');
12
+ require('../proof-CX7ujFFX.cjs');
13
13
  const require_federation = require('../federation-H2_En3j5.cjs');
14
- require('../types-CUQq-S-s.cjs');
15
- require('../authdocloader-Cln84bGw.cjs');
16
- require('../vocab-tt4hGhXv.cjs');
14
+ require('../types-CGnM1vft.cjs');
15
+ require('../authdocloader-CT_V4Z7G.cjs');
16
+ require('../vocab-BFy1CS5L.cjs');
17
17
 
18
18
  exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
19
19
  exports.MemoryKvStore = require_federation.MemoryKvStore;
@@ -3,16 +3,16 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
5
  import "../transformers-BFT6d7J5.js";
6
- import "../docloader-ygR0HOEb.js";
7
- import "../actor-BScoqM7M.js";
8
- import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DqaAsuyL.js";
9
- import "../lookup-DKLV3BDT.js";
10
- import "../key-i1AKuYo2.js";
11
- import "../http-Cstrlwgg.js";
12
- import "../proof-D6yDDNPJ.js";
6
+ import "../docloader-fJgJeqiX.js";
7
+ import "../actor-CEGEmRll.js";
8
+ import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-ODfDRN3q.js";
9
+ import "../lookup-CKZfuyxA.js";
10
+ import "../key-ibMO03_0.js";
11
+ import "../http-CR-Eg1Uq.js";
12
+ import "../proof-V1uQaB2y.js";
13
13
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-D1U8YY9t.js";
14
- import "../types-C8K_AzLR.js";
15
- import "../authdocloader-Dzg6OOeX.js";
16
- import "../vocab-YzUIufJF.js";
14
+ import "../types-Cptev2nt.js";
15
+ import "../authdocloader-DUQcOTRS.js";
16
+ import "../vocab-BPFiQ650.js";
17
17
 
18
18
  export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };