@wraps.dev/cli 2.21.15 → 2.21.16

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.
Binary file
package/dist/cli.js CHANGED
@@ -33559,28 +33559,59 @@ async function selfhostDeploy(options) {
33559
33559
  let neonOrgId;
33560
33560
  if (!resolvedDatabaseUrl) {
33561
33561
  neonApiKey = options.neonApiKey;
33562
+ neonOrgId = options.neonOrgId;
33562
33563
  if (!neonApiKey) {
33563
- const neonApiKeyAnswer = await clack43.password({
33564
- message: "Neon API key (create one at console.neon.tech/app/settings/api-keys):"
33564
+ const dbChoice = await clack43.select({
33565
+ message: "How do you want to connect the database?",
33566
+ options: [
33567
+ {
33568
+ value: "url",
33569
+ label: "Enter a connection string",
33570
+ hint: "Neon, Supabase, Railway, self-hosted Postgres..."
33571
+ },
33572
+ {
33573
+ value: "neon",
33574
+ label: "Provision a new Neon database",
33575
+ hint: "Requires a Neon API key"
33576
+ }
33577
+ ]
33565
33578
  });
33566
- if (clack43.isCancel(neonApiKeyAnswer)) {
33579
+ if (clack43.isCancel(dbChoice)) {
33567
33580
  clack43.cancel("Operation cancelled.");
33568
33581
  process.exit(0);
33569
33582
  }
33570
- neonApiKey = neonApiKeyAnswer;
33571
- }
33572
- neonOrgId = options.neonOrgId;
33573
- if (!neonOrgId) {
33574
- const neonOrgIdAnswer = await clack43.text({
33575
- message: "Neon organization ID (find at console.neon.tech/app/settings \u2014 leave blank for personal account):",
33576
- placeholder: "org-..."
33577
- });
33578
- if (clack43.isCancel(neonOrgIdAnswer)) {
33579
- clack43.cancel("Operation cancelled.");
33580
- process.exit(0);
33583
+ if (dbChoice === "url") {
33584
+ const dbUrlAnswer = await clack43.text({
33585
+ message: "Postgres connection string:",
33586
+ placeholder: "postgres://user:pass@host:5432/dbname"
33587
+ });
33588
+ if (clack43.isCancel(dbUrlAnswer)) {
33589
+ clack43.cancel("Operation cancelled.");
33590
+ process.exit(0);
33591
+ }
33592
+ resolvedDatabaseUrl = dbUrlAnswer;
33593
+ } else {
33594
+ const neonApiKeyAnswer = await clack43.password({
33595
+ message: "Neon API key (create one at console.neon.tech/app/settings/api-keys):"
33596
+ });
33597
+ if (clack43.isCancel(neonApiKeyAnswer)) {
33598
+ clack43.cancel("Operation cancelled.");
33599
+ process.exit(0);
33600
+ }
33601
+ neonApiKey = neonApiKeyAnswer;
33602
+ if (!neonOrgId) {
33603
+ const neonOrgIdAnswer = await clack43.text({
33604
+ message: "Neon organization ID (find at console.neon.tech/app/settings \u2014 leave blank for personal account):",
33605
+ placeholder: "org-..."
33606
+ });
33607
+ if (clack43.isCancel(neonOrgIdAnswer)) {
33608
+ clack43.cancel("Operation cancelled.");
33609
+ process.exit(0);
33610
+ }
33611
+ const trimmed = neonOrgIdAnswer.trim();
33612
+ if (trimmed) neonOrgId = trimmed;
33613
+ }
33581
33614
  }
33582
- const trimmed = neonOrgIdAnswer.trim();
33583
- if (trimmed) neonOrgId = trimmed;
33584
33615
  }
33585
33616
  }
33586
33617
  let licenseKey = options.licenseKey;