@fedify/fedify 2.4.0-dev.1881 → 2.4.0-dev.1889

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 (59) hide show
  1. package/dist/{builder-5fuOq20e.mjs → builder-JXN1im9k.mjs} +2 -2
  2. package/dist/{codec-peqOdBaE.mjs → codec-C6rTrpIp.mjs} +26 -3
  3. package/dist/compat/transformers.test.mjs +1 -1
  4. package/dist/{context-Dt36KFEJ.mjs → context-CbS35fLr.mjs} +2 -60
  5. package/dist/{deno--os6x8xr.mjs → deno-DdOBy0fz.mjs} +1 -1
  6. package/dist/dist-BQvArojP.mjs +188 -0
  7. package/dist/{docloader-CvFxfQuF.mjs → docloader-DOEGT_GW.mjs} +2 -2
  8. package/dist/federation/builder.test.mjs +1 -1
  9. package/dist/federation/handler.test.mjs +4 -4
  10. package/dist/federation/idempotency.test.mjs +2 -2
  11. package/dist/federation/metrics.test.mjs +1 -1
  12. package/dist/federation/middleware.test.mjs +9 -9
  13. package/dist/federation/mod.cjs +1 -1
  14. package/dist/federation/mod.js +1 -1
  15. package/dist/federation/send.test.mjs +3 -3
  16. package/dist/federation/tasks/codec.test.mjs +1 -1
  17. package/dist/federation/tasks/enqueue.test.mjs +2 -2
  18. package/dist/federation/tasks/tasks.test.mjs +4 -4
  19. package/dist/federation/temporal.test.mjs +1 -1
  20. package/dist/federation/webfinger.test.mjs +2 -2
  21. package/dist/{federation-BJOTDQut.cjs → federation-DHt4PpSt.cjs} +99 -76
  22. package/dist/{http-BpAW8jTQ.cjs → http-CFkGXp3u.cjs} +1 -1
  23. package/dist/{http-Dz0Z-6xu.js → http-CIoEAxMQ.js} +1 -1
  24. package/dist/{http-DnrWDuU5.mjs → http-Ce1WT2Nu.mjs} +3 -3
  25. package/dist/{key-Bgtfl2M_.mjs → key-DGKxCXcy.mjs} +2 -2
  26. package/dist/{kv-cache-DGAWgk8Y.mjs → kv-cache-BEbt3wK2.mjs} +1 -1
  27. package/dist/{kv-cache-B_SLuy19.cjs → kv-cache-BdFXi4lB.cjs} +1 -1
  28. package/dist/{kv-cache-BkAI6gNw.js → kv-cache-CrfmDS-x.js} +1 -1
  29. package/dist/{ld-DeYOcSft.mjs → ld-eXBQBH4G.mjs} +3 -3
  30. package/dist/{metrics-CBYbeDaO.mjs → metrics-Crg4Vbos.mjs} +1 -1
  31. package/dist/{middleware-DnFpjPz7.js → middleware-B2fE8A-w.js} +28 -5
  32. package/dist/{middleware-DCtJ8EwC.mjs → middleware-DCuzEI3t.mjs} +1 -1
  33. package/dist/{middleware-ChsBNezF.mjs → middleware-K7vtqCMw.mjs} +13 -13
  34. package/dist/mod.cjs +4 -4
  35. package/dist/mod.js +4 -4
  36. package/dist/nodeinfo/handler.test.mjs +2 -2
  37. package/dist/{owner-DXN--VPl.mjs → owner-DE0t4u5s.mjs} +2 -2
  38. package/dist/{proof-4SSJ2EAZ.js → proof-BPAFoo_l.js} +1 -1
  39. package/dist/{proof-CvJ1aar0.cjs → proof-C2zsXJdb.cjs} +1 -1
  40. package/dist/{proof-0gTlNlB2.mjs → proof-D25RA3TP.mjs} +4 -4
  41. package/dist/{send-DBfVSKXE.mjs → send-ByC5h1Gg.mjs} +3 -3
  42. package/dist/sig/http.test.mjs +2 -2
  43. package/dist/sig/key.test.mjs +1 -1
  44. package/dist/sig/ld.test.mjs +2 -2
  45. package/dist/sig/mod.cjs +2 -2
  46. package/dist/sig/mod.js +2 -2
  47. package/dist/sig/owner.test.mjs +1 -1
  48. package/dist/sig/proof.test.mjs +1 -1
  49. package/dist/{temporal-BK-FNcey.mjs → temporal-CLmDbDJj.mjs} +1 -1
  50. package/dist/testing/context.test.d.mts +2 -0
  51. package/dist/testing/context.test.mjs +19 -0
  52. package/dist/testing/mod.d.mts +27 -1
  53. package/dist/testing/mod.mjs +3 -2
  54. package/dist/{testing-BX0Nicyq.mjs → testing-D13ymFKy.mjs} +2 -1
  55. package/dist/utils/docloader.test.mjs +2 -2
  56. package/dist/utils/kv-cache.test.mjs +1 -1
  57. package/dist/utils/mod.cjs +1 -1
  58. package/dist/utils/mod.js +1 -1
  59. package/package.json +6 -6
