@fedify/fedify 2.4.0-dev.1873 → 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.
- package/dist/{builder-7ZvZ5ilC.mjs → builder-JXN1im9k.mjs} +2 -2
- package/dist/{codec-peqOdBaE.mjs → codec-C6rTrpIp.mjs} +26 -3
- package/dist/compat/outgoing-jsonld.test.mjs +1 -1
- package/dist/compat/public-audience.test.mjs +11 -2
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{context-Dt36KFEJ.mjs → context-CbS35fLr.mjs} +2 -60
- package/dist/{deno-CxSfl_a4.mjs → deno-DdOBy0fz.mjs} +1 -1
- package/dist/dist-BQvArojP.mjs +188 -0
- package/dist/{docloader-BA8lSYW0.mjs → docloader-DOEGT_GW.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +4 -4
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +9 -9
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/codec.test.mjs +1 -1
- package/dist/federation/tasks/enqueue.test.mjs +2 -2
- package/dist/federation/tasks/tasks.test.mjs +4 -4
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{federation-EWi4e3XY.cjs → federation-DHt4PpSt.cjs} +99 -76
- package/dist/{http-MQyitOvl.cjs → http-CFkGXp3u.cjs} +1 -1
- package/dist/{http-BQxL1lOO.js → http-CIoEAxMQ.js} +1 -1
- package/dist/{http-DlSUSFxF.mjs → http-Ce1WT2Nu.mjs} +3 -3
- package/dist/{key-6O7-nI4D.mjs → key-DGKxCXcy.mjs} +2 -2
- package/dist/{kv-cache-DqiCo6_V.mjs → kv-cache-BEbt3wK2.mjs} +1 -1
- package/dist/{kv-cache-AN6qSmg2.cjs → kv-cache-BdFXi4lB.cjs} +1 -1
- package/dist/{kv-cache-BaLaRgP0.js → kv-cache-CrfmDS-x.js} +1 -1
- package/dist/{ld-CwHaXyMi.mjs → ld-eXBQBH4G.mjs} +3 -3
- package/dist/{metrics-DpjCXFvC.mjs → metrics-Crg4Vbos.mjs} +1 -1
- package/dist/{middleware-Bcx74jmq.js → middleware-B2fE8A-w.js} +28 -5
- package/dist/{middleware-Cy6-svwn.mjs → middleware-DCuzEI3t.mjs} +1 -1
- package/dist/{middleware-C8wXU20O.mjs → middleware-K7vtqCMw.mjs} +14 -14
- package/dist/mod.cjs +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/{outgoing-jsonld-BQSHRLhg.mjs → outgoing-jsonld-B5Ne7JoL.mjs} +1 -1
- package/dist/{owner-CDshspna.mjs → owner-DE0t4u5s.mjs} +2 -2
- package/dist/{proof-D7aD6Hut.js → proof-BPAFoo_l.js} +3 -2
- package/dist/{proof-CwrJYody.cjs → proof-C2zsXJdb.cjs} +3 -2
- package/dist/{proof-C1uX5GYQ.mjs → proof-D25RA3TP.mjs} +6 -6
- package/dist/{public-audience--9hx7IGx.mjs → public-audience-Cc2YJ3ip.mjs} +2 -1
- package/dist/{send-BrW0OtvG.mjs → send-ByC5h1Gg.mjs} +3 -3
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +2 -2
- package/dist/{temporal-5ClDg1Qq.mjs → temporal-CLmDbDJj.mjs} +1 -1
- package/dist/testing/context.test.d.mts +2 -0
- package/dist/testing/context.test.mjs +19 -0
- package/dist/testing/mod.d.mts +27 -1
- package/dist/testing/mod.mjs +3 -2
- package/dist/{testing-BX0Nicyq.mjs → testing-D13ymFKy.mjs} +2 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- 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-
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-
|
|
6
|
-
import { n as fetchKey, o as validateCryptoKey } from "./key-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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, {
|
|
4003
|
-
|
|
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,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-
|
|
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-
|
|
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-
|
|
8
|
-
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-
|
|
9
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
10
|
-
import { n as kvCache } from "./kv-cache-
|
|
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-
|
|
12
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
13
|
-
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-
|
|
14
|
-
import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-
|
|
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
|
+
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-B5Ne7JoL.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-
|
|
18
|
-
import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-
|
|
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-
|
|
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-
|
|
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-
|
|
7
|
-
const require_federation = require("./federation-
|
|
8
|
-
const require_proof = require("./proof-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience
|
|
4
|
+
import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience-Cc2YJ3ip.mjs";
|
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
|
6
6
|
import { preloadedContexts } from "@fedify/vocab-runtime";
|
|
7
7
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
@@ -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-
|
|
5
|
-
import "./key-
|
|
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-
|
|
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";
|
|
@@ -774,6 +774,7 @@ function hasPublicCurieInAddressing(value, parentKey, depth = 0) {
|
|
|
774
774
|
if (typeof value !== "object" || value == null) return false;
|
|
775
775
|
const record = value;
|
|
776
776
|
for (const key of Object.keys(record)) {
|
|
777
|
+
if (record.type === "Follow" && key === "object" && (record[key] === "as:Public" || record[key] === "Public")) return true;
|
|
777
778
|
if (key === "@context") continue;
|
|
778
779
|
if (hasPublicCurieInAddressing(record[key], key, depth + 1)) return true;
|
|
779
780
|
}
|
|
@@ -796,7 +797,7 @@ function rewritePublicAudience(value, parentKey, depth = 0) {
|
|
|
796
797
|
let changed = false;
|
|
797
798
|
const normalized = Object.create(null);
|
|
798
799
|
for (const key of Object.keys(record)) {
|
|
799
|
-
const rewritten = key === "@context" ? record[key] : rewritePublicAudience(record[key], key, depth + 1);
|
|
800
|
+
const rewritten = key === "@context" ? record[key] : record.type === "Follow" && key === "object" && (record[key] === "as:Public" || record[key] === "Public") ? PUBLIC_COLLECTION.href : rewritePublicAudience(record[key], key, depth + 1);
|
|
800
801
|
if (rewritten !== record[key]) changed = true;
|
|
801
802
|
normalized[key] = rewritten;
|
|
802
803
|
}
|
|
@@ -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-
|
|
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");
|
|
@@ -776,6 +776,7 @@ function hasPublicCurieInAddressing(value, parentKey, depth = 0) {
|
|
|
776
776
|
if (typeof value !== "object" || value == null) return false;
|
|
777
777
|
const record = value;
|
|
778
778
|
for (const key of Object.keys(record)) {
|
|
779
|
+
if (record.type === "Follow" && key === "object" && (record[key] === "as:Public" || record[key] === "Public")) return true;
|
|
779
780
|
if (key === "@context") continue;
|
|
780
781
|
if (hasPublicCurieInAddressing(record[key], key, depth + 1)) return true;
|
|
781
782
|
}
|
|
@@ -798,7 +799,7 @@ function rewritePublicAudience(value, parentKey, depth = 0) {
|
|
|
798
799
|
let changed = false;
|
|
799
800
|
const normalized = Object.create(null);
|
|
800
801
|
for (const key of Object.keys(record)) {
|
|
801
|
-
const rewritten = key === "@context" ? record[key] : rewritePublicAudience(record[key], key, depth + 1);
|
|
802
|
+
const rewritten = key === "@context" ? record[key] : record.type === "Follow" && key === "object" && (record[key] === "as:Public" || record[key] === "Public") ? _fedify_vocab.PUBLIC_COLLECTION.href : rewritePublicAudience(record[key], key, depth + 1);
|
|
802
803
|
if (rewritten !== record[key]) changed = true;
|
|
803
804
|
normalized[key] = rewritten;
|
|
804
805
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
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-
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-
|
|
6
|
-
import { n as fetchKey, o as validateCryptoKey } from "./key-
|
|
7
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
8
|
-
import { n as preloadedOnlyDocumentLoader } from "./public-audience
|
|
9
|
-
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-
|
|
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
|
+
import { n as preloadedOnlyDocumentLoader } from "./public-audience-Cc2YJ3ip.mjs";
|
|
9
|
+
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-B5Ne7JoL.mjs";
|
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
|
11
11
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
12
12
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -47,6 +47,7 @@ function hasPublicCurieInAddressing(value, parentKey, depth = 0) {
|
|
|
47
47
|
if (typeof value !== "object" || value == null) return false;
|
|
48
48
|
const record = value;
|
|
49
49
|
for (const key of Object.keys(record)) {
|
|
50
|
+
if (record.type === "Follow" && key === "object" && (record[key] === "as:Public" || record[key] === "Public")) return true;
|
|
50
51
|
if (key === "@context") continue;
|
|
51
52
|
if (hasPublicCurieInAddressing(record[key], key, depth + 1)) return true;
|
|
52
53
|
}
|
|
@@ -69,7 +70,7 @@ function rewritePublicAudience(value, parentKey, depth = 0) {
|
|
|
69
70
|
let changed = false;
|
|
70
71
|
const normalized = Object.create(null);
|
|
71
72
|
for (const key of Object.keys(record)) {
|
|
72
|
-
const rewritten = key === "@context" ? record[key] : rewritePublicAudience(record[key], key, depth + 1);
|
|
73
|
+
const rewritten = key === "@context" ? record[key] : record.type === "Follow" && key === "object" && (record[key] === "as:Public" || record[key] === "Public") ? PUBLIC_COLLECTION.href : rewritePublicAudience(record[key], key, depth + 1);
|
|
73
74
|
if (rewritten !== record[key]) changed = true;
|
|
74
75
|
normalized[key] = rewritten;
|
|
75
76
|
}
|
|
@@ -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-
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-
|
|
6
|
-
import { n as doubleKnock } from "./http-
|
|
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";
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -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-
|
|
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-
|
|
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";
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -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-
|
|
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";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
4
|
-
const require_proof = require("../proof-
|
|
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-
|
|
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-
|
|
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 };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -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-
|
|
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
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -9,8 +9,8 @@ import "../std__assert-CxFT0MNt.mjs";
|
|
|
9
9
|
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
|
-
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-
|
|
13
|
-
import { a as verifyPortableObjectProof, i as verifyObject, n as hasProofLike, o as verifyProof, r as signObject, t as createProof } from "../proof-
|
|
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-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-
|
|
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,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 {};
|
package/dist/testing/mod.d.mts
CHANGED
|
@@ -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
|
-
|
|
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 };
|
package/dist/testing/mod.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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 {
|
|
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-
|
|
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-
|
|
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-
|
|
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";
|
package/dist/utils/mod.cjs
CHANGED
|
@@ -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-
|
|
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-
|
|
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.
|
|
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.
|
|
155
|
-
"@fedify/vocab
|
|
156
|
-
"@fedify/
|
|
157
|
-
"@fedify/
|
|
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.
|
|
170
|
+
"@fedify/vocab-tools": "^2.4.0-dev.1889+70cfc7ff"
|
|
171
171
|
},
|
|
172
172
|
"scripts": {
|
|
173
173
|
"build:self": "tsdown",
|