@liveblocks/core 3.14.0 → 3.15.0-components1

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 CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // src/version.ts
8
8
  var PKG_NAME = "@liveblocks/core";
9
- var PKG_VERSION = "3.14.0";
9
+ var PKG_VERSION = "3.15.0-components1";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -10538,16 +10538,23 @@ function getBaseUrl(baseUrl) {
10538
10538
  return DEFAULT_BASE_URL;
10539
10539
  }
10540
10540
  }
10541
+ function isLocalhost(url2) {
10542
+ try {
10543
+ return new URL(url2).hostname === "localhost";
10544
+ } catch (e7) {
10545
+ return false;
10546
+ }
10547
+ }
10541
10548
  function createClient(options) {
10542
10549
  const clientOptions = options;
10543
- const throttleDelay = process.env.NODE_ENV !== "production" && clientOptions.__DANGEROUSLY_disableThrottling ? 0 : getThrottle(_nullishCoalesce(clientOptions.throttle, () => ( DEFAULT_THROTTLE)));
10550
+ const baseUrl = getBaseUrl(clientOptions.baseUrl);
10551
+ const throttleDelay = process.env.NODE_ENV !== "production" && isLocalhost(baseUrl) && clientOptions.__DANGEROUSLY_disableThrottling ? 0 : getThrottle(_nullishCoalesce(clientOptions.throttle, () => ( DEFAULT_THROTTLE)));
10544
10552
  const lostConnectionTimeout = getLostConnectionTimeout(
10545
10553
  _nullishCoalesce(clientOptions.lostConnectionTimeout, () => ( DEFAULT_LOST_CONNECTION_TIMEOUT))
10546
10554
  );
10547
10555
  const backgroundKeepAliveTimeout = getBackgroundKeepAliveTimeout(
10548
10556
  clientOptions.backgroundKeepAliveTimeout
10549
10557
  );
10550
- const baseUrl = getBaseUrl(clientOptions.baseUrl);
10551
10558
  const currentUserId = new Signal(void 0);
10552
10559
  const authManager = createAuthManager(options, (token) => {
10553
10560
  currentUserId.set(() => token.uid);