pinokiod 3.17.4 → 3.17.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/index.js +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.17.4",
3
+ "version": "3.17.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1556,6 +1556,7 @@ class Server {
1556
1556
  if (!config) {
1557
1557
  return { menu: [] }
1558
1558
  }
1559
+ console.log("renderMenu2 Before", JSON.stringify(config, null, 2))
1559
1560
 
1560
1561
  if (config.menu) {
1561
1562
  for(let i=0; i<config.menu.length; i++) {
@@ -1574,7 +1575,7 @@ class Server {
1574
1575
  if (config.hasOwnProperty("icon")) {
1575
1576
  config.html = `<i class="${config.icon}"></i> ${config.text}`
1576
1577
  } else if (config.hasOwnProperty("image")) {
1577
- let imagePath = `${base.path}/${config.image}`
1578
+ let imagePath = `${base.web_path}/${config.image}`
1578
1579
  config.html = `<img class='menu-item-image' src='${imagePath}' /> ${config.text}`
1579
1580
  } else {
1580
1581
  config.html = `${config.text}`
@@ -1591,8 +1592,10 @@ class Server {
1591
1592
  */
1592
1593
  if (keypath) {
1593
1594
  config.href = base.href + "/" + keypath.join("/") + "?path=" + base.cwd
1594
- config.script_id = this.kernel.path(keypath) + "?cwd=" + base.cwd
1595
+ //config.script_id = this.kernel.path(keypath) + "?cwd=" + base.cwd
1596
+ config.script_id = path.resolve(base.path, config.href) + "?cwd=" + base.cwd
1595
1597
  }
1598
+ console.log("renderMenu2 After", JSON.stringify(config, null, 2))
1596
1599
  return config
1597
1600
  }
1598
1601
 
@@ -2368,6 +2371,7 @@ class Server {
2368
2371
  await this.renderMenu(uri, name, plugin, [])
2369
2372
  return plugin
2370
2373
  } catch (e) {
2374
+ console.log("getPlugin ERROR", e)
2371
2375
  return {
2372
2376
  menu: []
2373
2377
  }
@@ -3813,10 +3817,12 @@ class Server {
3813
3817
  }
3814
3818
 
3815
3819
  let config = structuredClone(this.kernel.proto.config)
3820
+ console.log(">>>>>>>> config", config)
3816
3821
  config = this.renderMenu2(config, {
3817
3822
  cwd: req.query.path,
3818
3823
  href: "/prototype/show",
3819
- path: "/asset/prototype/system"
3824
+ path: this.kernel.path("prototype/system"),
3825
+ web_path: "/asset/prototype/system"
3820
3826
  })
3821
3827
 
3822
3828
  // {