0.0.8 fix issue for emit, bind this to execute callback
parent
6da55d924c
commit
7439c7e577
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@uci-utils/sync",
|
"name": "@uci-utils/sync",
|
||||||
"version": "0.0.7",
|
"version": "0.0.8",
|
||||||
"description": "module to copy, maintain, and launch hardware modules on other machines",
|
"description": "module to copy, maintain, and launch hardware modules on other machines",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -38,15 +38,15 @@
|
||||||
"await-to-js": "^2.1.1",
|
"await-to-js": "^2.1.1",
|
||||||
"conf": "^2.2.0",
|
"conf": "^2.2.0",
|
||||||
"debounce-fn": "^1.0.0",
|
"debounce-fn": "^1.0.0",
|
||||||
"esm": "^3.2.5",
|
"esm": "^3.2.7",
|
||||||
"fs-read-data": "^1.0.4",
|
"fs-read-data": "^1.0.4",
|
||||||
"path-exists": "^3.0.0",
|
"path-exists": "^3.0.0",
|
||||||
"yargs": "^13.2.0"
|
"yargs": "^13.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"mocha": "^5.x",
|
"mocha": "^6.x",
|
||||||
"nodemon": "^1.18.9",
|
"nodemon": "^1.18.10",
|
||||||
"ondeath": "^1.0.0"
|
"ondeath": "^1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,7 +238,8 @@ class Sync extends merge(Rsync, Emitter) {
|
||||||
log.info({cmd:cmd, status:status, msg:'sync run'})
|
log.info({cmd:cmd, status:status, msg:'sync run'})
|
||||||
if (!errors) this.emit('sync',status)
|
if (!errors) this.emit('sync',status)
|
||||||
resolve({cmd:cmd, errors:errors, status:status, msg:'sync run'})
|
resolve({cmd:cmd, errors:errors, status:status, msg:'sync run'})
|
||||||
}, function(data) {
|
}.bind(this),
|
||||||
|
function(data) {
|
||||||
status += data.toString()
|
status += data.toString()
|
||||||
if (opts.cli) process.stdout.write(data.toString())
|
if (opts.cli) process.stdout.write(data.toString())
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue