@fedify/fedify 2.4.0-dev.2259 → 2.4.0-dev.2260
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-CBNa1Uw2.mjs → builder-BK8HfSUm.mjs} +2 -2
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-CMPv4UK0.mjs → compound-proof-D--HeIbV.mjs} +23 -3
- package/dist/{deno-C8XaXmPB.mjs → deno-DVP7DGJC.mjs} +1 -1
- package/dist/{docloader-CpdFLwAg.mjs → docloader-Dv1JJl37.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox-report.test.mjs +5 -5
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +7 -7
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +54 -10
- package/dist/federation/portable-actor.test.mjs +3 -3
- package/dist/federation/portable-chain.test.mjs +3 -3
- package/dist/federation/portable-collection.test.mjs +66 -4
- package/dist/federation/portable-delivery.test.mjs +2 -2
- package/dist/federation/portable-gateway-keys.test.mjs +4 -4
- package/dist/federation/portable-inbox.test.mjs +4 -4
- package/dist/federation/portable-parse-uri.test.mjs +1 -1
- package/dist/federation/portable-route-activity.test.mjs +2 -2
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-D6giSGUT.cjs → federation-Bo5z395X.cjs} +31 -7
- package/dist/{http-Cki-npuA.cjs → http-BIhWdDf5.cjs} +1 -1
- package/dist/{http-OMtKlbx1.js → http-DRMu1C2T.js} +1 -1
- package/dist/{http-BqSbUEiQ.mjs → http-DvpuyDJB.mjs} +4 -4
- package/dist/{key-DecAtABm.mjs → key-B7N8mNoY.mjs} +2 -2
- package/dist/{kv-cache-CWWlMv-s.mjs → kv-cache-D0kA0rml.mjs} +1 -1
- package/dist/{kv-cache-J0v3UbUn.js → kv-cache-DZLpqhW9.js} +1 -1
- package/dist/{kv-cache-D73yVcE5.cjs → kv-cache-mF8Zmjix.cjs} +1 -1
- package/dist/{ld-UsN-TIPh.mjs → ld-BDMNyM2M.mjs} +3 -3
- package/dist/{metrics-DWCn4VXX.mjs → metrics-BbBj-VZN.mjs} +1 -1
- package/dist/{middleware-DHn2q0L1.mjs → middleware-CE1X7-UM.mjs} +1 -1
- package/dist/{middleware-CkjwiEBd.mjs → middleware-DAA7wDdS.mjs} +22 -18
- package/dist/{middleware-BqzfIlUO.js → middleware-DfUWPAa-.js} +31 -7
- package/dist/mod.cjs +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-CEBn81LD.mjs → owner-CzUycuhd.mjs} +3 -3
- package/dist/{portable-collection-ZkUNjtb7.js → portable-collection-COcJxZg_.js} +1 -1
- package/dist/{portable-collection-qFSYw4TG.mjs → portable-collection-CTcNJiAa.mjs} +2 -2
- package/dist/{portable-collection-DqTUBKY7.cjs → portable-collection-cPMffcHJ.cjs} +1 -1
- package/dist/{portable-key-LlMkP-vz.mjs → portable-key-B4QN3OzR.mjs} +1 -1
- package/dist/{proof-BHRf_jMG.mjs → proof-nce4pf5S.mjs} +4 -4
- package/dist/{send-DjG8DDU_.mjs → send-4Idpe2z0.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.mjs +2 -2
- 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/mitra-receive-interop.test.mjs +4 -4
- package/dist/sig/mitra-send-interop.test.mjs +3 -3
- 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/portable-collection.test.mjs +1 -1
- package/dist/sig/portable-interop.test.mjs +3 -3
- package/dist/sig/portable-key.test.mjs +6 -6
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/sig/tootik-request-interop.test.mjs +4 -4
- package/dist/sig/tootik-send-interop.test.mjs +3 -3
- package/dist/sig/verification.test.mjs +3 -3
- package/dist/{temporal-BRFH_dte.mjs → temporal-BbjmPHYn.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -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
|
@@ -2,7 +2,7 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { i as getPortableDid, l as isPortableId, n as getCanonicalPortableId } from "./portable-key-id-Ca30-hOa.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
+
import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
|
|
6
6
|
import { t as ActivityListenerSet } from "./activity-listener-C-BSbKI7.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { Router, RouterError, assertPath } from "@fedify/uri-template";
|
|
@@ -91,7 +91,7 @@ var FederationBuilderImpl = class {
|
|
|
91
91
|
* specified.
|
|
92
92
|
*/
|
|
93
93
|
async build(options) {
|
|
94
|
-
const { FederationImpl } = await import("./middleware-
|
|
94
|
+
const { FederationImpl } = await import("./middleware-CE1X7-UM.mjs");
|
|
95
95
|
const f = new FederationImpl(options);
|
|
96
96
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
97
97
|
f.router = this.router.clone();
|
|
@@ -5,7 +5,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
|
-
import { O as actorDehydrator, k as autoIdAssigner, n as FederationImpl } from "../middleware-
|
|
8
|
+
import { O as actorDehydrator, k as autoIdAssigner, n as FederationImpl } from "../middleware-DAA7wDdS.mjs";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { a as getRawCanonicalPortableId, l as isPortableId, n as getCanonicalPortableId } from "./portable-key-id-Ca30-hOa.mjs";
|
|
5
5
|
import { a as verificationObservation, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
|
|
6
6
|
import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
|
|
7
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
8
|
-
import { l as verifyPortableObjectProofPolicy, n as classifyFep2277CoreType, o as verifyMapLocalProof } from "./proof-
|
|
7
|
+
import { c as getNormalizationContextLoader } from "./ld-BDMNyM2M.mjs";
|
|
8
|
+
import { l as verifyPortableObjectProofPolicy, n as classifyFep2277CoreType, o as verifyMapLocalProof } from "./proof-nce4pf5S.mjs";
|
|
9
9
|
import { parseIri, preloadedContexts } from "@fedify/vocab-runtime";
|
|
10
10
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
11
11
|
//#region src/sig/compound-proof.ts
|
|
@@ -442,6 +442,26 @@ function findUnsupportedCompoundProofShape(json) {
|
|
|
442
442
|
return findInJsonMaps(json, (map, path) => Object.hasOwn(map, "proof") && !isJsonMap(map.proof) ? childPath(path, "proof") : void 0) ?? null;
|
|
443
443
|
}
|
|
444
444
|
/**
|
|
445
|
+
* Finds the first embedded map that carries a direct `proof` but not its own
|
|
446
|
+
* `@context`. The map-local compound-proof profile verifies each proof-bearing
|
|
447
|
+
* map as a self-contained document, so the inbox rejects such a map with
|
|
448
|
+
* `missingContext` whatever its proof. An object embedded with its captured
|
|
449
|
+
* signed representation, e.g., by {@link signObject}, always keeps its own
|
|
450
|
+
* `@context`; one rebuilt under its parent's context, e.g., an object parsed
|
|
451
|
+
* from a received document, never does, and its proof no longer covers what
|
|
452
|
+
* it has become anyway.
|
|
453
|
+
*
|
|
454
|
+
* The input must be a finite, already-materialized JSON tree; see
|
|
455
|
+
* {@link containsCompoundPortableObject}.
|
|
456
|
+
*
|
|
457
|
+
* @returns The RFC 6901 JSON Pointer to the map, or `null` if every embedded
|
|
458
|
+
* proof-bearing map has its own `@context`.
|
|
459
|
+
* @internal
|
|
460
|
+
*/
|
|
461
|
+
function findEmbeddedProofWithoutContext(json) {
|
|
462
|
+
return findInJsonMaps(json, (map, path) => path !== "" && Object.hasOwn(map, "proof") && !Object.hasOwn(map, "@context") ? path : void 0) ?? null;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
445
465
|
* Discovers direct literal proof-bearing maps in an immutable JSON snapshot.
|
|
446
466
|
*
|
|
447
467
|
* Discovery is bounded and atomic. Unsupported proof shapes, non-JSON input,
|
|
@@ -966,4 +986,4 @@ async function checkServedPortableMap({ map, contexts }, options) {
|
|
|
966
986
|
return UNSECURED_CORE_TYPES.has(type) ? null : "missingProof";
|
|
967
987
|
}
|
|
968
988
|
//#endregion
|
|
969
|
-
export {
|
|
989
|
+
export { inspectCompoundPortableObjectApplicability as a, verifyServedPortableObjects as c, findUnsupportedCompoundProofShape as i, discoverCompoundProofDocuments as n, verifyCompoundPortableObjectProofs as o, findEmbeddedProofWithoutContext as r, verifyCompoundProofDocuments as s, containsCompoundPortableObject as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { c as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { c as validateCryptoKey } from "./key-B7N8mNoY.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-DvpuyDJB.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, resolveDocumentLoaderTimeout, validatePublicUrl, withDocumentLoaderTimeout } from "@fedify/vocab-runtime";
|
|
8
8
|
import { curry } from "es-toolkit";
|
|
@@ -7,7 +7,7 @@ import { t as assertExists } from "../assert_exists-cffSpJ7X.mjs";
|
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
10
|
-
import { r as createFederationBuilder } from "../builder-
|
|
10
|
+
import { r as createFederationBuilder } from "../builder-BK8HfSUm.mjs";
|
|
11
11
|
import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
|
|
12
12
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
13
13
|
import { test } from "@fedify/fixture";
|
|
@@ -6,11 +6,11 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { n as exportJwk } from "../key-
|
|
9
|
+
import { n as exportJwk } from "../key-B7N8mNoY.mjs";
|
|
10
10
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
11
|
-
import { a as signObject, d as verifyProof } from "../proof-
|
|
11
|
+
import { a as signObject, d as verifyProof } from "../proof-nce4pf5S.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { n as FederationImpl } from "../middleware-
|
|
13
|
+
import { n as FederationImpl } from "../middleware-DAA7wDdS.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note } from "@fedify/vocab";
|
|
15
15
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
16
16
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -5,10 +5,10 @@ import { r as createRequestContext, t as createInboxContext } from "../context-8
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-
|
|
9
|
-
import { l as signRequest } from "../http-
|
|
8
|
+
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-BDMNyM2M.mjs";
|
|
9
|
+
import { l as signRequest } from "../http-DvpuyDJB.mjs";
|
|
10
10
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { f as handleInbox, o as createFederation } from "../middleware-
|
|
11
|
+
import { f as handleInbox, o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
12
12
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
13
13
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
14
14
|
import { Create, CryptographicKey, Multikey, Person, Update } from "@fedify/vocab";
|
|
@@ -10,12 +10,12 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as parseAcceptSignature } from "../accept-CPVqki78.mjs";
|
|
13
|
-
import { o as generateCryptoKeyPair } from "../key-
|
|
14
|
-
import { a as compactJsonLd, p as signJsonLd } from "../ld-
|
|
15
|
-
import { a as signObject } from "../proof-
|
|
16
|
-
import { l as signRequest } from "../http-
|
|
13
|
+
import { o as generateCryptoKeyPair } from "../key-B7N8mNoY.mjs";
|
|
14
|
+
import { a as compactJsonLd, p as signJsonLd } from "../ld-BDMNyM2M.mjs";
|
|
15
|
+
import { a as signObject } from "../proof-nce4pf5S.mjs";
|
|
16
|
+
import { l as signRequest } from "../http-DvpuyDJB.mjs";
|
|
17
17
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
18
|
-
import { d as handleCustomCollection, f as handleInbox, g as respondWithObjectIfAcceptable, h as respondWithObject, l as handleActor, m as handleOutbox, o as createFederation, p as handleObject, u as handleCollection } from "../middleware-
|
|
18
|
+
import { d as handleCustomCollection, f as handleInbox, g as respondWithObjectIfAcceptable, h as respondWithObject, l as handleActor, m as handleOutbox, o as createFederation, p as handleObject, u as handleCollection } from "../middleware-DAA7wDdS.mjs";
|
|
19
19
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
20
20
|
import { Activity, Create, CryptographicKey, Multikey, Note, Person, Tombstone } from "@fedify/vocab";
|
|
21
21
|
import { FetchError, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -10,8 +10,8 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { o as createFederation, x as parseHashlinkGatewayRequest } from "../middleware-
|
|
14
|
-
import { r as createFederationBuilder } from "../builder-
|
|
13
|
+
import { o as createFederation, x as parseHashlinkGatewayRequest } from "../middleware-DAA7wDdS.mjs";
|
|
14
|
+
import { r as createFederationBuilder } from "../builder-BK8HfSUm.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { Note } from "@fedify/vocab";
|
|
17
17
|
import { computeDigestMultibase, encodeMultibase, exportDidKey } from "@fedify/vocab-runtime";
|
|
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
|
-
import { a as signObject } from "../proof-
|
|
7
|
+
import { a as signObject } from "../proof-nce4pf5S.mjs";
|
|
8
8
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
+
import { o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
10
10
|
import { Create, Follow, Person } from "@fedify/vocab";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
@@ -2,12 +2,12 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
-
import { p as signJsonLd } from "../ld-
|
|
6
|
-
import { a as signObject } from "../proof-
|
|
7
|
-
import { l as signRequest } from "../http-
|
|
5
|
+
import { p as signJsonLd } from "../ld-BDMNyM2M.mjs";
|
|
6
|
+
import { a as signObject } from "../proof-nce4pf5S.mjs";
|
|
7
|
+
import { l as signRequest } from "../http-DvpuyDJB.mjs";
|
|
8
8
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
10
|
-
import { r as createFederationBuilder } from "../builder-
|
|
9
|
+
import { o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
10
|
+
import { r as createFederationBuilder } from "../builder-BK8HfSUm.mjs";
|
|
11
11
|
import { Create, Person } from "@fedify/vocab";
|
|
12
12
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
13
13
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
7
|
-
import { _ as recordKeyLookup, 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, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-
|
|
7
|
+
import { _ as recordKeyLookup, 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, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-BbBj-VZN.mjs";
|
|
8
8
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
9
9
|
import { createTestMeterProvider, test } from "@fedify/fixture";
|
|
10
10
|
import { DataPointType, MeterProvider, MetricReader } from "@opentelemetry/sdk-metrics";
|
|
@@ -16,14 +16,14 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
16
16
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
17
17
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
18
18
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
19
|
-
import { g as recordInboxActivity } from "../metrics-
|
|
20
|
-
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-
|
|
21
|
-
import { a as signObject, s as verifyObject } from "../proof-
|
|
22
|
-
import { f as verifyRequest, l as signRequest } from "../http-
|
|
19
|
+
import { g as recordInboxActivity } from "../metrics-BbBj-VZN.mjs";
|
|
20
|
+
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-BDMNyM2M.mjs";
|
|
21
|
+
import { a as signObject, s as verifyObject } from "../proof-nce4pf5S.mjs";
|
|
22
|
+
import { f as verifyRequest, l as signRequest } from "../http-DvpuyDJB.mjs";
|
|
23
23
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
24
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
25
|
-
import { T as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-
|
|
26
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
24
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-Dv1JJl37.mjs";
|
|
25
|
+
import { T as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-DAA7wDdS.mjs";
|
|
26
|
+
import { t as doesActorOwnKey } from "../owner-CzUycuhd.mjs";
|
|
27
27
|
import { t as CircuitBreaker } from "../circuit-breaker-XJ53md4S.mjs";
|
|
28
28
|
import { t as TaskCodec } from "../codec-C6rTrpIp.mjs";
|
|
29
29
|
import { t as markCircuitBreakerLegacySweepDone } from "../circuit-breaker-test-utils-DW6YC_Pe.mjs";
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_federation = require("../federation-
|
|
3
|
+
const require_federation = require("../federation-Bo5z395X.cjs");
|
|
4
4
|
exports.CircuitBreaker = require_federation.CircuitBreaker;
|
|
5
5
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
6
6
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
package/dist/federation/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "../middleware-
|
|
3
|
+
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "../middleware-DfUWPAa-.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Router as Router$1, RouterError as RouterError$1, assertPath, isPath } from "@fedify/uri-template";
|
|
6
6
|
import { isEqual } from "es-toolkit";
|
|
@@ -7,14 +7,14 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import { n as exportJwk } from "../key-
|
|
11
|
-
import { s as detachSignature } from "../ld-
|
|
12
|
-
import { a as signObject } from "../proof-
|
|
10
|
+
import { n as exportJwk } from "../key-B7N8mNoY.mjs";
|
|
11
|
+
import { s as detachSignature } from "../ld-BDMNyM2M.mjs";
|
|
12
|
+
import { a as signObject } from "../proof-nce4pf5S.mjs";
|
|
13
13
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { C as getEmbeddedFirstGateway, S as getCompactRootId, c as assertPortableActorActivity, n as FederationImpl, o as createFederation, w as warnCompatibleIdsInJson } from "../middleware-
|
|
15
|
-
import {
|
|
14
|
+
import { C as getEmbeddedFirstGateway, S as getCompactRootId, c as assertPortableActorActivity, n as FederationImpl, o as createFederation, w as warnCompatibleIdsInJson } from "../middleware-DAA7wDdS.mjs";
|
|
15
|
+
import { o as verifyCompoundPortableObjectProofs } from "../compound-proof-D--HeIbV.mjs";
|
|
16
16
|
import { configure, reset } from "@logtape/logtape";
|
|
17
|
-
import { Announce, Create, Note, Person } from "@fedify/vocab";
|
|
17
|
+
import { Accept, Announce, Create, Follow, Note, Person } from "@fedify/vocab";
|
|
18
18
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
19
19
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
20
20
|
//#region src/federation/outgoing-proof.test.ts
|
|
@@ -298,6 +298,42 @@ test("a proof set on an embedded map is not delivered either", async () => {
|
|
|
298
298
|
const { bodies } = await capture(() => assertRejects(() => ctx.sendActivity(rsaKey, recipient, httpCreate(child)), TypeError, "JSON Pointer \"/object/proof\""));
|
|
299
299
|
assertEquals(bodies.length, 0);
|
|
300
300
|
});
|
|
301
|
+
test("a received signed object rebuilt inside a portable activity is not delivered", async () => {
|
|
302
|
+
const followerKey = await didKey();
|
|
303
|
+
const signedFollow = await signObject(new Follow({
|
|
304
|
+
id: new URL("https://example.com/follows/1"),
|
|
305
|
+
actor: new URL("https://example.com/users/bob"),
|
|
306
|
+
object: parseIri("ap+ef61://did:key:z6Mkabc/actor")
|
|
307
|
+
}), followerKey.privateKey, new URL("https://example.com/users/bob#key"), {
|
|
308
|
+
...options,
|
|
309
|
+
created
|
|
310
|
+
});
|
|
311
|
+
const follow = await Follow.fromJsonLd(await signedFollow.toJsonLd({
|
|
312
|
+
format: "compact",
|
|
313
|
+
...options
|
|
314
|
+
}), options);
|
|
315
|
+
const owner = await didKey();
|
|
316
|
+
const accept = (object) => new Accept({
|
|
317
|
+
id: parseIri(`ap+ef61://${owner.did}/accepts/${crypto.randomUUID()}`),
|
|
318
|
+
actor: parseIri(`ap+ef61://${owner.did}/actor`),
|
|
319
|
+
object
|
|
320
|
+
});
|
|
321
|
+
const unsigned = accept(follow);
|
|
322
|
+
const presigned = await signObject(accept(follow), owner.privateKey, owner.keyId, {
|
|
323
|
+
...options,
|
|
324
|
+
created
|
|
325
|
+
});
|
|
326
|
+
const cases = [[unsigned, [rsaKey, sender(owner)]], [presigned, [rsaKey]]];
|
|
327
|
+
for (const [activity, keys] of cases) {
|
|
328
|
+
assertEquals((await capture(() => assertRejects(() => createTestFederation().createContext(new URL("https://example.com/")).sendActivity(keys, recipient, activity), TypeError, "JSON Pointer \"/object\""))).bodies.length, 0);
|
|
329
|
+
const fanout = createQueue();
|
|
330
|
+
await assertRejects(() => createTestFederation(fanout.queue).createContext(new URL("https://example.com/")).sendActivity(keys, recipient, activity, { fanout: "force" }), TypeError, "JSON Pointer \"/object\"");
|
|
331
|
+
assertEquals(fanout.queued.length, 0);
|
|
332
|
+
}
|
|
333
|
+
const { bodies } = await capture(() => createTestFederation().createContext(new URL("https://example.com/")).sendActivity([rsaKey, sender(owner)], recipient, accept(follow.id)));
|
|
334
|
+
assertEquals(bodies.length, 1);
|
|
335
|
+
await assertCompoundVerifies(bodies[0]);
|
|
336
|
+
});
|
|
301
337
|
test("forced fanout selects the DID-matching key before enqueueing", async () => {
|
|
302
338
|
const owner = await didKey();
|
|
303
339
|
const childOwner = await didKey();
|
|
@@ -327,9 +363,9 @@ test("forced fanout selects the DID-matching key before enqueueing", async () =>
|
|
|
327
363
|
});
|
|
328
364
|
test("the fanout worker selects one key for an unsigned portable activity", async () => {
|
|
329
365
|
const owner = await didKey();
|
|
330
|
-
const
|
|
366
|
+
const child = await signedChild(await didKey());
|
|
331
367
|
const federation = createTestFederation();
|
|
332
|
-
const message = {
|
|
368
|
+
const message = async (activity) => ({
|
|
333
369
|
type: "fanout",
|
|
334
370
|
id: crypto.randomUUID(),
|
|
335
371
|
baseUrl: "https://example.com",
|
|
@@ -352,10 +388,18 @@ test("the fanout worker selects one key for an unsigned portable activity", asyn
|
|
|
352
388
|
activityId: activity.id.href,
|
|
353
389
|
activityType: "https://www.w3.org/ns/activitystreams#Create",
|
|
354
390
|
traceContext: {}
|
|
355
|
-
};
|
|
356
|
-
const
|
|
391
|
+
});
|
|
392
|
+
const byId = new Create({
|
|
393
|
+
id: parseIri(`ap+ef61://${owner.did}/activities/${crypto.randomUUID()}`),
|
|
394
|
+
actor: parseIri(`ap+ef61://${owner.did}/actor`),
|
|
395
|
+
object: child.id
|
|
396
|
+
});
|
|
397
|
+
const { bodies } = await capture(async () => federation.processQueuedTask(void 0, await message(byId)));
|
|
357
398
|
assertEquals(bodies.length, 1);
|
|
358
399
|
assertEquals(proofOf(bodies[0]).verificationMethod, owner.keyId.href);
|
|
400
|
+
await assertCompoundVerifies(bodies[0]);
|
|
401
|
+
const embedded = await message(portableCreate(owner, child));
|
|
402
|
+
assertEquals((await capture(() => assertRejects(() => federation.processQueuedTask(void 0, embedded), TypeError, "JSON Pointer \"/object\""))).bodies.length, 0);
|
|
359
403
|
});
|
|
360
404
|
test("actor key pairs follow the compound-proof key selection too", async () => {
|
|
361
405
|
const dispatched = [];
|
|
@@ -8,10 +8,10 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
9
9
|
import "../std__assert-DvMDRPes.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import { a as signObject, c as verifyPortableObjectProof } from "../proof-
|
|
12
|
-
import { f as verifyRequest, l as signRequest } from "../http-
|
|
11
|
+
import { a as signObject, c as verifyPortableObjectProof } from "../proof-nce4pf5S.mjs";
|
|
12
|
+
import { f as verifyRequest, l as signRequest } from "../http-DvpuyDJB.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-
|
|
14
|
+
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { configure, reset } from "@logtape/logtape";
|
|
17
17
|
import { Note, Person, Tombstone, lookupObject } from "@fedify/vocab";
|
|
@@ -7,10 +7,10 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
7
7
|
import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import { n as exportJwk } from "../key-
|
|
11
|
-
import { c as verifyPortableObjectProof, s as verifyObject } from "../proof-
|
|
10
|
+
import { n as exportJwk } from "../key-B7N8mNoY.mjs";
|
|
11
|
+
import { c as verifyPortableObjectProof, s as verifyObject } from "../proof-nce4pf5S.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { n as FederationImpl } from "../middleware-
|
|
13
|
+
import { n as FederationImpl } from "../middleware-DAA7wDdS.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note, OrderedCollection, Person, traverseCollection } from "@fedify/vocab";
|
|
15
15
|
import { FetchError, encodeMultibase, exportDidKey } from "@fedify/vocab-runtime";
|
|
16
16
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -7,11 +7,11 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
10
|
-
import { a as signObject } from "../proof-
|
|
10
|
+
import { a as signObject, c as verifyPortableObjectProof } from "../proof-nce4pf5S.mjs";
|
|
11
11
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
12
|
-
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-
|
|
13
|
-
import { t as verifyPortableObject } from "../portable-collection-
|
|
14
|
-
import {
|
|
12
|
+
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
13
|
+
import { t as verifyPortableObject } from "../portable-collection-CTcNJiAa.mjs";
|
|
14
|
+
import { c as verifyServedPortableObjects } from "../compound-proof-D--HeIbV.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { configure, reset } from "@logtape/logtape";
|
|
17
17
|
import { Create, Note, Object as Object$1, OrderedCollection, PUBLIC_COLLECTION, Person, Tombstone, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
@@ -528,6 +528,68 @@ test("Fedify traverses portable collections that Fedify serves", async () => {
|
|
|
528
528
|
assert(actor2 instanceof Person);
|
|
529
529
|
assertEquals(await actor2.getOutbox(evilOptions), null);
|
|
530
530
|
});
|
|
531
|
+
test("Fedify traverses portable collections through their owners' gateways", async () => {
|
|
532
|
+
const federation = createTestFederation();
|
|
533
|
+
const requests = [];
|
|
534
|
+
const documentLoader = async (url) => {
|
|
535
|
+
requests.push(url);
|
|
536
|
+
if (!/^https?:/.test(url)) throw new Error(`Not found: ${url}`);
|
|
537
|
+
const target = new URL(url);
|
|
538
|
+
const response = await federation.fetch(new Request(new URL(target.pathname + target.search, ORIGIN), { headers: { Accept: ACCEPT } }), { contextData: void 0 });
|
|
539
|
+
if (!response.ok) throw new FetchError(url, `HTTP ${response.status}`, response);
|
|
540
|
+
return {
|
|
541
|
+
contextUrl: null,
|
|
542
|
+
documentUrl: url,
|
|
543
|
+
document: await response.json()
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
const options = {
|
|
547
|
+
documentLoader,
|
|
548
|
+
contextLoader: mockDocumentLoader,
|
|
549
|
+
verifyPortableObject
|
|
550
|
+
};
|
|
551
|
+
const actor = await lookupObject(portableId("/users/alice"), {
|
|
552
|
+
...options,
|
|
553
|
+
gateways: [ORIGIN]
|
|
554
|
+
});
|
|
555
|
+
assert(actor instanceof Person);
|
|
556
|
+
const outbox = await actor.getOutbox(options);
|
|
557
|
+
assert(outbox instanceof OrderedCollection);
|
|
558
|
+
assertEquals((await Array.fromAsync(traverseCollection(outbox, options))).length, PAGES.length * NOTES_PER_PAGE);
|
|
559
|
+
assert(requests.every((url) => url.startsWith(`${ORIGIN}/`)));
|
|
560
|
+
});
|
|
561
|
+
test("Fedify accepts empty portable collections that Fedify serves", async () => {
|
|
562
|
+
const federation = createTestFederation();
|
|
563
|
+
const [response, json] = await fetchJson(federation, gatewayUrl("/users/alice/inbox"));
|
|
564
|
+
assertEquals(response.status, 200);
|
|
565
|
+
assertEquals(json?.totalItems, 0);
|
|
566
|
+
assertEquals(await verifyPortableObjectProof(json, { contextLoader: mockDocumentLoader }), {
|
|
567
|
+
verified: false,
|
|
568
|
+
reason: { type: "unsecuredCollection" }
|
|
569
|
+
});
|
|
570
|
+
const documentLoader = async (url) => {
|
|
571
|
+
const target = new URL(url);
|
|
572
|
+
const response = await federation.fetch(new Request(new URL(target.pathname + target.search, ORIGIN), { headers: { Accept: ACCEPT } }), { contextData: void 0 });
|
|
573
|
+
if (!response.ok) throw new FetchError(url, `HTTP ${response.status}`, response);
|
|
574
|
+
return {
|
|
575
|
+
contextUrl: null,
|
|
576
|
+
documentUrl: url,
|
|
577
|
+
document: await response.json()
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
const options = {
|
|
581
|
+
documentLoader,
|
|
582
|
+
contextLoader: mockDocumentLoader,
|
|
583
|
+
gateways: [ORIGIN],
|
|
584
|
+
verifyPortableObject
|
|
585
|
+
};
|
|
586
|
+
const actor = await lookupObject(portableId("/users/alice"), options);
|
|
587
|
+
assert(actor instanceof Person);
|
|
588
|
+
const inbox = await actor.getInbox(options);
|
|
589
|
+
assert(inbox instanceof OrderedCollection);
|
|
590
|
+
assertEquals(inbox.totalItems, 0);
|
|
591
|
+
assertEquals(await Array.fromAsync(traverseCollection(inbox, options)), []);
|
|
592
|
+
});
|
|
531
593
|
test("verifyServedPortableObjects() classifies unsigned maps under their effective contexts", async () => {
|
|
532
594
|
const AS = "https://www.w3.org/ns/activitystreams";
|
|
533
595
|
const collection = (member) => ({
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { i as rsaPrivateKey2, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
7
|
-
import { n as FederationImpl, r as InboxContextImpl } from "../middleware-
|
|
8
|
-
import { n as extractInboxes, t as SendActivityError } from "../send-
|
|
7
|
+
import { n as FederationImpl, r as InboxContextImpl } from "../middleware-DAA7wDdS.mjs";
|
|
8
|
+
import { n as extractInboxes, t as SendActivityError } from "../send-4Idpe2z0.mjs";
|
|
9
9
|
import { Create, Endpoints, Note, Person } from "@fedify/vocab";
|
|
10
10
|
import { parseIri } from "@fedify/vocab-runtime";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -8,11 +8,11 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
10
10
|
import { r as getVerifiedKeyOwnerEvidence } from "../key-owner-evidence-APB6NpSk.mjs";
|
|
11
|
-
import { p as signJsonLd } from "../ld-
|
|
12
|
-
import { f as verifyRequest, l as signRequest, p as verifyRequestDetailed } from "../http-
|
|
11
|
+
import { p as signJsonLd } from "../ld-BDMNyM2M.mjs";
|
|
12
|
+
import { f as verifyRequest, l as signRequest, p as verifyRequestDetailed } from "../http-DvpuyDJB.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { f as handleInbox, n as FederationImpl, o as createFederation } from "../middleware-
|
|
15
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
14
|
+
import { f as handleInbox, n as FederationImpl, o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
15
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-CzUycuhd.mjs";
|
|
16
16
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
17
17
|
import { t as KvKeyCache } from "../keycache-Da8A8mZa.mjs";
|
|
18
18
|
import { Create, CryptographicKey, Person } from "@fedify/vocab";
|
|
@@ -8,11 +8,11 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
9
9
|
import "../std__assert-DvMDRPes.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import { p as signJsonLd } from "../ld-
|
|
12
|
-
import { a as signObject } from "../proof-
|
|
13
|
-
import { l as signRequest, p as verifyRequestDetailed } from "../http-
|
|
11
|
+
import { p as signJsonLd } from "../ld-BDMNyM2M.mjs";
|
|
12
|
+
import { a as signObject } from "../proof-nce4pf5S.mjs";
|
|
13
|
+
import { l as signRequest, p as verifyRequestDetailed } from "../http-DvpuyDJB.mjs";
|
|
14
14
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
15
|
-
import { _ as coversDelivery, o as createFederation, v as forwardPortableInboxActivity, y as resolvePortableInboxForwardingOptions } from "../middleware-
|
|
15
|
+
import { _ as coversDelivery, o as createFederation, v as forwardPortableInboxActivity, y as resolvePortableInboxForwardingOptions } from "../middleware-DAA7wDdS.mjs";
|
|
16
16
|
import { Create, CryptographicKey, Follow, Note, Person, Tombstone } from "@fedify/vocab";
|
|
17
17
|
import { exportDidKey, formatIri, parseIri } from "@fedify/vocab-runtime";
|
|
18
18
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -7,7 +7,7 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
9
|
import { r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
-
import { o as createFederation } from "../middleware-
|
|
10
|
+
import { o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
11
11
|
import { Note, Object as Object$1, Person } from "@fedify/vocab";
|
|
12
12
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
13
13
|
import { test } from "@fedify/fixture";
|
|
@@ -6,9 +6,9 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
6
6
|
import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { a as signObject } from "../proof-
|
|
9
|
+
import { a as signObject } from "../proof-nce4pf5S.mjs";
|
|
10
10
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { o as createFederation } from "../middleware-
|
|
11
|
+
import { o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
12
12
|
import { Create, Note } from "@fedify/vocab";
|
|
13
13
|
import { exportDidKey, formatIri, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
|
|
14
14
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -8,10 +8,10 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
9
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import { a as signObject, c as verifyPortableObjectProof } from "../proof-
|
|
12
|
-
import { l as signRequest } from "../http-
|
|
11
|
+
import { a as signObject, c as verifyPortableObjectProof } from "../proof-nce4pf5S.mjs";
|
|
12
|
+
import { l as signRequest } from "../http-DvpuyDJB.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-
|
|
14
|
+
import { b as PORTABLE_OBJECT_CONTENT_TYPE, o as createFederation } from "../middleware-DAA7wDdS.mjs";
|
|
15
15
|
import { configure, reset } from "@logtape/logtape";
|
|
16
16
|
import { Collection, Create, Note, Object as Object$1, PUBLIC_COLLECTION, Person, Tombstone, lookupObject } from "@fedify/vocab";
|
|
17
17
|
import { exportDidKey, formatIri, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
|
|
@@ -10,10 +10,10 @@ import { t as assertNotEquals } from "../assert_not_equals-CpPK2t89.mjs";
|
|
|
10
10
|
import "../std__assert-DvMDRPes.mjs";
|
|
11
11
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
12
12
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
13
|
-
import { f as verifyRequest } from "../http-
|
|
13
|
+
import { f as verifyRequest } from "../http-DvpuyDJB.mjs";
|
|
14
14
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
15
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
16
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-
|
|
15
|
+
import { t as doesActorOwnKey } from "../owner-CzUycuhd.mjs";
|
|
16
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-4Idpe2z0.mjs";
|
|
17
17
|
import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
|
|
18
18
|
import { FetchError, UrlError } from "@fedify/vocab-runtime";
|
|
19
19
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as MemoryKvStore } from "../../kv-DCHkaJ9-.mjs";
|
|
5
5
|
import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, t as MockQueue } from "../../tasks-IG3pHfvZ.mjs";
|
|
6
6
|
import "../../testing-t8xDeJZ5.mjs";
|
|
7
|
-
import { o as createFederation } from "../../middleware-
|
|
7
|
+
import { o as createFederation } from "../../middleware-DAA7wDdS.mjs";
|
|
8
8
|
import { n as ParallelMessageQueue } from "../../mq-Dm1Wmtm-.mjs";
|
|
9
9
|
import { configure, reset } from "@logtape/logtape";
|
|
10
10
|
import { delay } from "es-toolkit";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as MemoryKvStore } from "../../kv-DCHkaJ9-.mjs";
|
|
5
5
|
import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, t as MockQueue } from "../../tasks-IG3pHfvZ.mjs";
|
|
6
6
|
import "../../testing-t8xDeJZ5.mjs";
|
|
7
|
-
import { o as createFederation } from "../../middleware-
|
|
8
|
-
import { r as createFederationBuilder } from "../../builder-
|
|
7
|
+
import { o as createFederation } from "../../middleware-DAA7wDdS.mjs";
|
|
8
|
+
import { r as createFederationBuilder } from "../../builder-BK8HfSUm.mjs";
|
|
9
9
|
import { t as TaskCodec } from "../../codec-C6rTrpIp.mjs";
|
|
10
10
|
import { t as InProcessMessageQueue } from "../../mq-Dm1Wmtm-.mjs";
|
|
11
11
|
import { W3CTraceContextPropagator } from "@opentelemetry/core";
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
6
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
7
|
-
import { t as hasMalformedKnownTemporalLiteral } from "../temporal-
|
|
7
|
+
import { t as hasMalformedKnownTemporalLiteral } from "../temporal-BbjmPHYn.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 () => {
|