@atomiqlabs/lp-lib 14.0.0-dev.4 → 14.0.0-dev.5
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.
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StorageManager = void 0;
|
|
4
4
|
const fs = require("fs/promises");
|
|
5
5
|
const Utils_1 = require("../utils/Utils");
|
|
6
|
-
const
|
|
6
|
+
const fsSync = require("fs");
|
|
7
7
|
class StorageManager {
|
|
8
8
|
constructor(directory) {
|
|
9
9
|
this.data = {};
|
|
@@ -37,7 +37,7 @@ class StorageManager {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
async loadData(type) {
|
|
40
|
-
if (!
|
|
40
|
+
if (!fsSync.existsSync(this.directory)) {
|
|
41
41
|
this.logger.debug("loadData(): Data directory not found!");
|
|
42
42
|
return;
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {StorageObject, IStorageManager} from "@atomiqlabs/base";
|
|
2
2
|
import * as fs from "fs/promises";
|
|
3
3
|
import {getLogger, LoggerType} from "../utils/Utils";
|
|
4
|
-
import fsSync from "fs";
|
|
4
|
+
import * as fsSync from "fs";
|
|
5
5
|
|
|
6
6
|
export class StorageManager<T extends StorageObject> implements IStorageManager<T> {
|
|
7
7
|
|