adminforth 1.0.79 → 1.0.81
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/dist/index.js +7 -0
- package/dist/modules/codeInjector.js +1 -3
- package/index.ts +7 -0
- package/modules/codeInjector.ts +1 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -76,6 +76,13 @@ class AdminForth {
|
|
|
76
76
|
if (!this.config.customization.customComponentsDir) {
|
|
77
77
|
this.config.customization.customComponentsDir = './custom';
|
|
78
78
|
}
|
|
79
|
+
try {
|
|
80
|
+
// check customComponentsDir exists
|
|
81
|
+
fs.accessSync(this.config.customization.customComponentsDir, fs.constants.R_OK);
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
this.config.customization.customComponentsDir = undefined;
|
|
85
|
+
}
|
|
79
86
|
if (this.config.auth) {
|
|
80
87
|
if (!this.config.auth.resourceId) {
|
|
81
88
|
throw new Error('No config.auth.resourceId defined');
|
|
@@ -418,9 +418,7 @@ class CodeInjector {
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
|
-
|
|
422
|
-
yield collectDirectories(customComponentsDir);
|
|
423
|
-
}
|
|
421
|
+
yield collectDirectories(customComponentsDir);
|
|
424
422
|
const watcher = filewatcher();
|
|
425
423
|
directories.forEach((dir) => {
|
|
426
424
|
watcher.add(dir);
|
package/index.ts
CHANGED
|
@@ -98,6 +98,13 @@ class AdminForth implements AdminForthClass {
|
|
|
98
98
|
this.config.customization.customComponentsDir = './custom';
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
try {
|
|
102
|
+
// check customComponentsDir exists
|
|
103
|
+
fs.accessSync(this.config.customization.customComponentsDir, fs.constants.R_OK);
|
|
104
|
+
} catch (e) {
|
|
105
|
+
this.config.customization.customComponentsDir = undefined;
|
|
106
|
+
}
|
|
107
|
+
|
|
101
108
|
if (this.config.auth) {
|
|
102
109
|
if (!this.config.auth.resourceId) {
|
|
103
110
|
throw new Error('No config.auth.resourceId defined');
|
package/modules/codeInjector.ts
CHANGED
|
@@ -482,9 +482,7 @@ async watchForReprepare({ verbose }) {
|
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
484
|
|
|
485
|
-
|
|
486
|
-
await collectDirectories(customComponentsDir);
|
|
487
|
-
}
|
|
485
|
+
await collectDirectories(customComponentsDir);
|
|
488
486
|
|
|
489
487
|
const watcher = filewatcher();
|
|
490
488
|
directories.forEach((dir) => {
|