@fedify/fedify 1.6.1-pr.242.868 → 1.6.1-pr.245.872
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-DTAqv8mf.js → actor-B7xKyIC7.js} +179 -179
- package/dist/{actor-4RHkloLu.js → actor-CFG182bR.js} +3 -3
- package/dist/{authdocloader-B8WXzKLO.js → authdocloader-Cdn3CbZy.js} +3 -3
- package/dist/{authdocloader-DWb2O07G.js → authdocloader-DMOLm8CY.js} +3 -3
- package/dist/{builder-DmqGnXEV.js → builder-CUExlGAH.js} +16 -16
- package/dist/{client-BXM1Jsjk.js → client-CNaeO0LW.js} +1 -1
- package/dist/compat/mod.d.ts +2 -2
- package/dist/compat/transformers.test.js +18 -18
- package/dist/{context-D-mAOKif.d.ts → context-CzJXjNR8.d.ts} +1 -0
- package/dist/{context-CNjBitqI.js → context-zJEtoVJS.js} +3 -3
- package/dist/{docloader-SoTWFoGg.js → docloader-Czco3P6X.js} +1 -1
- package/dist/{docloader-Bx3IyCbi.js → docloader-sgI6F7Ro.js} +1 -1
- package/dist/federation/builder.test.js +6 -5
- package/dist/federation/handler.test.js +20 -20
- package/dist/federation/inbox.test.js +3 -3
- package/dist/federation/keycache.test.js +3 -3
- package/dist/federation/middleware.test.js +19 -19
- package/dist/federation/mod.d.ts +1 -1
- package/dist/federation/mod.js +10 -10
- package/dist/federation/router.test.js +16 -3
- package/dist/federation/send.test.js +9 -9
- package/dist/{http-_wjASyrF.js → http-CP2pIuur.js} +3 -3
- package/dist/{http-Bx8zx0B9.js → http-CTBwZLuQ.js} +3 -3
- package/dist/{inbox-B25fOUCE.js → inbox-BuE9KPEc.js} +8 -3
- package/dist/{key-DJR5B9MR.js → key-0bfNHNRF.js} +5 -5
- package/dist/{key-DMjXmsGn.js → key-18i1FYDt.js} +3 -3
- package/dist/{key-BSJPc6d6.js → key-BPCLKNCh.js} +4 -4
- package/dist/{key-DLPGtYyL.js → key-BPc6d78q.js} +2 -2
- package/dist/{keycache-Bfb23HgF.js → keycache-hl2ARY8p.js} +1 -1
- package/dist/{keys-Bpe3lo_n.js → keys-Dk_Eyuyh.js} +1 -1
- package/dist/{ld-DnImogQ2.js → ld-C2BDnxcZ.js} +3 -3
- package/dist/{lookup-iEX2Qf_y.js → lookup-B12O9dcB.js} +1 -1
- package/dist/{lookup-DuhsEtQ9.js → lookup-CVqC_5fJ.js} +1 -1
- package/dist/{lookup-BdqwM7q0.js → lookup-D1spPv89.js} +3 -3
- package/dist/{middleware-DIkN1Cw2.js → middleware-DGcmjLJD.js} +55 -32
- package/dist/{middleware-kjMnS9e3.js → middleware-DqMtEAhx.js} +16 -16
- package/dist/middleware-bHJ1tYB5.js +33 -0
- package/dist/middleware-zXA47eNI.js +17 -0
- package/dist/{mod-zRl4tJCz.d.ts → mod-CeLnlsqE.d.ts} +1 -1
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +2 -2
- package/dist/nodeinfo/handler.test.js +19 -19
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/{owner-DqE35Vly.js → owner-BoNPBqME.js} +3 -3
- package/dist/{proof-DBWAm04A.js → proof-CThZUNyP.js} +3 -3
- package/dist/{proof-4GVd_94h.js → proof-CaBhkQKn.js} +3 -3
- package/dist/{router-BQ9wxxuz.js → router-D_aVZZUc.js} +19 -1
- package/dist/runtime/authdocloader.test.js +8 -8
- package/dist/runtime/docloader.test.js +1 -1
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/{send-B6r0W6TU.js → send-BjLUPJXk.js} +2 -2
- package/dist/sig/http.test.js +7 -7
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +8 -8
- package/dist/sig/proof.test.js +7 -7
- package/dist/{types-DPKT1AqJ.js → types-DZWmmHD8.js} +1 -1
- package/dist/vocab/actor.test.js +4 -4
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-Bkp-mLSq.js → vocab-BRExeuLZ.js} +3 -3
- package/dist/{vocab-DGenL1NB.js → vocab-ComC-LpL.js} +178 -178
- package/dist/webfinger/handler.test.js +19 -19
- package/dist/webfinger/lookup.test.js +2 -2
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/hono.d.ts +1 -1
- package/dist/x/sveltekit.d.ts +1 -1
- package/package.json +1 -1
- package/dist/middleware-BS5P5Q6N.js +0 -33
- package/dist/middleware-DXhUqEJ1.js +0 -17
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { Application, Group, Organization, Person, Service } from "./vocab-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
6
|
+
import { deno_default } from "./docloader-Czco3P6X.js";
|
7
|
+
import { Application, Group, Organization, Person, Service } from "./vocab-ComC-LpL.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-CVqC_5fJ.js";
|
9
9
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
11
11
|
import { domainToASCII, domainToUnicode } from "node:url";
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { createRequest, getRemoteDocument, logRequest } from "./docloader-
|
6
|
+
import { createRequest, getRemoteDocument, logRequest } from "./docloader-Czco3P6X.js";
|
7
7
|
import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
|
8
|
-
import { validateCryptoKey } from "./key-
|
9
|
-
import { doubleKnock } from "./http-
|
8
|
+
import { validateCryptoKey } from "./key-18i1FYDt.js";
|
9
|
+
import { doubleKnock } from "./http-CTBwZLuQ.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
|
12
12
|
//#region runtime/authdocloader.ts
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-
|
6
|
-
import { validateCryptoKey } from "./key-
|
7
|
-
import { doubleKnock } from "./http-
|
5
|
+
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-sgI6F7Ro.js";
|
6
|
+
import { validateCryptoKey } from "./key-BPc6d78q.js";
|
7
|
+
import { doubleKnock } from "./http-CP2pIuur.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
|
10
10
|
//#region runtime/authdocloader.ts
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { Router, RouterError } from "./router-
|
6
|
+
import { deno_default } from "./docloader-Czco3P6X.js";
|
7
|
+
import { Router, RouterError } from "./router-D_aVZZUc.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
-
import { InboxListenerSet } from "./inbox-
|
9
|
+
import { InboxListenerSet } from "./inbox-BuE9KPEc.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
12
12
|
|
@@ -34,25 +34,25 @@ var FederationBuilderImpl = class {
|
|
34
34
|
this.objectTypeIds = {};
|
35
35
|
}
|
36
36
|
async build(options) {
|
37
|
-
const { FederationImpl } = await import("./middleware-
|
37
|
+
const { FederationImpl } = await import("./middleware-bHJ1tYB5.js");
|
38
38
|
const f = new FederationImpl(options);
|
39
39
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
40
|
-
f.router = this.router;
|
40
|
+
f.router = this.router.clone();
|
41
41
|
f.router.trailingSlashInsensitive = trailingSlashInsensitiveValue;
|
42
42
|
f._initializeRouter();
|
43
|
-
f.actorCallbacks = this.actorCallbacks;
|
43
|
+
f.actorCallbacks = this.actorCallbacks == null ? void 0 : { ...this.actorCallbacks };
|
44
44
|
f.nodeInfoDispatcher = this.nodeInfoDispatcher;
|
45
|
-
f.objectCallbacks = this.objectCallbacks;
|
46
|
-
f.objectTypeIds = this.objectTypeIds;
|
45
|
+
f.objectCallbacks = { ...this.objectCallbacks };
|
46
|
+
f.objectTypeIds = { ...this.objectTypeIds };
|
47
47
|
f.inboxPath = this.inboxPath;
|
48
|
-
f.inboxCallbacks = this.inboxCallbacks;
|
49
|
-
f.outboxCallbacks = this.outboxCallbacks;
|
50
|
-
f.followingCallbacks = this.followingCallbacks;
|
51
|
-
f.followersCallbacks = this.followersCallbacks;
|
52
|
-
f.likedCallbacks = this.likedCallbacks;
|
53
|
-
f.featuredCallbacks = this.featuredCallbacks;
|
54
|
-
f.featuredTagsCallbacks = this.featuredTagsCallbacks;
|
55
|
-
f.inboxListeners = this.inboxListeners;
|
48
|
+
f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
|
49
|
+
f.outboxCallbacks = this.outboxCallbacks == null ? void 0 : { ...this.outboxCallbacks };
|
50
|
+
f.followingCallbacks = this.followingCallbacks == null ? void 0 : { ...this.followingCallbacks };
|
51
|
+
f.followersCallbacks = this.followersCallbacks == null ? void 0 : { ...this.followersCallbacks };
|
52
|
+
f.likedCallbacks = this.likedCallbacks == null ? void 0 : { ...this.likedCallbacks };
|
53
|
+
f.featuredCallbacks = this.featuredCallbacks == null ? void 0 : { ...this.featuredCallbacks };
|
54
|
+
f.featuredTagsCallbacks = this.featuredTagsCallbacks == null ? void 0 : { ...this.featuredTagsCallbacks };
|
55
|
+
f.inboxListeners = this.inboxListeners?.clone();
|
56
56
|
f.inboxErrorHandler = this.inboxErrorHandler;
|
57
57
|
f.sharedInboxKeyDispatcher = this.sharedInboxKeyDispatcher;
|
58
58
|
return f;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { getUserAgent } from "./docloader-
|
6
|
+
import { getUserAgent } from "./docloader-Czco3P6X.js";
|
7
7
|
import { parseSemVer } from "./semver-CbbIgUsa.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
|
package/dist/compat/mod.d.ts
CHANGED
@@ -9,7 +9,7 @@ import "../http-BImJcLfv.js";
|
|
9
9
|
import "../owner-BjpObx-L.js";
|
10
10
|
import "../mod-DysVoXOu.js";
|
11
11
|
import "../lookup-DAfStZtI.js";
|
12
|
-
import { ActivityTransformer } from "../context-
|
12
|
+
import { ActivityTransformer } from "../context-CzJXjNR8.js";
|
13
13
|
import "../mq-Bue016Tz.js";
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-CeLnlsqE.js";
|
15
15
|
export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
|
7
7
|
import { assert } from "../assert-Dv75vaGI.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of--9UCVKsi.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-DqMtEAhx.js";
|
11
|
+
import "../docloader-Czco3P6X.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
15
|
-
import "../router-
|
14
|
+
import "../client-CNaeO0LW.js";
|
15
|
+
import "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Follow, Person } from "../vocab-
|
18
|
+
import { Follow, Person } from "../vocab-ComC-LpL.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-CVqC_5fJ.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import "../http-
|
25
|
-
import "../authdocloader-
|
26
|
-
import "../ld-
|
27
|
-
import "../owner-
|
28
|
-
import "../proof-
|
29
|
-
import "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-CFG182bR.js";
|
23
|
+
import "../key-18i1FYDt.js";
|
24
|
+
import "../http-CTBwZLuQ.js";
|
25
|
+
import "../authdocloader-Cdn3CbZy.js";
|
26
|
+
import "../ld-C2BDnxcZ.js";
|
27
|
+
import "../owner-BoNPBqME.js";
|
28
|
+
import "../proof-CaBhkQKn.js";
|
29
|
+
import "../lookup-D1spPv89.js";
|
30
|
+
import "../inbox-BuE9KPEc.js";
|
31
|
+
import "../builder-CUExlGAH.js";
|
32
32
|
import "../collection-QaGK9TVn.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-hl2ARY8p.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-BjLUPJXk.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
37
|
|
38
38
|
//#region compat/transformers.test.ts
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { RouterError } from "./router-
|
7
|
-
import { lookupWebFinger } from "./lookup-
|
8
|
-
import { lookupObject, traverseCollection } from "./lookup-
|
6
|
+
import { RouterError } from "./router-D_aVZZUc.js";
|
7
|
+
import { lookupWebFinger } from "./lookup-CVqC_5fJ.js";
|
8
|
+
import { lookupObject, traverseCollection } from "./lookup-D1spPv89.js";
|
9
9
|
import { mockDocumentLoader } from "./docloader-09nVWLAZ.js";
|
10
10
|
import { trace } from "@opentelemetry/api";
|
11
11
|
|
@@ -7,16 +7,16 @@ import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
|
7
7
|
import "../assert-Dv75vaGI.js";
|
8
8
|
import "../assert_instance_of--9UCVKsi.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import "../docloader-
|
10
|
+
import "../docloader-Czco3P6X.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
12
|
import { parseSemVer } from "../semver-CbbIgUsa.js";
|
13
|
-
import "../router-
|
13
|
+
import "../router-D_aVZZUc.js";
|
14
14
|
import "../multibase-DeCHcK8L.js";
|
15
|
-
import { Activity, Note, Person } from "../vocab-
|
15
|
+
import { Activity, Note, Person } from "../vocab-ComC-LpL.js";
|
16
16
|
import "../langstr-DbWheeIS.js";
|
17
17
|
import "../type-D2s5lmbZ.js";
|
18
|
-
import "../inbox-
|
19
|
-
import { createFederationBuilder } from "../builder-
|
18
|
+
import "../inbox-BuE9KPEc.js";
|
19
|
+
import { createFederationBuilder } from "../builder-CUExlGAH.js";
|
20
20
|
import { test } from "../testing-jcGLO9Lp.js";
|
21
21
|
import { assertExists } from "../std__assert-CaBUULmX.js";
|
22
22
|
import "../assert_rejects-FOHCtlD2.js";
|
@@ -79,6 +79,7 @@ test("FederationBuilder", async (t) => {
|
|
79
79
|
assertEquals(notePaths, "/notes/123");
|
80
80
|
assertEquals(impl.router.build("actor", { identifier: "user1" }), "/users/user1");
|
81
81
|
assertEquals(impl.router.build("inbox", { identifier: "user1" }), "/users/user1/inbox");
|
82
|
+
await builder.build({ kv });
|
82
83
|
});
|
83
84
|
await t.step("should build with default options", async () => {
|
84
85
|
const builder = createFederationBuilder();
|
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
|
7
7
|
import { assert } from "../assert-Dv75vaGI.js";
|
8
8
|
import "../assert_instance_of--9UCVKsi.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DqMtEAhx.js";
|
11
|
+
import "../docloader-Czco3P6X.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
15
|
-
import "../router-
|
14
|
+
import "../client-CNaeO0LW.js";
|
15
|
+
import "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Create, Note, Person } from "../vocab-
|
18
|
+
import { Create, Note, Person } from "../vocab-ComC-LpL.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-CVqC_5fJ.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import { signRequest } from "../http-
|
25
|
-
import "../authdocloader-
|
26
|
-
import "../ld-
|
27
|
-
import "../owner-
|
28
|
-
import "../proof-
|
29
|
-
import "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-CFG182bR.js";
|
23
|
+
import "../key-18i1FYDt.js";
|
24
|
+
import { signRequest } from "../http-CTBwZLuQ.js";
|
25
|
+
import "../authdocloader-Cdn3CbZy.js";
|
26
|
+
import "../ld-C2BDnxcZ.js";
|
27
|
+
import "../owner-BoNPBqME.js";
|
28
|
+
import "../proof-CaBhkQKn.js";
|
29
|
+
import "../lookup-D1spPv89.js";
|
30
|
+
import "../inbox-BuE9KPEc.js";
|
31
|
+
import "../builder-CUExlGAH.js";
|
32
32
|
import "../collection-QaGK9TVn.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-hl2ARY8p.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-BjLUPJXk.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
37
|
import "../std__assert-CaBUULmX.js";
|
38
38
|
import { assertFalse } from "../assert_rejects-FOHCtlD2.js";
|
@@ -40,8 +40,8 @@ import "../assert_is_error-D162gXcM.js";
|
|
40
40
|
import "../assert_not_equals-Cyf5m9Ke.js";
|
41
41
|
import "../assert_throws-CRfQJvVx.js";
|
42
42
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
43
|
-
import { createInboxContext, createRequestContext } from "../context-
|
44
|
-
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
43
|
+
import { createInboxContext, createRequestContext } from "../context-zJEtoVJS.js";
|
44
|
+
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-Dk_Eyuyh.js";
|
45
45
|
|
46
46
|
//#region federation/handler.test.ts
|
47
47
|
test("acceptsJsonLd()", () => {
|
@@ -4,13 +4,13 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
7
|
-
import "../docloader-
|
7
|
+
import "../docloader-Czco3P6X.js";
|
8
8
|
import "../url-kTAI6_KP.js";
|
9
9
|
import "../multibase-DeCHcK8L.js";
|
10
|
-
import { Activity, Create, Invite, Offer, Update } from "../vocab-
|
10
|
+
import { Activity, Create, Invite, Offer, Update } from "../vocab-ComC-LpL.js";
|
11
11
|
import "../langstr-DbWheeIS.js";
|
12
12
|
import "../type-D2s5lmbZ.js";
|
13
|
-
import { InboxListenerSet } from "../inbox-
|
13
|
+
import { InboxListenerSet } from "../inbox-BuE9KPEc.js";
|
14
14
|
import { test } from "../testing-jcGLO9Lp.js";
|
15
15
|
import "../assert_is_error-D162gXcM.js";
|
16
16
|
import { assertThrows } from "../assert_throws-CRfQJvVx.js";
|
@@ -7,12 +7,12 @@ import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
|
7
7
|
import { assert } from "../assert-Dv75vaGI.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of--9UCVKsi.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import "../docloader-
|
10
|
+
import "../docloader-Czco3P6X.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
12
|
import "../multibase-DeCHcK8L.js";
|
13
|
-
import { CryptographicKey, Multikey } from "../vocab-
|
13
|
+
import { CryptographicKey, Multikey } from "../vocab-ComC-LpL.js";
|
14
14
|
import "../langstr-DbWheeIS.js";
|
15
|
-
import { KvKeyCache } from "../keycache-
|
15
|
+
import { KvKeyCache } from "../keycache-hl2ARY8p.js";
|
16
16
|
import { test } from "../testing-jcGLO9Lp.js";
|
17
17
|
|
18
18
|
//#region federation/keycache.test.ts
|
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
|
7
7
|
import { assert } from "../assert-Dv75vaGI.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of--9UCVKsi.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-
|
11
|
-
import { FetchError, fetchDocumentLoader } from "../docloader-
|
10
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-DqMtEAhx.js";
|
11
|
+
import { FetchError, fetchDocumentLoader } from "../docloader-Czco3P6X.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
15
|
-
import { RouterError } from "../router-
|
14
|
+
import "../client-CNaeO0LW.js";
|
15
|
+
import { RouterError } from "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-
|
18
|
+
import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-ComC-LpL.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-CVqC_5fJ.js";
|
21
21
|
import { getTypeId } from "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import { signRequest, verifyRequest } from "../http-
|
25
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
26
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
27
|
-
import { doesActorOwnKey } from "../owner-
|
28
|
-
import { signObject, verifyObject } from "../proof-
|
29
|
-
import { lookupObject } from "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-CFG182bR.js";
|
23
|
+
import "../key-18i1FYDt.js";
|
24
|
+
import { signRequest, verifyRequest } from "../http-CTBwZLuQ.js";
|
25
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-Cdn3CbZy.js";
|
26
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-C2BDnxcZ.js";
|
27
|
+
import { doesActorOwnKey } from "../owner-BoNPBqME.js";
|
28
|
+
import { signObject, verifyObject } from "../proof-CaBhkQKn.js";
|
29
|
+
import { lookupObject } from "../lookup-D1spPv89.js";
|
30
|
+
import "../inbox-BuE9KPEc.js";
|
31
|
+
import "../builder-CUExlGAH.js";
|
32
32
|
import "../collection-QaGK9TVn.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-hl2ARY8p.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-BjLUPJXk.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
37
|
import { assertStrictEquals } from "../std__assert-CaBUULmX.js";
|
38
38
|
import { assertFalse, assertRejects } from "../assert_rejects-FOHCtlD2.js";
|
@@ -40,7 +40,7 @@ import "../assert_is_error-D162gXcM.js";
|
|
40
40
|
import { assertNotEquals } from "../assert_not_equals-Cyf5m9Ke.js";
|
41
41
|
import { assertThrows } from "../assert_throws-CRfQJvVx.js";
|
42
42
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
43
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
43
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-Dk_Eyuyh.js";
|
44
44
|
import { esm_default } from "../esm-BxIKwi-M.js";
|
45
45
|
|
46
46
|
//#region testing/fixtures/example.com/person.json
|
package/dist/federation/mod.d.ts
CHANGED
@@ -9,7 +9,7 @@ import "../http-BImJcLfv.js";
|
|
9
9
|
import "../owner-BjpObx-L.js";
|
10
10
|
import "../mod-DysVoXOu.js";
|
11
11
|
import "../lookup-DAfStZtI.js";
|
12
|
-
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router$1 as Router, RouterError$1 as RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader$1 as buildCollectionSynchronizationHeader, createExponentialBackoffPolicy$1 as createExponentialBackoffPolicy, createFederation$1 as createFederation, createFederationBuilder$1 as createFederationBuilder, digest$1 as digest, respondWithObject$1 as respondWithObject, respondWithObjectIfAcceptable$1 as respondWithObjectIfAcceptable } from "../context-
|
12
|
+
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router$1 as Router, RouterError$1 as RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader$1 as buildCollectionSynchronizationHeader, createExponentialBackoffPolicy$1 as createExponentialBackoffPolicy, createFederation$1 as createFederation, createFederationBuilder$1 as createFederationBuilder, digest$1 as digest, respondWithObject$1 as respondWithObject, respondWithObjectIfAcceptable$1 as respondWithObjectIfAcceptable } from "../context-CzJXjNR8.js";
|
13
13
|
import { InProcessMessageQueue$1 as InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue$1 as ParallelMessageQueue } from "../mq-Bue016Tz.js";
|
14
14
|
import "../mod-g0xFzAP9.js";
|
15
15
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, 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, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
5
|
import "../transformers-jxj-4o2K.js";
|
6
|
-
import "../docloader-
|
7
|
-
import "../actor-
|
8
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
9
|
-
import "../lookup-
|
10
|
-
import "../key-
|
11
|
-
import "../http-
|
12
|
-
import "../proof-
|
6
|
+
import "../docloader-sgI6F7Ro.js";
|
7
|
+
import "../actor-B7xKyIC7.js";
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DGcmjLJD.js";
|
9
|
+
import "../lookup-B12O9dcB.js";
|
10
|
+
import "../key-BPc6d78q.js";
|
11
|
+
import "../http-CP2pIuur.js";
|
12
|
+
import "../proof-CThZUNyP.js";
|
13
13
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-Bmj7soSg.js";
|
14
|
-
import "../types-
|
15
|
-
import "../authdocloader-
|
16
|
-
import "../vocab-
|
14
|
+
import "../types-DZWmmHD8.js";
|
15
|
+
import "../authdocloader-DMOLm8CY.js";
|
16
|
+
import "../vocab-BRExeuLZ.js";
|
17
17
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
@@ -4,12 +4,12 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
7
|
-
import "../assert-Dv75vaGI.js";
|
7
|
+
import { assert } from "../assert-Dv75vaGI.js";
|
8
8
|
import "../assert_instance_of--9UCVKsi.js";
|
9
|
-
import { Router, RouterError } from "../router-
|
9
|
+
import { Router, RouterError } from "../router-D_aVZZUc.js";
|
10
10
|
import { test } from "../testing-jcGLO9Lp.js";
|
11
11
|
import "../std__assert-CaBUULmX.js";
|
12
|
-
import "../assert_rejects-FOHCtlD2.js";
|
12
|
+
import { assertFalse } from "../assert_rejects-FOHCtlD2.js";
|
13
13
|
import "../assert_is_error-D162gXcM.js";
|
14
14
|
import "../assert_not_equals-Cyf5m9Ke.js";
|
15
15
|
import { assertThrows } from "../assert_throws-CRfQJvVx.js";
|
@@ -21,6 +21,19 @@ function setUp(options = {}) {
|
|
21
21
|
router.add("/users/{name}/posts/{postId}" + (options.trailingSlashInsensitive ? "/" : ""), "post");
|
22
22
|
return router;
|
23
23
|
}
|
24
|
+
test("Router.clone()", () => {
|
25
|
+
const original = setUp();
|
26
|
+
const clone = original.clone();
|
27
|
+
clone.add("/users/{name}/friends", "friends");
|
28
|
+
assert(clone.has("friends"));
|
29
|
+
assertEquals(clone.route("/users/alice/friends"), {
|
30
|
+
name: "friends",
|
31
|
+
template: "/users/{name}/friends",
|
32
|
+
values: { name: "alice" }
|
33
|
+
});
|
34
|
+
assertFalse(original.has("friends"));
|
35
|
+
assertEquals(original.route("/users/alice/friends"), null);
|
36
|
+
});
|
24
37
|
test("Router.add()", () => {
|
25
38
|
const router = new Router();
|
26
39
|
assertEquals(router.add("/users", "users"), new Set());
|
@@ -6,18 +6,18 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
7
7
|
import { assert } from "../assert-Dv75vaGI.js";
|
8
8
|
import "../assert_instance_of--9UCVKsi.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-Czco3P6X.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../multibase-DeCHcK8L.js";
|
12
|
-
import { Activity, Application, Endpoints, Group, Person, Service } from "../vocab-
|
12
|
+
import { Activity, Application, Endpoints, Group, Person, Service } from "../vocab-ComC-LpL.js";
|
13
13
|
import "../langstr-DbWheeIS.js";
|
14
|
-
import "../lookup-
|
14
|
+
import "../lookup-CVqC_5fJ.js";
|
15
15
|
import "../type-D2s5lmbZ.js";
|
16
|
-
import "../actor-
|
17
|
-
import "../key-
|
18
|
-
import { verifyRequest } from "../http-
|
19
|
-
import { doesActorOwnKey } from "../owner-
|
20
|
-
import { extractInboxes, sendActivity } from "../send-
|
16
|
+
import "../actor-CFG182bR.js";
|
17
|
+
import "../key-18i1FYDt.js";
|
18
|
+
import { verifyRequest } from "../http-CTBwZLuQ.js";
|
19
|
+
import { doesActorOwnKey } from "../owner-BoNPBqME.js";
|
20
|
+
import { extractInboxes, sendActivity } from "../send-BjLUPJXk.js";
|
21
21
|
import { test } from "../testing-jcGLO9Lp.js";
|
22
22
|
import "../std__assert-CaBUULmX.js";
|
23
23
|
import { assertFalse, assertRejects } from "../assert_rejects-FOHCtlD2.js";
|
@@ -25,7 +25,7 @@ import "../assert_is_error-D162gXcM.js";
|
|
25
25
|
import { assertNotEquals } from "../assert_not_equals-Cyf5m9Ke.js";
|
26
26
|
import "../assert_throws-CRfQJvVx.js";
|
27
27
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
28
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
28
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-Dk_Eyuyh.js";
|
29
29
|
import { esm_default } from "../esm-BxIKwi-M.js";
|
30
30
|
|
31
31
|
//#region federation/send.test.ts
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default } from "./docloader-
|
6
|
-
import { CryptographicKey } from "./actor-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
5
|
+
import { deno_default } from "./docloader-sgI6F7Ro.js";
|
6
|
+
import { CryptographicKey } from "./actor-B7xKyIC7.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BPc6d78q.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { CryptographicKey } from "./vocab-
|
8
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
6
|
+
import { deno_default } from "./docloader-Czco3P6X.js";
|
7
|
+
import { CryptographicKey } from "./vocab-ComC-LpL.js";
|
8
|
+
import { fetchKey, validateCryptoKey } from "./key-18i1FYDt.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
11
11
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
@@ -3,18 +3,23 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { Activity } from "./vocab-
|
6
|
+
import { deno_default } from "./docloader-Czco3P6X.js";
|
7
|
+
import { Activity } from "./vocab-ComC-LpL.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
11
11
|
|
12
12
|
//#region federation/inbox.ts
|
13
|
-
var InboxListenerSet = class {
|
13
|
+
var InboxListenerSet = class InboxListenerSet {
|
14
14
|
#listeners;
|
15
15
|
constructor() {
|
16
16
|
this.#listeners = new Map();
|
17
17
|
}
|
18
|
+
clone() {
|
19
|
+
const clone = new InboxListenerSet();
|
20
|
+
clone.#listeners = new Map(this.#listeners);
|
21
|
+
return clone;
|
22
|
+
}
|
18
23
|
add(type, listener) {
|
19
24
|
if (this.#listeners.has(type)) throw new TypeError("Listener already set for this type.");
|
20
25
|
this.#listeners.set(type, listener);
|
@@ -3,14 +3,14 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "./docloader-
|
6
|
+
import "./docloader-Czco3P6X.js";
|
7
7
|
import "./url-kTAI6_KP.js";
|
8
8
|
import "./multibase-DeCHcK8L.js";
|
9
|
-
import "./vocab-
|
9
|
+
import "./vocab-ComC-LpL.js";
|
10
10
|
import "./langstr-DbWheeIS.js";
|
11
|
-
import "./lookup-
|
11
|
+
import "./lookup-CVqC_5fJ.js";
|
12
12
|
import "./type-D2s5lmbZ.js";
|
13
|
-
import "./actor-
|
14
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
13
|
+
import "./actor-CFG182bR.js";
|
14
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-18i1FYDt.js";
|
15
15
|
|
16
16
|
export { validateCryptoKey };
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
7
|
-
import { CryptographicKey, Object as Object$1 } from "./vocab-
|
8
|
-
import { isActor } from "./actor-
|
6
|
+
import { deno_default, getDocumentLoader } from "./docloader-Czco3P6X.js";
|
7
|
+
import { CryptographicKey, Object as Object$1 } from "./vocab-ComC-LpL.js";
|
8
|
+
import { isActor } from "./actor-CFG182bR.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
11
11
|
|