Socket
Socket
Sign inDemoInstall

aws-iot-device-sdk-v2

Package Overview
Dependencies
126
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.0 to 1.8.1

deviceadvisor/script/DATestConfig.json

11

builder.json

@@ -10,3 +10,12 @@ {

"npm install"
]
],
"test_steps": [
"python3 -m pip install boto3",
"python3 deviceadvisor/script/DATestRun.py"],
"env": {
"DA_TOPIC": "test/da",
"DA_SHADOW_PROPERTY": "datest",
"DA_SHADOW_VALUE_SET": "ON",
"DA_SHADOW_VALUE_DEFAULT": "OFF"
}
}

11

deviceadvisor/tests/mqtt_connect/index.ts

@@ -22,6 +22,11 @@ /**

const timer = setInterval(() => { }, 60 * 1000);
try
{
await connection.connect();
await connection.disconnect();
} catch
{
process.exit(-1);
}
await connection.connect();
await connection.disconnect();
// Allow node to die if the promise above resolved

@@ -28,0 +33,0 @@ clearTimeout(timer);

@@ -14,3 +14,3 @@ {

"license": "Apache-2.0",
"main": "./dist/index.ts",
"main": "./dist/index.js",
"scripts": {

@@ -25,4 +25,5 @@ "tsc": "tsc",

"dependencies": {
"aws-iot-device-sdk-v2": "../../../"
"aws-iot-device-sdk-v2": "../../../",
"clean": "^4.0.2"
}
}

@@ -23,15 +23,20 @@ /**

// connect to mqtt
await connection.connect();
// publish message to topic
const msg = {
message: "Device Advisor Test"
};
const json_msg = JSON.stringify(msg);
await connection.publish(datest_utils.topic, json_msg, mqtt.QoS.AtLeastOnce);
// disconnect
await connection.disconnect();
try
{
// connect to mqtt
await connection.connect();
// publish message to topic
const msg = {
message: "Device Advisor Test"
};
const json_msg = JSON.stringify(msg);
await connection.publish(datest_utils.topic, json_msg, mqtt.QoS.AtMostOnce);
// disconnect
await connection.disconnect();
} catch
{
process.exit(-1)
}
// Allow node to die if the promise above resolved

@@ -38,0 +43,0 @@ clearTimeout(timer);

@@ -14,3 +14,3 @@ {

"license": "Apache-2.0",
"main": "./dist/index.ts",
"main": "./dist/index.js",
"scripts": {

@@ -17,0 +17,0 @@ "tsc": "tsc",

@@ -23,10 +23,15 @@ /**

// connect to mqtt
await connection.connect();
// subscribe message to topic
await connection.subscribe(datest_utils.topic, mqtt.QoS.AtMostOnce);
// disconnect
await connection.disconnect();
try{
// connect to mqtt
await connection.connect();
// subscribe message to topic
connection.subscribe(datest_utils.topic, mqtt.QoS.AtMostOnce);
// disconnect
await connection.disconnect();
} catch
{
process.exit(-1)
}

@@ -33,0 +38,0 @@ // Allow node to die if the promise above resolved

@@ -14,3 +14,3 @@ {

"license": "Apache-2.0",
"main": "./dist/index.ts",
"main": "./dist/index.js",
"scripts": {

@@ -17,0 +17,0 @@ "tsc": "tsc",

@@ -48,12 +48,19 @@ /**

// connect to mqtt
await connection.connect();
try{
// connect to mqtt
await connection.connect();
// create shadow client and update shadow
const shadow = new iotshadow.IotShadowClient(connection);
await change_shadow_value(shadow);
// disconnect
await connection.disconnect();
// create shadow client and update shadow
const shadow = new iotshadow.IotShadowClient(connection);
await change_shadow_value(shadow);
// disconnect
await connection.disconnect();
}
catch
{
process.exit(-1)
}
// Allow node to die if the promise above resolved

@@ -60,0 +67,0 @@ clearTimeout(timer);

@@ -14,3 +14,3 @@ {

"license": "Apache-2.0",
"main": "./dist/index.ts",
"main": "./dist/index.js",
"scripts": {

@@ -17,0 +17,0 @@ "tsc": "tsc",

{
"name": "aws-iot-device-sdk-v2",
"version": "1.8.0",
"version": "1.8.1",
"description": "NodeJS API for the AWS IoT service",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/aws/aws-iot-device-sdk-js-v2",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc