pinokiod 3.19.22 → 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 +6 -0
- package/package.json +1 -1
package/kernel/shell.js
CHANGED
|
@@ -455,6 +455,7 @@ class Shell {
|
|
|
455
455
|
}
|
|
456
456
|
this.prompt_pattern = await this.prompt(params.path)
|
|
457
457
|
this.cb = cb
|
|
458
|
+
console.log("This.exec")
|
|
458
459
|
let r = await this.exec(params)
|
|
459
460
|
return r
|
|
460
461
|
}
|
|
@@ -482,6 +483,7 @@ class Shell {
|
|
|
482
483
|
|
|
483
484
|
//let re = /([\r\n]+[^\r\n]+)(\1)/gs
|
|
484
485
|
let re = /(.+)(\1)/gs
|
|
486
|
+
console.log("Prompt spawn")
|
|
485
487
|
let term = pty.spawn(this.shell, this.args, config)
|
|
486
488
|
let ready
|
|
487
489
|
let vt = new Terminal({
|
|
@@ -491,6 +493,7 @@ class Shell {
|
|
|
491
493
|
vt.loadAddon(vts)
|
|
492
494
|
|
|
493
495
|
let queue = fastq((data, cb) => {
|
|
496
|
+
console.log("Vt.write", data)
|
|
494
497
|
vt.write(data, () => {
|
|
495
498
|
let buf = vts.serialize()
|
|
496
499
|
let re = /(.+)echo pinokio[\r\n]+pinokio[\r\n]+(\1)/gs
|
|
@@ -510,6 +513,7 @@ class Shell {
|
|
|
510
513
|
cb()
|
|
511
514
|
}, 1)
|
|
512
515
|
term.onData((data) => {
|
|
516
|
+
console.log({ data })
|
|
513
517
|
if (ready) {
|
|
514
518
|
queue.push(data)
|
|
515
519
|
} else {
|
|
@@ -973,8 +977,10 @@ class Shell {
|
|
|
973
977
|
if (!this.ptyProcess) {
|
|
974
978
|
// ptyProcess doesn't exist => create
|
|
975
979
|
this.done = false
|
|
980
|
+
console.log("EXEC SPAWN")
|
|
976
981
|
this.ptyProcess = pty.spawn(this.shell, this.args, config)
|
|
977
982
|
this.ptyProcess.onData((data) => {
|
|
983
|
+
console.log("EXEC ONDATA", data)
|
|
978
984
|
if (!this.monitor) {
|
|
979
985
|
this.monitor = ""
|
|
980
986
|
}
|