Major Bugfix
This commit is contained in:
parent
04e4e0e9fd
commit
f0cec49e3b
4
dist/lib/sqlite/db-schema-to-typedef.js
vendored
4
dist/lib/sqlite/db-schema-to-typedef.js
vendored
@ -8,7 +8,9 @@ export default 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 = config.db_name?.toUpperCase().replace(/ |\-/g, "_");
|
const defDbName = config.db_name
|
||||||
|
?.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/bun-sqlite",
|
"name": "@moduletrace/bun-sqlite",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"description": "SQLite manager for Bun",
|
"description": "SQLite manager for Bun",
|
||||||
"author": "Benjamin Toby",
|
"author": "Benjamin Toby",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@ -24,7 +24,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