@flashist/appframework 0.0.339 → 0.0.340
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.
|
@@ -25,9 +25,12 @@ export class AppModulesManager {
|
|
|
25
25
|
initModules() {
|
|
26
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
27
|
let modulesCount = this.modules.length;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
for (let moduleIndex = 0; moduleIndex < modulesCount; moduleIndex++) {
|
|
29
|
+
let tempPromiseOrVoid = this.modules[moduleIndex].preInitHook();
|
|
30
|
+
if (tempPromiseOrVoid) {
|
|
31
|
+
yield tempPromiseOrVoid;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
31
34
|
// Init all modules
|
|
32
35
|
for (let moduleIndex = 0; moduleIndex < modulesCount; moduleIndex++) {
|
|
33
36
|
this.modules[moduleIndex].init();
|
|
@@ -35,7 +38,11 @@ export class AppModulesManager {
|
|
|
35
38
|
// Go through all modules and call the hook after completion,
|
|
36
39
|
// to add a way to do something, when everything is prepared
|
|
37
40
|
for (let moduleIndex = 0; moduleIndex < modulesCount; moduleIndex++) {
|
|
38
|
-
|
|
41
|
+
// await this.modules[moduleIndex].postInitHook();
|
|
42
|
+
let tempPromiseOrVoid = this.modules[moduleIndex].postInitHook();
|
|
43
|
+
if (tempPromiseOrVoid) {
|
|
44
|
+
yield tempPromiseOrVoid;
|
|
45
|
+
}
|
|
39
46
|
}
|
|
40
47
|
});
|
|
41
48
|
}
|
|
@@ -45,7 +52,11 @@ export class AppModulesManager {
|
|
|
45
52
|
// Go through all modules and call the hook after completion,
|
|
46
53
|
// to add a way to do something, when everything is prepared
|
|
47
54
|
for (let moduleIndex = 0; moduleIndex < modulesCount; moduleIndex++) {
|
|
48
|
-
|
|
55
|
+
// await this.modules[moduleIndex].postCompleteHook();
|
|
56
|
+
let tempPromiseOrVoid = this.modules[moduleIndex].postCompleteHook();
|
|
57
|
+
if (tempPromiseOrVoid) {
|
|
58
|
+
yield tempPromiseOrVoid;
|
|
59
|
+
}
|
|
49
60
|
}
|
|
50
61
|
});
|
|
51
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppModulesManager.js","sourceRoot":"","sources":["../../../src/base/modules/AppModulesManager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,OAAO,iBAAiB;IAA9B;QACc,YAAO,GAAoB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"AppModulesManager.js","sourceRoot":"","sources":["../../../src/base/modules/AppModulesManager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,OAAO,iBAAiB;IAA9B;QACc,YAAO,GAAoB,EAAE,CAAC;IAuD5C,CAAC;IArDG,OAAO;QACH,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;IAGD,UAAU;IAEV,SAAS,CAAC,MAAqB;QAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED,YAAY,CAAC,MAAqB;QAC9B,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;IAEK,WAAW;;YACb,IAAI,YAAY,GAAW,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YAE/C,KAAK,IAAI,WAAW,GAAW,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC;gBAC1E,IAAI,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE,CAAC;gBAChE,IAAI,iBAAiB,EAAE,CAAC;oBACpB,MAAM,iBAAiB,CAAC;gBAC5B,CAAC;YACL,CAAC;YAED,mBAAmB;YACnB,KAAK,IAAI,WAAW,GAAW,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC;gBAC1E,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;YACrC,CAAC;YAED,6DAA6D;YAC7D,4DAA4D;YAC5D,KAAK,IAAI,WAAW,GAAW,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC;gBAC1E,kDAAkD;gBAClD,IAAI,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,YAAY,EAAE,CAAC;gBACjE,IAAI,iBAAiB,EAAE,CAAC;oBACpB,MAAM,iBAAiB,CAAC;gBAC5B,CAAC;YACL,CAAC;QACL,CAAC;KAAA;IAEK,eAAe;;YACjB,IAAI,YAAY,GAAW,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YAC/C,6DAA6D;YAC7D,4DAA4D;YAC5D,KAAK,IAAI,WAAW,GAAW,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC;gBAC1E,sDAAsD;gBACtD,IAAI,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,gBAAgB,EAAE,CAAC;gBACrE,IAAI,iBAAiB,EAAE,CAAC;oBACpB,MAAM,iBAAiB,CAAC;gBAC5B,CAAC;YACL,CAAC;QACL,CAAC;KAAA;CACJ"}
|
|
@@ -2,6 +2,6 @@ import { BaseObject } from "@flashist/fcore";
|
|
|
2
2
|
export declare abstract class BaseAppModule extends BaseObject {
|
|
3
3
|
init(): void;
|
|
4
4
|
preInitHook(): void | Promise<void>;
|
|
5
|
-
postInitHook(): void
|
|
6
|
-
postCompleteHook(): void
|
|
5
|
+
postInitHook(): void | Promise<void>;
|
|
6
|
+
postCompleteHook(): void | Promise<void>;
|
|
7
7
|
}
|