@forge/bridge
5.15.1-next.45.15.1-next.5
~
Modified (3 files)
Index: package/out/bridge.js
===================================================================
--- package/out/bridge.js
+++ package/out/bridge.js
@@ -5,13 +5,13 @@
function isBridgeAvailable(bridge) {
return !!(bridge === null || bridge === void 0 ? void 0 : bridge.callBridge);
}
const getCallBridge = () => {
- if (!isBridgeAvailable(window.__bridge)) {
+ if (!isBridgeAvailable(globalThis.__bridge)) {
throw new errors_1.BridgeAPIError(`
Unable to establish a connection with the Custom UI bridge.
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.
`);
}
- return window.__bridge.callBridge;
+ return globalThis.__bridge.callBridge;
};
exports.getCallBridge = getCallBridge; Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/bridge",
- "version": "5.15.1-next.4",
+ "version": "5.15.1-next.5",
"description": "Forge bridge API for custom UI apps",
"author": "Atlassian",
"license": "SEE LICENSE IN LICENSE.txt",
"main": "out/index.js",
@@ -18,9 +18,9 @@
"@forge/egress": "^2.3.2",
"@forge/i18n": "0.0.7",
"@forge/resolver": "1.7.1",
"@types/history": "^4.7.11",
- "@forge/manifest": "12.5.0-next.3",
+ "@forge/manifest": "12.5.0-next.4",
"@types/iframe-resizer": "^3.5.8",
"iframe-resizer": "^4.4.5",
"uuid": "^9.0.1"
}, Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,14 @@
# @forge/bridge
+## 5.15.1-next.5
+
+### Patch Changes
+
+- 0b7cde8: replace window with globalThis to ensure the bridge packages can work in both browser and worker environment
+- Updated dependencies [a02af38]
+ - @forge/[email protected]
+
## 5.15.1-next.4
### Patch Changes