@@ -1,9 +1,9 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno--os6x8xr.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-CBYbeDaO.mjs";
6
- import { n as fetchKey, o as validateCryptoKey } from "./key-Bgtfl2M_.mjs";
4
+ import { n as version, t as name } from "./deno-DdOBy0fz.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-Crg4Vbos.mjs";
6
+ import { n as fetchKey, o as validateCryptoKey } from "./key-DGKxCXcy.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,7 +1,7 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno--os6x8xr.mjs";
4
+ import { n as version, t as name } from "./deno-DdOBy0fz.mjs";
5
5
  import { metrics } from "@opentelemetry/api";
6
6
  import { FetchError } from "@fedify/vocab-runtime";
7
7
  //#region src/federation/metrics.ts
@@ -2,10 +2,10 @@ import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-DAtXl_Kc.js";
5
- import { A as formatAcceptSignature, D as recordOutboxEnqueue, E as recordOutboxActivity, F as version, O as recordWebFingerHandle, P as name, S as recordCollectionTotalItems, T as recordInboxActivity, a as verifyRequestDetailed, b as recordCollectionPageItems, d as validateCryptoKey, f as getDurationMs, g as isAbortError, h as instrumentDocumentLoader, i as verifyRequest, k as registerQueueDepthGauge, m as getRemoteHost, n as parseRfc9421SignatureInput, o as exportJwk, p as getFederationMetrics, t as doubleKnock, u as importJwk, v as recordCircuitBreakerStateChange, w as recordFanoutRecipients, x as recordCollectionRequest, y as recordCollectionDispatchDuration } from "./http-Dz0Z-6xu.js";
6
- import { S as verifyCompactJsonLd, T as wrapContextLoaderForJsonLd, _ as hasSignature, b as isInvalidUrlTypeError, c as doesActorOwnKey, d as assertSafeJsonLd, g as getNormalizationContextLoader, h as detachSignature, i as verifyObject, l as getKeyOwner, n as hasProofLike, p as compactJsonLd, r as signObject, s as normalizeOutgoingActivityJsonLd, u as InvalidContextReferenceError, v as hasSignatureLike, x as signJsonLd, y as isClearlyMalformedContextReference } from "./proof-4SSJ2EAZ.js";
5
+ import { A as formatAcceptSignature, D as recordOutboxEnqueue, E as recordOutboxActivity, F as version, O as recordWebFingerHandle, P as name, S as recordCollectionTotalItems, T as recordInboxActivity, a as verifyRequestDetailed, b as recordCollectionPageItems, d as validateCryptoKey, f as getDurationMs, g as isAbortError, h as instrumentDocumentLoader, i as verifyRequest, k as registerQueueDepthGauge, m as getRemoteHost, n as parseRfc9421SignatureInput, o as exportJwk, p as getFederationMetrics, t as doubleKnock, u as importJwk, v as recordCircuitBreakerStateChange, w as recordFanoutRecipients, x as recordCollectionRequest, y as recordCollectionDispatchDuration } from "./http-CIoEAxMQ.js";
6
+ import { S as verifyCompactJsonLd, T as wrapContextLoaderForJsonLd, _ as hasSignature, b as isInvalidUrlTypeError, c as doesActorOwnKey, d as assertSafeJsonLd, g as getNormalizationContextLoader, h as detachSignature, i as verifyObject, l as getKeyOwner, n as hasProofLike, p as compactJsonLd, r as signObject, s as normalizeOutgoingActivityJsonLd, u as InvalidContextReferenceError, v as hasSignatureLike, x as signJsonLd, y as isClearlyMalformedContextReference } from "./proof-BPAFoo_l.js";
7
7
  import { n as getNodeInfo, t as nodeInfoToJson } from "./types-Dtyf8lVj.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BkAI6gNw.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CrfmDS-x.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
