supabase-stateful 0.1.3 → 0.1.4

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": "supabase-stateful",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Persistent local state for Supabase development",
5
5
  "type": "module",
6
6
  "bin": {
@@ -523,12 +523,24 @@ NC='\\033[0m'
523
523
  echo -e "\${CYAN}Starting local development environment...\${NC}"
524
524
  echo ""
525
525
 
526
- # Run concurrently (it will handle Ctrl+C and stop all processes)
526
+ # Trap SIGINT so the shell doesn't exit when Ctrl+C is pressed
527
+ # This allows us to run cleanup code after concurrently exits
528
+ trap 'echo ""' INT
529
+
530
+ # Run concurrently in background so trap can catch SIGINT
527
531
  npx concurrently \\
528
532
  --names "${names.join(',')}" \\
529
533
  --prefix-colors "${colors.join(',')}" \\
530
534
  --kill-others-on-fail \\
531
- ${commands.join(' \\\n ')}
535
+ ${commands.join(' \\\n ')} &
536
+
537
+ CONCURRENT_PID=\$!
538
+
539
+ # Wait for concurrently to finish (will return immediately when SIGINT is received)
540
+ wait \$CONCURRENT_PID 2>/dev/null
541
+
542
+ # Small delay to let processes finish their output
543
+ sleep 0.5
532
544
 
533
545
  # After concurrently exits (from Ctrl+C or error), ask about saving state
534
546
  echo ""