pinokiod 1.1.7 → 1.1.8

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.
@@ -74,8 +74,8 @@ class Conda {
74
74
  (this.kernel.platform === 'win32' ? 'conda_hook' : `eval "$(conda shell.bash hook)"`),
75
75
  (this.platform === 'win32' ? `activate base` : `conda activate base`),
76
76
  "conda config --add create_default_packages python=3.10",
77
+ "conda install -y pip brotli brotlipy",
77
78
  "conda update -y --all",
78
- "conda install -y pip",
79
79
  ]
80
80
  }, (stream) => {
81
81
  ondata(stream)
package/kernel/index.js CHANGED
@@ -29,6 +29,7 @@ class Kernel {
29
29
  this.fetch = fetch
30
30
  this.store = store
31
31
  this.arch = os.arch()
32
+ this.os = os
32
33
  this.platform = os.platform()
33
34
  this.key = new Key()
34
35
  }
@@ -1,4 +1,3 @@
1
- const os = require("os")
2
1
  const system = require('systeminformation');
3
2
  const path = require("path")
4
3
  const si = require('systeminformation')
@@ -7,8 +6,9 @@ const _ = require("lodash")
7
6
  class Template {
8
7
  constructor(kernel) {
9
8
  this.kernel = kernel
10
- this.platform = os.platform()
11
- this.arch = os.arch()
9
+ this.platform = kernel.platform
10
+ this.arch = kernel.arch
11
+ this.os = kernel.os
12
12
  }
13
13
  async init() {
14
14
  let g = await si.graphics()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1918,7 +1918,7 @@ class Server {
1918
1918
  if (req.body.name) {
1919
1919
  let folderPath = this.kernel.path("api", req.body.name)
1920
1920
  console.log("delete", folderPath)
1921
- await rimraf(folderPath)
1921
+ await fse.remove(folderPath)
1922
1922
  await new Promise((resolve, reject) => {
1923
1923
  setTimeout(() => {
1924
1924
  resolve()
@@ -952,17 +952,23 @@ document.querySelector("#new-tab").addEventListener("click", async (e) => {
952
952
  const u = prompt("url")
953
953
 
954
954
  if (u) {
955
- let o = {}
956
- if (/^[0-9.:]/.test(u)) {
957
- o.forceHttp = true
958
- } else if (/^localhost/.test(u)) {
959
- o.forceHttp = true
955
+ let url
956
+ if (/^[ ]*http:/i.test(u)) {
957
+ url = u
958
+ } else if (/^[ ]*https:/i.test(u)) {
959
+ url = u
960
960
  } else {
961
- o.forceHttps = true
961
+ let o = {}
962
+ if (/^[0-9.:]/.test(u)) {
963
+ o.forceHttp = true
964
+ } else if (/^localhost/.test(u)) {
965
+ o.forceHttp = true
966
+ } else {
967
+ o.forceHttps = true
968
+ }
969
+ url = normalizeURL(u, o)
962
970
  }
963
971
 
964
- const url = normalizeURL(u, o)
965
-
966
972
  if (url && url.trim().length > 0) {
967
973
  console.log("url", url)
968
974
  const { tab, frame } = await addTab(url)