diff --git a/dist/lib/sqlite/db-schema-to-typedef.js b/dist/lib/sqlite/db-schema-to-typedef.js index c216baf..bb2eabf 100644 --- a/dist/lib/sqlite/db-schema-to-typedef.js +++ b/dist/lib/sqlite/db-schema-to-typedef.js @@ -10,7 +10,7 @@ export default function dbSchemaToType({ config, dbSchema, }) { const dbTablesSchemas = datasquirelSchema.tables; const defDbName = config.db_name ?.toUpperCase() - .replace(/^[a-zA-Z0-9]/g, "_"); + .replace(/[^a-zA-Z0-9]/g, "_"); const defNames = []; const schemas = dbTablesSchemas .map((table) => { diff --git a/package.json b/package.json index 534d05d..34e367f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moduletrace/bun-sqlite", - "version": "1.0.11", + "version": "1.0.12", "description": "SQLite manager for Bun", "author": "Benjamin Toby", "main": "dist/index.js", diff --git a/src/lib/sqlite/db-schema-to-typedef.ts b/src/lib/sqlite/db-schema-to-typedef.ts index 63de9ac..0394812 100644 --- a/src/lib/sqlite/db-schema-to-typedef.ts +++ b/src/lib/sqlite/db-schema-to-typedef.ts @@ -26,7 +26,7 @@ export default function dbSchemaToType({ const defDbName = config.db_name ?.toUpperCase() - .replace(/^[a-zA-Z0-9]/g, "_"); + .replace(/[^a-zA-Z0-9]/g, "_"); const defNames: string[] = [];