@gratheon/log-lib 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/logger.js CHANGED
@@ -43,7 +43,7 @@ async function initializeConnection(config) {
43
43
  connectionString: `mysql://${config.mysql.user}:${config.mysql.password}@${config.mysql.host}:${config.mysql.port}/?connectionLimit=1&waitForConnections=true`,
44
44
  bigIntMode: 'number',
45
45
  });
46
- await tempConn.query((0, mysql_1.sql) `CREATE DATABASE IF NOT EXISTS \`${database}\` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`);
46
+ await tempConn.query((0, mysql_1.sql) `CREATE DATABASE IF NOT EXISTS ${mysql_1.sql.ident(database)} CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`);
47
47
  await tempConn.dispose();
48
48
  // Now create the main connection pool with the logs database
49
49
  conn = (0, mysql_1.default)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gratheon/log-lib",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Logging library with console and MySQL database persistence",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "author": "",
19
19
  "license": "ISC",
20
20
  "dependencies": {
21
- "@databases/mysql": "^6.0.0",
21
+ "@databases/mysql": "^7.0.0",
22
22
  "fast-safe-stringify": "^2.1.1"
23
23
  },
24
24
  "devDependencies": {
package/src/logger.ts CHANGED
@@ -19,7 +19,7 @@ async function initializeConnection(config: LoggerConfig) {
19
19
  bigIntMode: 'number',
20
20
  });
21
21
 
22
- await tempConn.query(sql`CREATE DATABASE IF NOT EXISTS \`${database}\` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`);
22
+ await tempConn.query(sql`CREATE DATABASE IF NOT EXISTS ${sql.ident(database)} CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`);
23
23
  await tempConn.dispose();
24
24
 
25
25
  // Now create the main connection pool with the logs database