-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathep-admin
More file actions
executable file
·34 lines (26 loc) · 781 Bytes
/
ep-admin
File metadata and controls
executable file
·34 lines (26 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bun
/**
* ep-admin
*
* Wrapper script for ep-admin CLI.
* Delegates to the @effect-patterns/ep-admin package.
*/
import { spawn } from "node:child_process";
import { fileURLToPath } from "node:url";
import { dirname, resolve } from "node:path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const packagePath = resolve(__dirname, "./packages/ep-admin/src/index.ts");
// Forward all arguments to the package
const args = process.argv.slice(2);
const child = spawn("bun", ["run", packagePath, ...args], {
stdio: "inherit",
shell: true,
});
child.on("error", (error) => {
console.error("Failed to start ep-admin:", error);
process.exit(1);
});
child.on("exit", (code) => {
process.exit(code ?? 1);
});