Comparing version 1.0.3 to 1.0.4
@@ -15,3 +15,3 @@ // Generated by LiveScript 1.2.0 | ||
MOZREPLPROMPT = 'repl>'; | ||
MOZREPLPROMPTRX = new RegExp(MOZREPLPROMPT + " $"); | ||
MOZREPLPROMPTRX = new RegExp("\n" + MOZREPLPROMPT + " $"); | ||
PORT = 8080; | ||
@@ -61,12 +61,11 @@ Args.version(PJson.version).option('-p, --port [port]', "fireprox listening port (default:" + PORT + ")", PORT).option('--mozrepl-host [host]', "mozrepl hostname or ip-address (default:" + MOZREPLHOST + ")", MOZREPLHOST).option('--mozrepl-port [port]', "mozrepl port (default:" + MOZREPLPORT + ")", MOZREPLPORT).parse(process.argv); | ||
client.on('data', responder).write(cmd); | ||
buffer = []; | ||
buffer = ''; | ||
function responder(it){ | ||
log(it.toString()); | ||
buffer.push(it); | ||
if (!MOZREPLPROMPTRX.test(it)) { | ||
buffer += it.toString(); | ||
if (!MOZREPLPROMPTRX.test(buffer)) { | ||
return; | ||
} | ||
client.removeListener('data', responder); | ||
res.send(buffer.toString().replace(MOZREPLPROMPT, '').trim()); | ||
return buffer = []; | ||
res.send(buffer.replace(MOZREPLPROMPTRX, '').trim()); | ||
return buffer = ''; | ||
} | ||
@@ -73,0 +72,0 @@ return responder; |
{ | ||
"name": "fireprox", | ||
"description": "A simple proxy for MozRepl over HTTP GET using express/node.js to control Firefox", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"author": "dizzib", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
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
6405
88