@forge/api 3.9.0-next.0 → 3.9.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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @forge/api
|
|
2
2
|
|
|
3
|
+
## 3.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1eaeb60: Include app license information in the getAppContext Api
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 59f7240: Remove unsupported provider type 'none' in getRequestStargate function
|
|
12
|
+
|
|
13
|
+
## 3.9.0-next.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 59f7240: Remove unsupported provider type 'none' in getRequestStargate function
|
|
18
|
+
|
|
3
19
|
## 3.9.0-next.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-storage.d.ts","sourceRoot":"","sources":["../../src/runtime/fetch-and-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,EAAyD,YAAY,EAAE,MAAM,cAAc,CAAC;AAGnG,wBAAgB,aAAa,QAE5B;AAED,wBAAgB,WAAW,0BAO1B;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"fetch-and-storage.d.ts","sourceRoot":"","sources":["../../src/runtime/fetch-and-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,EAAyD,YAAY,EAAE,MAAM,cAAc,CAAC;AAGnG,wBAAgB,aAAa,QAE5B;AAED,wBAAgB,WAAW,0BAO1B;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,WAAW,CAetE;AAED,eAAO,MAAM,uBAAuB,EAAE,WAAuC,CAAC;AAC9E,eAAO,MAAM,wBAAwB,EAAE,WAAwC,CAAC"}
|
|
@@ -18,17 +18,16 @@ function getFetchAPI() {
|
|
|
18
18
|
}
|
|
19
19
|
exports.getFetchAPI = getFetchAPI;
|
|
20
20
|
function getRequestStargate(provider) {
|
|
21
|
+
if (provider !== 'app' && provider !== 'user') {
|
|
22
|
+
throw new Error(`Unsupported provider: ${provider}`);
|
|
23
|
+
}
|
|
21
24
|
const sandboxApi = global.api;
|
|
22
25
|
if (sandboxApi) {
|
|
23
26
|
switch (provider) {
|
|
24
|
-
case 'none':
|
|
25
|
-
return sandboxApi.__requestAtlassian;
|
|
26
27
|
case 'app':
|
|
27
28
|
return sandboxApi.asApp().__requestAtlassian;
|
|
28
29
|
case 'user':
|
|
29
30
|
return sandboxApi.asUser().__requestAtlassian;
|
|
30
|
-
default:
|
|
31
|
-
throw new Error(`Unknown provider: ${provider}`);
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
return (0, fetch_1.fetchProduct)({ provider, remote: 'stargate' });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/api",
|
|
3
|
-
"version": "3.9.0
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Forge API methods",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"compile": "tsc -b -v"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@forge/runtime": "5.10.0
|
|
15
|
+
"@forge/runtime": "5.10.0",
|
|
16
16
|
"@types/node": "14.18.63",
|
|
17
17
|
"expect-type": "^0.17.3",
|
|
18
18
|
"jest-matcher-specific-error": "^1.0.0",
|