@livuvo/live-sdk-base
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./remoteEvents-80a52558.js");require("react");const t=class{static connect({userToken:e,brokerURL:s,neoURL:i}){t.getState().setUserToken(e);const o=n.mqtt_browserExports.connect(s,{keepalive:30,protocolId:"MQTT",protocolVersion:4,clean:!0,reconnectPeriod:1e3,connectTimeout:30*1e3,clientId:`${e.space_slug}:${e.slug}:${e.user_id}:${e.session}`,username:e.user_id,password:e.token,will:{topic:"WillMsg",payload:"Connection Closed abnormally..!",qos:0,retain:!1},rejectUnauthorized:!1});t.client=o,o.on("connect",t.onMqttConnected),o.on("reconnect",t.onMqttDisconnected),o.on("error",t.onMqttDisconnected),o.on("offline",t.onMqttDisconnected),o.on("end",t.onMqttDisconnected)}static onMqttConnected(){n.RemoteEvents.subscribe(t.client),t.setState({connected:!0})}static onMqttDisconnected(){t.setState({connected:!1})}static disconnect(){n.RemoteEvents.unsubscribe(t.client),t.client.off("connect",t.onMqttConnected),t.client.off("reconnect",t.onMqttDisconnected),t.client.off("error",t.onMqttDisconnected),t.client.off("offline",t.onMqttDisconnected),t.client.off("end",t.onMqttDisconnected)}static get setState(){return n.useStore.setState}static get getState(){return n.useStore.getState}static get subscribe(){return n.useStore.subscribe}static get events(){const{userToken:e}=t.getState();return n.createEvents({client:null,userToken:e})}};let c=t;c.client=null;exports.LivuvoLive=c; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./remoteEvents-971944d7.js");require("react");const t=class{static connect({userToken:e,brokerURL:s,neoURL:i}){t.getState().setUserToken(e);const o=n.mqtt_browserExports.connect(s,{keepalive:30,protocolId:"MQTT",protocolVersion:4,clean:!0,reconnectPeriod:1e3,connectTimeout:30*1e3,clientId:`${e.space_slug}:${e.slug}:${e.user_id}:${e.session}`,username:e.user_id,password:e.token,will:{topic:"WillMsg",payload:"Connection Closed abnormally..!",qos:0,retain:!1},rejectUnauthorized:!1});t.client=o,o.on("connect",t.onMqttConnected),o.on("reconnect",t.onMqttDisconnected),o.on("error",t.onMqttDisconnected),o.on("offline",t.onMqttDisconnected),o.on("end",t.onMqttDisconnected)}static onMqttConnected(){n.RemoteEvents.subscribe(t.client),t.setState({connected:!0})}static onMqttDisconnected(){t.setState({connected:!1})}static disconnect(){n.RemoteEvents.unsubscribe(t.client),t.client.off("connect",t.onMqttConnected),t.client.off("reconnect",t.onMqttDisconnected),t.client.off("error",t.onMqttDisconnected),t.client.off("offline",t.onMqttDisconnected),t.client.off("end",t.onMqttDisconnected)}static get setState(){return n.useStore.setState}static get getState(){return n.useStore.getState}static get subscribe(){return n.useStore.subscribe}static get events(){const{userToken:e}=t.getState();return n.createEvents({client:null,userToken:e})}};let c=t;c.client=null;exports.LivuvoLive=c; |
@@ -1,2 +0,2 @@ | ||
import { m as i, R as o, u as c, c as r } from "./remoteEvents-40c91fa3.mjs"; | ||
import { m as i, R as o, u as c, c as r } from "./remoteEvents-753c2303.mjs"; | ||
import "react"; | ||
@@ -3,0 +3,0 @@ const t = class { |
{ | ||
"name": "@livuvo/live-sdk-base", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"main": "./index.js", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
966803
16300
5