Loading cli/docloader.ts +38 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,44 @@ export async function getDocumentLoader(): Promise<DocumentLoader> { const kv = new DenoKvStore(await Deno.openKv(path)); return documentLoader = kvCache({ kv, loader: fetchDocumentLoader, rules: [ [ new URLPattern({ protocol: "http{s}?", hostname: "localhost", port: "*", pathname: "/*", search: "*", hash: "*", }), Temporal.Duration.from({ seconds: 0 }), ], [ new URLPattern({ protocol: "http{s}?", hostname: "127.0.0.1", port: "*", pathname: "/*", search: "*", hash: "*", }), Temporal.Duration.from({ seconds: 0 }), ], [ new URLPattern({ protocol: "http{s}?", hostname: "\\[\\:\\:1\\]", port: "*", pathname: "/*", search: "*", hash: "*", }), Temporal.Duration.from({ seconds: 0 }), ], ], loader(url) { return fetchDocumentLoader(url, true); }, }); } Loading cli/init.ts +30 −5 Original line number Diff line number Diff line Loading @@ -134,7 +134,13 @@ To start the server, run the following command: colors.bold.green( runtime === "bun" ? "bun dev" : `${pm} run dev`, ) }`, } Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:4321/users/john")} `, }), }, fresh: { Loading Loading @@ -162,7 +168,12 @@ export const handler: Handler = integrateHandler(federation, () => undefined); instruction: ` To start the server, run the following command: ${colors.bold.green("deno task start")}`, ${colors.bold.green("deno task start")} Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:8000/users/john")} `, }), }, hono: { Loading Loading @@ -240,7 +251,12 @@ To start the server, run the following command: ? "bun dev" : `${pm} run dev`, ) }`, } Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:8000/users/john")} `, }), }, } as const; Loading Loading @@ -560,7 +576,12 @@ To start the server, run the following command: ? "bun dev" : `${packageManager} run dev`, ) }`, } Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:8000/users/john")} `, }; } else { const desc = webFrameworks[webFramework]; Loading Loading @@ -714,7 +735,11 @@ export default federation; ), ); } console.log(initializer.instruction); console.error(initializer.instruction); console.error(`\ Start by editing the ${colors.bold.blue(initializer.federationFile)} \ file to define your federation! `); }); function drawDinosaur() { Loading Loading
cli/docloader.ts +38 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,44 @@ export async function getDocumentLoader(): Promise<DocumentLoader> { const kv = new DenoKvStore(await Deno.openKv(path)); return documentLoader = kvCache({ kv, loader: fetchDocumentLoader, rules: [ [ new URLPattern({ protocol: "http{s}?", hostname: "localhost", port: "*", pathname: "/*", search: "*", hash: "*", }), Temporal.Duration.from({ seconds: 0 }), ], [ new URLPattern({ protocol: "http{s}?", hostname: "127.0.0.1", port: "*", pathname: "/*", search: "*", hash: "*", }), Temporal.Duration.from({ seconds: 0 }), ], [ new URLPattern({ protocol: "http{s}?", hostname: "\\[\\:\\:1\\]", port: "*", pathname: "/*", search: "*", hash: "*", }), Temporal.Duration.from({ seconds: 0 }), ], ], loader(url) { return fetchDocumentLoader(url, true); }, }); } Loading
cli/init.ts +30 −5 Original line number Diff line number Diff line Loading @@ -134,7 +134,13 @@ To start the server, run the following command: colors.bold.green( runtime === "bun" ? "bun dev" : `${pm} run dev`, ) }`, } Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:4321/users/john")} `, }), }, fresh: { Loading Loading @@ -162,7 +168,12 @@ export const handler: Handler = integrateHandler(federation, () => undefined); instruction: ` To start the server, run the following command: ${colors.bold.green("deno task start")}`, ${colors.bold.green("deno task start")} Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:8000/users/john")} `, }), }, hono: { Loading Loading @@ -240,7 +251,12 @@ To start the server, run the following command: ? "bun dev" : `${pm} run dev`, ) }`, } Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:8000/users/john")} `, }), }, } as const; Loading Loading @@ -560,7 +576,12 @@ To start the server, run the following command: ? "bun dev" : `${packageManager} run dev`, ) }`, } Then, try look up an actor from your server: ${colors.bold.green("fedify lookup http://localhost:8000/users/john")} `, }; } else { const desc = webFrameworks[webFramework]; Loading Loading @@ -714,7 +735,11 @@ export default federation; ), ); } console.log(initializer.instruction); console.error(initializer.instruction); console.error(`\ Start by editing the ${colors.bold.blue(initializer.federationFile)} \ file to define your federation! `); }); function drawDinosaur() { Loading