@yorkie-js/react 0.7.10-rc → 0.7.10-rc2

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.
@@ -20973,7 +20973,7 @@ function createAuthInterceptor(apiKey, token) {
20973
20973
  };
20974
20974
  }
20975
20975
  const name$1 = "@yorkie-js/sdk";
20976
- const version$1 = "0.7.10-rc";
20976
+ const version$1 = "0.7.10-rc2";
20977
20977
  const pkg$1 = {
20978
20978
  name: name$1,
20979
20979
  version: version$1
@@ -21333,10 +21333,43 @@ class Client {
21333
21333
  baseUrl: rpcAddr,
21334
21334
  interceptors: [authInterceptor, createMetricInterceptor(opts?.userAgent)],
21335
21335
  fetch: (input, init) => {
21336
+ const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
21337
+ if (/\/yorkie\.v1\.YorkieService\/Watch/.test(url)) {
21338
+ return fetch(input, {
21339
+ ...init,
21340
+ keepalive: this.keepalive
21341
+ });
21342
+ }
21343
+ const callerSignal = init?.signal ?? (input instanceof Request ? input.signal : void 0);
21344
+ const innerAC = new AbortController();
21345
+ let onCallerAbort;
21346
+ if (callerSignal) {
21347
+ if (callerSignal.aborted) {
21348
+ innerAC.abort(callerSignal.reason);
21349
+ } else {
21350
+ onCallerAbort = () => innerAC.abort(callerSignal.reason);
21351
+ callerSignal.addEventListener("abort", onCallerAbort);
21352
+ }
21353
+ }
21354
+ const detach = () => {
21355
+ if (callerSignal && onCallerAbort) {
21356
+ callerSignal.removeEventListener("abort", onCallerAbort);
21357
+ }
21358
+ };
21336
21359
  return fetch(input, {
21337
21360
  ...init,
21361
+ signal: innerAC.signal,
21338
21362
  keepalive: this.keepalive
21339
- });
21363
+ }).then(
21364
+ (res) => {
21365
+ detach();
21366
+ return res;
21367
+ },
21368
+ (err) => {
21369
+ detach();
21370
+ throw err;
21371
+ }
21372
+ );
21340
21373
  }
21341
21374
  };
21342
21375
  this.rpcClient = createClient(
@@ -23021,7 +23054,7 @@ if (typeof globalThis !== "undefined") {
23021
23054
  };
23022
23055
  }
23023
23056
  const name = "@yorkie-js/react";
23024
- const version = "0.7.10-rc";
23057
+ const version = "0.7.10-rc2";
23025
23058
  const pkg = {
23026
23059
  name,
23027
23060
  version