Fix SFTP Upload and Update package.json
parent
496504282b
commit
3e81485d43
|
|
@ -1,5 +1,5 @@
|
|||
var fs = require('fs');
|
||||
var ssh2SftpClient = require('node-ssh')
|
||||
const { NodeSSH } = require('node-ssh');
|
||||
module.exports = function(s,config,lang){
|
||||
//SFTP
|
||||
var sftpErr = function(groupKey,err){
|
||||
|
|
@ -27,12 +27,11 @@ module.exports = function(s,config,lang){
|
|||
if(userDetails.sftp_dir !== ''){
|
||||
userDetails.sftp_dir = s.checkCorrectPathEnding(userDetails.sftp_dir)
|
||||
}
|
||||
var sftp = new ssh2SftpClient()
|
||||
var connectionDetails = {
|
||||
const sftp = new NodeSSH();
|
||||
const connectionDetails = {
|
||||
host: userDetails.sftp_host,
|
||||
port: userDetails.sftp_port
|
||||
port: userDetails.sftp_port || 22,
|
||||
}
|
||||
if(!userDetails.sftp_port)connectionDetails.port = 22
|
||||
if(userDetails.sftp_username && userDetails.sftp_username !== '')connectionDetails.username = userDetails.sftp_username
|
||||
if(userDetails.sftp_password && userDetails.sftp_password !== '')connectionDetails.password = userDetails.sftp_password
|
||||
if(userDetails.sftp_privateKey && userDetails.sftp_privateKey !== '')connectionDetails.privateKey = userDetails.sftp_privateKey
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
37
package.json
37
package.json
|
|
@ -16,14 +16,17 @@
|
|||
"dependencies": {
|
||||
"async": "^3.1.0",
|
||||
"aws-sdk": "^2.731.0",
|
||||
"backblaze-b2": "^1.5.0",
|
||||
"backblaze-b2": "^0.9.12",
|
||||
"body-parser": "^1.19.0",
|
||||
"connection-tester": "^0.2.0",
|
||||
"cws": "^1.2.11",
|
||||
"discord.js": "^12.2.0",
|
||||
"ejs": "^2.5.5",
|
||||
"express": "^4.16.4",
|
||||
"ftp-srv": "4.3.4",
|
||||
"express-fileupload": "^1.1.6-alpha.6",
|
||||
"fs-extra": "9.0.1",
|
||||
"ftp-srv": "^4.4.0",
|
||||
"googleapis": "^71.0.0",
|
||||
"http-proxy": "^1.17.0",
|
||||
"jsonfile": "^3.0.1",
|
||||
"knex": "^0.21.4",
|
||||
|
|
@ -31,27 +34,24 @@
|
|||
"moment": "^2.27.0",
|
||||
"mp4frag": "^0.2.0",
|
||||
"mysql": "^2.18.1",
|
||||
"shinobi-onvif": "0.1.9",
|
||||
"node-ssh": "^5.1.2",
|
||||
"node-fetch": "3.0.0-beta.9",
|
||||
"node-ssh": "^11.1.1",
|
||||
"node-telegram-bot-api": "^0.52.0",
|
||||
"nodemailer": "^6.4.11",
|
||||
"pam-diff": "^1.0.0",
|
||||
"pam-diff": "github:kevinGodell/pam-diff",
|
||||
"path": "^0.12.7",
|
||||
"pipe2pam": "^0.6.2",
|
||||
"request": "^2.88.0",
|
||||
"sat": "^0.7.1",
|
||||
"shinobi-onvif": "0.1.9",
|
||||
"shinobi-sound-detection": "^0.1.8",
|
||||
"smtp-server": "^3.5.0",
|
||||
"socket.io": "^2.3.0",
|
||||
"socket.io-client": "^2.3.0",
|
||||
"webdav-fs": "^1.11.0",
|
||||
"express-fileupload": "^1.1.6-alpha.6",
|
||||
"googleapis": "^39.2.0",
|
||||
"tree-kill":"1.2.2",
|
||||
"unzipper":"0.10.11",
|
||||
"node-fetch":"3.0.0-beta.9",
|
||||
"fs-extra": "9.0.1"
|
||||
"tree-kill": "1.2.2",
|
||||
"unzipper": "0.10.11",
|
||||
"webdav-fs": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"bin": "camera.js",
|
||||
"scripts": {
|
||||
"test": "node camera.js test",
|
||||
|
|
@ -67,13 +67,12 @@
|
|||
"targets": [
|
||||
"node12"
|
||||
],
|
||||
"scripts": [
|
||||
],
|
||||
"scripts": [],
|
||||
"assets": [
|
||||
"definitions/*",
|
||||
"languages/*",
|
||||
"web/*",
|
||||
"test/*"
|
||||
"definitions/*",
|
||||
"languages/*",
|
||||
"web/*",
|
||||
"test/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue