@getlimelight/sdk 0.7.9 → 0.7.10

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.mjs CHANGED
@@ -256,7 +256,7 @@ var LIMELIGHT_WEB_WSS_URL = "wss://api.getlimelight.io";
256
256
  var LIMELIGHT_DESKTOP_WSS_URL = "ws://localhost:8484";
257
257
  var LIMELIGHT_MCP_WS_URL = "ws://localhost:9229";
258
258
  var WS_PATH = "/limelight";
259
- var SDK_VERSION = true ? "0.7.9" : "test-version";
259
+ var SDK_VERSION = true ? "0.7.10" : "test-version";
260
260
  var RENDER_THRESHOLDS = {
261
261
  HOT_VELOCITY: 5,
262
262
  HIGH_RENDER_COUNT: 50,
@@ -522,6 +522,7 @@ var formatRequestName = (url) => {
522
522
 
523
523
  // src/helpers/utils/environment.ts
524
524
  var hasDOM = () => typeof window !== "undefined" && typeof document !== "undefined";
525
+ var isServer = () => !hasDOM() && typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
525
526
 
526
527
  // src/helpers/render/generateRenderId.ts
527
528
  var counter = 0;
@@ -3003,17 +3004,17 @@ var LimelightClient = class {
3003
3004
  if (typeof XMLHttpRequest !== "undefined") {
3004
3005
  this.xhrInterceptor.setup(this.config);
3005
3006
  }
3006
- if (!hasDOM()) {
3007
+ if (isServer()) {
3007
3008
  this.httpInterceptor.setup(this.config);
3008
3009
  }
3009
3010
  }
3010
3011
  if (this.config.enableConsole) {
3011
3012
  this.consoleInterceptor.setup(this.config);
3012
- if (!hasDOM()) {
3013
+ if (isServer()) {
3013
3014
  this.errorInterceptor.setup(this.config);
3014
3015
  }
3015
3016
  }
3016
- if (this.config.enableRenderInspector && hasDOM()) {
3017
+ if (this.config.enableRenderInspector && !isServer()) {
3017
3018
  this.renderInterceptor.setup(this.config);
3018
3019
  }
3019
3020
  if (this.config.stores && this.config.enableStateInspector) {