@base44-preview/cli 0.0.55-pr.545.81d207d → 0.0.55-pr.545.8ee8765

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 CHANGED
@@ -255520,10 +255520,27 @@ class ServeRunner {
255520
255520
  return;
255521
255521
  }
255522
255522
  this.stopping = true;
255523
+ const hasExited = () => child.exitCode !== null || child.signalCode !== null;
255523
255524
  const exited = new Promise((resolve10) => child.once("exit", () => resolve10()));
255525
+ const waitForExit2 = async (timeoutMs) => {
255526
+ await Promise.race([
255527
+ exited,
255528
+ new Promise((resolve10) => setTimeout(resolve10, timeoutMs))
255529
+ ]);
255530
+ };
255524
255531
  if (process21.platform === "win32" && child.pid) {
255525
- spawn3("taskkill", ["/pid", String(child.pid), "/T", "/F"]);
255526
- } else if (child.pid) {
255532
+ const taskkill = spawn3("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
255533
+ stdio: "ignore"
255534
+ });
255535
+ await new Promise((resolve10) => taskkill.once("exit", () => resolve10()));
255536
+ await waitForExit2(3000);
255537
+ if (!hasExited()) {
255538
+ child.kill("SIGKILL");
255539
+ await waitForExit2(1000);
255540
+ }
255541
+ return;
255542
+ }
255543
+ if (child.pid) {
255527
255544
  try {
255528
255545
  process21.kill(-child.pid, "SIGTERM");
255529
255546
  } catch {
@@ -261928,4 +261945,4 @@ export {
261928
261945
  CLIExitError
261929
261946
  };
261930
261947
 
261931
- //# debugId=6B1ECA05EAAE1CF664756E2164756E21
261948
+ //# debugId=C0C3C333AB7ECBC364756E2164756E21