@forge/api 2.11.1 → 2.12.0-next.0
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 +6 -0
- package/out/api/fetch.d.ts +3 -1
- package/out/api/fetch.d.ts.map +1 -1
- package/out/api/fetch.js +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/out/api/fetch.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { RequestInfo, RequestInit, Response } from 'node-fetch';
|
|
|
3
3
|
import { Url } from 'url';
|
|
4
4
|
import { FetchAPI } from '..';
|
|
5
5
|
declare type FetchFunction = (url: RequestInfo | Url, options: RequestInit | undefined) => Promise<Response>;
|
|
6
|
-
|
|
6
|
+
declare type ProxyUrlProvider = 'app' | 'user' | 'none';
|
|
7
|
+
declare type ProxyUrlRemote = 'jira' | 'confluence' | 'stargate' | 'bitbucket';
|
|
8
|
+
export declare const createProxyFetch: (provider: ProxyUrlProvider, remote: ProxyUrlRemote) => FetchFunction;
|
|
7
9
|
export declare function getNodeRuntimeAPI(): FetchAPI;
|
|
8
10
|
export declare function getSandboxRuntimeAPI(api: any): FetchAPI;
|
|
9
11
|
export {};
|
package/out/api/fetch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/api/fetch.ts"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAW,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAK9B,aAAK,aAAa,GAAG,CAAC,GAAG,EAAE,WAAW,GAAG,GAAG,EAAE,OAAO,EAAE,WAAW,GAAG,SAAS,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/api/fetch.ts"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAW,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAK9B,aAAK,aAAa,GAAG,CAAC,GAAG,EAAE,WAAW,GAAG,GAAG,EAAE,OAAO,EAAE,WAAW,GAAG,SAAS,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AACrG,aAAK,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAChD,aAAK,cAAc,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AAIvE,eAAO,MAAM,gBAAgB,aAAc,gBAAgB,UAAU,cAAc,KAAG,aAwBrF,CAAC;AAuBF,wBAAgB,iBAAiB,IAAI,QAAQ,CAoB5C;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ,CAEvD"}
|
package/out/api/fetch.js
CHANGED
|
@@ -41,8 +41,8 @@ const wrapExternalEgress = (url, options) => {
|
|
|
41
41
|
function getNodeRuntimeAPI() {
|
|
42
42
|
return {
|
|
43
43
|
fetch: (0, _1.wrapWithRouteUnwrapper)(wrapExternalEgress),
|
|
44
|
-
requestJira:
|
|
45
|
-
requestConfluence:
|
|
44
|
+
requestJira: (0, _1.wrapRequestProduct)((0, exports.createProxyFetch)('none', 'jira')),
|
|
45
|
+
requestConfluence: (0, _1.wrapRequestProduct)((0, exports.createProxyFetch)('none', 'confluence')),
|
|
46
46
|
requestBitbucket: throwNotImplementedError,
|
|
47
47
|
asUser: () => ({
|
|
48
48
|
requestJira: (0, _1.wrapRequestProduct)((0, exports.createProxyFetch)('user', 'jira')),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0-next.0",
|
|
4
4
|
"description": "Forge API methods",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@types/node": "^12.12.63"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@forge/auth": "
|
|
20
|
-
"@forge/egress": "
|
|
21
|
-
"@forge/storage": "
|
|
19
|
+
"@forge/auth": "0.0.1",
|
|
20
|
+
"@forge/egress": "1.1.2",
|
|
21
|
+
"@forge/storage": "1.3.2",
|
|
22
22
|
"@types/node-fetch": "^2.5.7",
|
|
23
23
|
"node-fetch": "2.6.7"
|
|
24
24
|
}
|