pinokiod 1.3.66 → 1.3.68
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 +20 -18
- package/package.json +1 -1
- package/script/index.js +2 -2
- package/server/index.js +10 -8
package/kernel/index.js
CHANGED
|
@@ -294,27 +294,29 @@ class Kernel {
|
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
this.sys = new Sysinfo()
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
297
|
+
if (this.homedir) {
|
|
298
|
+
await this.sys.init(this)
|
|
299
|
+
let info = this.sys.info
|
|
300
|
+
await fs.promises.mkdir(this.path("logs"), { recursive: true }).catch((e) => { })
|
|
301
|
+
await fs.promises.writeFile(this.path("logs/system.json"), JSON.stringify({
|
|
302
|
+
platform: this.platform,
|
|
303
|
+
arch: this.arch,
|
|
304
|
+
home: this.homedir,
|
|
305
|
+
...info
|
|
306
|
+
}, null, 2))
|
|
307
|
+
this.sysinfo = info
|
|
308
|
+
await this.template.init({
|
|
309
|
+
kernel: this,
|
|
310
|
+
system,
|
|
311
|
+
platform: this.platform,
|
|
312
|
+
arch: this.arch,
|
|
313
|
+
...info
|
|
314
|
+
})
|
|
315
|
+
await this.update_sysinfo()
|
|
316
|
+
}
|
|
307
317
|
|
|
308
|
-
await this.template.init({
|
|
309
|
-
kernel: this,
|
|
310
|
-
system,
|
|
311
|
-
platform: this.platform,
|
|
312
|
-
arch: this.arch,
|
|
313
|
-
...info
|
|
314
|
-
})
|
|
315
318
|
|
|
316
319
|
|
|
317
|
-
await this.update_sysinfo()
|
|
318
320
|
|
|
319
321
|
// await this.template.init()
|
|
320
322
|
|
package/package.json
CHANGED
package/script/index.js
CHANGED
package/server/index.js
CHANGED
|
@@ -1895,15 +1895,17 @@ class Server {
|
|
|
1895
1895
|
await this.kernel.init({ port: this.port})
|
|
1896
1896
|
|
|
1897
1897
|
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1898
|
+
if (this.kernel.homedir) {
|
|
1899
|
+
let ex = await this.kernel.exists(this.kernel.homedir, "ENVIRONMENT")
|
|
1900
|
+
if (!ex) {
|
|
1901
|
+
let str = Environment.ENV(this.kernel.homedir)
|
|
1902
|
+
await fs.promises.writeFile(path.resolve(this.homedir, "ENVIRONMENT"), str)
|
|
1903
|
+
}
|
|
1903
1904
|
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1905
|
+
let env = await Environment.get(this.kernel.homedir)
|
|
1906
|
+
if (env && env.PINOKIO_PORT) {
|
|
1907
|
+
this.port = env.PINOKIO_PORT
|
|
1908
|
+
}
|
|
1907
1909
|
}
|
|
1908
1910
|
|
|
1909
1911
|
|