@fedify/fedify 1.9.12 → 1.9.13-dev.2344

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-DbMPM7MA.cjs → actor-B2bgsOT5.cjs} +187 -187
  2. package/dist/{actor-Bapf7M7G.mjs → actor-DWfw2nxx.mjs} +1 -1
  3. package/dist/{actor-c1CsMwXN.js → actor-NkVQr224.js} +187 -187
  4. package/dist/{authdocloader-CtifebS7.cjs → authdocloader-BlkJJdEW.cjs} +3 -3
  5. package/dist/{authdocloader-DIKD7bwX.js → authdocloader-CiOaAMij.js} +3 -3
  6. package/dist/{authdocloader-CpMO32zq.mjs → authdocloader-DrnaVEJP.mjs} +3 -3
  7. package/dist/{builder-DC-GkZmh.mjs → builder-Cu8Iy5eZ.mjs} +4 -4
  8. package/dist/{client-CCadsk7N.mjs → client-Ck9Tn5iM.mjs} +63 -5
  9. package/dist/compat/mod.cjs +1 -1
  10. package/dist/compat/transformers.test.mjs +3 -3
  11. package/dist/{docloader-kZyrNwUH.js → docloader-B1OuNGno.js} +1 -1
  12. package/dist/{docloader-D4ctxKPG.cjs → docloader-CF7V0mC7.cjs} +1 -1
  13. package/dist/{esm-BxUjO5zX.mjs → esm-i8KtYbr9.mjs} +1 -1
  14. package/dist/federation/builder.test.mjs +3 -3
  15. package/dist/federation/collection.test.mjs +1 -1
  16. package/dist/federation/handler.test.mjs +7 -7
  17. package/dist/federation/idempotency.test.mjs +5 -5
  18. package/dist/federation/inbox.test.mjs +3 -3
  19. package/dist/federation/keycache.test.mjs +3 -3
  20. package/dist/federation/kv.test.mjs +1 -1
  21. package/dist/federation/middleware.test.mjs +11 -11
  22. package/dist/federation/mod.cjs +2 -2
  23. package/dist/federation/mod.js +1 -1
  24. package/dist/federation/mq.test.mjs +1 -1
  25. package/dist/federation/retry.test.mjs +1 -1
  26. package/dist/federation/router.test.mjs +2 -2
  27. package/dist/federation/send.test.mjs +7 -7
  28. package/dist/federation/temporal.test.mjs +2 -2
  29. package/dist/{http-DHDDqxdt.cjs → http-BEbcy3ax.cjs} +3 -3
  30. package/dist/{http-XbFxcG2g.mjs → http-CQ-6-sWA.mjs} +2 -2
  31. package/dist/{http-DM-MJijX.js → http-HjCIfzJC.js} +3 -3
  32. package/dist/{inbox-Uj6B6OKU.mjs → inbox-k8JQUnr6.mjs} +1 -1
  33. package/dist/{key-CLQ-3DyR.mjs → key-1GoRlbN4.mjs} +1 -1
  34. package/dist/{key-CPiCP_jy.cjs → key-CGuO8qJR.cjs} +1 -1
  35. package/dist/{key-DRbBpHOk.cjs → key-D-Oj5Zp2.cjs} +2 -2
  36. package/dist/{key-BiqmS6JT.mjs → key-DVX4QzuU.mjs} +2 -2
  37. package/dist/{key-Bgwa1_Vg.js → key-G8BkRalB.js} +2 -2
  38. package/dist/{keycache-FgycNH45.mjs → keycache-LnrJEGam.mjs} +1 -1
  39. package/dist/{keys-C9GAGpRb.mjs → keys-0Ff8761e.mjs} +1 -1
  40. package/dist/{ld-CrKje9FG.mjs → ld-Bftin5ZV.mjs} +2 -2
  41. package/dist/{lookup-C6mc3UXC.cjs → lookup-BSzQV-_k.cjs} +1 -1
  42. package/dist/{lookup-DkapKN3J.js → lookup-Ch5cERe_.js} +1 -1
  43. package/dist/{lookup-C4htfQ1_.mjs → lookup-HZr8nYiW.mjs} +1 -1
  44. package/dist/{middleware-ClNY6MUr.cjs → middleware-B58IZiSj.cjs} +1 -1
  45. package/dist/{middleware-CiiWngJ-.mjs → middleware-CDNI_5lz.mjs} +15 -15
  46. package/dist/{middleware--MqHhywy.mjs → middleware-DAMqqhFd.mjs} +1 -1
  47. package/dist/{middleware-Bs8fC5Th.js → middleware-DzaUMfHQ.js} +8 -8
  48. package/dist/{middleware-DjmGmYQz.cjs → middleware-MxfcK4vs.cjs} +10 -10
  49. package/dist/mod.cjs +10 -10
  50. package/dist/mod.js +9 -9
  51. package/dist/nodeinfo/client.test.mjs +63 -3
  52. package/dist/nodeinfo/handler.test.mjs +2 -2
  53. package/dist/nodeinfo/mod.cjs +1 -1
  54. package/dist/nodeinfo/mod.js +1 -1
  55. package/dist/nodeinfo/semver.test.mjs +1 -1
  56. package/dist/nodeinfo/types.test.mjs +1 -1
  57. package/dist/{owner-BxrTJWec.mjs → owner-DTdIjtoj.mjs} +3 -3
  58. package/dist/{proof-C-3TCOgT.cjs → proof-BeaoVMmb.cjs} +3 -3
  59. package/dist/{proof-CDFv0GLm.mjs → proof-DHg_8Rip.mjs} +2 -2
  60. package/dist/{proof-BCTTE8zz.js → proof-Dhn-fh6B.js} +3 -3
  61. package/dist/runtime/authdocloader.test.mjs +6 -6
  62. package/dist/runtime/docloader.test.mjs +3 -3
  63. package/dist/runtime/key.test.mjs +3 -3
  64. package/dist/runtime/langstr.test.mjs +2 -2
  65. package/dist/runtime/link.test.mjs +2 -2
  66. package/dist/runtime/mod.cjs +3 -3
  67. package/dist/runtime/mod.js +3 -3
  68. package/dist/runtime/multibase/multibase.test.mjs +2 -2
  69. package/dist/runtime/url.test.mjs +2 -2
  70. package/dist/{send-D8YQJCKA.mjs → send-5v8rpjgq.mjs} +2 -2
  71. package/dist/sig/http.test.mjs +6 -6
  72. package/dist/sig/key.test.mjs +4 -4
  73. package/dist/sig/ld.test.mjs +5 -5
  74. package/dist/sig/mod.cjs +3 -3
  75. package/dist/sig/mod.js +3 -3
  76. package/dist/sig/owner.test.mjs +5 -5
  77. package/dist/sig/proof.test.mjs +4 -4
  78. package/dist/{temporal-VtumSYrv.mjs → temporal-CJPJeb9T.mjs} +1 -1
  79. package/dist/testing/docloader.test.mjs +1 -1
  80. package/dist/testing/mod.mjs +1 -1
  81. package/dist/{testing-CZLFMsfn.mjs → testing-04hA-7q1.mjs} +2 -2
  82. package/dist/{transformers-CReap-SS.cjs → transformers-BQBtOzZ9.cjs} +1 -1
  83. package/dist/{types-uQdGoORv.cjs → types-Bgnn6Jz6.cjs} +63 -5
  84. package/dist/{types-CNhOmYHh.js → types-Cjuud6i7.js} +63 -5
  85. package/dist/vocab/actor.test.mjs +4 -4
  86. package/dist/vocab/cjs.test.mjs +1 -1
  87. package/dist/vocab/lookup.test.mjs +4 -4
  88. package/dist/vocab/mod.cjs +3 -3
  89. package/dist/vocab/mod.js +3 -3
  90. package/dist/vocab/type.test.mjs +2 -2
  91. package/dist/vocab/vocab.test.mjs +3 -3
  92. package/dist/{vocab-C071xkhv.mjs → vocab-DlRBSs8-.mjs} +186 -186
  93. package/dist/webfinger/handler.test.mjs +3 -3
  94. package/dist/webfinger/lookup.test.mjs +3 -3
  95. package/dist/webfinger/mod.cjs +1 -1
  96. package/dist/webfinger/mod.js +1 -1
  97. package/dist/x/cfworkers.cjs +1 -1
  98. package/dist/x/cfworkers.test.mjs +1 -1
  99. package/dist/x/hono.cjs +1 -1
  100. package/dist/x/sveltekit.cjs +1 -1
  101. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_docloader = require("./docloader-D4ctxKPG.cjs");
