| 92 | } |
| 93 | |
| 94 | export function buildCreationBlockingUpdates( |
| 95 | blockingItems: DependencyItem[] |
| 96 | ): CreationBlockingUpdates { |
| 97 | const added: string[] = []; |
| 98 | const raw: Record<string, TaskDependency> = {}; |
| 99 | const unresolved: string[] = []; |
| 100 | |
| 101 | blockingItems.forEach((item) => { |
| 102 | if (item.path) { |
| 103 | if (!added.includes(item.path)) { |
| 104 | added.push(item.path); |
| 105 | raw[item.path] = { ...item.dependency }; |
| 106 | } |
| 107 | } else { |
| 108 | unresolved.push(item.dependency.uid); |
| 109 | } |
| 110 | }); |
| 111 | |
| 112 | return { added, raw, unresolved }; |
| 113 | } |