Remove better-sqlite3
This commit is contained in:
Generated
-12
@@ -19,7 +19,6 @@
|
|||||||
"@xo-cash/templates": "^0.0.4",
|
"@xo-cash/templates": "^0.0.4",
|
||||||
"@xo-cash/types": "^0.0.5",
|
"@xo-cash/types": "^0.0.5",
|
||||||
"@xo-cash/utils": "^0.0.6-cli.20260907041319224",
|
"@xo-cash/utils": "^0.0.6-cli.20260907041319224",
|
||||||
"better-sqlite3": "^12.6.2",
|
|
||||||
"clipboardy": "^5.1.0",
|
"clipboardy": "^5.1.0",
|
||||||
"ink": "^6.6.0",
|
"ink": "^6.6.0",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
@@ -34,7 +33,6 @@
|
|||||||
"xo-tui": "dist/index.js"
|
"xo-tui": "dist/index.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/better-sqlite3": "^7.6.13",
|
|
||||||
"@types/node": "^25.0.10",
|
"@types/node": "^25.0.10",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
@@ -632,16 +630,6 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/better-sqlite3": {
|
|
||||||
"version": "7.6.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-7.6.13.tgz",
|
|
||||||
"integrity": "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/chai": {
|
"node_modules/@types/chai": {
|
||||||
"version": "5.2.3",
|
"version": "5.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
"@xo-cash/templates": "^0.0.4",
|
"@xo-cash/templates": "^0.0.4",
|
||||||
"@xo-cash/types": "^0.0.5",
|
"@xo-cash/types": "^0.0.5",
|
||||||
"@xo-cash/utils": "^0.0.6-cli.20260907041319224",
|
"@xo-cash/utils": "^0.0.6-cli.20260907041319224",
|
||||||
"better-sqlite3": "^12.6.2",
|
|
||||||
"clipboardy": "^5.1.0",
|
"clipboardy": "^5.1.0",
|
||||||
"ink": "^6.6.0",
|
"ink": "^6.6.0",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
@@ -55,7 +54,6 @@
|
|||||||
"zod": "^4.3.6"
|
"zod": "^4.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/better-sqlite3": "^7.6.13",
|
|
||||||
"@types/node": "^25.0.10",
|
"@types/node": "^25.0.10",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Database from "better-sqlite3";
|
import { DatabaseSync } from 'node:sqlite'
|
||||||
import { deserializeInvitation, serializeInvitation } from "@xo-cash/engine";
|
import { deserializeInvitation, serializeInvitation } from "@xo-cash/engine";
|
||||||
import type { XOInvitation } from "@xo-cash/types";
|
import type { XOInvitation } from "@xo-cash/types";
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ export abstract class BaseStorage {
|
|||||||
export class Storage extends BaseStorage {
|
export class Storage extends BaseStorage {
|
||||||
static async create(dbPath: string): Promise<Storage> {
|
static async create(dbPath: string): Promise<Storage> {
|
||||||
// Create the database
|
// Create the database
|
||||||
const database = new Database(dbPath);
|
const database = new DatabaseSync(dbPath);
|
||||||
|
|
||||||
// Create the storage table if it doesn't exist
|
// Create the storage table if it doesn't exist
|
||||||
database
|
database
|
||||||
@@ -35,7 +35,7 @@ export class Storage extends BaseStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly database: Database.Database,
|
private readonly database: DatabaseSync,
|
||||||
private readonly basePath: string,
|
private readonly basePath: string,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|||||||
Reference in New Issue
Block a user