@gachlab/devup 0.9.2 → 0.9.3
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to `@gachlab/devup` are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.9.3] — 2026-05-22
|
|
9
|
+
|
|
10
|
+
Critical hotfix for `devup down` against the VS Code extension.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **`devup down` no longer gets SIGKILL'd because the control-plane socket hangs on streaming clients.** The control-plane server's `close()` awaited every client to disconnect on its own, but long-lived streaming subscriptions (`status.follow`, `logs.follow` — exactly what the VS Code extension uses) never close until the daemon tells them to. Result: `devup down` waited the full 10 s grace, then SIGKILL'd the daemon. SIGKILL skips the cleanup handler → all spawned services orphaned to init, ports left busy, next `devup up -d` hits EADDRINUSE on every port. Fix: track every active client socket and `destroy()` them before awaiting `server.close()`. Clean shutdowns now complete in milliseconds even with the extension connected.
|
|
14
|
+
- **Pre-boot port-conflict scan now covers web services too.** They were skipped on the assumption that dev servers handle retry themselves, but in daemon mode the user wants devup to own the configured ports — same as APIs. If a web port is held by a stray Vite/ng-serve from a previous run, the scan now flags it and offers to take it over.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- New unit test asserts `socket.close()` completes in under 2 s with an active `logs.follow` subscription.
|
|
18
|
+
|
|
8
19
|
## [0.9.2] — 2026-05-22
|
|
9
20
|
|
|
10
21
|
Critical hotfix. **All 0.9.x users should upgrade immediately.**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket-server.d.ts","sourceRoot":"","sources":["../../src/control-plane/socket-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,MAAM,EA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C,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAO,GAC1D,OAAO,CAAC,kBAAkB,CAAC,CA+C7B"}
|
package/dist/index.js
CHANGED
|
@@ -720,7 +720,12 @@ async function startSocketServer(projectName, ctx, opts = {}) {
|
|
|
720
720
|
} catch {
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
const
|
|
723
|
+
const activeClients = /* @__PURE__ */ new Set();
|
|
724
|
+
const server = createServer((socket) => {
|
|
725
|
+
activeClients.add(socket);
|
|
726
|
+
socket.once("close", () => activeClients.delete(socket));
|
|
727
|
+
handleClient(socket, ctx);
|
|
728
|
+
});
|
|
724
729
|
await new Promise((resolve4, reject) => {
|
|
725
730
|
server.once("error", reject);
|
|
726
731
|
server.listen(path, () => {
|
|
@@ -737,6 +742,8 @@ async function startSocketServer(projectName, ctx, opts = {}) {
|
|
|
737
742
|
server,
|
|
738
743
|
path,
|
|
739
744
|
async close() {
|
|
745
|
+
for (const sock of activeClients) sock.destroy();
|
|
746
|
+
activeClients.clear();
|
|
740
747
|
await new Promise((resolve4) => server.close(() => resolve4()));
|
|
741
748
|
if (existsSync5(path)) {
|
|
742
749
|
try {
|
|
@@ -2583,9 +2590,8 @@ function parseLsof(stdout) {
|
|
|
2583
2590
|
return null;
|
|
2584
2591
|
}
|
|
2585
2592
|
async function scanPortConflicts(services) {
|
|
2586
|
-
const apis = services.filter((s) => s.type === "api");
|
|
2587
2593
|
const conflicts = [];
|
|
2588
|
-
for (const svc of
|
|
2594
|
+
for (const svc of services) {
|
|
2589
2595
|
const bindable = await isPortBindable(svc.port);
|
|
2590
2596
|
if (bindable) continue;
|
|
2591
2597
|
const holder = await findPortHolder(svc.port);
|