(dirPath: string, filePath: string)
| 135 | } |
| 136 | |
| 137 | async function processFlutterDir(dirPath: string, filePath: string): Promise<App[]> { |
| 138 | const flutterDir = path.dirname(filePath); |
| 139 | const flutterAppIds = await detectAppIdsForPlatform(dirPath, Platform.FLUTTER); |
| 140 | |
| 141 | if (flutterAppIds.length === 0) { |
| 142 | return [ |
| 143 | { |
| 144 | platform: Platform.FLUTTER, |
| 145 | directory: flutterDir, |
| 146 | }, |
| 147 | ]; |
| 148 | } |
| 149 | |
| 150 | const flutterApps = await Promise.all( |
| 151 | flutterAppIds.map((app) => { |
| 152 | const flutterApp: App = { |
| 153 | platform: Platform.FLUTTER, |
| 154 | directory: flutterDir, |
| 155 | appId: app.appId, |
| 156 | bundleId: app.bundleId, |
| 157 | }; |
| 158 | return flutterApp; |
| 159 | }), |
| 160 | ); |
| 161 | |
| 162 | return flutterApps.flat(); |
| 163 | } |
| 164 | |
| 165 | function isPathInside(parent: string, child: string): boolean { |
| 166 | const relativePath = path.relative(parent, child); |
no test coverage detected
searching dependent graphs…