@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
@@ -8,10 +8,10 @@ import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
8
8
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { t as assertNotEquals } from "../assert_not_equals-BkxW5QJI.mjs";
10
10
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
11
- import { l as verifyRequest } from "../http-BbieND-q.mjs";
11
+ import { l as verifyRequest } from "../http-xlEvsjp2.mjs";
12
12
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
13
- import { t as doesActorOwnKey } from "../owner-D8l8hvDa.mjs";
14
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-BaY30BkB.mjs";
13
+ import { t as doesActorOwnKey } from "../owner-CI6RnH-j.mjs";
14
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-7rCQ8WKw.mjs";
15
15
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
16
16
  import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
17
17
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import "../std__assert-DflMZha5.mjs";
5
5
  import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
6
6
  import { t as assert } from "../assert-BhQd8QHP.mjs";
7
- import { t as hasMalformedKnownTemporalLiteral } from "../temporal-DlKY37eA.mjs";
7
+ import { t as hasMalformedKnownTemporalLiteral } from "../temporal-DsnplmHX.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/temporal.test.ts
10
10
  test("hasMalformedKnownTemporalLiteral() detects expanded proof timestamps", async () => {
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-DflMZha5.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
8
- import { a as createFederation, o as handleWebFinger } from "../middleware-7c0Theyb.mjs";
8
+ import { a as createFederation, o as handleWebFinger } from "../middleware-B-PC2OBb.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  import { Image, Link, Person } from "@fedify/vocab";
11
11
  //#region src/federation/webfinger.test.ts
@@ -10,7 +10,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
10
10
  import { Item, decodeDict, encodeItem } from "structured-field-values";
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "2.0.35-dev.2465+5a048d17";
13
+ var version = "2.0.35-dev.2469+53a29875";
14
14
  //#endregion
15
15
  //#region src/sig/key.ts
16
16
  /** Classifies decoding failures without hiding unexpected loader errors. */
@@ -11,7 +11,7 @@ let byte_encodings_base64 = require("byte-encodings/base64");
11
11
  let structured_field_values = require("structured-field-values");
12
12
  //#region deno.json
13
13
  var name = "@fedify/fedify";
14
- var version = "2.0.35-dev.2465+5a048d17";
14
+ var version = "2.0.35-dev.2469+53a29875";
15
15
  //#endregion
16
16
  //#region src/sig/key.ts
17
17
  /** Classifies decoding failures without hiding unexpected loader errors. */
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-C0z4FgyY.mjs";
4
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-CLtu73m3.mjs";
6
6
  import { CryptographicKey } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { FetchError } 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 { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
4
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
5
5
  import { Activity, getTypeId } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
7
7
  import { getLogger } from "@logtape/logtape";
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
4
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
5
5
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-ByWYcKft.cjs");
4
+ const require_http = require("./http-B_JXxsg0.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { l as validateCryptoKey, t as doubleKnock } from "./http-BxzEYou1.js";
3
+ import { l as validateCryptoKey, t as doubleKnock } from "./http-B9yJ1OGG.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { curry } from "es-toolkit";
6
6
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-C0z4FgyY.mjs";
4
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-CLtu73m3.mjs";
6
6
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader } from "@fedify/vocab-runtime";
@@ -2,24 +2,24 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as RouterError } from "./router-CrMLXoOr.mjs";
5
- import { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
6
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-C0z4FgyY.mjs";
7
- import { l as verifyRequest } from "./http-BbieND-q.mjs";
8
- import { t as getAuthenticatedDocumentLoader } from "./docloader-CEKVqrZZ.mjs";
5
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
6
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-CLtu73m3.mjs";
7
+ import { l as verifyRequest } from "./http-xlEvsjp2.mjs";
8
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-C3V1CA__.mjs";
9
9
  import { n as kvCache } from "./kv-cache-BrjuJue8.mjs";
10
- import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-jTWJ8N8H.mjs";
11
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-D8l8hvDa.mjs";
12
- import { n as signObject, r as verifyObject } from "./proof-C-TDIi4A.mjs";
10
+ import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-CwZHzx6E.mjs";
11
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CI6RnH-j.mjs";
12
+ import { n as signObject, r as verifyObject } from "./proof-CDgXDfMX.mjs";
13
13
  import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-BUqbea1d.mjs";
14
14
  import { t as nodeInfoToJson } from "./types-MNlFfxjv.mjs";
15
- import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-CUDMg8zO.mjs";
16
- import { t as FederationBuilderImpl } from "./builder-COVPHcS_.mjs";
15
+ import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-Ca4SopAP.mjs";
16
+ import { t as FederationBuilderImpl } from "./builder-vEXq-lKC.mjs";
17
17
  import { t as buildCollectionSynchronizationHeader } from "./collection-DI6YzYpd.mjs";
18
18
  import { t as KvKeyCache } from "./keycache-DBD6fzl1.mjs";
19
19
  import { t as acceptsJsonLd } from "./negotiation-TWEs6Cl8.mjs";
20
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-DlKY37eA.mjs";
20
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-DsnplmHX.mjs";
21
21
  import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
22
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-BaY30BkB.mjs";
22
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-7rCQ8WKw.mjs";
23
23
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
24
24
  import { lookupWebFinger } from "@fedify/webfinger";
25
25
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -3123,27 +3123,67 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
3123
3123
  }
3124
3124
  }), values);
