@fedify/fedify 1.9.0-pr.428.1587 → 1.9.0-pr.431.1597
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-CHOM_AN3.d.cts +128 -0
- package/dist/actor-CfaqWvJb.cjs +37783 -0
- package/dist/{actor-CRWrH2fJ.js → actor-Detmisdi.js} +190 -190
- package/dist/{actor-BAyhNMtT.js → actor-Dw7av4Zk.js} +1 -1
- package/dist/{authdocloader-DuPcJhwz.js → authdocloader-5UJ5Gme-.js} +6 -6
- package/dist/authdocloader-BVYv0Ct8.cjs +58 -0
- package/dist/{authdocloader-C1iaSe2N.js → authdocloader-ZlLoXSxM.js} +3 -3
- package/dist/{builder-DLD2OVGE.js → builder-BbKfqPmR.js} +4 -4
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/{client-PZOCn5-Y.js → client-DgRjF0ha.js} +1 -1
- package/dist/client-DjT_tegg.d.cts +294 -0
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +13 -0
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +16 -16
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/context-KXVF2AhH.d.cts +2261 -0
- package/dist/{docloader-6Si9l3iy.js → docloader-BKf9RWX4.js} +4 -4
- package/dist/docloader-D-MrRyHl.d.cts +219 -0
- package/dist/docloader-eqgyMp7h.cjs +4682 -0
- package/dist/{esm-WCi84Tv_.js → esm-B_ZjJ1sB.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 +18 -18
- package/dist/federation/mod.cjs +29 -0
- package/dist/federation/mod.d.cts +13 -0
- package/dist/federation/mod.js +15 -15
- 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/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
- package/dist/federation-H2_En3j5.cjs +244 -0
- package/dist/http-B_zBcsai.d.cts +253 -0
- package/dist/{http-CFiUVZfi.js → http-C5XLveZw.js} +2 -2
- package/dist/{http-DEm-ammv.js → http-CwlUFNG4.js} +6 -6
- package/dist/http-_vjuGcXn.cjs +826 -0
- package/dist/{inbox-VMSM478g.js → inbox-sVXiVBbT.js} +1 -1
- package/dist/key-19P2dWvf.cjs +290 -0
- package/dist/{key-CdGoFWIl.js → key-BCWvPOkD.js} +5 -5
- package/dist/key-CsQ7J8-m.js +10 -0
- package/dist/key-Dt7qJaQT.cjs +10 -0
- package/dist/{key-LefgNv9I.js → key-Jrnr66vx.js} +2 -2
- package/dist/{key-D3__azaY.js → key-lpATOAE4.js} +3 -3
- package/dist/{keycache-9EJyq0-_.js → keycache-ogQInQck.js} +1 -1
- package/dist/{keys-Dn0SWAWf.js → keys-DcGsKtHW.js} +1 -1
- package/dist/kv-63Cil1MD.d.cts +81 -0
- package/dist/{ld-Dgthw_5_.js → ld-BSE4jnyK.js} +2 -2
- package/dist/lookup-D96ipStp.cjs +137 -0
- package/dist/{lookup-D0EUk78B.js → lookup-D_-F1hLw.js} +4 -4
- package/dist/{lookup-Bj_u3eYM.js → lookup-DdxOle8f.js} +1 -1
- package/dist/middleware-B0f850Ei.cjs +17 -0
- package/dist/middleware-B2DFqtJ-.cjs +4240 -0
- package/dist/middleware-COHAbwGs.js +17 -0
- package/dist/{middleware-dku9cdga.js → middleware-CuTcPjfP.js} +13 -13
- package/dist/middleware-Dt7C7qpw.js +26 -0
- package/dist/{middleware-CqVZVdeM.js → middleware-T_y4Bnvw.js} +14 -14
- package/dist/mod-C2tOeRkN.d.cts +1 -0
- package/dist/mod-C3CGxYoF.d.cts +102 -0
- package/dist/mod-COw_caPC.d.cts +266 -0
- package/dist/mod-FZd39qVq.d.cts +1 -0
- package/dist/mod-NKH_G-IY.d.cts +289 -0
- package/dist/mod-YfAcrVbP.d.cts +80 -0
- package/dist/mod-jQ4OODsl.d.cts +113 -0
- package/dist/mod.cjs +152 -0
- package/dist/mod.d.cts +17 -0
- package/dist/mod.js +20 -20
- package/dist/mq-B7R1Q-M5.d.cts +140 -0
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.cjs +13 -0
- package/dist/nodeinfo/mod.d.cts +5 -0
- package/dist/nodeinfo/mod.js +6 -6
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
- package/dist/nodeinfo-DfycQ8Wf.js +4 -0
- package/dist/owner-C9Ry0TOI.d.cts +67 -0
- package/dist/{owner-QgsLL0FU.js → owner-DJtc8evi.js} +2 -2
- package/dist/{proof-B4xoN40A.js → proof-9OMp0o4n.js} +2 -2
- package/dist/{proof-E_33BNCY.js → proof-BuPk23Er.js} +6 -6
- package/dist/proof-CRHppbRk.cjs +673 -0
- 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.cjs +25 -0
- package/dist/runtime/mod.d.cts +6 -0
- package/dist/runtime/mod.js +10 -10
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/runtime-C58AJWSv.cjs +4 -0
- package/dist/runtime-DPYEDf-o.js +4 -0
- package/dist/{send-ByaKiMsV.js → send-cXerEJm9.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.cjs +30 -0
- package/dist/sig/mod.d.cts +8 -0
- package/dist/sig/mod.js +10 -10
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/sig-ByHXzqUi.cjs +4 -0
- package/dist/sig-Cj3tk-ig.js +4 -0
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-DK6Jj8Bp.js → testing-BX6IA3LR.js} +2 -2
- package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
- package/dist/transformers-CoBS-oFG.cjs +116 -0
- package/dist/{type-CKxYS9Sh.js → type-DF9yoIpt.js} +186 -186
- package/dist/types-DcKQIzdO.cjs +488 -0
- package/dist/{types-DNXXKtNN.js → types-Q17QxOOC.js} +4 -4
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.cjs +87 -0
- package/dist/vocab/mod.d.cts +6 -0
- package/dist/vocab/mod.js +7 -7
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-BXEmH50Y.js → vocab-BUc_4ZsW.js} +6 -6
- package/dist/vocab-BzGg7ltX.d.cts +14629 -0
- package/dist/vocab-Du8FV6H1.cjs +282 -0
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.cjs +9 -0
- package/dist/webfinger/mod.d.cts +4 -0
- package/dist/webfinger/mod.js +6 -6
- package/dist/webfinger-BjOEdFPs.cjs +4 -0
- package/dist/webfinger-De_bU0iE.js +4 -0
- package/dist/x/cfworkers.cjs +100 -0
- package/dist/x/cfworkers.d.cts +59 -0
- package/dist/x/cfworkers.js +3 -3
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.cjs +61 -0
- package/dist/x/hono.d.cts +54 -0
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.cjs +69 -0
- package/dist/x/sveltekit.d.cts +46 -0
- package/dist/x/sveltekit.js +3 -3
- package/package.json +68 -12
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/key-CiJCx5-9.js +0 -10
- package/dist/middleware-1wWyj5B6.js +0 -26
- package/dist/middleware-BxSWANLr.js +0 -17
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/webfinger-C3GIyXIg.js +0 -4
@@ -3,23 +3,23 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { UrlError } from "../type-
|
6
|
+
import { UrlError } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../lookup-
|
11
|
-
import "../actor-
|
12
|
-
import "../key-
|
13
|
-
import { verifyRequest } from "../http-
|
14
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
15
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../lookup-DdxOle8f.js";
|
11
|
+
import "../actor-Dw7av4Zk.js";
|
12
|
+
import "../key-Jrnr66vx.js";
|
13
|
+
import { verifyRequest } from "../http-C5XLveZw.js";
|
14
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-ZlLoXSxM.js";
|
15
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
16
16
|
import "../std__assert-X-_kMxKM.js";
|
17
17
|
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
18
18
|
import "../assert_is_error-BPGph1Jx.js";
|
19
19
|
import "../assert_not_equals-f3m3epl3.js";
|
20
20
|
import "../assert_throws-BOO88avQ.js";
|
21
|
-
import { rsaPrivateKey2 } from "../keys-
|
22
|
-
import { esm_default } from "../esm-
|
21
|
+
import { rsaPrivateKey2 } from "../keys-DcGsKtHW.js";
|
22
|
+
import { esm_default } from "../esm-B_ZjJ1sB.js";
|
23
23
|
|
24
24
|
//#region src/runtime/authdocloader.test.ts
|
25
25
|
test("getAuthenticatedDocumentLoader()", async (t) => {
|
@@ -3,19 +3,19 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { FetchError, UrlError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../type-
|
6
|
+
import { FetchError, UrlError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
10
|
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
11
|
-
import "../lookup-
|
12
|
-
import { mockDocumentLoader, test } from "../testing-
|
11
|
+
import "../lookup-DdxOle8f.js";
|
12
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
13
13
|
import "../std__assert-X-_kMxKM.js";
|
14
14
|
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
15
15
|
import "../assert_is_error-BPGph1Jx.js";
|
16
16
|
import "../assert_not_equals-f3m3epl3.js";
|
17
17
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
18
|
-
import { esm_default } from "../esm-
|
18
|
+
import { esm_default } from "../esm-B_ZjJ1sB.js";
|
19
19
|
import process from "node:process";
|
20
20
|
|
21
21
|
//#region src/runtime/docloader.test.ts
|
package/dist/runtime/key.test.js
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../type-
|
6
|
+
import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../lookup-
|
11
|
-
import "../actor-
|
12
|
-
import { exportJwk, importJwk } from "../key-
|
13
|
-
import { test } from "../testing-
|
10
|
+
import "../lookup-DdxOle8f.js";
|
11
|
+
import "../actor-Dw7av4Zk.js";
|
12
|
+
import { exportJwk, importJwk } from "../key-Jrnr66vx.js";
|
13
|
+
import { test } from "../testing-BX6IA3LR.js";
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
15
15
|
import "../assert_rejects-DiIiJbZn.js";
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|
@@ -3,12 +3,12 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { LanguageString } from "../type-
|
6
|
+
import { LanguageString } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../lookup-
|
11
|
-
import { test } from "../testing-
|
10
|
+
import "../lookup-DdxOle8f.js";
|
11
|
+
import { test } from "../testing-BX6IA3LR.js";
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
13
13
|
import "../assert_rejects-DiIiJbZn.js";
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
4
|
+
|
5
|
+
const require_docloader = require('../docloader-eqgyMp7h.cjs');
|
6
|
+
const require_actor = require('../actor-CfaqWvJb.cjs');
|
7
|
+
require('../lookup-D96ipStp.cjs');
|
8
|
+
require('../key-19P2dWvf.cjs');
|
9
|
+
require('../http-_vjuGcXn.cjs');
|
10
|
+
const require_authdocloader = require('../authdocloader-BVYv0Ct8.cjs');
|
11
|
+
require('../runtime-C58AJWSv.cjs');
|
12
|
+
|
13
|
+
exports.FetchError = require_docloader.FetchError;
|
14
|
+
exports.LanguageString = require_actor.LanguageString;
|
15
|
+
exports.exportMultibaseKey = require_actor.exportMultibaseKey;
|
16
|
+
exports.exportSpki = require_actor.exportSpki;
|
17
|
+
exports.fetchDocumentLoader = require_docloader.fetchDocumentLoader;
|
18
|
+
exports.getAuthenticatedDocumentLoader = require_authdocloader.getAuthenticatedDocumentLoader;
|
19
|
+
exports.getDocumentLoader = require_docloader.getDocumentLoader;
|
20
|
+
exports.getUserAgent = require_docloader.getUserAgent;
|
21
|
+
exports.importMultibaseKey = require_actor.importMultibaseKey;
|
22
|
+
exports.importPem = require_actor.importPem;
|
23
|
+
exports.importPkcs1 = require_actor.importPkcs1;
|
24
|
+
exports.importSpki = require_actor.importSpki;
|
25
|
+
exports.kvCache = require_docloader.kvCache;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import "../kv-63Cil1MD.cjs";
|
2
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-D-MrRyHl.cjs";
|
3
|
+
import { LanguageString } from "../vocab-BzGg7ltX.cjs";
|
4
|
+
import "../http-B_zBcsai.cjs";
|
5
|
+
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "../mod-C3CGxYoF.cjs";
|
6
|
+
export { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, LanguageString, RemoteDocument, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
|
package/dist/runtime/mod.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-
|
6
|
-
import { LanguageString, exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../actor-
|
7
|
-
import "../lookup-
|
8
|
-
import "../key-
|
9
|
-
import "../http-
|
10
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
11
|
-
import "../runtime-
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-BKf9RWX4.js";
|
6
|
+
import { LanguageString, exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../actor-Detmisdi.js";
|
7
|
+
import "../lookup-D_-F1hLw.js";
|
8
|
+
import "../key-BCWvPOkD.js";
|
9
|
+
import "../http-CwlUFNG4.js";
|
10
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-5UJ5Gme-.js";
|
11
|
+
import "../runtime-DPYEDf-o.js";
|
12
12
|
|
13
13
|
export { FetchError, LanguageString, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
|
@@ -3,12 +3,12 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { codes, decode, decodeText, encode, encodeText, names } from "../../type-
|
6
|
+
import { codes, decode, decodeText, encode, encodeText, names } from "../../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../../assert-MZs1qjMx.js";
|
9
9
|
import "../../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../../lookup-
|
11
|
-
import { test } from "../../testing-
|
10
|
+
import "../../lookup-DdxOle8f.js";
|
11
|
+
import { test } from "../../testing-BX6IA3LR.js";
|
12
12
|
import "../../std__assert-X-_kMxKM.js";
|
13
13
|
import "../../assert_rejects-DiIiJbZn.js";
|
14
14
|
import "../../assert_is_error-BPGph1Jx.js";
|
package/dist/runtime/url.test.js
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { UrlError, expandIPv6Address, isValidPublicIPv4Address, isValidPublicIPv6Address, validatePublicUrl } from "../type-
|
6
|
+
import { UrlError, expandIPv6Address, isValidPublicIPv4Address, isValidPublicIPv6Address, validatePublicUrl } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
9
|
-
import "../lookup-
|
10
|
-
import { test } from "../testing-
|
9
|
+
import "../lookup-DdxOle8f.js";
|
10
|
+
import { test } from "../testing-BX6IA3LR.js";
|
11
11
|
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
12
12
|
import "../assert_is_error-BPGph1Jx.js";
|
13
13
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./type-
|
7
|
-
import { doubleKnock } from "./http-
|
6
|
+
import { deno_default } from "./type-DF9yoIpt.js";
|
7
|
+
import { doubleKnock } from "./http-C5XLveZw.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
|
package/dist/sig/http.test.js
CHANGED
@@ -3,22 +3,22 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { exportSpki } from "../type-
|
6
|
+
import { exportSpki } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../lookup-
|
11
|
-
import "../actor-
|
12
|
-
import { exportJwk } from "../key-
|
13
|
-
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-
|
14
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../lookup-DdxOle8f.js";
|
11
|
+
import "../actor-Dw7av4Zk.js";
|
12
|
+
import { exportJwk } from "../key-Jrnr66vx.js";
|
13
|
+
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-C5XLveZw.js";
|
14
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
15
15
|
import { assertExists, assertStringIncludes } from "../std__assert-X-_kMxKM.js";
|
16
16
|
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
17
17
|
import "../assert_is_error-BPGph1Jx.js";
|
18
18
|
import "../assert_not_equals-f3m3epl3.js";
|
19
19
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
20
|
-
import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-
|
21
|
-
import { esm_default } from "../esm-
|
20
|
+
import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-DcGsKtHW.js";
|
21
|
+
import { esm_default } from "../esm-B_ZjJ1sB.js";
|
22
22
|
import { encodeBase64 } from "byte-encodings/base64";
|
23
23
|
|
24
24
|
//#region src/sig/http.test.ts
|
package/dist/sig/key.test.js
CHANGED
@@ -3,20 +3,20 @@
|
|
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-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../lookup-
|
11
|
-
import "../actor-
|
12
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-
|
13
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../lookup-DdxOle8f.js";
|
11
|
+
import "../actor-Dw7av4Zk.js";
|
12
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-Jrnr66vx.js";
|
13
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
15
15
|
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|
17
17
|
import "../assert_not_equals-f3m3epl3.js";
|
18
18
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
19
|
-
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
19
|
+
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-DcGsKtHW.js";
|
20
20
|
|
21
21
|
//#region src/sig/key.test.ts
|
22
22
|
test("validateCryptoKey()", async () => {
|
package/dist/sig/ld.test.js
CHANGED
@@ -3,18 +3,18 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey } from "../type-
|
6
|
+
import { CryptographicKey } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
9
|
-
import "../lookup-
|
10
|
-
import "../actor-
|
11
|
-
import { generateCryptoKeyPair } from "../key-
|
12
|
-
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-
|
13
|
-
import { mockDocumentLoader, test } from "../testing-
|
9
|
+
import "../lookup-DdxOle8f.js";
|
10
|
+
import "../actor-Dw7av4Zk.js";
|
11
|
+
import { generateCryptoKeyPair } from "../key-Jrnr66vx.js";
|
12
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-BSE4jnyK.js";
|
13
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
14
14
|
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
15
15
|
import "../assert_is_error-BPGph1Jx.js";
|
16
16
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
17
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
17
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-DcGsKtHW.js";
|
18
18
|
import { encodeBase64 } from "byte-encodings/base64";
|
19
19
|
|
20
20
|
//#region src/sig/ld.test.ts
|
package/dist/sig/mod.cjs
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
4
|
+
|
5
|
+
require('../docloader-eqgyMp7h.cjs');
|
6
|
+
require('../actor-CfaqWvJb.cjs');
|
7
|
+
require('../lookup-D96ipStp.cjs');
|
8
|
+
const require_key = require('../key-19P2dWvf.cjs');
|
9
|
+
const require_http = require('../http-_vjuGcXn.cjs');
|
10
|
+
const require_proof = require('../proof-CRHppbRk.cjs');
|
11
|
+
require('../sig-ByHXzqUi.cjs');
|
12
|
+
|
13
|
+
exports.attachSignature = require_proof.attachSignature;
|
14
|
+
exports.createProof = require_proof.createProof;
|
15
|
+
exports.createSignature = require_proof.createSignature;
|
16
|
+
exports.detachSignature = require_proof.detachSignature;
|
17
|
+
exports.doesActorOwnKey = require_proof.doesActorOwnKey;
|
18
|
+
exports.exportJwk = require_key.exportJwk;
|
19
|
+
exports.fetchKey = require_key.fetchKey;
|
20
|
+
exports.generateCryptoKeyPair = require_key.generateCryptoKeyPair;
|
21
|
+
exports.getKeyOwner = require_proof.getKeyOwner;
|
22
|
+
exports.importJwk = require_key.importJwk;
|
23
|
+
exports.signJsonLd = require_proof.signJsonLd;
|
24
|
+
exports.signObject = require_proof.signObject;
|
25
|
+
exports.signRequest = require_http.signRequest;
|
26
|
+
exports.verifyJsonLd = require_proof.verifyJsonLd;
|
27
|
+
exports.verifyObject = require_proof.verifyObject;
|
28
|
+
exports.verifyProof = require_proof.verifyProof;
|
29
|
+
exports.verifyRequest = require_http.verifyRequest;
|
30
|
+
exports.verifySignature = require_proof.verifySignature;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import "../kv-63Cil1MD.cjs";
|
2
|
+
import "../docloader-D-MrRyHl.cjs";
|
3
|
+
import "../vocab-BzGg7ltX.cjs";
|
4
|
+
import "../actor-CHOM_AN3.cjs";
|
5
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-B_zBcsai.cjs";
|
6
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "../owner-C9Ry0TOI.cjs";
|
7
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-COw_caPC.cjs";
|
8
|
+
export { CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyOptions, FetchKeyResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/mod.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import "../docloader-
|
6
|
-
import "../actor-
|
7
|
-
import "../lookup-
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "../key-
|
9
|
-
import { signRequest, verifyRequest } from "../http-
|
10
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-
|
11
|
-
import "../sig-
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import "../docloader-BKf9RWX4.js";
|
6
|
+
import "../actor-Detmisdi.js";
|
7
|
+
import "../lookup-D_-F1hLw.js";
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "../key-BCWvPOkD.js";
|
9
|
+
import { signRequest, verifyRequest } from "../http-CwlUFNG4.js";
|
10
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-BuPk23Er.js";
|
11
|
+
import "../sig-Cj3tk-ig.js";
|
12
12
|
|
13
13
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/owner.test.js
CHANGED
@@ -3,21 +3,21 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Create } from "../type-
|
6
|
+
import { Create } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import { lookupObject } from "../lookup-
|
11
|
-
import "../actor-
|
12
|
-
import "../key-
|
13
|
-
import { doesActorOwnKey, getKeyOwner } from "../owner-
|
14
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import { lookupObject } from "../lookup-DdxOle8f.js";
|
11
|
+
import "../actor-Dw7av4Zk.js";
|
12
|
+
import "../key-Jrnr66vx.js";
|
13
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-DJtc8evi.js";
|
14
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
15
15
|
import "../std__assert-X-_kMxKM.js";
|
16
16
|
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
17
17
|
import "../assert_is_error-BPGph1Jx.js";
|
18
18
|
import "../assert_not_equals-f3m3epl3.js";
|
19
19
|
import "../assert_throws-BOO88avQ.js";
|
20
|
-
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-
|
20
|
+
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-DcGsKtHW.js";
|
21
21
|
|
22
22
|
//#region src/sig/owner.test.ts
|
23
23
|
test("doesActorOwnKey()", async () => {
|
package/dist/sig/proof.test.js
CHANGED
@@ -3,21 +3,21 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Create, DataIntegrityProof, Multikey, Note, Place, decode, importMultibaseKey } from "../type-
|
6
|
+
import { Create, DataIntegrityProof, Multikey, Note, Place, decode, importMultibaseKey } from "../type-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../lookup-
|
11
|
-
import "../actor-
|
12
|
-
import "../key-
|
13
|
-
import { createProof, signObject, verifyObject, verifyProof } from "../proof-
|
14
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../lookup-DdxOle8f.js";
|
11
|
+
import "../actor-Dw7av4Zk.js";
|
12
|
+
import "../key-Jrnr66vx.js";
|
13
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-9OMp0o4n.js";
|
14
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
15
15
|
import "../std__assert-X-_kMxKM.js";
|
16
16
|
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
17
17
|
import "../assert_is_error-BPGph1Jx.js";
|
18
18
|
import "../assert_not_equals-f3m3epl3.js";
|
19
19
|
import "../assert_throws-BOO88avQ.js";
|
20
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
20
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-DcGsKtHW.js";
|
21
21
|
import { decodeHex, encodeHex } from "byte-encodings/hex";
|
22
22
|
|
23
23
|
//#region src/sig/proof.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-DF9yoIpt.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../lookup-
|
11
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../lookup-DdxOle8f.js";
|
11
|
+
import { mockDocumentLoader, test } from "../testing-BX6IA3LR.js";
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
13
13
|
import "../assert_rejects-DiIiJbZn.js";
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
package/dist/testing/mod.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
7
|
-
import "../lookup-
|
8
|
-
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-
|
6
|
+
import "../type-DF9yoIpt.js";
|
7
|
+
import "../lookup-DdxOle8f.js";
|
8
|
+
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-BX6IA3LR.js";
|
9
9
|
|
10
10
|
export { createInboxContext, createRequestContext, test, testDefinitions };
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { __require, lookupWebFinger } from "./type-
|
7
|
-
import { RouterError, lookupObject, traverseCollection } from "./lookup-
|
6
|
+
import { __require, lookupWebFinger } from "./type-DF9yoIpt.js";
|
7
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-DdxOle8f.js";
|
8
8
|
import { configure, getConsoleSink, getLogger, reset } from "@logtape/logtape";
|
9
9
|
import { trace } from "@opentelemetry/api";
|
10
10
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
6
6
|
|
7
7
|
//#region src/compat/transformers.ts
|
@@ -0,0 +1,116 @@
|
|
1
|
+
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
4
|
+
|
5
|
+
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
6
|
+
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
7
|
+
|
8
|
+
//#region src/compat/transformers.ts
|
9
|
+
const logger = (0, __logtape_logtape.getLogger)([
|
10
|
+
"fedify",
|
11
|
+
"compat",
|
12
|
+
"transformers"
|
13
|
+
]);
|
14
|
+
/**
|
15
|
+
* An activity transformer that assigns a new random ID to an activity if it
|
16
|
+
* does not already have one. This is useful for ensuring that activities
|
17
|
+
* have an ID before they are sent to other servers.
|
18
|
+
*
|
19
|
+
* The generated ID is an origin URI with a fragment which contains an activity
|
20
|
+
* type name with a random UUID:
|
21
|
+
*
|
22
|
+
* ```
|
23
|
+
* https://example.com/#Follow/12345678-1234-5678-1234-567812345678
|
24
|
+
* ```
|
25
|
+
*
|
26
|
+
* @template TContextData The type of the context data.
|
27
|
+
* @param activity The activity to assign an ID to.
|
28
|
+
* @param context The context of the activity.
|
29
|
+
* @return The activity with an ID assigned.
|
30
|
+
* @since 1.4.0
|
31
|
+
*/
|
32
|
+
function autoIdAssigner(activity, context) {
|
33
|
+
if (activity.id != null) return activity;
|
34
|
+
const id = new URL(`/#${activity.constructor.name}/${crypto.randomUUID()}`, context.origin);
|
35
|
+
logger.warn("As the activity to send does not have an id, a new id {id} has been generated for it. However, it is recommended to explicitly set the id for the activity.", { id: id.href });
|
36
|
+
return activity.clone({ id });
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* An activity transformer that dehydrates the actor property of an activity
|
40
|
+
* so that it only contains the actor's URI. For example, suppose we have an
|
41
|
+
* activity like this:
|
42
|
+
*
|
43
|
+
* ```typescript
|
44
|
+
* import { Follow, Person } from "@fedify/fedify/vocab";
|
45
|
+
* const input = new Follow({
|
46
|
+
* id: new URL("http://example.com/activities/1"),
|
47
|
+
* actor: new Person({
|
48
|
+
* id: new URL("http://example.com/actors/1"),
|
49
|
+
* name: "Alice",
|
50
|
+
* preferredUsername: "alice",
|
51
|
+
* }),
|
52
|
+
* object: new Person({
|
53
|
+
* id: new URL("http://example.com/actors/2"),
|
54
|
+
* name: "Bob",
|
55
|
+
* preferredUsername: "bob",
|
56
|
+
* }),
|
57
|
+
* });
|
58
|
+
* ```
|
59
|
+
*
|
60
|
+
* The result of applying this transformer would be:
|
61
|
+
*
|
62
|
+
* ```typescript
|
63
|
+
* import { Follow, Person } from "@fedify/fedify/vocab";
|
64
|
+
* const output = new Follow({
|
65
|
+
* id: new URL("http://example.com/activities/1"),
|
66
|
+
* actor: new URL("http://example.com/actors/1"),
|
67
|
+
* object: new Person({
|
68
|
+
* id: new URL("http://example.com/actors/2"),
|
69
|
+
* name: "Bob",
|
70
|
+
* preferredUsername: "bob",
|
71
|
+
* }),
|
72
|
+
* });
|
73
|
+
* ```
|
74
|
+
*
|
75
|
+
* As some ActivityPub implementations like Threads fail to deal with inlined
|
76
|
+
* actor objects, this transformer can be used to work around this issue.
|
77
|
+
* @template TContextData The type of the context data.
|
78
|
+
* @param activity The activity to dehydrate the actor property of.
|
79
|
+
* @param context The context of the activity.
|
80
|
+
* @returns The dehydrated activity.
|
81
|
+
* @since 1.4.0
|
82
|
+
*/
|
83
|
+
function actorDehydrator(activity, _context) {
|
84
|
+
if (activity.actorIds.length < 1) return activity;
|
85
|
+
return activity.clone({ actors: activity.actorIds });
|
86
|
+
}
|
87
|
+
/**
|
88
|
+
* Gets the default activity transformers that are applied to all outgoing
|
89
|
+
* activities.
|
90
|
+
* @template TContextData The type of the context data.
|
91
|
+
* @returns The default activity transformers.
|
92
|
+
* @since 1.4.0
|
93
|
+
*/
|
94
|
+
function getDefaultActivityTransformers() {
|
95
|
+
return [autoIdAssigner, actorDehydrator];
|
96
|
+
}
|
97
|
+
|
98
|
+
//#endregion
|
99
|
+
Object.defineProperty(exports, 'actorDehydrator', {
|
100
|
+
enumerable: true,
|
101
|
+
get: function () {
|
102
|
+
return actorDehydrator;
|
103
|
+
}
|
104
|
+
});
|
105
|
+
Object.defineProperty(exports, 'autoIdAssigner', {
|
106
|
+
enumerable: true,
|
107
|
+
get: function () {
|
108
|
+
return autoIdAssigner;
|
109
|
+
}
|
110
|
+
});
|
111
|
+
Object.defineProperty(exports, 'getDefaultActivityTransformers', {
|
112
|
+
enumerable: true,
|
113
|
+
get: function () {
|
114
|
+
return getDefaultActivityTransformers;
|
115
|
+
}
|
116
|
+
});
|