@webtypen/webframez-core 0.3.21 → 0.3.22
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.
|
@@ -27,6 +27,7 @@ class LocalStorageDriver {
|
|
|
27
27
|
return path_1.default.join(this.basepath, ...args);
|
|
28
28
|
}
|
|
29
29
|
put(filepath, contents, payload) {
|
|
30
|
+
var _a;
|
|
30
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
32
|
const p = this.path(filepath);
|
|
32
33
|
// @ts-ignore
|
|
@@ -42,8 +43,8 @@ class LocalStorageDriver {
|
|
|
42
43
|
}
|
|
43
44
|
return key === mime;
|
|
44
45
|
});
|
|
45
|
-
if (configKey && this.config.fileHandlers[configKey]) {
|
|
46
|
-
for (let handler of this.config.fileHandlers[configKey]) {
|
|
46
|
+
if (configKey && ((_a = this.config.fileHandlers[configKey]) === null || _a === void 0 ? void 0 : _a.handlers)) {
|
|
47
|
+
for (let handler of this.config.fileHandlers[configKey].handlers) {
|
|
47
48
|
yield handler(p, contents, payload);
|
|
48
49
|
}
|
|
49
50
|
}
|
package/package.json
CHANGED
|
@@ -36,8 +36,8 @@ export class LocalStorageDriver implements BaseStorageDriver {
|
|
|
36
36
|
return key === mime;
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
if (configKey && this.config.fileHandlers[configKey]) {
|
|
40
|
-
for (let handler of this.config.fileHandlers[configKey]) {
|
|
39
|
+
if (configKey && this.config.fileHandlers[configKey]?.handlers) {
|
|
40
|
+
for (let handler of this.config.fileHandlers[configKey].handlers) {
|
|
41
41
|
await handler(p, contents, payload);
|
|
42
42
|
}
|
|
43
43
|
}
|