pinokiod 2.15.81 → 2.15.82

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 CHANGED
@@ -337,14 +337,18 @@ class Kernel {
337
337
 
338
338
  // let contents = await fs.promises.readdir(this.homedir)
339
339
  //await this.bin.init()
340
+ console.log("> bin.init()")
340
341
  this.bin.init()
342
+ console.log("> api.init()")
341
343
  await this.api.init()
344
+ console.log("> shell.init()")
342
345
 
343
346
  //await this.shell.init()
344
347
  this.shell.init()
345
348
 
346
349
  if (this.homedir) {
347
350
  this.sys = new Sysinfo()
351
+ console.log("> sys.init()")
348
352
  await this.sys.init(this)
349
353
  let info = this.sys.info
350
354
  await fs.promises.mkdir(this.path("logs"), { recursive: true }).catch((e) => { })
@@ -355,6 +359,7 @@ class Kernel {
355
359
  ...info
356
360
  }, null, 2))
357
361
  this.sysinfo = info
362
+ console.log("> template.init()")
358
363
  await this.template.init({
359
364
  kernel: this,
360
365
  system,
@@ -367,6 +372,7 @@ class Kernel {
367
372
  },
368
373
  ...info
369
374
  })
375
+ console.log("> update_sysinfo")
370
376
  await this.update_sysinfo()
371
377
  }
372
378
 
@@ -379,6 +385,7 @@ class Kernel {
379
385
  }
380
386
  process.env.PLAYWRIGHT_BROWSERS_PATH = this.bin.path("playwright/browsers")
381
387
  this.playwright = (await this.loader.load(pwpath)).resolved
388
+ console.log("Kernel.init finished")
382
389
 
383
390
  // await this.template.init()
384
391
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.15.81",
3
+ "version": "2.15.82",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1965,15 +1965,19 @@ class Server {
1965
1965
  let new_home = this.kernel.store.get("new_home")
1966
1966
  }
1967
1967
  async startLogging() {
1968
+ console.log("> startLogging", {debug: this.debug, homedir: this.kernel.homedir})
1968
1969
  if (!this.debug) {
1969
1970
  if (this.logInterval) {
1970
1971
  clearInterval(this.logInterval)
1971
1972
  }
1972
1973
  if (this.kernel.homedir) {
1973
1974
  let exists = await this.exists(this.kernel.homedir)
1975
+ console.log({ exists })
1974
1976
  if (exists) {
1975
1977
  let logsdir = path.resolve(this.kernel.homedir, "logs")
1978
+ console.log({ logsdir })
1976
1979
  await fs.promises.mkdir(logsdir, { recursive: true }).catch((e) => { })
1980
+ console.log("this.log", this.log)
1977
1981
  if (!this.log) {
1978
1982
  this.log = fs.createWriteStream(path.resolve(this.kernel.homedir, "logs/stdout.txt"))
1979
1983
  process.stdout.write = process.stderr.write = this.log.write.bind(this.log)
@@ -2092,7 +2096,9 @@ class Server {
2092
2096
  // });
2093
2097
  // }
2094
2098
  // }
2099
+ console.log("Before startLogging")
2095
2100
  await this.startLogging()
2101
+ console.log("After startLogging")
2096
2102
 
2097
2103
  // check version from this.store
2098
2104
  let version = this.kernel.store.get("version")
@@ -2139,22 +2145,28 @@ class Server {
2139
2145
  origin: '*'
2140
2146
  }));
2141
2147
 
2148
+ console.log(">> 00")
2142
2149
  if (this.kernel.homedir) {
2143
2150
  this.app.use(express.static(this.kernel.path("web/public")))
2144
2151
  }
2152
+ console.log(">> 01")
2145
2153
  this.app.use(express.static(path.resolve(__dirname, 'public')));
2146
2154
  this.app.use("/web", express.static(path.resolve(__dirname, "..", "..", "web")))
2147
2155
  this.app.set('view engine', 'ejs');
2156
+ console.log(">> 1")
2148
2157
  if (this.kernel.homedir) {
2158
+ console.log(">> 2")
2149
2159
  this.app.set("views", [
2150
2160
  this.kernel.path("web/views"),
2151
2161
  path.resolve(__dirname, "views")
2152
2162
  ])
2153
2163
  } else {
2164
+ console.log(">> 3")
2154
2165
  this.app.set("views", [
2155
2166
  path.resolve(__dirname, "views")
2156
2167
  ])
2157
2168
  }
2169
+ console.log(">> 4")
2158
2170
  this.app.use(express.json());
2159
2171
  this.app.use(express.urlencoded({ extended: true }));
2160
2172
  this.app.use(cookieParser());
@@ -3266,6 +3278,7 @@ class Server {
3266
3278
  // install
3267
3279
  this.server = httpserver.createServer(this.app);
3268
3280
  this.socket = new Socket(this)
3281
+ console.log(">> 100")
3269
3282
  await new Promise((resolve, reject) => {
3270
3283
  this.listening = this.server.listen(this.port, () => {
3271
3284
  console.log(`Server listening on port ${this.port}`)