build: 清理 tinyflow-ui 构建告警

- 收口 Svelte props 响应式引用与 custom element props 声明

- 清理局部未使用样式与类型告警并保持现有业务语义
This commit is contained in:
2026-05-06 19:22:33 +08:00
parent ba70fec9a5
commit 8d07b306e5
34 changed files with 288 additions and 151 deletions

View File

@@ -897,7 +897,10 @@ describe('workflow node fields', () => {
expect(normalizedWorkflow.nodes[0]?.data?.parameters?.[0]?.required).toBe(
true,
);
expect(normalizedWorkflow.nodes[0]?.data?.startFormSchema?.[0]?.key).toBe(
expect(
(normalizedWorkflow.nodes[0]?.data as Record<string, any> | undefined)
?.startFormSchema?.[0]?.key,
).toBe(
'user_input',
);
expect(normalizedWorkflow.nodes[1]?.data?.parameters).toEqual([]);

View File

@@ -1237,7 +1237,10 @@ function replaceStartFieldReferenceValue(
return value;
}
function collectDownstreamNodeIds(rootNodeId: string, edges: Edge[]) {
export function collectDownstreamNodeIds(
rootNodeId: string,
edges: Edge[],
) {
const nodeIds = new Set<string>();
const visit = (nodeId: string) => {
@@ -1281,7 +1284,7 @@ export function renameStartFieldReferencesInNodes(
const oldRefPath = `${normalizedStartNodeId}.${normalizedCurrentKey}`;
const newRefPath = `${normalizedStartNodeId}.${normalizedNextKey}`;
const nextNodes = nodes.map((node) => {
const nextNodes: Node[] = nodes.map((node) => {
if (node.id === normalizedStartNodeId) {
return node;
}
@@ -1295,7 +1298,7 @@ export function renameStartFieldReferencesInNodes(
}
return {
...node,
data: nextData,
data: nextData ?? {},
};
});