The best way to control Claude Code, Codex and more from any computer or phone

main
ts 43 lines 1.26 KB
Raw
1 import { layer } from "./Astro.ts";
2
3 export {
4 layer,
5 make,
6 makeAstroInlineConfig,
7 type AstroConfigInputs,
8 type AstroFrameworkOptions,
9 } from "./Astro.ts";
10 export { NODE_ENVIRONMENTS } from "./environments.ts";
11 export {
12 DEFAULT_TARGET_SPECIFIER,
13 isAstroTarget,
14 type AstroTarget,
15 type AstroTargetInput,
16 } from "./Target.ts";
17
18 /**
19 * The slice of the e2e harness's options this factory reads, structurally
20 * (this package deliberately does not depend on the harness): the
21 * target-scoped cloudflare carriage with the deprecated top-level `vite`
22 * alias as fallback.
23 */
24 interface HarnessOptions {
25 readonly target?: { readonly cloudflare?: { readonly worker?: unknown } | undefined } | undefined;
26 readonly vite?: unknown;
27 }
28
29 /**
30 * The e2e-harness framework factory contract: default-export a
31 * `(options) => Layer<Framework>` factory. Reads the harness's cloudflare
32 * worker configuration (`options.target?.cloudflare?.worker`, falling back to
33 * the deprecated `options.vite` alias) and hands it — opaquely — to the
34 * default Cloudflare target module as its config.
35 */
36 const framework = (options?: HarnessOptions) =>
37 layer({
38 targetConfig: {
39 worker: options?.target?.cloudflare?.worker ?? options?.vite,
40 },
41 });
42
43 export default framework;