@fedify/fedify 2.0.0-dev.1875 → 2.0.0-dev.196
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 +68 -35
- package/dist/{builder-CLT_zIyw.js → builder-R1Sfe-tb.js} +5 -3
- package/dist/{client-BsGzbnV-.d.ts → client-CUTUGgvJ.d.ts} +18 -18
- package/dist/{client-pY7-3icS.js → client-Dg7OfUDA.js} +28 -23
- package/dist/{client-94iWEfQa.d.cts → client-by-PEGAJ.d.cts} +18 -18
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +6 -11
- package/dist/compat/mod.d.ts +6 -11
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +22 -21
- package/dist/context-Bns6uTJq.js +109 -0
- package/dist/{context-DG0huGW-.d.ts → context-C7vzWilY.d.ts} +200 -65
- package/dist/{context-DJ8aSy2Q.d.cts → context-CrB9RFy5.d.cts} +200 -65
- package/dist/deno-i60L3ZJW.js +117 -0
- package/dist/{testing-CW4N8vgf.js → dist-B5f6a8Tt.js} +90 -110
- package/dist/{docloader-BkhI_RcC.js → docloader-BuOglEYx.js} +3 -3
- package/dist/{esm-DOqAYjlY.js → esm-DGl7uK1r.js} +32 -17
- package/dist/federation/builder.test.js +7 -5
- package/dist/federation/collection.test.js +2 -3
- package/dist/federation/handler.test.js +110 -22
- package/dist/federation/idempotency.test.js +23 -22
- package/dist/federation/inbox.test.js +4 -3
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +56 -3
- package/dist/federation/middleware.test.js +95 -93
- package/dist/federation/mod.cjs +8 -10
- package/dist/federation/mod.d.cts +7 -12
- package/dist/federation/mod.d.ts +7 -12
- package/dist/federation/mod.js +8 -11
- package/dist/federation/mq.test.js +5 -4
- package/dist/federation/negotiation.test.js +2 -3
- package/dist/federation/retry.test.js +2 -3
- package/dist/federation/router.test.js +2 -2
- package/dist/federation/send.test.js +51 -9
- package/dist/{webfinger/handler.test.js → federation/webfinger.test.js} +24 -22
- package/dist/{federation-CRpdnOMS.cjs → federation-B431K2gm.cjs} +22 -0
- package/dist/{federation-jcR8-ZxP.js → federation-BbZwNNWj.js} +28 -6
- package/dist/{http-DmUiHemJ.js → http-B5BgMxiO.js} +119 -9
- package/dist/{http-DarlEN23.cjs → http-B_jtB30-.cjs} +132 -16
- package/dist/{http-M8k5mKc0.d.cts → http-ClB3pLcL.d.cts} +1 -1
- package/dist/{http-BbO0ejuk.d.ts → http-DLBDPal9.d.ts} +1 -1
- package/dist/{http-BIYwcgTd.js → http-uzkhnm0W.js} +3 -2
- package/dist/{inbox-Dbt8hLxb.js → inbox-CxrUTds4.js} +2 -1
- package/dist/{key-BcT6cdMK.js → key-DBHCloAO.js} +3 -3
- package/dist/{keycache-B8aIeTgt.js → keycache-DRxpZ5r9.js} +1 -1
- package/dist/{keys-Bs-0Hapk.js → keys-ZbcByPg9.js} +1 -1
- package/dist/{kv-Bxr0Q87_.d.cts → kv-B4vFhIYL.d.cts} +30 -1
- package/dist/{kv-BKNZ-Tb-.d.ts → kv-CYySNrsn.d.ts} +30 -1
- package/dist/{kv-CRZrzyXm.js → kv-QzKcOQgP.js} +22 -0
- package/dist/{kv-cache-DN9pfMBe.js → kv-cache-BEeqyGER.js} +14 -1
- package/dist/{kv-cache-B5TLf2fI.js → kv-cache-BqWqxam4.js} +2 -2
- package/dist/{kv-cache-BWWu8RyL.cjs → kv-cache-DY6hQ8Rf.cjs} +2 -2
- package/dist/{ld-DR6mmQjt.js → ld-CZgNIUGN.js} +4 -3
- package/dist/{middleware-B09KVcU4.cjs → middleware-BaoVtoMl.cjs} +210 -194
- package/dist/{middleware-B_rzGWsn.js → middleware-BqPcChYv.js} +164 -154
- package/dist/middleware-CnrWiFJI.cjs +12 -0
- package/dist/{middleware-Aqt52eK0.js → middleware-CxwWsgSo.js} +162 -165
- package/dist/middleware-DoFisLae.js +26 -0
- package/dist/middleware-ZN9cd_L8.js +12 -0
- package/dist/{mod-0noXw66R.d.cts → mod-0p9zUdzg.d.cts} +6 -6
- package/dist/mod-0qnPv4EC.d.cts +62 -0
- package/dist/{mod-DgdBYYa0.d.cts → mod-BrS8tiad.d.cts} +2 -2
- package/dist/mod-C3SOvTD1.d.ts +64 -0
- package/dist/{mod-DJcZDvjA.d.cts → mod-D6pS5_xJ.d.cts} +4 -4
- package/dist/{mod-B2iOw50L.d.ts → mod-jOa7W503.d.ts} +2 -2
- package/dist/{mod-BoHnwOCs.d.ts → mod-waqu-BL_.d.ts} +4 -4
- package/dist/{mod-B9M-8jm2.d.ts → mod-xc20HhMD.d.ts} +6 -6
- package/dist/mod.cjs +11 -93
- package/dist/mod.d.cts +11 -16
- package/dist/mod.d.ts +11 -16
- package/dist/mod.js +11 -15
- package/dist/nodeinfo/client.test.js +3 -4
- package/dist/nodeinfo/handler.test.js +22 -21
- package/dist/nodeinfo/mod.cjs +2 -2
- package/dist/nodeinfo/mod.d.cts +2 -2
- package/dist/nodeinfo/mod.d.ts +2 -2
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/types.test.js +2 -3
- package/dist/otel/exporter.test.js +893 -0
- package/dist/otel/mod.cjs +256 -0
- package/dist/otel/mod.d.cts +230 -0
- package/dist/otel/mod.d.ts +232 -0
- package/dist/otel/mod.js +255 -0
- package/dist/{owner-DEgLiB7Z.js → owner-BDvRiO5T.js} +44 -8
- package/dist/{owner-kQRGVXG1.d.ts → owner-BgI8C-VY.d.ts} +1 -2
- package/dist/{owner-B4HbyP8s.d.cts → owner-C-zfmVAD.d.cts} +1 -2
- package/dist/{proof-AhMjXzru.js → proof-DzFse-Bn.js} +46 -11
- package/dist/{proof-p3cmdfis.js → proof-XEPY5YKg.js} +3 -2
- package/dist/{proof-CbB_yXKu.cjs → proof-vmNsq1AQ.cjs} +63 -28
- package/dist/router-D9eI0s4b.js +118 -0
- package/dist/{send-CcKJ-npK.js → send-BdhhZ2MN.js} +9 -4
- package/dist/sig/http.test.js +6 -7
- package/dist/sig/key.test.js +5 -5
- package/dist/sig/ld.test.js +6 -6
- package/dist/sig/mod.cjs +3 -5
- package/dist/sig/mod.d.cts +3 -5
- package/dist/sig/mod.d.ts +3 -5
- package/dist/sig/mod.js +3 -5
- package/dist/sig/owner.test.js +29 -6
- package/dist/sig/proof.test.js +6 -6
- package/dist/testing/mod.d.ts +70 -6999
- package/dist/testing/mod.js +4 -3
- package/dist/{transformers-CoBS-oFG.cjs → transformers-BjBg6Lag.cjs} +2 -2
- package/dist/{transformers-BFT6d7J5.js → transformers-N_ip_y4P.js} +2 -2
- package/dist/{types-BtUjyi5y.js → types-8l28uC8o.js} +30 -25
- package/dist/{types-CWgzGaqk.cjs → types-B6z6CqIz.cjs} +30 -25
- package/dist/{types-C2XVl6gj.js → types-CPz01LGH.js} +3 -3
- package/dist/utils/docloader.test.js +7 -8
- package/dist/utils/kv-cache.test.js +5 -3
- package/dist/utils/mod.cjs +3 -5
- package/dist/utils/mod.d.cts +3 -4
- package/dist/utils/mod.d.ts +3 -4
- package/dist/utils/mod.js +3 -5
- package/package.json +25 -67
- package/dist/actor-BQuDqoKQ.cjs +0 -42079
- package/dist/actor-CmPnJ0G7.js +0 -146
- package/dist/actor-CtTW_fTc.js +0 -41647
- package/dist/actor-DqFajh9s.d.ts +0 -130
- package/dist/actor-f2NtjyCg.d.cts +0 -128
- package/dist/denokv-CCssOzMJ.js +0 -57
- 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/media.example.com/avatars/test-avatar.jpg.json +0 -6
- 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/lookup-Bhv7efZB.js +0 -42183
- package/dist/lookup-DdpqU9Gb.js +0 -258
- package/dist/lookup-EHJhdA8l.cjs +0 -270
- package/dist/middleware-C_Sa9J23.cjs +0 -15
- package/dist/middleware-DGwP3i-w.js +0 -15
- package/dist/middleware-Xyxj43cy.js +0 -26
- package/dist/mod-BlVovdcy.d.ts +0 -309
- package/dist/mod-BxRCHTz-.d.cts +0 -307
- package/dist/mod-C2tOeRkN.d.cts +0 -1
- package/dist/mod-C58MZ7Wx.d.cts +0 -113
- package/dist/mod-Ds0mpFZU.d.ts +0 -115
- package/dist/mod-xIj-IT58.d.ts +0 -2
- package/dist/mq-CUKlBw08.d.ts +0 -143
- package/dist/mq-DcJPkXD5.d.cts +0 -140
- 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 -22
- package/dist/vocab/actor.test.js +0 -5963
- package/dist/vocab/lookup.test.d.ts +0 -3
- package/dist/vocab/lookup.test.js +0 -454
- package/dist/vocab/mod.cjs +0 -86
- package/dist/vocab/mod.d.cts +0 -4
- package/dist/vocab/mod.d.ts +0 -6
- package/dist/vocab/mod.js +0 -9
- package/dist/vocab/type.test.d.ts +0 -3
- package/dist/vocab/type.test.js +0 -24
- package/dist/vocab/vocab.test.d.ts +0 -3
- package/dist/vocab/vocab.test.js +0 -9397
- package/dist/vocab-BCWe1Ih5.d.ts +0 -14905
- package/dist/vocab-CeDBzu-f.d.cts +0 -14903
- package/dist/vocab-CuAJ4Tbh.js +0 -255
- package/dist/vocab-DCYaqGPG.cjs +0 -291
- package/dist/webfinger/handler.test.d.ts +0 -3
- package/dist/webfinger/lookup.test.d.ts +0 -3
- package/dist/webfinger/lookup.test.js +0 -193
- package/dist/webfinger/mod.cjs +0 -8
- package/dist/webfinger/mod.d.cts +0 -2
- package/dist/webfinger/mod.d.ts +0 -4
- package/dist/webfinger/mod.js +0 -8
- package/dist/webfinger-C72Y8lrh.js +0 -4
- package/dist/webfinger-vAtLmxOF.cjs +0 -4
- package/dist/x/cfworkers.cjs +0 -100
- package/dist/x/cfworkers.d.cts +0 -59
- 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 -177
- package/dist/x/hono.cjs +0 -61
- package/dist/x/hono.d.cts +0 -53
- package/dist/x/hono.d.ts +0 -55
- package/dist/x/hono.js +0 -60
- package/dist/x/sveltekit.cjs +0 -69
- package/dist/x/sveltekit.d.cts +0 -45
- package/dist/x/sveltekit.d.ts +0 -47
- package/dist/x/sveltekit.js +0 -68
- /package/dist/{collection-BzWsN9pB.js → collection-CcnIw1qY.js} +0 -0
- /package/dist/{testing/docloader.test.d.ts → federation/webfinger.test.d.ts} +0 -0
- /package/dist/{mod-CVgZgliM.d.ts → mod-1E3W847c.d.ts} +0 -0
- /package/dist/{mod-B-hUPT2N.d.cts → mod-C81L6_lQ.d.cts} +0 -0
- /package/dist/{negotiation-C4nFufNk.js → negotiation-5NPJL6zp.js} +0 -0
- /package/dist/{nodeinfo-BnthBobC.js → nodeinfo-BlLsRSiT.js} +0 -0
- /package/dist/{nodeinfo-CdN0rEnZ.cjs → nodeinfo-DuMYTpbZ.cjs} +0 -0
- /package/dist/{vocab/actor.test.d.ts → otel/exporter.test.d.ts} +0 -0
- /package/dist/{retry-CfF8Gn4d.js → retry-D4GJ670a.js} +0 -0
- /package/dist/{sig-C34-oHBl.js → sig-CwuONEzF.js} +0 -0
- /package/dist/{sig-YYj5tCnr.cjs → sig-DeXX2xnj.cjs} +0 -0
- /package/dist/{utils-DyRU1gdZ.cjs → utils-Db0ZmjcD.cjs} +0 -0
- /package/dist/{utils-D-Va7aXC.js → utils-Wranxuoe.js} +0 -0
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-BxRCHTz-.cjs";
|
|
7
|
-
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-C58MZ7Wx.cjs";
|
|
8
|
-
import { KvKey, KvStore } from "./kv-Bxr0Q87_.cjs";
|
|
9
|
-
import { MessageQueue } from "./mq-DcJPkXD5.cjs";
|
|
1
|
+
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-by-PEGAJ.cjs";
|
|
2
|
+
import { HttpMessageSignaturesSpec } from "./http-ClB3pLcL.cjs";
|
|
3
|
+
import { GetKeyOwnerOptions } from "./owner-C-zfmVAD.cjs";
|
|
4
|
+
import { KvKey, KvStore } from "./kv-B4vFhIYL.cjs";
|
|
5
|
+
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
|
|
10
6
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
11
|
-
import {
|
|
7
|
+
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
|
|
8
|
+
import { Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
12
9
|
|
|
13
10
|
//#region src/compat/types.d.ts
|
|
14
11
|
/**
|
|
@@ -22,9 +19,9 @@ type ActivityTransformer<TContextData> = (activity: Activity, context: Context<T
|
|
|
22
19
|
* A page of items.
|
|
23
20
|
*/
|
|
24
21
|
interface PageItems<TItem> {
|
|
25
|
-
prevCursor?: string | null;
|
|
26
|
-
nextCursor?: string | null;
|
|
27
|
-
items: TItem[];
|
|
22
|
+
readonly prevCursor?: string | null;
|
|
23
|
+
readonly nextCursor?: string | null;
|
|
24
|
+
readonly items: readonly TItem[];
|
|
28
25
|
}
|
|
29
26
|
/**
|
|
30
27
|
* Calculates the [partial follower collection digest][1].
|
|
@@ -54,11 +51,11 @@ interface SenderKeyPair {
|
|
|
54
51
|
/**
|
|
55
52
|
* The actor's private key to sign the request.
|
|
56
53
|
*/
|
|
57
|
-
privateKey: CryptoKey;
|
|
54
|
+
readonly privateKey: CryptoKey;
|
|
58
55
|
/**
|
|
59
56
|
* The public key ID that corresponds to the private key.
|
|
60
57
|
*/
|
|
61
|
-
keyId: URL;
|
|
58
|
+
readonly keyId: URL;
|
|
62
59
|
}
|
|
63
60
|
/**
|
|
64
61
|
* Parameters for {@link sendActivity}.
|
|
@@ -306,8 +303,146 @@ type CustomCollectionCounter<TParam extends string, TContextData> = (context: Re
|
|
|
306
303
|
*/
|
|
307
304
|
type CustomCollectionCursor<TParam extends string, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: Record<TParam, string>) => string | null | Promise<string | null>;
|
|
308
305
|
//#endregion
|
|
306
|
+
//#region src/federation/mq.d.ts
|
|
307
|
+
/**
|
|
308
|
+
* Additional options for enqueuing a message in a queue.
|
|
309
|
+
*
|
|
310
|
+
* @since 0.5.0
|
|
311
|
+
*/
|
|
312
|
+
interface MessageQueueEnqueueOptions {
|
|
313
|
+
/**
|
|
314
|
+
* The delay before the message is enqueued. No delay by default.
|
|
315
|
+
*
|
|
316
|
+
* It must not be negative.
|
|
317
|
+
*/
|
|
318
|
+
delay?: Temporal.Duration;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Additional options for listening to a message queue.
|
|
322
|
+
*
|
|
323
|
+
* @since 1.0.0
|
|
324
|
+
*/
|
|
325
|
+
interface MessageQueueListenOptions {
|
|
326
|
+
/**
|
|
327
|
+
* The signal to abort listening to the message queue.
|
|
328
|
+
*/
|
|
329
|
+
signal?: AbortSignal;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* An abstract interface for a message queue.
|
|
333
|
+
*
|
|
334
|
+
* @since 0.5.0
|
|
335
|
+
*/
|
|
336
|
+
interface MessageQueue {
|
|
337
|
+
/**
|
|
338
|
+
* Whether the message queue backend provides native retry mechanisms.
|
|
339
|
+
* When `true`, Fedify will skip its own retry logic and rely on the backend
|
|
340
|
+
* to handle retries. When `false` or omitted, Fedify will handle retries
|
|
341
|
+
* using its own retry policies.
|
|
342
|
+
*
|
|
343
|
+
* @default `false`
|
|
344
|
+
* @since 1.7.0
|
|
345
|
+
*/
|
|
346
|
+
readonly nativeRetrial?: boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Enqueues a message in the queue.
|
|
349
|
+
* @param message The message to enqueue.
|
|
350
|
+
* @param options Additional options for enqueuing the message.
|
|
351
|
+
*/
|
|
352
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
353
|
+
/**
|
|
354
|
+
* Enqueues multiple messages in the queue. This operation is optional,
|
|
355
|
+
* and may not be supported by all implementations. If not supported,
|
|
356
|
+
* Fedify will invoke {@link enqueue} for each message.
|
|
357
|
+
*
|
|
358
|
+
* @param messages The messages to enqueue.
|
|
359
|
+
* @param options Additional options for enqueuing the messages.
|
|
360
|
+
*/
|
|
361
|
+
enqueueMany?: (messages: readonly any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
|
|
362
|
+
/**
|
|
363
|
+
* Listens for messages in the queue.
|
|
364
|
+
* @param handler The handler for messages in the queue.
|
|
365
|
+
* @param options Additional options for listening to the message queue.
|
|
366
|
+
* @returns A promise that resolves when the listening is done. It never
|
|
367
|
+
* rejects, and is resolved when the signal is aborted. If no
|
|
368
|
+
* signal is provided, it never resolves.
|
|
369
|
+
*/
|
|
370
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Additional options for {@link InProcessMessageQueue}.
|
|
374
|
+
* @since 1.0.0
|
|
375
|
+
*/
|
|
376
|
+
interface InProcessMessageQueueOptions {
|
|
377
|
+
/**
|
|
378
|
+
* The interval to poll for messages in the queue. 5 seconds by default.
|
|
379
|
+
* @default `{ seconds: 5 }`
|
|
380
|
+
*/
|
|
381
|
+
pollInterval?: Temporal.Duration | Temporal.DurationLike;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* A message queue that processes messages in the same process.
|
|
385
|
+
* Do not use this in production as it does neither persist messages nor
|
|
386
|
+
* distribute them across multiple processes.
|
|
387
|
+
*
|
|
388
|
+
* @since 0.5.0
|
|
389
|
+
*/
|
|
390
|
+
declare class InProcessMessageQueue implements MessageQueue {
|
|
391
|
+
#private;
|
|
392
|
+
/**
|
|
393
|
+
* In-process message queue does not provide native retry mechanisms.
|
|
394
|
+
* @since 1.7.0
|
|
395
|
+
*/
|
|
396
|
+
readonly nativeRetrial = false;
|
|
397
|
+
/**
|
|
398
|
+
* Constructs a new {@link InProcessMessageQueue} with the given options.
|
|
399
|
+
* @param options Additional options for the in-process message queue.
|
|
400
|
+
*/
|
|
401
|
+
constructor(options?: InProcessMessageQueueOptions);
|
|
402
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
403
|
+
enqueueMany(messages: readonly any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
404
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* A message queue that processes messages in parallel. It takes another
|
|
408
|
+
* {@link MessageQueue}, and processes messages in parallel up to a certain
|
|
409
|
+
* number of workers.
|
|
410
|
+
*
|
|
411
|
+
* Actually, it's rather a decorator than a queue itself.
|
|
412
|
+
*
|
|
413
|
+
* Note that the workers do not run in truly parallel, in the sense that they
|
|
414
|
+
* are not running in separate threads or processes. They are running in the
|
|
415
|
+
* same process, but are scheduled to run in parallel. Hence, this is useful
|
|
416
|
+
* for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
|
|
417
|
+
* workloads.
|
|
418
|
+
*
|
|
419
|
+
* @since 1.0.0
|
|
420
|
+
*/
|
|
421
|
+
declare class ParallelMessageQueue implements MessageQueue {
|
|
422
|
+
#private;
|
|
423
|
+
readonly queue: MessageQueue;
|
|
424
|
+
readonly workers: number;
|
|
425
|
+
/**
|
|
426
|
+
* Inherits the native retry capability from the wrapped queue.
|
|
427
|
+
* @since 1.7.0
|
|
428
|
+
*/
|
|
429
|
+
readonly nativeRetrial?: boolean;
|
|
430
|
+
/**
|
|
431
|
+
* Constructs a new {@link ParallelMessageQueue} with the given queue and
|
|
432
|
+
* number of workers.
|
|
433
|
+
* @param queue The message queue to use under the hood. Note that
|
|
434
|
+
* {@link ParallelMessageQueue} cannot be nested.
|
|
435
|
+
* @param workers The number of workers to process messages in parallel.
|
|
436
|
+
* @throws {TypeError} If the given queue is an instance of
|
|
437
|
+
* {@link ParallelMessageQueue}.
|
|
438
|
+
*/
|
|
439
|
+
constructor(queue: MessageQueue, workers: number);
|
|
440
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
441
|
+
enqueueMany(messages: readonly any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
442
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
443
|
+
}
|
|
444
|
+
//#endregion
|
|
309
445
|
//#region src/federation/handler.d.ts
|
|
310
|
-
|
|
311
446
|
/**
|
|
312
447
|
* Options for the {@link respondWithObject} and
|
|
313
448
|
* {@link respondWithObjectIfAcceptable} functions.
|
|
@@ -434,8 +569,8 @@ declare function createFederationBuilder<TContextData>(): FederationBuilder<TCon
|
|
|
434
569
|
//#endregion
|
|
435
570
|
//#region src/federation/queue.d.ts
|
|
436
571
|
interface SenderKeyJwkPair {
|
|
437
|
-
keyId: string;
|
|
438
|
-
privateKey: JsonWebKey;
|
|
572
|
+
readonly keyId: string;
|
|
573
|
+
readonly privateKey: JsonWebKey;
|
|
439
574
|
}
|
|
440
575
|
/**
|
|
441
576
|
* A message that represents a task to be processed by the background worker.
|
|
@@ -448,44 +583,44 @@ interface SenderKeyJwkPair {
|
|
|
448
583
|
*/
|
|
449
584
|
type Message = FanoutMessage | OutboxMessage | InboxMessage;
|
|
450
585
|
interface FanoutMessage {
|
|
451
|
-
type: "fanout";
|
|
452
|
-
id: ReturnType<typeof crypto.randomUUID>;
|
|
453
|
-
baseUrl: string;
|
|
454
|
-
keys: SenderKeyJwkPair[];
|
|
455
|
-
inboxes: Record<string, {
|
|
456
|
-
actorIds: string[];
|
|
457
|
-
sharedInbox: boolean;
|
|
458
|
-
}
|
|
459
|
-
activity: unknown;
|
|
460
|
-
activityId?: string;
|
|
461
|
-
activityType: string;
|
|
462
|
-
collectionSync?: string;
|
|
463
|
-
traceContext: Record<string, string
|
|
586
|
+
readonly type: "fanout";
|
|
587
|
+
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
588
|
+
readonly baseUrl: string;
|
|
589
|
+
readonly keys: readonly SenderKeyJwkPair[];
|
|
590
|
+
readonly inboxes: Readonly<Record<string, {
|
|
591
|
+
readonly actorIds: readonly string[];
|
|
592
|
+
readonly sharedInbox: boolean;
|
|
593
|
+
}>>;
|
|
594
|
+
readonly activity: unknown;
|
|
595
|
+
readonly activityId?: string;
|
|
596
|
+
readonly activityType: string;
|
|
597
|
+
readonly collectionSync?: string;
|
|
598
|
+
readonly traceContext: Readonly<Record<string, string>>;
|
|
464
599
|
}
|
|
465
600
|
interface OutboxMessage {
|
|
466
|
-
type: "outbox";
|
|
467
|
-
id: ReturnType<typeof crypto.randomUUID>;
|
|
468
|
-
baseUrl: string;
|
|
469
|
-
keys: SenderKeyJwkPair[];
|
|
470
|
-
activity: unknown;
|
|
471
|
-
activityId?: string;
|
|
472
|
-
activityType: string;
|
|
473
|
-
inbox: string;
|
|
474
|
-
sharedInbox: boolean;
|
|
475
|
-
started: string;
|
|
476
|
-
attempt: number;
|
|
477
|
-
headers: Record<string, string
|
|
478
|
-
traceContext: Record<string, string
|
|
601
|
+
readonly type: "outbox";
|
|
602
|
+
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
603
|
+
readonly baseUrl: string;
|
|
604
|
+
readonly keys: readonly SenderKeyJwkPair[];
|
|
605
|
+
readonly activity: unknown;
|
|
606
|
+
readonly activityId?: string;
|
|
607
|
+
readonly activityType: string;
|
|
608
|
+
readonly inbox: string;
|
|
609
|
+
readonly sharedInbox: boolean;
|
|
610
|
+
readonly started: string;
|
|
611
|
+
readonly attempt: number;
|
|
612
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
613
|
+
readonly traceContext: Readonly<Record<string, string>>;
|
|
479
614
|
}
|
|
480
615
|
interface InboxMessage {
|
|
481
|
-
type: "inbox";
|
|
482
|
-
id: ReturnType<typeof crypto.randomUUID>;
|
|
483
|
-
baseUrl: string;
|
|
484
|
-
activity: unknown;
|
|
485
|
-
started: string;
|
|
486
|
-
attempt: number;
|
|
487
|
-
identifier: string | null;
|
|
488
|
-
traceContext: Record<string, string
|
|
616
|
+
readonly type: "inbox";
|
|
617
|
+
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
618
|
+
readonly baseUrl: string;
|
|
619
|
+
readonly activity: unknown;
|
|
620
|
+
readonly started: string;
|
|
621
|
+
readonly attempt: number;
|
|
622
|
+
readonly identifier: string | null;
|
|
623
|
+
readonly traceContext: Readonly<Record<string, string>>;
|
|
489
624
|
}
|
|
490
625
|
//#endregion
|
|
491
626
|
//#region src/federation/retry.d.ts
|
|
@@ -569,19 +704,19 @@ interface FederationQueueOptions {
|
|
|
569
704
|
* The message queue for incoming activities. If not provided, incoming
|
|
570
705
|
* activities will not be queued and will be processed immediately.
|
|
571
706
|
*/
|
|
572
|
-
inbox?: MessageQueue;
|
|
707
|
+
readonly inbox?: MessageQueue;
|
|
573
708
|
/**
|
|
574
709
|
* The message queue for outgoing activities. If not provided, outgoing
|
|
575
710
|
* activities will not be queued and will be sent immediately.
|
|
576
711
|
*/
|
|
577
|
-
outbox?: MessageQueue;
|
|
712
|
+
readonly outbox?: MessageQueue;
|
|
578
713
|
/**
|
|
579
714
|
* The message queue for fanning out outgoing activities. If not provided,
|
|
580
715
|
* outgoing activities will not be fanned out in the background, but will be
|
|
581
716
|
* fanned out immediately, which causes slow response times on
|
|
582
717
|
* {@link Context.sendActivity} calls.
|
|
583
718
|
*/
|
|
584
|
-
fanout?: MessageQueue;
|
|
719
|
+
readonly fanout?: MessageQueue;
|
|
585
720
|
}
|
|
586
721
|
/**
|
|
587
722
|
* Prefixes for namespacing keys in the Deno KV store.
|
|
@@ -592,18 +727,18 @@ interface FederationKvPrefixes {
|
|
|
592
727
|
* processed or not.
|
|
593
728
|
* @default `["_fedify", "activityIdempotence"]`
|
|
594
729
|
*/
|
|
595
|
-
activityIdempotence: KvKey;
|
|
730
|
+
readonly activityIdempotence: KvKey;
|
|
596
731
|
/**
|
|
597
732
|
* The key prefix used for storing remote JSON-LD documents.
|
|
598
733
|
* @default `["_fedify", "remoteDocument"]`
|
|
599
734
|
*/
|
|
600
|
-
remoteDocument: KvKey;
|
|
735
|
+
readonly remoteDocument: KvKey;
|
|
601
736
|
/**
|
|
602
737
|
* The key prefix used for caching public keys.
|
|
603
738
|
* @default `["_fedify", "publicKey"]`
|
|
604
739
|
* @since 0.12.0
|
|
605
740
|
*/
|
|
606
|
-
publicKey: KvKey;
|
|
741
|
+
readonly publicKey: KvKey;
|
|
607
742
|
/**
|
|
608
743
|
* The key prefix used for caching HTTP Message Signatures specs.
|
|
609
744
|
* The cached spec is used to reduce the number of requests to make signed
|
|
@@ -611,7 +746,7 @@ interface FederationKvPrefixes {
|
|
|
611
746
|
* @default `["_fedify", "httpMessageSignaturesSpec"]`
|
|
612
747
|
* @since 1.6.0
|
|
613
748
|
*/
|
|
614
|
-
httpMessageSignaturesSpec: KvKey;
|
|
749
|
+
readonly httpMessageSignaturesSpec: KvKey;
|
|
615
750
|
}
|
|
616
751
|
/**
|
|
617
752
|
* Options for {@link CreateFederationOptions.origin} when it is not a string.
|
|
@@ -2025,7 +2160,7 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2025
2160
|
* inbox, it is `null`.
|
|
2026
2161
|
* @since 1.2.0
|
|
2027
2162
|
*/
|
|
2028
|
-
recipient: string | null;
|
|
2163
|
+
readonly recipient: string | null;
|
|
2029
2164
|
/**
|
|
2030
2165
|
* Creates a new context with the same properties as this one,
|
|
2031
2166
|
* but with the given data.
|
|
@@ -2215,7 +2350,7 @@ interface SendActivityOptions {
|
|
|
2215
2350
|
*
|
|
2216
2351
|
* @since 0.9.0
|
|
2217
2352
|
*/
|
|
2218
|
-
excludeBaseUris?: URL[];
|
|
2353
|
+
readonly excludeBaseUris?: readonly URL[];
|
|
2219
2354
|
}
|
|
2220
2355
|
/**
|
|
2221
2356
|
* Options for {@link Context.sendActivity} method when sending to a collection.
|
|
@@ -2298,15 +2433,15 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
2298
2433
|
/**
|
|
2299
2434
|
* The URI of the public key, which is used for verifying HTTP Signatures.
|
|
2300
2435
|
*/
|
|
2301
|
-
keyId: URL;
|
|
2436
|
+
readonly keyId: URL;
|
|
2302
2437
|
/**
|
|
2303
2438
|
* A {@link CryptographicKey} instance of the public key.
|
|
2304
2439
|
*/
|
|
2305
|
-
cryptographicKey: CryptographicKey;
|
|
2440
|
+
readonly cryptographicKey: CryptographicKey;
|
|
2306
2441
|
/**
|
|
2307
2442
|
* A {@link Multikey} instance of the public key.
|
|
2308
2443
|
*/
|
|
2309
|
-
multikey: Multikey;
|
|
2444
|
+
readonly multikey: Multikey;
|
|
2310
2445
|
}
|
|
2311
2446
|
//#endregion
|
|
2312
|
-
export { 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, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
2447
|
+
export { 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, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
//#region deno.json
|
|
7
|
+
var name = "@fedify/fedify";
|
|
8
|
+
var version = "2.0.0-dev.196+c3cfc0a9";
|
|
9
|
+
var license = "MIT";
|
|
10
|
+
var exports = {
|
|
11
|
+
".": "./src/mod.ts",
|
|
12
|
+
"./compat": "./src/compat/mod.ts",
|
|
13
|
+
"./federation": "./src/federation/mod.ts",
|
|
14
|
+
"./nodeinfo": "./src/nodeinfo/mod.ts",
|
|
15
|
+
"./otel": "./src/otel/mod.ts",
|
|
16
|
+
"./sig": "./src/sig/mod.ts",
|
|
17
|
+
"./utils": "./src/utils/mod.ts"
|
|
18
|
+
};
|
|
19
|
+
var imports = {
|
|
20
|
+
"@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
|
|
21
|
+
"@opentelemetry/core": "npm:@opentelemetry/core@^2.0.0",
|
|
22
|
+
"@opentelemetry/sdk-trace-base": "npm:@opentelemetry/sdk-trace-base@^2.0.0",
|
|
23
|
+
"@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
|
|
24
|
+
"@std/assert": "jsr:@std/assert@^0.226.0",
|
|
25
|
+
"@std/url": "jsr:@std/url@^0.225.1",
|
|
26
|
+
"asn1js": "npm:asn1js@^3.0.7",
|
|
27
|
+
"fast-check": "npm:fast-check@^3.22.0",
|
|
28
|
+
"fetch-mock": "npm:fetch-mock@^12.5.2",
|
|
29
|
+
"json-canon": "npm:json-canon@^1.0.1",
|
|
30
|
+
"jsonld": "npm:jsonld@^9.0.0",
|
|
31
|
+
"multicodec": "npm:multicodec@^3.2.1",
|
|
32
|
+
"pkijs": "npm:pkijs@^3.3.3",
|
|
33
|
+
"structured-field-values": "npm:structured-field-values@^2.0.4",
|
|
34
|
+
"uri-template-router": "npm:uri-template-router@^1.0.0",
|
|
35
|
+
"url-template": "npm:url-template@^3.1.1"
|
|
36
|
+
};
|
|
37
|
+
var exclude = [
|
|
38
|
+
".test-report.xml",
|
|
39
|
+
"apidoc/",
|
|
40
|
+
"dist/",
|
|
41
|
+
"node_modules/",
|
|
42
|
+
"npm/",
|
|
43
|
+
"pnpm-lock.yaml",
|
|
44
|
+
"src/cfworkers/dist/",
|
|
45
|
+
"src/cfworkers/fixtures/",
|
|
46
|
+
"src/cfworkers/imports.ts",
|
|
47
|
+
"src/cfworkers/README.md",
|
|
48
|
+
"src/cfworkers/server.ts",
|
|
49
|
+
"src/cfworkers/server.js",
|
|
50
|
+
"src/cfworkers/server.js.map"
|
|
51
|
+
];
|
|
52
|
+
var publish = { "exclude": ["**/*.test.ts", "src/testing/"] };
|
|
53
|
+
var tasks = {
|
|
54
|
+
"codegen": "deno task -f @fedify/vocab compile",
|
|
55
|
+
"cache": {
|
|
56
|
+
"command": "deno cache src/mod.ts",
|
|
57
|
+
"dependencies": ["codegen"]
|
|
58
|
+
},
|
|
59
|
+
"check": {
|
|
60
|
+
"command": "deno fmt --check && deno lint && deno check src/**/*.ts",
|
|
61
|
+
"dependencies": ["codegen"]
|
|
62
|
+
},
|
|
63
|
+
"test": {
|
|
64
|
+
"command": "deno test --check --doc --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel",
|
|
65
|
+
"dependencies": ["codegen"]
|
|
66
|
+
},
|
|
67
|
+
"coverage": "deno task test --clean --coverage && deno coverage --html coverage",
|
|
68
|
+
"bench": {
|
|
69
|
+
"command": "deno bench --allow-read --allow-write --allow-net --allow-env --allow-run --unstable-kv",
|
|
70
|
+
"dependencies": ["codegen"]
|
|
71
|
+
},
|
|
72
|
+
"apidoc": {
|
|
73
|
+
"command": "deno doc --html --name=Fedify --output=apidoc/ src/mod.ts",
|
|
74
|
+
"dependencies": ["codegen"]
|
|
75
|
+
},
|
|
76
|
+
"publish": {
|
|
77
|
+
"command": "deno publish",
|
|
78
|
+
"dependencies": ["codegen"]
|
|
79
|
+
},
|
|
80
|
+
"pnpm:install": "pnpm install --silent",
|
|
81
|
+
"pnpm:build": {
|
|
82
|
+
"command": "pnpm exec tsdown",
|
|
83
|
+
"dependencies": ["pnpm:build-vocab"]
|
|
84
|
+
},
|
|
85
|
+
"test:node": {
|
|
86
|
+
"command": "cd dist/ && node --test",
|
|
87
|
+
"dependencies": ["pnpm:build"]
|
|
88
|
+
},
|
|
89
|
+
"test:bun": {
|
|
90
|
+
"command": "cd dist/ && bun test --timeout 60000",
|
|
91
|
+
"dependencies": ["pnpm:build"]
|
|
92
|
+
},
|
|
93
|
+
"test:cfworkers": {
|
|
94
|
+
"command": "pnpm exec wrangler deploy --dry-run --outdir src/cfworkers && node --import=tsx src/cfworkers/client.ts",
|
|
95
|
+
"dependencies": ["pnpm:build"]
|
|
96
|
+
},
|
|
97
|
+
"test-all": { "dependencies": [
|
|
98
|
+
"check",
|
|
99
|
+
"test",
|
|
100
|
+
"test:node",
|
|
101
|
+
"test:bun",
|
|
102
|
+
"test:cfworkers"
|
|
103
|
+
] }
|
|
104
|
+
};
|
|
105
|
+
var deno_default = {
|
|
106
|
+
name,
|
|
107
|
+
version,
|
|
108
|
+
license,
|
|
109
|
+
exports,
|
|
110
|
+
imports,
|
|
111
|
+
exclude,
|
|
112
|
+
publish,
|
|
113
|
+
tasks
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
export { deno_default };
|