Skip to content

Commit 9a8f053

Browse files
committed
Remove debug logs
1 parent e2e86a7 commit 9a8f053

1 file changed

Lines changed: 1 addition & 101 deletions

File tree

apps/sim/lib/workflows/comparison/compare.ts

Lines changed: 1 addition & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -19,105 +19,5 @@ export function hasWorkflowChanged(
1919
const normalizedCurrent = normalizeWorkflowState(currentState)
2020
const normalizedDeployed = normalizeWorkflowState(deployedState)
2121

22-
const currentStr = normalizedStringify(normalizedCurrent)
23-
const deployedStr = normalizedStringify(normalizedDeployed)
24-
25-
if (currentStr !== deployedStr) {
26-
// Debug: Find what's different
27-
console.log('[hasWorkflowChanged] Detected differences:')
28-
29-
// Compare edges
30-
if (
31-
normalizedStringify(normalizedCurrent.edges) !== normalizedStringify(normalizedDeployed.edges)
32-
) {
33-
console.log(' - Edges differ')
34-
console.log(' Current:', JSON.stringify(normalizedCurrent.edges, null, 2))
35-
console.log(' Deployed:', JSON.stringify(normalizedDeployed.edges, null, 2))
36-
}
37-
38-
// Compare blocks
39-
const currentBlockIds = Object.keys(normalizedCurrent.blocks).sort()
40-
const deployedBlockIds = Object.keys(normalizedDeployed.blocks).sort()
41-
42-
if (normalizedStringify(currentBlockIds) !== normalizedStringify(deployedBlockIds)) {
43-
console.log(' - Block IDs differ')
44-
console.log(' Current:', currentBlockIds)
45-
console.log(' Deployed:', deployedBlockIds)
46-
} else {
47-
for (const blockId of currentBlockIds) {
48-
const currentBlock = normalizedCurrent.blocks[blockId]
49-
const deployedBlock = normalizedDeployed.blocks[blockId]
50-
51-
if (normalizedStringify(currentBlock) !== normalizedStringify(deployedBlock)) {
52-
console.log(` - Block "${blockId}" differs:`)
53-
54-
// Compare subBlocks
55-
const currentSubBlockIds = Object.keys(currentBlock.subBlocks || {}).sort()
56-
const deployedSubBlockIds = Object.keys(deployedBlock.subBlocks || {}).sort()
57-
58-
if (
59-
normalizedStringify(currentSubBlockIds) !== normalizedStringify(deployedSubBlockIds)
60-
) {
61-
console.log(' SubBlock IDs differ:')
62-
console.log(' Current:', currentSubBlockIds)
63-
console.log(' Deployed:', deployedSubBlockIds)
64-
} else {
65-
for (const subBlockId of currentSubBlockIds) {
66-
const currentSub = currentBlock.subBlocks[subBlockId]
67-
const deployedSub = deployedBlock.subBlocks[subBlockId]
68-
69-
if (normalizedStringify(currentSub) !== normalizedStringify(deployedSub)) {
70-
console.log(` SubBlock "${subBlockId}" differs:`)
71-
console.log(' Current:', JSON.stringify(currentSub, null, 2))
72-
console.log(' Deployed:', JSON.stringify(deployedSub, null, 2))
73-
}
74-
}
75-
}
76-
77-
// Compare block properties (excluding subBlocks)
78-
const { subBlocks: _cs, ...currentBlockRest } = currentBlock
79-
const { subBlocks: _ds, ...deployedBlockRest } = deployedBlock
80-
81-
if (normalizedStringify(currentBlockRest) !== normalizedStringify(deployedBlockRest)) {
82-
console.log(' Block properties differ:')
83-
console.log(' Current:', JSON.stringify(currentBlockRest, null, 2))
84-
console.log(' Deployed:', JSON.stringify(deployedBlockRest, null, 2))
85-
}
86-
}
87-
}
88-
}
89-
90-
// Compare loops
91-
if (
92-
normalizedStringify(normalizedCurrent.loops) !== normalizedStringify(normalizedDeployed.loops)
93-
) {
94-
console.log(' - Loops differ')
95-
console.log(' Current:', JSON.stringify(normalizedCurrent.loops, null, 2))
96-
console.log(' Deployed:', JSON.stringify(normalizedDeployed.loops, null, 2))
97-
}
98-
99-
// Compare parallels
100-
if (
101-
normalizedStringify(normalizedCurrent.parallels) !==
102-
normalizedStringify(normalizedDeployed.parallels)
103-
) {
104-
console.log(' - Parallels differ')
105-
console.log(' Current:', JSON.stringify(normalizedCurrent.parallels, null, 2))
106-
console.log(' Deployed:', JSON.stringify(normalizedDeployed.parallels, null, 2))
107-
}
108-
109-
// Compare variables
110-
if (
111-
normalizedStringify(normalizedCurrent.variables) !==
112-
normalizedStringify(normalizedDeployed.variables)
113-
) {
114-
console.log(' - Variables differ')
115-
console.log(' Current:', JSON.stringify(normalizedCurrent.variables, null, 2))
116-
console.log(' Deployed:', JSON.stringify(normalizedDeployed.variables, null, 2))
117-
}
118-
119-
return true
120-
}
121-
122-
return false
22+
return normalizedStringify(normalizedCurrent) !== normalizedStringify(normalizedDeployed)
12323
}

0 commit comments

Comments
 (0)