@hamedb89/localghost 0.5.0 → 0.6.2

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.
@@ -160,9 +160,13 @@ Then the handler can resolve the request and return a safe relay status, a signe
160
160
  import { createVercelGhostTunnelHandler } from "@hamedb89/localghost";
161
161
 
162
162
  export default createVercelGhostTunnelHandler({
163
- cwd: process.cwd(),
164
163
  domain: "copper-comet.example",
165
164
  authenticated: false,
165
+ ghostTunnel: {
166
+ mode: "public",
167
+ domains: "copper-comet.example",
168
+ transport: "none"
169
+ },
166
170
  ipSigningSecret: process.env.LOCALGHOST_IP_SIGNING_SECRET
167
171
  });
168
172
  ```
@@ -288,10 +292,12 @@ Do not use only `*` for Ghost Tunnel. A record named `*` covers `anything.copper
288
292
 
289
293
  ```ts
290
294
  import {
291
- assertSecureGhostTunnelRequest,
292
- constructGhostTunnelUrl,
293
295
  readLocalghostProjectConfig
294
296
  } from "@hamedb89/localghost";
297
+ import {
298
+ assertSecureGhostTunnelRequest,
299
+ constructGhostTunnelUrl
300
+ } from "@hamedb89/localghost";
295
301
 
296
302
  const { config } = await readLocalghostProjectConfig();
297
303
 
@@ -148,6 +148,16 @@ localghost test --instance smoke-1 -- npm test
148
148
  localghost test --instance smoke-2 -- npm test
149
149
  ```
150
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
+
151
161
  ### ps
152
162
 
153
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.
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@hamedb89/localghost",
3
- "version": "0.5.0",
3
+ "version": "0.6.2",
4
+ "workspaces": [
5
+ "packages/*"
6
+ ],
4
7
  "description": "Friendly local hostnames for app repos with .localghost, Caddy, /etc/hosts, and Vite.",
5
8
  "type": "module",
6
9
  "bin": {
@@ -41,7 +44,7 @@
41
44
  ],
42
45
  "scripts": {
43
46
  "clean": "rm -rf dist",
44
- "build": "tsup src/index.ts src/vite.ts src/cli.ts --format esm --dts",
47
+ "build": "npm run build --workspace=@hamedb89/ghost-tunnel && tsup src/index.ts src/vite.ts src/cli.ts --format esm --dts",
45
48
  "macos:widget:build": "bash apps/macos-widget/build.sh",
46
49
  "dev": "tsx src/cli.ts",
47
50
  "test": "npm run build && node --test tests/*.test.mjs",