@fedify/fedify 1.8.1-pr.332.1203 → 1.8.1-pr.332.1207
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-B4-Ou2XS.js → actor-BCukVzp-.js} +1 -1
- package/dist/{actor-rlF6houz.js → actor-DC235gSh.js} +179 -179
- package/dist/{authdocloader-Q-s3MPe7.js → authdocloader-BNz_rAuC.js} +3 -3
- package/dist/{authdocloader-HWSai7os.js → authdocloader-BdA4god8.js} +3 -3
- package/dist/{builder-DwEJMUB-.js → builder-3mcDrCcn.js} +18 -4
- package/dist/{client-PpDKPft1.js → client-CMiyLPA4.js} +1 -1
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{docloader-DzXnfzJ0.js → docloader-BMRaF5NC.js} +1 -1
- package/dist/{esm-BAxPpCaj.js → esm-DT1-az0c.js} +1 -1
- package/dist/federation/builder.test.js +5 -5
- package/dist/federation/collection.test.js +3 -3
- package/dist/federation/handler.test.js +17 -17
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +3 -3
- package/dist/federation/middleware.test.js +48 -18
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +3 -3
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/{http-CZonpkiQ.js → http-B385z8Ty.js} +3 -3
- package/dist/{http-Bfdfr42s.js → http-DPg64hTf.js} +2 -2
- package/dist/{inbox-QidYQtca.js → inbox-BJx_KbrG.js} +1 -1
- package/dist/{key-DWPvgueS.js → key-BXJd9E7y.js} +4 -4
- package/dist/{key-CtSWO18s.js → key-BZiHUrf8.js} +2 -2
- package/dist/{key-1pk2ry0O.js → key-C1k9g9T1.js} +2 -2
- package/dist/{key-CZ_DntTx.js → key-DmtqsIk1.js} +3 -3
- package/dist/{keycache-tqN74tsd.js → keycache-B7lCdcNA.js} +1 -1
- package/dist/{keys-CelAPXCi.js → keys-BL1g5NWr.js} +1 -1
- package/dist/{ld-CqC294Yu.js → ld-DhpcscCT.js} +2 -2
- package/dist/{lookup-C8Zcn89z.js → lookup-B-EEAtwq.js} +1 -1
- package/dist/{lookup-wRBQl0gM.js → lookup-Dlo9RnfH.js} +1 -1
- package/dist/middleware-097J6a7j.js +26 -0
- package/dist/middleware-B6X5g4cD.js +17 -0
- package/dist/{middleware-dg82dyYM.js → middleware-BfnpNgxQ.js} +16 -23
- package/dist/{middleware-Dox_ElbI.js → middleware-DGKQ-wBf.js} +27 -20
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/{owner-DRnjK4ra.js → owner-DpZiDAhr.js} +2 -2
- package/dist/{proof-n-ewjNuF.js → proof-DpTPCInd.js} +2 -2
- package/dist/{proof-Doa4_sYQ.js → proof-Dv-717A3.js} +3 -3
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +4 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/{send-4WwbV-2M.js → send-2WzIPXiW.js} +2 -2
- package/dist/sig/http.test.js +8 -8
- 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 +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-D5NOL56Q.js → testing-ComQ9GbD.js} +2 -2
- package/dist/{type-C-bpdqT_.js → type-DU-RPSMO.js} +178 -178
- package/dist/{types-Mci905JF.js → types-Dgsmzl1D.js} +1 -1
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-eFLLmrLH.js → vocab-CTSUjQEx.js} +3 -3
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +3 -3
- package/package.json +1 -1
- package/dist/middleware-CEsQBX5L.js +0 -17
- package/dist/middleware-DLnW3V7u.js +0 -26
|
@@ -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-BMRaF5NC.js";
|
|
6
|
+
import { validateCryptoKey } from "./key-C1k9g9T1.js";
|
|
7
|
+
import { doubleKnock } from "./http-B385z8Ty.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
|
|
10
10
|
//#region runtime/authdocloader.ts
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-
|
|
7
|
-
import { validateCryptoKey } from "./key-
|
|
8
|
-
import { doubleKnock } from "./http-
|
|
6
|
+
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-DU-RPSMO.js";
|
|
7
|
+
import { validateCryptoKey } from "./key-BZiHUrf8.js";
|
|
8
|
+
import { doubleKnock } from "./http-DPg64hTf.js";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
|
|
11
11
|
//#region runtime/authdocloader.ts
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default, getTypeId } from "./type-
|
|
7
|
-
import { Router, RouterError } from "./lookup-
|
|
8
|
-
import { InboxListenerSet } from "./inbox-
|
|
6
|
+
import { deno_default, getTypeId } from "./type-DU-RPSMO.js";
|
|
7
|
+
import { Router, RouterError } from "./lookup-B-EEAtwq.js";
|
|
8
|
+
import { InboxListenerSet } from "./inbox-BJx_KbrG.js";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
11
11
|
|
|
@@ -41,7 +41,7 @@ var FederationBuilderImpl = class {
|
|
|
41
41
|
this.collectionTypeIds = {};
|
|
42
42
|
}
|
|
43
43
|
async build(options) {
|
|
44
|
-
const { FederationImpl } = await import("./middleware-
|
|
44
|
+
const { FederationImpl } = await import("./middleware-097J6a7j.js");
|
|
45
45
|
const f = new FederationImpl(options);
|
|
46
46
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
47
47
|
f.router = this.router.clone();
|
|
@@ -522,6 +522,20 @@ var FederationBuilderImpl = class {
|
|
|
522
522
|
return setters;
|
|
523
523
|
}
|
|
524
524
|
/**
|
|
525
|
+
* Get the URL path for a custom collection.
|
|
526
|
+
* If the collection is not registered, returns null.
|
|
527
|
+
* @typeParam TParam The parameter names of the requested URL.
|
|
528
|
+
* @param {string | symbol} name The name of the custom collection.
|
|
529
|
+
* @param {TParam} values The values to fill in the URL parameters.
|
|
530
|
+
* @returns {string | null} The URL path for the custom collection, or null if not registered.
|
|
531
|
+
*/
|
|
532
|
+
getCollectionPath(name, values) {
|
|
533
|
+
if (!(name in this.collectionCallbacks)) return null;
|
|
534
|
+
const routeName = this.#uniqueCollectionId(name);
|
|
535
|
+
const path = this.router.build(`collection:${routeName}`, values) ?? this.router.build(`orderedCollection:${routeName}`, values);
|
|
536
|
+
return path;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
525
539
|
* Converts a name (string or symbol) to a unique string identifier.
|
|
526
540
|
* For symbols, generates and caches a UUID if not already present.
|
|
527
541
|
* For strings, returns the string as-is.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { getUserAgent } from "./type-
|
|
6
|
+
import { getUserAgent } from "./type-DU-RPSMO.js";
|
|
7
7
|
import { parseSemVer } from "./semver-DCqorrj5.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
|
|
@@ -3,30 +3,30 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Follow, Person } from "../type-
|
|
6
|
+
import { Follow, Person } from "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-
|
|
11
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-BfnpNgxQ.js";
|
|
12
12
|
import "../semver-DCqorrj5.js";
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
13
|
+
import "../client-CMiyLPA4.js";
|
|
14
|
+
import "../lookup-B-EEAtwq.js";
|
|
15
15
|
import "../types-n7HI7VFr.js";
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import "../http-
|
|
19
|
-
import "../authdocloader-
|
|
20
|
-
import "../ld-
|
|
21
|
-
import "../owner-
|
|
22
|
-
import "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
16
|
+
import "../actor-BCukVzp-.js";
|
|
17
|
+
import "../key-BZiHUrf8.js";
|
|
18
|
+
import "../http-DPg64hTf.js";
|
|
19
|
+
import "../authdocloader-BdA4god8.js";
|
|
20
|
+
import "../ld-DhpcscCT.js";
|
|
21
|
+
import "../owner-DpZiDAhr.js";
|
|
22
|
+
import "../proof-DpTPCInd.js";
|
|
23
|
+
import "../inbox-BJx_KbrG.js";
|
|
24
|
+
import "../builder-3mcDrCcn.js";
|
|
25
25
|
import "../collection-D5V3UzU3.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-B7lCdcNA.js";
|
|
27
27
|
import "../retry-BnpVRGFC.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { test } from "../testing-
|
|
28
|
+
import "../send-2WzIPXiW.js";
|
|
29
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
30
30
|
|
|
31
31
|
//#region compat/transformers.test.ts
|
|
32
32
|
const federation = new FederationImpl({ kv: new MemoryKvStore() });
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { __commonJS, __toESM } from "./type-
|
|
6
|
+
import { __commonJS, __toESM } from "./type-DU-RPSMO.js";
|
|
7
7
|
|
|
8
8
|
//#region ../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
9
9
|
var require_glob_to_regexp = __commonJS({ "../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Note, Person } from "../type-
|
|
6
|
+
import { Activity, Note, Person } from "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
11
|
import { parseSemVer } from "../semver-DCqorrj5.js";
|
|
12
|
-
import "../lookup-
|
|
13
|
-
import "../inbox-
|
|
14
|
-
import { createFederationBuilder } from "../builder-
|
|
15
|
-
import { test } from "../testing-
|
|
12
|
+
import "../lookup-B-EEAtwq.js";
|
|
13
|
+
import "../inbox-BJx_KbrG.js";
|
|
14
|
+
import { createFederationBuilder } from "../builder-3mcDrCcn.js";
|
|
15
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
16
16
|
import { assertExists } from "../std__assert-BQdmxyzF.js";
|
|
17
17
|
import "../assert_rejects-AjlKk-Vo.js";
|
|
18
18
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
-
import "../lookup-
|
|
10
|
+
import "../lookup-B-EEAtwq.js";
|
|
11
11
|
import { buildCollectionSynchronizationHeader, digest } from "../collection-D5V3UzU3.js";
|
|
12
|
-
import { test } from "../testing-
|
|
12
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
13
13
|
import "../std__assert-BQdmxyzF.js";
|
|
14
14
|
import "../assert_rejects-AjlKk-Vo.js";
|
|
15
15
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
@@ -3,36 +3,36 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Create, Note, Person } from "../type-
|
|
6
|
+
import { Create, Note, Person } from "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
|
-
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
|
11
|
+
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BfnpNgxQ.js";
|
|
12
12
|
import "../semver-DCqorrj5.js";
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
13
|
+
import "../client-CMiyLPA4.js";
|
|
14
|
+
import "../lookup-B-EEAtwq.js";
|
|
15
15
|
import "../types-n7HI7VFr.js";
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import { signRequest } from "../http-
|
|
19
|
-
import "../authdocloader-
|
|
20
|
-
import "../ld-
|
|
21
|
-
import "../owner-
|
|
22
|
-
import "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
16
|
+
import "../actor-BCukVzp-.js";
|
|
17
|
+
import "../key-BZiHUrf8.js";
|
|
18
|
+
import { signRequest } from "../http-DPg64hTf.js";
|
|
19
|
+
import "../authdocloader-BdA4god8.js";
|
|
20
|
+
import "../ld-DhpcscCT.js";
|
|
21
|
+
import "../owner-DpZiDAhr.js";
|
|
22
|
+
import "../proof-DpTPCInd.js";
|
|
23
|
+
import "../inbox-BJx_KbrG.js";
|
|
24
|
+
import "../builder-3mcDrCcn.js";
|
|
25
25
|
import "../collection-D5V3UzU3.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-B7lCdcNA.js";
|
|
27
27
|
import "../retry-BnpVRGFC.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-
|
|
28
|
+
import "../send-2WzIPXiW.js";
|
|
29
|
+
import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-ComQ9GbD.js";
|
|
30
30
|
import "../std__assert-BQdmxyzF.js";
|
|
31
31
|
import { assertFalse } from "../assert_rejects-AjlKk-Vo.js";
|
|
32
32
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
33
33
|
import "../assert_not_equals-D2R2nl5h.js";
|
|
34
34
|
import "../assert_throws-CqMKbTh_.js";
|
|
35
|
-
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
35
|
+
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BL1g5NWr.js";
|
|
36
36
|
|
|
37
37
|
//#region federation/handler.test.ts
|
|
38
38
|
test("acceptsJsonLd()", () => {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Create, Invite, Offer, Update } from "../type-
|
|
6
|
+
import { Activity, Create, Invite, Offer, Update } from "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
-
import "../lookup-
|
|
9
|
-
import { InboxListenerSet } from "../inbox-
|
|
10
|
-
import { test } from "../testing-
|
|
8
|
+
import "../lookup-B-EEAtwq.js";
|
|
9
|
+
import { InboxListenerSet } from "../inbox-BJx_KbrG.js";
|
|
10
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
11
11
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
12
12
|
import { assertThrows } from "../assert_throws-CqMKbTh_.js";
|
|
13
13
|
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey } from "../type-
|
|
6
|
+
import { CryptographicKey, Multikey } from "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { KvKeyCache } from "../keycache-
|
|
13
|
-
import { test } from "../testing-
|
|
11
|
+
import "../lookup-B-EEAtwq.js";
|
|
12
|
+
import { KvKeyCache } from "../keycache-B7lCdcNA.js";
|
|
13
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
14
14
|
|
|
15
15
|
//#region federation/keycache.test.ts
|
|
16
16
|
test("KvKeyCache.set()", async () => {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { test } from "../testing-
|
|
11
|
+
import "../lookup-B-EEAtwq.js";
|
|
12
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
13
13
|
import "../std__assert-BQdmxyzF.js";
|
|
14
14
|
import "../assert_rejects-AjlKk-Vo.js";
|
|
15
15
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
@@ -3,37 +3,37 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-
|
|
6
|
+
import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-
|
|
11
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-BfnpNgxQ.js";
|
|
12
12
|
import "../semver-DCqorrj5.js";
|
|
13
|
-
import "../client-
|
|
14
|
-
import { RouterError, lookupObject } from "../lookup-
|
|
13
|
+
import "../client-CMiyLPA4.js";
|
|
14
|
+
import { RouterError, lookupObject } from "../lookup-B-EEAtwq.js";
|
|
15
15
|
import "../types-n7HI7VFr.js";
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import { signRequest, verifyRequest } from "../http-
|
|
19
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
20
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
|
21
|
-
import { doesActorOwnKey } from "../owner-
|
|
22
|
-
import { signObject, verifyObject } from "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
16
|
+
import "../actor-BCukVzp-.js";
|
|
17
|
+
import "../key-BZiHUrf8.js";
|
|
18
|
+
import { signRequest, verifyRequest } from "../http-DPg64hTf.js";
|
|
19
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-BdA4god8.js";
|
|
20
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-DhpcscCT.js";
|
|
21
|
+
import { doesActorOwnKey } from "../owner-DpZiDAhr.js";
|
|
22
|
+
import { signObject, verifyObject } from "../proof-DpTPCInd.js";
|
|
23
|
+
import "../inbox-BJx_KbrG.js";
|
|
24
|
+
import "../builder-3mcDrCcn.js";
|
|
25
25
|
import "../collection-D5V3UzU3.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-B7lCdcNA.js";
|
|
27
27
|
import "../retry-BnpVRGFC.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
28
|
+
import "../send-2WzIPXiW.js";
|
|
29
|
+
import { mockDocumentLoader, test } from "../testing-ComQ9GbD.js";
|
|
30
30
|
import { assertStrictEquals } from "../std__assert-BQdmxyzF.js";
|
|
31
31
|
import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
|
|
32
32
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
33
33
|
import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
|
|
34
34
|
import { assertThrows } from "../assert_throws-CqMKbTh_.js";
|
|
35
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
36
|
-
import { esm_default } from "../esm-
|
|
35
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BL1g5NWr.js";
|
|
36
|
+
import { esm_default } from "../esm-DT1-az0c.js";
|
|
37
37
|
|
|
38
38
|
//#region testing/fixtures/example.com/person.json
|
|
39
39
|
var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
|
|
@@ -1627,6 +1627,36 @@ test({
|
|
|
1627
1627
|
]);
|
|
1628
1628
|
}
|
|
1629
1629
|
});
|
|
1630
|
+
test("ContextImpl.getCollectionUri()", () => {
|
|
1631
|
+
const federation = new FederationImpl({ kv: new MemoryKvStore() });
|
|
1632
|
+
const base = "https://example.com";
|
|
1633
|
+
const ctx = new ContextImpl({
|
|
1634
|
+
url: new URL(base),
|
|
1635
|
+
federation,
|
|
1636
|
+
data: void 0,
|
|
1637
|
+
documentLoader: mockDocumentLoader,
|
|
1638
|
+
contextLoader: fetchDocumentLoader
|
|
1639
|
+
});
|
|
1640
|
+
const values = { id: "123" };
|
|
1641
|
+
const dispatcher = (_ctx, _values) => ({ items: [] });
|
|
1642
|
+
let url;
|
|
1643
|
+
const strName = "registered";
|
|
1644
|
+
federation.setCollectionDispatcher(strName, Object$1, "/string-route/{id}", dispatcher);
|
|
1645
|
+
url = ctx.getCollectionUri(strName, values);
|
|
1646
|
+
assertEquals(url.href, `${base}/string-route/123`);
|
|
1647
|
+
const unnamedSymName = Symbol(strName);
|
|
1648
|
+
federation.setCollectionDispatcher(unnamedSymName, Object$1, "/symbol-route/{id}", dispatcher);
|
|
1649
|
+
url = ctx.getCollectionUri(unnamedSymName, values);
|
|
1650
|
+
assertEquals(url.href, `${base}/symbol-route/123`);
|
|
1651
|
+
const namedSymName = Symbol.for(strName);
|
|
1652
|
+
federation.setCollectionDispatcher(namedSymName, Object$1, "/named-symbol-route/{id}", dispatcher);
|
|
1653
|
+
url = ctx.getCollectionUri(namedSymName, values);
|
|
1654
|
+
assertEquals(url.href, `${base}/named-symbol-route/123`);
|
|
1655
|
+
const notReg = "not-registered";
|
|
1656
|
+
assertThrows(() => ctx.getCollectionUri(notReg, values));
|
|
1657
|
+
assertThrows(() => ctx.getCollectionUri(Symbol(notReg), values));
|
|
1658
|
+
assertThrows(() => ctx.getCollectionUri(Symbol.for(notReg), values));
|
|
1659
|
+
});
|
|
1630
1660
|
test("InboxContextImpl.forwardActivity()", async (t) => {
|
|
1631
1661
|
esm_default.spyGlobal();
|
|
1632
1662
|
let verified = null;
|
package/dist/federation/mod.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import "../transformers-ghwJuzGY.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-BMRaF5NC.js";
|
|
7
|
+
import "../actor-DC235gSh.js";
|
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DGKQ-wBf.js";
|
|
9
|
+
import "../lookup-Dlo9RnfH.js";
|
|
10
|
+
import "../key-C1k9g9T1.js";
|
|
11
|
+
import "../http-B385z8Ty.js";
|
|
12
|
+
import "../proof-Dv-717A3.js";
|
|
13
13
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-C44ekWNP.js";
|
|
14
|
-
import "../types-
|
|
15
|
-
import "../authdocloader-
|
|
16
|
-
import "../vocab-
|
|
14
|
+
import "../types-Dgsmzl1D.js";
|
|
15
|
+
import "../authdocloader-BNz_rAuC.js";
|
|
16
|
+
import "../vocab-CTSUjQEx.js";
|
|
17
17
|
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
10
|
+
import "../lookup-B-EEAtwq.js";
|
|
11
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
12
12
|
import { assertGreater, assertGreaterOrEqual } from "../std__assert-BQdmxyzF.js";
|
|
13
13
|
import { assertFalse } from "../assert_rejects-AjlKk-Vo.js";
|
|
14
14
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-DU-RPSMO.js";
|
|
7
7
|
import { AssertionError, assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
-
import "../lookup-
|
|
8
|
+
import "../lookup-B-EEAtwq.js";
|
|
9
9
|
import { createExponentialBackoffPolicy } from "../retry-BnpVRGFC.js";
|
|
10
|
-
import { test } from "../testing-
|
|
10
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
11
11
|
import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
|
|
12
12
|
|
|
13
13
|
//#region federation/retry.test.ts
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
-
import { Router, RouterError } from "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
10
|
+
import { Router, RouterError } from "../lookup-B-EEAtwq.js";
|
|
11
|
+
import { test } from "../testing-ComQ9GbD.js";
|
|
12
12
|
import "../std__assert-BQdmxyzF.js";
|
|
13
13
|
import { assertFalse } from "../assert_rejects-AjlKk-Vo.js";
|
|
14
14
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Application, Endpoints, Group, Person, Service } from "../type-
|
|
6
|
+
import { Activity, Application, Endpoints, Group, Person, Service } from "../type-DU-RPSMO.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import "../actor-
|
|
12
|
-
import "../key-
|
|
13
|
-
import { verifyRequest } from "../http-
|
|
14
|
-
import { doesActorOwnKey } from "../owner-
|
|
15
|
-
import { extractInboxes, sendActivity } from "../send-
|
|
16
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import "../lookup-B-EEAtwq.js";
|
|
11
|
+
import "../actor-BCukVzp-.js";
|
|
12
|
+
import "../key-BZiHUrf8.js";
|
|
13
|
+
import { verifyRequest } from "../http-DPg64hTf.js";
|
|
14
|
+
import { doesActorOwnKey } from "../owner-DpZiDAhr.js";
|
|
15
|
+
import { extractInboxes, sendActivity } from "../send-2WzIPXiW.js";
|
|
16
|
+
import { mockDocumentLoader, test } from "../testing-ComQ9GbD.js";
|
|
17
17
|
import "../std__assert-BQdmxyzF.js";
|
|
18
18
|
import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
|
|
19
19
|
import "../assert_is_error-CeVBLPsZ.js";
|
|
20
20
|
import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
|
|
21
21
|
import "../assert_throws-CqMKbTh_.js";
|
|
22
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
|
23
|
-
import { esm_default } from "../esm-
|
|
22
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-BL1g5NWr.js";
|
|
23
|
+
import { esm_default } from "../esm-DT1-az0c.js";
|
|
24
24
|
|
|
25
25
|
//#region federation/send.test.ts
|
|
26
26
|
test("extractInboxes()", () => {
|
|
@@ -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-BMRaF5NC.js";
|
|
6
|
+
import { CryptographicKey } from "./actor-DC235gSh.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-C1k9g9T1.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,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, deno_default } from "./type-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { CryptographicKey, deno_default } from "./type-DU-RPSMO.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BZiHUrf8.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, deno_default, getTypeId } from "./type-
|
|
6
|
+
import { Activity, deno_default, getTypeId } from "./type-DU-RPSMO.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "./docloader-
|
|
6
|
-
import "./actor-
|
|
7
|
-
import "./lookup-
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
|
5
|
+
import "./docloader-BMRaF5NC.js";
|
|
6
|
+
import "./actor-DC235gSh.js";
|
|
7
|
+
import "./lookup-Dlo9RnfH.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-C1k9g9T1.js";
|
|
9
9
|
|
|
10
10
|
export { validateCryptoKey };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-
|
|
7
|
-
import { isActor } from "./actor-
|
|
6
|
+
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-DU-RPSMO.js";
|
|
7
|
+
import { isActor } from "./actor-BCukVzp-.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|
|
@@ -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, getDocumentLoader } from "./docloader-
|
|
6
|
-
import { CryptographicKey, Object as Object$1, isActor } from "./actor-
|
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-BMRaF5NC.js";
|
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-DC235gSh.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "./type-
|
|
7
|
-
import "./actor-
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
|
6
|
+
import "./type-DU-RPSMO.js";
|
|
7
|
+
import "./actor-BCukVzp-.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-BZiHUrf8.js";
|
|
9
9
|
|
|
10
10
|
export { validateCryptoKey };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey } from "./type-
|
|
6
|
+
import { CryptographicKey, Multikey } from "./type-DU-RPSMO.js";
|
|
7
7
|
|
|
8
8
|
//#region 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, importSpki } from "./type-
|
|
6
|
+
import { CryptographicKey, Multikey, importSpki } from "./type-DU-RPSMO.js";
|
|
7
7
|
|
|
8
8
|
//#region testing/keys.ts
|
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|