@nymphjs/driver-sqlite3 1.0.0-beta.13 → 1.0.0-beta.131

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.
@@ -1,4 +1,4 @@
1
- import { SQLite3DriverConfig } from './d';
1
+ import type { SQLite3DriverConfig } from './index.js';
2
2
 
3
3
  export default {
4
4
  filename: ':memory:',
@@ -7,5 +7,5 @@ export default {
7
7
  timeout: 10000,
8
8
  explicitWrite: false,
9
9
  wal: false,
10
- verbose: undefined,
10
+ pragmas: [],
11
11
  } as SQLite3DriverConfig;
package/src/conf/index.ts CHANGED
@@ -1,4 +1,65 @@
1
- export { SQLite3DriverConfig } from './d';
1
+ /**
2
+ * SQLite3 Driver Config
3
+ */
4
+ export interface SQLite3DriverConfig {
5
+ /**
6
+ * The filename of the SQLite3 DB. Use ':memory:' for an in-memory DB.
7
+ */
8
+ filename: string;
9
+ /**
10
+ * If the file does not exist, an Error will be thrown instead of creating a
11
+ * new file.
12
+ *
13
+ * This option is ignored for in-memory, temporary, or readonly database
14
+ * connections.
15
+ */
16
+ fileMustExist: boolean;
17
+ /**
18
+ * The SQLite3 table name prefix.
19
+ */
20
+ prefix: string;
21
+ /**
22
+ * The timeout to use for waiting for the DB to become available.
23
+ */
24
+ timeout: number;
25
+ /**
26
+ * Open explicitly for writing.
27
+ *
28
+ * By default, the driver will always open the DB as readonly, and attempt to
29
+ * open another link to perform write operations. If you know that only one
30
+ * instance will be writing, you can force the driver to open for writing by
31
+ * default, which will block any other instance from opening it for writing.
32
+ *
33
+ * One thing to note is that starting a transaction is a write operation, so
34
+ * as long as an instance is in a transaction, no other instances can write.
35
+ *
36
+ * PubSub also needs to open the DB, and it only needs read access.
37
+ */
38
+ explicitWrite: boolean;
39
+ /**
40
+ * Turn on WAL mode.
41
+ *
42
+ * This will generally increase performance, but does mean that the DB must be
43
+ * on a local disk.
44
+ *
45
+ * See: https://www.sqlite.org/wal.html
46
+ */
47
+ wal: boolean;
48
+ /**
49
+ * Additional pragma statements to run upon connection.
50
+ *
51
+ * The default pragmas:
52
+ *
53
+ * - journal_mode = WAL;
54
+ * (if wal is set to true)
55
+ * - encoding = "UTF-8";
56
+ * - foreign_keys = 1;
57
+ * - case_sensitive_like = 1;
58
+ *
59
+ * (Don't include the PRAGMA keyword, but do include the semicolon.)
60
+ */
61
+ pragmas: string[];
62
+ }
2
63
 
3
- import defaults from './defaults';
64
+ import defaults from './defaults.js';
4
65
  export { defaults as SQLite3DriverConfigDefaults };
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './conf';
1
+ export * from './conf/index.js';
2
2
 
3
- import SQLite3Driver from './SQLite3Driver';
3
+ import SQLite3Driver from './SQLite3Driver.js';
4
4
  export { SQLite3Driver };
5
5
  export default SQLite3Driver;
package/tsconfig.json CHANGED
@@ -2,10 +2,13 @@
2
2
  "extends": "@tsconfig/recommended/tsconfig.json",
3
3
 
4
4
  "compilerOptions": {
5
- "lib": ["ES2021"],
6
- "target": "ES2021",
5
+ "types": ["node", "jest"],
6
+ "module": "nodenext",
7
+ "moduleResolution": "nodenext",
8
+ "lib": ["es2024"],
9
+ "target": "es2024",
7
10
  "noImplicitAny": true,
8
- "removeComments": true,
11
+ "removeComments": false,
9
12
  "sourceMap": true,
10
13
  "outDir": "dist",
11
14
  "resolveJsonModule": true,
package/typedoc.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": ["../../typedoc.base.json"],
3
+ "entryPoints": ["src/index.ts"]
4
+ }
package/dist/conf/d.d.ts DELETED
@@ -1,9 +0,0 @@
1
- export interface SQLite3DriverConfig {
2
- filename: string;
3
- fileMustExist: boolean;
4
- prefix: string;
5
- timeout: number;
6
- explicitWrite: boolean;
7
- wal: boolean;
8
- verbose: ((message?: any, ...additionalArgs: any[]) => void) | undefined;
9
- }
package/dist/conf/d.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"d.js","sourceRoot":"","sources":["../../src/conf/d.ts"],"names":[],"mappings":""}
package/src/conf/d.ts DELETED
@@ -1,52 +0,0 @@
1
- /**
2
- * SQLite3 Driver Config
3
- */
4
- export interface SQLite3DriverConfig {
5
- /**
6
- * The filename of the SQLite3 DB. Use ':memory:' for an in-memory DB.
7
- */
8
- filename: string;
9
- /**
10
- * If the file does not exist, an Error will be thrown instead of creating a
11
- * new file.
12
- *
13
- * This option is ignored for in-memory, temporary, or readonly database
14
- * connections.
15
- */
16
- fileMustExist: boolean;
17
- /**
18
- * The SQLite3 table name prefix.
19
- */
20
- prefix: string;
21
- /**
22
- * The timeout to use for waiting for the DB to become available.
23
- */
24
- timeout: number;
25
- /**
26
- * Open explicitly for writing.
27
- *
28
- * By default, the driver will always open the DB as readonly, and attempt to
29
- * open another link to perform write operations. If you know that only one
30
- * instance will be writing, you can force the driver to open for writing by
31
- * default, which will block any other instance from opening it for writing.
32
- *
33
- * One thing to note is that starting a transaction is a write operation, so
34
- * as long as an instance is in a transaction, no other instances can write.
35
- *
36
- * PubSub also needs to open the DB, and it only needs read access.
37
- */
38
- explicitWrite: boolean;
39
- /**
40
- * Turn on WAL mode.
41
- *
42
- * This will generally increase performance, but does mean that the DB must be
43
- * on a local disk.
44
- *
45
- * See: https://www.sqlite.org/wal.html
46
- */
47
- wal: boolean;
48
- /**
49
- * Function that gets called with every SQL string executed.
50
- */
51
- verbose: ((message?: any, ...additionalArgs: any[]) => void) | undefined;
52
- }