ueberdb2 4.2.63 → 4.2.73

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,49 +1,49 @@
1
- export type Settings = {
2
- data?: any;
3
- table?: string;
4
- db?: string;
5
- idleTimeoutMillis?: any;
6
- min?: any;
7
- max?: any;
8
- engine?: string;
9
- charset?: string;
10
- server?: string | undefined;
11
- requestTimeout?: number;
12
- bulkLimit?: number;
13
- queryTimeout?: number;
14
- connectionString?: string;
15
- parseJSON?: boolean;
16
- dbName?: string;
17
- collection?: string;
18
- url?: string;
19
- mock?: any;
20
- base_index?: string;
21
- migrate_to_newer_schema?: boolean;
22
- api?: string;
23
- filename?: string;
24
- database?: string;
25
- password?: string;
26
- user?: string;
27
- port?: number | string;
28
- host?: string;
29
- maxListeners?: number | undefined;
30
- json?: boolean;
31
- cache?: number;
32
- writeInterval?: number;
33
- logger?: any;
34
- columnFamily?: any;
35
- clientOptions?: any;
36
- };
37
- declare class AbstractDatabase {
38
- logger: any;
39
- settings: Settings;
40
- constructor(settings: Settings);
41
- /**
42
- * For findKey regex. Used by document dbs like mongodb or dirty.
43
- */
44
- createFindRegex(key: string, notKey?: string): RegExp;
45
- doBulk(operations: any, cb: () => {}): void;
46
- get isAsync(): boolean;
47
- }
48
- export default AbstractDatabase;
1
+ export type Settings = {
2
+ data?: any;
3
+ table?: string;
4
+ db?: string;
5
+ idleTimeoutMillis?: any;
6
+ min?: any;
7
+ max?: any;
8
+ engine?: string;
9
+ charset?: string;
10
+ server?: string | undefined;
11
+ requestTimeout?: number;
12
+ bulkLimit?: number;
13
+ queryTimeout?: number;
14
+ connectionString?: string;
15
+ parseJSON?: boolean;
16
+ dbName?: string;
17
+ collection?: string;
18
+ url?: string;
19
+ mock?: any;
20
+ base_index?: string;
21
+ migrate_to_newer_schema?: boolean;
22
+ api?: string;
23
+ filename?: string;
24
+ database?: string;
25
+ password?: string;
26
+ user?: string;
27
+ port?: number | string;
28
+ host?: string;
29
+ maxListeners?: number | undefined;
30
+ json?: boolean;
31
+ cache?: number;
32
+ writeInterval?: number;
33
+ logger?: any;
34
+ columnFamily?: any;
35
+ clientOptions?: any;
36
+ };
37
+ declare class AbstractDatabase {
38
+ logger: any;
39
+ settings: Settings;
40
+ constructor(settings: Settings);
41
+ /**
42
+ * For findKey regex. Used by document dbs like mongodb or dirty.
43
+ */
44
+ createFindRegex(key: string, notKey?: string): RegExp;
45
+ doBulk(operations: any, cb: () => {}): void;
46
+ get isAsync(): boolean;
47
+ }
48
+ export default AbstractDatabase;
49
49
  //# sourceMappingURL=AbstractDatabase.d.ts.map
