@hamedb89/localghost 0.1.9 → 0.1.10

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.
@@ -25,7 +25,7 @@ export default defineLocalghostConfig({
25
25
  });
26
26
  ```
27
27
 
28
- With `ghostTunnel: { domains }`, route output and Vite startup output use local defaults for `route`, `project`, and `owner`, then fill the configured domain:
28
+ With `ghostTunnel: { domains }` in the default manual mode, route output and Vite startup output use local defaults for `route`, `project`, and `owner`, then fill the configured domain:
29
29
 
30
30
  ```txt
31
31
  localghost ghost tunnel
@@ -43,6 +43,14 @@ localghost ghost tunnel
43
43
 
44
44
  `manual` is the default activation mode. `ghostTunnel: "manual"` and `ghostTunnel: "public"` are shorthand modes. Use `enabled: false` to keep domains/config in the file without exposing the tunnel surface.
45
45
 
46
+ Public mode keeps the namespace flexible unless you configure a preview. This is useful for deployed wildcard endpoints that react to whichever route arrives:
47
+
48
+ ```txt
49
+ localghost ghost tunnel
50
+ mode: public
51
+ configured: https://<route>-<project>-<owner>.ghost.socialworkouts.app/
52
+ ```
53
+
46
54
  Use object form to override defaults or provide a concrete preview URL:
47
55
 
48
56
  ```js
@@ -67,6 +75,42 @@ export default defineLocalghostConfig({
67
75
  5. Construct tunnel URLs from `route`, `project`, and `owner`.
68
76
  6. Validate the incoming request host, protocol, and auth before serving the tunnel surface.
69
77
 
78
+ ## Vercel DNS
79
+
80
+ For Vercel, add the Ghost Tunnel wildcard domain to the project first:
81
+
82
+ ```txt
83
+ *.ghost.decisionlayer.tech
84
+ ```
85
+
86
+ Then create the DNS record that points that wildcard at the same Vercel project. In Vercel-managed DNS, the record name is relative to the zone:
87
+
88
+ ```txt
89
+ Name: *.ghost
90
+ Type: ALIAS
91
+ Value: <the Vercel DNS target shown for the project>
92
+ TTL: 60
93
+ ```
94
+
95
+ For example, if Vercel shows `cname.vercel-dns-016.com` as the project target, use the fully-qualified value with the trailing dot when the DNS form requires it:
96
+
97
+ ```txt
98
+ Name: *.ghost
99
+ Type: ALIAS
100
+ Value: cname.vercel-dns-016.com.
101
+ TTL: 60
102
+ ```
103
+
104
+ When DNS is managed somewhere else, use the provider's wildcard subdomain shape:
105
+
106
+ ```txt
107
+ Name: *.ghost
108
+ Type: CNAME
109
+ Value: cname.vercel-dns-016.com.
110
+ ```
111
+
112
+ Do not use only `*` for Ghost Tunnel. A record named `*` covers `anything.decisionlayer.tech`, but Ghost Tunnel URLs look like `decisionlayer-decision-layer-hamed.ghost.decisionlayer.tech`, so the wildcard must live under `ghost`.
113
+
70
114
  ```ts
71
115
  import {
72
116
  assertSecureGhostTunnelRequest,
@@ -154,7 +154,7 @@ When `localghost.config.mjs` exists, `run`, `dev`, `setup`, `status`, `routes`,
154
154
 
155
155
  Relay helpers are private by default. Registration requires an authenticated local-agent bearer token plus an exact signed route claim. Targets must be explicit local host/port objects, dangerous ports are blocked, private/LAN targets require explicit opt-in, internal and hop-by-hop headers are stripped, sensitive logs are redacted, and offline agents get a safe 503 page.
156
156
 
157
- When `ghostTunnel` is configured, route output and Vite startup logs print local defaults for `route`, `project`, and `owner`. Add `ghostTunnel.domains` to fill one or more production base domains. When `ghostTunnel.preview` is configured with `route`, `project`, and `owner`, they print the concrete URL, inheriting `ghostTunnel.domains` unless `preview.domain` is set. In an interactive Vite terminal, press `g` to show Ghost Tunnel configuration and open a numbered concrete URL.
157
+ When `ghostTunnel` is configured, route output and Vite startup logs print the production URL shape. Manual mode can fill local defaults for `route`, `project`, and `owner`; public mode leaves those slots as `<route>`, `<project>`, and `<owner>` unless `ghostTunnel.preview` pins a concrete URL. Add `ghostTunnel.domains` to fill one or more production base domains. When `ghostTunnel.preview` is configured with `route`, `project`, and `owner`, logs print the concrete URL, inheriting `ghostTunnel.domains` unless `preview.domain` is set. In an interactive Vite terminal, press `g` to show Ghost Tunnel configuration and open a numbered concrete URL.
158
158
 
159
159
  `dev` and `run` register active sessions in a user-local activity file so `localghost ps` can show what is running across projects.
160
160
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hamedb89/localghost",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Friendly local hostnames for app repos with .localghost, Caddy, /etc/hosts, and Vite.",
5
5
  "type": "module",
6
6
  "bin": {