@ai-wendao/ant 0.3.9 → 0.3.10
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/MIGRATION.md +6 -6
- package/index.js +1 -0
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
此方式适用于 DSH Desktop RC2 使用默认、启用 HMR 的 Desktop profile,且目标 ANT 版本已发布到 npm:
|
|
14
14
|
|
|
15
15
|
1. 打开 **插件 → ANT**,点击 **卸载** 并确认。
|
|
16
|
-
2. 回到插件列表,点击 **添加插件**,输入已发布的直接包名,例如 `@ai-wendao/ant@0.3.
|
|
16
|
+
2. 回到插件列表,点击 **添加插件**,输入已发布的直接包名,例如 `@ai-wendao/ant@0.3.10`,然后点击 **安装**。
|
|
17
17
|
3. 安装完成后启用 ANT,打开设置页,检查服务连接与获准模型。
|
|
18
18
|
|
|
19
19
|
RC2 的 Desktop 基础 profile 默认启用 HMR;官方管理器在该模式下会先卸载 Bundle,再用随 DSH 提供的包管理器移除依赖。包卸载本身不会调用 ANT 的“断开设备”操作,也不会清空 DSH 凭证存储。若 profile 禁用了 HMR,管理器会提示先停止 profile;此时改用下方 CLI 备用流程。真实成员 profile 的凭证保留仍需在目标 RC2 客户端上验收。
|
|
@@ -59,14 +59,14 @@ node packages/ant-bundle/tools/migrate-legacy.mjs migrate --apply
|
|
|
59
59
|
安装了系统 Node.js 的成员也可以从已发布 npm 包运行:
|
|
60
60
|
|
|
61
61
|
```sh
|
|
62
|
-
npm exec --yes --package @ai-wendao/ant@0.3.
|
|
63
|
-
npm exec --yes --package @ai-wendao/ant@0.3.
|
|
62
|
+
npm exec --yes --package @ai-wendao/ant@0.3.10 -- ant-migrate inspect
|
|
63
|
+
npm exec --yes --package @ai-wendao/ant@0.3.10 -- ant-migrate migrate
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
退出 DSH 后执行变更:
|
|
67
67
|
|
|
68
68
|
```sh
|
|
69
|
-
npm exec --yes --package @ai-wendao/ant@0.3.
|
|
69
|
+
npm exec --yes --package @ai-wendao/ant@0.3.10 -- ant-migrate migrate --apply
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
若 CLI 不在 PATH,可追加 `--dsh-cli "<Desktop CLI 完整路径>"`;若 DSH 使用自定义数据目录,可追加 `--dsh-home "<DSH_HOME 路径>"`。
|
|
@@ -76,8 +76,8 @@ npm exec --yes --package @ai-wendao/ant@0.3.9 -- ant-migrate migrate --apply
|
|
|
76
76
|
`migrate --apply` 会输出受限权限的备份目录,备份包含 profile 的 `package.json`、`pnpm-lock.yaml`、`pnpm-workspace.yaml`(若存在)及其 SHA-256 校验值,不包含密钥库。备份仅用于迁移状态核验和保留原始清单,不等于离线恢复包。确认 DSH 已退出后,通过同一工具调用:
|
|
77
77
|
|
|
78
78
|
```sh
|
|
79
|
-
npm exec --yes --package @ai-wendao/ant@0.3.
|
|
80
|
-
npm exec --yes --package @ai-wendao/ant@0.3.
|
|
79
|
+
npm exec --yes --package @ai-wendao/ant@0.3.10 -- ant-migrate rollback --backup "<备份目录>"
|
|
80
|
+
npm exec --yes --package @ai-wendao/ant@0.3.10 -- ant-migrate rollback --backup "<备份目录>" --apply
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
回退只在 scoped 包已安装、旧 alias 尚未移除的中间态工作;它会卸载 scoped 包并保留旧 alias。已完成迁移的 profile 不接受该回退,避免自动恢复已知有加载问题的 alias。若安装包时 npm registry 不可用,保持 DSH 关闭,稍后重新运行 `migrate --apply`。
|
package/index.js
CHANGED
|
@@ -609,6 +609,7 @@ export function apply(ctx) {
|
|
|
609
609
|
connectionCtx.effect(() => connectionCtx.connection.fetch.register({
|
|
610
610
|
path: BUNDLE_RELEASE_PATH,
|
|
611
611
|
methods: ['GET'],
|
|
612
|
+
requestBody: 'buffered',
|
|
612
613
|
fetch: (request) => fetchBundleRelease(request, connectionCtx.credentials, connectionCtx.settings),
|
|
613
614
|
}), 'ant-teams: authenticated Bundle release relay')
|
|
614
615
|
connectionCtx.effect(() => connectionCtx.connection.fetch.register({
|