( root: string, target: string )
| 91 | } |
| 92 | |
| 93 | export function getFirebaseProjectNameFromFs( |
| 94 | root: string, |
| 95 | target: string |
| 96 | ): [string | undefined, string | undefined] { |
| 97 | const path = join(root, ".firebaserc"); |
| 98 | try { |
| 99 | const buffer = readFileSync(path); |
| 100 | const rc: FirebaseRc = JSON.parse(buffer.toString()); |
| 101 | return projectFromRc(rc, target); |
| 102 | } catch (e) { |
| 103 | return [undefined, undefined]; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | const projectFromRc = ( |
| 108 | rc: FirebaseRc, |
no test coverage detected