betterstart-cli 0.0.101 → 0.0.102

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/README.md CHANGED
@@ -1,5 +1 @@
1
- # betterstart-cli
2
-
3
- Preset- and integration-based BetterStart Admin CLI.
4
-
5
- > **Warning:** This project is a work in progress. Expect bugs, breaking changes, and incomplete features.
1
+ > **Warning:** This project is a work in progress. Do not use.
package/dist/cli.js CHANGED
@@ -97,6 +97,7 @@ import * as p7 from "@clack/prompts";
97
97
  // constants/commands.ts
98
98
  var ADD_COMMAND = "add";
99
99
  var CREATE_COMMAND = "create";
100
+ var DEFAULT_DATABASE_PLAN = "free_v3";
100
101
  var GENERATE_COMMAND = "generate";
101
102
  var INIT_COMMAND = "init";
102
103
  var REMOVE_COMMAND = "remove";
@@ -591,7 +592,10 @@ function createInitCommand(runtime) {
591
592
  ).option("--deploy-provider <provider>", "Deploy provider: vercel, railway, or none").option(
592
593
  "--use-existing-resources",
593
594
  "Require database/storage credentials from existing project env files; never provision them"
594
- ).option("--database-plan <id>", "Neon plan id for a Vercel-provisioned database").option("--railway-workspace <id-or-name>", "Railway workspace for a new project").option("--railway-project <id-or-name>", "Existing Railway project to intentionally reuse").option("--railway-environment <id-or-name>", "Railway environment (default: production)").option("--railway-service <id-or-name>", "Railway app service (default: web)").option(
595
+ ).option(
596
+ "--database-plan <id>",
597
+ `Neon plan id for a Vercel-provisioned database (default: ${DEFAULT_DATABASE_PLAN})`
598
+ ).option("--railway-workspace <id-or-name>", "Railway workspace for a new project").option("--railway-project <id-or-name>", "Existing Railway project to intentionally reuse").option("--railway-environment <id-or-name>", "Railway environment (default: production)").option("--railway-service <id-or-name>", "Railway app service (default: web)").option(
595
599
  "--railway-bucket-region <region>",
596
600
  "Railway bucket region: sjc, iad, ams, or sin (default: iad)"
597
601
  ).option("--force", "Overwrite all existing Admin files (nuclear option)").addHelpText(
@@ -28170,23 +28174,17 @@ function neonFailureMessage(reason) {
28170
28174
  import * as p57 from "@clack/prompts";
28171
28175
  import pc14 from "picocolors";
28172
28176
 
28173
- // adapters/next/init/vercel/neon/connected-neon-add-args.ts
28174
- function connectedNeonAddArgs(options) {
28175
- const addArgs = ["integration", "add", "neon"];
28176
- if (options.plan) addArgs.push("--plan", options.plan);
28177
- return addArgs;
28178
- }
28179
-
28180
28177
  // adapters/next/init/vercel/neon/find-accept-terms-url.ts
28181
28178
  function findAcceptTermsUrl(line) {
28182
28179
  return ACCEPT_TERMS_URL_PATTERN.exec(line)?.[0];
28183
28180
  }
28184
28181
 
28185
28182
  // adapters/next/init/vercel/neon/neon-add-args.ts
28186
- function neonAddArgs(options) {
28187
- const addArgs = ["integration", "add", "neon", "--format", "json"];
28188
- if (options.plan) addArgs.push("--plan", options.plan);
28189
- return addArgs;
28183
+ function neonAddArgs(options, output) {
28184
+ const args = ["integration", "add", "neon"];
28185
+ if (output === "json") args.push("--format", "json");
28186
+ args.push("--plan", options.plan ?? DEFAULT_DATABASE_PLAN);
28187
+ return args;
28190
28188
  }
28191
28189
 
28192
28190
  // adapters/next/init/vercel/neon/read-neon-provision-info.ts
@@ -28212,7 +28210,7 @@ async function provisionNeonInteractive(runner, cwd, options) {
28212
28210
  eraseRows(termsNotice.rows);
28213
28211
  p57.log.step(termsNotice.text);
28214
28212
  };
28215
- const quiet = await runVercel(runner, neonAddArgs(options), {
28213
+ const quiet = await runVercel(runner, neonAddArgs(options, "json"), {
28216
28214
  cwd,
28217
28215
  mode: "capture",
28218
28216
  timeoutMs: PROVISION_TIMEOUT_MS,
@@ -28245,10 +28243,8 @@ ${pc14.dim(termsUrl)}`,
28245
28243
  return readNeonProvisionInfo(quiet.stdout);
28246
28244
  }
28247
28245
  quietSpinner.clear();
28248
- p57.log.info(
28249
- `Create your Neon database in the Vercel prompts below ${pc14.dim("(the Free plan is recommended).")}`
28250
- );
28251
- const add = await runVercel(runner, connectedNeonAddArgs(options), {
28246
+ p57.log.info("Create your Neon database in the Vercel prompts below");
28247
+ const add = await runVercel(runner, neonAddArgs(options, "interactive"), {
28252
28248
  cwd,
28253
28249
  mode: "inherit",
28254
28250
  timeoutMs: INTERACTIVE_PROVISION_TIMEOUT_MS,
@@ -28264,7 +28260,7 @@ ${pc14.dim(termsUrl)}`,
28264
28260
  async function provisionNeon(runner, cwd, options) {
28265
28261
  const provisionSpinner = spinner2();
28266
28262
  provisionSpinner.start("Creating your Neon database");
28267
- const add = await runVercel(runner, neonAddArgs(options), {
28263
+ const add = await runVercel(runner, neonAddArgs(options, "json"), {
28268
28264
  cwd,
28269
28265
  mode: "capture",
28270
28266
  timeoutMs: PROVISION_TIMEOUT_MS,