pinokiod 3.19.14 → 3.19.16

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/bin/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const path = require('path')
2
+ const Util = require('../util')
2
3
  class CLI {
3
4
  async install(req, ondata) {
4
5
  await this.kernel.exec({
@@ -7,19 +8,29 @@ class CLI {
7
8
  }
8
9
  async installed(req, ondata) {
9
10
  console.log("Check CLI installed")
10
- if (this.kernel.which('pinokio')) {
11
- let res = await this.kernel.exec({
12
- message: "pinokio version terminal"
13
- }, ondata)
14
- if (res.stdout && /.*pterm@0\.0\.6.*/.test(res.stdout)) {
15
- console.log("Installed")
16
- return true
11
+
12
+ let exists = await Util.exists(this.kernel.path("bin/miniconda/npm/bin/pinokio"))
13
+ console.log("Exists", exists)
14
+
15
+ if (exists) {
16
+ let p = this.kernel.which("pinokio")
17
+ console.log({ p })
18
+ if (p) {
19
+ let res = await this.kernel.exec({
20
+ message: "pinokio version terminal"
21
+ }, ondata)
22
+ if (res.stdout && /.*pterm@0\.0\.6.*/.test(res.stdout)) {
23
+ console.log("Installed")
24
+ return true
25
+ } else {
26
+ console.log("Not Installed")
27
+ return false
28
+ }
17
29
  } else {
18
- console.log("Not Installed")
30
+ console.log("FALSE")
19
31
  return false
20
32
  }
21
33
  } else {
22
- console.log("FALSE")
23
34
  return false
24
35
  }
25
36
  }
package/kernel/util.js CHANGED
@@ -631,5 +631,5 @@ function diffLinesWithContext(diffs, context = 3) {
631
631
  return summarized;
632
632
  }
633
633
  module.exports = {
634
- parse_env, log_path, api_path, update_env, parse_env_detail, openfs, port_running, du, is_port_available, find_python, find_venv, fill_object, run, openURL, u2p, p2u, log, diffLinesWithContext, classifyChange, push, filepicker
634
+ parse_env, log_path, api_path, update_env, parse_env_detail, openfs, port_running, du, is_port_available, find_python, find_venv, fill_object, run, openURL, u2p, p2u, log, diffLinesWithContext, classifyChange, push, filepicker, exists
635
635
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.19.14",
3
+ "version": "3.19.16",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {