@fedify/fedify 2.0.0-dev.12 → 2.0.0-dev.138
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 +32 -21
- package/dist/{actor-C-FuEZU4.js → actor-DDU1l9V1.js} +185 -185
- package/dist/{actor-rOm0sXHU.js → actor-cC-nQq0c.js} +4 -1
- package/dist/{actor-_9UN5RVT.cjs → actor-hJ02QOQP.cjs} +185 -185
- 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-C80BG-_5.js → assert_not_equals-B2R_8p36.js} +1 -1
- package/dist/{assert_rejects-Ce45JcFg.js → assert_rejects-BoKYY0g1.js} +2 -2
- package/dist/{assert_throws-BNXdRGWP.js → assert_throws-DjkXin1a.js} +1 -1
- package/dist/{builder-hArjoWjW.js → builder-BIqsybhC.js} +5 -3
- package/dist/chunk-HsBuZ-b2.js +41 -0
- package/dist/{client-pY7-3icS.js → client-CD87uCL_.js} +1 -1
- package/dist/compat/mod.d.cts +3 -3
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/transformers.test.js +29 -24
- package/dist/{context-PxGADCsD.d.cts → context-DBQ7nMCw.d.cts} +1 -1
- package/dist/context-DcqqDGjU.js +109 -0
- package/dist/{context-V-XS2_6O.d.ts → context-mM0Nu5yo.d.ts} +1 -1
- package/dist/deno-WFvU-GBZ.js +131 -0
- package/dist/{testing-D-nLIHkh.js → dist-lStjlyET.js} +73 -113
- package/dist/{docloader-CE1lRhEV.js → docloader-c34HWM33.js} +3 -3
- package/dist/{esm-BEFbR5eN.js → esm-B52TuumP.js} +1 -1
- package/dist/federation/builder.test.js +15 -12
- package/dist/federation/collection.test.js +9 -10
- package/dist/federation/handler.test.js +35 -30
- package/dist/federation/idempotency.test.js +34 -29
- package/dist/federation/inbox.test.js +7 -5
- package/dist/federation/keycache.test.js +7 -7
- package/dist/federation/kv.test.js +63 -10
- package/dist/federation/middleware.test.js +38 -33
- package/dist/federation/mod.cjs +8 -8
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +8 -8
- package/dist/federation/mq.test.js +12 -13
- package/dist/federation/negotiation.test.js +9 -10
- package/dist/federation/retry.test.js +4 -5
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +19 -17
- package/dist/{federation-CRpdnOMS.cjs → federation-CoW-KDKv.cjs} +22 -0
- package/dist/{federation-jcR8-ZxP.js → federation-D0hkM4T7.js} +22 -0
- package/dist/{http-Q_l4fCEE.js → http-D3YqyH4e.js} +2 -2
- package/dist/{http-So5V_Tgv.cjs → http-DW0Oa2Sc.cjs} +2 -2
- package/dist/{http-Bmx7ea3F.js → http-nYhdVvvV.js} +3 -2
- package/dist/{inbox-B9PjFn2S.js → inbox-Bj-D27uQ.js} +3 -1
- package/dist/{key-khQpfFdw.js → key-D_MTpyuI.js} +4 -3
- package/dist/{keycache-BU3fsZFa.js → keycache-IAA7OipY.js} +1 -1
- package/dist/{keys-BaMFfIdL.js → keys-B9yvxo8e.js} +1 -1
- package/dist/{kv-BKNZ-Tb-.d.ts → kv-BpJND1Hr.d.ts} +30 -1
- package/dist/{kv-CRZrzyXm.js → kv-DaWUKuhD.js} +22 -0
- package/dist/{kv-Bxr0Q87_.d.cts → kv-cD_d4hg-.d.cts} +30 -1
- package/dist/{kv-cache-DN9pfMBe.js → kv-cache-C6NrTtII.js} +14 -1
- package/dist/{kv-cache-R1oW382l.js → kv-cache-D__gMqI_.js} +1 -1
- package/dist/{kv-cache-X2ggcnHI.cjs → kv-cache-DlK7_SIS.cjs} +1 -1
- package/dist/{ld-BLMebnep.js → ld-Cz6UUM8J.js} +5 -3
- package/dist/lookup-B1Cz7ZHm.js +133 -0
- package/dist/{lookup-CLaDFNx1.cjs → lookup-BKhUoMgK.cjs} +12 -10
- package/dist/lookup-CX1C-E00.js +230 -0
- package/dist/{lookup-CtC3x1M6.js → lookup-iOzlite7.js} +12 -10
- package/dist/{middleware-C3ml59Hp.js → middleware-B1u0Giyh.js} +23 -18
- package/dist/{middleware-DFLterpx.cjs → middleware-B48zVD4g.cjs} +7 -7
- package/dist/middleware-BNtVjgXE.cjs +15 -0
- package/dist/middleware-ChPWHJ4f.js +31 -0
- package/dist/middleware-EsCHZ3I-.js +15 -0
- package/dist/{middleware-Bda2JO66.js → middleware-fkTXzOSq.js} +7 -7
- package/dist/{mod-aAE2wOWV.d.ts → mod-CAdoBu0x.d.ts} +1 -1
- package/dist/{mod-BoRKfJPE.d.cts → mod-Dy2fJtmN.d.cts} +1 -1
- package/dist/{mod-Cdo6SYlJ.d.ts → mod-GetHzY6F.d.ts} +1 -1
- package/dist/{mod-DMpuiKXi.d.cts → mod-fxr25Gv7.d.cts} +1 -1
- package/dist/mod.cjs +8 -8
- package/dist/mod.d.cts +5 -5
- package/dist/mod.d.ts +5 -5
- package/dist/mod.js +8 -8
- package/dist/nodeinfo/client.test.js +10 -11
- package/dist/nodeinfo/handler.test.js +34 -28
- package/dist/nodeinfo/types.test.js +9 -10
- 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-XzzTSr4S.js → owner-DPvwf79I.js} +3 -2
- package/dist/{proof-C9sfVit1.js → proof-Br_G2CdI.js} +4 -2
- package/dist/{proof-B-qOSAuQ.js → proof-Dd2e9KvN.js} +3 -3
- package/dist/{proof-BzJkFBBF.cjs → proof-af3imB6y.cjs} +3 -3
- package/dist/router-CVRQXlZi.js +118 -0
- package/dist/{send-yEkZlxzW.js → send-DUIFWg1r.js} +2 -2
- package/dist/sig/http.test.js +17 -14
- package/dist/sig/key.test.js +15 -12
- package/dist/sig/ld.test.js +13 -10
- package/dist/sig/mod.cjs +4 -4
- package/dist/sig/mod.js +4 -4
- package/dist/sig/owner.test.js +17 -14
- package/dist/sig/proof.test.js +16 -13
- package/dist/{std__assert-DWivtrGR.js → std__assert-Cm-MfI66.js} +1 -1
- package/dist/testing/mod.d.ts +2 -7
- package/dist/testing/mod.js +9 -3
- package/dist/type-BSNcIxTd.js +14 -0
- package/dist/utils/docloader.test.js +18 -15
- package/dist/utils/kv-cache.test.js +5 -3
- package/dist/utils/mod.cjs +4 -4
- package/dist/utils/mod.d.cts +2 -2
- package/dist/utils/mod.d.ts +2 -2
- package/dist/utils/mod.js +4 -4
- package/dist/vocab/actor.test.js +15 -11
- package/dist/vocab/lookup.test.js +14 -11
- package/dist/vocab/mod.cjs +3 -3
- package/dist/vocab/mod.js +3 -3
- package/dist/vocab/type.test.js +4 -3
- package/dist/vocab/vocab.test.js +166 -165
- package/dist/{lookup-C7SSHgK7.js → vocab-BWcYGmN3.js} +188 -800
- package/dist/{vocab-axlR_8k0.js → vocab-BhJUQe8S.js} +2 -2
- package/dist/{vocab-C96aggZM.cjs → vocab-Brsvh5Yv.cjs} +2 -2
- package/dist/webfinger/handler.test.js +34 -28
- package/dist/webfinger/lookup.test.js +11 -10
- package/dist/webfinger/mod.cjs +1 -1
- package/dist/webfinger/mod.js +1 -1
- package/package.json +22 -13
- 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/middleware-BYBwqvTv.cjs +0 -15
- package/dist/middleware-DC7h2qq-.js +0 -26
- package/dist/middleware-mQR2SM7T.js +0 -15
- package/dist/otel-1BmGPuZc.js +0 -64
- 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/{assert_equals-DSbWqCm3.js → assert_equals-Gbplq4lg.js} +0 -0
- /package/dist/{collection-BzWsN9pB.js → collection-CrkRM5Ep.js} +0 -0
- /package/dist/{negotiation-C4nFufNk.js → negotiation-B4NJHk1f.js} +0 -0
- /package/dist/{testing/docloader.test.d.ts → otel/exporter.test.d.ts} +0 -0
- /package/dist/{retry-CfF8Gn4d.js → retry-Bz5pP75o.js} +0 -0
- /package/dist/{types-C2XVl6gj.js → types-D2jhK2VG.js} +0 -0
|
@@ -3,38 +3,43 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import { assertInstanceOf } from "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import {
|
|
6
|
+
import { mockDocumentLoader, test } from "../dist-lStjlyET.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-Gbplq4lg.js";
|
|
8
|
+
import { assert } from "../assert-Dp5_aoAs.js";
|
|
9
|
+
import { assertInstanceOf } from "../assert_instance_of-D1m8F7x0.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-DaWUKuhD.js";
|
|
11
|
+
import "../deno-WFvU-GBZ.js";
|
|
12
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-B1u0Giyh.js";
|
|
13
|
+
import "../client-CD87uCL_.js";
|
|
14
|
+
import { RouterError } from "../router-CVRQXlZi.js";
|
|
15
|
+
import "../types-D2jhK2VG.js";
|
|
16
|
+
import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-BWcYGmN3.js";
|
|
17
|
+
import "../lookup-B1Cz7ZHm.js";
|
|
18
|
+
import { getTypeId } from "../type-BSNcIxTd.js";
|
|
19
|
+
import "../actor-cC-nQq0c.js";
|
|
20
|
+
import "../key-D_MTpyuI.js";
|
|
21
|
+
import { signRequest, verifyRequest } from "../http-nYhdVvvV.js";
|
|
22
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-Cz6UUM8J.js";
|
|
23
|
+
import { doesActorOwnKey } from "../owner-DPvwf79I.js";
|
|
24
|
+
import { signObject, verifyObject } from "../proof-Br_G2CdI.js";
|
|
25
|
+
import { fetchDocumentLoader, getAuthenticatedDocumentLoader } from "../docloader-c34HWM33.js";
|
|
26
|
+
import "../kv-cache-C6NrTtII.js";
|
|
27
|
+
import { lookupObject } from "../lookup-CX1C-E00.js";
|
|
28
|
+
import "../inbox-Bj-D27uQ.js";
|
|
29
|
+
import "../builder-BIqsybhC.js";
|
|
30
|
+
import "../collection-CrkRM5Ep.js";
|
|
31
|
+
import "../keycache-IAA7OipY.js";
|
|
32
|
+
import "../negotiation-B4NJHk1f.js";
|
|
33
|
+
import "../retry-Bz5pP75o.js";
|
|
34
|
+
import "../send-DUIFWg1r.js";
|
|
35
|
+
import { assertStrictEquals } from "../std__assert-Cm-MfI66.js";
|
|
36
|
+
import { assertFalse, assertRejects } from "../assert_rejects-BoKYY0g1.js";
|
|
37
|
+
import { assertThrows } from "../assert_throws-DjkXin1a.js";
|
|
38
|
+
import { assertNotEquals } from "../assert_not_equals-B2R_8p36.js";
|
|
39
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-B9yvxo8e.js";
|
|
40
|
+
import { esm_default } from "../esm-B52TuumP.js";
|
|
36
41
|
|
|
37
|
-
//#region src/
|
|
42
|
+
//#region ../fixture/src/fixtures/example.com/create.json
|
|
38
43
|
var __context$2 = "https://www.w3.org/ns/activitystreams";
|
|
39
44
|
var type$2 = "Create";
|
|
40
45
|
var id$2 = "https://example.com/create";
|
|
@@ -47,7 +52,7 @@ var create_default = {
|
|
|
47
52
|
};
|
|
48
53
|
|
|
49
54
|
//#endregion
|
|
50
|
-
//#region src/
|
|
55
|
+
//#region ../fixture/src/fixtures/example.com/person.json
|
|
51
56
|
var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
|
|
52
57
|
var id$1 = "https://example.com/person";
|
|
53
58
|
var type$1 = "Person";
|
|
@@ -71,7 +76,7 @@ var person_default = {
|
|
|
71
76
|
};
|
|
72
77
|
|
|
73
78
|
//#endregion
|
|
74
|
-
//#region src/
|
|
79
|
+
//#region ../fixture/src/fixtures/example.com/person2.json
|
|
75
80
|
var __context = [
|
|
76
81
|
"https://www.w3.org/ns/activitystreams",
|
|
77
82
|
"https://w3id.org/security/v1",
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
require('../transformers-CoBS-oFG.cjs');
|
|
6
|
-
require('../lookup-
|
|
7
|
-
require('../actor-
|
|
8
|
-
const require_middleware = require('../middleware-
|
|
9
|
-
require('../http-
|
|
10
|
-
require('../proof-
|
|
11
|
-
const require_federation = require('../federation-
|
|
6
|
+
require('../lookup-BKhUoMgK.cjs');
|
|
7
|
+
require('../actor-hJ02QOQP.cjs');
|
|
8
|
+
const require_middleware = require('../middleware-B48zVD4g.cjs');
|
|
9
|
+
require('../http-DW0Oa2Sc.cjs');
|
|
10
|
+
require('../proof-af3imB6y.cjs');
|
|
11
|
+
const require_federation = require('../federation-CoW-KDKv.cjs');
|
|
12
12
|
require('../types-CWgzGaqk.cjs');
|
|
13
|
-
require('../kv-cache-
|
|
14
|
-
require('../vocab-
|
|
13
|
+
require('../kv-cache-DlK7_SIS.cjs');
|
|
14
|
+
require('../vocab-Brsvh5Yv.cjs');
|
|
15
15
|
|
|
16
16
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
17
17
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
|
@@ -5,7 +5,7 @@ import "../http-M8k5mKc0.cjs";
|
|
|
5
5
|
import "../owner-B4HbyP8s.cjs";
|
|
6
6
|
import "../mod-BxRCHTz-.cjs";
|
|
7
7
|
import "../mod-C58MZ7Wx.cjs";
|
|
8
|
-
import { 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 } from "../context-
|
|
9
|
-
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-
|
|
8
|
+
import { 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 } from "../context-DBQ7nMCw.cjs";
|
|
9
|
+
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-cD_d4hg-.cjs";
|
|
10
10
|
import "../mod-CcDPcLJW.cjs";
|
|
11
|
-
export { 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, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, 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 };
|
|
11
|
+
export { 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, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, 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 };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import "../http-BbO0ejuk.js";
|
|
|
7
7
|
import "../owner-kQRGVXG1.js";
|
|
8
8
|
import "../mod-BlVovdcy.js";
|
|
9
9
|
import "../mod-Ds0mpFZU.js";
|
|
10
|
-
import { 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 } from "../context-
|
|
11
|
-
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-
|
|
10
|
+
import { 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 } from "../context-mM0Nu5yo.js";
|
|
11
|
+
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-BpJND1Hr.js";
|
|
12
12
|
import "../mod-bjzj5QIb.js";
|
|
13
|
-
export { 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, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, 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 };
|
|
13
|
+
export { 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, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, 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 };
|
package/dist/federation/mod.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import "../transformers-BFT6d7J5.js";
|
|
6
|
-
import "../lookup-
|
|
7
|
-
import "../actor-
|
|
8
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
|
9
|
-
import "../http-
|
|
10
|
-
import "../proof-
|
|
11
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-
|
|
6
|
+
import "../lookup-iOzlite7.js";
|
|
7
|
+
import "../actor-DDU1l9V1.js";
|
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-fkTXzOSq.js";
|
|
9
|
+
import "../http-D3YqyH4e.js";
|
|
10
|
+
import "../proof-Dd2e9KvN.js";
|
|
11
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-D0hkM4T7.js";
|
|
12
12
|
import "../types-BtUjyi5y.js";
|
|
13
|
-
import "../kv-cache-
|
|
14
|
-
import "../vocab-
|
|
13
|
+
import "../kv-cache-D__gMqI_.js";
|
|
14
|
+
import "../vocab-BhJUQe8S.js";
|
|
15
15
|
|
|
16
16
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import "../
|
|
14
|
-
import "../assert_not_equals-C80BG-_5.js";
|
|
6
|
+
import { test } from "../dist-lStjlyET.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-Gbplq4lg.js";
|
|
8
|
+
import { assert } from "../assert-Dp5_aoAs.js";
|
|
9
|
+
import "../assert_instance_of-D1m8F7x0.js";
|
|
10
|
+
import { assertGreater, assertGreaterOrEqual } from "../std__assert-Cm-MfI66.js";
|
|
11
|
+
import { assertFalse } from "../assert_rejects-BoKYY0g1.js";
|
|
12
|
+
import "../assert_throws-DjkXin1a.js";
|
|
13
|
+
import "../assert_not_equals-B2R_8p36.js";
|
|
15
14
|
import { delay } from "es-toolkit";
|
|
16
15
|
|
|
17
16
|
//#region src/federation/mq.ts
|
|
@@ -225,8 +224,8 @@ test("InProcessMessageQueue", async (t) => {
|
|
|
225
224
|
});
|
|
226
225
|
test("MessageQueue.nativeRetrial", async (t) => {
|
|
227
226
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") await t.step("DenoKvMessageQueue", async () => {
|
|
228
|
-
const packageName = "@fedify/denokv";
|
|
229
|
-
const { DenoKvMessageQueue } = await import(packageName);
|
|
227
|
+
const packageName = () => "@fedify/denokv";
|
|
228
|
+
const { DenoKvMessageQueue } = await import(packageName());
|
|
230
229
|
const mq = new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
231
230
|
assert(mq.nativeRetrial);
|
|
232
231
|
if (Symbol.dispose in mq) {
|
|
@@ -265,8 +264,8 @@ test("MessageQueue.nativeRetrial", async (t) => {
|
|
|
265
264
|
});
|
|
266
265
|
const queues = { InProcessMessageQueue: () => Promise.resolve(new InProcessMessageQueue()) };
|
|
267
266
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") {
|
|
268
|
-
const packageName = "@fedify/denokv";
|
|
269
|
-
const { DenoKvMessageQueue } = await import(packageName);
|
|
267
|
+
const packageName = () => "@fedify/denokv";
|
|
268
|
+
const { DenoKvMessageQueue } = await import(packageName());
|
|
270
269
|
queues.DenoKvMessageQueue = async () => new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
271
270
|
}
|
|
272
271
|
for (const mqName in queues) test({
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../
|
|
7
|
-
import "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { acceptsJsonLd } from "../negotiation-
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import
|
|
14
|
-
import "../
|
|
15
|
-
import "../assert_not_equals-C80BG-_5.js";
|
|
6
|
+
import { test } from "../dist-lStjlyET.js";
|
|
7
|
+
import "../assert_equals-Gbplq4lg.js";
|
|
8
|
+
import { assert } from "../assert-Dp5_aoAs.js";
|
|
9
|
+
import "../assert_instance_of-D1m8F7x0.js";
|
|
10
|
+
import { acceptsJsonLd } from "../negotiation-B4NJHk1f.js";
|
|
11
|
+
import "../std__assert-Cm-MfI66.js";
|
|
12
|
+
import { assertFalse } from "../assert_rejects-BoKYY0g1.js";
|
|
13
|
+
import "../assert_throws-DjkXin1a.js";
|
|
14
|
+
import "../assert_not_equals-B2R_8p36.js";
|
|
16
15
|
|
|
17
16
|
//#region src/federation/negotiation.test.ts
|
|
18
17
|
test("acceptsJsonLd()", () => {
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../
|
|
7
|
-
import { AssertionError, assertEquals } from "../assert_equals-
|
|
8
|
-
import { createExponentialBackoffPolicy } from "../retry-
|
|
9
|
-
import {
|
|
10
|
-
import { assertNotEquals } from "../assert_not_equals-C80BG-_5.js";
|
|
6
|
+
import { test } from "../dist-lStjlyET.js";
|
|
7
|
+
import { AssertionError, assertEquals } from "../assert_equals-Gbplq4lg.js";
|
|
8
|
+
import { createExponentialBackoffPolicy } from "../retry-Bz5pP75o.js";
|
|
9
|
+
import { assertNotEquals } from "../assert_not_equals-B2R_8p36.js";
|
|
11
10
|
|
|
12
11
|
//#region src/federation/retry.test.ts
|
|
13
12
|
test("createExponentialBackoffPolicy()", () => {
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import {
|
|
11
|
-
import "../std__assert-
|
|
12
|
-
import { assertFalse } from "../assert_rejects-
|
|
13
|
-
import { assertThrows } from "../assert_throws-
|
|
14
|
-
import "../assert_not_equals-
|
|
6
|
+
import { test } from "../dist-lStjlyET.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-Gbplq4lg.js";
|
|
8
|
+
import { assert } from "../assert-Dp5_aoAs.js";
|
|
9
|
+
import "../assert_instance_of-D1m8F7x0.js";
|
|
10
|
+
import { Router, RouterError } from "../router-CVRQXlZi.js";
|
|
11
|
+
import "../std__assert-Cm-MfI66.js";
|
|
12
|
+
import { assertFalse } from "../assert_rejects-BoKYY0g1.js";
|
|
13
|
+
import { assertThrows } from "../assert_throws-DjkXin1a.js";
|
|
14
|
+
import "../assert_not_equals-B2R_8p36.js";
|
|
15
15
|
|
|
16
16
|
//#region src/federation/router.test.ts
|
|
17
17
|
function setUp(options = {}) {
|
|
@@ -3,23 +3,25 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import "../
|
|
17
|
-
import {
|
|
18
|
-
import "../
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
6
|
+
import { createTestTracerProvider, mockDocumentLoader, test } from "../dist-lStjlyET.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-Gbplq4lg.js";
|
|
8
|
+
import { assert } from "../assert-Dp5_aoAs.js";
|
|
9
|
+
import "../assert_instance_of-D1m8F7x0.js";
|
|
10
|
+
import "../deno-WFvU-GBZ.js";
|
|
11
|
+
import { Activity, Application, Endpoints, Group, Person, Service } from "../vocab-BWcYGmN3.js";
|
|
12
|
+
import "../lookup-B1Cz7ZHm.js";
|
|
13
|
+
import "../type-BSNcIxTd.js";
|
|
14
|
+
import "../actor-cC-nQq0c.js";
|
|
15
|
+
import "../key-D_MTpyuI.js";
|
|
16
|
+
import { verifyRequest } from "../http-nYhdVvvV.js";
|
|
17
|
+
import { doesActorOwnKey } from "../owner-DPvwf79I.js";
|
|
18
|
+
import { extractInboxes, sendActivity } from "../send-DUIFWg1r.js";
|
|
19
|
+
import "../std__assert-Cm-MfI66.js";
|
|
20
|
+
import { assertFalse, assertRejects } from "../assert_rejects-BoKYY0g1.js";
|
|
21
|
+
import "../assert_throws-DjkXin1a.js";
|
|
22
|
+
import { assertNotEquals } from "../assert_not_equals-B2R_8p36.js";
|
|
23
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-B9yvxo8e.js";
|
|
24
|
+
import { esm_default } from "../esm-B52TuumP.js";
|
|
23
25
|
|
|
24
26
|
//#region src/federation/send.test.ts
|
|
25
27
|
test("extractInboxes()", () => {
|
|
@@ -68,6 +68,28 @@ var MemoryKvStore = class {
|
|
|
68
68
|
this.#values[encodedKey] = [newValue, expiration];
|
|
69
69
|
return Promise.resolve(true);
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* {@inheritDoc KvStore.list}
|
|
73
|
+
*/
|
|
74
|
+
async *list(prefix) {
|
|
75
|
+
const now = Temporal.Now.instant();
|
|
76
|
+
for (const [encodedKey, entry] of Object.entries(this.#values)) {
|
|
77
|
+
const key = JSON.parse(encodedKey);
|
|
78
|
+
if (prefix != null) {
|
|
79
|
+
if (key.length < prefix.length) continue;
|
|
80
|
+
if (!prefix.every((p, i) => key[i] === p)) continue;
|
|
81
|
+
}
|
|
82
|
+
const [value, expiration] = entry;
|
|
83
|
+
if (expiration != null && now.until(expiration).sign < 0) {
|
|
84
|
+
delete this.#values[encodedKey];
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
yield {
|
|
88
|
+
key,
|
|
89
|
+
value
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
71
93
|
};
|
|
72
94
|
|
|
73
95
|
//#endregion
|
|
@@ -67,6 +67,28 @@ var MemoryKvStore = class {
|
|
|
67
67
|
this.#values[encodedKey] = [newValue, expiration];
|
|
68
68
|
return Promise.resolve(true);
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* {@inheritDoc KvStore.list}
|
|
72
|
+
*/
|
|
73
|
+
async *list(prefix) {
|
|
74
|
+
const now = Temporal.Now.instant();
|
|
75
|
+
for (const [encodedKey, entry] of Object.entries(this.#values)) {
|
|
76
|
+
const key = JSON.parse(encodedKey);
|
|
77
|
+
if (prefix != null) {
|
|
78
|
+
if (key.length < prefix.length) continue;
|
|
79
|
+
if (!prefix.every((p, i) => key[i] === p)) continue;
|
|
80
|
+
}
|
|
81
|
+
const [value, expiration] = entry;
|
|
82
|
+
if (expiration != null && now.until(expiration).sign < 0) {
|
|
83
|
+
delete this.#values[encodedKey];
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
yield {
|
|
87
|
+
key,
|
|
88
|
+
value
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
70
92
|
};
|
|
71
93
|
|
|
72
94
|
//#endregion
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default } from "./lookup-
|
|
6
|
-
import { CryptographicKey, Object as Object$1, isActor } from "./actor-
|
|
5
|
+
import { deno_default } from "./lookup-iOzlite7.js";
|
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-DDU1l9V1.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
|
6
|
-
const require_lookup = require('./lookup-
|
|
7
|
-
const require_actor = require('./actor-
|
|
6
|
+
const require_lookup = require('./lookup-BKhUoMgK.cjs');
|
|
7
|
+
const require_actor = require('./actor-hJ02QOQP.cjs');
|
|
8
8
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
9
9
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
10
10
|
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { deno_default } from "./deno-WFvU-GBZ.js";
|
|
7
|
+
import { CryptographicKey } from "./vocab-BWcYGmN3.js";
|
|
8
|
+
import { fetchKey, validateCryptoKey } from "./key-D_MTpyuI.js";
|
|
8
9
|
import { getLogger } from "@logtape/logtape";
|
|
9
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
11
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { deno_default } from "./deno-WFvU-GBZ.js";
|
|
7
|
+
import { Activity } from "./vocab-BWcYGmN3.js";
|
|
8
|
+
import { getTypeId } from "./type-BSNcIxTd.js";
|
|
7
9
|
import { getLogger } from "@logtape/logtape";
|
|
8
10
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
9
11
|
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { deno_default } from "./deno-WFvU-GBZ.js";
|
|
7
|
+
import { CryptographicKey, Object as Object$1 } from "./vocab-BWcYGmN3.js";
|
|
8
|
+
import { isActor } from "./actor-cC-nQq0c.js";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
|
+
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
10
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
11
12
|
|
|
12
13
|
//#region src/sig/key.ts
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey } from "./
|
|
6
|
+
import { CryptographicKey, Multikey } from "./vocab-BWcYGmN3.js";
|
|
7
7
|
|
|
8
8
|
//#region src/federation/keycache.ts
|
|
9
9
|
var KvKeyCache = class {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey } from "./
|
|
6
|
+
import { CryptographicKey, Multikey } from "./vocab-BWcYGmN3.js";
|
|
7
7
|
import { importSpki } from "@fedify/vocab-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/testing/keys.ts
|
|
@@ -19,6 +19,21 @@ interface KvStoreSetOptions {
|
|
|
19
19
|
*/
|
|
20
20
|
ttl?: Temporal.Duration;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* An entry returned by the {@link KvStore.list} method.
|
|
24
|
+
*
|
|
25
|
+
* @since 1.10.0
|
|
26
|
+
*/
|
|
27
|
+
interface KvStoreListEntry {
|
|
28
|
+
/**
|
|
29
|
+
* The key of the entry.
|
|
30
|
+
*/
|
|
31
|
+
key: KvKey;
|
|
32
|
+
/**
|
|
33
|
+
* The value of the entry.
|
|
34
|
+
*/
|
|
35
|
+
value: unknown;
|
|
36
|
+
}
|
|
22
37
|
/**
|
|
23
38
|
* An abstract interface for a key–value store.
|
|
24
39
|
*
|
|
@@ -54,6 +69,16 @@ interface KvStore {
|
|
|
54
69
|
* @since 1.8.0
|
|
55
70
|
*/
|
|
56
71
|
cas?: (key: KvKey, expectedValue: unknown, newValue: unknown, options?: KvStoreSetOptions) => Promise<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* Lists all entries in the store that match the given prefix.
|
|
74
|
+
* If no prefix is given, all entries are returned.
|
|
75
|
+
* @param prefix The prefix to filter keys by. If not specified, all entries
|
|
76
|
+
* are returned.
|
|
77
|
+
* @returns An async iterable of entries matching the prefix.
|
|
78
|
+
* @since 1.10.0
|
|
79
|
+
* @since 2.0.0 This method is now required instead of optional.
|
|
80
|
+
*/
|
|
81
|
+
list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>;
|
|
57
82
|
}
|
|
58
83
|
/**
|
|
59
84
|
* A key–value store that stores values in memory.
|
|
@@ -79,6 +104,10 @@ declare class MemoryKvStore implements KvStore {
|
|
|
79
104
|
* {@inheritDoc KvStore.cas}
|
|
80
105
|
*/
|
|
81
106
|
cas(key: KvKey, expectedValue: unknown, newValue: unknown, options?: KvStoreSetOptions): Promise<boolean>;
|
|
107
|
+
/**
|
|
108
|
+
* {@inheritDoc KvStore.list}
|
|
109
|
+
*/
|
|
110
|
+
list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>;
|
|
82
111
|
}
|
|
83
112
|
//#endregion
|
|
84
|
-
export { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore };
|
|
113
|
+
export { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore };
|
|
@@ -68,6 +68,28 @@ var MemoryKvStore = class {
|
|
|
68
68
|
this.#values[encodedKey] = [newValue, expiration];
|
|
69
69
|
return Promise.resolve(true);
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* {@inheritDoc KvStore.list}
|
|
73
|
+
*/
|
|
74
|
+
async *list(prefix) {
|
|
75
|
+
const now = Temporal.Now.instant();
|
|
76
|
+
for (const [encodedKey, entry] of Object.entries(this.#values)) {
|
|
77
|
+
const key = JSON.parse(encodedKey);
|
|
78
|
+
if (prefix != null) {
|
|
79
|
+
if (key.length < prefix.length) continue;
|
|
80
|
+
if (!prefix.every((p, i) => key[i] === p)) continue;
|
|
81
|
+
}
|
|
82
|
+
const [value, expiration] = entry;
|
|
83
|
+
if (expiration != null && now.until(expiration).sign < 0) {
|
|
84
|
+
delete this.#values[encodedKey];
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
yield {
|
|
88
|
+
key,
|
|
89
|
+
value
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
71
93
|
};
|
|
72
94
|
|
|
73
95
|
//#endregion
|
|
@@ -16,6 +16,21 @@ interface KvStoreSetOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
ttl?: Temporal.Duration;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* An entry returned by the {@link KvStore.list} method.
|
|
21
|
+
*
|
|
22
|
+
* @since 1.10.0
|
|
23
|
+
*/
|
|
24
|
+
interface KvStoreListEntry {
|
|
25
|
+
/**
|
|
26
|
+
* The key of the entry.
|
|
27
|
+
*/
|
|
28
|
+
key: KvKey;
|
|
29
|
+
/**
|
|
30
|
+
* The value of the entry.
|
|
31
|
+
*/
|
|
32
|
+
value: unknown;
|
|
33
|
+
}
|
|
19
34
|
/**
|
|
20
35
|
* An abstract interface for a key–value store.
|
|
21
36
|
*
|
|
@@ -51,6 +66,16 @@ interface KvStore {
|
|
|
51
66
|
* @since 1.8.0
|
|
52
67
|
*/
|
|
53
68
|
cas?: (key: KvKey, expectedValue: unknown, newValue: unknown, options?: KvStoreSetOptions) => Promise<boolean>;
|
|
69
|
+
/**
|
|
70
|
+
* Lists all entries in the store that match the given prefix.
|
|
71
|
+
* If no prefix is given, all entries are returned.
|
|
72
|
+
* @param prefix The prefix to filter keys by. If not specified, all entries
|
|
73
|
+
* are returned.
|
|
74
|
+
* @returns An async iterable of entries matching the prefix.
|
|
75
|
+
* @since 1.10.0
|
|
76
|
+
* @since 2.0.0 This method is now required instead of optional.
|
|
77
|
+
*/
|
|
78
|
+
list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>;
|
|
54
79
|
}
|
|
55
80
|
/**
|
|
56
81
|
* A key–value store that stores values in memory.
|
|
@@ -76,6 +101,10 @@ declare class MemoryKvStore implements KvStore {
|
|
|
76
101
|
* {@inheritDoc KvStore.cas}
|
|
77
102
|
*/
|
|
78
103
|
cas(key: KvKey, expectedValue: unknown, newValue: unknown, options?: KvStoreSetOptions): Promise<boolean>;
|
|
104
|
+
/**
|
|
105
|
+
* {@inheritDoc KvStore.list}
|
|
106
|
+
*/
|
|
107
|
+
list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>;
|
|
79
108
|
}
|
|
80
109
|
//#endregion
|
|
81
|
-
export { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore };
|
|
110
|
+
export { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore };
|