@fedify/fedify 1.8.0-pr.278.945 → 1.8.0-pr.278.951
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-Dxvx0f9P.js → actor-BwamOVOs.js} +3 -3
- package/dist/{actor-Behcj9py.js → actor-DuYja3s_.js} +179 -179
- package/dist/{authdocloader-BXc1BFZ8.js → authdocloader-COnJz2Gi.js} +3 -3
- package/dist/{authdocloader-DY1c6aOs.js → authdocloader-DAhh8Fj0.js} +3 -3
- package/dist/{builder-gDKDK22-.js → builder-BqFNBlWO.js} +3 -3
- package/dist/{client-BPCBiziZ.js → client-DGzWjDhk.js} +1 -1
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/transformers.test.js +17 -17
- package/dist/{context-C1ubq7jR.js → context-B6lp2Mp_.js} +2 -2
- package/dist/{context-BcKmG9xN.d.ts → context-CutbDY_L.d.ts} +1 -1
- package/dist/{docloader-O4fyv2uj.js → docloader-DZLBnsTj.js} +1 -1
- package/dist/{docloader-DcinBWzj.js → docloader-DkAapQc_.js} +1 -1
- 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 +18 -18
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +10 -10
- package/dist/federation/send.test.js +9 -9
- package/dist/{http-hLVF16gF.js → http-BDTHMKLY.js} +3 -3
- package/dist/{http-IR0xaYwB.js → http-_NLh4AQw.js} +3 -3
- package/dist/{inbox-DqwAYVig.js → inbox-C1fucqgb.js} +2 -2
- package/dist/{key-C1tpCgUM.js → key-BLo_aRf-.js} +5 -5
- package/dist/{key-WFNxUdQ-.js → key-BYYZAmsY.js} +2 -2
- package/dist/{key-t46lhcQN.js → key-C4cogquc.js} +3 -3
- package/dist/{key-CbzWCmJI.js → key-DXdAlXWe.js} +4 -4
- package/dist/{keycache-BgQFkjKO.js → keycache-SBjbS-RE.js} +1 -1
- package/dist/{keys-GHRFZ7j3.js → keys-ur1F_g7P.js} +1 -1
- package/dist/{ld-BhYJt-vy.js → ld-DqPMDWzB.js} +3 -3
- package/dist/{lookup-Di6jcHLC.js → lookup-Ceatq76e.js} +55 -14
- package/dist/{lookup-De-_toBG.js → lookup-LMJC-TLp.js} +1 -1
- package/dist/{lookup-CDaogTUU.js → lookup-tn6iksxL.js} +1 -1
- package/dist/middleware-3IJXQ5eC.js +33 -0
- package/dist/{middleware-Q4Z2LOxp.js → middleware-BZp6TsV9.js} +15 -15
- package/dist/{middleware-rf7kn0wx.js → middleware-D9lp51Qo.js} +10 -10
- package/dist/middleware-ft1ILMHe.js +17 -0
- package/dist/{mod-C8RR-LnX.d.ts → mod-DUH25XRb.d.ts} +1 -1
- package/dist/{mod-NxG6Toqa.d.ts → mod-yjbK0F05.d.ts} +66 -7
- package/dist/mod.d.ts +4 -4
- package/dist/mod.js +11 -11
- 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-DaEtXgj4.js → owner-H215iqvU.js} +3 -3
- package/dist/{proof-DLb5N3kt.js → proof-BKCny61f.js} +3 -3
- package/dist/{proof-CfZsNDSH.js → proof-f69jWqQJ.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-BlXELCOR.js → send-DvVUb-A7.js} +2 -2
- package/dist/sig/http.test.js +7 -7
- 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-CBbRiLwY.js → types-CO3XVJo_.js} +1 -1
- package/dist/vocab/actor.test.js +4 -4
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.d.ts +2 -2
- package/dist/vocab/mod.js +5 -5
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +3 -3
- package/dist/{vocab-gGnDYBK6.js → vocab-BhuePG48.js} +74 -15
- package/dist/{vocab-CzWmRNkq.js → vocab-x1J4xmfs.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/dist/x/hono.d.ts +2 -2
- package/dist/x/sveltekit.d.ts +2 -2
- package/package.json +1 -1
- package/dist/middleware-CMoyF9JL.js +0 -17
- package/dist/middleware-DslY5EoX.js +0 -33
package/dist/runtime/mod.js
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-
|
6
|
-
import { LanguageString, exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../actor-
|
7
|
-
import "../lookup-
|
8
|
-
import "../key-
|
9
|
-
import "../http-
|
10
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
5
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-DZLBnsTj.js";
|
6
|
+
import { LanguageString, exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../actor-DuYja3s_.js";
|
7
|
+
import "../lookup-LMJC-TLp.js";
|
8
|
+
import "../key-BYYZAmsY.js";
|
9
|
+
import "../http-BDTHMKLY.js";
|
10
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-COnJz2Gi.js";
|
11
11
|
import "../runtime-BSkOVUWM.js";
|
12
12
|
|
13
13
|
export { FetchError, LanguageString, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { doubleKnock } from "./http-
|
6
|
+
import { deno_default } from "./docloader-DkAapQc_.js";
|
7
|
+
import { doubleKnock } from "./http-_NLh4AQw.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
|
package/dist/sig/http.test.js
CHANGED
@@ -6,16 +6,16 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import { assert } from "../assert-DwEa6glZ.js";
|
8
8
|
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-DkAapQc_.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../multibase-DeCHcK8L.js";
|
12
|
-
import { exportSpki } from "../vocab-
|
12
|
+
import { exportSpki } from "../vocab-x1J4xmfs.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-tn6iksxL.js";
|
15
15
|
import "../type-D2s5lmbZ.js";
|
16
|
-
import "../actor-
|
17
|
-
import { exportJwk } from "../key-
|
18
|
-
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-
|
16
|
+
import "../actor-BwamOVOs.js";
|
17
|
+
import { exportJwk } from "../key-C4cogquc.js";
|
18
|
+
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-_NLh4AQw.js";
|
19
19
|
import { test } from "../testing-BZ0dJ4qn.js";
|
20
20
|
import { assertExists, assertStringIncludes } from "../std__assert-B3iAixc-.js";
|
21
21
|
import { assertFalse } from "../assert_rejects-DceVjUlD.js";
|
@@ -23,7 +23,7 @@ import "../assert_is_error-DQdKoRgb.js";
|
|
23
23
|
import "../assert_not_equals-7pyUM3Ib.js";
|
24
24
|
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
25
25
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
26
|
-
import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-
|
26
|
+
import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-ur1F_g7P.js";
|
27
27
|
import { esm_default } from "../esm-d-9EVGaP.js";
|
28
28
|
import { encodeBase64 } from "byte-encodings/base64";
|
29
29
|
|
package/dist/sig/key.test.js
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import "../assert-DwEa6glZ.js";
|
8
8
|
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-DkAapQc_.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../multibase-DeCHcK8L.js";
|
12
|
-
import { CryptographicKey, Multikey } from "../vocab-
|
12
|
+
import { CryptographicKey, Multikey } from "../vocab-x1J4xmfs.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-tn6iksxL.js";
|
15
15
|
import "../type-D2s5lmbZ.js";
|
16
|
-
import "../actor-
|
17
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-
|
16
|
+
import "../actor-BwamOVOs.js";
|
17
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-C4cogquc.js";
|
18
18
|
import { test } from "../testing-BZ0dJ4qn.js";
|
19
19
|
import "../std__assert-B3iAixc-.js";
|
20
20
|
import { assertRejects } from "../assert_rejects-DceVjUlD.js";
|
@@ -22,7 +22,7 @@ import "../assert_is_error-DQdKoRgb.js";
|
|
22
22
|
import "../assert_not_equals-7pyUM3Ib.js";
|
23
23
|
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
24
24
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
25
|
-
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
25
|
+
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-ur1F_g7P.js";
|
26
26
|
|
27
27
|
//#region sig/key.test.ts
|
28
28
|
test("validateCryptoKey()", async () => {
|
package/dist/sig/ld.test.js
CHANGED
@@ -5,22 +5,22 @@
|
|
5
5
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import { assert } from "../assert-DwEa6glZ.js";
|
8
|
-
import "../docloader-
|
8
|
+
import "../docloader-DkAapQc_.js";
|
9
9
|
import "../url-kTAI6_KP.js";
|
10
10
|
import "../multibase-DeCHcK8L.js";
|
11
|
-
import { CryptographicKey } from "../vocab-
|
11
|
+
import { CryptographicKey } from "../vocab-x1J4xmfs.js";
|
12
12
|
import "../langstr-DbWheeIS.js";
|
13
|
-
import "../lookup-
|
13
|
+
import "../lookup-tn6iksxL.js";
|
14
14
|
import "../type-D2s5lmbZ.js";
|
15
|
-
import "../actor-
|
16
|
-
import { generateCryptoKeyPair } from "../key-
|
17
|
-
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-
|
15
|
+
import "../actor-BwamOVOs.js";
|
16
|
+
import { generateCryptoKeyPair } from "../key-C4cogquc.js";
|
17
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-DqPMDWzB.js";
|
18
18
|
import { test } from "../testing-BZ0dJ4qn.js";
|
19
19
|
import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
|
20
20
|
import "../assert_is_error-DQdKoRgb.js";
|
21
21
|
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
22
22
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
23
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
23
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-ur1F_g7P.js";
|
24
24
|
import { encodeBase64 } from "byte-encodings/base64";
|
25
25
|
|
26
26
|
//#region sig/ld.test.ts
|
package/dist/sig/mod.js
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import "../docloader-
|
6
|
-
import "../actor-
|
7
|
-
import "../lookup-
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "../key-
|
9
|
-
import { signRequest, verifyRequest } from "../http-
|
10
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-
|
5
|
+
import "../docloader-DZLBnsTj.js";
|
6
|
+
import "../actor-DuYja3s_.js";
|
7
|
+
import "../lookup-LMJC-TLp.js";
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "../key-BYYZAmsY.js";
|
9
|
+
import { signRequest, verifyRequest } from "../http-BDTHMKLY.js";
|
10
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-f69jWqQJ.js";
|
11
11
|
import "../sig-BXJO--F9.js";
|
12
12
|
|
13
13
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/owner.test.js
CHANGED
@@ -6,17 +6,17 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import { assert } from "../assert-DwEa6glZ.js";
|
8
8
|
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-DkAapQc_.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../multibase-DeCHcK8L.js";
|
12
|
-
import { Create } from "../vocab-
|
12
|
+
import { Create } from "../vocab-x1J4xmfs.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-tn6iksxL.js";
|
15
15
|
import "../type-D2s5lmbZ.js";
|
16
|
-
import "../actor-
|
17
|
-
import "../key-
|
18
|
-
import { doesActorOwnKey, getKeyOwner } from "../owner-
|
19
|
-
import { lookupObject } from "../lookup-
|
16
|
+
import "../actor-BwamOVOs.js";
|
17
|
+
import "../key-C4cogquc.js";
|
18
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-H215iqvU.js";
|
19
|
+
import { lookupObject } from "../lookup-Ceatq76e.js";
|
20
20
|
import { test } from "../testing-BZ0dJ4qn.js";
|
21
21
|
import "../std__assert-B3iAixc-.js";
|
22
22
|
import { assertFalse } from "../assert_rejects-DceVjUlD.js";
|
@@ -24,7 +24,7 @@ import "../assert_is_error-DQdKoRgb.js";
|
|
24
24
|
import "../assert_not_equals-7pyUM3Ib.js";
|
25
25
|
import "../assert_throws-DTDC_gwN.js";
|
26
26
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
27
|
-
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-
|
27
|
+
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-ur1F_g7P.js";
|
28
28
|
|
29
29
|
//#region sig/owner.test.ts
|
30
30
|
test("doesActorOwnKey()", async () => {
|
package/dist/sig/proof.test.js
CHANGED
@@ -6,16 +6,16 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import "../assert-DwEa6glZ.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-DkAapQc_.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import { decode } from "../multibase-DeCHcK8L.js";
|
12
|
-
import { Create, DataIntegrityProof, Multikey, Note, Place, importMultibaseKey } from "../vocab-
|
12
|
+
import { Create, DataIntegrityProof, Multikey, Note, Place, importMultibaseKey } from "../vocab-x1J4xmfs.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-tn6iksxL.js";
|
15
15
|
import "../type-D2s5lmbZ.js";
|
16
|
-
import "../actor-
|
17
|
-
import "../key-
|
18
|
-
import { createProof, signObject, verifyObject, verifyProof } from "../proof-
|
16
|
+
import "../actor-BwamOVOs.js";
|
17
|
+
import "../key-C4cogquc.js";
|
18
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-BKCny61f.js";
|
19
19
|
import { test } from "../testing-BZ0dJ4qn.js";
|
20
20
|
import "../std__assert-B3iAixc-.js";
|
21
21
|
import { assertRejects } from "../assert_rejects-DceVjUlD.js";
|
@@ -23,7 +23,7 @@ import "../assert_is_error-DQdKoRgb.js";
|
|
23
23
|
import "../assert_not_equals-7pyUM3Ib.js";
|
24
24
|
import "../assert_throws-DTDC_gwN.js";
|
25
25
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
26
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
26
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-ur1F_g7P.js";
|
27
27
|
import { decodeHex, encodeHex } from "byte-encodings/hex";
|
28
28
|
|
29
29
|
//#region sig/proof.test.ts
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { getUserAgent } from "./docloader-
|
5
|
+
import { getUserAgent } from "./docloader-DZLBnsTj.js";
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
7
7
|
|
8
8
|
//#region nodeinfo/semver.ts
|
package/dist/vocab/actor.test.js
CHANGED
@@ -7,14 +7,14 @@ import { __export } from "../chunk-HsBuZ-b2.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
10
|
-
import "../docloader-
|
10
|
+
import "../docloader-DkAapQc_.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
12
|
import "../multibase-DeCHcK8L.js";
|
13
|
-
import { Application, Group, Organization, Person, Service } from "../vocab-
|
13
|
+
import { Application, Group, Organization, Person, Service } from "../vocab-x1J4xmfs.js";
|
14
14
|
import "../langstr-DbWheeIS.js";
|
15
|
-
import "../lookup-
|
15
|
+
import "../lookup-tn6iksxL.js";
|
16
16
|
import "../type-D2s5lmbZ.js";
|
17
|
-
import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-
|
17
|
+
import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-BwamOVOs.js";
|
18
18
|
import { test } from "../testing-BZ0dJ4qn.js";
|
19
19
|
import { assertStrictEquals } from "../std__assert-B3iAixc-.js";
|
20
20
|
import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
|
@@ -6,14 +6,14 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
7
|
import "../assert-DwEa6glZ.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-DkAapQc_.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../multibase-DeCHcK8L.js";
|
12
|
-
import { Collection, Note, Object as Object$1, Person } from "../vocab-
|
12
|
+
import { Collection, Note, Object as Object$1, Person } from "../vocab-x1J4xmfs.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-tn6iksxL.js";
|
15
15
|
import "../type-D2s5lmbZ.js";
|
16
|
-
import { lookupObject, traverseCollection } from "../lookup-
|
16
|
+
import { lookupObject, traverseCollection } from "../lookup-Ceatq76e.js";
|
17
17
|
import { test } from "../testing-BZ0dJ4qn.js";
|
18
18
|
import "../std__assert-B3iAixc-.js";
|
19
19
|
import "../assert_rejects-DceVjUlD.js";
|
package/dist/vocab/mod.d.ts
CHANGED
@@ -4,5 +4,5 @@ import "../kv-DDdb1hMa.js";
|
|
4
4
|
import "../docloader-BeCtcTOJ.js";
|
5
5
|
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "../vocab-By6mpzr-.js";
|
6
6
|
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-B4TBtqRP.js";
|
7
|
-
import { LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId,
|
8
|
-
export { Accept, Activity, Actor, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, GetActorHandleOptions, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, LookupObjectOptions, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Recipient, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId,
|
7
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, convertFediverseHandle, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, traverseCollection } from "../mod-yjbK0F05.js";
|
8
|
+
export { Accept, Activity, Actor, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, LookupObjectOptions, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Recipient, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, convertFediverseHandle, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, traverseCollection };
|
package/dist/vocab/mod.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import "../docloader-
|
6
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-
|
7
|
-
import "../lookup-
|
8
|
-
import { PUBLIC_COLLECTION,
|
5
|
+
import "../docloader-DZLBnsTj.js";
|
6
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-DuYja3s_.js";
|
7
|
+
import "../lookup-LMJC-TLp.js";
|
8
|
+
import { PUBLIC_COLLECTION, convertFediverseHandle, isFediverseHandle, lookupObject, parseFediverseHandle, traverseCollection } from "../vocab-BhuePG48.js";
|
9
9
|
|
10
|
-
export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId,
|
10
|
+
export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, convertFediverseHandle, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, traverseCollection };
|
package/dist/vocab/type.test.js
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
-
import "../docloader-
|
7
|
+
import "../docloader-DkAapQc_.js";
|
8
8
|
import "../url-kTAI6_KP.js";
|
9
9
|
import "../multibase-DeCHcK8L.js";
|
10
|
-
import { Person } from "../vocab-
|
10
|
+
import { Person } from "../vocab-x1J4xmfs.js";
|
11
11
|
import "../langstr-DbWheeIS.js";
|
12
12
|
import { getTypeId } from "../type-D2s5lmbZ.js";
|
13
13
|
import { test } from "../testing-BZ0dJ4qn.js";
|
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-DkAapQc_.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-x1J4xmfs.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-ur1F_g7P.js";
|
22
22
|
import { pascalCase } from "es-toolkit";
|
23
23
|
import { parseLanguageTag } from "@phensley/language-tag";
|
24
24
|
import { Validator } from "@cfworker/json-schema";
|
@@ -2,19 +2,14 @@
|
|
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-DZLBnsTj.js";
|
6
|
+
import { Object as Object$1, getTypeId } from "./actor-DuYja3s_.js";
|
7
|
+
import { lookupWebFinger } from "./lookup-LMJC-TLp.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { delay } from "es-toolkit";
|
11
11
|
|
12
|
-
//#region vocab/
|
13
|
-
const logger = getLogger([
|
14
|
-
"fedify",
|
15
|
-
"vocab",
|
16
|
-
"lookup"
|
17
|
-
]);
|
12
|
+
//#region vocab/handle.ts
|
18
13
|
/**
|
19
14
|
* Regular expression to match a fediverse handle in the format `@user@server` or `user@server`.
|
20
15
|
* The `user` part can contain alphanumeric characters and some special characters except `@`.
|
@@ -22,6 +17,74 @@ const logger = getLogger([
|
|
22
17
|
*/
|
23
18
|
const handleRegexp = /^@?((?:[-A-Za-z0-9._~!$&'()*+,;=]|%[A-Fa-f0-9]{2})+)@([^@]+)$/;
|
24
19
|
/**
|
20
|
+
* Parses a fediverse handle in the format `@user@server` or `user@server`.
|
21
|
+
* The `user` part can contain alphanumeric characters and some special characters except `@`.
|
22
|
+
* The `server` part is all characters after the `@` symbol in the middle.
|
23
|
+
*
|
24
|
+
* @param handle - The fediverse handle string to parse.
|
25
|
+
* @returns A {@link FediverseHandle} object with `username` and `host` if the input is valid; otherwise `null`.
|
26
|
+
* @since 1.8.0
|
27
|
+
* @example
|
28
|
+
* ```typescript
|
29
|
+
* const handle = parseFediverseHandle("@username@example.com");
|
30
|
+
* console.log(handle?.username); // "username"
|
31
|
+
* console.log(handle?.host); // "example.com"
|
32
|
+
* ```
|
33
|
+
*/
|
34
|
+
function parseFediverseHandle(handle) {
|
35
|
+
const match = handleRegexp.exec(handle);
|
36
|
+
if (match) return {
|
37
|
+
username: match[1],
|
38
|
+
host: match[2]
|
39
|
+
};
|
40
|
+
return null;
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* Checks if a string is a valid fediverse handle in the format `@user@server` or `user@server`.
|
44
|
+
* The `user` part can contain alphanumeric characters and some special characters except `@`.
|
45
|
+
* The `server` part is all characters after the `@` symbol in the middle.
|
46
|
+
*
|
47
|
+
* @param handle - The string to test as a fediverse handle.
|
48
|
+
* @returns `true` if the string matches the fediverse handle pattern; otherwise `false`.
|
49
|
+
* @since 1.8.0
|
50
|
+
* @example
|
51
|
+
* ```typescript
|
52
|
+
* console.log(isFediverseHandle("@username@example.com")); // true
|
53
|
+
* console.log(isFediverseHandle("username@example.com")); // true
|
54
|
+
* console.log(isFediverseHandle("@username@")); // false
|
55
|
+
* ```
|
56
|
+
*/
|
57
|
+
function isFediverseHandle(handle) {
|
58
|
+
return handleRegexp.test(handle);
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* Converts a fediverse handle in the format `@user@server` or `user@server`
|
62
|
+
* to an `acct:` URI, which is a URL-like identifier for ActivityPub actors.
|
63
|
+
*
|
64
|
+
* @param handle - The fediverse handle string to convert.
|
65
|
+
* @returns A `URL` object representing the `acct:` URI if conversion succeeds; otherwise `null`.
|
66
|
+
* @since 1.8.0
|
67
|
+
* @example
|
68
|
+
* ```typescript
|
69
|
+
* const identifier = convertFediverseHandle("@username@example.com");
|
70
|
+
* console.log(identifier?.href); // "acct:username@example.com"
|
71
|
+
* ```
|
72
|
+
*/
|
73
|
+
function convertFediverseHandle(handle) {
|
74
|
+
const parsed = parseFediverseHandle(handle);
|
75
|
+
if (!parsed) return null;
|
76
|
+
const identifier = new URL(`acct:${parsed.username}@${parsed.host}`);
|
77
|
+
return identifier;
|
78
|
+
}
|
79
|
+
|
80
|
+
//#endregion
|
81
|
+
//#region vocab/lookup.ts
|
82
|
+
const logger = getLogger([
|
83
|
+
"fedify",
|
84
|
+
"vocab",
|
85
|
+
"lookup"
|
86
|
+
]);
|
87
|
+
/**
|
25
88
|
* Looks up an ActivityStreams object by its URI (including `acct:` URIs)
|
26
89
|
* or a fediverse handle (e.g., `@user@server` or `user@server`).
|
27
90
|
*
|
@@ -79,11 +142,7 @@ async function lookupObject(identifier, options = {}) {
|
|
79
142
|
}
|
80
143
|
async function lookupObjectInternal(identifier, options = {}) {
|
81
144
|
const documentLoader = options.documentLoader ?? getDocumentLoader({ userAgent: options.userAgent });
|
82
|
-
if (typeof identifier === "string")
|
83
|
-
const match = handleRegexp.exec(identifier);
|
84
|
-
if (match) identifier = `acct:${match[1]}@${match[2]}`;
|
85
|
-
identifier = new URL(identifier);
|
86
|
-
}
|
145
|
+
if (typeof identifier === "string") identifier = convertFediverseHandle(identifier) ?? new URL(identifier);
|
87
146
|
let document = null;
|
88
147
|
if (identifier.protocol === "http:" || identifier.protocol === "https:") try {
|
89
148
|
const remoteDoc = await documentLoader(identifier.href);
|
@@ -174,4 +233,4 @@ async function* traverseCollection(collection, options = {}) {
|
|
174
233
|
const PUBLIC_COLLECTION = new URL("https://www.w3.org/ns/activitystreams#Public");
|
175
234
|
|
176
235
|
//#endregion
|
177
|
-
export { PUBLIC_COLLECTION,
|
236
|
+
export { PUBLIC_COLLECTION, convertFediverseHandle, isFediverseHandle, lookupObject, parseFediverseHandle, traverseCollection };
|