pinokiod 3.4.18 → 3.4.19

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.
@@ -23,6 +23,7 @@ const { glob } = require('glob')
23
23
  const fakeUa = require('fake-useragent');
24
24
  const fse = require('fs-extra')
25
25
  const semver = require('semver')
26
+ const terminalImage = require('terminal-image');
26
27
 
27
28
 
28
29
  //const Puppet = require("./puppeteer")
@@ -41,6 +42,15 @@ class Bin {
41
42
  let response = await this.kernel.shell.run(params, null, ondata)
42
43
  return response
43
44
  }
45
+ async img2Txt(imgPath, options, ondata) {
46
+ if (imgPath.endsWith(".gif")) {
47
+ let data = await terminalImage.gifFile(imgPath, options)
48
+ ondata({ raw: data })
49
+ } else {
50
+ let data = await terminalImage.file(imgPath, options)
51
+ ondata({ raw: data })
52
+ }
53
+ }
44
54
  async download(url, dest, ondata) {
45
55
  const userAgent = fakeUa()
46
56
  console.log("download userAgent", userAgent)
package/kernel/bin/vs.js CHANGED
@@ -23,10 +23,11 @@ class VS {
23
23
  ondata(stream)
24
24
  })
25
25
  ondata({ raw: `Install finished\r\n\r\n` })
26
- let WARNING = "[NOTICE] If this step keeps repeating, try opening the 'Visual Studio Installer' app on Windows, and check if there are failed installations, and uninstall them and retry."
26
+ let WARNING = "[NOTICE] If this step keeps repeating, try opening the 'Visual Studio Installer' app on Windows, and check if there are failed installations, and uninstall them and retry.\r\n"
27
27
  ondata({
28
28
  raw: `\r\n\x1b[33m${WARNING}\x1b[0m\r\n\r\n`
29
29
  })
30
+ await this.kernel.bin.img2Txt("vsinstaller.gif", { width: "100%" }, ondata)
30
31
  return this.kernel.bin.rm(installer, ondata)
31
32
  } else {
32
33
  ondata({ raw: `Must be Windows 10 or above\r\n` })
Binary file
package/kernel/shell.js CHANGED
@@ -103,6 +103,9 @@ class Shell {
103
103
  if (this.env.CMAKE_GENERATOR) {
104
104
  delete this.env.CMAKE_GENERATOR
105
105
  }
106
+ if (this.env.SSLKEYLOGFILE) {
107
+ delete this.env.SSLKEYLOGFILE
108
+ }
106
109
 
107
110
  // if (this.env.CUDA_HOME) {
108
111
  // delete this.env.CUDA_HOME
@@ -225,8 +228,6 @@ class Shell {
225
228
  // automatically add self to the shells registry
226
229
  this.kernel.shell.add(this)
227
230
 
228
- console.log("this.env", this.env)
229
-
230
231
  if (params.sudo) {
231
232
  let options = {
232
233
  name: "Pinokio",
@@ -672,7 +673,6 @@ class Shell {
672
673
  if (this.platform === "win32") {
673
674
  try {
674
675
  let vcvars_path = this.kernel.bin.vs_path_env.VCVARSALL_PATH
675
- console.log(`[shell] vcvars_path = ${vcvars_path}`)
676
676
  if (vcvars_path) {
677
677
  const architecture = os.arch().toLowerCase(); // 'x64', 'ia32' (32-bit), etc.
678
678
  const armArchitecture = process.arch.toLowerCase(); // For ARM-based architectures (on Windows), process.arch might be 'arm64', 'arm', etc.
@@ -769,12 +769,8 @@ class Shell {
769
769
  let python_version = ""
770
770
  let use_uv = false
771
771
  if (typeof params.venv === "string") {
772
- console.log("params =" ,params)
773
772
  env_path = path.resolve(params.path, params.venv)
774
- console.log({ env_path })
775
773
  if (params.venv_python) {
776
- console.log("isNumber", isNumber(params.venv_python))
777
- console.log({ venv_python: params.venv_python })
778
774
  python_version = ` --python ${params.venv_python}`
779
775
  use_uv = true
780
776
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.4.18",
3
+ "version": "3.4.19",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,6 +9,7 @@
9
9
  "author": "",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
+ "terminal-image": "1.2.1",
12
13
  "@homebridge/node-pty-prebuilt-multiarch": "0.12.0-beta.5",
13
14
  "7zip-min-win-asar-support": "^1.4.4",
14
15
  "async-retry": "^1.3.3",
package/server/index.js CHANGED
@@ -2029,7 +2029,6 @@ class Server {
2029
2029
  console.log("this.log", this.log)
2030
2030
  if (!this.log) {
2031
2031
  this.log = fs.createWriteStream(path.resolve(homedir, "logs/stdout.txt"))
2032
- console.log("created this.log", this.log)
2033
2032
  process.stdout.write = process.stderr.write = this.log.write.bind(this.log)
2034
2033
  process.on('uncaughtException', (err) => {
2035
2034
  console.error((err && err.stack) ? err.stack : err);