import { searchPushers } from '../../../helpers/profileGeneratorHelper'; export async function includePusher( componentPath: string, entityName: string, ): Promise<{ filePaths: string[]; associations: { taskId: string; pullerId: string; tableId: string; resultKey: string; } | null; } | null> { const pushers = (await searchPushers(entityName, componentPath)) as any[]; if (!pushers.length) { console.error( `Could not find pusher named ${entityName} in ${componentPath}`, ); return null; } const filePaths = pushers .map((p) => p.__file_path) .filter(Boolean) .filter((v, i, a) => a.indexOf(v) === i); return { filePaths, associations: null }; }