@hamedb89/localghost 0.3.0 → 0.4.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/README.md +27 -1
- package/dist/cli.js +133 -39
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +57 -22
- package/dist/index.js.map +1 -1
- package/docs/flows.md +11 -0
- package/docs/localghost.1.md +2 -1
- package/package.json +1 -1
package/docs/flows.md
CHANGED
|
@@ -17,6 +17,15 @@ Choose the install command for the repository's package manager. Then initialize
|
|
|
17
17
|
localghost init --write-scripts
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
For a repository without Localghost installed, use the package-manager launcher first:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm exec --yes --package=@hamedb89/localghost -- localghost init --write-scripts
|
|
24
|
+
pnpm dlx @hamedb89/localghost init --write-scripts
|
|
25
|
+
yarn dlx @hamedb89/localghost init --write-scripts
|
|
26
|
+
bunx --package @hamedb89/localghost localghost init --write-scripts
|
|
27
|
+
```
|
|
28
|
+
|
|
20
29
|
## Project Contract
|
|
21
30
|
|
|
22
31
|
As a developer, I want one small file that explains the local domain map for this repo.
|
|
@@ -51,6 +60,8 @@ LOCALGHOST_NO_UPDATE_CHECK=1 localghost doctor
|
|
|
51
60
|
|
|
52
61
|
Localghost checks npm after successful commands, caches the result for 24 hours, and ignores check failures. `LOCALGHOST_NO_UPDATE_CHECK=1` and `--no-update-check` disable the automatic check.
|
|
53
62
|
|
|
63
|
+
To install or update the package in the current repository, run `localghost upgrade`. If no local CLI exists yet, invoke it through the package manager, for example `npm exec --yes --package=@hamedb89/localghost -- localghost upgrade`.
|
|
64
|
+
|
|
54
65
|
## One-Time Setup
|
|
55
66
|
|
|
56
67
|
As a developer, I want one explicit setup command that updates only the managed Localghost block in `/etc/hosts` and validates Caddy.
|
package/docs/localghost.1.md
CHANGED
|
@@ -19,8 +19,9 @@ localghost status [--ready] [--json]
|
|
|
19
19
|
localghost ps [--json]
|
|
20
20
|
localghost guide [--agent] [--json]
|
|
21
21
|
localghost tunnel [--cwd path] [--config file] [--config-pattern regex] [--ghost-config file] [--target-host host]
|
|
22
|
-
localghost release
|
|
22
|
+
localghost release [patch|minor|major]
|
|
23
23
|
localghost update [--json]
|
|
24
|
+
localghost upgrade [--cwd path]
|
|
24
25
|
localghost dev [--config file] [--config-pattern regex] [--https|--ssl] [--auto-repair yes|no] [--trust]
|
|
25
26
|
localghost run [--config file] [--config-pattern regex] [--https|--ssl] [--auto-repair yes|no] [--trust] [--dynamic-port] -- command
|
|
26
27
|
localghost print [--config file] [--config-pattern regex]
|