@taranek/orche 0.0.26 → 0.0.28

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.
Files changed (3) hide show
  1. package/dist/cli.js +10 -10
  2. package/package.json +1 -1
  3. 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 Electron app and deliver them
65
- // (Electron can't access the cmux socket — only CLI processes can)
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
- // (Electron can't access the cmux socket — only processes started inside cmux can)
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 electron from local monorepo
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 electronBin = path.join(devReviewPath, "node_modules/.bin/electron");
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: ${electronBin} ${[devReviewPath, ...args].join(" ")}`);
99
- const child = spawn(electronBin, [devReviewPath, ...args], {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taranek/orche",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "orche": "./dist/cli.js"
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 Electron app and deliver them
68
- // (Electron can't access the cmux socket — only CLI processes can)
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
- // (Electron can't access the cmux socket — only processes started inside cmux can)
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 electron from local monorepo
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 electronBin = path.join(devReviewPath, "node_modules/.bin/electron");
100
- if (debug) console.error(`[review] launching: ${electronBin} ${[devReviewPath, ...args].join(" ")}`);
101
- const child = spawn(electronBin, [devReviewPath, ...args], {
102
- stdio: ["ignore", "inherit", "inherit"],
103
- env: { ...process.env, VITE_DEV_SERVER_URL: undefined },
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
  }