@fedify/fedify 2.4.0-dev.1988 → 2.4.0-dev.1995
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-Cts78G9N.mjs → builder-D0DxgOV5.mjs} +2 -2
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/compound-proof-CJnWc6c-.mjs +495 -0
- package/dist/{deno-BgMEefEr.mjs → deno-CABhzCb_.mjs} +1 -1
- package/dist/{docloader-DEYs99FZ.mjs → docloader-BbGSL0Xq.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler-compound-proof.test.d.mts +2 -0
- package/dist/federation/handler-compound-proof.test.mjs +152 -0
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/idempotency.test.mjs +2 -2
- 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/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-DzPUG_AP.cjs → federation-DCEHQk4G.cjs} +542 -43
- package/dist/{http-CgwqtxAy.js → http-9WyuldYh.js} +2 -2
- package/dist/{http-Z3anvCd-.cjs → http-CRFns-UE.cjs} +2 -2
- package/dist/{http-CtidZS_t.mjs → http-D9urSO2D.mjs} +3 -3
- package/dist/{key-Cwbg5ggV.mjs → key-Ccs8cnd7.mjs} +2 -2
- package/dist/{kv-cache-BM2-w-Wq.cjs → kv-cache-DXT9vmIg.cjs} +1 -1
- package/dist/{kv-cache-CykuL0ya.js → kv-cache-DtmXhPXG.js} +1 -1
- package/dist/{kv-cache-DHiR8yTf.mjs → kv-cache-lKyFn_Dn.mjs} +1 -1
- package/dist/{ld-CzhdWyTt.mjs → ld-qup__MAW.mjs} +3 -3
- package/dist/map-local-context-conflict-DOYEEJ3u.mjs +204 -0
- package/dist/map-local-create-note-B0SeXJms.mjs +214 -0
- package/dist/{metrics-CrqsHP0l.mjs → metrics-CISXCvB1.mjs} +1 -1
- package/dist/{middleware-DCpiAsZi.mjs → middleware-CzvJvPHK.mjs} +52 -20
- package/dist/{middleware-CZpYxSKD.mjs → middleware-DkrU2WhY.mjs} +1 -1
- package/dist/{middleware-CeCj5caM.js → middleware-DsfWajaD.js} +511 -12
- package/dist/mod.cjs +19 -19
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{proof-CUghqhAf.js → owner-BIPEZGiU.js} +1239 -1139
- package/dist/{owner-BqVXJLW8.mjs → owner-CRoq8Spb.mjs} +2 -2
- package/dist/{proof-DHu5zI0Z.cjs → owner-CVA7L9MA.cjs} +1252 -1140
- package/dist/{proof-DL8Iid3a.mjs → proof-BDxNVZ3E.mjs} +176 -76
- package/dist/{send-6jS4xFsX.mjs → send-BzM5GLyn.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.d.mts +2 -0
- package/dist/sig/compound-proof-discovery.test.mjs +331 -0
- package/dist/sig/compound-proof-verification.test.d.mts +2 -0
- package/dist/sig/compound-proof-verification.test.mjs +465 -0
- package/dist/sig/compound-proof.test.d.mts +2 -0
- package/dist/sig/compound-proof.test.mjs +324 -0
- 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 +17 -17
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +1 -1
- package/dist/{temporal-DcyzeytP.mjs → temporal-Dv6Qv-8k.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
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import "temporal-polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { r as createRequestContext, t as createInboxContext } from "../context-CbS35fLr.mjs";
|
|
5
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
|
+
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
7
|
+
import "../std__assert-CxFT0MNt.mjs";
|
|
8
|
+
import { s as signRequest } from "../http-D9urSO2D.mjs";
|
|
9
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3 } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
+
import { d as handleInbox, o as createFederation } from "../middleware-CzvJvPHK.mjs";
|
|
11
|
+
import { p as signJsonLd } from "../ld-qup__MAW.mjs";
|
|
12
|
+
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
13
|
+
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
14
|
+
import { Create } from "@fedify/vocab";
|
|
15
|
+
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
|
+
import { encodeMultibase } from "@fedify/vocab-runtime";
|
|
17
|
+
import serialize from "json-canon";
|
|
18
|
+
//#region src/federation/handler-compound-proof.test.ts
|
|
19
|
+
async function sha256(value) {
|
|
20
|
+
return new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value)));
|
|
21
|
+
}
|
|
22
|
+
async function secureDocument(unsecuredDocument, privateJwk, verificationMethod) {
|
|
23
|
+
const proofConfiguration = {
|
|
24
|
+
"@context": unsecuredDocument["@context"],
|
|
25
|
+
type: "DataIntegrityProof",
|
|
26
|
+
cryptosuite: "eddsa-jcs-2022",
|
|
27
|
+
verificationMethod,
|
|
28
|
+
proofPurpose: "assertionMethod",
|
|
29
|
+
created: "2023-02-24T23:36:38Z"
|
|
30
|
+
};
|
|
31
|
+
const proofHash = await sha256(serialize(proofConfiguration));
|
|
32
|
+
const documentHash = await sha256(serialize(unsecuredDocument));
|
|
33
|
+
const input = /* @__PURE__ */ new Uint8Array(64);
|
|
34
|
+
input.set(proofHash);
|
|
35
|
+
input.set(documentHash, proofHash.length);
|
|
36
|
+
const privateKey = await crypto.subtle.importKey("jwk", privateJwk, "Ed25519", false, ["sign"]);
|
|
37
|
+
const signature = new Uint8Array(await crypto.subtle.sign("Ed25519", privateKey, input));
|
|
38
|
+
return {
|
|
39
|
+
...unsecuredDocument,
|
|
40
|
+
proof: {
|
|
41
|
+
...proofConfiguration,
|
|
42
|
+
proofValue: new TextDecoder().decode(encodeMultibase("base58btc", signature))
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function requestFor(body) {
|
|
47
|
+
return new Request("https://example.com/inbox", {
|
|
48
|
+
method: "POST",
|
|
49
|
+
body: JSON.stringify(body)
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
async function handle(requestOrBody, dispatched) {
|
|
53
|
+
const request = requestOrBody instanceof Request ? requestOrBody : requestFor(requestOrBody);
|
|
54
|
+
const context = createRequestContext({
|
|
55
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
56
|
+
request,
|
|
57
|
+
url: new URL(request.url),
|
|
58
|
+
data: void 0,
|
|
59
|
+
documentLoader: mockDocumentLoader,
|
|
60
|
+
contextLoader: mockDocumentLoader
|
|
61
|
+
});
|
|
62
|
+
const inboxListeners = new ActivityListenerSet();
|
|
63
|
+
inboxListeners.add(Create, () => {
|
|
64
|
+
if (dispatched != null) dispatched.count++;
|
|
65
|
+
});
|
|
66
|
+
return await handleInbox(request, {
|
|
67
|
+
recipient: null,
|
|
68
|
+
context,
|
|
69
|
+
inboxContextFactory() {
|
|
70
|
+
return createInboxContext({
|
|
71
|
+
...context,
|
|
72
|
+
clone: void 0
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
kv: new MemoryKvStore(),
|
|
76
|
+
kvPrefixes: {
|
|
77
|
+
activityIdempotence: ["_fedify", "activityIdempotence"],
|
|
78
|
+
publicKey: ["_fedify", "publicKey"],
|
|
79
|
+
acceptSignatureNonce: ["_fedify", "acceptSignatureNonce"]
|
|
80
|
+
},
|
|
81
|
+
actorDispatcher() {
|
|
82
|
+
return null;
|
|
83
|
+
},
|
|
84
|
+
inboxListeners,
|
|
85
|
+
onNotFound() {
|
|
86
|
+
return new Response("Not found", { status: 404 });
|
|
87
|
+
},
|
|
88
|
+
signatureTimeWindow: { minutes: 5 },
|
|
89
|
+
skipSignatureVerification: false
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
test("handleInbox() enforces portable compound proofs atomically", async () => {
|
|
93
|
+
const valid = structuredClone(map_local_create_note_default.documents.finalSecuredCompound);
|
|
94
|
+
assertEquals((await handle(valid)).status, 202);
|
|
95
|
+
const unsignedInner = structuredClone(map_local_create_note_default.documents.outerUnsecuredDocument);
|
|
96
|
+
delete unsignedInner.object.proof;
|
|
97
|
+
const rejected = await handle(await secureDocument(unsignedInner, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod));
|
|
98
|
+
assertEquals([rejected.status, await rejected.text()], [401, "Failed to verify compound portable Object Integrity Proofs."]);
|
|
99
|
+
const tamperedInner = structuredClone(map_local_create_note_default.documents.outerUnsecuredDocument);
|
|
100
|
+
tamperedInner.object.content = "Tampered";
|
|
101
|
+
assertEquals((await handle(await secureDocument(tamperedInner, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod))).status, 401);
|
|
102
|
+
const changedAfterSigning = structuredClone(valid);
|
|
103
|
+
changedAfterSigning.signature = {
|
|
104
|
+
type: "RsaSignature2017",
|
|
105
|
+
creator: "https://example.com/keys/1",
|
|
106
|
+
created: "2023-02-24T23:36:38Z",
|
|
107
|
+
signatureValue: "not-a-signature"
|
|
108
|
+
};
|
|
109
|
+
assertEquals((await handle(changedAfterSigning)).status, 401);
|
|
110
|
+
});
|
|
111
|
+
test("handleInbox() enforces compounds after alternate outer auth", async () => {
|
|
112
|
+
const createBody = (object) => ({
|
|
113
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"],
|
|
114
|
+
id: "https://example.com/activities/compound",
|
|
115
|
+
type: "Create",
|
|
116
|
+
actor: rsaPublicKey3.ownerId.href,
|
|
117
|
+
object
|
|
118
|
+
});
|
|
119
|
+
const validInner = structuredClone(map_local_create_note_default.documents.securedInner);
|
|
120
|
+
const unsignedInner = structuredClone(validInner);
|
|
121
|
+
delete unsignedInner.proof;
|
|
122
|
+
for (const authentication of ["http", "ld"]) {
|
|
123
|
+
const sign = async (body) => {
|
|
124
|
+
if (authentication === "http") return await signRequest(requestFor(body), rsaPrivateKey3, rsaPublicKey3.id);
|
|
125
|
+
return requestFor(await signJsonLd(body, rsaPrivateKey3, rsaPublicKey3.id, { contextLoader: mockDocumentLoader }));
|
|
126
|
+
};
|
|
127
|
+
const acceptedDispatch = { count: 0 };
|
|
128
|
+
assertEquals([(await handle(await sign(createBody(structuredClone(validInner))), acceptedDispatch)).status, acceptedDispatch.count], [202, 1]);
|
|
129
|
+
const rejectedDispatch = { count: 0 };
|
|
130
|
+
assertEquals([(await handle(await sign(createBody(structuredClone(unsignedInner))), rejectedDispatch)).status, rejectedDispatch.count], [401, 0]);
|
|
131
|
+
}
|
|
132
|
+
const proofSetInner = structuredClone(validInner);
|
|
133
|
+
proofSetInner.proof = [proofSetInner.proof];
|
|
134
|
+
const unsupportedDispatch = { count: 0 };
|
|
135
|
+
assertEquals([(await handle(await signRequest(requestFor(createBody(proofSetInner)), rsaPrivateKey3, rsaPublicKey3.id), unsupportedDispatch)).status, unsupportedDispatch.count], [401, 0]);
|
|
136
|
+
});
|
|
137
|
+
test("handleInbox() preserves ordinary top-level proof behavior", async () => {
|
|
138
|
+
assertEquals((await handle(await secureDocument({
|
|
139
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"],
|
|
140
|
+
id: "https://example.com/activities/ordinary",
|
|
141
|
+
type: "Create",
|
|
142
|
+
actor: map_local_create_note_default.keys.outer.controller,
|
|
143
|
+
object: {
|
|
144
|
+
id: "https://example.com/notes/ordinary",
|
|
145
|
+
type: "Note",
|
|
146
|
+
attributedTo: map_local_create_note_default.keys.outer.controller,
|
|
147
|
+
content: "An ordinary note"
|
|
148
|
+
}
|
|
149
|
+
}, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod))).status, 202);
|
|
150
|
+
});
|
|
151
|
+
//#endregion
|
|
152
|
+
export {};
|
|
@@ -10,12 +10,12 @@ import "../std__assert-CxFT0MNt.mjs";
|
|
|
10
10
|
import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
|
|
11
11
|
import { t as assert } from "../assert-CebeUf0C.mjs";
|
|
12
12
|
import { r as parseAcceptSignature } from "../accept-CPVqki78.mjs";
|
|
13
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
14
|
-
import { s as signRequest } from "../http-
|
|
13
|
+
import { a as generateCryptoKeyPair } from "../key-Ccs8cnd7.mjs";
|
|
14
|
+
import { s as signRequest } from "../http-D9urSO2D.mjs";
|
|
15
15
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
16
|
-
import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-
|
|
17
|
-
import { a as compactJsonLd, p as signJsonLd } from "../ld-
|
|
18
|
-
import { r as signObject } from "../proof-
|
|
16
|
+
import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-CzvJvPHK.mjs";
|
|
17
|
+
import { a as compactJsonLd, p as signJsonLd } from "../ld-qup__MAW.mjs";
|
|
18
|
+
import { r as signObject } from "../proof-BDxNVZ3E.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 { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -5,8 +5,8 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
6
6
|
import "../std__assert-CxFT0MNt.mjs";
|
|
7
7
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
8
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
-
import { r as signObject } from "../proof-
|
|
8
|
+
import { o as createFederation } from "../middleware-CzvJvPHK.mjs";
|
|
9
|
+
import { r as signObject } from "../proof-BDxNVZ3E.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
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
5
5
|
import "../std__assert-CxFT0MNt.mjs";
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-wFbSPn1O.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-CISXCvB1.mjs";
|
|
8
8
|
import { createTestMeterProvider, test } from "@fedify/fixture";
|
|
9
9
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
10
10
|
import { DataPointType, MeterProvider, MetricReader } from "@opentelemetry/sdk-metrics";
|
|
@@ -16,14 +16,14 @@ import "../std__assert-CxFT0MNt.mjs";
|
|
|
16
16
|
import { t as assertRejects } from "../assert_rejects-wFbSPn1O.mjs";
|
|
17
17
|
import { t as assertStrictEquals } from "../assert_strict_equals-Bpjl4Psw.mjs";
|
|
18
18
|
import { t as assert } from "../assert-CebeUf0C.mjs";
|
|
19
|
-
import { g as recordInboxActivity } from "../metrics-
|
|
20
|
-
import { l as verifyRequest, s as signRequest } from "../http-
|
|
19
|
+
import { g as recordInboxActivity } from "../metrics-CISXCvB1.mjs";
|
|
20
|
+
import { l as verifyRequest, s as signRequest } from "../http-D9urSO2D.mjs";
|
|
21
21
|
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";
|
|
22
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
23
|
-
import { g as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-
|
|
24
|
-
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-
|
|
25
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
26
|
-
import {
|
|
22
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-BbGSL0Xq.mjs";
|
|
23
|
+
import { g as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-CzvJvPHK.mjs";
|
|
24
|
+
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-qup__MAW.mjs";
|
|
25
|
+
import { t as doesActorOwnKey } from "../owner-CRoq8Spb.mjs";
|
|
26
|
+
import { a as verifyObject, r as signObject } from "../proof-BDxNVZ3E.mjs";
|
|
27
27
|
import { t as CircuitBreaker } from "../circuit-breaker-C5NqoLBJ.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-DCEHQk4G.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 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-
|
|
3
|
+
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-DsfWajaD.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";
|
|
@@ -10,10 +10,10 @@ import { t as assertNotEquals } from "../assert_not_equals-BN7yDMWe.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 { l as verifyRequest } from "../http-
|
|
13
|
+
import { l as verifyRequest } from "../http-D9urSO2D.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-CRoq8Spb.mjs";
|
|
16
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-BzM5GLyn.mjs";
|
|
17
17
|
import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
|
|
18
18
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
19
19
|
import { FetchError, UrlError } from "@fedify/vocab-runtime";
|
|
@@ -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-dbCShlCb.mjs";
|
|
6
6
|
import "../../testing-hbky2gMN.mjs";
|
|
7
|
-
import { o as createFederation } from "../../middleware-
|
|
7
|
+
import { o as createFederation } from "../../middleware-CzvJvPHK.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-dbCShlCb.mjs";
|
|
6
6
|
import "../../testing-hbky2gMN.mjs";
|
|
7
|
-
import { o as createFederation } from "../../middleware-
|
|
8
|
-
import { r as createFederationBuilder } from "../../builder-
|
|
7
|
+
import { o as createFederation } from "../../middleware-CzvJvPHK.mjs";
|
|
8
|
+
import { r as createFederationBuilder } from "../../builder-D0DxgOV5.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-3pLLLsO4.mjs";
|
|
5
5
|
import "../std__assert-CxFT0MNt.mjs";
|
|
6
6
|
import { t as assert } from "../assert-CebeUf0C.mjs";
|
|
7
|
-
import { t as hasMalformedKnownTemporalLiteral } from "../temporal-
|
|
7
|
+
import { t as hasMalformedKnownTemporalLiteral } from "../temporal-Dv6Qv-8k.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 () => {
|
|
@@ -6,7 +6,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-CBlRfA-_.mjs";
|
|
7
7
|
import { t as assertNotEquals } from "../assert_not_equals-BN7yDMWe.mjs";
|
|
8
8
|
import "../std__assert-CxFT0MNt.mjs";
|
|
9
|
-
import { o as createFederation, s as handleWebFinger } from "../middleware-
|
|
9
|
+
import { o as createFederation, s as handleWebFinger } from "../middleware-CzvJvPHK.mjs";
|
|
10
10
|
import { Image, Link, Person, Tombstone } from "@fedify/vocab";
|
|
11
11
|
import { createTestMeterProvider, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/federation/webfinger.test.ts
|