Comparing version 0.1.0 to 0.1.1
@@ -8,3 +8,3 @@ { | ||
"description": "Smith is an RPC agent system for Node.JS used in architect and vfs.", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"licenses" : [{ | ||
@@ -11,0 +11,0 @@ "type" : "MIT", |
17
smith.js
@@ -47,3 +47,10 @@ /* | ||
var self = this; | ||
if (arguments.length === 1) output = input; | ||
if (arguments.length === 1) { | ||
if (Array.isArray(input)) { | ||
output = input[1]; | ||
input = input[0]; | ||
} else { | ||
output = input; | ||
} | ||
} | ||
this.input = input; | ||
@@ -108,3 +115,3 @@ this.output = output; | ||
output.removeListener("close", onDisconnect); | ||
if (output.destroy) output.destroy(); | ||
if (output.destroy && output !== process.stdout) output.destroy(); | ||
} | ||
@@ -274,5 +281,9 @@ self.emit("disconnect"); | ||
}); | ||
this.emit("connect", this.remoteApi); | ||
this._emitConnect(); | ||
}; | ||
Agent.prototype._emitConnect = function () { | ||
this.emit("connect", this.remoteApi); | ||
} | ||
// Disconnect resets the state of the Agent, flushes callbacks and emits a | ||
@@ -279,0 +290,0 @@ // "disconnect" event with optional error object. |
Sorry, the diff of this file is not supported yet
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
29996
467