(plugins: Plugin[])
| 10 | import { readdirp } from './fs'; |
| 11 | |
| 12 | export async function getPluginFiles(plugins: Plugin[]): Promise<string[]> { |
| 13 | let filenameList: string[] = []; |
| 14 | |
| 15 | const options: ReaddirPOptions = { |
| 16 | filter: (item) => { |
| 17 | if (item.stats.isFile() && (item.path.endsWith('.swift') || item.path.endsWith('.m'))) { |
| 18 | return true; |
| 19 | } else { |
| 20 | return false; |
| 21 | } |
| 22 | }, |
| 23 | }; |
| 24 | |
| 25 | for (const plugin of plugins) { |
| 26 | if (plugin.ios && getPluginType(plugin, 'ios') === PluginType.Core) { |
| 27 | const pluginPath = resolve(plugin.rootPath, plugin.ios?.path); |
| 28 | const filenames = await readdirp(pluginPath, options); |
| 29 | filenameList = filenameList.concat(filenames); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | return filenameList; |
| 34 | } |
| 35 | |
| 36 | export async function findPluginClasses(files: string[]): Promise<string[]> { |
| 37 | const classList: string[] = []; |
no test coverage detected