betterstart-cli 0.0.69 → 0.0.71
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 +13 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -22219,7 +22219,7 @@ async function promptServices() {
|
|
|
22219
22219
|
options: [
|
|
22220
22220
|
{
|
|
22221
22221
|
value: "vercel",
|
|
22222
|
-
label: "Vercel (Neon)",
|
|
22222
|
+
label: "Vercel (Neon Postgress)",
|
|
22223
22223
|
hint: "Automatically provision a Neon Postgres database"
|
|
22224
22224
|
},
|
|
22225
22225
|
{
|
|
@@ -22947,6 +22947,16 @@ import pc2 from "picocolors";
|
|
|
22947
22947
|
function isString(value) {
|
|
22948
22948
|
return typeof value === "string" && value.trim().length > 0;
|
|
22949
22949
|
}
|
|
22950
|
+
function hasNoUsableLinkedProject(detail) {
|
|
22951
|
+
return /no linked project found|no project specified.*railway link|project is deleted.*railway link/i.test(
|
|
22952
|
+
detail
|
|
22953
|
+
);
|
|
22954
|
+
}
|
|
22955
|
+
function isDeletedRailwayProject(value) {
|
|
22956
|
+
if (!value || typeof value !== "object") return false;
|
|
22957
|
+
const deletedAt = value.deletedAt;
|
|
22958
|
+
return isString(deletedAt);
|
|
22959
|
+
}
|
|
22950
22960
|
function parseProjectSummary(value) {
|
|
22951
22961
|
if (!value || typeof value !== "object") return void 0;
|
|
22952
22962
|
const project2 = value;
|
|
@@ -22970,7 +22980,7 @@ async function readRailwayProjectContext(runner, cwd, environment, env) {
|
|
|
22970
22980
|
if (!result.success) {
|
|
22971
22981
|
const detail = railwayOutputTail(`${result.stdout}
|
|
22972
22982
|
${result.stderr}`);
|
|
22973
|
-
if (detail &&
|
|
22983
|
+
if (detail && hasNoUsableLinkedProject(detail)) {
|
|
22974
22984
|
return void 0;
|
|
22975
22985
|
}
|
|
22976
22986
|
throw new Error(detail ?? "Could not inspect the linked Railway project.");
|
|
@@ -23011,7 +23021,7 @@ ${result.stderr}`) ?? "Could not list Railway projects."
|
|
|
23011
23021
|
if (!Array.isArray(payload)) {
|
|
23012
23022
|
throw new Error("Railway returned an invalid project list response.");
|
|
23013
23023
|
}
|
|
23014
|
-
const projects = payload.map(parseProjectSummary);
|
|
23024
|
+
const projects = payload.filter((project2) => !isDeletedRailwayProject(project2)).map(parseProjectSummary);
|
|
23015
23025
|
if (projects.some((project2) => !project2)) {
|
|
23016
23026
|
throw new Error("Railway returned an invalid project list response.");
|
|
23017
23027
|
}
|