Loading CHANGES.md +8 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,14 @@ Version 0.4.0 To be released. - Added `@fedify/fedify/x/fresh` module for integrating with [Fresh] middleware. - Added `integrateHandler()` function. - Added `integrateHandlerOptions()` function. [Fresh]: https://fresh.deno.dev/ Version 0.3.0 ------------- Loading deno.json +2 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,8 @@ "./nodeinfo": "./nodeinfo/mod.ts", "./runtime": "./runtime/mod.ts", "./vocab": "./vocab/mod.ts", "./webfinger": "./webfinger/mod.ts" "./webfinger": "./webfinger/mod.ts", "./x/fresh": "./x/fresh.ts" }, "imports": { "@cfworker/json-schema": "npm:@cfworker/json-schema@^1.12.8", Loading docs/manual/federation.md +13 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,19 @@ as [`Request`] and [`Response`] objects. In that case, you need to convert the request and response objects to the appropriate types that the `Federation` object can handle. > [!NOTE] > The above example artificially shows a verbose way to integrate > the `Federation` object with Fresh, so that a user of other web frameworks > can understand the concept. In practice, you can define a middleware > using `integrateHandler()` function from `@fedify/fedify/x/fresh` module: > > ~~~~ typescript > import { federation } from "../federation.ts"; // Import the `Federation` object > import { integrateHandler } from "jsr:@fedify/fedify/x/fresh"; > > export const handler = integrateHandler(federation, () => undefined); > ~~~~ > [!TIP] > In theory, you can directly pass `Federation.handle()` to the [`Deno.serve()`] > function, but you probably wouldn't want to do that because you want to handle Loading examples/blog/import_map.g.json +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ "@fedify/fedify/runtime": "../../runtime/mod.ts", "@fedify/fedify/vocab": "../../vocab/mod.ts", "@fedify/fedify/webfinger": "../../webfinger/mod.ts", "@fedify/fedify/x/fresh": "../../x/fresh.ts", "markdown-it": "npm:markdown-it@^14.0.0", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", Loading examples/blog/import_map.json +1 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ "@fedify/fedify/runtime": "../../runtime/mod.ts", "@fedify/fedify/vocab": "../../vocab/mod.ts", "@fedify/fedify/webfinger": "../../webfinger/mod.ts", "@fedify/fedify/x/fresh": "../../x/fresh.ts", "markdown-it": "npm:markdown-it@^14.0.0", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", Loading Loading
CHANGES.md +8 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,14 @@ Version 0.4.0 To be released. - Added `@fedify/fedify/x/fresh` module for integrating with [Fresh] middleware. - Added `integrateHandler()` function. - Added `integrateHandlerOptions()` function. [Fresh]: https://fresh.deno.dev/ Version 0.3.0 ------------- Loading
deno.json +2 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,8 @@ "./nodeinfo": "./nodeinfo/mod.ts", "./runtime": "./runtime/mod.ts", "./vocab": "./vocab/mod.ts", "./webfinger": "./webfinger/mod.ts" "./webfinger": "./webfinger/mod.ts", "./x/fresh": "./x/fresh.ts" }, "imports": { "@cfworker/json-schema": "npm:@cfworker/json-schema@^1.12.8", Loading
docs/manual/federation.md +13 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,19 @@ as [`Request`] and [`Response`] objects. In that case, you need to convert the request and response objects to the appropriate types that the `Federation` object can handle. > [!NOTE] > The above example artificially shows a verbose way to integrate > the `Federation` object with Fresh, so that a user of other web frameworks > can understand the concept. In practice, you can define a middleware > using `integrateHandler()` function from `@fedify/fedify/x/fresh` module: > > ~~~~ typescript > import { federation } from "../federation.ts"; // Import the `Federation` object > import { integrateHandler } from "jsr:@fedify/fedify/x/fresh"; > > export const handler = integrateHandler(federation, () => undefined); > ~~~~ > [!TIP] > In theory, you can directly pass `Federation.handle()` to the [`Deno.serve()`] > function, but you probably wouldn't want to do that because you want to handle Loading
examples/blog/import_map.g.json +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ "@fedify/fedify/runtime": "../../runtime/mod.ts", "@fedify/fedify/vocab": "../../vocab/mod.ts", "@fedify/fedify/webfinger": "../../webfinger/mod.ts", "@fedify/fedify/x/fresh": "../../x/fresh.ts", "markdown-it": "npm:markdown-it@^14.0.0", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", Loading
examples/blog/import_map.json +1 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ "@fedify/fedify/runtime": "../../runtime/mod.ts", "@fedify/fedify/vocab": "../../vocab/mod.ts", "@fedify/fedify/webfinger": "../../webfinger/mod.ts", "@fedify/fedify/x/fresh": "../../x/fresh.ts", "markdown-it": "npm:markdown-it@^14.0.0", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", Loading