@forge/cli-shared 5.3.2-next.0 → 5.3.2-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,12 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 5.3.2-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c9077a2: Rename function getEnvironment to getEnvironmentConfig
8
+ - 07355ac: Use staging runtime wrapper for dev & staging environments
9
+
3
10
  ## 5.3.2-next.0
4
11
 
5
12
  ### Patch Changes
@@ -10,6 +10,6 @@ const INSTRUCTION_URLS = {
10
10
  FEDRAMP_MODERATE_PROD: 'https://id.atlassian-us-gov-mod.com/manage/api-tokens'
11
11
  };
12
12
  function getInstructionsUrl() {
13
- return (0, gateway_1.getEnvironment)(INSTRUCTION_URLS);
13
+ return (0, gateway_1.getEnvironmentConfig)(INSTRUCTION_URLS);
14
14
  }
15
15
  exports.getInstructionsUrl = getInstructionsUrl;
@@ -67,7 +67,7 @@ class CredentialStoreImpl {
67
67
  this.keytar = keytar;
68
68
  this.cachedConfig = cachedConfig;
69
69
  this.userRepository = userRepository;
70
- this.keytarAccount = (0, graphql_1.getEnvironment)(KeytarAccount);
70
+ this.keytarAccount = (0, graphql_1.getEnvironmentConfig)(KeytarAccount);
71
71
  }
72
72
  wrapKeytarError(e) {
73
73
  const message = (0, shared_1.wrapError)(e).message;
@@ -1,6 +1,6 @@
1
1
  export declare const DEFAULT_GRAPHQL_GATEWAY = "https://api.atlassian.com/graphql";
2
2
  export declare const getGraphqlGateway: () => string;
3
- declare enum Environments {
3
+ export declare enum Environments {
4
4
  DEV = "dev",
5
5
  STG = "staging",
6
6
  PROD = "prod",
@@ -15,7 +15,6 @@ export declare enum CDNEnvironments {
15
15
  FEDRAMP_MODERATE_STAGING = "fedm_staging",
16
16
  FEDRAMP_MODERATE_PROD = "fedm_prod"
17
17
  }
18
- export declare const getEnvironment: (envOptions?: EnvironmentOptions) => string;
18
+ export declare const getEnvironmentConfig: (envOptions?: EnvironmentOptions) => string;
19
19
  export declare const isFedrampEnv: () => boolean;
20
- export {};
21
20
  //# sourceMappingURL=gateway.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../src/graphql/gateway.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAE3E,eAAO,MAAM,iBAAiB,QAAO,MAEpC,CAAC;AAEF,aAAK,YAAY;IACf,GAAG,QAAQ;IACX,GAAG,YAAY;IACf,IAAI,SAAS;IACb,wBAAwB,iBAAiB;IACzC,qBAAqB,cAAc;CACpC;AAED,oBAAY,kBAAkB,GAAG,MAAM,CAAC,MAAM,OAAO,YAAY,EAAE,MAAM,CAAC,CAAC;AAE3E,oBAAY,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,wBAAwB,iBAAiB;IACzC,qBAAqB,cAAc;CACpC;AAED,eAAO,MAAM,cAAc,gBAAgB,kBAAkB,KAAkB,MAgB9E,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,OAM/B,CAAC"}
1
+ {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../src/graphql/gateway.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAE3E,eAAO,MAAM,iBAAiB,QAAO,MAEpC,CAAC;AAEF,oBAAY,YAAY;IACtB,GAAG,QAAQ;IACX,GAAG,YAAY;IACf,IAAI,SAAS;IACb,wBAAwB,iBAAiB;IACzC,qBAAqB,cAAc;CACpC;AAED,oBAAY,kBAAkB,GAAG,MAAM,CAAC,MAAM,OAAO,YAAY,EAAE,MAAM,CAAC,CAAC;AAE3E,oBAAY,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,wBAAwB,iBAAiB;IACzC,qBAAqB,cAAc;CACpC;AAED,eAAO,MAAM,oBAAoB,gBAAgB,kBAAkB,KAAkB,MAgBpF,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,OAM/B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFedrampEnv = exports.getEnvironment = exports.CDNEnvironments = exports.getGraphqlGateway = exports.DEFAULT_GRAPHQL_GATEWAY = void 0;
3
+ exports.isFedrampEnv = exports.getEnvironmentConfig = exports.CDNEnvironments = exports.Environments = exports.getGraphqlGateway = exports.DEFAULT_GRAPHQL_GATEWAY = void 0;
4
4
  exports.DEFAULT_GRAPHQL_GATEWAY = 'https://api.atlassian.com/graphql';
5
5
  const getGraphqlGateway = () => {
6
6
  return process.env.FORGE_GRAPHQL_GATEWAY || exports.DEFAULT_GRAPHQL_GATEWAY;
@@ -13,7 +13,7 @@ var Environments;
13
13
  Environments["PROD"] = "prod";
14
14
  Environments["FEDRAMP_MODERATE_STAGING"] = "fedm_staging";
15
15
  Environments["FEDRAMP_MODERATE_PROD"] = "fedm_prod";
16
- })(Environments || (Environments = {}));
16
+ })(Environments = exports.Environments || (exports.Environments = {}));
17
17
  var CDNEnvironments;
18
18
  (function (CDNEnvironments) {
19
19
  CDNEnvironments["DEV"] = "dev";
@@ -22,7 +22,7 @@ var CDNEnvironments;
22
22
  CDNEnvironments["FEDRAMP_MODERATE_STAGING"] = "fedm_staging";
23
23
  CDNEnvironments["FEDRAMP_MODERATE_PROD"] = "fedm_prod";
24
24
  })(CDNEnvironments = exports.CDNEnvironments || (exports.CDNEnvironments = {}));
25
- const getEnvironment = (envOptions = Environments) => {
25
+ const getEnvironmentConfig = (envOptions = Environments) => {
26
26
  const graphqlGateway = (0, exports.getGraphqlGateway)();
27
27
  if (graphqlGateway.includes('.dev.')) {
28
28
  return envOptions.DEV;
@@ -38,9 +38,9 @@ const getEnvironment = (envOptions = Environments) => {
38
38
  }
39
39
  return envOptions.PROD;
40
40
  };
41
- exports.getEnvironment = getEnvironment;
41
+ exports.getEnvironmentConfig = getEnvironmentConfig;
42
42
  const isFedrampEnv = () => {
43
- const currentEnvironment = (0, exports.getEnvironment)();
43
+ const currentEnvironment = (0, exports.getEnvironmentConfig)();
44
44
  return (currentEnvironment === Environments.FEDRAMP_MODERATE_STAGING ||
45
45
  currentEnvironment === Environments.FEDRAMP_MODERATE_PROD);
46
46
  };