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

main
ts 35 lines 1.33 KB
Raw
1 /**
2 * Optional legacy Node marker adapter, retained for existing Octane configs.
3 * New projects can omit it: the `Website.Octane` resource selects hosting
4 * and wraps Octane's default native Node output as an HTTP server automatically.
5 *
6 * This marker sets `name: "node"` and `serverTarget: "node"` without an
7 * `adapt()` pass. Octane emits `dist/server/entry.js`, a self-contained Node
8 * ESM bundle exporting a web-standard fetch `handler`; the Node deploy
9 * target's finishing pass emits the HTTP serve entry.
10 *
11 * This module MUST stay dependency-free: `octane.config.ts` (and therefore
12 * its import graph) is bundled into the server entry by Octane's
13 * `noExternal: true` server sub-build, and is also evaluated by Octane's
14 * config loader inside a Vite module runner.
15 */
16
17 /** The `adapter.name` this adapter declares (matched by the Node target). */
18 export const ADAPTER_NAME = "node";
19
20 /** The shape of the Octane deploy adapter this module produces. */
21 export interface OctaneNodeAdapter {
22 readonly name: typeof ADAPTER_NAME;
23 readonly serverTarget: "node";
24 }
25
26 /**
27 * Create the optional legacy Node marker adapter. New projects can omit it
28 * from `octane.config.ts`; the `Website.Octane` resource owns deployment.
29 */
30 export const node = (): OctaneNodeAdapter => ({
31 name: ADAPTER_NAME,
32 serverTarget: "node",
33 });
34
35 export default node;