@forge/api 3.9.0-next.0 → 3.9.0-next.1
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 +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' });
|