backend-manager 5.0.2 → 5.0.3
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
CHANGED
package/src/cli/cli.js
CHANGED
|
@@ -279,6 +279,18 @@ Main.prototype.setup = async function () {
|
|
|
279
279
|
return wonderfulVersion.is(nvmrcVer, '>=', engineReqVer);
|
|
280
280
|
}, fix_nvmrc);
|
|
281
281
|
|
|
282
|
+
// Test: Check if firebase CLI is installed
|
|
283
|
+
await self.test('firebase CLI is installed', async function () {
|
|
284
|
+
try {
|
|
285
|
+
const result = await powertools.execute('firebase --version', { log: false });
|
|
286
|
+
return true;
|
|
287
|
+
} catch (error) {
|
|
288
|
+
console.error(chalk.red('Firebase CLI is not installed or not accessible'));
|
|
289
|
+
console.error(chalk.red('Error: ' + error.message));
|
|
290
|
+
return false;
|
|
291
|
+
}
|
|
292
|
+
}, fix_firebaseCLI);
|
|
293
|
+
|
|
282
294
|
// Test: Does the project have a package.json
|
|
283
295
|
// await self.test('project level package.json exists', async function () {
|
|
284
296
|
// return !!(self.projectPackage && self.projectPackage.version && self.projectPackage.name);
|
|
@@ -707,6 +719,7 @@ Main.prototype.test = async function(name, fn, fix, args) {
|
|
|
707
719
|
resolve();
|
|
708
720
|
})
|
|
709
721
|
.catch((e) => {
|
|
722
|
+
log(chalk.red(`Failed to fix: ${e}`));
|
|
710
723
|
if (self.options['--continue']) {
|
|
711
724
|
log(chalk.yellow('⚠️ Continuing despite error because of --continue flag\n'));
|
|
712
725
|
setTimeout(function () {
|
|
@@ -836,7 +849,7 @@ function fix_nodeVersion(self) {
|
|
|
836
849
|
resolve();
|
|
837
850
|
}
|
|
838
851
|
|
|
839
|
-
throw new Error('Please manually fix your outdated Node.js version')
|
|
852
|
+
throw new Error('Please manually fix your outdated Node.js version (either .nvmrc or package.json engines.node).');
|
|
840
853
|
});
|
|
841
854
|
};
|
|
842
855
|
|
|
@@ -852,6 +865,16 @@ function fix_nvmrc(self) {
|
|
|
852
865
|
});
|
|
853
866
|
};
|
|
854
867
|
|
|
868
|
+
async function fix_firebaseCLI(self) {
|
|
869
|
+
return new Promise(function(resolve, reject) {
|
|
870
|
+
log(NOFIX_TEXT);
|
|
871
|
+
log(chalk.red(`Firebase CLI is not installed. Please install it by running:`));
|
|
872
|
+
log(chalk.yellow(`npm install -g firebase-tools`));
|
|
873
|
+
log(chalk.red(`After installation, run ${chalk.bold('npx bm setup')} again.`));
|
|
874
|
+
reject();
|
|
875
|
+
});
|
|
876
|
+
};
|
|
877
|
+
|
|
855
878
|
async function fix_isFirebase(self) {
|
|
856
879
|
log(chalk.red(`This is not a firebase project. Please use ${chalk.bold('firebase-init')} to set up.`));
|
|
857
880
|
throw '';
|
|
File without changes
|
|
File without changes
|