diff --git a/.npmrc b/.npmrc index 5d4f6f6..497dd9a 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ +only-built-dependencies[]=better-sqlite3 only-built-dependencies[]=esbuild only-built-dependencies[]=@nestjs/core only-built-dependencies[]=unrs-resolver \ No newline at end of file diff --git a/package.json b/package.json index a423e81..899d568 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,10 @@ "@nestjs/passport": "^11.0.5", "@nestjs/platform-express": "^11.1.13", "@nestjs/serve-static": "^5.0.4", - "@prisma/adapter-libsql": "^7.3.0", + "@prisma/adapter-better-sqlite3": "^7.3.0", "@prisma/client": "^7.3.0", "bcryptjs": "^3.0.3", + "better-sqlite3": "^12.6.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.3", "dotenv": "^17.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b3f144..94d2c29 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,7 +29,7 @@ importers: '@nestjs/serve-static': specifier: ^5.0.4 version: 5.0.4(@nestjs/common@11.1.13(class-transformer@0.5.1)(class-validator@0.14.3)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.13)(express@5.2.1) - '@prisma/adapter-libsql': + '@prisma/adapter-better-sqlite3': specifier: ^7.3.0 version: 7.3.0 '@prisma/client': @@ -38,6 +38,9 @@ importers: bcryptjs: specifier: ^3.0.3 version: 3.0.3 + better-sqlite3: + specifier: ^12.6.2 + version: 12.6.2 class-transformer: specifier: ^0.5.1 version: 0.5.1 @@ -803,57 +806,6 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@libsql/client@0.8.1': - resolution: {integrity: sha512-xGg0F4iTDFpeBZ0r4pA6icGsYa5rG6RAG+i/iLDnpCAnSuTqEWMDdPlVseiq4Z/91lWI9jvvKKiKpovqJ1kZWA==} - - '@libsql/core@0.8.1': - resolution: {integrity: sha512-u6nrj6HZMTPsgJ9EBhLzO2uhqhlHQJQmVHV+0yFLvfGf3oSP8w7TjZCNUgu1G8jHISx6KFi7bmcrdXW9lRt++A==} - - '@libsql/darwin-arm64@0.3.19': - resolution: {integrity: sha512-rmOqsLcDI65zzxlUOoEiPJLhqmbFsZF6p4UJQ2kMqB+Kc0Rt5/A1OAdOZ/Wo8fQfJWjR1IbkbpEINFioyKf+nQ==} - cpu: [arm64] - os: [darwin] - - '@libsql/darwin-x64@0.3.19': - resolution: {integrity: sha512-q9O55B646zU+644SMmOQL3FIfpmEvdWpRpzubwFc2trsa+zoBlSkHuzU9v/C+UNoPHQVRMP7KQctJ455I/h/xw==} - cpu: [x64] - os: [darwin] - - '@libsql/hrana-client@0.6.2': - resolution: {integrity: sha512-MWxgD7mXLNf9FXXiM0bc90wCjZSpErWKr5mGza7ERy2FJNNMXd7JIOv+DepBA1FQTIfI8TFO4/QDYgaQC0goNw==} - - '@libsql/isomorphic-fetch@0.2.5': - resolution: {integrity: sha512-8s/B2TClEHms2yb+JGpsVRTPBfy1ih/Pq6h6gvyaNcYnMVJvgQRY7wAa8U2nD0dppbCuDU5evTNMEhrQ17ZKKg==} - engines: {node: '>=18.0.0'} - - '@libsql/isomorphic-ws@0.1.5': - resolution: {integrity: sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg==} - - '@libsql/linux-arm64-gnu@0.3.19': - resolution: {integrity: sha512-mgeAUU1oqqh57k7I3cQyU6Trpdsdt607eFyEmH5QO7dv303ti+LjUvh1pp21QWV6WX7wZyjeJV1/VzEImB+jRg==} - cpu: [arm64] - os: [linux] - - '@libsql/linux-arm64-musl@0.3.19': - resolution: {integrity: sha512-VEZtxghyK6zwGzU9PHohvNxthruSxBEnRrX7BSL5jQ62tN4n2JNepJ6SdzXp70pdzTfwroOj/eMwiPt94gkVRg==} - cpu: [arm64] - os: [linux] - - '@libsql/linux-x64-gnu@0.3.19': - resolution: {integrity: sha512-2t/J7LD5w2f63wGihEO+0GxfTyYIyLGEvTFEsMO16XI5o7IS9vcSHrxsvAJs4w2Pf907uDjmc7fUfMg6L82BrQ==} - cpu: [x64] - os: [linux] - - '@libsql/linux-x64-musl@0.3.19': - resolution: {integrity: sha512-BLsXyJaL8gZD8+3W2LU08lDEd9MIgGds0yPy5iNPp8tfhXx3pV/Fge2GErN0FC+nzt4DYQtjL+A9GUMglQefXQ==} - cpu: [x64] - os: [linux] - - '@libsql/win32-x64-msvc@0.3.19': - resolution: {integrity: sha512-ay1X9AobE4BpzG0XPw1gplyLZPGHIgJOovvW23gUrukRegiUP62uzhpRbKNogLlUOynyXeq//prHgPXiebUfWg==} - cpu: [x64] - os: [win32] - '@lukeed/csprng@1.1.0': resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} engines: {node: '>=8'} @@ -865,9 +817,6 @@ packages: '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@neon-rs/load@0.0.4': - resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==} - '@nestjs/cli@11.0.16': resolution: {integrity: sha512-P0H+Vcjki6P5160E5QnMt3Q0X5FTg4PZkP99Ig4lm/4JWqfw32j3EXv3YBTJ2DmxLwOQ/IS9F7dzKpMAgzKTGg==} engines: {node: '>= 20.11'} @@ -989,8 +938,8 @@ packages: resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@prisma/adapter-libsql@7.3.0': - resolution: {integrity: sha512-PKsnG/fmwP/lOuO7kb+oZDbGtmfGFxEiE0OXU9lk4V117H8fQ7Wy6qzFtGmojWEgSQIRN/4+XwhRe+KvY/beZw==} + '@prisma/adapter-better-sqlite3@7.3.0': + resolution: {integrity: sha512-DkELPte3cHGCZI1isizw+IdQHFVMU5zASJ/deeBY4R2apQV0RCA8XDG54iGmMhwLMusGTYijDVYuB1ruxEy0KQ==} '@prisma/client-runtime-utils@7.3.0': resolution: {integrity: sha512-dG/ceD9c+tnXATPk8G+USxxYM9E6UdMTnQeQ+1SZUDxTz7SgQcfxEqafqIQHcjdlcNK/pvmmLfSwAs3s2gYwUw==} @@ -1186,9 +1135,6 @@ packages: '@types/validator@13.15.10': resolution: {integrity: sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==} - '@types/ws@8.18.1': - resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} - '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -1449,9 +1395,6 @@ packages: asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - async-mutex@0.5.0: - resolution: {integrity: sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA==} - asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -1747,10 +1690,6 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} - data-uri-to-buffer@4.0.1: - resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} - engines: {node: '>= 12'} - debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -1996,10 +1935,6 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - fetch-blob@3.2.0: - resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} - engines: {node: ^12.20 || >= 14.13} - file-type@21.3.0: resolution: {integrity: sha512-8kPJMIGz1Yt/aPEwOsrR97ZyZaD1Iqm8PClb1nYFclUCkBi0Ma5IsYNQzvSFS9ib51lWyIw5mIT9rWzI/xjpzA==} engines: {node: '>=20'} @@ -2034,10 +1969,6 @@ packages: resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} engines: {node: '>= 6'} - formdata-polyfill@4.0.10: - resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} - engines: {node: '>=12.20.0'} - formidable@3.5.4: resolution: {integrity: sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==} engines: {node: '>=14.0.0'} @@ -2412,9 +2343,6 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true - js-base64@3.7.8: - resolution: {integrity: sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2468,11 +2396,6 @@ packages: libphonenumber-js@1.12.36: resolution: {integrity: sha512-woWhKMAVx1fzzUnMCyOzglgSgf6/AFHLASdOBcchYCyvWSGWt12imw3iu2hdI5d4dGZRsNWAmWiz37sDKUPaRQ==} - libsql@0.3.19: - resolution: {integrity: sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA==} - cpu: [x64, arm64, wasm32] - os: [darwin, linux, win32] - lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -2685,21 +2608,12 @@ packages: node-abort-controller@3.1.1: resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} - node-domexception@1.0.0: - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} - engines: {node: '>=10.5.0'} - deprecated: Use your platform's native DOMException instead - node-emoji@1.11.0: resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} node-fetch-native@1.6.7: resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} - node-fetch@3.3.2: - resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} @@ -2888,9 +2802,6 @@ packages: typescript: optional: true - promise-limit@2.7.0: - resolution: {integrity: sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==} - proper-lockfile@4.1.2: resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} @@ -3435,10 +3346,6 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - web-streams-polyfill@3.3.3: - resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} - engines: {node: '>= 8'} - webpack-node-externals@3.0.0: resolution: {integrity: sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==} engines: {node: '>=6'} @@ -3487,18 +3394,6 @@ packages: resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - ws@8.19.0: - resolution: {integrity: sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -4294,62 +4189,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@libsql/client@0.8.1': - dependencies: - '@libsql/core': 0.8.1 - '@libsql/hrana-client': 0.6.2 - js-base64: 3.7.8 - libsql: 0.3.19 - promise-limit: 2.7.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@libsql/core@0.8.1': - dependencies: - js-base64: 3.7.8 - - '@libsql/darwin-arm64@0.3.19': - optional: true - - '@libsql/darwin-x64@0.3.19': - optional: true - - '@libsql/hrana-client@0.6.2': - dependencies: - '@libsql/isomorphic-fetch': 0.2.5 - '@libsql/isomorphic-ws': 0.1.5 - js-base64: 3.7.8 - node-fetch: 3.3.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@libsql/isomorphic-fetch@0.2.5': {} - - '@libsql/isomorphic-ws@0.1.5': - dependencies: - '@types/ws': 8.18.1 - ws: 8.19.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@libsql/linux-arm64-gnu@0.3.19': - optional: true - - '@libsql/linux-arm64-musl@0.3.19': - optional: true - - '@libsql/linux-x64-gnu@0.3.19': - optional: true - - '@libsql/linux-x64-musl@0.3.19': - optional: true - - '@libsql/win32-x64-msvc@0.3.19': - optional: true - '@lukeed/csprng@1.1.0': {} '@mrleebo/prisma-ast@0.13.1': @@ -4364,8 +4203,6 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true - '@neon-rs/load@0.0.4': {} - '@nestjs/cli@11.0.16(@types/node@25.2.1)': dependencies: '@angular-devkit/core': 19.2.19(chokidar@4.0.3) @@ -4494,14 +4331,10 @@ snapshots: '@pkgr/core@0.2.9': {} - '@prisma/adapter-libsql@7.3.0': + '@prisma/adapter-better-sqlite3@7.3.0': dependencies: - '@libsql/client': 0.8.1 '@prisma/driver-adapter-utils': 7.3.0 - async-mutex: 0.5.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate + better-sqlite3: 12.6.2 '@prisma/client-runtime-utils@7.3.0': {} @@ -4756,10 +4589,6 @@ snapshots: '@types/validator@13.15.10': {} - '@types/ws@8.18.1': - dependencies: - '@types/node': 25.2.1 - '@types/yargs-parser@21.0.3': {} '@types/yargs@17.0.35': @@ -4992,10 +4821,6 @@ snapshots: asap@2.0.6: {} - async-mutex@0.5.0: - dependencies: - tslib: 2.8.1 - asynckit@0.4.0: {} aws-ssl-profiles@1.1.2: {} @@ -5064,12 +4889,10 @@ snapshots: dependencies: bindings: 1.5.0 prebuild-install: 7.1.3 - optional: true bindings@1.5.0: dependencies: file-uri-to-path: 1.0.0 - optional: true bl@4.1.0: dependencies: @@ -5190,8 +5013,7 @@ snapshots: dependencies: readdirp: 4.1.2 - chownr@1.1.4: - optional: true + chownr@1.1.4: {} chrome-trace-event@1.0.4: {} @@ -5318,8 +5140,6 @@ snapshots: csstype@3.2.3: {} - data-uri-to-buffer@4.0.1: {} - debug@4.4.3: dependencies: ms: 2.1.3 @@ -5329,12 +5149,10 @@ snapshots: decompress-response@6.0.0: dependencies: mimic-response: 3.1.0 - optional: true dedent@1.7.1: {} - deep-extend@0.6.0: - optional: true + deep-extend@0.6.0: {} deepmerge-ts@7.1.5: {} @@ -5411,7 +5229,6 @@ snapshots: end-of-stream@1.4.5: dependencies: once: 1.4.0 - optional: true enhanced-resolve@5.19.0: dependencies: @@ -5507,8 +5324,7 @@ snapshots: exit-x@0.2.2: {} - expand-template@2.0.3: - optional: true + expand-template@2.0.3: {} expect@30.2.0: dependencies: @@ -5570,11 +5386,6 @@ snapshots: dependencies: bser: 2.1.1 - fetch-blob@3.2.0: - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 3.3.3 - file-type@21.3.0: dependencies: '@tokenizer/inflate': 0.4.1 @@ -5584,8 +5395,7 @@ snapshots: transitivePeerDependencies: - supports-color - file-uri-to-path@1.0.0: - optional: true + file-uri-to-path@1.0.0: {} fill-range@7.1.1: dependencies: @@ -5637,10 +5447,6 @@ snapshots: hasown: 2.0.2 mime-types: 2.1.35 - formdata-polyfill@4.0.10: - dependencies: - fetch-blob: 3.2.0 - formidable@3.5.4: dependencies: '@paralleldrive/cuid2': 2.3.1 @@ -5651,8 +5457,7 @@ snapshots: fresh@2.0.0: {} - fs-constants@1.0.0: - optional: true + fs-constants@1.0.0: {} fs-extra@10.1.0: dependencies: @@ -5714,8 +5519,7 @@ snapshots: nypm: 0.6.5 pathe: 2.0.3 - github-from-package@0.0.0: - optional: true + github-from-package@0.0.0: {} glob-to-regexp@0.4.1: {} @@ -5813,8 +5617,7 @@ snapshots: inherits@2.0.4: {} - ini@1.3.8: - optional: true + ini@1.3.8: {} ipaddr.js@1.9.1: {} @@ -6197,8 +6000,6 @@ snapshots: jiti@2.6.1: {} - js-base64@3.7.8: {} - js-tokens@4.0.0: {} js-yaml@3.14.2: @@ -6256,19 +6057,6 @@ snapshots: libphonenumber-js@1.12.36: {} - libsql@0.3.19: - dependencies: - '@neon-rs/load': 0.0.4 - detect-libc: 2.0.2 - optionalDependencies: - '@libsql/darwin-arm64': 0.3.19 - '@libsql/darwin-x64': 0.3.19 - '@libsql/linux-arm64-gnu': 0.3.19 - '@libsql/linux-arm64-musl': 0.3.19 - '@libsql/linux-x64-gnu': 0.3.19 - '@libsql/linux-x64-musl': 0.3.19 - '@libsql/win32-x64-msvc': 0.3.19 - lilconfig@2.1.0: {} lines-and-columns@1.2.4: {} @@ -6369,8 +6157,7 @@ snapshots: mimic-fn@2.1.0: {} - mimic-response@3.1.0: - optional: true + mimic-response@3.1.0: {} minimatch@10.1.2: dependencies: @@ -6388,8 +6175,7 @@ snapshots: minipass@7.1.2: {} - mkdirp-classic@0.5.3: - optional: true + mkdirp-classic@0.5.3: {} mkdirp@0.5.6: dependencies: @@ -6425,8 +6211,7 @@ snapshots: dependencies: lru.min: 1.1.4 - napi-build-utils@2.0.0: - optional: true + napi-build-utils@2.0.0: {} napi-postinstall@0.3.4: {} @@ -6439,24 +6224,15 @@ snapshots: node-abi@3.87.0: dependencies: semver: 7.7.4 - optional: true node-abort-controller@3.1.1: {} - node-domexception@1.0.0: {} - node-emoji@1.11.0: dependencies: lodash: 4.17.23 node-fetch-native@1.6.7: {} - node-fetch@3.3.2: - dependencies: - data-uri-to-buffer: 4.0.1 - fetch-blob: 3.2.0 - formdata-polyfill: 4.0.10 - node-int64@0.4.0: {} node-releases@2.0.27: {} @@ -6611,7 +6387,6 @@ snapshots: simple-get: 4.0.1 tar-fs: 2.1.4 tunnel-agent: 0.6.0 - optional: true prettier@3.8.1: {} @@ -6638,8 +6413,6 @@ snapshots: - react - react-dom - promise-limit@2.7.0: {} - proper-lockfile@4.1.2: dependencies: graceful-fs: 4.2.11 @@ -6655,7 +6428,6 @@ snapshots: dependencies: end-of-stream: 1.4.5 once: 1.4.0 - optional: true punycode@2.3.1: {} @@ -6697,7 +6469,6 @@ snapshots: ini: 1.3.8 minimist: 1.2.8 strip-json-comments: 2.0.1 - optional: true react-dom@19.2.4(react@19.2.4): dependencies: @@ -6859,15 +6630,13 @@ snapshots: signal-exit@4.1.0: {} - simple-concat@1.0.1: - optional: true + simple-concat@1.0.1: {} simple-get@4.0.1: dependencies: decompress-response: 6.0.0 once: 1.4.0 simple-concat: 1.0.1 - optional: true slash@3.0.0: {} @@ -6936,8 +6705,7 @@ snapshots: strip-final-newline@2.0.0: {} - strip-json-comments@2.0.1: - optional: true + strip-json-comments@2.0.1: {} strip-json-comments@3.1.1: {} @@ -6989,7 +6757,6 @@ snapshots: mkdirp-classic: 0.5.3 pump: 3.0.3 tar-stream: 2.2.0 - optional: true tar-stream@2.2.0: dependencies: @@ -6998,7 +6765,6 @@ snapshots: fs-constants: 1.0.0 inherits: 2.0.4 readable-stream: 3.6.2 - optional: true terser-webpack-plugin@5.3.16(webpack@5.104.1): dependencies: @@ -7111,7 +6877,6 @@ snapshots: tunnel-agent@0.6.0: dependencies: safe-buffer: 5.2.1 - optional: true type-detect@4.0.8: {} @@ -7216,8 +6981,6 @@ snapshots: dependencies: defaults: 1.0.4 - web-streams-polyfill@3.3.3: {} - webpack-node-externals@3.0.0: {} webpack-sources@3.3.3: {} @@ -7287,8 +7050,6 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 4.1.0 - ws@8.19.0: {} - xtend@4.0.2: {} y18n@4.0.3: {} diff --git a/scripts/init-db.ts b/scripts/init-db.ts index 23a61a3..af8b7a8 100644 --- a/scripts/init-db.ts +++ b/scripts/init-db.ts @@ -1,12 +1,14 @@ import { PrismaClient } from "@prisma/client"; import bcrypt from "bcryptjs"; import path from "path"; -import { PrismaLibSql } from "@prisma/adapter-libsql"; +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; -const adapter = new PrismaLibSql({ - url: - process.env.DATABASE_URL || - "file:" + path.join(process.cwd(), "data/database.sqlite"), +const url = + process.env.DATABASE_URL || + "file:" + path.join(process.cwd(), "data/database.sqlite"); + +const adapter = new PrismaBetterSqlite3({ + url, }); const prisma = new PrismaClient({ diff --git a/src/database/database.service.ts b/src/database/database.service.ts index 5a41823..a79541e 100644 --- a/src/database/database.service.ts +++ b/src/database/database.service.ts @@ -1,17 +1,19 @@ import { Injectable, OnModuleInit, OnModuleDestroy } from "@nestjs/common"; import { PrismaClient } from "@prisma/client"; import path from "path"; -import { PrismaLibSql } from "@prisma/adapter-libsql"; +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; @Injectable() export class DatabaseService implements OnModuleInit, OnModuleDestroy { private prisma: PrismaClient; constructor() { - const adapter = new PrismaLibSql({ - url: - process.env.DATABASE_URL || - "file:" + path.join(process.cwd(), "data/database.sqlite"), + const url = + process.env.DATABASE_URL || + "file:" + path.join(process.cwd(), "data/database.sqlite"); + + const adapter = new PrismaBetterSqlite3({ + url, }); this.prisma = new PrismaClient({