betterstart-cli 0.0.71 → 0.0.72

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/cli.js CHANGED
@@ -23390,7 +23390,11 @@ var ENV_SYNC_SKIP_KEYS = /* @__PURE__ */ new Set([
23390
23390
  function buildRailwayProviderOverrides(options) {
23391
23391
  const overrides = {};
23392
23392
  if (options.databaseServiceName) {
23393
- overrides.DATABASE_URL = `\${{${options.databaseServiceName}.DATABASE_URL}}`;
23393
+ const resource = options.databaseServiceName;
23394
+ overrides.DATABASE_URL = `\${{${resource}.DATABASE_URL}}`;
23395
+ if (options.buildCommand?.trim()) {
23396
+ overrides.RAILPACK_BUILD_CMD = `DATABASE_URL='\${{${resource}.DATABASE_PUBLIC_URL}}' ${options.buildCommand}`;
23397
+ }
23394
23398
  }
23395
23399
  if (options.bucketResourceName) {
23396
23400
  const resource = options.bucketResourceName;
@@ -23537,13 +23541,14 @@ ${list.stderr}`) ?? `Could not list Railway domains for ${service.name}.`
23537
23541
  return create.success ? firstDomainUrl(parseRailwayJson(create.stdout)) : void 0;
23538
23542
  }
23539
23543
  function deploymentLine(line) {
23544
+ let message = line;
23540
23545
  try {
23541
23546
  const parsed = JSON.parse(line);
23542
- const message = parsed.message ?? parsed.status;
23543
- if (typeof message === "string") return message.slice(0, 140);
23547
+ const jsonMessage = parsed.message ?? parsed.status;
23548
+ if (typeof jsonMessage === "string") message = jsonMessage;
23544
23549
  } catch {
23545
23550
  }
23546
- return line.slice(0, 140);
23551
+ return /^\.+$/.test(message) ? void 0 : message.slice(0, 140);
23547
23552
  }
23548
23553
  async function readFailedDeploymentLogs(session, cwd, service) {
23549
23554
  const logs = await runRailway(
@@ -23637,7 +23642,10 @@ async function runRailwayDeployFlow(options) {
23637
23642
  mode: "capture",
23638
23643
  timeoutMs: DEPLOY_TIMEOUT_MS,
23639
23644
  env: options.session.env,
23640
- onOutputLine: (line) => deploySpinner.message(deploymentLine(line))
23645
+ onOutputLine: (line) => {
23646
+ const message = deploymentLine(line);
23647
+ if (message) deploySpinner.message(message);
23648
+ }
23641
23649
  }
23642
23650
  );
23643
23651
  } finally {
@@ -27826,6 +27834,7 @@ Run manually: ${pc9.cyan(betterstartExecCommand(pm, "seed"))}`,
27826
27834
  service: options.railwayService,
27827
27835
  providerOverrides: buildRailwayProviderOverrides({
27828
27836
  databaseServiceName: railwayDatabaseServiceName,
27837
+ buildCommand: runCommand(detectPackageManager(cwd), "build"),
27829
27838
  bucketResourceName: railwayBucketResourceName,
27830
27839
  bucketUrlStyle: railwayBucketUrlStyle
27831
27840
  })