import { join } from "node:path"; import { log } from "../log.js"; import { writeExecutable } from "../util.js"; import { LAUNCH_DIR } from "../config.js"; import { localcodeWrapper } from "../templates/scripts.js"; export async function createLauncherScripts(): Promise { // Resolve the project directory (where dist/main.js lives) const projectDir = join(import.meta.dirname, "../.."); await writeExecutable(join(LAUNCH_DIR, "localcode"), localcodeWrapper(projectDir)); log(`Launcher script written to ${LAUNCH_DIR}`); }