Rename sdk utils (#15769)

Follow ups
This commit is contained in:
martmull
2025-11-12 11:20:59 +01:00
committed by GitHub
parent ea56586766
commit f4663038b6
4 changed files with 11 additions and 7 deletions
@@ -171,8 +171,10 @@ const collectObjects = (program: Program) => {
const visit = (node: Node) => {
if (isClassDeclaration(node) && getDecorators(node)?.length) {
const decorators = getDecorators(node);
const objectDec = decorators?.find((d) =>
isDecoratorNamed(d, 'ObjectMetadata'),
const objectDec = decorators?.find(
(d) =>
isDecoratorNamed(d, 'ObjectMetadata') ||
isDecoratorNamed(d, 'Object'),
);
if (objectDec) {
const cfg = getFirstArgObject(objectDec);
@@ -184,8 +186,10 @@ const collectObjects = (program: Program) => {
continue;
}
const fieldDec = getDecorators(member)?.find((d) =>
isDecoratorNamed(d, 'FieldMetadata'),
const fieldDec = getDecorators(member)?.find(
(d) =>
isDecoratorNamed(d, 'FieldMetadata') ||
isDecoratorNamed(d, 'Field'),
);
if (!fieldDec) {