Major Bugfix
This commit is contained in:
parent
bf1c364e36
commit
09430bb561
2
dist/lib/sqlite/db-schema-to-typedef.js
vendored
2
dist/lib/sqlite/db-schema-to-typedef.js
vendored
@ -15,7 +15,7 @@ function dbSchemaToType({ config, dbSchema, }) {
|
|||||||
.map((tbl) => ` "${tbl.tableName}",`)
|
.map((tbl) => ` "${tbl.tableName}",`)
|
||||||
.join("\n")}\n] as const`;
|
.join("\n")}\n] as const`;
|
||||||
const dbTablesSchemas = datasquirelSchema.tables;
|
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 defNames = [];
|
||||||
const schemas = dbTablesSchemas
|
const schemas = dbTablesSchemas
|
||||||
.map((table) => {
|
.map((table) => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/nsqlite",
|
"name": "@moduletrace/nsqlite",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"description": "SQLite manager for Node JS",
|
"description": "SQLite manager for Node JS",
|
||||||
"author": "Benjamin Toby",
|
"author": "Benjamin Toby",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@ -21,7 +21,9 @@ export default function dbSchemaToType({
|
|||||||
|
|
||||||
const dbTablesSchemas = datasquirelSchema.tables;
|
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[] = [];
|
const defNames: string[] = [];
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user