@contrail/extensions-sdk 1.0.0-alpha.2 → 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.
@@ -1,4 +1,5 @@
1
1
  export declare class AppExtension {
2
+ private static initPromiseResolver;
2
3
  static registerAppExtension(): Promise<void>;
3
4
  private static getExtensionActions;
4
5
  private static initAppExtension;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/extensions-sdk",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.4",
4
4
  "description": "Client library for interfacing with VibeIQ's services and apps from an extension.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",