@coorpacademy/squirrel
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -38,9 +38,24 @@ #! /usr/bin/env node | ||
})().then(function() { | ||
return Promise.fromCallback(function(cb) { | ||
fs.readdir(path.join(source, cwd), cb); | ||
}); | ||
}).then(function(files) { | ||
return Promise.all(files.map(function(file) { | ||
syncEntry(path.join(cwd, file)); | ||
})); | ||
return Promise.all([ | ||
Promise.fromCallback(function(cb) { | ||
fs.readdir(path.join(source, cwd), cb); | ||
}), | ||
driver.get(cwd) | ||
]); | ||
}).then(function(results) { | ||
var files = results[0]; | ||
var node = results[1]; | ||
return Promise.all([].concat( | ||
files.map(function(file) { | ||
return syncEntry(path.join(cwd, file)); | ||
}), | ||
node.nodes.filter(function(node) { | ||
return !~files.indexOf(node.key); | ||
}).map(function(node) { | ||
if (node.dir) | ||
return driver.rmdir(path.join(cwd, node.key)); | ||
return driver.del(path.join(cwd, node.key)); | ||
}) | ||
)); | ||
}); | ||
@@ -47,0 +62,0 @@ } |
{ | ||
"name": "@coorpacademy/squirrel", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "High level client for Coorpacademy's squirrel service", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -131,3 +131,3 @@ 'use strict'; | ||
'key', | ||
path.relative(options.cwd, node.key), | ||
path.relative(options.cwd, node.key || ''), | ||
node | ||
@@ -134,0 +134,0 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13220
352