@fedify/fedify 1.8.0-dev.915 → 1.8.0-dev.924
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/{actor-C2tjdu5s.js → actor-9PhiRACT.js} +3 -3
- package/dist/{actor-BfBU6FbG.js → actor-oimF5eHm.js} +179 -179
- package/dist/{authdocloader-DOmS3C6v.js → authdocloader-BruelKcm.js} +3 -3
- package/dist/{authdocloader-C2sX27AJ.js → authdocloader-lDftI0ne.js} +3 -3
- package/dist/{builder-D4k8ctUG.js → builder-Bzxp2VWv.js} +3 -3
- package/dist/{client-D9lMce31.js → client-D3A734so.js} +1 -1
- package/dist/compat/transformers.test.js +17 -17
- package/dist/{context-CtB-FO11.js → context-gA0tGf68.js} +2 -2
- package/dist/{docloader-D1xnpDtP.js → docloader-CGfv2rvb.js} +3 -10
- package/dist/{docloader-B20NUVtp.js → docloader-CyNmMSkG.js} +3 -10
- package/dist/federation/builder.test.js +4 -4
- package/dist/federation/handler.test.js +19 -19
- package/dist/federation/inbox.test.js +3 -3
- package/dist/federation/keycache.test.js +3 -3
- package/dist/federation/middleware.test.js +633 -619
- package/dist/federation/mod.js +10 -10
- package/dist/federation/send.test.js +9 -9
- package/dist/{http-CNqEvMJS.js → http-B5PkFdNj.js} +8 -22
- package/dist/{http-Do6RItv1.js → http-ff4AtN39.js} +8 -22
- package/dist/{inbox-B2c8n0Ls.js → inbox-Cjm1znrU.js} +2 -2
- package/dist/{key-DZ0DINCI.js → key-BWuYGonw.js} +4 -4
- package/dist/{key-ZK-LwRVh.js → key-CpwZWtNM.js} +2 -2
- package/dist/{key-COFSZzKU.js → key-CteUzRSV.js} +5 -5
- package/dist/{key-DrgKk40B.js → key-Um4sh1N6.js} +3 -3
- package/dist/{keycache-BxtzgJci.js → keycache-CiTUP-Dz.js} +1 -1
- package/dist/{keys-B0sdIfwJ.js → keys-BvOc5uvr.js} +1 -1
- package/dist/{ld-BLKnKaK7.js → ld-rQ11V08a.js} +3 -3
- package/dist/{lookup-B8C1VUd-.js → lookup-CxaB7DuB.js} +1 -1
- package/dist/{lookup-DB4KBPzS.js → lookup-D4p7VkZm.js} +3 -3
- package/dist/{lookup-BjM6lcWp.js → lookup-DEyi3nji.js} +1 -1
- package/dist/middleware-8wVCeLbb.js +33 -0
- package/dist/{middleware--QNq1t3x.js → middleware-BERGfTyN.js} +10 -10
- package/dist/{middleware-CwZI_AVb.js → middleware-BZ-j4X5w.js} +15 -15
- package/dist/middleware-CLTaO45a.js +17 -0
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +2 -2
- package/dist/nodeinfo/handler.test.js +18 -18
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/{owner-CMXCDkm7.js → owner-C2_DehS0.js} +3 -3
- package/dist/{proof-DuqOMoN2.js → proof-BMDB8v0I.js} +3 -3
- package/dist/{proof-C53FqDVT.js → proof-DrQbbCHo.js} +3 -3
- package/dist/runtime/authdocloader.test.js +8 -8
- package/dist/runtime/docloader.test.js +1 -1
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/{send-CZy82bkt.js → send-CZ_2NuZb.js} +2 -2
- package/dist/sig/http.test.js +8 -36
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +8 -8
- package/dist/sig/proof.test.js +7 -7
- package/dist/{types-B6G9-OB6.js → types-BKmURFWc.js} +1 -1
- package/dist/vocab/actor.test.js +59 -52
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +78 -64
- package/dist/{vocab-CFUe53aj.js → vocab-CP1qYXkN.js} +3 -3
- package/dist/{vocab-L463EkMf.js → vocab-CdEc1ifZ.js} +178 -178
- package/dist/webfinger/handler.test.js +18 -18
- package/dist/webfinger/lookup.test.js +2 -2
- package/dist/webfinger/mod.js +2 -2
- package/package.json +5 -4
- package/dist/middleware-Dw2rLCBu.js +0 -33
- package/dist/middleware-kMKXiTuc.js +0 -17
package/dist/vocab/vocab.test.js
CHANGED
@@ -6,10 +6,10 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import { assert } from "../assert-DwEa6glZ.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-CyNmMSkG.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import { decode } from "../multibase-DeCHcK8L.js";
|
12
|
-
import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "../vocab-
|
12
|
+
import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "../vocab-CdEc1ifZ.js";
|
13
13
|
import { LanguageString } from "../langstr-DbWheeIS.js";
|
14
14
|
import { test } from "../testing-BZ0dJ4qn.js";
|
15
15
|
import "../std__assert-B3iAixc-.js";
|
@@ -18,7 +18,7 @@ import "../assert_is_error-DQdKoRgb.js";
|
|
18
18
|
import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
|
19
19
|
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
20
20
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
21
|
-
import { ed25519PublicKey, rsaPublicKey1 } from "../keys-
|
21
|
+
import { ed25519PublicKey, rsaPublicKey1 } from "../keys-BvOc5uvr.js";
|
22
22
|
import { pascalCase } from "es-toolkit";
|
23
23
|
import { parseLanguageTag } from "@phensley/language-tag";
|
24
24
|
import { Validator } from "@cfworker/json-schema";
|
@@ -2691,73 +2691,87 @@ test("Activity.fromJsonLd()", async () => {
|
|
2691
2691
|
assertEquals(proofs[0].proofValue, decode("z3sXaxjKs4M3BRicwWA9peyNPJvJqxtGsDmpt1jjoHCjgeUf71TRFz56osPSfDErszyLp5Ks1EhYSgpDaNM977Rg2"));
|
2692
2692
|
assertEquals(proofs[0].created, Temporal.Instant.from("2023-02-24T23:36:38Z"));
|
2693
2693
|
});
|
2694
|
-
test(
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
}
|
2700
|
-
|
2701
|
-
|
2702
|
-
|
2703
|
-
|
2704
|
-
|
2705
|
-
|
2706
|
-
|
2707
|
-
|
2708
|
-
|
2709
|
-
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2713
|
-
|
2714
|
-
|
2715
|
-
|
2716
|
-
|
2717
|
-
|
2694
|
+
test({
|
2695
|
+
name: "Activity.getObject()",
|
2696
|
+
permissions: {
|
2697
|
+
env: true,
|
2698
|
+
read: true
|
2699
|
+
},
|
2700
|
+
async fn() {
|
2701
|
+
const activity = new Activity({ object: new URL("https://example.com/announce") });
|
2702
|
+
const announce = await activity.getObject({
|
2703
|
+
documentLoader: mockDocumentLoader,
|
2704
|
+
contextLoader: mockDocumentLoader
|
2705
|
+
});
|
2706
|
+
assertInstanceOf(announce, Announce);
|
2707
|
+
assertEquals(announce.id, new URL("https://example.com/announce"));
|
2708
|
+
const object = await announce.getObject();
|
2709
|
+
assertInstanceOf(object, Object$1);
|
2710
|
+
assertEquals(object.id, new URL("https://example.com/object"));
|
2711
|
+
assertEquals(object.name, "Fetched object");
|
2712
|
+
const jsonLd = await activity.toJsonLd();
|
2713
|
+
assertEquals(jsonLd, {
|
2714
|
+
"@context": [
|
2715
|
+
"https://w3id.org/identity/v1",
|
2716
|
+
"https://www.w3.org/ns/activitystreams",
|
2717
|
+
"https://w3id.org/security/v1",
|
2718
|
+
"https://w3id.org/security/data-integrity/v1"
|
2719
|
+
],
|
2720
|
+
type: "Activity",
|
2718
2721
|
object: {
|
2719
|
-
|
2720
|
-
|
2721
|
-
|
2722
|
+
id: "https://example.com/announce",
|
2723
|
+
type: "Announce",
|
2724
|
+
object: {
|
2725
|
+
type: "Object",
|
2726
|
+
id: "https://example.com/object",
|
2727
|
+
name: "Fetched object"
|
2728
|
+
}
|
2722
2729
|
}
|
2723
|
-
}
|
2724
|
-
|
2725
|
-
|
2726
|
-
|
2727
|
-
|
2728
|
-
|
2729
|
-
|
2730
|
-
|
2730
|
+
});
|
2731
|
+
const activity2 = new Activity({ object: new URL("https://example.com/not-found") });
|
2732
|
+
assertEquals(await activity2.getObject({ suppressError: true }), null);
|
2733
|
+
const activity3 = await Activity.fromJsonLd({
|
2734
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
2735
|
+
type: "Create",
|
2736
|
+
object: {
|
2737
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
2738
|
+
type: "Note",
|
2739
|
+
content: "Hello world"
|
2740
|
+
}
|
2741
|
+
});
|
2742
|
+
const object3 = await activity3.getObject();
|
2743
|
+
assertInstanceOf(object3, Note);
|
2744
|
+
assertEquals(await object3.toJsonLd(), {
|
2731
2745
|
"@context": "https://www.w3.org/ns/activitystreams",
|
2732
2746
|
type: "Note",
|
2733
2747
|
content: "Hello world"
|
2734
|
-
}
|
2735
|
-
}
|
2736
|
-
const object3 = await activity3.getObject();
|
2737
|
-
assertInstanceOf(object3, Note);
|
2738
|
-
assertEquals(await object3.toJsonLd(), {
|
2739
|
-
"@context": "https://www.w3.org/ns/activitystreams",
|
2740
|
-
type: "Note",
|
2741
|
-
content: "Hello world"
|
2742
|
-
});
|
2748
|
+
});
|
2749
|
+
}
|
2743
2750
|
});
|
2744
|
-
test(
|
2745
|
-
|
2746
|
-
|
2747
|
-
|
2748
|
-
|
2749
|
-
}
|
2750
|
-
|
2751
|
-
|
2752
|
-
|
2753
|
-
|
2754
|
-
|
2755
|
-
|
2756
|
-
|
2757
|
-
|
2758
|
-
|
2759
|
-
|
2760
|
-
|
2751
|
+
test({
|
2752
|
+
name: "Activity.getObjects()",
|
2753
|
+
permissions: {
|
2754
|
+
env: true,
|
2755
|
+
read: true
|
2756
|
+
},
|
2757
|
+
async fn() {
|
2758
|
+
const activity = new Activity({ objects: [new URL("https://example.com/object"), new Object$1({ name: "Second object" })] });
|
2759
|
+
const objects = await Array.fromAsync(activity.getObjects({
|
2760
|
+
documentLoader: mockDocumentLoader,
|
2761
|
+
contextLoader: mockDocumentLoader
|
2762
|
+
}));
|
2763
|
+
assertEquals(objects.length, 2);
|
2764
|
+
assertInstanceOf(objects[0], Object$1);
|
2765
|
+
assertEquals(objects[0].id, new URL("https://example.com/object"));
|
2766
|
+
assertEquals(objects[0].name, "Fetched object");
|
2767
|
+
assertInstanceOf(objects[1], Object$1);
|
2768
|
+
assertEquals(objects[1].name, "Second object");
|
2769
|
+
const activity2 = new Activity({ objects: [new URL("https://example.com/not-found"), new Object$1({ name: "Second object" })] });
|
2770
|
+
const objects2 = await Array.fromAsync(activity2.getObjects({ suppressError: true }));
|
2771
|
+
assertEquals(objects2.length, 1);
|
2772
|
+
assertInstanceOf(objects2[0], Object$1);
|
2773
|
+
assertEquals(objects2[0].name, "Second object");
|
2774
|
+
}
|
2761
2775
|
});
|
2762
2776
|
test("Activity.clone()", async () => {
|
2763
2777
|
const activity = new Activity({
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
6
|
-
import { Object as Object$1, getTypeId } from "./actor-
|
7
|
-
import { lookupWebFinger } from "./lookup-
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-CGfv2rvb.js";
|
6
|
+
import { Object as Object$1, getTypeId } from "./actor-oimF5eHm.js";
|
7
|
+
import { lookupWebFinger } from "./lookup-DEyi3nji.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { delay } from "es-toolkit";
|