@devrouter/cli 0.0.39 → 0.0.40
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.js +23 -6
- package/package.json +1 -1
- package/upgrade-prompts/0.0.40.md +34 -0
package/dist/devrouter.js
CHANGED
|
@@ -2504,7 +2504,7 @@ function loadRepoConfig(repoPath) {
|
|
|
2504
2504
|
const config = parseConfig(parsed ?? {}, configPath);
|
|
2505
2505
|
const requiredVersion = config.devrouter?.version;
|
|
2506
2506
|
if (requiredVersion && !hasWarnedVersionMismatch) {
|
|
2507
|
-
const cliVersion = true ? "0.0.
|
|
2507
|
+
const cliVersion = true ? "0.0.40" : "0.0.0-dev";
|
|
2508
2508
|
if (cliVersion !== "0.0.0-dev" && compareSemver(requiredVersion, cliVersion) > 0) {
|
|
2509
2509
|
hasWarnedVersionMismatch = true;
|
|
2510
2510
|
process.stderr.write(
|
|
@@ -7370,7 +7370,7 @@ async function buildDoctorReport(options = {}) {
|
|
|
7370
7370
|
const config = runtimeConfig.config;
|
|
7371
7371
|
loadedConfig = config;
|
|
7372
7372
|
loadedWorkspace = runtimeConfig.workspace;
|
|
7373
|
-
const cliVersion = true ? "0.0.
|
|
7373
|
+
const cliVersion = true ? "0.0.40" : "0.0.0-dev";
|
|
7374
7374
|
const configVersion = config.devrouter?.version;
|
|
7375
7375
|
if (configVersion && cliVersion !== "0.0.0-dev" && compareSemver(configVersion, cliVersion) > 0) {
|
|
7376
7376
|
addCheck(checks, {
|
|
@@ -8217,6 +8217,18 @@ function restorePreviousManagedConfig(options) {
|
|
|
8217
8217
|
}
|
|
8218
8218
|
writeManagedDevcontainerConfig(restoredPlan);
|
|
8219
8219
|
}
|
|
8220
|
+
function restoreFirstTransitionManagedConfig(options) {
|
|
8221
|
+
const restoredPlan = inspectManagedDevcontainerConfig({
|
|
8222
|
+
repoPath: options.repoPath,
|
|
8223
|
+
config: options.config,
|
|
8224
|
+
profile: {
|
|
8225
|
+
apps: [],
|
|
8226
|
+
devcontainerServices: [...options.services]
|
|
8227
|
+
},
|
|
8228
|
+
linked: options.linked
|
|
8229
|
+
});
|
|
8230
|
+
writeManagedDevcontainerConfig(restoredPlan);
|
|
8231
|
+
}
|
|
8220
8232
|
function isWarmWorkspaceActive(repoPath) {
|
|
8221
8233
|
try {
|
|
8222
8234
|
return workspaceAppContainers(inspectWorkspaceContainers(), repoPath).some(
|
|
@@ -8824,8 +8836,13 @@ async function workspaceEnsure(requestedRepoPath, options = {}) {
|
|
|
8824
8836
|
linked,
|
|
8825
8837
|
previousState: previousManagedState
|
|
8826
8838
|
});
|
|
8827
|
-
} else {
|
|
8828
|
-
|
|
8839
|
+
} else if (managedRuntimeConfig) {
|
|
8840
|
+
restoreFirstTransitionManagedConfig({
|
|
8841
|
+
repoPath,
|
|
8842
|
+
config: managedRuntimeConfig,
|
|
8843
|
+
linked,
|
|
8844
|
+
services: previousServices
|
|
8845
|
+
});
|
|
8829
8846
|
}
|
|
8830
8847
|
}
|
|
8831
8848
|
} catch (rollbackError) {
|
|
@@ -8952,7 +8969,7 @@ async function workspaceEnsure(requestedRepoPath, options = {}) {
|
|
|
8952
8969
|
linked,
|
|
8953
8970
|
previousState: previousManagedState
|
|
8954
8971
|
});
|
|
8955
|
-
} else {
|
|
8972
|
+
} else if (!environmentStarted) {
|
|
8956
8973
|
removeManagedDevcontainerConfig(managedPlan);
|
|
8957
8974
|
}
|
|
8958
8975
|
} catch (rollbackError) {
|
|
@@ -13495,7 +13512,7 @@ var init_version = __esm({
|
|
|
13495
13512
|
|
|
13496
13513
|
// src/cli.ts
|
|
13497
13514
|
var import_commander = require("commander");
|
|
13498
|
-
var CLI_VERSION = true ? "0.0.
|
|
13515
|
+
var CLI_VERSION = true ? "0.0.40" : "0.0.0-dev";
|
|
13499
13516
|
var VERSION_FLAGS = /* @__PURE__ */ new Set(["-V", "--version"]);
|
|
13500
13517
|
function withErrorHandling(action2) {
|
|
13501
13518
|
return async (...args) => {
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Upgrade to devrouter 0.0.40
|
|
2
|
+
|
|
3
|
+
Devrouter now keeps a managed DevPod stoppable when its first profile
|
|
4
|
+
transition fails. The ignored generated Dev Container configuration is restored
|
|
5
|
+
to the exact observed service baseline instead of being removed while DevPod
|
|
6
|
+
still references it.
|
|
7
|
+
|
|
8
|
+
1. Install `@devrouter/cli@0.0.40` on the host and bump `.devrouter.yml` to
|
|
9
|
+
`devrouter.version: 0.0.40`.
|
|
10
|
+
2. No schema, data, volume, or runtime migration is required.
|
|
11
|
+
3. Keep `.devcontainer/devcontainer.devrouter.json` ignored and owned by
|
|
12
|
+
devrouter. Do not delete it to recover a failed transition.
|
|
13
|
+
4. Retry the desired profile with `devrouter ensure`. If the repository-owned
|
|
14
|
+
post-start adapter still fails, correct that adapter before retrying.
|
|
15
|
+
|
|
16
|
+
Verification:
|
|
17
|
+
|
|
18
|
+
- Run `devrouter -V --repo <checkout>` and confirm both the installed CLI and
|
|
19
|
+
local repository report `0.0.40`.
|
|
20
|
+
- Run the repository's managed profile checks, including a cold transition
|
|
21
|
+
whose post-start adapter fails.
|
|
22
|
+
- Confirm the ignored generated configuration remains present after the
|
|
23
|
+
failure and `devrouter stop <checkout>` stops the exact DevPod without
|
|
24
|
+
deleting its workspace or volumes.
|
|
25
|
+
- Correct the post-start failure, rerun `devrouter ensure`, and confirm the
|
|
26
|
+
desired services, processes, and routes reconcile successfully.
|
|
27
|
+
|
|
28
|
+
Report template:
|
|
29
|
+
|
|
30
|
+
- CLI/config version: `0.0.40`
|
|
31
|
+
- Cold failure rollback: `<passed or details>`
|
|
32
|
+
- Exact non-destructive stop: `<passed or details>`
|
|
33
|
+
- Retry after correction: `<passed or details>`
|
|
34
|
+
- Remaining blockers: `<none or details>`
|