refactor: modularize portal server and harden session recovery
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user