@fedify/fedify 2.4.0-dev.2073 → 2.4.0-dev.2077
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-CVHpPAjK.mjs → builder-i3jxVe9m.mjs} +2 -2
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-B5Skp-vE.mjs → compound-proof-Cayy-ECj.mjs} +1 -1
- package/dist/{deno-LYTbBhYV.mjs → deno-Djkzd-G_.mjs} +1 -1
- package/dist/{docloader-C0SWQylk.mjs → docloader-dA0RswUV.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 +137 -10
- 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/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 +5 -5
- package/dist/federation/portable-gateway-keys.test.mjs +3 -3
- package/dist/federation/portable-inbox.test.mjs +4 -4
- 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-B1aeTKKN.cjs → federation-CFd0Jhhv.cjs} +14 -13
- package/dist/{http-C7qHlv-b.mjs → http-CCJ97Jql.mjs} +4 -4
- package/dist/{http-DGk8XI38.cjs → http-Dvy_IwRa.cjs} +1 -1
- package/dist/{http-vfTpzGEq.js → http-aqh3yFdM.js} +1 -1
- package/dist/{key-BYXnTGro.mjs → key-IxTTC8Yf.mjs} +2 -2
- package/dist/{kv-cache-DvqkKNIj.cjs → kv-cache-BP69NV0P.cjs} +1 -1
- package/dist/{kv-cache-DEH5jyND.mjs → kv-cache-Bwwbh-xR.mjs} +1 -1
- package/dist/{kv-cache-DCJuwdnB.js → kv-cache-Y6SDRSX6.js} +1 -1
- package/dist/{ld-DT3e2hOv.mjs → ld-l0B9nREb.mjs} +3 -3
- package/dist/{metrics-DvlvYpq_.mjs → metrics-D1p6hv4z.mjs} +1 -1
- package/dist/{middleware-BJcez_E3.mjs → middleware-BDjCUHMS.mjs} +1 -1
- package/dist/{middleware-CpyCNOW_.mjs → middleware-BMgzqBtr.mjs} +24 -23
- package/dist/{middleware-CCbyUF4c.js → middleware-SSfryVzY.js} +14 -13
- package/dist/mod.cjs +5 -5
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-DCIH7Iq0.cjs → owner-BpOxL5PG.cjs} +1 -1
- package/dist/{owner-CDsVeZI7.mjs → owner-DGbYmXqU.mjs} +3 -3
- package/dist/{owner-DfGz0cXm.js → owner-jH1z_YfD.js} +1 -1
- package/dist/{portable-key-DCyKGCQd.mjs → portable-key-CCwJGSsU.mjs} +2 -2
- package/dist/{proof-CxsVG6vM.mjs → proof-CVL7JnZd.mjs} +4 -4
- package/dist/{send-BZJ7NsVV.mjs → send-Ejy1jOz9.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/mod.cjs +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +2 -2
- package/dist/sig/portable-key.test.mjs +3 -3
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/{sig-Cs9_ecdh.js → sig-Dpy1B1Ad.js} +2 -2
- package/dist/{sig-C6TnADze.cjs → sig-xoqy3ATq.cjs} +2 -2
- package/dist/{temporal-CLzSfIOV.mjs → temporal-DNJ1cNpr.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 +7 -7
|
@@ -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-Djkzd-G_.mjs";
|
|
5
5
|
import { t as ActivityListenerSet } from "./activity-listener-C-BSbKI7.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { Router, RouterError, assertPath } from "@fedify/uri-template";
|
|
@@ -86,7 +86,7 @@ var FederationBuilderImpl = class {
|
|
|
86
86
|
* specified.
|
|
87
87
|
*/
|
|
88
88
|
async build(options) {
|
|
89
|
-
const { FederationImpl } = await import("./middleware-
|
|
89
|
+
const { FederationImpl } = await import("./middleware-BDjCUHMS.mjs");
|
|
90
90
|
const f = new FederationImpl(options);
|
|
91
91
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
92
92
|
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 { C as actorDehydrator, n as FederationImpl, w as autoIdAssigner } from "../middleware-
|
|
8
|
+
import { C as actorDehydrator, n as FederationImpl, w as autoIdAssigner } from "../middleware-BMgzqBtr.mjs";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { i as verifyMapLocalProof, s as verifyPortableObjectProofPolicy } from "./proof-
|
|
4
|
+
import { i as verifyMapLocalProof, s as verifyPortableObjectProofPolicy } from "./proof-CVL7JnZd.mjs";
|
|
5
5
|
//#region src/sig/compound-proof.ts
|
|
6
6
|
const textEncoder = new TextEncoder();
|
|
7
7
|
const PORTABLE_OBJECT_ID_PATTERN = /^ap(?:\+ef61)?:\/\//i;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { s as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { s as validateCryptoKey } from "./key-IxTTC8Yf.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-CCJ97Jql.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { curry } from "es-toolkit";
|
|
8
8
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -6,7 +6,7 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
6
6
|
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
|
-
import { r as createFederationBuilder } from "../builder-
|
|
9
|
+
import { r as createFederationBuilder } from "../builder-i3jxVe9m.mjs";
|
|
10
10
|
import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
|
|
11
11
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
12
12
|
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 { t as exportJwk } from "../key-
|
|
9
|
+
import { t as exportJwk } from "../key-IxTTC8Yf.mjs";
|
|
10
10
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
11
|
-
import { l as verifyProof, r as signObject } from "../proof-
|
|
11
|
+
import { l as verifyProof, r as signObject } from "../proof-CVL7JnZd.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-BMgzqBtr.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note } from "@fedify/vocab";
|
|
15
15
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -5,10 +5,10 @@ import { r as createRequestContext, t as createInboxContext } from "../context-D
|
|
|
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 { p as signJsonLd } from "../ld-
|
|
9
|
-
import { s as signRequest } from "../http-
|
|
10
|
-
import { a as rsaPrivateKey3, c as rsaPublicKey3 } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { o as createFederation, p as handleInbox } from "../middleware-
|
|
8
|
+
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-l0B9nREb.mjs";
|
|
9
|
+
import { s as signRequest } from "../http-CCJ97Jql.mjs";
|
|
10
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
+
import { o as createFederation, p as handleInbox } from "../middleware-BMgzqBtr.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 } from "@fedify/vocab";
|
|
@@ -100,12 +100,7 @@ test("handleInbox() enforces portable compound proofs atomically", async () => {
|
|
|
100
100
|
tamperedInner.object.content = "Tampered";
|
|
101
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
102
|
const changedAfterSigning = structuredClone(valid);
|
|
103
|
-
changedAfterSigning.
|
|
104
|
-
type: "RsaSignature2017",
|
|
105
|
-
creator: "https://example.com/keys/1",
|
|
106
|
-
created: "2023-02-24T23:36:38Z",
|
|
107
|
-
signatureValue: "not-a-signature"
|
|
108
|
-
};
|
|
103
|
+
changedAfterSigning.summary = "Added after signing";
|
|
109
104
|
assertEquals((await handle(changedAfterSigning)).status, 401);
|
|
110
105
|
});
|
|
111
106
|
test("handleInbox() enforces compounds after alternate outer auth", async () => {
|
|
@@ -148,5 +143,137 @@ test("handleInbox() preserves ordinary top-level proof behavior", async () => {
|
|
|
148
143
|
}
|
|
149
144
|
}, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod))).status, 202);
|
|
150
145
|
});
|
|
146
|
+
async function signLd(document) {
|
|
147
|
+
return await signJsonLd(document, rsaPrivateKey3, rsaPublicKey3.id, { contextLoader: mockDocumentLoader });
|
|
148
|
+
}
|
|
149
|
+
async function isLdSignatureVerified(document) {
|
|
150
|
+
return await verifyCompactJsonLd(await compactJsonLd(document, mockDocumentLoader), {
|
|
151
|
+
contextLoader: mockDocumentLoader,
|
|
152
|
+
documentLoader: mockDocumentLoader
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
async function handleDispatched(body) {
|
|
156
|
+
const dispatched = { count: 0 };
|
|
157
|
+
const response = await handle(body, dispatched);
|
|
158
|
+
return [
|
|
159
|
+
response.status,
|
|
160
|
+
await response.text(),
|
|
161
|
+
dispatched.count
|
|
162
|
+
];
|
|
163
|
+
}
|
|
164
|
+
const COMPOUND_FAILURE = "Failed to verify compound portable Object Integrity Proofs.";
|
|
165
|
+
test("handleInbox() ignores a portable activity's Linked Data Signature", async () => {
|
|
166
|
+
const signed = await signLd(structuredClone(map_local_create_note_default.documents.finalSecuredCompound));
|
|
167
|
+
assertEquals(await isLdSignatureVerified(signed), false);
|
|
168
|
+
assertEquals(await handleDispatched(signed), [
|
|
169
|
+
202,
|
|
170
|
+
"",
|
|
171
|
+
1
|
|
172
|
+
]);
|
|
173
|
+
const bogus = structuredClone(map_local_create_note_default.documents.finalSecuredCompound);
|
|
174
|
+
bogus.signature = {
|
|
175
|
+
type: "RsaSignature2017",
|
|
176
|
+
creator: "https://example.com/keys/1",
|
|
177
|
+
created: "2023-02-24T23:36:38Z",
|
|
178
|
+
signatureValue: "not-a-signature"
|
|
179
|
+
};
|
|
180
|
+
assertEquals(await handleDispatched(bogus), [
|
|
181
|
+
202,
|
|
182
|
+
"",
|
|
183
|
+
1
|
|
184
|
+
]);
|
|
185
|
+
const tampered = structuredClone(map_local_create_note_default.documents.finalSecuredCompound);
|
|
186
|
+
tampered.object = {
|
|
187
|
+
...tampered.object,
|
|
188
|
+
content: "Tampered"
|
|
189
|
+
};
|
|
190
|
+
assertEquals((await handleDispatched(await signLd(tampered)))[0], 401);
|
|
191
|
+
const invalidInner = structuredClone(map_local_create_note_default.documents.outerUnsecuredDocument);
|
|
192
|
+
invalidInner.object.content = "Tampered";
|
|
193
|
+
assertEquals(await handleDispatched(await signLd(await secureDocument(invalidInner, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod))), [
|
|
194
|
+
401,
|
|
195
|
+
COMPOUND_FAILURE,
|
|
196
|
+
0
|
|
197
|
+
]);
|
|
198
|
+
});
|
|
199
|
+
test("handleInbox() verifies compounds with verified Linked Data Signatures", async () => {
|
|
200
|
+
const createBody = (object) => ({
|
|
201
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"],
|
|
202
|
+
id: "https://example.com/activities/compound-ld",
|
|
203
|
+
type: "Create",
|
|
204
|
+
actor: rsaPublicKey3.ownerId.href,
|
|
205
|
+
object
|
|
206
|
+
});
|
|
207
|
+
const privateJwk = await crypto.subtle.exportKey("jwk", ed25519PrivateKey);
|
|
208
|
+
const sign = async (object) => await signLd(await secureDocument(createBody(object), privateJwk, ed25519PublicKey.id.href));
|
|
209
|
+
const valid = await sign(structuredClone(map_local_create_note_default.documents.securedInner));
|
|
210
|
+
assertEquals(await isLdSignatureVerified(valid), true);
|
|
211
|
+
assertEquals(await handleDispatched(valid), [
|
|
212
|
+
202,
|
|
213
|
+
"",
|
|
214
|
+
1
|
|
215
|
+
]);
|
|
216
|
+
const invalidInner = structuredClone(map_local_create_note_default.documents.securedInner);
|
|
217
|
+
invalidInner.content = "Tampered";
|
|
218
|
+
const invalid = await sign(invalidInner);
|
|
219
|
+
assertEquals(await isLdSignatureVerified(invalid), true);
|
|
220
|
+
assertEquals(await handleDispatched(invalid), [
|
|
221
|
+
401,
|
|
222
|
+
COMPOUND_FAILURE,
|
|
223
|
+
0
|
|
224
|
+
]);
|
|
225
|
+
});
|
|
226
|
+
test("handleInbox() keeps embedded signature properties in proof inputs", async () => {
|
|
227
|
+
const innerWithSignature = await secureDocument({
|
|
228
|
+
...map_local_create_note_default.documents.innerUnsecuredDocument,
|
|
229
|
+
"@context": ["https://w3id.org/security/v1", ...map_local_create_note_default.documents.innerUnsecuredDocument["@context"]],
|
|
230
|
+
signature: {
|
|
231
|
+
type: "https://example.com/ns#ExampleSignature",
|
|
232
|
+
signatureValue: "covered by the inner proof"
|
|
233
|
+
}
|
|
234
|
+
}, map_local_create_note_default.keys.inner.testPrivateKeyJwk, map_local_create_note_default.keys.inner.verificationMethod);
|
|
235
|
+
const sign = async (object) => await signLd(await secureDocument({
|
|
236
|
+
...map_local_create_note_default.documents.outerUnsecuredDocument,
|
|
237
|
+
object
|
|
238
|
+
}, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod));
|
|
239
|
+
assertEquals(await handleDispatched(await sign(structuredClone(innerWithSignature))), [
|
|
240
|
+
202,
|
|
241
|
+
"",
|
|
242
|
+
1
|
|
243
|
+
]);
|
|
244
|
+
const innerWithoutSignature = structuredClone(innerWithSignature);
|
|
245
|
+
delete innerWithoutSignature.signature;
|
|
246
|
+
assertEquals(await handleDispatched(await sign(innerWithoutSignature)), [
|
|
247
|
+
401,
|
|
248
|
+
COMPOUND_FAILURE,
|
|
249
|
+
0
|
|
250
|
+
]);
|
|
251
|
+
});
|
|
252
|
+
test("handleInbox() inspects compounds without the Linked Data Signature", async () => {
|
|
253
|
+
const activity = await secureDocument({
|
|
254
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"],
|
|
255
|
+
id: "https://example.com/activities/ordinary-ld",
|
|
256
|
+
type: "Create",
|
|
257
|
+
actor: map_local_create_note_default.keys.outer.controller,
|
|
258
|
+
object: {
|
|
259
|
+
id: "https://example.com/notes/ordinary-ld",
|
|
260
|
+
type: "Note",
|
|
261
|
+
attributedTo: map_local_create_note_default.keys.outer.controller,
|
|
262
|
+
content: "An ordinary note"
|
|
263
|
+
}
|
|
264
|
+
}, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod);
|
|
265
|
+
activity.signature = {
|
|
266
|
+
id: map_local_create_note_default.documents.innerUnsecuredDocument.id,
|
|
267
|
+
type: "RsaSignature2017",
|
|
268
|
+
creator: "https://example.com/keys/1",
|
|
269
|
+
created: "2023-02-24T23:36:38Z",
|
|
270
|
+
signatureValue: "not-a-signature"
|
|
271
|
+
};
|
|
272
|
+
assertEquals(await handleDispatched(activity), [
|
|
273
|
+
202,
|
|
274
|
+
"",
|
|
275
|
+
1
|
|
276
|
+
]);
|
|
277
|
+
});
|
|
151
278
|
//#endregion
|
|
152
279
|
export {};
|
|
@@ -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 { a as generateCryptoKeyPair } from "../key-
|
|
14
|
-
import { a as compactJsonLd, p as signJsonLd } from "../ld-
|
|
15
|
-
import { r as signObject } from "../proof-
|
|
16
|
-
import { s as signRequest } from "../http-
|
|
13
|
+
import { a as generateCryptoKeyPair } from "../key-IxTTC8Yf.mjs";
|
|
14
|
+
import { a as compactJsonLd, p as signJsonLd } from "../ld-l0B9nREb.mjs";
|
|
15
|
+
import { r as signObject } from "../proof-CVL7JnZd.mjs";
|
|
16
|
+
import { s as signRequest } from "../http-CCJ97Jql.mjs";
|
|
17
17
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
18
|
-
import { _ as respondWithObjectIfAcceptable, d as handleCollection, f as handleCustomCollection, g as respondWithObject, h as handleOutbox, m as handleObject, o as createFederation, p as handleInbox, u as handleActor } from "../middleware-
|
|
18
|
+
import { _ as respondWithObjectIfAcceptable, d as handleCollection, f as handleCustomCollection, g as respondWithObject, h as handleOutbox, m as handleObject, o as createFederation, p as handleInbox, u as handleActor } from "../middleware-BMgzqBtr.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";
|
|
@@ -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, y as parseHashlinkGatewayRequest } from "../middleware-
|
|
14
|
-
import { r as createFederationBuilder } from "../builder-
|
|
13
|
+
import { o as createFederation, y as parseHashlinkGatewayRequest } from "../middleware-BMgzqBtr.mjs";
|
|
14
|
+
import { r as createFederationBuilder } from "../builder-i3jxVe9m.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { Note } from "@fedify/vocab";
|
|
17
17
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -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 { r as signObject } from "../proof-
|
|
7
|
+
import { r as signObject } from "../proof-CVL7JnZd.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-BMgzqBtr.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-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-D1p6hv4z.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-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 verifyObject, r as signObject } from "../proof-
|
|
22
|
-
import { l as verifyRequest, s as signRequest } from "../http-
|
|
19
|
+
import { g as recordInboxActivity } from "../metrics-D1p6hv4z.mjs";
|
|
20
|
+
import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-l0B9nREb.mjs";
|
|
21
|
+
import { a as verifyObject, r as signObject } from "../proof-CVL7JnZd.mjs";
|
|
22
|
+
import { l as verifyRequest, s as signRequest } from "../http-CCJ97Jql.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 { b 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-dA0RswUV.mjs";
|
|
25
|
+
import { b as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-BMgzqBtr.mjs";
|
|
26
|
+
import { t as doesActorOwnKey } from "../owner-DGbYmXqU.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-CFd0Jhhv.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-SSfryVzY.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,12 +7,12 @@ 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 { t as exportJwk } from "../key-
|
|
11
|
-
import { s as detachSignature } from "../ld-
|
|
12
|
-
import { r as signObject } from "../proof-
|
|
10
|
+
import { t as exportJwk } from "../key-IxTTC8Yf.mjs";
|
|
11
|
+
import { s as detachSignature } from "../ld-l0B9nREb.mjs";
|
|
12
|
+
import { r as signObject } from "../proof-CVL7JnZd.mjs";
|
|
13
13
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
14
|
-
import { n as FederationImpl, o as createFederation } from "../middleware-
|
|
15
|
-
import { a as verifyCompoundPortableObjectProofs } from "../compound-proof-
|
|
14
|
+
import { n as FederationImpl, o as createFederation } from "../middleware-BMgzqBtr.mjs";
|
|
15
|
+
import { a as verifyCompoundPortableObjectProofs } from "../compound-proof-Cayy-ECj.mjs";
|
|
16
16
|
import { Create, Note, Person } from "@fedify/vocab";
|
|
17
17
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
18
18
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -7,10 +7,10 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
7
7
|
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
|
-
import { p as signJsonLd } from "../ld-
|
|
11
|
-
import { s as signRequest } from "../http-
|
|
10
|
+
import { p as signJsonLd } from "../ld-l0B9nREb.mjs";
|
|
11
|
+
import { s as signRequest } from "../http-CCJ97Jql.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, o as createFederation, p as handleInbox } from "../middleware-
|
|
13
|
+
import { n as FederationImpl, o as createFederation, p as handleInbox } from "../middleware-BMgzqBtr.mjs";
|
|
14
14
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
15
15
|
import { t as KvKeyCache } from "../keycache-BUDHB5rY.mjs";
|
|
16
16
|
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 { r as signObject } from "../proof-
|
|
13
|
-
import { s as signRequest } from "../http-
|
|
11
|
+
import { p as signJsonLd } from "../ld-l0B9nREb.mjs";
|
|
12
|
+
import { r as signObject } from "../proof-CVL7JnZd.mjs";
|
|
13
|
+
import { s as signRequest } from "../http-CCJ97Jql.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 { c as forwardPortableInboxActivity, l as resolvePortableInboxForwardingOptions, o as createFederation } from "../middleware-
|
|
15
|
+
import { c as forwardPortableInboxActivity, l as resolvePortableInboxForwardingOptions, o as createFederation } from "../middleware-BMgzqBtr.mjs";
|
|
16
16
|
import { Create, Follow, Note, Person, Tombstone } from "@fedify/vocab";
|
|
17
17
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
18
18
|
import { exportDidKey, formatIri, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -7,10 +7,10 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.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 { o as verifyPortableObjectProof, r as signObject } from "../proof-
|
|
11
|
-
import { s as signRequest } from "../http-
|
|
10
|
+
import { o as verifyPortableObjectProof, r as signObject } from "../proof-CVL7JnZd.mjs";
|
|
11
|
+
import { s as signRequest } from "../http-CCJ97Jql.mjs";
|
|
12
12
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { o as createFederation, v as PORTABLE_OBJECT_CONTENT_TYPE } from "../middleware-
|
|
13
|
+
import { o as createFederation, v as PORTABLE_OBJECT_CONTENT_TYPE } from "../middleware-BMgzqBtr.mjs";
|
|
14
14
|
import { Collection, Create, Note, Object as Object$1, Person, Tombstone, lookupObject } from "@fedify/vocab";
|
|
15
15
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { exportDidKey, formatIri, parseIri } 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 { l as verifyRequest } from "../http-
|
|
13
|
+
import { l as verifyRequest } from "../http-CCJ97Jql.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-DGbYmXqU.mjs";
|
|
16
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-Ejy1jOz9.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-CO_cEvQc.mjs";
|
|
7
|
-
import { o as createFederation } from "../../middleware-
|
|
7
|
+
import { o as createFederation } from "../../middleware-BMgzqBtr.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-CO_cEvQc.mjs";
|
|
7
|
-
import { o as createFederation } from "../../middleware-
|
|
8
|
-
import { r as createFederationBuilder } from "../../builder-
|
|
7
|
+
import { o as createFederation } from "../../middleware-BMgzqBtr.mjs";
|
|
8
|
+
import { r as createFederationBuilder } from "../../builder-i3jxVe9m.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-DNJ1cNpr.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-Z6IcEbWU.mjs";
|
|
7
7
|
import { t as assertNotEquals } from "../assert_not_equals-CpPK2t89.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
|
-
import { o as createFederation, s as handleWebFinger } from "../middleware-
|
|
9
|
+
import { o as createFederation, s as handleWebFinger } from "../middleware-BMgzqBtr.mjs";
|
|
10
10
|
import { Image, Link, Person, Tombstone } from "@fedify/vocab";
|
|
11
11
|
import { createTestMeterProvider, test } from "@fedify/fixture";
|
|
12
12
|
import { parseIri } from "@fedify/vocab-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
|
|
3
3
|
const require_transformers = require("./transformers-BalCrSsr.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-Dvy_IwRa.cjs");
|
|
5
5
|
const require_types = require("./types-Be2zbyeG.cjs");
|
|
6
|
-
const require_owner = require("./owner-
|
|
7
|
-
const require_kv_cache = require("./kv-cache-
|
|
6
|
+
const require_owner = require("./owner-BpOxL5PG.cjs");
|
|
7
|
+
const require_kv_cache = require("./kv-cache-BP69NV0P.cjs");
|
|
8
8
|
let _logtape_logtape = require("@logtape/logtape");
|
|
9
9
|
let _fedify_uri_template = require("@fedify/uri-template");
|
|
10
10
|
let _fedify_vocab = require("@fedify/vocab");
|
|
@@ -2638,13 +2638,13 @@ function recordCollectionMetrics(meterProvider, base, result, options = {}) {
|
|
|
2638
2638
|
* @param parameters The parameters for handling the collection.
|
|
2639
2639
|
* @returns A promise that resolves to an HTTP response.
|
|
2640
2640
|
*/
|
|
2641
|
-
async function handleCollection(request, { name: name$
|
|
2642
|
-
const spanName = name$
|
|
2641
|
+
async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
|
|
2642
|
+
const spanName = name$1.trim().replace(/\s+/g, "_");
|
|
2643
2643
|
tracerProvider = tracerProvider ?? _opentelemetry_api.trace.getTracerProvider();
|
|
2644
2644
|
const tracer = tracerProvider.getTracer(require_http.name, require_http.version);
|
|
2645
2645
|
const cursor = new URL(request.url).searchParams.get("cursor");
|
|
2646
2646
|
const metricBase = {
|
|
2647
|
-
kind: getCollectionMetricKind(name$
|
|
2647
|
+
kind: getCollectionMetricKind(name$1),
|
|
2648
2648
|
page: cursor != null,
|
|
2649
2649
|
dispatcher: "built_in"
|
|
2650
2650
|
};
|
|
@@ -2685,7 +2685,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
2685
2685
|
span.setStatus({ code: _opentelemetry_api.SpanStatusCode.ERROR });
|
|
2686
2686
|
return await onNotFound(request);
|
|
2687
2687
|
}
|
|
2688
|
-
const items = filterCollectionItems(page.items, name$
|
|
2688
|
+
const items = filterCollectionItems(page.items, name$1, filterPredicate);
|
|
2689
2689
|
itemCount = items.length;
|
|
2690
2690
|
span.setAttribute("fedify.collection.items", itemCount);
|
|
2691
2691
|
return items;
|
|
@@ -2725,7 +2725,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
2725
2725
|
} else {
|
|
2726
2726
|
const uri = new URL(baseUri);
|
|
2727
2727
|
uri.searchParams.set("cursor", cursor);
|
|
2728
|
-
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$
|
|
2728
|
+
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
|
|
2729
2729
|
kind: _opentelemetry_api.SpanKind.SERVER,
|
|
2730
2730
|
attributes: {
|
|
2731
2731
|
"activitypub.collection.id": uri.href,
|
|
@@ -2741,7 +2741,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
2741
2741
|
span.setStatus({ code: _opentelemetry_api.SpanStatusCode.ERROR });
|
|
2742
2742
|
return await onNotFound(request);
|
|
2743
2743
|
}
|
|
2744
|
-
const items = filterCollectionItems(page.items, name$
|
|
2744
|
+
const items = filterCollectionItems(page.items, name$1, filterPredicate);
|
|
2745
2745
|
itemCount = items.length;
|
|
2746
2746
|
span.setAttribute("fedify.collection.items", itemCount);
|
|
2747
2747
|
return {
|
|
@@ -3671,8 +3671,9 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
3671
3671
|
});
|
|
3672
3672
|
}
|
|
3673
3673
|
if (!skipSignatureVerification) {
|
|
3674
|
-
|
|
3675
|
-
|
|
3674
|
+
const compoundJson = Array.isArray(json) ? json : jsonWithoutSig;
|
|
3675
|
+
if (inspectCompoundPortableObjectApplicability(compoundJson, INBOX_COMPOUND_PROOF_LIMITS) !== "absent") {
|
|
3676
|
+
const compoundProof = await verifyCompoundPortableObjectProofs(compoundJson, INBOX_COMPOUND_PROOF_LIMITS, {
|
|
3676
3677
|
documentLoader: ctx.documentLoader,
|
|
3677
3678
|
keyCache,
|
|
3678
3679
|
meterProvider,
|
|
@@ -3888,8 +3889,8 @@ var CustomCollectionHandler = class {
|
|
|
3888
3889
|
* @param CollectionPage The CollectionPage constructor.
|
|
3889
3890
|
* @param filterPredicate Optional filter predicate for items.
|
|
3890
3891
|
*/
|
|
3891
|
-
constructor(name$
|
|
3892
|
-
this.name = name$
|
|
3892
|
+
constructor(name$2, values, context, callbacks, tracerProvider = _opentelemetry_api.trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate) {
|
|
3893
|
+
this.name = name$2;
|
|
3893
3894
|
this.values = values;
|
|
3894
3895
|
this.context = context;
|
|
3895
3896
|
this.callbacks = callbacks;
|
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
4
|
+
import { n as version, t as name } from "./deno-Djkzd-G_.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-D1p6hv4z.mjs";
|
|
6
6
|
import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-CPVqki78.mjs";
|
|
7
|
-
import { i as fetchKeyDetailed, s as validateCryptoKey } from "./key-
|
|
8
|
-
import { n as verifyPortableGatewayKeyDocument } from "./portable-key-
|
|
7
|
+
import { i as fetchKeyDetailed, s as validateCryptoKey } from "./key-IxTTC8Yf.mjs";
|
|
8
|
+
import { n as verifyPortableGatewayKeyDocument } from "./portable-key-CCwJGSsU.mjs";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
import { CryptographicKey } from "@fedify/vocab";
|
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -15,7 +15,7 @@ let byte_encodings_base64 = require("byte-encodings/base64");
|
|
|
15
15
|
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
16
16
|
//#region deno.json
|
|
17
17
|
var name = "@fedify/fedify";
|
|
18
|
-
var version = "2.4.0-dev.
|
|
18
|
+
var version = "2.4.0-dev.2077+c29a03d4";
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region ../../node_modules/.pnpm/temporal-polyfill@1.0.1/node_modules/temporal-polyfill/chunks/root.js
|
|
21
21
|
const NativeTemporal = globalThis.Temporal;
|
|
@@ -13,7 +13,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
|
13
13
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
14
14
|
//#region deno.json
|
|
15
15
|
var name = "@fedify/fedify";
|
|
16
|
-
var version = "2.4.0-dev.
|
|
16
|
+
var version = "2.4.0-dev.2077+c29a03d4";
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/sig/accept.ts
|
|
19
19
|
/**
|
|
@@ -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 { _ as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-
|
|
4
|
+
import { n as version, t as name } from "./deno-Djkzd-G_.mjs";
|
|
5
|
+
import { _ as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-D1p6hv4z.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { CryptographicKey, Multikey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|