From 9a9e2cf15069d7d39c2df45b7b2ef4ddbb78ba8e Mon Sep 17 00:00:00 2001 From: Alberto Di Gioacchino Date: Mon, 8 Feb 2021 17:02:39 +0100 Subject: [PATCH] fix(all-general): fix rtdb instances list command --- scripts/load-rules-to-rtdb-instances.js | 4 ++-- scripts/pre-deploy.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/load-rules-to-rtdb-instances.js b/scripts/load-rules-to-rtdb-instances.js index f8b87ba8..c65c4edd 100644 --- a/scripts/load-rules-to-rtdb-instances.js +++ b/scripts/load-rules-to-rtdb-instances.js @@ -25,11 +25,11 @@ async function loadRulesToRTDBInstances(app) { await fetch(databaseURL, {method: 'PUT', body: databaseRules}) } } else { - const locations = ['europe-west1', 'us-central1']; + const locations = ['europe-west1']; let instancesList = []; for (const location of locations) { const listDatabases = firebaseTools.database.instances.list - const databases = await listDatabases({location}); + const databases = await listDatabases({location, project: process.env.FIREBASE_PROJECT_ID}); instancesList = [...instancesList, ...databases]; } await run(`firebase target:clear database main --project $FIREBASE_PROJECT_ID`); diff --git a/scripts/pre-deploy.js b/scripts/pre-deploy.js index d5725e8e..5f1d1d41 100644 --- a/scripts/pre-deploy.js +++ b/scripts/pre-deploy.js @@ -20,11 +20,11 @@ async function copyPackages() { } async function fillRtdbInstancesFile() { - const locations = ['europe-west1', 'us-central1']; + const locations = ['europe-west1']; let instancesList = []; for (const location of locations) { const listDatabases = firebaseTools.database.instances.list - const databases = await listDatabases({location}); + const databases = await listDatabases({location, project: process.env.FIREBASE_PROJECT_ID}); instancesList = [...instancesList, ...databases.map(d => ({ url: `https://${d.instance}.${location}.firebasedatabase.app`, name: d.instance,