@fedify/fedify 2.0.0-dev.1485 → 2.0.0-dev.149
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/LICENSE +1 -1
- package/README.md +38 -18
- package/dist/actor-CCAL5-E_.cjs +42079 -0
- package/dist/{actor-7ivEf1H3.js → actor-DYdPViDz.js} +4 -1
- package/dist/{actor-C22bXuuC.d.ts → actor-DqFajh9s.d.ts} +2 -2
- package/dist/{actor-DXTdNCfp.js → actor-U_BZZ2ps.js} +7058 -2722
- package/dist/actor-f2NtjyCg.d.cts +128 -0
- package/dist/{assert-MZs1qjMx.js → assert-Dp5_aoAs.js} +1 -1
- package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-D1m8F7x0.js} +1 -1
- package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals-B2R_8p36.js} +1 -1
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-BoKYY0g1.js} +2 -2
- package/dist/{assert_is_error-BPGph1Jx.js → assert_throws-DjkXin1a.js} +32 -2
- package/dist/{builder-BPGqEvtB.js → builder-CYR2yKqn.js} +20 -8
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/chunk-HsBuZ-b2.js +41 -0
- package/dist/client-94iWEfQa.d.cts +222 -0
- package/dist/{client-DF8anIB5.d.ts → client-BsGzbnV-.d.ts} +3 -75
- package/dist/{client-g2FDBoeY.js → client-CD87uCL_.js} +4 -23
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +11 -0
- package/dist/compat/mod.d.ts +10 -12
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +29 -24
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/context-DBQ7nMCw.d.cts +2449 -0
- package/dist/context-DH7LHJdw.js +109 -0
- package/dist/{context-DmlbRh9p.d.ts → context-mM0Nu5yo.d.ts} +335 -134
- package/dist/deno-BTeveqhY.js +131 -0
- package/dist/{testing-BG_8Fyas.js → dist-lStjlyET.js} +73 -114
- package/dist/{authdocloader-D_IvQE4z.js → docloader-BSGGKhrl.js} +17 -8
- package/dist/{esm-CPZhxxGc.js → esm-B52TuumP.js} +32 -17
- package/dist/federation/builder.test.js +16 -16
- package/dist/federation/collection.test.js +9 -12
- package/dist/federation/handler.test.js +123 -152
- package/dist/federation/idempotency.test.js +206 -0
- package/dist/federation/inbox.test.js +7 -7
- package/dist/federation/keycache.test.js +7 -8
- package/dist/federation/kv.test.js +64 -12
- package/dist/federation/middleware.test.js +281 -99
- package/dist/federation/mod.cjs +27 -0
- package/dist/federation/mod.d.cts +11 -0
- package/dist/federation/mod.d.ts +11 -13
- package/dist/federation/mod.js +13 -15
- package/dist/federation/mq.test.js +12 -13
- package/dist/federation/negotiation.test.js +25 -0
- package/dist/federation/retry.test.js +4 -6
- package/dist/federation/router.test.js +9 -11
- package/dist/federation/send.test.js +61 -18
- package/dist/federation-CoW-KDKv.cjs +266 -0
- package/dist/{federation-CMX7WzeL.js → federation-D0hkM4T7.js} +25 -3
- package/dist/{http-C7rxW7Kh.js → http-BIDOYI9f.js} +4 -3
- package/dist/{http-zsOxPKCt.js → http-BQRnmfXP.js} +260 -10
- package/dist/{http-DqSNLFNY.d.ts → http-BbO0ejuk.d.ts} +2 -2
- package/dist/http-DtYHWbwa.cjs +1106 -0
- package/dist/http-M8k5mKc0.d.cts +253 -0
- package/dist/{inbox-eK2W2MF3.js → inbox-DNjplQSR.js} +26 -7
- package/dist/{key-CYOcZ9G5.js → key-dws2_YsP.js} +4 -2
- package/dist/{keycache-BLq6GT4_.js → keycache-BbbXRjc-.js} +1 -1
- package/dist/{keys-BIwlbtMN.js → keys-C6QyjjIN.js} +2 -1
- package/dist/{kv-C7sopW2E.d.ts → kv-BpJND1Hr.d.ts} +30 -1
- package/dist/{kv-CRZrzyXm.js → kv-DaWUKuhD.js} +22 -0
- package/dist/kv-cD_d4hg-.d.cts +110 -0
- package/dist/kv-cache-1_lcnUMp.cjs +134 -0
- package/dist/kv-cache-BEP4OyiZ.js +122 -0
- package/dist/kv-cache-C6NrTtII.js +107 -0
- package/dist/{ld-DWwLYT4e.js → ld-C6UrncJk.js} +7 -4
- package/dist/lookup-BORWbouU.cjs +268 -0
- package/dist/lookup-BV72lfsA.js +256 -0
- package/dist/{lookup-DNQyH8UQ.js → lookup-BoiLMtAx.js} +33 -125
- package/dist/{lookup-BHYMosdS.js → lookup-yv_aH7K7.js} +3 -1
- package/dist/{middleware-BcVqlHyD.js → middleware--1K3DAB8.js} +143 -136
- package/dist/middleware-7Yg2p_nl.js +31 -0
- package/dist/{middleware-DakCaqXu.js → middleware-8Oymc6Na.js} +105 -188
- package/dist/middleware-C6YBw2qx.cjs +15 -0
- package/dist/middleware-D6XNERu3.js +15 -0
- package/dist/middleware-DBHDivdC.cjs +4237 -0
- package/dist/mod-B-hUPT2N.d.cts +1 -0
- package/dist/{mod-Cxt4Kpf6.d.ts → mod-BlVovdcy.d.ts} +20 -2
- package/dist/mod-BxRCHTz-.d.cts +307 -0
- package/dist/mod-C58MZ7Wx.d.cts +113 -0
- package/dist/mod-CAdoBu0x.d.ts +109 -0
- package/dist/mod-CcDPcLJW.d.cts +1 -0
- package/dist/{mod-Drmz72EK.d.ts → mod-D5Z2tISD.d.ts} +3 -3
- package/dist/mod-DgxG-byT.d.cts +266 -0
- package/dist/{lookup-3czM5mmU.d.ts → mod-Ds0mpFZU.d.ts} +9 -2
- package/dist/mod-Dy2fJtmN.d.cts +80 -0
- package/dist/{mod-0EysZ-dJ.d.ts → mod-GetHzY6F.d.ts} +2 -2
- package/dist/mod-fxr25Gv7.d.cts +107 -0
- package/dist/mod.cjs +137 -0
- package/dist/mod.d.cts +15 -0
- package/dist/mod.d.ts +15 -18
- package/dist/mod.js +19 -21
- package/dist/negotiation-B4NJHk1f.js +71 -0
- package/dist/nodeinfo/client.test.js +32 -114
- package/dist/nodeinfo/handler.test.js +35 -30
- package/dist/nodeinfo/mod.cjs +10 -0
- package/dist/nodeinfo/mod.d.cts +3 -0
- package/dist/nodeinfo/mod.d.ts +3 -5
- package/dist/nodeinfo/mod.js +6 -7
- package/dist/nodeinfo/types.test.js +10 -18
- package/dist/nodeinfo-BnthBobC.js +4 -0
- package/dist/nodeinfo-CdN0rEnZ.cjs +4 -0
- package/dist/otel/exporter.test.js +899 -0
- package/dist/otel/mod.cjs +262 -0
- package/dist/otel/mod.d.cts +230 -0
- package/dist/otel/mod.d.ts +232 -0
- package/dist/otel/mod.js +261 -0
- package/dist/owner-B4HbyP8s.d.cts +67 -0
- package/dist/{owner-smArESGi.js → owner-DQuVKHuY.js} +46 -8
- package/dist/{owner-CQPnQVtf.d.ts → owner-kQRGVXG1.d.ts} +3 -3
- package/dist/{proof-CT1SITRP.js → proof-BG2G4cDG.js} +53 -16
- package/dist/proof-C3K5Z8RT.cjs +710 -0
- package/dist/{proof-C6z-uqeO.js → proof-GrivUN5L.js} +5 -3
- package/dist/router-CVRQXlZi.js +118 -0
- package/dist/{send-1zdmNlUo.js → send-B_dTZyUD.js} +9 -4
- package/dist/sig/http.test.js +19 -17
- package/dist/sig/key.test.js +15 -14
- package/dist/sig/ld.test.js +13 -12
- package/dist/sig/mod.cjs +28 -0
- package/dist/sig/mod.d.cts +6 -0
- package/dist/sig/mod.d.ts +5 -7
- package/dist/sig/mod.js +8 -10
- package/dist/sig/owner.test.js +40 -15
- package/dist/sig/proof.test.js +19 -17
- package/dist/sig-C34-oHBl.js +4 -0
- package/dist/sig-YYj5tCnr.cjs +4 -0
- package/dist/{std__assert-X-_kMxKM.js → std__assert-Cm-MfI66.js} +1 -1
- package/dist/testing/mod.d.ts +410 -232
- package/dist/testing/mod.js +9 -4
- package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
- package/dist/transformers-CoBS-oFG.cjs +116 -0
- package/dist/type-BSNcIxTd.js +14 -0
- package/dist/{types-BzyGRkRt.js → types-BtUjyi5y.js} +9 -170
- package/dist/types-CWgzGaqk.cjs +315 -0
- package/dist/{types-BIgY6c-l.js → types-D2jhK2VG.js} +1 -3
- package/dist/{runtime/authdocloader.test.js → utils/docloader.test.js} +20 -18
- package/dist/utils/kv-cache.test.js +211 -0
- package/dist/utils/mod.cjs +12 -0
- package/dist/utils/mod.d.cts +5 -0
- package/dist/utils/mod.d.ts +7 -0
- package/dist/utils/mod.js +11 -0
- package/dist/utils-D-Va7aXC.js +4 -0
- package/dist/utils-DyRU1gdZ.cjs +4 -0
- package/dist/vocab/actor.test.js +15 -13
- package/dist/vocab/lookup.test.js +285 -12
- package/dist/vocab/mod.cjs +86 -0
- package/dist/vocab/mod.d.cts +4 -0
- package/dist/vocab/mod.d.ts +3 -5
- package/dist/vocab/mod.js +6 -7
- package/dist/vocab/type.test.js +4 -4
- package/dist/vocab/vocab.test.js +8058 -1987
- package/dist/{vocab-Bg1J3mu4.js → vocab-Aig1Fmi8.js} +32 -18
- package/dist/{vocab-SOE1ifCr.d.ts → vocab-BCWe1Ih5.d.ts} +292 -21
- package/dist/{type-I68qwqmo.js → vocab-C3nSleOZ.js} +6947 -7381
- package/dist/vocab-CeDBzu-f.d.cts +14903 -0
- package/dist/vocab-DFMYh9aV.cjs +296 -0
- package/dist/webfinger/handler.test.js +62 -29
- package/dist/webfinger/lookup.test.js +11 -12
- package/dist/webfinger/mod.cjs +8 -0
- package/dist/webfinger/mod.d.cts +2 -0
- package/dist/webfinger/mod.d.ts +1 -4
- package/dist/webfinger/mod.js +5 -6
- package/dist/webfinger-C72Y8lrh.js +4 -0
- package/dist/webfinger-vAtLmxOF.cjs +4 -0
- package/package.json +81 -45
- package/dist/assert_throws-BOO88avQ.js +0 -39
- package/dist/authdocloader-Bq0gEHRj.js +0 -52
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/denokv-Bv33Xxea.js +0 -57
- package/dist/docloader-BlVueewg.js +0 -4615
- package/dist/docloader-CxWcuWqQ.d.ts +0 -221
- package/dist/fixtures/activitypub.academy/users/brauca_darradiul.json +0 -83
- package/dist/fixtures/example.com/announce.json +0 -6
- package/dist/fixtures/example.com/collection.json +0 -19
- package/dist/fixtures/example.com/create.json +0 -6
- package/dist/fixtures/example.com/cross-origin-actor.json +0 -6
- package/dist/fixtures/example.com/hong-gildong.json +0 -11
- package/dist/fixtures/example.com/invite.json +0 -7
- package/dist/fixtures/example.com/key.json +0 -7
- package/dist/fixtures/example.com/key2.json +0 -6
- package/dist/fixtures/example.com/object.json +0 -6
- package/dist/fixtures/example.com/orderedcollectionpage.json +0 -24
- package/dist/fixtures/example.com/paged/a.json +0 -13
- package/dist/fixtures/example.com/paged/b.json +0 -16
- package/dist/fixtures/example.com/paged-collection.json +0 -6
- package/dist/fixtures/example.com/person.json +0 -22
- package/dist/fixtures/example.com/person2.json +0 -40
- package/dist/fixtures/example.com/test.json +0 -5
- package/dist/fixtures/example.com/users/handle.json +0 -16
- package/dist/fixtures/example.com/wrong-type.json +0 -3
- package/dist/fixtures/oeee.cafe/ap/users/3609fd4e-d51d-4db8-9f04-4189815864dd.json +0 -24
- package/dist/fixtures/remote.domain/users/bob.json +0 -20
- package/dist/fixtures/server.example/users/alice.json +0 -20
- package/dist/fixtures/w3id.org/identity/v1.json +0 -152
- package/dist/fixtures/w3id.org/security/data-integrity/v1.json +0 -74
- package/dist/fixtures/w3id.org/security/multikey/v1.json +0 -35
- package/dist/fixtures/w3id.org/security/v1.json +0 -50
- package/dist/fixtures/wizard.casa/users/hongminhee.json +0 -69
- package/dist/fixtures/www.w3.org/ns/activitystreams.json +0 -379
- package/dist/fixtures/www.w3.org/ns/did/v1.json +0 -58
- package/dist/key-Dn7Lram-.js +0 -260
- package/dist/key-S7WllAWz.js +0 -10
- package/dist/key-rRCUafNm.js +0 -10
- package/dist/middleware-CWbGhXnl.js +0 -26
- package/dist/middleware-D-OlNiyj.js +0 -17
- package/dist/mod-TFoH2Ql8.d.ts +0 -104
- package/dist/mod-g0xFzAP9.d.ts +0 -2
- package/dist/mq-CRGm1e_F.d.ts +0 -143
- package/dist/nodeinfo/semver.test.js +0 -143
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime/docloader.test.js +0 -522
- package/dist/runtime/key.test.js +0 -103
- package/dist/runtime/langstr.test.d.ts +0 -3
- package/dist/runtime/langstr.test.js +0 -39
- package/dist/runtime/mod.d.ts +0 -8
- package/dist/runtime/mod.js +0 -13
- package/dist/runtime/multibase/multibase.test.d.ts +0 -3
- package/dist/runtime/multibase/multibase.test.js +0 -358
- package/dist/runtime/url.test.d.ts +0 -3
- package/dist/runtime/url.test.js +0 -45
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/semver-dArNLkR9.js +0 -149
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/src/vocab/accept.yaml +0 -15
- package/dist/src/vocab/activity.yaml +0 -98
- package/dist/src/vocab/add.yaml +0 -16
- package/dist/src/vocab/announce.yaml +0 -30
- package/dist/src/vocab/application.yaml +0 -324
- package/dist/src/vocab/arrive.yaml +0 -15
- package/dist/src/vocab/article.yaml +0 -46
- package/dist/src/vocab/audio.yaml +0 -11
- package/dist/src/vocab/block.yaml +0 -16
- package/dist/src/vocab/chatmessage.yaml +0 -50
- package/dist/src/vocab/collection.yaml +0 -154
- package/dist/src/vocab/collectionpage.yaml +0 -55
- package/dist/src/vocab/create.yaml +0 -28
- package/dist/src/vocab/dataintegrityproof.yaml +0 -56
- package/dist/src/vocab/delete.yaml +0 -27
- package/dist/src/vocab/didservice.yaml +0 -22
- package/dist/src/vocab/dislike.yaml +0 -14
- package/dist/src/vocab/document.yaml +0 -31
- package/dist/src/vocab/emoji.yaml +0 -12
- package/dist/src/vocab/emojireact.yaml +0 -17
- package/dist/src/vocab/endpoints.yaml +0 -85
- package/dist/src/vocab/event.yaml +0 -11
- package/dist/src/vocab/export.yaml +0 -9
- package/dist/src/vocab/flag.yaml +0 -15
- package/dist/src/vocab/follow.yaml +0 -19
- package/dist/src/vocab/group.yaml +0 -324
- package/dist/src/vocab/hashtag.yaml +0 -14
- package/dist/src/vocab/ignore.yaml +0 -14
- package/dist/src/vocab/image.yaml +0 -9
- package/dist/src/vocab/intransitiveactivity.yaml +0 -15
- package/dist/src/vocab/invite.yaml +0 -14
- package/dist/src/vocab/join.yaml +0 -14
- package/dist/src/vocab/key.yaml +0 -28
- package/dist/src/vocab/leave.yaml +0 -14
- package/dist/src/vocab/like.yaml +0 -16
- package/dist/src/vocab/link.yaml +0 -101
- package/dist/src/vocab/listen.yaml +0 -12
- package/dist/src/vocab/mention.yaml +0 -9
- package/dist/src/vocab/move.yaml +0 -15
- package/dist/src/vocab/multikey.yaml +0 -36
- package/dist/src/vocab/note.yaml +0 -48
- package/dist/src/vocab/object.yaml +0 -404
- package/dist/src/vocab/offer.yaml +0 -15
- package/dist/src/vocab/orderedcollection.yaml +0 -39
- package/dist/src/vocab/orderedcollectionpage.yaml +0 -50
- package/dist/src/vocab/organization.yaml +0 -324
- package/dist/src/vocab/page.yaml +0 -11
- package/dist/src/vocab/person.yaml +0 -324
- package/dist/src/vocab/place.yaml +0 -75
- package/dist/src/vocab/profile.yaml +0 -26
- package/dist/src/vocab/propertyvalue.yaml +0 -32
- package/dist/src/vocab/question.yaml +0 -103
- package/dist/src/vocab/read.yaml +0 -13
- package/dist/src/vocab/reject.yaml +0 -14
- package/dist/src/vocab/relationship.yaml +0 -52
- package/dist/src/vocab/remove.yaml +0 -14
- package/dist/src/vocab/service.yaml +0 -324
- package/dist/src/vocab/source.yaml +0 -26
- package/dist/src/vocab/tentativeaccept.yaml +0 -14
- package/dist/src/vocab/tentativereject.yaml +0 -14
- package/dist/src/vocab/tombstone.yaml +0 -24
- package/dist/src/vocab/travel.yaml +0 -16
- package/dist/src/vocab/undo.yaml +0 -26
- package/dist/src/vocab/update.yaml +0 -58
- package/dist/src/vocab/video.yaml +0 -11
- package/dist/src/vocab/view.yaml +0 -13
- package/dist/testing/docloader.test.js +0 -24
- package/dist/vocab/schema.yaml +0 -247
- package/dist/webfinger-C3GIyXIg.js +0 -4
- package/dist/x/cfworkers.d.ts +0 -61
- package/dist/x/cfworkers.js +0 -98
- package/dist/x/cfworkers.test.d.ts +0 -3
- package/dist/x/cfworkers.test.js +0 -179
- package/dist/x/hono.d.ts +0 -56
- package/dist/x/hono.js +0 -60
- package/dist/x/sveltekit.d.ts +0 -48
- package/dist/x/sveltekit.js +0 -68
- /package/dist/{assert_equals-DSbWqCm3.js → assert_equals-Gbplq4lg.js} +0 -0
- /package/dist/{collection-CSzG2j1P.js → collection-CrkRM5Ep.js} +0 -0
- /package/dist/{nodeinfo/semver.test.d.ts → federation/idempotency.test.d.ts} +0 -0
- /package/dist/{runtime/authdocloader.test.d.ts → federation/negotiation.test.d.ts} +0 -0
- /package/dist/{mod-1pDWKvUL.d.ts → mod-CVgZgliM.d.ts} +0 -0
- /package/dist/{mod-GIh5OYxW.d.ts → mod-bjzj5QIb.d.ts} +0 -0
- /package/dist/{runtime/docloader.test.d.ts → otel/exporter.test.d.ts} +0 -0
- /package/dist/{retry-D4GJ670a.js → retry-Bz5pP75o.js} +0 -0
- /package/dist/{testing → utils}/docloader.test.d.ts +0 -0
- /package/dist/{runtime/key.test.d.ts → utils/kv-cache.test.d.ts} +0 -0
package/dist/key-rRCUafNm.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
|
|
5
|
-
import "./docloader-BlVueewg.js";
|
|
6
|
-
import "./actor-DXTdNCfp.js";
|
|
7
|
-
import "./lookup-BHYMosdS.js";
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-Dn7Lram-.js";
|
|
9
|
-
|
|
10
|
-
export { validateCryptoKey };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
globalThis.addEventListener = () => {};
|
|
5
|
-
|
|
6
|
-
import "./type-I68qwqmo.js";
|
|
7
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DakCaqXu.js";
|
|
8
|
-
import "./semver-dArNLkR9.js";
|
|
9
|
-
import "./client-g2FDBoeY.js";
|
|
10
|
-
import "./lookup-DNQyH8UQ.js";
|
|
11
|
-
import "./types-BIgY6c-l.js";
|
|
12
|
-
import "./actor-7ivEf1H3.js";
|
|
13
|
-
import "./key-CYOcZ9G5.js";
|
|
14
|
-
import "./http-C7rxW7Kh.js";
|
|
15
|
-
import "./authdocloader-D_IvQE4z.js";
|
|
16
|
-
import "./ld-DWwLYT4e.js";
|
|
17
|
-
import "./owner-smArESGi.js";
|
|
18
|
-
import "./proof-C6z-uqeO.js";
|
|
19
|
-
import "./inbox-eK2W2MF3.js";
|
|
20
|
-
import "./builder-BPGqEvtB.js";
|
|
21
|
-
import "./collection-CSzG2j1P.js";
|
|
22
|
-
import "./keycache-BLq6GT4_.js";
|
|
23
|
-
import "./retry-D4GJ670a.js";
|
|
24
|
-
import "./send-1zdmNlUo.js";
|
|
25
|
-
|
|
26
|
-
export { FederationImpl };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
|
|
5
|
-
import "./transformers-Dna8Fg7k.js";
|
|
6
|
-
import "./docloader-BlVueewg.js";
|
|
7
|
-
import "./actor-DXTdNCfp.js";
|
|
8
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BcVqlHyD.js";
|
|
9
|
-
import "./lookup-BHYMosdS.js";
|
|
10
|
-
import "./key-Dn7Lram-.js";
|
|
11
|
-
import "./http-zsOxPKCt.js";
|
|
12
|
-
import "./proof-CT1SITRP.js";
|
|
13
|
-
import "./types-BzyGRkRt.js";
|
|
14
|
-
import "./authdocloader-Bq0gEHRj.js";
|
|
15
|
-
import "./vocab-Bg1J3mu4.js";
|
|
16
|
-
|
|
17
|
-
export { FederationImpl };
|
package/dist/mod-TFoH2Ql8.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-CxWcuWqQ.js";
|
|
4
|
-
import { HttpMessageSignaturesSpecDeterminer } from "./http-DqSNLFNY.js";
|
|
5
|
-
import { TracerProvider } from "@opentelemetry/api";
|
|
6
|
-
|
|
7
|
-
//#region src/runtime/authdocloader.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Options for {@link getAuthenticatedDocumentLoader}.
|
|
10
|
-
* @see {@link getAuthenticatedDocumentLoader}
|
|
11
|
-
* @since 1.3.0
|
|
12
|
-
*/
|
|
13
|
-
interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
14
|
-
/**
|
|
15
|
-
* An optional spec determiner for HTTP Message Signatures.
|
|
16
|
-
* It determines the spec to use for signing requests.
|
|
17
|
-
* It is used for double-knocking
|
|
18
|
-
* (see <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>).
|
|
19
|
-
* @since 1.6.0
|
|
20
|
-
*/
|
|
21
|
-
specDeterminer?: HttpMessageSignaturesSpecDeterminer;
|
|
22
|
-
/**
|
|
23
|
-
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
|
24
|
-
* is used.
|
|
25
|
-
* @since 1.6.0
|
|
26
|
-
*/
|
|
27
|
-
tracerProvider?: TracerProvider;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Gets an authenticated {@link DocumentLoader} for the given identity.
|
|
31
|
-
* Note that an authenticated document loader intentionally does not cache
|
|
32
|
-
* the fetched documents.
|
|
33
|
-
* @param identity The identity to get the document loader for.
|
|
34
|
-
* The actor's key pair.
|
|
35
|
-
* @param options The options for the document loader.
|
|
36
|
-
* @returns The authenticated document loader.
|
|
37
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
38
|
-
* @since 0.4.0
|
|
39
|
-
*/
|
|
40
|
-
declare function getAuthenticatedDocumentLoader(identity: {
|
|
41
|
-
keyId: URL;
|
|
42
|
-
privateKey: CryptoKey;
|
|
43
|
-
}, {
|
|
44
|
-
allowPrivateAddress,
|
|
45
|
-
userAgent,
|
|
46
|
-
specDeterminer,
|
|
47
|
-
tracerProvider
|
|
48
|
-
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/runtime/key.d.ts
|
|
51
|
-
/**
|
|
52
|
-
* Imports a PEM-SPKI formatted public key.
|
|
53
|
-
* @param pem The PEM-SPKI formatted public key.
|
|
54
|
-
* @returns The imported public key.
|
|
55
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
56
|
-
* @since 0.5.0
|
|
57
|
-
*/
|
|
58
|
-
declare function importSpki(pem: string): Promise<CryptoKey>;
|
|
59
|
-
/**
|
|
60
|
-
* Exports a public key in PEM-SPKI format.
|
|
61
|
-
* @param key The public key to export.
|
|
62
|
-
* @returns The exported public key in PEM-SPKI format.
|
|
63
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
64
|
-
* @since 0.5.0
|
|
65
|
-
*/
|
|
66
|
-
declare function exportSpki(key: CryptoKey): Promise<string>;
|
|
67
|
-
/**
|
|
68
|
-
* Imports a PEM-PKCS#1 formatted public key.
|
|
69
|
-
* @param pem The PEM-PKCS#1 formatted public key.
|
|
70
|
-
* @returns The imported public key.
|
|
71
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
72
|
-
* @since 1.5.0
|
|
73
|
-
*/
|
|
74
|
-
declare function importPkcs1(pem: string): Promise<CryptoKey>;
|
|
75
|
-
/**
|
|
76
|
-
* Imports a PEM formatted public key (SPKI or PKCS#1).
|
|
77
|
-
* @param pem The PEM formatted public key to import (SPKI or PKCS#1).
|
|
78
|
-
* @returns The imported public key.
|
|
79
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
80
|
-
* @since 1.5.0
|
|
81
|
-
*/
|
|
82
|
-
declare function importPem(pem: string): Promise<CryptoKey>;
|
|
83
|
-
/**
|
|
84
|
-
* Imports a [Multibase]-encoded public key.
|
|
85
|
-
*
|
|
86
|
-
* [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
|
|
87
|
-
* @param key The Multibase-encoded public key.
|
|
88
|
-
* @returns The imported public key.
|
|
89
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
90
|
-
* @since 0.10.0
|
|
91
|
-
*/
|
|
92
|
-
declare function importMultibaseKey(key: string): Promise<CryptoKey>;
|
|
93
|
-
/**
|
|
94
|
-
* Exports a public key in [Multibase] format.
|
|
95
|
-
*
|
|
96
|
-
* [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
|
|
97
|
-
* @param key The public key to export.
|
|
98
|
-
* @returns The exported public key in Multibase format.
|
|
99
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
100
|
-
* @since 0.10.0
|
|
101
|
-
*/
|
|
102
|
-
declare function exportMultibaseKey(key: CryptoKey): Promise<string>;
|
|
103
|
-
//#endregion
|
|
104
|
-
export { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki };
|
package/dist/mod-g0xFzAP9.d.ts
DELETED
package/dist/mq-CRGm1e_F.d.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
|
|
4
|
-
//#region src/federation/mq.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Additional options for enqueuing a message in a queue.
|
|
7
|
-
*
|
|
8
|
-
* @since 0.5.0
|
|
9
|
-
*/
|
|
10
|
-
interface MessageQueueEnqueueOptions {
|
|
11
|
-
/**
|
|
12
|
-
* The delay before the message is enqueued. No delay by default.
|
|
13
|
-
*
|
|
14
|
-
* It must not be negative.
|
|
15
|
-
*/
|
|
16
|
-
delay?: Temporal.Duration;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Additional options for listening to a message queue.
|
|
20
|
-
*
|
|
21
|
-
* @since 1.0.0
|
|
22
|
-
*/
|
|
23
|
-
interface MessageQueueListenOptions {
|
|
24
|
-
/**
|
|
25
|
-
* The signal to abort listening to the message queue.
|
|
26
|
-
*/
|
|
27
|
-
signal?: AbortSignal;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* An abstract interface for a message queue.
|
|
31
|
-
*
|
|
32
|
-
* @since 0.5.0
|
|
33
|
-
*/
|
|
34
|
-
interface MessageQueue {
|
|
35
|
-
/**
|
|
36
|
-
* Whether the message queue backend provides native retry mechanisms.
|
|
37
|
-
* When `true`, Fedify will skip its own retry logic and rely on the backend
|
|
38
|
-
* to handle retries. When `false` or omitted, Fedify will handle retries
|
|
39
|
-
* using its own retry policies.
|
|
40
|
-
*
|
|
41
|
-
* @default `false`
|
|
42
|
-
* @since 1.7.0
|
|
43
|
-
*/
|
|
44
|
-
readonly nativeRetrial?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Enqueues a message in the queue.
|
|
47
|
-
* @param message The message to enqueue.
|
|
48
|
-
* @param options Additional options for enqueuing the message.
|
|
49
|
-
*/
|
|
50
|
-
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Enqueues multiple messages in the queue. This operation is optional,
|
|
53
|
-
* and may not be supported by all implementations. If not supported,
|
|
54
|
-
* Fedify will invoke {@link enqueue} for each message.
|
|
55
|
-
*
|
|
56
|
-
* @param messages The messages to enqueue.
|
|
57
|
-
* @param options Additional options for enqueuing the messages.
|
|
58
|
-
*/
|
|
59
|
-
enqueueMany?: (messages: any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
|
|
60
|
-
/**
|
|
61
|
-
* Listens for messages in the queue.
|
|
62
|
-
* @param handler The handler for messages in the queue.
|
|
63
|
-
* @param options Additional options for listening to the message queue.
|
|
64
|
-
* @returns A promise that resolves when the listening is done. It never
|
|
65
|
-
* rejects, and is resolved when the signal is aborted. If no
|
|
66
|
-
* signal is provided, it never resolves.
|
|
67
|
-
*/
|
|
68
|
-
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Additional options for {@link InProcessMessageQueue}.
|
|
72
|
-
* @since 1.0.0
|
|
73
|
-
*/
|
|
74
|
-
interface InProcessMessageQueueOptions {
|
|
75
|
-
/**
|
|
76
|
-
* The interval to poll for messages in the queue. 5 seconds by default.
|
|
77
|
-
* @default `{ seconds: 5 }`
|
|
78
|
-
*/
|
|
79
|
-
pollInterval?: Temporal.Duration | Temporal.DurationLike;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* A message queue that processes messages in the same process.
|
|
83
|
-
* Do not use this in production as it does neither persist messages nor
|
|
84
|
-
* distribute them across multiple processes.
|
|
85
|
-
*
|
|
86
|
-
* @since 0.5.0
|
|
87
|
-
*/
|
|
88
|
-
declare class InProcessMessageQueue implements MessageQueue {
|
|
89
|
-
#private;
|
|
90
|
-
/**
|
|
91
|
-
* In-process message queue does not provide native retry mechanisms.
|
|
92
|
-
* @since 1.7.0
|
|
93
|
-
*/
|
|
94
|
-
readonly nativeRetrial = false;
|
|
95
|
-
/**
|
|
96
|
-
* Constructs a new {@link InProcessMessageQueue} with the given options.
|
|
97
|
-
* @param options Additional options for the in-process message queue.
|
|
98
|
-
*/
|
|
99
|
-
constructor(options?: InProcessMessageQueueOptions);
|
|
100
|
-
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
101
|
-
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
102
|
-
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* A message queue that processes messages in parallel. It takes another
|
|
106
|
-
* {@link MessageQueue}, and processes messages in parallel up to a certain
|
|
107
|
-
* number of workers.
|
|
108
|
-
*
|
|
109
|
-
* Actually, it's rather a decorator than a queue itself.
|
|
110
|
-
*
|
|
111
|
-
* Note that the workers do not run in truly parallel, in the sense that they
|
|
112
|
-
* are not running in separate threads or processes. They are running in the
|
|
113
|
-
* same process, but are scheduled to run in parallel. Hence, this is useful
|
|
114
|
-
* for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
|
|
115
|
-
* workloads.
|
|
116
|
-
*
|
|
117
|
-
* @since 1.0.0
|
|
118
|
-
*/
|
|
119
|
-
declare class ParallelMessageQueue implements MessageQueue {
|
|
120
|
-
#private;
|
|
121
|
-
readonly queue: MessageQueue;
|
|
122
|
-
readonly workers: number;
|
|
123
|
-
/**
|
|
124
|
-
* Inherits the native retry capability from the wrapped queue.
|
|
125
|
-
* @since 1.7.0
|
|
126
|
-
*/
|
|
127
|
-
readonly nativeRetrial?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Constructs a new {@link ParallelMessageQueue} with the given queue and
|
|
130
|
-
* number of workers.
|
|
131
|
-
* @param queue The message queue to use under the hood. Note that
|
|
132
|
-
* {@link ParallelMessageQueue} cannot be nested.
|
|
133
|
-
* @param workers The number of workers to process messages in parallel.
|
|
134
|
-
* @throws {TypeError} If the given queue is an instance of
|
|
135
|
-
* {@link ParallelMessageQueue}.
|
|
136
|
-
*/
|
|
137
|
-
constructor(queue: MessageQueue, workers: number);
|
|
138
|
-
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
139
|
-
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
140
|
-
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
export { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue };
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
globalThis.addEventListener = () => {};
|
|
5
|
-
|
|
6
|
-
import "../type-I68qwqmo.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-DNQyH8UQ.js";
|
|
12
|
-
import { test } from "../testing-BG_8Fyas.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";
|
|
18
|
-
|
|
19
|
-
//#region src/nodeinfo/semver.test.ts
|
|
20
|
-
test("parseSemVer() handles major", async (t) => {
|
|
21
|
-
const versions = [
|
|
22
|
-
["1.2.3", 1],
|
|
23
|
-
[" 1.2.3 ", 1],
|
|
24
|
-
[" 2.2.3-4 ", 2],
|
|
25
|
-
[" 3.2.3-pre ", 3],
|
|
26
|
-
["v5.2.3", 5],
|
|
27
|
-
[" v8.2.3 ", 8],
|
|
28
|
-
[" 13.2.3", 13]
|
|
29
|
-
];
|
|
30
|
-
for (const [v, expected] of versions) await t.step(v, () => {
|
|
31
|
-
const version = parseSemVer(v);
|
|
32
|
-
assertEquals(version.major, expected);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
test("parseSemVer() handles minor", async (t) => {
|
|
36
|
-
const versions = [
|
|
37
|
-
["1.1.3", 1],
|
|
38
|
-
[" 1.1.3 ", 1],
|
|
39
|
-
[" 1.2.3-4 ", 2],
|
|
40
|
-
[" 1.3.3-pre ", 3],
|
|
41
|
-
["v1.5.3", 5],
|
|
42
|
-
[" v1.8.3 ", 8],
|
|
43
|
-
[" 1.13.3", 13]
|
|
44
|
-
];
|
|
45
|
-
for (const [v, expected] of versions) await t.step(v, () => {
|
|
46
|
-
const version = parseSemVer(v);
|
|
47
|
-
assertEquals(version.minor, expected);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
test("parseSemVer() handles patch", async (t) => {
|
|
51
|
-
const versions = [
|
|
52
|
-
["1.2.1", 1],
|
|
53
|
-
[" 1.2.1 ", 1],
|
|
54
|
-
[" 1.2.2-4 ", 2],
|
|
55
|
-
[" 1.2.3-pre ", 3],
|
|
56
|
-
["v1.2.5", 5],
|
|
57
|
-
[" v1.2.8 ", 8],
|
|
58
|
-
[" 1.2.13", 13]
|
|
59
|
-
];
|
|
60
|
-
for (const [v, expected] of versions) await t.step(v, () => {
|
|
61
|
-
const semver = parseSemVer(v);
|
|
62
|
-
const actual = semver.patch;
|
|
63
|
-
assertEquals(actual, expected);
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
test("parseSemVer() handles prerelease", async (t) => {
|
|
67
|
-
const versions = [
|
|
68
|
-
["1.2.2-alpha.1", ["alpha", 1]],
|
|
69
|
-
["0.6.1-1", [1]],
|
|
70
|
-
["1.0.0-beta.2", ["beta", 2]],
|
|
71
|
-
["v0.5.4-pre", ["pre"]],
|
|
72
|
-
["1.2.2-alpha.1", ["alpha", 1]],
|
|
73
|
-
["1.2.0-1b3-4", ["1b3-4"]],
|
|
74
|
-
["1.2.0-3.6-pre2", [3, "6-pre2"]],
|
|
75
|
-
["2.0.0", []]
|
|
76
|
-
];
|
|
77
|
-
for (const [v, expected] of versions) await t.step(`${v} : ${JSON.stringify(expected)}`, () => {
|
|
78
|
-
const semver = parseSemVer(v);
|
|
79
|
-
assertEquals(semver.prerelease, expected);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
test({
|
|
83
|
-
name: "parseSemVer() throws on bad versions",
|
|
84
|
-
fn: async (t) => {
|
|
85
|
-
const versions = [
|
|
86
|
-
["1.2." + new Array(256).join("1")],
|
|
87
|
-
["1.2." + new Array(100).join("1")],
|
|
88
|
-
[null],
|
|
89
|
-
[void 0],
|
|
90
|
-
[{}],
|
|
91
|
-
[[]],
|
|
92
|
-
[false],
|
|
93
|
-
[true],
|
|
94
|
-
[0],
|
|
95
|
-
[""],
|
|
96
|
-
["not a version"],
|
|
97
|
-
["∞.∞.∞"],
|
|
98
|
-
["NaN.NaN.NaN"]
|
|
99
|
-
];
|
|
100
|
-
for (const [v] of versions) await t.step(`${JSON.stringify(v)}`, () => {
|
|
101
|
-
assertThrows(() => parseSemVer(v));
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
test("parseSemVer() throws on invalid versions", async (t) => {
|
|
106
|
-
const versions = [
|
|
107
|
-
"1.2.3.4",
|
|
108
|
-
"NOT VALID",
|
|
109
|
-
1.2,
|
|
110
|
-
null,
|
|
111
|
-
"Infinity.NaN.Infinity"
|
|
112
|
-
];
|
|
113
|
-
for (const v of versions) await t.step(`invalid ${v}`, () => {
|
|
114
|
-
assertThrows(function() {
|
|
115
|
-
parseSemVer(v);
|
|
116
|
-
}, TypeError);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
test("parseSemVer() handles big numeric prerelease", function() {
|
|
120
|
-
const r = parseSemVer(`1.2.3-beta.${Number.MAX_SAFE_INTEGER}0`);
|
|
121
|
-
assertEquals(r.prerelease, ["beta", "90071992547409910"]);
|
|
122
|
-
});
|
|
123
|
-
test("formatSemVer()", async (t) => {
|
|
124
|
-
const versions = [
|
|
125
|
-
["0.0.0", "0.0.0"],
|
|
126
|
-
["1.2.3", "1.2.3"],
|
|
127
|
-
["1.2.3-pre", "1.2.3-pre"],
|
|
128
|
-
["1.2.3-pre.0", "1.2.3-pre.0"],
|
|
129
|
-
["1.2.3+b", "1.2.3+b"],
|
|
130
|
-
["1.2.3+b.0", "1.2.3+b.0"],
|
|
131
|
-
["1.2.3-pre.0+b.0", "1.2.3-pre.0+b.0"]
|
|
132
|
-
];
|
|
133
|
-
for (const [version, expected] of versions) await t.step({
|
|
134
|
-
name: version,
|
|
135
|
-
fn: () => {
|
|
136
|
-
const v = parseSemVer(version);
|
|
137
|
-
const actual = formatSemVer(v);
|
|
138
|
-
assertEquals(actual, expected);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
//#endregion
|