fix(mindspace): refresh published HTML after workspace sync
Keep online publication snapshots aligned when public/*.html changes, default static page binds to public access with MindSpace delivery URLs, and split browser-safe workspace helpers out of the Vite import chain. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -143,7 +143,7 @@ export async function bindWorkspaceHtmlForPageData({
|
||||
workspaceRoot,
|
||||
relativePath,
|
||||
title = null,
|
||||
accessMode = 'password',
|
||||
accessMode = 'public',
|
||||
password = null,
|
||||
pageDataPolicy = null,
|
||||
urlSlug = null,
|
||||
@@ -225,6 +225,7 @@ export async function bindWorkspaceHtmlForPageData({
|
||||
policy;
|
||||
}
|
||||
|
||||
const workspaceUrl = buildWorkspacePublicUrl(userId, normalized);
|
||||
return {
|
||||
pageId: page.id,
|
||||
pageTitle: page.title,
|
||||
@@ -233,7 +234,10 @@ export async function bindWorkspaceHtmlForPageData({
|
||||
publicationAccessMode: publication.accessMode,
|
||||
publicationPasswordApplied: normalizedAccessMode === 'password',
|
||||
publicationUrl: publication.publicUrl,
|
||||
workspaceUrl: buildWorkspacePublicUrl(userId, normalized),
|
||||
workspaceUrl,
|
||||
deliveryUrl: workspaceUrl,
|
||||
deliveryHint:
|
||||
'向用户交付静态页时优先使用 deliveryUrl(MindSpace /MindSpace/<用户ID>/public/... 路径),publicationUrl 仅作补充',
|
||||
policy,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user