恢复新版创作主页与平台侧栏
恢复 /creation 新版创作工具主页及创作、项目公共侧栏。 将 creation-home 重新纳入 Vite、TypeScript、ESLint 与 Vitest 活动编译链。 恢复 /creation 的 Nginx 与 Pingora SPA 白名单并保留旧子路径下线边界。 补充路由、标题、CSS 过滤和网关 smoke 回归验证。
This commit is contained in:
@@ -571,6 +571,17 @@ async function runSmokeCases(
|
||||
response.headers['cache-control'] === 'no-cache',
|
||||
},
|
||||
);
|
||||
await expectHttp(
|
||||
baseUrl,
|
||||
'/creation',
|
||||
200,
|
||||
'site-shell',
|
||||
'新创作主页深链回退 index.html',
|
||||
{
|
||||
validate: (response) =>
|
||||
response.headers['cache-control'] === 'no-cache',
|
||||
},
|
||||
);
|
||||
await expectHttp(
|
||||
baseUrl,
|
||||
'/project',
|
||||
|
||||
@@ -21,4 +21,25 @@ describe('retired creation template CSS plugin', () => {
|
||||
expect(plugin).toBeDefined();
|
||||
expect(plugin?.enforce).toBe('pre');
|
||||
});
|
||||
|
||||
it('keeps the active creation landing CSS while removing retired template CSS', async () => {
|
||||
const plugin = await resolveRetiredCssPlugin();
|
||||
const transform = plugin?.transform;
|
||||
|
||||
expect(typeof transform).toBe('function');
|
||||
if (typeof transform !== 'function') {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await transform.call(
|
||||
{} as never,
|
||||
"@import 'tailwindcss';\n.creation-landing { color: red; }\n.puzzle-runtime { color: blue; }",
|
||||
'/workspace/src/index.css',
|
||||
);
|
||||
const code = typeof result === 'string' ? result : result?.code;
|
||||
|
||||
expect(code).toContain('.creation-landing');
|
||||
expect(code).not.toContain('.puzzle-runtime');
|
||||
expect(code).toContain('@source "./components/creation-home"');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user