@rebasepro/cli 0.12.1-canary.g68f9a47 → 0.12.1-canary.g8b4f68e

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 CHANGED
@@ -533,7 +533,7 @@ async function requireClient(rawArgs) {
533
533
  * the ingress and the console read — see saas/backend/src/utils/tenant-domain.ts).
534
534
  *
535
535
  * The CLI cannot know this value: it is per-deployment configuration (production
536
- * serves tenants at `apps.rebase.pro`, a dev control plane at `localhost`). It
536
+ * serves tenants at `rebase.website`, a dev control plane at `localhost`). It
537
537
  * used to be hardcoded to `rebase.pro`, so `cloud projects create` congratulated
538
538
  * the user with a URL that resolves nowhere near their app.
539
539
  *
@@ -1573,7 +1573,9 @@ async function configureEnvFile(targetDirectory, databaseUrl) {
1573
1573
  envContent = /^#?\s*REBASE_VERSION=.*$/m.test(envContent) ? envContent.replace(/^#?\s*REBASE_VERSION=.*$/m, `REBASE_VERSION=${runtimeVersion}`) : `${envContent.trimEnd()}\n\n# The Rebase runtime image tag docker-compose.yml pulls.\n# Change this and restart to upgrade; your project bundle is untouched.\nREBASE_VERSION=${runtimeVersion}\n`;
1574
1574
  if (databaseUrl) {
1575
1575
  if (/[\r\n]/.test(databaseUrl)) throw new Error("Invalid DATABASE_URL: multiline values are not allowed.");
1576
- envContent = envContent.replace(/^DATABASE_URL=.*$/m, `DATABASE_URL=${databaseUrl}\nDATABASE_PASSWORD=${dbPassword}`);
1576
+ const { pinSearchPath } = await import("@rebasepro/server-postgres");
1577
+ const pinnedUrl = pinSearchPath(databaseUrl);
1578
+ envContent = envContent.replace(/^DATABASE_URL=.*$/m, `DATABASE_URL=${pinnedUrl}\nDATABASE_PASSWORD=${dbPassword}`);
1577
1579
  } else {
1578
1580
  const dbPort = await findAvailablePort(5432);
1579
1581
  envContent = envContent.replace(/^DATABASE_URL=.*$/m, `DATABASE_URL=postgresql://rebase:${dbPassword}@localhost:${dbPort}/rebase?options=-c%20search_path=public&sslmode=disable\nDATABASE_PASSWORD=${dbPassword}`);