@getlimelight/sdk 0.7.8 → 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.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -292,7 +292,7 @@ var LIMELIGHT_WEB_WSS_URL = "wss://api.getlimelight.io";
|
|
|
292
292
|
var LIMELIGHT_DESKTOP_WSS_URL = "ws://localhost:8484";
|
|
293
293
|
var LIMELIGHT_MCP_WS_URL = "ws://localhost:9229";
|
|
294
294
|
var WS_PATH = "/limelight";
|
|
295
|
-
var SDK_VERSION = true ? "0.7.
|
|
295
|
+
var SDK_VERSION = true ? "0.7.10" : "test-version";
|
|
296
296
|
var RENDER_THRESHOLDS = {
|
|
297
297
|
HOT_VELOCITY: 5,
|
|
298
298
|
HIGH_RENDER_COUNT: 50,
|
|
@@ -558,6 +558,7 @@ var formatRequestName = (url) => {
|
|
|
558
558
|
|
|
559
559
|
// src/helpers/utils/environment.ts
|
|
560
560
|
var hasDOM = () => typeof window !== "undefined" && typeof document !== "undefined";
|
|
561
|
+
var isServer = () => !hasDOM() && typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
|
|
561
562
|
|
|
562
563
|
// src/helpers/render/generateRenderId.ts
|
|
563
564
|
var counter = 0;
|
|
@@ -1442,8 +1443,9 @@ var HttpInterceptor = class {
|
|
|
1442
1443
|
let responseSize = 0;
|
|
1443
1444
|
res.on("data", (chunk) => {
|
|
1444
1445
|
if (responseSize < MAX_BODY_SIZE) {
|
|
1445
|
-
|
|
1446
|
-
|
|
1446
|
+
const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
1447
|
+
responseChunks.push(buf);
|
|
1448
|
+
responseSize += buf.length;
|
|
1447
1449
|
}
|
|
1448
1450
|
});
|
|
1449
1451
|
res.on("end", () => {
|
|
@@ -3038,17 +3040,17 @@ var LimelightClient = class {
|
|
|
3038
3040
|
if (typeof XMLHttpRequest !== "undefined") {
|
|
3039
3041
|
this.xhrInterceptor.setup(this.config);
|
|
3040
3042
|
}
|
|
3041
|
-
if (
|
|
3043
|
+
if (isServer()) {
|
|
3042
3044
|
this.httpInterceptor.setup(this.config);
|
|
3043
3045
|
}
|
|
3044
3046
|
}
|
|
3045
3047
|
if (this.config.enableConsole) {
|
|
3046
3048
|
this.consoleInterceptor.setup(this.config);
|
|
3047
|
-
if (
|
|
3049
|
+
if (isServer()) {
|
|
3048
3050
|
this.errorInterceptor.setup(this.config);
|
|
3049
3051
|
}
|
|
3050
3052
|
}
|
|
3051
|
-
if (this.config.enableRenderInspector &&
|
|
3053
|
+
if (this.config.enableRenderInspector && !isServer()) {
|
|
3052
3054
|
this.renderInterceptor.setup(this.config);
|
|
3053
3055
|
}
|
|
3054
3056
|
if (this.config.stores && this.config.enableStateInspector) {
|