@fedify/fedify 1.10.5 → 1.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actor-CjkHF7Cj.cjs → actor-BGIAXtRd.cjs} +3112 -4674
- package/dist/{actor-Ch9BTg3N.js → actor-C-_2S5Mn.mjs} +8 -15
- package/dist/{actor-CQdxP8N-.js → actor-Cujbx4Zv.js} +1205 -2768
- package/dist/{actor-eeONG_sv.d.ts → actor-DXwwgFeR.d.ts} +3 -3
- package/dist/{actor-D190nbTD.d.cts → actor-DxvGbmjm.d.cts} +3 -3
- package/dist/{assert-MZs1qjMx.js → assert-DikXweDx.mjs} +5 -9
- package/dist/{assert_equals-DSbWqCm3.js → assert_equals-Ew3jOFa3.mjs} +55 -69
- package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-C4Ri6VuN.mjs} +5 -9
- package/dist/{assert_is_error-BPGph1Jx.js → assert_is_error-C50x8tnw.mjs} +5 -9
- package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals--wG9hV7u.mjs} +6 -13
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-CJC9ThS-.mjs} +6 -11
- package/dist/{assert_throws-BOO88avQ.js → assert_throws-BIL7gChy.mjs} +6 -10
- package/dist/{authdocloader-fR-Fqcpa.js → authdocloader-1Sk2bqFx.mjs} +9 -14
- package/dist/{authdocloader-COFZT9Wh.js → authdocloader-D4Y6iyTF.js} +8 -15
- package/dist/{authdocloader-zc5ibOmU.cjs → authdocloader-DQfruCir.cjs} +14 -22
- package/dist/{builder-YD0q32nG.js → builder-CZbrDRl7.mjs} +31 -40
- package/dist/{client-B3mQJNO7.d.ts → client-D7t26_op.d.ts} +2 -2
- package/dist/{client-BgCucCG7.js → client-Dyb8MI3u.mjs} +11 -15
- package/dist/{client-n6L4GtQL.d.cts → client-yc0Z0P6Y.d.cts} +2 -2
- package/dist/{collection-CSzG2j1P.js → collection-BD6-SZ6O.mjs} +7 -12
- package/dist/compat/mod.cjs +5 -8
- package/dist/compat/mod.d.cts +78 -12
- package/dist/compat/mod.d.ts +78 -12
- package/dist/compat/mod.js +4 -8
- package/dist/compat/transformers.test.mjs +62 -0
- package/dist/{context-Cr5DIxq_.d.ts → context-C6n2yrj0.d.ts} +33 -26
- package/dist/{context-WJoO0SQs.d.cts → context-PfghnHYj.d.cts} +33 -26
- package/dist/{denokv-D0nfNQ1x.js → denokv-NJPMXyK0.mjs} +22 -11
- package/dist/{docloader-BucCRHZI.d.ts → docloader-D7k5A9JP.d.ts} +2 -7
- package/dist/{docloader-ChxNLZAA.d.cts → docloader-DbM94pGY.d.cts} +2 -7
- package/dist/{docloader-BETPdM09.js → docloader-Dtaju6oI.js} +18 -156
- package/dist/{docloader-irBWMSOZ.cjs → docloader-Q3DfzuUi.cjs} +116 -220
- package/dist/{esm-iGH0sRsE.js → esm-DOJg552-.mjs} +49 -85
- package/dist/federation/{builder.test.js → builder.test.mjs} +22 -41
- package/dist/federation/collection.test.d.mts +2 -0
- package/dist/federation/collection.test.mjs +21 -0
- package/dist/federation/handler.test.d.mts +2 -0
- package/dist/federation/{handler.test.js → handler.test.mjs} +29 -58
- package/dist/federation/idempotency.test.d.mts +2 -0
- package/dist/federation/{idempotency.test.js → idempotency.test.mjs} +29 -59
- package/dist/federation/inbox.test.d.mts +2 -0
- package/dist/federation/{inbox.test.js → inbox.test.mjs} +10 -15
- package/dist/federation/keycache.test.d.mts +2 -0
- package/dist/federation/{keycache.test.js → keycache.test.mjs} +13 -18
- package/dist/federation/kv.test.d.mts +2 -0
- package/dist/federation/{kv.test.js → kv.test.mjs} +12 -26
- package/dist/federation/middleware.test.d.mts +2 -0
- package/dist/federation/{middleware.test.js → middleware.test.mjs} +182 -197
- package/dist/federation/mod.cjs +245 -21
- package/dist/federation/mod.d.cts +4 -13
- package/dist/federation/mod.d.ts +4 -13
- package/dist/federation/mod.js +240 -18
- package/dist/federation/mq.test.d.mts +2 -0
- package/dist/federation/{mq.test.js → mq.test.mjs} +23 -38
- package/dist/federation/retry.test.d.mts +2 -0
- package/dist/federation/{retry.test.js → retry.test.mjs} +9 -14
- package/dist/federation/router.test.d.mts +2 -0
- package/dist/federation/{router.test.js → router.test.mjs} +12 -19
- package/dist/federation/send.test.d.mts +2 -0
- package/dist/federation/{send.test.js → send.test.mjs} +24 -34
- package/dist/{http-PgdBoDIj.js → http-BRwSVBn1.mjs} +16 -32
- package/dist/{http-DS9z_HzB.d.ts → http-BYXQvoZQ.d.ts} +5 -9
- package/dist/{http-C_1RU1U_.d.cts → http-CMzg-A9P.d.cts} +5 -9
- package/dist/{http-CQAqR_vx.cjs → http-DCrun8ql.cjs} +51 -68
- package/dist/{http-CxiIW4rD.js → http-DRnRwr3i.js} +17 -33
- package/dist/{inbox-DcDIqTbR.js → inbox-pD1nbb_5.mjs} +17 -25
- package/dist/key-Cmbps6xt.cjs +4 -0
- package/dist/{key-dNFkodH5.cjs → key-DEYIxAFs.cjs} +42 -50
- package/dist/key-DMO0TgTa.mjs +5 -0
- package/dist/{key-I-ibyaZH.js → key-DdL5Oc59.mjs} +12 -18
- package/dist/{key-Cg0kO4dA.js → key-vIzWPiil.js} +19 -19
- package/dist/{keycache-hSs_XFSb.js → keycache-BVR9f06Y.mjs} +6 -10
- package/dist/{keys-CElJez9H.js → keys-Co-0pK8a.mjs} +6 -10
- package/dist/{kv-DipCBaw2.d.ts → kv-C6UC8M9S.d.ts} +1 -1
- package/dist/{kv-BqEOXcZv.d.cts → kv-ClC9WJh5.d.cts} +1 -1
- package/dist/{kv-QzKcOQgP.js → kv-OuT2IU64.mjs} +6 -10
- package/dist/{ld-b16r91YS.js → ld-BFaDk5gX.mjs} +17 -31
- package/dist/{lookup-CySNcNcC.js → lookup-CMYXdjVH.mjs} +8 -17
- package/dist/{lookup-Bfq9Jpm0.cjs → lookup-CZGJqSjm.cjs} +16 -23
- package/dist/{lookup-CiSAeWJl.js → lookup-jlmCTRsO.js} +5 -11
- package/dist/middleware-BWlZ-wms.cjs +4 -0
- package/dist/{middleware-C5emnCh-.js → middleware-BXD5WJbj.mjs} +276 -321
- package/dist/{middleware-Dxo56yae.cjs → middleware-BhMQrJXH.cjs} +494 -547
- package/dist/{middleware-Bs4xDuXR.js → middleware-CmA2E9Bu.js} +349 -393
- package/dist/middleware-H3Ce7yn3.mjs +5 -0
- package/dist/{mod-D5rfgGFE.d.cts → mod-BQ3lrlXU.d.cts} +3 -3
- package/dist/{mod-Dz5Y15Uy.d.cts → mod-C72agZIN.d.cts} +4 -4
- package/dist/{mod-CxMBb_dd.d.cts → mod-CDbqB60V.d.cts} +2 -2
- package/dist/{mod-DS4kJskR.d.ts → mod-Lj0W1nnG.d.ts} +3 -3
- package/dist/{mod-BZfdiPBo.d.ts → mod-_HNKaczF.d.ts} +4 -4
- package/dist/{mod-ChbckRnC.d.ts → mod-lHd-Zdd_.d.ts} +2 -2
- package/dist/mod.cjs +31 -33
- package/dist/mod.d.cts +15 -17
- package/dist/mod.d.ts +15 -17
- package/dist/mod.js +20 -23
- package/dist/{mq-B7R1Q-M5.d.cts → mq-CrItclRD.d.cts} +1 -1
- package/dist/{mq-CRGm1e_F.d.ts → mq-D_ZZRdby.d.ts} +1 -1
- package/dist/nodeinfo/client.test.d.mts +2 -0
- package/dist/nodeinfo/{client.test.js → client.test.mjs} +23 -45
- package/dist/nodeinfo/handler.test.d.mts +2 -0
- package/dist/nodeinfo/{handler.test.js → handler.test.mjs} +14 -43
- package/dist/nodeinfo/mod.cjs +5 -9
- package/dist/nodeinfo/mod.d.cts +2 -5
- package/dist/nodeinfo/mod.d.ts +2 -5
- package/dist/nodeinfo/mod.js +4 -9
- package/dist/nodeinfo/semver.test.d.mts +2 -0
- package/dist/nodeinfo/{semver.test.js → semver.test.mjs} +28 -51
- package/dist/nodeinfo/types.test.d.mts +2 -0
- package/dist/nodeinfo/{types.test.js → types.test.mjs} +10 -21
- package/dist/otel/exporter.test.d.mts +2 -0
- package/dist/otel/{exporter.test.js → exporter.test.mjs} +122 -180
- package/dist/otel/mod.cjs +16 -22
- package/dist/otel/mod.d.cts +2 -2
- package/dist/otel/mod.d.ts +2 -2
- package/dist/otel/mod.js +9 -16
- package/dist/{otel-Chy5T2Xh.js → otel-0v4Zy01l.mjs} +5 -10
- package/dist/{owner-AcrG3Xz1.d.cts → owner-0yNTyGMb.d.cts} +4 -4
- package/dist/{owner-Bs-sPbHX.js → owner-CNdS8zxf.mjs} +11 -16
- package/dist/{owner-8NMhXwJd.d.ts → owner-CPEbNpnZ.d.ts} +4 -4
- package/dist/{proof-SgRikE_Y.js → proof-Co7YmDpv.mjs} +20 -32
- package/dist/{proof-flD2DeA-.js → proof-DHPbi_Mx.js} +34 -60
- package/dist/{proof-BvQS195q.cjs → proof-DcPdtve2.cjs} +115 -140
- package/dist/{retry-D4GJ670a.js → retry-Ddbq3AcK.mjs} +4 -7
- package/dist/rolldown-runtime-C7fyD9f2.js +15 -0
- package/dist/runtime/authdocloader.test.d.mts +2 -0
- package/dist/runtime/{authdocloader.test.js → authdocloader.test.mjs} +16 -28
- package/dist/runtime/docloader.test.d.mts +2 -0
- package/dist/runtime/{docloader.test.js → docloader.test.mjs} +55 -77
- package/dist/runtime/key.test.d.mts +2 -0
- package/dist/runtime/{key.test.js → key.test.mjs} +27 -57
- package/dist/runtime/langstr.test.d.mts +2 -0
- package/dist/runtime/{langstr.test.js → langstr.test.mjs} +9 -19
- package/dist/runtime/link.test.d.mts +2 -0
- package/dist/runtime/{link.test.js → link.test.mjs} +7 -11
- package/dist/runtime/mod.cjs +7 -13
- package/dist/runtime/mod.d.cts +103 -6
- package/dist/runtime/mod.d.ts +103 -6
- package/dist/runtime/mod.js +6 -13
- package/dist/runtime/multibase/multibase.test.d.mts +2 -0
- package/dist/runtime/multibase/{multibase.test.js → multibase.test.mjs} +16 -33
- package/dist/runtime/url.test.d.mts +2 -0
- package/dist/runtime/{url.test.js → url.test.mjs} +10 -15
- package/dist/{semver-dArNLkR9.js → semver-CgD82xxg.mjs} +13 -28
- package/dist/{send-C0gFHa2i.js → send-BRCWNcMa.mjs} +7 -12
- package/dist/sig/http.test.d.mts +2 -0
- package/dist/sig/{http.test.js → http.test.mjs} +119 -203
- package/dist/sig/key.test.d.mts +2 -0
- package/dist/sig/{key.test.js → key.test.mjs} +13 -22
- package/dist/sig/ld.test.d.mts +2 -0
- package/dist/sig/{ld.test.js → ld.test.mjs} +24 -39
- package/dist/sig/mod.cjs +7 -13
- package/dist/sig/mod.d.cts +3 -7
- package/dist/sig/mod.d.ts +3 -7
- package/dist/sig/mod.js +6 -13
- package/dist/sig/owner.test.d.mts +2 -0
- package/dist/sig/{owner.test.js → owner.test.mjs} +23 -39
- package/dist/sig/proof.test.d.mts +2 -0
- package/dist/sig/{proof.test.js → proof.test.mjs} +18 -31
- package/dist/{std__assert-X-_kMxKM.js → std__assert-2v7gYiZp.mjs} +13 -24
- package/dist/testing/docloader.test.d.mts +2 -0
- package/dist/testing/docloader.test.mjs +12 -0
- package/dist/testing/{mod.d.ts → mod.d.mts} +371 -541
- package/dist/testing/mod.mjs +5 -0
- package/dist/{testing-C1GIraJh.js → testing-BLIh1cXz.mjs} +27 -35
- package/dist/{transformers-BFT6d7J5.js → transformers-BV4OeK9o.js} +3 -7
- package/dist/{transformers-CoBS-oFG.cjs → transformers-CLtJ5H8o.cjs} +20 -25
- package/dist/{types-BgUCCngg.cjs → types-B34v-m2N.cjs} +45 -64
- package/dist/{types-BIgY6c-l.js → types-CAnkAQGM.mjs} +5 -9
- package/dist/{types-Bu-epI-z.js → types-CXZk86AG.js} +18 -36
- package/dist/vocab/actor.test.d.mts +2 -0
- package/dist/vocab/{actor.test.js → actor.test.mjs} +308 -550
- package/dist/vocab/cjs.test.d.mts +2 -0
- package/dist/vocab/cjs.test.mjs +14 -0
- package/dist/vocab/lookup.test.d.mts +2 -0
- package/dist/vocab/{lookup.test.js → lookup.test.mjs} +34 -51
- package/dist/vocab/mod.cjs +256 -16
- package/dist/vocab/mod.d.cts +3 -5
- package/dist/vocab/mod.d.ts +3 -5
- package/dist/vocab/mod.js +249 -10
- package/dist/vocab/type.test.d.mts +2 -0
- package/dist/vocab/type.test.mjs +16 -0
- package/dist/vocab/vocab.test.d.mts +2 -0
- package/dist/vocab/{vocab.test.js → vocab.test.mjs} +178 -311
- package/dist/{vocab-BASuuzcJ.d.ts → vocab-DaT4UsJF.d.ts} +2 -2
- package/dist/{vocab-DPMmFPJ1.d.cts → vocab-DnlmNyXi.d.cts} +2 -2
- package/dist/{type-DUhon7qK.js → vocab-rT_94Pke.mjs} +1178 -2876
- package/dist/webfinger/handler.test.d.mts +2 -0
- package/dist/webfinger/{handler.test.js → handler.test.mjs} +23 -56
- package/dist/webfinger/lookup.test.d.mts +2 -0
- package/dist/webfinger/{lookup.test.js → lookup.test.mjs} +13 -27
- package/dist/webfinger/mod.cjs +5 -9
- package/dist/webfinger/mod.d.cts +1 -3
- package/dist/webfinger/mod.d.ts +1 -3
- package/dist/webfinger/mod.js +4 -9
- package/dist/x/cfworkers.cjs +25 -14
- package/dist/x/cfworkers.d.cts +33 -6
- package/dist/x/cfworkers.d.ts +33 -6
- package/dist/x/cfworkers.js +22 -12
- package/dist/x/cfworkers.test.d.mts +2 -0
- package/dist/x/{cfworkers.test.js → cfworkers.test.mjs} +28 -26
- package/dist/x/hono.cjs +25 -14
- package/dist/x/hono.d.cts +1 -11
- package/dist/x/hono.d.ts +1 -11
- package/dist/x/hono.js +22 -12
- package/dist/x/sveltekit.cjs +23 -12
- package/dist/x/sveltekit.d.cts +1 -11
- package/dist/x/sveltekit.d.ts +1 -11
- package/dist/x/sveltekit.js +20 -10
- package/package.json +2 -2
- package/dist/chunk-DqRYRqnO.cjs +0 -34
- package/dist/compat/transformers.test.d.ts +0 -3
- package/dist/compat/transformers.test.js +0 -86
- package/dist/compat-DmDDELst.cjs +0 -4
- package/dist/compat-nxUqe4Z-.js +0 -4
- package/dist/federation/builder.test.d.ts +0 -3
- package/dist/federation/collection.test.d.ts +0 -3
- package/dist/federation/collection.test.js +0 -35
- package/dist/federation/handler.test.d.ts +0 -3
- package/dist/federation/idempotency.test.d.ts +0 -3
- package/dist/federation/inbox.test.d.ts +0 -3
- package/dist/federation/keycache.test.d.ts +0 -3
- package/dist/federation/kv.test.d.ts +0 -3
- package/dist/federation/middleware.test.d.ts +0 -3
- package/dist/federation/mq.test.d.ts +0 -3
- package/dist/federation/retry.test.d.ts +0 -3
- package/dist/federation/router.test.d.ts +0 -3
- package/dist/federation/send.test.d.ts +0 -3
- package/dist/federation-C15gGOh1.cjs +0 -266
- package/dist/federation-K-xsO03l.js +0 -248
- package/dist/key-Bnod5wJl.js +0 -10
- package/dist/key-C6swTX71.js +0 -10
- package/dist/key-_Uq8gkmM.cjs +0 -10
- package/dist/middleware-BWsOtDIF.cjs +0 -17
- package/dist/middleware-Bm4bJzjg.js +0 -26
- package/dist/middleware-BvODpE_U.js +0 -17
- package/dist/mod-C2tOeRkN.d.cts +0 -1
- package/dist/mod-CD7gfdq3.d.ts +0 -104
- package/dist/mod-CnULG6Aa.d.ts +0 -82
- package/dist/mod-FZd39qVq.d.cts +0 -1
- package/dist/mod-JUhOKMHj.d.cts +0 -102
- package/dist/mod-OQfb33eH.d.cts +0 -80
- package/dist/nodeinfo/client.test.d.ts +0 -3
- package/dist/nodeinfo/handler.test.d.ts +0 -3
- package/dist/nodeinfo/semver.test.d.ts +0 -3
- package/dist/nodeinfo/types.test.d.ts +0 -3
- package/dist/nodeinfo-Co9lJrWl.cjs +0 -4
- package/dist/nodeinfo-DfycQ8Wf.js +0 -4
- package/dist/otel/exporter.test.d.ts +0 -3
- package/dist/runtime/authdocloader.test.d.ts +0 -3
- package/dist/runtime/docloader.test.d.ts +0 -3
- package/dist/runtime/key.test.d.ts +0 -3
- package/dist/runtime/langstr.test.d.ts +0 -3
- package/dist/runtime/link.test.d.ts +0 -3
- package/dist/runtime/multibase/multibase.test.d.ts +0 -3
- package/dist/runtime/url.test.d.ts +0 -3
- package/dist/runtime-C58AJWSv.cjs +0 -4
- package/dist/runtime-DPYEDf-o.js +0 -4
- package/dist/sig/http.test.d.ts +0 -3
- package/dist/sig/key.test.d.ts +0 -3
- package/dist/sig/ld.test.d.ts +0 -3
- package/dist/sig/owner.test.d.ts +0 -3
- package/dist/sig/proof.test.d.ts +0 -3
- package/dist/sig-ByHXzqUi.cjs +0 -4
- package/dist/sig-Cj3tk-ig.js +0 -4
- package/dist/testing/docloader.test.d.ts +0 -3
- package/dist/testing/docloader.test.js +0 -24
- package/dist/testing/mod.js +0 -10
- package/dist/vocab/actor.test.d.ts +0 -3
- package/dist/vocab/lookup.test.d.ts +0 -3
- package/dist/vocab/type.test.d.ts +0 -3
- package/dist/vocab/type.test.js +0 -25
- package/dist/vocab/vocab.test.d.ts +0 -3
- package/dist/vocab-5i6DEIi6.cjs +0 -294
- package/dist/vocab-CBavAdew.js +0 -258
- package/dist/webfinger/handler.test.d.ts +0 -3
- package/dist/webfinger/lookup.test.d.ts +0 -3
- package/dist/webfinger-BjOEdFPs.cjs +0 -4
- package/dist/webfinger-De_bU0iE.js +0 -4
- package/dist/x/cfworkers.test.d.ts +0 -3
- /package/dist/{mod-1pDWKvUL.d.ts → compat/transformers.test.d.mts} +0 -0
- /package/dist/{mod-g0xFzAP9.d.ts → federation/builder.test.d.mts} +0 -0
|
@@ -1,40 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import "../
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import {
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../actor-Ch9BTg3N.js";
|
|
17
|
-
import "../key-Cg0kO4dA.js";
|
|
18
|
-
import { signRequest } from "../http-CxiIW4rD.js";
|
|
19
|
-
import "../authdocloader-COFZT9Wh.js";
|
|
20
|
-
import "../ld-b16r91YS.js";
|
|
21
|
-
import "../owner-Bs-sPbHX.js";
|
|
22
|
-
import "../proof-SgRikE_Y.js";
|
|
23
|
-
import { InboxListenerSet } from "../inbox-DcDIqTbR.js";
|
|
24
|
-
import "../builder-YD0q32nG.js";
|
|
25
|
-
import "../collection-CSzG2j1P.js";
|
|
26
|
-
import "../keycache-hSs_XFSb.js";
|
|
27
|
-
import "../retry-D4GJ670a.js";
|
|
28
|
-
import "../send-C0gFHa2i.js";
|
|
29
|
-
import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-C1GIraJh.js";
|
|
30
|
-
import "../std__assert-X-_kMxKM.js";
|
|
31
|
-
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
|
32
|
-
import "../assert_is_error-BPGph1Jx.js";
|
|
33
|
-
import "../assert_not_equals-f3m3epl3.js";
|
|
34
|
-
import "../assert_throws-BOO88avQ.js";
|
|
35
|
-
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-CElJez9H.js";
|
|
36
|
-
import { createTestTracerProvider } from "../otel-Chy5T2Xh.js";
|
|
37
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { C as Person, _ as Note, o as Create } from "../vocab-rT_94Pke.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, i as createRequestContext, r as createInboxContext, t as test } from "../testing-BLIh1cXz.mjs";
|
|
6
|
+
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
|
+
import "../std__assert-2v7gYiZp.mjs";
|
|
8
|
+
import { n as assertFalse } from "../assert_rejects-CJC9ThS-.mjs";
|
|
9
|
+
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
10
|
+
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
11
|
+
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, o as acceptsJsonLd, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-BXD5WJbj.mjs";
|
|
12
|
+
import { s as signRequest } from "../http-BRwSVBn1.mjs";
|
|
13
|
+
import { t as InboxListenerSet } from "../inbox-pD1nbb_5.mjs";
|
|
14
|
+
import { t as createTestTracerProvider } from "../otel-0v4Zy01l.mjs";
|
|
15
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-Co-0pK8a.mjs";
|
|
38
16
|
//#region src/federation/handler.test.ts
|
|
39
17
|
test("acceptsJsonLd()", () => {
|
|
40
18
|
assert(acceptsJsonLd(new Request("https://example.com/", { headers: { Accept: "application/activity+json" } })));
|
|
@@ -44,9 +22,8 @@ test("acceptsJsonLd()", () => {
|
|
|
44
22
|
assertFalse(acceptsJsonLd(new Request("https://example.com/", { headers: { Accept: "application/ld+json; q=0.4, application/xhtml+xml; q=0.9" } })));
|
|
45
23
|
});
|
|
46
24
|
test("handleActor()", async () => {
|
|
47
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
48
25
|
let context = createRequestContext({
|
|
49
|
-
federation,
|
|
26
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
50
27
|
data: void 0,
|
|
51
28
|
url: new URL("https://example.com/"),
|
|
52
29
|
getActorUri(identifier) {
|
|
@@ -270,9 +247,8 @@ test("handleActor()", async () => {
|
|
|
270
247
|
assertEquals(onUnauthorizedCalled, null);
|
|
271
248
|
});
|
|
272
249
|
test("handleObject()", async () => {
|
|
273
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
274
250
|
let context = createRequestContext({
|
|
275
|
-
federation,
|
|
251
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
276
252
|
data: void 0,
|
|
277
253
|
url: new URL("https://example.com/"),
|
|
278
254
|
getObjectUri(_cls, values) {
|
|
@@ -505,9 +481,8 @@ test("handleObject()", async () => {
|
|
|
505
481
|
assertEquals(onUnauthorizedCalled, null);
|
|
506
482
|
});
|
|
507
483
|
test("handleCollection()", async () => {
|
|
508
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
509
484
|
let context = createRequestContext({
|
|
510
|
-
federation,
|
|
485
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
511
486
|
data: void 0,
|
|
512
487
|
url: new URL("https://example.com/"),
|
|
513
488
|
getActorUri(identifier) {
|
|
@@ -1125,7 +1100,7 @@ test("handleInbox()", async () => {
|
|
|
1125
1100
|
});
|
|
1126
1101
|
assertEquals(onNotFoundCalled, null);
|
|
1127
1102
|
assertEquals(response.status, 202);
|
|
1128
|
-
const
|
|
1103
|
+
const signedInvalidRequest = await signRequest(new Request("https://example.com/", {
|
|
1129
1104
|
method: "POST",
|
|
1130
1105
|
body: JSON.stringify({
|
|
1131
1106
|
"@context": [
|
|
@@ -1140,8 +1115,7 @@ test("handleInbox()", async () => {
|
|
|
1140
1115
|
},
|
|
1141
1116
|
actor: "https://example.com/users/alice"
|
|
1142
1117
|
})
|
|
1143
|
-
});
|
|
1144
|
-
const signedInvalidRequest = await signRequest(invalidRequest, rsaPrivateKey3, rsaPublicKey3.id);
|
|
1118
|
+
}), rsaPrivateKey3, rsaPublicKey3.id);
|
|
1145
1119
|
const signedInvalidContext = createRequestContext({
|
|
1146
1120
|
federation,
|
|
1147
1121
|
request: signedInvalidRequest,
|
|
@@ -1294,9 +1268,8 @@ test("respondWithObjectIfAcceptable", async () => {
|
|
|
1294
1268
|
assertEquals(response, null);
|
|
1295
1269
|
});
|
|
1296
1270
|
test("handleCustomCollection()", async () => {
|
|
1297
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
1298
1271
|
let context = createRequestContext({
|
|
1299
|
-
federation,
|
|
1272
|
+
federation: createFederation({ kv: new MemoryKvStore() }),
|
|
1300
1273
|
data: void 0,
|
|
1301
1274
|
url: new URL("https://example.com/")
|
|
1302
1275
|
});
|
|
@@ -1618,12 +1591,11 @@ test("handleInbox() records OpenTelemetry span events", async () => {
|
|
|
1618
1591
|
content: "Hello, world!"
|
|
1619
1592
|
})
|
|
1620
1593
|
});
|
|
1621
|
-
const
|
|
1594
|
+
const signed = await signRequest(new Request("https://example.com/users/someone/inbox", {
|
|
1622
1595
|
method: "POST",
|
|
1623
1596
|
headers: { "Content-Type": "application/activity+json" },
|
|
1624
1597
|
body: JSON.stringify(await activity.toJsonLd())
|
|
1625
|
-
});
|
|
1626
|
-
const signed = await signRequest(request, rsaPrivateKey3, new URL("https://example.com/users/someone#main-key"));
|
|
1598
|
+
}), rsaPrivateKey3, new URL("https://example.com/users/someone#main-key"));
|
|
1627
1599
|
const context = createRequestContext({
|
|
1628
1600
|
federation,
|
|
1629
1601
|
request: signed,
|
|
@@ -1646,10 +1618,10 @@ test("handleInbox() records OpenTelemetry span events", async () => {
|
|
|
1646
1618
|
};
|
|
1647
1619
|
const listeners = new InboxListenerSet();
|
|
1648
1620
|
let receivedActivity = null;
|
|
1649
|
-
listeners.add(Create, (_ctx, activity
|
|
1650
|
-
receivedActivity = activity
|
|
1621
|
+
listeners.add(Create, (_ctx, activity) => {
|
|
1622
|
+
receivedActivity = activity;
|
|
1651
1623
|
});
|
|
1652
|
-
|
|
1624
|
+
assertEquals((await handleInbox(signed, {
|
|
1653
1625
|
recipient: "someone",
|
|
1654
1626
|
context,
|
|
1655
1627
|
inboxContextFactory(_activity) {
|
|
@@ -1670,8 +1642,7 @@ test("handleInbox() records OpenTelemetry span events", async () => {
|
|
|
1670
1642
|
signatureTimeWindow: false,
|
|
1671
1643
|
skipSignatureVerification: true,
|
|
1672
1644
|
tracerProvider
|
|
1673
|
-
});
|
|
1674
|
-
assertEquals(response.status, 202);
|
|
1645
|
+
})).status, 202);
|
|
1675
1646
|
assert(receivedActivity != null);
|
|
1676
1647
|
const spans = exporter.getSpans("activitypub.inbox");
|
|
1677
1648
|
assertEquals(spans.length, 1);
|
|
@@ -1689,5 +1660,5 @@ test("handleInbox() records OpenTelemetry span events", async () => {
|
|
|
1689
1660
|
assertEquals(recordedActivity.id, "https://example.com/activity");
|
|
1690
1661
|
assertEquals(recordedActivity.type, "Create");
|
|
1691
1662
|
});
|
|
1692
|
-
|
|
1693
|
-
|
|
1663
|
+
//#endregion
|
|
1664
|
+
export {};
|
|
@@ -1,39 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import "../semver-dArNLkR9.js";
|
|
13
|
-
import "../client-BgCucCG7.js";
|
|
14
|
-
import "../lookup-CySNcNcC.js";
|
|
15
|
-
import "../types-BIgY6c-l.js";
|
|
16
|
-
import "../actor-Ch9BTg3N.js";
|
|
17
|
-
import "../key-Cg0kO4dA.js";
|
|
18
|
-
import "../http-CxiIW4rD.js";
|
|
19
|
-
import "../authdocloader-COFZT9Wh.js";
|
|
20
|
-
import "../ld-b16r91YS.js";
|
|
21
|
-
import "../owner-Bs-sPbHX.js";
|
|
22
|
-
import { signObject } from "../proof-SgRikE_Y.js";
|
|
23
|
-
import "../inbox-DcDIqTbR.js";
|
|
24
|
-
import "../builder-YD0q32nG.js";
|
|
25
|
-
import "../collection-CSzG2j1P.js";
|
|
26
|
-
import "../keycache-hSs_XFSb.js";
|
|
27
|
-
import "../retry-D4GJ670a.js";
|
|
28
|
-
import "../send-C0gFHa2i.js";
|
|
29
|
-
import { mockDocumentLoader, test } from "../testing-C1GIraJh.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";
|
|
35
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey } from "../keys-CElJez9H.js";
|
|
36
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { C as Person, o as Create, u as Follow } from "../vocab-rT_94Pke.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BLIh1cXz.mjs";
|
|
6
|
+
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
|
+
import "../std__assert-2v7gYiZp.mjs";
|
|
8
|
+
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
9
|
+
import { a as createFederation } from "../middleware-BXD5WJbj.mjs";
|
|
10
|
+
import { n as signObject } from "../proof-Co7YmDpv.mjs";
|
|
11
|
+
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-Co-0pK8a.mjs";
|
|
37
12
|
//#region src/federation/idempotency.test.ts
|
|
38
13
|
const kv = new MemoryKvStore();
|
|
39
14
|
const federationOptions = {
|
|
@@ -52,14 +27,13 @@ function createTestFederation() {
|
|
|
52
27
|
test("Federation.setInboxListeners().withIdempotency() - per-origin strategy", async () => {
|
|
53
28
|
const federation = createTestFederation();
|
|
54
29
|
const processedActivities = [];
|
|
55
|
-
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").withIdempotency("per-origin").on(Create, (ctx, activity
|
|
56
|
-
processedActivities.push([ctx.recipient, activity
|
|
30
|
+
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").withIdempotency("per-origin").on(Create, (ctx, activity) => {
|
|
31
|
+
processedActivities.push([ctx.recipient, activity]);
|
|
57
32
|
});
|
|
58
|
-
const
|
|
33
|
+
const signedActivity = await signObject(new Create({
|
|
59
34
|
id: new URL("https://example.com/activities/1"),
|
|
60
35
|
actor: new URL("https://example.com/person2")
|
|
61
|
-
});
|
|
62
|
-
const signedActivity = await signObject(activity, ed25519PrivateKey, ed25519Multikey.id);
|
|
36
|
+
}), ed25519PrivateKey, ed25519Multikey.id);
|
|
63
37
|
const body = JSON.stringify(await signedActivity.toJsonLd({ contextLoader: mockDocumentLoader }));
|
|
64
38
|
let response = await federation.fetch(new Request("https://example.com/users/john/inbox", {
|
|
65
39
|
method: "POST",
|
|
@@ -85,14 +59,13 @@ test("Federation.setInboxListeners().withIdempotency() - per-origin strategy", a
|
|
|
85
59
|
test("Federation.setInboxListeners().withIdempotency() - per-inbox strategy", async () => {
|
|
86
60
|
const federation = createTestFederation();
|
|
87
61
|
const processedActivities = [];
|
|
88
|
-
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").withIdempotency("per-inbox").on(Create, (ctx, activity
|
|
89
|
-
processedActivities.push([ctx.recipient, activity
|
|
62
|
+
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").withIdempotency("per-inbox").on(Create, (ctx, activity) => {
|
|
63
|
+
processedActivities.push([ctx.recipient, activity]);
|
|
90
64
|
});
|
|
91
|
-
const
|
|
65
|
+
const signedActivity = await signObject(new Create({
|
|
92
66
|
id: new URL("https://example.com/activities/2"),
|
|
93
67
|
actor: new URL("https://example.com/person2")
|
|
94
|
-
});
|
|
95
|
-
const signedActivity = await signObject(activity, ed25519PrivateKey, ed25519Multikey.id);
|
|
68
|
+
}), ed25519PrivateKey, ed25519Multikey.id);
|
|
96
69
|
const body = JSON.stringify(await signedActivity.toJsonLd({ contextLoader: mockDocumentLoader }));
|
|
97
70
|
let response = await federation.fetch(new Request("https://example.com/users/john/inbox", {
|
|
98
71
|
method: "POST",
|
|
@@ -121,14 +94,13 @@ test("Federation.setInboxListeners().withIdempotency() - per-inbox strategy", as
|
|
|
121
94
|
test("Federation.setInboxListeners().withIdempotency() - global strategy", async () => {
|
|
122
95
|
const federation = createTestFederation();
|
|
123
96
|
const processedActivities = [];
|
|
124
|
-
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").withIdempotency("global").on(Create, (ctx, activity
|
|
125
|
-
processedActivities.push([ctx.recipient, activity
|
|
97
|
+
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").withIdempotency("global").on(Create, (ctx, activity) => {
|
|
98
|
+
processedActivities.push([ctx.recipient, activity]);
|
|
126
99
|
});
|
|
127
|
-
const
|
|
100
|
+
const signedActivity = await signObject(new Create({
|
|
128
101
|
id: new URL("https://example.com/activities/3"),
|
|
129
102
|
actor: new URL("https://example.com/person2")
|
|
130
|
-
});
|
|
131
|
-
const signedActivity = await signObject(activity, ed25519PrivateKey, ed25519Multikey.id);
|
|
103
|
+
}), ed25519PrivateKey, ed25519Multikey.id);
|
|
132
104
|
const body = JSON.stringify(await signedActivity.toJsonLd({ contextLoader: mockDocumentLoader }));
|
|
133
105
|
let response = await federation.fetch(new Request("https://example.com/users/john/inbox", {
|
|
134
106
|
method: "POST",
|
|
@@ -157,11 +129,10 @@ test("Federation.setInboxListeners().withIdempotency() - custom callback", async
|
|
|
157
129
|
}).on(Follow, (ctx, activity) => {
|
|
158
130
|
processedActivities.push([ctx.recipient, activity]);
|
|
159
131
|
});
|
|
160
|
-
const
|
|
132
|
+
const signedCreate = await signObject(new Create({
|
|
161
133
|
id: new URL("https://example.com/activities/4"),
|
|
162
134
|
actor: new URL("https://example.com/person2")
|
|
163
|
-
});
|
|
164
|
-
const signedCreate = await signObject(createActivity, ed25519PrivateKey, ed25519Multikey.id);
|
|
135
|
+
}), ed25519PrivateKey, ed25519Multikey.id);
|
|
165
136
|
const createBody = JSON.stringify(await signedCreate.toJsonLd({ contextLoader: mockDocumentLoader }));
|
|
166
137
|
let response = await federation.fetch(new Request("https://example.com/users/john/inbox", {
|
|
167
138
|
method: "POST",
|
|
@@ -177,11 +148,10 @@ test("Federation.setInboxListeners().withIdempotency() - custom callback", async
|
|
|
177
148
|
}), { contextData: void 0 });
|
|
178
149
|
assertEquals(response.status, 202);
|
|
179
150
|
assertEquals(processedActivities.length, 1);
|
|
180
|
-
const
|
|
151
|
+
const signedFollow = await signObject(new Follow({
|
|
181
152
|
id: new URL("https://example.com/activities/5"),
|
|
182
153
|
actor: new URL("https://example.com/person2")
|
|
183
|
-
});
|
|
184
|
-
const signedFollow = await signObject(followActivity, ed25519PrivateKey, ed25519Multikey.id);
|
|
154
|
+
}), ed25519PrivateKey, ed25519Multikey.id);
|
|
185
155
|
const followBody = JSON.stringify(await signedFollow.toJsonLd({ contextLoader: mockDocumentLoader }));
|
|
186
156
|
response = await federation.fetch(new Request("https://example.com/users/john/inbox", {
|
|
187
157
|
method: "POST",
|
|
@@ -198,5 +168,5 @@ test("Federation.setInboxListeners().withIdempotency() - custom callback", async
|
|
|
198
168
|
assertEquals(response.status, 202);
|
|
199
169
|
assertEquals(processedActivities.length, 3);
|
|
200
170
|
});
|
|
201
|
-
|
|
202
|
-
|
|
171
|
+
//#endregion
|
|
172
|
+
export {};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "../
|
|
9
|
-
import { InboxListenerSet } from "../inbox-DcDIqTbR.js";
|
|
10
|
-
import { test } from "../testing-C1GIraJh.js";
|
|
11
|
-
import "../assert_is_error-BPGph1Jx.js";
|
|
12
|
-
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
13
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { O as Update, m as Invite, o as Create, t as Activity, y as Offer } from "../vocab-rT_94Pke.mjs";
|
|
5
|
+
import { t as test } from "../testing-BLIh1cXz.mjs";
|
|
6
|
+
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
|
+
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
8
|
+
import { t as InboxListenerSet } from "../inbox-pD1nbb_5.mjs";
|
|
14
9
|
//#region src/federation/inbox.test.ts
|
|
15
10
|
test("InboxListenerSet", () => {
|
|
16
11
|
const listeners = new InboxListenerSet();
|
|
@@ -87,5 +82,5 @@ test("InboxListenerSet", () => {
|
|
|
87
82
|
});
|
|
88
83
|
assertThrows(() => listeners.add(Activity, listenActivity), TypeError, "Listener already set for this type.");
|
|
89
84
|
});
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
//#endregion
|
|
86
|
+
export {};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "../lookup-CySNcNcC.js";
|
|
12
|
-
import { KvKeyCache } from "../keycache-hSs_XFSb.js";
|
|
13
|
-
import { test } from "../testing-C1GIraJh.js";
|
|
14
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { g as Multikey, s as CryptographicKey } from "../vocab-rT_94Pke.mjs";
|
|
5
|
+
import { t as test } from "../testing-BLIh1cXz.mjs";
|
|
6
|
+
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
|
+
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
8
|
+
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
9
|
+
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
10
|
+
import { t as KvKeyCache } from "../keycache-BVR9f06Y.mjs";
|
|
15
11
|
//#region src/federation/keycache.test.ts
|
|
16
12
|
test("KvKeyCache.set()", async () => {
|
|
17
13
|
const kv = new MemoryKvStore();
|
|
@@ -54,8 +50,7 @@ test("KvKeyCache.get()", async () => {
|
|
|
54
50
|
cache.nullKeys.add("https://example.com/null");
|
|
55
51
|
assertEquals(await cache.get(new URL("https://example.com/null")), null);
|
|
56
52
|
await kv.set(["pk", "https://example.com/null2"], { _fedify: "key-unavailable" });
|
|
57
|
-
|
|
58
|
-
assertEquals(await cache2.get(new URL("https://example.com/null2")), null);
|
|
53
|
+
assertEquals(await new KvKeyCache(kv, ["pk"]).get(new URL("https://example.com/null2")), null);
|
|
59
54
|
});
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
//#endregion
|
|
56
|
+
export {};
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "../
|
|
7
|
-
import {
|
|
8
|
-
import "../assert-MZs1qjMx.js";
|
|
9
|
-
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
-
import "../lookup-CySNcNcC.js";
|
|
12
|
-
import { test } from "../testing-C1GIraJh.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 "../assert_throws-BOO88avQ.js";
|
|
18
|
-
|
|
1
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { t as test } from "../testing-BLIh1cXz.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
|
+
import "../std__assert-2v7gYiZp.mjs";
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
19
8
|
//#region src/federation/kv.test.ts
|
|
20
9
|
test("MemoryKvStore", async (t) => {
|
|
21
10
|
const store = new MemoryKvStore();
|
|
@@ -55,10 +44,8 @@ test("MemoryKvStore", async (t) => {
|
|
|
55
44
|
await store.set(["prefix"], "exact-match");
|
|
56
45
|
const entries = await Array.fromAsync(store.list(["prefix"]));
|
|
57
46
|
assertEquals(entries.length, 4);
|
|
58
|
-
|
|
59
|
-
assertEquals(
|
|
60
|
-
const noMatch = await Array.fromAsync(store.list(["nonexistent"]));
|
|
61
|
-
assertEquals(noMatch.length, 0);
|
|
47
|
+
assertEquals(entries.find((e) => e.key.length === 2 && e.key[1] === "a")?.value, "value-a");
|
|
48
|
+
assertEquals((await Array.fromAsync(store.list(["nonexistent"]))).length, 0);
|
|
62
49
|
await store.delete(["prefix", "a"]);
|
|
63
50
|
await store.delete(["prefix", "b"]);
|
|
64
51
|
await store.delete([
|
|
@@ -87,8 +74,7 @@ test("MemoryKvStore", async (t) => {
|
|
|
87
74
|
"e",
|
|
88
75
|
"f"
|
|
89
76
|
], "value-def");
|
|
90
|
-
|
|
91
|
-
assertEquals(entries.length, 3);
|
|
77
|
+
assertEquals((await Array.fromAsync(store.list())).length, 3);
|
|
92
78
|
await store.delete(["a"]);
|
|
93
79
|
await store.delete(["b", "c"]);
|
|
94
80
|
await store.delete([
|
|
@@ -98,5 +84,5 @@ test("MemoryKvStore", async (t) => {
|
|
|
98
84
|
]);
|
|
99
85
|
});
|
|
100
86
|
});
|
|
101
|
-
|
|
102
|
-
|
|
87
|
+
//#endregion
|
|
88
|
+
export {};
|