forge-remote 0.1.24 → 0.1.25
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/cli.js +3 -1
- package/src/init.js +57 -4
- package/src/logger.js +1 -0
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -210,8 +210,10 @@ program
|
|
|
210
210
|
if (!sdkConfig) {
|
|
211
211
|
console.error("\nCould not load Firebase SDK config.");
|
|
212
212
|
console.error(
|
|
213
|
-
"Run `forge-remote init` first, or ensure the Firebase CLI is installed
|
|
213
|
+
"Run `npx forge-remote init` first, or ensure the Firebase CLI is installed.",
|
|
214
214
|
);
|
|
215
|
+
console.error(" Install Firebase CLI: npm install -g firebase-tools");
|
|
216
|
+
console.error(` Setup guide: https://forgeremote.com/#how-it-works\n`);
|
|
215
217
|
process.exit(1);
|
|
216
218
|
}
|
|
217
219
|
|
package/src/init.js
CHANGED
|
@@ -200,21 +200,74 @@ export async function runInit({ projectId: overrideProjectId } = {}) {
|
|
|
200
200
|
console.log(
|
|
201
201
|
chalk.dim(" a QR code to pair with the mobile app. Fully automated.\n"),
|
|
202
202
|
);
|
|
203
|
+
console.log(
|
|
204
|
+
chalk.dim(
|
|
205
|
+
` Full setup guide: ${chalk.cyan("https://forgeremote.com/#how-it-works")}`,
|
|
206
|
+
),
|
|
207
|
+
);
|
|
203
208
|
|
|
204
|
-
// ──
|
|
209
|
+
// ── Prerequisites check ──────────────────────────────────────────────────
|
|
205
210
|
|
|
206
|
-
console.log(chalk.bold("\n📋
|
|
211
|
+
console.log(chalk.bold("\n📋 Prerequisites Check\n"));
|
|
207
212
|
|
|
213
|
+
const nodeVersion = run(["node", "--version"], { silent: true });
|
|
214
|
+
const npmVersion = run(["npm", "--version"], { silent: true });
|
|
208
215
|
const firebaseVersion = run(["firebase", "--version"], { silent: true });
|
|
216
|
+
|
|
217
|
+
console.log(
|
|
218
|
+
nodeVersion
|
|
219
|
+
? chalk.green(` ✓ Node.js ${nodeVersion}`)
|
|
220
|
+
: chalk.red(" ✗ Node.js — not found"),
|
|
221
|
+
);
|
|
222
|
+
console.log(
|
|
223
|
+
npmVersion
|
|
224
|
+
? chalk.green(` ✓ npm ${npmVersion}`)
|
|
225
|
+
: chalk.red(" ✗ npm — not found"),
|
|
226
|
+
);
|
|
227
|
+
console.log(
|
|
228
|
+
firebaseVersion
|
|
229
|
+
? chalk.green(` ✓ Firebase CLI ${firebaseVersion}`)
|
|
230
|
+
: chalk.red(" ✗ Firebase CLI — not found"),
|
|
231
|
+
);
|
|
232
|
+
|
|
233
|
+
if (!nodeVersion) {
|
|
234
|
+
console.error(chalk.red("\n Node.js is required (v18 or later).\n"));
|
|
235
|
+
console.error(chalk.bold(" Install it from:\n"));
|
|
236
|
+
console.error(chalk.cyan(" https://nodejs.org\n"));
|
|
237
|
+
process.exit(1);
|
|
238
|
+
}
|
|
239
|
+
|
|
209
240
|
if (!firebaseVersion) {
|
|
210
|
-
console.error(
|
|
241
|
+
console.error(
|
|
242
|
+
chalk.red("\n Firebase CLI is required but not installed.\n"),
|
|
243
|
+
);
|
|
244
|
+
console.error(
|
|
245
|
+
chalk.dim(
|
|
246
|
+
" The Firebase CLI is a free command-line tool from Google that lets",
|
|
247
|
+
),
|
|
248
|
+
);
|
|
249
|
+
console.error(
|
|
250
|
+
chalk.dim(
|
|
251
|
+
" Forge Remote create and manage your Firebase project automatically.\n",
|
|
252
|
+
),
|
|
253
|
+
);
|
|
211
254
|
console.error(chalk.bold(" Install it with:\n"));
|
|
212
255
|
console.error(chalk.cyan(" npm install -g firebase-tools\n"));
|
|
256
|
+
console.error(chalk.dim(" Then run this command again:\n"));
|
|
257
|
+
console.error(chalk.cyan(" npx forge-remote init\n"));
|
|
213
258
|
console.error(
|
|
214
|
-
chalk.dim(
|
|
259
|
+
chalk.dim(
|
|
260
|
+
` For more info: ${chalk.cyan("https://forgeremote.com/#how-it-works")}\n`,
|
|
261
|
+
),
|
|
215
262
|
);
|
|
216
263
|
process.exit(1);
|
|
217
264
|
}
|
|
265
|
+
|
|
266
|
+
console.log(chalk.green("\n All prerequisites met!\n"));
|
|
267
|
+
|
|
268
|
+
// ── Step 1: Check Firebase CLI ──────────────────────────────────────────
|
|
269
|
+
|
|
270
|
+
console.log(chalk.bold("\n📋 Step 1/11 — Checking Firebase CLI...\n"));
|
|
218
271
|
console.log(chalk.green(` ✓ Firebase CLI ${firebaseVersion}`));
|
|
219
272
|
|
|
220
273
|
// ── Step 2: Firebase login ──────────────────────────────────────────────
|
package/src/logger.js
CHANGED
|
@@ -134,6 +134,7 @@ export function banner(hostname, platform, desktopId, projectCount) {
|
|
|
134
134
|
console.log(` ${BOLD}Projects:${RESET} ${projectCount} found`);
|
|
135
135
|
console.log(`${BOLD}${CYAN}${line}${RESET}`);
|
|
136
136
|
console.log(` ${GREEN}Listening for commands...${RESET}`);
|
|
137
|
+
console.log(` ${DIM}Docs: https://forgeremote.com${RESET}`);
|
|
137
138
|
console.log(` ${DIM}Press Ctrl+C to stop${RESET}\n`);
|
|
138
139
|
}
|
|
139
140
|
|