ueberdb2 4.2.103 → 4.2.104
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,12 +1,11 @@
|
|
|
1
1
|
import AbstractDatabase from "../lib/AbstractDatabase";
|
|
2
|
-
import { KeyValueDB } from 'rusty-store-kv';
|
|
3
2
|
export default class Rusty_db extends AbstractDatabase {
|
|
4
|
-
db:
|
|
3
|
+
db: any | null | undefined;
|
|
5
4
|
constructor(settings: {
|
|
6
5
|
filename: string;
|
|
7
6
|
});
|
|
8
7
|
get isAsync(): boolean;
|
|
9
|
-
findKeys(key: string, notKey?: string):
|
|
8
|
+
findKeys(key: string, notKey?: string): any;
|
|
10
9
|
get(key: string): any;
|
|
11
10
|
init(): Promise<void>;
|
|
12
11
|
close(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rusty_db.d.ts","sourceRoot":"","sources":["../../databases/rusty_db.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"rusty_db.d.ts","sourceRoot":"","sources":["../../databases/rusty_db.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,gBAAgB;IAClD,EAAE,EAAE,GAAG,GAAE,IAAI,GAAE,SAAS,CAAA;gBAEZ,QAAQ,EAAE;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC;IASxC,IAAI,OAAO,YAEV;IAED,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAC,MAAM;IAIpC,GAAG,CAAC,GAAG,EAAE,MAAM;IAYT,IAAI;IAaV,KAAK;IAKL,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAS9B,OAAO;CAGV"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { BulkObject } from "./cassandra_db";
|
|
2
2
|
import AbstractDatabase, { Settings } from "../lib/AbstractDatabase";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 2011 Peter 'Pita' Martischka
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
4
18
|
export default class SQLiteDB extends AbstractDatabase {
|
|
5
|
-
db:
|
|
19
|
+
db: any | null;
|
|
6
20
|
constructor(settings: Settings);
|
|
7
21
|
init(callback: Function): void;
|
|
8
22
|
get(key: string, callback: Function): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite_db.d.ts","sourceRoot":"","sources":["../../databases/sqlite_db.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite_db.d.ts","sourceRoot":"","sources":["../../databases/sqlite_db.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,gBAAgB,EAAE,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,gBAAgB;IAC7C,EAAE,EAAE,GAAG,GAAC,IAAI,CAAC;gBACR,QAAQ,EAAC,QAAQ;IAsB7B,IAAI,CAAC,QAAQ,EAAE,QAAQ;IAevB,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAKjC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAMrD,GAAG,CAAC,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAK/C,MAAM,CAAC,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ;IAMpC,MAAM,CAAC,IAAI,EAAC,UAAU,EAAE,EAAE,QAAQ,EAAC,QAAQ;IAgB3C,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAIzB"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var require$$0$6=require('util'),require$$1$6=require('console'),require$$0$p=require('process'),require$$0$9=require('dns'),require$$0$7=require('net'),require$$0$8=require('events'),require$$0$a=require('crypto'),require$$0$b=require('stream'),require$$1$2=require('tls'),require$$0$c=require('os'),require$$1$3=require('path'),require$$0$d=require('fs'),require$$2$2=require('https'),require$$0$e=require('zlib'),require$$0$f=require('url'),require$$0$g=require('vm'),http$5=require('http'),require$$0$i=require('assert'),require$$0$h=require('tty'),node_path=require('node:path'),child_process=require('child_process'),require$$0$j=require('node:events'),require$$0$k=require('buffer'),require$$1$4=require('querystring'),require$$13=require('stream/web'),require$$0$l=require('node:stream'),require$$1$5=require('node:util'),require$$0$m=require('worker_threads'),require$$2$3=require('perf_hooks'),require$$5$2=require('util/types'),require$$4$1=require('async_hooks'),require$$1$7=require('string_decoder'),require$$0$n=require('diagnostics_channel'),require$$0$o=require('timers'),require$$0$q=require('fs/promises'),require$$0$r=require('timers/promises'),require$$5$3=require('constants'),os$3=require('node:os'),process$4=require('node:process'),http$6=require('node:http'),https$6=require('node:https'),zlib$2=require('node:zlib'),fs$9=require('node:fs'),require$$0$s=require('dgram'),require$$2$4=require('node:url')
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var require$$0$6=require('util'),require$$1$6=require('console'),require$$0$p=require('process'),require$$0$9=require('dns'),require$$0$7=require('net'),require$$0$8=require('events'),require$$0$a=require('crypto'),require$$0$b=require('stream'),require$$1$2=require('tls'),require$$0$c=require('os'),require$$1$3=require('path'),require$$0$d=require('fs'),require$$2$2=require('https'),require$$0$e=require('zlib'),require$$0$f=require('url'),require$$0$g=require('vm'),http$5=require('http'),require$$0$i=require('assert'),require$$0$h=require('tty'),node_path=require('node:path'),child_process=require('child_process'),require$$0$j=require('node:events'),require$$0$k=require('buffer'),require$$1$4=require('querystring'),require$$13=require('stream/web'),require$$0$l=require('node:stream'),require$$1$5=require('node:util'),require$$0$m=require('worker_threads'),require$$2$3=require('perf_hooks'),require$$5$2=require('util/types'),require$$4$1=require('async_hooks'),require$$1$7=require('string_decoder'),require$$0$n=require('diagnostics_channel'),require$$0$o=require('timers'),require$$0$q=require('fs/promises'),require$$0$r=require('timers/promises'),require$$5$3=require('constants'),os$3=require('node:os'),process$4=require('node:process'),http$6=require('node:http'),https$6=require('node:https'),zlib$2=require('node:zlib'),fs$9=require('node:fs'),require$$0$s=require('dgram'),require$$2$4=require('node:url');function _interopNamespaceDefault(e){var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var child_process__namespace=/*#__PURE__*/_interopNamespaceDefault(child_process);var os__namespace=/*#__PURE__*/_interopNamespaceDefault(os$3);var process__namespace=/*#__PURE__*/_interopNamespaceDefault(process$4);var http__namespace=/*#__PURE__*/_interopNamespaceDefault(http$6);var https__namespace=/*#__PURE__*/_interopNamespaceDefault(https$6);var zlib__namespace=/*#__PURE__*/_interopNamespaceDefault(zlib$2);// @ts-nocheck
|
|
2
2
|
/**
|
|
3
3
|
* 2011 Peter 'Pita' Martischka
|
|
4
4
|
*
|
|
@@ -326132,7 +326132,22 @@ class Rethink_db extends AbstractDatabase {
|
|
|
326132
326132
|
this.connection.close(callback);
|
|
326133
326133
|
}
|
|
326134
326134
|
}
|
|
326135
|
-
}
|
|
326135
|
+
}/**
|
|
326136
|
+
* 2011 Peter 'Pita' Martischka
|
|
326137
|
+
*
|
|
326138
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
326139
|
+
* you may not use this file except in compliance with the License.
|
|
326140
|
+
* You may obtain a copy of the License at
|
|
326141
|
+
*
|
|
326142
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
326143
|
+
*
|
|
326144
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
326145
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
326146
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
326147
|
+
* See the License for the specific language governing permissions and
|
|
326148
|
+
* limitations under the License.
|
|
326149
|
+
*/
|
|
326150
|
+
class SQLiteDB extends AbstractDatabase {
|
|
326136
326151
|
db;
|
|
326137
326152
|
constructor(settings) {
|
|
326138
326153
|
super(settings);
|
|
@@ -326154,7 +326169,16 @@ class Rethink_db extends AbstractDatabase {
|
|
|
326154
326169
|
}
|
|
326155
326170
|
}
|
|
326156
326171
|
init(callback) {
|
|
326157
|
-
|
|
326172
|
+
let SQLITEDB;
|
|
326173
|
+
try {
|
|
326174
|
+
SQLITEDB = require('rusty-store-kv');
|
|
326175
|
+
}
|
|
326176
|
+
catch (err) {
|
|
326177
|
+
throw new Error('rusty-store-kv not found. It was removed from ueberdb\'s dependencies because it requires ' +
|
|
326178
|
+
'compilation which fails on several systems. If you still want to use sqlite, run ' +
|
|
326179
|
+
'"pnpm install rusty-store-kv" in your etherpad-lite ./src directory.');
|
|
326180
|
+
}
|
|
326181
|
+
this.db = new SQLITEDB.SQLite(this.settings.filename);
|
|
326158
326182
|
callback();
|
|
326159
326183
|
}
|
|
326160
326184
|
get(key, callback) {
|
|
@@ -335312,7 +335336,16 @@ class SurrealDB extends AbstractDatabase {
|
|
|
335312
335336
|
}
|
|
335313
335337
|
}
|
|
335314
335338
|
async init() {
|
|
335315
|
-
|
|
335339
|
+
let RUSTY_DB;
|
|
335340
|
+
try {
|
|
335341
|
+
RUSTY_DB = await import('rusty-store-kv');
|
|
335342
|
+
}
|
|
335343
|
+
catch (err) {
|
|
335344
|
+
throw new Error('rusty-store-kv not found. It was removed from ueberdb\'s dependencies because it requires ' +
|
|
335345
|
+
'compilation which fails on several systems. If you still want to use rusty store kv, run ' +
|
|
335346
|
+
'"pnpm install rusty-store-kv" in your etherpad-lite ./src directory.');
|
|
335347
|
+
}
|
|
335348
|
+
this.db = new RUSTY_DB.KeyValueDB(this.settings.filename);
|
|
335316
335349
|
}
|
|
335317
335350
|
close() {
|
|
335318
335351
|
this.db?.close();
|