@@ -1,89 +1,89 @@
1
- /**
2
- * Cache with Least Recently Used eviction policy.
3
- */
4
- export declare class LRU {
5
- /**
6
- * @param evictable Optional predicate that dictates whether it is permissable to evict the entry
7
- * if it is old and the cache is over capacity. The predicate is passed two arguments (key,
8
- * value). If no predicate is provided, all entries are evictable. Warning: Non-evictable
9
- * entries can cause the cache to go over capacity. If the number of non-evictable entries is
10
- * greater than or equal to the capacity, all new evictable entries will be evicted
11
- * immediately.
12
- */
13
- constructor(capacity: any, evictable?: (k: any, v: any) => boolean);
14
- /**
15
- * The entries accessed via this iterator are not considered to have been "used" (for purposes of
16
- * determining least recently used).
17
- */
18
- [Symbol.iterator](): any;
19
- /**
20
- * @param isUse Optional boolean indicating whether this get() should be considered a "use" of the
21
- * entry (for determining least recently used). Defaults to true.
22
- * @returns undefined if there is no entry matching the given key.
23
- */
24
- get(k: any, isUse?: boolean): any;
25
- /**
26
- * Adds or updates an entry in the cache. This marks the entry as the most recently used entry.
27
- */
28
- set(k: any, v: any): void;
29
- /**
30
- * Evicts the oldest evictable entries until the number of entries is equal to or less than the
31
- * cache's capacity. This method is automatically called by set(). Call this if you need to evict
32
- * newly evictable entries before the next call to set().
33
- */
34
- evictOld(): void;
35
- }
36
- export declare const Database: {
37
- new (wrappedDB: any, settings: any, logger: any): {
38
- _lock(key: any): Promise<void>;
39
- _unlock(key: any): Promise<void>;
40
- _pauseFlush(): void;
41
- _resumeFlush(): void;
42
- /**
43
- * wraps the init function of the original DB
44
- */
45
- init(): Promise<void>;
46
- /**
47
- * wraps the close function of the original DB
48
- */
49
- close(): Promise<void>;
50
- /**
51
- * Gets the value trough the wrapper.
52
- */
53
- get(key: any): Promise<any>;
54
- _getLocked(key: any): Promise<any>;
55
- /**
56
- * Find keys function searches the db sets for matching entries and
57
- * returns the key entries via callback.
58
- */
59
- findKeys(key: any, notKey: any): Promise<any>;
60
- /**
61
- * Remove a record from the database
62
- */
63
- remove(key: any): Promise<void>;
64
- /**
65
- * Sets the value trough the wrapper
66
- */
67
- set(key: any, value: any): Promise<void>;
68
- _setLocked(key: any, value: any): Promise<void>;
69
- /**
70
- * Sets a subvalue
71
- */
72
- setSub(key: any, sub: any, value: any): Promise<void>;
73
- /**
74
- * Returns a sub value of the object
75
- * @param sub is a array, for example if you want to access object.test.bla, the array is ["test",
76
- * "bla"]
77
- */
78
- getSub(key: any, sub: any): Promise<any>;
79
- /**
80
- * Writes all dirty values to the database
81
- */
82
- flush(): Promise<void>;
83
- _write(dirtyEntries: any): Promise<void>;
84
- };
85
- };
86
- export declare const exportedForTesting: {
87
- LRU: typeof LRU;
88
- };
1
+ /**
2
+ * Cache with Least Recently Used eviction policy.
3
+ */
4
+ export declare class LRU {
5
+ /**
6
+ * @param evictable Optional predicate that dictates whether it is permissable to evict the entry
7
+ * if it is old and the cache is over capacity. The predicate is passed two arguments (key,
8
+ * value). If no predicate is provided, all entries are evictable. Warning: Non-evictable
9
+ * entries can cause the cache to go over capacity. If the number of non-evictable entries is
10
+ * greater than or equal to the capacity, all new evictable entries will be evicted
11
+ * immediately.
12
+ */
13
+ constructor(capacity: any, evictable?: (k: any, v: any) => boolean);
14
+ /**
15
+ * The entries accessed via this iterator are not considered to have been "used" (for purposes of
16
+ * determining least recently used).
17
+ */
18
+ [Symbol.iterator](): any;
19
+ /**
20
+ * @param isUse Optional boolean indicating whether this get() should be considered a "use" of the
21
+ * entry (for determining least recently used). Defaults to true.
22
+ * @returns undefined if there is no entry matching the given key.
23
+ */
24
+ get(k: any, isUse?: boolean): any;
25
+ /**
26
+ * Adds or updates an entry in the cache. This marks the entry as the most recently used entry.
27
+ */
28
+ set(k: any, v: any): void;
29
+ /**
30
+ * Evicts the oldest evictable entries until the number of entries is equal to or less than the
31
+ * cache's capacity. This method is automatically called by set(). Call this if you need to evict
32
+ * newly evictable entries before the next call to set().
33
+ */
34
+ evictOld(): void;
35
+ }
36
+ export declare const Database: {
37
+ new (wrappedDB: any, settings: any, logger: any): {
38
+ _lock(key: any): Promise<void>;
39
+ _unlock(key: any): Promise<void>;
40
+ _pauseFlush(): void;
41
+ _resumeFlush(): void;
42
+ /**
43
+ * wraps the init function of the original DB
44
+ */
45
+ init(): Promise<void>;
46
+ /**
47
+ * wraps the close function of the original DB
48
+ */
49
+ close(): Promise<void>;
50
+ /**
51
+ * Gets the value trough the wrapper.
52
+ */
53
+ get(key: any): Promise<any>;
54
+ _getLocked(key: any): Promise<any>;
55
+ /**
56
+ * Find keys function searches the db sets for matching entries and
57
+ * returns the key entries via callback.
58
+ */
59
+ findKeys(key: any, notKey: any): Promise<any>;
60
+ /**
61
+ * Remove a record from the database
62
+ */
63
+ remove(key: any): Promise<void>;
64
+ /**
65
+ * Sets the value trough the wrapper
66
+ */
67
+ set(key: any, value: any): Promise<void>;
68
+ _setLocked(key: any, value: any): Promise<void>;
69
+ /**
70
+ * Sets a subvalue
71
+ */
72
+ setSub(key: any, sub: any, value: any): Promise<void>;
73
+ /**
74
+ * Returns a sub value of the object
75
+ * @param sub is a array, for example if you want to access object.test.bla, the array is ["test",
76
+ * "bla"]
77
+ */
78
+ getSub(key: any, sub: any): Promise<any>;
79
+ /**
80
+ * Writes all dirty values to the database
81
+ */
82
+ flush(): Promise<void>;
83
+ _write(dirtyEntries: any): Promise<void>;
84
+ };
85
+ };
86
+ export declare const exportedForTesting: {
87
+ LRU: typeof LRU;
88
+ };
89
89
  //# sourceMappingURL=CacheAndBufferLayer.d.ts.map
