import { Rule , Tree } from '@angular-devkit/schematics' ; import { convertModulePathToPublicAPIImport , getSourceRootPath } from '../../shared/path-helper' ; import { updatePublicAPI } from './update-public-api.rule' ; export function updateTopLevelPublicAPI ( modulePaths ) { return ( tree ) => { const sourceRootPath = getSourceRootPath ( tree ) ; const publicAPIPaths = modulePaths . map ( ( modulePath ) => convertModulePathToPublicAPIImport ( modulePath ) ) ; return updatePublicAPI ( sourceRootPath , publicAPIPaths ) ; } ; }