MCPcopy Create free account
hub / github.com/firebase/firebase-tools / processFlutterDir

Function processFlutterDir

src/appUtils.ts:137–163  ·  view source on GitHub ↗
(dirPath: string, filePath: string)

Source from the content-addressed store, hash-verified

135}
136
137async 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
165function isPathInside(parent: string, child: string): boolean {
166 const relativePath = path.relative(parent, child);

Callers 1

detectAppsFunction · 0.85

Calls 2

detectAppIdsForPlatformFunction · 0.85
allMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…