Skip to content

Commit 23bd123

Browse files
committed
chore: wip
1 parent 6180d70 commit 23bd123

4 files changed

Lines changed: 25 additions & 14 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/pantry
44
.stx
55
pantry
6+
.claude/scheduled_tasks.lock

bun.lock

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
},
2222
"dependencies": {
2323
"@stacksjs/bun-router": "link:@stacksjs/bun-router",
24-
"bun-plugin-stx": "latest",
25-
"@system-cleaner/core": "workspace:*",
2624
"@system-cleaner/clean": "workspace:*",
27-
"@system-cleaner/uninstall": "workspace:*",
25+
"@system-cleaner/core": "workspace:*",
2826
"@system-cleaner/disk": "workspace:*",
2927
"@system-cleaner/monitor": "workspace:*",
28+
"@system-cleaner/uninstall": "workspace:*",
29+
"bun-plugin-stx": "^0.2.47",
3030
"ts-broadcasting": "link:ts-broadcasting"
3131
},
3232
"devDependencies": {

scripts/dev.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env bun
22
// Dev wrapper that frees ports + kills stale `stx dev` runs before handing off.
33
//
4-
// Why: `stx dev` silently rolls to a different port (3456 → 34560 → ...) when
5-
// 3456 is busy, and broadcasting on 6001 silently fails when its port is busy.
6-
// A previous run that didn't shut down cleanly will keep holding 6001 plus a
7-
// rolled-over port — invisible to a wrapper that only checks port 3456. So
8-
// we identify stale STX runs by *command line* (this workspace's pantry path)
9-
// and kill them first, then sweep the named ports as a final safety net.
4+
// Why: a previous run that didn't shut down cleanly (terminal closed,
5+
// SIGKILL, crash) will keep holding ports — including broadcasting on 6001,
6+
// where stx silently degrades to a warning if its port is busy. We identify
7+
// stale stx runs by command line (this workspace's pantry symlink) and kill
8+
// them first, then sweep the named ports + poll until they're bindable on
9+
// both IPv4 and IPv6 so the freshly-spawned stx finds them clean.
1010

1111
import * as net from 'node:net'
1212
import { spawn, spawnSync } from 'node:child_process'

0 commit comments

Comments
 (0)