@fedify/fedify 1.8.1-pr.341.1218 → 1.8.1-pr.342.1228
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-BK9H6LF2.js → actor-B6Bq9yB3.js} +179 -179
- package/dist/{actor-B4TBtqRP.d.ts → actor-CWNAGvnO.d.ts} +2 -2
- package/dist/{actor--1VCqDSy.js → actor-Cy9vMAkW.js} +1 -1
- package/dist/{authdocloader-DZyNaIkJ.js → authdocloader-C_kM0hAU.js} +3 -3
- package/dist/{authdocloader-BrsCYz3Z.js → authdocloader-DgI4IeoI.js} +3 -3
- package/dist/{builder-CEi2DvC6.js → builder-Bi-tXZVk.js} +5 -5
- package/dist/{client-BQ4AQGKo.d.ts → client-B0IOer6B.d.ts} +1 -1
- package/dist/{client-UZMFRTjD.js → client-D_aSvZcE.js} +1 -1
- package/dist/compat/mod.d.ts +11 -11
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{context-Csbv_Ssv.d.ts → context-BNA3vzcr.d.ts} +82 -82
- package/dist/{docloader-BeCtcTOJ.d.ts → docloader-CLolPVL_.d.ts} +1 -1
- package/dist/{docloader-BfD11_Oz.js → docloader-DhCqQG54.js} +1 -1
- package/dist/{esm-CNnxiZTi.js → esm-Cpu7Q3EX.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 +10 -10
- package/dist/federation/mod.js +11 -11
- 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-BakrD-cZ.js → http-B1oURnc_.js} +3 -3
- package/dist/{http-BL6S1G0j.d.ts → http-COez3YdK.d.ts} +3 -3
- package/dist/{http-CejJhSZV.js → http-Cu0J7Np5.js} +2 -2
- package/dist/{inbox-SudNTK8c.js → inbox-h1zK-2Iz.js} +1 -1
- package/dist/{key-ml9S3B6m.js → key-BPculo0P.js} +3 -3
- package/dist/{key-CAyqqv4j.js → key-COqhdulo.js} +3 -3
- package/dist/{key-Bq3HZyiB.js → key-Ct7QzD9l.js} +4 -4
- package/dist/{key-UEPm-dbV.js → key-Dyu7mkQM.js} +3 -3
- package/dist/{keycache-CouyTsco.js → keycache-BbJrS_-E.js} +1 -1
- package/dist/{keys-DpkraO4A.js → keys-DRv5klbT.js} +1 -1
- package/dist/{kv-DDdb1hMa.d.ts → kv-BqOK6zss.d.ts} +1 -1
- package/dist/{ld-Df3jl2f1.js → ld-B-ZjKw3V.js} +2 -2
- package/dist/{lookup-8iXWvRpn.js → lookup-BhNUCFCv.js} +1 -1
- package/dist/{lookup-DS3kdQK-.js → lookup-QISb1cMX.js} +1 -1
- package/dist/{lookup-J_m4YZg0.d.ts → lookup-tSXYzgYs.d.ts} +1 -1
- package/dist/{middleware-DN_7hjdl.js → middleware-C3TfVbcu.js} +43 -43
- package/dist/middleware-C_RXM8ZV.js +26 -0
- package/dist/{middleware-BPTf3nIO.js → middleware-CffU_pXc.js} +39 -39
- package/dist/middleware-NXpVWnlB.js +17 -0
- package/dist/{mod-j0OCtlRW.d.ts → mod-Bf-mThHd.d.ts} +4 -4
- package/dist/{mod-BFwgZ7_K.d.ts → mod-C2jQirfr.d.ts} +2 -2
- package/dist/{mod-Dc_fDCtK.d.ts → mod-CxD6XXBN.d.ts} +5 -5
- package/dist/{mod-D8-liXFY.d.ts → mod-UTC30uNC.d.ts} +2 -2
- package/dist/mod.d.ts +13 -13
- package/dist/mod.js +11 -11
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.d.ts +3 -3
- 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-CEv_PfyK.d.ts → owner-BlxMNrL4.d.ts} +3 -3
- package/dist/{owner-BpT_9rAV.js → owner-C-3gpgMt.js} +2 -2
- package/dist/{proof-BlT9NtRI.js → proof--_-U8FW3.js} +4 -4
- package/dist/{proof-9BZrtvdc.js → proof-CjZdNDuQ.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.d.ts +5 -5
- 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-CYd_YHgs.js → send-DlPM9jbz.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.d.ts +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 +71 -71
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-C3vDRs_Z.js → testing-CEClDRWE.js} +2 -2
- package/dist/{transformers-ghwJuzGY.js → transformers-DJRB0yFF.js} +3 -3
- package/dist/{type-CmeXBKTg.js → type-joVrNBuz.js} +178 -178
- package/dist/{types-BSVWyYjm.js → types-AONsXvvs.js} +1 -1
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.d.ts +5 -5
- 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-By6mpzr-.d.ts → vocab-Cyrb7_co.d.ts} +1 -1
- package/dist/{vocab-Bwnko9RT.js → vocab-DUQaNF0D.js} +3 -3
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +1 -1
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.d.ts +14 -14
- package/dist/x/hono.js +2 -2
- package/dist/x/sveltekit.d.ts +11 -11
- package/dist/x/sveltekit.js +1 -1
- package/package.json +1 -1
- package/dist/middleware-CmHx6jl7.js +0 -26
- package/dist/middleware-DwYym-nd.js +0 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { GetUserAgentOptions } from "./docloader-
|
|
4
|
-
import { Application, Group, Organization, Person, Service } from "./vocab-
|
|
3
|
+
import { GetUserAgentOptions } from "./docloader-CLolPVL_.js";
|
|
4
|
+
import { Application, Group, Organization, Person, Service } from "./vocab-Cyrb7_co.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
7
|
//#region vocab/actor.d.ts
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Application, Group, Organization, Person, Service, deno_default, getTypeId, lookupWebFinger } from "./type-
|
|
6
|
+
import { Application, Group, Organization, Person, Service, deno_default, getTypeId, lookupWebFinger } from "./type-joVrNBuz.js";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { domainToASCII, domainToUnicode } from "node:url";
|
|
9
9
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-
|
|
7
|
-
import { validateCryptoKey } from "./key-
|
|
8
|
-
import { doubleKnock } from "./http-
|
|
6
|
+
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-joVrNBuz.js";
|
|
7
|
+
import { validateCryptoKey } from "./key-COqhdulo.js";
|
|
8
|
+
import { doubleKnock } from "./http-Cu0J7Np5.js";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
|
|
11
11
|
//#region runtime/authdocloader.ts
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-
|
|
6
|
-
import { validateCryptoKey } from "./key-
|
|
7
|
-
import { doubleKnock } from "./http-
|
|
5
|
+
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-DhCqQG54.js";
|
|
6
|
+
import { validateCryptoKey } from "./key-Dyu7mkQM.js";
|
|
7
|
+
import { doubleKnock } from "./http-B1oURnc_.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
|
|
10
10
|
//#region runtime/authdocloader.ts
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default, getTypeId } from "./type-
|
|
7
|
-
import { Router, RouterError } from "./lookup-
|
|
8
|
-
import { InboxListenerSet } from "./inbox-
|
|
6
|
+
import { deno_default, getTypeId } from "./type-joVrNBuz.js";
|
|
7
|
+
import { Router, RouterError } from "./lookup-QISb1cMX.js";
|
|
8
|
+
import { InboxListenerSet } from "./inbox-h1zK-2Iz.js";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
11
11
|
|
|
@@ -41,7 +41,7 @@ var FederationBuilderImpl = class {
|
|
|
41
41
|
this.collectionTypeIds = {};
|
|
42
42
|
}
|
|
43
43
|
async build(options) {
|
|
44
|
-
const { FederationImpl } = await import("./middleware-
|
|
44
|
+
const { FederationImpl } = await import("./middleware-C_RXM8ZV.js");
|
|
45
45
|
const f = new FederationImpl(options);
|
|
46
46
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
47
47
|
f.router = this.router.clone();
|
|
@@ -524,7 +524,7 @@ var FederationBuilderImpl = class {
|
|
|
524
524
|
/**
|
|
525
525
|
* Get the URL path for a custom collection.
|
|
526
526
|
* If the collection is not registered, returns null.
|
|
527
|
-
* @
|
|
527
|
+
* @template TParam The parameter names of the requested URL.
|
|
528
528
|
* @param {string | symbol} name The name of the custom collection.
|
|
529
529
|
* @param {TParam} values The values to fill in the URL parameters.
|
|
530
530
|
* @returns {string | null} The URL path for the custom collection, or null if not registered.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { GetUserAgentOptions } from "./docloader-
|
|
3
|
+
import { GetUserAgentOptions } from "./docloader-CLolPVL_.js";
|
|
4
4
|
|
|
5
5
|
//#region nodeinfo/semver.d.ts
|
|
6
6
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { getUserAgent } from "./type-
|
|
6
|
+
import { getUserAgent } from "./type-joVrNBuz.js";
|
|
7
7
|
import { parseSemVer } from "./semver-DCqorrj5.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
|
package/dist/compat/mod.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import "../kv-
|
|
4
|
-
import "../docloader-
|
|
5
|
-
import "../client-
|
|
6
|
-
import "../vocab-
|
|
7
|
-
import "../actor-
|
|
8
|
-
import "../http-
|
|
9
|
-
import "../owner-
|
|
10
|
-
import "../mod-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { ActivityTransformer } from "../context-
|
|
3
|
+
import "../kv-BqOK6zss.js";
|
|
4
|
+
import "../docloader-CLolPVL_.js";
|
|
5
|
+
import "../client-B0IOer6B.js";
|
|
6
|
+
import "../vocab-Cyrb7_co.js";
|
|
7
|
+
import "../actor-CWNAGvnO.js";
|
|
8
|
+
import "../http-COez3YdK.js";
|
|
9
|
+
import "../owner-BlxMNrL4.js";
|
|
10
|
+
import "../mod-C2jQirfr.js";
|
|
11
|
+
import "../lookup-tSXYzgYs.js";
|
|
12
|
+
import { ActivityTransformer } from "../context-BNA3vzcr.js";
|
|
13
13
|
import "../mq-DYKDDJmp.js";
|
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-
|
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-CxD6XXBN.js";
|
|
15
15
|
export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
package/dist/compat/mod.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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
7
|
|
|
8
8
|
export { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
|
@@ -3,30 +3,30 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Follow, Person } from "../type-
|
|
6
|
+
import { Follow, Person } from "../type-joVrNBuz.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
|
11
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-
|
|
11
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-C3TfVbcu.js";
|
|
12
12
|
import "../semver-DCqorrj5.js";
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
13
|
+
import "../client-D_aSvZcE.js";
|
|
14
|
+
import "../lookup-QISb1cMX.js";
|
|
15
15
|
import "../types-n7HI7VFr.js";
|
|
16
|
-
import "../actor
|
|
17
|
-
import "../key-
|
|
18
|
-
import "../http-
|
|
19
|
-
import "../authdocloader-
|
|
20
|
-
import "../ld-
|
|
21
|
-
import "../owner-
|
|
22
|
-
import "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
16
|
+
import "../actor-Cy9vMAkW.js";
|
|
17
|
+
import "../key-COqhdulo.js";
|
|
18
|
+
import "../http-Cu0J7Np5.js";
|
|
19
|
+
import "../authdocloader-C_kM0hAU.js";
|
|
20
|
+
import "../ld-B-ZjKw3V.js";
|
|
21
|
+
import "../owner-C-3gpgMt.js";
|
|
22
|
+
import "../proof-CjZdNDuQ.js";
|
|
23
|
+
import "../inbox-h1zK-2Iz.js";
|
|
24
|
+
import "../builder-Bi-tXZVk.js";
|
|
25
25
|
import "../collection-D5V3UzU3.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-BbJrS_-E.js";
|
|
27
27
|
import "../retry-BnpVRGFC.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { test } from "../testing-
|
|
28
|
+
import "../send-DlPM9jbz.js";
|
|
29
|
+
import { test } from "../testing-CEClDRWE.js";
|
|
30
30
|
|
|
31
31
|
//#region compat/transformers.test.ts
|
|
32
32
|
const federation = new FederationImpl({ kv: new MemoryKvStore() });
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { KvKey, KvStore } from "./kv-
|
|
4
|
-
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-
|
|
5
|
-
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-
|
|
6
|
-
import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-
|
|
7
|
-
import { Actor, Recipient } from "./actor-
|
|
8
|
-
import { HttpMessageSignaturesSpec } from "./http-
|
|
9
|
-
import { GetKeyOwnerOptions } from "./owner-
|
|
10
|
-
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-
|
|
11
|
-
import { LookupWebFingerOptions, ResourceDescriptor } from "./lookup-
|
|
3
|
+
import { KvKey, KvStore } from "./kv-BqOK6zss.js";
|
|
4
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-CLolPVL_.js";
|
|
5
|
+
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-B0IOer6B.js";
|
|
6
|
+
import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-Cyrb7_co.js";
|
|
7
|
+
import { Actor, Recipient } from "./actor-CWNAGvnO.js";
|
|
8
|
+
import { HttpMessageSignaturesSpec } from "./http-COez3YdK.js";
|
|
9
|
+
import { GetKeyOwnerOptions } from "./owner-BlxMNrL4.js";
|
|
10
|
+
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-C2jQirfr.js";
|
|
11
|
+
import { LookupWebFingerOptions, ResourceDescriptor } from "./lookup-tSXYzgYs.js";
|
|
12
12
|
import { MessageQueue } from "./mq-DYKDDJmp.js";
|
|
13
13
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
14
14
|
|
|
@@ -70,13 +70,13 @@ interface SenderKeyPair {
|
|
|
70
70
|
/**
|
|
71
71
|
* A callback that dispatches a {@link NodeInfo} object.
|
|
72
72
|
*
|
|
73
|
-
* @
|
|
73
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
74
74
|
*/
|
|
75
75
|
type NodeInfoDispatcher<TContextData> = (context: RequestContext<TContextData>) => NodeInfo | Promise<NodeInfo>;
|
|
76
76
|
/**
|
|
77
77
|
* A callback that dispatches an {@link Actor} object.
|
|
78
78
|
*
|
|
79
|
-
* @
|
|
79
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
80
80
|
* @param context The request context.
|
|
81
81
|
* @param identifier The actor's internal identifier or username.
|
|
82
82
|
*/
|
|
@@ -84,7 +84,7 @@ type ActorDispatcher<TContextData> = (context: RequestContext<TContextData>, ide
|
|
|
84
84
|
/**
|
|
85
85
|
* A callback that dispatches key pairs for an actor.
|
|
86
86
|
*
|
|
87
|
-
* @
|
|
87
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
88
88
|
* @param context The context.
|
|
89
89
|
* @param identifier The actor's internal identifier or username.
|
|
90
90
|
* @returns The key pairs.
|
|
@@ -94,7 +94,7 @@ type ActorKeyPairsDispatcher<TContextData> = (context: Context<TContextData>, id
|
|
|
94
94
|
/**
|
|
95
95
|
* A callback that maps a WebFinger username to the corresponding actor's
|
|
96
96
|
* internal identifier, or `null` if the username is not found.
|
|
97
|
-
* @
|
|
97
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
98
98
|
* @param context The context.
|
|
99
99
|
* @param username The WebFinger username.
|
|
100
100
|
* @returns The actor's internal identifier, or `null` if the username is not
|
|
@@ -105,7 +105,7 @@ type ActorHandleMapper<TContextData> = (context: Context<TContextData>, username
|
|
|
105
105
|
/**
|
|
106
106
|
* A callback that maps a WebFinger query to the corresponding actor's
|
|
107
107
|
* internal identifier or username, or `null` if the query is not found.
|
|
108
|
-
* @
|
|
108
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
109
109
|
* @param context The request context.
|
|
110
110
|
* @param resource The URL that was queried through WebFinger.
|
|
111
111
|
* @returns The actor's internal identifier or username, or `null` if the query
|
|
@@ -124,20 +124,20 @@ type ActorAliasMapper<TContextData> = (context: RequestContext<TContextData>, re
|
|
|
124
124
|
/**
|
|
125
125
|
* A callback that dispatches an object.
|
|
126
126
|
*
|
|
127
|
-
* @
|
|
128
|
-
* @
|
|
129
|
-
* @
|
|
127
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
128
|
+
* @template TObject The type of object to dispatch.
|
|
129
|
+
* @template TParam The parameter names of the requested URL.
|
|
130
130
|
* @since 0.7.0
|
|
131
131
|
*/
|
|
132
132
|
type ObjectDispatcher<TContextData, TObject extends Object$1, TParam extends string> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => TObject | null | Promise<TObject | null>;
|
|
133
133
|
/**
|
|
134
134
|
* A callback that dispatches a collection.
|
|
135
135
|
*
|
|
136
|
-
* @
|
|
137
|
-
* @
|
|
136
|
+
* @template TItem The type of items in the collection.
|
|
137
|
+
* @template TContext The type of the context. {@link Context} or
|
|
138
138
|
* {@link RequestContext}.
|
|
139
|
-
* @
|
|
140
|
-
* @
|
|
139
|
+
* @template TContextData The context data to pass to the `TContext`.
|
|
140
|
+
* @template TFilter The type of the filter, if any.
|
|
141
141
|
* @param context The context.
|
|
142
142
|
* @param identifier The internal identifier or the username of the collection
|
|
143
143
|
* owner.
|
|
@@ -149,7 +149,7 @@ type CollectionDispatcher<TItem, TContext extends Context<TContextData>, TContex
|
|
|
149
149
|
/**
|
|
150
150
|
* A callback that counts the number of items in a collection.
|
|
151
151
|
*
|
|
152
|
-
* @
|
|
152
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
153
153
|
* @param context The context.
|
|
154
154
|
* @param identifier The internal identifier or the username of the collection
|
|
155
155
|
* owner.
|
|
@@ -159,10 +159,10 @@ type CollectionCounter<TContextData, TFilter> = (context: RequestContext<TContex
|
|
|
159
159
|
/**
|
|
160
160
|
* A callback that returns a cursor for a collection.
|
|
161
161
|
*
|
|
162
|
-
* @
|
|
162
|
+
* @template TContext The type of the context. {@link Context} or
|
|
163
163
|
* {@link RequestContext}.
|
|
164
|
-
* @
|
|
165
|
-
* @
|
|
164
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
165
|
+
* @template TFilter The type of the filter, if any.
|
|
166
166
|
* @param context The context.
|
|
167
167
|
* @param identifier The internal identifier or the username of the collection
|
|
168
168
|
* owner.
|
|
@@ -172,8 +172,8 @@ type CollectionCursor<TContext extends Context<TContextData>, TContextData, TFil
|
|
|
172
172
|
/**
|
|
173
173
|
* A callback that listens for activities in an inbox.
|
|
174
174
|
*
|
|
175
|
-
* @
|
|
176
|
-
* @
|
|
175
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
176
|
+
* @template TActivity The type of activity to listen for.
|
|
177
177
|
* @param context The inbox context.
|
|
178
178
|
* @param activity The activity that was received.
|
|
179
179
|
*/
|
|
@@ -181,7 +181,7 @@ type InboxListener<TContextData, TActivity extends Activity> = (context: InboxCo
|
|
|
181
181
|
/**
|
|
182
182
|
* A callback that handles errors in an inbox.
|
|
183
183
|
*
|
|
184
|
-
* @
|
|
184
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
185
185
|
* @param context The inbox context.
|
|
186
186
|
*/
|
|
187
187
|
type InboxErrorHandler<TContextData> = (context: Context<TContextData>, error: Error) => void | Promise<void>;
|
|
@@ -189,7 +189,7 @@ type InboxErrorHandler<TContextData> = (context: Context<TContextData>, error: E
|
|
|
189
189
|
* A callback that dispatches the key pair for the authenticated document loader
|
|
190
190
|
* of the {@link Context} passed to the shared inbox listener.
|
|
191
191
|
*
|
|
192
|
-
* @
|
|
192
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
193
193
|
* @param context The context.
|
|
194
194
|
* @returns The username or the internal identifier of the actor or the key pair
|
|
195
195
|
* for the authenticated document loader of the {@link Context} passed
|
|
@@ -222,7 +222,7 @@ type OutboxErrorHandler = (error: Error, activity: Activity | null) => void | Pr
|
|
|
222
222
|
/**
|
|
223
223
|
* A callback that determines if a request is authorized or not.
|
|
224
224
|
*
|
|
225
|
-
* @
|
|
225
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
226
226
|
* @param context The request context.
|
|
227
227
|
* @param identifier The internal identifier of the actor that is being requested.
|
|
228
228
|
* @param signedKey *Deprecated in Fedify 1.5.0 in favor of
|
|
@@ -242,8 +242,8 @@ type AuthorizePredicate<TContextData> = (context: RequestContext<TContextData>,
|
|
|
242
242
|
/**
|
|
243
243
|
* A callback that determines if a request is authorized or not.
|
|
244
244
|
*
|
|
245
|
-
* @
|
|
246
|
-
* @
|
|
245
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
246
|
+
* @template TParam The parameter names of the requested URL.
|
|
247
247
|
* @param context The request context.
|
|
248
248
|
* @param values The parameters of the requested URL.
|
|
249
249
|
* @param signedKey *Deprecated in Fedify 1.5.0 in favor of
|
|
@@ -263,12 +263,12 @@ type ObjectAuthorizePredicate<TContextData, TParam extends string> = (context: R
|
|
|
263
263
|
/**
|
|
264
264
|
* A callback that dispatches a custom collection.
|
|
265
265
|
*
|
|
266
|
-
* @
|
|
267
|
-
* @
|
|
268
|
-
* @
|
|
266
|
+
* @template TItem The type of items in the collection.
|
|
267
|
+
* @template TParams The parameter names of the requested URL.
|
|
268
|
+
* @template TContext The type of the context. {@link Context} or
|
|
269
269
|
* {@link RequestContext}.
|
|
270
|
-
* @
|
|
271
|
-
* @
|
|
270
|
+
* @template TContextData The context data to pass to the `TContext`.
|
|
271
|
+
* @template TFilter The type of the filter, if any.
|
|
272
272
|
* @param context The context.
|
|
273
273
|
* @param values The parameters of the requested URL.
|
|
274
274
|
* @param cursor The cursor to start the collection from, or `null` to dispatch
|
|
@@ -279,8 +279,8 @@ type CustomCollectionDispatcher<TItem, TParams extends Record<string, string>, T
|
|
|
279
279
|
/**
|
|
280
280
|
* A callback that counts the number of items in a custom collection.
|
|
281
281
|
*
|
|
282
|
-
* @
|
|
283
|
-
* @
|
|
282
|
+
* @template TParams The parameter names of the requested URL.
|
|
283
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
284
284
|
* @param context The context.
|
|
285
285
|
* @param values The parameters of the requested URL.
|
|
286
286
|
* @since 1.8.0
|
|
@@ -289,11 +289,11 @@ type CustomCollectionCounter<TParams extends Record<string, string>, TContextDat
|
|
|
289
289
|
/**
|
|
290
290
|
* A callback that returns a cursor for a custom collection.
|
|
291
291
|
*
|
|
292
|
-
* @
|
|
293
|
-
* @
|
|
292
|
+
* @template TParams The parameter names of the requested URL.
|
|
293
|
+
* @template TContext The type of the context. {@link Context} or
|
|
294
294
|
* {@link RequestContext}.
|
|
295
|
-
* @
|
|
296
|
-
* @
|
|
295
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
296
|
+
* @template TFilter The type of the filter, if any.
|
|
297
297
|
* @param context The context.
|
|
298
298
|
* @param values The parameters of the requested URL.
|
|
299
299
|
* @since 1.8.0
|
|
@@ -549,7 +549,7 @@ declare function createExponentialBackoffPolicy(options?: CreateExponentialBacko
|
|
|
549
549
|
//#region federation/middleware.d.ts
|
|
550
550
|
/**
|
|
551
551
|
* Options for {@link createFederation} function.
|
|
552
|
-
* @
|
|
552
|
+
* @template TContextData The type of the context data.
|
|
553
553
|
* @since 0.10.0
|
|
554
554
|
* @deprecated Use {@link FederationOptions} instead.
|
|
555
555
|
*/
|
|
@@ -653,7 +653,7 @@ interface FederationStartQueueOptions {
|
|
|
653
653
|
}
|
|
654
654
|
/**
|
|
655
655
|
* A common interface between {@link Federation} and {@link FederationBuilder}.
|
|
656
|
-
* @
|
|
656
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
657
657
|
* @since 1.6.0
|
|
658
658
|
*/
|
|
659
659
|
interface Federatable<TContextData> {
|
|
@@ -695,9 +695,9 @@ interface Federatable<TContextData> {
|
|
|
695
695
|
/**
|
|
696
696
|
* Registers an object dispatcher.
|
|
697
697
|
*
|
|
698
|
-
* @
|
|
699
|
-
* @
|
|
700
|
-
* @
|
|
698
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
699
|
+
* @template TObject The type of object to dispatch.
|
|
700
|
+
* @template TParam The parameter names of the requested URL.
|
|
701
701
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
702
702
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
703
703
|
* based on URI Template
|
|
@@ -711,9 +711,9 @@ interface Federatable<TContextData> {
|
|
|
711
711
|
/**
|
|
712
712
|
* Registers an object dispatcher.
|
|
713
713
|
*
|
|
714
|
-
* @
|
|
715
|
-
* @
|
|
716
|
-
* @
|
|
714
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
715
|
+
* @template TObject The type of object to dispatch.
|
|
716
|
+
* @template TParam The parameter names of the requested URL.
|
|
717
717
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
718
718
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
719
719
|
* based on URI Template
|
|
@@ -727,9 +727,9 @@ interface Federatable<TContextData> {
|
|
|
727
727
|
/**
|
|
728
728
|
* Registers an object dispatcher.
|
|
729
729
|
*
|
|
730
|
-
* @
|
|
731
|
-
* @
|
|
732
|
-
* @
|
|
730
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
731
|
+
* @template TObject The type of object to dispatch.
|
|
732
|
+
* @template TParam The parameter names of the requested URL.
|
|
733
733
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
734
734
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
735
735
|
* based on URI Template
|
|
@@ -743,9 +743,9 @@ interface Federatable<TContextData> {
|
|
|
743
743
|
/**
|
|
744
744
|
* Registers an object dispatcher.
|
|
745
745
|
*
|
|
746
|
-
* @
|
|
747
|
-
* @
|
|
748
|
-
* @
|
|
746
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
747
|
+
* @template TObject The type of object to dispatch.
|
|
748
|
+
* @template TParam The parameter names of the requested URL.
|
|
749
749
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
750
750
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
751
751
|
* based on URI Template
|
|
@@ -759,9 +759,9 @@ interface Federatable<TContextData> {
|
|
|
759
759
|
/**
|
|
760
760
|
* Registers an object dispatcher.
|
|
761
761
|
*
|
|
762
|
-
* @
|
|
763
|
-
* @
|
|
764
|
-
* @
|
|
762
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
763
|
+
* @template TObject The type of object to dispatch.
|
|
764
|
+
* @template TParam The parameter names of the requested URL.
|
|
765
765
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
766
766
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
767
767
|
* based on URI Template
|
|
@@ -775,9 +775,9 @@ interface Federatable<TContextData> {
|
|
|
775
775
|
/**
|
|
776
776
|
* Registers an object dispatcher.
|
|
777
777
|
*
|
|
778
|
-
* @
|
|
779
|
-
* @
|
|
780
|
-
* @
|
|
778
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
779
|
+
* @template TObject The type of object to dispatch.
|
|
780
|
+
* @template TParam The parameter names of the requested URL.
|
|
781
781
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
782
782
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
783
783
|
* based on URI Template
|
|
@@ -917,9 +917,9 @@ interface Federatable<TContextData> {
|
|
|
917
917
|
/**
|
|
918
918
|
* Registers a collection of objects dispatcher.
|
|
919
919
|
*
|
|
920
|
-
* @
|
|
921
|
-
* @
|
|
922
|
-
* @
|
|
920
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
921
|
+
* @template TObject The type of objects to dispatch.
|
|
922
|
+
* @template TParam The parameter names of the requested URL.
|
|
923
923
|
* @param name A unique name for the collection dispatcher.
|
|
924
924
|
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
925
925
|
* @param path The URI path pattern for the collection dispatcher.
|
|
@@ -932,9 +932,9 @@ interface Federatable<TContextData> {
|
|
|
932
932
|
/**
|
|
933
933
|
* Registers an ordered collection of objects dispatcher.
|
|
934
934
|
*
|
|
935
|
-
* @
|
|
936
|
-
* @
|
|
937
|
-
* @
|
|
935
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
936
|
+
* @template TObject The type of objects to dispatch.
|
|
937
|
+
* @template TParam The parameter names of the requested URL.
|
|
938
938
|
* @param name A unique name for the collection dispatcher.
|
|
939
939
|
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
940
940
|
* @param path The URI path pattern for the collection dispatcher.
|
|
@@ -951,7 +951,7 @@ interface Federatable<TContextData> {
|
|
|
951
951
|
*
|
|
952
952
|
* It also provides a middleware interface for handling requests before your
|
|
953
953
|
* web framework's router; see {@link Federation.fetch}.
|
|
954
|
-
* @
|
|
954
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
955
955
|
* @since 0.13.0
|
|
956
956
|
*/
|
|
957
957
|
interface Federation<TContextData> extends Federatable<TContextData> {
|
|
@@ -1010,7 +1010,7 @@ interface Federation<TContextData> extends Federatable<TContextData> {
|
|
|
1010
1010
|
* instantiation of the {@link Federation} object until the {@link build}
|
|
1011
1011
|
* method is called so that dispatchers and listeners can be registered
|
|
1012
1012
|
* before the {@link Federation} object is instantiated.
|
|
1013
|
-
* @
|
|
1013
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1014
1014
|
* @since 1.6.0
|
|
1015
1015
|
*/
|
|
1016
1016
|
interface FederationBuilder<TContextData> extends Federatable<TContextData> {
|
|
@@ -1022,7 +1022,7 @@ interface FederationBuilder<TContextData> extends Federatable<TContextData> {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
/**
|
|
1024
1024
|
* Options for creating a {@link Federation} object.
|
|
1025
|
-
* @
|
|
1025
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1026
1026
|
* @since 1.6.0
|
|
1027
1027
|
*/
|
|
1028
1028
|
interface FederationOptions<TContextData> {
|
|
@@ -1267,10 +1267,10 @@ interface ObjectCallbackSetters<TContextData, TObject extends Object$1, TParam e
|
|
|
1267
1267
|
/**
|
|
1268
1268
|
* Additional settings for a collection dispatcher.
|
|
1269
1269
|
*
|
|
1270
|
-
* @
|
|
1270
|
+
* @template TContext The type of the context. {@link Context} or
|
|
1271
1271
|
* {@link RequestContext}.
|
|
1272
|
-
* @
|
|
1273
|
-
* @
|
|
1272
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1273
|
+
* @template TFilter The type of filter for the collection.
|
|
1274
1274
|
*/
|
|
1275
1275
|
interface CollectionCallbackSetters<TContext extends Context<TContextData>, TContextData, TFilter> {
|
|
1276
1276
|
/**
|
|
@@ -1333,7 +1333,7 @@ interface InboxListenerSetters<TContextData> {
|
|
|
1333
1333
|
/**
|
|
1334
1334
|
* Parameters of {@link Federation.fetch} method.
|
|
1335
1335
|
*
|
|
1336
|
-
* @
|
|
1336
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1337
1337
|
* @since 0.6.0
|
|
1338
1338
|
*/
|
|
1339
1339
|
interface FederationFetchOptions<TContextData> {
|
|
@@ -1367,11 +1367,11 @@ interface FederationFetchOptions<TContextData> {
|
|
|
1367
1367
|
/**
|
|
1368
1368
|
* Additional settings for a custom collection dispatcher.
|
|
1369
1369
|
*
|
|
1370
|
-
* @
|
|
1371
|
-
* @
|
|
1370
|
+
* @template TParams The type of the parameters in the URL path.
|
|
1371
|
+
* @template TContext The type of the context. {@link Context} or
|
|
1372
1372
|
* {@link RequestContext}.
|
|
1373
|
-
* @
|
|
1374
|
-
* @
|
|
1373
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1374
|
+
* @template TFilter The type of filter for the collection.
|
|
1375
1375
|
*/
|
|
1376
1376
|
interface CustomCollectionCallbackSetters<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> {
|
|
1377
1377
|
/**
|
|
@@ -1404,7 +1404,7 @@ interface CustomCollectionCallbackSetters<TParams extends Record<string, string>
|
|
|
1404
1404
|
* Represents an object with a type ID, which is either a constructor or an
|
|
1405
1405
|
* instance of the object.
|
|
1406
1406
|
*
|
|
1407
|
-
* @
|
|
1407
|
+
* @template TObject The type of the object.
|
|
1408
1408
|
*/
|
|
1409
1409
|
type ConstructorWithTypeId<TObject extends Object$1> = (new (...args: any[]) => TObject) & {
|
|
1410
1410
|
typeId: URL;
|
|
@@ -1466,7 +1466,7 @@ type ParamPath<Param extends string> = `${string}{${Param}}${string}`;
|
|
|
1466
1466
|
/**
|
|
1467
1467
|
* Converts union types to intersection types.
|
|
1468
1468
|
*
|
|
1469
|
-
* @
|
|
1469
|
+
* @template U - The union type to convert.
|
|
1470
1470
|
* @returns The intersection type of the union.
|
|
1471
1471
|
* @example
|
|
1472
1472
|
* ```ts
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { __commonJS, __toESM } from "./type-
|
|
6
|
+
import { __commonJS, __toESM } from "./type-joVrNBuz.js";
|
|
7
7
|
|
|
8
8
|
//#region ../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
9
9
|
var require_glob_to_regexp = __commonJS({ "../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
|