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

Method requireTarget

src/rc.ts:206–219  ·  view source on GitHub ↗

* Throws an error if the specified target is not configured for * the specified project.

(project: string, type: string, name: string)

Source from the content-addressed store, hash-verified

204 * the specified project.
205 */
206 requireTarget(project: string, type: string, name: string): string[] {
207 const target = this.target(project, type, name);
208 if (!target.length) {
209 throw new FirebaseError(
210 `Deploy target ${clc.bold(name)} not configured for project ${clc.bold(
211 project,
212 )}. Configure with:
213
214 firebase target:apply ${type} ${name} <resources...>`,
215 );
216 }
217
218 return target;
219 }
220
221 getEtags(projectId: string): Record<EtagResourceType, Record<string, string>> {
222 return this.data.etags[projectId] || { extensionInstances: {} };

Callers 5

prepare.tsFile · 0.80
getRulesConfigFunction · 0.80
getFirestoreConfigFunction · 0.80
resolveTargetsFunction · 0.80
getStorageRulesConfigFunction · 0.80

Calls 1

targetMethod · 0.95

Tested by

no test coverage detected