pinokiod 3.2.88 → 3.2.90

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/index.js CHANGED
@@ -338,14 +338,11 @@ class Kernel {
338
338
  // let contents = await fs.promises.readdir(this.homedir)
339
339
  //await this.bin.init()
340
340
  let ts = Date.now()
341
- console.time("bin.init " + ts)
342
341
  this.bin.init().then(() => {
343
- console.timeEnd("bin.init" + ts)
342
+ console.log("bin init finished")
344
343
  })
345
344
  let ts2 = Date.now()
346
- console.time("api.init " + ts2)
347
345
  await this.api.init()
348
- console.timeEnd("api.init " + ts2)
349
346
 
350
347
  //await this.shell.init()
351
348
 
@@ -406,9 +403,7 @@ class Kernel {
406
403
  */
407
404
  console.log("> 4")
408
405
  let ts3 = Date.now()
409
- console.time("shell.init " + ts3)
410
406
  this.shell.init().then(() => {
411
- console.timeEnd("shell.init" + ts3)
412
407
  if (this.envs) {
413
408
  this.template.update({
414
409
  env: this.envs,
package/kernel/shell.js CHANGED
@@ -453,8 +453,10 @@ class Shell {
453
453
  let delimiter
454
454
  if (this.platform === "win32") {
455
455
  delimiter = " && "; // must use &&. & doesn't necessariliy wait until the curruent command finishes
456
+ params.message.push(`echo "--- pinokio shell.run finished: %PINOKIO_SHELL_START% ---"`)
456
457
  } else {
457
458
  delimiter = " ; ";
459
+ params.message.push('echo "--- pinokio shell.run finished $PINOKIO_SHELL_START ---"')
458
460
  }
459
461
  return params.message.filter((m) => {
460
462
  return m && !/^\s+$/.test(m)
@@ -689,6 +691,7 @@ class Shell {
689
691
  this.done = false
690
692
  this.ptyProcess = pty.spawn(this.shell, this.args, config)
691
693
  this.ptyProcess.onData((data) => {
694
+ console.log("****** onData", data)
692
695
  if (!this.done) {
693
696
  this.queue.push(data)
694
697
  }
@@ -840,9 +843,11 @@ ${cleaned}
840
843
  // Decide whether to kill or continue
841
844
  if (this.ready) {
842
845
  // when ready, watch out for the prompt pattern that terminates with [\r\n ]
843
- let termination_prompt_re = new RegExp(this.prompt_pattern + "[ \r\n]*$", "g")
846
+ //let termination_prompt_re = new RegExp(this.prompt_pattern + "[ \r\n]*$", "g")
847
+ let termination_prompt_re = new RegExp(".*--- pinokio shell.run finished: [0-9]+ ---.*", "g")
844
848
  let line = cleaned.replaceAll(/[\r\n]/g, "")
845
849
  let test = line.match(termination_prompt_re)
850
+ console.log({ line, test, termination_prompt_re })
846
851
  if (test) {
847
852
  let cache = cleaned
848
853
  let cached_msg = msg
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.88",
3
+ "version": "3.2.90",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {