@fedify/fedify 1.8.1-dev.1238 → 1.8.1-dev.1247
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-DaTsedck.js → actor-ADXyw5yl.js} +189 -189
- package/dist/{actor-GxEA8yUE.js → actor-CO8ypXcy.js} +2 -2
- package/dist/{actor-C2nhWp6O.d.ts → actor-CWNAGvnO.d.ts} +3 -3
- package/dist/{assert-MZs1qjMx.js → assert-DwEa6glZ.js} +2 -2
- package/dist/{assert_equals-DSbWqCm3.js → assert_equals-C5gKCm6A.js} +9 -9
- package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-C9QtN-X9.js} +2 -2
- package/dist/{assert_is_error-BPGph1Jx.js → assert_is_error-CeVBLPsZ.js} +2 -2
- package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals-D2R2nl5h.js} +2 -2
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-AjlKk-Vo.js} +4 -4
- package/dist/{assert_throws-BOO88avQ.js → assert_throws-CqMKbTh_.js} +3 -3
- package/dist/{authdocloader-DOfA0GoV.js → authdocloader-BR9TSGxd.js} +4 -4
- package/dist/{authdocloader-CqZ4q-rG.js → authdocloader-wvJw34FM.js} +4 -4
- package/dist/{builder-Dj8dCfIq.js → builder-DD6Zqqya.js} +5 -5
- package/dist/{client-D2tgjFk3.d.ts → client-B0IOer6B.d.ts} +4 -4
- package/dist/{client-pffPLnLM.js → client-DYRuaETr.js} +3 -3
- package/dist/{collection-CSzG2j1P.js → collection-D5V3UzU3.js} +1 -1
- package/dist/compat/mod.d.ts +12 -12
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +25 -25
- package/dist/{context-BBD2ZH_P.d.ts → context-BNA3vzcr.d.ts} +22 -22
- package/dist/{denokv-2x6-IpXO.js → denokv-DK9P5Jq7.js} +1 -1
- package/dist/{docloader-Bz56sKV5.d.ts → docloader-CLolPVL_.d.ts} +2 -2
- package/dist/{docloader-Co83Y5ns.js → docloader-aLVxjtuf.js} +34 -34
- package/dist/{esm-CD-mOinU.js → esm-DOL2tUGY.js} +15 -15
- package/dist/federation/builder.test.js +16 -16
- package/dist/federation/collection.test.js +13 -13
- package/dist/federation/handler.test.js +31 -31
- package/dist/federation/inbox.test.js +8 -8
- package/dist/federation/keycache.test.js +9 -9
- package/dist/federation/kv.test.js +13 -13
- package/dist/federation/middleware.test.js +34 -34
- package/dist/federation/mod.d.ts +11 -11
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +15 -15
- package/dist/federation/retry.test.js +7 -7
- package/dist/federation/router.test.js +12 -12
- package/dist/federation/send.test.js +19 -19
- package/dist/{federation-CMX7WzeL.js → federation-C44ekWNP.js} +2 -2
- package/dist/{http-CitPh4nm.js → http-BLchX4tN.js} +4 -4
- package/dist/{http-l4uEvaAw.d.ts → http-COez3YdK.d.ts} +4 -4
- package/dist/{http-DNbKMQGp.js → http-CTcZrGc-.js} +3 -3
- package/dist/{inbox-DzVBouiJ.js → inbox-CKX0m0mT.js} +2 -2
- package/dist/{key-BlHGH6Ka.js → key-AYOhau5K.js} +3 -3
- package/dist/{key-iioupXTQ.js → key-BItPfkae.js} +3 -3
- package/dist/{key-CCHgxGFx.js → key-BP-dvkNl.js} +4 -4
- package/dist/{key-D8nupoRN.js → key-CTzQmSU9.js} +3 -3
- package/dist/{keycache-DgOlsfBS.js → keycache-CDul5xYV.js} +2 -2
- package/dist/{keys-Y-wj9GGG.js → keys-OUwmqTRv.js} +2 -2
- package/dist/{kv-C7sopW2E.d.ts → kv-BqOK6zss.d.ts} +1 -1
- package/dist/{kv-CRZrzyXm.js → kv-D7Yt6pnB.js} +1 -1
- package/dist/{ld-CMyHtlmt.js → ld-MsUBCucu.js} +3 -3
- package/dist/{lookup-D2hGXmGy.js → lookup-BXvHyRnU.js} +4 -4
- package/dist/{lookup-auYJhzg8.js → lookup-DnZwlLEb.js} +2 -2
- package/dist/{lookup-BJelGpWr.d.ts → lookup-tSXYzgYs.d.ts} +3 -3
- package/dist/middleware-AJaMjp88.js +17 -0
- package/dist/{middleware-CXwVJR13.js → middleware-BooFcGdu.js} +23 -23
- package/dist/{middleware-CI0g8F_E.js → middleware-CcPCAYxA.js} +23 -23
- package/dist/middleware-DTWNLzw5.js +26 -0
- package/dist/{mod-DwquBB1g.d.ts → mod-Bf-mThHd.d.ts} +5 -5
- package/dist/{mod-D79SaXL-.d.ts → mod-C2jQirfr.d.ts} +6 -6
- package/dist/{mod-DDwnlIlm.d.ts → mod-CxD6XXBN.d.ts} +3 -3
- package/dist/{mod-DM7ZpXF4.d.ts → mod-UTC30uNC.d.ts} +4 -4
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/{mq-CRGm1e_F.d.ts → mq-DYKDDJmp.d.ts} +1 -1
- package/dist/nodeinfo/client.test.js +15 -15
- package/dist/nodeinfo/handler.test.js +30 -30
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +13 -13
- package/dist/nodeinfo/types.test.js +14 -14
- package/dist/{owner-fFqUg4lq.d.ts → owner-BlxMNrL4.d.ts} +4 -4
- package/dist/{owner-BhqHUNYK.js → owner-DzYypRQW.js} +3 -3
- package/dist/{proof-DePdLtKX.js → proof-DsZbXgSt.js} +3 -3
- package/dist/{proof-CXx8dpqH.js → proof-S7-utocc.js} +6 -6
- package/dist/{retry-D4GJ670a.js → retry-BnpVRGFC.js} +1 -1
- package/dist/runtime/authdocloader.test.js +18 -18
- package/dist/runtime/docloader.test.js +14 -14
- package/dist/runtime/key.test.js +14 -14
- package/dist/runtime/langstr.test.js +12 -12
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +12 -12
- package/dist/runtime/url.test.js +8 -8
- package/dist/{semver-dArNLkR9.js → semver-DCqorrj5.js} +1 -1
- package/dist/{send-ZwmL0M79.js → send-Bnnx9XUX.js} +3 -3
- package/dist/sig/http.test.js +17 -17
- package/dist/sig/key.test.js +15 -15
- package/dist/sig/ld.test.js +13 -13
- package/dist/sig/mod.d.ts +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +16 -16
- package/dist/sig/proof.test.js +16 -16
- package/dist/{std__assert-X-_kMxKM.js → std__assert-BQdmxyzF.js} +6 -6
- package/dist/testing/docloader.test.js +12 -12
- package/dist/testing/mod.d.ts +19 -19
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-Bk05eBXe.js → testing-u-eoahhU.js} +5 -5
- package/dist/{transformers-Dna8Fg7k.js → transformers-DJRB0yFF.js} +1 -1
- package/dist/{type-DFRVHR5o.js → type-DkjVydK_.js} +221 -221
- package/dist/{types-oJvS78Ly.js → types-DnMoUTA5.js} +4 -4
- package/dist/{types-BIgY6c-l.js → types-n7HI7VFr.js} +2 -2
- package/dist/vocab/actor.test.js +143 -143
- package/dist/vocab/lookup.test.js +13 -13
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +5 -5
- package/dist/vocab/vocab.test.js +54 -54
- package/dist/{vocab-BZbUDxs0.js → vocab-B8n4JbOY.js} +6 -6
- package/dist/{vocab-CA7YwVEz.d.ts → vocab-Cyrb7_co.d.ts} +3 -3
- package/dist/webfinger/handler.test.js +30 -30
- package/dist/webfinger/lookup.test.js +13 -13
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +3 -3
- package/dist/x/cfworkers.js +1 -1
- package/dist/x/cfworkers.test.js +13 -13
- package/dist/x/hono.d.ts +12 -12
- package/dist/x/hono.js +1 -1
- package/dist/x/sveltekit.d.ts +12 -12
- package/dist/x/sveltekit.js +1 -1
- package/package.json +3 -3
- package/dist/middleware-BX06PhvD.js +0 -26
- package/dist/middleware-CZnA6Mpi.js +0 -17
- /package/dist/{src/vocab → vocab}/accept.yaml +0 -0
- /package/dist/{src/vocab → vocab}/activity.yaml +0 -0
- /package/dist/{src/vocab → vocab}/add.yaml +0 -0
- /package/dist/{src/vocab → vocab}/announce.yaml +0 -0
- /package/dist/{src/vocab → vocab}/application.yaml +0 -0
- /package/dist/{src/vocab → vocab}/arrive.yaml +0 -0
- /package/dist/{src/vocab → vocab}/article.yaml +0 -0
- /package/dist/{src/vocab → vocab}/audio.yaml +0 -0
- /package/dist/{src/vocab → vocab}/block.yaml +0 -0
- /package/dist/{src/vocab → vocab}/chatmessage.yaml +0 -0
- /package/dist/{src/vocab → vocab}/collection.yaml +0 -0
- /package/dist/{src/vocab → vocab}/collectionpage.yaml +0 -0
- /package/dist/{src/vocab → vocab}/create.yaml +0 -0
- /package/dist/{src/vocab → vocab}/dataintegrityproof.yaml +0 -0
- /package/dist/{src/vocab → vocab}/delete.yaml +0 -0
- /package/dist/{src/vocab → vocab}/didservice.yaml +0 -0
- /package/dist/{src/vocab → vocab}/dislike.yaml +0 -0
- /package/dist/{src/vocab → vocab}/document.yaml +0 -0
- /package/dist/{src/vocab → vocab}/emoji.yaml +0 -0
- /package/dist/{src/vocab → vocab}/emojireact.yaml +0 -0
- /package/dist/{src/vocab → vocab}/endpoints.yaml +0 -0
- /package/dist/{src/vocab → vocab}/event.yaml +0 -0
- /package/dist/{src/vocab → vocab}/export.yaml +0 -0
- /package/dist/{src/vocab → vocab}/flag.yaml +0 -0
- /package/dist/{src/vocab → vocab}/follow.yaml +0 -0
- /package/dist/{src/vocab → vocab}/group.yaml +0 -0
- /package/dist/{src/vocab → vocab}/hashtag.yaml +0 -0
- /package/dist/{src/vocab → vocab}/ignore.yaml +0 -0
- /package/dist/{src/vocab → vocab}/image.yaml +0 -0
- /package/dist/{src/vocab → vocab}/intransitiveactivity.yaml +0 -0
- /package/dist/{src/vocab → vocab}/invite.yaml +0 -0
- /package/dist/{src/vocab → vocab}/join.yaml +0 -0
- /package/dist/{src/vocab → vocab}/key.yaml +0 -0
- /package/dist/{src/vocab → vocab}/leave.yaml +0 -0
- /package/dist/{src/vocab → vocab}/like.yaml +0 -0
- /package/dist/{src/vocab → vocab}/link.yaml +0 -0
- /package/dist/{src/vocab → vocab}/listen.yaml +0 -0
- /package/dist/{src/vocab → vocab}/mention.yaml +0 -0
- /package/dist/{src/vocab → vocab}/move.yaml +0 -0
- /package/dist/{src/vocab → vocab}/multikey.yaml +0 -0
- /package/dist/{src/vocab → vocab}/note.yaml +0 -0
- /package/dist/{src/vocab → vocab}/object.yaml +0 -0
- /package/dist/{src/vocab → vocab}/offer.yaml +0 -0
- /package/dist/{src/vocab → vocab}/orderedcollection.yaml +0 -0
- /package/dist/{src/vocab → vocab}/orderedcollectionpage.yaml +0 -0
- /package/dist/{src/vocab → vocab}/organization.yaml +0 -0
- /package/dist/{src/vocab → vocab}/page.yaml +0 -0
- /package/dist/{src/vocab → vocab}/person.yaml +0 -0
- /package/dist/{src/vocab → vocab}/place.yaml +0 -0
- /package/dist/{src/vocab → vocab}/profile.yaml +0 -0
- /package/dist/{src/vocab → vocab}/propertyvalue.yaml +0 -0
- /package/dist/{src/vocab → vocab}/question.yaml +0 -0
- /package/dist/{src/vocab → vocab}/read.yaml +0 -0
- /package/dist/{src/vocab → vocab}/reject.yaml +0 -0
- /package/dist/{src/vocab → vocab}/relationship.yaml +0 -0
- /package/dist/{src/vocab → vocab}/remove.yaml +0 -0
- /package/dist/{src/vocab → vocab}/service.yaml +0 -0
- /package/dist/{src/vocab → vocab}/source.yaml +0 -0
- /package/dist/{src/vocab → vocab}/tentativeaccept.yaml +0 -0
- /package/dist/{src/vocab → vocab}/tentativereject.yaml +0 -0
- /package/dist/{src/vocab → vocab}/tombstone.yaml +0 -0
- /package/dist/{src/vocab → vocab}/travel.yaml +0 -0
- /package/dist/{src/vocab → vocab}/undo.yaml +0 -0
- /package/dist/{src/vocab → vocab}/update.yaml +0 -0
- /package/dist/{src/vocab → vocab}/video.yaml +0 -0
- /package/dist/{src/vocab → vocab}/view.yaml +0 -0
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
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-
|
|
5
|
+
import { getDefaultActivityTransformers } from "./transformers-DJRB0yFF.js";
|
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-aLVxjtuf.js";
|
|
7
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-ADXyw5yl.js";
|
|
8
|
+
import { lookupWebFinger } from "./lookup-DnZwlLEb.js";
|
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-AYOhau5K.js";
|
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-BLchX4tN.js";
|
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-S7-utocc.js";
|
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-DnMoUTA5.js";
|
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-wvJw34FM.js";
|
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-B8n4JbOY.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";
|
|
@@ -21,7 +21,7 @@ import { parseTemplate } from "url-template";
|
|
|
21
21
|
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";
|
|
22
22
|
import { domainToASCII } from "node:url";
|
|
23
23
|
|
|
24
|
-
//#region
|
|
24
|
+
//#region federation/inbox.ts
|
|
25
25
|
var InboxListenerSet = class InboxListenerSet {
|
|
26
26
|
#listeners;
|
|
27
27
|
constructor() {
|
|
@@ -180,7 +180,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
//#endregion
|
|
183
|
-
//#region
|
|
183
|
+
//#region federation/router.ts
|
|
184
184
|
function cloneInnerRouter(router) {
|
|
185
185
|
const clone = new Router();
|
|
186
186
|
clone.nid = router.nid;
|
|
@@ -288,7 +288,7 @@ var RouterError = class extends Error {
|
|
|
288
288
|
};
|
|
289
289
|
|
|
290
290
|
//#endregion
|
|
291
|
-
//#region
|
|
291
|
+
//#region federation/builder.ts
|
|
292
292
|
var FederationBuilderImpl = class {
|
|
293
293
|
router;
|
|
294
294
|
actorCallbacks;
|
|
@@ -320,7 +320,7 @@ var FederationBuilderImpl = class {
|
|
|
320
320
|
this.collectionTypeIds = {};
|
|
321
321
|
}
|
|
322
322
|
async build(options) {
|
|
323
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
|
323
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-AJaMjp88.js");
|
|
324
324
|
const f = new FederationImpl$1(options);
|
|
325
325
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
326
326
|
f.router = this.router.clone();
|
|
@@ -837,7 +837,7 @@ function createFederationBuilder() {
|
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
//#endregion
|
|
840
|
-
//#region
|
|
840
|
+
//#region federation/collection.ts
|
|
841
841
|
/**
|
|
842
842
|
* Calculates the [partial follower collection digest][1].
|
|
843
843
|
*
|
|
@@ -878,7 +878,7 @@ async function buildCollectionSynchronizationHeader(collectionId, actorIds) {
|
|
|
878
878
|
}
|
|
879
879
|
|
|
880
880
|
//#endregion
|
|
881
|
-
//#region
|
|
881
|
+
//#region federation/keycache.ts
|
|
882
882
|
var KvKeyCache = class {
|
|
883
883
|
kv;
|
|
884
884
|
prefix;
|
|
@@ -918,7 +918,7 @@ var KvKeyCache = class {
|
|
|
918
918
|
};
|
|
919
919
|
|
|
920
920
|
//#endregion
|
|
921
|
-
//#region
|
|
921
|
+
//#region federation/negotiation.ts
|
|
922
922
|
function compareSpecs(a, b) {
|
|
923
923
|
return b.q - a.q || (b.s ?? 0) - (a.s ?? 0) || (a.o ?? 0) - (b.o ?? 0) || a.i - b.i || 0;
|
|
924
924
|
}
|
|
@@ -976,7 +976,7 @@ function preferredMediaTypes(accept) {
|
|
|
976
976
|
}
|
|
977
977
|
|
|
978
978
|
//#endregion
|
|
979
|
-
//#region
|
|
979
|
+
//#region federation/handler.ts
|
|
980
980
|
function acceptsJsonLd(request) {
|
|
981
981
|
const accept = request.headers.get("Accept");
|
|
982
982
|
const types = accept ? preferredMediaTypes(accept) : ["*/*"];
|
|
@@ -1989,7 +1989,7 @@ async function respondWithObjectIfAcceptable(object, request, options) {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
|
|
1991
1991
|
//#endregion
|
|
1992
|
-
//#region
|
|
1992
|
+
//#region nodeinfo/handler.ts
|
|
1993
1993
|
/**
|
|
1994
1994
|
* Handles a NodeInfo request. You would not typically call this function
|
|
1995
1995
|
* directly, but instead use {@link Federation.handle} method.
|
|
@@ -2027,7 +2027,7 @@ function handleNodeInfoJrd(_request, context$1) {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
2029
|
//#endregion
|
|
2030
|
-
//#region
|
|
2030
|
+
//#region webfinger/handler.ts
|
|
2031
2031
|
const logger = getLogger([
|
|
2032
2032
|
"fedify",
|
|
2033
2033
|
"webfinger",
|
|
@@ -2157,7 +2157,7 @@ async function handleWebFingerInternal(request, { context: context$1, host, acto
|
|
|
2157
2157
|
}
|
|
2158
2158
|
|
|
2159
2159
|
//#endregion
|
|
2160
|
-
//#region
|
|
2160
|
+
//#region federation/retry.ts
|
|
2161
2161
|
/**
|
|
2162
2162
|
* Creates an exponential backoff retry policy. The delay between retries
|
|
2163
2163
|
* starts at the `initialDelay` and is multiplied by the `factor` for each
|
|
@@ -2188,7 +2188,7 @@ function createExponentialBackoffPolicy(options = {}) {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
|
|
2190
2190
|
//#endregion
|
|
2191
|
-
//#region
|
|
2191
|
+
//#region federation/send.ts
|
|
2192
2192
|
/**
|
|
2193
2193
|
* Extracts the inbox URLs from recipients.
|
|
2194
2194
|
* @param parameters The parameters to extract the inboxes.
|
|
@@ -2305,7 +2305,7 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, headers
|
|
|
2305
2305
|
}
|
|
2306
2306
|
|
|
2307
2307
|
//#endregion
|
|
2308
|
-
//#region
|
|
2308
|
+
//#region federation/middleware.ts
|
|
2309
2309
|
/**
|
|
2310
2310
|
* Create a new {@link Federation} instance.
|
|
2311
2311
|
* @param parameters Parameters for initializing the instance.
|
|
@@ -3,28 +3,28 @@
|
|
|
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-DkjVydK_.js";
|
|
7
|
+
import { getNodeInfo } from "./client-DYRuaETr.js";
|
|
8
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-BXvHyRnU.js";
|
|
9
|
+
import { nodeInfoToJson } from "./types-n7HI7VFr.js";
|
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-BItPfkae.js";
|
|
11
|
+
import { verifyRequest } from "./http-CTcZrGc-.js";
|
|
12
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-BR9TSGxd.js";
|
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-MsUBCucu.js";
|
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-DzYypRQW.js";
|
|
15
|
+
import { signObject, verifyObject } from "./proof-DsZbXgSt.js";
|
|
16
|
+
import { routeActivity } from "./inbox-CKX0m0mT.js";
|
|
17
|
+
import { FederationBuilderImpl } from "./builder-DD6Zqqya.js";
|
|
18
|
+
import { buildCollectionSynchronizationHeader } from "./collection-D5V3UzU3.js";
|
|
19
|
+
import { KvKeyCache } from "./keycache-CDul5xYV.js";
|
|
20
|
+
import { createExponentialBackoffPolicy } from "./retry-BnpVRGFC.js";
|
|
21
|
+
import { extractInboxes, sendActivity } from "./send-Bnnx9XUX.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";
|
|
25
25
|
import { domainToASCII } from "node:url";
|
|
26
26
|
|
|
27
|
-
//#region
|
|
27
|
+
//#region compat/transformers.ts
|
|
28
28
|
const logger$1 = getLogger([
|
|
29
29
|
"fedify",
|
|
30
30
|
"compat",
|
|
@@ -115,7 +115,7 @@ function getDefaultActivityTransformers() {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
//#endregion
|
|
118
|
-
//#region
|
|
118
|
+
//#region nodeinfo/handler.ts
|
|
119
119
|
/**
|
|
120
120
|
* Handles a NodeInfo request. You would not typically call this function
|
|
121
121
|
* directly, but instead use {@link Federation.handle} method.
|
|
@@ -153,7 +153,7 @@ function handleNodeInfoJrd(_request, context$1) {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
//#endregion
|
|
156
|
-
//#region
|
|
156
|
+
//#region vocab/constants.ts
|
|
157
157
|
/**
|
|
158
158
|
* The special public collection for [public addressing]. *Do not mutate this
|
|
159
159
|
* object.*
|
|
@@ -165,7 +165,7 @@ function handleNodeInfoJrd(_request, context$1) {
|
|
|
165
165
|
const PUBLIC_COLLECTION = new URL("https://www.w3.org/ns/activitystreams#Public");
|
|
166
166
|
|
|
167
167
|
//#endregion
|
|
168
|
-
//#region
|
|
168
|
+
//#region webfinger/handler.ts
|
|
169
169
|
const logger = getLogger([
|
|
170
170
|
"fedify",
|
|
171
171
|
"webfinger",
|
|
@@ -295,7 +295,7 @@ async function handleWebFingerInternal(request, { context: context$1, host, acto
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
//#endregion
|
|
298
|
-
//#region
|
|
298
|
+
//#region federation/negotiation.ts
|
|
299
299
|
function compareSpecs(a, b) {
|
|
300
300
|
return b.q - a.q || (b.s ?? 0) - (a.s ?? 0) || (a.o ?? 0) - (b.o ?? 0) || a.i - b.i || 0;
|
|
301
301
|
}
|
|
@@ -353,7 +353,7 @@ function preferredMediaTypes(accept) {
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
//#endregion
|
|
356
|
-
//#region
|
|
356
|
+
//#region federation/handler.ts
|
|
357
357
|
function acceptsJsonLd(request) {
|
|
358
358
|
const accept = request.headers.get("Accept");
|
|
359
359
|
const types = accept ? preferredMediaTypes(accept) : ["*/*"];
|
|
@@ -1366,7 +1366,7 @@ async function respondWithObjectIfAcceptable(object, request, options) {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
1368
1368
|
//#endregion
|
|
1369
|
-
//#region
|
|
1369
|
+
//#region federation/middleware.ts
|
|
1370
1370
|
/**
|
|
1371
1371
|
* Create a new {@link Federation} instance.
|
|
1372
1372
|
* @param parameters Parameters for initializing the instance.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
import "./type-DkjVydK_.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-CcPCAYxA.js";
|
|
8
|
+
import "./semver-DCqorrj5.js";
|
|
9
|
+
import "./client-DYRuaETr.js";
|
|
10
|
+
import "./lookup-BXvHyRnU.js";
|
|
11
|
+
import "./types-n7HI7VFr.js";
|
|
12
|
+
import "./actor-CO8ypXcy.js";
|
|
13
|
+
import "./key-BItPfkae.js";
|
|
14
|
+
import "./http-CTcZrGc-.js";
|
|
15
|
+
import "./authdocloader-BR9TSGxd.js";
|
|
16
|
+
import "./ld-MsUBCucu.js";
|
|
17
|
+
import "./owner-DzYypRQW.js";
|
|
18
|
+
import "./proof-DsZbXgSt.js";
|
|
19
|
+
import "./inbox-CKX0m0mT.js";
|
|
20
|
+
import "./builder-DD6Zqqya.js";
|
|
21
|
+
import "./collection-D5V3UzU3.js";
|
|
22
|
+
import "./keycache-CDul5xYV.js";
|
|
23
|
+
import "./retry-BnpVRGFC.js";
|
|
24
|
+
import "./send-Bnnx9XUX.js";
|
|
25
|
+
|
|
26
|
+
export { FederationImpl };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader } from "./docloader-
|
|
4
|
-
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-
|
|
5
|
-
import { KeyCache } from "./http-
|
|
3
|
+
import { DocumentLoader } from "./docloader-CLolPVL_.js";
|
|
4
|
+
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-Cyrb7_co.js";
|
|
5
|
+
import { KeyCache } from "./http-COez3YdK.js";
|
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region sig/ld.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* A signature of a JSON-LD document.
|
|
11
11
|
* @since 1.0.0
|
|
@@ -144,7 +144,7 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
|
|
144
144
|
*/
|
|
145
145
|
declare function verifyJsonLd(jsonLd: unknown, options?: VerifyJsonLdOptions): Promise<boolean>;
|
|
146
146
|
//#endregion
|
|
147
|
-
//#region
|
|
147
|
+
//#region sig/proof.d.ts
|
|
148
148
|
/**
|
|
149
149
|
* Options for {@link createProof}.
|
|
150
150
|
* @since 0.10.0
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader, GetUserAgentOptions } from "./docloader-
|
|
4
|
-
import { Collection, Link, Object as Object$1 } from "./vocab-
|
|
3
|
+
import { DocumentLoader, GetUserAgentOptions } from "./docloader-CLolPVL_.js";
|
|
4
|
+
import { Collection, Link, Object as Object$1 } from "./vocab-Cyrb7_co.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region vocab/lookup.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Options for the {@link lookupObject} function.
|
|
10
10
|
*
|
|
@@ -116,7 +116,7 @@ interface TraverseCollectionOptions {
|
|
|
116
116
|
*/
|
|
117
117
|
declare function traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object$1 | Link>;
|
|
118
118
|
//#endregion
|
|
119
|
-
//#region
|
|
119
|
+
//#region vocab/constants.d.ts
|
|
120
120
|
/**
|
|
121
121
|
* The special public collection for [public addressing]. *Do not mutate this
|
|
122
122
|
* object.*
|
|
@@ -127,7 +127,7 @@ declare function traverseCollection(collection: Collection, options?: TraverseCo
|
|
|
127
127
|
*/
|
|
128
128
|
declare const PUBLIC_COLLECTION: URL;
|
|
129
129
|
//#endregion
|
|
130
|
-
//#region
|
|
130
|
+
//#region vocab/handle.d.ts
|
|
131
131
|
/**
|
|
132
132
|
* Represents a fediverse handle, which consists of a username and a host.
|
|
133
133
|
* The username can be alphanumeric and may include special characters,
|
|
@@ -201,7 +201,7 @@ declare function isFediverseHandle(handle: string): handle is `${string}@${strin
|
|
|
201
201
|
*/
|
|
202
202
|
declare function toAcctUrl(handle: string): URL | null;
|
|
203
203
|
//#endregion
|
|
204
|
-
//#region
|
|
204
|
+
//#region vocab/type.d.ts
|
|
205
205
|
/**
|
|
206
206
|
* Returns the type URI of the given object.
|
|
207
207
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { Activity } from "./vocab-
|
|
4
|
-
import { ActivityTransformer, Context } from "./context-
|
|
3
|
+
import { Activity } from "./vocab-Cyrb7_co.js";
|
|
4
|
+
import { ActivityTransformer, Context } from "./context-BNA3vzcr.js";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region compat/transformers.d.ts
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* An activity transformer that assigns a new random ID to an activity if it
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-
|
|
4
|
-
import { HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
3
|
+
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-CLolPVL_.js";
|
|
4
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-COez3YdK.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region runtime/authdocloader.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Options for {@link getAuthenticatedDocumentLoader}.
|
|
10
10
|
* @see {@link getAuthenticatedDocumentLoader}
|
|
@@ -47,7 +47,7 @@ declare function getAuthenticatedDocumentLoader(identity: {
|
|
|
47
47
|
tracerProvider
|
|
48
48
|
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region
|
|
50
|
+
//#region runtime/key.d.ts
|
|
51
51
|
/**
|
|
52
52
|
* Imports a PEM-SPKI formatted public key.
|
|
53
53
|
* @param pem The PEM-SPKI formatted public key.
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-
|
|
4
|
-
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-
|
|
5
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-
|
|
6
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "./vocab-
|
|
7
|
-
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-
|
|
8
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
9
|
-
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-
|
|
10
|
-
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-
|
|
11
|
-
import { ResourceDescriptor, lookupWebFinger } from "./lookup-
|
|
12
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
13
|
-
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-
|
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
3
|
+
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-BqOK6zss.js";
|
|
4
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-CLolPVL_.js";
|
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-B0IOer6B.js";
|
|
6
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "./vocab-Cyrb7_co.js";
|
|
7
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-CWNAGvnO.js";
|
|
8
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-COez3YdK.js";
|
|
9
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-BlxMNrL4.js";
|
|
10
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-C2jQirfr.js";
|
|
11
|
+
import { ResourceDescriptor, lookupWebFinger } from "./lookup-tSXYzgYs.js";
|
|
12
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-BNA3vzcr.js";
|
|
13
|
+
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-DYKDDJmp.js";
|
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-CxD6XXBN.js";
|
|
15
15
|
import "./mod-g0xFzAP9.js";
|
|
16
16
|
import "./mod-1pDWKvUL.js";
|
|
17
|
-
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-
|
|
18
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
|
17
|
+
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-UTC30uNC.js";
|
|
18
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-Bf-mThHd.js";
|
|
19
19
|
import "./mod-GIh5OYxW.js";
|
|
20
20
|
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SemVer, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, formatSemVer, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, parseSemVer, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/mod.js
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-
|
|
5
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-DJRB0yFF.js";
|
|
6
6
|
import "./compat-Bb5myD13.js";
|
|
7
|
-
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-
|
|
8
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-
|
|
9
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
10
|
-
import { lookupWebFinger } from "./lookup-
|
|
11
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-
|
|
12
|
-
import { signRequest, verifyRequest } from "./http-
|
|
13
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
14
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-
|
|
15
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-
|
|
16
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
17
|
-
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-
|
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-aLVxjtuf.js";
|
|
8
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-ADXyw5yl.js";
|
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-BooFcGdu.js";
|
|
10
|
+
import { lookupWebFinger } from "./lookup-DnZwlLEb.js";
|
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-AYOhau5K.js";
|
|
12
|
+
import { signRequest, verifyRequest } from "./http-BLchX4tN.js";
|
|
13
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-S7-utocc.js";
|
|
14
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-C44ekWNP.js";
|
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-DnMoUTA5.js";
|
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-wvJw34FM.js";
|
|
17
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-B8n4JbOY.js";
|
|
18
18
|
import "./nodeinfo-CyEbLjHs.js";
|
|
19
19
|
import "./runtime-BSkOVUWM.js";
|
|
20
20
|
import "./sig-BXJO--F9.js";
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../semver-
|
|
11
|
-
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-
|
|
12
|
-
import "../lookup-
|
|
13
|
-
import { test } from "../testing-
|
|
14
|
-
import "../std__assert-
|
|
15
|
-
import "../assert_rejects-
|
|
16
|
-
import "../assert_is_error-
|
|
17
|
-
import "../assert_not_equals-
|
|
18
|
-
import "../assert_throws-
|
|
19
|
-
import { esm_default } from "../esm-
|
|
6
|
+
import "../type-DkjVydK_.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
+
import "../assert-DwEa6glZ.js";
|
|
9
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
+
import "../semver-DCqorrj5.js";
|
|
11
|
+
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-DYRuaETr.js";
|
|
12
|
+
import "../lookup-BXvHyRnU.js";
|
|
13
|
+
import { test } from "../testing-u-eoahhU.js";
|
|
14
|
+
import "../std__assert-BQdmxyzF.js";
|
|
15
|
+
import "../assert_rejects-AjlKk-Vo.js";
|
|
16
|
+
import "../assert_is_error-CeVBLPsZ.js";
|
|
17
|
+
import "../assert_not_equals-D2R2nl5h.js";
|
|
18
|
+
import "../assert_throws-CqMKbTh_.js";
|
|
19
|
+
import { esm_default } from "../esm-DOL2tUGY.js";
|
|
20
20
|
|
|
21
|
-
//#region
|
|
21
|
+
//#region nodeinfo/client.test.ts
|
|
22
22
|
test("getNodeInfo()", async (t) => {
|
|
23
23
|
esm_default.spyGlobal();
|
|
24
24
|
esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
|
|
@@ -3,37 +3,37 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
12
|
-
import { parseSemVer } from "../semver-
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
15
|
-
import "../types-
|
|
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-
|
|
25
|
-
import "../collection-
|
|
26
|
-
import "../keycache-
|
|
27
|
-
import "../retry-
|
|
28
|
-
import "../send-
|
|
29
|
-
import { createRequestContext, test } from "../testing-
|
|
30
|
-
import "../std__assert-
|
|
31
|
-
import "../assert_rejects-
|
|
32
|
-
import "../assert_is_error-
|
|
33
|
-
import "../assert_not_equals-
|
|
34
|
-
import "../assert_throws-
|
|
6
|
+
import "../type-DkjVydK_.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
+
import "../assert-DwEa6glZ.js";
|
|
9
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-CcPCAYxA.js";
|
|
12
|
+
import { parseSemVer } from "../semver-DCqorrj5.js";
|
|
13
|
+
import "../client-DYRuaETr.js";
|
|
14
|
+
import "../lookup-BXvHyRnU.js";
|
|
15
|
+
import "../types-n7HI7VFr.js";
|
|
16
|
+
import "../actor-CO8ypXcy.js";
|
|
17
|
+
import "../key-BItPfkae.js";
|
|
18
|
+
import "../http-CTcZrGc-.js";
|
|
19
|
+
import "../authdocloader-BR9TSGxd.js";
|
|
20
|
+
import "../ld-MsUBCucu.js";
|
|
21
|
+
import "../owner-DzYypRQW.js";
|
|
22
|
+
import "../proof-DsZbXgSt.js";
|
|
23
|
+
import "../inbox-CKX0m0mT.js";
|
|
24
|
+
import "../builder-DD6Zqqya.js";
|
|
25
|
+
import "../collection-D5V3UzU3.js";
|
|
26
|
+
import "../keycache-CDul5xYV.js";
|
|
27
|
+
import "../retry-BnpVRGFC.js";
|
|
28
|
+
import "../send-Bnnx9XUX.js";
|
|
29
|
+
import { createRequestContext, test } from "../testing-u-eoahhU.js";
|
|
30
|
+
import "../std__assert-BQdmxyzF.js";
|
|
31
|
+
import "../assert_rejects-AjlKk-Vo.js";
|
|
32
|
+
import "../assert_is_error-CeVBLPsZ.js";
|
|
33
|
+
import "../assert_not_equals-D2R2nl5h.js";
|
|
34
|
+
import "../assert_throws-CqMKbTh_.js";
|
|
35
35
|
|
|
36
|
-
//#region
|
|
36
|
+
//#region nodeinfo/handler.test.ts
|
|
37
37
|
test("handleNodeInfo()", async () => {
|
|
38
38
|
const request = new Request("https://example.com/nodeinfo/2.1");
|
|
39
39
|
const federation = createFederation({ kv: new MemoryKvStore() });
|
package/dist/nodeinfo/mod.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import "../kv-
|
|
4
|
-
import "../docloader-
|
|
5
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-
|
|
3
|
+
import "../kv-BqOK6zss.js";
|
|
4
|
+
import "../docloader-CLolPVL_.js";
|
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-B0IOer6B.js";
|
|
6
6
|
import "../mod-1pDWKvUL.js";
|
|
7
7
|
export { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
package/dist/nodeinfo/mod.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../docloader-
|
|
6
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-
|
|
5
|
+
import "../docloader-aLVxjtuf.js";
|
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-DnMoUTA5.js";
|
|
7
7
|
import "../nodeinfo-CyEbLjHs.js";
|
|
8
8
|
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|