@uniformdev/context 19.54.2-alpha.3 → 19.54.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/dist/api/api.js +3 -2
- package/dist/api/api.mjs +3 -2
- package/package.json +2 -2
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
|
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
|
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
|
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
|
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.54.2
|
3
|
+
"version": "19.54.2",
|
4
4
|
"description": "Uniform Context core package",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -66,5 +66,5 @@
|
|
66
66
|
"publishConfig": {
|
67
67
|
"access": "public"
|
68
68
|
},
|
69
|
-
"gitHead": "
|
69
|
+
"gitHead": "ae0ae9747a09ab2982d011b71f67bb078ed98495"
|
70
70
|
}
|