@flashist/appframework 0.0.205 → 0.0.206
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.
|
@@ -4,6 +4,6 @@ export declare class AppModulesManager {
|
|
|
4
4
|
destroy(): void;
|
|
5
5
|
addModule(module: BaseAppModule): void;
|
|
6
6
|
removeModule(module: BaseAppModule): void;
|
|
7
|
-
initModules(): void
|
|
8
|
-
activateModules(): void
|
|
7
|
+
initModules(): Promise<void>;
|
|
8
|
+
activateModules(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { ArrayTools } from "@flashist/fcore";
|
|
2
11
|
export class AppModulesManager {
|
|
3
12
|
constructor() {
|
|
@@ -14,24 +23,28 @@ export class AppModulesManager {
|
|
|
14
23
|
ArrayTools.removeItem(this.modules, module);
|
|
15
24
|
}
|
|
16
25
|
initModules() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
let modulesCount = this.modules.length;
|
|
28
|
+
// Init all modules
|
|
29
|
+
for (let moduleIndex = 0; moduleIndex < modulesCount; moduleIndex++) {
|
|
30
|
+
this.modules[moduleIndex].init();
|
|
31
|
+
}
|
|
32
|
+
// Go through all modules and call the hook after completion,
|
|
33
|
+
// to add a way to do something, when everything is prepared
|
|
34
|
+
for (let moduleIndex = 0; moduleIndex < modulesCount; moduleIndex++) {
|
|
35
|
+
yield this.modules[moduleIndex].initCompleteHook();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
27
38
|
}
|
|
28
39
|
activateModules() {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
let modulesCount = this.modules.length;
|
|
42
|
+
// Go through all modules and call the hook after completion,
|
|
43
|
+
// to add a way to do something, when everything is prepared
|
|
44
|
+
for (let moduleIndex = 0; moduleIndex < modulesCount; moduleIndex++) {
|
|
45
|
+
yield this.modules[moduleIndex].activateCompleteHook();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
35
48
|
}
|
|
36
49
|
}
|
|
37
50
|
//# sourceMappingURL=AppModulesManager.js.map
|
|
@@ -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;IAuC5C,CAAC;IArCG,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;
|
|
1
|
+
{"version":3,"file":"A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