3125
3125
  }
3126
- #signedKey = void 0;
3126
+ #signedKey = null;
3127
+ #signedKeyOwner = null;
3128
+ #signatureChecks = /* @__PURE__ */ new WeakMap();
3129
+ #getSignatureCheck(documentLoader, contextLoader) {
3130
+ let checks = this.#signatureChecks.get(documentLoader);
3131
+ if (checks == null) {
3132
+ checks = /* @__PURE__ */ new WeakMap();
3133
+ this.#signatureChecks.set(documentLoader, checks);
3134
+ }
3135
+ let check = checks.get(contextLoader);
3136
+ if (check == null) {
3137
+ check = {};
3138
+ checks.set(contextLoader, check);
3139
+ }
3140
+ return check;
3141
+ }
3127
3142
  async getSignedKey(options = {}) {
3128
3143
  if (this.#signedKey != null) return this.#signedKey;
3129
- return this.#signedKey = await verifyRequest(this.request, {
3144
+ const documentLoader = options.documentLoader ?? this.documentLoader;
3145
+ const contextLoader = options.contextLoader ?? this.contextLoader;
3146
+ const check = this.#getSignatureCheck(documentLoader, contextLoader);
3147
+ if (check.key != null) return check.key;
3148
+ const promise = verifyRequest(this.request, {
3130
3149
  ...this,
3131
- contextLoader: options.contextLoader ?? this.contextLoader,
3132
- documentLoader: options.documentLoader ?? this.documentLoader,
3150
+ contextLoader,
3151
+ documentLoader,
3133
3152
  timeWindow: this.federation.signatureTimeWindow,
3134
3153
  tracerProvider: options.tracerProvider ?? this.tracerProvider
3154
+ }).then((key) => {
3155
+ if (key != null) this.#signedKey ??= key;
3156
+ return key;
3157
+ }).catch((error) => {
3158
+ if (check.key === promise) check.key = void 0;
3159
+ throw error;
3135
3160
  });
3161
+ check.key = promise;
3162
+ return await promise;
3136
3163
  }
3137
- #signedKeyOwner = void 0;
3138
3164
  async getSignedKeyOwner(options = {}) {
3139
3165
  if (this.#signedKeyOwner != null) return this.#signedKeyOwner;
3140
- const key = await this.getSignedKey(options);
3141
- if (key == null) return this.#signedKeyOwner = null;
3142
- return this.#signedKeyOwner = await getKeyOwner(key, {
3143
- contextLoader: options.contextLoader ?? this.contextLoader,
3166
+ const normalizedOptions = {
3144
3167
  documentLoader: options.documentLoader ?? this.documentLoader,
3168
+ contextLoader: options.contextLoader ?? this.contextLoader,
3145
3169
  tracerProvider: options.tracerProvider ?? this.tracerProvider
3170
+ };
3171
+ const check = this.#getSignatureCheck(normalizedOptions.documentLoader, normalizedOptions.contextLoader);
3172
+ if (check.owner != null) return check.owner;
3173
+ const promise = this.getSignedKey(normalizedOptions).then(async (key) => {
3174
+ if (key == null) {
3175
+ if (check.owner === promise) check.owner = void 0;
3176
+ return null;
3177
+ }
3178
+ const owner = await getKeyOwner(key, normalizedOptions);
3179
+ if (owner != null) this.#signedKeyOwner ??= owner;
3180
+ return owner;
3181
+ }).catch((error) => {
3182
+ if (check.owner === promise) check.owner = void 0;
3183
+ throw error;
3146
3184
  });
3185
+ check.owner = promise;
3186
+ return await promise;
3147
3187
  }
3148
3188
  };
3149
3189
  var InboxContextImpl = class InboxContextImpl extends ContextImpl {
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-7c0Theyb.mjs";
4
+ import { n as FederationImpl } from "./middleware-B-PC2OBb.mjs";
5
5
  export { FederationImpl };
@@ -1,4 +1,4 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_middleware = require("./middleware-CQXidl_F.cjs");
3
+ const require_middleware = require("./middleware-DegTN2kB.cjs");
4
4
  exports.FederationImpl = require_middleware.FederationImpl;
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./chunk-CRNNMoPX.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
5
- import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnock } from "./http-BxzEYou1.js";
5
+ import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnock } from "./http-B9yJ1OGG.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-miAYfiGO.js";
7
- import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-BNRoUaAq.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-D3IyjhlK.js";
7
+ import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-C7JS7QMS.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-ibNSFaaR.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -4377,27 +4377,67 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
4377
4377
  }
