@acala-network/chopsticks-db 0.8.5-0

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/lib/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { DataSource } from 'typeorm';
2
+ import { BaseSqlDatabase } from './base-sql';
3
+ export declare class SqliteDatabase extends BaseSqlDatabase {
4
+ datasource: Promise<DataSource>;
5
+ constructor(location: string);
6
+ }
package/lib/index.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SqliteDatabase = void 0;
4
+ const base_sql_1 = require("./base-sql");
5
+ const db_1 = require("./db");
6
+ class SqliteDatabase extends base_sql_1.BaseSqlDatabase {
7
+ constructor(location) {
8
+ super();
9
+ this.datasource = (0, db_1.openDb)(location);
10
+ }
11
+ }
12
+ exports.SqliteDatabase = SqliteDatabase;
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@acala-network/chopsticks-db",
3
+ "version": "0.8.5-0",
4
+ "author": "Acala Developers <hello@acala.network>",
5
+ "license": "Apache-2.0",
6
+ "scripts": {
7
+ "clean": "rm -rf lib tsconfig.tsbuildinfo",
8
+ "pack-wasm": "scripts/pack-wasm.cjs",
9
+ "build": "yarn pack-wasm; tsc -p ./tsconfig.json",
10
+ "docs:prep": "typedoc"
11
+ },
12
+ "dependencies": {
13
+ "@acala-network/chopsticks-core": "0.8.5-0",
14
+ "localforage": "^1.10.0",
15
+ "sql.js": "^1.8.0",
16
+ "sqlite3": "^5.1.6",
17
+ "typeorm": "^0.3.17"
18
+ },
19
+ "devDependencies": {
20
+ "@types/sql.js": "^1.4.4",
21
+ "fflate": "^0.8.0",
22
+ "typescript": "^5.1.6"
23
+ },
24
+ "files": [
25
+ "lib"
26
+ ],
27
+ "main": "./lib/index.js",
28
+ "types": "./lib/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./lib/index.d.ts",
32
+ "default": "./lib/index.js"
33
+ },
34
+ "./*": {
35
+ "types": "./lib/*.d.ts",
36
+ "default": "./lib/*.js"
37
+ },
38
+ "./package.json": "./package.json"
39
+ }
40
+ }