studiokit-scaffolding-js 5.1.5 → 5.1.6

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.
@@ -1,5 +1,6 @@
1
1
  export declare enum TIER {
2
2
  LOCAL = "local",
3
3
  DEV = "development",
4
+ QA = "qa",
4
5
  PROD = "production"
5
6
  }
@@ -5,5 +5,6 @@ var TIER;
5
5
  (function (TIER) {
6
6
  TIER["LOCAL"] = "local";
7
7
  TIER["DEV"] = "development";
8
+ TIER["QA"] = "qa";
8
9
  TIER["PROD"] = "production";
9
10
  })(TIER = exports.TIER || (exports.TIER = {}));
package/lib/utils/url.js CHANGED
@@ -55,7 +55,16 @@ function getApiBaseUrl(tier, apiUrlString) {
55
55
  }
56
56
  var protocol = apiUrlString.substring(0, apiUrlString.indexOf('//'));
57
57
  var host = apiUrlString.substring(apiUrlString.indexOf('://') + 3);
58
- return protocol + "//" + shardKey + (tier === tier_1.TIER.DEV ? '.dev' : '') + "." + host;
58
+ var tierSubdomainPart = '';
59
+ switch (tier) {
60
+ case tier_1.TIER.DEV:
61
+ tierSubdomainPart = '.dev';
62
+ break;
63
+ case tier_1.TIER.QA:
64
+ tierSubdomainPart = '.qa';
65
+ break;
66
+ }
67
+ return protocol + "//" + shardKey + tierSubdomainPart + "." + host;
59
68
  }
60
69
  exports.getApiBaseUrl = getApiBaseUrl;
61
70
  function getStorageUrl(config, url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiokit-scaffolding-js",
3
- "version": "5.1.5",
3
+ "version": "5.1.6",
4
4
  "description": "Common scaffolding for Studio apps at Purdue",
5
5
  "repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
6
6
  "license": "MIT",