新增任务分享/导入功能并修复只读文件保存 EPERM
- flows: writeFlowFile 覆盖写加固(清只读属性->删除后 rename->覆盖写), 外部复制导入的只读任务文件此前导致 flows:save EPERM 崩溃 - flows: exportFlowToPath/importFlowFromPath, 分享文件为单个 FlowDefinition JSON(.rpaflow.json); 导入校验 schemaVersion/nodes/edges, id 冲突时生成 imported_ 前缀新 id 绝不覆盖既有任务 - IPC: flows:export 弹保存对话框 / flows:import 弹多选打开对话框, 失败文件逐个汇报不阻塞其余 - preload: flows.export/flows.import; shared: FlowsImportResult 类型 - TasksPage: 头部「导入任务」按钮 + 每行「分享」按钮; App 接线与 toast - 测试: 导出/导入往返、id 冲突、非法文件原因、只读覆盖共 4 例(7/7 绿)
This commit is contained in:
1 parent
22a7ee1595
commit
f95a24458e
8 files changed
+303
-10
No files matched your search
@@ -33,6 +33,12 @@ export interface FlowSaveOptions {
|
||||
export type FlowSaveResult =
|
||||
| { conflict: false; flow: FlowDefinition }
|
||||
| { conflict: true; diskFlow: FlowDefinition };
|
||||
|
||||
/** 批量导入任务的结果:成功与失败分开汇报,单文件失败不阻塞其余 */
|
||||
export interface FlowsImportResult {
|
||||
imported: FlowSummary[];
|
||||
failed: Array<{ file: string; reason: string }>;
|
||||
}
|
||||
export interface FlowSummary {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
Reference in new issue
Block a user