snapper-consumer
Advanced tools
Comparing version 0.2.4 to 1.0.0
@@ -5,3 +5,3 @@ { | ||
"main": "index.js", | ||
"version": "0.2.4", | ||
"version": "1.0.0", | ||
"authors": [ | ||
@@ -8,0 +8,0 @@ "Yan Qing <admin@zensh.com>" |
@@ -5,3 +5,3 @@ { | ||
"main": "index.js", | ||
"version": "0.2.4", | ||
"version": "1.0.0", | ||
"authors": [ | ||
@@ -8,0 +8,0 @@ "Yan Qing <admin@zensh.com>" |
10
index.js
@@ -106,3 +106,3 @@ // **License:** MIT | ||
if (ctx.pending[event.id]) { | ||
ctx.pending[event.id].callback(event.data.error, event.data.result) | ||
ctx.pending[event.id].done(event.data.error, event.data.result) | ||
} else { | ||
@@ -149,3 +149,3 @@ ctx.onmessage(event) | ||
this.params = JSON.stringify(jsonrpc.request(this.id, method, params)) | ||
this._callback = callback || noOp | ||
this.callback = callback || noOp | ||
@@ -155,3 +155,3 @@ this.pending = pending | ||
this.timer = setTimeout(function () { | ||
ctx.callback(new Error('Send RPC time out, ' + ctx.id + ', ' + ctx.params)) | ||
ctx.done(new Error('Send RPC time out, ' + ctx.id + ', ' + ctx.params)) | ||
}, TIMEOUT) | ||
@@ -167,5 +167,5 @@ } | ||
RpcCommand.prototype.callback = function (err, res) { | ||
RpcCommand.prototype.done = function (err, res) { | ||
if (!this.clear()) return this | ||
this._callback(err, res) | ||
this.callback(err, res) | ||
return this | ||
@@ -172,0 +172,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"main": "index.js", | ||
"version": "0.2.4", | ||
"version": "1.0.0", | ||
"authors": [ | ||
@@ -12,2 +12,12 @@ "Yan Qing <admin@zensh.com>" | ||
"license": "MIT", | ||
"dependencies": { | ||
"engine.io-client": "~1.5.4", | ||
"jsonrpc-lite": "~1.1.0" | ||
}, | ||
"devDependencies": { | ||
"standard": "^5.3.1" | ||
}, | ||
"scripts": { | ||
"test": "standard" | ||
}, | ||
"ignore": [ | ||
@@ -21,17 +31,3 @@ "**/.*", | ||
"component.json" | ||
], | ||
"dependencies": { | ||
"engine.io-client": "~1.5.2", | ||
"jsonrpc-lite": "~1.1.0" | ||
}, | ||
"devDependencies": { | ||
"gulp": "^3.9.0", | ||
"gulp-mocha": "^2.1.3", | ||
"gulp-sequence": "^0.4.0", | ||
"mocha": "^2.2.5", | ||
"standard": "^4.5.4" | ||
}, | ||
"scripts": { | ||
"test": "standard" | ||
} | ||
] | ||
} |
@@ -7,3 +7,3 @@ snapper-consumer | ||
## Snapper https://github.com/teambition/snapper | ||
## [Snapper-core](https://github.com/teambition/snapper-core) Teambition push messaging service | ||
@@ -10,0 +10,0 @@ ## Demo |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
1
10564
Updatedengine.io-client@~1.5.4