@forge/api 4.0.0-next.1 → 4.0.0-next.2

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,13 @@
1
1
  # @forge/api
2
2
 
3
+ ## 4.0.0-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e069ff4: Fixed bug in metric collection in sandbox environment for global storage api
8
+ - Updated dependencies [e069ff4]
9
+ - @forge/storage@1.6.0-next.1
10
+
3
11
  ## 4.0.0-next.1
4
12
 
5
13
  ### Major Changes
@@ -3,7 +3,7 @@ import { AuthProvider } from '../api/fetch';
3
3
  import type { Metrics } from '@forge/util/packages/metrics-interface';
4
4
  export declare function getContextAri(): any;
5
5
  export declare function getFetchAPI(): import("..").FetchAPI;
6
- export declare function getMetrics(): Metrics;
6
+ export declare function getMetrics(): Metrics | undefined;
7
7
  export declare function getRequestStargate(provider: AuthProvider): FetchMethod;
8
8
  export declare const __requestAtlassianAsApp: FetchMethod;
9
9
  export declare const __requestAtlassianAsUser: FetchMethod;
@@ -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,EAA2D,YAAY,EAAE,MAAM,cAAc,CAAC;AAErG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEtE,wBAAgB,aAAa,QAE5B;AAED,wBAAgB,WAAW,0BAO1B;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,WAAW,CAetE;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,EAA2D,YAAY,EAAE,MAAM,cAAc,CAAC;AAErG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEtE,wBAAgB,aAAa,QAE5B;AAED,wBAAgB,WAAW,0BAO1B;AAED,wBAAgB,UAAU,IAAI,OAAO,GAAG,SAAS,CAOhD;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,6 +18,9 @@ function getFetchAPI() {
18
18
  }
19
19
  exports.getFetchAPI = getFetchAPI;
20
20
  function getMetrics() {
21
+ if (global.api) {
22
+ return undefined;
23
+ }
21
24
  return (0, runtime_1.__getRuntime)().metrics;
22
25
  }
23
26
  exports.getMetrics = getMetrics;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/api",
3
- "version": "4.0.0-next.1",
3
+ "version": "4.0.0-next.2",
4
4
  "description": "Forge API methods",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@forge/auth": "0.0.5",
24
24
  "@forge/egress": "1.2.13",
25
- "@forge/storage": "1.6.0-next.0",
25
+ "@forge/storage": "1.6.0-next.1",
26
26
  "@forge/util": "1.4.4",
27
27
  "@types/node-fetch": "^2.6.11",
28
28
  "node-fetch": "2.7.0"