@uniformdev/context 19.51.1-alpha.1 → 19.51.1-alpha.22

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/dist/api/api.js CHANGED
@@ -231,9 +231,10 @@ async function handleRateLimits(callApi) {
231
231
  }
232
232
  let resetWait = 0;
233
233
  try {
234
- const dateHeader = response.headers.get("date");
234
+ const responseClone = response.clone();
235
+ const dateHeader = responseClone.headers.get("date");
235
236
  const serverTime = dateHeader ? new Date(dateHeader).getTime() : void 0;
236
- const body = await response.json();
237
+ const body = await responseClone.json();
237
238
  const resetTime = (_a = body == null ? void 0 : body.info) == null ? void 0 : _a.reset;
238
239
  if (typeof serverTime === "number" && typeof resetTime === "number") {
239
240
  resetWait = Math.max(0, Math.min(Math.round(1.1 * (resetTime - serverTime)), 1e4));
package/dist/api/api.mjs CHANGED
@@ -166,9 +166,10 @@ async function handleRateLimits(callApi) {
166
166
  }
167
167
  let resetWait = 0;
168
168
  try {
169
- const dateHeader = response.headers.get("date");
169
+ const responseClone = response.clone();
170
+ const dateHeader = responseClone.headers.get("date");
170
171
  const serverTime = dateHeader ? new Date(dateHeader).getTime() : void 0;
171
- const body = await response.json();
172
+ const body = await responseClone.json();
172
173
  const resetTime = (_a = body == null ? void 0 : body.info) == null ? void 0 : _a.reset;
173
174
  if (typeof serverTime === "number" && typeof resetTime === "number") {
174
175
  resetWait = Math.max(0, Math.min(Math.round(1.1 * (resetTime - serverTime)), 1e4));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "19.51.1-alpha.1+e55ae6c1e",
3
+ "version": "19.51.1-alpha.22+ee274f045",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -50,7 +50,7 @@
50
50
  "document": "api-extractor run --local"
51
51
  },
52
52
  "devDependencies": {
53
- "@types/js-cookie": "3.0.3",
53
+ "@types/js-cookie": "3.0.4",
54
54
  "benny": "3.7.1"
55
55
  },
56
56
  "dependencies": {
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "e55ae6c1ea8df19f04a9dba22769d76e16d28d70"
69
+ "gitHead": "ee274f04521c4024826b21fee01d50fcc1e414a1"
70
70
  }