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

lyftp

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lyftp - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

46

core.js

@@ -101,19 +101,37 @@ let path = require('path')

p.forEach(item => pathArr.push(pathStr += item+ '/'))
// 直接创建文件夹,
return Promise.all(
pathArr.map(item=>{
return new Promise((resolve, reject) => {
this.ftp.mkdir(item, err=>{
let success = !err || err.message.toLowerCase().match('file exists')
if(success){
console.log('创建文件夹', item);
resolve()
}else{
console.log(item, err.message);
reject(err)
}
return new Promise((res, rej) => {
let P = p.join('/')
this.ftp.mkdir(P, err=>{
let success = !err || err.message.toLowerCase().match('file exists')
if(success) {
console.log(`路径创建成功 ==> ${P}`)
res()
} else {
Promise.all(
pathArr.map(item=>{
return new Promise((resolve, reject) => {
this.ftp.mkdir(item, err=>{
let success = !err || err.message.toLowerCase().match('file exists')
if(success){
console.log('创建文件夹', item);
resolve()
}else{
console.log(item, err.message);
reject(err)
}
})
})
})
).then(success => {
res()
}, fail => {
rej()
})
})
}
})
)
})
}

@@ -120,0 +138,0 @@ }

{
"name": "lyftp",
"version": "1.0.4",
"version": "1.0.5",
"description": "lyftp is ftp package, you can upload an entire folder or a file",

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

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