@fedify/fedify 2.0.35-dev.2465 → 2.0.35-dev.2469

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 (58) hide show
  1. package/dist/{builder-COVPHcS_.mjs → builder-vEXq-lKC.mjs} +3 -3
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{context-DDPUfQkR.d.ts → context-B2iX3heK.d.ts} +26 -0
  6. package/dist/{context-C-KTxW8v.d.cts → context-r8sjhltN.d.cts} +26 -0
  7. package/dist/{deno-ClkjKd1Y.mjs → deno-HyjpIMD2.mjs} +1 -1
  8. package/dist/{docloader-CEKVqrZZ.mjs → docloader-C3V1CA__.mjs} +2 -2
  9. package/dist/federation/builder.test.mjs +1 -1
  10. package/dist/federation/handler.test.mjs +6 -6
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/inbox.test.mjs +1 -1
  13. package/dist/federation/middleware.test.mjs +330 -7
  14. package/dist/federation/mod.cjs +1 -1
  15. package/dist/federation/mod.d.cts +2 -2
  16. package/dist/federation/mod.d.ts +2 -2
  17. package/dist/federation/mod.js +1 -1
  18. package/dist/federation/send.test.mjs +3 -3
  19. package/dist/federation/temporal.test.mjs +1 -1
  20. package/dist/federation/webfinger.test.mjs +1 -1
  21. package/dist/{http-BxzEYou1.js → http-B9yJ1OGG.js} +1 -1
  22. package/dist/{http-ByWYcKft.cjs → http-B_JXxsg0.cjs} +1 -1
  23. package/dist/{http-BbieND-q.mjs → http-xlEvsjp2.mjs} +2 -2
  24. package/dist/{inbox-CUDMg8zO.mjs → inbox-Ca4SopAP.mjs} +1 -1
  25. package/dist/{key-C0z4FgyY.mjs → key-CLtu73m3.mjs} +1 -1
  26. package/dist/{kv-cache-BaAaam2u.cjs → kv-cache-BzxVosc_.cjs} +1 -1
  27. package/dist/{kv-cache-D3IyjhlK.js → kv-cache-ibNSFaaR.js} +1 -1
  28. package/dist/{ld-jTWJ8N8H.mjs → ld-CwZHzx6E.mjs} +2 -2
  29. package/dist/{middleware-7c0Theyb.mjs → middleware-B-PC2OBb.mjs} +60 -20
  30. package/dist/{middleware-DKxi2SGD.mjs → middleware-BE2KpCCl.mjs} +1 -1
  31. package/dist/{middleware-CUBeZq0G.cjs → middleware-BfYt2ccy.cjs} +1 -1
  32. package/dist/{middleware-CpGD9Bck.js → middleware-DKzhsZ6a.js} +52 -12
  33. package/dist/{middleware-CQXidl_F.cjs → middleware-DegTN2kB.cjs} +53 -13
  34. package/dist/{mod-CI9TwVC1.d.ts → mod-CM_eR8hQ.d.ts} +1 -1
  35. package/dist/{mod-CgIgPN_a.d.cts → mod-DDTLbfce.d.cts} +1 -1
  36. package/dist/mod.cjs +4 -4
  37. package/dist/mod.d.cts +2 -2
  38. package/dist/mod.d.ts +2 -2
  39. package/dist/mod.js +4 -4
  40. package/dist/nodeinfo/handler.test.mjs +1 -1
  41. package/dist/{owner-D8l8hvDa.mjs → owner-CI6RnH-j.mjs} +2 -2
  42. package/dist/{proof-Rh4dH22e.cjs → proof-BIaI6Y0n.cjs} +1 -1
  43. package/dist/{proof-BNRoUaAq.js → proof-C7JS7QMS.js} +1 -1
  44. package/dist/{proof-C-TDIi4A.mjs → proof-CDgXDfMX.mjs} +2 -2
  45. package/dist/{send-BaY30BkB.mjs → send-7rCQ8WKw.mjs} +2 -2
  46. package/dist/sig/http.test.mjs +2 -2
  47. package/dist/sig/key.test.mjs +2 -2
  48. package/dist/sig/ld.test.mjs +2 -2
  49. package/dist/sig/mod.cjs +2 -2
  50. package/dist/sig/mod.js +2 -2
  51. package/dist/sig/owner.test.mjs +1 -1
  52. package/dist/sig/proof.test.mjs +1 -1
  53. package/dist/{temporal-DlKY37eA.mjs → temporal-DsnplmHX.mjs} +1 -1
  54. package/dist/testing/mod.d.mts +26 -0
  55. package/dist/utils/docloader.test.mjs +2 -2
  56. package/dist/utils/mod.cjs +1 -1
  57. package/dist/utils/mod.js +1 -1
  58. package/package.json +6 -6
