expand.ts
Source: examples/capabilities/content/expand.ts · Download source · Example guide
ts
import { runContent, type Runner, type Input, type Options } from "./shared.ts";
import { isMain, runCli } from "./cli.ts";
export function run(runtime: Runner, input: Input, options: Options = {}) {
if (input.request.mode !== "expand") throw new Error("Request mode mismatch");
return runContent(runtime, input, options);
}
if (isMain(import.meta.url)) await runCli("expand");1
2
3
4
5
6
7
2
3
4
5
6
7
