Major version update. Major bugfixes. Security vulnerabilites fixed

This commit is contained in:
2026-10-14 03:02:07 +01:00
parent 4e47bd8ce0
commit 7c095f6f16
112 changed files with 2479 additions and 1219 deletions
+19
View File
@@ -0,0 +1,19 @@
import _ from "lodash";
/**
* Resolve a table's effective definition. Tables with `parentTableName`
* take their structure from the parent. Always returns a copy: the schema
* objects are never mutated.
*/
export default function resolveTable({ table, db_schema, }) {
if (!table.parentTableName) {
return _.cloneDeep(table);
}
const parent_table = db_schema.tables.find((t) => t.tableName === table.parentTableName);
if (!parent_table) {
throw new Error(`Parent table \`${table.parentTableName}\` not found for \`${table.tableName}\``);
}
return _.merge(_.cloneDeep(parent_table), {
tableName: table.tableName,
tableDescription: table.tableDescription,
});
}