mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
87e92b9d86
* chore: support bun link for local CLI development * move Local Development section to end of README as Development For provenance purposes, this commit was AI assisted. --------- Co-authored-by: Michael Ramos <mdramos8@gmail.com>
25 lines
702 B
JavaScript
Executable File
25 lines
702 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
const childProcess = require("node:child_process");
|
|
const fs = require("node:fs");
|
|
const path = require("node:path");
|
|
|
|
const repoRoot = path.resolve(path.dirname(__filename), "..");
|
|
const sourceEntry = path.join(repoRoot, "apps", "hook", "server", "index.ts");
|
|
|
|
if (!fs.existsSync(sourceEntry)) {
|
|
console.error(`Could not find Plannotator source entry at ${sourceEntry}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
const result = childProcess.spawnSync("bun", [sourceEntry, ...process.argv.slice(2)], {
|
|
cwd: process.cwd(),
|
|
stdio: "inherit",
|
|
});
|
|
|
|
if (result.error) {
|
|
console.error(result.error.message);
|
|
process.exit(1);
|
|
}
|
|
|
|
process.exit(typeof result.status === "number" ? result.status : 0);
|