feat(contracts): Route/Render/Theme Manifest 契约 v1 冻结
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export const RENDER_SNAPSHOT_VERSION = 1
|
||||
|
||||
export const RENDER_SNAPSHOT_FILES = [
|
||||
'site.json', 'content.json', 'taxonomies.json', 'routes.json', 'assets.json', 'render-manifest.json',
|
||||
] as const
|
||||
|
||||
export type RenderSnapshotFile = (typeof RENDER_SNAPSHOT_FILES)[number]
|
||||
|
||||
// 契约冻结锁(spec §9.2):清单与冻结集双向咬合——漏改/多改/改名任何一项 → TS2322
|
||||
type FrozenRenderSnapshotFiles =
|
||||
| 'site.json' | 'content.json' | 'taxonomies.json'
|
||||
| 'routes.json' | 'assets.json' | 'render-manifest.json'
|
||||
|
||||
type _RenderFilesMatchSpec = [RenderSnapshotFile] extends [FrozenRenderSnapshotFiles]
|
||||
? ([FrozenRenderSnapshotFiles] extends [RenderSnapshotFile] ? true : never)
|
||||
: never
|
||||
const _renderFilesComplete: _RenderFilesMatchSpec = true
|
||||
Reference in New Issue
Block a user