修正原生壳公开主站配置
将原生壳公开主站统一为 www.genarrative.world 调整 Tauri release 直接加载线上主站并移除 frontendDist 打包 补齐创作入口配置开发代理与回归测试 同步原生壳方案文档和共享记忆
This commit is contained in:
@@ -1553,6 +1553,10 @@ const sharedPublicWebOrigin = extractTsStringConst(
|
||||
sharedContractSource,
|
||||
'HOST_BRIDGE_PUBLIC_WEB_ORIGIN',
|
||||
);
|
||||
const sharedPublicWebUrl = extractTsStringConst(
|
||||
sharedContractSource,
|
||||
'HOST_BRIDGE_PUBLIC_WEB_URL',
|
||||
);
|
||||
const sharedNativeAppQueryKeys = extractStringArrayExport(
|
||||
sharedContractSource,
|
||||
'HOST_BRIDGE_NATIVE_APP_QUERY_KEYS',
|
||||
@@ -1816,7 +1820,7 @@ for (const expectedNetworkSnippet of [
|
||||
}
|
||||
}
|
||||
|
||||
if (desktopShellNetworkSource.includes('"app.genarrative.world"')) {
|
||||
if (desktopShellNetworkSource.includes('"www.genarrative.world"')) {
|
||||
throw new Error('desktop shell network probe must not duplicate the public web host');
|
||||
}
|
||||
for (const blockedDesktopNetworkEventSnippet of [
|
||||
@@ -2340,11 +2344,11 @@ if (
|
||||
throw new Error('desktop shell clipboard module must hide native clipboard errors');
|
||||
}
|
||||
|
||||
if (config.build?.frontendDist !== '../../../dist') {
|
||||
throw new Error('desktop shell must package the root H5 dist');
|
||||
if (Object.hasOwn(config.build ?? {}, 'frontendDist')) {
|
||||
throw new Error('desktop shell release must load the shared public H5 URL without packaging root dist');
|
||||
}
|
||||
|
||||
if (config.build?.beforeBuildCommand !== 'npm --prefix ../.. run build:raw && npm run typecheck') {
|
||||
if (config.build?.beforeBuildCommand !== 'npm run typecheck') {
|
||||
throw new Error('desktop shell build command must run from apps/desktop-shell');
|
||||
}
|
||||
|
||||
@@ -2374,12 +2378,8 @@ if (mainWindow.label !== 'main') {
|
||||
throw new Error('desktop shell main window label must be main');
|
||||
}
|
||||
|
||||
if (String(mainWindow.url ?? '').startsWith('http')) {
|
||||
throw new Error('desktop shell release window must load packaged H5 assets');
|
||||
}
|
||||
|
||||
if (String(mainWindow.url ?? '') !== 'index.html') {
|
||||
throw new Error('desktop shell release window must enter through packaged index.html');
|
||||
if (String(mainWindow.url ?? '') !== sharedPublicWebUrl) {
|
||||
throw new Error('desktop shell release window must load the shared public H5 URL');
|
||||
}
|
||||
|
||||
if (String(config.build?.devUrl ?? '') !== 'http://127.0.0.1:3000/') {
|
||||
|
||||
Reference in New Issue
Block a user