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

Function requireDatabaseInstance

src/requireDatabaseInstance.ts:17–33  ·  view source on GitHub ↗
(options: any)

Source from the content-addressed store, hash-verified

15 * @return void promise.
16 */
17export async function requireDatabaseInstance(options: any): Promise<void> {
18 if (options.instance) {
19 return;
20 }
21 let instance;
22 try {
23 instance = await getDefaultDatabaseInstance(options.project);
24 } catch (err: unknown) {
25 throw new FirebaseError(`Failed to get details for project: ${options.project}.`, {
26 original: getError(err),
27 });
28 }
29 if (instance === "") {
30 throw new FirebaseError(MISSING_DEFAULT_INSTANCE_ERROR_MESSAGE);
31 }
32 options.instance = instance;
33}

Callers 2

deploy.tsFile · 0.90

Calls 2

getErrorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…