@fedify/fedify 2.1.31 → 2.1.32
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/attachment-arrays-DZ4JHJD8.mjs +111 -0
- package/dist/{builder-isMRh_I6.mjs → builder--sc-rozj.mjs} +3 -3
- package/dist/callback-BARPujV7.d.mts +2388 -0
- package/dist/{client-BIBzqEIp.d.cts → client-9DPcy_Yx.d.ts} +16 -0
- package/dist/{client-jE7oGvRh.d.ts → client-B3ruDgWg.d.cts} +16 -0
- package/dist/{client-BZr7TGyu.mjs → client-cpPaW7Ww.mjs} +86 -11
- package/dist/compat/attachment-arrays.test.d.mts +2 -0
- package/dist/compat/attachment-arrays.test.mjs +254 -0
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{context-C0uGVzgk.d.ts → context-DE2YrQwM.d.ts} +30 -13
- package/dist/{context-CLaLxi49.d.cts → context-y6ZUQCMf.d.cts} +30 -13
- package/dist/{deno-CiaJqTcu.mjs → deno-L23b3Hba.mjs} +1 -1
- package/dist/{docloader-DOrwedT7.mjs → docloader-DUXr9k_O.mjs} +2 -2
- package/dist/federation/attachment-responses.test.d.mts +2 -0
- package/dist/federation/attachment-responses.test.mjs +182 -0
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/delivery-attachments.test.d.mts +2 -0
- package/dist/federation/delivery-attachments.test.mjs +280 -0
- package/dist/federation/handler.test.mjs +208 -16
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +1185 -8
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/negotiation.test.mjs +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/send.test.mjs +283 -3
- package/dist/federation/temporal.test.mjs +25 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-Crml3gei.js → http-BtbMAgTA.js} +6 -4
- package/dist/{http-9IFUxdkp.d.cts → http-C8qLHs_Z.d.cts} +3 -3
- package/dist/{http-CRiVlZd5.cjs → http-D5woFKA_.cjs} +6 -4
- package/dist/{http-SbfezERn.d.ts → http-D8WmcRAF.d.ts} +3 -3
- package/dist/{http-A9mP2uM7.mjs → http-HX6wVyJh.mjs} +6 -4
- package/dist/{inbox-KESLudq4.mjs → inbox-CL7A0HXT.mjs} +1 -1
- package/dist/{key-Dg6-DV_O.mjs → key-Dai3f5yI.mjs} +3 -2
- package/dist/{kv-cache-Cqmm-yQa.cjs → kv-cache-B0V_e231.cjs} +1 -1
- package/dist/{kv-cache-DQcyZL5T.js → kv-cache-BsDg-cT8.js} +1 -1
- package/dist/{ld-COjDN6Nb.mjs → ld-DN6x1iZ8.mjs} +153 -21
- package/dist/ld-signature-DoZcbsZR.mjs +23 -0
- package/dist/{middleware-BtDQUCcz.cjs → middleware-Cl6k5Hrm.cjs} +1 -1
- package/dist/{middleware-BbgR7xOI.cjs → middleware-CrfRuKCf.cjs} +561 -101
- package/dist/{middleware-COFlKeYn.mjs → middleware-DiquMgtt.mjs} +378 -89
- package/dist/{middleware-DIW5S_5L.js → middleware-DunNtbo9.js} +560 -101
- package/dist/{middleware-CuQvczZd.mjs → middleware-SnQS8eIb.mjs} +1 -1
- package/dist/{mod-LOEOKbYd.d.cts → mod-CehHJOV4.d.cts} +30 -13
- package/dist/{mod-CFRocFeQ.d.ts → mod-DLJpnqdw.d.ts} +1 -1
- package/dist/{mod-C7w-QVUv.d.ts → mod-Mh3oIuRK.d.ts} +30 -13
- package/dist/{mod-BRnwh2oy.d.ts → mod-REfljt0T.d.ts} +3 -3
- package/dist/{mod-Co7LEK9X.d.cts → mod-UvIGUHqW.d.cts} +3 -3
- package/dist/{mod-CGUH8Ujp.d.cts → mod-sTa1Zzxk.d.cts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +8 -8
- package/dist/mod.d.ts +8 -8
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/client.test.mjs +432 -5
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/{owner-CFHq61cq.mjs → owner-DwyDorZI.mjs} +2 -2
- package/dist/{proof-0JkSC_pT.cjs → proof-Be-4K4jn.cjs} +193 -46
- package/dist/{proof-KSHlbPCG.mjs → proof-DYjmyrHh.mjs} +38 -13
- package/dist/{proof-DzksJFK7.js → proof-Du4-5SHY.js} +187 -46
- package/dist/{send-DaDe2YCb.mjs → send-BGSfQkIK.mjs} +92 -21
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key-types.test.d.mts +218 -0
- package/dist/sig/key-types.test.mjs +8 -0
- package/dist/sig/key.test.mjs +2 -2
- package/dist/sig/ld.test.mjs +573 -8
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +95 -3
- package/dist/{temporal-DNGH8o2E.mjs → temporal-CNCchWly.mjs} +3 -5
- package/dist/testing/mod.d.mts +2 -2203
- package/dist/{types-DOvyymM4.cjs → types-B5wRhemi.cjs} +85 -10
- package/dist/{types-B1_pRFE_.js → types-CXy2lRVU.js} +86 -11
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
- /package/dist/{collection-BD6-SZ6O.mjs → collection-DnoYNwBC.mjs} +0 -0
- /package/dist/{negotiation-BehA2uul.mjs → negotiation-xb0QR3u_.mjs} +0 -0
- /package/dist/{retry-B_E3V_Dx.mjs → retry-CI1flGDD.mjs} +0 -0
- /package/dist/{types-DCP0WLdt.mjs → types-s4mCTGkT.mjs} +0 -0
|
@@ -4,20 +4,23 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { n as createRequestContext, t as createInboxContext } from "../context-Juj6bdHC.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-DflMZha5.mjs";
|
|
7
|
+
import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
|
|
7
8
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
8
9
|
import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
|
|
9
10
|
import { r as parseAcceptSignature } from "../accept-BavzedPB.mjs";
|
|
10
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
11
|
-
import { c as signRequest } from "../http-
|
|
11
|
+
import { a as generateCryptoKeyPair } from "../key-Dai3f5yI.mjs";
|
|
12
|
+
import { c as signRequest } from "../http-HX6wVyJh.mjs";
|
|
12
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
13
14
|
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
14
|
-
import { a as compactJsonLd,
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
15
|
+
import { a as compactJsonLd, m as signJsonLd } from "../ld-DN6x1iZ8.mjs";
|
|
16
|
+
import { t as ldSignatureWithoutCreated } from "../ld-signature-DoZcbsZR.mjs";
|
|
17
|
+
import { n as signObject } from "../proof-DYjmyrHh.mjs";
|
|
18
|
+
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-DiquMgtt.mjs";
|
|
19
|
+
import { t as InboxListenerSet } from "../inbox-CL7A0HXT.mjs";
|
|
18
20
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
19
21
|
import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
|
|
20
22
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
23
|
+
import { configure, reset } from "@logtape/logtape";
|
|
21
24
|
//#region src/federation/handler.test.ts
|
|
22
25
|
test("handleActor()", async () => {
|
|
23
26
|
let context = createRequestContext({
|
|
@@ -537,8 +540,8 @@ test("handleCollection()", async () => {
|
|
|
537
540
|
assertEquals(response.status, 200);
|
|
538
541
|
assertEquals(response.headers.get("Content-Type"), "application/activity+json");
|
|
539
542
|
const createCtx = [
|
|
540
|
-
"https://w3id.org/identity/v1",
|
|
541
543
|
"https://www.w3.org/ns/activitystreams",
|
|
544
|
+
"https://w3id.org/security/v1",
|
|
542
545
|
"https://w3id.org/security/data-integrity/v1",
|
|
543
546
|
"https://gotosocial.org/ns",
|
|
544
547
|
{
|
|
@@ -583,7 +586,13 @@ test("handleCollection()", async () => {
|
|
|
583
586
|
"@id": "fedibird:emojiReactions",
|
|
584
587
|
"@type": "@id"
|
|
585
588
|
}
|
|
586
|
-
}
|
|
589
|
+
},
|
|
590
|
+
{ orderedItems: {
|
|
591
|
+
"@id": "https://www.w3.org/ns/activitystreams#items",
|
|
592
|
+
"@type": "@id",
|
|
593
|
+
"@container": "@list",
|
|
594
|
+
"@context": null
|
|
595
|
+
} }
|
|
587
596
|
],
|
|
588
597
|
id: "https://example.com/users/someone",
|
|
589
598
|
type: "OrderedCollection",
|
|
@@ -667,7 +676,13 @@ test("handleCollection()", async () => {
|
|
|
667
676
|
"@id": "fedibird:emojiReactions",
|
|
668
677
|
"@type": "@id"
|
|
669
678
|
}
|
|
670
|
-
}
|
|
679
|
+
},
|
|
680
|
+
{ orderedItems: {
|
|
681
|
+
"@id": "https://www.w3.org/ns/activitystreams#items",
|
|
682
|
+
"@type": "@id",
|
|
683
|
+
"@container": "@list",
|
|
684
|
+
"@context": null
|
|
685
|
+
} }
|
|
671
686
|
],
|
|
672
687
|
id: "https://example.com/users/someone",
|
|
673
688
|
type: "OrderedCollection",
|
|
@@ -785,7 +800,13 @@ test("handleCollection()", async () => {
|
|
|
785
800
|
"@id": "fedibird:emojiReactions",
|
|
786
801
|
"@type": "@id"
|
|
787
802
|
}
|
|
788
|
-
}
|
|
803
|
+
},
|
|
804
|
+
{ orderedItems: {
|
|
805
|
+
"@id": "https://www.w3.org/ns/activitystreams#items",
|
|
806
|
+
"@type": "@id",
|
|
807
|
+
"@container": "@list",
|
|
808
|
+
"@context": null
|
|
809
|
+
} }
|
|
789
810
|
],
|
|
790
811
|
id: "https://example.com/users/someone?cursor=0",
|
|
791
812
|
type: "OrderedCollectionPage",
|
|
@@ -844,7 +865,13 @@ test("handleCollection()", async () => {
|
|
|
844
865
|
"@id": "fedibird:emojiReactions",
|
|
845
866
|
"@type": "@id"
|
|
846
867
|
}
|
|
847
|
-
}
|
|
868
|
+
},
|
|
869
|
+
{ orderedItems: {
|
|
870
|
+
"@id": "https://www.w3.org/ns/activitystreams#items",
|
|
871
|
+
"@type": "@id",
|
|
872
|
+
"@container": "@list",
|
|
873
|
+
"@context": null
|
|
874
|
+
} }
|
|
848
875
|
],
|
|
849
876
|
id: "https://example.com/users/someone?cursor=2",
|
|
850
877
|
type: "OrderedCollectionPage",
|
|
@@ -2121,6 +2148,166 @@ test("handleInbox()", async () => {
|
|
|
2121
2148
|
assertEquals(onNotFoundCalled, null);
|
|
2122
2149
|
assertEquals(response.status, 400);
|
|
2123
2150
|
});
|
|
2151
|
+
test("handleInbox() verifies Linked Data signatures without created", async (t) => {
|
|
2152
|
+
const inserted = structuredClone(ldSignatureWithoutCreated);
|
|
2153
|
+
const withTimestamp = {
|
|
2154
|
+
...inserted,
|
|
2155
|
+
signature: {
|
|
2156
|
+
...inserted.signature,
|
|
2157
|
+
created: "2024-09-12T16:50:46Z"
|
|
2158
|
+
}
|
|
2159
|
+
};
|
|
2160
|
+
const tampered = structuredClone(ldSignatureWithoutCreated);
|
|
2161
|
+
tampered.object.content = "tampered";
|
|
2162
|
+
const invalid = structuredClone(ldSignatureWithoutCreated);
|
|
2163
|
+
invalid.signature.signatureValue = "AAAA";
|
|
2164
|
+
const { signature: _, ...unsigned } = ldSignatureWithoutCreated;
|
|
2165
|
+
for (const [name, body, expected] of [
|
|
2166
|
+
[
|
|
2167
|
+
"valid LD-only",
|
|
2168
|
+
ldSignatureWithoutCreated,
|
|
2169
|
+
202
|
|
2170
|
+
],
|
|
2171
|
+
[
|
|
2172
|
+
"inserted created",
|
|
2173
|
+
withTimestamp,
|
|
2174
|
+
401
|
|
2175
|
+
],
|
|
2176
|
+
[
|
|
2177
|
+
"tampered content",
|
|
2178
|
+
tampered,
|
|
2179
|
+
401
|
|
2180
|
+
],
|
|
2181
|
+
[
|
|
2182
|
+
"invalid signature",
|
|
2183
|
+
invalid,
|
|
2184
|
+
401
|
|
2185
|
+
],
|
|
2186
|
+
[
|
|
2187
|
+
"unsigned",
|
|
2188
|
+
unsigned,
|
|
2189
|
+
401
|
|
2190
|
+
],
|
|
2191
|
+
[
|
|
2192
|
+
"malformed created",
|
|
2193
|
+
{
|
|
2194
|
+
...ldSignatureWithoutCreated,
|
|
2195
|
+
signature: {
|
|
2196
|
+
...ldSignatureWithoutCreated.signature,
|
|
2197
|
+
created: 123
|
|
2198
|
+
}
|
|
2199
|
+
},
|
|
2200
|
+
401
|
|
2201
|
+
],
|
|
2202
|
+
[
|
|
2203
|
+
"malformed creator",
|
|
2204
|
+
{
|
|
2205
|
+
...ldSignatureWithoutCreated,
|
|
2206
|
+
signature: {
|
|
2207
|
+
...ldSignatureWithoutCreated.signature,
|
|
2208
|
+
creator: {}
|
|
2209
|
+
}
|
|
2210
|
+
},
|
|
2211
|
+
401
|
|
2212
|
+
],
|
|
2213
|
+
[
|
|
2214
|
+
"malformed null",
|
|
2215
|
+
{
|
|
2216
|
+
...ldSignatureWithoutCreated,
|
|
2217
|
+
signature: null
|
|
2218
|
+
},
|
|
2219
|
+
401
|
|
2220
|
+
],
|
|
2221
|
+
[
|
|
2222
|
+
"malformed array",
|
|
2223
|
+
{
|
|
2224
|
+
...ldSignatureWithoutCreated,
|
|
2225
|
+
signature: []
|
|
2226
|
+
},
|
|
2227
|
+
401
|
|
2228
|
+
],
|
|
2229
|
+
[
|
|
2230
|
+
"malformed primitive",
|
|
2231
|
+
{
|
|
2232
|
+
...ldSignatureWithoutCreated,
|
|
2233
|
+
signature: "secret"
|
|
2234
|
+
},
|
|
2235
|
+
401
|
|
2236
|
+
]
|
|
2237
|
+
]) await t.step(name, async () => {
|
|
2238
|
+
const kv = new MemoryKvStore();
|
|
2239
|
+
const federation = createFederation({ kv });
|
|
2240
|
+
const request = new Request("https://example.com/inbox", {
|
|
2241
|
+
method: "POST",
|
|
2242
|
+
body: JSON.stringify(body)
|
|
2243
|
+
});
|
|
2244
|
+
const context = createRequestContext({
|
|
2245
|
+
federation,
|
|
2246
|
+
request,
|
|
2247
|
+
url: new URL(request.url),
|
|
2248
|
+
data: void 0,
|
|
2249
|
+
documentLoader: mockDocumentLoader,
|
|
2250
|
+
contextLoader: mockDocumentLoader
|
|
2251
|
+
});
|
|
2252
|
+
let deliveries = 0;
|
|
2253
|
+
const inboxListeners = new InboxListenerSet();
|
|
2254
|
+
inboxListeners.add(Create, () => {
|
|
2255
|
+
deliveries++;
|
|
2256
|
+
});
|
|
2257
|
+
const records = [];
|
|
2258
|
+
await configure({
|
|
2259
|
+
sinks: { buffer: (record) => records.push(record) },
|
|
2260
|
+
loggers: [{
|
|
2261
|
+
category: ["fedify"],
|
|
2262
|
+
sinks: ["buffer"],
|
|
2263
|
+
lowestLevel: "debug"
|
|
2264
|
+
}, {
|
|
2265
|
+
category: ["logtape", "meta"],
|
|
2266
|
+
sinks: []
|
|
2267
|
+
}],
|
|
2268
|
+
reset: true
|
|
2269
|
+
});
|
|
2270
|
+
try {
|
|
2271
|
+
assertEquals((await handleInbox(request, {
|
|
2272
|
+
recipient: null,
|
|
2273
|
+
context,
|
|
2274
|
+
inboxContextFactory() {
|
|
2275
|
+
return createInboxContext({
|
|
2276
|
+
...context,
|
|
2277
|
+
clone: void 0
|
|
2278
|
+
});
|
|
2279
|
+
},
|
|
2280
|
+
kv,
|
|
2281
|
+
kvPrefixes: {
|
|
2282
|
+
activityIdempotence: ["_fedify", "activityIdempotence"],
|
|
2283
|
+
publicKey: ["_fedify", "publicKey"],
|
|
2284
|
+
acceptSignatureNonce: ["_fedify", "acceptSignatureNonce"]
|
|
2285
|
+
},
|
|
2286
|
+
actorDispatcher: () => null,
|
|
2287
|
+
inboxListeners,
|
|
2288
|
+
onNotFound: () => new Response("Not found", { status: 404 }),
|
|
2289
|
+
signatureTimeWindow: { minutes: 5 },
|
|
2290
|
+
skipSignatureVerification: false
|
|
2291
|
+
})).status, expected);
|
|
2292
|
+
assertEquals(deliveries, expected === 202 ? 1 : 0);
|
|
2293
|
+
const malformedRecords = records.filter((r) => r.rawMessage === "Linked Data Signature has an unsupported shape: {signatureKind}; properties: {signatureProperties}.");
|
|
2294
|
+
assertEquals(malformedRecords.length, name.startsWith("malformed") ? 1 : 0);
|
|
2295
|
+
for (const record of malformedRecords) {
|
|
2296
|
+
assertEquals(record.category, [
|
|
2297
|
+
"fedify",
|
|
2298
|
+
"federation",
|
|
2299
|
+
"inbox"
|
|
2300
|
+
]);
|
|
2301
|
+
assertEquals(record.level, "debug");
|
|
2302
|
+
assertFalse(JSON.stringify(record).includes(ldSignatureWithoutCreated.signature.creator));
|
|
2303
|
+
assertFalse(JSON.stringify(record).includes(ldSignatureWithoutCreated.signature.signatureValue));
|
|
2304
|
+
assertFalse(JSON.stringify(record).includes("secret"));
|
|
2305
|
+
}
|
|
2306
|
+
} finally {
|
|
2307
|
+
await reset();
|
|
2308
|
+
}
|
|
2309
|
+
});
|
|
2310
|
+
});
|
|
2124
2311
|
test("handleInbox() preserves the raw signed payload for inboxContextFactory", async () => {
|
|
2125
2312
|
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
2126
2313
|
const remoteContextUrl = "https://remote.example/contexts/ext";
|
|
@@ -2844,8 +3031,8 @@ test("handleCustomCollection()", async () => {
|
|
|
2844
3031
|
assertEquals(response.status, 200);
|
|
2845
3032
|
assertEquals(response.headers.get("Content-Type"), "application/activity+json");
|
|
2846
3033
|
const createCtx = [
|
|
2847
|
-
"https://w3id.org/identity/v1",
|
|
2848
3034
|
"https://www.w3.org/ns/activitystreams",
|
|
3035
|
+
"https://w3id.org/security/v1",
|
|
2849
3036
|
"https://w3id.org/security/data-integrity/v1",
|
|
2850
3037
|
"https://gotosocial.org/ns",
|
|
2851
3038
|
{
|
|
@@ -2891,8 +3078,13 @@ test("handleCustomCollection()", async () => {
|
|
|
2891
3078
|
}
|
|
2892
3079
|
}
|
|
2893
3080
|
];
|
|
3081
|
+
const ITEM_CONTEXT = [...CONTEXT, { items: {
|
|
3082
|
+
"@id": "https://www.w3.org/ns/activitystreams#items",
|
|
3083
|
+
"@type": "@id",
|
|
3084
|
+
"@context": null
|
|
3085
|
+
} }];
|
|
2894
3086
|
assertEquals(await response.json(), {
|
|
2895
|
-
"@context":
|
|
3087
|
+
"@context": ITEM_CONTEXT,
|
|
2896
3088
|
id: "https://example.com/",
|
|
2897
3089
|
type: "Collection",
|
|
2898
3090
|
items: [
|
|
@@ -2947,7 +3139,7 @@ test("handleCustomCollection()", async () => {
|
|
|
2947
3139
|
assertEquals(response.status, 200);
|
|
2948
3140
|
assertEquals(response.headers.get("Content-Type"), "application/activity+json");
|
|
2949
3141
|
assertEquals(await response.json(), {
|
|
2950
|
-
"@context":
|
|
3142
|
+
"@context": ITEM_CONTEXT,
|
|
2951
3143
|
id: "https://example.com/",
|
|
2952
3144
|
type: "Collection",
|
|
2953
3145
|
items: [
|
|
@@ -3005,7 +3197,7 @@ test("handleCustomCollection()", async () => {
|
|
|
3005
3197
|
assertEquals(response.status, 200);
|
|
3006
3198
|
assertEquals(response.headers.get("Content-Type"), "application/activity+json");
|
|
3007
3199
|
assertEquals(await response.json(), {
|
|
3008
|
-
"@context":
|
|
3200
|
+
"@context": ITEM_CONTEXT,
|
|
3009
3201
|
id: "https://example.com/?cursor=0",
|
|
3010
3202
|
type: "CollectionPage",
|
|
3011
3203
|
partOf: "https://example.com/",
|
|
@@ -3034,7 +3226,7 @@ test("handleCustomCollection()", async () => {
|
|
|
3034
3226
|
assertEquals(response.status, 200);
|
|
3035
3227
|
assertEquals(response.headers.get("Content-Type"), "application/activity+json");
|
|
3036
3228
|
assertEquals(await response.json(), {
|
|
3037
|
-
"@context":
|
|
3229
|
+
"@context": ITEM_CONTEXT,
|
|
3038
3230
|
id: "https://example.com/?cursor=2",
|
|
3039
3231
|
type: "CollectionPage",
|
|
3040
3232
|
partOf: "https://example.com/",
|
|
@@ -5,8 +5,8 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import "../std__assert-DflMZha5.mjs";
|
|
6
6
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
8
|
-
import { n as signObject } from "../proof-
|
|
9
|
-
import { a as createFederation } from "../middleware-
|
|
8
|
+
import { n as signObject } from "../proof-DYjmyrHh.mjs";
|
|
9
|
+
import { a as createFederation } from "../middleware-DiquMgtt.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, Follow, Person } from "@fedify/vocab";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
|
|
6
|
-
import { n as actorsHaveSameOrigin, t as InboxListenerSet } from "../inbox-
|
|
6
|
+
import { n as actorsHaveSameOrigin, t as InboxListenerSet } from "../inbox-CL7A0HXT.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
|
|
9
9
|
//#region src/federation/inbox.test.ts
|