@fedify/fedify 2.4.2 → 2.4.3

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 (81) hide show
  1. package/dist/{builder-9ovCSqLp.mjs → builder-CztvQYX0.mjs} +2 -2
  2. package/dist/compat/transformers.test.mjs +1 -1
  3. package/dist/{compound-proof-G2J_bU0u.mjs → compound-proof-rcvB6i5j.mjs} +2 -2
  4. package/dist/{deno-BZ4z-lJJ.mjs → deno-BEgaR4dC.mjs} +1 -1
  5. package/dist/{docloader-DUXXI-7G.mjs → docloader-Wf9RroxL.mjs} +4 -2
  6. package/dist/federation/builder.test.mjs +1 -1
  7. package/dist/federation/compound-fanout.test.mjs +3 -3
  8. package/dist/federation/handler-compound-proof.test.mjs +5 -5
  9. package/dist/federation/handler.test.mjs +258 -5
  10. package/dist/federation/hashlink-media.test.mjs +2 -2
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/inbox-report.test.mjs +5 -5
  13. package/dist/federation/inbox.test.mjs +43 -0
  14. package/dist/federation/metrics.test.mjs +1 -1
  15. package/dist/federation/middleware.test.mjs +172 -10
  16. package/dist/federation/mod.cjs +1 -1
  17. package/dist/federation/mod.js +1 -1
  18. package/dist/federation/outgoing-proof.test.mjs +4 -4
  19. package/dist/federation/portable-actor.test.mjs +3 -3
  20. package/dist/federation/portable-chain.test.mjs +3 -3
  21. package/dist/federation/portable-collection.test.mjs +4 -4
  22. package/dist/federation/portable-delivery.test.mjs +2 -2
  23. package/dist/federation/portable-gateway-keys.test.mjs +4 -4
  24. package/dist/federation/portable-inbox.test.mjs +4 -4
  25. package/dist/federation/portable-parse-uri.test.mjs +1 -1
  26. package/dist/federation/portable-route-activity.test.mjs +2 -2
  27. package/dist/federation/portable.test.mjs +3 -3
  28. package/dist/federation/send.test.mjs +3 -3
  29. package/dist/federation/tasks/enqueue.test.mjs +1 -1
  30. package/dist/federation/tasks/tasks.test.mjs +2 -2
  31. package/dist/federation/temporal.test.mjs +1 -1
  32. package/dist/federation/webfinger.test.mjs +1 -1
  33. package/dist/{federation-DpT8bDM6.cjs → federation-O8HwbuUv.cjs} +121 -20
  34. package/dist/{http-Qq7jR2rC.js → http-B5pRXkmQ.js} +1 -1
  35. package/dist/{http-x1satM4y.cjs → http-BFC8b7mH.cjs} +1 -1
  36. package/dist/{http-B5w_qcIg.mjs → http-CQcqhcga.mjs} +4 -4
  37. package/dist/inbox-CsErRN6L.mjs +188 -0
  38. package/dist/{kv-cache-BgQMAKIg.mjs → kv-cache-4oZXC3pf.mjs} +1 -1
  39. package/dist/{kv-cache-B0SZfzFb.js → kv-cache-Bih-8AoZ.js} +3 -1
  40. package/dist/{kv-cache-D4throaQ.cjs → kv-cache-JOKAStz2.cjs} +3 -1
  41. package/dist/{ld-Dkkyk65e.mjs → ld-Qk4WqslS.mjs} +2 -2
  42. package/dist/{metrics-CRv6_IBg.mjs → metrics-DAhJVtgg.mjs} +1 -1
  43. package/dist/{middleware-C-swet0z.mjs → middleware-B582s7UO.mjs} +103 -179
  44. package/dist/{middleware-DFtNaBcH.mjs → middleware-C76AHpbO.mjs} +1 -1
  45. package/dist/{middleware-BqefXH6B.js → middleware-KeANQWIR.js} +121 -20
  46. package/dist/mod.cjs +4 -4
  47. package/dist/mod.js +4 -4
  48. package/dist/nodeinfo/handler.test.mjs +1 -1
  49. package/dist/{owner-BHUhedVc.mjs → owner-CcyHGdSK.mjs} +3 -3
  50. package/dist/{portable-collection-DONEPTXV.mjs → portable-collection-0RzCsflU.mjs} +2 -2
  51. package/dist/{portable-collection-DL-1Wy1s.cjs → portable-collection-BHZq0F_c.cjs} +1 -1
  52. package/dist/{portable-collection-CfIc190c.js → portable-collection-Chb6A43p.js} +1 -1
  53. package/dist/{portable-key-Cdw3vfl-.mjs → portable-key-BY6G_X28.mjs} +1 -1
  54. package/dist/{proof-DuSE1ABD.mjs → proof-nIOXkRme.mjs} +3 -3
  55. package/dist/{send-D9oTjA6A.mjs → send-C2r9whkz.mjs} +3 -3
  56. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  57. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  58. package/dist/sig/compound-proof-verification.test.mjs +2 -2
  59. package/dist/sig/compound-proof.test.mjs +2 -2
  60. package/dist/sig/http.test.mjs +2 -2
  61. package/dist/sig/key.test.mjs +1 -1
  62. package/dist/sig/ld.test.mjs +1 -1
  63. package/dist/sig/mitra-receive-interop.test.mjs +4 -4
  64. package/dist/sig/mitra-send-interop.test.mjs +3 -3
  65. package/dist/sig/mod.cjs +2 -2
  66. package/dist/sig/mod.js +2 -2
  67. package/dist/sig/owner.test.mjs +1 -1
  68. package/dist/sig/portable-collection.test.mjs +1 -1
  69. package/dist/sig/portable-interop.test.mjs +3 -3
  70. package/dist/sig/portable-key.test.mjs +5 -5
  71. package/dist/sig/proof.test.mjs +3 -3
  72. package/dist/sig/tootik-request-interop.test.mjs +4 -4
  73. package/dist/sig/tootik-send-interop.test.mjs +3 -3
  74. package/dist/sig/verification.test.mjs +3 -3
  75. package/dist/{temporal-iyAxBq0I.mjs → temporal-D5tHfTGO.mjs} +1 -1
  76. package/dist/testing/kv.test.mjs +1 -1
  77. package/dist/utils/docloader.test.mjs +112 -37
  78. package/dist/utils/kv-cache.test.mjs +1 -1
  79. package/dist/utils/mod.cjs +1 -1
  80. package/dist/utils/mod.js +1 -1
  81. package/package.json +7 -7
