@taranek/orche 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +10 -10
- package/package.json +1 -1
- package/src/cli.ts +10 -10
package/dist/cli.js
CHANGED
|
@@ -61,14 +61,14 @@ async function runReview(worktreePath) {
|
|
|
61
61
|
}
|
|
62
62
|
const args = ["--worktree=" + resolvedPath];
|
|
63
63
|
console.log(`opening review for ${worktreePath}...`);
|
|
64
|
-
// Watch for .pending files from the
|
|
65
|
-
// (
|
|
64
|
+
// Watch for .pending files from the review app and deliver them.
|
|
65
|
+
// (The GUI app can't access the cmux socket — only CLI processes can.)
|
|
66
66
|
const repoRoot = getRepoRoot(resolvedPath);
|
|
67
67
|
const worktreeName = path.basename(resolvedPath);
|
|
68
68
|
const reviewsDir = path.join(repoRoot, ".orche", "reviews", worktreeName);
|
|
69
69
|
mkdirSync(reviewsDir, { recursive: true });
|
|
70
70
|
// CLI stays alive to watch for .pending files and deliver them via cmux/tmux
|
|
71
|
-
// (
|
|
71
|
+
// (the GUI app can't access the cmux socket — only processes started inside cmux can)
|
|
72
72
|
const watcher = watch(reviewsDir, (event, filename) => {
|
|
73
73
|
if (event === "rename" && filename?.endsWith(".pending")) {
|
|
74
74
|
const pendingPath = path.join(reviewsDir, filename);
|
|
@@ -86,20 +86,20 @@ async function runReview(worktreePath) {
|
|
|
86
86
|
catch { }
|
|
87
87
|
process.exit(code ?? 0);
|
|
88
88
|
};
|
|
89
|
-
// Dev mode: launch
|
|
89
|
+
// Dev mode: launch the locally-built Tauri binary from the monorepo.
|
|
90
90
|
const cliDir = path.dirname(new URL(import.meta.url).pathname);
|
|
91
91
|
const localReviewDir = path.resolve(cliDir, "../../review");
|
|
92
92
|
const devReviewPath = process.env.ORCHE_REVIEW_DEV ||
|
|
93
93
|
(existsSync(path.join(localReviewDir, "package.json")) ? localReviewDir : undefined);
|
|
94
94
|
const debug = !!process.env.ORCHE_DEBUG;
|
|
95
95
|
if (devReviewPath) {
|
|
96
|
-
const
|
|
96
|
+
const tauriBin = path.join(devReviewPath, "src-tauri", "target", "release", "orche-review");
|
|
97
|
+
if (!existsSync(tauriBin)) {
|
|
98
|
+
die(`review app not built — run:\n (cd ${devReviewPath} && pnpm tauri build --no-bundle)`);
|
|
99
|
+
}
|
|
97
100
|
if (debug)
|
|
98
|
-
console.error(`[review] launching: ${
|
|
99
|
-
const child = spawn(
|
|
100
|
-
stdio: ["ignore", "inherit", "inherit"],
|
|
101
|
-
env: { ...process.env, VITE_DEV_SERVER_URL: undefined },
|
|
102
|
-
});
|
|
101
|
+
console.error(`[review] launching: ${tauriBin} ${args.join(" ")}`);
|
|
102
|
+
const child = spawn(tauriBin, args, { stdio: ["ignore", "inherit", "inherit"] });
|
|
103
103
|
child.on("exit", onReviewExit);
|
|
104
104
|
return;
|
|
105
105
|
}
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -64,15 +64,15 @@ async function runReview(worktreePath: string): Promise<void> {
|
|
|
64
64
|
|
|
65
65
|
console.log(`opening review for ${worktreePath}...`);
|
|
66
66
|
|
|
67
|
-
// Watch for .pending files from the
|
|
68
|
-
// (
|
|
67
|
+
// Watch for .pending files from the review app and deliver them.
|
|
68
|
+
// (The GUI app can't access the cmux socket — only CLI processes can.)
|
|
69
69
|
const repoRoot = getRepoRoot(resolvedPath);
|
|
70
70
|
const worktreeName = path.basename(resolvedPath);
|
|
71
71
|
const reviewsDir = path.join(repoRoot, ".orche", "reviews", worktreeName);
|
|
72
72
|
mkdirSync(reviewsDir, { recursive: true });
|
|
73
73
|
|
|
74
74
|
// CLI stays alive to watch for .pending files and deliver them via cmux/tmux
|
|
75
|
-
// (
|
|
75
|
+
// (the GUI app can't access the cmux socket — only processes started inside cmux can)
|
|
76
76
|
const watcher = watch(reviewsDir, (event, filename) => {
|
|
77
77
|
if (event === "rename" && filename?.endsWith(".pending")) {
|
|
78
78
|
const pendingPath = path.join(reviewsDir, filename);
|
|
@@ -89,19 +89,19 @@ async function runReview(worktreePath: string): Promise<void> {
|
|
|
89
89
|
process.exit(code ?? 0);
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
// Dev mode: launch
|
|
92
|
+
// Dev mode: launch the locally-built Tauri binary from the monorepo.
|
|
93
93
|
const cliDir = path.dirname(new URL(import.meta.url).pathname);
|
|
94
94
|
const localReviewDir = path.resolve(cliDir, "../../review");
|
|
95
95
|
const devReviewPath = process.env.ORCHE_REVIEW_DEV ||
|
|
96
96
|
(existsSync(path.join(localReviewDir, "package.json")) ? localReviewDir : undefined);
|
|
97
97
|
const debug = !!process.env.ORCHE_DEBUG;
|
|
98
98
|
if (devReviewPath) {
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
});
|
|
99
|
+
const tauriBin = path.join(devReviewPath, "src-tauri", "target", "release", "orche-review");
|
|
100
|
+
if (!existsSync(tauriBin)) {
|
|
101
|
+
die(`review app not built — run:\n (cd ${devReviewPath} && pnpm tauri build --no-bundle)`);
|
|
102
|
+
}
|
|
103
|
+
if (debug) console.error(`[review] launching: ${tauriBin} ${args.join(" ")}`);
|
|
104
|
+
const child = spawn(tauriBin, args, { stdio: ["ignore", "inherit", "inherit"] });
|
|
105
105
|
child.on("exit", onReviewExit);
|
|
106
106
|
return;
|
|
107
107
|
}
|