@forge/api
Advanced tools
Comparing version 2.9.0 to 2.9.1-next.0
# @forge/api | ||
## 2.9.1-next.0 | ||
### Patch Changes | ||
- 7a4fa35: Support internet egress calls in the new runtime | ||
## 2.9.0 | ||
@@ -4,0 +10,0 @@ |
@@ -8,2 +8,3 @@ "use strict"; | ||
const polyfill_response_1 = require("./polyfill-response"); | ||
const egress_1 = require("@forge/egress"); | ||
const createProxyFetch = (provider, remote) => { | ||
@@ -24,5 +25,13 @@ return (url, options) => { | ||
}; | ||
const wrapExternalEgress = (url, options) => { | ||
const allowedEgress = global.allowedEgress; | ||
const egressFilteringService = new egress_1.EgressFilteringService(allowedEgress); | ||
if (!egressFilteringService.isValidUrl(url)) { | ||
throw new Error(`URL not included in the external fetch backend permissions: ${url}. Visit go.atlassian.com/forge-egress for more information.`); | ||
} | ||
return (0, node_fetch_1.default)(url, options); | ||
}; | ||
function getNodeRuntimeAPI() { | ||
return { | ||
fetch: throwNotImplementedError, | ||
fetch: (0, _1.wrapWithRouteUnwrapper)(wrapExternalEgress), | ||
requestJira: throwNotImplementedError, | ||
@@ -29,0 +38,0 @@ requestConfluence: throwNotImplementedError, |
{ | ||
"name": "@forge/api", | ||
"version": "2.9.0", | ||
"version": "2.9.1-next.0", | ||
"description": "Forge API methods", | ||
@@ -19,2 +19,3 @@ "author": "Atlassian", | ||
"@forge/auth": "^0.0.1", | ||
"@forge/egress": "^1.1.1", | ||
"@forge/storage": "^1.3.1", | ||
@@ -21,0 +22,0 @@ "@types/node-fetch": "^2.5.7", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
52414
646
5
2
+ Added@forge/egress@^1.1.1
+ Added@forge/egress@1.3.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedminimatch@9.0.5(transitive)