refactor: modularize portal server and harden session recovery

This commit is contained in:
john
2026-07-24 18:39:24 +08:00
parent 1d291fd528
commit 785731d98d
109 changed files with 29185 additions and 5836 deletions
+5
View File
@@ -11,6 +11,11 @@ import {
resolvePublishDir,
} from './user-publish.mjs';
export function resolvePortalH5Root(codeRoot, env = process.env) {
const configuredRoot = String(env.MEMIND_PORTAL_H5_ROOT ?? '').trim();
return path.resolve(configuredRoot || codeRoot);
}
export function resolvePageWorkspaceRelativePath(row) {
const fromColumn = normalizeWorkspaceRelativePath(row?.workspace_relative_path);
if (fromColumn) return fromColumn;