@rebasepro/cli 0.12.0 → 0.12.1-canary.g181d0fe
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 +13 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +11 -11
- 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/frontend/package.json +3 -3
- package/templates/template/frontend/src/App.tsx +2 -1
- 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;
|
|
@@ -1461,9 +1462,10 @@ async function replacePlaceholders(options) {
|
|
|
1461
1462
|
versionToUse = stdout.trim();
|
|
1462
1463
|
} catch {
|
|
1463
1464
|
try {
|
|
1465
|
+
const tag = cliVersion.includes("canary") ? "canary" : "latest";
|
|
1464
1466
|
const { stdout } = await execa(viewBin, [
|
|
1465
1467
|
"view",
|
|
1466
|
-
`${pkgName}@${
|
|
1468
|
+
`${pkgName}@${tag}`,
|
|
1467
1469
|
"version"
|
|
1468
1470
|
]);
|
|
1469
1471
|
if (!stdout.trim()) throw new Error("Not found");
|
|
@@ -1560,6 +1562,11 @@ async function configureEnvFile(targetDirectory, databaseUrl) {
|
|
|
1560
1562
|
const dbPassword = crypto.randomBytes(16).toString("hex");
|
|
1561
1563
|
const serviceKey = crypto.randomBytes(48).toString("base64");
|
|
1562
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
|
+
});
|
|
1563
1570
|
envContent = envContent.replace(/^JWT_SECRET=.*$/m, `JWT_SECRET=${jwtSecret}`);
|
|
1564
1571
|
envContent = envContent.replace(/^#\s*REBASE_SERVICE_KEY=.*$/m, `REBASE_SERVICE_KEY=${serviceKey}`);
|
|
1565
1572
|
const runtimeVersion = readCliVersion();
|
|
@@ -2084,7 +2091,7 @@ var REMOVED_APP_TYPES = {
|
|
|
2084
2091
|
mobile: "mobile apps are no longer declared in the manifest — nothing consumed this type. Remove the entry"
|
|
2085
2092
|
};
|
|
2086
2093
|
/** Reserved because they name things in URLs and CLI output. */
|
|
2087
|
-
var RESERVED_APP_NAMES = new Set([
|
|
2094
|
+
var RESERVED_APP_NAMES = /* @__PURE__ */ new Set([
|
|
2088
2095
|
"api",
|
|
2089
2096
|
"health",
|
|
2090
2097
|
"metrics",
|
|
@@ -3081,7 +3088,7 @@ ${chalk.green.bold("Description")}
|
|
|
3081
3088
|
*/
|
|
3082
3089
|
var DEFAULT_BUNDLE_DIR = "dist-bundle";
|
|
3083
3090
|
/** Packages whose presence means the bundle cannot run on a stock runtime image. */
|
|
3084
|
-
var KNOWN_NATIVE_PACKAGES = new Set([
|
|
3091
|
+
var KNOWN_NATIVE_PACKAGES = /* @__PURE__ */ new Set([
|
|
3085
3092
|
"sharp",
|
|
3086
3093
|
"canvas",
|
|
3087
3094
|
"bcrypt",
|
|
@@ -3097,7 +3104,7 @@ var KNOWN_NATIVE_PACKAGES = new Set([
|
|
|
3097
3104
|
"pg-native"
|
|
3098
3105
|
]);
|
|
3099
3106
|
/** Dependencies supplied by the runtime image itself, not by the bundle. */
|
|
3100
|
-
var RUNTIME_PROVIDED = new Set([
|
|
3107
|
+
var RUNTIME_PROVIDED = /* @__PURE__ */ new Set([
|
|
3101
3108
|
"@rebasepro/server",
|
|
3102
3109
|
"@rebasepro/types",
|
|
3103
3110
|
"@rebasepro/client",
|