@fedify/fedify 1.8.1-pr.315.1090 → 1.8.1-pr.315.1275
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 +16 -10
- package/dist/{actor-BX-pKSuT.js → actor-B9oI1pGu.js} +2 -5
- package/dist/{actor-1rvS-py8.d.ts → actor-CYyhXZHp.d.ts} +3 -3
- package/dist/{actor-C02Getjh.js → actor-Cg2FBINf.js} +189 -189
- package/dist/{assert-DwEa6glZ.js → assert-MZs1qjMx.js} +2 -2
- package/dist/{assert_equals-C5gKCm6A.js → assert_equals-DSbWqCm3.js} +9 -9
- package/dist/{assert_instance_of-C9QtN-X9.js → assert_instance_of-DHz7EHNU.js} +2 -2
- package/dist/{assert_is_error-DQdKoRgb.js → assert_is_error-BPGph1Jx.js} +2 -2
- package/dist/{assert_not_equals-7pyUM3Ib.js → assert_not_equals-f3m3epl3.js} +2 -2
- package/dist/{assert_rejects-DceVjUlD.js → assert_rejects-DiIiJbZn.js} +4 -4
- package/dist/{assert_throws-DTDC_gwN.js → assert_throws-BOO88avQ.js} +3 -3
- package/dist/{authdocloader-BbVFhkcz.js → authdocloader-0urt38S6.js} +4 -4
- package/dist/{authdocloader-BZs3nvC8.js → authdocloader-BkwhwBf_.js} +4 -5
- package/dist/{builder-DuW8p2S3.js → builder-B-wZuoFJ.js} +75 -6
- package/dist/{client-DK4qnXK0.d.ts → client-B_KFjN3D.d.ts} +4 -4
- package/dist/{client-BD0mI7gk.js → client-Cr3DvU-q.js} +3 -3
- package/dist/{collection-Dfb0TPno.js → collection-CSzG2j1P.js} +1 -1
- package/dist/compat/mod.d.ts +12 -12
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +25 -32
- package/dist/{context-BhO5LP_t.d.ts → context-BRl3Ndz3.d.ts} +286 -73
- package/dist/{denokv-QWKsIqML.js → denokv-2x6-IpXO.js} +1 -1
- package/dist/{docloader-umQd797n.js → docloader-BLgRerm3.js} +41 -40
- package/dist/{docloader-DtGccyuM.d.ts → docloader-DJT1UZH4.d.ts} +5 -2
- package/dist/{esm-d-9EVGaP.js → esm-CRotYXVH.js} +15 -15
- package/dist/federation/builder.test.js +35 -21
- package/dist/federation/collection.test.js +13 -11
- package/dist/federation/handler.test.js +341 -40
- package/dist/federation/inbox.test.js +8 -12
- package/dist/federation/keycache.test.js +9 -12
- package/dist/federation/kv.test.js +13 -11
- package/dist/federation/middleware.test.js +65 -42
- package/dist/federation/mod.d.ts +12 -12
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +15 -13
- package/dist/federation/retry.test.js +7 -5
- package/dist/federation/router.test.js +12 -11
- package/dist/federation/send.test.js +19 -25
- package/dist/{federation-C44ekWNP.js → federation-CMX7WzeL.js} +2 -2
- package/dist/{http-D59x3pzl.js → http-BkzChfDi.js} +5 -5
- package/dist/{http-Cp-0z2Ja.d.ts → http-CMfQwn0N.d.ts} +6 -6
- package/dist/{http-CkS9JLmm.js → http-g01-ecph.js} +6 -5
- package/dist/{inbox-BjyNe-HL.js → inbox-CpONbSbQ.js} +2 -4
- package/dist/{key-jxin-rRq.js → key-B9Yg9Nqz.js} +4 -5
- package/dist/{key-Btkh3AwY.js → key-C3aLobhY.js} +4 -4
- package/dist/{key-Cf8lNopw.js → key-DdT7xoLD.js} +4 -4
- package/dist/key-RnJPgo1m.js +10 -0
- package/dist/{keycache-BC5bL06g.js → keycache-BvyhLLHV.js} +2 -2
- package/dist/{keys-Dfntfi5m.js → keys-BRSTnUlp.js} +2 -2
- package/dist/{kv-DDdb1hMa.d.ts → kv-C7sopW2E.d.ts} +2 -2
- package/dist/{kv-D7Yt6pnB.js → kv-CRZrzyXm.js} +1 -1
- package/dist/{ld-DwoZFwEd.js → ld-i6KANj32.js} +3 -5
- package/dist/{lookup-CAXRxPZ3.js → lookup-BGA_VdZm.js} +115 -8
- package/dist/{lookup-gQIU9tXW.js → lookup-D5NvwwsS.js} +2 -2
- package/dist/{lookup-m3U6KA0u.d.ts → lookup-DXPWo3Hz.d.ts} +3 -3
- package/dist/{middleware-BOHju0mN.js → middleware-BdFHk7bB.js} +629 -24
- package/dist/{middleware-cN6r9o1m.js → middleware-Chh21-S_.js} +563 -32
- package/dist/middleware-DEwSbDYQ.js +26 -0
- package/dist/middleware-DyY-_2Np.js +17 -0
- package/dist/{mod-c1I-Ydch.d.ts → mod-Cozftwmt.d.ts} +4 -4
- package/dist/{mod-yPzXIjJX.d.ts → mod-DHoWcUrW.d.ts} +6 -6
- package/dist/{mod-nlVEnYuj.d.ts → mod-DyY7EVjn.d.ts} +6 -6
- package/dist/{mod-BqCBztub.d.ts → mod-DyvbAsBu.d.ts} +6 -6
- package/dist/mod.d.ts +15 -15
- package/dist/mod.js +12 -12
- package/dist/{mq-DYKDDJmp.d.ts → mq-CRGm1e_F.d.ts} +1 -1
- package/dist/nodeinfo/client.test.js +15 -15
- package/dist/nodeinfo/handler.test.js +30 -39
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +13 -11
- package/dist/nodeinfo/types.test.js +14 -12
- package/dist/{owner-BK4eWKBp.d.ts → owner-CfnEgfAc.d.ts} +4 -4
- package/dist/{owner-BrSLT3By.js → owner-DSr0c3Yp.js} +3 -4
- package/dist/{proof-u4rhYX_R.js → proof-B83O-qBN.js} +4 -6
- package/dist/{proof-BDYegzwN.js → proof-a4fXDkG3.js} +7 -7
- package/dist/{retry-BiIhZWgD.js → retry-D4GJ670a.js} +1 -1
- package/dist/runtime/authdocloader.test.js +18 -24
- package/dist/runtime/docloader.test.js +14 -15
- package/dist/runtime/key.test.js +14 -19
- package/dist/runtime/langstr.test.js +12 -11
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +12 -11
- package/dist/runtime/url.test.js +8 -7
- package/dist/{semver-DWClQt_5.js → semver-dArNLkR9.js} +1 -1
- package/dist/{send-DRDKgORs.js → send-QRloWueE.js} +3 -3
- package/dist/sig/http.test.js +40 -23
- package/dist/sig/key.test.js +15 -21
- package/dist/sig/ld.test.js +13 -19
- package/dist/sig/mod.d.ts +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +16 -23
- package/dist/sig/proof.test.js +16 -22
- package/dist/{std__assert-B3iAixc-.js → std__assert-X-_kMxKM.js} +6 -6
- package/dist/testing/docloader.test.js +12 -11
- package/dist/testing/mod.d.ts +8622 -2
- package/dist/testing/mod.js +4 -2
- package/dist/testing-A4u9tSVX.js +302 -0
- package/dist/{transformers-ghwJuzGY.js → transformers-Dna8Fg7k.js} +4 -4
- package/dist/{vocab-C4cyrUaT.js → type-DHDlfpLg.js} +5246 -185
- package/dist/{types-C7C_l-jz.js → types-BIgY6c-l.js} +2 -2
- package/dist/{types-D1lhruqy.js → types-DbFIDnXK.js} +4 -4
- package/dist/vocab/actor.test.js +143 -149
- package/dist/vocab/lookup.test.js +37 -20
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +5 -9
- package/dist/vocab/vocab.test.js +54 -58
- package/dist/{vocab-BaWeqg9y.js → vocab-DN6Plgg2.js} +6 -6
- package/dist/{vocab-B52eQhpN.d.ts → vocab-KgaI50mH.d.ts} +3 -3
- package/dist/webfinger/handler.test.js +30 -39
- package/dist/webfinger/lookup.test.js +13 -14
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +3 -3
- package/dist/x/cfworkers.js +1 -1
- package/dist/x/cfworkers.test.js +13 -11
- package/dist/x/hono.d.ts +16 -16
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.d.ts +13 -13
- package/dist/x/sveltekit.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-HsBuZ-b2.js +0 -41
- package/dist/context-V7yd31ov.js +0 -108
- package/dist/docloader-Bh-sDknx.js +0 -68
- package/dist/docloader-D5BOqs-9.js +0 -4514
- package/dist/key-DqZKjPjH.js +0 -16
- package/dist/langstr-DbWheeIS.js +0 -33
- package/dist/lookup-DvfZUKur.js +0 -133
- package/dist/middleware-31SyXabg.js +0 -33
- package/dist/middleware-CGl-YyTa.js +0 -17
- package/dist/multibase-DeCHcK8L.js +0 -316
- package/dist/router-D3UybECj.js +0 -118
- package/dist/testing-BZ0dJ4qn.js +0 -143
- package/dist/type-D2s5lmbZ.js +0 -14
- package/dist/url-kTAI6_KP.js +0 -68
- /package/dist/{vocab → src/vocab}/accept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/activity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/add.yaml +0 -0
- /package/dist/{vocab → src/vocab}/announce.yaml +0 -0
- /package/dist/{vocab → src/vocab}/application.yaml +0 -0
- /package/dist/{vocab → src/vocab}/arrive.yaml +0 -0
- /package/dist/{vocab → src/vocab}/article.yaml +0 -0
- /package/dist/{vocab → src/vocab}/audio.yaml +0 -0
- /package/dist/{vocab → src/vocab}/block.yaml +0 -0
- /package/dist/{vocab → src/vocab}/chatmessage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/create.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dataintegrityproof.yaml +0 -0
- /package/dist/{vocab → src/vocab}/delete.yaml +0 -0
- /package/dist/{vocab → src/vocab}/didservice.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dislike.yaml +0 -0
- /package/dist/{vocab → src/vocab}/document.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emoji.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emojireact.yaml +0 -0
- /package/dist/{vocab → src/vocab}/endpoints.yaml +0 -0
- /package/dist/{vocab → src/vocab}/event.yaml +0 -0
- /package/dist/{vocab → src/vocab}/export.yaml +0 -0
- /package/dist/{vocab → src/vocab}/flag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/follow.yaml +0 -0
- /package/dist/{vocab → src/vocab}/group.yaml +0 -0
- /package/dist/{vocab → src/vocab}/hashtag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/ignore.yaml +0 -0
- /package/dist/{vocab → src/vocab}/image.yaml +0 -0
- /package/dist/{vocab → src/vocab}/intransitiveactivity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/invite.yaml +0 -0
- /package/dist/{vocab → src/vocab}/join.yaml +0 -0
- /package/dist/{vocab → src/vocab}/key.yaml +0 -0
- /package/dist/{vocab → src/vocab}/leave.yaml +0 -0
- /package/dist/{vocab → src/vocab}/like.yaml +0 -0
- /package/dist/{vocab → src/vocab}/link.yaml +0 -0
- /package/dist/{vocab → src/vocab}/listen.yaml +0 -0
- /package/dist/{vocab → src/vocab}/mention.yaml +0 -0
- /package/dist/{vocab → src/vocab}/move.yaml +0 -0
- /package/dist/{vocab → src/vocab}/multikey.yaml +0 -0
- /package/dist/{vocab → src/vocab}/note.yaml +0 -0
- /package/dist/{vocab → src/vocab}/object.yaml +0 -0
- /package/dist/{vocab → src/vocab}/offer.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/organization.yaml +0 -0
- /package/dist/{vocab → src/vocab}/page.yaml +0 -0
- /package/dist/{vocab → src/vocab}/person.yaml +0 -0
- /package/dist/{vocab → src/vocab}/place.yaml +0 -0
- /package/dist/{vocab → src/vocab}/profile.yaml +0 -0
- /package/dist/{vocab → src/vocab}/propertyvalue.yaml +0 -0
- /package/dist/{vocab → src/vocab}/question.yaml +0 -0
- /package/dist/{vocab → src/vocab}/read.yaml +0 -0
- /package/dist/{vocab → src/vocab}/reject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/relationship.yaml +0 -0
- /package/dist/{vocab → src/vocab}/remove.yaml +0 -0
- /package/dist/{vocab → src/vocab}/service.yaml +0 -0
- /package/dist/{vocab → src/vocab}/source.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativeaccept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativereject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tombstone.yaml +0 -0
- /package/dist/{vocab → src/vocab}/travel.yaml +0 -0
- /package/dist/{vocab → src/vocab}/undo.yaml +0 -0
- /package/dist/{vocab → src/vocab}/update.yaml +0 -0
- /package/dist/{vocab → src/vocab}/video.yaml +0 -0
- /package/dist/{vocab → src/vocab}/view.yaml +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
import "./type-DHDlfpLg.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-Chh21-S_.js";
|
|
8
|
+
import "./semver-dArNLkR9.js";
|
|
9
|
+
import "./client-Cr3DvU-q.js";
|
|
10
|
+
import "./lookup-BGA_VdZm.js";
|
|
11
|
+
import "./types-BIgY6c-l.js";
|
|
12
|
+
import "./actor-B9oI1pGu.js";
|
|
13
|
+
import "./key-B9Yg9Nqz.js";
|
|
14
|
+
import "./http-BkzChfDi.js";
|
|
15
|
+
import "./authdocloader-BkwhwBf_.js";
|
|
16
|
+
import "./ld-i6KANj32.js";
|
|
17
|
+
import "./owner-DSr0c3Yp.js";
|
|
18
|
+
import "./proof-B83O-qBN.js";
|
|
19
|
+
import "./inbox-CpONbSbQ.js";
|
|
20
|
+
import "./builder-B-wZuoFJ.js";
|
|
21
|
+
import "./collection-CSzG2j1P.js";
|
|
22
|
+
import "./keycache-BvyhLLHV.js";
|
|
23
|
+
import "./retry-D4GJ670a.js";
|
|
24
|
+
import "./send-QRloWueE.js";
|
|
25
|
+
|
|
26
|
+
export { FederationImpl };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
|
|
5
|
+
import "./transformers-Dna8Fg7k.js";
|
|
6
|
+
import "./docloader-BLgRerm3.js";
|
|
7
|
+
import "./actor-Cg2FBINf.js";
|
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BdFHk7bB.js";
|
|
9
|
+
import "./lookup-D5NvwwsS.js";
|
|
10
|
+
import "./key-C3aLobhY.js";
|
|
11
|
+
import "./http-g01-ecph.js";
|
|
12
|
+
import "./proof-a4fXDkG3.js";
|
|
13
|
+
import "./types-DbFIDnXK.js";
|
|
14
|
+
import "./authdocloader-0urt38S6.js";
|
|
15
|
+
import "./vocab-DN6Plgg2.js";
|
|
16
|
+
|
|
17
|
+
export { FederationImpl };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-
|
|
4
|
-
import { HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
3
|
+
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-DJT1UZH4.js";
|
|
4
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-CMfQwn0N.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
|
-
//#region runtime/authdocloader.d.ts
|
|
7
|
+
//#region src/runtime/authdocloader.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Options for {@link getAuthenticatedDocumentLoader}.
|
|
10
10
|
* @see {@link getAuthenticatedDocumentLoader}
|
|
@@ -47,7 +47,7 @@ declare function getAuthenticatedDocumentLoader(identity: {
|
|
|
47
47
|
tracerProvider
|
|
48
48
|
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region runtime/key.d.ts
|
|
50
|
+
//#region src/runtime/key.d.ts
|
|
51
51
|
/**
|
|
52
52
|
* Imports a PEM-SPKI formatted public key.
|
|
53
53
|
* @param pem The PEM-SPKI formatted public key.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader } from "./docloader-
|
|
4
|
-
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-
|
|
5
|
-
import { KeyCache } from "./http-
|
|
3
|
+
import { DocumentLoader } from "./docloader-DJT1UZH4.js";
|
|
4
|
+
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-KgaI50mH.js";
|
|
5
|
+
import { KeyCache } from "./http-CMfQwn0N.js";
|
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
|
7
7
|
|
|
8
|
-
//#region sig/ld.d.ts
|
|
8
|
+
//#region src/sig/ld.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* A signature of a JSON-LD document.
|
|
11
11
|
* @since 1.0.0
|
|
@@ -144,7 +144,7 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
|
|
144
144
|
*/
|
|
145
145
|
declare function verifyJsonLd(jsonLd: unknown, options?: VerifyJsonLdOptions): Promise<boolean>;
|
|
146
146
|
//#endregion
|
|
147
|
-
//#region sig/proof.d.ts
|
|
147
|
+
//#region src/sig/proof.d.ts
|
|
148
148
|
/**
|
|
149
149
|
* Options for {@link createProof}.
|
|
150
150
|
* @since 0.10.0
|
|
@@ -251,7 +251,7 @@ interface VerifyObjectOptions extends VerifyProofOptions {}
|
|
|
251
251
|
* Verifies the given object. It will verify all the proofs in the object,
|
|
252
252
|
* and succeed only if all the proofs are valid and all attributions and
|
|
253
253
|
* actors are authenticated by the proofs.
|
|
254
|
-
* @
|
|
254
|
+
* @template T The type of the object to verify.
|
|
255
255
|
* @param cls The class of the object to verify. It must be a subclass of
|
|
256
256
|
* the {@link Object}.
|
|
257
257
|
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { Activity } from "./vocab-
|
|
4
|
-
import { ActivityTransformer, Context } from "./context-
|
|
3
|
+
import { Activity } from "./vocab-KgaI50mH.js";
|
|
4
|
+
import { ActivityTransformer, Context } from "./context-BRl3Ndz3.js";
|
|
5
5
|
|
|
6
|
-
//#region compat/transformers.d.ts
|
|
6
|
+
//#region src/compat/transformers.d.ts
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* An activity transformer that assigns a new random ID to an activity if it
|
|
@@ -17,7 +17,7 @@ import { ActivityTransformer, Context } from "./context-BhO5LP_t.js";
|
|
|
17
17
|
* https://example.com/#Follow/12345678-1234-5678-1234-567812345678
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @template TContextData The type of the context data.
|
|
21
21
|
* @param activity The activity to assign an ID to.
|
|
22
22
|
* @param context The context of the activity.
|
|
23
23
|
* @return The activity with an ID assigned.
|
|
@@ -63,7 +63,7 @@ declare function autoIdAssigner<TContextData>(activity: Activity, context: Conte
|
|
|
63
63
|
*
|
|
64
64
|
* As some ActivityPub implementations like Threads fail to deal with inlined
|
|
65
65
|
* actor objects, this transformer can be used to work around this issue.
|
|
66
|
-
* @
|
|
66
|
+
* @template TContextData The type of the context data.
|
|
67
67
|
* @param activity The activity to dehydrate the actor property of.
|
|
68
68
|
* @param context The context of the activity.
|
|
69
69
|
* @returns The dehydrated activity.
|
|
@@ -73,7 +73,7 @@ declare function actorDehydrator<TContextData>(activity: Activity, _context: Con
|
|
|
73
73
|
/**
|
|
74
74
|
* Gets the default activity transformers that are applied to all outgoing
|
|
75
75
|
* activities.
|
|
76
|
-
* @
|
|
76
|
+
* @template TContextData The type of the context data.
|
|
77
77
|
* @returns The default activity transformers.
|
|
78
78
|
* @since 1.4.0
|
|
79
79
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader, GetUserAgentOptions } from "./docloader-
|
|
4
|
-
import { Collection, Link, Object as Object$1 } from "./vocab-
|
|
3
|
+
import { DocumentLoader, GetUserAgentOptions } from "./docloader-DJT1UZH4.js";
|
|
4
|
+
import { Collection, Link, Object as Object$1 } from "./vocab-KgaI50mH.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
|
-
//#region vocab/lookup.d.ts
|
|
7
|
+
//#region src/vocab/lookup.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Options for the {@link lookupObject} function.
|
|
10
10
|
*
|
|
@@ -121,7 +121,7 @@ interface TraverseCollectionOptions {
|
|
|
121
121
|
*/
|
|
122
122
|
declare function traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object$1 | Link>;
|
|
123
123
|
//#endregion
|
|
124
|
-
//#region vocab/constants.d.ts
|
|
124
|
+
//#region src/vocab/constants.d.ts
|
|
125
125
|
/**
|
|
126
126
|
* The special public collection for [public addressing]. *Do not mutate this
|
|
127
127
|
* object.*
|
|
@@ -132,7 +132,7 @@ declare function traverseCollection(collection: Collection, options?: TraverseCo
|
|
|
132
132
|
*/
|
|
133
133
|
declare const PUBLIC_COLLECTION: URL;
|
|
134
134
|
//#endregion
|
|
135
|
-
//#region vocab/handle.d.ts
|
|
135
|
+
//#region src/vocab/handle.d.ts
|
|
136
136
|
/**
|
|
137
137
|
* Represents a fediverse handle, which consists of a username and a host.
|
|
138
138
|
* The username can be alphanumeric and may include special characters,
|
|
@@ -206,7 +206,7 @@ declare function isFediverseHandle(handle: string): handle is `${string}@${strin
|
|
|
206
206
|
*/
|
|
207
207
|
declare function toAcctUrl(handle: string): URL | null;
|
|
208
208
|
//#endregion
|
|
209
|
-
//#region vocab/type.d.ts
|
|
209
|
+
//#region src/vocab/type.d.ts
|
|
210
210
|
/**
|
|
211
211
|
* Returns the type URI of the given object.
|
|
212
212
|
*
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-
|
|
4
|
-
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-
|
|
5
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-
|
|
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, LanguageString, 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-
|
|
7
|
-
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-
|
|
8
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
9
|
-
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-
|
|
10
|
-
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-
|
|
11
|
-
import { ResourceDescriptor, lookupWebFinger } from "./lookup-
|
|
12
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
13
|
-
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-
|
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
3
|
+
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-C7sopW2E.js";
|
|
4
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-DJT1UZH4.js";
|
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-B_KFjN3D.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, LanguageString, 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-KgaI50mH.js";
|
|
7
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-CYyhXZHp.js";
|
|
8
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-CMfQwn0N.js";
|
|
9
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-CfnEgfAc.js";
|
|
10
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-DyvbAsBu.js";
|
|
11
|
+
import { ResourceDescriptor, lookupWebFinger } from "./lookup-DXPWo3Hz.js";
|
|
12
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-BRl3Ndz3.js";
|
|
13
|
+
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-CRGm1e_F.js";
|
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-DyY7EVjn.js";
|
|
15
15
|
import "./mod-g0xFzAP9.js";
|
|
16
16
|
import "./mod-1pDWKvUL.js";
|
|
17
|
-
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-
|
|
18
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
|
17
|
+
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-Cozftwmt.js";
|
|
18
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-DHoWcUrW.js";
|
|
19
19
|
import "./mod-GIh5OYxW.js";
|
|
20
|
-
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SemVer, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, formatSemVer, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, parseSemVer, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
|
20
|
+
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SemVer, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, formatSemVer, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, parseSemVer, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/mod.js
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-
|
|
5
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-Dna8Fg7k.js";
|
|
6
6
|
import "./compat-Bb5myD13.js";
|
|
7
|
-
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-
|
|
8
|
-
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, LanguageString, 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, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-
|
|
9
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
10
|
-
import { lookupWebFinger } from "./lookup-
|
|
11
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-
|
|
12
|
-
import { signRequest, verifyRequest } from "./http-
|
|
13
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
14
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-
|
|
15
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-
|
|
16
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
17
|
-
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-
|
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-BLgRerm3.js";
|
|
8
|
+
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, LanguageString, 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, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-Cg2FBINf.js";
|
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-BdFHk7bB.js";
|
|
10
|
+
import { lookupWebFinger } from "./lookup-D5NvwwsS.js";
|
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-C3aLobhY.js";
|
|
12
|
+
import { signRequest, verifyRequest } from "./http-g01-ecph.js";
|
|
13
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-a4fXDkG3.js";
|
|
14
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-CMX7WzeL.js";
|
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-DbFIDnXK.js";
|
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-0urt38S6.js";
|
|
17
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-DN6Plgg2.js";
|
|
18
18
|
import "./nodeinfo-CyEbLjHs.js";
|
|
19
19
|
import "./runtime-BSkOVUWM.js";
|
|
20
20
|
import "./sig-BXJO--F9.js";
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import
|
|
13
|
-
import { test } from "../testing-
|
|
14
|
-
import "../std__assert-
|
|
15
|
-
import "../assert_rejects-
|
|
16
|
-
import "../assert_is_error-
|
|
17
|
-
import "../assert_not_equals-
|
|
18
|
-
import "../assert_throws-
|
|
19
|
-
import { esm_default } from "../esm-
|
|
6
|
+
import "../type-DHDlfpLg.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../semver-dArNLkR9.js";
|
|
11
|
+
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-Cr3DvU-q.js";
|
|
12
|
+
import "../lookup-BGA_VdZm.js";
|
|
13
|
+
import { test } from "../testing-A4u9tSVX.js";
|
|
14
|
+
import "../std__assert-X-_kMxKM.js";
|
|
15
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
16
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
17
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
18
|
+
import "../assert_throws-BOO88avQ.js";
|
|
19
|
+
import { esm_default } from "../esm-CRotYXVH.js";
|
|
20
20
|
|
|
21
|
-
//#region nodeinfo/client.test.ts
|
|
21
|
+
//#region src/nodeinfo/client.test.ts
|
|
22
22
|
test("getNodeInfo()", async (t) => {
|
|
23
23
|
esm_default.spyGlobal();
|
|
24
24
|
esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
|
|
@@ -3,46 +3,37 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import "../
|
|
18
|
-
import "../
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
32
|
-
import "../
|
|
33
|
-
import "../
|
|
34
|
-
import "../
|
|
35
|
-
import "../send-DRDKgORs.js";
|
|
36
|
-
import { test } from "../testing-BZ0dJ4qn.js";
|
|
37
|
-
import "../std__assert-B3iAixc-.js";
|
|
38
|
-
import "../assert_rejects-DceVjUlD.js";
|
|
39
|
-
import "../assert_is_error-DQdKoRgb.js";
|
|
40
|
-
import "../assert_not_equals-7pyUM3Ib.js";
|
|
41
|
-
import "../assert_throws-DTDC_gwN.js";
|
|
42
|
-
import "../docloader-Bh-sDknx.js";
|
|
43
|
-
import { createRequestContext } from "../context-V7yd31ov.js";
|
|
6
|
+
import "../type-DHDlfpLg.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-Chh21-S_.js";
|
|
12
|
+
import { parseSemVer } from "../semver-dArNLkR9.js";
|
|
13
|
+
import "../client-Cr3DvU-q.js";
|
|
14
|
+
import "../lookup-BGA_VdZm.js";
|
|
15
|
+
import "../types-BIgY6c-l.js";
|
|
16
|
+
import "../actor-B9oI1pGu.js";
|
|
17
|
+
import "../key-B9Yg9Nqz.js";
|
|
18
|
+
import "../http-BkzChfDi.js";
|
|
19
|
+
import "../authdocloader-BkwhwBf_.js";
|
|
20
|
+
import "../ld-i6KANj32.js";
|
|
21
|
+
import "../owner-DSr0c3Yp.js";
|
|
22
|
+
import "../proof-B83O-qBN.js";
|
|
23
|
+
import "../inbox-CpONbSbQ.js";
|
|
24
|
+
import "../builder-B-wZuoFJ.js";
|
|
25
|
+
import "../collection-CSzG2j1P.js";
|
|
26
|
+
import "../keycache-BvyhLLHV.js";
|
|
27
|
+
import "../retry-D4GJ670a.js";
|
|
28
|
+
import "../send-QRloWueE.js";
|
|
29
|
+
import { createRequestContext, test } from "../testing-A4u9tSVX.js";
|
|
30
|
+
import "../std__assert-X-_kMxKM.js";
|
|
31
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
32
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
33
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
34
|
+
import "../assert_throws-BOO88avQ.js";
|
|
44
35
|
|
|
45
|
-
//#region nodeinfo/handler.test.ts
|
|
36
|
+
//#region src/nodeinfo/handler.test.ts
|
|
46
37
|
test("handleNodeInfo()", async () => {
|
|
47
38
|
const request = new Request("https://example.com/nodeinfo/2.1");
|
|
48
39
|
const federation = createFederation({ kv: new MemoryKvStore() });
|
package/dist/nodeinfo/mod.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import "../kv-
|
|
4
|
-
import "../docloader-
|
|
5
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-
|
|
3
|
+
import "../kv-C7sopW2E.js";
|
|
4
|
+
import "../docloader-DJT1UZH4.js";
|
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-B_KFjN3D.js";
|
|
6
6
|
import "../mod-1pDWKvUL.js";
|
|
7
7
|
export { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
package/dist/nodeinfo/mod.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../docloader-
|
|
6
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-
|
|
5
|
+
import "../docloader-BLgRerm3.js";
|
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-DbFIDnXK.js";
|
|
7
7
|
import "../nodeinfo-CyEbLjHs.js";
|
|
8
8
|
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import
|
|
6
|
+
import "../type-DHDlfpLg.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { formatSemVer, parseSemVer } from "../semver-dArNLkR9.js";
|
|
11
|
+
import "../lookup-BGA_VdZm.js";
|
|
12
|
+
import { test } from "../testing-A4u9tSVX.js";
|
|
13
|
+
import "../std__assert-X-_kMxKM.js";
|
|
14
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
15
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
16
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
17
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
16
18
|
|
|
17
|
-
//#region nodeinfo/semver.test.ts
|
|
19
|
+
//#region src/nodeinfo/semver.test.ts
|
|
18
20
|
test("parseSemVer() handles major", async (t) => {
|
|
19
21
|
const versions = [
|
|
20
22
|
["1.2.3", 1],
|
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import
|
|
6
|
+
import "../type-DHDlfpLg.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../semver-dArNLkR9.js";
|
|
11
|
+
import "../lookup-BGA_VdZm.js";
|
|
12
|
+
import { nodeInfoToJson } from "../types-BIgY6c-l.js";
|
|
13
|
+
import { test } from "../testing-A4u9tSVX.js";
|
|
14
|
+
import "../std__assert-X-_kMxKM.js";
|
|
15
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
16
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
17
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
18
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
17
19
|
|
|
18
|
-
//#region nodeinfo/types.test.ts
|
|
20
|
+
//#region src/nodeinfo/types.test.ts
|
|
19
21
|
test("nodeInfoToJson()", () => {
|
|
20
22
|
const validInfo = {
|
|
21
23
|
software: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader } from "./docloader-
|
|
4
|
-
import { Activity, CryptographicKey } from "./vocab-
|
|
5
|
-
import { Actor } from "./actor-
|
|
3
|
+
import { DocumentLoader } from "./docloader-DJT1UZH4.js";
|
|
4
|
+
import { Activity, CryptographicKey } from "./vocab-KgaI50mH.js";
|
|
5
|
+
import { Actor } from "./actor-CYyhXZHp.js";
|
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
|
7
7
|
|
|
8
|
-
//#region sig/owner.d.ts
|
|
8
|
+
//#region src/sig/owner.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* Options for {@link doesActorOwnKey}.
|
|
11
11
|
* @since 0.8.0
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { getDocumentLoader } from "./
|
|
7
|
-
import {
|
|
8
|
-
import { isActor } from "./actor-BX-pKSuT.js";
|
|
6
|
+
import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-DHDlfpLg.js";
|
|
7
|
+
import { isActor } from "./actor-B9oI1pGu.js";
|
|
9
8
|
import { trace } from "@opentelemetry/api";
|
|
10
9
|
|
|
11
|
-
//#region sig/owner.ts
|
|
10
|
+
//#region src/sig/owner.ts
|
|
12
11
|
/**
|
|
13
12
|
* Checks if the actor of the given activity owns the specified key.
|
|
14
13
|
* @param activity The activity to check.
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./
|
|
7
|
-
import {
|
|
8
|
-
import { getTypeId } from "./type-D2s5lmbZ.js";
|
|
9
|
-
import { fetchKey, validateCryptoKey } from "./key-jxin-rRq.js";
|
|
6
|
+
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-DHDlfpLg.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-B9Yg9Nqz.js";
|
|
10
8
|
import { getLogger } from "@logtape/logtape";
|
|
11
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
12
10
|
import { encodeHex } from "byte-encodings/hex";
|
|
13
11
|
import serialize from "json-canon";
|
|
14
12
|
|
|
15
|
-
//#region sig/proof.ts
|
|
13
|
+
//#region src/sig/proof.ts
|
|
16
14
|
const logger = getLogger([
|
|
17
15
|
"fedify",
|
|
18
16
|
"sig",
|
|
@@ -224,7 +222,7 @@ async function verifyProofInternal(jsonLd, proof, options) {
|
|
|
224
222
|
* Verifies the given object. It will verify all the proofs in the object,
|
|
225
223
|
* and succeed only if all the proofs are valid and all attributions and
|
|
226
224
|
* actors are authenticated by the proofs.
|
|
227
|
-
* @
|
|
225
|
+
* @template T The type of the object to verify.
|
|
228
226
|
* @param cls The class of the object to verify. It must be a subclass of
|
|
229
227
|
* the {@link Object}.
|
|
230
228
|
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
|
@@ -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 { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-BLgRerm3.js";
|
|
6
|
+
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-Cg2FBINf.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-C3aLobhY.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import jsonld from "jsonld";
|
|
@@ -12,7 +12,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
|
12
12
|
import { encodeHex } from "byte-encodings/hex";
|
|
13
13
|
import serialize from "json-canon";
|
|
14
14
|
|
|
15
|
-
//#region sig/ld.ts
|
|
15
|
+
//#region src/sig/ld.ts
|
|
16
16
|
const logger$1 = getLogger([
|
|
17
17
|
"fedify",
|
|
18
18
|
"sig",
|
|
@@ -266,7 +266,7 @@ async function hashJsonLd(jsonLd, contextLoader) {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
//#endregion
|
|
269
|
-
//#region sig/owner.ts
|
|
269
|
+
//#region src/sig/owner.ts
|
|
270
270
|
/**
|
|
271
271
|
* Checks if the actor of the given activity owns the specified key.
|
|
272
272
|
* @param activity The activity to check.
|
|
@@ -344,7 +344,7 @@ async function getKeyOwner(keyId, options) {
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
//#endregion
|
|
347
|
-
//#region sig/proof.ts
|
|
347
|
+
//#region src/sig/proof.ts
|
|
348
348
|
const logger = getLogger([
|
|
349
349
|
"fedify",
|
|
350
350
|
"sig",
|
|
@@ -556,7 +556,7 @@ async function verifyProofInternal(jsonLd, proof, options) {
|
|
|
556
556
|
* Verifies the given object. It will verify all the proofs in the object,
|
|
557
557
|
* and succeed only if all the proofs are valid and all attributions and
|
|
558
558
|
* actors are authenticated by the proofs.
|
|
559
|
-
* @
|
|
559
|
+
* @template T The type of the object to verify.
|
|
560
560
|
* @param cls The class of the object to verify. It must be a subclass of
|
|
561
561
|
* the {@link Object}.
|
|
562
562
|
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|