Fix Turbopack module resolution for lzma and restore path imports

This commit is contained in:
openhands committed 2026-08-25 22:19:59 +02:00
1 parent a5044c80d7
commit e06596391e
35 files changed
+392 -333

No files matched your search

+13 -9
View File
@@ -1,23 +1,24 @@
import { existsSync } from "node:fs";
import path from "node:path";
import { siteSettings } from "@/lib/services/site-settings";
import { getRuntimePath } from "@/lib/utils/runtime-path";
export const DEFAULT_NITRO_FILES_ROOT = path.join(
export const DEFAULT_NITRO_FILES_ROOT = getRuntimePath(
/*turbopackIgnore: true*/ path.dirname(process.cwd()),
"DEV",
"Nitro-Files",
);
export const DEFAULT_GAMEDATA_ROOT =
process.platform === "win32" ? "" : "/var/www/Gamedata";
export const DEFAULT_FURNI_ICON_DIR = path.join(
export const DEFAULT_FURNI_ICON_DIR = getRuntimePath(
/*turbopackIgnore: true*/ process.cwd(),
"public/swf/dcr/hof_furni/icons",
);
export const DEFAULT_FURNI_SWF_DIR = path.join(
export const DEFAULT_FURNI_SWF_DIR = getRuntimePath(
/*turbopackIgnore: true*/ process.cwd(),
"public/swf/dcr/hof_furni/swf",
);
export const DEFAULT_FURNI_NITRO_DIR = path.join(
export const DEFAULT_FURNI_NITRO_DIR = getRuntimePath(
/*turbopackIgnore: true*/ process.cwd(),
"public/nitro-assets/bundled/furniture",
);
@@ -77,12 +78,12 @@ export async function getGamedataRoot(): Promise<string> {
function dirsFromNitroFilesRoot(root: string): FurniAssetDirs {
return {
swfDir: path.join(/*turbopackIgnore: true*/ root, "swf/dcr/hof_furni"),
iconDir: path.join(
swfDir: getRuntimePath(/*turbopackIgnore: true*/ root, "swf/dcr/hof_furni"),
iconDir: getRuntimePath(
/*turbopackIgnore: true*/ root,
"swf/dcr/hof_furni/icons",
),
nitroDir: path.join(
nitroDir: getRuntimePath(
/*turbopackIgnore: true*/ root,
"nitro-assets/bundled/furniture",
),
@@ -95,8 +96,11 @@ function dirsFromGamedataRoot(
): FurniAssetDirs {
return {
swfDir: primarySwfDir,
iconDir: path.join(/*turbopackIgnore: true*/ root, "icons"),
nitroDir: path.join(/*turbopackIgnore: true*/ root, "bundled/furniture"),
iconDir: getRuntimePath(/*turbopackIgnore: true*/ root, "icons"),
nitroDir: getRuntimePath(
/*turbopackIgnore: true*/ root,
"bundled/furniture",
),
};
}