pinokiod 3.82.0 → 3.84.0

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.
@@ -1,6 +1,6 @@
1
1
  class Huggingface {
2
2
  cmd() {
3
- return "huggingface_hub"
3
+ return 'huggingface_hub "hf-xet!=1.1.10"'
4
4
  }
5
5
  async install(req, ondata) {
6
6
  await this.kernel.bin.exec({
package/kernel/peer.js CHANGED
@@ -140,7 +140,6 @@ class PeerDiscovery {
140
140
  return res.data
141
141
  }
142
142
  } catch (e) {
143
- // console.log("_refresh error", { host , e })
144
143
  return null
145
144
  }
146
145
  }
@@ -156,10 +155,7 @@ class PeerDiscovery {
156
155
  let res = await axios.post(endpoint, info, {
157
156
  timeout: 2000
158
157
  })
159
- // return res.data
160
158
  } catch (e) {
161
- // console.log("ERROR", e)
162
- // return null
163
159
  }
164
160
  }
165
161
  }
@@ -30,7 +30,6 @@ class PeerStaticRouter extends Processor {
30
30
  rewrite: /asset/api/test
31
31
  match: test.x.localhost
32
32
  */
33
- // console.log("PEER STATIC ROUTER", rewrite_mapping)
34
33
  let url = new URL("http://" + rewrite_mapping.external_ip)
35
34
  let dial = url.host
36
35
  let rewrite = url.pathname
package/kernel/shell.js CHANGED
@@ -1259,7 +1259,14 @@ ${cleaned}
1259
1259
  return
1260
1260
  }
1261
1261
  this.vt.write(msg, () => {
1262
- let buf = this.vts.serialize()
1262
+ let buf
1263
+ try {
1264
+ buf = this.vts.serialize()
1265
+ } catch (e) {
1266
+ console.log("vts serialize error", e)
1267
+ callback()
1268
+ return
1269
+ }
1263
1270
  let cleaned = this.stripAnsi(buf)
1264
1271
  let response = {
1265
1272
  id: this.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.82.0",
3
+ "version": "3.84.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2796,6 +2796,11 @@ class Server {
2796
2796
  } else {
2797
2797
  // For every update, this gets triggered exactly once.
2798
2798
  // 1. first mkdir if it doesn't exist (this step is irrelevant since at this point the home dir will exist)
2799
+
2800
+ let exists = await this.kernel.exists(home)
2801
+ if (!exists) {
2802
+ await fs.promises.mkdir(home, { recursive: true })
2803
+ }
2799
2804
 
2800
2805
  needInitHome = true
2801
2806
  console.log("not up to date. update py.")
@@ -6249,15 +6254,16 @@ class Server {
6249
6254
  if (this.kernel.peer.active) {
6250
6255
  // if network is active, return success only if the router is up for all of its peers (including itself)
6251
6256
  let ready = true
6252
- if (this.kernel.peer.info && Object.keys(this.kernel.peer.info).length > 0) {
6253
- for(let host in this.kernel.peer.info) {
6254
- let info = this.kernel.peer.info[host]
6257
+ if (this.kernel.peer.info) {
6258
+ let info = this.kernel.peer.info[this.kernel.peer.host]
6259
+ if (info) {
6255
6260
  if (info.router && Object.keys(info.router).length > 0) {
6256
6261
  ready = true
6257
6262
  } else {
6258
6263
  ready = false
6259
- break;
6260
6264
  }
6265
+ } else {
6266
+ ready = false
6261
6267
  }
6262
6268
  } else {
6263
6269
  ready = false;