Skip to content

Commit 6ffb1c4

Browse files
revert
1 parent 8e4d98e commit 6ffb1c4

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

packages/contentstack-utilities/src/content-type-utils.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)