@fedify/fedify 1.8.1-pr.339.1223 → 1.8.1-pr.339.1267
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/README.md +14 -11
- package/dist/{actor-B4TBtqRP.d.ts → actor-C2nhWp6O.d.ts} +3 -3
- package/dist/{actor-CB79AEUc.js → actor-CmkL94HP.js} +2 -2
- package/dist/{actor-DzraO78i.js → actor-aW87k6YP.js} +189 -189
- package/dist/{assert-DwEa6glZ.js → assert-MZs1qjMx.js} +2 -2
- package/dist/{assert_equals-C5gKCm6A.js → assert_equals-DSbWqCm3.js} +9 -9
- package/dist/{assert_instance_of-C9QtN-X9.js → assert_instance_of-DHz7EHNU.js} +2 -2
- package/dist/{assert_is_error-CeVBLPsZ.js → assert_is_error-BPGph1Jx.js} +2 -2
- package/dist/{assert_not_equals-D2R2nl5h.js → assert_not_equals-f3m3epl3.js} +2 -2
- package/dist/{assert_rejects-AjlKk-Vo.js → assert_rejects-DiIiJbZn.js} +4 -4
- package/dist/{assert_throws-CqMKbTh_.js → assert_throws-BOO88avQ.js} +3 -3
- package/dist/{authdocloader-9w4UWFGu.js → authdocloader-CSdMJ3OD.js} +4 -4
- package/dist/{authdocloader-CZbt-zus.js → authdocloader-CfZzF6aW.js} +4 -4
- package/dist/{builder-DqeW2NfK.js → builder-KOoy-ITr.js} +6 -6
- package/dist/{client-BQ4AQGKo.d.ts → client-D2tgjFk3.d.ts} +4 -4
- package/dist/{client-D8ECiMRC.js → client-DfttEsJO.js} +3 -3
- package/dist/{collection-D5V3UzU3.js → collection-CSzG2j1P.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-Csbv_Ssv.d.ts → context-BBD2ZH_P.d.ts} +95 -95
- package/dist/{denokv-DK9P5Jq7.js → denokv-2x6-IpXO.js} +1 -1
- package/dist/{docloader-Dko90hhf.js → docloader-BCgyiRag.js} +34 -34
- package/dist/{docloader-BeCtcTOJ.d.ts → docloader-Bz56sKV5.d.ts} +2 -2
- package/dist/{esm-BcNnrbSt.js → esm-BwBAFDMZ.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-C44ekWNP.js → federation-CMX7WzeL.js} +2 -2
- package/dist/{http-DJZoomhf.js → http-B1ff1viM.js} +4 -4
- package/dist/{http-DtRd__2b.js → http-BUhvpgNR.js} +3 -3
- package/dist/{http-BL6S1G0j.d.ts → http-l4uEvaAw.d.ts} +5 -5
- package/dist/{inbox-BkgXcbh1.js → inbox-CJoj4ew9.js} +2 -2
- package/dist/{key-BrnILBxz.js → key-B9HDRSYF.js} +4 -4
- package/dist/{key-Crm3TsZ2.js → key-Bycq40gh.js} +4 -4
- package/dist/{key-Bax5Sopu.js → key-D-lyguVw.js} +3 -3
- package/dist/{key-CFc9faD4.js → key-Dytvox0s.js} +4 -4
- package/dist/{keycache-CYB-S-yN.js → keycache-DRL-euZL.js} +2 -2
- package/dist/{keys-DH4KqO28.js → keys-3qmW6xNM.js} +2 -2
- package/dist/{kv-DDdb1hMa.d.ts → kv-C7sopW2E.d.ts} +2 -2
- package/dist/{kv-D7Yt6pnB.js → kv-CRZrzyXm.js} +1 -1
- package/dist/{ld-BFU5cPI-.js → ld-DCy3fb6F.js} +3 -3
- package/dist/{lookup-tAXRzrWm.js → lookup-B0kqr1YK.js} +4 -4
- package/dist/{lookup-J_m4YZg0.d.ts → lookup-BJelGpWr.d.ts} +3 -3
- package/dist/{lookup-DVKVaXLA.js → lookup-gra7DAIV.js} +2 -2
- package/dist/middleware-B8IJYZA9.js +17 -0
- package/dist/{middleware-Cv5Hwaiq.js → middleware-CAzmuaK9.js} +53 -53
- package/dist/{middleware-C7VFLIDZ.js → middleware-CWKaURv5.js} +51 -51
- package/dist/middleware-D8Av026r.js +26 -0
- package/dist/{mod-BFwgZ7_K.d.ts → mod-D79SaXL-.d.ts} +6 -6
- package/dist/{mod-Dc_fDCtK.d.ts → mod-DDwnlIlm.d.ts} +6 -6
- package/dist/{mod-D8-liXFY.d.ts → mod-DM7ZpXF4.d.ts} +4 -4
- package/dist/{mod-j0OCtlRW.d.ts → mod-DwquBB1g.d.ts} +6 -6
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/{mq-DYKDDJmp.d.ts → mq-CRGm1e_F.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-C9J9KW9l.js → owner-DExszVkD.js} +3 -3
- package/dist/{owner-CEv_PfyK.d.ts → owner-fFqUg4lq.d.ts} +4 -4
- package/dist/{proof-BWeV09ZD.js → proof-Cnxcwp1a.js} +4 -4
- package/dist/{proof-BZywF9va.js → proof-DY_ZcCZq.js} +7 -7
- package/dist/{retry-BnpVRGFC.js → retry-D4GJ670a.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-DCqorrj5.js → semver-dArNLkR9.js} +1 -1
- package/dist/{send-C3Es32HL.js → send-ovNk9TQg.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-BQdmxyzF.js → std__assert-X-_kMxKM.js} +6 -6
- package/dist/testing/docloader.test.js +12 -12
- package/dist/testing/mod.d.ts +90 -90
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-CYMIJPbF.js → testing-Ddk8H2Ez.js} +5 -5
- package/dist/{transformers-ghwJuzGY.js → transformers-Dna8Fg7k.js} +4 -4
- package/dist/{type-Cv-2McVu.js → type-C4M92j6x.js} +221 -221
- package/dist/{types-n7HI7VFr.js → types-BIgY6c-l.js} +2 -2
- package/dist/{types-DNJjUEG0.js → types-C0RmUAha.js} +4 -4
- 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-By6mpzr-.d.ts → vocab-CA7YwVEz.d.ts} +3 -3
- package/dist/{vocab-C6a42Zlb.js → vocab-DyLqaidG.js} +6 -6
- 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 +16 -16
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.d.ts +13 -13
- package/dist/x/sveltekit.js +2 -2
- package/package.json +3 -3
- package/dist/middleware-BtixRKu5.js +0 -17
- package/dist/middleware-DRVxz0CE.js +0 -26
- /package/dist/{vocab → src/vocab}/accept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/activity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/add.yaml +0 -0
- /package/dist/{vocab → src/vocab}/announce.yaml +0 -0
- /package/dist/{vocab → src/vocab}/application.yaml +0 -0
- /package/dist/{vocab → src/vocab}/arrive.yaml +0 -0
- /package/dist/{vocab → src/vocab}/article.yaml +0 -0
- /package/dist/{vocab → src/vocab}/audio.yaml +0 -0
- /package/dist/{vocab → src/vocab}/block.yaml +0 -0
- /package/dist/{vocab → src/vocab}/chatmessage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/create.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dataintegrityproof.yaml +0 -0
- /package/dist/{vocab → src/vocab}/delete.yaml +0 -0
- /package/dist/{vocab → src/vocab}/didservice.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dislike.yaml +0 -0
- /package/dist/{vocab → src/vocab}/document.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emoji.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emojireact.yaml +0 -0
- /package/dist/{vocab → src/vocab}/endpoints.yaml +0 -0
- /package/dist/{vocab → src/vocab}/event.yaml +0 -0
- /package/dist/{vocab → src/vocab}/export.yaml +0 -0
- /package/dist/{vocab → src/vocab}/flag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/follow.yaml +0 -0
- /package/dist/{vocab → src/vocab}/group.yaml +0 -0
- /package/dist/{vocab → src/vocab}/hashtag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/ignore.yaml +0 -0
- /package/dist/{vocab → src/vocab}/image.yaml +0 -0
- /package/dist/{vocab → src/vocab}/intransitiveactivity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/invite.yaml +0 -0
- /package/dist/{vocab → src/vocab}/join.yaml +0 -0
- /package/dist/{vocab → src/vocab}/key.yaml +0 -0
- /package/dist/{vocab → src/vocab}/leave.yaml +0 -0
- /package/dist/{vocab → src/vocab}/like.yaml +0 -0
- /package/dist/{vocab → src/vocab}/link.yaml +0 -0
- /package/dist/{vocab → src/vocab}/listen.yaml +0 -0
- /package/dist/{vocab → src/vocab}/mention.yaml +0 -0
- /package/dist/{vocab → src/vocab}/move.yaml +0 -0
- /package/dist/{vocab → src/vocab}/multikey.yaml +0 -0
- /package/dist/{vocab → src/vocab}/note.yaml +0 -0
- /package/dist/{vocab → src/vocab}/object.yaml +0 -0
- /package/dist/{vocab → src/vocab}/offer.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/organization.yaml +0 -0
- /package/dist/{vocab → src/vocab}/page.yaml +0 -0
- /package/dist/{vocab → src/vocab}/person.yaml +0 -0
- /package/dist/{vocab → src/vocab}/place.yaml +0 -0
- /package/dist/{vocab → src/vocab}/profile.yaml +0 -0
- /package/dist/{vocab → src/vocab}/propertyvalue.yaml +0 -0
- /package/dist/{vocab → src/vocab}/question.yaml +0 -0
- /package/dist/{vocab → src/vocab}/read.yaml +0 -0
- /package/dist/{vocab → src/vocab}/reject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/relationship.yaml +0 -0
- /package/dist/{vocab → src/vocab}/remove.yaml +0 -0
- /package/dist/{vocab → src/vocab}/service.yaml +0 -0
- /package/dist/{vocab → src/vocab}/source.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativeaccept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativereject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tombstone.yaml +0 -0
- /package/dist/{vocab → src/vocab}/travel.yaml +0 -0
- /package/dist/{vocab → src/vocab}/undo.yaml +0 -0
- /package/dist/{vocab → src/vocab}/update.yaml +0 -0
- /package/dist/{vocab → src/vocab}/video.yaml +0 -0
- /package/dist/{vocab → src/vocab}/view.yaml +0 -0
package/dist/testing/mod.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
import { LanguageTag } from "@phensley/language-tag";
|
|
6
6
|
|
|
7
|
-
//#region runtime/docloader.d.ts
|
|
7
|
+
//#region src/runtime/docloader.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* A remote JSON-LD document and its context fetched by
|
|
10
10
|
* a {@link DocumentLoader}.
|
|
@@ -59,7 +59,7 @@ interface GetUserAgentOptions {
|
|
|
59
59
|
* @since 1.3.0
|
|
60
60
|
*/
|
|
61
61
|
//#endregion
|
|
62
|
-
//#region nodeinfo/semver.d.ts
|
|
62
|
+
//#region src/nodeinfo/semver.d.ts
|
|
63
63
|
/**
|
|
64
64
|
* A SemVer object parsed into its constituent parts.
|
|
65
65
|
* @since 1.2.0
|
|
@@ -85,7 +85,7 @@ interface SemVer {
|
|
|
85
85
|
build?: string[];
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
|
-
//#region nodeinfo/types.d.ts
|
|
88
|
+
//#region src/nodeinfo/types.d.ts
|
|
89
89
|
/**
|
|
90
90
|
* The type of the result of parsing JSON.
|
|
91
91
|
*/
|
|
@@ -217,7 +217,7 @@ interface Usage {
|
|
|
217
217
|
* @throws {TypeError} If the {@link NodeInfo} object is invalid.
|
|
218
218
|
*/
|
|
219
219
|
//#endregion
|
|
220
|
-
//#region nodeinfo/client.d.ts
|
|
220
|
+
//#region src/nodeinfo/client.d.ts
|
|
221
221
|
/**
|
|
222
222
|
* Options for {@link getNodeInfo} function.
|
|
223
223
|
* @since 1.2.0
|
|
@@ -264,7 +264,7 @@ interface GetNodeInfoOptions {
|
|
|
264
264
|
* @since 1.2.0
|
|
265
265
|
*/
|
|
266
266
|
//#endregion
|
|
267
|
-
//#region runtime/langstr.d.ts
|
|
267
|
+
//#region src/runtime/langstr.d.ts
|
|
268
268
|
/**
|
|
269
269
|
* A language-tagged string which corresponds to the `rdf:langString` type.
|
|
270
270
|
*/
|
|
@@ -279,7 +279,7 @@ declare class LanguageString extends String {
|
|
|
279
279
|
constructor(value: string, language: LanguageTag | string);
|
|
280
280
|
}
|
|
281
281
|
//#endregion
|
|
282
|
-
//#region vocab/vocab.d.ts
|
|
282
|
+
//#region src/vocab/vocab.d.ts
|
|
283
283
|
/** Describes an object of any kind. The Object type serves as the base type for
|
|
284
284
|
* most of the other kinds of objects defined in the Activity Vocabulary,
|
|
285
285
|
* including other Core types such as {@link Activity},
|
|
@@ -6556,7 +6556,7 @@ declare class Source {
|
|
|
6556
6556
|
* the acceptance is tentative.
|
|
6557
6557
|
*/
|
|
6558
6558
|
//#endregion
|
|
6559
|
-
//#region vocab/actor.d.ts
|
|
6559
|
+
//#region src/vocab/actor.d.ts
|
|
6560
6560
|
/**
|
|
6561
6561
|
* Actor types are {@link Object} types that are capable of performing
|
|
6562
6562
|
* activities.
|
|
@@ -6593,7 +6593,7 @@ interface Recipient {
|
|
|
6593
6593
|
} | null;
|
|
6594
6594
|
}
|
|
6595
6595
|
//#endregion
|
|
6596
|
-
//#region sig/owner.d.ts
|
|
6596
|
+
//#region src/sig/owner.d.ts
|
|
6597
6597
|
/**
|
|
6598
6598
|
* Options for {@link getKeyOwner}.
|
|
6599
6599
|
* @since 0.8.0
|
|
@@ -6625,7 +6625,7 @@ interface GetKeyOwnerOptions {
|
|
|
6625
6625
|
* @since 0.7.0
|
|
6626
6626
|
*/
|
|
6627
6627
|
//#endregion
|
|
6628
|
-
//#region vocab/lookup.d.ts
|
|
6628
|
+
//#region src/vocab/lookup.d.ts
|
|
6629
6629
|
/**
|
|
6630
6630
|
* Options for the {@link lookupObject} function.
|
|
6631
6631
|
*
|
|
@@ -6736,7 +6736,7 @@ interface TraverseCollectionOptions {
|
|
|
6736
6736
|
* @since 1.1.0
|
|
6737
6737
|
*/
|
|
6738
6738
|
//#endregion
|
|
6739
|
-
//#region webfinger/jrd.d.ts
|
|
6739
|
+
//#region src/webfinger/jrd.d.ts
|
|
6740
6740
|
/**
|
|
6741
6741
|
* Describes a resource. See also
|
|
6742
6742
|
* [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
|
|
@@ -6789,7 +6789,7 @@ interface Link$1 {
|
|
|
6789
6789
|
properties?: Record<string, string>;
|
|
6790
6790
|
}
|
|
6791
6791
|
//#endregion
|
|
6792
|
-
//#region webfinger/lookup.d.ts
|
|
6792
|
+
//#region src/webfinger/lookup.d.ts
|
|
6793
6793
|
/**
|
|
6794
6794
|
* Options for {@link lookupWebFinger}.
|
|
6795
6795
|
* @since 1.3.0
|
|
@@ -6831,7 +6831,7 @@ interface LookupWebFingerOptions {
|
|
|
6831
6831
|
* @since 0.2.0
|
|
6832
6832
|
*/
|
|
6833
6833
|
//#endregion
|
|
6834
|
-
//#region federation/collection.d.ts
|
|
6834
|
+
//#region src/federation/collection.d.ts
|
|
6835
6835
|
/**
|
|
6836
6836
|
* A page of items.
|
|
6837
6837
|
*/
|
|
@@ -6849,7 +6849,7 @@ interface PageItems<TItem> {
|
|
|
6849
6849
|
*/
|
|
6850
6850
|
|
|
6851
6851
|
//#endregion
|
|
6852
|
-
//#region federation/send.d.ts
|
|
6852
|
+
//#region src/federation/send.d.ts
|
|
6853
6853
|
/**
|
|
6854
6854
|
* A key pair for an actor who sends an activity.
|
|
6855
6855
|
* @since 0.10.0
|
|
@@ -6868,17 +6868,17 @@ interface SenderKeyPair {
|
|
|
6868
6868
|
* Parameters for {@link sendActivity}.
|
|
6869
6869
|
*/
|
|
6870
6870
|
//#endregion
|
|
6871
|
-
//#region federation/callback.d.ts
|
|
6871
|
+
//#region src/federation/callback.d.ts
|
|
6872
6872
|
/**
|
|
6873
6873
|
* A callback that dispatches a {@link NodeInfo} object.
|
|
6874
6874
|
*
|
|
6875
|
-
* @
|
|
6875
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6876
6876
|
*/
|
|
6877
6877
|
type NodeInfoDispatcher<TContextData> = (context: RequestContext<TContextData>) => NodeInfo | Promise<NodeInfo>;
|
|
6878
6878
|
/**
|
|
6879
6879
|
* A callback that dispatches an {@link Actor} object.
|
|
6880
6880
|
*
|
|
6881
|
-
* @
|
|
6881
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6882
6882
|
* @param context The request context.
|
|
6883
6883
|
* @param identifier The actor's internal identifier or username.
|
|
6884
6884
|
*/
|
|
@@ -6886,7 +6886,7 @@ type ActorDispatcher<TContextData> = (context: RequestContext<TContextData>, ide
|
|
|
6886
6886
|
/**
|
|
6887
6887
|
* A callback that dispatches key pairs for an actor.
|
|
6888
6888
|
*
|
|
6889
|
-
* @
|
|
6889
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6890
6890
|
* @param context The context.
|
|
6891
6891
|
* @param identifier The actor's internal identifier or username.
|
|
6892
6892
|
* @returns The key pairs.
|
|
@@ -6896,7 +6896,7 @@ type ActorKeyPairsDispatcher<TContextData> = (context: Context<TContextData>, id
|
|
|
6896
6896
|
/**
|
|
6897
6897
|
* A callback that maps a WebFinger username to the corresponding actor's
|
|
6898
6898
|
* internal identifier, or `null` if the username is not found.
|
|
6899
|
-
* @
|
|
6899
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6900
6900
|
* @param context The context.
|
|
6901
6901
|
* @param username The WebFinger username.
|
|
6902
6902
|
* @returns The actor's internal identifier, or `null` if the username is not
|
|
@@ -6907,7 +6907,7 @@ type ActorHandleMapper<TContextData> = (context: Context<TContextData>, username
|
|
|
6907
6907
|
/**
|
|
6908
6908
|
* A callback that maps a WebFinger query to the corresponding actor's
|
|
6909
6909
|
* internal identifier or username, or `null` if the query is not found.
|
|
6910
|
-
* @
|
|
6910
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6911
6911
|
* @param context The request context.
|
|
6912
6912
|
* @param resource The URL that was queried through WebFinger.
|
|
6913
6913
|
* @returns The actor's internal identifier or username, or `null` if the query
|
|
@@ -6926,20 +6926,20 @@ type ActorAliasMapper<TContextData> = (context: RequestContext<TContextData>, re
|
|
|
6926
6926
|
/**
|
|
6927
6927
|
* A callback that dispatches an object.
|
|
6928
6928
|
*
|
|
6929
|
-
* @
|
|
6930
|
-
* @
|
|
6931
|
-
* @
|
|
6929
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6930
|
+
* @template TObject The type of object to dispatch.
|
|
6931
|
+
* @template TParam The parameter names of the requested URL.
|
|
6932
6932
|
* @since 0.7.0
|
|
6933
6933
|
*/
|
|
6934
6934
|
type ObjectDispatcher<TContextData, TObject extends Object$1, TParam extends string> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => TObject | null | Promise<TObject | null>;
|
|
6935
6935
|
/**
|
|
6936
6936
|
* A callback that dispatches a collection.
|
|
6937
6937
|
*
|
|
6938
|
-
* @
|
|
6939
|
-
* @
|
|
6938
|
+
* @template TItem The type of items in the collection.
|
|
6939
|
+
* @template TContext The type of the context. {@link Context} or
|
|
6940
6940
|
* {@link RequestContext}.
|
|
6941
|
-
* @
|
|
6942
|
-
* @
|
|
6941
|
+
* @template TContextData The context data to pass to the `TContext`.
|
|
6942
|
+
* @template TFilter The type of the filter, if any.
|
|
6943
6943
|
* @param context The context.
|
|
6944
6944
|
* @param identifier The internal identifier or the username of the collection
|
|
6945
6945
|
* owner.
|
|
@@ -6951,7 +6951,7 @@ type CollectionDispatcher<TItem, TContext extends Context<TContextData>, TContex
|
|
|
6951
6951
|
/**
|
|
6952
6952
|
* A callback that counts the number of items in a collection.
|
|
6953
6953
|
*
|
|
6954
|
-
* @
|
|
6954
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6955
6955
|
* @param context The context.
|
|
6956
6956
|
* @param identifier The internal identifier or the username of the collection
|
|
6957
6957
|
* owner.
|
|
@@ -6961,10 +6961,10 @@ type CollectionCounter<TContextData, TFilter> = (context: RequestContext<TContex
|
|
|
6961
6961
|
/**
|
|
6962
6962
|
* A callback that returns a cursor for a collection.
|
|
6963
6963
|
*
|
|
6964
|
-
* @
|
|
6964
|
+
* @template TContext The type of the context. {@link Context} or
|
|
6965
6965
|
* {@link RequestContext}.
|
|
6966
|
-
* @
|
|
6967
|
-
* @
|
|
6966
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6967
|
+
* @template TFilter The type of the filter, if any.
|
|
6968
6968
|
* @param context The context.
|
|
6969
6969
|
* @param identifier The internal identifier or the username of the collection
|
|
6970
6970
|
* owner.
|
|
@@ -6974,8 +6974,8 @@ type CollectionCursor<TContext extends Context<TContextData>, TContextData, TFil
|
|
|
6974
6974
|
/**
|
|
6975
6975
|
* A callback that listens for activities in an inbox.
|
|
6976
6976
|
*
|
|
6977
|
-
* @
|
|
6978
|
-
* @
|
|
6977
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6978
|
+
* @template TActivity The type of activity to listen for.
|
|
6979
6979
|
* @param context The inbox context.
|
|
6980
6980
|
* @param activity The activity that was received.
|
|
6981
6981
|
*/
|
|
@@ -6983,7 +6983,7 @@ type InboxListener<TContextData, TActivity extends Activity> = (context: InboxCo
|
|
|
6983
6983
|
/**
|
|
6984
6984
|
* A callback that handles errors in an inbox.
|
|
6985
6985
|
*
|
|
6986
|
-
* @
|
|
6986
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6987
6987
|
* @param context The inbox context.
|
|
6988
6988
|
*/
|
|
6989
6989
|
type InboxErrorHandler<TContextData> = (context: Context<TContextData>, error: Error) => void | Promise<void>;
|
|
@@ -6991,7 +6991,7 @@ type InboxErrorHandler<TContextData> = (context: Context<TContextData>, error: E
|
|
|
6991
6991
|
* A callback that dispatches the key pair for the authenticated document loader
|
|
6992
6992
|
* of the {@link Context} passed to the shared inbox listener.
|
|
6993
6993
|
*
|
|
6994
|
-
* @
|
|
6994
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
6995
6995
|
* @param context The context.
|
|
6996
6996
|
* @returns The username or the internal identifier of the actor or the key pair
|
|
6997
6997
|
* for the authenticated document loader of the {@link Context} passed
|
|
@@ -7024,7 +7024,7 @@ type SharedInboxKeyDispatcher<TContextData> = (context: Context<TContextData>) =
|
|
|
7024
7024
|
/**
|
|
7025
7025
|
* A callback that determines if a request is authorized or not.
|
|
7026
7026
|
*
|
|
7027
|
-
* @
|
|
7027
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7028
7028
|
* @param context The request context.
|
|
7029
7029
|
* @param identifier The internal identifier of the actor that is being requested.
|
|
7030
7030
|
* @param signedKey *Deprecated in Fedify 1.5.0 in favor of
|
|
@@ -7044,8 +7044,8 @@ type AuthorizePredicate<TContextData> = (context: RequestContext<TContextData>,
|
|
|
7044
7044
|
/**
|
|
7045
7045
|
* A callback that determines if a request is authorized or not.
|
|
7046
7046
|
*
|
|
7047
|
-
* @
|
|
7048
|
-
* @
|
|
7047
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7048
|
+
* @template TParam The parameter names of the requested URL.
|
|
7049
7049
|
* @param context The request context.
|
|
7050
7050
|
* @param values The parameters of the requested URL.
|
|
7051
7051
|
* @param signedKey *Deprecated in Fedify 1.5.0 in favor of
|
|
@@ -7065,12 +7065,12 @@ type ObjectAuthorizePredicate<TContextData, TParam extends string> = (context: R
|
|
|
7065
7065
|
/**
|
|
7066
7066
|
* A callback that dispatches a custom collection.
|
|
7067
7067
|
*
|
|
7068
|
-
* @
|
|
7069
|
-
* @
|
|
7070
|
-
* @
|
|
7068
|
+
* @template TItem The type of items in the collection.
|
|
7069
|
+
* @template TParams The parameter names of the requested URL.
|
|
7070
|
+
* @template TContext The type of the context. {@link Context} or
|
|
7071
7071
|
* {@link RequestContext}.
|
|
7072
|
-
* @
|
|
7073
|
-
* @
|
|
7072
|
+
* @template TContextData The context data to pass to the `TContext`.
|
|
7073
|
+
* @template TFilter The type of the filter, if any.
|
|
7074
7074
|
* @param context The context.
|
|
7075
7075
|
* @param values The parameters of the requested URL.
|
|
7076
7076
|
* @param cursor The cursor to start the collection from, or `null` to dispatch
|
|
@@ -7081,8 +7081,8 @@ type CustomCollectionDispatcher<TItem, TParams extends Record<string, string>, T
|
|
|
7081
7081
|
/**
|
|
7082
7082
|
* A callback that counts the number of items in a custom collection.
|
|
7083
7083
|
*
|
|
7084
|
-
* @
|
|
7085
|
-
* @
|
|
7084
|
+
* @template TParams The parameter names of the requested URL.
|
|
7085
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7086
7086
|
* @param context The context.
|
|
7087
7087
|
* @param values The parameters of the requested URL.
|
|
7088
7088
|
* @since 1.8.0
|
|
@@ -7091,18 +7091,18 @@ type CustomCollectionCounter<TParams extends Record<string, string>, TContextDat
|
|
|
7091
7091
|
/**
|
|
7092
7092
|
* A callback that returns a cursor for a custom collection.
|
|
7093
7093
|
*
|
|
7094
|
-
* @
|
|
7095
|
-
* @
|
|
7094
|
+
* @template TParams The parameter names of the requested URL.
|
|
7095
|
+
* @template TContext The type of the context. {@link Context} or
|
|
7096
7096
|
* {@link RequestContext}.
|
|
7097
|
-
* @
|
|
7098
|
-
* @
|
|
7097
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7098
|
+
* @template TFilter The type of the filter, if any.
|
|
7099
7099
|
* @param context The context.
|
|
7100
7100
|
* @param values The parameters of the requested URL.
|
|
7101
7101
|
* @since 1.8.0
|
|
7102
7102
|
*/
|
|
7103
7103
|
type CustomCollectionCursor<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: TParams) => string | null | Promise<string | null>;
|
|
7104
7104
|
//#endregion
|
|
7105
|
-
//#region federation/queue.d.ts
|
|
7105
|
+
//#region src/federation/queue.d.ts
|
|
7106
7106
|
interface SenderKeyJwkPair {
|
|
7107
7107
|
keyId: string;
|
|
7108
7108
|
privateKey: JsonWebKey;
|
|
@@ -7158,7 +7158,7 @@ interface InboxMessage {
|
|
|
7158
7158
|
traceContext: Record<string, string>;
|
|
7159
7159
|
}
|
|
7160
7160
|
//#endregion
|
|
7161
|
-
//#region federation/federation.d.ts
|
|
7161
|
+
//#region src/federation/federation.d.ts
|
|
7162
7162
|
/**
|
|
7163
7163
|
* Options for {@link Federation.startQueue} method.
|
|
7164
7164
|
* @since 1.0.0
|
|
@@ -7178,7 +7178,7 @@ interface FederationStartQueueOptions {
|
|
|
7178
7178
|
}
|
|
7179
7179
|
/**
|
|
7180
7180
|
* A common interface between {@link Federation} and {@link FederationBuilder}.
|
|
7181
|
-
* @
|
|
7181
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7182
7182
|
* @since 1.6.0
|
|
7183
7183
|
*/
|
|
7184
7184
|
interface Federatable<TContextData> {
|
|
@@ -7220,9 +7220,9 @@ interface Federatable<TContextData> {
|
|
|
7220
7220
|
/**
|
|
7221
7221
|
* Registers an object dispatcher.
|
|
7222
7222
|
*
|
|
7223
|
-
* @
|
|
7224
|
-
* @
|
|
7225
|
-
* @
|
|
7223
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7224
|
+
* @template TObject The type of object to dispatch.
|
|
7225
|
+
* @template TParam The parameter names of the requested URL.
|
|
7226
7226
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
7227
7227
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
7228
7228
|
* based on URI Template
|
|
@@ -7236,9 +7236,9 @@ interface Federatable<TContextData> {
|
|
|
7236
7236
|
/**
|
|
7237
7237
|
* Registers an object dispatcher.
|
|
7238
7238
|
*
|
|
7239
|
-
* @
|
|
7240
|
-
* @
|
|
7241
|
-
* @
|
|
7239
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7240
|
+
* @template TObject The type of object to dispatch.
|
|
7241
|
+
* @template TParam The parameter names of the requested URL.
|
|
7242
7242
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
7243
7243
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
7244
7244
|
* based on URI Template
|
|
@@ -7252,9 +7252,9 @@ interface Federatable<TContextData> {
|
|
|
7252
7252
|
/**
|
|
7253
7253
|
* Registers an object dispatcher.
|
|
7254
7254
|
*
|
|
7255
|
-
* @
|
|
7256
|
-
* @
|
|
7257
|
-
* @
|
|
7255
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7256
|
+
* @template TObject The type of object to dispatch.
|
|
7257
|
+
* @template TParam The parameter names of the requested URL.
|
|
7258
7258
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
7259
7259
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
7260
7260
|
* based on URI Template
|
|
@@ -7268,9 +7268,9 @@ interface Federatable<TContextData> {
|
|
|
7268
7268
|
/**
|
|
7269
7269
|
* Registers an object dispatcher.
|
|
7270
7270
|
*
|
|
7271
|
-
* @
|
|
7272
|
-
* @
|
|
7273
|
-
* @
|
|
7271
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7272
|
+
* @template TObject The type of object to dispatch.
|
|
7273
|
+
* @template TParam The parameter names of the requested URL.
|
|
7274
7274
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
7275
7275
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
7276
7276
|
* based on URI Template
|
|
@@ -7284,9 +7284,9 @@ interface Federatable<TContextData> {
|
|
|
7284
7284
|
/**
|
|
7285
7285
|
* Registers an object dispatcher.
|
|
7286
7286
|
*
|
|
7287
|
-
* @
|
|
7288
|
-
* @
|
|
7289
|
-
* @
|
|
7287
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7288
|
+
* @template TObject The type of object to dispatch.
|
|
7289
|
+
* @template TParam The parameter names of the requested URL.
|
|
7290
7290
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
7291
7291
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
7292
7292
|
* based on URI Template
|
|
@@ -7300,9 +7300,9 @@ interface Federatable<TContextData> {
|
|
|
7300
7300
|
/**
|
|
7301
7301
|
* Registers an object dispatcher.
|
|
7302
7302
|
*
|
|
7303
|
-
* @
|
|
7304
|
-
* @
|
|
7305
|
-
* @
|
|
7303
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7304
|
+
* @template TObject The type of object to dispatch.
|
|
7305
|
+
* @template TParam The parameter names of the requested URL.
|
|
7306
7306
|
* @param cls The Activity Vocabulary class of the object to dispatch.
|
|
7307
7307
|
* @param path The URI path pattern for the object dispatcher. The syntax is
|
|
7308
7308
|
* based on URI Template
|
|
@@ -7442,9 +7442,9 @@ interface Federatable<TContextData> {
|
|
|
7442
7442
|
/**
|
|
7443
7443
|
* Registers a collection of objects dispatcher.
|
|
7444
7444
|
*
|
|
7445
|
-
* @
|
|
7446
|
-
* @
|
|
7447
|
-
* @
|
|
7445
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7446
|
+
* @template TObject The type of objects to dispatch.
|
|
7447
|
+
* @template TParam The parameter names of the requested URL.
|
|
7448
7448
|
* @param name A unique name for the collection dispatcher.
|
|
7449
7449
|
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
7450
7450
|
* @param path The URI path pattern for the collection dispatcher.
|
|
@@ -7457,9 +7457,9 @@ interface Federatable<TContextData> {
|
|
|
7457
7457
|
/**
|
|
7458
7458
|
* Registers an ordered collection of objects dispatcher.
|
|
7459
7459
|
*
|
|
7460
|
-
* @
|
|
7461
|
-
* @
|
|
7462
|
-
* @
|
|
7460
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7461
|
+
* @template TObject The type of objects to dispatch.
|
|
7462
|
+
* @template TParam The parameter names of the requested URL.
|
|
7463
7463
|
* @param name A unique name for the collection dispatcher.
|
|
7464
7464
|
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
7465
7465
|
* @param path The URI path pattern for the collection dispatcher.
|
|
@@ -7476,7 +7476,7 @@ interface Federatable<TContextData> {
|
|
|
7476
7476
|
*
|
|
7477
7477
|
* It also provides a middleware interface for handling requests before your
|
|
7478
7478
|
* web framework's router; see {@link Federation.fetch}.
|
|
7479
|
-
* @
|
|
7479
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7480
7480
|
* @since 0.13.0
|
|
7481
7481
|
*/
|
|
7482
7482
|
interface Federation<TContextData> extends Federatable<TContextData> {
|
|
@@ -7535,7 +7535,7 @@ interface Federation<TContextData> extends Federatable<TContextData> {
|
|
|
7535
7535
|
* instantiation of the {@link Federation} object until the {@link build}
|
|
7536
7536
|
* method is called so that dispatchers and listeners can be registered
|
|
7537
7537
|
* before the {@link Federation} object is instantiated.
|
|
7538
|
-
* @
|
|
7538
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7539
7539
|
* @since 1.6.0
|
|
7540
7540
|
*/
|
|
7541
7541
|
|
|
@@ -7607,10 +7607,10 @@ interface ObjectCallbackSetters<TContextData, TObject extends Object$1, TParam e
|
|
|
7607
7607
|
/**
|
|
7608
7608
|
* Additional settings for a collection dispatcher.
|
|
7609
7609
|
*
|
|
7610
|
-
* @
|
|
7610
|
+
* @template TContext The type of the context. {@link Context} or
|
|
7611
7611
|
* {@link RequestContext}.
|
|
7612
|
-
* @
|
|
7613
|
-
* @
|
|
7612
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7613
|
+
* @template TFilter The type of filter for the collection.
|
|
7614
7614
|
*/
|
|
7615
7615
|
interface CollectionCallbackSetters<TContext extends Context<TContextData>, TContextData, TFilter> {
|
|
7616
7616
|
/**
|
|
@@ -7673,7 +7673,7 @@ interface InboxListenerSetters<TContextData> {
|
|
|
7673
7673
|
/**
|
|
7674
7674
|
* Parameters of {@link Federation.fetch} method.
|
|
7675
7675
|
*
|
|
7676
|
-
* @
|
|
7676
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7677
7677
|
* @since 0.6.0
|
|
7678
7678
|
*/
|
|
7679
7679
|
interface FederationFetchOptions<TContextData> {
|
|
@@ -7707,11 +7707,11 @@ interface FederationFetchOptions<TContextData> {
|
|
|
7707
7707
|
/**
|
|
7708
7708
|
* Additional settings for a custom collection dispatcher.
|
|
7709
7709
|
*
|
|
7710
|
-
* @
|
|
7711
|
-
* @
|
|
7710
|
+
* @template TParams The type of the parameters in the URL path.
|
|
7711
|
+
* @template TContext The type of the context. {@link Context} or
|
|
7712
7712
|
* {@link RequestContext}.
|
|
7713
|
-
* @
|
|
7714
|
-
* @
|
|
7713
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
7714
|
+
* @template TFilter The type of filter for the collection.
|
|
7715
7715
|
*/
|
|
7716
7716
|
interface CustomCollectionCallbackSetters<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> {
|
|
7717
7717
|
/**
|
|
@@ -7744,7 +7744,7 @@ interface CustomCollectionCallbackSetters<TParams extends Record<string, string>
|
|
|
7744
7744
|
* Represents an object with a type ID, which is either a constructor or an
|
|
7745
7745
|
* instance of the object.
|
|
7746
7746
|
*
|
|
7747
|
-
* @
|
|
7747
|
+
* @template TObject The type of the object.
|
|
7748
7748
|
*/
|
|
7749
7749
|
type ConstructorWithTypeId<TObject extends Object$1> = (new (...args: any[]) => TObject) & {
|
|
7750
7750
|
typeId: URL;
|
|
@@ -7806,7 +7806,7 @@ type ParamPath<Param extends string> = `${string}{${Param}}${string}`;
|
|
|
7806
7806
|
/**
|
|
7807
7807
|
* Converts union types to intersection types.
|
|
7808
7808
|
*
|
|
7809
|
-
* @
|
|
7809
|
+
* @template U - The union type to convert.
|
|
7810
7810
|
* @returns The intersection type of the union.
|
|
7811
7811
|
* @example
|
|
7812
7812
|
* ```ts
|
|
@@ -7818,7 +7818,7 @@ type ParamPath<Param extends string> = `${string}{${Param}}${string}`;
|
|
|
7818
7818
|
*/
|
|
7819
7819
|
type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
|
|
7820
7820
|
//#endregion
|
|
7821
|
-
//#region federation/context.d.ts
|
|
7821
|
+
//#region src/federation/context.d.ts
|
|
7822
7822
|
/**
|
|
7823
7823
|
* A context.
|
|
7824
7824
|
*/
|
|
@@ -8587,7 +8587,7 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
8587
8587
|
multikey: Multikey;
|
|
8588
8588
|
}
|
|
8589
8589
|
//#endregion
|
|
8590
|
-
//#region testing/context.d.ts
|
|
8590
|
+
//#region src/testing/context.d.ts
|
|
8591
8591
|
declare function createRequestContext<TContextData>(args: Partial<RequestContext<TContextData>> & {
|
|
8592
8592
|
url: URL;
|
|
8593
8593
|
data: TContextData;
|
|
@@ -8600,7 +8600,7 @@ declare function createInboxContext<TContextData>(args: Partial<InboxContext<TCo
|
|
|
8600
8600
|
federation: Federation<TContextData>;
|
|
8601
8601
|
}): InboxContext<TContextData>;
|
|
8602
8602
|
//#endregion
|
|
8603
|
-
//#region testing/mod.d.ts
|
|
8603
|
+
//#region src/testing/mod.d.ts
|
|
8604
8604
|
declare const testDefinitions: Deno.TestDefinition[];
|
|
8605
8605
|
declare function test(options: Deno.TestDefinition): void;
|
|
8606
8606
|
declare function test(name: string, fn: (t: Deno.TestContext) => void | Promise<void>): void;
|
package/dist/testing/mod.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import "../lookup-
|
|
8
|
-
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import "../lookup-B0kqr1YK.js";
|
|
8
|
+
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-Ddk8H2Ez.js";
|
|
9
9
|
|
|
10
10
|
export { createInboxContext, createRequestContext, test, testDefinitions };
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { __require, lookupWebFinger } from "./type-
|
|
7
|
-
import { RouterError, lookupObject, traverseCollection } from "./lookup-
|
|
6
|
+
import { __require, lookupWebFinger } from "./type-C4M92j6x.js";
|
|
7
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-B0kqr1YK.js";
|
|
8
8
|
import { configure, getConsoleSink, getLogger, reset } from "@logtape/logtape";
|
|
9
9
|
import { trace } from "@opentelemetry/api";
|
|
10
10
|
|
|
11
|
-
//#region testing/docloader.ts
|
|
11
|
+
//#region src/testing/docloader.ts
|
|
12
12
|
const logger = getLogger([
|
|
13
13
|
"fedify",
|
|
14
14
|
"testing",
|
|
@@ -68,7 +68,7 @@ async function mockDocumentLoader(resource) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
//#endregion
|
|
71
|
-
//#region testing/context.ts
|
|
71
|
+
//#region src/testing/context.ts
|
|
72
72
|
function createContext(values) {
|
|
73
73
|
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getCollectionUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity } = values;
|
|
74
74
|
function throwRouteError() {
|
|
@@ -165,7 +165,7 @@ function createInboxContext(args) {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
//#endregion
|
|
168
|
-
//#region testing/mod.ts
|
|
168
|
+
//#region src/testing/mod.ts
|
|
169
169
|
const testDefinitions = [];
|
|
170
170
|
function test(name, options, fn) {
|
|
171
171
|
const def = typeof name === "string" ? typeof options === "function" ? {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { getLogger } from "@logtape/logtape";
|
|
6
6
|
|
|
7
|
-
//#region compat/transformers.ts
|
|
7
|
+
//#region src/compat/transformers.ts
|
|
8
8
|
const logger = getLogger([
|
|
9
9
|
"fedify",
|
|
10
10
|
"compat",
|
|
@@ -22,7 +22,7 @@ const logger = getLogger([
|
|
|
22
22
|
* https://example.com/#Follow/12345678-1234-5678-1234-567812345678
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
|
-
* @
|
|
25
|
+
* @template TContextData The type of the context data.
|
|
26
26
|
* @param activity The activity to assign an ID to.
|
|
27
27
|
* @param context The context of the activity.
|
|
28
28
|
* @return The activity with an ID assigned.
|
|
@@ -73,7 +73,7 @@ function autoIdAssigner(activity, context) {
|
|
|
73
73
|
*
|
|
74
74
|
* As some ActivityPub implementations like Threads fail to deal with inlined
|
|
75
75
|
* actor objects, this transformer can be used to work around this issue.
|
|
76
|
-
* @
|
|
76
|
+
* @template TContextData The type of the context data.
|
|
77
77
|
* @param activity The activity to dehydrate the actor property of.
|
|
78
78
|
* @param context The context of the activity.
|
|
79
79
|
* @returns The dehydrated activity.
|
|
@@ -86,7 +86,7 @@ function actorDehydrator(activity, _context) {
|
|
|
86
86
|
/**
|
|
87
87
|
* Gets the default activity transformers that are applied to all outgoing
|
|
88
88
|
* activities.
|
|
89
|
-
* @
|
|
89
|
+
* @template TContextData The type of the context data.
|
|
90
90
|
* @returns The default activity transformers.
|
|
91
91
|
* @since 1.4.0
|
|
92
92
|
*/
|