@fedify/fedify 2.0.0-pr.559.6 → 2.0.0
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/README.md +8 -0
- package/dist/{builder-DFgILDcG.js → builder-DIwRDV19.js} +12 -57
- package/dist/compat/mod.d.cts +2 -2
- package/dist/compat/mod.d.ts +2 -2
- package/dist/compat/transformers.test.js +11 -11
- package/dist/{context-Cf0-LmZC.d.cts → context-BdNW_8a3.d.cts} +19 -46
- package/dist/{context-liIe6DFH.d.ts → context-C-GVKcJR.d.ts} +19 -46
- package/dist/{deno-Dssbv2qD.js → deno-CJgVX6Dr.js} +1 -4
- package/dist/{docloader-DLiT1bFg.js → docloader-BMecQIi-.js} +4 -12
- package/dist/federation/builder.test.js +3 -3
- package/dist/federation/handler.test.js +45 -45
- package/dist/federation/idempotency.test.js +11 -11
- package/dist/federation/inbox.test.js +2 -2
- package/dist/federation/middleware.test.js +43 -68
- package/dist/federation/mod.cjs +4 -4
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +4 -4
- package/dist/federation/send.test.js +90 -5
- package/dist/federation/webfinger.test.js +12 -15
- package/dist/{http-CfrdWdLH.js → http-CMTBVAxQ.js} +2 -2
- package/dist/{http-BP6_JjsL.cjs → http-CowIBMKY.cjs} +1 -4
- package/dist/{http-BaPyHVQ7.js → http-DoLgvgZ3.js} +1 -4
- package/dist/{inbox-CW8E414g.js → inbox-BrQMunLn.js} +1 -1
- package/dist/{key-DJI5G1Ub.js → key-BQD4Ef_6.js} +1 -1
- package/dist/{kv-cache-yGgfNuY5.cjs → kv-cache-174yQHE6.cjs} +1 -3
- package/dist/{kv-cache-CuA9rQF1.js → kv-cache-CFlvozMZ.js} +2 -4
- package/dist/{ld-Cu0jmueI.js → ld-DNdCEe6l.js} +2 -2
- package/dist/{middleware-D227KuaF.js → middleware-BN-t5M_R.js} +157 -210
- package/dist/middleware-BYNnNj-3.cjs +12 -0
- package/dist/{middleware-RxA4Ghbe.js → middleware-D5JdOwAE.js} +193 -260
- package/dist/{middleware-CBWnYv0h.js → middleware-UqzNuf3o.js} +11 -11
- package/dist/{middleware-Ddt9Yu31.cjs → middleware-aQr0yVne.cjs} +193 -260
- package/dist/{middleware-CjoXj45O.js → middleware-dO1Uzsiv.js} +4 -4
- package/dist/{mod-H3ScYaOb.d.cts → mod-5PNty1K9.d.cts} +1 -1
- package/dist/{mod-Do_sZWAA.d.cts → mod-BcpEGTWV.d.cts} +1 -1
- package/dist/{mod-CvhyLrjX.d.ts → mod-CevNbUol.d.ts} +0 -18
- package/dist/{mod-Dquroqiv.d.ts → mod-CtO31FCx.d.ts} +1 -1
- package/dist/{mod-B9_l3te3.d.ts → mod-Da9fNDyC.d.ts} +1 -1
- package/dist/{mod-DWaA45ef.d.cts → mod-ErTjUJs9.d.cts} +0 -18
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +6 -6
- package/dist/mod.d.ts +6 -6
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.js +11 -11
- package/dist/{owner-8nrupc6V.js → owner-DbymvgVI.js} +1 -1
- package/dist/{proof-CUhWCefd.js → proof-C85CNL5a.js} +1 -1
- package/dist/{proof-BrTneuEN.cjs → proof-DQFAjOse.cjs} +1 -1
- package/dist/{proof-RhBPHpn0.js → proof-DVBdddim.js} +2 -2
- package/dist/{send-CnI-Brh9.js → send-CkvEc-Tx.js} +35 -4
- package/dist/sig/http.test.js +3 -3
- package/dist/sig/key.test.js +2 -2
- package/dist/sig/ld.test.js +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.js +3 -3
- package/dist/sig/proof.test.js +3 -3
- package/dist/testing/mod.d.ts +13 -33
- package/dist/utils/docloader.test.js +4 -4
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +2 -2
- package/package.json +8 -8
- package/dist/middleware-ACS5M4fZ.cjs +0 -12
|
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
-
import "../deno-
|
|
12
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-
|
|
11
|
+
import "../deno-CJgVX6Dr.js";
|
|
12
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-BN-t5M_R.js";
|
|
13
13
|
import "../client-Dg7OfUDA.js";
|
|
14
14
|
import { RouterError } from "../router-D9eI0s4b.js";
|
|
15
15
|
import "../types-CPz01LGH.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import { signRequest, verifyRequest } from "../http-
|
|
18
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
|
19
|
-
import { doesActorOwnKey } from "../owner-
|
|
20
|
-
import { signObject, verifyObject } from "../proof-
|
|
21
|
-
import {
|
|
16
|
+
import "../key-BQD4Ef_6.js";
|
|
17
|
+
import { signRequest, verifyRequest } from "../http-CMTBVAxQ.js";
|
|
18
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-DNdCEe6l.js";
|
|
19
|
+
import { doesActorOwnKey } from "../owner-DbymvgVI.js";
|
|
20
|
+
import { signObject, verifyObject } from "../proof-DVBdddim.js";
|
|
21
|
+
import { getAuthenticatedDocumentLoader } from "../docloader-BMecQIi-.js";
|
|
22
22
|
import "../kv-cache-B__dHl7g.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-BrQMunLn.js";
|
|
24
|
+
import "../builder-DIwRDV19.js";
|
|
25
25
|
import "../collection-CcnIw1qY.js";
|
|
26
26
|
import "../keycache-DRxpZ5r9.js";
|
|
27
27
|
import "../negotiation-5NPJL6zp.js";
|
|
28
28
|
import "../retry-D4GJ670a.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-CkvEc-Tx.js";
|
|
30
30
|
import { assertStrictEquals } from "../std__assert-DWivtrGR.js";
|
|
31
31
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
32
32
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
|
@@ -35,6 +35,7 @@ import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, r
|
|
|
35
35
|
import { esm_default } from "../esm-DGl7uK1r.js";
|
|
36
36
|
import * as vocab from "@fedify/vocab";
|
|
37
37
|
import { getTypeId, lookupObject } from "@fedify/vocab";
|
|
38
|
+
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
38
39
|
|
|
39
40
|
//#region ../fixture/src/fixtures/example.com/create.json
|
|
40
41
|
var __context$2 = "https://www.w3.org/ns/activitystreams";
|
|
@@ -117,6 +118,7 @@ var person2_default = {
|
|
|
117
118
|
|
|
118
119
|
//#endregion
|
|
119
120
|
//#region src/federation/middleware.test.ts
|
|
121
|
+
const documentLoader = getDocumentLoader();
|
|
120
122
|
test("createFederation()", async (t) => {
|
|
121
123
|
const kv = new MemoryKvStore();
|
|
122
124
|
await t.step("allowPrivateAddress", () => {
|
|
@@ -303,8 +305,7 @@ test({
|
|
|
303
305
|
assertEquals(ctx.parseUri(new URL("https://example.com/")), null);
|
|
304
306
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle")), {
|
|
305
307
|
type: "actor",
|
|
306
|
-
identifier: "handle"
|
|
307
|
-
handle: "handle"
|
|
308
|
+
identifier: "handle"
|
|
308
309
|
});
|
|
309
310
|
assertEquals(ctx.parseUri(null), null);
|
|
310
311
|
assertEquals(await ctx.getActorKeyPairs("handle"), [{
|
|
@@ -366,7 +367,7 @@ test({
|
|
|
366
367
|
}), { headers: { "Content-Type": "application/activity+json" } }));
|
|
367
368
|
const federation2 = createFederation({
|
|
368
369
|
kv,
|
|
369
|
-
documentLoaderFactory: () =>
|
|
370
|
+
documentLoaderFactory: () => documentLoader,
|
|
370
371
|
contextLoaderFactory: () => mockDocumentLoader
|
|
371
372
|
});
|
|
372
373
|
const ctx2 = federation2.createContext(new URL("https://example.com/"), 123);
|
|
@@ -398,13 +399,11 @@ test({
|
|
|
398
399
|
assertEquals(ctx.getInboxUri("handle"), new URL("https://example.com/users/handle/inbox"));
|
|
399
400
|
assertEquals(ctx.parseUri(new URL("https://example.com/inbox")), {
|
|
400
401
|
type: "inbox",
|
|
401
|
-
identifier: void 0
|
|
402
|
-
handle: void 0
|
|
402
|
+
identifier: void 0
|
|
403
403
|
});
|
|
404
404
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle/inbox")), {
|
|
405
405
|
type: "inbox",
|
|
406
|
-
identifier: "handle"
|
|
407
|
-
handle: "handle"
|
|
406
|
+
identifier: "handle"
|
|
408
407
|
});
|
|
409
408
|
assertEquals(ctx.parseUri(null), null);
|
|
410
409
|
federation.setOutboxDispatcher("/users/{identifier}/outbox", () => ({ items: [] }));
|
|
@@ -412,8 +411,7 @@ test({
|
|
|
412
411
|
assertEquals(ctx.getOutboxUri("handle"), new URL("https://example.com/users/handle/outbox"));
|
|
413
412
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle/outbox")), {
|
|
414
413
|
type: "outbox",
|
|
415
|
-
identifier: "handle"
|
|
416
|
-
handle: "handle"
|
|
414
|
+
identifier: "handle"
|
|
417
415
|
});
|
|
418
416
|
assertEquals(ctx.parseUri(null), null);
|
|
419
417
|
federation.setFollowingDispatcher("/users/{identifier}/following", () => ({ items: [] }));
|
|
@@ -421,8 +419,7 @@ test({
|
|
|
421
419
|
assertEquals(ctx.getFollowingUri("handle"), new URL("https://example.com/users/handle/following"));
|
|
422
420
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle/following")), {
|
|
423
421
|
type: "following",
|
|
424
|
-
identifier: "handle"
|
|
425
|
-
handle: "handle"
|
|
422
|
+
identifier: "handle"
|
|
426
423
|
});
|
|
427
424
|
assertEquals(ctx.parseUri(null), null);
|
|
428
425
|
federation.setFollowersDispatcher("/users/{identifier}/followers", () => ({ items: [] }));
|
|
@@ -430,8 +427,7 @@ test({
|
|
|
430
427
|
assertEquals(ctx.getFollowersUri("handle"), new URL("https://example.com/users/handle/followers"));
|
|
431
428
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle/followers")), {
|
|
432
429
|
type: "followers",
|
|
433
|
-
identifier: "handle"
|
|
434
|
-
handle: "handle"
|
|
430
|
+
identifier: "handle"
|
|
435
431
|
});
|
|
436
432
|
assertEquals(ctx.parseUri(null), null);
|
|
437
433
|
federation.setLikedDispatcher("/users/{identifier}/liked", () => ({ items: [] }));
|
|
@@ -439,8 +435,7 @@ test({
|
|
|
439
435
|
assertEquals(ctx.getLikedUri("handle"), new URL("https://example.com/users/handle/liked"));
|
|
440
436
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle/liked")), {
|
|
441
437
|
type: "liked",
|
|
442
|
-
identifier: "handle"
|
|
443
|
-
handle: "handle"
|
|
438
|
+
identifier: "handle"
|
|
444
439
|
});
|
|
445
440
|
assertEquals(ctx.parseUri(null), null);
|
|
446
441
|
federation.setFeaturedDispatcher("/users/{identifier}/featured", () => ({ items: [] }));
|
|
@@ -448,8 +443,7 @@ test({
|
|
|
448
443
|
assertEquals(ctx.getFeaturedUri("handle"), new URL("https://example.com/users/handle/featured"));
|
|
449
444
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle/featured")), {
|
|
450
445
|
type: "featured",
|
|
451
|
-
identifier: "handle"
|
|
452
|
-
handle: "handle"
|
|
446
|
+
identifier: "handle"
|
|
453
447
|
});
|
|
454
448
|
assertEquals(ctx.parseUri(null), null);
|
|
455
449
|
federation.setFeaturedTagsDispatcher("/users/{identifier}/tags", () => ({ items: [] }));
|
|
@@ -457,8 +451,7 @@ test({
|
|
|
457
451
|
assertEquals(ctx.getFeaturedTagsUri("handle"), new URL("https://example.com/users/handle/tags"));
|
|
458
452
|
assertEquals(ctx.parseUri(new URL("https://example.com/users/handle/tags")), {
|
|
459
453
|
type: "featuredTags",
|
|
460
|
-
identifier: "handle"
|
|
461
|
-
handle: "handle"
|
|
454
|
+
identifier: "handle"
|
|
462
455
|
});
|
|
463
456
|
assertEquals(ctx.parseUri(null), null);
|
|
464
457
|
});
|
|
@@ -491,12 +484,10 @@ test({
|
|
|
491
484
|
assertEquals(ctx.getActorUri("handle"), new URL("https://ap.example.com/users/handle"));
|
|
492
485
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle")), {
|
|
493
486
|
type: "actor",
|
|
494
|
-
handle: "handle",
|
|
495
487
|
identifier: "handle"
|
|
496
488
|
});
|
|
497
489
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle")), {
|
|
498
490
|
type: "actor",
|
|
499
|
-
handle: "handle",
|
|
500
491
|
identifier: "handle"
|
|
501
492
|
});
|
|
502
493
|
federation.setObjectDispatcher(vocab.Note, "/users/{identifier}/notes/{id}", (_ctx, values) => {
|
|
@@ -529,94 +520,78 @@ test({
|
|
|
529
520
|
assertEquals(ctx.getInboxUri("handle"), new URL("https://ap.example.com/users/handle/inbox"));
|
|
530
521
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/inbox")), {
|
|
531
522
|
type: "inbox",
|
|
532
|
-
handle: void 0,
|
|
533
523
|
identifier: void 0
|
|
534
524
|
});
|
|
535
525
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/inbox")), {
|
|
536
526
|
type: "inbox",
|
|
537
|
-
handle: void 0,
|
|
538
527
|
identifier: void 0
|
|
539
528
|
});
|
|
540
529
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle/inbox")), {
|
|
541
530
|
type: "inbox",
|
|
542
|
-
handle: "handle",
|
|
543
531
|
identifier: "handle"
|
|
544
532
|
});
|
|
545
533
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle/inbox")), {
|
|
546
534
|
type: "inbox",
|
|
547
|
-
handle: "handle",
|
|
548
535
|
identifier: "handle"
|
|
549
536
|
});
|
|
550
537
|
federation.setOutboxDispatcher("/users/{identifier}/outbox", () => ({ items: [] }));
|
|
551
538
|
assertEquals(ctx.getOutboxUri("handle"), new URL("https://ap.example.com/users/handle/outbox"));
|
|
552
539
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle/outbox")), {
|
|
553
540
|
type: "outbox",
|
|
554
|
-
handle: "handle",
|
|
555
541
|
identifier: "handle"
|
|
556
542
|
});
|
|
557
543
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle/outbox")), {
|
|
558
544
|
type: "outbox",
|
|
559
|
-
handle: "handle",
|
|
560
545
|
identifier: "handle"
|
|
561
546
|
});
|
|
562
547
|
federation.setFollowingDispatcher("/users/{identifier}/following", () => ({ items: [] }));
|
|
563
548
|
assertEquals(ctx.getFollowingUri("handle"), new URL("https://ap.example.com/users/handle/following"));
|
|
564
549
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle/following")), {
|
|
565
550
|
type: "following",
|
|
566
|
-
handle: "handle",
|
|
567
551
|
identifier: "handle"
|
|
568
552
|
});
|
|
569
553
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle/following")), {
|
|
570
554
|
type: "following",
|
|
571
|
-
handle: "handle",
|
|
572
555
|
identifier: "handle"
|
|
573
556
|
});
|
|
574
557
|
federation.setFollowersDispatcher("/users/{identifier}/followers", () => ({ items: [] }));
|
|
575
558
|
assertEquals(ctx.getFollowersUri("handle"), new URL("https://ap.example.com/users/handle/followers"));
|
|
576
559
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle/followers")), {
|
|
577
560
|
type: "followers",
|
|
578
|
-
handle: "handle",
|
|
579
561
|
identifier: "handle"
|
|
580
562
|
});
|
|
581
563
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle/followers")), {
|
|
582
564
|
type: "followers",
|
|
583
|
-
handle: "handle",
|
|
584
565
|
identifier: "handle"
|
|
585
566
|
});
|
|
586
567
|
federation.setLikedDispatcher("/users/{identifier}/liked", () => ({ items: [] }));
|
|
587
568
|
assertEquals(ctx.getLikedUri("handle"), new URL("https://ap.example.com/users/handle/liked"));
|
|
588
569
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle/liked")), {
|
|
589
570
|
type: "liked",
|
|
590
|
-
handle: "handle",
|
|
591
571
|
identifier: "handle"
|
|
592
572
|
});
|
|
593
573
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle/liked")), {
|
|
594
574
|
type: "liked",
|
|
595
|
-
handle: "handle",
|
|
596
575
|
identifier: "handle"
|
|
597
576
|
});
|
|
598
577
|
federation.setFeaturedDispatcher("/users/{identifier}/featured", () => ({ items: [] }));
|
|
599
578
|
assertEquals(ctx.getFeaturedUri("handle"), new URL("https://ap.example.com/users/handle/featured"));
|
|
600
579
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle/featured")), {
|
|
601
580
|
type: "featured",
|
|
602
|
-
handle: "handle",
|
|
603
581
|
identifier: "handle"
|
|
604
582
|
});
|
|
605
583
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle/featured")), {
|
|
606
584
|
type: "featured",
|
|
607
|
-
handle: "handle",
|
|
608
585
|
identifier: "handle"
|
|
609
586
|
});
|
|
610
587
|
federation.setFeaturedTagsDispatcher("/users/{identifier}/tags", () => ({ items: [] }));
|
|
611
588
|
assertEquals(ctx.getFeaturedTagsUri("handle"), new URL("https://ap.example.com/users/handle/tags"));
|
|
612
589
|
assertEquals(ctx.parseUri(new URL("https://ap.example.com/users/handle/tags")), {
|
|
613
590
|
type: "featuredTags",
|
|
614
|
-
handle: "handle",
|
|
615
591
|
identifier: "handle"
|
|
616
592
|
});
|
|
617
593
|
assertEquals(ctx.parseUri(new URL("https://example.com:1234/users/handle/tags")), {
|
|
618
594
|
type: "featuredTags",
|
|
619
|
-
handle: "handle",
|
|
620
595
|
identifier: "handle"
|
|
621
596
|
});
|
|
622
597
|
});
|
|
@@ -952,7 +927,7 @@ test("Federation.setInboxListeners()", async (t) => {
|
|
|
952
927
|
});
|
|
953
928
|
assertThrows(() => federation.setInboxListeners("/users/inbox"), RouterError);
|
|
954
929
|
assertThrows(() => federation.setInboxListeners("/users/{identifier}/inbox/{id2}"), RouterError);
|
|
955
|
-
assertThrows(() => federation.setInboxListeners("/users/{identifier}/inbox/{
|
|
930
|
+
assertThrows(() => federation.setInboxListeners("/users/{identifier}/inbox/{extra}"), RouterError);
|
|
956
931
|
assertThrows(() => federation.setInboxListeners("/users/{identifier2}/inbox"), RouterError);
|
|
957
932
|
});
|
|
958
933
|
await t.step("on()", async () => {
|
|
@@ -1663,8 +1638,8 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1663
1638
|
data: void 0,
|
|
1664
1639
|
federation,
|
|
1665
1640
|
url: new URL("https://example.com/"),
|
|
1666
|
-
documentLoader
|
|
1667
|
-
contextLoader:
|
|
1641
|
+
documentLoader,
|
|
1642
|
+
contextLoader: documentLoader
|
|
1668
1643
|
});
|
|
1669
1644
|
await ctx.sendActivity([{
|
|
1670
1645
|
privateKey: rsaPrivateKey2,
|
|
@@ -1767,8 +1742,8 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1767
1742
|
data: void 0,
|
|
1768
1743
|
federation: federation2,
|
|
1769
1744
|
url: new URL("https://example.com/"),
|
|
1770
|
-
documentLoader
|
|
1771
|
-
contextLoader:
|
|
1745
|
+
documentLoader,
|
|
1746
|
+
contextLoader: documentLoader
|
|
1772
1747
|
});
|
|
1773
1748
|
await t.step("fanout: \"force\"", async () => {
|
|
1774
1749
|
const activity = new vocab.Create({
|
|
@@ -1784,7 +1759,7 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1784
1759
|
type: "fanout",
|
|
1785
1760
|
activity: await activity.toJsonLd({
|
|
1786
1761
|
format: "compact",
|
|
1787
|
-
contextLoader:
|
|
1762
|
+
contextLoader: documentLoader
|
|
1788
1763
|
}),
|
|
1789
1764
|
activityId: "https://example.com/activity/1",
|
|
1790
1765
|
activityType: "https://www.w3.org/ns/activitystreams#Create",
|
|
@@ -1862,8 +1837,8 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1862
1837
|
data: void 0,
|
|
1863
1838
|
federation,
|
|
1864
1839
|
url: new URL("https://example.com/"),
|
|
1865
|
-
documentLoader
|
|
1866
|
-
contextLoader:
|
|
1840
|
+
documentLoader,
|
|
1841
|
+
contextLoader: documentLoader
|
|
1867
1842
|
});
|
|
1868
1843
|
const activity = new vocab.Create({
|
|
1869
1844
|
id: new URL("https://example.com/activity/1"),
|
|
@@ -1879,8 +1854,8 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1879
1854
|
data: void 0,
|
|
1880
1855
|
federation,
|
|
1881
1856
|
url: new URL("https://example.com/"),
|
|
1882
|
-
documentLoader
|
|
1883
|
-
contextLoader:
|
|
1857
|
+
documentLoader,
|
|
1858
|
+
contextLoader: documentLoader
|
|
1884
1859
|
});
|
|
1885
1860
|
const activity = new vocab.Create({
|
|
1886
1861
|
id: new URL("https://example.com/activity/2"),
|
|
@@ -1963,7 +1938,7 @@ test({
|
|
|
1963
1938
|
federation,
|
|
1964
1939
|
data: void 0,
|
|
1965
1940
|
documentLoader: mockDocumentLoader,
|
|
1966
|
-
contextLoader:
|
|
1941
|
+
contextLoader: documentLoader
|
|
1967
1942
|
});
|
|
1968
1943
|
assertFalse(await ctx.routeActivity(null, new vocab.Offer({ actor: new URL("https://example.com/person") })));
|
|
1969
1944
|
assertEquals(activities, []);
|
|
@@ -2026,7 +2001,7 @@ test("ContextImpl.getCollectionUri()", () => {
|
|
|
2026
2001
|
federation,
|
|
2027
2002
|
data: void 0,
|
|
2028
2003
|
documentLoader: mockDocumentLoader,
|
|
2029
|
-
contextLoader:
|
|
2004
|
+
contextLoader: documentLoader
|
|
2030
2005
|
});
|
|
2031
2006
|
const values = { id: "123" };
|
|
2032
2007
|
const dispatcher = (_ctx, _values) => ({ items: [] });
|
|
@@ -2086,8 +2061,8 @@ test("InboxContextImpl.forwardActivity()", async (t) => {
|
|
|
2086
2061
|
data: void 0,
|
|
2087
2062
|
federation,
|
|
2088
2063
|
url: new URL("https://example.com/"),
|
|
2089
|
-
documentLoader
|
|
2090
|
-
contextLoader:
|
|
2064
|
+
documentLoader,
|
|
2065
|
+
contextLoader: documentLoader
|
|
2091
2066
|
});
|
|
2092
2067
|
await ctx.forwardActivity([{
|
|
2093
2068
|
privateKey: rsaPrivateKey2,
|
|
@@ -2109,8 +2084,8 @@ test("InboxContextImpl.forwardActivity()", async (t) => {
|
|
|
2109
2084
|
data: void 0,
|
|
2110
2085
|
federation,
|
|
2111
2086
|
url: new URL("https://example.com/"),
|
|
2112
|
-
documentLoader
|
|
2113
|
-
contextLoader:
|
|
2087
|
+
documentLoader,
|
|
2088
|
+
contextLoader: documentLoader
|
|
2114
2089
|
});
|
|
2115
2090
|
await assertRejects(() => ctx.forwardActivity([{
|
|
2116
2091
|
privateKey: rsaPrivateKey2,
|
|
@@ -2133,8 +2108,8 @@ test("InboxContextImpl.forwardActivity()", async (t) => {
|
|
|
2133
2108
|
data: void 0,
|
|
2134
2109
|
federation,
|
|
2135
2110
|
url: new URL("https://example.com/"),
|
|
2136
|
-
documentLoader
|
|
2137
|
-
contextLoader:
|
|
2111
|
+
documentLoader,
|
|
2112
|
+
contextLoader: documentLoader
|
|
2138
2113
|
});
|
|
2139
2114
|
await ctx.forwardActivity([{
|
|
2140
2115
|
privateKey: rsaPrivateKey2,
|
|
@@ -2156,8 +2131,8 @@ test("InboxContextImpl.forwardActivity()", async (t) => {
|
|
|
2156
2131
|
data: void 0,
|
|
2157
2132
|
federation,
|
|
2158
2133
|
url: new URL("https://example.com/"),
|
|
2159
|
-
documentLoader
|
|
2160
|
-
contextLoader:
|
|
2134
|
+
documentLoader,
|
|
2135
|
+
contextLoader: documentLoader
|
|
2161
2136
|
});
|
|
2162
2137
|
await ctx.forwardActivity([{
|
|
2163
2138
|
privateKey: rsaPrivateKey2,
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
require('../transformers-3g8GZwkZ.cjs');
|
|
6
|
-
require('../http-
|
|
7
|
-
const require_middleware = require('../middleware-
|
|
8
|
-
require('../proof-
|
|
6
|
+
require('../http-CowIBMKY.cjs');
|
|
7
|
+
const require_middleware = require('../middleware-aQr0yVne.cjs');
|
|
8
|
+
require('../proof-DQFAjOse.cjs');
|
|
9
9
|
const require_federation = require('../federation-Bp3HI26G.cjs');
|
|
10
10
|
require('../types-Cd_hszr_.cjs');
|
|
11
|
-
require('../kv-cache-
|
|
11
|
+
require('../kv-cache-174yQHE6.cjs');
|
|
12
12
|
|
|
13
13
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
14
14
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../client-CwkOPN13.cjs";
|
|
2
2
|
import "../http-CCEu-x1_.cjs";
|
|
3
3
|
import "../owner-9yZ5Ibsb.cjs";
|
|
4
|
-
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions,
|
|
4
|
+
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-BdNW_8a3.cjs";
|
|
5
5
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-g9jFc34-.cjs";
|
|
6
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "../mod-
|
|
7
|
-
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions,
|
|
6
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "../mod-BcpEGTWV.cjs";
|
|
7
|
+
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "../client-a7NwzhA2.js";
|
|
4
4
|
import "../http-CODSJcKx.js";
|
|
5
5
|
import "../owner-DQYAbVmX.js";
|
|
6
|
-
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions,
|
|
6
|
+
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-C-GVKcJR.js";
|
|
7
7
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-jg_8SMc1.js";
|
|
8
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "../mod-
|
|
9
|
-
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions,
|
|
8
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "../mod-CtO31FCx.js";
|
|
9
|
+
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import "../transformers-C3FLHUd6.js";
|
|
6
|
-
import "../http-
|
|
7
|
-
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
|
8
|
-
import "../proof-
|
|
6
|
+
import "../http-DoLgvgZ3.js";
|
|
7
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-D5JdOwAE.js";
|
|
8
|
+
import "../proof-C85CNL5a.js";
|
|
9
9
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-DaMfqRm4.js";
|
|
10
10
|
import "../types-C93Ob9cU.js";
|
|
11
|
-
import "../kv-cache-
|
|
11
|
+
import "../kv-cache-CFlvozMZ.js";
|
|
12
12
|
|
|
13
13
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -7,11 +7,11 @@ import { createTestTracerProvider, mockDocumentLoader, test } from "../dist-B5f6
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import "../key-
|
|
12
|
-
import { verifyRequest } from "../http-
|
|
13
|
-
import { doesActorOwnKey } from "../owner-
|
|
14
|
-
import { SendActivityError, extractInboxes, sendActivity } from "../send-
|
|
10
|
+
import "../deno-CJgVX6Dr.js";
|
|
11
|
+
import "../key-BQD4Ef_6.js";
|
|
12
|
+
import { verifyRequest } from "../http-CMTBVAxQ.js";
|
|
13
|
+
import { doesActorOwnKey } from "../owner-DbymvgVI.js";
|
|
14
|
+
import { SendActivityError, extractInboxes, sendActivity } from "../send-CkvEc-Tx.js";
|
|
15
15
|
import "../std__assert-DWivtrGR.js";
|
|
16
16
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
17
17
|
import "../assert_throws-BNXdRGWP.js";
|
|
@@ -293,6 +293,91 @@ test("sendActivity()", async (t) => {
|
|
|
293
293
|
assertEquals(e.responseBody, "Not Found");
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
|
+
const longErrorBody = "x".repeat(1500);
|
|
297
|
+
esm_default.post("https://example.com/inbox-long-error", {
|
|
298
|
+
status: 500,
|
|
299
|
+
body: longErrorBody
|
|
300
|
+
});
|
|
301
|
+
await t.step("long error response body is truncated", async () => {
|
|
302
|
+
const activity = {
|
|
303
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
304
|
+
"type": "Create",
|
|
305
|
+
"id": "https://example.com/activity",
|
|
306
|
+
"actor": "https://example.com/person"
|
|
307
|
+
};
|
|
308
|
+
try {
|
|
309
|
+
await sendActivity({
|
|
310
|
+
activity,
|
|
311
|
+
activityId: "https://example.com/activity",
|
|
312
|
+
keys: [{
|
|
313
|
+
privateKey: rsaPrivateKey2,
|
|
314
|
+
keyId: rsaPublicKey2.id
|
|
315
|
+
}],
|
|
316
|
+
inbox: new URL("https://example.com/inbox-long-error")
|
|
317
|
+
});
|
|
318
|
+
assert(false, "Should have thrown");
|
|
319
|
+
} catch (e) {
|
|
320
|
+
assertInstanceOf(e, SendActivityError);
|
|
321
|
+
assertEquals(e.statusCode, 500);
|
|
322
|
+
assertEquals(e.inbox, new URL("https://example.com/inbox-long-error"));
|
|
323
|
+
const expectedTruncated = "x".repeat(1024) + "… (truncated)";
|
|
324
|
+
assertEquals(e.responseBody, expectedTruncated);
|
|
325
|
+
assertEquals(e.message.includes("… (truncated)"), true);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
await t.step("short error response body is not truncated", async () => {
|
|
329
|
+
const activity = {
|
|
330
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
331
|
+
"type": "Create",
|
|
332
|
+
"id": "https://example.com/activity",
|
|
333
|
+
"actor": "https://example.com/person"
|
|
334
|
+
};
|
|
335
|
+
try {
|
|
336
|
+
await sendActivity({
|
|
337
|
+
activity,
|
|
338
|
+
activityId: "https://example.com/activity",
|
|
339
|
+
keys: [{
|
|
340
|
+
privateKey: rsaPrivateKey2,
|
|
341
|
+
keyId: rsaPublicKey2.id
|
|
342
|
+
}],
|
|
343
|
+
inbox: new URL("https://example.com/inbox2")
|
|
344
|
+
});
|
|
345
|
+
assert(false, "Should have thrown");
|
|
346
|
+
} catch (e) {
|
|
347
|
+
assertInstanceOf(e, SendActivityError);
|
|
348
|
+
assertEquals(e.responseBody, "something went wrong");
|
|
349
|
+
assertEquals(e.message.includes("… (truncated)"), false);
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
const exactLimitBody = "y".repeat(1024);
|
|
353
|
+
esm_default.post("https://example.com/inbox-exact-limit", {
|
|
354
|
+
status: 500,
|
|
355
|
+
body: exactLimitBody
|
|
356
|
+
});
|
|
357
|
+
await t.step("error response body exactly at limit is not truncated", async () => {
|
|
358
|
+
const activity = {
|
|
359
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
360
|
+
"type": "Create",
|
|
361
|
+
"id": "https://example.com/activity",
|
|
362
|
+
"actor": "https://example.com/person"
|
|
363
|
+
};
|
|
364
|
+
try {
|
|
365
|
+
await sendActivity({
|
|
366
|
+
activity,
|
|
367
|
+
activityId: "https://example.com/activity",
|
|
368
|
+
keys: [{
|
|
369
|
+
privateKey: rsaPrivateKey2,
|
|
370
|
+
keyId: rsaPublicKey2.id
|
|
371
|
+
}],
|
|
372
|
+
inbox: new URL("https://example.com/inbox-exact-limit")
|
|
373
|
+
});
|
|
374
|
+
assert(false, "Should have thrown");
|
|
375
|
+
} catch (e) {
|
|
376
|
+
assertInstanceOf(e, SendActivityError);
|
|
377
|
+
assertEquals(e.responseBody, exactLimitBody);
|
|
378
|
+
assertEquals(e.message.includes("… (truncated)"), false);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
296
381
|
esm_default.hardReset();
|
|
297
382
|
});
|
|
298
383
|
test("sendActivity() records OpenTelemetry span events", async (t) => {
|
|
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
-
import "../deno-
|
|
12
|
-
import { createFederation, handleWebFinger } from "../middleware-
|
|
11
|
+
import "../deno-CJgVX6Dr.js";
|
|
12
|
+
import { createFederation, handleWebFinger } from "../middleware-BN-t5M_R.js";
|
|
13
13
|
import "../client-Dg7OfUDA.js";
|
|
14
14
|
import "../router-D9eI0s4b.js";
|
|
15
15
|
import "../types-CPz01LGH.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-BQD4Ef_6.js";
|
|
17
|
+
import "../http-CMTBVAxQ.js";
|
|
18
|
+
import "../ld-DNdCEe6l.js";
|
|
19
|
+
import "../owner-DbymvgVI.js";
|
|
20
|
+
import "../proof-DVBdddim.js";
|
|
21
|
+
import "../docloader-BMecQIi-.js";
|
|
22
22
|
import "../kv-cache-B__dHl7g.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-BrQMunLn.js";
|
|
24
|
+
import "../builder-DIwRDV19.js";
|
|
25
25
|
import "../collection-CcnIw1qY.js";
|
|
26
26
|
import "../keycache-DRxpZ5r9.js";
|
|
27
27
|
import "../negotiation-5NPJL6zp.js";
|
|
28
28
|
import "../retry-D4GJ670a.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-CkvEc-Tx.js";
|
|
30
30
|
import "../std__assert-DWivtrGR.js";
|
|
31
31
|
import "../assert_rejects-Ce45JcFg.js";
|
|
32
32
|
import "../assert_throws-BNXdRGWP.js";
|
|
@@ -57,10 +57,7 @@ test("handleWebFinger()", async (t) => {
|
|
|
57
57
|
const identifier = paths[paths.length - 1];
|
|
58
58
|
return {
|
|
59
59
|
type: "actor",
|
|
60
|
-
identifier
|
|
61
|
-
get handle() {
|
|
62
|
-
throw new Error("ParseUriResult.handle is deprecated!");
|
|
63
|
-
}
|
|
60
|
+
identifier
|
|
64
61
|
};
|
|
65
62
|
}
|
|
66
63
|
});
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { deno_default } from "./deno-CJgVX6Dr.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BQD4Ef_6.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { CryptographicKey } from "@fedify/vocab";
|
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -14,7 +14,7 @@ const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runt
|
|
|
14
14
|
|
|
15
15
|
//#region deno.json
|
|
16
16
|
var name = "@fedify/fedify";
|
|
17
|
-
var version = "2.0.0
|
|
17
|
+
var version = "2.0.0";
|
|
18
18
|
var license = "MIT";
|
|
19
19
|
var exports$1 = {
|
|
20
20
|
".": "./src/mod.ts",
|
|
@@ -29,9 +29,6 @@ var exports$1 = {
|
|
|
29
29
|
};
|
|
30
30
|
var imports = {
|
|
31
31
|
"@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
|
|
32
|
-
"@opentelemetry/core": "npm:@opentelemetry/core@^2.0.0",
|
|
33
|
-
"@opentelemetry/sdk-trace-base": "npm:@opentelemetry/sdk-trace-base@^2.0.0",
|
|
34
|
-
"@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
|
|
35
32
|
"@std/assert": "jsr:@std/assert@^0.226.0",
|
|
36
33
|
"@std/url": "jsr:@std/url@^0.225.1",
|
|
37
34
|
"asn1js": "npm:asn1js@^3.0.7",
|