@base44-preview/cli 0.0.55-pr.545.7e19dbc → 0.0.55-pr.545.7ed3721
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/index.js +6 -45
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -255490,7 +255490,6 @@ class ServeRunner {
|
|
|
255490
255490
|
logger;
|
|
255491
255491
|
child;
|
|
255492
255492
|
stopping = false;
|
|
255493
|
-
stopPromise;
|
|
255494
255493
|
exitListeners = [];
|
|
255495
255494
|
constructor(options8) {
|
|
255496
255495
|
this.command = options8.command;
|
|
@@ -255508,8 +255507,7 @@ class ServeRunner {
|
|
|
255508
255507
|
shell: true,
|
|
255509
255508
|
detached: process21.platform !== "win32",
|
|
255510
255509
|
env: { ...process21.env, ...this.env },
|
|
255511
|
-
stdio: [stdin2, "pipe", "pipe"]
|
|
255512
|
-
windowsHide: true
|
|
255510
|
+
stdio: [stdin2, "pipe", "pipe"]
|
|
255513
255511
|
});
|
|
255514
255512
|
this.child = child;
|
|
255515
255513
|
this.setupHandlers(child);
|
|
@@ -255518,13 +255516,6 @@ class ServeRunner {
|
|
|
255518
255516
|
this.exitListeners.push(listener);
|
|
255519
255517
|
}
|
|
255520
255518
|
async stop() {
|
|
255521
|
-
if (this.stopPromise) {
|
|
255522
|
-
return this.stopPromise;
|
|
255523
|
-
}
|
|
255524
|
-
this.stopPromise = this.stopChild();
|
|
255525
|
-
return this.stopPromise;
|
|
255526
|
-
}
|
|
255527
|
-
async stopChild() {
|
|
255528
255519
|
const child = this.child;
|
|
255529
255520
|
if (!child || child.exitCode !== null) {
|
|
255530
255521
|
return;
|
|
@@ -255532,14 +255523,7 @@ class ServeRunner {
|
|
|
255532
255523
|
this.stopping = true;
|
|
255533
255524
|
const exited = new Promise((resolve10) => child.once("exit", () => resolve10()));
|
|
255534
255525
|
if (process21.platform === "win32" && child.pid) {
|
|
255535
|
-
|
|
255536
|
-
stdio: "ignore",
|
|
255537
|
-
windowsHide: true
|
|
255538
|
-
});
|
|
255539
|
-
await new Promise((resolve10) => {
|
|
255540
|
-
taskkill.once("exit", () => resolve10());
|
|
255541
|
-
taskkill.once("error", () => resolve10());
|
|
255542
|
-
});
|
|
255526
|
+
spawn3("taskkill", ["/pid", String(child.pid), "/T", "/F"]);
|
|
255543
255527
|
} else if (child.pid) {
|
|
255544
255528
|
try {
|
|
255545
255529
|
process21.kill(-child.pid, "SIGTERM");
|
|
@@ -257422,35 +257406,12 @@ async function createDevServer(options8) {
|
|
|
257422
257406
|
logger: createDevLogger("frontend", theme.colors.base44Orange)
|
|
257423
257407
|
});
|
|
257424
257408
|
}
|
|
257425
|
-
const
|
|
257426
|
-
const errorMessage = error48 instanceof Error ? error48.message : String(error48);
|
|
257427
|
-
devLogger.error(`Failed to shut down dev server: ${errorMessage}`);
|
|
257428
|
-
};
|
|
257429
|
-
const closeServerIfRunning = async () => {
|
|
257430
|
-
if (!server.listening) {
|
|
257431
|
-
return;
|
|
257432
|
-
}
|
|
257433
|
-
await new Promise((resolve12, reject) => {
|
|
257434
|
-
server.close((error48) => {
|
|
257435
|
-
if (error48) {
|
|
257436
|
-
reject(error48);
|
|
257437
|
-
return;
|
|
257438
|
-
}
|
|
257439
|
-
resolve12();
|
|
257440
|
-
});
|
|
257441
|
-
});
|
|
257442
|
-
};
|
|
257443
|
-
const runShutdown = async () => {
|
|
257409
|
+
const shutdown = async () => {
|
|
257444
257410
|
base44ConfigWatcher.close();
|
|
257445
|
-
|
|
257411
|
+
io6.close();
|
|
257446
257412
|
await functionManager.stopAll();
|
|
257447
257413
|
await serveRunner?.stop();
|
|
257448
|
-
|
|
257449
|
-
};
|
|
257450
|
-
let shutdownPromise;
|
|
257451
|
-
const shutdown = () => {
|
|
257452
|
-
shutdownPromise ??= runShutdown().catch(handleShutdownError);
|
|
257453
|
-
return shutdownPromise;
|
|
257414
|
+
server.close();
|
|
257454
257415
|
};
|
|
257455
257416
|
process.on("SIGINT", shutdown);
|
|
257456
257417
|
process.on("SIGTERM", shutdown);
|
|
@@ -261978,4 +261939,4 @@ export {
|
|
|
261978
261939
|
CLIExitError
|
|
261979
261940
|
};
|
|
261980
261941
|
|
|
261981
|
-
//# debugId=
|
|
261942
|
+
//# debugId=38217A3EFC1ECB9764756E2164756E21
|