@@ -1,10 +1,11 @@
1
- import { Console } from 'console';
2
- export declare class ConsoleLogger extends Console {
3
- constructor(opts?: {});
4
- isDebugEnabled(): boolean;
5
- isInfoEnabled(): boolean;
6
- isWarnEnabled(): boolean;
7
- isErrorEnabled(): boolean;
8
- }
9
- export declare const normalizeLogger: (logger: null | Function) => Function | null;
1
+ /// <reference types="node" />
2
+ import { Console } from 'console';
3
+ export declare class ConsoleLogger extends Console {
4
+ constructor(opts?: {});
5
+ isDebugEnabled(): boolean;
6
+ isInfoEnabled(): boolean;
7
+ isWarnEnabled(): boolean;
8
+ isErrorEnabled(): boolean;
9
+ }
10
+ export declare const normalizeLogger: (logger: null | Function) => Function | null;
10
11
  //# sourceMappingURL=logging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../lib/logging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAGhC,qBAAa,aAAc,SAAQ,OAAO;gBAC5B,IAAI,KAAK;IACrB,cAAc;IACd,aAAa;IACb,aAAa;IACb,cAAc;CACf;AAGD,eAAO,MAAM,eAAe,WAAY,IAAI,GAAG,QAAQ,oBAkBtD,CAAC"}
