npm package diff
Package: @forge/api
Versions: 3.9.2-next.0-experimental-c7a7d36 - 3.8.1-experimental-204139e
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,21 +17,22 @@
}
}
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' });
+ return (0, fetch_1.fetchProduct)({ provider, remote: 'stargate' });
}
exports.getRequestStargate = getRequestStargate;
exports.__requestAtlassianAsApp = getRequestStargate('app');
exports.__requestAtlassianAsUser = getRequestStargate('user');