import { searchConnections } from '../../../helpers/profileGeneratorHelper'; export async function includeConnection( componentPath: string, entityName: string, ): Promise<{ filePaths: string[]; associations: { taskId: string; pullerId: string; tableId: string; resultKey: string; } | null; } | null> { const connections = (await searchConnections( entityName, componentPath, )) as any[]; if (!connections.length) { console.error( `Could not find connection named ${entityName} in ${componentPath}`, ); return null; } return { filePaths: connections.map((c) => c.__file_path).filter(Boolean), associations: null, }; }