npm package diff
Package: @forge/api
Versions: 3.8.1-experimental-10722bc - 3.9.2-next.1
File: package/out/runtime/fetch-and-storage.js
Index: package/out/runtime/fetch-and-storage.js
===================================================================
--- package/out/runtime/fetch-and-storage.js
+++ package/out/runtime/fetch-and-storage.js
@@ -17,19 +17,18 @@
}
}
exports.getFetchAPI = getFetchAPI;
function getRequestStargate(provider) {
+ if (provider !== 'app' && provider !== 'user') {
+ throw new Error(`Unsupported provider: ${provider}`);
+ }
const sandboxApi = global.api;
if (sandboxApi) {
switch (provider) {
- case 'none':
- return sandboxApi.__requestAtlassian;
case 'app':
return sandboxApi.asApp().__requestAtlassian;
case 'user':
return sandboxApi.asUser().__requestAtlassian;
- default:
- throw new Error(`Unknown provider: ${provider}`);
}
}
return (0, fetch_1.fetchProduct)({ provider, remote: 'stargate' });
}