forge-remote 0.1.7 ā 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/init.js +19 -1
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -548,7 +548,25 @@ export async function runInit({ projectId: overrideProjectId } = {}) {
|
|
|
548
548
|
|
|
549
549
|
console.log(chalk.bold("\nš Step 5/11 ā Enabling Firestore...\n"));
|
|
550
550
|
|
|
551
|
-
//
|
|
551
|
+
// Enable the Firestore API first (required for new projects).
|
|
552
|
+
try {
|
|
553
|
+
console.log(
|
|
554
|
+
chalk.dim(" Enabling Firestore API (if not already enabled)..."),
|
|
555
|
+
);
|
|
556
|
+
await enableApi(projectId, "firestore.googleapis.com");
|
|
557
|
+
console.log(chalk.green(" ā Firestore API enabled"));
|
|
558
|
+
} catch (e) {
|
|
559
|
+
console.log(
|
|
560
|
+
chalk.yellow(` ā Could not enable Firestore API: ${e.message}`),
|
|
561
|
+
);
|
|
562
|
+
console.log(
|
|
563
|
+
chalk.dim(
|
|
564
|
+
" Continuing ā Firestore creation may still work if already enabled.",
|
|
565
|
+
),
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// Check if Firestore already exists by listing databases.
|
|
552
570
|
const existingDbs = run(
|
|
553
571
|
["firebase", "firestore:databases:list", "--project", projectId],
|
|
554
572
|
{ silent: true },
|