@devrouter/cli 0.0.33 → 0.0.35
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 +63 -449
- package/bin/devrouter-process +52 -5
- package/dist/devrouter.js +1001 -502
- package/package.json +2 -1
- package/upgrade-prompts/0.0.34.md +28 -0
- package/upgrade-prompts/0.0.35.md +29 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devrouter/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
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",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"check": "biome check .",
|
|
50
50
|
"check:fix": "biome check --write .",
|
|
51
51
|
"check:docs-policy": "./scripts/check-docs-policy.sh",
|
|
52
|
+
"check:knowledge": "node --import tsx scripts/check-knowledge.ts",
|
|
52
53
|
"format": "biome format --write .",
|
|
53
54
|
"knip": "knip",
|
|
54
55
|
"lint": "biome lint .",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Upgrade to devrouter 0.0.34
|
|
2
|
+
|
|
3
|
+
Devrouter now supplies its managed process helper at reconciliation time. Consumer images must not download, install, extract, or version-pin devrouter; `.devrouter.yml` is the only consumer-side devrouter version pin.
|
|
4
|
+
|
|
5
|
+
1. Install `@devrouter/cli@0.0.34` on the host and bump `.devrouter.yml` to `devrouter.version: 0.0.34`.
|
|
6
|
+
2. In a devrouter-managed `.devcontainer/post-start.sh`, keep the repository-owned environment and application command, require `DEVROUTER_PROCESS_HELPER`, and replace direct `devrouter-process ensure` with `"$DEVROUTER_PROCESS_HELPER" ensure`.
|
|
7
|
+
3. Remove `postStartCommand` from `.devcontainer/devcontainer.json`. Canonical `devrouter ensure` delivers the helper and invokes the managed adapter after exact-container proof.
|
|
8
|
+
4. Remove any `@devrouter/cli` download or `devrouter-process` installation/extraction from the consumer Dockerfile. Retain `procps` and `util-linux`; remove `tar` if the application does not otherwise need it.
|
|
9
|
+
5. Run `devrouter repo agents --repo <checkout>` to refresh generated guidance.
|
|
10
|
+
|
|
11
|
+
Apply the adapter, devcontainer JSON, and Dockerfile migration atomically. A fully legacy image-plus-hook scaffold remains temporarily supported, but a legacy adapter paired with a helper-free image fails before DevPod startup with migration guidance.
|
|
12
|
+
|
|
13
|
+
Verification:
|
|
14
|
+
|
|
15
|
+
- Run `devrouter repo devcontainer verify --repo <checkout> --json` and confirm `repo.devcontainer.no-devrouter-image-install` is `ok`.
|
|
16
|
+
- Recreate from the helper-free Dockerfile, then run `devrouter ensure <checkout> --json` twice and confirm cold startup plus warm reuse succeed.
|
|
17
|
+
- Run `devrouter exec <checkout> -- sh -c 'test ! -e /usr/local/bin/devrouter-process'` to prove the helper is absent from the image.
|
|
18
|
+
- Run `devrouter exec <checkout> -- sh -c 'test -x /tmp/devrouter/bin/devrouter-process'` to prove the matching helper was delivered only at runtime.
|
|
19
|
+
|
|
20
|
+
Report template:
|
|
21
|
+
|
|
22
|
+
- CLI/config version: `0.0.34`
|
|
23
|
+
- Adapter migration: `<file changed or not applicable>`
|
|
24
|
+
- Image coupling diagnostic: `<ok or details>`
|
|
25
|
+
- Cold/warm ensure: `<DevPod id and route evidence>`
|
|
26
|
+
- Image helper absent: `<passed or failure details>`
|
|
27
|
+
- Runtime helper present: `<passed or failure details>`
|
|
28
|
+
- Remaining blockers: `<none or details>`
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Upgrade to devrouter 0.0.35
|
|
2
|
+
|
|
3
|
+
Devrouter now binds provider mutations, managed processes, proxy upstreams, and published routes to one exact checkout and runtime generation. Configuration and ownership schemas are unchanged.
|
|
4
|
+
|
|
5
|
+
1. Install `@devrouter/cli@0.0.35` on the host and bump `.devrouter.yml` to `devrouter.version: 0.0.35`.
|
|
6
|
+
2. Replace raw `devpod up`, `devpod stop`, or `devpod delete` calls for managed environments with `devrouter ensure <checkout>`, `devrouter stop <checkout>`, `devrouter stop <checkout> --delete`, or the matching `devrouter workspace` command. Raw DevPod mutations bypass devrouter's machine-wide ownership lock.
|
|
7
|
+
3. For every proxy app started through managed `ensure`, use the resolved checkout alias namespace. Prefer `${WORKSPACE}-<service>:<port>` in `.devrouter.yml` with matching `${WORKSPACE:-<project>}-<service>` Compose aliases for both HTTP and TCP routes.
|
|
8
|
+
4. Keep the managed adapter contract from `0.0.34`: require `DEVROUTER_PROCESS_HELPER` and call `"$DEVROUTER_PROCESS_HELPER" ensure`. If reuse depends on non-secret runtime values beyond command and workspace identity, set `DEVROUTER_PROCESS_FINGERPRINT_ENV` to their comma-separated environment names before calling the helper. Secret-like names are rejected and raw values are never written to process state.
|
|
9
|
+
5. Run `devrouter repo agents --repo <checkout>` to refresh generated guidance.
|
|
10
|
+
|
|
11
|
+
No manual route-state migration is required. The first `0.0.35` route read migrates a valid headerless `0.0.34` generation; invalid canonical metadata fails closed instead of discarding routes.
|
|
12
|
+
|
|
13
|
+
Verification:
|
|
14
|
+
|
|
15
|
+
- Run `devrouter doctor --repo <checkout>` and `devrouter repo devcontainer verify --repo <checkout> --json`; confirm the managed post-start and upstream-alias checks are `ok`.
|
|
16
|
+
- Run `devrouter ensure <checkout> --json` twice. Confirm the cold run starts the exact checkout and the warm run preserves the same DevPod and owned process group.
|
|
17
|
+
- For a linked worktree, confirm every published HTTP/TCP upstream begins with its workspace token and every routed endpoint reaches that worktree.
|
|
18
|
+
- Run `devrouter workspace ls --repo <repo> --json` and confirm each owner has one exact worktree path and DevPod ID.
|
|
19
|
+
- If explicit DevPod cleanup is needed, use `devrouter stop <checkout> --delete --json` and confirm the Git checkout remains present.
|
|
20
|
+
|
|
21
|
+
Report template:
|
|
22
|
+
|
|
23
|
+
- CLI/config version: `0.0.35`
|
|
24
|
+
- Raw DevPod lifecycle calls removed: `<yes or not applicable>`
|
|
25
|
+
- Proxy alias namespace: `<workspace/project token and upstreams>`
|
|
26
|
+
- Managed adapter and optional environment identity: `<ok or details>`
|
|
27
|
+
- Cold/warm exact-checkout ensure: `<DevPod id and process evidence>`
|
|
28
|
+
- Route and browser evidence: `<URLs and result>`
|
|
29
|
+
- Remaining blockers: `<none or details>`
|