11
11
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
@@ -3999,8 +3999,14 @@ var TaskCodec = class TaskCodec {
3999
3999
  this.options = options;
4000
4000
  }
4001
4001
  /** Serializes `data`, encoding any vocabulary object as its JSON-LD. */
4002
- serialize = (data) => stringifyAsync(data, { Vocab: this.#stringifyVocab });
4003
- deserialize = async (raw) => await this.#revive(/* @__PURE__ */ new Map())(parse(raw, { Vocab: VocabHolder.from }));
4002
+ serialize = (data) => stringifyAsync(data, {
4003
+ Vocab: this.#stringifyVocab,
4004
+ FedifyTemporal: stringifyTemporal
4005
+ });
4006
+ deserialize = async (raw) => await this.#revive(/* @__PURE__ */ new Map())(parse(raw, {
4007
+ Vocab: VocabHolder.from,
4008
+ FedifyTemporal: parseTemporal
4009
+ }));
4004
4010
  /** Validates `data` against `schema`, then serializes it. */
4005
4011
  encode = async (schema, data) => this.serialize(await TaskCodec.validate(schema, data));
4006
4012
  /** Deserializes `raw`, then validates the result against `schema`. */
@@ -4066,6 +4072,23 @@ var TaskCodec = class TaskCodec {
4066
4072
  ];
4067
4073
  };
4068
4074
  const isVocab = (value) => value instanceof Object$1 || value instanceof Link;
4075
+ const temporalTypeNames = [
4076
+ "Duration",
4077
+ "Instant",
4078
+ "PlainDate",
4079
+ "PlainTime",
4080
+ "PlainDateTime",
4081
+ "PlainMonthDay",
4082
+ "PlainYearMonth",
4083
+ "ZonedDateTime"
4084
+ ];
4085
+ function stringifyTemporal(value) {
4086
+ for (const name of temporalTypeNames) if (value instanceof Temporal[name]) return [name, value.toString()];
4087
+ return false;
4088
+ }
4089
+ function parseTemporal([name, value]) {
4090
+ return Temporal[name].from(value);
4091
+ }
4069
4092
  const isPlainObject = (value) => value === null || typeof value !== "object" ? false : isObjectPrototype(globalThis.Object.getPrototypeOf(value));
4070
4093
  const isObjectPrototype = (proto) => proto === null || proto === globalThis.Object.prototype;
4071
4094
  const isInstanceOf = (cls) => (v) => v instanceof cls;
@@ -1,5 +1,5 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-ChsBNezF.mjs";
4
+ import { n as FederationImpl } from "./middleware-K7vtqCMw.mjs";
5
5
  export { FederationImpl };
@@ -1,28 +1,28 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno--os6x8xr.mjs";
5
- import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-CBYbeDaO.mjs";
4
+ import { n as version, t as name } from "./deno-DdOBy0fz.mjs";
5
+ import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-Crg4Vbos.mjs";
6
6
  import { t as formatAcceptSignature } from "./accept-CPVqki78.mjs";
7
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-Bgtfl2M_.mjs";
8
- import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-DnrWDuU5.mjs";
9
- import { t as getAuthenticatedDocumentLoader } from "./docloader-CvFxfQuF.mjs";
10
- import { n as kvCache } from "./kv-cache-DGAWgk8Y.mjs";
11
- import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-DeYOcSft.mjs";
12
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-DXN--VPl.mjs";
7
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-DGKxCXcy.mjs";
8
+ import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-Ce1WT2Nu.mjs";
9
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-DOEGT_GW.mjs";
10
+ import { n as kvCache } from "./kv-cache-BEbt3wK2.mjs";
11
+ import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-eXBQBH4G.mjs";
12
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-DE0t4u5s.mjs";
13
13
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-B5Ne7JoL.mjs";
14
- import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-0gTlNlB2.mjs";
14
+ import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-D25RA3TP.mjs";
15
15
  import { t as getNodeInfo } from "./client-CtxvmazV.mjs";
