Skip to content

Commit 8176b37

Browse files
committed
Lint
1 parent 610ea0b commit 8176b37

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

apps/sim/lib/workflows/yaml-generator.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ function extractBlockInputs(
165165
/**
166166
* Find incoming connections for a given block ID
167167
*/
168-
function findIncomingConnections(blockId: string, edges: any[]): Array<{
168+
function findIncomingConnections(
169+
blockId: string,
170+
edges: any[]
171+
): Array<{
169172
source: string
170173
sourceHandle?: string
171174
targetHandle?: string
@@ -182,7 +185,10 @@ function findIncomingConnections(blockId: string, edges: any[]): Array<{
182185
/**
183186
* Find outgoing connections for a given block ID
184187
*/
185-
function findOutgoingConnections(blockId: string, edges: any[]): Array<{
188+
function findOutgoingConnections(
189+
blockId: string,
190+
edges: any[]
191+
): Array<{
186192
target: string
187193
sourceHandle?: string
188194
targetHandle?: string
@@ -229,11 +235,11 @@ export function generateWorkflowYaml(
229235
// Only include connections if they exist
230236
if (incoming.length > 0 || outgoing.length > 0) {
231237
yamlBlock.connections = {}
232-
238+
233239
if (incoming.length > 0) {
234240
yamlBlock.connections.incoming = incoming
235241
}
236-
242+
237243
if (outgoing.length > 0) {
238244
yamlBlock.connections.outgoing = outgoing
239245
}

apps/sim/stores/workflows/yaml/importer.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ function validateBlockReferences(yamlWorkflow: YamlWorkflow): string[] {
134134
if (block.connections?.incoming) {
135135
block.connections.incoming.forEach((connection) => {
136136
if (!blockIds.has(connection.source)) {
137-
errors.push(`Block '${blockId}' references non-existent source block '${connection.source}'`)
137+
errors.push(
138+
`Block '${blockId}' references non-existent source block '${connection.source}'`
139+
)
138140
}
139141
})
140142
}
@@ -143,7 +145,9 @@ function validateBlockReferences(yamlWorkflow: YamlWorkflow): string[] {
143145
if (block.connections?.outgoing) {
144146
block.connections.outgoing.forEach((connection) => {
145147
if (!blockIds.has(connection.target)) {
146-
errors.push(`Block '${blockId}' references non-existent target block '${connection.target}'`)
148+
errors.push(
149+
`Block '${blockId}' references non-existent target block '${connection.target}'`
150+
)
147151
}
148152
})
149153
}

0 commit comments

Comments
 (0)