create-whop-kit 0.6.1 → 0.6.3

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.
@@ -202,13 +202,20 @@ async function runDeployPipeline(options) {
202
202
  }
203
203
  }
204
204
  p2.log.success("Vercel authenticated");
205
+ p2.log.step("Vercel: linking project...");
206
+ console.log("");
207
+ const linkOk = execInteractive(`vercel link --yes`, projectDir);
208
+ console.log("");
209
+ if (!linkOk) {
210
+ p2.log.warning("Could not link project. Will try deploying directly.");
211
+ }
205
212
  if (databaseUrl) {
206
213
  const s2 = p2.spinner();
207
- s2.start("Setting DATABASE_URL on Vercel...");
214
+ s2.start("Vercel: setting DATABASE_URL...");
208
215
  vercelEnvSet("DATABASE_URL", databaseUrl, "production", projectDir);
209
216
  vercelEnvSet("DATABASE_URL", databaseUrl, "preview", projectDir);
210
217
  vercelEnvSet("DATABASE_URL", databaseUrl, "development", projectDir);
211
- s2.stop("DATABASE_URL configured");
218
+ s2.stop("DATABASE_URL set on Vercel");
212
219
  }
213
220
  const productionUrl = await vercelDeploy(projectDir);
214
221
  if (!productionUrl) {
@@ -216,7 +223,6 @@ async function runDeployPipeline(options) {
216
223
  p2.log.info(pc2.bold(` cd ${projectName} && vercel deploy --prod`));
217
224
  return null;
218
225
  }
219
- p2.log.success(`Live at ${pc2.cyan(productionUrl)}`);
220
226
  const connectWhop = await p2.confirm({
221
227
  message: "Connect to Whop? (creates OAuth app + webhooks automatically)",
222
228
  initialValue: true
@@ -664,6 +664,7 @@ var init_default = defineCommand({
664
664
  }
665
665
  initGit(projectDir);
666
666
  let deployResult = null;
667
+ let deployAttempted = false;
667
668
  if (!args["skip-deploy"] && !args["dry-run"]) {
668
669
  const shouldDeploy = isNonInteractive ? false : await (async () => {
669
670
  const result = await p5.confirm({
@@ -673,7 +674,8 @@ var init_default = defineCommand({
673
674
  return !isCancelled(result) && result;
674
675
  })();
675
676
  if (shouldDeploy) {
676
- const { runDeployPipeline } = await import("./deploy-RKVUZYCU.js");
677
+ deployAttempted = true;
678
+ const { runDeployPipeline } = await import("./deploy-2HX64HTI.js");
677
679
  deployResult = await runDeployPipeline({
678
680
  projectDir,
679
681
  projectName,
@@ -684,24 +686,45 @@ var init_default = defineCommand({
684
686
  }
685
687
  }
686
688
  let summary = "";
689
+ const deployFailed = deployAttempted && !deployResult?.productionUrl;
687
690
  if (deployResult?.productionUrl) {
688
- summary += `${pc5.green("\u2713")} Deployed to ${pc5.cyan(deployResult.productionUrl)}
691
+ if (dbUrl) summary += `${pc5.green("\u2713")} Database connected
692
+ `;
693
+ summary += `${pc5.green("\u2713")} Deployed to Vercel
689
694
  `;
690
695
  if (deployResult.whopAppId) summary += `${pc5.green("\u2713")} Whop app: ${deployResult.whopAppId}
691
696
  `;
692
697
  if (deployResult.webhookSecret) summary += `${pc5.green("\u2713")} Webhooks configured
693
698
  `;
694
- if (dbUrl) summary += `${pc5.green("\u2713")} Database connected
699
+ summary += `
700
+ `;
701
+ summary += ` ${pc5.bold("Production:")} ${pc5.cyan(deployResult.productionUrl)}
702
+ `;
703
+ summary += ` ${pc5.bold("Local dev:")} ${pc5.cyan("http://localhost:3000")}
695
704
  `;
696
705
  summary += `
697
706
  `;
698
707
  summary += ` ${pc5.bold("cd")} ${basename2(projectName)}
699
708
  `;
700
- summary += ` ${pc5.bold(`${pm} run dev`)} ${pc5.dim("# local development")}
709
+ summary += ` ${pc5.bold(`${pm} run dev`)} ${pc5.dim("# start local dev server")}`;
710
+ } else if (deployFailed) {
711
+ if (dbUrl) summary += `${pc5.green("\u2713")} Database configured
712
+ `;
713
+ summary += `${pc5.red("\u2717")} Vercel deployment failed
701
714
  `;
702
715
  summary += `
703
716
  `;
704
- summary += ` ${pc5.dim(`Production: ${deployResult.productionUrl}`)}`;
717
+ summary += ` ${pc5.bold("To retry:")}
718
+ `;
719
+ summary += ` ${pc5.bold("cd")} ${basename2(projectName)}
720
+ `;
721
+ summary += ` ${pc5.bold("whop-kit deploy")} ${pc5.dim("# retry deploy + Whop setup")}
722
+ `;
723
+ summary += `
724
+ `;
725
+ summary += ` ${pc5.bold("Or develop locally:")}
726
+ `;
727
+ summary += ` ${pc5.bold(`${pm} run dev`)} ${pc5.dim("# start dev server at localhost:3000")}`;
705
728
  } else {
706
729
  if (dbUrl) summary += `${pc5.green("\u2713")} Database configured
707
730
  `;
@@ -727,8 +750,13 @@ var init_default = defineCommand({
727
750
  `;
728
751
  summary += ` ${pc5.dim(`Or run ${pc5.bold("whop-kit deploy")} to deploy + auto-configure.`)}`;
729
752
  }
730
- p5.note(summary, "Your app is ready");
731
- p5.outro(`${pc5.green("Happy building!")} ${pc5.dim("\u2014 whop-kit")}`);
753
+ if (deployFailed) {
754
+ p5.note(summary, pc5.yellow("Setup incomplete"));
755
+ p5.outro(`${pc5.yellow("Deploy failed.")} Run ${pc5.bold("whop-kit deploy")} to retry.`);
756
+ } else {
757
+ p5.note(summary, "Your app is ready");
758
+ p5.outro(`${pc5.green("Happy building!")} ${pc5.dim("\u2014 whop-kit")}`);
759
+ }
732
760
  }
733
761
  });
734
762
 
package/dist/cli-kit.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-HOQ5QQ2M.js";
10
10
  import {
11
11
  runDeployPipeline
12
- } from "./chunk-NRG6LIOM.js";
12
+ } from "./chunk-3USQ425V.js";
13
13
  import {
14
14
  detectPackageManager,
15
15
  exec
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDeployPipeline
4
- } from "./chunk-NRG6LIOM.js";
4
+ } from "./chunk-3USQ425V.js";
5
5
  import "./chunk-42L7PRMT.js";
6
6
  export {
7
7
  runDeployPipeline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-whop-kit",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "Scaffold and manage Whop-powered apps with whop-kit",
5
5
  "type": "module",
6
6
  "license": "MIT",