dsh-folia 4.26.0-pre.27 → 4.26.0-pre.28

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.
@@ -908,7 +908,12 @@ export function registerPetChatRoutes(webServer, c) {
908
908
  res.end(JSON.stringify(payload));
909
909
  };
910
910
  const profileRoot = join(homedir(), 'AppData', 'Roaming', 'dsh-desktop', 'harness', 'profiles', 'web');
911
- const roots = [join(profileRoot, 'node_modules'), join(dirname(dirname(dirname(__dirname))), '..')];
911
+ // ⚠️ ESM 没有 __dirname;这里只拼真实存在的位置(上一版用 __dirname 导致 400)
912
+ const roots = [
913
+ join(profileRoot, 'node_modules'),
914
+ join(profileRoot, 'node_modules', 'dsh-folia', 'node_modules'),
915
+ join(profileRoot, '..', '.generations', 'live'),
916
+ ];
912
917
  const findPkg = (name) => {
913
918
  for (const root of roots) {
914
919
  const f = join(root, ...name.split('/'), 'package.json');
@@ -957,7 +962,12 @@ export function registerPetChatRoutes(webServer, c) {
957
962
  { id: 'notify-hub', pkg: '@alotop/dsh-notify-hub', label: '消息推送', needs: '需要配置推送渠道(Bark/Telegram 等)' },
958
963
  ];
959
964
  const profileRoot = join(homedir(), 'AppData', 'Roaming', 'dsh-desktop', 'harness', 'profiles', 'web');
960
- const roots = [join(profileRoot, 'node_modules'), join(dirname(dirname(dirname(__dirname))), '..')];
965
+ // ⚠️ ESM 没有 __dirname;这里只拼真实存在的位置(上一版用 __dirname 导致 400)
966
+ const roots = [
967
+ join(profileRoot, 'node_modules'),
968
+ join(profileRoot, 'node_modules', 'dsh-folia', 'node_modules'),
969
+ join(profileRoot, '..', '.generations', 'live'),
970
+ ];
961
971
  const findPkg = (name) => {
962
972
  for (const root of roots) {
963
973
  const f = join(root, ...name.split('/'), 'package.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-folia",
3
- "version": "4.26.0-pre.27",
3
+ "version": "4.26.0-pre.28",
4
4
  "description": "DSH 壁纸引擎:本机 WE 壁纸实时渲染,视频/网页/开机动画/桌宠皮肤,一键拉取在线素材。",
5
5
  "type": "module",
6
6
  "engines": {