The best way to control Claude Code, Codex and more from any computer or phone
| 1 | export { PATH_MODULE_RUNNER_INIT as INIT_PATH } from "../../core/globals/EntryOptions.shared.ts"; |
| 2 | export const ENVIRONMENT_NAME_HEADER = "distilled-environment-name"; |
| 3 | export const WORKER_ENTRY_PATH_HEADER = "distilled-worker-entry-path"; |
| 4 | |
| 5 | /** |
| 6 | * Sent by the dev server over the module runner WebSocket to ask the Worker to |
| 7 | * evaluate the entry module and classify its exports. The reply comes back as |
| 8 | * {@link EXPORT_TYPES_EVENT}. |
| 9 | * |
| 10 | * This runs over the module runner channel rather than an HTTP endpoint so it |
| 11 | * cannot be intercepted by the asset router that sits in front of the Worker. |
| 12 | */ |
| 13 | export const REQUEST_EXPORT_TYPES_EVENT = "distilled-cloudflare:request-export-types"; |
| 14 | |
| 15 | /** Reply to {@link REQUEST_EXPORT_TYPES_EVENT}, carrying an `ExportTypes` payload. */ |
| 16 | export const EXPORT_TYPES_EVENT = "distilled-cloudflare:export-types"; |
| 17 | |
| 18 | /** |
| 19 | * `Symbol.for` key of the {@link EntryEnvironment} the generated entry module |
| 20 | * sets on `globalThis`. A JSON binding would also land in the Worker's `env` |
| 21 | * and, with `nodejs_compat_populate_process_env`, its `process.env`. |
| 22 | */ |
| 23 | export const ENTRY_ENVIRONMENT_KEY = "distilled-cloudflare:entry-environment"; |
| 24 | |
| 25 | export interface EntryEnvironment { |
| 26 | environmentName: string; |
| 27 | entryId: string; |
| 28 | entryName: string; |
| 29 | /** Id of the virtual module that classifies the entry module's exports. */ |
| 30 | exportTypesId: string; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Marks a Worker's uncaught `fetch` error, serialized as JSON, for the dev |
| 35 | * server to revive into Vite's error page (Miniflare's |
| 36 | * `MF-Experimental-Error-Stack`). |
| 37 | */ |
| 38 | export const HEADER_ERROR_STACK = "MF-Experimental-Error-Stack"; |