@seneca/repl
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -47,4 +47,2 @@ #!/usr/bin/env node | ||
url = new URL(replAddr) | ||
// console.log('URL', url) | ||
host = url.hostname || host | ||
@@ -78,3 +76,2 @@ port = '' === url.port ? port : parseInt(url.port) | ||
.map((line) => (null != line && '' != line ? history.push(line) : null)) | ||
console.log('H', history) | ||
} | ||
@@ -115,4 +112,2 @@ | ||
// console.log('PD', postData) | ||
let req = httpClient | ||
@@ -136,7 +131,4 @@ .request( | ||
response.on('end', () => { | ||
// console.log('DATA', data) | ||
let res = JSON.parse(data) | ||
// console.log('res', res) | ||
// console.log('HE', data, res) | ||
if (res.ok) { | ||
@@ -157,3 +149,2 @@ this.buffer.push(res.out + String.fromCharCode(0)) | ||
.on('error', (err) => { | ||
// console.log('HE', err) | ||
this.buffer.push(`# ERROR: ${err}\n` + String.fromCharCode(0)) | ||
@@ -209,5 +200,3 @@ this._read() | ||
state.connection.sock = connect(spec) | ||
// console.log('SOCK', !!state.connection.sock) | ||
} catch (err) { | ||
// console.log('CA', err) | ||
return done && done({ err }) | ||
@@ -217,4 +206,2 @@ } | ||
state.connection.sock.on('connect', function () { | ||
// console.log('SOCK connect') | ||
state.connection.open = true | ||
@@ -234,3 +221,2 @@ delete state.connection.closed | ||
state.connection.sock.on('error', function (err) { | ||
// console.log('CE', err) | ||
if (state.connection.open) { | ||
@@ -242,3 +228,2 @@ return done && done({ event: 'error', err }) | ||
state.connection.sock.on('close', function (err) { | ||
// console.log('CC', err) | ||
if (state.connection.open) { | ||
@@ -264,3 +249,2 @@ spec.log('\n\nConnection closed.') | ||
const str = chunk.toString('ascii') | ||
// console.log('SOCK DATA', str) | ||
@@ -320,4 +304,2 @@ if (0 < str.length && 0 === str.charCodeAt(str.length - 1)) { | ||
.on('line', (line) => { | ||
// console.log('LINE', line) | ||
if (state.connection.closed) { | ||
@@ -382,3 +364,2 @@ return setImmediate(() => { | ||
} catch (e) { | ||
// console.log(e) | ||
throw new Error( | ||
@@ -385,0 +366,0 @@ 'unknown protocol: ' + protocol + ' for url: ' + spec.url.href, |
{ | ||
"name": "@seneca/repl", | ||
"description": "Provides a client and server REPL for Seneca microservice systems.", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"main": "dist/repl.js", | ||
@@ -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
78962
1223