@cloudflare/realtimekit 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.es.js CHANGED
@@ -16480,42 +16480,42 @@ class jm {
16480
16480
  }
16481
16481
  request(t) {
16482
16482
  return u(this, null, function* () {
16483
- var l;
16484
- 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);
16483
+ var m;
16484
+ 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);
16485
16485
  e !== "GET" && e !== "HEAD" && t.data && !i["Content-Type"] && (i["Content-Type"] = "application/json");
16486
- const n = {
16486
+ const a = i["Content-Type"] === "application/json" ? JSON.stringify(t.data) : t.data, c = {
16487
16487
  method: e,
16488
16488
  headers: i,
16489
- body: e !== "GET" && e !== "HEAD" && t.data ? JSON.stringify(t.data) : void 0
16490
- }, a = t.timeout || this.defaults.timeout, c = t.retry !== void 0 ? t.retry : this.defaults.retry, d = t.retryDelay || this.defaults.retryDelay;
16489
+ body: e !== "GET" && e !== "HEAD" && t.data ? a : void 0
16490
+ }, d = t.timeout || this.defaults.timeout, l = t.retry !== void 0 ? t.retry : this.defaults.retry, p = t.retryDelay || this.defaults.retryDelay;
16491
16491
  try {
16492
- const p = new AbortController(), m = setTimeout(() => p.abort(), a);
16493
- n.signal = p.signal;
16494
- const T = yield fetch(r, n);
16495
- clearTimeout(m);
16496
- let _ = null;
16497
- const P = T.headers.get("content-type");
16498
- P && P.includes("application/json") ? _ = yield T.json() : _ = yield T.text();
16499
- const b = {};
16500
- T.headers.forEach((L, B) => {
16501
- b[B] = L;
16492
+ const T = new AbortController(), _ = setTimeout(() => T.abort(), d);
16493
+ c.signal = T.signal;
16494
+ const P = yield fetch(r, c);
16495
+ clearTimeout(_);
16496
+ let b = null;
16497
+ const R = P.headers.get("content-type");
16498
+ R && R.includes("application/json") ? b = yield P.json() : b = yield P.text();
16499
+ const L = {};
16500
+ P.headers.forEach((H, D) => {
16501
+ L[D] = H;
16502
16502
  });
16503
- const R = {
16504
- data: _,
16505
- status: T.status,
16506
- statusText: T.statusText,
16507
- headers: b,
16503
+ const B = {
16504
+ data: b,
16505
+ status: P.status,
16506
+ statusText: P.statusText,
16507
+ headers: L,
16508
16508
  config: t
16509
16509
  };
16510
- if (!T.ok)
16511
- throw R;
16512
- return R;
16513
- } catch (p) {
16514
- if (p instanceof Error && c > 0)
16515
- 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), {
16516
- retry: c - 1
16510
+ if (!P.ok)
16511
+ throw B;
16512
+ return B;
16513
+ } catch (T) {
16514
+ if (T instanceof Error && l > 0)
16515
+ 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), {
16516
+ retry: l - 1
16517
16517
  }));
16518
- throw p;
16518
+ throw T;
16519
16519
  }
16520
16520
  });
16521
16521
  }
@@ -30696,7 +30696,7 @@ let ti = (Pf = class {
30696
30696
  var c;
30697
30697
  const n = Wi.createContext(t, e), a = N(N({}, YR), e == null ? void 0 : e.modules);
30698
30698
  return n.setValue("peerId", t), n.setValue("modules", a), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (c = e.overrides) != null ? c : {}), n.setValue("env", QR({ baseURI: i.baseURI })), n.setValue("defaults", e.defaults || { audio: true, video: true }), n.setValue("onError", e.onError || (() => {
30699
- })), n.setValue("cachedUserDetails", ys(e.cachedUserDetails)), n.setValue("sdkVersion", "2.5.0-staging.92"), n;
30699
+ })), n.setValue("cachedUserDetails", ys(e.cachedUserDetails)), n.setValue("sdkVersion", "2.5.0-staging.93"), n;
30700
30700
  }
30701
30701
  join() {
30702
30702
  return u(this, null, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/realtimekit",
3
- "version": "0.5.0-staging.92",
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",