@devrouter/cli 0.0.31 → 0.0.33
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 +18 -12
- package/dist/devrouter.js +3824 -3272
- package/package.json +1 -1
- package/upgrade-prompts/0.0.32.md +26 -0
- package/upgrade-prompts/0.0.33.md +21 -0
package/README.md
CHANGED
|
@@ -59,8 +59,8 @@ apps:
|
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
61
|
devrouter setup --yes
|
|
62
|
-
|
|
63
|
-
devrouter
|
|
62
|
+
devrouter ensure .
|
|
63
|
+
devrouter exec . -- pnpm seed
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
Why prefer it: the environment is reproducible and runs anywhere the devcontainer
|
|
@@ -87,6 +87,9 @@ vars. Use it when you are not (yet) on a devcontainer. Fully supported.
|
|
|
87
87
|
- `devrouter -V [--repo <path>]` (installed CLI version, local repo version, next upgrade target)
|
|
88
88
|
- `devrouter upgrade [version] [--repo <path>]`
|
|
89
89
|
- `devrouter setup --yes [--repo <path>] [--json]`
|
|
90
|
+
- `devrouter ensure [path] [--open] [--json]`
|
|
91
|
+
- `devrouter stop [path] [--json]`
|
|
92
|
+
- `devrouter exec [path] -- <command...>`
|
|
90
93
|
- `devrouter up`
|
|
91
94
|
- `devrouter down`
|
|
92
95
|
- `devrouter status [--repo <path>] [--json]`
|
|
@@ -106,7 +109,7 @@ vars. Use it when you are not (yet) on a devcontainer. Fully supported.
|
|
|
106
109
|
- `devrouter app rm <name> [--repo <path>]`
|
|
107
110
|
- `devrouter logs [-f]`
|
|
108
111
|
- `devrouter workspace up <branch> [--path <dir>] [--no-devpod] [--open] [--repo <path>]`
|
|
109
|
-
- `devrouter workspace ensure [path] [--open]`
|
|
112
|
+
- `devrouter workspace ensure [path] [--open] [--json]` (compatible alias of `ensure`)
|
|
110
113
|
- `devrouter workspace ls [--repo <path>] [--json]`
|
|
111
114
|
- `devrouter workspace stop <workspace|branch> [--repo <path>]`
|
|
112
115
|
- `devrouter workspace down <workspace|branch> [--keep-worktree] [--repo <path>]`
|
|
@@ -119,10 +122,9 @@ The generated image extracts `devrouter-process` from the exact Devrouter
|
|
|
119
122
|
package tarball without installing the CLI dependency tree. Its `post-start.sh`
|
|
120
123
|
uses that helper for locked, owned, idempotent background startup. Application
|
|
121
124
|
commands and environment setup remain repository-owned; route readiness remains
|
|
122
|
-
part of `devrouter
|
|
125
|
+
part of `devrouter ensure`.
|
|
123
126
|
Use `devrouter repo devcontainer verify --json` for read-only PR evidence; add
|
|
124
|
-
`--live --yes` only
|
|
125
|
-
mutate local route state.
|
|
127
|
+
`--live --yes` only for compatibility checks. Normal startup uses `ensure`.
|
|
126
128
|
|
|
127
129
|
## Workspace isolation (parallel worktrees)
|
|
128
130
|
|
|
@@ -151,8 +153,8 @@ non-namespaced routes.
|
|
|
151
153
|
# Bring up a feature branch as an isolated workspace
|
|
152
154
|
devrouter workspace up feat/my-feature
|
|
153
155
|
|
|
154
|
-
# Reconcile
|
|
155
|
-
devrouter
|
|
156
|
+
# Reconcile either a primary or linked checkout
|
|
157
|
+
devrouter ensure .
|
|
156
158
|
|
|
157
159
|
# List ownership, Git, DevPod, and route state
|
|
158
160
|
devrouter workspace ls
|
|
@@ -191,19 +193,23 @@ after manual removal, use `workspace ls`, `doctor`, or the dry-run
|
|
|
191
193
|
|
|
192
194
|
**devcontainer integration:** the devcontainer compose service exposes a devnet network alias `${WORKSPACE}-app` (defaulting to the project name in `devcontainer.env`); the proxy app uses `upstream: ${WORKSPACE}-app:<port>`. `.devcontainer/docker-compose.devrouter.yml` passes `WORKSPACE` and `DEVROUTER_WORKSPACE` into the app and bind-mounts `${DEVROUTER_GIT_COMMON_DIR}` to the same absolute container path, so linked-worktree `.git` pointers remain valid. Workspace `feat-a` → alias `feat-a-app`, host `app.feat-a.localhost`.
|
|
193
195
|
|
|
194
|
-
`
|
|
195
|
-
|
|
196
|
+
`ensure` is intentionally proof-driven: it verifies exact checkout ownership,
|
|
197
|
+
the required compose/Git mount contract, workspace env when linked, devnet aliases,
|
|
196
198
|
container health, Git access, HTTP route reachability, and unique running TCP
|
|
197
199
|
upstream ownership (plus health when configured) before reporting ready. It
|
|
198
200
|
retries one stale DevPod with `--recreate`; failed proof does not leave new routes
|
|
199
201
|
behind.
|
|
200
202
|
|
|
203
|
+
Use `devrouter stop .` to pause the exact environment without deleting data. Use
|
|
204
|
+
`devrouter exec . -- <command...>` for seeds, migrations, and other one-shot
|
|
205
|
+
container commands; it does not start a missing or stopped environment.
|
|
206
|
+
|
|
201
207
|
**Try it:** [`examples/workspace/`](examples/workspace/) is a runnable showcase — `./run.sh` brings up one app in two parallel worktrees (`wsdemo.localhost` and `wsdemo.feat-a.localhost`) served at once, then `./run.sh down` tears it down.
|
|
202
208
|
|
|
203
209
|
**DevPod example:** [`examples/devcontainer/`](examples/devcontainer/) is the
|
|
204
210
|
agent-native devcontainer path end to end — `./run.sh` brings up a DevPod
|
|
205
|
-
workspace,
|
|
206
|
-
and
|
|
211
|
+
workspace, runs static verification and `ensure`, proves exact-container `exec`,
|
|
212
|
+
and checks trusted app/Postgres routes. `./run.sh down` tears it down.
|
|
207
213
|
|
|
208
214
|
**Missing-owner detection:** `devrouter doctor` reports ledger-owned workspaces
|
|
209
215
|
whose checkout disappeared or conflicts with live Git/DevPod evidence. It does
|