@fedify/fedify 1.9.6 → 1.9.8
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-CEGEmRll.js → actor-BTA45fXF.js} +1205 -2768
- package/dist/{actor-Ydzhc8dj.d.cts → actor-Be-68iJP.d.cts} +3 -3
- package/dist/{actor-C1Euqngb.d.ts → actor-C5AY0Tno.d.ts} +3 -3
- package/dist/{actor-DbpZ6pzg.js → actor-DGa1EWaV.mjs} +8 -15
- package/dist/{actor-DlS-Q8hE.cjs → actor-DxfJk4lY.cjs} +3112 -4674
- package/dist/{assert-MZs1qjMx.js → assert-DikXweDx.mjs} +5 -9
- package/dist/{assert_equals-DSbWqCm3.js → assert_equals-Ew3jOFa3.mjs} +55 -69
- package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-C4Ri6VuN.mjs} +5 -9
- package/dist/{assert_is_error-BPGph1Jx.js → assert_is_error-C50x8tnw.mjs} +5 -9
- package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals--wG9hV7u.mjs} +6 -13
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-CJC9ThS-.mjs} +6 -11
- package/dist/{assert_throws-BOO88avQ.js → assert_throws-BIL7gChy.mjs} +6 -10
- package/dist/{authdocloader-DUQcOTRS.js → authdocloader-BC2rYCy1.mjs} +9 -14
- package/dist/{authdocloader-CT_V4Z7G.cjs → authdocloader-BrhFB421.cjs} +14 -22
- package/dist/{authdocloader-BLqMyboS.js → authdocloader-CqtNsX_N.js} +8 -15
- package/dist/{builder-BO61xeXE.js → builder-CIkAhIGC.mjs} +31 -40
- package/dist/{client-DF8anIB5.d.ts → client-D8OSiPBT.d.ts} +2 -2
- package/dist/{client-UG5wpNhG.js → client-MXqit6c-.mjs} +11 -15
- package/dist/{client-DjT_tegg.d.cts → client-T0VFOdMw.d.cts} +2 -2
- package/dist/{collection-CSzG2j1P.js → collection-BD6-SZ6O.mjs} +7 -12
- package/dist/compat/mod.cjs +5 -8
- package/dist/compat/mod.d.cts +78 -12
- package/dist/compat/mod.d.ts +78 -12
- package/dist/compat/mod.js +4 -8
- package/dist/compat/transformers.test.mjs +62 -0
- package/dist/{context-CwUAkopp.d.cts → context-CACMqDzl.d.cts} +33 -26
- package/dist/{context-CXUibY4L.d.ts → context-K4cCphQj.d.ts} +33 -26
- package/dist/{denokv-Bv33Xxea.js → denokv-CoSB_Eps.mjs} +22 -11
- package/dist/{docloader-BIFI3OS7.cjs → docloader-BVuUhBLI.cjs} +112 -212
- package/dist/{docloader-fJgJeqiX.js → docloader-BoXhusJ1.js} +17 -151
- package/dist/{docloader-CxWcuWqQ.d.ts → docloader-DSaLRXEA.d.ts} +2 -7
- package/dist/{docloader-D-MrRyHl.d.cts → docloader-DpGRDZrn.d.cts} +2 -7
- package/dist/{esm-C1EfGjSS.js → esm-BHJ7sdNg.mjs} +49 -85
- package/dist/federation/{builder.test.js → builder.test.mjs} +22 -41
- package/dist/federation/collection.test.d.mts +2 -0
- package/dist/federation/collection.test.mjs +21 -0
- package/dist/federation/handler.test.d.mts +2 -0
- package/dist/federation/{handler.test.js → handler.test.mjs} +22 -49
- package/dist/federation/idempotency.test.d.mts +2 -0
- package/dist/federation/{idempotency.test.js → idempotency.test.mjs} +29 -59
- package/dist/federation/inbox.test.d.mts +2 -0
- package/dist/federation/{inbox.test.js → inbox.test.mjs} +10 -15
- package/dist/federation/keycache.test.d.mts +2 -0
- package/dist/federation/{keycache.test.js → keycache.test.mjs} +13 -18
- package/dist/federation/kv.test.d.mts +2 -0
- package/dist/federation/{kv.test.js → kv.test.mjs} +9 -20
- package/dist/federation/middleware.test.d.mts +2 -0
- package/dist/federation/{middleware.test.js → middleware.test.mjs} +182 -197
- package/dist/federation/mod.cjs +223 -21
- package/dist/federation/mod.d.cts +4 -13
- package/dist/federation/mod.d.ts +4 -13
- package/dist/federation/mod.js +218 -18
- package/dist/federation/mq.test.d.mts +2 -0
- package/dist/federation/{mq.test.js → mq.test.mjs} +23 -38
- package/dist/federation/retry.test.d.mts +2 -0
- package/dist/federation/{retry.test.js → retry.test.mjs} +9 -14
- package/dist/federation/router.test.d.mts +2 -0
- package/dist/federation/{router.test.js → router.test.mjs} +12 -19
- package/dist/federation/send.test.d.mts +2 -0
- package/dist/federation/{send.test.js → send.test.mjs} +17 -26
- package/dist/{http-wsGR6KkT.d.ts → http-BZpls--H.d.ts} +5 -9
- package/dist/{http-CR-Eg1Uq.js → http-Bu5ZNlhZ.mjs} +16 -32
- package/dist/{http-B1_DzfAU.d.cts → http-C7WoprmE.d.cts} +5 -9
- package/dist/{http-BgopPF-8.cjs → http-DKw-O_VY.cjs} +51 -68
- package/dist/{http-05HxN-lp.js → http-VJbz6sKD.js} +17 -33
- package/dist/{inbox-DcJN1cxM.js → inbox-DkbTULXE.mjs} +17 -25
- package/dist/key-4fu6v0Jf.mjs +5 -0
- package/dist/{key-DjS1X9TG.cjs → key-B-wFdaPB.cjs} +42 -50
- package/dist/{key-ibMO03_0.js → key-BNMK_IVr.mjs} +12 -18
- package/dist/key-CancShOo.cjs +4 -0
- package/dist/{key-CPJcJjp-.js → key-DK3o0FEH.js} +19 -19
- package/dist/{keycache-CMUfqYqr.js → keycache-D-Vj8z88.mjs} +6 -10
- package/dist/{keys-IZ5050fT.js → keys-B27nVeIs.mjs} +6 -10
- package/dist/{kv-C7sopW2E.d.ts → kv-Bq9QLKm5.d.ts} +1 -1
- package/dist/{kv-CRZrzyXm.js → kv-DM1zFCtL.mjs} +6 -10
- package/dist/{kv-63Cil1MD.d.cts → kv-GIrOktyG.d.cts} +1 -1
- package/dist/{ld-DHNA2RSQ.js → ld-6jAVu3jV.mjs} +17 -31
- package/dist/{lookup-CKZfuyxA.js → lookup-BaU75j-d.js} +5 -11
- package/dist/{lookup-C4_dVYz7.cjs → lookup-BiIPmTwB.cjs} +16 -23
- package/dist/{lookup-BMAWLsP2.js → lookup-DmeJ8WUw.mjs} +8 -17
- package/dist/middleware-9ByEpBvV.cjs +4 -0
- package/dist/{middleware-CGbvIGvy.cjs → middleware-C188G4Go.cjs} +494 -547
- package/dist/{middleware-DrhEvfTo.js → middleware-Db1yZQaT.mjs} +276 -321
- package/dist/{middleware-ODfDRN3q.js → middleware-Do06X21v.js} +349 -393
- package/dist/middleware-DrfZEjyc.mjs +5 -0
- package/dist/{mod-CDObsV1d.d.ts → mod-BSwc3_rD.d.ts} +3 -3
- package/dist/{mod-DBzN0aCM.d.ts → mod-BTNpXcPj.d.ts} +2 -2
- package/dist/{mod-fjqfsrty.d.cts → mod-Chb_NKPp.d.cts} +4 -4
- package/dist/{mod-DgcYoyZK.d.ts → mod-DHoc3toL.d.ts} +4 -4
- package/dist/{mod-jQ4OODsl.d.cts → mod-DIMx6YjJ.d.cts} +2 -2
- package/dist/{mod-BUbqxBev.d.cts → mod-HElaq2UB.d.cts} +3 -3
- package/dist/mod.cjs +31 -33
- package/dist/mod.d.cts +15 -17
- package/dist/mod.d.ts +15 -17
- package/dist/mod.js +20 -23
- package/dist/{mq-B7R1Q-M5.d.cts → mq-CrItclRD.d.cts} +1 -1
- package/dist/{mq-CRGm1e_F.d.ts → mq-D_ZZRdby.d.ts} +1 -1
- package/dist/nodeinfo/client.test.d.mts +2 -0
- package/dist/nodeinfo/{client.test.js → client.test.mjs} +23 -45
- package/dist/nodeinfo/handler.test.d.mts +2 -0
- package/dist/nodeinfo/{handler.test.js → handler.test.mjs} +14 -43
- package/dist/nodeinfo/mod.cjs +5 -9
- package/dist/nodeinfo/mod.d.cts +2 -5
- package/dist/nodeinfo/mod.d.ts +2 -5
- package/dist/nodeinfo/mod.js +4 -9
- package/dist/nodeinfo/semver.test.d.mts +2 -0
- package/dist/nodeinfo/{semver.test.js → semver.test.mjs} +28 -51
- package/dist/nodeinfo/types.test.d.mts +2 -0
- package/dist/nodeinfo/{types.test.js → types.test.mjs} +10 -21
- package/dist/{owner-DDHsHYQO.js → owner-CKuGt_T9.mjs} +10 -13
- package/dist/{owner-BbeUDvOu.d.ts → owner-DPAPnB0R.d.ts} +4 -4
- package/dist/{owner-6KSEp9eV.d.cts → owner-_rFs0ik_.d.cts} +4 -4
- package/dist/{proof-V1uQaB2y.js → proof-CmTtG_t-.js} +33 -57
- package/dist/{proof-CX7ujFFX.cjs → proof-DLOy7HYU.cjs} +112 -135
- package/dist/{proof-exgGRW88.js → proof-mJLL2gSA.mjs} +20 -32
- package/dist/{retry-D4GJ670a.js → retry-Ddbq3AcK.mjs} +4 -7
- package/dist/rolldown-runtime-C7fyD9f2.js +15 -0
- package/dist/runtime/authdocloader.test.d.mts +2 -0
- package/dist/runtime/{authdocloader.test.js → authdocloader.test.mjs} +16 -28
- package/dist/runtime/docloader.test.d.mts +2 -0
- package/dist/runtime/{docloader.test.js → docloader.test.mjs} +52 -72
- package/dist/runtime/key.test.d.mts +2 -0
- package/dist/runtime/{key.test.js → key.test.mjs} +27 -57
- package/dist/runtime/langstr.test.d.mts +2 -0
- package/dist/runtime/{langstr.test.js → langstr.test.mjs} +9 -19
- package/dist/runtime/link.test.d.mts +2 -0
- package/dist/runtime/{link.test.js → link.test.mjs} +7 -11
- package/dist/runtime/mod.cjs +7 -13
- package/dist/runtime/mod.d.cts +103 -6
- package/dist/runtime/mod.d.ts +103 -6
- package/dist/runtime/mod.js +6 -13
- package/dist/runtime/multibase/multibase.test.d.mts +2 -0
- package/dist/runtime/multibase/{multibase.test.js → multibase.test.mjs} +16 -33
- package/dist/runtime/url.test.d.mts +2 -0
- package/dist/runtime/{url.test.js → url.test.mjs} +10 -15
- package/dist/{semver-dArNLkR9.js → semver-CgD82xxg.mjs} +13 -28
- package/dist/{send-BfMYakUE.js → send-BsQbGuw4.mjs} +7 -12
- package/dist/sig/http.test.d.mts +2 -0
- package/dist/sig/{http.test.js → http.test.mjs} +119 -203
- package/dist/sig/key.test.d.mts +2 -0
- package/dist/sig/{key.test.js → key.test.mjs} +13 -22
- package/dist/sig/ld.test.d.mts +2 -0
- package/dist/sig/{ld.test.js → ld.test.mjs} +24 -39
- package/dist/sig/mod.cjs +7 -13
- package/dist/sig/mod.d.cts +3 -7
- package/dist/sig/mod.d.ts +3 -7
- package/dist/sig/mod.js +6 -13
- package/dist/sig/owner.test.d.mts +2 -0
- package/dist/sig/owner.test.mjs +39 -0
- package/dist/sig/proof.test.d.mts +2 -0
- package/dist/sig/{proof.test.js → proof.test.mjs} +18 -31
- package/dist/{std__assert-X-_kMxKM.js → std__assert-2v7gYiZp.mjs} +13 -24
- package/dist/testing/docloader.test.d.mts +2 -0
- package/dist/testing/docloader.test.mjs +12 -0
- package/dist/testing/{mod.d.ts → mod.d.mts} +371 -541
- package/dist/testing/mod.mjs +5 -0
- package/dist/{testing-RPOc_gVG.js → testing-DS3gcq8V.mjs} +27 -35
- package/dist/{transformers-CoBS-oFG.cjs → transformers-BM0M8hnW.cjs} +20 -25
- package/dist/{transformers-BFT6d7J5.js → transformers-BV4OeK9o.js} +3 -7
- package/dist/{types-Cptev2nt.js → types-BXfL-dsX.js} +18 -36
- package/dist/{types-BIgY6c-l.js → types-CAnkAQGM.mjs} +5 -9
- package/dist/{types-CGnM1vft.cjs → types-DpM4FhjW.cjs} +45 -64
- package/dist/vocab/actor.test.d.mts +2 -0
- package/dist/vocab/{actor.test.js → actor.test.mjs} +308 -550
- package/dist/vocab/cjs.test.d.mts +2 -0
- package/dist/vocab/cjs.test.mjs +14 -0
- package/dist/vocab/lookup.test.d.mts +2 -0
- package/dist/vocab/{lookup.test.js → lookup.test.mjs} +29 -45
- package/dist/vocab/mod.cjs +251 -16
- package/dist/vocab/mod.d.cts +3 -5
- package/dist/vocab/mod.d.ts +3 -5
- package/dist/vocab/mod.js +244 -10
- package/dist/vocab/type.test.d.mts +2 -0
- package/dist/vocab/type.test.mjs +16 -0
- package/dist/vocab/vocab.test.d.mts +2 -0
- package/dist/vocab/{vocab.test.js → vocab.test.mjs} +178 -311
- package/dist/{vocab-CDHNj5zp.d.ts → vocab-BLvSEtuz.d.cts} +2 -4
- package/dist/{type-COPv6pMi.js → vocab-DuW9rL1h.mjs} +1177 -2871
- package/dist/{vocab-Cfs0937i.d.cts → vocab-lhCS9lzq.d.ts} +4 -2
- package/dist/webfinger/handler.test.d.mts +2 -0
- package/dist/webfinger/{handler.test.js → handler.test.mjs} +23 -56
- package/dist/webfinger/lookup.test.d.mts +2 -0
- package/dist/webfinger/{lookup.test.js → lookup.test.mjs} +13 -27
- package/dist/webfinger/mod.cjs +5 -9
- package/dist/webfinger/mod.d.cts +1 -3
- package/dist/webfinger/mod.d.ts +1 -3
- package/dist/webfinger/mod.js +4 -9
- package/dist/x/cfworkers.cjs +25 -14
- package/dist/x/cfworkers.d.cts +33 -6
- package/dist/x/cfworkers.d.ts +33 -6
- package/dist/x/cfworkers.js +22 -12
- package/dist/x/cfworkers.test.d.mts +2 -0
- package/dist/x/{cfworkers.test.js → cfworkers.test.mjs} +28 -26
- package/dist/x/hono.cjs +25 -14
- package/dist/x/hono.d.cts +1 -11
- package/dist/x/hono.d.ts +1 -11
- package/dist/x/hono.js +22 -12
- package/dist/x/sveltekit.cjs +23 -12
- package/dist/x/sveltekit.d.cts +1 -11
- package/dist/x/sveltekit.d.ts +1 -11
- package/dist/x/sveltekit.js +20 -10
- package/package.json +2 -2
- package/dist/chunk-DqRYRqnO.cjs +0 -34
- package/dist/compat/transformers.test.d.ts +0 -3
- package/dist/compat/transformers.test.js +0 -86
- package/dist/compat-DmDDELst.cjs +0 -4
- package/dist/compat-nxUqe4Z-.js +0 -4
- package/dist/federation/builder.test.d.ts +0 -3
- package/dist/federation/collection.test.d.ts +0 -3
- package/dist/federation/collection.test.js +0 -35
- package/dist/federation/handler.test.d.ts +0 -3
- package/dist/federation/idempotency.test.d.ts +0 -3
- package/dist/federation/inbox.test.d.ts +0 -3
- package/dist/federation/keycache.test.d.ts +0 -3
- package/dist/federation/kv.test.d.ts +0 -3
- package/dist/federation/middleware.test.d.ts +0 -3
- package/dist/federation/mq.test.d.ts +0 -3
- package/dist/federation/retry.test.d.ts +0 -3
- package/dist/federation/router.test.d.ts +0 -3
- package/dist/federation/send.test.d.ts +0 -3
- package/dist/federation-D1U8YY9t.js +0 -226
- package/dist/federation-H2_En3j5.cjs +0 -244
- package/dist/key-BCUd8FWp.js +0 -10
- package/dist/key-BUardnTH.cjs +0 -10
- package/dist/key-Dr6H_e3K.js +0 -10
- package/dist/middleware-BJ83veqi.js +0 -26
- package/dist/middleware-CJ4W2ir5.cjs +0 -17
- package/dist/middleware-Ve2mHJgo.js +0 -17
- package/dist/mod-BcObK1Lz.d.ts +0 -82
- package/dist/mod-C2tOeRkN.d.cts +0 -1
- package/dist/mod-CIbqfZW0.d.ts +0 -104
- package/dist/mod-Dt-G9ZOS.d.cts +0 -102
- package/dist/mod-FZd39qVq.d.cts +0 -1
- package/dist/mod-mXx9V0q5.d.cts +0 -80
- package/dist/nodeinfo/client.test.d.ts +0 -3
- package/dist/nodeinfo/handler.test.d.ts +0 -3
- package/dist/nodeinfo/semver.test.d.ts +0 -3
- package/dist/nodeinfo/types.test.d.ts +0 -3
- package/dist/nodeinfo-Co9lJrWl.cjs +0 -4
- package/dist/nodeinfo-DfycQ8Wf.js +0 -4
- package/dist/runtime/authdocloader.test.d.ts +0 -3
- package/dist/runtime/docloader.test.d.ts +0 -3
- package/dist/runtime/key.test.d.ts +0 -3
- package/dist/runtime/langstr.test.d.ts +0 -3
- package/dist/runtime/link.test.d.ts +0 -3
- package/dist/runtime/multibase/multibase.test.d.ts +0 -3
- package/dist/runtime/url.test.d.ts +0 -3
- package/dist/runtime-C58AJWSv.cjs +0 -4
- package/dist/runtime-DPYEDf-o.js +0 -4
- package/dist/sig/http.test.d.ts +0 -3
- package/dist/sig/key.test.d.ts +0 -3
- package/dist/sig/ld.test.d.ts +0 -3
- package/dist/sig/owner.test.d.ts +0 -3
- package/dist/sig/owner.test.js +0 -52
- package/dist/sig/proof.test.d.ts +0 -3
- package/dist/sig-ByHXzqUi.cjs +0 -4
- package/dist/sig-Cj3tk-ig.js +0 -4
- package/dist/testing/docloader.test.d.ts +0 -3
- package/dist/testing/docloader.test.js +0 -24
- package/dist/testing/mod.js +0 -10
- package/dist/vocab/actor.test.d.ts +0 -3
- package/dist/vocab/lookup.test.d.ts +0 -3
- package/dist/vocab/type.test.d.ts +0 -3
- package/dist/vocab/type.test.js +0 -25
- package/dist/vocab/vocab.test.d.ts +0 -3
- package/dist/vocab-BFy1CS5L.cjs +0 -289
- package/dist/vocab-BPFiQ650.js +0 -253
- package/dist/webfinger/handler.test.d.ts +0 -3
- package/dist/webfinger/lookup.test.d.ts +0 -3
- package/dist/webfinger-BjOEdFPs.cjs +0 -4
- package/dist/webfinger-De_bU0iE.js +0 -4
- package/dist/x/cfworkers.test.d.ts +0 -3
- /package/dist/{mod-1pDWKvUL.d.ts → compat/transformers.test.d.mts} +0 -0
- /package/dist/{mod-g0xFzAP9.d.ts → federation/builder.test.d.mts} +0 -0
package/dist/x/hono.cjs
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
7
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../docloader-BVuUhBLI.cjs");
|
|
5
|
+
let _logtape_logtape = require("@logtape/logtape");
|
|
8
6
|
//#region src/x/hono.ts
|
|
9
7
|
/**
|
|
8
|
+
* Fedify with Hono
|
|
9
|
+
* ================
|
|
10
|
+
*
|
|
11
|
+
* This module provides a [Hono] middleware to integrate with the Fedify.
|
|
12
|
+
*
|
|
13
|
+
* [Hono]: https://hono.dev/
|
|
14
|
+
*
|
|
15
|
+
* @deprecated This module has been moved to a separate package.
|
|
16
|
+
* Install and import from `@fedify/hono` instead.
|
|
17
|
+
* This module will be removed in Fedify v2.0.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
* @since 0.6.0
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
10
23
|
* Create a Hono middleware to integrate with the {@link Federation} object.
|
|
11
24
|
*
|
|
12
25
|
* @deprecated This function has been moved to `@fedify/hono` package.
|
|
@@ -21,17 +34,16 @@ const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
|
21
34
|
* {@link Federation} object.
|
|
22
35
|
* @returns A Hono middleware.
|
|
23
36
|
*/
|
|
24
|
-
function federation(federation
|
|
25
|
-
|
|
37
|
+
function federation(federation, contextDataFactory) {
|
|
38
|
+
(0, _logtape_logtape.getLogger)([
|
|
26
39
|
"fedify",
|
|
27
40
|
"federation",
|
|
28
41
|
"hono"
|
|
29
|
-
]);
|
|
30
|
-
logger.warn("The `@fedify/fedify/x/hono` module is deprecated; use `federation` from `@fedify/hono` package instead.");
|
|
42
|
+
]).warn("The `@fedify/fedify/x/hono` module is deprecated; use `federation` from `@fedify/hono` package instead.");
|
|
31
43
|
return async (ctx, next) => {
|
|
32
44
|
let contextData = contextDataFactory(ctx);
|
|
33
45
|
if (contextData instanceof Promise) contextData = await contextData;
|
|
34
|
-
return await federation
|
|
46
|
+
return await federation.fetch(ctx.req.raw, {
|
|
35
47
|
contextData,
|
|
36
48
|
...integrateFetchOptions(ctx, next)
|
|
37
49
|
});
|
|
@@ -56,6 +68,5 @@ function integrateFetchOptions(ctx, next) {
|
|
|
56
68
|
}
|
|
57
69
|
};
|
|
58
70
|
}
|
|
59
|
-
|
|
60
71
|
//#endregion
|
|
61
|
-
exports.federation = federation;
|
|
72
|
+
exports.federation = federation;
|
package/dist/x/hono.d.cts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../docloader-D-MrRyHl.cjs";
|
|
3
|
-
import "../client-DjT_tegg.cjs";
|
|
4
|
-
import "../vocab-Cfs0937i.cjs";
|
|
5
|
-
import "../actor-Ydzhc8dj.cjs";
|
|
6
|
-
import "../http-B1_DzfAU.cjs";
|
|
7
|
-
import "../owner-6KSEp9eV.cjs";
|
|
8
|
-
import "../mod-BUbqxBev.cjs";
|
|
9
|
-
import "../mod-jQ4OODsl.cjs";
|
|
10
|
-
import { Federation } from "../context-CwUAkopp.cjs";
|
|
11
|
-
import "../mq-B7R1Q-M5.cjs";
|
|
1
|
+
import { g as Federation } from "../context-CACMqDzl.cjs";
|
|
12
2
|
|
|
13
3
|
//#region src/x/hono.d.ts
|
|
14
4
|
interface HonoRequest {
|
package/dist/x/hono.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import "../
|
|
4
|
-
import "../docloader-CxWcuWqQ.js";
|
|
5
|
-
import "../client-DF8anIB5.js";
|
|
6
|
-
import "../vocab-CDHNj5zp.js";
|
|
7
|
-
import "../actor-C1Euqngb.js";
|
|
8
|
-
import "../http-wsGR6KkT.js";
|
|
9
|
-
import "../owner-BbeUDvOu.js";
|
|
10
|
-
import "../mod-CDObsV1d.js";
|
|
11
|
-
import "../mod-DBzN0aCM.js";
|
|
12
|
-
import { Federation } from "../context-CXUibY4L.js";
|
|
13
|
-
import "../mq-CRGm1e_F.js";
|
|
3
|
+
import { g as Federation } from "../context-K4cCphQj.js";
|
|
14
4
|
|
|
15
5
|
//#region src/x/hono.d.ts
|
|
16
6
|
interface HonoRequest {
|
package/dist/x/hono.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
5
3
|
import { getLogger } from "@logtape/logtape";
|
|
6
|
-
|
|
7
4
|
//#region src/x/hono.ts
|
|
8
5
|
/**
|
|
6
|
+
* Fedify with Hono
|
|
7
|
+
* ================
|
|
8
|
+
*
|
|
9
|
+
* This module provides a [Hono] middleware to integrate with the Fedify.
|
|
10
|
+
*
|
|
11
|
+
* [Hono]: https://hono.dev/
|
|
12
|
+
*
|
|
13
|
+
* @deprecated This module has been moved to a separate package.
|
|
14
|
+
* Install and import from `@fedify/hono` instead.
|
|
15
|
+
* This module will be removed in Fedify v2.0.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
* @since 0.6.0
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
9
21
|
* Create a Hono middleware to integrate with the {@link Federation} object.
|
|
10
22
|
*
|
|
11
23
|
* @deprecated This function has been moved to `@fedify/hono` package.
|
|
@@ -20,17 +32,16 @@ import { getLogger } from "@logtape/logtape";
|
|
|
20
32
|
* {@link Federation} object.
|
|
21
33
|
* @returns A Hono middleware.
|
|
22
34
|
*/
|
|
23
|
-
function federation(federation
|
|
24
|
-
|
|
35
|
+
function federation(federation, contextDataFactory) {
|
|
36
|
+
getLogger([
|
|
25
37
|
"fedify",
|
|
26
38
|
"federation",
|
|
27
39
|
"hono"
|
|
28
|
-
]);
|
|
29
|
-
logger.warn("The `@fedify/fedify/x/hono` module is deprecated; use `federation` from `@fedify/hono` package instead.");
|
|
40
|
+
]).warn("The `@fedify/fedify/x/hono` module is deprecated; use `federation` from `@fedify/hono` package instead.");
|
|
30
41
|
return async (ctx, next) => {
|
|
31
42
|
let contextData = contextDataFactory(ctx);
|
|
32
43
|
if (contextData instanceof Promise) contextData = await contextData;
|
|
33
|
-
return await federation
|
|
44
|
+
return await federation.fetch(ctx.req.raw, {
|
|
34
45
|
contextData,
|
|
35
46
|
...integrateFetchOptions(ctx, next)
|
|
36
47
|
});
|
|
@@ -55,6 +66,5 @@ function integrateFetchOptions(ctx, next) {
|
|
|
55
66
|
}
|
|
56
67
|
};
|
|
57
68
|
}
|
|
58
|
-
|
|
59
69
|
//#endregion
|
|
60
|
-
export { federation };
|
|
70
|
+
export { federation };
|
package/dist/x/sveltekit.cjs
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
7
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../docloader-BVuUhBLI.cjs");
|
|
5
|
+
let _logtape_logtape = require("@logtape/logtape");
|
|
8
6
|
//#region src/x/sveltekit.ts
|
|
9
7
|
/**
|
|
8
|
+
* Fedify with SvelteKit
|
|
9
|
+
* =====================
|
|
10
|
+
*
|
|
11
|
+
* This module provides a [SvelteKit] hook to integrate with the Fedify.
|
|
12
|
+
*
|
|
13
|
+
* [SvelteKit]: https://kit.svelte.dev/
|
|
14
|
+
*
|
|
15
|
+
* @deprecated This module has been moved to a separate package.
|
|
16
|
+
* Install and import from `@fedify/sveltekit` instead.
|
|
17
|
+
* This module will be removed in Fedify v2.0.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
* @since 1.3.0
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
10
23
|
* Create a SvelteKit hook handler to integrate with the {@link Federation}
|
|
11
24
|
* object.
|
|
12
25
|
*
|
|
@@ -30,12 +43,11 @@ const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
|
30
43
|
* @since 1.3.0
|
|
31
44
|
*/
|
|
32
45
|
function fedifyHook(federation, createContextData) {
|
|
33
|
-
|
|
46
|
+
(0, _logtape_logtape.getLogger)([
|
|
34
47
|
"fedify",
|
|
35
48
|
"federation",
|
|
36
49
|
"sveltekit"
|
|
37
|
-
]);
|
|
38
|
-
logger.warn("The `@fedify/fedify/x/sveltekit` module is deprecated; use `fedifyHook` from `@fedify/sveltekit` package instead.");
|
|
50
|
+
]).warn("The `@fedify/fedify/x/sveltekit` module is deprecated; use `fedifyHook` from `@fedify/sveltekit` package instead.");
|
|
39
51
|
return async ({ event, resolve }) => {
|
|
40
52
|
return await federation.fetch(event.request, {
|
|
41
53
|
contextData: await createContextData(event),
|
|
@@ -64,6 +76,5 @@ function integrateFetchOptions({ event, resolve }) {
|
|
|
64
76
|
}
|
|
65
77
|
};
|
|
66
78
|
}
|
|
67
|
-
|
|
68
79
|
//#endregion
|
|
69
|
-
exports.fedifyHook = fedifyHook;
|
|
80
|
+
exports.fedifyHook = fedifyHook;
|
package/dist/x/sveltekit.d.cts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../docloader-D-MrRyHl.cjs";
|
|
3
|
-
import "../client-DjT_tegg.cjs";
|
|
4
|
-
import "../vocab-Cfs0937i.cjs";
|
|
5
|
-
import "../actor-Ydzhc8dj.cjs";
|
|
6
|
-
import "../http-B1_DzfAU.cjs";
|
|
7
|
-
import "../owner-6KSEp9eV.cjs";
|
|
8
|
-
import "../mod-BUbqxBev.cjs";
|
|
9
|
-
import "../mod-jQ4OODsl.cjs";
|
|
10
|
-
import { Federation } from "../context-CwUAkopp.cjs";
|
|
11
|
-
import "../mq-B7R1Q-M5.cjs";
|
|
1
|
+
import { g as Federation } from "../context-CACMqDzl.cjs";
|
|
12
2
|
|
|
13
3
|
//#region src/x/sveltekit.d.ts
|
|
14
4
|
type RequestEvent = {
|
package/dist/x/sveltekit.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import "../
|
|
4
|
-
import "../docloader-CxWcuWqQ.js";
|
|
5
|
-
import "../client-DF8anIB5.js";
|
|
6
|
-
import "../vocab-CDHNj5zp.js";
|
|
7
|
-
import "../actor-C1Euqngb.js";
|
|
8
|
-
import "../http-wsGR6KkT.js";
|
|
9
|
-
import "../owner-BbeUDvOu.js";
|
|
10
|
-
import "../mod-CDObsV1d.js";
|
|
11
|
-
import "../mod-DBzN0aCM.js";
|
|
12
|
-
import { Federation } from "../context-CXUibY4L.js";
|
|
13
|
-
import "../mq-CRGm1e_F.js";
|
|
3
|
+
import { g as Federation } from "../context-K4cCphQj.js";
|
|
14
4
|
|
|
15
5
|
//#region src/x/sveltekit.d.ts
|
|
16
6
|
type RequestEvent = {
|
package/dist/x/sveltekit.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
5
3
|
import { getLogger } from "@logtape/logtape";
|
|
6
|
-
|
|
7
4
|
//#region src/x/sveltekit.ts
|
|
8
5
|
/**
|
|
6
|
+
* Fedify with SvelteKit
|
|
7
|
+
* =====================
|
|
8
|
+
*
|
|
9
|
+
* This module provides a [SvelteKit] hook to integrate with the Fedify.
|
|
10
|
+
*
|
|
11
|
+
* [SvelteKit]: https://kit.svelte.dev/
|
|
12
|
+
*
|
|
13
|
+
* @deprecated This module has been moved to a separate package.
|
|
14
|
+
* Install and import from `@fedify/sveltekit` instead.
|
|
15
|
+
* This module will be removed in Fedify v2.0.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
* @since 1.3.0
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
9
21
|
* Create a SvelteKit hook handler to integrate with the {@link Federation}
|
|
10
22
|
* object.
|
|
11
23
|
*
|
|
@@ -29,12 +41,11 @@ import { getLogger } from "@logtape/logtape";
|
|
|
29
41
|
* @since 1.3.0
|
|
30
42
|
*/
|
|
31
43
|
function fedifyHook(federation, createContextData) {
|
|
32
|
-
|
|
44
|
+
getLogger([
|
|
33
45
|
"fedify",
|
|
34
46
|
"federation",
|
|
35
47
|
"sveltekit"
|
|
36
|
-
]);
|
|
37
|
-
logger.warn("The `@fedify/fedify/x/sveltekit` module is deprecated; use `fedifyHook` from `@fedify/sveltekit` package instead.");
|
|
48
|
+
]).warn("The `@fedify/fedify/x/sveltekit` module is deprecated; use `fedifyHook` from `@fedify/sveltekit` package instead.");
|
|
38
49
|
return async ({ event, resolve }) => {
|
|
39
50
|
return await federation.fetch(event.request, {
|
|
40
51
|
contextData: await createContextData(event),
|
|
@@ -63,6 +74,5 @@ function integrateFetchOptions({ event, resolve }) {
|
|
|
63
74
|
}
|
|
64
75
|
};
|
|
65
76
|
}
|
|
66
|
-
|
|
67
77
|
//#endregion
|
|
68
|
-
export { fedifyHook };
|
|
78
|
+
export { fedifyHook };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/fedify",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.8",
|
|
4
4
|
"description": "An ActivityPub server framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ActivityPub",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"fast-check": "^3.22.0",
|
|
180
180
|
"fetch-mock": "^12.5.2",
|
|
181
181
|
"miniflare": "^4.20250523.0",
|
|
182
|
-
"tsdown": "^0.
|
|
182
|
+
"tsdown": "^0.21.6",
|
|
183
183
|
"tsx": "^4.19.4",
|
|
184
184
|
"typescript": "^5.9.2",
|
|
185
185
|
"wrangler": "^4.17.0"
|
package/dist/chunk-DqRYRqnO.cjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
-
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
|
-
|
|
5
|
-
//#region rolldown:runtime
|
|
6
|
-
var __create = Object.create;
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
-
key = keys[i];
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: ((k) => from[k]).bind(null, key),
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
Object.defineProperty(exports, '__toESM', {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: function () {
|
|
32
|
-
return __toESM;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
globalThis.addEventListener = () => {};
|
|
5
|
-
|
|
6
|
-
import { Follow, Person } from "../type-COPv6pMi.js";
|
|
7
|
-
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
-
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
-
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-DrhEvfTo.js";
|
|
12
|
-
import "../semver-dArNLkR9.js";
|
|
13
|
-
import "../client-UG5wpNhG.js";
|
|
14
|
-
import "../lookup-BMAWLsP2.js";
|
|
15
|
-
import "../types-BIgY6c-l.js";
|
|
16
|
-
import "../actor-DbpZ6pzg.js";
|
|
17
|
-
import "../key-CPJcJjp-.js";
|
|
18
|
-
import "../http-05HxN-lp.js";
|
|
19
|
-
import "../authdocloader-BLqMyboS.js";
|
|
20
|
-
import "../ld-DHNA2RSQ.js";
|
|
21
|
-
import "../owner-DDHsHYQO.js";
|
|
22
|
-
import "../proof-exgGRW88.js";
|
|
23
|
-
import "../inbox-DcJN1cxM.js";
|
|
24
|
-
import "../builder-BO61xeXE.js";
|
|
25
|
-
import "../collection-CSzG2j1P.js";
|
|
26
|
-
import "../keycache-CMUfqYqr.js";
|
|
27
|
-
import "../retry-D4GJ670a.js";
|
|
28
|
-
import "../send-BfMYakUE.js";
|
|
29
|
-
import { test } from "../testing-RPOc_gVG.js";
|
|
30
|
-
|
|
31
|
-
//#region src/compat/transformers.test.ts
|
|
32
|
-
const federation = new FederationImpl({ kv: new MemoryKvStore() });
|
|
33
|
-
const context = federation.createContext(new URL("http://example.com/"));
|
|
34
|
-
test("autoIdAssigner", async () => {
|
|
35
|
-
const activity = new Follow({
|
|
36
|
-
actor: new URL("http://example.com/actors/1"),
|
|
37
|
-
object: new Person({
|
|
38
|
-
id: new URL("http://example.com/actors/2"),
|
|
39
|
-
name: "Bob",
|
|
40
|
-
preferredUsername: "bob"
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
const result = autoIdAssigner(activity, context);
|
|
44
|
-
const { id } = result;
|
|
45
|
-
assertInstanceOf(id, URL);
|
|
46
|
-
assertEquals(id.origin, "http://example.com");
|
|
47
|
-
assertEquals(id.pathname, "/");
|
|
48
|
-
assertEquals(id.search, "");
|
|
49
|
-
assert(id.hash.match(/^#Follow\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/));
|
|
50
|
-
assertEquals(await result.toJsonLd(), await new Follow({
|
|
51
|
-
id,
|
|
52
|
-
actor: new URL("http://example.com/actors/1"),
|
|
53
|
-
object: new Person({
|
|
54
|
-
id: new URL("http://example.com/actors/2"),
|
|
55
|
-
name: "Bob",
|
|
56
|
-
preferredUsername: "bob"
|
|
57
|
-
})
|
|
58
|
-
}).toJsonLd());
|
|
59
|
-
});
|
|
60
|
-
test("actorDehydrator()", async () => {
|
|
61
|
-
const activity = new Follow({
|
|
62
|
-
id: new URL("http://example.com/activities/1"),
|
|
63
|
-
actor: new Person({
|
|
64
|
-
id: new URL("http://example.com/actors/1"),
|
|
65
|
-
name: "Alice",
|
|
66
|
-
preferredUsername: "alice"
|
|
67
|
-
}),
|
|
68
|
-
object: new Person({
|
|
69
|
-
id: new URL("http://example.com/actors/2"),
|
|
70
|
-
name: "Bob",
|
|
71
|
-
preferredUsername: "bob"
|
|
72
|
-
})
|
|
73
|
-
});
|
|
74
|
-
const result = actorDehydrator(activity, context);
|
|
75
|
-
assertEquals(await result.toJsonLd(), await new Follow({
|
|
76
|
-
id: new URL("http://example.com/activities/1"),
|
|
77
|
-
actor: new URL("http://example.com/actors/1"),
|
|
78
|
-
object: new Person({
|
|
79
|
-
id: new URL("http://example.com/actors/2"),
|
|
80
|
-
name: "Bob",
|
|
81
|
-
preferredUsername: "bob"
|
|
82
|
-
})
|
|
83
|
-
}).toJsonLd());
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
//#endregion
|
package/dist/compat-DmDDELst.cjs
DELETED
package/dist/compat-nxUqe4Z-.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
globalThis.addEventListener = () => {};
|
|
5
|
-
|
|
6
|
-
import "../type-COPv6pMi.js";
|
|
7
|
-
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
-
import "../assert-MZs1qjMx.js";
|
|
9
|
-
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../lookup-BMAWLsP2.js";
|
|
11
|
-
import { buildCollectionSynchronizationHeader, digest } from "../collection-CSzG2j1P.js";
|
|
12
|
-
import { test } from "../testing-RPOc_gVG.js";
|
|
13
|
-
import "../std__assert-X-_kMxKM.js";
|
|
14
|
-
import "../assert_rejects-DiIiJbZn.js";
|
|
15
|
-
import "../assert_is_error-BPGph1Jx.js";
|
|
16
|
-
import "../assert_not_equals-f3m3epl3.js";
|
|
17
|
-
import "../assert_throws-BOO88avQ.js";
|
|
18
|
-
import { decodeHex } from "byte-encodings/hex";
|
|
19
|
-
|
|
20
|
-
//#region src/federation/collection.test.ts
|
|
21
|
-
test("digest()", async () => {
|
|
22
|
-
const uris = [
|
|
23
|
-
new URL("https://testing.example.org/users/1"),
|
|
24
|
-
new URL("https://testing.example.org/users/2"),
|
|
25
|
-
new URL("https://testing.example.org/users/2")
|
|
26
|
-
];
|
|
27
|
-
const result = await digest(uris);
|
|
28
|
-
assertEquals(result, decodeHex("c33f48cd341ef046a206b8a72ec97af65079f9a3a9b90eef79c5920dce45c61f"));
|
|
29
|
-
});
|
|
30
|
-
test("buildCollectionSynchronizationHeader()", async () => {
|
|
31
|
-
const header = await buildCollectionSynchronizationHeader("https://testing.example.org/users/1/followers", ["https://testing.example.org/users/2", "https://testing.example.org/users/1"]);
|
|
32
|
-
assertEquals(header, "collectionId=\"https://testing.example.org/users/1/followers\", url=\"https://testing.example.org/users/1/followers?base-url=https%3A%2F%2Ftesting.example.org%2F\", digest=\"c33f48cd341ef046a206b8a72ec97af65079f9a3a9b90eef79c5920dce45c61f\"");
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
//#endregion
|