16
16
  import { t as nodeInfoToJson } from "./types-DE_LV1JB.mjs";
17
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-DBfVSKXE.mjs";
18
- import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-5fuOq20e.mjs";
17
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-ByC5h1Gg.mjs";
18
+ import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-JXN1im9k.mjs";
19
19
  import { t as CircuitBreaker } from "./circuit-breaker-C5NqoLBJ.mjs";
20
20
  import { t as buildCollectionSynchronizationHeader } from "./collection-CnnP1UAv.mjs";
21
21
  import { t as KvKeyCache } from "./keycache-0Jk78XmB.mjs";
22
22
  import { t as acceptsJsonLd } from "./negotiation-CCocWT_N.mjs";
23
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BK-FNcey.mjs";
23
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-CLmDbDJj.mjs";
24
24
  import { t as createExponentialBackoffPolicy } from "./retry-zX5xw5e0.mjs";
25
- import { t as TaskCodec } from "./codec-peqOdBaE.mjs";
25
+ import { t as TaskCodec } from "./codec-C6rTrpIp.mjs";
26
26
  import { getLogger, withContext } from "@logtape/logtape";
27
27
  import { RouterError } from "@fedify/uri-template";
28
28
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
package/dist/mod.cjs CHANGED
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("./rolldown-runtime-Dmm3t92W.cjs");
4
4
  const require_transformers = require("./transformers-BalCrSsr.cjs");
5
5
  require("./compat/mod.cjs");
6
- const require_http = require("./http-BpAW8jTQ.cjs");
7
- const require_federation = require("./federation-BJOTDQut.cjs");
8
- const require_proof = require("./proof-CvJ1aar0.cjs");
6
+ const require_http = require("./http-CFkGXp3u.cjs");
7
+ const require_federation = require("./federation-DHt4PpSt.cjs");
8
+ const require_proof = require("./proof-C2zsXJdb.cjs");
9
9
  const require_types = require("./types-RXm5YxpC.cjs");
10
- const require_kv_cache = require("./kv-cache-B_SLuy19.cjs");
10
+ const require_kv_cache = require("./kv-cache-BdFXi4lB.cjs");
11
11
  require("./nodeinfo/mod.cjs");
12
12
  require("./runtime/mod.cjs");
13
13
  require("./sig/mod.cjs");
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
5
5
  import "./compat/mod.js";
