@nice-code/commander 0.102.0 → 0.104.0
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/README.md +37 -12
- package/build/cli.cjs +515 -145
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +515 -148
- package/build/cli.mjs.map +1 -1
- package/build/client/assets/{index-XAXsvgf4.js → index-BB6yHp_S.js} +4 -4
- package/build/client/assets/index-BB6yHp_S.js.map +1 -0
- package/build/client/index.html +1 -1
- package/build/config.d.cts +9 -0
- package/build/config.d.mts +9 -0
- package/build/{main-D-StoxUH.cjs → main-DkrkRGT6.cjs} +119 -33
- package/build/main-DkrkRGT6.cjs.map +1 -0
- package/build/{main-DCr__iZh.mjs → main-KhpDJbPT.mjs} +120 -34
- package/build/main-KhpDJbPT.mjs.map +1 -0
- package/build/types-B3WIUo4S.mjs.map +1 -1
- package/build/types-CIdWQGjF.cjs.map +1 -1
- package/package.json +6 -6
- package/build/client/assets/index-XAXsvgf4.js.map +0 -1
- package/build/main-D-StoxUH.cjs.map +0 -1
- package/build/main-DCr__iZh.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -33,6 +33,8 @@ export default defineCommanderConfig({
|
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
bunx nice-commander up # `web` → starts api first, waits for it to be READY, then web
|
|
36
|
+
# ✓ api ready → http://127.0.0.1:8787
|
|
37
|
+
bunx nice-commander up --json # the same generation as data: outcome, state, pid, urls per id
|
|
36
38
|
bunx nice-commander status # live table
|
|
37
39
|
bunx nice-commander ui # the browser view
|
|
38
40
|
bunx nice-commander down web
|
|
@@ -97,34 +99,57 @@ The process overview follows the current filters. Reduced-motion preferences dis
|
|
|
97
99
|
## Finding and stopping port owners
|
|
98
100
|
|
|
99
101
|
```bash
|
|
100
|
-
nice-commander doctor #
|
|
102
|
+
nice-commander doctor # occupied, inactive endpoints — each owner marked STRAY or not
|
|
101
103
|
nice-commander ports # inspect all configured exclusive TCP endpoints
|
|
102
104
|
nice-commander ports journey-backend journey-web
|
|
103
|
-
nice-commander ports journey-backend --kill 12345
|
|
105
|
+
nice-commander ports journey-backend --kill 12345 # review and confirm this PID
|
|
106
|
+
nice-commander ports journey-backend --kill-owner # stop whatever holds its endpoints, no PID needed
|
|
107
|
+
nice-commander up journey-backend --replace-same # take the port from a stray, then start
|
|
108
|
+
nice-commander doctor --reap-strays # stop every stray on a configured port
|
|
104
109
|
```
|
|
105
110
|
|
|
106
|
-
Inspection shows each listener's PID, executable, parent PID, working directory
|
|
107
|
-
identity
|
|
108
|
-
|
|
111
|
+
Inspection shows each listener's PID, executable, parent PID, working directory, process-start
|
|
112
|
+
identity and whether it is a **stray**: this definition's own command (argv and cwd both equal),
|
|
113
|
+
running outside the daemon — typically something you started by hand in a terminal that has since
|
|
114
|
+
gone away. The match walks up the listener's parents, so `bun run dev` → vite → the socket still
|
|
115
|
+
matches a definition of `bun run dev`. Anything else is a **stranger**: another application may use
|
|
116
|
+
the same port, and inspection does not guess. Command arguments are read for the match and are not
|
|
117
|
+
shown or stored.
|
|
118
|
+
|
|
119
|
+
A start that finds a stray on an exclusive port refuses and says so, naming the pid and the fix.
|
|
120
|
+
`up --replace-same` (or `replaceSame: true` on the definition, or under `defaults`) stops the stray
|
|
121
|
+
as a tree — root command first, so its wrapper cannot respawn it — with the same SIGTERM → grace →
|
|
122
|
+
SIGKILL ladder a stop uses, then starts the definition. A stranger on the port is named and always
|
|
123
|
+
refused, with or without the flag; nothing is ever killed on the strength of a port alone.
|
|
109
124
|
|
|
110
125
|
`--kill PID` sends SIGTERM after confirmation; `--yes` supplies explicit noninteractive consent.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
126
|
+
`--kill-owner` does the same for every verified listener on the selection's exclusive endpoints
|
|
127
|
+
without your having to copy a PID first. If the listener will not stop, inspect again and add
|
|
128
|
+
`--force` to choose SIGKILL. A stray is signalled as its tree; a stranger only as the selected
|
|
129
|
+
listener, so a watcher may restart it — inspect again to see the replacement. Multiple listeners
|
|
130
|
+
are listed individually.
|
|
114
131
|
|
|
115
132
|
In the UI, **inspect ports** appears on inactive process rows (including failed starts), and in
|
|
116
|
-
expanded details for active rows.
|
|
117
|
-
and
|
|
133
|
+
expanded details for active rows. Each listener carries its stray verdict; a stray offers
|
|
134
|
+
**replace stray and start** (the same as `--replace-same`). Otherwise review the owner, choose
|
|
135
|
+
**stop PID** or **force kill PID**, and confirm. Once the port is free, **retry start** runs the
|
|
136
|
+
normal startup checks again.
|
|
118
137
|
|
|
119
138
|
The identity and endpoint are rechecked before termination. Inspection tokens expire after five
|
|
120
139
|
minutes and can be used once. Active configured port owners must be stopped with their ordinary
|
|
121
140
|
stop control first; Commander and its ancestors are protected. `ports` works without starting a
|
|
122
|
-
daemon
|
|
141
|
+
daemon. `doctor` remains read-only unless `--reap` (a crashed daemon's ledger orphans) or
|
|
142
|
+
`--reap-strays` (strays on configured ports, confirmed one by one, `--yes` for scripts) is
|
|
143
|
+
explicitly requested; strangers are listed and left alone by both.
|
|
144
|
+
|
|
145
|
+
A refused start stays readable: `status` shows `start failed: …` on the row until a later start
|
|
146
|
+
succeeds or the process is stopped, and a `blocked: dependency "x" is not running` note clears by
|
|
147
|
+
itself once `x` is ready.
|
|
123
148
|
|
|
124
149
|
Owner inspection currently supports macOS and Linux with `lsof` and `ps` available. Visibility
|
|
125
150
|
is limited by OS permissions. Remote, shared and observed endpoints are never termination
|
|
126
151
|
targets. A missing tool or unknown identity produces a diagnostic instead of authorizing a kill.
|
|
127
|
-
Windows owner inspection is not supported yet.
|
|
152
|
+
Windows owner inspection is not supported yet, so on Windows every port owner is a stranger.
|
|
128
153
|
|
|
129
154
|
## Developing the web UI (`bun run dev`)
|
|
130
155
|
|