Skip to content

Commit

Permalink
v9.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrodger committed May 8, 2024
1 parent b0c265b commit 90ceb52
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 47 deletions.
14 changes: 0 additions & 14 deletions bin/protocol-aws.js
Expand Up @@ -32,7 +32,6 @@ class LambdaInvokeStream extends Duplex {
}

_write(chunk, encoding, done) {
// console.log('write', chunk)
this.processing = true
let cmd = chunk.toString()

Expand All @@ -52,20 +51,14 @@ class LambdaInvokeStream extends Duplex {
}),
}

// console.log('params',params)

const command = new InvokeCommand(params)

this.lambdaClient.send(command).then(
(data) => {
// console.log('data', data)
if (200 === data.StatusCode) {
let json = Buffer.from(data.Payload).toString()
// console.log('json', json)
const res = JSON.parse(json)
// console.log('res', res)
const body = JSON.parse(res.body)
// console.log('body', body)

let out = ''

Expand Down Expand Up @@ -103,8 +96,6 @@ class LambdaInvokeStream extends Duplex {
}

_read(size) {
// console.log('read', this.processing, this.buffer)

if (this.processing) {
return
}
Expand All @@ -123,8 +114,6 @@ class LambdaInvokeStream extends Duplex {
}

module.exports = function makeProtocol(spec) {
// console.log('MP AWS', spec)

let duplex = null

const service = spec.url.hostname
Expand All @@ -143,12 +132,9 @@ module.exports = function makeProtocol(spec) {
setImmediate(() => {
duplex.emit('connect')
})

// console.log(duplex)
} else {
throw new Error('Unknown AWS service: ' + service)
}

// console.log('PAWS', !!duplex)
return duplex
}
3 changes: 0 additions & 3 deletions bin/seneca-repl-exec.js
Expand Up @@ -265,15 +265,12 @@ function operate(spec, done) {
const responseChunks = []

state.connection.sock.on('data', function (chunk) {
// console.log('CHUNK', chunk.length, chunk.toString('ascii'))

if (0 < chunk.length && 0 === chunk[chunk.length - 1]) {
responseChunks.push(chunk.slice(0, chunk.length - 1))
let received = responseChunks.flat()
const str = received.toString('utf8')
responseChunks.length = 0
spec.first = false
console.log('HANDLE-DATA<' + str + '>')
handleResponse(str)
} else if (0 < chunk.length) {
responseChunks.push(chunk)
Expand Down
4 changes: 0 additions & 4 deletions dist/cmds.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cmds.js.map

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions dist/repl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/repl.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "@seneca/repl",
"description": "Provides a client and server REPL for Seneca microservice systems.",
"version": "9.0.0",
"version": "9.0.1",
"main": "dist/repl.js",
"license": "MIT",
"author": "Richard Rodger (https://github.com/rjrodger)",
Expand Down Expand Up @@ -48,7 +48,7 @@
"terser": "^5.31.0"
},
"devDependencies": {
"@aws-sdk/client-lambda": "^3.568.0",
"@aws-sdk/client-lambda": "^3.569.0",
"@seneca/entity-util": "^2.0.0",
"@seneca/gateway-auth": "^1.0.2",
"@seneca/maintain": "^0.1.0",
Expand All @@ -57,7 +57,7 @@
"@types/json-stringify-safe": "^5.0.3",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"seneca": "^3.35.3",
"seneca": "^3.36.0",
"seneca-doc": "^2.1.3",
"seneca-entity": "^25.1.3",
"seneca-mem-store": "^8.4.0",
Expand Down
4 changes: 0 additions & 4 deletions src/cmds.ts
Expand Up @@ -51,7 +51,6 @@ const ListCmd: Cmd = (spec: CmdSpec) => {
const { context, argstr, respond } = spec

let parts = argstr.trim().split(/\s+/)
// console.log('PARTS', parts)

if (0 < parts.length) {
if (parts[0].match(/^plugins?$/)) {
Expand All @@ -68,9 +67,7 @@ const FindCmd: Cmd = (spec: CmdSpec) => {
let narrow = context.seneca.util.Jsonic(argstr)

if ('string' === typeof narrow) {
// console.log('FP', narrow)
let plugin = context.seneca.find_plugin(narrow)
// console.log('FP p', plugin)
return respond(null, plugin)
}

Expand Down Expand Up @@ -306,7 +303,6 @@ const DelegateCmd: Cmd = (spec: CmdSpec) => {

let args = context.seneca.util.Jsonic(argstr) || []
args = Array.isArray(args) ? args : [args]
// console.log('DA', args, context.delegate)

let name = args[0]
let fromDelegateName = args[1]
Expand Down
10 changes: 0 additions & 10 deletions src/repl.ts
Expand Up @@ -121,8 +121,6 @@ function repl(this: any, options: any) {

let replInst: ReplInstance = replMap[replID]

// console.log('UR', replInst)

if (replInst && 'open' === replInst.status) {
return reply({
ok: true,
Expand Down Expand Up @@ -201,7 +199,6 @@ function repl(this: any, options: any) {

replInst.output.on('data', listener)

// console.log('SC write', cmd)
replInst.input.write(cmd)
}

Expand Down Expand Up @@ -449,7 +446,6 @@ class ReplInstance {
}

evaluate(cmdtext: any, context: any, filename: any, origRespond: any) {
// console.log('EVAL', cmdtext)
const seneca = this.seneca
const repl = this.repl
const options = this.options
Expand Down Expand Up @@ -478,8 +474,6 @@ class ReplInstance {
cmd_history.push(cmdtext)
}

// console.log('AAA', cmdtext)

if (alias[cmdtext]) {
cmdtext = alias[cmdtext]
}
Expand Down Expand Up @@ -507,7 +501,6 @@ class ReplInstance {
}

function execute_action(cmdtext: string) {
// console.log('EA', cmdtext)
try {
let msg = cmdtext

Expand All @@ -522,8 +515,6 @@ class ReplInstance {
let notmsg =
null == args || Array.isArray(args) || 'object' !== typeof args

// console.log('ARGS', args, notmsg)

if (notmsg) {
return false
}
Expand Down Expand Up @@ -567,7 +558,6 @@ class ReplInstance {
}

function execute_script(cmdtext: any) {
// console.log('EVAL SCRIPT', cmdtext)
try {
let script = (Vm as any).createScript(cmdtext, {
filename: filename,
Expand Down

0 comments on commit 90ceb52

Please sign in to comment.