@appweaver/cli 1.0.14 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appweaver/cli",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Appweaver - the backend framework for AI-first development (@cli)",
5
5
  "author": "Luka Matosevic",
6
6
  "license": "MIT",
@@ -114,12 +114,15 @@ async function watchNodeProject(mainFilePath, projectFile) {
114
114
  */
115
115
  async function watchBunProcess() {
116
116
  let abortController;
117
+ let runningProcess;
117
118
  let debounceTimer;
118
119
  // Starts a new process and aborts the previous one
119
120
  async function start() {
120
121
  abortController?.abort();
122
+ // Wait for the previous process to fully terminate before starting a new one
123
+ await runningProcess;
121
124
  abortController = new AbortController();
122
- await (0, utils_1.runProcess)('bun', [common_1.config.APP_MAIN_FILE_PATH], {
125
+ runningProcess = (0, utils_1.runProcess)('bun', [common_1.config.APP_MAIN_FILE_PATH], {
123
126
  signal: abortController.signal
124
127
  });
125
128
  }