4
- const require_key = require("./key-DRbBpHOk.cjs");
5
- const require_http = require("./http-DHDDqxdt.cjs");
3
+ const require_docloader = require("./docloader-CF7V0mC7.cjs");
4
+ const require_key = require("./key-D-Oj5Zp2.cjs");
5
+ const require_http = require("./http-BEbcy3ax.cjs");
6
6
  //#region src/runtime/authdocloader.ts
7
7
  const logger = (0, require("@logtape/logtape").getLogger)([
8
8
  "fedify",
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
- import { a as getRemoteDocument, c as logRequest, l as UrlError, n as createRequest, u as validatePublicUrl } from "./docloader-kZyrNwUH.js";
4
- import { o as validateCryptoKey } from "./key-Bgwa1_Vg.js";
5
- import { t as doubleKnock } from "./http-DM-MJijX.js";
3
+ import { a as getRemoteDocument, c as logRequest, l as UrlError, n as createRequest, u as validatePublicUrl } from "./docloader-B1OuNGno.js";
4
+ import { o as validateCryptoKey } from "./key-G8BkRalB.js";
5
+ import { t as doubleKnock } from "./http-HjCIfzJC.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  //#region src/runtime/authdocloader.ts
8
8
  const logger = getLogger([
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { $ as UrlError, K as createRequest, Q as logRequest, Y as getRemoteDocument, rt as validatePublicUrl } from "./vocab-C071xkhv.mjs";
5
- import { a as validateCryptoKey } from "./key-BiqmS6JT.mjs";
6
- import { n as doubleKnock } from "./http-XbFxcG2g.mjs";
4
+ import { $ as UrlError, K as createRequest, Q as logRequest, Y as getRemoteDocument, rt as validatePublicUrl } from "./vocab-DlRBSs8-.mjs";
5
+ import { a as validateCryptoKey } from "./key-DVX4QzuU.mjs";
6
+ import { n as doubleKnock } from "./http-CQ-6-sWA.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  //#region src/runtime/authdocloader.ts
9
9
  const logger = getLogger([
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { U as getTypeId, ot as name, st as version } from "./vocab-C071xkhv.mjs";
5
- import { i as RouterError, r as Router } from "./lookup-C4htfQ1_.mjs";
6
- import { t as InboxListenerSet } from "./inbox-Uj6B6OKU.mjs";
4
+ import { U as getTypeId, ot as name, st as version } from "./vocab-DlRBSs8-.mjs";
5
+ import { i as RouterError, r as Router } from "./lookup-HZr8nYiW.mjs";
6
+ import { t as InboxListenerSet } from "./inbox-k8JQUnr6.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  //#region src/federation/builder.ts
@@ -40,7 +40,7 @@ var FederationBuilderImpl = class {
40
40
  this.collectionTypeIds = {};
41
41
  }
42
42
  async build(options) {
43
- const { FederationImpl } = await import("./middleware--MqHhywy.mjs");
43
+ const { FederationImpl } = await import("./middleware-DAMqqhFd.mjs");
44
44
  const f = new FederationImpl(options);
45
45
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
46
46
  f.router = this.router.clone();
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { X as getUserAgent } from "./vocab-C071xkhv.mjs";
4
+ import { $ as UrlError, X as getUserAgent, rt as validatePublicUrl } from "./vocab-DlRBSs8-.mjs";
5
5
  import { n as parseSemVer } from "./semver-CgD82xxg.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  //#region src/nodeinfo/client.ts
@@ -10,15 +10,72 @@ const logger = getLogger([
10
10
  "nodeinfo",
11
11
  "client"
12
12
  ]);
13
+ const DEFAULT_MAX_REDIRECTION = 5;
14
+ /**
15
+ * Fetches a URL while guarding against SSRF. Before every request—including
16
+ * each redirect hop—the destination is validated with
17
+ * {@link validatePublicUrl}, so that loopback, link-local, and private
18
+ * addresses, as well as non-HTTP(S) schemes such as `data:`, are rejected.
19
+ * Redirects are followed manually with a cap, so that a public URL cannot
20
+ * bounce the request to an internal address.
21
+ * @param url The URL to fetch.
22
+ * @param headers The request headers.
23
+ * @returns The final response, or `null` if the URL is disallowed or there
24
+ * are too many redirects.
25
+ */
26
+ async function fetchPublicUrl(url, headers) {
27
+ let current = url instanceof URL ? url : new URL(url);
28
+ let redirected = 0;
29
+ while (true) {
30
+ try {
31
+ await validatePublicUrl(current.href);
32
+ } catch (e) {
33
+ if (e instanceof UrlError) {
34
+ logger.error("Refused to fetch a private or invalid URL {url}: {error}", {
35
+ url: current.href,
36
+ error: e
37
+ });
38
+ return null;
39
+ }
40
+ throw e;
41
+ }
42
+ const response = await fetch(current, {
43
+ headers,
44
+ redirect: "manual"
45
+ });
46
+ if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
47
+ redirected++;
48
+ if (redirected >= DEFAULT_MAX_REDIRECTION) {
49
+ logger.error("Too many redirections ({redirections}) while fetching {url}.", {
50
+ redirections: redirected,
51
+ url: current.href
52
+ });
53
+ return null;
54
+ }
55
+ const next = new URL(response.headers.get("Location"), response.url == null || response.url === "" ? current : response.url);
56
+ if (next.protocol !== current.protocol) {
57
+ logger.error("Refused a redirect to a different protocol ({protocol} to {redirectedProtocol}) while fetching NodeInfo.", {
58
+ protocol: current.protocol,
59
+ redirectedProtocol: next.protocol
60
+ });
61
+ return null;
62
+ }
63
+ current = next;
64
+ continue;
65
+ }
66
+ return response;
67
+ }
68
+ }
13
69
  async function getNodeInfo(url, options = {}) {
14
70
  try {
15
71
  let nodeInfoUrl = url;
16
72
  if (!options.direct) {
17
73
  const wellKnownUrl = new URL("/.well-known/nodeinfo", url);
18
- const wellKnownResponse = await fetch(wellKnownUrl, { headers: {
74
+ const wellKnownResponse = await fetchPublicUrl(wellKnownUrl, {
19
75
  Accept: "application/json",
20
76
  "User-Agent": typeof options.userAgent === "string" ? options.userAgent : getUserAgent(options.userAgent)
21
- } });
77
+ });
78
+ if (wellKnownResponse == null) return void 0;
22
79
  if (!wellKnownResponse.ok) {
23
80
  logger.error("Failed to fetch {url}: {status} {statusText}", {
24
81
  url: wellKnownUrl.href,
@@ -38,10 +95,11 @@ async function getNodeInfo(url, options = {}) {
38
95
  }
39
96
  nodeInfoUrl = link.href;
40
97
  }
41
- const response = await fetch(nodeInfoUrl, { headers: {
98
+ const response = await fetchPublicUrl(nodeInfoUrl, {
42
99
  Accept: "application/json",
43
100
  "User-Agent": typeof options.userAgent === "string" ? options.userAgent : getUserAgent(options.userAgent)
44
- } });
101
+ });
102
+ if (response == null) return void 0;
45
103
  if (!response.ok) {
46
104
  logger.error("Failed to fetch NodeInfo document from {url}: {status} {statusText}", {
47
105
  url: nodeInfoUrl.toString(),
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const require_transformers = require("../transformers-CReap-SS.cjs");
4
+ const require_transformers = require("../transformers-BQBtOzZ9.cjs");
5
5
  exports.actorDehydrator = require_transformers.actorDehydrator;
6
6
  exports.autoIdAssigner = require_transformers.autoIdAssigner;
7
7
  exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
@@ -1,13 +1,13 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { C as Person, u as Follow } from "../vocab-C071xkhv.mjs";
5
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { C as Person, u as Follow } from "../vocab-DlRBSs8-.mjs";
5
+ import { t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
8
8
  import { t as assert } from "../assert-DikXweDx.mjs";
9
9
  import { t as MemoryKvStore } from "../kv-DM1zFCtL.mjs";
10
- import { _ as actorDehydrator, n as FederationImpl, v as autoIdAssigner } from "../middleware-CiiWngJ-.mjs";
10
+ import { _ as actorDehydrator, n as FederationImpl, v as autoIdAssigner } from "../middleware-CDNI_5lz.mjs";
11
11
  //#region src/compat/transformers.test.ts
12
12
  const context = new FederationImpl({ kv: new MemoryKvStore() }).createContext(new URL("http://example.com/"));
13
13
  test("autoIdAssigner", async () => {
@@ -6,7 +6,7 @@ import { lookup } from "node:dns/promises";
6
6
  import { isIP } from "node:net";
7
7
  //#region deno.json
8
8
  var name = "@fedify/fedify";
9
- var version = "1.9.12";
9
+ var version = "1.9.13-dev.2344+eda156de";
10
10
  //#endregion
11
11
  //#region src/runtime/contexts.ts
12
12
  const preloadedContexts = {
@@ -29,7 +29,7 @@ let node_dns_promises = require("node:dns/promises");
29
29
  let node_net = require("node:net");
30
30
  //#region deno.json
31
31
  var name = "@fedify/fedify";
32
- var version = "1.9.12";
32
+ var version = "1.9.13-dev.2344+eda156de";
33
33
  //#endregion
34
34
  //#region src/runtime/contexts.ts
35
35
  const preloadedContexts = {
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { ct as __commonJSMin, dt as __toESM } from "./vocab-C071xkhv.mjs";
4
+ import { ct as __commonJSMin, dt as __toESM } from "./vocab-DlRBSs8-.mjs";
5
5
  //#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
6
6
  var require_glob_to_regexp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7
7
  module.exports = function(glob, opts) {
@@ -1,14 +1,14 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { C as Person, _ as Note, t as Activity } from "../vocab-C071xkhv.mjs";
5
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { C as Person, _ as Note, t as Activity } from "../vocab-DlRBSs8-.mjs";
5
+ import { t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import { a as assertExists } from "../std__assert-2v7gYiZp.mjs";
8
8
  import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
9
9
  import { t as MemoryKvStore } from "../kv-DM1zFCtL.mjs";
10
10
  import { n as parseSemVer } from "../semver-CgD82xxg.mjs";
11
- import { n as createFederationBuilder } from "../builder-DC-GkZmh.mjs";
11
+ import { n as createFederationBuilder } from "../builder-Cu8Iy5eZ.mjs";
12
12
  //#region src/federation/builder.test.ts
13
13
  test("FederationBuilder", async (t) => {
14
14
  await t.step("should build a Federation object with registered components", async () => {
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { t as test } from "../testing-04hA-7q1.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-2v7gYiZp.mjs";
7
7
  import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-BD6-SZ6O.mjs";
@@ -1,18 +1,18 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { C as Person, _ as Note, o as Create } from "../vocab-C071xkhv.mjs";
5
- import { a as mockDocumentLoader, i as createRequestContext, r as createInboxContext, t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { C as Person, _ as Note, o as Create } from "../vocab-DlRBSs8-.mjs";
5
+ import { a as mockDocumentLoader, i as createRequestContext, r as createInboxContext, t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import "../std__assert-2v7gYiZp.mjs";
8
8
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
9
9
  import { t as assert } from "../assert-DikXweDx.mjs";
10
10
  import { t as MemoryKvStore } from "../kv-DM1zFCtL.mjs";
11
- import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, o as acceptsJsonLd, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-CiiWngJ-.mjs";
12
- import { s as signRequest } from "../http-XbFxcG2g.mjs";
13
- import { a as compactJsonLd, f as signJsonLd } from "../ld-CrKje9FG.mjs";
14
- import { t as InboxListenerSet } from "../inbox-Uj6B6OKU.mjs";
15
- import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-C9GAGpRb.mjs";
11
+ import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, o as acceptsJsonLd, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-CDNI_5lz.mjs";
12
+ import { s as signRequest } from "../http-CQ-6-sWA.mjs";
13
+ import { a as compactJsonLd, f as signJsonLd } from "../ld-Bftin5ZV.mjs";
14
+ import { t as InboxListenerSet } from "../inbox-k8JQUnr6.mjs";
15
+ import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-0Ff8761e.mjs";
16
16
  //#region src/federation/handler.test.ts
17
17
  test("acceptsJsonLd()", () => {
18
18
  assert(acceptsJsonLd(new Request("https://example.com/", { headers: { Accept: "application/activity+json" } })));
@@ -1,14 +1,14 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { C as Person, o as Create, u as Follow } from "../vocab-C071xkhv.mjs";
5
- import { a as mockDocumentLoader, t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { C as Person, o as Create, u as Follow } from "../vocab-DlRBSs8-.mjs";
5
+ import { a as mockDocumentLoader, t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import "../std__assert-2v7gYiZp.mjs";
8
8
  import { t as MemoryKvStore } from "../kv-DM1zFCtL.mjs";
9
- import { a as createFederation } from "../middleware-CiiWngJ-.mjs";
10
- import { n as signObject } from "../proof-CDFv0GLm.mjs";
11
- import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-C9GAGpRb.mjs";
9
+ import { a as createFederation } from "../middleware-CDNI_5lz.mjs";
10
+ import { n as signObject } from "../proof-DHg_8Rip.mjs";
11
+ import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-0Ff8761e.mjs";
12
12
  //#region src/federation/idempotency.test.ts
13
13
  const kv = new MemoryKvStore();
14
14
  const federationOptions = {
@@ -1,11 +1,11 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { O as Update, m as Invite, o as Create, t as Activity, y as Offer } from "../vocab-C071xkhv.mjs";
5
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { O as Update, m as Invite, o as Create, t as Activity, y as Offer } from "../vocab-DlRBSs8-.mjs";
5
+ import { t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
8
- import { t as InboxListenerSet } from "../inbox-Uj6B6OKU.mjs";
8
+ import { t as InboxListenerSet } from "../inbox-k8JQUnr6.mjs";
9
9
  //#region src/federation/inbox.test.ts
10
10
  test("InboxListenerSet", () => {
11
11
  const listeners = new InboxListenerSet();
@@ -1,13 +1,13 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { g as Multikey, s as CryptographicKey } from "../vocab-C071xkhv.mjs";
5
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { g as Multikey, s as CryptographicKey } from "../vocab-DlRBSs8-.mjs";
5
+ import { t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
8
8
  import { t as assert } from "../assert-DikXweDx.mjs";
9
9
  import { t as MemoryKvStore } from "../kv-DM1zFCtL.mjs";
10
- import { t as KvKeyCache } from "../keycache-FgycNH45.mjs";
10
+ import { t as KvKeyCache } from "../keycache-LnrJEGam.mjs";
11
11
  //#region src/federation/keycache.test.ts
12
12
  test("KvKeyCache.set()", async () => {
13
13
  const kv = new MemoryKvStore();
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { t as test } from "../testing-04hA-7q1.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-2v7gYiZp.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-DM1zFCtL.mjs";
@@ -1,9 +1,9 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { C as Person, G as FetchError, U as getTypeId, _ as Note, g as Multikey, m as Invite, n as Announce, o as Create, q as fetchDocumentLoader, t as Activity, v as Object$1, y as Offer } from "../vocab-C071xkhv.mjs";
5
- import { i as RouterError, t as lookupObject } from "../lookup-C4htfQ1_.mjs";
6
- import { a as mockDocumentLoader, t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { C as Person, G as FetchError, U as getTypeId, _ as Note, g as Multikey, m as Invite, n as Announce, o as Create, q as fetchDocumentLoader, t as Activity, v as Object$1, y as Offer } from "../vocab-DlRBSs8-.mjs";
5
+ import { i as RouterError, t as lookupObject } from "../lookup-HZr8nYiW.mjs";
6
+ import { a as mockDocumentLoader, t as test } from "../testing-04hA-7q1.mjs";
7
7
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
8
8
  import { n as assertStrictEquals } from "../std__assert-2v7gYiZp.mjs";
9
9
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
@@ -12,14 +12,14 @@ import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
12
12
  import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
13
13
  import { t as assert } from "../assert-DikXweDx.mjs";
14
14
  import { t as MemoryKvStore } from "../kv-DM1zFCtL.mjs";
15
- import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-CiiWngJ-.mjs";
16
- import { l as verifyRequest, s as signRequest } from "../http-XbFxcG2g.mjs";
17
- import { t as getAuthenticatedDocumentLoader } from "../authdocloader-CpMO32zq.mjs";
18
- import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-CrKje9FG.mjs";
19
- import { t as doesActorOwnKey } from "../owner-BxrTJWec.mjs";
20
- import { n as signObject, r as verifyObject } from "../proof-CDFv0GLm.mjs";
21
- import { t as esm_default } from "../esm-BxUjO5zX.mjs";
22
- import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-C9GAGpRb.mjs";
15
+ import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-CDNI_5lz.mjs";
16
+ import { l as verifyRequest, s as signRequest } from "../http-CQ-6-sWA.mjs";
17
+ import { t as getAuthenticatedDocumentLoader } from "../authdocloader-DrnaVEJP.mjs";
18
+ import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-Bftin5ZV.mjs";
19
+ import { t as doesActorOwnKey } from "../owner-DTdIjtoj.mjs";
20
+ import { n as signObject, r as verifyObject } from "../proof-DHg_8Rip.mjs";
21
+ import { t as esm_default } from "../esm-i8KtYbr9.mjs";
22
+ import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-0Ff8761e.mjs";
23
23
  //#region src/testing/fixtures/example.com/person.json
24
24
  var person_default = {
25
25
  "@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"],
@@ -1,8 +1,8 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- require("../docloader-D4ctxKPG.cjs");
5
- const require_middleware = require("../middleware-DjmGmYQz.cjs");
4
+ require("../docloader-CF7V0mC7.cjs");
5
+ const require_middleware = require("../middleware-MxfcK4vs.cjs");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  //#region src/federation/kv.ts
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
- import { a as respondWithObjectIfAcceptable, c as createFederationBuilder, i as respondWithObject, l as Router, o as buildCollectionSynchronizationHeader, r as createExponentialBackoffPolicy, s as digest, t as createFederation, u as RouterError } from "../middleware-Bs8fC5Th.js";
3
+ import { a as respondWithObjectIfAcceptable, c as createFederationBuilder, i as respondWithObject, l as Router, o as buildCollectionSynchronizationHeader, r as createExponentialBackoffPolicy, s as digest, t as createFederation, u as RouterError } from "../middleware-DzaUMfHQ.js";
4
4
  import { isEqual } from "es-toolkit";
5
5
  //#region src/federation/kv.ts
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { t as test } from "../testing-04hA-7q1.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import { i as assertGreaterOrEqual, r as assertGreater } from "../std__assert-2v7gYiZp.mjs";
7
7
  import { n as assertFalse } from "../assert_rejects-CJC9ThS-.mjs";
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { t as test } from "../testing-04hA-7q1.mjs";
5
5
  import { l as AssertionError, t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
7
7
  import { t as createExponentialBackoffPolicy } from "../retry-B_E3V_Dx.mjs";
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { i as RouterError, r as Router } from "../lookup-C4htfQ1_.mjs";
5
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { i as RouterError, r as Router } from "../lookup-HZr8nYiW.mjs";
5
+ import { t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import "../std__assert-2v7gYiZp.mjs";
8
8
  import { n as assertFalse } from "../assert_rejects-CJC9ThS-.mjs";
@@ -1,18 +1,18 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { C as Person, E as Service, d as Group, l as Endpoints, r as Application, t as Activity } from "../vocab-C071xkhv.mjs";
5
- import { a as mockDocumentLoader, t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { C as Person, E as Service, d as Group, l as Endpoints, r as Application, t as Activity } from "../vocab-DlRBSs8-.mjs";
5
+ import { a as mockDocumentLoader, t as test } from "../testing-04hA-7q1.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
7
  import "../std__assert-2v7gYiZp.mjs";
8
8
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
9
9
  import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
10
10
  import { t as assert } from "../assert-DikXweDx.mjs";
11
- import { l as verifyRequest } from "../http-XbFxcG2g.mjs";
12
- import { t as doesActorOwnKey } from "../owner-BxrTJWec.mjs";
13
- import { n as sendActivity, t as extractInboxes } from "../send-D8YQJCKA.mjs";
14
- import { t as esm_default } from "../esm-BxUjO5zX.mjs";
15
- import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-C9GAGpRb.mjs";
11
+ import { l as verifyRequest } from "../http-CQ-6-sWA.mjs";
12
+ import { t as doesActorOwnKey } from "../owner-DTdIjtoj.mjs";
13
+ import { n as sendActivity, t as extractInboxes } from "../send-5v8rpjgq.mjs";
14
+ import { t as esm_default } from "../esm-i8KtYbr9.mjs";
15
+ import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-0Ff8761e.mjs";
16
16
  //#region src/federation/send.test.ts
17
17
  test("extractInboxes()", () => {
18
18
  const recipients = [
@@ -1,11 +1,11 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as test } from "../testing-CZLFMsfn.mjs";
4
+ import { t as test } from "../testing-04hA-7q1.mjs";
5
5
  import "../std__assert-2v7gYiZp.mjs";
6
6
  import { n as assertFalse } from "../assert_rejects-CJC9ThS-.mjs";
7
7
  import { t as assert } from "../assert-DikXweDx.mjs";
8
- import { t as hasMalformedKnownTemporalLiteral } from "../temporal-VtumSYrv.mjs";
8
+ import { t as hasMalformedKnownTemporalLiteral } from "../temporal-CJPJeb9T.mjs";
9
9
  //#region src/federation/temporal.test.ts
10
10
  test("hasMalformedKnownTemporalLiteral() detects expanded proof timestamps", async () => {
11
11
  assert(await hasMalformedKnownTemporalLiteral({
@@ -1,8 +1,8 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_docloader = require("./docloader-D4ctxKPG.cjs");
4
- const require_actor = require("./actor-DbMPM7MA.cjs");
5
- const require_key = require("./key-DRbBpHOk.cjs");
3
+ const require_docloader = require("./docloader-CF7V0mC7.cjs");
4
+ const require_actor = require("./actor-B2bgsOT5.cjs");
5
+ const require_key = require("./key-D-Oj5Zp2.cjs");
6
6
  let _logtape_logtape = require("@logtape/logtape");
7
7
  let _opentelemetry_api = require("@opentelemetry/api");
8
8
  let byte_encodings_base64 = require("byte-encodings/base64");
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { G as FetchError, ot as name, s as CryptographicKey, st as version } from "./vocab-C071xkhv.mjs";
5
- import { a as validateCryptoKey, n as fetchKey } from "./key-BiqmS6JT.mjs";
4
+ import { G as FetchError, ot as name, s as CryptographicKey, st as version } from "./vocab-DlRBSs8-.mjs";
5
+ import { a as validateCryptoKey, n as fetchKey } from "./key-DVX4QzuU.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
- import { d as name, f as version, t as FetchError } from "./docloader-kZyrNwUH.js";
4
- import { y as CryptographicKey } from "./actor-c1CsMwXN.js";
5
- import { n as fetchKey, o as validateCryptoKey } from "./key-Bgwa1_Vg.js";
3
+ import { d as name, f as version, t as FetchError } from "./docloader-B1OuNGno.js";
4
+ import { y as CryptographicKey } from "./actor-NkVQr224.js";
5
+ import { n as fetchKey, o as validateCryptoKey } from "./key-G8BkRalB.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { U as getTypeId, ot as name, st as version, t as Activity } from "./vocab-C071xkhv.mjs";
4
+ import { U as getTypeId, ot as name, st as version, t as Activity } from "./vocab-DlRBSs8-.mjs";
5
5
  import { getLogger } from "@logtape/logtape";
6
6
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
7
7
  //#region src/federation/inbox.ts
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { a as validateCryptoKey } from "./key-BiqmS6JT.mjs";
4
+ import { a as validateCryptoKey } from "./key-DVX4QzuU.mjs";
5
5
  export { validateCryptoKey };
@@ -1,4 +1,4 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_key = require("./key-DRbBpHOk.cjs");
3
+ const require_key = require("./key-D-Oj5Zp2.cjs");
4
4
  exports.validateCryptoKey = require_key.validateCryptoKey;
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_docloader = require("./docloader-D4ctxKPG.cjs");
4
- const require_actor = require("./actor-DbMPM7MA.cjs");
3
+ const require_docloader = require("./docloader-CF7V0mC7.cjs");
4
+ const require_actor = require("./actor-B2bgsOT5.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let _opentelemetry_api = require("@opentelemetry/api");
7
7
  //#region src/sig/key.ts
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { J as getDocumentLoader, ot as name, s as CryptographicKey, st as version, v as Object$1 } from "./vocab-C071xkhv.mjs";
5
- import { i as isActor } from "./actor-Bapf7M7G.mjs";
4
+ import { J as getDocumentLoader, ot as name, s as CryptographicKey, st as version, v as Object$1 } from "./vocab-DlRBSs8-.mjs";
5
+ import { i as isActor } from "./actor-DWfw2nxx.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  //#region src/sig/key.ts
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./rolldown-runtime-C7fyD9f2.js";
4
- import { d as name, f as version, i as getDocumentLoader } from "./docloader-kZyrNwUH.js";
5
- import { i as isActor, q as Object$1, y as CryptographicKey } from "./actor-c1CsMwXN.js";
4
+ import { d as name, f as version, i as getDocumentLoader } from "./docloader-B1OuNGno.js";
5
+ import { i as isActor, q as Object$1, y as CryptographicKey } from "./actor-NkVQr224.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  //#region src/sig/key.ts
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { g as Multikey, s as CryptographicKey } from "./vocab-C071xkhv.mjs";
4
+ import { g as Multikey, s as CryptographicKey } from "./vocab-DlRBSs8-.mjs";
5
5
  //#region src/federation/keycache.ts
6
6
  const NULL_KEY_CACHE_VALUE = { _fedify: "key-unavailable" };
7
7
  const NULL_KEY_CACHE_TTL = Temporal.Duration.from({ minutes: 5 });
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { I as importSpki, g as Multikey, s as CryptographicKey } from "./vocab-C071xkhv.mjs";
4
+ import { I as importSpki, g as Multikey, s as CryptographicKey } from "./vocab-DlRBSs8-.mjs";
5
5
  //#region src/testing/keys.ts
6
6
  const rsaPublicKey1 = new CryptographicKey({
7
7
  id: new URL("https://example.com/key"),
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { J as getDocumentLoader, U as getTypeId, ot as name, s as CryptographicKey, st as version, t as Activity, v as Object$1 } from "./vocab-C071xkhv.mjs";
5
- import { a as validateCryptoKey, n as fetchKey } from "./key-BiqmS6JT.mjs";
4
+ import { J as getDocumentLoader, U as getTypeId, ot as name, s as CryptographicKey, st as version, t as Activity, v as Object$1 } from "./vocab-DlRBSs8-.mjs";
5
+ import { a as validateCryptoKey, n as fetchKey } from "./key-DVX4QzuU.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import jsonld from "jsonld";