@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.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.
|
|
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;
|
|
@@ -1406,8 +1407,9 @@ var HttpInterceptor = class {
|
|
|
1406
1407
|
let responseSize = 0;
|
|
1407
1408
|
res.on("data", (chunk) => {
|
|
1408
1409
|
if (responseSize < MAX_BODY_SIZE) {
|
|
1409
|
-
|
|
1410
|
-
|
|
1410
|
+
const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
1411
|
+
responseChunks.push(buf);
|
|
1412
|
+
responseSize += buf.length;
|
|
1411
1413
|
}
|
|
1412
1414
|
});
|
|
1413
1415
|
res.on("end", () => {
|
|
@@ -3002,17 +3004,17 @@ var LimelightClient = class {
|
|
|
3002
3004
|
if (typeof XMLHttpRequest !== "undefined") {
|
|
3003
3005
|
this.xhrInterceptor.setup(this.config);
|
|
3004
3006
|
}
|
|
3005
|
-
if (
|
|
3007
|
+
if (isServer()) {
|
|
3006
3008
|
this.httpInterceptor.setup(this.config);
|
|
3007
3009
|
}
|
|
3008
3010
|
}
|
|
3009
3011
|
if (this.config.enableConsole) {
|
|
3010
3012
|
this.consoleInterceptor.setup(this.config);
|
|
3011
|
-
if (
|
|
3013
|
+
if (isServer()) {
|
|
3012
3014
|
this.errorInterceptor.setup(this.config);
|
|
3013
3015
|
}
|
|
3014
3016
|
}
|
|
3015
|
-
if (this.config.enableRenderInspector &&
|
|
3017
|
+
if (this.config.enableRenderInspector && !isServer()) {
|
|
3016
3018
|
this.renderInterceptor.setup(this.config);
|
|
3017
3019
|
}
|
|
3018
3020
|
if (this.config.stores && this.config.enableStateInspector) {
|