@qumra/cli 2.4.17 → 2.4.18
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 +27 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -304366,7 +304366,7 @@ class SectionBuilder {
|
|
|
304366
304366
|
}
|
|
304367
304367
|
}
|
|
304368
304368
|
|
|
304369
|
-
var version$2 = "2.4.
|
|
304369
|
+
var version$2 = "2.4.18";
|
|
304370
304370
|
var pkg = {
|
|
304371
304371
|
version: version$2};
|
|
304372
304372
|
|
|
@@ -534474,6 +534474,7 @@ AppTunnelService = __decorate$5([
|
|
|
534474
534474
|
let AppDevServerService = class AppDevServerService {
|
|
534475
534475
|
constructor(logger) {
|
|
534476
534476
|
this.logger = logger;
|
|
534477
|
+
this.childProcess = null;
|
|
534477
534478
|
}
|
|
534478
534479
|
async start(options) {
|
|
534479
534480
|
const { env, cwd = process.cwd() } = options;
|
|
@@ -534484,7 +534485,9 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534484
534485
|
cwd,
|
|
534485
534486
|
env: { ...process.env, ...env },
|
|
534486
534487
|
shell: true,
|
|
534488
|
+
detached: true,
|
|
534487
534489
|
});
|
|
534490
|
+
this.childProcess = child;
|
|
534488
534491
|
(_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
534489
534492
|
const lines = data.toString().trim().split('\n');
|
|
534490
534493
|
for (const line of lines) {
|
|
@@ -534514,6 +534517,7 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534514
534517
|
setTimeout(resolve, 2000);
|
|
534515
534518
|
// Handle exit
|
|
534516
534519
|
child.on('exit', (code) => {
|
|
534520
|
+
this.childProcess = null;
|
|
534517
534521
|
if (code !== 0) {
|
|
534518
534522
|
this.logger.componentLog('React Router', `Server exited with code ${code}`, 'error');
|
|
534519
534523
|
}
|
|
@@ -534532,7 +534536,9 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534532
534536
|
cwd,
|
|
534533
534537
|
env: { ...process.env, ...env },
|
|
534534
534538
|
shell: true,
|
|
534539
|
+
detached: true,
|
|
534535
534540
|
});
|
|
534541
|
+
this.childProcess = child;
|
|
534536
534542
|
(_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
534537
534543
|
const lines = data.toString().trim().split('\n');
|
|
534538
534544
|
for (const line of lines) {
|
|
@@ -534562,12 +534568,31 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534562
534568
|
setTimeout(resolve, 2000);
|
|
534563
534569
|
// Handle exit
|
|
534564
534570
|
child.on('exit', (code) => {
|
|
534571
|
+
this.childProcess = null;
|
|
534565
534572
|
if (code !== 0) {
|
|
534566
534573
|
devUI.log('React Router', `Server exited with code ${code}`, 'error');
|
|
534567
534574
|
}
|
|
534568
534575
|
});
|
|
534569
534576
|
});
|
|
534570
534577
|
}
|
|
534578
|
+
stop() {
|
|
534579
|
+
if (this.childProcess && !this.childProcess.killed) {
|
|
534580
|
+
// Kill the process tree (shell: true spawns a shell + child)
|
|
534581
|
+
if (this.childProcess.pid) {
|
|
534582
|
+
try {
|
|
534583
|
+
process.kill(-this.childProcess.pid, 'SIGTERM');
|
|
534584
|
+
}
|
|
534585
|
+
catch {
|
|
534586
|
+
// Fallback if process group kill fails
|
|
534587
|
+
this.childProcess.kill('SIGTERM');
|
|
534588
|
+
}
|
|
534589
|
+
}
|
|
534590
|
+
else {
|
|
534591
|
+
this.childProcess.kill('SIGTERM');
|
|
534592
|
+
}
|
|
534593
|
+
this.childProcess = null;
|
|
534594
|
+
}
|
|
534595
|
+
}
|
|
534571
534596
|
async getAvailablePort(startPort = 4000) {
|
|
534572
534597
|
let port = startPort;
|
|
534573
534598
|
while (true) {
|
|
@@ -534682,6 +534707,7 @@ let AppService = class AppService {
|
|
|
534682
534707
|
shortcuts: [
|
|
534683
534708
|
{
|
|
534684
534709
|
key: 'q', label: 'Quit', handler: () => {
|
|
534710
|
+
this.devServer.stop();
|
|
534685
534711
|
devUI.stop();
|
|
534686
534712
|
this.tunnel.stopTunnel();
|
|
534687
534713
|
process.exit(0);
|