pinokiod 3.19.21 → 3.19.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/shell.js +8 -0
- package/package.json +1 -1
package/kernel/shell.js
CHANGED
|
@@ -251,6 +251,8 @@ class Shell {
|
|
|
251
251
|
|
|
252
252
|
this.ondata({ raw: `\r\n████\r\n██ Starting Shell ${this.id}\r\n` })
|
|
253
253
|
|
|
254
|
+
console.log("SHELL PARAMS", params)
|
|
255
|
+
|
|
254
256
|
|
|
255
257
|
this.start_time = Date.now()
|
|
256
258
|
this.params = params
|
|
@@ -453,6 +455,7 @@ class Shell {
|
|
|
453
455
|
}
|
|
454
456
|
this.prompt_pattern = await this.prompt(params.path)
|
|
455
457
|
this.cb = cb
|
|
458
|
+
console.log("This.exec")
|
|
456
459
|
let r = await this.exec(params)
|
|
457
460
|
return r
|
|
458
461
|
}
|
|
@@ -480,6 +483,7 @@ class Shell {
|
|
|
480
483
|
|
|
481
484
|
//let re = /([\r\n]+[^\r\n]+)(\1)/gs
|
|
482
485
|
let re = /(.+)(\1)/gs
|
|
486
|
+
console.log("Prompt spawn")
|
|
483
487
|
let term = pty.spawn(this.shell, this.args, config)
|
|
484
488
|
let ready
|
|
485
489
|
let vt = new Terminal({
|
|
@@ -489,6 +493,7 @@ class Shell {
|
|
|
489
493
|
vt.loadAddon(vts)
|
|
490
494
|
|
|
491
495
|
let queue = fastq((data, cb) => {
|
|
496
|
+
console.log("Vt.write", data)
|
|
492
497
|
vt.write(data, () => {
|
|
493
498
|
let buf = vts.serialize()
|
|
494
499
|
let re = /(.+)echo pinokio[\r\n]+pinokio[\r\n]+(\1)/gs
|
|
@@ -508,6 +513,7 @@ class Shell {
|
|
|
508
513
|
cb()
|
|
509
514
|
}, 1)
|
|
510
515
|
term.onData((data) => {
|
|
516
|
+
console.log({ data })
|
|
511
517
|
if (ready) {
|
|
512
518
|
queue.push(data)
|
|
513
519
|
} else {
|
|
@@ -971,8 +977,10 @@ class Shell {
|
|
|
971
977
|
if (!this.ptyProcess) {
|
|
972
978
|
// ptyProcess doesn't exist => create
|
|
973
979
|
this.done = false
|
|
980
|
+
console.log("EXEC SPAWN")
|
|
974
981
|
this.ptyProcess = pty.spawn(this.shell, this.args, config)
|
|
975
982
|
this.ptyProcess.onData((data) => {
|
|
983
|
+
console.log("EXEC ONDATA", data)
|
|
976
984
|
if (!this.monitor) {
|
|
977
985
|
this.monitor = ""
|
|
978
986
|
}
|