@wocker/core 1.0.19-dev.1 → 1.0.19-dev.2
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.
|
@@ -2,6 +2,7 @@ import { WriteFileOptions, MakeDirectoryOptions, RmOptions, WriteStream, ReadStr
|
|
|
2
2
|
import { FileSystem } from "../makes";
|
|
3
3
|
export declare class PluginConfigService {
|
|
4
4
|
protected readonly pluginDir: string;
|
|
5
|
+
protected _fs?: FileSystem;
|
|
5
6
|
constructor(pluginDir: string);
|
|
6
7
|
get fs(): FileSystem;
|
|
7
8
|
/** @deprecated */
|
|
@@ -30,14 +30,16 @@ let PluginConfigService = class PluginConfigService {
|
|
|
30
30
|
this.pluginDir = pluginDir;
|
|
31
31
|
}
|
|
32
32
|
get fs() {
|
|
33
|
-
if (!this.
|
|
34
|
-
|
|
33
|
+
if (!this._fs) {
|
|
34
|
+
if (!this.pluginDir) {
|
|
35
|
+
throw new Error("Plugin dir missed");
|
|
36
|
+
}
|
|
37
|
+
this._fs = new makes_1.FileSystem(this.pluginDir);
|
|
38
|
+
if (!this._fs.exists()) {
|
|
39
|
+
this._fs.mkdir();
|
|
40
|
+
}
|
|
35
41
|
}
|
|
36
|
-
|
|
37
|
-
if (!fs.exists()) {
|
|
38
|
-
fs.mkdir();
|
|
39
|
-
}
|
|
40
|
-
return fs;
|
|
42
|
+
return this._fs;
|
|
41
43
|
}
|
|
42
44
|
/** @deprecated */
|
|
43
45
|
dataPath(...parts) {
|