#!/usr/bin/env node // Committed launcher, deliberately not generated. // // pnpm creates `.bin` links during `pnpm install`, which runs before Turborepo builds anything. A // `bin` pointing straight at `dist/cli.js` therefore fails to link on a fresh clone — the compiled // file does not exist yet — and the packager would not link in CI. This file always exists, // so the link always succeeds; it defers to the compiled CLI at run time, by which point // `dependsOn: ["^build"]` has produced it. import { fileURLToPath } from "node:url"; const compiledCli = new URL("../dist/cli.js", import.meta.url); try { await import(compiledCli.href); } catch (error) { if (error?.code === "ERR_MODULE_NOT_FOUND") { process.stderr.write( `@ekklesia/module-pack is not built yet (${fileURLToPath(compiledCli)}).\n` + "Run `pnpm build` from the repository root first.\n", ); process.exitCode = 1; } else { throw error; } }