Major Bugfix

This commit is contained in:
Benjamin Toby 2026-03-22 05:47:54 +01:00
parent bf1c364e36
commit 09430bb561
3 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@ function dbSchemaToType({ config, dbSchema, }) {
.map((tbl) => ` "${tbl.tableName}",`)
.join("\n")}\n] as const`;
const dbTablesSchemas = datasquirelSchema.tables;
const defDbName = (_a = config.db_name) === null || _a === void 0 ? void 0 : _a.toUpperCase().replace(/ |\-/g, "_");
const defDbName = (_a = config.db_name) === null || _a === void 0 ? void 0 : _a.toUpperCase().replace(/[^a-zA-Z0-9]/g, "_");
const defNames = [];
const schemas = dbTablesSchemas
.map((table) => {

View File

@ -1,6 +1,6 @@
{
"name": "@moduletrace/nsqlite",
"version": "1.0.10",
"version": "1.0.11",
"description": "SQLite manager for Node JS",
"author": "Benjamin Toby",
"main": "dist/index.js",

View File

@ -21,7 +21,9 @@ export default function dbSchemaToType({
const dbTablesSchemas = datasquirelSchema.tables;
const defDbName = config.db_name?.toUpperCase().replace(/ |\-/g, "_");
const defDbName = config.db_name
?.toUpperCase()
.replace(/[^a-zA-Z0-9]/g, "_");
const defNames: string[] = [];