@@ -2,10 +2,10 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { d as isPortableUri, l as isPortableId, n as getCanonicalPortableId, p as isSamePublicKey$1, s as isCompatibleKeyId } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { n as version, t as name } from "./deno-BZ4z-lJJ.mjs";
5
+ import { n as version, t as name } from "./deno-BEgaR4dC.mjs";
6
6
  import { i as parseKeyOwnerEvidence, r as getVerifiedKeyOwnerEvidence } from "./key-owner-evidence-APB6NpSk.mjs";
7
- import { E as verifyKeyOwnership, b as fetchActorDocument, y as exportJwk } from "./ld-Dkkyk65e.mjs";
8
- import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-Cdw3vfl-.mjs";
7
+ import { E as verifyKeyOwnership, b as fetchActorDocument, y as exportJwk } from "./ld-Qk4WqslS.mjs";
8
+ import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-BY6G_X28.mjs";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,8 +1,8 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-BZ4z-lJJ.mjs";
5
- import { c as verifyPortableObjectProof, u as verifyPortableObjectProofWithRoot } from "./proof-DuSE1ABD.mjs";
4
+ import { n as version, t as name } from "./deno-BEgaR4dC.mjs";
5
+ import { c as verifyPortableObjectProof, u as verifyPortableObjectProofWithRoot } from "./proof-nIOXkRme.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CollectionPage, Object as Object$1, isActor } from "@fedify/vocab";
8
8
  import { trace } from "@opentelemetry/api";
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-x1satM4y.cjs");
2
+ const require_http = require("./http-BFC8b7mH.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab = require("@fedify/vocab");
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { At as isPortableUri, B as fetchActorDocument, Dt as isCompatibleKeyId, J as getVerifiedKeyOwnerEvidence, K as verifyKeyOwnership, Mt as isSamePublicKey$1, Nt as name, Ot as isPortableId, Pt as version, St as getCanonicalPortableId, Y as parseKeyOwnerEvidence, b as verifyPortableObjectProofWithRoot, l as fetchPortableGatewayKey, u as resolvePortableActorKey, v as verifyPortableObjectProof, z as exportJwk } from "./http-Qq7jR2rC.js";
3
+ import { At as isPortableUri, B as fetchActorDocument, Dt as isCompatibleKeyId, J as getVerifiedKeyOwnerEvidence, K as verifyKeyOwnership, Mt as isSamePublicKey$1, Nt as name, Ot as isPortableId, Pt as version, St as getCanonicalPortableId, Y as parseKeyOwnerEvidence, b as verifyPortableObjectProofWithRoot, l as fetchPortableGatewayKey, u as resolvePortableActorKey, v as verifyPortableObjectProof, z as exportJwk } from "./http-B5pRXkmQ.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { CollectionPage, CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -2,7 +2,7 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { a as getRawCanonicalPortableId, c as isPortableActorDocument, d as isPortableUri, n as getCanonicalPortableId, p as isSamePublicKey } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { u as verifyPortableObjectProofWithRoot } from "./proof-DuSE1ABD.mjs";
5
+ import { u as verifyPortableObjectProofWithRoot } from "./proof-nIOXkRme.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CryptographicKey, Multikey, Object as Object$1 } from "@fedify/vocab";
8
8
  import { FetchError, formatIri, getDocumentLoader, isGatewayUrl, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
@@ -3,9 +3,9 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { i as getPortableDid, l as isPortableId } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
6
- import { n as version, t as name } from "./deno-BZ4z-lJJ.mjs";
7
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-CRv6_IBg.mjs";
8
- import { T as validateCryptoKey, c as getNormalizationContextLoader, v as bypassKeyCacheReads, x as fetchKey } from "./ld-Dkkyk65e.mjs";
6
+ import { n as version, t as name } from "./deno-BEgaR4dC.mjs";
7
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DAhJVtgg.mjs";
8
+ import { T as validateCryptoKey, c as getNormalizationContextLoader, v as bypassKeyCacheReads, x as fetchKey } from "./ld-Qk4WqslS.mjs";
9
9
  import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
10
10
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
11
11
  import { getLogger } from "@logtape/logtape";
@@ -2,9 +2,9 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { d as isPortableUri } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { n as version, t as name } from "./deno-BZ4z-lJJ.mjs";
6
- import { n as getDurationMs, r as getFederationMetrics } from "./metrics-CRv6_IBg.mjs";
7
- import { n as doubleKnock } from "./http-B5w_qcIg.mjs";
5
+ import { n as version, t as name } from "./deno-BEgaR4dC.mjs";
6
+ import { n as getDurationMs, r as getFederationMetrics } from "./metrics-DAhJVtgg.mjs";
7
+ import { n as doubleKnock } from "./http-CQcqhcga.mjs";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
10
10
  import { FetchError, UrlError, canonicalizePortableUri, getFe34Origin, isGatewayUrl, toCompatibleEf61Id, validatePublicUrl } from "@fedify/vocab-runtime";
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
- import { a as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-G2J_bU0u.mjs";
6
+ import { a as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-rcvB6i5j.mjs";
7
7
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/sig/compound-proof-discovery.test.ts
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
- import { a as inspectCompoundPortableObjectApplicability, i as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-G2J_bU0u.mjs";
6
+ import { a as inspectCompoundPortableObjectApplicability, i as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-rcvB6i5j.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/sig/compound-proof-producer.test.ts
9
9
  const portableId = "ap+ef61://did:key:z6MkAlice/objects/1";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
- import { l as verifyPortableObjectProofPolicy, o as verifyMapLocalProof } from "../proof-DuSE1ABD.mjs";
7
+ import { l as verifyPortableObjectProofPolicy, o as verifyMapLocalProof } from "../proof-nIOXkRme.mjs";
8
8
  import { n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
9
- import { a as inspectCompoundPortableObjectApplicability, o as verifyCompoundPortableObjectProofs, s as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-G2J_bU0u.mjs";
9
+ import { a as inspectCompoundPortableObjectApplicability, o as verifyCompoundPortableObjectProofs, s as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-rcvB6i5j.mjs";
10
10
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
11
11
  import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
12
12
  import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
@@ -6,9 +6,9 @@ import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
7
  import { n as preloadedOnlyDocumentLoader } from "../public-audience--klBIOk1.mjs";
8
8
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
9
- import { a as signObject, d as verifyProof } from "../proof-DuSE1ABD.mjs";
9
+ import { a as signObject, d as verifyProof } from "../proof-nIOXkRme.mjs";
10
10
  import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
11
- import { s as verifyCompoundProofDocuments } from "../compound-proof-G2J_bU0u.mjs";
11
+ import { s as verifyCompoundProofDocuments } from "../compound-proof-rcvB6i5j.mjs";
12
12
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
13
13
  import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
14
14
  import { Create, DataIntegrityProof, Note, Question } from "@fedify/vocab";
@@ -12,8 +12,8 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
12
12
  import "../std__assert-DvMDRPes.mjs";
13
13
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
14
14
  import { t as assert } from "../assert-D1Eafmd_.mjs";
15
- import { y as exportJwk } from "../ld-Dkkyk65e.mjs";
16
- import { a as listRequestSignatures, c as selectRequestSignature, f as verifyRequest, i as formatRfc9421SignatureParameters, l as signRequest, n as doubleKnock, o as parseRfc9421Signature, p as verifyRequestDetailed, r as formatRfc9421Signature, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as timingSafeEqual } from "../http-B5w_qcIg.mjs";
15
+ import { y as exportJwk } from "../ld-Qk4WqslS.mjs";
16
+ import { a as listRequestSignatures, c as selectRequestSignature, f as verifyRequest, i as formatRfc9421SignatureParameters, l as signRequest, n as doubleKnock, o as parseRfc9421Signature, p as verifyRequestDetailed, r as formatRfc9421Signature, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as timingSafeEqual } from "../http-CQcqhcga.mjs";
17
17
  import { a as rsaPrivateKey3, i as rsaPrivateKey2, l as rsaPublicKey5, n as ed25519PrivateKey, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
18
18
  import { t as KvKeyCache } from "../keycache-D-MNltOk.mjs";
19
19
  import { FetchError, UrlError, exportSpki, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -7,7 +7,7 @@ import "../std__assert-DvMDRPes.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
8
8
  import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
9
9
  import { t as assert } from "../assert-D1Eafmd_.mjs";
10
- import { C as generateCryptoKeyPair, S as fetchKeyDetailed, T as validateCryptoKey, _ as wrapContextLoaderForJsonLd, w as importJwk, x as fetchKey, y as exportJwk } from "../ld-Dkkyk65e.mjs";
10
+ import { C as generateCryptoKeyPair, S as fetchKeyDetailed, T as validateCryptoKey, _ as wrapContextLoaderForJsonLd, w as importJwk, x as fetchKey, y as exportJwk } from "../ld-Qk4WqslS.mjs";
11
11
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
12
12
  import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
13
13
  import { FetchError, UrlError, exportDidKey, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -8,7 +8,7 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
8
8
  import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
9
9
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
10
10
  import { t as assert } from "../assert-D1Eafmd_.mjs";
11
- import { C as generateCryptoKeyPair, a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-Dkkyk65e.mjs";
11
+ import { C as generateCryptoKeyPair, a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-Qk4WqslS.mjs";
12
12
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
13
13
  import { CryptographicKey } from "@fedify/vocab";
14
14
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -5,10 +5,10 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
6
  import "../std__assert-DvMDRPes.mjs";
7
7
  import { t as assert } from "../assert-D1Eafmd_.mjs";
8
- import { c as verifyPortableObjectProof } from "../proof-DuSE1ABD.mjs";
9
- import { p as verifyRequestDetailed } from "../http-B5w_qcIg.mjs";
10
- import { o as createFederation } from "../middleware-C-swet0z.mjs";
11
- import { t as doesActorOwnKey } from "../owner-BHUhedVc.mjs";
8
+ import { c as verifyPortableObjectProof } from "../proof-nIOXkRme.mjs";
9
+ import { p as verifyRequestDetailed } from "../http-CQcqhcga.mjs";
10
+ import { o as createFederation } from "../middleware-B582s7UO.mjs";
11
+ import { t as doesActorOwnKey } from "../owner-CcyHGdSK.mjs";
12
12
  import { Create, Person } from "@fedify/vocab";
13
13
  import { canonicalizePortableUri, decodeMultibase, importDidKey } from "@fedify/vocab-runtime";
14
14
  import { mockDocumentLoader, test } from "@fedify/fixture";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
- import { c as verifyPortableObjectProof } from "../proof-DuSE1ABD.mjs";
8
- import { p as verifyRequestDetailed } from "../http-B5w_qcIg.mjs";
9
- import { t as doesActorOwnKey } from "../owner-BHUhedVc.mjs";
7
+ import { c as verifyPortableObjectProof } from "../proof-nIOXkRme.mjs";
8
+ import { p as verifyRequestDetailed } from "../http-CQcqhcga.mjs";
9
+ import { t as doesActorOwnKey } from "../owner-CcyHGdSK.mjs";
10
10
  import { Create } from "@fedify/vocab";
11
11
  import { canonicalizePortableUri, decodeMultibase, fromCompatibleEf61Id, importDidKey } from "@fedify/vocab-runtime";
12
12
  import { mockDocumentLoader, test } from "@fedify/fixture";
package/dist/sig/mod.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_http = require("../http-x1satM4y.cjs");
4
- const require_portable_collection = require("../portable-collection-DL-1Wy1s.cjs");
3
+ const require_http = require("../http-BFC8b7mH.cjs");
4
+ const require_portable_collection = require("../portable-collection-BHZq0F_c.cjs");
5
5
  exports.attachSignature = require_http.attachSignature;
6
6
  exports.createProof = require_http.createProof;
7
7
  exports.createSignature = require_http.createSignature;
package/dist/sig/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { D as createSignature, H as fetchKeyDetailed, I as verifyJsonLd, L as verifySignature, O as detachSignature, P as signJsonLd, T as attachSignature, U as generateCryptoKeyPair, V as fetchKey, W as importJwk, _ as verifyObject, _t as validateAcceptSignature, a as signRequest, c as verifyRequestDetailed, gt as parseAcceptSignature, h as signObject, ht as fulfillAcceptSignature, j as hasSignatureLike, m as hasProofLike, mt as formatAcceptSignature, p as createProof, s as verifyRequest, v as verifyPortableObjectProof, x as verifyProof, z as exportJwk } from "../http-Qq7jR2rC.js";
4
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-CfIc190c.js";
3
+ import { D as createSignature, H as fetchKeyDetailed, I as verifyJsonLd, L as verifySignature, O as detachSignature, P as signJsonLd, T as attachSignature, U as generateCryptoKeyPair, V as fetchKey, W as importJwk, _ as verifyObject, _t as validateAcceptSignature, a as signRequest, c as verifyRequestDetailed, gt as parseAcceptSignature, h as signObject, ht as fulfillAcceptSignature, j as hasSignatureLike, m as hasProofLike, mt as formatAcceptSignature, p as createProof, s as verifyRequest, v as verifyPortableObjectProof, x as verifyProof, z as exportJwk } from "../http-B5pRXkmQ.js";
4
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-Chb6A43p.js";
5
5
  export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
@@ -6,7 +6,7 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
6
6
  import "../std__assert-DvMDRPes.mjs";
7
7
  import { t as assert } from "../assert-D1Eafmd_.mjs";
8
8
  import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
9
- import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-BHUhedVc.mjs";
9
+ import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-CcyHGdSK.mjs";
10
10
  import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
11
11
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
12
12
  //#region src/sig/owner.test.ts
@@ -2,7 +2,7 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
5
- import { t as verifyPortableObject } from "../portable-collection-DONEPTXV.mjs";
5
+ import { t as verifyPortableObject } from "../portable-collection-0RzCsflU.mjs";
6
6
  import { Collection, CollectionPage, Note, OrderedCollection, Person, traverseCollection } from "@fedify/vocab";
7
7
  import { FetchError, encodeMultibase, exportDidKey, preloadedContexts } from "@fedify/vocab-runtime";
8
8
  import { test } from "@fedify/fixture";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
- import { c as verifyPortableObjectProof, d as verifyProof } from "../proof-DuSE1ABD.mjs";
8
- import { n as getKeyOwner } from "../owner-BHUhedVc.mjs";
9
- import { t as verifyPortableObject } from "../portable-collection-DONEPTXV.mjs";
7
+ import { c as verifyPortableObjectProof, d as verifyProof } from "../proof-nIOXkRme.mjs";
8
+ import { n as getKeyOwner } from "../owner-CcyHGdSK.mjs";
9
+ import { t as verifyPortableObject } from "../portable-collection-0RzCsflU.mjs";
10
10
  import { Application, DataIntegrityProof, lookupObject } from "@fedify/vocab";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  //#region test-vectors/fep-ef61/tootik-v0.25.4/actor.json
@@ -2,12 +2,12 @@ import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
- import { S as fetchKeyDetailed, h as verifyJsonLd, p as signJsonLd, x as fetchKey } from "../ld-Dkkyk65e.mjs";
6
- import { d as verifyProof, r as createProof } from "../proof-DuSE1ABD.mjs";
7
- import { n as resolvePortableActorKey } from "../portable-key-Cdw3vfl-.mjs";
8
- import { f as verifyRequest, l as signRequest, p as verifyRequestDetailed } from "../http-B5w_qcIg.mjs";
5
+ import { S as fetchKeyDetailed, h as verifyJsonLd, p as signJsonLd, x as fetchKey } from "../ld-Qk4WqslS.mjs";
6
+ import { d as verifyProof, r as createProof } from "../proof-nIOXkRme.mjs";
7
+ import { n as resolvePortableActorKey } from "../portable-key-BY6G_X28.mjs";
8
+ import { f as verifyRequest, l as signRequest, p as verifyRequestDetailed } from "../http-CQcqhcga.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
10
- import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-BHUhedVc.mjs";
10
+ import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-CcyHGdSK.mjs";
11
11
  import { t as KvKeyCache } from "../keycache-D-MNltOk.mjs";
12
12
  import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
13
13
  import { FetchError, encodeMultibase, exportDidKey, exportSpki, parseIri, preloadedContexts } from "@fedify/vocab-runtime";
@@ -11,10 +11,10 @@ import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
11
11
  import { t as assert } from "../assert-D1Eafmd_.mjs";
12
12
  import { a as verificationObservation } from "../verification-Dpfcw8ml.mjs";
13
13
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
14
- import { a as signObject, c as verifyPortableObjectProof, d as verifyProof, i as hasProofLike, o as verifyMapLocalProof, r as createProof, s as verifyObject } from "../proof-DuSE1ABD.mjs";
15
- import { f as verifyRequest } from "../http-B5w_qcIg.mjs";
14
+ import { a as signObject, c as verifyPortableObjectProof, d as verifyProof, i as hasProofLike, o as verifyMapLocalProof, r as createProof, s as verifyObject } from "../proof-nIOXkRme.mjs";
15
+ import { f as verifyRequest } from "../http-CQcqhcga.mjs";
16
16
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
17
- import { t as getAuthenticatedDocumentLoader } from "../docloader-DUXXI-7G.mjs";
17
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-Wf9RroxL.mjs";
18
18
  import { Create, DataIntegrityProof, Document, Multikey, Note, PUBLIC_COLLECTION, Place, Translation } from "@fedify/vocab";
19
19
  import { decodeMultibase, encodeMultibase, exportDidKey, exportMultibaseKey, formatIri, importMultibaseKey, parseIri } from "@fedify/vocab-runtime";
20
20
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -5,10 +5,10 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
6
  import "../std__assert-DvMDRPes.mjs";
7
7
  import { t as assert } from "../assert-D1Eafmd_.mjs";
8
- import { c as verifyPortableObjectProof } from "../proof-DuSE1ABD.mjs";
9
- import { p as verifyRequestDetailed } from "../http-B5w_qcIg.mjs";
10
- import { o as createFederation } from "../middleware-C-swet0z.mjs";
11
- import { t as doesActorOwnKey } from "../owner-BHUhedVc.mjs";
8
+ import { c as verifyPortableObjectProof } from "../proof-nIOXkRme.mjs";
9
+ import { p as verifyRequestDetailed } from "../http-CQcqhcga.mjs";
10
+ import { o as createFederation } from "../middleware-B582s7UO.mjs";
11
+ import { t as doesActorOwnKey } from "../owner-CcyHGdSK.mjs";
12
12
  import { Follow, Person } from "@fedify/vocab";
13
13
  import { mockDocumentLoader, test } from "@fedify/fixture";
14
14
  import { encodeHex } from "byte-encodings/hex";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
- import { c as verifyPortableObjectProof } from "../proof-DuSE1ABD.mjs";
8
- import { p as verifyRequestDetailed } from "../http-B5w_qcIg.mjs";
9
- import { t as doesActorOwnKey } from "../owner-BHUhedVc.mjs";
7
+ import { c as verifyPortableObjectProof } from "../proof-nIOXkRme.mjs";
8
+ import { p as verifyRequestDetailed } from "../http-CQcqhcga.mjs";
9
+ import { t as doesActorOwnKey } from "../owner-CcyHGdSK.mjs";
10
10
  import { Create } from "@fedify/vocab";
11
11
  import { decodeMultibase, importDidKey } from "@fedify/vocab-runtime";
12
12
  import { mockDocumentLoader, test } from "@fedify/fixture";
@@ -2,9 +2,9 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { a as verificationObservation } from "../verification-Dpfcw8ml.mjs";
5
- import { h as verifyJsonLd, p as signJsonLd } from "../ld-Dkkyk65e.mjs";
6
- import { a as signObject, s as verifyObject } from "../proof-DuSE1ABD.mjs";
7
- import { l as signRequest, p as verifyRequestDetailed } from "../http-B5w_qcIg.mjs";
5
+ import { h as verifyJsonLd, p as signJsonLd } from "../ld-Qk4WqslS.mjs";
6
+ import { a as signObject, s as verifyObject } from "../proof-nIOXkRme.mjs";
7
+ import { l as signRequest, p as verifyRequestDetailed } from "../http-CQcqhcga.mjs";
8
8
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
9
9
  import { Activity, Create, CryptographicKey, Multikey } from "@fedify/vocab";
10
10
  import { FetchError } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { c as getNormalizationContextLoader } from "./ld-Dkkyk65e.mjs";
4
+ import { c as getNormalizationContextLoader } from "./ld-Qk4WqslS.mjs";
5
5
  import jsonld from "@fedify/vocab-runtime/jsonld";
6
6
  //#region src/federation/temporal.ts
7
7
  function isPlainObject(value) {
@@ -6,7 +6,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
7
7
  import { n as baseOptions, o as stringSchema, t as MockQueue } from "../tasks-IG3pHfvZ.mjs";
8
8
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
9
- import { o as createFederation } from "../middleware-C-swet0z.mjs";
9
+ import { o as createFederation } from "../middleware-B582s7UO.mjs";
10
10
  //#region src/testing/kv.test.ts
11
11
  test("ManualClockKvStore keeps an entry at its exact expiration instant", async () => {
12
12
  const kv = new ManualClockKvStore();
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
6
  import "../std__assert-DvMDRPes.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
8
- import { f as verifyRequest } from "../http-B5w_qcIg.mjs";
8
+ import { f as verifyRequest } from "../http-CQcqhcga.mjs";
9
9
  import { i as rsaPrivateKey2 } from "../keys-DIJNHW-Y.mjs";
10
- import { t as getAuthenticatedDocumentLoader } from "../docloader-DUXXI-7G.mjs";
10
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-Wf9RroxL.mjs";
11
11
  import { configure, reset } from "@logtape/logtape";
12
12
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
13
13
  import { mockDocumentLoader, test } from "@fedify/fixture";
@@ -99,45 +99,50 @@ test("getAuthenticatedDocumentLoader() validates redirects", async (t) => {
99
99
  });
100
100
  esm_default.hardReset();
101
101
  });
102
- test("getAuthenticatedDocumentLoader() cancellation", {
103
- sanitizeResources: false,
104
- sanitizeOps: false
105
- }, async (t) => {
102
+ test("getAuthenticatedDocumentLoader() cancellation", async (t) => {
106
103
  esm_default.spyGlobal();
107
- await t.step("document loader cancellation", async () => {
108
- esm_default.get("https://example.com/slow-object", () => new Promise((resolve) => {
109
- setTimeout(() => {
110
- resolve({
111
- status: 200,
112
- headers: { "Content-Type": "application/activity+json" },
113
- body: {
114
- "@context": "https://www.w3.org/ns/activitystreams",
115
- type: "Note",
116
- content: "Slow response"
117
- }
104
+ try {
105
+ await t.step("document loader cancellation", async () => {
106
+ let responseTimer;
107
+ try {
108
+ esm_default.get("https://example.com/slow-object", () => new Promise((resolve) => {
109
+ responseTimer = setTimeout(() => {
110
+ resolve({
111
+ status: 200,
112
+ headers: { "Content-Type": "application/activity+json" },
113
+ body: {
114
+ "@context": "https://www.w3.org/ns/activitystreams",
115
+ type: "Note",
116
+ content: "Slow response"
117
+ }
118
+ });
119
+ }, 1e3);
120
+ }));
121
+ const loader = getAuthenticatedDocumentLoader({
122
+ keyId: new URL("https://example.com/key2"),
123
+ privateKey: rsaPrivateKey2
118
124
  });
119
- }, 1e3);
120
- }));
121
- const loader = getAuthenticatedDocumentLoader({
122
- keyId: new URL("https://example.com/key2"),
123
- privateKey: rsaPrivateKey2
125
+ const controller = new AbortController();
126
+ const promise = loader("https://example.com/slow-object", { signal: controller.signal });
127
+ controller.abort();
128
+ await assertRejects(() => promise, Error);
129
+ await assertRejects(() => loader("https://example.com/object", { signal: controller.signal }), Error);
130
+ } finally {
131
+ clearTimeout(responseTimer);
132
+ }
124
133
  });
125
- const controller = new AbortController();
126
- const promise = loader("https://example.com/slow-object", { signal: controller.signal });
127
- controller.abort();
128
- await assertRejects(() => promise, Error);
129
- await assertRejects(() => loader("https://example.com/object", { signal: controller.signal }), Error);
130
- });
131
- await t.step("immediate cancellation", async () => {
132
- const loader = getAuthenticatedDocumentLoader({
133
- keyId: new URL("https://example.com/key2"),
134
- privateKey: rsaPrivateKey2
134
+ await t.step("immediate cancellation", async () => {
135
+ const loader = getAuthenticatedDocumentLoader({
136
+ keyId: new URL("https://example.com/key2"),
137
+ privateKey: rsaPrivateKey2
138
+ });
139
+ const controller = new AbortController();
140
+ controller.abort();
141
+ await assertRejects(() => loader("https://example.com/object", { signal: controller.signal }), Error);
135
142
  });
136
- const controller = new AbortController();
137
- controller.abort();
138
- await assertRejects(() => loader("https://example.com/object", { signal: controller.signal }), Error);
139
- });
140
- esm_default.hardReset();
143
+ } finally {
144
+ esm_default.hardReset();
145
+ }
141
146
  });
142
147
  test("getAuthenticatedDocumentLoader() bounds JSON after redirects", async () => {
143
148
  esm_default.mockGlobal();
@@ -625,5 +630,75 @@ test("getAuthenticatedDocumentLoader() times out", async (t) => {
625
630
  }
626
631
  });
627
632
  });
633
+ const unsupportedUrls = [
634
+ "ftp://example.com/collection",
635
+ "file:///collection",
636
+ `data:application/ld+json,${encodeURIComponent(JSON.stringify({ id: "https://example.com/data" }))}`
637
+ ];
638
+ function isUnsupportedProtocolError(error, url) {
639
+ return error instanceof UrlError && error.message === `Unsupported protocol: ${new URL(url).protocol}` && error.reason === "disallowed";
640
+ }
641
+ async function withFetchStub(respond, callback) {
642
+ const fetched = [];
643
+ const originalFetch = globalThis.fetch;
644
+ globalThis.fetch = ((input, init) => {
645
+ const request = input instanceof Request && init == null ? input : new Request(input, init);
646
+ fetched.push(request);
647
+ return Promise.resolve(respond(request));
648
+ });
649
+ try {
650
+ await callback(fetched);
651
+ } finally {
652
+ globalThis.fetch = originalFetch;
653
+ }
654
+ }
655
+ for (const url of unsupportedUrls) {
656
+ const scheme = new URL(url).protocol;
657
+ const loader = getAuthenticatedDocumentLoader({
658
+ keyId: new URL("https://example.com/key2"),
659
+ privateKey: rsaPrivateKey2
660
+ }, { allowPrivateAddress: true });
661
+ test(`getAuthenticatedDocumentLoader() rejects ${scheme} URLs with private addresses allowed before fetching`, async () => {
662
+ await withFetchStub(() => Response.json({}), async (fetched) => {
663
+ await rejects(loader(url), (e) => isUnsupportedProtocolError(e, url));
664
+ deepStrictEqual(fetched, []);
665
+ });
666
+ });
667
+ test(`getAuthenticatedDocumentLoader() rejects redirects to ${scheme} URLs with private addresses allowed`, async () => {
668
+ const start = "https://example.com/redirect-to-unsupported";
669
+ await withFetchStub(() => Response.redirect(url, 302), async (fetched) => {
670
+ await rejects(loader(start), (e) => isUnsupportedProtocolError(e, url));
671
+ deepStrictEqual(fetched.map((r) => r.url), [start]);
672
+ });
673
+ });
674
+ for (const firstSpec of ["rfc9421", "draft-cavage-http-signatures-12"]) test(`getAuthenticatedDocumentLoader() rejects redirects to ${scheme} URLs after signature fallback from ${firstSpec}`, async () => {
675
+ const start = "https://example.com/fallback-redirect-to-unsupported";
676
+ const fallbackLoader = getAuthenticatedDocumentLoader({
677
+ keyId: new URL("https://example.com/key2"),
678
+ privateKey: rsaPrivateKey2
679
+ }, {
680
+ allowPrivateAddress: true,
681
+ specDeterminer: {
682
+ determineSpec: () => firstSpec,
683
+ rememberSpec: () => {}
684
+ }
685
+ });
686
+ await withFetchStub((request) => request.headers.has("Signature-Input") === (firstSpec === "rfc9421") ? new Response("Unauthorized", { status: 401 }) : Response.redirect(url, 302), async (fetched) => {
687
+ await rejects(fallbackLoader(start), (e) => isUnsupportedProtocolError(e, url));
688
+ deepStrictEqual(fetched.map((r) => r.url), [start, start]);
689
+ deepStrictEqual(fetched.map((r) => r.headers.has("Signature-Input")), [firstSpec === "rfc9421", firstSpec !== "rfc9421"]);
690
+ });
691
+ });
692
+ for (const html of [false, true]) test(`getAuthenticatedDocumentLoader() rejects ${html ? "HTML" : "Link header"} alternates to ${scheme} URLs with private addresses allowed`, async () => {
693
+ const start = "https://example.com/alternate-to-unsupported";
694
+ await withFetchStub(() => html ? new Response(`<link rel="alternate" type="application/activity+json" href="${url}">`, { headers: { "Content-Type": "text/html" } }) : new Response("", { headers: {
695
+ "Content-Type": "text/plain",
696
+ Link: `<${url}>; rel="alternate"; type="application/activity+json"`
697
+ } }), async (fetched) => {
698
+ await rejects(loader(start), (e) => isUnsupportedProtocolError(e, url));
699
+ deepStrictEqual(fetched.map((r) => r.url), [start]);
700
+ });
701
+ });
702
+ }
628
703
  //#endregion
629
704
  export {};
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as kvCache, t as MockKvStore } from "../kv-cache-BgQMAKIg.mjs";
4
+ import { n as kvCache, t as MockKvStore } from "../kv-cache-4oZXC3pf.mjs";
5
5
  import { preloadedContexts } from "@fedify/vocab-runtime";
6
6
  import { deepStrictEqual, throws } from "node:assert";
7
7
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_kv_cache = require("../kv-cache-D4throaQ.cjs");
3
+ const require_kv_cache = require("../kv-cache-JOKAStz2.cjs");
4
4
  exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
5
5
  exports.kvCache = require_kv_cache.kvCache;
package/dist/utils/mod.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-B0SZfzFb.js";
3
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-Bih-8AoZ.js";
4
4
  export { getAuthenticatedDocumentLoader, kvCache };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -151,10 +151,10 @@
151
151
  "structured-field-values": "^2.0.4",
152
152
  "temporal-polyfill": "^1.0.1",
153
153
  "urlpattern-polyfill": "^10.1.0",
154
- "@fedify/uri-template": "2.4.2",
155
- "@fedify/vocab-runtime": "2.4.2",
156
- "@fedify/webfinger": "2.4.2",
157
- "@fedify/vocab": "2.4.2"
154
+ "@fedify/uri-template": "2.4.3",
155
+ "@fedify/vocab": "2.4.3",
156
+ "@fedify/vocab-runtime": "2.4.3",
157
+ "@fedify/webfinger": "2.4.3"
158
158
  },
159
159
  "devDependencies": {
160
160
  "@std/assert": "npm:@jsr/std__assert@^0.226.0",
@@ -166,8 +166,8 @@
166
166
  "tsx": "^4.21.0",
167
167
  "typescript": "^6.0.0",
168
168
  "wrangler": "^4.17.0",
169
- "@fedify/fixture": "2.0.0",
170
- "@fedify/vocab-tools": "^2.4.2"
169
+ "@fedify/vocab-tools": "^2.4.3",
170
+ "@fedify/fixture": "2.0.0"
171
171
  },
172
172
  "scripts": {
173
173
  "build:self": "tsdown",