erdbpro 2.5.2 → 2.5.3-beta.1

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": "erdbpro",
3
- "version": "2.5.2",
3
+ "version": "2.5.3-beta.1",
4
4
  "description": "ERD Builder Pro CLI — one command to start your database design workspace.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.mjs CHANGED
@@ -131,6 +131,17 @@ function startServer(port, background) {
131
131
  }
132
132
 
133
133
  child.on('exit', (code) => {
134
+ // null code = killed by signal (menubar Quit) — exit gracefully
135
+ if (code === null) {
136
+ if (fs.existsSync(PID_FILE)) {
137
+ try { fs.unlinkSync(PID_FILE); } catch { /* stale */ }
138
+ }
139
+ if (!background) {
140
+ process.stdout.write('\n 👋 Server stopped. Goodbye!\n\n');
141
+ process.exit(0);
142
+ }
143
+ return;
144
+ }
134
145
  if (code !== 0 && !background) {
135
146
  console.error(`❌ Server exited with code ${code}`);
136
147
  console.error(` Logs: ${errLog}`);