4378
4378
  }), values);
4379
4379
  }
4380
- #signedKey = void 0;
4380
+ #signedKey = null;
4381
+ #signedKeyOwner = null;
4382
+ #signatureChecks = /* @__PURE__ */ new WeakMap();
4383
+ #getSignatureCheck(documentLoader, contextLoader) {
4384
+ let checks = this.#signatureChecks.get(documentLoader);
4385
+ if (checks == null) {
4386
+ checks = /* @__PURE__ */ new WeakMap();
4387
+ this.#signatureChecks.set(documentLoader, checks);
4388
+ }
4389
+ let check = checks.get(contextLoader);
4390
+ if (check == null) {
4391
+ check = {};
4392
+ checks.set(contextLoader, check);
4393
+ }
4394
+ return check;
4395
+ }
4381
4396
  async getSignedKey(options = {}) {
4382
4397
  if (this.#signedKey != null) return this.#signedKey;
4383
- return this.#signedKey = await verifyRequest(this.request, {
4398
+ const documentLoader = options.documentLoader ?? this.documentLoader;
4399
+ const contextLoader = options.contextLoader ?? this.contextLoader;
4400
+ const check = this.#getSignatureCheck(documentLoader, contextLoader);
4401
+ if (check.key != null) return check.key;
4402
+ const promise = verifyRequest(this.request, {
4384
4403
  ...this,
4385
- contextLoader: options.contextLoader ?? this.contextLoader,
4386
- documentLoader: options.documentLoader ?? this.documentLoader,
4404
+ contextLoader,
4405
+ documentLoader,
4387
4406
  timeWindow: this.federation.signatureTimeWindow,
4388
4407
  tracerProvider: options.tracerProvider ?? this.tracerProvider
4408
+ }).then((key) => {
4409
+ if (key != null) this.#signedKey ??= key;
4410
+ return key;
4411
+ }).catch((error) => {
4412
+ if (check.key === promise) check.key = void 0;
4413
+ throw error;
4389
4414
  });
4415
+ check.key = promise;
4416
+ return await promise;
4390
4417
  }
4391
- #signedKeyOwner = void 0;
4392
4418
  async getSignedKeyOwner(options = {}) {
4393
4419
  if (this.#signedKeyOwner != null) return this.#signedKeyOwner;
4394
- const key = await this.getSignedKey(options);
4395
- if (key == null) return this.#signedKeyOwner = null;
4396
- return this.#signedKeyOwner = await getKeyOwner(key, {
4397
- contextLoader: options.contextLoader ?? this.contextLoader,
4420
+ const normalizedOptions = {
4398
4421
  documentLoader: options.documentLoader ?? this.documentLoader,
4422
+ contextLoader: options.contextLoader ?? this.contextLoader,
4399
4423
  tracerProvider: options.tracerProvider ?? this.tracerProvider
4424
+ };
4425
+ const check = this.#getSignatureCheck(normalizedOptions.documentLoader, normalizedOptions.contextLoader);
4426
+ if (check.owner != null) return check.owner;
4427
+ const promise = this.getSignedKey(normalizedOptions).then(async (key) => {
4428
+ if (key == null) {
4429
+ if (check.owner === promise) check.owner = void 0;
4430
+ return null;
4431
+ }
4432
+ const owner = await getKeyOwner(key, normalizedOptions);
4433
+ if (owner != null) this.#signedKeyOwner ??= owner;
4434
+ return owner;
4435
+ }).catch((error) => {
4436
+ if (check.owner === promise) check.owner = void 0;
4437
+ throw error;
4400
4438
  });
4439
+ check.owner = promise;
4440
+ return await promise;
4401
4441
  }
4402
4442
  };
4403
4443
  var InboxContextImpl = class InboxContextImpl extends ContextImpl {
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  const require_chunk = require("./chunk-DDcVe30Y.cjs");
4
4
  const require_transformers = require("./transformers-NeAONrAq.cjs");
5
- const require_http = require("./http-ByWYcKft.cjs");
5
+ const require_http = require("./http-B_JXxsg0.cjs");
6
6
  const require_types = require("./types-DRPjmHVV.cjs");
7
- const require_proof = require("./proof-Rh4dH22e.cjs");
8
- const require_kv_cache = require("./kv-cache-BaAaam2u.cjs");
7
+ const require_proof = require("./proof-BIaI6Y0n.cjs");
8
+ const require_kv_cache = require("./kv-cache-BzxVosc_.cjs");
9
9
  let _logtape_logtape = require("@logtape/logtape");
10
10
  let _fedify_vocab = require("@fedify/vocab");
11
11
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -349,7 +349,7 @@ var FederationBuilderImpl = class {
349
349
  this.collectionTypeIds = {};
350
350
  }
351
351
  async build(options) {
352
- const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-CUBeZq0G.cjs"));
352
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-BfYt2ccy.cjs"));
353
353
  const f = new FederationImpl(options);
354
354
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
355
355
  f.router = this.router.clone();
@@ -4371,27 +4371,67 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
4371
4371
  }
4372
4372
  }), values);
