specrails-hub 1.2.0 → 1.2.1
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/cli/dist/specrails-hub.js +12 -9
- package/package.json +1 -1
|
@@ -627,17 +627,20 @@ function isProcessRunning(pid) {
|
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
function hubServerPath() {
|
|
630
|
-
//
|
|
631
|
-
//
|
|
632
|
-
|
|
633
|
-
// Try compiled
|
|
634
|
-
const
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
|
|
630
|
+
// __dirname differs by runtime:
|
|
631
|
+
// compiled (npm install): <root>/cli/dist/ → need ../../server/dist/index.js
|
|
632
|
+
// tsx dev: <root>/cli/ → need ../server/dist/index.js
|
|
633
|
+
// Try both, compiled path first.
|
|
634
|
+
const fromDist = path_1.default.resolve(__dirname, '..', '..', 'server', 'dist', 'index.js');
|
|
635
|
+
const fromSrc = path_1.default.resolve(__dirname, '..', 'server', 'dist', 'index.js');
|
|
636
|
+
const devTs = path_1.default.resolve(__dirname, '..', 'server', 'index.ts');
|
|
637
|
+
if (fs_1.default.existsSync(fromDist))
|
|
638
|
+
return fromDist;
|
|
639
|
+
if (fs_1.default.existsSync(fromSrc))
|
|
640
|
+
return fromSrc;
|
|
638
641
|
if (fs_1.default.existsSync(devTs))
|
|
639
642
|
return devTs;
|
|
640
|
-
return
|
|
643
|
+
return fromDist;
|
|
641
644
|
}
|
|
642
645
|
async function hubStart(port) {
|
|
643
646
|
const pid = readPid();
|