@rebasepro/cli 0.12.1-canary.g5f403cf → 0.12.1-canary.g7f1150f
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/dist/index.es.js +8 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +7 -7
- package/templates/overlays/baas/backend/package.json +2 -2
- package/templates/overlays/baas/package.json +1 -2
- package/templates/template/backend/package.json +2 -2
- package/templates/template/config/collections/index.ts +9 -1
- package/templates/template/frontend/package.json +1 -2
- package/templates/template/frontend/src/main.tsx +2 -1
- package/templates/template/frontend/vite.config.ts +0 -1
- package/templates/template/package.json +1 -2
package/dist/index.es.js
CHANGED
|
@@ -355,8 +355,9 @@ function requireProjectRoot() {
|
|
|
355
355
|
const root = findProjectRoot();
|
|
356
356
|
if (!root) {
|
|
357
357
|
console.error(chalk.red("✗ Could not find a Rebase project root."));
|
|
358
|
-
console.error(chalk.gray(
|
|
359
|
-
console.error(chalk.gray("
|
|
358
|
+
console.error(chalk.gray(` Looked in this directory and every parent for a ${MANIFEST_FILENAME},`));
|
|
359
|
+
console.error(chalk.gray(" a package.json with a \"backend\" workspace, or a backend/ next to a config/."));
|
|
360
|
+
console.error(chalk.gray(" Run this from inside a project, or create one with `rebase init`."));
|
|
360
361
|
process.exit(1);
|
|
361
362
|
}
|
|
362
363
|
return root;
|
|
@@ -1561,6 +1562,11 @@ async function configureEnvFile(targetDirectory, databaseUrl) {
|
|
|
1561
1562
|
const dbPassword = crypto.randomBytes(16).toString("hex");
|
|
1562
1563
|
const serviceKey = crypto.randomBytes(48).toString("base64");
|
|
1563
1564
|
let envContent = fs.readFileSync(envPath, "utf-8");
|
|
1565
|
+
envContent = envContent.replace(/^(# ║ {2})(Copy this file to \.env and fill in the values)( +║)$/m, (_match, open, old, close) => {
|
|
1566
|
+
const replacement = "Generated by `rebase init` — the secrets below are already set";
|
|
1567
|
+
const width = old.length + close.length - 1;
|
|
1568
|
+
return open + replacement.slice(0, width).padEnd(width, " ") + "║";
|
|
1569
|
+
});
|
|
1564
1570
|
envContent = envContent.replace(/^JWT_SECRET=.*$/m, `JWT_SECRET=${jwtSecret}`);
|
|
1565
1571
|
envContent = envContent.replace(/^#\s*REBASE_SERVICE_KEY=.*$/m, `REBASE_SERVICE_KEY=${serviceKey}`);
|
|
1566
1572
|
const runtimeVersion = readCliVersion();
|