@fedify/fedify 2.0.0-pr.410.1555 → 2.0.0-pr.410.1558
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-BRZBZL78.js → actor-CkjTCNqi.js} +1 -1
- package/dist/{actor-BmdHefDs.js → actor-DmsbGzXS.js} +187 -187
- package/dist/{authdocloader-CZmKSABg.js → authdocloader-BJxkviIL.js} +3 -3
- package/dist/{authdocloader-BhjXrPO0.js → authdocloader-BwV2NPfz.js} +3 -3
- package/dist/{builder-BNihDD_k.js → builder-DbOVAz8i.js} +9 -4
- package/dist/{client-xQBl0SWa.js → client-DrNZd6r_.js} +2 -2
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{context-3ICnZJKt.d.ts → context-9gCpIkiz.d.ts} +15 -2
- package/dist/{docloader-Y0IXuuTF.js → docloader-DnepZfu_.js} +1 -1
- package/dist/{esm-B1ySd9HR.js → esm-D1HqBE3n.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.d.ts +3 -3
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +3 -3
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/{http-DRywLE7b.js → http-BEJUSX6j.js} +3 -3
- package/dist/{http-D5GorYrZ.js → http-BgCF3jDs.js} +2 -2
- package/dist/{inbox-CaX44rrs.js → inbox-Bq4EChoK.js} +1 -1
- package/dist/{key-BMq1-Cj7.js → key-BD3lpBWw.js} +3 -3
- package/dist/{key-DfAGfnOF.js → key-BYNqWXyu.js} +2 -2
- package/dist/{key-X3YYEgKB.js → key-BmFoI4_J.js} +4 -4
- package/dist/{key-DAlS7Z9O.js → key-D-0OLe9C.js} +2 -2
- package/dist/{keycache-qPzpKJlM.js → keycache-yZDAc3-e.js} +1 -1
- package/dist/{keys-BsS31KVC.js → keys-Dtc-g6xq.js} +1 -1
- package/dist/{ld-DzpT3An5.js → ld-BJ484qSg.js} +2 -2
- package/dist/{lookup-BAbOG_zB.js → lookup-BzogF2gp.js} +1 -1
- package/dist/{lookup-D43TUYEe.js → lookup-Cj0sX50U.js} +2 -2
- package/dist/{middleware-9DpTJsIC.js → middleware-CiH0ptqy.js} +19 -14
- package/dist/middleware-D2W4gwdv.js +17 -0
- package/dist/{middleware-B-sUJAjA.js → middleware-DIZ1dnwT.js} +21 -11
- package/dist/middleware-LmK3pQ2z.js +26 -0
- package/dist/{mod-CWxqOAci.d.ts → mod-Bqxcp7eN.d.ts} +1 -1
- package/dist/{lookup-3czM5mmU.d.ts → mod-DBzN0aCM.d.ts} +8 -1
- package/dist/mod.d.ts +4 -5
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/{owner-DkfO8cPN.js → owner-9FMX4wQT.js} +2 -2
- package/dist/{proof-BpXPgm1t.js → proof-Arx4Q9Q6.js} +2 -2
- package/dist/{proof-Tk4Lvh8_.js → proof-DnTD0avk.js} +3 -3
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +4 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/{send-OofVHnYD.js → send-CcxHe0p3.js} +2 -2
- package/dist/sig/http.test.js +8 -8
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.d.ts +21 -1
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-CsUL0GHF.js → testing-DFgpNAI6.js} +2 -2
- package/dist/{type-BmEb91Kj.js → type-B2h-NRAo.js} +186 -186
- package/dist/{types-BkUrYhJX.js → types-B1QuBj5L.js} +2 -2
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-Djy0YG4g.js → vocab-BREfYr1a.js} +4 -4
- package/dist/webfinger/handler.test.js +44 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.d.ts +1 -2
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.d.ts +2 -2
- package/dist/x/sveltekit.d.ts +2 -2
- package/package.json +1 -1
- package/dist/middleware-CUrS7kyW.js +0 -26
- package/dist/middleware-Q6vqsA7h.js +0 -17
- package/dist/mod-GIh5OYxW.d.ts +0 -2
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-
|
7
|
-
import { isActor } from "./actor-
|
6
|
+
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-B2h-NRAo.js";
|
7
|
+
import { isActor } from "./actor-CkjTCNqi.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import "./docloader-
|
6
|
-
import "./actor-
|
7
|
-
import "./lookup-
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
5
|
+
import "./docloader-DnepZfu_.js";
|
6
|
+
import "./actor-DmsbGzXS.js";
|
7
|
+
import "./lookup-BzogF2gp.js";
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-D-0OLe9C.js";
|
9
9
|
|
10
10
|
export { validateCryptoKey };
|
@@ -2,8 +2,8 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
6
|
-
import { CryptographicKey, Object as Object$1, isActor } from "./actor-
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-DnepZfu_.js";
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-DmsbGzXS.js";
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Multikey } from "./type-
|
6
|
+
import { CryptographicKey, Multikey } from "./type-B2h-NRAo.js";
|
7
7
|
|
8
8
|
//#region src/federation/keycache.ts
|
9
9
|
var KvKeyCache = class {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Multikey, importSpki } from "./type-
|
6
|
+
import { CryptographicKey, Multikey, importSpki } from "./type-B2h-NRAo.js";
|
7
7
|
|
8
8
|
//#region src/testing/keys.ts
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
6
|
+
import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-B2h-NRAo.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BYNqWXyu.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-
|
5
|
+
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-DnepZfu_.js";
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
8
8
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-
|
6
|
+
import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-B2h-NRAo.js";
|
7
7
|
import { cloneDeep, delay } from "es-toolkit";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
@@ -256,7 +256,7 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
256
256
|
});
|
257
257
|
if (jrd?.links == null) return null;
|
258
258
|
for (const l of jrd.links) {
|
259
|
-
if (l.type !== "application/activity+json" && !l.type?.match(/application\/ld\+json;\s*profile="https:\/\/www.w3.org\/ns\/activitystreams"/) || l.rel !== "self") continue;
|
259
|
+
if (l.type !== "application/activity+json" && !l.type?.match(/application\/ld\+json;\s*profile="https:\/\/www.w3.org\/ns\/activitystreams"/) || l.rel !== "self" || l.href == null) continue;
|
260
260
|
try {
|
261
261
|
const remoteDoc = await documentLoader(l.href, { signal: options.signal });
|
262
262
|
document = remoteDoc.document;
|
@@ -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-
|
6
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-B2h-NRAo.js";
|
7
|
+
import { getNodeInfo } from "./client-DrNZd6r_.js";
|
8
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-Cj0sX50U.js";
|
9
9
|
import { nodeInfoToJson } from "./types-BIgY6c-l.js";
|
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-
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-BYNqWXyu.js";
|
11
|
+
import { verifyRequest } from "./http-BgCF3jDs.js";
|
12
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-BJxkviIL.js";
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-BJ484qSg.js";
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-9FMX4wQT.js";
|
15
|
+
import { signObject, verifyObject } from "./proof-Arx4Q9Q6.js";
|
16
|
+
import { routeActivity } from "./inbox-Bq4EChoK.js";
|
17
|
+
import { FederationBuilderImpl } from "./builder-DbOVAz8i.js";
|
18
18
|
import { buildCollectionSynchronizationHeader } from "./collection-CSzG2j1P.js";
|
19
|
-
import { KvKeyCache } from "./keycache-
|
19
|
+
import { KvKeyCache } from "./keycache-yZDAc3-e.js";
|
20
20
|
import { createExponentialBackoffPolicy } from "./retry-D4GJ670a.js";
|
21
|
-
import { extractInboxes, sendActivity } from "./send-
|
21
|
+
import { extractInboxes, sendActivity } from "./send-CcxHe0p3.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";
|
@@ -196,7 +196,7 @@ async function handleWebFinger(request, options) {
|
|
196
196
|
}
|
197
197
|
});
|
198
198
|
}
|
199
|
-
async function handleWebFingerInternal(request, { context: context$1, host, actorDispatcher, actorHandleMapper, actorAliasMapper, onNotFound, span }) {
|
199
|
+
async function handleWebFingerInternal(request, { context: context$1, host, actorDispatcher, actorHandleMapper, actorAliasMapper, onNotFound, span, webFingerLinksDispatcher }) {
|
200
200
|
if (actorDispatcher == null) {
|
201
201
|
logger.error("Actor dispatcher is not set.");
|
202
202
|
return await onNotFound(request);
|
@@ -272,6 +272,10 @@ async function handleWebFingerInternal(request, { context: context$1, host, acto
|
|
272
272
|
if (image.mediaType != null) link.type = image.mediaType;
|
273
273
|
links.push(link);
|
274
274
|
}
|
275
|
+
if (webFingerLinksDispatcher != null) {
|
276
|
+
const customLinks = await webFingerLinksDispatcher(context$1, resourceUrl);
|
277
|
+
if (customLinks != null) for (const link of customLinks) links.push(link);
|
278
|
+
}
|
275
279
|
const aliases = [];
|
276
280
|
if (resourceUrl.protocol != "acct:" && actor.preferredUsername != null) {
|
277
281
|
aliases.push(`acct:${actor.preferredUsername}@${host ?? context$1.url.host}`);
|
@@ -2061,6 +2065,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
2061
2065
|
actorDispatcher: this.actorCallbacks?.dispatcher,
|
2062
2066
|
actorHandleMapper: this.actorCallbacks?.handleMapper,
|
2063
2067
|
actorAliasMapper: this.actorCallbacks?.aliasMapper,
|
2068
|
+
webFingerLinksDispatcher: this.webFingerLinksDispatcher,
|
2064
2069
|
onNotFound,
|
2065
2070
|
tracer
|
2066
2071
|
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import "./transformers-Dna8Fg7k.js";
|
6
|
+
import "./docloader-DnepZfu_.js";
|
7
|
+
import "./actor-DmsbGzXS.js";
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DIZ1dnwT.js";
|
9
|
+
import "./lookup-BzogF2gp.js";
|
10
|
+
import "./key-D-0OLe9C.js";
|
11
|
+
import "./http-BEJUSX6j.js";
|
12
|
+
import "./proof-DnTD0avk.js";
|
13
|
+
import "./types-B1QuBj5L.js";
|
14
|
+
import "./authdocloader-BwV2NPfz.js";
|
15
|
+
import "./vocab-BREfYr1a.js";
|
16
|
+
|
17
|
+
export { FederationImpl };
|
@@ -3,15 +3,15 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-Dna8Fg7k.js";
|
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-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-DnepZfu_.js";
|
7
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-DmsbGzXS.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-BzogF2gp.js";
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-D-0OLe9C.js";
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-BEJUSX6j.js";
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-DnTD0avk.js";
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-B1QuBj5L.js";
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-BwV2NPfz.js";
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-BREfYr1a.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";
|
@@ -293,6 +293,7 @@ var FederationBuilderImpl = class {
|
|
293
293
|
router;
|
294
294
|
actorCallbacks;
|
295
295
|
nodeInfoDispatcher;
|
296
|
+
webFingerLinksDispatcher;
|
296
297
|
objectCallbacks;
|
297
298
|
objectTypeIds;
|
298
299
|
inboxPath;
|
@@ -320,7 +321,7 @@ var FederationBuilderImpl = class {
|
|
320
321
|
this.collectionTypeIds = {};
|
321
322
|
}
|
322
323
|
async build(options) {
|
323
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
324
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-D2W4gwdv.js");
|
324
325
|
const f = new FederationImpl$1(options);
|
325
326
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
326
327
|
f.router = this.router.clone();
|
@@ -328,6 +329,7 @@ var FederationBuilderImpl = class {
|
|
328
329
|
f._initializeRouter();
|
329
330
|
f.actorCallbacks = this.actorCallbacks == null ? void 0 : { ...this.actorCallbacks };
|
330
331
|
f.nodeInfoDispatcher = this.nodeInfoDispatcher;
|
332
|
+
f.webFingerLinksDispatcher = this.webFingerLinksDispatcher;
|
331
333
|
f.objectCallbacks = { ...this.objectCallbacks };
|
332
334
|
f.objectTypeIds = { ...this.objectTypeIds };
|
333
335
|
f.inboxPath = this.inboxPath;
|
@@ -465,6 +467,9 @@ var FederationBuilderImpl = class {
|
|
465
467
|
if (variables.size !== 0) throw new RouterError("Path for NodeInfo dispatcher must have no variables.");
|
466
468
|
this.nodeInfoDispatcher = dispatcher;
|
467
469
|
}
|
470
|
+
setWebFingerLinksDispatcher(dispatcher) {
|
471
|
+
this.webFingerLinksDispatcher = dispatcher;
|
472
|
+
}
|
468
473
|
setObjectDispatcher(cls, path, dispatcher) {
|
469
474
|
const routeName = `object:${cls.typeId.href}`;
|
470
475
|
if (this.router.has(routeName)) throw new RouterError(`Object dispatcher for ${cls.name} already set.`);
|
@@ -2058,7 +2063,7 @@ async function handleWebFinger(request, options) {
|
|
2058
2063
|
}
|
2059
2064
|
});
|
2060
2065
|
}
|
2061
|
-
async function handleWebFingerInternal(request, { context: context$1, host, actorDispatcher, actorHandleMapper, actorAliasMapper, onNotFound, span }) {
|
2066
|
+
async function handleWebFingerInternal(request, { context: context$1, host, actorDispatcher, actorHandleMapper, actorAliasMapper, onNotFound, span, webFingerLinksDispatcher }) {
|
2062
2067
|
if (actorDispatcher == null) {
|
2063
2068
|
logger.error("Actor dispatcher is not set.");
|
2064
2069
|
return await onNotFound(request);
|
@@ -2134,6 +2139,10 @@ async function handleWebFingerInternal(request, { context: context$1, host, acto
|
|
2134
2139
|
if (image.mediaType != null) link.type = image.mediaType;
|
2135
2140
|
links.push(link);
|
2136
2141
|
}
|
2142
|
+
if (webFingerLinksDispatcher != null) {
|
2143
|
+
const customLinks = await webFingerLinksDispatcher(context$1, resourceUrl);
|
2144
|
+
if (customLinks != null) for (const link of customLinks) links.push(link);
|
2145
|
+
}
|
2137
2146
|
const aliases = [];
|
2138
2147
|
if (resourceUrl.protocol != "acct:" && actor.preferredUsername != null) {
|
2139
2148
|
aliases.push(`acct:${actor.preferredUsername}@${host ?? context$1.url.host}`);
|
@@ -3000,6 +3009,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
3000
3009
|
actorDispatcher: this.actorCallbacks?.dispatcher,
|
3001
3010
|
actorHandleMapper: this.actorCallbacks?.handleMapper,
|
3002
3011
|
actorAliasMapper: this.actorCallbacks?.aliasMapper,
|
3012
|
+
webFingerLinksDispatcher: this.webFingerLinksDispatcher,
|
3003
3013
|
onNotFound,
|
3004
3014
|
tracer
|
3005
3015
|
});
|
@@ -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-B2h-NRAo.js";
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-CiH0ptqy.js";
|
8
|
+
import "./semver-dArNLkR9.js";
|
9
|
+
import "./client-DrNZd6r_.js";
|
10
|
+
import "./lookup-Cj0sX50U.js";
|
11
|
+
import "./types-BIgY6c-l.js";
|
12
|
+
import "./actor-CkjTCNqi.js";
|
13
|
+
import "./key-BYNqWXyu.js";
|
14
|
+
import "./http-BgCF3jDs.js";
|
15
|
+
import "./authdocloader-BJxkviIL.js";
|
16
|
+
import "./ld-BJ484qSg.js";
|
17
|
+
import "./owner-9FMX4wQT.js";
|
18
|
+
import "./proof-Arx4Q9Q6.js";
|
19
|
+
import "./inbox-Bq4EChoK.js";
|
20
|
+
import "./builder-DbOVAz8i.js";
|
21
|
+
import "./collection-CSzG2j1P.js";
|
22
|
+
import "./keycache-yZDAc3-e.js";
|
23
|
+
import "./retry-D4GJ670a.js";
|
24
|
+
import "./send-CcxHe0p3.js";
|
25
|
+
|
26
|
+
export { FederationImpl };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
3
|
import { Activity } from "./vocab-SOE1ifCr.js";
|
4
|
-
import { ActivityTransformer, Context } from "./context-
|
4
|
+
import { ActivityTransformer, Context } from "./context-9gCpIkiz.js";
|
5
5
|
|
6
6
|
//#region src/compat/transformers.d.ts
|
7
7
|
|
@@ -44,7 +44,7 @@ interface Link {
|
|
44
44
|
/**
|
45
45
|
* A URI pointing to the target resource.
|
46
46
|
*/
|
47
|
-
href
|
47
|
+
href?: string;
|
48
48
|
/**
|
49
49
|
* Human-readable titles describing the link relation. If the language is
|
50
50
|
* unknown or unspecified, the key is `"und"`.
|
@@ -54,6 +54,13 @@ interface Link {
|
|
54
54
|
* Conveys additional information about the link relation.
|
55
55
|
*/
|
56
56
|
properties?: Record<string, string>;
|
57
|
+
/**
|
58
|
+
* A URI Template (RFC 6570) that can be used to construct URIs by
|
59
|
+
* substituting variables. Used primarily for subscription endpoints
|
60
|
+
* where parameters like account URIs need to be dynamically inserted.
|
61
|
+
* @since 1.9.0
|
62
|
+
*/
|
63
|
+
template?: string;
|
57
64
|
}
|
58
65
|
//#endregion
|
59
66
|
//#region src/webfinger/lookup.d.ts
|
package/dist/mod.d.ts
CHANGED
@@ -8,13 +8,12 @@ import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOption
|
|
8
8
|
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-DqSNLFNY.js";
|
9
9
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-CQPnQVtf.js";
|
10
10
|
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-Cxt4Kpf6.js";
|
11
|
-
import { ResourceDescriptor, lookupWebFinger } from "./
|
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-
|
11
|
+
import { ResourceDescriptor, lookupWebFinger } from "./mod-DBzN0aCM.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, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-9gCpIkiz.js";
|
13
13
|
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-CRGm1e_F.js";
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-Bqxcp7eN.js";
|
15
15
|
import "./mod-g0xFzAP9.js";
|
16
16
|
import "./mod-1pDWKvUL.js";
|
17
17
|
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-TFoH2Ql8.js";
|
18
18
|
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-Drmz72EK.js";
|
19
|
-
|
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 };
|
19
|
+
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, WebFingerLinksDispatcher, 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
@@ -4,17 +4,17 @@
|
|
4
4
|
|
5
5
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-Dna8Fg7k.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-
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-DnepZfu_.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-DmsbGzXS.js";
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-DIZ1dnwT.js";
|
10
|
+
import { lookupWebFinger } from "./lookup-BzogF2gp.js";
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-D-0OLe9C.js";
|
12
|
+
import { signRequest, verifyRequest } from "./http-BEJUSX6j.js";
|
13
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-DnTD0avk.js";
|
14
14
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-CMX7WzeL.js";
|
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-
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-B1QuBj5L.js";
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-BwV2NPfz.js";
|
17
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-BREfYr1a.js";
|
18
18
|
import "./nodeinfo-CyEbLjHs.js";
|
19
19
|
import "./runtime-BSkOVUWM.js";
|
20
20
|
import "./sig-BXJO--F9.js";
|
@@ -3,20 +3,20 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-B2h-NRAo.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 "../semver-dArNLkR9.js";
|
11
|
-
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-
|
12
|
-
import "../lookup-
|
13
|
-
import { test } from "../testing-
|
11
|
+
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-DrNZd6r_.js";
|
12
|
+
import "../lookup-Cj0sX50U.js";
|
13
|
+
import { test } from "../testing-DFgpNAI6.js";
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
15
15
|
import "../assert_rejects-DiIiJbZn.js";
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|
17
17
|
import "../assert_not_equals-f3m3epl3.js";
|
18
18
|
import "../assert_throws-BOO88avQ.js";
|
19
|
-
import { esm_default } from "../esm-
|
19
|
+
import { esm_default } from "../esm-D1HqBE3n.js";
|
20
20
|
|
21
21
|
//#region src/nodeinfo/client.test.ts
|
22
22
|
test("getNodeInfo()", async (t) => {
|
@@ -3,30 +3,30 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-B2h-NRAo.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 { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-CiH0ptqy.js";
|
12
12
|
import { parseSemVer } from "../semver-dArNLkR9.js";
|
13
|
-
import "../client-
|
14
|
-
import "../lookup-
|
13
|
+
import "../client-DrNZd6r_.js";
|
14
|
+
import "../lookup-Cj0sX50U.js";
|
15
15
|
import "../types-BIgY6c-l.js";
|
16
|
-
import "../actor-
|
17
|
-
import "../key-
|
18
|
-
import "../http-
|
19
|
-
import "../authdocloader-
|
20
|
-
import "../ld-
|
21
|
-
import "../owner-
|
22
|
-
import "../proof-
|
23
|
-
import "../inbox-
|
24
|
-
import "../builder-
|
16
|
+
import "../actor-CkjTCNqi.js";
|
17
|
+
import "../key-BYNqWXyu.js";
|
18
|
+
import "../http-BgCF3jDs.js";
|
19
|
+
import "../authdocloader-BJxkviIL.js";
|
20
|
+
import "../ld-BJ484qSg.js";
|
21
|
+
import "../owner-9FMX4wQT.js";
|
22
|
+
import "../proof-Arx4Q9Q6.js";
|
23
|
+
import "../inbox-Bq4EChoK.js";
|
24
|
+
import "../builder-DbOVAz8i.js";
|
25
25
|
import "../collection-CSzG2j1P.js";
|
26
|
-
import "../keycache-
|
26
|
+
import "../keycache-yZDAc3-e.js";
|
27
27
|
import "../retry-D4GJ670a.js";
|
28
|
-
import "../send-
|
29
|
-
import { createRequestContext, test } from "../testing-
|
28
|
+
import "../send-CcxHe0p3.js";
|
29
|
+
import { createRequestContext, test } from "../testing-DFgpNAI6.js";
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
31
31
|
import "../assert_rejects-DiIiJbZn.js";
|
32
32
|
import "../assert_is_error-BPGph1Jx.js";
|
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-DnepZfu_.js";
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-B1QuBj5L.js";
|
7
7
|
import "../nodeinfo-CyEbLjHs.js";
|
8
8
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
@@ -3,13 +3,13 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-B2h-NRAo.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 { formatSemVer, parseSemVer } from "../semver-dArNLkR9.js";
|
11
|
-
import "../lookup-
|
12
|
-
import { test } from "../testing-
|
11
|
+
import "../lookup-Cj0sX50U.js";
|
12
|
+
import { test } from "../testing-DFgpNAI6.js";
|
13
13
|
import "../std__assert-X-_kMxKM.js";
|
14
14
|
import "../assert_rejects-DiIiJbZn.js";
|
15
15
|
import "../assert_is_error-BPGph1Jx.js";
|
@@ -3,14 +3,14 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-B2h-NRAo.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 "../semver-dArNLkR9.js";
|
11
|
-
import "../lookup-
|
11
|
+
import "../lookup-Cj0sX50U.js";
|
12
12
|
import { nodeInfoToJson } from "../types-BIgY6c-l.js";
|
13
|
-
import { test } from "../testing-
|
13
|
+
import { test } from "../testing-DFgpNAI6.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,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-
|
7
|
-
import { isActor } from "./actor-
|
6
|
+
import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-B2h-NRAo.js";
|
7
|
+
import { isActor } from "./actor-CkjTCNqi.js";
|
8
8
|
import { trace } from "@opentelemetry/api";
|
9
9
|
|
10
10
|
//#region src/sig/owner.ts
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
6
|
+
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-B2h-NRAo.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BYNqWXyu.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { encodeHex } from "byte-encodings/hex";
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
6
|
-
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-DnepZfu_.js";
|
6
|
+
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-DmsbGzXS.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-D-0OLe9C.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import jsonld from "jsonld";
|
@@ -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-B2h-NRAo.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-Cj0sX50U.js";
|
11
|
+
import "../actor-CkjTCNqi.js";
|
12
|
+
import "../key-BYNqWXyu.js";
|
13
|
+
import { verifyRequest } from "../http-BgCF3jDs.js";
|
14
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-BJxkviIL.js";
|
15
|
+
import { mockDocumentLoader, test } from "../testing-DFgpNAI6.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-Dtc-g6xq.js";
|
22
|
+
import { esm_default } from "../esm-D1HqBE3n.js";
|
23
23
|
|
24
24
|
//#region src/runtime/authdocloader.test.ts
|
25
25
|
test("getAuthenticatedDocumentLoader()", async (t) => {
|