@contrail/extensions-sdk 1.0.0-alpha.3 → 1.0.0-alpha.4
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.
|
@@ -23,6 +23,9 @@ class AppExtension {
|
|
|
23
23
|
const hostApp = yield connection.promise;
|
|
24
24
|
console.log('[AppExtension] Connected to host app.');
|
|
25
25
|
(0, actions_1.setExtensionActions)(hostApp);
|
|
26
|
+
yield new Promise((resolve) => {
|
|
27
|
+
AppExtension.initPromiseResolver = resolve;
|
|
28
|
+
});
|
|
26
29
|
}
|
|
27
30
|
catch (error) {
|
|
28
31
|
console.error("Failed to connect app extension with host application:", error);
|
|
@@ -41,6 +44,9 @@ class AppExtension {
|
|
|
41
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
45
|
console.log("[AppExtension]: Initialized: Received context: ", context);
|
|
43
46
|
(0, app_context_1.setAppContext)(context);
|
|
47
|
+
if (AppExtension.initPromiseResolver) {
|
|
48
|
+
AppExtension.initPromiseResolver();
|
|
49
|
+
}
|
|
44
50
|
});
|
|
45
51
|
}
|
|
46
52
|
;
|
|
@@ -49,3 +55,4 @@ class AppExtension {
|
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
57
|
exports.AppExtension = AppExtension;
|
|
58
|
+
AppExtension.initPromiseResolver = null;
|
package/package.json
CHANGED