UNPKG

n8n

Version:

n8n Workflow Automation Tool

25 lines 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findSchemaIncompatibility = findSchemaIncompatibility; function findSchemaIncompatibility(packageColumns, targetColumns) { const targetTypeByName = new Map(targetColumns.map((column) => [column.name, column.type])); const missingColumns = []; const typeMismatches = []; for (const column of packageColumns) { const targetType = targetTypeByName.get(column.name); if (targetType === undefined) { missingColumns.push(column.name); } else if (targetType !== column.type) { typeMismatches.push({ column: column.name, expectedType: column.type, actualType: targetType, }); } } if (missingColumns.length === 0 && typeMismatches.length === 0) return null; return { missingColumns, typeMismatches }; } //# sourceMappingURL=data-table-compat.js.map