@base44-preview/cli 0.0.36-pr.353.d968c48 → 0.0.36-pr.353.e4eb961

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
@@ -245864,9 +245864,6 @@ class DirWatcher {
245864
245864
  this.logger = logger;
245865
245865
  }
245866
245866
  async start() {
245867
- if (this.watcher) {
245868
- return;
245869
- }
245870
245867
  if (await pathExists(this.targetDir)) {
245871
245868
  this.watchTarget();
245872
245869
  } else {
@@ -245891,15 +245888,6 @@ class DirWatcher {
245891
245888
  }, WATCH_DEBOUNCE_MS);
245892
245889
  this.watcher = watch(this.targetDir, { ignoreInitial: true });
245893
245890
  this.watcher.on("all", handler);
245894
- this.watcher.on("unlinkDir", (path18) => {
245895
- if (path18 === this.targetDir) {
245896
- console.log("unlinkDir", path18);
245897
- this.watcher?.close();
245898
- this.watcher = null;
245899
- this.watchParentForCreation();
245900
- }
245901
- });
245902
- this.watcher.on("error", (err) => this.handleError(err));
245903
245891
  }
245904
245892
  watchParentForCreation() {
245905
245893
  if (this.closed) {
@@ -245924,7 +245912,6 @@ class DirWatcher {
245924
245912
  }, WATCH_DEBOUNCE_MS);
245925
245913
  this.watcher = watch(parentDir, { ignoreInitial: true, depth: 0 });
245926
245914
  this.watcher.on("all", handler);
245927
- this.watcher.on("error", (err) => this.handleError(err));
245928
245915
  }
245929
245916
  handleError(error48) {
245930
245917
  this.logger.error(`[dev-server] Watch handler failed for ${this.targetDir}`, error48 instanceof Error ? error48 : undefined);
@@ -246352,12 +246339,12 @@ async function createDevServer(options8) {
246352
246339
  const functionsDir = join18(configDir, project2.functionsDir);
246353
246340
  const functionsWatcher = new DirWatcher(functionsDir, async () => {
246354
246341
  const { functions: functions2 } = await options8.loadResources();
246355
- const previousFunctionCount = functionManager.getFunctionNames().length;
246342
+ const previousNamesLength = functionManager.getFunctionNames().length;
246356
246343
  functionManager.reload(functions2);
246357
246344
  const names = functionManager.getFunctionNames();
246358
246345
  if (names.length > 0) {
246359
246346
  devLogger.log(`Reloaded functions: ${names.sort().join(", ")}`);
246360
- } else if (previousFunctionCount > 0) {
246347
+ } else if (previousNamesLength > 0) {
246361
246348
  devLogger.log("All functions removed");
246362
246349
  }
246363
246350
  }, devLogger);
@@ -250746,4 +250733,4 @@ export {
250746
250733
  CLIExitError
250747
250734
  };
250748
250735
 
250749
- //# debugId=C13F884E2AA2256764756E2164756E21
250736
+ //# debugId=EFF117A5EF450AB064756E2164756E21