@cloudflare/realtimekit-react 0.5.0-staging.91 → 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.es.js CHANGED
@@ -16487,42 +16487,42 @@ class jm {
16487
16487
  }
16488
16488
  request(t) {
16489
16489
  return u(this, null, function* () {
16490
- var l;
16491
- const e = ((l = t.method) == null ? void 0 : l.toUpperCase()) || "GET", r = this.buildURL(t.url || "", t.params), i = N(N({}, this.defaults.headers.common), t.headers);
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 n = {
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 ? JSON.stringify(t.data) : void 0
16497
- }, a = t.timeout || this.defaults.timeout, c = t.retry !== void 0 ? t.retry : this.defaults.retry, d = t.retryDelay || this.defaults.retryDelay;
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 p = new AbortController(), m = setTimeout(() => p.abort(), a);
16500
- n.signal = p.signal;
16501
- const T = yield fetch(r, n);
16502
- clearTimeout(m);
16503
- let _ = null;
16504
- const P = T.headers.get("content-type");
16505
- P && P.includes("application/json") ? _ = yield T.json() : _ = yield T.text();
16506
- const b = {};
16507
- T.headers.forEach((L, B) => {
16508
- b[B] = L;
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 R = {
16511
- data: _,
16512
- status: T.status,
16513
- statusText: T.statusText,
16514
- headers: b,
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 (!T.ok)
16518
- throw R;
16519
- return R;
16520
- } catch (p) {
16521
- if (p instanceof Error && c > 0)
16522
- return yield new Promise((m) => setTimeout(m, d)), 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: c - 1
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 p;
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.91",
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": "2.5.0-staging.91"
20
+ "@cloudflare/realtimekit": "0.5.0-staging.93"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=16.8.6"