projax 1.3.3 → 1.3.4

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 (2) hide show
  1. package/dist/index.js +17 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -744,17 +744,30 @@ program
744
744
  await ensureAPIServerRunning(false);
745
745
  // Check for bundled Desktop app first (in dist/desktop when installed globally)
746
746
  // Then check for local development (packages/cli/dist -> packages/desktop)
747
- const bundledDesktopPath = path.join(__dirname, 'desktop');
748
- const bundledDesktopMain = path.join(bundledDesktopPath, 'main.js');
747
+ // Support both legacy "desktop" folder and current "electron" bundle folder
748
+ const bundledDesktopPathCandidates = [
749
+ path.join(__dirname, 'desktop'),
750
+ path.join(__dirname, 'electron'),
751
+ ];
752
+ let bundledDesktopPath = null;
753
+ let bundledDesktopMain = null;
754
+ for (const candidate of bundledDesktopPathCandidates) {
755
+ const mainCandidate = path.join(candidate, 'main.js');
756
+ if (fs.existsSync(mainCandidate)) {
757
+ bundledDesktopPath = candidate;
758
+ bundledDesktopMain = mainCandidate;
759
+ break;
760
+ }
761
+ }
749
762
  const localDesktopPath = path.join(__dirname, '..', '..', 'desktop');
750
763
  const localDesktopMain = path.join(localDesktopPath, 'dist', 'main.js');
751
764
  // Check if bundled desktop exists (global install)
752
- const hasBundledDesktop = fs.existsSync(bundledDesktopMain);
765
+ const hasBundledDesktop = Boolean(bundledDesktopPath && bundledDesktopMain);
753
766
  // Check if local desktop exists (development mode)
754
767
  const isLocalDev = fs.existsSync(localDesktopPath) && fs.existsSync(path.join(localDesktopPath, 'package.json'));
755
768
  let desktopPackagePath;
756
769
  let desktopMainPath;
757
- if (hasBundledDesktop) {
770
+ if (bundledDesktopPath && bundledDesktopMain) {
758
771
  // Bundled Desktop app (global install)
759
772
  desktopPackagePath = bundledDesktopPath;
760
773
  desktopMainPath = bundledDesktopMain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projax",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "CLI tool for managing local development projects",
5
5
  "main": "dist/index.js",
6
6
  "bin": {