@hamedb89/localghost 0.4.1 → 0.6.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/dist/cli.js +395 -120
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +45 -14
- package/dist/index.js +112 -12
- package/dist/index.js.map +1 -1
- package/dist/vite.js +46 -0
- package/dist/vite.js.map +1 -1
- package/docs/localghost.1.md +26 -0
- package/package.json +1 -1
package/docs/localghost.1.md
CHANGED
|
@@ -132,6 +132,32 @@ Prints Localghost's project-local state file and setup readiness. Pass `--ready`
|
|
|
132
132
|
localghost status --ready
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
+
Pass `--ports` to inspect remembered allocations, active Localghost leases, and ports used by active sessions without changing registry state. It also probes a bounded range for free ports; use `--from` and `--count` to control that range. Add `--json` for machine-readable output.
|
|
136
|
+
|
|
137
|
+
```sh
|
|
138
|
+
localghost status --ports
|
|
139
|
+
localghost status --ports --from 3000 --count 5 --json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### test
|
|
143
|
+
|
|
144
|
+
Runs a test command with an isolated, dynamically selected Localghost port. Use a unique `--instance` value for parallel runs. The lease is renewed while the command runs and released when it exits.
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
localghost test --instance smoke-1 -- npm test
|
|
148
|
+
localghost test --instance smoke-2 -- npm test
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### ports
|
|
152
|
+
|
|
153
|
+
Use `ports prune` to remove expired or dead leases while preserving remembered allocations. Use `ports prune --test-only` for test cleanup; it removes only stale `test:` leases and orphaned test allocations, preserving live sessions and other Localghost leases. Use `ports reset --yes` to clear the entire port registry, including remembered allocations.
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
localghost ports prune
|
|
157
|
+
localghost ports prune --test-only
|
|
158
|
+
localghost ports reset --yes
|
|
159
|
+
```
|
|
160
|
+
|
|
135
161
|
### ps
|
|
136
162
|
|
|
137
163
|
Shows Localghost `dev` and `run` sessions that are currently running on the machine. Stale records are pruned automatically when their wrapper process is gone. Each route also reports whether its upstream `127.0.0.1:<port>` is listening. Pass `--json` for menu bar helpers or other polling tools.
|