feat(workflow): 企业可用节点探针、灰度开通收敛与DataLink公式硬规则校验

This commit is contained in:
gitea committed 2026-10-20 13:08:36 +08:00
1 parent 4f0eea5725
commit 0768b94d65
14 files changed
+974 -22

No files matched your search

+10 -2
View File
@@ -1,4 +1,4 @@
import { getWorkflowDetail } from "../../../domains/platform/services.js";
import { getWorkflowDetail, getWorkflowAvailableNodes } from "../../../domains/platform/services.js";
import {
analyzeWorkflow,
extractWorkflowSpecificationIds,
@@ -30,7 +30,15 @@ export async function handleAnalyze(parsed: CliParsedArgs, runtime: CliRuntime):
})
);
}
const result = analyzeWorkflow(detail, { specifications });
let availableNodeTypes: Set<string> | undefined;
try {
const available = await getWorkflowAvailableNodes(client);
availableNodeTypes = available.allTypes;
} catch {
// 离线或受限网络环境下忽略探针失败
}
const result = analyzeWorkflow(detail, { specifications, availableNodeTypes });
if (runtime.jsonMode) return { stdout: printJson(result, runtime.outputOptions), stderr: "", exitCode: 0 };
const diagnosticRows = result.diagnostics.map((item) => [item.severity, item.code, item.path, item.message]);
const dependencyRows = result.dependencies.map((item) => [item.path, item.taskType, item.references.join(", ")]);