@hamedb89/localghost 0.1.15 → 0.3.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/docs/github.md CHANGED
@@ -115,12 +115,12 @@ https://hamedb89.github.io/localghost/
115
115
  `.github/workflows/ci.yml` runs on pull requests and pushes to `main`. It uses `npm ci`, then runs:
116
116
 
117
117
  ```sh
118
- npm run release:check
118
+ ./bin/ghost check
119
119
  ```
120
120
 
121
- That command typechecks, builds the package, builds the static site, and runs `npm pack --dry-run`.
121
+ That command typechecks, builds the package, builds the static site, and runs `npm pack --dry-run`. From a checkout, the same verification is available as `./bin/ghost check`.
122
122
 
123
- `.github/workflows/publish-npm.yml` publishes to npm when a `v*` tag is pushed, or from manual workflow dispatch. The workflow checks that tag names match `package.json` versions, reruns `npm run release:check`, and then uses:
123
+ `.github/workflows/publish-npm.yml` publishes to npm when a `v*` tag is pushed, or from manual workflow dispatch. The workflow checks that tag names match `package.json` versions, reruns `./bin/ghost check`, and then uses:
124
124
 
125
125
  ```sh
126
126
  npm run publish:public
@@ -153,12 +153,12 @@ For a normal patch release:
153
153
 
154
154
  ```sh
155
155
  git status --short
156
- npm run release:check
156
+ ./bin/ghost check
157
157
  npm version patch
158
158
  git push origin main --tags
159
159
  ```
160
160
 
161
- Pushing the `v*` tag starts the npm publish workflow automatically. The workflow reruns `npm run release:check` before publishing. Create the GitHub release afterwards if you want release notes on GitHub.
161
+ Pushing the `v*` tag starts the npm publish workflow automatically. The workflow reruns `./bin/ghost check` before publishing. Create the GitHub release afterwards if you want release notes on GitHub.
162
162
 
163
163
  If publishing from a local terminal instead of GitHub Actions, omit provenance and provide the npm two-factor code:
164
164
 
@@ -9,8 +9,9 @@ localghost - friendly local hostnames for app repos
9
9
  ```sh
10
10
  localghost [--cwd path] [--dry-run]
11
11
  localghost init [--write-scripts] [--config file] [--host host] [--port port]
12
- localghost doctor
12
+ localghost doctor [--cwd path] [--config file] [--config-pattern regex] [--json]
13
13
  localghost setup [--project name] [--config file] [--config-pattern regex] [--https|--ssl]
14
+ localghost repair [--project name] [--config file] [--config-pattern regex] [--https|--ssl] [--trust] [--reallocate-port] [--prune-registry]
14
15
  localghost trust [--project name] [--config file] [--config-pattern regex] [--https|--ssl]
15
16
  localghost reset [--project name]
16
17
  localghost teardown [--project name] [--remove-caddyfile]
@@ -71,13 +72,13 @@ Options:
71
72
 
72
73
  ### doctor
73
74
 
74
- Checks machine prerequisites.
75
+ Checks machine prerequisites, the configured project port, and Localghost registry state. Use `--json` for agent-readable output. The command reports occupied ports, stale leases, and duplicate allocations without changing state.
75
76
 
76
77
  ```sh
77
78
  localghost doctor
78
79
  ```
79
80
 
80
- Currently checks Caddy and prints `brew install caddy` when missing.
81
+ It checks Caddy and prints `brew install caddy` when missing.
81
82
 
82
83
  ### setup
83
84
 
@@ -97,11 +98,12 @@ localghost trust
97
98
 
98
99
  ### repair
99
100
 
100
- Reconciles the managed hosts block, regenerates and validates the Caddyfile, and refreshes project setup state. Use `--https --trust` to also re-run Caddy's local certificate trust step.
101
+ Reconciles the managed hosts block, regenerates and validates the Caddyfile, and refreshes project setup state. Use `--https --trust` to also re-run Caddy's local certificate trust step. `--reallocate-port` selects and remembers a stable available replacement for an occupied port without editing `.localghost`. `--prune-registry` removes expired or dead leases.
101
102
 
102
103
  ```sh
103
104
  localghost repair
104
105
  localghost repair --https --trust
106
+ localghost repair --reallocate-port --prune-registry
105
107
  ```
106
108
 
107
109
  ### teardown
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hamedb89/localghost",
3
- "version": "0.1.15",
3
+ "version": "0.3.0",
4
4
  "description": "Friendly local hostnames for app repos with .localghost, Caddy, /etc/hosts, and Vite.",
5
5
  "type": "module",
6
6
  "bin": {