6
- import { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "./http-Dz0Z-6xu.js";
7
- import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-DnFpjPz7.js";
8
- import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "./proof-4SSJ2EAZ.js";
6
+ import { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "./http-CIoEAxMQ.js";
7
+ import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-B2fE8A-w.js";
8
+ import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "./proof-BPAFoo_l.js";
9
9
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-Dtyf8lVj.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BkAI6gNw.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CrfmDS-x.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -1,11 +1,11 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { r as createRequestContext } from "../context-Dt36KFEJ.mjs";
4
+ import { r as createRequestContext } from "../context-CbS35fLr.mjs";
5
5
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
7
7
  import "../std__assert-CxFT0MNt.mjs";
8
- import { _ as handleNodeInfo, o as createFederation, v as handleNodeInfoJrd } from "../middleware-ChsBNezF.mjs";
8
+ import { _ as handleNodeInfo, o as createFederation, v as handleNodeInfoJrd } from "../middleware-K7vtqCMw.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 "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno--os6x8xr.mjs";
5
- import "./key-Bgtfl2M_.mjs";
4
+ import { n as version, t as name } from "./deno-DdOBy0fz.mjs";
5
+ import "./key-DGKxCXcy.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,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { F as version, P as name, _ as measureSignatureKeyFetch, d as validateCryptoKey, f as getDurationMs, p as getFederationMetrics, s as fetchKey } from "./http-Dz0Z-6xu.js";
3
+ import { F as version, P as name, _ as measureSignatureKeyFetch, d as validateCryptoKey, f as getDurationMs, p as getFederationMetrics, s as fetchKey } from "./http-CIoEAxMQ.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, PUBLIC_COLLECTION, getTypeId, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
3
- const require_http = require("./http-BpAW8jTQ.cjs");
3
+ const require_http = require("./http-CFkGXp3u.cjs");
4
4
  let _logtape_logtape = require("@logtape/logtape");
5
5
  let _fedify_vocab = require("@fedify/vocab");
6
6
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,10 +1,10 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno--os6x8xr.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-CBYbeDaO.mjs";
6
- import { n as fetchKey, o as validateCryptoKey } from "./key-Bgtfl2M_.mjs";
7
- import { c as getNormalizationContextLoader } from "./ld-DeYOcSft.mjs";
4
+ import { n as version, t as name } from "./deno-DdOBy0fz.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-Crg4Vbos.mjs";
6
+ import { n as fetchKey, o as validateCryptoKey } from "./key-DGKxCXcy.mjs";
7
+ import { c as getNormalizationContextLoader } from "./ld-eXBQBH4G.mjs";
8
8
  import { n as preloadedOnlyDocumentLoader } from "./public-audience-Cc2YJ3ip.mjs";
9
9
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-B5Ne7JoL.mjs";
10
10
  import { getLogger } from "@logtape/logtape";
@@ -1,9 +1,9 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno--os6x8xr.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics } from "./metrics-CBYbeDaO.mjs";
6
- import { n as doubleKnock } from "./http-DnrWDuU5.mjs";
4
+ import { n as version, t as name } from "./deno-DdOBy0fz.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics } from "./metrics-Crg4Vbos.mjs";
6
+ import { n as doubleKnock } from "./http-Ce1WT2Nu.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
@@ -10,8 +10,8 @@ import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
10
10
  import "../std__assert-CxFT0MNt.mjs";
11
11
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
12
12
  import { t as assert } from "../assert-CebeUf0C.mjs";
13
- import { t as exportJwk } from "../key-Bgtfl2M_.mjs";
14
- 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, u as verifyRequestDetailed } from "../http-DnrWDuU5.mjs";
13
+ import { t as exportJwk } from "../key-DGKxCXcy.mjs";
14
+ 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, u as verifyRequestDetailed } from "../http-Ce1WT2Nu.mjs";
15
15
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
16
16
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
17
17
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
5
5
  import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
6
6
  import "../std__assert-CxFT0MNt.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
8
- import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-Bgtfl2M_.mjs";
8
+ import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-DGKxCXcy.mjs";
9
9
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
10
10
  import { CryptographicKey, Multikey } from "@fedify/vocab";
11
11
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -7,9 +7,9 @@ import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BApOTh1h.m
7
7
  import { t as assertThrows } from "../assert_throws-BJ5wuvR2.mjs";
8
8
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
9
9
  import { t as assert } from "../assert-CebeUf0C.mjs";
