@forge/bridge 5.10.1 → 5.10.2-next.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @forge/bridge
2
2
 
3
+ ## 5.10.2-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [1eae7ab]
8
+ - @forge/manifest@11.3.2-next.1
9
+
10
+ ## 5.10.2-next.0
11
+
12
+ ### Patch Changes
13
+
14
+ - 4205052: Send emitReadyEvent calls over the bridge for usage in static macros
15
+ - Updated dependencies [73c9329]
16
+ - Updated dependencies [b96a445]
17
+ - @forge/manifest@11.3.2-next.0
18
+
3
19
  ## 5.10.1
4
20
 
5
21
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"emitReadyEvent.d.ts","sourceRoot":"","sources":["../../src/view/emitReadyEvent.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,QAAa,QAAQ,IAAI,CAMnD,CAAC"}
1
+ {"version":3,"file":"emitReadyEvent.d.ts","sourceRoot":"","sources":["../../src/view/emitReadyEvent.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,QAAa,QAAQ,IAAI,CAiBnD,CAAC"}
@@ -3,11 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.emitReadyEvent = void 0;
4
4
  const events_1 = require("../events/events");
5
5
  const view_1 = require("./view");
6
+ const bridge_1 = require("../bridge");
7
+ const errors_1 = require("../errors");
8
+ const callBridge = (0, bridge_1.getCallBridge)();
6
9
  const EXTENSION_READY = 'EXTENSION_READY';
7
10
  const emitReadyEvent = async () => {
8
11
  const context = await view_1.view.getContext();
9
12
  await events_1.events.emit(EXTENSION_READY, {
10
13
  localId: context.localId
11
14
  });
15
+ try {
16
+ const success = await callBridge('emitReadyEvent');
17
+ if (success === false) {
18
+ throw new errors_1.BridgeAPIError('Unable to emit ready event.');
19
+ }
20
+ }
21
+ catch (err) {
22
+ throw new errors_1.BridgeAPIError('Unable to emit ready event.');
23
+ }
12
24
  };
13
25
  exports.emitReadyEvent = emitReadyEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.10.1",
3
+ "version": "5.10.2-next.1",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -20,7 +20,7 @@
20
20
  "@forge/resolver": "1.7.1",
21
21
  "@statsig/js-client": "3.18.2",
22
22
  "@types/history": "^4.7.11",
23
- "@forge/manifest": "11.3.1",
23
+ "@forge/manifest": "11.3.2-next.1",
24
24
  "@types/iframe-resizer": "^3.5.8",
25
25
  "iframe-resizer": "^4.4.5",
26
26
  "uuid": "^9.0.1"