@quatrain/core 1.0.0-beta19 → 1.0.0-beta20
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/Core.js +3 -4
- package/package.json +1 -1
package/lib/Core.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.Core = void 0;
|
|
|
13
13
|
const DataObject_1 = require("./components/DataObject");
|
|
14
14
|
const User_1 = require("./components/User");
|
|
15
15
|
const storage = require('node-persist');
|
|
16
|
+
storage.init( /* options ... */);
|
|
16
17
|
class Core {
|
|
17
18
|
static definition(key) {
|
|
18
19
|
return {
|
|
@@ -24,14 +25,12 @@ class Core {
|
|
|
24
25
|
}
|
|
25
26
|
static addConfig(key, value) {
|
|
26
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
storage.
|
|
28
|
-
yield storage.setItem(`${this.storagePrefix}_${key}`, value);
|
|
28
|
+
yield storage.set(`${this.storagePrefix}_${key}`, value);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
static getConfig(key) {
|
|
32
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
storage.
|
|
34
|
-
return yield storage.getItem(`${this.storagePrefix}_${key}`);
|
|
33
|
+
return yield storage.get(`${this.storagePrefix}_${key}`);
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
static addBackend(backend, alias, setDefault = false) {
|