New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

labstack

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

labstack - npm Package Compare versions

Comparing version
0.32.0
to
0.32.1
+8
-2
lib/hub.js
const mqtt = require('mqtt')
class Hub {
constructor(accountID, apiKey, options) {
constructor(accountID, apiKey, deviceID, options) {
this.accountID = accountID
this.apiKey = apiKey
this.deviceID = this._normalizeDeviceID(deviceID)
this.handlers = {}

@@ -11,2 +12,6 @@ this.options = options || {}

_normalizeDeviceID(id) {
return `${this.accountID}:${id}`
}
_normalizeTopic(topic) {

@@ -23,3 +28,4 @@ return `${this.accountID}/${topic}`

username: this.accountID,
password: this.apiKey
password: this.apiKey,
clientId: this.deviceID
})

@@ -26,0 +32,0 @@ this.client.on('connect', function () {

+1
-1
{
"name": "labstack",
"version": "0.32.0",
"version": "0.32.1",
"description": "Official Node.js client library for the LabStack platform",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,3 +5,3 @@ const express = require('express')

const hub = new Hub('ie8t5fgcb6s2vaxgg02y', 'VouXFKK2A1TkuMUVz3wV2zvmapIdRuFM', {
const hub = new Hub('ie8t5fgcb6s2vaxgg02y', 'VouXFKK2A1TkuMUVz3wV2zvmapIdRuFM', 'node', {
messageHandler: function(topic, message) {

@@ -8,0 +8,0 @@ console.log(topic, message)