import DEFAULT_PLUGINS from "../constants/defaultPlugins" ; import sortDependencies from "./sortDependencies" ; param { List < PluginDependency > } deps return { List < PluginDependency > } function listDependencies ( deps ) { const toRemove = deps . filter ( ( plugin ) => { return ! plugin . isEnabled ( ) ; } ) . map ( ( plugin ) => { return plugin . getName ( ) ; } ) ; deps = deps . concat ( DEFAULT_PLUGINS ) ; deps = deps . filterNot ( ( plugin ) => { return toRemove . includes ( plugin . getName ( ) ) ; } ) ; return sortDependencies ( deps ) ; } export default listDependencies ;