@base44-preview/cli 0.0.32-pr.249.2ca946e → 0.0.32-pr.249.38b7e86

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
@@ -195198,9 +195198,9 @@ function getTypesCommand(context) {
195198
195198
  }
195199
195199
 
195200
195200
  // src/cli/dev/dev-server/main.ts
195201
- import { dirname as dirname12, join as join16 } from "node:path";
195202
195201
  var import_cors = __toESM(require_lib4(), 1);
195203
195202
  var import_express2 = __toESM(require_express(), 1);
195203
+ import { dirname as dirname12, join as join16 } from "node:path";
195204
195204
 
195205
195205
  // node_modules/get-port/index.js
195206
195206
  import net from "node:net";
@@ -195387,8 +195387,17 @@ class FunctionManager {
195387
195387
  this.functions = new Map(functions.map((f7) => [f7.name, f7]));
195388
195388
  this.logger = logger;
195389
195389
  }
195390
- getFunction(name2) {
195391
- return this.functions.get(name2);
195390
+ functionNames() {
195391
+ return Array.from(this.functions.keys());
195392
+ }
195393
+ verifyDenoIsInstalled() {
195394
+ if (this.functions.size > 0) {
195395
+ try {
195396
+ spawn2("deno", ["--version"]);
195397
+ } catch {
195398
+ throw new Error("Deno is required to run functions. Please install it from https://deno.com/download");
195399
+ }
195400
+ }
195392
195401
  }
195393
195402
  async ensureRunning(name2) {
195394
195403
  const existing = this.running.get(name2);
@@ -195599,7 +195608,7 @@ async function createDevServer(options8) {
195599
195608
  ]);
195600
195609
  const devLogger = createDevLogger(false);
195601
195610
  const functionManager = new FunctionManager(functions, devLogger);
195602
- M2.info(`Loaded functions: ${functions.map((f7) => f7.name).join(", ") || "(none)"}`);
195611
+ functionManager.verifyDenoIsInstalled();
195603
195612
  const functionRoutes = createFunctionRoutes(functionManager, devLogger);
195604
195613
  app.use("/api/apps/:appId/functions", functionRoutes);
195605
195614
  app.use((req, res, next) => {
@@ -200023,4 +200032,4 @@ export {
200023
200032
  CLIExitError
200024
200033
  };
200025
200034
 
200026
- //# debugId=AA59D5B15FB6A1E264756E2164756E21
200035
+ //# debugId=F7187C428A4270E164756E2164756E21