mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(package) rm charm
This commit is contained in:
parent
1392f73ce5
commit
ec42e12457
2 changed files with 1 additions and 22 deletions
|
|
@ -29,7 +29,6 @@
|
|||
ponse = require('ponse'),
|
||||
rendy = require('rendy'),
|
||||
copymitter = require('copymitter'),
|
||||
charm = require('charm'),
|
||||
|
||||
Modules = require(DIR_JSON + 'modules'),
|
||||
|
||||
|
|
@ -166,7 +165,7 @@
|
|||
* @param pParams {command, method, body, requrest, response}
|
||||
*/
|
||||
function onPUT(name, body, callback) {
|
||||
var cmd, files, data, from, to, error, msg, wasError, emitter;
|
||||
var cmd, files, data, from, to, error, msg;
|
||||
|
||||
Util.check(arguments, ['name', 'body', 'callback']);
|
||||
|
||||
|
|
@ -288,25 +287,8 @@
|
|||
|
||||
function copy(from, to, names, fn) {
|
||||
var error,
|
||||
prev = '',
|
||||
bar = charm(),
|
||||
cp = copymitter(from, to, names);
|
||||
|
||||
bar.pipe(process.stdout);
|
||||
bar.cursor(false);
|
||||
|
||||
cp.on('progress', function(percent) {
|
||||
bar.left(prev.length);
|
||||
|
||||
prev = rendy('copy {{ from }} -> {{ to }} {{ percent }}%', {
|
||||
to: to,
|
||||
from: from,
|
||||
percent: percent
|
||||
});
|
||||
|
||||
bar.write(prev);
|
||||
});
|
||||
|
||||
cp.on('error', function(e) {
|
||||
error = e;
|
||||
cp.abort();
|
||||
|
|
@ -314,8 +296,6 @@
|
|||
|
||||
cp.on('end', function() {
|
||||
fn(error);
|
||||
bar.write('\n');
|
||||
bar.cursor(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
"subdomain": "cloudcmd",
|
||||
"dependencies": {
|
||||
"ashify": "~1.0.0",
|
||||
"charm": "~1.0.0",
|
||||
"console-io": "~2.1.0",
|
||||
"copymitter": "~1.5.0",
|
||||
"edward": "~1.1.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue