@fedify/fedify 2.0.0-dev.1593 → 2.0.0-dev.1641
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-CP03csrm.cjs +37786 -0
- package/dist/actor-DMgu-ZjT.d.cts +128 -0
- package/dist/{actor-DNwcqwPT.js → actor-DU511yTk.js} +200 -200
- package/dist/{actor-Bj1Vq2XG.js → actor-DVpsNXhn.js} +1 -1
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-7UF4R_Qs.js} +1 -1
- package/dist/{assert_throws-BOO88avQ.js → assert_throws-53_pKeP3.js} +1 -1
- package/dist/{authdocloader-DJtdyVPc.js → authdocloader-BkIZCKQv.js} +3 -3
- package/dist/authdocloader-BnsFSERg.cjs +58 -0
- package/dist/{authdocloader-qkvj_KZY.js → authdocloader-DCgMyo82.js} +6 -6
- package/dist/{builder-BgzJcrpt.js → builder-E2Icrl_a.js} +4 -4
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/{client-CpxFv8ft.js → client-BW4V0OJx.js} +3 -22
- package/dist/client-CegPX0Rn.d.cts +222 -0
- package/dist/{client-DF8anIB5.d.ts → client-bgSdkFa2.d.ts} +2 -74
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +13 -0
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +19 -20
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/{context-9gCpIkiz.d.ts → context-CDSZdQHD.d.ts} +1 -1
- package/dist/context-Dq8aCtMH.d.cts +2255 -0
- package/dist/{docloader-9_osWaaH.js → docloader-BtqIh1OE.js} +188 -8
- package/dist/docloader-D-MrRyHl.d.cts +219 -0
- package/dist/docloader-kae6M-GI.cjs +4861 -0
- package/dist/{esm-5nsZYnVB.js → esm-mtx3XJAD.js} +1 -1
- package/dist/federation/builder.test.js +11 -12
- package/dist/federation/collection.test.js +9 -9
- package/dist/federation/handler.test.js +25 -26
- package/dist/federation/inbox.test.js +6 -6
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +9 -8
- package/dist/federation/middleware.test.js +29 -44
- package/dist/federation/mod.cjs +29 -0
- package/dist/federation/mod.d.cts +13 -0
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +15 -15
- package/dist/federation/mq.test.js +10 -10
- package/dist/federation/retry.test.js +5 -5
- package/dist/federation/router.test.js +8 -8
- package/dist/federation/send.test.js +15 -15
- package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
- package/dist/federation-H2_En3j5.cjs +244 -0
- package/dist/http-BS6766zs.d.cts +253 -0
- package/dist/{http-BqklewFY.js → http-C7uYFcBo.js} +6 -6
- package/dist/{http-CQulyTuw.js → http-Cox5GsED.js} +2 -2
- package/dist/http-ZhcoaYEa.cjs +826 -0
- package/dist/{inbox-B97Wrppe.js → inbox-BDdRbWNI.js} +1 -1
- package/dist/key-B9Z5ZuX9.js +10 -0
- package/dist/{key-CNCeen0u.js → key-Cc0JlcKe.js} +5 -5
- package/dist/{key-D-s3dQbK.js → key-CfiBDu3o.js} +2 -2
- package/dist/{key-C3CEOTh7.js → key-CgwCzDC4.js} +3 -3
- package/dist/key-D-7DPHNl.cjs +10 -0
- package/dist/key-HqzOCwDc.cjs +290 -0
- package/dist/{keycache-Br0-hsD5.js → keycache-CVBjz3xi.js} +1 -1
- package/dist/{keys-DSk2aqlj.js → keys-CBKbYaJA.js} +1 -1
- package/dist/kv-63Cil1MD.d.cts +81 -0
- package/dist/{ld-CYUQO1l4.js → ld-CxgmnSO3.js} +2 -2
- package/dist/{lookup-CnJK1NUl.js → lookup-CiU3QxQz.js} +1 -1
- package/dist/{lookup-BNFlahf3.js → lookup-NuT9cCSl.js} +4 -4
- package/dist/lookup-QHjmy4Og.cjs +137 -0
- package/dist/middleware-BHboQ4BE.js +25 -0
- package/dist/middleware-Bp3I9z8r.js +17 -0
- package/dist/{middleware-CovCqg8w.js → middleware-ByPnvMMS.js} +30 -30
- package/dist/{middleware-tfSiCl9w.js → middleware-DXidHY4N.js} +28 -28
- package/dist/middleware-LyCG_YVM.cjs +4235 -0
- package/dist/middleware-oYqSU5ky.cjs +17 -0
- package/dist/mod-BClfg3ej.d.cts +266 -0
- package/dist/mod-BhMnAkFX.d.cts +80 -0
- package/dist/mod-C2tOeRkN.d.cts +1 -0
- package/dist/mod-Dc_-mf8s.d.cts +102 -0
- package/dist/mod-FZd39qVq.d.cts +1 -0
- package/dist/{mod-Bqxcp7eN.d.ts → mod-RI3-KvUI.d.ts} +1 -1
- package/dist/mod-evzlRVZq.d.cts +289 -0
- package/dist/mod-jQ4OODsl.d.cts +113 -0
- package/dist/mod.cjs +150 -0
- package/dist/mod.d.cts +17 -0
- package/dist/mod.d.ts +4 -4
- package/dist/mod.js +21 -21
- package/dist/mq-B7R1Q-M5.d.cts +140 -0
- package/dist/nodeinfo/client.test.js +32 -111
- package/dist/nodeinfo/handler.test.js +25 -26
- package/dist/nodeinfo/mod.cjs +11 -0
- package/dist/nodeinfo/mod.d.cts +5 -0
- package/dist/nodeinfo/mod.d.ts +2 -2
- package/dist/nodeinfo/mod.js +7 -7
- package/dist/nodeinfo/types.test.js +10 -15
- package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
- package/dist/nodeinfo-DfycQ8Wf.js +4 -0
- package/dist/owner-B-7Ptt_m.d.cts +67 -0
- package/dist/{owner-CBeUJR68.js → owner-Cxob5_PK.js} +2 -2
- package/dist/proof-2Gcor0_N.cjs +673 -0
- package/dist/{proof-CHQnDg0z.js → proof-BiSQNUmQ.js} +2 -2
- package/dist/{proof-D436ezTT.js → proof-DkxwMaWE.js} +6 -6
- package/dist/runtime/authdocloader.test.js +14 -14
- package/dist/runtime/docloader.test.js +9 -9
- package/dist/runtime/key.test.js +10 -10
- package/dist/runtime/langstr.test.js +8 -8
- package/dist/runtime/link.test.js +61 -0
- 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 +8 -8
- package/dist/runtime/url.test.js +5 -5
- package/dist/runtime-C58AJWSv.cjs +4 -0
- package/dist/runtime-DPYEDf-o.js +4 -0
- package/dist/{send-Bc0QdRlp.js → send-DSEhWIYD.js} +2 -2
- package/dist/sig/http.test.js +13 -13
- package/dist/sig/key.test.js +11 -11
- package/dist/sig/ld.test.js +10 -10
- 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 +12 -12
- package/dist/sig/proof.test.js +12 -12
- package/dist/sig-ByHXzqUi.cjs +4 -0
- package/dist/sig-Cj3tk-ig.js +4 -0
- package/dist/testing/docloader.test.js +8 -8
- package/dist/testing/mod.d.ts +1 -28
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-D4xRiVJV.js → testing-ByQmUvf-.js} +2 -2
- package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
- package/dist/transformers-CoBS-oFG.cjs +116 -0
- package/dist/{type-qs0mWLTm.js → type-B4NJkfVg.js} +381 -201
- package/dist/{types-BIgY6c-l.js → types-BSuWJsOm.js} +1 -3
- package/dist/types-Bqt2EgP0.cjs +315 -0
- package/dist/{types-RbpvCErq.js → types-l2uh_ZhP.js} +8 -169
- package/dist/vocab/actor.test.js +10 -10
- package/dist/vocab/lookup.test.js +9 -9
- 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 +45 -10
- package/dist/vocab-B0-5a8pw.cjs +282 -0
- package/dist/vocab-DJTYMqyU.d.cts +14632 -0
- package/dist/{vocab-r-I1_ZmK.js → vocab-lBFcVxVF.js} +6 -6
- package/dist/webfinger/handler.test.js +24 -25
- package/dist/webfinger/lookup.test.js +9 -9
- 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 +8 -8
- package/dist/x/hono.cjs +61 -0
- package/dist/x/hono.d.cts +54 -0
- package/dist/x/hono.d.ts +2 -2
- 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.d.ts +2 -2
- package/dist/x/sveltekit.js +3 -3
- package/package.json +68 -13
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/key-3jGPh5To.js +0 -10
- package/dist/middleware-CJbNYdw9.js +0 -17
- package/dist/middleware-zDdNBo-m.js +0 -26
- package/dist/nodeinfo/semver.test.js +0 -143
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/semver-dArNLkR9.js +0 -149
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/webfinger-C3GIyXIg.js +0 -4
- /package/dist/{assert_is_error-BPGph1Jx.js → assert_is_error-B035L3om.js} +0 -0
- /package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals-C80BG-_5.js} +0 -0
- /package/dist/{collection-CSzG2j1P.js → collection-CcnIw1qY.js} +0 -0
- /package/dist/{denokv-Bv33Xxea.js → denokv-jZ0Z2h0M.js} +0 -0
- /package/dist/{retry-D4GJ670a.js → retry-CfF8Gn4d.js} +0 -0
- /package/dist/{nodeinfo/semver.test.d.ts → runtime/link.test.d.ts} +0 -0
- /package/dist/{std__assert-X-_kMxKM.js → std__assert-DWivtrGR.js} +0 -0
@@ -3,22 +3,22 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-
|
7
|
-
import { getNodeInfo } from "./client-
|
8
|
-
import { RouterError, lookupObject, traverseCollection } from "./lookup-
|
9
|
-
import { nodeInfoToJson } from "./types-
|
10
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
11
|
-
import { verifyRequest } from "./http-
|
12
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
13
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
14
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
15
|
-
import { signObject, verifyObject } from "./proof-
|
16
|
-
import { routeActivity } from "./inbox-
|
17
|
-
import { FederationBuilderImpl } from "./builder-
|
18
|
-
import { buildCollectionSynchronizationHeader } from "./collection-
|
19
|
-
import { KvKeyCache } from "./keycache-
|
20
|
-
import { createExponentialBackoffPolicy } from "./retry-
|
21
|
-
import { extractInboxes, sendActivity } from "./send-
|
6
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-B4NJkfVg.js";
|
7
|
+
import { getNodeInfo } from "./client-BW4V0OJx.js";
|
8
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-CiU3QxQz.js";
|
9
|
+
import { nodeInfoToJson } from "./types-BSuWJsOm.js";
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-CfiBDu3o.js";
|
11
|
+
import { verifyRequest } from "./http-Cox5GsED.js";
|
12
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-BkIZCKQv.js";
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-CxgmnSO3.js";
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-Cxob5_PK.js";
|
15
|
+
import { signObject, verifyObject } from "./proof-BiSQNUmQ.js";
|
16
|
+
import { routeActivity } from "./inbox-BDdRbWNI.js";
|
17
|
+
import { FederationBuilderImpl } from "./builder-E2Icrl_a.js";
|
18
|
+
import { buildCollectionSynchronizationHeader } from "./collection-CcnIw1qY.js";
|
19
|
+
import { KvKeyCache } from "./keycache-CVBjz3xi.js";
|
20
|
+
import { createExponentialBackoffPolicy } from "./retry-CfF8Gn4d.js";
|
21
|
+
import { extractInboxes, sendActivity } from "./send-DSEhWIYD.js";
|
22
22
|
import { getLogger, withContext } from "@logtape/logtape";
|
23
23
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
24
24
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
@@ -2537,15 +2537,16 @@ var ContextImpl = class ContextImpl {
|
|
2537
2537
|
"actor"
|
2538
2538
|
]);
|
2539
2539
|
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2543
|
-
})
|
2544
|
-
|
2545
|
-
|
2546
|
-
|
2540
|
+
let actorUri;
|
2541
|
+
try {
|
2542
|
+
actorUri = this.getActorUri(identifier);
|
2543
|
+
} catch (error) {
|
2544
|
+
if (error instanceof RouterError) {
|
2545
|
+
logger$2.warn(error.message);
|
2546
|
+
return [];
|
2547
|
+
}
|
2548
|
+
throw error;
|
2547
2549
|
}
|
2548
|
-
const actorUri = new URL(path, this.canonicalOrigin);
|
2549
2550
|
const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher(new ContextImpl({
|
2550
2551
|
...this,
|
2551
2552
|
invokedFromActorKeyPairsDispatcher: { identifier }
|
@@ -2706,12 +2707,11 @@ var ContextImpl = class ContextImpl {
|
|
2706
2707
|
if (identifier == null) throw new Error("If recipients is \"followers\", sender must be an actor identifier or username.");
|
2707
2708
|
expandedRecipients = [];
|
2708
2709
|
for await (const recipient of this.getFollowers(identifier)) expandedRecipients.push(recipient);
|
2709
|
-
if (options.syncCollection) {
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2713
|
-
|
2714
|
-
opts.collectionSync = collectionId == null ? void 0 : new URL(collectionId, this.canonicalOrigin).href;
|
2710
|
+
if (options.syncCollection) try {
|
2711
|
+
opts.collectionSync = this.getFollowersUri(identifier).href;
|
2712
|
+
} catch (error) {
|
2713
|
+
if (error instanceof RouterError) opts.collectionSync = void 0;
|
2714
|
+
else throw error;
|
2715
2715
|
}
|
2716
2716
|
} else expandedRecipients = [recipients];
|
2717
2717
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|
@@ -1,17 +1,17 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import { getDefaultActivityTransformers } from "./transformers-
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
7
|
-
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
9
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
10
|
-
import { doubleKnock, verifyRequest } from "./http-
|
11
|
-
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-
|
12
|
-
import { getNodeInfo, nodeInfoToJson } from "./types-
|
13
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
14
|
-
import { lookupObject, traverseCollection } from "./vocab-
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import { getDefaultActivityTransformers } from "./transformers-BFT6d7J5.js";
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-BtqIh1OE.js";
|
7
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-DU511yTk.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-NuT9cCSl.js";
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-Cc0JlcKe.js";
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-C7uYFcBo.js";
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-DkxwMaWE.js";
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-l2uh_ZhP.js";
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-DCgMyo82.js";
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-lBFcVxVF.js";
|
15
15
|
import { getLogger, withContext } from "@logtape/logtape";
|
16
16
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
17
17
|
import { encodeHex } from "byte-encodings/hex";
|
@@ -321,7 +321,7 @@ var FederationBuilderImpl = class {
|
|
321
321
|
this.collectionTypeIds = {};
|
322
322
|
}
|
323
323
|
async build(options) {
|
324
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
324
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-Bp3I9z8r.js");
|
325
325
|
const f = new FederationImpl$1(options);
|
326
326
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
327
327
|
f.router = this.router.clone();
|
@@ -3481,15 +3481,16 @@ var ContextImpl = class ContextImpl {
|
|
3481
3481
|
"actor"
|
3482
3482
|
]);
|
3483
3483
|
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
3484
|
-
|
3485
|
-
|
3486
|
-
|
3487
|
-
})
|
3488
|
-
|
3489
|
-
|
3490
|
-
|
3484
|
+
let actorUri;
|
3485
|
+
try {
|
3486
|
+
actorUri = this.getActorUri(identifier);
|
3487
|
+
} catch (error) {
|
3488
|
+
if (error instanceof RouterError) {
|
3489
|
+
logger$1.warn(error.message);
|
3490
|
+
return [];
|
3491
|
+
}
|
3492
|
+
throw error;
|
3491
3493
|
}
|
3492
|
-
const actorUri = new URL(path, this.canonicalOrigin);
|
3493
3494
|
const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher(new ContextImpl({
|
3494
3495
|
...this,
|
3495
3496
|
invokedFromActorKeyPairsDispatcher: { identifier }
|
@@ -3650,12 +3651,11 @@ var ContextImpl = class ContextImpl {
|
|
3650
3651
|
if (identifier == null) throw new Error("If recipients is \"followers\", sender must be an actor identifier or username.");
|
3651
3652
|
expandedRecipients = [];
|
3652
3653
|
for await (const recipient of this.getFollowers(identifier)) expandedRecipients.push(recipient);
|
3653
|
-
if (options.syncCollection) {
|
3654
|
-
|
3655
|
-
|
3656
|
-
|
3657
|
-
|
3658
|
-
opts.collectionSync = collectionId == null ? void 0 : new URL(collectionId, this.canonicalOrigin).href;
|
3654
|
+
if (options.syncCollection) try {
|
3655
|
+
opts.collectionSync = this.getFollowersUri(identifier).href;
|
3656
|
+
} catch (error) {
|
3657
|
+
if (error instanceof RouterError) opts.collectionSync = void 0;
|
3658
|
+
else throw error;
|
3659
3659
|
}
|
3660
3660
|
} else expandedRecipients = [recipients];
|
3661
3661
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|