fix(scripts): resolve noAssignInExpressions lint error in schema generator
CI / check (push) Successful in 30s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m28s

This commit is contained in:
openhands committed 2026-08-01 17:14:48 +02:00
1 parent c601ffbb76
commit 8275842e78
1 file changed
+5 -3
+5 -3
View File
@@ -42,14 +42,16 @@ function parseDrizzleTables(source) {
const re2 = const re2 =
/^export const (\w+) = mysqlTable\(\s*"([^"]+)"\s*,\s*\{([\s\S]*?)\n\}(?:,\s*\(t\)\s*=>\s*\[([\s\S]*?)\])?\s*\);/gm; /^export const (\w+) = mysqlTable\(\s*"([^"]+)"\s*,\s*\{([\s\S]*?)\n\}(?:,\s*\(t\)\s*=>\s*\[([\s\S]*?)\])?\s*\);/gm;
let match; let match = re2.exec(source);
const seen = new Set(); const seen = new Set();
while ((match = re2.exec(source)) !== null) { while (match !== null) {
const [, name, table, body, extras] = match; const [, name, table, body, extras] = match;
if (seen.has(name)) continue; if (!seen.has(name)) {
seen.add(name); seen.add(name);
models.push(parseTableBody(name, table, body, extras ?? "")); models.push(parseTableBody(name, table, body, extras ?? ""));
} }
match = re2.exec(source);
}
if (models.length === 0) { if (models.length === 0) {
throw new Error( throw new Error(