studiokit-scaffolding-js 4.7.1-alpha.2 → 4.7.1-alpha.4

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.
Files changed (2) hide show
  1. package/lib/utils/url.js +3 -3
  2. package/package.json +1 -1
package/lib/utils/url.js CHANGED
@@ -91,8 +91,8 @@ function fetchText(url, options) {
91
91
  didFail = false;
92
92
  _a.label = 1;
93
93
  case 1:
94
- didFail = false;
95
94
  tryCount++;
95
+ didFail = false;
96
96
  _a.label = 2;
97
97
  case 2:
98
98
  _a.trys.push([2, 5, , 7]);
@@ -107,9 +107,9 @@ function fetchText(url, options) {
107
107
  error_1 = _a.sent();
108
108
  didFail = true;
109
109
  logger_1.getLogger().error("Failed to fetch " + url + ". attempt: " + tryCount + ", error: " + error_1);
110
- return [4 /*yield*/, wait(2 ^ (tryCount * 100))]; // 100, 200, 400...
110
+ return [4 /*yield*/, wait(Math.pow(2, (tryCount - 1)) * 100)]; // 100, 200, 400, 800, 1600
111
111
  case 6:
112
- _a.sent(); // 100, 200, 400...
112
+ _a.sent(); // 100, 200, 400, 800, 1600
113
113
  return [3 /*break*/, 7];
114
114
  case 7:
115
115
  if (tryCount < RETRY_LIMIT && didFail) return [3 /*break*/, 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiokit-scaffolding-js",
3
- "version": "4.7.1-alpha.2",
3
+ "version": "4.7.1-alpha.4",
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",