Skip to main content

worker_file_source_path

Function worker_file_source_path 

Source
pub fn worker_file_source_path(context: &str, source: &Path) -> PathBuf
Expand description

#1820: project-relative synthetic source path of one file’s module in a context split across files, on Workers. Each file is its own module under workers/<dir>/handlers/, and handlers.ts re-exports them all, so the Worker’s entry point and composition root, and every consumer, still import the context from handlers.ts. A file keeps its stem (shop/orders/place.bynk → handlers/place.bynk). Distinct files map to distinct modules because every file of a split unit sits directly in its <name>/ directory: a <name>.bynk beside it is rejected (bynk.project.file_and_directory), as is a file in any other directory (bynk.project.inconsistent_commons_name). The emitted module is ts_output_path of this path.