digitalsee-ai-flow-cli 0.1.0
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 +631 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +87 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/flow.d.ts.map +1 -0
- package/dist/api/flow.js +61 -0
- package/dist/api/flow.js.map +1 -0
- package/dist/api/knowledge.d.ts.map +1 -0
- package/dist/api/knowledge.js +32 -0
- package/dist/api/knowledge.js.map +1 -0
- package/dist/api/node.d.ts.map +1 -0
- package/dist/api/node.js +65 -0
- package/dist/api/node.js.map +1 -0
- package/dist/api/variables.d.ts.map +1 -0
- package/dist/api/variables.js +24 -0
- package/dist/api/variables.js.map +1 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +73 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/flow/account.d.ts.map +1 -0
- package/dist/commands/flow/account.js +41 -0
- package/dist/commands/flow/account.js.map +1 -0
- package/dist/commands/flow/analyze.d.ts.map +1 -0
- package/dist/commands/flow/analyze.js +109 -0
- package/dist/commands/flow/analyze.js.map +1 -0
- package/dist/commands/flow/edge.d.ts.map +1 -0
- package/dist/commands/flow/edge.js +167 -0
- package/dist/commands/flow/edge.js.map +1 -0
- package/dist/commands/flow/helpers.d.ts.map +1 -0
- package/dist/commands/flow/helpers.js +213 -0
- package/dist/commands/flow/helpers.js.map +1 -0
- package/dist/commands/flow/list.d.ts.map +1 -0
- package/dist/commands/flow/list.js +40 -0
- package/dist/commands/flow/list.js.map +1 -0
- package/dist/commands/flow/node.d.ts.map +1 -0
- package/dist/commands/flow/node.js +425 -0
- package/dist/commands/flow/node.js.map +1 -0
- package/dist/commands/flow/test.d.ts.map +1 -0
- package/dist/commands/flow/test.js +55 -0
- package/dist/commands/flow/test.js.map +1 -0
- package/dist/commands/flow/variables.d.ts.map +1 -0
- package/dist/commands/flow/variables.js +177 -0
- package/dist/commands/flow/variables.js.map +1 -0
- package/dist/commands/flow.d.ts.map +1 -0
- package/dist/commands/flow.js +23 -0
- package/dist/commands/flow.js.map +1 -0
- package/dist/commands/knowledge.d.ts.map +1 -0
- package/dist/commands/knowledge.js +196 -0
- package/dist/commands/knowledge.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +74 -0
- package/dist/index.js.map +1 -0
- package/dist/services/flowAnalyzer.d.ts.map +1 -0
- package/dist/services/flowAnalyzer.js +366 -0
- package/dist/services/flowAnalyzer.js.map +1 -0
- package/dist/services/skillGenerator.d.ts.map +1 -0
- package/dist/services/skillGenerator.js +241 -0
- package/dist/services/skillGenerator.js.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +114 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/encoding.d.ts.map +1 -0
- package/dist/utils/encoding.js +21 -0
- package/dist/utils/encoding.js.map +1 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +375 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +115 -0
- package/dist/utils/output.js.map +1 -0
- package/package.json +27 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerFlowNode = registerFlowNode;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const flow_1 = require("@/api/flow");
|
|
39
|
+
const node_1 = require("@/api/node");
|
|
40
|
+
const flowAnalyzer_1 = require("@/services/flowAnalyzer");
|
|
41
|
+
const format_1 = require("@/utils/format");
|
|
42
|
+
const helpers_1 = require("@/commands/flow/helpers");
|
|
43
|
+
const output_1 = require("@/utils/output");
|
|
44
|
+
function registerFlowNode(flowCmd) {
|
|
45
|
+
const nodeCmd = flowCmd
|
|
46
|
+
.command("node")
|
|
47
|
+
.description("节点操作");
|
|
48
|
+
nodeCmd
|
|
49
|
+
.command("show <nodeId>")
|
|
50
|
+
.description("获取节点详细信息")
|
|
51
|
+
.option("--format <format>", "输出格式: table | json", "table")
|
|
52
|
+
.action(async (nodeId, options) => {
|
|
53
|
+
try {
|
|
54
|
+
(0, output_1.printInfo)(`正在获取节点 ${nodeId} 的详情...`);
|
|
55
|
+
const nodeDetail = await (0, node_1.getNodeDetail)(nodeId);
|
|
56
|
+
if (!nodeDetail) {
|
|
57
|
+
(0, output_1.printError)(`未找到节点 ${nodeId}`);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (options.format === "json") {
|
|
61
|
+
(0, output_1.printJson)(nodeDetail);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
(0, output_1.printHeader)(`节点详情: ${nodeDetail.id || nodeId}`);
|
|
65
|
+
(0, output_1.printKeyValue)([
|
|
66
|
+
["节点 ID", nodeDetail.n_id || nodeDetail.id || "-"],
|
|
67
|
+
["节点类型", (0, flowAnalyzer_1.formatNodeType)(nodeDetail.node_type)],
|
|
68
|
+
["连接器", nodeDetail.connector_name || nodeDetail.connector_id || "-"],
|
|
69
|
+
["动作", nodeDetail.action_name || nodeDetail.action_id || "-"],
|
|
70
|
+
["状态", nodeDetail.closed === 1 ? "已禁用" : nodeDetail.status || "正常"],
|
|
71
|
+
["位置", nodeDetail.position ? `(${nodeDetail.position.x}, ${nodeDetail.position.y})` : "-"],
|
|
72
|
+
["备注", nodeDetail.note || "(无)"],
|
|
73
|
+
["描述", nodeDetail.description || "(无)"],
|
|
74
|
+
["账号 ID", nodeDetail.account_id || "(无)"],
|
|
75
|
+
["账号 Schema ID", nodeDetail.config_schema?.account_schema_id || nodeDetail.account_schema_id || "(无)"],
|
|
76
|
+
]);
|
|
77
|
+
const configSchema = nodeDetail.config_schema;
|
|
78
|
+
if (configSchema?.sub_params && configSchema.sub_params.length > 0) {
|
|
79
|
+
(0, output_1.printSubHeader)(`配置参数 (${configSchema.sub_params.length})`);
|
|
80
|
+
const headers = ["字段名", "显示名", "类型", "必填", "当前值", "可选值"];
|
|
81
|
+
const rows = configSchema.sub_params.map((p) => {
|
|
82
|
+
const options = p.option_value_objects ?? p.option_values;
|
|
83
|
+
const optionStr = options && Array.isArray(options) && options.length > 0
|
|
84
|
+
? options.map((o) => typeof o === "string" ? o : (0, helpers_1.formatOptionLabel)(o)).join(", ")
|
|
85
|
+
: "-";
|
|
86
|
+
const val = p.value !== undefined && p.value !== null
|
|
87
|
+
? typeof p.value === "object" ? JSON.stringify(p.value) : String(p.value)
|
|
88
|
+
: "-";
|
|
89
|
+
return [
|
|
90
|
+
p.name || "-",
|
|
91
|
+
p.display_name || "-",
|
|
92
|
+
p.page_control || p.type || "string",
|
|
93
|
+
p.required ? "是" : "否",
|
|
94
|
+
val,
|
|
95
|
+
optionStr,
|
|
96
|
+
];
|
|
97
|
+
});
|
|
98
|
+
(0, output_1.printTable)(headers, rows);
|
|
99
|
+
}
|
|
100
|
+
if (nodeDetail.properties && Object.keys(nodeDetail.properties).length > 0) {
|
|
101
|
+
(0, output_1.printSubHeader)("当前属性值");
|
|
102
|
+
(0, output_1.printJson)(nodeDetail.properties);
|
|
103
|
+
}
|
|
104
|
+
if (nodeDetail.error_handler) {
|
|
105
|
+
(0, output_1.printSubHeader)("错误处理配置");
|
|
106
|
+
(0, output_1.printJson)(nodeDetail.error_handler);
|
|
107
|
+
}
|
|
108
|
+
(0, output_1.printSuccess)("节点信息获取完成");
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
(0, output_1.printError)(`获取节点信息失败: ${error.message}`);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
nodeCmd
|
|
115
|
+
.command("create")
|
|
116
|
+
.description("在连接流中创建新节点")
|
|
117
|
+
.requiredOption("--flow-id <flowId>", "连接流 ID")
|
|
118
|
+
.requiredOption("--connector-id <connectorId>", "连接器 ID")
|
|
119
|
+
.requiredOption("--action-id <actionId>", "动作 ID")
|
|
120
|
+
.option("--trigger", "作为触发器节点(流中第一个节点建议启用)", false)
|
|
121
|
+
.option("--node-type <type>", "节点类型或动作类型")
|
|
122
|
+
.option("--account-id <id>", "账号实例 ID(需要账号鉴权时指定)")
|
|
123
|
+
.option("--error-handler-file <path>", "错误处理配置 JSON 文件")
|
|
124
|
+
.option("--data-file <path>", "JSON 文件路径,用于覆盖节点配置值")
|
|
125
|
+
.option("--data <json>", "JSON 字符串,用于覆盖节点配置值")
|
|
126
|
+
.option("--position-x <number>", "节点 X 坐标(默认根据已有节点自动计算)")
|
|
127
|
+
.option("--position-y <number>", "节点 Y 坐标(默认根据已有节点自动计算)")
|
|
128
|
+
.action(async (options) => {
|
|
129
|
+
try {
|
|
130
|
+
const flowId = options.flowId;
|
|
131
|
+
const connectorId = options.connectorId;
|
|
132
|
+
const actionId = options.actionId;
|
|
133
|
+
(0, output_1.printInfo)(`获取连接流 ${flowId} 的详情...`);
|
|
134
|
+
const flow = await (0, flow_1.getFlowDetail)(flowId);
|
|
135
|
+
const nodes = flow.nodes || [];
|
|
136
|
+
const isFirstNode = nodes.length === 0;
|
|
137
|
+
if (isFirstNode && !options.trigger) {
|
|
138
|
+
(0, output_1.printWarning)("流中尚无节点,建议添加 --trigger 标志创建触发器节点");
|
|
139
|
+
}
|
|
140
|
+
const defaultPos = (0, helpers_1.calcDefaultPosition)(nodes);
|
|
141
|
+
let posX = options.positionX !== undefined
|
|
142
|
+
? Number(options.positionX)
|
|
143
|
+
: defaultPos.x;
|
|
144
|
+
let posY = options.positionY !== undefined
|
|
145
|
+
? Number(options.positionY)
|
|
146
|
+
: defaultPos.y;
|
|
147
|
+
const trigger = options.trigger || false;
|
|
148
|
+
(0, output_1.printInfo)(`获取连接器 ${connectorId} 的动作列表...`);
|
|
149
|
+
const actions = await (0, node_1.getActions)({
|
|
150
|
+
linkId: connectorId,
|
|
151
|
+
flowId,
|
|
152
|
+
trigger,
|
|
153
|
+
});
|
|
154
|
+
const action = actions.find((a) => a.id === actionId);
|
|
155
|
+
if (!action) {
|
|
156
|
+
(0, output_1.printError)(`未找到动作 ${actionId}`);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
let accountId = options.accountId || null;
|
|
160
|
+
const accountSchemaId = action.config_schema?.account_schema_id;
|
|
161
|
+
if (accountSchemaId && !accountId) {
|
|
162
|
+
(0, output_1.printWarning)(`该动作需要配置账号 (account_schema_id: ${accountSchemaId})`);
|
|
163
|
+
try {
|
|
164
|
+
const accounts = await (0, node_1.getAccountInstances)(connectorId, accountSchemaId);
|
|
165
|
+
if (accounts.length > 0) {
|
|
166
|
+
(0, output_1.printInfo)("可用账号实例:");
|
|
167
|
+
const headers = ["ID", "名称", "认证类型"];
|
|
168
|
+
const rows = accounts.map((a) => [
|
|
169
|
+
a.id || "-",
|
|
170
|
+
a.name || "-",
|
|
171
|
+
a.auth_type || "-",
|
|
172
|
+
]);
|
|
173
|
+
(0, output_1.printTable)(headers, rows);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
(0, output_1.printWarning)("未找到可用账号实例,请先创建账号");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
(0, output_1.printWarning)("获取账号实例失败");
|
|
181
|
+
}
|
|
182
|
+
(0, output_1.printError)("请通过 --account-id <id> 指定账号实例 ID");
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
let configSchema = action.config_schema || {};
|
|
186
|
+
const overrideValues = (0, helpers_1.resolveDataOption)(options);
|
|
187
|
+
if (overrideValues) {
|
|
188
|
+
if (overrideValues.properties !== undefined) {
|
|
189
|
+
configSchema = (0, format_1.deepMergeValues)(configSchema, overrideValues.properties);
|
|
190
|
+
if (overrideValues.position) {
|
|
191
|
+
posX = Number(overrideValues.position.x) || posX;
|
|
192
|
+
posY = Number(overrideValues.position.y) || posY;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
configSchema = (0, format_1.deepMergeValues)(configSchema, overrideValues);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
configSchema = (0, format_1.fillConfigSchemaDefaults)(configSchema);
|
|
201
|
+
}
|
|
202
|
+
let defaultNodeType = "ActionNode";
|
|
203
|
+
const node_type = options.nodeType || action.action_type || defaultNodeType;
|
|
204
|
+
if (isFirstNode && node_type !== "StartEventNode") {
|
|
205
|
+
defaultNodeType = "StartEventNode";
|
|
206
|
+
(0, output_1.printError)("首个节点 nodeType 应该是 StartEventNode");
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const payload = {
|
|
210
|
+
flow_id: flowId,
|
|
211
|
+
node_type: node_type,
|
|
212
|
+
action_id: action.id,
|
|
213
|
+
properties: configSchema,
|
|
214
|
+
position: {
|
|
215
|
+
x: posX,
|
|
216
|
+
y: posY,
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
if (accountId) {
|
|
220
|
+
payload.account_id = accountId;
|
|
221
|
+
}
|
|
222
|
+
if (options.errorHandlerFile) {
|
|
223
|
+
const ehPath = options.errorHandlerFile;
|
|
224
|
+
if (!fs.existsSync(ehPath)) {
|
|
225
|
+
(0, output_1.printError)(`文件不存在: ${ehPath}`);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
payload.error_handler = JSON.parse(fs.readFileSync(ehPath, "utf-8"));
|
|
230
|
+
}
|
|
231
|
+
catch {
|
|
232
|
+
(0, output_1.printError)(`错误处理 JSON 文件格式无效: ${ehPath}`);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
(0, output_1.printInfo)("正在创建节点...");
|
|
237
|
+
const result = await (0, node_1.createNode)(payload);
|
|
238
|
+
(0, output_1.printSuccess)("节点创建成功");
|
|
239
|
+
const pairs = [
|
|
240
|
+
["节点 ID", result.id || "-"],
|
|
241
|
+
["动作名称", action.name],
|
|
242
|
+
["连接器", action.connector_id],
|
|
243
|
+
["节点类型", payload.node_type],
|
|
244
|
+
["触发器", trigger ? "是" : "否"],
|
|
245
|
+
["位置", `(${payload.position.x}, ${payload.position.y})`],
|
|
246
|
+
];
|
|
247
|
+
if (accountId) {
|
|
248
|
+
pairs.push(["账号 ID", accountId]);
|
|
249
|
+
}
|
|
250
|
+
if (options.errorHandlerFile) {
|
|
251
|
+
pairs.push(["错误处理", options.errorHandlerFile]);
|
|
252
|
+
}
|
|
253
|
+
if (options.dataFile)
|
|
254
|
+
pairs.push(["配置文件", options.dataFile]);
|
|
255
|
+
else if (options.data)
|
|
256
|
+
pairs.push(["配置数据", "--data"]);
|
|
257
|
+
(0, output_1.printKeyValue)(pairs);
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
(0, output_1.printError)(`创建节点失败: ${error.message}`);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
nodeCmd
|
|
264
|
+
.command("update <nodeId>")
|
|
265
|
+
.description("更新连接流中的节点配置")
|
|
266
|
+
.requiredOption("--flow-id <flowId>", "连接流 ID")
|
|
267
|
+
.option("--data-file <path>", "JSON 文件路径,用于更新节点配置值")
|
|
268
|
+
.option("--data <json>", "JSON 字符串,用于更新节点配置值")
|
|
269
|
+
.option("--position-x <number>", "节点 X 坐标")
|
|
270
|
+
.option("--position-y <number>", "节点 Y 坐标")
|
|
271
|
+
.option("--note <text>", "节点备注")
|
|
272
|
+
.option("--connector-id <connectorId>", "更换连接器 ID")
|
|
273
|
+
.option("--action-id <actionId>", "更换动作 ID")
|
|
274
|
+
.option("--account-id <id>", "更换账号实例 ID")
|
|
275
|
+
.option("--error-handler-file <path>", "错误处理配置 JSON 文件")
|
|
276
|
+
.action(async (nodeId, options) => {
|
|
277
|
+
try {
|
|
278
|
+
const flowId = options.flowId;
|
|
279
|
+
(0, output_1.printInfo)(`正在获取节点 ${nodeId} 的详情...`);
|
|
280
|
+
const nodeDetail = await (0, node_1.getNodeDetail)(nodeId);
|
|
281
|
+
if (!nodeDetail) {
|
|
282
|
+
(0, output_1.printError)(`未找到节点 ${nodeId}`);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
// 以 nodeDetail 为基准初始化 updateData
|
|
286
|
+
const updateData = {
|
|
287
|
+
flow_id: flowId,
|
|
288
|
+
};
|
|
289
|
+
if (nodeDetail.position)
|
|
290
|
+
updateData.position = { ...nodeDetail.position };
|
|
291
|
+
if (nodeDetail.action_id)
|
|
292
|
+
updateData.action_id = nodeDetail.action_id;
|
|
293
|
+
if (nodeDetail.connector_id)
|
|
294
|
+
updateData.connector_id = nodeDetail.connector_id;
|
|
295
|
+
if (nodeDetail.account_id)
|
|
296
|
+
updateData.account_id = nodeDetail.account_id;
|
|
297
|
+
if (nodeDetail.note != null)
|
|
298
|
+
updateData.note = nodeDetail.note;
|
|
299
|
+
const configValues = (0, helpers_1.resolveDataOption)(options);
|
|
300
|
+
if (configValues) {
|
|
301
|
+
const existingProps = nodeDetail.properties || {};
|
|
302
|
+
if (configValues.properties !== undefined) {
|
|
303
|
+
updateData.properties = (0, helpers_1.deepMergePlain)(existingProps, configValues.properties);
|
|
304
|
+
if (configValues.position)
|
|
305
|
+
updateData.position = configValues.position;
|
|
306
|
+
if (configValues.action_id !== undefined)
|
|
307
|
+
updateData.action_id = configValues.action_id;
|
|
308
|
+
if (configValues.connector_id)
|
|
309
|
+
updateData.connector_id = configValues.connector_id;
|
|
310
|
+
if (configValues.account_id !== undefined)
|
|
311
|
+
updateData.account_id = configValues.account_id;
|
|
312
|
+
if (configValues.note !== undefined)
|
|
313
|
+
updateData.note = configValues.note;
|
|
314
|
+
if (configValues.flow_id)
|
|
315
|
+
updateData.flow_id = configValues.flow_id;
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
updateData.properties = (0, helpers_1.deepMergePlain)(existingProps, configValues);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// CLI options 覆盖
|
|
322
|
+
if (options.positionX !== undefined || options.positionY !== undefined) {
|
|
323
|
+
updateData.position = {
|
|
324
|
+
x: options.positionX !== undefined ? Number(options.positionX) : (updateData.position?.x ?? 0),
|
|
325
|
+
y: options.positionY !== undefined ? Number(options.positionY) : (updateData.position?.y ?? 0),
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
if (options.note !== undefined)
|
|
329
|
+
updateData.note = options.note;
|
|
330
|
+
if (options.connectorId)
|
|
331
|
+
updateData.connector_id = options.connectorId;
|
|
332
|
+
if (options.actionId)
|
|
333
|
+
updateData.action_id = options.actionId;
|
|
334
|
+
if (options.accountId)
|
|
335
|
+
updateData.account_id = options.accountId;
|
|
336
|
+
if (options.errorHandlerFile) {
|
|
337
|
+
const ehPath = options.errorHandlerFile;
|
|
338
|
+
if (!fs.existsSync(ehPath)) {
|
|
339
|
+
(0, output_1.printError)(`文件不存在: ${ehPath}`);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
try {
|
|
343
|
+
updateData.error_handler = JSON.parse(fs.readFileSync(ehPath, "utf-8"));
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
346
|
+
(0, output_1.printError)(`错误处理 JSON 文件格式无效: ${ehPath}`);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if (Object.keys(updateData).length === 0) {
|
|
351
|
+
(0, output_1.printWarning)("未指定任何更新参数");
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
// 校验 properties 中各字段值与 page_control 类型匹配
|
|
355
|
+
if (updateData.properties) {
|
|
356
|
+
const validationErrors = (0, format_1.validateNodePropertyValues)(updateData.properties);
|
|
357
|
+
if (validationErrors.length > 0) {
|
|
358
|
+
(0, output_1.printWarning)(`节点配置值校验发现 ${validationErrors.length} 个问题:`);
|
|
359
|
+
for (const err of validationErrors) {
|
|
360
|
+
const ruleLabel = err.rule === "required" ? "必填" : "类型";
|
|
361
|
+
(0, output_1.printWarning)(` [${ruleLabel}] ${err.message}`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
(0, output_1.printInfo)("正在更新节点...");
|
|
366
|
+
const result = await (0, node_1.updateNode)(nodeId, updateData);
|
|
367
|
+
(0, output_1.printSuccess)("节点更新成功");
|
|
368
|
+
const pairs = [["节点 ID", nodeId]];
|
|
369
|
+
if (options.dataFile)
|
|
370
|
+
pairs.push(["配置文件", options.dataFile]);
|
|
371
|
+
else if (options.data)
|
|
372
|
+
pairs.push(["配置数据", "--data"]);
|
|
373
|
+
if (updateData.position) {
|
|
374
|
+
pairs.push(["位置", `(${updateData.position.x}, ${updateData.position.y})`]);
|
|
375
|
+
}
|
|
376
|
+
if (options.note !== undefined)
|
|
377
|
+
pairs.push(["备注", options.note]);
|
|
378
|
+
if (options.connectorId)
|
|
379
|
+
pairs.push(["连接器", options.connectorId]);
|
|
380
|
+
if (options.actionId)
|
|
381
|
+
pairs.push(["动作", options.actionId]);
|
|
382
|
+
if (options.accountId)
|
|
383
|
+
pairs.push(["账号 ID", options.accountId]);
|
|
384
|
+
if (options.errorHandlerFile)
|
|
385
|
+
pairs.push(["错误处理", options.errorHandlerFile]);
|
|
386
|
+
(0, output_1.printKeyValue)(pairs);
|
|
387
|
+
}
|
|
388
|
+
catch (error) {
|
|
389
|
+
(0, output_1.printError)(`更新节点失败: ${error.message}`);
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
nodeCmd
|
|
393
|
+
.command("delete <nodeId>")
|
|
394
|
+
.description("删除连接流中的节点")
|
|
395
|
+
.requiredOption("--flow-id <flowId>", "连接流 ID")
|
|
396
|
+
.option("--force", "跳过确认提示,直接删除", false)
|
|
397
|
+
.action(async (nodeId, options) => {
|
|
398
|
+
try {
|
|
399
|
+
if (!options.force) {
|
|
400
|
+
(0, output_1.printWarning)(`确认删除节点 ${nodeId}?`);
|
|
401
|
+
const readline = require("readline").createInterface({
|
|
402
|
+
input: process.stdin,
|
|
403
|
+
output: process.stdout,
|
|
404
|
+
});
|
|
405
|
+
const answer = await new Promise((resolve) => {
|
|
406
|
+
readline.question("输入 y 确认: ", (ans) => {
|
|
407
|
+
readline.close();
|
|
408
|
+
resolve(ans);
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
if (answer.toLowerCase() !== "y") {
|
|
412
|
+
(0, output_1.printInfo)("已取消删除");
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
(0, output_1.printInfo)(`正在删除节点 ${nodeId}...`);
|
|
417
|
+
await (0, node_1.deleteNode)(nodeId);
|
|
418
|
+
(0, output_1.printSuccess)(`节点 ${nodeId} 已删除`);
|
|
419
|
+
}
|
|
420
|
+
catch (error) {
|
|
421
|
+
(0, output_1.printError)(`删除节点失败: ${error.message}`);
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/commands/flow/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,4CAgYC;AAnaD,uCAAyB;AACzB,qCAA2C;AAC3C,qCAOoB;AACpB,0DAAyD;AACzD,2CAIwB;AACxB,qDAKiC;AACjC,2CAUwB;AAGxB,SAAgB,gBAAgB,CAAC,OAAgB;IAC/C,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,MAAM,CAAC,CAAC;IAEvB,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,UAAU,CAAC;SACvB,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,OAAO,CAAC;SAC1D,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,OAAO,EAAE,EAAE;QACxC,IAAI,CAAC;YACH,IAAA,kBAAS,EAAC,UAAU,MAAM,SAAS,CAAC,CAAC;YACrC,MAAM,UAAU,GAAG,MAAM,IAAA,oBAAa,EAAC,MAAM,CAAC,CAAC;YAC/C,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,IAAA,mBAAU,EAAC,SAAS,MAAM,EAAE,CA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CAAC,GAAW,EAAE,EAAE;wBAC7C,QAAQ,CAAC,KAAK,EAAE,CAAC;wBACjB,OAAO,CAAC,GAAG,CAAC,CAAC;oBACf,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBACH,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC;oBACjC,IAAA,kBAAS,EAAC,OAAO,CAAC,CAAC;oBACnB,OAAO;gBACT,CAAC;YACH,CAAC;YAED,IAAA,kBAAS,EAAC,UAAU,MAAM,KAAK,CAAC,CAAC;YACjC,MAAM,IAAA,iBAAU,EAAC,MAAM,CAAC,CAAC;YAEzB,IAAA,qBAAY,EAAC,MAAM,MAAM,MAAM,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAA,mBAAU,EAAC,WAAW,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACzC,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../src/commands/flow/test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiDvD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerFlowTest = registerFlowTest;
|
|
4
|
+
const node_1 = require("@/api/node");
|
|
5
|
+
const helpers_1 = require("@/commands/flow/helpers");
|
|
6
|
+
const output_1 = require("@/utils/output");
|
|
7
|
+
function registerFlowTest(flowCmd) {
|
|
8
|
+
flowCmd
|
|
9
|
+
.command("test <nodeId>")
|
|
10
|
+
.description("测试指定连接流的指定节点")
|
|
11
|
+
.option("--flow-id <flowId>", "连接流 ID")
|
|
12
|
+
.option("--data-file <path>", "JSON 文件路径,用于覆盖节点配置")
|
|
13
|
+
.option("--data <json>", "JSON 字符串,用于覆盖节点配置")
|
|
14
|
+
.action(async (nodeId, options) => {
|
|
15
|
+
try {
|
|
16
|
+
const configValues = (0, helpers_1.resolveDataOption)(options);
|
|
17
|
+
if (configValues) {
|
|
18
|
+
(0, output_1.printInfo)("正在获取节点详情...");
|
|
19
|
+
const nodeDetail = await (0, node_1.getNodeDetail)(nodeId);
|
|
20
|
+
if (!nodeDetail) {
|
|
21
|
+
(0, output_1.printError)(`未找到节点 ${nodeId}`);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const existingProps = nodeDetail.properties || {};
|
|
25
|
+
const mergeValues = configValues.properties !== undefined ? configValues.properties : configValues;
|
|
26
|
+
const mergedProperties = (0, helpers_1.deepMergePlain)(existingProps, mergeValues);
|
|
27
|
+
(0, output_1.printInfo)("正在更新节点配置...");
|
|
28
|
+
await (0, node_1.updateNode)(nodeId, { properties: mergedProperties });
|
|
29
|
+
(0, output_1.printSuccess)("节点配置已更新");
|
|
30
|
+
}
|
|
31
|
+
if (options.flowId) {
|
|
32
|
+
(0, output_1.printInfo)(`在连接流 ${options.flowId} 中测试节点 ${nodeId}`);
|
|
33
|
+
}
|
|
34
|
+
(0, output_1.printInfo)(`正在测试运行节点 ${nodeId}...`);
|
|
35
|
+
const result = await (0, node_1.testRunNode)(nodeId);
|
|
36
|
+
if (result.success) {
|
|
37
|
+
(0, output_1.printSuccess)("节点测试成功");
|
|
38
|
+
(0, output_1.printHeader)("测试结果");
|
|
39
|
+
if (typeof result.data === "object") {
|
|
40
|
+
(0, output_1.printJson)(result.data);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
console.log(result.data);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
(0, output_1.printError)(`节点测试失败: ${result.error}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
(0, output_1.printError)(`测试失败: ${error.message}`);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../src/commands/flow/test.ts"],"names":[],"mappings":";;AAWA,4CAiDC;AA3DD,qCAAoE;AACpE,qDAA4E;AAC5E,2CAMwB;AAExB,SAAgB,gBAAgB,CAAC,OAAgB;IAC/C,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,cAAc,CAAC;SAC3B,MAAM,CAAC,oBAAoB,EAAE,QAAQ,CAAC;SACtC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;SAClD,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC;SAC5C,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,OAAO,EAAE,EAAE;QACxC,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,IAAA,2BAAiB,EAAC,OAAO,CAAC,CAAC;YAChD,IAAI,YAAY,EAAE,CAAC;gBACjB,IAAA,kBAAS,EAAC,aAAa,CAAC,CAAC;gBACzB,MAAM,UAAU,GAAG,MAAM,IAAA,oBAAa,EAAC,MAAM,CAAC,CAAC;gBAC/C,IAAI,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAA,mBAAU,EAAC,SAAS,MAAM,EAAE,CAAC,CAAC;oBAC9B,OAAO;gBACT,CAAC;gBAED,MAAM,aAAa,GAAG,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC;gBAClD,MAAM,WAAW,GAAG,YAAY,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;gBACnG,MAAM,gBAAgB,GAAG,IAAA,wBAAc,EAAC,aAAa,EAAE,WAAW,CAAC,CAAC;gBAEpE,IAAA,kBAAS,EAAC,aAAa,CAAC,CAAC;gBACzB,MAAM,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