pinokiod 3.12.0 → 3.12.2

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.
@@ -155,6 +155,7 @@ module.exports = {
155
155
  }
156
156
  requirements = requirements.concat([
157
157
  { name: "git", },
158
+ { name: "uv", },
158
159
  { name: "caddy", },
159
160
  { name: "py", },
160
161
  ])
@@ -166,6 +167,7 @@ module.exports = {
166
167
  requirements,
167
168
  conda_requirements: [
168
169
  zip_cmd,
170
+ "uv",
169
171
  "git",
170
172
  "caddy"
171
173
  ]
@@ -181,6 +183,7 @@ module.exports = {
181
183
  }
182
184
  requirements = requirements.concat([
183
185
  { name: "git", },
186
+ { name: "uv", },
184
187
  { name: "caddy", },
185
188
  { name: "py", },
186
189
  ])
@@ -192,6 +195,7 @@ module.exports = {
192
195
  requirements,
193
196
  conda_requirements: [
194
197
  zip_cmd,
198
+ "uv",
195
199
  "git",
196
200
  "caddy"
197
201
  ]
package/kernel/shell.js CHANGED
@@ -37,7 +37,7 @@ class Shell {
37
37
 
38
38
  // Windows: /D => ignore AutoRun Registry Key
39
39
  // Others: --noprofile => ignore .bash_profile, --norc => ignore .bashrc
40
- this.args = this.platform === 'win32' ? ["/D"] : ["--noprofile", "--norc"]
40
+ this.args = this.platform === 'win32' ? ["/D"] : ["--noprofile", "--norc",]
41
41
 
42
42
  //this.vt = new Terminal({ allowProposedApi: true, scrollback: 5, })
43
43
  // this.vt = new Terminal({
@@ -324,6 +324,7 @@ class Shell {
324
324
  this.vt.resize(cols, rows)
325
325
  }
326
326
  emit2(message) {
327
+ console.log("emit2", message)
327
328
  let i = 0;
328
329
  const interval = setInterval(() => {
329
330
  if (i >= message.length) {
@@ -331,6 +332,7 @@ class Shell {
331
332
  return;
332
333
  }
333
334
  let chunk = message.slice(i, i+1024)
335
+ console.log("chunk", i, chunk)
334
336
  this.ptyProcess.write(chunk)
335
337
  i += 1024;
336
338
  }, 10);
@@ -341,6 +343,8 @@ class Shell {
341
343
  } else {
342
344
  if (this.ptyProcess) {
343
345
  if (this.input) {
346
+ console.log("emit", { message })
347
+ console.log(Buffer.from(message))
344
348
  this.ptyProcess.write(message)
345
349
  }
346
350
  }
@@ -929,6 +933,8 @@ class Shell {
929
933
  this.done = false
930
934
  this.ptyProcess = pty.spawn(this.shell, this.args, config)
931
935
  this.ptyProcess.onData((data) => {
936
+ console.log("onData", { data })
937
+ console.log([...data].map(c => c.charCodeAt(0)));
932
938
  if (!this.done) {
933
939
  this.queue.push(data)
934
940
  }
@@ -1160,6 +1166,9 @@ ${cleaned}
1160
1166
  this.ready = true
1161
1167
  if (this.ptyProcess) {
1162
1168
  this.ptyProcess.write(`${this.cmd}${os.EOL}`)
1169
+ // setTimeout(() => {
1170
+ // this.ptyProcess.write('\x1B[?2004h');
1171
+ // }, 500)
1163
1172
  }
1164
1173
  }
1165
1174
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.12.0",
3
+ "version": "3.12.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/socket.js CHANGED
@@ -25,6 +25,7 @@ class Socket {
25
25
  });
26
26
  ws.on('message', async (message, isBinary) => {
27
27
  let req
28
+ console.log({ message, isBinary })
28
29
  if (isBinary) {
29
30
  const buffer = Buffer.from(message);
30
31
  const sepIndex = buffer.indexOf(0);
@@ -662,8 +662,10 @@ document.addEventListener("DOMContentLoaded", async () => {
662
662
  }
663
663
  if ((event.ctrlKey || event.metaKey) && event.key === 'v') {
664
664
  navigator.clipboard.readText().then((text) => {
665
+ console.log({ text })
665
666
  this.socket.run({
666
- key: "\x1b[200~" + text + "\x1b[201~",
667
+ //key: "\x1b[200~" + text + "\x1b[201~",
668
+ key: text,
667
669
  id: shell_id
668
670
  })
669
671
  })
@@ -688,8 +688,11 @@ document.addEventListener("DOMContentLoaded", async () => {
688
688
  }
689
689
  if ((event.ctrlKey || event.metaKey) && event.key === 'v') {
690
690
  navigator.clipboard.readText().then((text) => {
691
+ console.log({ text })
692
+ debugger
691
693
  this.socket.run({
692
- key: "\x1b[200~" + text + "\x1b[201~",
694
+ //key: "\x1b[200~" + text + "\x1b[201~",
695
+ key: text,
693
696
  id: shell_id
694
697
  })
695
698
  })
@@ -705,6 +708,7 @@ document.addEventListener("DOMContentLoaded", async () => {
705
708
  //term.resize(cols, rows);
706
709
 
707
710
  term.onKey(({ key }) => {
711
+ console.log({ key })
708
712
  if (this.socket) {
709
713
  if (shell_id) {
710
714
  this.socket.run({