@devrouter/cli 0.3.1 → 0.5.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/dist/devrouter-lifecycle-worker.js +15 -6
- package/dist/devrouter.js +2511 -1459
- package/package.json +2 -1
- package/upgrade-prompts/0.4.0.md +39 -0
- package/upgrade-prompts/0.5.0.md +43 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devrouter/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Local dev routing CLI with shared Traefik reverse proxy",
|
|
5
5
|
"author": "Roland Schlaefli",
|
|
6
6
|
"homepage": "https://github.com/rschlaefli/devrouter#readme",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"qualify:capacity": "node --import tsx scripts/qualify-capacity.ts",
|
|
52
52
|
"qualify:controller": "node --import tsx scripts/qualify-controller.ts",
|
|
53
53
|
"qualify:stop-drift": "node --import tsx scripts/qualify-config-drift-stop.ts",
|
|
54
|
+
"qualify:idle-stop": "node --import tsx scripts/qualify-idle-stop.ts",
|
|
54
55
|
"qualify:harness-journey": "./scripts/qualify-harness-journey.sh",
|
|
55
56
|
"qualify:codex-journey": "DR_JOURNEY_HARNESS=codex ./scripts/qualify-harness-journey.sh",
|
|
56
57
|
"qualify:non-node": "./scripts/qualify-non-node-consumer.sh",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Upgrade to devrouter 0.4.0
|
|
2
|
+
|
|
3
|
+
This minor release adds `devrouter env`, which gives host-run tools such as
|
|
4
|
+
Playwright, `psql` or Prisma the endpoints of a checkout's managed runtime.
|
|
5
|
+
|
|
6
|
+
- `devrouter env [path] [--json]` reports the checkout's routed HTTPS URLs,
|
|
7
|
+
the routed TLS/SNI and published loopback endpoints of its TCP apps, the
|
|
8
|
+
workspace token and the mkcert CA path. The JSON report has `version: 1`.
|
|
9
|
+
- `devrouter env [path] -- <command...>` runs a host command without a shell.
|
|
10
|
+
It exports `DEVROUTER_WORKSPACE`, `DEVROUTER_<APP>_URL`,
|
|
11
|
+
`DEVROUTER_<APP>_HOST`/`_PORT` (loopback) and
|
|
12
|
+
`DEVROUTER_<APP>_ROUTED_HOST`/`_ROUTED_PORT`, plus `NODE_EXTRA_CA_CERTS`
|
|
13
|
+
when it is unset, and returns the command's exit code.
|
|
14
|
+
|
|
15
|
+
The command only reads state. It never starts or stops a runtime and prints no
|
|
16
|
+
credentials. A loopback endpoint is reported only when exactly one running
|
|
17
|
+
container of this checkout's devcontainer owns the upstream alias and
|
|
18
|
+
publishes the port on a loopback address; otherwise the report names the
|
|
19
|
+
reason. There is no configuration change and no migration.
|
|
20
|
+
|
|
21
|
+
## Task
|
|
22
|
+
|
|
23
|
+
Install the published 0.4.0 CLI. No repository change is needed. A repository
|
|
24
|
+
that requires 0.3.x keeps working with 0.4.0. Raise a repository's documented
|
|
25
|
+
minimum devrouter version to 0.4.0 only when consumer source changes are
|
|
26
|
+
authorized and a host script should use `devrouter env` instead of its own
|
|
27
|
+
port discovery.
|
|
28
|
+
|
|
29
|
+
## Validation
|
|
30
|
+
|
|
31
|
+
1. Run `devrouter -V` from the consumer checkout. A repository Volta pin can
|
|
32
|
+
change which install resolves.
|
|
33
|
+
2. With the runtime running, run `devrouter env . --json` and confirm the app
|
|
34
|
+
URLs and loopback ports match `devrouter status` and `docker port`.
|
|
35
|
+
|
|
36
|
+
## Report
|
|
37
|
+
|
|
38
|
+
Report the release revision, the resolved executable with its installed
|
|
39
|
+
version, and any loopback reason other than a running endpoint.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Upgrade to devrouter 0.5.0
|
|
2
|
+
|
|
3
|
+
This minor release makes devrouter the owner of idle stop for managed
|
|
4
|
+
devcontainer environments.
|
|
5
|
+
|
|
6
|
+
- `devrouter workspace idle [--repo <path>] [--idle-for 30m] [--json]` reports
|
|
7
|
+
each running managed environment as `active`, `idle`, `unknown` or
|
|
8
|
+
`protected` and changes nothing. `--stop` stops only `idle` environments
|
|
9
|
+
through the normal `stop` path.
|
|
10
|
+
- `devrouter setup --yes --idle-stop <duration|off>` installs or removes a
|
|
11
|
+
macOS launchd agent that runs the sweep every five minutes.
|
|
12
|
+
- `devrouter workspace pin [path] [--off]` keeps one environment running
|
|
13
|
+
regardless of activity.
|
|
14
|
+
- Devsy workspaces now start with an empty `INACTIVITY_TIMEOUT`, which disables
|
|
15
|
+
Devsy's own idle daemon. `--devsy-inactivity-timeout` and a stored
|
|
16
|
+
`devsyInactivityTimeout` are deprecated and ignored.
|
|
17
|
+
- `devrouter stop <path>` on a linked worktree devrouter never started now
|
|
18
|
+
exits 0 with nothing to stop.
|
|
19
|
+
|
|
20
|
+
Idle stop is opt-in per machine. Nothing stops automatically until a person
|
|
21
|
+
runs `setup --idle-stop`. There is no configuration change and no migration.
|
|
22
|
+
|
|
23
|
+
## Task
|
|
24
|
+
|
|
25
|
+
Install the published 0.5.0 CLI. No repository change is needed. A repository
|
|
26
|
+
that requires 0.4.x keeps working with 0.5.0. Bump a repository's
|
|
27
|
+
`devrouter.version` to 0.5.0 only when consumer source changes are authorized.
|
|
28
|
+
Do not run `setup --idle-stop` on a person's machine without their request.
|
|
29
|
+
|
|
30
|
+
Repositories whose developers rely on database-only sessions should mention
|
|
31
|
+
`devrouter workspace pin .` in their contributor docs, because TCP traffic is
|
|
32
|
+
not observed as activity.
|
|
33
|
+
|
|
34
|
+
## Validation
|
|
35
|
+
|
|
36
|
+
1. Run `devrouter -V` from the consumer checkout.
|
|
37
|
+
2. With the runtime running, run `devrouter workspace idle --repo . --json` and
|
|
38
|
+
confirm the checkout is listed with readable signals.
|
|
39
|
+
|
|
40
|
+
## Report
|
|
41
|
+
|
|
42
|
+
Report the release revision, the resolved executable with its installed
|
|
43
|
+
version, and the checkout's idle status and any `unknown` reason.
|