pinokiod 1.1.18 → 1.1.20
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 +9 -0
- package/package.json +1 -1
- package/server/index.js +2 -1
package/kernel/index.js
CHANGED
|
@@ -232,6 +232,14 @@ class Kernel {
|
|
|
232
232
|
let sysinfo = new Sysinfo()
|
|
233
233
|
await sysinfo.init()
|
|
234
234
|
let info = sysinfo.info
|
|
235
|
+
await fs.promises.mkdir(this.path("logs"), { recursive: true }).catch((e) => { })
|
|
236
|
+
await fs.promises.writeFile(this.path("logs/system.json"), JSON.stringify({
|
|
237
|
+
platform: this.platform,
|
|
238
|
+
arch: this.arch,
|
|
239
|
+
home: this.homedir,
|
|
240
|
+
...info
|
|
241
|
+
}, null, 2))
|
|
242
|
+
this.sysinfo = info
|
|
235
243
|
|
|
236
244
|
await this.template.init({
|
|
237
245
|
kernel: this,
|
|
@@ -247,6 +255,7 @@ class Kernel {
|
|
|
247
255
|
await sysinfo.refresh()
|
|
248
256
|
let info = sysinfo.info
|
|
249
257
|
this.template.update(info)
|
|
258
|
+
this.sysinfo = info
|
|
250
259
|
}, 10000) // update every 10 seconds
|
|
251
260
|
|
|
252
261
|
// await this.template.init()
|
package/package.json
CHANGED
package/server/index.js
CHANGED