@fedify/fedify 1.6.1-dev.880 → 1.6.1-dev.883
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-DvmEmDn9.js → actor-CwAL6Q82.js} +180 -180
- package/dist/{actor-DIk6hH_U.js → actor-DezwbbQX.js} +3 -3
- package/dist/{actor-f67C7yQD.d.ts → actor-tT_B0pDn.d.ts} +5 -8
- package/dist/{assert-Dv75vaGI.js → assert-YJk-1DlZ.js} +1 -1
- package/dist/{assert_equals-ClvzlhZu.js → assert_equals-Dnj7ejjL.js} +16 -9
- package/dist/{assert_instance_of--9UCVKsi.js → assert_instance_of-DBIoG5k7.js} +1 -1
- package/dist/{assert_is_error-D162gXcM.js → assert_is_error-jyzqjHud.js} +1 -1
- package/dist/{assert_not_equals-Cyf5m9Ke.js → assert_not_equals-wx-SRs4i.js} +1 -1
- package/dist/{assert_rejects-FOHCtlD2.js → assert_rejects-BZjUwo62.js} +2 -2
- package/dist/{assert_throws-CRfQJvVx.js → assert_throws-gBPv3v2V.js} +2 -2
- package/dist/{authdocloader-B3ME-k-0.js → authdocloader-C-_Lr-KH.js} +3 -3
- package/dist/{authdocloader-Bt52x-cz.js → authdocloader-Df1y1MKv.js} +4 -4
- package/dist/{builder-DT_CjHJM.js → builder-C8tsk_Xe.js} +3 -3
- package/dist/{client-Dw1pCSIt.d.ts → client-Cd552pKL.d.ts} +6 -9
- package/dist/{client-CSQzJhcr.js → client-CwjvB-Dh.js} +1 -1
- package/dist/{collection-QaGK9TVn.js → collection-Dfb0TPno.js} +1 -1
- package/dist/compat/mod.d.ts +12 -12
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +21 -21
- package/dist/{context-DBM4y1xF.d.ts → context-DRhhOsMk.d.ts} +12 -28
- package/dist/{context-DaUJ8XgG.js → context-DfToVZY6.js} +2 -2
- package/dist/{docloader-BesQV-nU.js → docloader-BFRgyDAa.js} +1 -2
- package/dist/{docloader-DdQSFoDK.js → docloader-BXc5egq6.js} +1 -2
- package/dist/{docloader-DTRsVZPo.d.ts → docloader-DlUDOVSe.d.ts} +4 -7
- package/dist/{esm-BxIKwi-M.js → esm-Btx3E8og.js} +1 -1
- package/dist/federation/builder.test.js +12 -12
- package/dist/federation/collection.test.js +9 -9
- package/dist/federation/handler.test.js +28 -28
- package/dist/federation/inbox.test.js +6 -6
- package/dist/federation/keycache.test.js +6 -6
- package/dist/federation/kv.test.js +8 -8
- package/dist/federation/middleware.test.js +28 -28
- package/dist/federation/mod.d.ts +11 -11
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +10 -10
- package/dist/federation/retry.test.js +2 -2
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +18 -18
- package/dist/{federation-Bmj7soSg.js → federation-3B6BDKCK.js} +1 -1
- package/dist/{http-nvlEiwC4.js → http-3CJyDlPz.js} +4 -4
- package/dist/{http-CZyKN-rt.d.ts → http-BkUCISGt.d.ts} +6 -14
- package/dist/{http-DKFoMKYk.js → http-DC3mY9EG.js} +4 -4
- package/dist/{inbox-DUxOSixz.js → inbox-CCbuuUqY.js} +4 -4
- package/dist/{key-C_i44VCP.js → key-CD8i4ZB_.js} +2 -2
- package/dist/{key-B6j6aQIf.js → key-Ce8aGBE5.js} +5 -5
- package/dist/{key-DnZNsfoE.js → key-D0WW7EHK.js} +3 -3
- package/dist/{key-BiM3rCVA.js → key-Y8a6dgOq.js} +4 -4
- package/dist/{keycache-NtvEqcq9.js → keycache-BtADunPo.js} +2 -2
- package/dist/{keys-R9p0S8_o.js → keys-BIY57kjo.js} +1 -1
- package/dist/{kv-BmsWxOQ2.d.ts → kv-p8sC8PTT.d.ts} +3 -7
- package/dist/{ld-BLZnxCWX.js → ld-D4G5WL1G.js} +4 -4
- package/dist/{lookup-B38eCiCI.js → lookup-C8V37GPa.js} +1 -1
- package/dist/{lookup-DXgwlvAK.js → lookup-CQnVHXIh.js} +3 -3
- package/dist/{lookup-CNK83LQK.js → lookup-Ds1_3qy2.js} +1 -1
- package/dist/{lookup-nlxO7x0u.d.ts → lookup-vJccIKCS.d.ts} +4 -8
- package/dist/middleware-DPuaf71I.js +17 -0
- package/dist/{middleware-Bjqgfc8l.js → middleware-DRpRVwO7.js} +18 -18
- package/dist/{middleware-FhQhkH0G.js → middleware-Jvf6WsMN.js} +18 -18
- package/dist/middleware-XHndzOUD.js +33 -0
- package/dist/{mod-iE_61Xjt.d.ts → mod-BTHfUeLo.d.ts} +2 -9
- package/dist/{mod-BUAWJ2pK.d.ts → mod-BUTm-sog.d.ts} +5 -9
- package/dist/{mod-CsYfI7YL.d.ts → mod-CgmTOt4z.d.ts} +3 -21
- package/dist/{mod-Bx6Du4Ct.d.ts → mod-DSPyncxx.d.ts} +5 -11
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/{mq-Bue016Tz.d.ts → mq-nceTGCuc.d.ts} +3 -7
- package/dist/nodeinfo/client.test.js +23 -36
- package/dist/nodeinfo/handler.test.js +27 -27
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +8 -8
- package/dist/nodeinfo/types.test.js +8 -8
- package/dist/{owner-C_Gw25Id.d.ts → owner-CbRc94FP.d.ts} +6 -9
- package/dist/{owner-DKsEWurW.js → owner-Dyk0zd-q.js} +3 -3
- package/dist/{proof-DtIUHGA0.js → proof-B8Hm2M5c.js} +3 -3
- package/dist/{proof-DKetjewp.js → proof-D-CWdNQx.js} +5 -5
- package/dist/runtime/authdocloader.test.js +17 -17
- package/dist/runtime/docloader.test.js +69 -66
- package/dist/runtime/key.test.js +13 -13
- package/dist/runtime/langstr.test.js +8 -8
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +8 -8
- package/dist/runtime/url.test.js +4 -4
- package/dist/{send-Z9IEW2ZG.js → send-CJXTH3ST.js} +3 -3
- package/dist/sig/http.test.js +52 -47
- package/dist/sig/key.test.js +14 -14
- package/dist/sig/ld.test.js +12 -12
- 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 +15 -15
- package/dist/{std__assert-CaBUULmX.js → std__assert-CHXwj7zk.js} +1 -1
- package/dist/testing/docloader.test.js +8 -8
- package/dist/testing/mod.d.ts +0 -1
- package/dist/{transformers-jxj-4o2K.js → transformers-ghwJuzGY.js} +1 -1
- package/dist/{types-C9A_t_ZN.js → types-D3XNqpGz.js} +1 -1
- package/dist/vocab/actor.test.js +60 -49
- 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 +3 -3
- package/dist/vocab/vocab.test.js +129 -132
- package/dist/{vocab-CHuz96Ha.js → vocab-CPrCb9BR.js} +3 -3
- package/dist/{vocab-7mZSoHR0.js → vocab-CaZSjoCB.js} +178 -178
- package/dist/{vocab-C4bpdeio.d.ts → vocab-DSFLLLe6.d.ts} +2 -7
- package/dist/webfinger/handler.test.js +27 -27
- package/dist/webfinger/lookup.test.js +41 -46
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +2 -9
- package/dist/x/cfworkers.test.js +8 -8
- package/dist/x/hono.d.ts +11 -12
- package/dist/x/sveltekit.d.ts +11 -12
- package/package.json +2 -3
- package/dist/hongminhee__deno-mock-fetch-DJKLj_H-.js +0 -188
- package/dist/middleware-B8XTnZdu.js +0 -33
- package/dist/middleware-D-_NS4x8.js +0 -17
- /package/dist/{denokv-iB_ggPGm.js → denokv-B_GFWjrl.js} +0 -0
@@ -1,13 +1,10 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader } from "./docloader-
|
3
|
+
import { DocumentLoader } from "./docloader-DlUDOVSe.js";
|
4
4
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
5
5
|
import { LanguageTag } from "@phensley/language-tag";
|
6
6
|
|
7
7
|
//#region runtime/langstr.d.ts
|
8
|
-
/**
|
9
|
-
* A language-tagged string which corresponds to the `rdf:langString` type.
|
10
|
-
*/
|
11
8
|
/**
|
12
9
|
* A language-tagged string which corresponds to the `rdf:langString` type.
|
13
10
|
*/
|
@@ -21,7 +18,6 @@ declare class LanguageString extends String {
|
|
21
18
|
*/
|
22
19
|
constructor(value: string, language: LanguageTag | string);
|
23
20
|
}
|
24
|
-
|
25
21
|
//#endregion
|
26
22
|
//#region vocab/vocab.d.ts
|
27
23
|
/** Describes an object of any kind. The Object type serves as the base type for
|
@@ -14455,6 +14451,5 @@ declare class View extends Activity {
|
|
14455
14451
|
}): Promise<View>;
|
14456
14452
|
protected _getCustomInspectProxy(): Record<string, unknown>;
|
14457
14453
|
}
|
14458
|
-
|
14459
14454
|
//#endregion
|
14460
|
-
export { Accept
|
14455
|
+
export { 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$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View };
|
@@ -3,44 +3,44 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../assert-
|
8
|
-
import "../assert_instance_of
|
6
|
+
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
|
+
import "../assert-YJk-1DlZ.js";
|
8
|
+
import "../assert_instance_of-DBIoG5k7.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { createFederation, handleWebFinger } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { createFederation, handleWebFinger } from "../middleware-DRpRVwO7.js";
|
11
|
+
import "../docloader-BXc5egq6.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
14
|
+
import "../client-CwjvB-Dh.js";
|
15
15
|
import "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Image, Link, Person } from "../vocab-
|
18
|
+
import { Image, Link, Person } from "../vocab-CaZSjoCB.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-Ds1_3qy2.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import "../http-
|
25
|
-
import "../authdocloader-
|
26
|
-
import "../ld-
|
27
|
-
import "../owner-
|
28
|
-
import "../proof-
|
29
|
-
import "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
32
|
-
import "../collection-
|
33
|
-
import "../keycache-
|
22
|
+
import "../actor-DezwbbQX.js";
|
23
|
+
import "../key-D0WW7EHK.js";
|
24
|
+
import "../http-3CJyDlPz.js";
|
25
|
+
import "../authdocloader-C-_Lr-KH.js";
|
26
|
+
import "../ld-D4G5WL1G.js";
|
27
|
+
import "../owner-Dyk0zd-q.js";
|
28
|
+
import "../proof-B8Hm2M5c.js";
|
29
|
+
import "../lookup-CQnVHXIh.js";
|
30
|
+
import "../inbox-CCbuuUqY.js";
|
31
|
+
import "../builder-C8tsk_Xe.js";
|
32
|
+
import "../collection-Dfb0TPno.js";
|
33
|
+
import "../keycache-BtADunPo.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-CJXTH3ST.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
|
-
import "../std__assert-
|
38
|
-
import "../assert_rejects-
|
39
|
-
import "../assert_is_error-
|
40
|
-
import "../assert_not_equals-
|
41
|
-
import "../assert_throws-
|
37
|
+
import "../std__assert-CHXwj7zk.js";
|
38
|
+
import "../assert_rejects-BZjUwo62.js";
|
39
|
+
import "../assert_is_error-jyzqjHud.js";
|
40
|
+
import "../assert_not_equals-wx-SRs4i.js";
|
41
|
+
import "../assert_throws-gBPv3v2V.js";
|
42
42
|
import "../docloader-09nVWLAZ.js";
|
43
|
-
import { createRequestContext } from "../context-
|
43
|
+
import { createRequestContext } from "../context-DfToVZY6.js";
|
44
44
|
|
45
45
|
//#region webfinger/handler.test.ts
|
46
46
|
test("handleWebFinger()", async (t) => {
|
@@ -3,19 +3,19 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../assert-
|
8
|
-
import "../assert_instance_of
|
9
|
-
import "../docloader-
|
6
|
+
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
|
+
import "../assert-YJk-1DlZ.js";
|
8
|
+
import "../assert_instance_of-DBIoG5k7.js";
|
9
|
+
import "../docloader-BXc5egq6.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
|
-
import { lookupWebFinger } from "../lookup-
|
11
|
+
import { lookupWebFinger } from "../lookup-Ds1_3qy2.js";
|
12
12
|
import { test } from "../testing-jcGLO9Lp.js";
|
13
|
-
import "../std__assert-
|
14
|
-
import "../assert_rejects-
|
15
|
-
import "../assert_is_error-
|
16
|
-
import "../assert_not_equals-
|
17
|
-
import "../assert_throws-
|
18
|
-
import {
|
13
|
+
import "../std__assert-CHXwj7zk.js";
|
14
|
+
import "../assert_rejects-BZjUwo62.js";
|
15
|
+
import "../assert_is_error-jyzqjHud.js";
|
16
|
+
import "../assert_not_equals-wx-SRs4i.js";
|
17
|
+
import "../assert_throws-gBPv3v2V.js";
|
18
|
+
import { esm_default } from "../esm-Btx3E8og.js";
|
19
19
|
import { withTimeout } from "@es-toolkit/es-toolkit";
|
20
20
|
|
21
21
|
//#region webfinger/lookup.test.ts
|
@@ -34,11 +34,8 @@ test({
|
|
34
34
|
assertEquals(await lookupWebFinger("acct:johndoe@fedify-test.internal"), null);
|
35
35
|
assertEquals(await lookupWebFinger("https://fedify-test.internal/foo"), null);
|
36
36
|
});
|
37
|
-
|
38
|
-
|
39
|
-
assertEquals(new URL(req.url).host, "example.com");
|
40
|
-
return new Response("", { status: 404 });
|
41
|
-
});
|
37
|
+
esm_default.spyGlobal();
|
38
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", { status: 404 });
|
42
39
|
await t.step("not found", async () => {
|
43
40
|
assertEquals(await lookupWebFinger("acct:johndoe@example.com"), null);
|
44
41
|
assertEquals(await lookupWebFinger("https://example.com/foo"), null);
|
@@ -47,10 +44,8 @@ test({
|
|
47
44
|
subject: "acct:johndoe@example.com",
|
48
45
|
links: []
|
49
46
|
};
|
50
|
-
|
51
|
-
|
52
|
-
return new Response(JSON.stringify(expected));
|
53
|
-
});
|
47
|
+
esm_default.removeRoutes();
|
48
|
+
esm_default.get("https://example.com/.well-known/webfinger?resource=acct%3Ajohndoe%40example.com", { body: expected });
|
54
49
|
await t.step("acct", async () => {
|
55
50
|
assertEquals(await lookupWebFinger("acct:johndoe@example.com"), expected);
|
56
51
|
});
|
@@ -58,28 +53,24 @@ test({
|
|
58
53
|
subject: "https://example.com/foo",
|
59
54
|
links: []
|
60
55
|
};
|
61
|
-
|
62
|
-
|
63
|
-
return new Response(JSON.stringify(expected2));
|
64
|
-
});
|
56
|
+
esm_default.removeRoutes();
|
57
|
+
esm_default.get("https://example.com/.well-known/webfinger?resource=https%3A%2F%2Fexample.com%2Ffoo", { body: expected2 });
|
65
58
|
await t.step("https", async () => {
|
66
59
|
assertEquals(await lookupWebFinger("https://example.com/foo"), expected2);
|
67
60
|
});
|
68
|
-
|
69
|
-
|
70
|
-
});
|
61
|
+
esm_default.removeRoutes();
|
62
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", { body: "not json" });
|
71
63
|
await t.step("invalid response", async () => {
|
72
64
|
assertEquals(await lookupWebFinger("acct:johndoe@example.com"), null);
|
73
65
|
});
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
}));
|
66
|
+
esm_default.removeRoutes();
|
67
|
+
esm_default.get("begin:https://localhost/.well-known/webfinger?", {
|
68
|
+
subject: "acct:test@localhost",
|
69
|
+
links: [{
|
70
|
+
rel: "self",
|
71
|
+
type: "application/activity+json",
|
72
|
+
href: "https://localhost/actor"
|
73
|
+
}]
|
83
74
|
});
|
84
75
|
await t.step("private address", async () => {
|
85
76
|
assertEquals(await lookupWebFinger("acct:test@localhost"), null);
|
@@ -92,37 +83,41 @@ test({
|
|
92
83
|
}]
|
93
84
|
});
|
94
85
|
});
|
95
|
-
|
86
|
+
esm_default.removeRoutes();
|
87
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", {
|
96
88
|
status: 302,
|
97
89
|
headers: { Location: "/.well-known/webfinger2" }
|
98
|
-
})
|
99
|
-
|
90
|
+
});
|
91
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger2", { body: expected });
|
100
92
|
await t.step("redirection", async () => {
|
101
93
|
assertEquals(await lookupWebFinger("acct:johndoe@example.com"), expected);
|
102
94
|
});
|
103
|
-
|
95
|
+
esm_default.removeRoutes();
|
96
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", {
|
104
97
|
status: 302,
|
105
98
|
headers: { Location: "/.well-known/webfinger" }
|
106
|
-
})
|
99
|
+
});
|
107
100
|
await t.step("infinite redirection", async () => {
|
108
101
|
const result = await withTimeout(() => lookupWebFinger("acct:johndoe@example.com"), 2e3);
|
109
102
|
assertEquals(result, null);
|
110
103
|
});
|
111
|
-
|
104
|
+
esm_default.removeRoutes();
|
105
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", {
|
112
106
|
status: 302,
|
113
107
|
headers: { Location: "ftp://example.com/" }
|
114
|
-
})
|
108
|
+
});
|
115
109
|
await t.step("redirection to different protocol", async () => {
|
116
110
|
assertEquals(await lookupWebFinger("acct:johndoe@example.com"), null);
|
117
111
|
});
|
118
|
-
|
112
|
+
esm_default.removeRoutes();
|
113
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", {
|
119
114
|
status: 302,
|
120
115
|
headers: { Location: "https://localhost/" }
|
121
|
-
})
|
116
|
+
});
|
122
117
|
await t.step("redirection to private address", async () => {
|
123
118
|
assertEquals(await lookupWebFinger("acct:johndoe@example.com"), null);
|
124
119
|
});
|
125
|
-
|
120
|
+
esm_default.hardReset();
|
126
121
|
}
|
127
122
|
});
|
128
123
|
|
package/dist/webfinger/mod.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import "../kv-
|
4
|
-
import "../docloader-
|
5
|
-
import { Link
|
3
|
+
import "../kv-p8sC8PTT.js";
|
4
|
+
import "../docloader-DlUDOVSe.js";
|
5
|
+
import { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger } from "../lookup-vJccIKCS.js";
|
6
6
|
import "../mod-GIh5OYxW.js";
|
7
7
|
export { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger };
|
package/dist/webfinger/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 { lookupWebFinger } from "../lookup-
|
5
|
+
import "../docloader-BFRgyDAa.js";
|
6
|
+
import { lookupWebFinger } from "../lookup-C8V37GPa.js";
|
7
7
|
import "../webfinger-C3GIyXIg.js";
|
8
8
|
|
9
9
|
export { lookupWebFinger };
|
package/dist/x/cfworkers.d.ts
CHANGED
@@ -1,16 +1,10 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { KvKey, KvStore, KvStoreSetOptions } from "../kv-
|
4
|
-
import { MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions } from "../mq-
|
3
|
+
import { KvKey, KvStore, KvStoreSetOptions } from "../kv-p8sC8PTT.js";
|
4
|
+
import { MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions } from "../mq-nceTGCuc.js";
|
5
5
|
import { KVNamespace, Queue } from "@cloudflare/workers-types/experimental";
|
6
6
|
|
7
7
|
//#region x/cfworkers.d.ts
|
8
|
-
/**
|
9
|
-
* Implementation of the {@link KvStore} interface for Cloudflare Workers KV
|
10
|
-
* binding. This class provides a wrapper around Cloudflare's KV namespace to
|
11
|
-
* store and retrieve JSON-serializable values using structured keys.
|
12
|
-
* @since 1.6.0
|
13
|
-
*/
|
14
8
|
|
15
9
|
/**
|
16
10
|
* Implementation of the {@link KvStore} interface for Cloudflare Workers KV
|
@@ -44,6 +38,5 @@ declare class WorkersMessageQueue implements MessageQueue {
|
|
44
38
|
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
45
39
|
listen(_handler: (message: any) => Promise<void> | void, _options?: MessageQueueListenOptions): Promise<void>;
|
46
40
|
}
|
47
|
-
|
48
41
|
//#endregion
|
49
42
|
export { WorkersKvStore, WorkersMessageQueue };
|
package/dist/x/cfworkers.test.js
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../assert-
|
8
|
-
import "../assert_instance_of
|
6
|
+
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
|
+
import "../assert-YJk-1DlZ.js";
|
8
|
+
import "../assert_instance_of-DBIoG5k7.js";
|
9
9
|
import { test } from "../testing-jcGLO9Lp.js";
|
10
|
-
import "../std__assert-
|
11
|
-
import "../assert_rejects-
|
12
|
-
import "../assert_is_error-
|
13
|
-
import "../assert_not_equals-
|
14
|
-
import "../assert_throws-
|
10
|
+
import "../std__assert-CHXwj7zk.js";
|
11
|
+
import "../assert_rejects-BZjUwo62.js";
|
12
|
+
import "../assert_is_error-jyzqjHud.js";
|
13
|
+
import "../assert_not_equals-wx-SRs4i.js";
|
14
|
+
import "../assert_throws-gBPv3v2V.js";
|
15
15
|
import { delay } from "@es-toolkit/es-toolkit";
|
16
16
|
|
17
17
|
//#region x/cfworkers.ts
|
package/dist/x/hono.d.ts
CHANGED
@@ -1,16 +1,16 @@
|
|
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 { Federation } from "../context-
|
13
|
-
import "../mq-
|
3
|
+
import "../kv-p8sC8PTT.js";
|
4
|
+
import "../docloader-DlUDOVSe.js";
|
5
|
+
import "../client-Cd552pKL.js";
|
6
|
+
import "../vocab-DSFLLLe6.js";
|
7
|
+
import "../actor-tT_B0pDn.js";
|
8
|
+
import "../http-BkUCISGt.js";
|
9
|
+
import "../owner-CbRc94FP.js";
|
10
|
+
import "../mod-DSPyncxx.js";
|
11
|
+
import "../lookup-vJccIKCS.js";
|
12
|
+
import { Federation } from "../context-DRhhOsMk.js";
|
13
|
+
import "../mq-nceTGCuc.js";
|
14
14
|
|
15
15
|
//#region x/hono.d.ts
|
16
16
|
interface HonoRequest {
|
@@ -44,6 +44,5 @@ type ContextDataFactory<TContextData, THonoContext> = (context: THonoContext) =>
|
|
44
44
|
* @returns A Hono middleware.
|
45
45
|
*/
|
46
46
|
declare function federation<TContextData, THonoContext extends HonoContext>(federation: Federation<TContextData>, contextDataFactory: ContextDataFactory<TContextData, THonoContext>): HonoMiddleware<THonoContext>;
|
47
|
-
|
48
47
|
//#endregion
|
49
48
|
export { ContextDataFactory, federation };
|
package/dist/x/sveltekit.d.ts
CHANGED
@@ -1,16 +1,16 @@
|
|
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 { Federation } from "../context-
|
13
|
-
import "../mq-
|
3
|
+
import "../kv-p8sC8PTT.js";
|
4
|
+
import "../docloader-DlUDOVSe.js";
|
5
|
+
import "../client-Cd552pKL.js";
|
6
|
+
import "../vocab-DSFLLLe6.js";
|
7
|
+
import "../actor-tT_B0pDn.js";
|
8
|
+
import "../http-BkUCISGt.js";
|
9
|
+
import "../owner-CbRc94FP.js";
|
10
|
+
import "../mod-DSPyncxx.js";
|
11
|
+
import "../lookup-vJccIKCS.js";
|
12
|
+
import { Federation } from "../context-DRhhOsMk.js";
|
13
|
+
import "../mq-nceTGCuc.js";
|
14
14
|
|
15
15
|
//#region x/sveltekit.d.ts
|
16
16
|
type RequestEvent = {
|
@@ -40,6 +40,5 @@ type HookParams = {
|
|
40
40
|
* @since 1.3.0
|
41
41
|
*/
|
42
42
|
declare function fedifyHook<TContextData>(federation: Federation<TContextData>, createContextData: (event: RequestEvent) => TContextData | Promise<TContextData>): (params: HookParams) => Promise<Response>;
|
43
|
-
|
44
43
|
//#endregion
|
45
44
|
export { fedifyHook };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fedify/fedify",
|
3
|
-
"version": "1.6.1-dev.
|
3
|
+
"version": "1.6.1-dev.883+dd017372",
|
4
4
|
"description": "An ActivityPub server framework",
|
5
5
|
"keywords": [
|
6
6
|
"ActivityPub",
|
@@ -86,7 +86,7 @@
|
|
86
86
|
"@es-toolkit/es-toolkit": "npm:es-toolkit@^1.38.0",
|
87
87
|
"@hugoalh/http-header-link": "^1.0.2",
|
88
88
|
"@js-temporal/polyfill": "^0.5.1",
|
89
|
-
"@logtape/logtape": "^0.
|
89
|
+
"@logtape/logtape": "^0.11.0",
|
90
90
|
"@multiformats/base-x": "^4.0.1",
|
91
91
|
"@opentelemetry/api": "^1.9.0",
|
92
92
|
"@opentelemetry/semantic-conventions": "^1.27.0",
|
@@ -104,7 +104,6 @@
|
|
104
104
|
},
|
105
105
|
"devDependencies": {
|
106
106
|
"@cloudflare/workers-types": "^4.20250529.0",
|
107
|
-
"@hongminhee/deno-mock-fetch": "npm:@jsr/hongminhee__deno-mock-fetch@^0.3.2",
|
108
107
|
"@std/assert": "npm:@jsr/std__assert@^0.226.0",
|
109
108
|
"@std/path": "npm:@jsr/std__path@^1.0.9",
|
110
109
|
"@std/url": "npm:@jsr/std__url@1.0.0-rc.3",
|
@@ -1,188 +0,0 @@
|
|
1
|
-
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
4
|
-
globalThis.addEventListener = () => {};
|
5
|
-
|
6
|
-
//#region node_modules/.pnpm/@jsr+hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/router.js
|
7
|
-
/**
|
8
|
-
* A deno deploy compatible request handler which can be either sync or async
|
9
|
-
* and gets passed the `Request`, it then eventually returns a `Response`
|
10
|
-
*/
|
11
|
-
/**
|
12
|
-
* The default other handler for the router
|
13
|
-
*/ function defaultOtherHandler(_req) {
|
14
|
-
return new Response(null, { status: 404 });
|
15
|
-
}
|
16
|
-
/**
|
17
|
-
* The default error handler for the router
|
18
|
-
*/ function defaultErrorHandler(_req, err) {
|
19
|
-
console.error(err);
|
20
|
-
return new Response(null, { status: 500 });
|
21
|
-
}
|
22
|
-
/**
|
23
|
-
* The default unknown method handler for the router
|
24
|
-
*/ function defaultUnknownMethodHandler(_req, knownMethods) {
|
25
|
-
return new Response(null, {
|
26
|
-
status: 405,
|
27
|
-
headers: { Accept: knownMethods.join(", ") }
|
28
|
-
});
|
29
|
-
}
|
30
|
-
const METHODS = [
|
31
|
-
"GET",
|
32
|
-
"HEAD",
|
33
|
-
"POST",
|
34
|
-
"PUT",
|
35
|
-
"DELETE",
|
36
|
-
"OPTIONS",
|
37
|
-
"PATCH"
|
38
|
-
];
|
39
|
-
const methodRegex = new RegExp(`(?<=^(?:${METHODS.join("|")}))@`);
|
40
|
-
/**
|
41
|
-
* A simple and tiny router for deno deploy
|
42
|
-
*
|
43
|
-
* ```
|
44
|
-
* import { listenAndServe } from "https://deno.land/std/http/server.ts";
|
45
|
-
* import { router } from "https://crux.land/router@0.0.5";
|
46
|
-
*
|
47
|
-
* await listenAndServe(
|
48
|
-
* ":8080",
|
49
|
-
* router({
|
50
|
-
* "/": (_req) => new Response("Hello world!", { status: 200 }),
|
51
|
-
* }),
|
52
|
-
* );
|
53
|
-
* ```
|
54
|
-
*
|
55
|
-
* @param routes A record of all routes and their corresponding handler functions
|
56
|
-
* @param other An optional parameter which contains a handler for anything that
|
57
|
-
* doesn't match the `routes` parameter
|
58
|
-
* @param error An optional parameter which contains a handler for any time it
|
59
|
-
* fails to run the default request handling code
|
60
|
-
* @param unknownMethod An optional parameter which contains a handler for any time a method
|
61
|
-
* that is not defined is used
|
62
|
-
* @returns A deno deploy compatible request handler
|
63
|
-
*/ function router(routes, other = defaultOtherHandler, error = defaultErrorHandler, unknownMethod = defaultUnknownMethodHandler) {
|
64
|
-
return async (req) => {
|
65
|
-
try {
|
66
|
-
const internalRoutes = {};
|
67
|
-
for (const [route, handler] of Object.entries(routes)) {
|
68
|
-
const [methodOrPath, path] = route.split(methodRegex);
|
69
|
-
if (path) {
|
70
|
-
internalRoutes[path] ??= {};
|
71
|
-
internalRoutes[path][methodOrPath] = handler;
|
72
|
-
} else {
|
73
|
-
internalRoutes[methodOrPath] ??= {};
|
74
|
-
internalRoutes[methodOrPath]["any"] = handler;
|
75
|
-
}
|
76
|
-
}
|
77
|
-
for (const [path, methods] of Object.entries(internalRoutes)) {
|
78
|
-
const pattern = new URLPattern({ pathname: path });
|
79
|
-
const res = pattern.exec(req.url);
|
80
|
-
if (res !== null) {
|
81
|
-
for (const [method, handler] of Object.entries(methods)) if (req.method === method) return await handler(req, res.pathname.groups);
|
82
|
-
if (methods["any"]) return await methods["any"](req, res.pathname.groups);
|
83
|
-
else return await unknownMethod(req, Object.keys(methods));
|
84
|
-
}
|
85
|
-
}
|
86
|
-
return await other(req);
|
87
|
-
} catch (err) {
|
88
|
-
return error(req, err);
|
89
|
-
}
|
90
|
-
};
|
91
|
-
}
|
92
|
-
|
93
|
-
//#endregion
|
94
|
-
//#region node_modules/.pnpm/@jsr+hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/mod.js
|
95
|
-
var UnhandledRouteError = class extends Error {
|
96
|
-
routes;
|
97
|
-
request;
|
98
|
-
constructor(init) {
|
99
|
-
const { request, routes } = init;
|
100
|
-
const method = request.method;
|
101
|
-
const reqPath = new URL(request.url).pathname;
|
102
|
-
const routesNumber = Object.entries(routes).length;
|
103
|
-
const routePlural = routesNumber === 1 ? "route has a handler" : "routes have handlers";
|
104
|
-
super(`${method} ${reqPath} (${routesNumber} ${routePlural})`);
|
105
|
-
this.name = this.constructor.name;
|
106
|
-
if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
|
107
|
-
this.routes = routes;
|
108
|
-
this.request = request;
|
109
|
-
}
|
110
|
-
};
|
111
|
-
/**
|
112
|
-
* Get a set of functions that do not share any state with the globals.
|
113
|
-
*
|
114
|
-
* The returned object can be destructured.
|
115
|
-
*
|
116
|
-
* ```
|
117
|
-
* const { fetch, mock, remove, reset } = sandbox()
|
118
|
-
* ```
|
119
|
-
*/ function sandbox() {
|
120
|
-
const routeStore = new Map();
|
121
|
-
async function fetch(input, init) {
|
122
|
-
if (input instanceof URL) input = input.toString();
|
123
|
-
const req = new Request(input, init);
|
124
|
-
const routes = Object.fromEntries(routeStore.entries());
|
125
|
-
return await router(routes, (request) => {
|
126
|
-
throw new UnhandledRouteError({
|
127
|
-
request,
|
128
|
-
routes
|
129
|
-
});
|
130
|
-
}, (_, error) => {
|
131
|
-
throw error;
|
132
|
-
})(req);
|
133
|
-
}
|
134
|
-
function mock$1(route, handler) {
|
135
|
-
routeStore.set(route, handler);
|
136
|
-
}
|
137
|
-
function remove$1(route) {
|
138
|
-
routeStore.delete(route);
|
139
|
-
}
|
140
|
-
function reset$1() {
|
141
|
-
routeStore.clear();
|
142
|
-
}
|
143
|
-
return {
|
144
|
-
reset: reset$1,
|
145
|
-
mock: mock$1,
|
146
|
-
remove: remove$1,
|
147
|
-
fetch
|
148
|
-
};
|
149
|
-
}
|
150
|
-
const globalMockFetch = sandbox();
|
151
|
-
/** This is the function that replaces `fetch` when you call `install()`. */ const mockedFetch = globalMockFetch.fetch;
|
152
|
-
/**
|
153
|
-
* Mock a new route, or override an existing handler.
|
154
|
-
*
|
155
|
-
* The route uses URLPattern syntax, with the additional extension of
|
156
|
-
* (optional) method routing by prefixing with the method,
|
157
|
-
* eg. `"POST@/user/:id"`.
|
158
|
-
*
|
159
|
-
* The handler function may be asynchronous.
|
160
|
-
*
|
161
|
-
* ```
|
162
|
-
* mock("GET@/users/:id", async (_req, params) => {
|
163
|
-
* const id = parseInt(params["id"]);
|
164
|
-
* const data = await magicallyGetMyUserData(id);
|
165
|
-
* return new Response(JSON.stringify(data));
|
166
|
-
* })
|
167
|
-
* ```
|
168
|
-
*/ const mock = globalMockFetch.mock;
|
169
|
-
/** Remove an existing route handler. */ const remove = globalMockFetch.remove;
|
170
|
-
/** Remove all existing route handlers. */ const reset = globalMockFetch.reset;
|
171
|
-
const originalFetch = globalThis.fetch;
|
172
|
-
/**
|
173
|
-
* Replace `globalThis.fetch` with `mockedFetch` (or another function that
|
174
|
-
* matches the `fetch` signature)
|
175
|
-
*
|
176
|
-
* To restore the original `globalThis.fetch`, call `uninstall()`.
|
177
|
-
*/ const install = (replacement) => {
|
178
|
-
globalThis.fetch = replacement ?? mockedFetch;
|
179
|
-
};
|
180
|
-
/**
|
181
|
-
* Restore `globalThis.fetch` to what it was before this library was imported.
|
182
|
-
*/ const uninstall = () => {
|
183
|
-
globalThis.fetch = originalFetch;
|
184
|
-
reset();
|
185
|
-
};
|
186
|
-
|
187
|
-
//#endregion
|
188
|
-
export { install, mock, uninstall };
|
@@ -1,33 +0,0 @@
|
|
1
|
-
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
4
|
-
globalThis.addEventListener = () => {};
|
5
|
-
|
6
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-Bjqgfc8l.js";
|
7
|
-
import "./docloader-DdQSFoDK.js";
|
8
|
-
import "./url-kTAI6_KP.js";
|
9
|
-
import "./semver-CbbIgUsa.js";
|
10
|
-
import "./client-CSQzJhcr.js";
|
11
|
-
import "./router-D_aVZZUc.js";
|
12
|
-
import "./types-CqoqWDkp.js";
|
13
|
-
import "./multibase-DeCHcK8L.js";
|
14
|
-
import "./vocab-7mZSoHR0.js";
|
15
|
-
import "./langstr-DbWheeIS.js";
|
16
|
-
import "./lookup-CNK83LQK.js";
|
17
|
-
import "./type-D2s5lmbZ.js";
|
18
|
-
import "./actor-DIk6hH_U.js";
|
19
|
-
import "./key-DnZNsfoE.js";
|
20
|
-
import "./http-nvlEiwC4.js";
|
21
|
-
import "./authdocloader-B3ME-k-0.js";
|
22
|
-
import "./ld-BLZnxCWX.js";
|
23
|
-
import "./owner-DKsEWurW.js";
|
24
|
-
import "./proof-DtIUHGA0.js";
|
25
|
-
import "./lookup-DXgwlvAK.js";
|
26
|
-
import "./inbox-DUxOSixz.js";
|
27
|
-
import "./builder-DT_CjHJM.js";
|
28
|
-
import "./collection-QaGK9TVn.js";
|
29
|
-
import "./keycache-NtvEqcq9.js";
|
30
|
-
import "./retry-BiIhZWgD.js";
|
31
|
-
import "./send-Z9IEW2ZG.js";
|
32
|
-
|
33
|
-
export { FederationImpl };
|