1
+ {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../lib/logging.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAGhC,qBAAa,aAAc,SAAQ,OAAO;gBAC5B,IAAI,KAAK;IACrB,cAAc;IACd,aAAa;IACb,aAAa;IACb,cAAc;CACf;AAGD,eAAO,MAAM,eAAe,WAAY,IAAI,GAAG,QAAQ,oBAkBtD,CAAC"}
package/package.json CHANGED
@@ -30,40 +30,41 @@
30
30
  "@types/async": "^3.2.24",
31
31
  "@types/better-sqlite3": "^7.6.9",
32
32
  "@types/mssql": "^9.1.5",
33
- "@types/node": "^20.11.26",
34
- "@types/pg": "^8.11.2",
33
+ "@types/node": "^20.12.7",
34
+ "@types/pg": "^8.11.5",
35
35
  "@types/rethinkdb": "^2.3.21",
36
36
  "async": "^3.2.5",
37
- "better-sqlite3": "^9.4.3",
37
+ "better-sqlite3": "^9.5.0",
38
38
  "cassandra-driver": "^4.7.2",
39
39
  "cli-table": "^0.3.11",
40
40
  "dirty-ts": "^1.1.7",
41
41
  "elasticsearch8": "npm:@elastic/elasticsearch@^8.8.1",
42
42
  "eslint": "^8.57.0",
43
- "eslint-config-etherpad": "^3.0.22",
43
+ "eslint-config-etherpad": "^4.0.4",
44
44
  "eslint-plugin-import": "^2.29.1",
45
45
  "mongodb": "^6.5.0",
46
46
  "mssql": "^10.0.2",
47
- "mysql2": "^3.9.2",
47
+ "mysql2": "^3.9.7",
48
48
  "nano": "^10.1.3",
49
- "pg": "^8.11.3",
49
+ "pg": "^8.11.5",
50
50
  "randexp-ts": "^1.0.5",
51
51
  "redis": "^4.6.13",
52
52
  "rethinkdb": "^2.4.2",
53
53
  "rollup-plugin-typescript2": "^0.36.0",
54
54
  "semver": "^7.6.0",
55
- "simple-git": "^3.22.0",
55
+ "simple-git": "^3.24.0",
56
56
  "surrealdb.js": "^0.11.0",
57
- "typescript": "^4.9.5",
58
- "vitest": "^1.3.1",
59
- "wtfnode": "^0.9.1"
57
+ "typescript": "^5.4.4",
58
+ "vitest": "^1.4.0",
59
+ "wtfnode": "^0.9.2",
60
+ "rollup": "^4.16.4"
60
61
  },
61
62
  "repository": {
62
63
  "type": "git",
63
64
  "url": "https://github.com/ether/ueberDB.git"
64
65
  },
65
66
  "main": "./dist/index.js",
66
- "version": "4.2.63",
67
+ "version": "4.2.73",
67
68
  "bugs": {
68
69
  "url": "https://github.com/ether/ueberDB/issues"
69
70
  },
@@ -74,12 +75,6 @@
74
75
  "dist/lib"
75
76
  ],
76
77
  "homepage": "https://github.com/ether/ueberDB",
77
- "scripts": {
78
- "lint": "eslint .",
79
- "lint:fix": "eslint --fix .",
80
- "build": "npx rollup -c rollup.config.cjs.js",
81
- "test": "vitest --test-timeout=120000"
82
- },
83
78
  "_npmUser": {
84
79
  "name": "johnyma22",
85
80
  "email": "john@mclear.co.uk"
@@ -92,5 +87,11 @@
92
87
  ],
93
88
  "engines": {
94
89
  "node": ">=16.20.1"
90
+ },
91
+ "scripts": {
92
+ "lint": "eslint .",
93
+ "lint:fix": "eslint --fix .",
94
+ "build": "pnpm exec rollup -c rollup.config.cjs.js",
95
+ "test": "vitest --test-timeout=120000"
95
96
  }
96
- }
97
+ }