@base44-preview/cli 0.0.55-pr.545.d908e49 → 0.0.55-pr.545.ea3e030

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
@@ -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
- const taskkill = spawn3("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
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");
@@ -257287,7 +257271,7 @@ async function createDevServer(options8) {
257287
257271
  port: process.env.IS_TEST === "true" ? undefined : DEFAULT_PORT
257288
257272
  });
257289
257273
  const baseUrl = `http://localhost:${port}`;
257290
- const { functions, entities, project: project2, siteUrl } = await options8.loadResources();
257274
+ const { functions, entities, project: project2 } = await options8.loadResources();
257291
257275
  const app = import_express6.default();
257292
257276
  const remoteProxy = import_http_proxy_middleware2.createProxyMiddleware({
257293
257277
  target: BASE44_APP_URL,
@@ -257347,12 +257331,6 @@ async function createDevServer(options8) {
257347
257331
  const customIntegrationRoutes = createCustomIntegrationRoutes(remoteProxy, devLogger);
257348
257332
  app.use("/api/apps/:appId/integrations/custom", customIntegrationRoutes);
257349
257333
  app.use((req, res, next) => {
257350
- if (siteUrl && (req.path === "/login" || req.path.startsWith("/login/"))) {
257351
- const targetUrl = new URL(req.originalUrl, siteUrl);
257352
- devLogger.warn(`"${req.originalUrl}" requires hosted login, redirecting to ${targetUrl.toString()}`);
257353
- res.redirect(targetUrl.toString());
257354
- return;
257355
- }
257356
257334
  if (!req.originalUrl.endsWith("analytics/track/batch")) {
257357
257335
  devLogger.warn(`"${req.originalUrl}" is not supported in local development, passing call to production`);
257358
257336
  }
@@ -257422,30 +257400,12 @@ async function createDevServer(options8) {
257422
257400
  logger: createDevLogger("frontend", theme.colors.base44Orange)
257423
257401
  });
257424
257402
  }
257425
- const closeServer = () => new Promise((resolve12, reject) => {
257426
- server.close((error48) => {
257427
- if (error48) {
257428
- reject(error48);
257429
- return;
257430
- }
257431
- resolve12();
257432
- });
257433
- });
257434
- const handleShutdownError = (error48) => {
257435
- const errorMessage = error48 instanceof Error ? error48.message : String(error48);
257436
- devLogger.error(`Failed to shut down dev server: ${errorMessage}`);
257437
- };
257438
- const runShutdown = async () => {
257403
+ const shutdown = async () => {
257439
257404
  base44ConfigWatcher.close();
257440
- await io6.close();
257405
+ io6.close();
257441
257406
  await functionManager.stopAll();
257442
257407
  await serveRunner?.stop();
257443
- await closeServer();
257444
- };
257445
- let shutdownPromise;
257446
- const shutdown = () => {
257447
- shutdownPromise ??= runShutdown().catch(handleShutdownError);
257448
- return shutdownPromise;
257408
+ server.close();
257449
257409
  };
257450
257410
  process.on("SIGINT", shutdown);
257451
257411
  process.on("SIGTERM", shutdown);
@@ -257476,9 +257436,6 @@ async function devAction(ctx, options8) {
257476
257436
  }
257477
257437
  const port = options8.port ? Number(options8.port) : undefined;
257478
257438
  const appId = app.id;
257479
- const siteUrlPromise = getSiteUrl().catch(() => {
257480
- return;
257481
- });
257482
257439
  const { port: resolvedPort, isServingFrontend } = await createDevServer({
257483
257440
  log,
257484
257441
  port,
@@ -257486,8 +257443,7 @@ async function devAction(ctx, options8) {
257486
257443
  denoWrapperPath: getDenoWrapperPath(),
257487
257444
  loadResources: async () => {
257488
257445
  const { functions, entities, project: project2 } = await readProjectConfig();
257489
- const siteUrl = await siteUrlPromise;
257490
- return { functions, entities, project: project2, siteUrl };
257446
+ return { functions, entities, project: project2 };
257491
257447
  }
257492
257448
  });
257493
257449
  const outroMessage = isServingFrontend ? "Open your app using the frontend dev server URL" : `Dev server is available at ${theme.colors.links(localServerUrl(resolvedPort))}`;
@@ -261973,4 +261929,4 @@ export {
261973
261929
  CLIExitError
261974
261930
  };
261975
261931
 
261976
- //# debugId=B905F109B7865B3364756E2164756E21
261932
+ //# debugId=FB17A69F9601DE6464756E2164756E21