betterstart-cli 0.0.75 → 0.0.77
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 +26 -34
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -22684,23 +22684,6 @@ async function promptDeployProvider(initialValue = "none") {
|
|
|
22684
22684
|
}
|
|
22685
22685
|
return provider;
|
|
22686
22686
|
}
|
|
22687
|
-
async function promptRailwayBucketRegion() {
|
|
22688
|
-
const region = await p14.select({
|
|
22689
|
-
message: "Choose a Railway bucket region",
|
|
22690
|
-
options: [
|
|
22691
|
-
{ value: "iad", label: "US East (Virginia)" },
|
|
22692
|
-
{ value: "sjc", label: "US West (California)" },
|
|
22693
|
-
{ value: "ams", label: "Europe (Amsterdam)" },
|
|
22694
|
-
{ value: "sin", label: "Asia Pacific (Singapore)" }
|
|
22695
|
-
],
|
|
22696
|
-
initialValue: "iad"
|
|
22697
|
-
});
|
|
22698
|
-
if (p14.isCancel(region)) {
|
|
22699
|
-
p14.cancel("Setup cancelled.");
|
|
22700
|
-
process.exit(0);
|
|
22701
|
-
}
|
|
22702
|
-
return region;
|
|
22703
|
-
}
|
|
22704
22687
|
|
|
22705
22688
|
// adapters/next/init/railway/deploy.ts
|
|
22706
22689
|
import fs28 from "fs";
|
|
@@ -23578,24 +23561,33 @@ ${logs.stderr}`);
|
|
|
23578
23561
|
}
|
|
23579
23562
|
async function runRailwayDeployFlow(options) {
|
|
23580
23563
|
try {
|
|
23581
|
-
const
|
|
23582
|
-
|
|
23583
|
-
|
|
23584
|
-
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23564
|
+
const prepSpinner = spinner2();
|
|
23565
|
+
prepSpinner.start("Connecting the Railway web service");
|
|
23566
|
+
let service;
|
|
23567
|
+
let url;
|
|
23568
|
+
try {
|
|
23569
|
+
service = await ensureRailwayAppService(
|
|
23570
|
+
options.session,
|
|
23571
|
+
options.cwd,
|
|
23572
|
+
options.service?.trim() || "web"
|
|
23589
23573
|
);
|
|
23574
|
+
if ((service.replicaCount ?? 1) > 1) {
|
|
23575
|
+
throw new Error(
|
|
23576
|
+
`Railway service ${service.name} has ${service.replicaCount} replicas. BetterStart Railway v1 supports one replica because Next.js cache invalidation is process-local.`
|
|
23577
|
+
);
|
|
23578
|
+
}
|
|
23579
|
+
await linkRailwayService(
|
|
23580
|
+
options.session.runner,
|
|
23581
|
+
options.cwd,
|
|
23582
|
+
options.session.project,
|
|
23583
|
+
service,
|
|
23584
|
+
options.session.env
|
|
23585
|
+
);
|
|
23586
|
+
prepSpinner.message("Setting up the Railway domain");
|
|
23587
|
+
url = await ensureRailwayDomain(options.session, options.cwd, service);
|
|
23588
|
+
} finally {
|
|
23589
|
+
prepSpinner.clear();
|
|
23590
23590
|
}
|
|
23591
|
-
await linkRailwayService(
|
|
23592
|
-
options.session.runner,
|
|
23593
|
-
options.cwd,
|
|
23594
|
-
options.session.project,
|
|
23595
|
-
service,
|
|
23596
|
-
options.session.env
|
|
23597
|
-
);
|
|
23598
|
-
const url = await ensureRailwayDomain(options.session, options.cwd, service);
|
|
23599
23591
|
if (!url) {
|
|
23600
23592
|
throw new Error("Railway could not create a public domain required for Better Auth.");
|
|
23601
23593
|
}
|
|
@@ -27339,7 +27331,7 @@ async function runInitCommand(name, options) {
|
|
|
27339
27331
|
};
|
|
27340
27332
|
const provisionRailwayBucket = async () => {
|
|
27341
27333
|
try {
|
|
27342
|
-
const region = options.railwayBucketRegion ??
|
|
27334
|
+
const region = options.railwayBucketRegion ?? "iad";
|
|
27343
27335
|
const session = await getRailwaySession();
|
|
27344
27336
|
const bucket = await ensureRailwayBucket(session, cwd, {
|
|
27345
27337
|
name: "media",
|