@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,5 +1,11 @@
1
1
  # @forge/api
2
2
 
3
+ ## 3.9.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 59f7240: Remove unsupported provider type 'none' in getRequestStargate function
8
+
3
9
  ## 3.9.0-next.0
4
10
 
5
11
  ### 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,CAgBtE;AAED,eAAO,MAAM,uBAAuB,EAAE,WAAuC,CAAC;AAC9E,eAAO,MAAM,wBAAwB,EAAE,WAAwC,CAAC"}
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-next.0",
3
+ "version": "3.9.0-next.1",
4
4
  "description": "Forge API methods",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",