File tree Expand file tree Collapse file tree
packages/contentstack-utilities/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,20 +13,6 @@ export function readGlobalFieldSchemas(
1313 dirPath : string ,
1414 ignoredFiles : string [ ] = DEFAULT_GF_IGNORED_FILES ,
1515) : Record < string , unknown > [ ] {
16- // Global fields may be exported either as a single aggregate file
17- // (global_fields/globalfields.json, an array) or as one file per uid.
18- // Prefer the aggregate when present; otherwise fall back to per-uid files.
19- const aggregatePath = pResolve ( dirPath , 'globalfields.json' ) ;
20- if ( existsSync ( aggregatePath ) ) {
21- try {
22- const parsed = JSON . parse ( readFileSync ( aggregatePath , 'utf8' ) ) ;
23- if ( Array . isArray ( parsed ) ) {
24- return parsed as Record < string , unknown > [ ] ;
25- }
26- } catch ( error ) {
27- console . warn ( 'Failed to read aggregate global fields file globalfields.json:' , error ) ;
28- }
29- }
3016 return readContentTypeSchemas ( dirPath , ignoredFiles ) ;
3117}
3218
You can’t perform that action at this time.
0 commit comments