ai-project-manage-cli 6.0.85 → 6.0.86
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 +1 -0
- package/dist/index.js +13 -2
- package/package.json +1 -1
- package/template/skills/apm-deploy/SKILL.md +7 -0
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2527,7 +2527,9 @@ async function uploadDeployArtifactZip(options) {
|
|
|
2527
2527
|
"Content-Type": "application/zip"
|
|
2528
2528
|
});
|
|
2529
2529
|
console.error(
|
|
2530
|
-
`[apm] \
|
|
2530
|
+
`[apm] \u672C\u5730\u76F4\u4F20 MinIO\uFF08\u4E0D\u7ECF\u5E73\u53F0\u670D\u52A1\u5668\uFF09: ${storage.endpoint}:${storage.port}/${storage.bucket}/${objectKey} (${(body.length / 1024 / 1024).toFixed(
|
|
2531
|
+
2
|
|
2532
|
+
)} MB)`
|
|
2531
2533
|
);
|
|
2532
2534
|
} catch (error) {
|
|
2533
2535
|
const detail = error instanceof Error ? error.message : String(error);
|
|
@@ -5749,6 +5751,15 @@ async function executeDeploy(options) {
|
|
|
5749
5751
|
const captureOutput = options.captureOutput ?? false;
|
|
5750
5752
|
const outputParts = [];
|
|
5751
5753
|
try {
|
|
5754
|
+
const configSyncResult = await syncRemoteDeploymentConfig(
|
|
5755
|
+
cwd,
|
|
5756
|
+
workspaceApmDir(cwd)
|
|
5757
|
+
);
|
|
5758
|
+
if (configSyncResult.synced && configSyncResult.configName) {
|
|
5759
|
+
outputParts.push(
|
|
5760
|
+
`[apm] \u90E8\u7F72\u524D\u5DF2\u540C\u6B65\u5E73\u53F0\u90E8\u7F72\u914D\u7F6E: ${configSyncResult.configName}`
|
|
5761
|
+
);
|
|
5762
|
+
}
|
|
5752
5763
|
const syncResult = await syncDeployBaselineBeforeDeploy(cwd);
|
|
5753
5764
|
if (syncResult.log.trim()) {
|
|
5754
5765
|
outputParts.push(syncResult.log);
|
|
@@ -5916,7 +5927,7 @@ async function runDeployWithBackendTracking(options) {
|
|
|
5916
5927
|
// src/commands/deploy/deploy.ts
|
|
5917
5928
|
function registerDeployMainCommand(program) {
|
|
5918
5929
|
program.command("deploy").description(
|
|
5919
|
-
"\u7EDF\u4E00\u90E8\u7F72\
|
|
5930
|
+
"\u7EDF\u4E00\u90E8\u7F72\uFF08\u6267\u884C\u524D\u81EA\u52A8\u540C\u6B65\u90E8\u7F72\u914D\u7F6E\u5E76\u5408\u5E76\u57FA\u7EBF\u5206\u652F\uFF09\uFF1A\u533B\u52A1\u5B58\u91CF\u81EA\u52A8\u8BC6\u522B\u524D\u540E\u7AEF\uFF1B\u5176\u4ED6\u9879\u76EE\u6309 deploy.<\u73AF\u5883> \u6267\u884C shell \u547D\u4EE4"
|
|
5920
5931
|
).argument("<env>", "\u90E8\u7F72\u73AF\u5883\u540D\uFF08\u5982 test\u3001online\uFF09").option(
|
|
5921
5932
|
"--config <path>",
|
|
5922
5933
|
"apm.config.json \u8DEF\u5F84\uFF08\u9ED8\u8BA4 .apm/apm.config.json\uFF09"
|
package/package.json
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
**sessionId**:从当前工作项目录 `.apm/sessions/<sessionId>/` 或 `session.yaml` 获取;必须传入 `--session`,平台才会记录部署。
|
|
8
8
|
|
|
9
|
+
部署前会自动:
|
|
10
|
+
|
|
11
|
+
1. 从平台同步最新部署配置(`.apm/apm.config.json`)
|
|
12
|
+
2. 合并仓库基线分支最新代码到当前分支
|
|
13
|
+
|
|
14
|
+
若平台刚更新过部署配置,也可先手动执行 `apm sync-deploy-config` 再部署。
|
|
15
|
+
|
|
9
16
|
- **成功**:部署完成,在回信中说明测试环境地址或部署结果。
|
|
10
17
|
- **失败且输出含「未配置自动化部署」或「可跳过部署」**:本项目不支持自动化部署,属正常情况;放弃部署,在回信说明已跳过即可,无需修复配置或重试。
|
|
11
18
|
- **其他失败**:按输出排查并修复后重试。
|