import * as pipe from '../node/pipe' ; import { plugin } from './plugins' ; import { walkProjectFiles } from './walk-project-files' ; export const analyseProject = async ( ) => { const files = await walkProjectFiles ( ) ; Object . keys ( plugin . analyseInfo ) . forEach ( key => { return delete plugin . analyseInfo [ key ] ; } ) ; pipe . clear ( ) ; plugin . projectAnalyses . forEach ( projectAnalyse => { const result = projectAnalyse ( files , pipe . set ) ; if ( result && typeof result === 'object' ) { Object . keys ( result ) . forEach ( key => { plugin . analyseInfo [ key ] = result [ key ] ; } ) ; } } ) ; return plugin . analyseInfo ; } ;