pinokiod 1.1.6 → 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.6",
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()
@@ -408,7 +408,9 @@ body.dark .loader-popup {
408
408
  body.dark .loader-container {
409
409
  background: rgba(255,255,255,0.3);
410
410
  }
411
- <% if (agent !== "electron") { %>
411
+ #menu {
412
+ display: none;
413
+ }
412
414
  @media only screen and (max-width: 480px) {
413
415
  .app-info {
414
416
  display: flex;
@@ -437,8 +439,10 @@ body.dark .loader-container {
437
439
  .grid-btns {
438
440
  display: none;
439
441
  }
442
+ #menu {
443
+ display: flex;
444
+ }
440
445
  }
441
- <% } %>
442
446
  </style>
443
447
  </head>
444
448
  <body class='<%=theme%>'>
@@ -948,17 +952,23 @@ document.querySelector("#new-tab").addEventListener("click", async (e) => {
948
952
  const u = prompt("url")
949
953
 
950
954
  if (u) {
951
- let o = {}
952
- if (/^[0-9.:]/.test(u)) {
953
- o.forceHttp = true
954
- } else if (/^localhost/.test(u)) {
955
- 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
956
960
  } else {
957
- 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)
958
970
  }
959
971
 
960
- const url = normalizeURL(u, o)
961
-
962
972
  if (url && url.trim().length > 0) {
963
973
  console.log("url", url)
964
974
  const { tab, frame } = await addTab(url)