@seneca/repl
Advanced tools
Comparing version 6.0.0 to 6.1.0
@@ -95,13 +95,8 @@ #!/usr/bin/env node | ||
this.buffer = [] | ||
// console.log('HTTP CTOR') | ||
this.processing = false | ||
} | ||
_write(chunk, encoding, callback) { | ||
this.processing = true | ||
const cmd = chunk.toString().trim() | ||
// console.log('HTTP WRITE', cmd) | ||
// this.buffer.push('FOO'+String.fromCharCode(0)) | ||
// this._read() | ||
// return callback() | ||
const url = this.spec.url | ||
@@ -139,2 +134,3 @@ | ||
this.buffer.push(res.out + String.fromCharCode(0)) | ||
this.processing = false | ||
this._read() | ||
@@ -157,3 +153,6 @@ callback() | ||
_read(size) { | ||
// console.log('H READ') | ||
if (this.processing) { | ||
return | ||
} | ||
let chunk | ||
@@ -165,2 +164,6 @@ while ((chunk = this.buffer.shift())) { | ||
} | ||
if (this.buffer.length === 0) { | ||
this.push(null) | ||
} | ||
} | ||
@@ -341,5 +344,13 @@ } | ||
} else { | ||
throw new Error( | ||
'unknown protocol: ' + protocol + ' for url: ' + spec.url.href, | ||
) | ||
try { | ||
const makeProtocol = require('./protocol-' + | ||
protocol.replace(/[^a-z0-9-_]/g, '') + | ||
'.js') | ||
return makeProtocol(spec) | ||
} catch (e) { | ||
// console.log(e) | ||
throw new Error( | ||
'unknown protocol: ' + protocol + ' for url: ' + spec.url.href, | ||
) | ||
} | ||
} | ||
@@ -346,0 +357,0 @@ |
@@ -122,2 +122,3 @@ "use strict"; | ||
} | ||
// TODO: fix: append newline id needed, otherwise times out! | ||
function send_cmd(msg, reply) { | ||
@@ -124,0 +125,0 @@ let seneca = this; |
{ | ||
"name": "@seneca/repl", | ||
"description": "Provides a client and server REPL for Seneca microservice systems.", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"main": "dist/repl.js", | ||
@@ -47,4 +47,5 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@aws-sdk/client-lambda": "^3.379.1", | ||
"@seneca/entity-util": "^1.4.0", | ||
"@seneca/maintain": "^0.1.0", | ||
"@seneca/entity-util": "^1.4.0", | ||
"jest": "^29.6.2", | ||
@@ -51,0 +52,0 @@ "prettier": "^3.0.0", |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
69092
1091
0
11
1