From 8d27e15a11bf637ee807970384645d9c99e4b3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartholom=C3=A9=20Gili?= <66025667+barthofu@users.noreply.github.com> Date: Thu, 25 Aug 2022 09:09:28 +0000 Subject: [PATCH] fix(#39): switch from `sqlite` to `better-sqlite` on mikro-orm --- package-lock.json | 263 +++++++++++++++-------------------------- package.json | 12 +- src/config/database.ts | 4 +- 3 files changed, 102 insertions(+), 177 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc76f8bf..3daa746a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,15 +16,15 @@ "@discordx/utilities": "^5.0.0", "@koa/router": "^10.1.1", "@mikro-orm/better-sqlite": "^5.3.1", - "@mikro-orm/cli": "^5.1.4", - "@mikro-orm/core": "^5.1.4", + "@mikro-orm/cli": "^5.3.1", + "@mikro-orm/core": "^5.3.1", "@mikro-orm/mariadb": "^5.3.1", - "@mikro-orm/migrations": "^5.1.4", + "@mikro-orm/migrations": "^5.3.1", "@mikro-orm/mongodb": "^5.3.1", - "@mikro-orm/mysql": "^5.2.1", - "@mikro-orm/postgresql": "^5.2.1", + "@mikro-orm/mysql": "^5.3.1", + "@mikro-orm/postgresql": "^5.3.1", "@mikro-orm/sql-highlighter": "^1.0.1", - "@mikro-orm/sqlite": "^5.1.4", + "@mikro-orm/sqlite": "^5.3.1", "axios": "^0.27.2", "boxen": "^5.1.2", "case": "^1.6.3", @@ -529,12 +529,12 @@ } }, "node_modules/@mikro-orm/cli": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.2.1.tgz", - "integrity": "sha512-D3RS9IXXAkwMMGqa1E/xXJnCbI6AhjEkz7nRylYuyN6TVngHjW6fkcKTy25a6GGGvx2Z2CNEAtF7VId3P1gbeg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.3.1.tgz", + "integrity": "sha512-ULZYZ+jdKlTCi295n6VS+EQo6eSGItiQ73CH3TO81ZhUdGFal97rPV8pfVxQMyMX/bbLiOEHlxnUI0Mrnz3ZQQ==", "dependencies": { - "@mikro-orm/core": "^5.2.1", - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/core": "^5.3.1", + "@mikro-orm/knex": "^5.3.1", "fs-extra": "10.1.0", "tsconfig-paths": "4.0.0", "yargonaut": "1.1.4", @@ -551,6 +551,7 @@ "@mikro-orm/entity-generator": "^5.0.0", "@mikro-orm/mariadb": "^5.0.0", "@mikro-orm/migrations": "^5.0.0", + "@mikro-orm/migrations-mongodb": "^5.0.0", "@mikro-orm/mongodb": "^5.0.0", "@mikro-orm/mysql": "^5.0.0", "@mikro-orm/postgresql": "^5.0.0", @@ -570,6 +571,9 @@ "@mikro-orm/migrations": { "optional": true }, + "@mikro-orm/migrations-mongodb": { + "optional": true + }, "@mikro-orm/mongodb": { "optional": true }, @@ -588,15 +592,15 @@ } }, "node_modules/@mikro-orm/core": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.2.1.tgz", - "integrity": "sha512-p6+fdltIP8DfGSnxWO8yE5c71VsDxogSrk9BAlfry+4KQKQLWEiogJ+zuVCGVTB1xozczNCgRIA8ZYAjHnnBPg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.3.1.tgz", + "integrity": "sha512-4VcqQjOCLDKUb953HJkWWnhyDP0RAq9tHQ7u35iWSsh4qK10SbkcaYVPqHpE5KIPnOV2URulR5v2ZQlkAqbMgA==", "dependencies": { "dotenv": "16.0.1", "escaya": "0.0.61", "fs-extra": "10.1.0", "globby": "11.0.4", - "mikro-orm": "^5.2.0", + "mikro-orm": "^5.3.1", "reflect-metadata": "0.1.13" }, "engines": { @@ -607,6 +611,7 @@ "@mikro-orm/entity-generator": "^5.0.0", "@mikro-orm/mariadb": "^5.0.0", "@mikro-orm/migrations": "^5.0.0", + "@mikro-orm/migrations-mongodb": "^5.0.0", "@mikro-orm/mongodb": "^5.0.0", "@mikro-orm/mysql": "^5.0.0", "@mikro-orm/postgresql": "^5.0.0", @@ -626,6 +631,9 @@ "@mikro-orm/migrations": { "optional": true }, + "@mikro-orm/migrations-mongodb": { + "optional": true + }, "@mikro-orm/mongodb": { "optional": true }, @@ -693,61 +701,6 @@ } } }, - "node_modules/@mikro-orm/knex/node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" - }, - "node_modules/@mikro-orm/knex/node_modules/knex": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/knex/-/knex-2.2.0.tgz", - "integrity": "sha512-yhm1Qe9Ok0TeXBq3nNHqZYJPrQ4Iw2tq9k/HxjrZ/EWec2ifOjJlkNHr26v8cQrWtk5iG3iwfUazTIWy+VKG5g==", - "dependencies": { - "colorette": "2.0.19", - "commander": "^9.1.0", - "debug": "4.3.4", - "escalade": "^3.1.1", - "esm": "^3.2.25", - "get-package-type": "^0.1.0", - "getopts": "2.3.0", - "interpret": "^2.2.0", - "lodash": "^4.17.21", - "pg-connection-string": "2.5.0", - "rechoir": "^0.8.0", - "resolve-from": "^5.0.0", - "tarn": "^3.0.2", - "tildify": "2.0.0" - }, - "bin": { - "knex": "bin/cli.js" - }, - "engines": { - "node": ">=12" - }, - "peerDependenciesMeta": { - "better-sqlite3": { - "optional": true - }, - "mysql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "tedious": { - "optional": true - } - } - }, "node_modules/@mikro-orm/mariadb": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@mikro-orm/mariadb/-/mariadb-5.3.1.tgz", @@ -778,13 +731,13 @@ } }, "node_modules/@mikro-orm/migrations": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/migrations/-/migrations-5.2.1.tgz", - "integrity": "sha512-jkGQ6IjwA0JZ7+ksC35XpeHQJ7G7nd8uWUAozxh/s/BgHjJQMnh3j+Jxkt/VpdlnrlXAGi+JOOOlmC48O3yQVg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/migrations/-/migrations-5.3.1.tgz", + "integrity": "sha512-FuPwlCbAaOH6t/cwnk9gc8tJi8IjgMM3huWu/cEn1P6yfVPNDBKRA9eagmtH+7+/8CEesyzcGIcxeDjMAXz7PA==", "dependencies": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "fs-extra": "10.1.0", - "knex": "2.1.0", + "knex": "2.2.0", "umzug": "3.1.1" }, "engines": { @@ -828,11 +781,11 @@ } }, "node_modules/@mikro-orm/mysql": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/mysql/-/mysql-5.2.1.tgz", - "integrity": "sha512-Dni7uSJPjd+zV72HMHSPShf03No3eIP0+to1ff+9fuRR5vOejRcU7nXIOrSWwt/Rk4mAZqCdO+gdMc8qGRJrKQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/mysql/-/mysql-5.3.1.tgz", + "integrity": "sha512-q44GSCBiSOEOYCyzU017fBrwTBor3HKM+0BwKikJ2mPq8e+TE6RyWCatjz0XMFgLP03jcEHuC8SkaAB8ZA3TCQ==", "dependencies": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "mysql2": "2.3.3" }, "engines": { @@ -857,11 +810,11 @@ } }, "node_modules/@mikro-orm/postgresql": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/postgresql/-/postgresql-5.2.1.tgz", - "integrity": "sha512-D9TpuqKYuJWTEd1E7JLAN8tfj9Pg9ZHJCSTT+ozLYLmMIWPBjwPxyk5C6tsXR8sWawe3h9RSZ1falcVkV11Wkg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/postgresql/-/postgresql-5.3.1.tgz", + "integrity": "sha512-RFdL5YFk+ZLXqViacMsVqI4ri9w8GI3YVqs4eKr2ZrOoYd/De+9V9WkzWmTfP1kVXnWL843w4LudjKnxdOGN9g==", "dependencies": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "pg": "8.7.3" }, "engines": { @@ -897,13 +850,13 @@ } }, "node_modules/@mikro-orm/sqlite": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.2.1.tgz", - "integrity": "sha512-2IZt51Eyshf7d94L4boYcbeHZ8Yqz6iQ03rD9wqab4MVvtn8Lk2X2339vuqW2oy3+x4yNCI4ytkWbFJI4YMvgw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.3.1.tgz", + "integrity": "sha512-US8hyKpK++tMdycxbkDgfpb3SfqKDfrUHw93XyEKkaX5a0U/iAmpaG2qxavJ/nwoPa9d3+R9GuDYaEbf2IF+mg==", "dependencies": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "fs-extra": "10.1.0", - "sqlite3": "5.0.8", + "sqlite3": "5.0.11", "sqlstring-sqlite": "0.1.1" }, "engines": { @@ -2720,9 +2673,9 @@ } }, "node_modules/colorette": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", - "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==" + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" }, "node_modules/combined-stream": { "version": "1.0.8", @@ -5656,11 +5609,11 @@ } }, "node_modules/knex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/knex/-/knex-2.1.0.tgz", - "integrity": "sha512-vVsnD6UJdSJy55TvCXfFF9syfwyXNxfE9mvr2hJL/4Obciy2EPGoqjDpgRSlMruHuPWDOeYAG25nyrGvU+jJog==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/knex/-/knex-2.2.0.tgz", + "integrity": "sha512-yhm1Qe9Ok0TeXBq3nNHqZYJPrQ4Iw2tq9k/HxjrZ/EWec2ifOjJlkNHr26v8cQrWtk5iG3iwfUazTIWy+VKG5g==", "dependencies": { - "colorette": "2.0.16", + "colorette": "2.0.19", "commander": "^9.1.0", "debug": "4.3.4", "escalade": "^3.1.1", @@ -6100,9 +6053,9 @@ } }, "node_modules/mikro-orm": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.2.0.tgz", - "integrity": "sha512-t6up4g6PHN2Davm9djB3yGzdhgUGiPsX1JM6pFx7U3Qei1pFcmZtmZa65jthQOpTsMIFTXPSn8isp1NNemwm6w==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.3.1.tgz", + "integrity": "sha512-t3fkvzzVV4LMjnENJ8Fl/ASpWUdP0rJ7iHz+41H+cWAUwwy0hkLGuk4kJkSZwlGjAbQvrGtAT1OVujqNctxJrg==", "engines": { "node": ">= 14.0.0" } @@ -9178,9 +9131,9 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/sqlite3": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.8.tgz", - "integrity": "sha512-f2ACsbSyb2D1qFFcqIXPfFscLtPVOWJr5GmUzYxf4W+0qelu5MWrR+FAQE1d5IUArEltBrzSDxDORG8P/IkqyQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.11.tgz", + "integrity": "sha512-4akFOr7u9lJEeAWLJxmwiV43DJcGV7w3ab7SjQFAFaTVyknY3rZjvXTKIVtWqUoY4xwhjwoHKYs2HDW2SoHVsA==", "hasInstallScript": true, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.0", @@ -10965,12 +10918,12 @@ } }, "@mikro-orm/cli": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.2.1.tgz", - "integrity": "sha512-D3RS9IXXAkwMMGqa1E/xXJnCbI6AhjEkz7nRylYuyN6TVngHjW6fkcKTy25a6GGGvx2Z2CNEAtF7VId3P1gbeg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.3.1.tgz", + "integrity": "sha512-ULZYZ+jdKlTCi295n6VS+EQo6eSGItiQ73CH3TO81ZhUdGFal97rPV8pfVxQMyMX/bbLiOEHlxnUI0Mrnz3ZQQ==", "requires": { - "@mikro-orm/core": "^5.2.1", - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/core": "^5.3.1", + "@mikro-orm/knex": "^5.3.1", "fs-extra": "10.1.0", "tsconfig-paths": "4.0.0", "yargonaut": "1.1.4", @@ -10978,15 +10931,15 @@ } }, "@mikro-orm/core": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.2.1.tgz", - "integrity": "sha512-p6+fdltIP8DfGSnxWO8yE5c71VsDxogSrk9BAlfry+4KQKQLWEiogJ+zuVCGVTB1xozczNCgRIA8ZYAjHnnBPg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.3.1.tgz", + "integrity": "sha512-4VcqQjOCLDKUb953HJkWWnhyDP0RAq9tHQ7u35iWSsh4qK10SbkcaYVPqHpE5KIPnOV2URulR5v2ZQlkAqbMgA==", "requires": { "dotenv": "16.0.1", "escaya": "0.0.61", "fs-extra": "10.1.0", "globby": "11.0.4", - "mikro-orm": "^5.2.0", + "mikro-orm": "^5.3.1", "reflect-metadata": "0.1.13" } }, @@ -10998,34 +10951,6 @@ "fs-extra": "10.1.0", "knex": "2.2.0", "sqlstring": "2.3.3" - }, - "dependencies": { - "colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" - }, - "knex": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/knex/-/knex-2.2.0.tgz", - "integrity": "sha512-yhm1Qe9Ok0TeXBq3nNHqZYJPrQ4Iw2tq9k/HxjrZ/EWec2ifOjJlkNHr26v8cQrWtk5iG3iwfUazTIWy+VKG5g==", - "requires": { - "colorette": "2.0.19", - "commander": "^9.1.0", - "debug": "4.3.4", - "escalade": "^3.1.1", - "esm": "^3.2.25", - "get-package-type": "^0.1.0", - "getopts": "2.3.0", - "interpret": "^2.2.0", - "lodash": "^4.17.21", - "pg-connection-string": "2.5.0", - "rechoir": "^0.8.0", - "resolve-from": "^5.0.0", - "tarn": "^3.0.2", - "tildify": "2.0.0" - } - } } }, "@mikro-orm/mariadb": { @@ -11038,13 +10963,13 @@ } }, "@mikro-orm/migrations": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/migrations/-/migrations-5.2.1.tgz", - "integrity": "sha512-jkGQ6IjwA0JZ7+ksC35XpeHQJ7G7nd8uWUAozxh/s/BgHjJQMnh3j+Jxkt/VpdlnrlXAGi+JOOOlmC48O3yQVg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/migrations/-/migrations-5.3.1.tgz", + "integrity": "sha512-FuPwlCbAaOH6t/cwnk9gc8tJi8IjgMM3huWu/cEn1P6yfVPNDBKRA9eagmtH+7+/8CEesyzcGIcxeDjMAXz7PA==", "requires": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "fs-extra": "10.1.0", - "knex": "2.1.0", + "knex": "2.2.0", "umzug": "3.1.1" } }, @@ -11058,20 +10983,20 @@ } }, "@mikro-orm/mysql": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/mysql/-/mysql-5.2.1.tgz", - "integrity": "sha512-Dni7uSJPjd+zV72HMHSPShf03No3eIP0+to1ff+9fuRR5vOejRcU7nXIOrSWwt/Rk4mAZqCdO+gdMc8qGRJrKQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/mysql/-/mysql-5.3.1.tgz", + "integrity": "sha512-q44GSCBiSOEOYCyzU017fBrwTBor3HKM+0BwKikJ2mPq8e+TE6RyWCatjz0XMFgLP03jcEHuC8SkaAB8ZA3TCQ==", "requires": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "mysql2": "2.3.3" } }, "@mikro-orm/postgresql": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/postgresql/-/postgresql-5.2.1.tgz", - "integrity": "sha512-D9TpuqKYuJWTEd1E7JLAN8tfj9Pg9ZHJCSTT+ozLYLmMIWPBjwPxyk5C6tsXR8sWawe3h9RSZ1falcVkV11Wkg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/postgresql/-/postgresql-5.3.1.tgz", + "integrity": "sha512-RFdL5YFk+ZLXqViacMsVqI4ri9w8GI3YVqs4eKr2ZrOoYd/De+9V9WkzWmTfP1kVXnWL843w4LudjKnxdOGN9g==", "requires": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "pg": "8.7.3" } }, @@ -11084,13 +11009,13 @@ } }, "@mikro-orm/sqlite": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.2.1.tgz", - "integrity": "sha512-2IZt51Eyshf7d94L4boYcbeHZ8Yqz6iQ03rD9wqab4MVvtn8Lk2X2339vuqW2oy3+x4yNCI4ytkWbFJI4YMvgw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.3.1.tgz", + "integrity": "sha512-US8hyKpK++tMdycxbkDgfpb3SfqKDfrUHw93XyEKkaX5a0U/iAmpaG2qxavJ/nwoPa9d3+R9GuDYaEbf2IF+mg==", "requires": { - "@mikro-orm/knex": "^5.2.1", + "@mikro-orm/knex": "^5.3.1", "fs-extra": "10.1.0", - "sqlite3": "5.0.8", + "sqlite3": "5.0.11", "sqlstring-sqlite": "0.1.1" } }, @@ -12498,9 +12423,9 @@ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" }, "colorette": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", - "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==" + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" }, "combined-stream": { "version": "1.0.8", @@ -14749,11 +14674,11 @@ "dev": true }, "knex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/knex/-/knex-2.1.0.tgz", - "integrity": "sha512-vVsnD6UJdSJy55TvCXfFF9syfwyXNxfE9mvr2hJL/4Obciy2EPGoqjDpgRSlMruHuPWDOeYAG25nyrGvU+jJog==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/knex/-/knex-2.2.0.tgz", + "integrity": "sha512-yhm1Qe9Ok0TeXBq3nNHqZYJPrQ4Iw2tq9k/HxjrZ/EWec2ifOjJlkNHr26v8cQrWtk5iG3iwfUazTIWy+VKG5g==", "requires": { - "colorette": "2.0.16", + "colorette": "2.0.19", "commander": "^9.1.0", "debug": "4.3.4", "escalade": "^3.1.1", @@ -15089,9 +15014,9 @@ } }, "mikro-orm": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.2.0.tgz", - "integrity": "sha512-t6up4g6PHN2Davm9djB3yGzdhgUGiPsX1JM6pFx7U3Qei1pFcmZtmZa65jthQOpTsMIFTXPSn8isp1NNemwm6w==" + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.3.1.tgz", + "integrity": "sha512-t3fkvzzVV4LMjnENJ8Fl/ASpWUdP0rJ7iHz+41H+cWAUwwy0hkLGuk4kJkSZwlGjAbQvrGtAT1OVujqNctxJrg==" }, "mime-db": { "version": "1.52.0", @@ -17424,9 +17349,9 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "sqlite3": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.8.tgz", - "integrity": "sha512-f2ACsbSyb2D1qFFcqIXPfFscLtPVOWJr5GmUzYxf4W+0qelu5MWrR+FAQE1d5IUArEltBrzSDxDORG8P/IkqyQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.11.tgz", + "integrity": "sha512-4akFOr7u9lJEeAWLJxmwiV43DJcGV7w3ab7SjQFAFaTVyknY3rZjvXTKIVtWqUoY4xwhjwoHKYs2HDW2SoHVsA==", "requires": { "@mapbox/node-pre-gyp": "^1.0.0", "node-addon-api": "^4.2.0", diff --git a/package.json b/package.json index 864c0bd0..e8a28b87 100644 --- a/package.json +++ b/package.json @@ -29,15 +29,15 @@ "@discordx/utilities": "^5.0.0", "@koa/router": "^10.1.1", "@mikro-orm/better-sqlite": "^5.3.1", - "@mikro-orm/cli": "^5.1.4", - "@mikro-orm/core": "^5.1.4", + "@mikro-orm/cli": "^5.3.1", + "@mikro-orm/core": "^5.3.1", "@mikro-orm/mariadb": "^5.3.1", - "@mikro-orm/migrations": "^5.1.4", + "@mikro-orm/migrations": "^5.3.1", "@mikro-orm/mongodb": "^5.3.1", - "@mikro-orm/mysql": "^5.2.1", - "@mikro-orm/postgresql": "^5.2.1", + "@mikro-orm/mysql": "^5.3.1", + "@mikro-orm/postgresql": "^5.3.1", "@mikro-orm/sql-highlighter": "^1.0.1", - "@mikro-orm/sqlite": "^5.1.4", + "@mikro-orm/sqlite": "^5.3.1", "axios": "^0.27.2", "boxen": "^5.1.2", "case": "^1.6.3", diff --git a/src/config/database.ts b/src/config/database.ts index 927b2520..9e1300a7 100644 --- a/src/config/database.ts +++ b/src/config/database.ts @@ -13,7 +13,7 @@ export const databaseConfig: DatabaseConfigType = { } } -export const databaseType = 'sqlite' as const // 'sqlite' | 'postgres' | 'mysql' | 'mariadb' | 'mongo' +export const databaseType = 'better-sqlite' as const // 'better-sqlite' | 'sqlite' | 'postgres' | 'mysql' | 'mariadb' | 'mongo' const envMikroORMConfig: { production: Options, development?: Options } = { @@ -78,6 +78,6 @@ const envMikroORMConfig: { production: Options, development?: Options } = { } } -if (!envMikroORMConfig['development'] || envMikroORMConfig['development'] === {}) envMikroORMConfig['development'] = envMikroORMConfig['production'] +if (!envMikroORMConfig['development'] || Object.keys(envMikroORMConfig['development']).length === 0) envMikroORMConfig['development'] = envMikroORMConfig['production'] export const mikroORMConfig = envMikroORMConfig \ No newline at end of file