4373
4373
  }
4374
- #signedKey = void 0;
4374
+ #signedKey = null;
4375
+ #signedKeyOwner = null;
4376
+ #signatureChecks = /* @__PURE__ */ new WeakMap();
4377
+ #getSignatureCheck(documentLoader, contextLoader) {
4378
+ let checks = this.#signatureChecks.get(documentLoader);
4379
+ if (checks == null) {
4380
+ checks = /* @__PURE__ */ new WeakMap();
4381
+ this.#signatureChecks.set(documentLoader, checks);
4382
+ }
4383
+ let check = checks.get(contextLoader);
4384
+ if (check == null) {
4385
+ check = {};
4386
+ checks.set(contextLoader, check);
4387
+ }
4388
+ return check;
4389
+ }
4375
4390
  async getSignedKey(options = {}) {
4376
4391
  if (this.#signedKey != null) return this.#signedKey;
4377
- return this.#signedKey = await require_http.verifyRequest(this.request, {
4392
+ const documentLoader = options.documentLoader ?? this.documentLoader;
4393
+ const contextLoader = options.contextLoader ?? this.contextLoader;
4394
+ const check = this.#getSignatureCheck(documentLoader, contextLoader);
4395
+ if (check.key != null) return check.key;
4396
+ const promise = require_http.verifyRequest(this.request, {
4378
4397
  ...this,
4379
- contextLoader: options.contextLoader ?? this.contextLoader,
4380
- documentLoader: options.documentLoader ?? this.documentLoader,
4398
+ contextLoader,
4399
+ documentLoader,
4381
4400
  timeWindow: this.federation.signatureTimeWindow,
4382
4401
  tracerProvider: options.tracerProvider ?? this.tracerProvider
4402
+ }).then((key) => {
4403
+ if (key != null) this.#signedKey ??= key;
4404
+ return key;
4405
+ }).catch((error) => {
4406
+ if (check.key === promise) check.key = void 0;
4407
+ throw error;
4383
4408
  });
4409
+ check.key = promise;
4410
+ return await promise;
4384
4411
  }
4385
- #signedKeyOwner = void 0;
4386
4412
  async getSignedKeyOwner(options = {}) {
4387
4413
  if (this.#signedKeyOwner != null) return this.#signedKeyOwner;
4388
- const key = await this.getSignedKey(options);
4389
- if (key == null) return this.#signedKeyOwner = null;
4390
- return this.#signedKeyOwner = await require_proof.getKeyOwner(key, {
4391
- contextLoader: options.contextLoader ?? this.contextLoader,
4414
+ const normalizedOptions = {
4392
4415
  documentLoader: options.documentLoader ?? this.documentLoader,
4416
+ contextLoader: options.contextLoader ?? this.contextLoader,
4393
4417
  tracerProvider: options.tracerProvider ?? this.tracerProvider
4418
+ };
4419
+ const check = this.#getSignatureCheck(normalizedOptions.documentLoader, normalizedOptions.contextLoader);
4420
+ if (check.owner != null) return check.owner;
4421
+ const promise = this.getSignedKey(normalizedOptions).then(async (key) => {
4422
+ if (key == null) {
4423
+ if (check.owner === promise) check.owner = void 0;
4424
+ return null;
4425
+ }
4426
+ const owner = await require_proof.getKeyOwner(key, normalizedOptions);
4427
+ if (owner != null) this.#signedKeyOwner ??= owner;
4428
+ return owner;
4429
+ }).catch((error) => {
4430
+ if (check.owner === promise) check.owner = void 0;
4431
+ throw error;
4394
4432
  });
4433
+ check.owner = promise;
4434
+ return await promise;
4395
4435
  }
4396
4436
  };
4397
4437
  var InboxContextImpl = class InboxContextImpl extends ContextImpl {
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-DDPUfQkR.js";
2
+ import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-B2iX3heK.js";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-C-KTxW8v.cjs";
2
+ import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-r8sjhltN.cjs";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
package/dist/mod.cjs CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("./chunk-DDcVe30Y.cjs");
5
5
  const require_transformers = require("./transformers-NeAONrAq.cjs");
6
6
  require("./compat/mod.cjs");
7
- const require_http = require("./http-ByWYcKft.cjs");
8
- const require_middleware = require("./middleware-CQXidl_F.cjs");
7
+ const require_http = require("./http-B_JXxsg0.cjs");
8
+ const require_middleware = require("./middleware-DegTN2kB.cjs");
9
9
  const require_types = require("./types-DRPjmHVV.cjs");
10
- const require_proof = require("./proof-Rh4dH22e.cjs");
11
- const require_kv_cache = require("./kv-cache-BaAaam2u.cjs");
10
+ const require_proof = require("./proof-BIaI6Y0n.cjs");
11
+ const require_kv_cache = require("./kv-cache-BzxVosc_.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -2,10 +2,10 @@
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CAM_bQXx.cjs";
3
3
  import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-Bs6thuCC.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-B3hNQCG8.cjs";
5
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-C-KTxW8v.cjs";
5
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-r8sjhltN.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CZKl1IUS.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CgIgPN_a.cjs";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-DDTLbfce.cjs";
9
9
  import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-IOWUF5Yr.cjs";
10
10
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BkPB4hPe.cjs";
11
11
  export * from "@fedify/vocab-runtime";
package/dist/mod.d.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CSddvgWN.js";
3
3
  import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-CDupyfOc.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CiBPcC6F.js";
5
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-DDPUfQkR.js";
5
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-B2iX3heK.js";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CxaI4eGo.js";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CI9TwVC1.js";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CM_eR8hQ.js";
9
9
  import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-E7YM72JZ.js";
10
10
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BKJyD7nk.js";
11
11
  export * from "@fedify/vocab-runtime";
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./chunk-CRNNMoPX.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
5
5
  import "./compat/mod.js";
6
- import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-BxzEYou1.js";
7
- import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-CpGD9Bck.js";
6
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-B9yJ1OGG.js";
7
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-DKzhsZ6a.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-miAYfiGO.js";
9
- 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";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-D3IyjhlK.js";
9
+ 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";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-ibNSFaaR.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-DflMZha5.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
8
- import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-7c0Theyb.mjs";
8
+ import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-B-PC2OBb.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
5
- import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-C0z4FgyY.mjs";
4
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
5
+ import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-CLtu73m3.mjs";
6
6
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  const require_chunk = require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-ByWYcKft.cjs");
4
+ const require_http = require("./http-B_JXxsg0.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let _fedify_vocab = require("@fedify/vocab");
7
7
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as fetchActorDocument, d as name, f as version, i as exportJwk, l as validateCryptoKey, o as fetchKey, u as verifyKeyOwnership } from "./http-BxzEYou1.js";
3
+ import { a as fetchActorDocument, d as name, f as version, i as exportJwk, l as validateCryptoKey, o as fetchKey, u as verifyKeyOwnership } from "./http-B9yJ1OGG.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-C0z4FgyY.mjs";
4
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-CLtu73m3.mjs";
6
6
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getLogger } from "@logtape/logtape";
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-ClkjKd1Y.mjs";
5
- import { n as doubleKnock } from "./http-BbieND-q.mjs";
4
+ import { n as version, t as name } from "./deno-HyjpIMD2.mjs";
5
+ import { n as doubleKnock } from "./http-xlEvsjp2.mjs";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError, validatePublicUrl } from "@fedify/vocab-runtime";
8
8
  import { getLogger } from "@logtape/logtape";