pinokiod 3.2.51 → 3.2.52
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/index.js +34 -8
- package/package.json +1 -1
package/kernel/index.js
CHANGED
|
@@ -348,6 +348,29 @@ class Kernel {
|
|
|
348
348
|
//await this.shell.init()
|
|
349
349
|
|
|
350
350
|
if (this.homedir) {
|
|
351
|
+
await this.template.init({
|
|
352
|
+
kernel: this,
|
|
353
|
+
system,
|
|
354
|
+
platform: this.platform,
|
|
355
|
+
arch: this.arch,
|
|
356
|
+
proxy: (port) => {
|
|
357
|
+
return this.api.get_proxy_url("/proxy", port)
|
|
358
|
+
},
|
|
359
|
+
})
|
|
360
|
+
this.sys = new Sysinfo()
|
|
361
|
+
this.sys.init(this).then(async () => {
|
|
362
|
+
let info = this.sys.info
|
|
363
|
+
await fs.promises.mkdir(this.path("logs"), { recursive: true }).catch((e) => { })
|
|
364
|
+
await fs.promises.writeFile(this.path("logs/system.json"), JSON.stringify({
|
|
365
|
+
platform: this.platform,
|
|
366
|
+
arch: this.arch,
|
|
367
|
+
home: this.homedir,
|
|
368
|
+
...info
|
|
369
|
+
}, null, 2))
|
|
370
|
+
this.sysinfo = info
|
|
371
|
+
await this.update_sysinfo()
|
|
372
|
+
})
|
|
373
|
+
/*
|
|
351
374
|
this.sys = new Sysinfo()
|
|
352
375
|
await this.sys.init(this)
|
|
353
376
|
let info = this.sys.info
|
|
@@ -374,15 +397,18 @@ class Kernel {
|
|
|
374
397
|
console.time("update_sysinfo")
|
|
375
398
|
await this.update_sysinfo()
|
|
376
399
|
console.timeEnd("update_sysinfo")
|
|
400
|
+
*/
|
|
377
401
|
console.time("shell.init")
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
402
|
+
this.shell.init().then(() => {
|
|
403
|
+
console.timeEnd("shell.init")
|
|
404
|
+
if (this.envs) {
|
|
405
|
+
this.template.update({
|
|
406
|
+
env: this.envs,
|
|
407
|
+
envs: this.envs
|
|
408
|
+
})
|
|
409
|
+
}
|
|
410
|
+
})
|
|
411
|
+
//await this.shell.init()
|
|
386
412
|
}
|
|
387
413
|
|
|
388
414
|
|