1export { PATH_MODULE_RUNNER_INIT as INIT_PATH } from "../../core/globals/EntryOptions.shared.ts";
2export const ENVIRONMENT_NAME_HEADER = "distilled-environment-name";
3export 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 */
13export const REQUEST_EXPORT_TYPES_EVENT =
14 "distilled-cloudflare:request-export-types";
15
16/** Reply to {@link REQUEST_EXPORT_TYPES_EVENT}, carrying an `ExportTypes` payload. */
17export const EXPORT_TYPES_EVENT = "distilled-cloudflare:export-types";
18
19export interface EntryEnvironment {
20 environmentName: string;
21 entryId: string;
22 entryName: string;
23 /** Id of the virtual module that classifies the entry module's exports. */
24 exportTypesId: string;
25}