@forge/bridge 5.15.1-next.4 → 5.15.1-next.5

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,13 @@
1
1
  # @forge/bridge
2
2
 
3
+ ## 5.15.1-next.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 0b7cde8: replace window with globalThis to ensure the bridge packages can work in both browser and worker environment
8
+ - Updated dependencies [a02af38]
9
+ - @forge/manifest@12.5.0-next.4
10
+
3
11
  ## 5.15.1-next.4
4
12
 
5
13
  ### Patch Changes
package/out/bridge.js CHANGED
@@ -6,12 +6,12 @@ function isBridgeAvailable(bridge) {
6
6
  return !!(bridge === null || bridge === void 0 ? void 0 : bridge.callBridge);
7
7
  }
8
8
  const getCallBridge = () => {
9
- if (!isBridgeAvailable(window.__bridge)) {
9
+ if (!isBridgeAvailable(globalThis.__bridge)) {
10
10
  throw new errors_1.BridgeAPIError(`
11
11
  Unable to establish a connection with the Custom UI bridge.
12
12
  If you are trying to run your app locally, Forge apps only work in the context of Atlassian products. Refer to https://go.atlassian.com/forge-tunneling-with-custom-ui for how to tunnel when using a local development server.
13
13
  `);
14
14
  }
15
- return window.__bridge.callBridge;
15
+ return globalThis.__bridge.callBridge;
16
16
  };
17
17
  exports.getCallBridge = getCallBridge;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.15.1-next.4",
3
+ "version": "5.15.1-next.5",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -19,7 +19,7 @@
19
19
  "@forge/i18n": "0.0.7",
20
20
  "@forge/resolver": "1.7.1",
21
21
  "@types/history": "^4.7.11",
22
- "@forge/manifest": "12.5.0-next.3",
22
+ "@forge/manifest": "12.5.0-next.4",
23
23
  "@types/iframe-resizer": "^3.5.8",
24
24
  "iframe-resizer": "^4.4.5",
25
25
  "uuid": "^9.0.1"