betterstart-cli 0.0.70 → 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 +20 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -22952,6 +22952,11 @@ function hasNoUsableLinkedProject(detail) {
|
|
|
22952
22952
|
detail
|
|
22953
22953
|
);
|
|
22954
22954
|
}
|
|
22955
|
+
function isDeletedRailwayProject(value) {
|
|
22956
|
+
if (!value || typeof value !== "object") return false;
|
|
22957
|
+
const deletedAt = value.deletedAt;
|
|
22958
|
+
return isString(deletedAt);
|
|
22959
|
+
}
|
|
22955
22960
|
function parseProjectSummary(value) {
|
|
22956
22961
|
if (!value || typeof value !== "object") return void 0;
|
|
22957
22962
|
const project2 = value;
|
|
@@ -23016,7 +23021,7 @@ ${result.stderr}`) ?? "Could not list Railway projects."
|
|
|
23016
23021
|
if (!Array.isArray(payload)) {
|
|
23017
23022
|
throw new Error("Railway returned an invalid project list response.");
|
|
23018
23023
|
}
|
|
23019
|
-
const projects = payload.map(parseProjectSummary);
|
|
23024
|
+
const projects = payload.filter((project2) => !isDeletedRailwayProject(project2)).map(parseProjectSummary);
|
|
23020
23025
|
if (projects.some((project2) => !project2)) {
|
|
23021
23026
|
throw new Error("Railway returned an invalid project list response.");
|
|
23022
23027
|
}
|
|
@@ -23385,7 +23390,11 @@ var ENV_SYNC_SKIP_KEYS = /* @__PURE__ */ new Set([
|
|
|
23385
23390
|
function buildRailwayProviderOverrides(options) {
|
|
23386
23391
|
const overrides = {};
|
|
23387
23392
|
if (options.databaseServiceName) {
|
|
23388
|
-
|
|
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
|
+
}
|
|
23389
23398
|
}
|
|
23390
23399
|
if (options.bucketResourceName) {
|
|
23391
23400
|
const resource = options.bucketResourceName;
|
|
@@ -23532,13 +23541,14 @@ ${list.stderr}`) ?? `Could not list Railway domains for ${service.name}.`
|
|
|
23532
23541
|
return create.success ? firstDomainUrl(parseRailwayJson(create.stdout)) : void 0;
|
|
23533
23542
|
}
|
|
23534
23543
|
function deploymentLine(line) {
|
|
23544
|
+
let message = line;
|
|
23535
23545
|
try {
|
|
23536
23546
|
const parsed = JSON.parse(line);
|
|
23537
|
-
const
|
|
23538
|
-
if (typeof
|
|
23547
|
+
const jsonMessage = parsed.message ?? parsed.status;
|
|
23548
|
+
if (typeof jsonMessage === "string") message = jsonMessage;
|
|
23539
23549
|
} catch {
|
|
23540
23550
|
}
|
|
23541
|
-
return
|
|
23551
|
+
return /^\.+$/.test(message) ? void 0 : message.slice(0, 140);
|
|
23542
23552
|
}
|
|
23543
23553
|
async function readFailedDeploymentLogs(session, cwd, service) {
|
|
23544
23554
|
const logs = await runRailway(
|
|
@@ -23632,7 +23642,10 @@ async function runRailwayDeployFlow(options) {
|
|
|
23632
23642
|
mode: "capture",
|
|
23633
23643
|
timeoutMs: DEPLOY_TIMEOUT_MS,
|
|
23634
23644
|
env: options.session.env,
|
|
23635
|
-
onOutputLine: (line) =>
|
|
23645
|
+
onOutputLine: (line) => {
|
|
23646
|
+
const message = deploymentLine(line);
|
|
23647
|
+
if (message) deploySpinner.message(message);
|
|
23648
|
+
}
|
|
23636
23649
|
}
|
|
23637
23650
|
);
|
|
23638
23651
|
} finally {
|
|
@@ -27821,6 +27834,7 @@ Run manually: ${pc9.cyan(betterstartExecCommand(pm, "seed"))}`,
|
|
|
27821
27834
|
service: options.railwayService,
|
|
27822
27835
|
providerOverrides: buildRailwayProviderOverrides({
|
|
27823
27836
|
databaseServiceName: railwayDatabaseServiceName,
|
|
27837
|
+
buildCommand: runCommand(detectPackageManager(cwd), "build"),
|
|
27824
27838
|
bucketResourceName: railwayBucketResourceName,
|
|
27825
27839
|
bucketUrlStyle: railwayBucketUrlStyle
|
|
27826
27840
|
})
|