From 8843c37e378706185cfb9ea308572a4d461cf6e4 Mon Sep 17 00:00:00 2001 From: Turtle Date: Wed, 14 Oct 2026 11:56:17 +0800 Subject: [PATCH] Make --from-default-profile replace an existing custom profile Repeated rescue runs such as `dsh rescue --from-default-profile web` failed because the target profile already existed. The option now assembles a fresh template copy in a staging directory, moves it over the target, and deletes the previous profile; a failed move restores it. --- apps/cli/README.i18n.yaml | 4 +- apps/cli/README.md | 4 +- apps/cli/README.zh.md | 4 +- apps/cli/reference/README.i18n.yaml | 8 +- apps/cli/reference/README.md | 6 +- apps/cli/reference/README.zh.md | 6 +- apps/cli/src/args.ts | 10 +-- apps/cli/src/dump-config-schema.ts | 2 +- apps/cli/src/dump-config.ts | 2 +- apps/cli/src/profile-boot.ts | 83 +++++++++++-------- apps/cli/tests/built-bin.e2e.ts | 10 +-- apps/cli/tests/expected/launcher-help.txt | 6 +- apps/cli/tests/profile-initialization.spec.ts | 71 ++++++++++------ docs/cli-help.md | 6 +- docs/cli-help.zh.md | 6 +- .../guide.i18n.yaml | 16 ++++ .../guide.md | 20 +++++ .../guide.zh.md | 20 +++++ docs/user/develop/basic/publish.i18n.yaml | 4 +- docs/user/develop/basic/publish.md | 2 +- docs/user/develop/basic/publish.zh.md | 2 +- packages/boot/app-boot/README.i18n.yaml | 4 +- packages/boot/app-boot/README.md | 2 +- packages/boot/app-boot/README.zh.md | 2 +- 24 files changed, 197 insertions(+), 103 deletions(-) create mode 100644 docs/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.i18n.yaml create mode 100644 docs/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.md create mode 100644 docs/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.zh.md diff --git a/apps/cli/README.i18n.yaml b/apps/cli/README.i18n.yaml index ddde8bd95c..32e37d9c16 100644 --- a/apps/cli/README.i18n.yaml +++ b/apps/cli/README.i18n.yaml @@ -6,8 +6,8 @@ en: ebdc75fa0da18801 zh: 5c6cd2554b8f8a98 /deepseek-ai-dsh/entry-modes: - en: c4811e2012a5e919 - zh: e6d20ec8238c2638 + en: a1e035a813554366 + zh: b87053214afe71b6 /deepseek-ai-dsh/app-arguments: en: cc03e6b75206661b zh: 99e41f4143198352 diff --git a/apps/cli/README.md b/apps/cli/README.md index 55e761cb8b..ed3685fd1b 100644 --- a/apps/cli/README.md +++ b/apps/cli/README.md @@ -9,7 +9,7 @@ The `dsh` command is the sole supported Node application launcher: profiles are | Command | Purpose | |---|---| | `dsh ` / `dsh --profile ` | Boot the named profile under `$DSH_HOME/profiles/`. | -| `dsh --profile --from-default-profile