pinokiod 6.0.76 → 6.0.77

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 +18 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "6.0.76",
3
+ "version": "6.0.77",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -3629,12 +3629,24 @@ class Server {
3629
3629
  if (menuitem.href && menuitem.params) {
3630
3630
  menuitem.href = menuitem.href + "?" + new URLSearchParams(menuitem.params).toString();
3631
3631
  }
3632
- const injectList = await resolveInjectList({
3633
- workspace: name,
3634
- workspaceRoot: this.kernel.path("api", name),
3635
- launcher,
3636
- inject: menuitem.inject
3637
- })
3632
+ let injectList = []
3633
+ if (menuitem.inject) {
3634
+ let launcher = req.pinokioLauncher
3635
+ if (!launcher) {
3636
+ launcher = await this.kernel.api.launcher(name)
3637
+ req.pinokioLauncher = launcher
3638
+ if (!launcher_root && launcher && launcher.launcher_root) {
3639
+ launcher_root = launcher.launcher_root
3640
+ req.launcher_root = launcher_root
3641
+ }
3642
+ }
3643
+ injectList = await resolveInjectList({
3644
+ workspace: name,
3645
+ workspaceRoot: this.kernel.path("api", name),
3646
+ launcher,
3647
+ inject: menuitem.inject
3648
+ })
3649
+ }
3638
3650
  if (injectList.length > 0) {
3639
3651
  menuitem.inject = injectList
3640
3652
  config.menu[i].inject = injectList