Socket
Socket
Sign inDemoInstall

az-iot-helper

Package Overview
Dependencies
86
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.5 to 0.1.6

36

az-iot-helper-master/index.js

@@ -90,21 +90,25 @@ 'use strict';

function uploadFilesViaScp(config, sourceFileList, targetFileList, callback)
{
var finishedFileNumber = 0;
var totalFileNumber = sourceFileList.length;
{
if(sourceFileList.length == 0) return;
var prefix = config.device_user_name + ':' + config.device_password + '@' + config.device_host_name_or_ip_address + ':';
for(let i = 0; i < sourceFileList.length; i++)
{
var onClose = function(){
console.log( "- file '" + sourceFileList[i] + "' transferred" );
if(++finishedFileNumber == totalFileNumber)
{
if (callback){
callback();
}
var onClose = function(){
console.log( "- file '" + sourceFileList[0] + "' transferred" );
if(sourceFileList.length == 1)
{
if (callback){
callback();
}
};
setTimeout(function(){scp2.scp(sourceFileList[i], prefix + targetFileList[i], onClose);}, i * 2000);
}
}
else
{
sourceFileList.splice(0, 1);
targetFileList.splice(0, 1);
uploadFilesViaScp(config, sourceFileList, targetFileList, callback);
}
};
scp2.scp(sourceFileList[0], prefix + targetFileList[0], onClose);
}

@@ -111,0 +115,0 @@

{
"name": "az-iot-helper",
"version": "0.1.5",
"version": "0.1.6",
"description": "helper functions used by sample applications of Azure IoT Starter Kits",

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

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