@cloudflare/realtimekit-react 0.5.0-staging.92 → 0.5.0-staging.93
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/index.cjs.js +13 -13
- package/dist/index.es.js +28 -28
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -16487,42 +16487,42 @@ class jm {
|
|
|
16487
16487
|
}
|
|
16488
16488
|
request(t) {
|
|
16489
16489
|
return u(this, null, function* () {
|
|
16490
|
-
var
|
|
16491
|
-
const e = ((
|
|
16490
|
+
var m;
|
|
16491
|
+
const e = ((m = t.method) == null ? void 0 : m.toUpperCase()) || "GET", r = this.buildURL(t.url || "", t.params), i = N(N({}, this.defaults.headers.common), t.headers);
|
|
16492
16492
|
e !== "GET" && e !== "HEAD" && t.data && !i["Content-Type"] && (i["Content-Type"] = "application/json");
|
|
16493
|
-
const
|
|
16493
|
+
const a = i["Content-Type"] === "application/json" ? JSON.stringify(t.data) : t.data, c = {
|
|
16494
16494
|
method: e,
|
|
16495
16495
|
headers: i,
|
|
16496
|
-
body: e !== "GET" && e !== "HEAD" && t.data ?
|
|
16497
|
-
},
|
|
16496
|
+
body: e !== "GET" && e !== "HEAD" && t.data ? a : void 0
|
|
16497
|
+
}, d = t.timeout || this.defaults.timeout, l = t.retry !== void 0 ? t.retry : this.defaults.retry, p = t.retryDelay || this.defaults.retryDelay;
|
|
16498
16498
|
try {
|
|
16499
|
-
const
|
|
16500
|
-
|
|
16501
|
-
const
|
|
16502
|
-
clearTimeout(
|
|
16503
|
-
let
|
|
16504
|
-
const
|
|
16505
|
-
|
|
16506
|
-
const
|
|
16507
|
-
|
|
16508
|
-
|
|
16499
|
+
const T = new AbortController(), _ = setTimeout(() => T.abort(), d);
|
|
16500
|
+
c.signal = T.signal;
|
|
16501
|
+
const P = yield fetch(r, c);
|
|
16502
|
+
clearTimeout(_);
|
|
16503
|
+
let b = null;
|
|
16504
|
+
const R = P.headers.get("content-type");
|
|
16505
|
+
R && R.includes("application/json") ? b = yield P.json() : b = yield P.text();
|
|
16506
|
+
const L = {};
|
|
16507
|
+
P.headers.forEach((H, D) => {
|
|
16508
|
+
L[D] = H;
|
|
16509
16509
|
});
|
|
16510
|
-
const
|
|
16511
|
-
data:
|
|
16512
|
-
status:
|
|
16513
|
-
statusText:
|
|
16514
|
-
headers:
|
|
16510
|
+
const B = {
|
|
16511
|
+
data: b,
|
|
16512
|
+
status: P.status,
|
|
16513
|
+
statusText: P.statusText,
|
|
16514
|
+
headers: L,
|
|
16515
16515
|
config: t
|
|
16516
16516
|
};
|
|
16517
|
-
if (!
|
|
16518
|
-
throw
|
|
16519
|
-
return
|
|
16520
|
-
} catch (
|
|
16521
|
-
if (
|
|
16522
|
-
return yield new Promise((
|
|
16523
|
-
retry:
|
|
16517
|
+
if (!P.ok)
|
|
16518
|
+
throw B;
|
|
16519
|
+
return B;
|
|
16520
|
+
} catch (T) {
|
|
16521
|
+
if (T instanceof Error && l > 0)
|
|
16522
|
+
return yield new Promise((_) => setTimeout(_, p)), this.defaults.baseURL === "https://api.dyte.io" ? this.defaults.baseURL = "https://api.cluster.dyte.in" : this.defaults.baseURL === "https://api.cluster.dyte.in" && (this.defaults.baseURL = "https://api.dyte.io"), this.request(G(N({}, t), {
|
|
16523
|
+
retry: l - 1
|
|
16524
16524
|
}));
|
|
16525
|
-
throw
|
|
16525
|
+
throw T;
|
|
16526
16526
|
}
|
|
16527
16527
|
});
|
|
16528
16528
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/realtimekit-react",
|
|
3
|
-
"version": "0.5.0-staging.
|
|
3
|
+
"version": "0.5.0-staging.93",
|
|
4
4
|
"description": "A real-time video and audio SDK for building custom, collaborative communication experiences.",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"private": false,
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudflare/realtimekit": "0.5.0-staging.
|
|
20
|
+
"@cloudflare/realtimekit": "0.5.0-staging.93"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=16.8.6"
|