(values: {
projectAlias?: {
alias: string;
projectId: string;
};
})
| 62 | * Write new default project to .firebaserc |
| 63 | */ |
| 64 | export async function updateFirebaseRCProject(values: { |
| 65 | projectAlias?: { |
| 66 | alias: string; |
| 67 | projectId: string; |
| 68 | }; |
| 69 | }) { |
| 70 | let didChange = false; |
| 71 | const newRCPath = path.join(currentOptions.value.cwd!, ".firebaserc"); |
| 72 | const isNewRC = !firebaseRC.value?.tryReadValue; |
| 73 | |
| 74 | const rc = firebaseRC.value?.tryReadValue ?? new RC(newRCPath, {}); |
| 75 | |
| 76 | if ( |
| 77 | values.projectAlias && |
| 78 | rc.resolveAlias(values.projectAlias.alias) !== values.projectAlias.projectId |
| 79 | ) { |
| 80 | rc.addProjectAlias( |
| 81 | values.projectAlias.alias, |
| 82 | values.projectAlias.projectId, |
| 83 | ); |
| 84 | rc.save(); |
| 85 | if (isNewRC) { |
| 86 | firebaseRC.value = _readRC(vscode.Uri.file(newRCPath)); |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | function notifyFirebaseConfig(broker: ExtensionBrokerImpl) { |
| 92 | broker.send("notifyFirebaseConfig", { |
no test coverage detected
searching dependent graphs…