@zendero/runctl 0.1.8 → 0.1.9

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 CHANGED
@@ -102,6 +102,14 @@ Use npm explicitly (e.g. no pnpm on the machine):
102
102
  curl -fsSL "https://raw.githubusercontent.com/DoctorKhan/runctl/main/scripts/install-global.sh" | bash -s -- --pm npm --registry
103
103
  ```
104
104
 
105
+ If `runctl --help` still looks old after install/update, remove the legacy package that can shadow this CLI and reinstall:
106
+
107
+ ```bash
108
+ pnpm remove -g runctl
109
+ pnpm add -g @zendero/runctl@latest
110
+ hash -r
111
+ ```
112
+
105
113
  `--help` on the script prints the same usage summary.
106
114
 
107
115
  ---
package/bin/runctl CHANGED
@@ -330,6 +330,19 @@ cmd_update() {
330
330
  pm="$(cmd_update_pick_pm "$PM")" || exit 1
331
331
  git_target="${GIT_BASE}#${GIT_REF}"
332
332
 
333
+ _remove_conflicting_global_runctl() {
334
+ # A legacy package named "runctl" can own the same binary name and shadow @zendero/runctl.
335
+ # Best-effort remove before reinstalling the intended package.
336
+ if [[ "$PKG" != "@zendero/runctl" ]]; then
337
+ return 0
338
+ fi
339
+ if [[ "$pm" == "pnpm" ]]; then
340
+ pnpm remove -g runctl >/dev/null 2>&1 || true
341
+ else
342
+ npm uninstall -g runctl >/dev/null 2>&1 || true
343
+ fi
344
+ }
345
+
333
346
  _git_base_for_ls_remote() {
334
347
  local base="$1"
335
348
  printf '%s' "${base#git+}"
@@ -349,6 +362,7 @@ cmd_update() {
349
362
  _update_registry() {
350
363
  local spec="${PKG}@latest"
351
364
  echo "runctl update: installing latest from registry ($spec)..."
365
+ _remove_conflicting_global_runctl
352
366
  if [[ "$pm" == "pnpm" ]]; then
353
367
  pnpm add -g --force "$spec"
354
368
  else
@@ -366,6 +380,7 @@ cmd_update() {
366
380
  echo "runctl update: installing from Git ($git_target)..."
367
381
  echo "runctl update: could not resolve ref to SHA; proceeding with ref directly." >&2
368
382
  fi
383
+ _remove_conflicting_global_runctl
369
384
  if [[ "$pm" == "pnpm" ]]; then
370
385
  pnpm add -g --force "$spec"
371
386
  else
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendero/runctl",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Picks a free port, runs your dev server in the background, and keeps PID + port state in .run/ so projects don't collide.",
5
5
  "author": "DoctorKhan",
6
6
  "homepage": "https://github.com/DoctorKhan/runctl#readme",
@@ -132,10 +132,20 @@ run_install() {
132
132
  local source_kind="$2"
133
133
  local target="$3"
134
134
 
135
+ # A legacy package named "runctl" can shadow the same CLI binary.
136
+ # Remove it before installing @zendero/runctl.
137
+ if [[ "$PKG" == "@zendero/runctl" ]]; then
138
+ if [[ "$manager" == "pnpm" ]]; then
139
+ pnpm remove -g runctl >/dev/null 2>&1 || true
140
+ else
141
+ npm uninstall -g runctl >/dev/null 2>&1 || true
142
+ fi
143
+ fi
144
+
135
145
  if [[ "$manager" == "pnpm" ]]; then
136
- pnpm add -g "$target"
146
+ pnpm add -g --force "$target"
137
147
  else
138
- npm install -g "$target"
148
+ npm install -g --force "$target"
139
149
  fi
140
150
 
141
151
  say