@noego/app 0.0.10 → 0.0.11

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": "@noego/app",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Production build tool for Dinner/Forge apps.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -499,8 +499,19 @@ async function runSplitServeWithWatch(context, tsxExecutable, tsxArgs, baseEnv,
499
499
  new Promise((resolve) => {
500
500
  if (!backendProc) return resolve();
501
501
  logger.info(`⏹️ Stopping backend (preparing for restart #${backendRestartCount + 1})...`);
502
- const to = setTimeout(resolve, 2000);
502
+ const pid = backendProc.pid;
503
+ let exited = false;
504
+
505
+ const to = setTimeout(() => {
506
+ if (!exited && pid) {
507
+ logger.warn(`⚠️ Backend didn't exit gracefully, force killing process tree...`);
508
+ killProcessTree(pid, 'SIGKILL');
509
+ }
510
+ resolve();
511
+ }, 2000);
512
+
503
513
  backendProc.once('exit', () => {
514
+ exited = true;
504
515
  clearTimeout(to);
505
516
  resolve();
506
517
  });
@@ -515,8 +526,19 @@ async function runSplitServeWithWatch(context, tsxExecutable, tsxArgs, baseEnv,
515
526
  new Promise((resolve) => {
516
527
  if (!frontendProc) return resolve();
517
528
  logger.info(`⏹️ Stopping frontend (preparing for restart #${frontendRestartCount + 1})...`);
518
- const to = setTimeout(resolve, 2000);
529
+ const pid = frontendProc.pid;
530
+ let exited = false;
531
+
532
+ const to = setTimeout(() => {
533
+ if (!exited && pid) {
534
+ logger.warn(`⚠️ Frontend didn't exit gracefully, force killing process tree...`);
535
+ killProcessTree(pid, 'SIGKILL');
536
+ }
537
+ resolve();
538
+ }, 2000);
539
+
519
540
  frontendProc.once('exit', () => {
541
+ exited = true;
520
542
  clearTimeout(to);
521
543
  resolve();
522
544
  });
@@ -597,10 +619,12 @@ async function runSplitServeWithWatch(context, tsxExecutable, tsxArgs, baseEnv,
597
619
  // Restart appropriate service(s)
598
620
  if (restartBackend) {
599
621
  await stopBackend();
622
+ await new Promise(r => setTimeout(r, 100)); // Small delay to ensure port release
600
623
  startBackend();
601
624
  }
602
625
  if (restartFrontend) {
603
626
  await stopFrontend();
627
+ await new Promise(r => setTimeout(r, 100)); // Small delay to ensure port release
604
628
  startFrontend();
605
629
  }
606
630
 
@@ -807,8 +831,19 @@ async function runWithRestart(context, tsxExecutable, tsxArgs, env, watcher, log
807
831
  const stop = () =>
808
832
  new Promise((resolve) => {
809
833
  if (!child) return resolve();
810
- const to = setTimeout(resolve, 2000);
834
+ const pid = child.pid;
835
+ let exited = false;
836
+
837
+ const to = setTimeout(() => {
838
+ if (!exited && pid) {
839
+ logger.warn(`⚠️ Process didn't exit gracefully, force killing process tree...`);
840
+ killProcessTree(pid, 'SIGKILL');
841
+ }
842
+ resolve();
843
+ }, 2000);
844
+
811
845
  child.once('exit', () => {
846
+ exited = true;
812
847
  clearTimeout(to);
813
848
  resolve();
814
849
  });
@@ -1,19 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Read(//Users/shavauhngabay/dev/noego/dinner/**)",
5
- "Read(//Users/shavauhngabay/dev/ego/sqlstack/**)",
6
- "Read(//Users/shavauhngabay/dev/ego/forge/**)",
7
- "Read(//Users/shavauhngabay/dev/noblelaw/ui/**)",
8
- "Read(//Users/shavauhngabay/dev/noblelaw/**)",
9
- "mcp__chrome-devtools__take_screenshot",
10
- "Bash(npm run build:ui:ssr:*)",
11
- "mcp__chrome-devtools__navigate_page",
12
- "Bash(node dist/hammer.js:*)",
13
- "Bash(tee:*)",
14
- "mcp__chrome-devtools__list_console_messages"
15
- ],
16
- "deny": [],
17
- "ask": []
18
- }
19
- }