10
- import { i as generateCryptoKeyPair } from "../key-Bgtfl2M_.mjs";
10
+ import { i as generateCryptoKeyPair } from "../key-DGKxCXcy.mjs";
11
11
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
12
- import { 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-DeYOcSft.mjs";
12
+ import { 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-eXBQBH4G.mjs";
13
13
  import { CryptographicKey } from "@fedify/vocab";
14
14
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
15
15
  import { encodeBase64 } from "byte-encodings/base64";
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-BpAW8jTQ.cjs");
4
- const require_proof = require("../proof-CvJ1aar0.cjs");
3
+ const require_http = require("../http-CFkGXp3u.cjs");
4
+ const require_proof = require("../proof-C2zsXJdb.cjs");
5
5
  exports.attachSignature = require_proof.attachSignature;
6
6
  exports.createProof = require_proof.createProof;
7
7
  exports.createSignature = require_proof.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 { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "../http-Dz0Z-6xu.js";
4
- import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "../proof-4SSJ2EAZ.js";
3
+ import { A as formatAcceptSignature, M as parseAcceptSignature, N as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, j as fulfillAcceptSignature, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk } from "../http-CIoEAxMQ.js";
4
+ import { C as verifyJsonLd, a as verifyPortableObjectProof, c as doesActorOwnKey, f as attachSignature, h as detachSignature, i as verifyObject, l as getKeyOwner, m as createSignature, n as hasProofLike, o as verifyProof, r as signObject, t as createProof, v as hasSignatureLike, w as verifySignature, x as signJsonLd } from "../proof-BPAFoo_l.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, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
@@ -6,7 +6,7 @@ import { t as assertFalse } from "../assert_false-3pLLLsO4.mjs";
6
6
  import "../std__assert-CxFT0MNt.mjs";
7
7
  import { t as assert } from "../assert-CebeUf0C.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-DXN--VPl.mjs";
9
+ import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-DE0t4u5s.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
@@ -10,7 +10,7 @@ import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
10
10
  import { t as assert } from "../assert-CebeUf0C.mjs";
11
11
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
12
12
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-B5Ne7JoL.mjs";
13
- import { a as verifyPortableObjectProof, i as verifyObject, n as hasProofLike, o as verifyProof, r as signObject, t as createProof } from "../proof-0gTlNlB2.mjs";
13
+ import { a as verifyPortableObjectProof, i as verifyObject, n as hasProofLike, o as verifyProof, r as signObject, t as createProof } from "../proof-D25RA3TP.mjs";
14
14
  import { Create, DataIntegrityProof, Document, Multikey, Note, PUBLIC_COLLECTION, Place } from "@fedify/vocab";
15
15
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
16
16
  import { decodeMultibase, encodeMultibase, exportDidKey, exportMultibaseKey, formatIri, importMultibaseKey, parseIri } 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-DeYOcSft.mjs";
4
+ import { c as getNormalizationContextLoader } from "./ld-eXBQBH4G.mjs";
5
5
  import jsonld from "@fedify/vocab-runtime/jsonld";
6
6
  //#region src/federation/temporal.ts
7
7
  function isPlainObject(value) {
@@ -0,0 +1,2 @@
1
+ import { Temporal } from "temporal-polyfill";
2
+ import { URLPattern } from "urlpattern-polyfill";
@@ -0,0 +1,19 @@
1
+ import "temporal-polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { n as test } from "../dist-BQvArojP.mjs";
5
+ import { strictEqual } from "node:assert/strict";
6
+ //#region src/testing/context.test.ts
7
+ test("ignored nested test steps return false", async (t) => {
8
+ let executed = false;
9
+ strictEqual(await t.step({
10
+ name: "ignored nested test step",
11
+ ignore: true,
12
+ fn() {
13
+ executed = true;
14
+ }
15
+ }), false);
16
+ strictEqual(executed, false);
17
+ });
18
+ //#endregion
19
+ export {};
@@ -3622,6 +3622,32 @@ declare class MockQueue implements MessageQueue {
3622
3622
  //#region ../fixture/dist/mod.d.ts
3623
3623
  //#endregion
3624
3624
  //#region src/test.d.ts
3625
- declare const testDefinitions: Deno.TestDefinition[];
3625
+ /** A test callback that uses only APIs supported by every test runtime. */
3626
+ type TestFunction = (t: TestContext) => void | Promise<void>;
3627
+ /** A nested test step supported by Deno, Node.js, Bun, and Workers. */
3628
+ interface TestStepDefinition {
3629
+ name: string;
3630
+ ignore?: boolean;
3631
+ fn: TestFunction;
3632
+ }
3633
+ /** The common test context supported by every test runtime. */
3634
+ interface TestContext {
3635
+ readonly name: string;
3636
+ readonly origin: string;
3637
+ step(definition: TestStepDefinition): Promise<boolean>;
3638
+ step(name: string, fn: TestFunction): Promise<boolean>;
3639
+ step(fn: TestFunction): Promise<boolean>;
3640
+ }
3641
+ /** A test definition supported by every test runtime. */
3642
+ interface TestDefinition {
3643
+ name: string;
3644
+ ignore?: boolean;
3645
+ permissions?: Deno.TestDefinition["permissions"];
3646
+ sanitizeExit?: Deno.TestDefinition["sanitizeExit"];
3647
+ sanitizeOps?: Deno.TestDefinition["sanitizeOps"];
3648
+ sanitizeResources?: Deno.TestDefinition["sanitizeResources"];
3649
+ fn: TestFunction;
3650
+ }
3651
+ declare const testDefinitions: TestDefinition[];
3626
3652
  //#endregion
3627
3653
  export { type Envelope, MockQueue, type MockQueueOptions, baseOptions, createInboxContext, createOutboxContext, createRequestContext, envelopeSchema, makeSchema, numberSchema, stringSchema, testDefinitions };
@@ -1,6 +1,7 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { a as testDefinitions, n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-Dt36KFEJ.mjs";
5
- import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, r as envelopeSchema, t as MockQueue } from "../testing-BX0Nicyq.mjs";
4
+ import { r as testDefinitions } from "../dist-BQvArojP.mjs";
5
+ import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-CbS35fLr.mjs";
6
+ import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, r as envelopeSchema, t as MockQueue } from "../testing-D13ymFKy.mjs";
6
7
  export { MockQueue, baseOptions, createInboxContext, createOutboxContext, createRequestContext, envelopeSchema, makeSchema, numberSchema, stringSchema, testDefinitions };
@@ -1,7 +1,8 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { i as mockDocumentLoader } from "./context-Dt36KFEJ.mjs";
4
+ import { t as mockDocumentLoader } from "./dist-BQvArojP.mjs";
5
+ import "./context-CbS35fLr.mjs";
5
6
  import { t as MemoryKvStore } from "./kv-DCHkaJ9-.mjs";
6
7
  import { Note } from "@fedify/vocab";
7
8
  //#region src/testing/tasks.ts
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
6
6
  import "../std__assert-CxFT0MNt.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
8
- import { l as verifyRequest } from "../http-DnrWDuU5.mjs";
8
+ import { l as verifyRequest } from "../http-Ce1WT2Nu.mjs";
9
9
  import { i as rsaPrivateKey2 } from "../keys-DIJNHW-Y.mjs";
10
- import { t as getAuthenticatedDocumentLoader } from "../docloader-CvFxfQuF.mjs";
10
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-DOEGT_GW.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { UrlError } from "@fedify/vocab-runtime";
13
13
  //#region src/utils/docloader.test.ts
@@ -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-DGAWgk8Y.mjs";
4
+ import { n as kvCache, t as MockKvStore } from "../kv-cache-BEbt3wK2.mjs";
5
5
  import { deepStrictEqual, throws } from "node:assert";
6
6
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
7
7
  import { preloadedContexts } from "@fedify/vocab-runtime";
@@ -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-B_SLuy19.cjs");
3
+ const require_kv_cache = require("../kv-cache-BdFXi4lB.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-BkAI6gNw.js";
3
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-CrfmDS-x.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.0-dev.1881+17358f2e",
3
+ "version": "2.4.0-dev.1889+70cfc7ff",
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.0-dev.1881+17358f2e",
155
- "@fedify/vocab-runtime": "2.4.0-dev.1881+17358f2e",
156
- "@fedify/webfinger": "2.4.0-dev.1881+17358f2e",
157
- "@fedify/vocab": "2.4.0-dev.1881+17358f2e"
154
+ "@fedify/uri-template": "2.4.0-dev.1889+70cfc7ff",
155
+ "@fedify/vocab": "2.4.0-dev.1889+70cfc7ff",
156
+ "@fedify/webfinger": "2.4.0-dev.1889+70cfc7ff",
157
+ "@fedify/vocab-runtime": "2.4.0-dev.1889+70cfc7ff"
158
158
  },
159
159
  "devDependencies": {
160
160
  "@std/assert": "npm:@jsr/std__assert@^0.226.0",
@@ -167,7 +167,7 @@
167
167
  "typescript": "^6.0.0",
168
168
  "wrangler": "^4.17.0",
169
169
  "@fedify/fixture": "2.0.0",
170
- "@fedify/vocab-tools": "^2.4.0-dev.1881+17358f2e"
170
+ "@fedify/vocab-tools": "^2.4.0-dev.1889+70cfc7ff"
171
171
  },
172
172
  "scripts": {
173
173
  "build:self": "tsdown",