@base44-preview/cli 0.0.37-pr.364.24d182e → 0.0.37-pr.364.7a8fa09

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
@@ -246278,11 +246278,11 @@ class WatchBase44 extends EventEmitter4 {
246278
246278
  const watchItem = this.watchers.get(item.name);
246279
246279
  const exists = await pathExists(item.path);
246280
246280
  if (!watchItem && exists) {
246281
- await this.createChangeHandler(item)("", item.path);
246281
+ this.emit("change", item.name, item.path);
246282
246282
  this.watchers.set(item.name, this.watchTarget(item));
246283
246283
  } else if (watchItem && !exists) {
246284
246284
  await watchItem.close();
246285
- await this.createChangeHandler(item)("", item.path);
246285
+ this.emit("change", item.name, item.path);
246286
246286
  setTimeout(() => {
246287
246287
  this.watchers.forEach((watcher, name2) => {
246288
246288
  if (watcher.closed) {
@@ -246296,16 +246296,13 @@ class WatchBase44 extends EventEmitter4 {
246296
246296
  this.watchEntries();
246297
246297
  }, WATCH_QUEUE_DELAY_MS);
246298
246298
  }
246299
- createChangeHandler = (item) => {
246300
- return import_debounce.default(async (_event, path19) => {
246301
- this.emit("change", item.name, relative4(item.path, path19));
246302
- }, WATCH_DEBOUNCE_MS);
246303
- };
246304
246299
  watchTarget(item) {
246305
246300
  const watcher = watch(item.path, {
246306
246301
  ignoreInitial: true
246307
246302
  });
246308
- watcher.on("all", this.createChangeHandler(item));
246303
+ watcher.on("all", import_debounce.default(async (_event, path19) => {
246304
+ this.emit("change", item.name, relative4(item.path, path19));
246305
+ }, WATCH_DEBOUNCE_MS));
246309
246306
  watcher.on("error", (err) => {
246310
246307
  this.logger.error(`[dev-server] Watch handler failed for ${item.path}`, err instanceof Error ? err : undefined);
246311
246308
  });
@@ -250805,4 +250802,4 @@ export {
250805
250802
  CLIExitError
250806
250803
  };
250807
250804
 
250808
- //# debugId=B55811FFD223347464756E2164756E21
250805
+ //# debugId=8709F28AC0FAB59064756E2164756E21