@@ -44,7 +44,6 @@ export default class ContentType {
4444 protected schema : ContentTypeStruct [ ] = [ ] ;
4545 protected missingRefs : Record < string , any > = { } ;
4646 public moduleName : keyof typeof auditConfig . moduleConfig ;
47- public f :any = [ ]
4847 constructor ( { log, fix, config, moduleName, ctSchema, gfSchema } : ModuleConstructorParam & CtConstructorParam ) {
4948 this . log = log ;
5049 this . config = config ;
@@ -91,7 +90,7 @@ export default class ContentType {
9190 this . currentTitle = schema . title ;
9291 this . missingRefs [ this . currentUid ] = [ ] ;
9392 const { uid, title } = schema ;
94- await this . lookForReference ( [ { uid, name : title } ] , schema , null ) ;
93+ await this . lookForReference ( [ { uid, name : title } ] , schema ) ;
9594 this . log (
9695 $t ( auditMsg . SCAN_CT_SUCCESS_MSG , { title, module : this . config . moduleConfig [ this . moduleName ] . name } ) ,
9796 'info' ,
@@ -179,17 +178,13 @@ export default class ContentType {
179178 async lookForReference (
180179 tree : Record < string , unknown > [ ] ,
181180 field : ContentTypeStruct | GlobalFieldDataType | ModularBlockType | GroupFieldDataType ,
182- parent : any = null
183181 ) : Promise < void > {
184182 const fixTypes = this . config . flags [ 'fix-only' ] ?? this . config [ 'fix-fields' ] ;
185183
186184 if ( this . fix ) {
187185 field . schema = this . runFixOnSchema ( tree , field . schema as ContentTypeSchemaType [ ] ) ;
188186 }
189187 for ( let child of field . schema ?? [ ] ) {
190- if ( parent ) {
191- this . f . push ( parent + "." + child . uid )
192- }
193188
194189 if ( ! fixTypes . includes ( child . data_type ) && child . data_type !== 'json' ) continue ;
195190
@@ -321,7 +316,7 @@ export default class ContentType {
321316 return void 0 ;
322317 }
323318
324- await this . lookForReference ( tree , field , field . uid ) ;
319+ await this . lookForReference ( tree , field ) ;
325320 }
326321
327322 /**
@@ -355,7 +350,7 @@ export default class ContentType {
355350 for ( const block of blocks ) {
356351 const { uid, title } = block ;
357352
358- await this . lookForReference ( [ ...tree , { uid, name : title } ] , block , block . uid ) ;
353+ await this . lookForReference ( [ ...tree , { uid, name : title } ] , block ) ;
359354 }
360355 }
361356
@@ -371,7 +366,7 @@ export default class ContentType {
371366 */
372367 async validateGroupField ( tree : Record < string , unknown > [ ] , field : GroupFieldDataType ) : Promise < void > {
373368 // NOTE Any Group Field related logic can be added here (Ex data serialization or picking any metadata for report etc.,)
374- await this . lookForReference ( tree , field , field . uid ) ;
369+ await this . lookForReference ( tree , field ) ;
375370 }
376371
377372 /**
0 commit comments