Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flowfuse/device-agent

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flowfuse/device-agent - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

6

CHANGELOG.md

@@ -0,1 +1,7 @@

#### 2.3.2: Release
- Remove Object.hasOwn (#248) @knolleary
- Add nodejs 18 & 20 to test runners (#247) @hardillb
- Respect shared-library and projectComms feature flags (#244) @Steve-Mcl
#### 2.3.1: Release

@@ -2,0 +8,0 @@

24

lib/launcher.js

@@ -65,2 +65,10 @@ const childProcess = require('child_process')

packageData.dependencies = JSON.parse(JSON.stringify(this.snapshot.modules))
// if we are working in a development env and the project nodes src is available in the right place,
// then use the development version of the project nodes
if (packageData.dependencies?.['@flowfuse/nr-project-nodes'] && process.env.NODE_ENV === 'development') {
const devPath = path.join(__dirname, '..', '..', 'nr-project-nodes')
if (existsSync(devPath)) {
packageData.dependencies['@flowfuse/nr-project-nodes'] = `file:${devPath}`
}
}
packageData.version = `0.0.0-${this.snapshot.id}`

@@ -169,8 +177,15 @@ packageData.name = this.snapshot.env.FF_PROJECT_NAME

teamID = this.config.brokerUsername.split(':')[1]
// Determine if projectLink is enabled (default to true if not set in settings for backwards compatibility)
const enabled = !!(this.settings?.features ? this.settings.features.projectComms : true)
projectLink = {
featureEnabled: enabled,
// always include the token to permit project enumeration in the project nodes.
// This permits the node to be usable/discoverable but no comms will
// be possible due to the feature being disabled and the broker url/user/pass being empty.
// The project nodes will inform the user of the need to enable or upgrade.
token: this.config.token,
broker: {
url: this.config.brokerURL,
username: this.config.brokerUsername,
password: this.config.brokerPassword
url: enabled ? this.config.brokerURL : '',
username: enabled ? this.config.brokerUsername : '',
password: enabled ? this.config.brokerPassword : ''
}

@@ -219,3 +234,4 @@ }

// if licensed, add shared library config
if (this.config.licensed) {
const libraryEnabled = this.settings?.features ? this.settings.features['shared-library'] : false
if (libraryEnabled && this.config.licensed) {
settings.nodesDir = [

@@ -222,0 +238,0 @@ path.join(__dirname, 'plugins', 'node_modules', '@flowforge', 'flowforge-library-plugin')

9

lib/logging/log.js
const LogBuffer = require('./logBuffer')
const { hasProperty } = require('../utils')

@@ -24,9 +25,9 @@ let buffer

jsMsg = JSON.parse(msg)
if (!hasProperty(jsMsg, 'ts') && !hasProperty(jsMsg, 'level')) {
// not a NR log message
jsMsg = { ts: Date.now(), level: '', msg }
}
} catch (eee) {
jsMsg = { ts: Date.now(), level: '', msg }
}
if (!Object.hasOwn(jsMsg, 'ts') && !Object.hasOwn(jsMsg, 'level')) {
// not a NR log message
jsMsg = { ts: Date.now(), level: '', msg }
}
const date = new Date(jsMsg.ts)

@@ -33,0 +34,0 @@ if (typeof jsMsg.msg !== 'string') {

@@ -76,3 +76,3 @@ const path = require('path')

/**
* Test if an object has a property
* Test if an object has a property - Node 14 friendly version of Object.hasOwn
* @param {Object} object - an object to check for a property

@@ -79,0 +79,0 @@ * @param {String} property - the name of the property to check for

{
"name": "@flowfuse/device-agent",
"version": "2.3.1",
"version": "2.3.2",
"description": "An Edge Agent for running Node-RED instances deployed from the FlowFuse Platform",

@@ -23,4 +23,4 @@ "exports": {

"test": "npm run test:lib && npm run test:frontend",
"test:lib": "mocha test/unit/**/*_spec.js",
"test:frontend": "mocha test/unit/frontend/**/*.spec.js"
"test:lib": "mocha 'test/unit/**/*_spec.js'",
"test:frontend": "mocha 'test/unit/frontend/**/*.spec.js'"
},

@@ -27,0 +27,0 @@ "bin": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc