Add strict custom field registry

This commit is contained in:
2026-05-07 11:04:11 +08:00
parent 27e71d8c51
commit c1cc9132a4
20 changed files with 582 additions and 20 deletions

View File

@@ -66,6 +66,8 @@ entry:
- %s
scan:
- design
customFieldPolicy: strict
fieldRegistry: gsp.fields
stageRules:
design:
minResolution: L0
@@ -94,10 +96,16 @@ type: concept
resolution: L0
context: Project entry GSP.
`, yamlScalar(entry))
fieldsContent := `gspFieldsVersion: 0.1
fields: {}
`
if err := writeInitFile(absRoot, filepath.Join(absRoot, "gsp.manifest"), []byte(manifest), options.Force, &result); err != nil {
return InitResult{}, err
}
if err := writeInitFile(absRoot, filepath.Join(absRoot, "gsp.fields"), []byte(fieldsContent), options.Force, &result); err != nil {
return InitResult{}, err
}
if err := writeInitFile(absRoot, entryFile, []byte(entryContent), options.Force, &result); err != nil {
return InitResult{}, err
}