@@ -7,8 +7,8 @@ import { i as assertExists, t as assertStringIncludes } from "../std__assert-Dfl
7
7
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
8
8
  import { t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
10
- import { t as exportJwk } from "../key-C0z4FgyY.mjs";
11
- import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-BbieND-q.mjs";
10
+ import { t as exportJwk } from "../key-CLtu73m3.mjs";
11
+ import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-xlEvsjp2.mjs";
12
12
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CCxRJhWa.mjs";
13
13
  import { mockDocumentLoader, test } from "@fedify/fixture";
14
14
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -6,9 +6,9 @@ import { n as assertStrictEquals } from "../std__assert-DflMZha5.mjs";
6
6
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
7
7
  import { t as assert } from "../assert-BhQd8QHP.mjs";
8
8
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
9
- import { a as importJwk, i as generateCryptoKeyPair, o as validateCryptoKey, r as fetchKey, t as exportJwk } from "../key-C0z4FgyY.mjs";
9
+ import { a as importJwk, i as generateCryptoKeyPair, o as validateCryptoKey, r as fetchKey, t as exportJwk } from "../key-CLtu73m3.mjs";
10
10
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
11
- import { g as wrapContextLoaderForJsonLd } from "../ld-jTWJ8N8H.mjs";
11
+ import { g as wrapContextLoaderForJsonLd } from "../ld-CwZHzx6E.mjs";
12
12
  import { mockDocumentLoader, test } from "@fedify/fixture";
13
13
  import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
14
14
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
6
6
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
8
- import { i as generateCryptoKeyPair } from "../key-C0z4FgyY.mjs";
8
+ import { i as generateCryptoKeyPair } from "../key-CLtu73m3.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
10
- import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-jTWJ8N8H.mjs";
10
+ import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-CwZHzx6E.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { CryptographicKey } from "@fedify/vocab";
13
13
  import { encodeBase64 } from "byte-encodings/base64";
package/dist/sig/mod.cjs CHANGED
@@ -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
- const require_http = require("../http-ByWYcKft.cjs");
5
- const require_proof = require("../proof-Rh4dH22e.cjs");
4
+ const require_http = require("../http-B_JXxsg0.cjs");
5
+ const require_proof = require("../proof-BIaI6Y0n.cjs");
6
6
  exports.attachSignature = require_proof.attachSignature;
7
7
  exports.createProof = require_proof.createProof;
8
8
  exports.createSignature = require_proof.createSignature;
package/dist/sig/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "../http-BxzEYou1.js";
4
- import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-BNRoUaAq.js";
3
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "../http-B9yJ1OGG.js";
4
+ import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-C7JS7QMS.js";
5
5
  export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
@@ -6,7 +6,7 @@ import "../std__assert-DflMZha5.mjs";
6
6
  import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
7
7
  import { t as assert } from "../assert-BhQd8QHP.mjs";
8
8
  import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CCxRJhWa.mjs";
9
- import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-D8l8hvDa.mjs";
9
+ import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-CI6RnH-j.mjs";
10
10
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
12
12
  //#region src/sig/owner.test.ts
@@ -6,7 +6,7 @@ import "../std__assert-DflMZha5.mjs";
6
6
  import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
8
8
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
9
- import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-C-TDIi4A.mjs";
9
+ import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-CDgXDfMX.mjs";
10
10
  import { mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { Create, DataIntegrityProof, Multikey, Note, Place } from "@fedify/vocab";
12
12
  import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { c as getNormalizationContextLoader } from "./ld-jTWJ8N8H.mjs";
4
+ import { c as getNormalizationContextLoader } from "./ld-CwZHzx6E.mjs";
5
5
  import jsonld from "@fedify/vocab-runtime/jsonld";
6
6
  //#region src/federation/temporal.ts
7
7
  function isPlainObject(value) {
@@ -1721,6 +1721,11 @@ interface RequestContext<TContextData> extends Context<TContextData> {
1721
1721
  * Gets the public key of the sender, if any exists and it is verified.
1722
1722
  * Otherwise, `null` is returned.
1723
1723
  *
1724
+ * Successful results are reused for this request regardless of the options.
1725
+ * Pending checks and `null` results are reused for the same effective
1726
+ * document and context loaders, including failed lookups. Rejected checks
1727
+ * can be retried. Shared work uses the first caller's tracer provider.
1728
+ *
1724
1729
  * This can be used for implementing [authorized fetch] (also known as
1725
1730
  * secure mode) in ActivityPub.
1726
1731
  *
@@ -1734,6 +1739,11 @@ interface RequestContext<TContextData> extends Context<TContextData> {
1734
1739
  * Gets the public key of the sender, if any exists and it is verified.
1735
1740
  * Otherwise, `null` is returned.
1736
1741
  *
1742
+ * Successful results are reused for this request regardless of the options.
1743
+ * Pending checks and `null` results are reused for the same effective
1744
+ * document and context loaders, including failed lookups. Rejected checks
1745
+ * can be retried. Shared work uses the first caller's tracer provider.
1746
+ *
1737
1747
  * This can be used for implementing [authorized fetch] (also known as
1738
1748
  * secure mode) in ActivityPub.
1739
1749
  *
@@ -1753,6 +1763,14 @@ interface RequestContext<TContextData> extends Context<TContextData> {
1753
1763
  * Gets the owner of the signed key, if any exists and it is verified.
1754
1764
  * Otherwise, `null` is returned.
1755
1765
  *
1766
+ * Verified keys and owners are reused for this request regardless of the
1767
+ * options. Pending checks are shared for the same effective document and
1768
+ * context loaders. A `null` result from an owner lookup after key
1769
+ * verification is retained for those loaders. A `null` result caused by
1770
+ * an unverified key is not retained, allowing an owner lookup after another
1771
+ * loader verifies the key. Rejected checks can be retried. Shared work
1772
+ * uses the first caller's tracer provider.
1773
+ *
1756
1774
  * This can be used for implementing [authorized fetch] (also known as
1757
1775
  * secure mode) in ActivityPub.
1758
1776
  *
@@ -1767,6 +1785,14 @@ interface RequestContext<TContextData> extends Context<TContextData> {
1767
1785
  * Gets the owner of the signed key, if any exists and it is verified.
1768
1786
  * Otherwise, `null` is returned.
1769
1787
  *
1788
+ * Verified keys and owners are reused for this request regardless of the
1789
+ * options. Pending checks are shared for the same effective document and
1790
+ * context loaders. A `null` result from an owner lookup after key
1791
+ * verification is retained for those loaders. A `null` result caused by
1792
+ * an unverified key is not retained, allowing an owner lookup after another
1793
+ * loader verifies the key. Rejected checks can be retried. Shared work
1794
+ * uses the first caller's tracer provider.
1795
+ *
1770
1796
  * This can be used for implementing [authorized fetch] (also known as
1771
1797
  * secure mode) in ActivityPub.
1772
1798
  *
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-DflMZha5.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
8
- import { l as verifyRequest } from "../http-BbieND-q.mjs";
8
+ import { l as verifyRequest } from "../http-xlEvsjp2.mjs";
9
9
  import { i as rsaPrivateKey2 } from "../keys-CCxRJhWa.mjs";
10
- import { t as getAuthenticatedDocumentLoader } from "../docloader-CEKVqrZZ.mjs";
10
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-C3V1CA__.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
13
13
  import { configure, reset } from "@logtape/logtape";
@@ -1,6 +1,6 @@
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_kv_cache = require("../kv-cache-BaAaam2u.cjs");
4
+ const require_kv_cache = require("../kv-cache-BzxVosc_.cjs");
5
5
  exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
6
6
  exports.kvCache = require_kv_cache.kvCache;
package/dist/utils/mod.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-D3IyjhlK.js";
3
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-ibNSFaaR.js";
4
4
  export { getAuthenticatedDocumentLoader, kvCache };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "2.0.35-dev.2465+5a048d17",
3
+ "version": "2.0.35-dev.2469+53a29875",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -144,9 +144,9 @@
144
144
  "uri-template-router": "^1.0.0",
145
145
  "url-template": "^3.1.1",
146
146
  "urlpattern-polyfill": "^10.1.0",
147
- "@fedify/vocab": "2.0.35-dev.2465+5a048d17",
148
- "@fedify/vocab-runtime": "2.0.35-dev.2465+5a048d17",
149
- "@fedify/webfinger": "2.0.35-dev.2465+5a048d17"
147
+ "@fedify/vocab": "2.0.35-dev.2469+53a29875",
148
+ "@fedify/webfinger": "2.0.35-dev.2469+53a29875",
149
+ "@fedify/vocab-runtime": "2.0.35-dev.2469+53a29875"
150
150
  },
151
151
  "devDependencies": {
152
152
  "@std/assert": "npm:@jsr/std__assert@^0.226.0",
@@ -158,8 +158,8 @@
158
158
  "tsx": "^4.19.4",
159
159
  "typescript": "^6.0.0",
160
160
  "wrangler": "^4.17.0",
161
- "@fedify/vocab-tools": "^2.0.35-dev.2465+5a048d17",
162
- "@fedify/fixture": "2.0.0"
161
+ "@fedify/fixture": "2.0.0",
162
+ "@fedify/vocab-tools": "^2.0.35-dev.2469+53a29875"
163
163
  },
164
164
  "scripts": {
165
165
  "build:self": "tsdown",