@forge/bridge
Advanced tools
Comparing version 1.3.0 to 1.4.0-next.0
# @forge/bridge | ||
## 1.4.0-next.0 | ||
### Minor Changes | ||
- 6bb4c77: router.open and router.navigate are now supported in Confluence | ||
## 1.3.0 | ||
@@ -4,0 +10,0 @@ |
@@ -6,29 +6,8 @@ "use strict"; | ||
var bridge_1 = require("../bridge"); | ||
var errors_1 = require("../errors"); | ||
var callBridge = bridge_1.getCallBridge(); | ||
var genericRoute = function (url, type) { return tslib_1.__awaiter(void 0, void 0, void 0, function () { | ||
var context, extensionType, product; | ||
var _a; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4, callBridge('getContext')]; | ||
case 1: | ||
context = _b.sent(); | ||
extensionType = (_a = context === null || context === void 0 ? void 0 : context.extension) === null || _a === void 0 ? void 0 : _a.type; | ||
product = (extensionType ? extensionType.split(':') : [undefined])[0]; | ||
if (product !== 'jira') { | ||
throw new errors_1.BridgeAPIError('router is currently only supported in Jira.'); | ||
} | ||
return [2, callBridge('navigate', { | ||
type: type, | ||
url: url | ||
})]; | ||
} | ||
}); | ||
}); }; | ||
var navigate = function (url) { return tslib_1.__awaiter(void 0, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { | ||
return [2, genericRoute(url, 'same-tab')]; | ||
return [2, callBridge('navigate', { url: url, type: 'same-tab' })]; | ||
}); }); }; | ||
var open = function (url) { return tslib_1.__awaiter(void 0, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { | ||
return [2, genericRoute(url, 'new-tab')]; | ||
return [2, callBridge('navigate', { url: url, type: 'new-tab' })]; | ||
}); }); }; | ||
@@ -35,0 +14,0 @@ exports.router = { |
{ | ||
"name": "@forge/bridge", | ||
"version": "1.3.0", | ||
"version": "1.4.0-next.0", | ||
"description": "Forge bridge API for custom UI apps", | ||
@@ -5,0 +5,0 @@ "author": "Atlassian", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15037
204
2