create-whop-kit 0.6.2 → 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.
- package/dist/cli-create.js +28 -2
- package/package.json +1 -1
package/dist/cli-create.js
CHANGED
|
@@ -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,6 +674,7 @@ var init_default = defineCommand({
|
|
|
673
674
|
return !isCancelled(result) && result;
|
|
674
675
|
})();
|
|
675
676
|
if (shouldDeploy) {
|
|
677
|
+
deployAttempted = true;
|
|
676
678
|
const { runDeployPipeline } = await import("./deploy-2HX64HTI.js");
|
|
677
679
|
deployResult = await runDeployPipeline({
|
|
678
680
|
projectDir,
|
|
@@ -684,6 +686,7 @@ var init_default = defineCommand({
|
|
|
684
686
|
}
|
|
685
687
|
}
|
|
686
688
|
let summary = "";
|
|
689
|
+
const deployFailed = deployAttempted && !deployResult?.productionUrl;
|
|
687
690
|
if (deployResult?.productionUrl) {
|
|
688
691
|
if (dbUrl) summary += `${pc5.green("\u2713")} Database connected
|
|
689
692
|
`;
|
|
@@ -704,6 +707,24 @@ var init_default = defineCommand({
|
|
|
704
707
|
summary += ` ${pc5.bold("cd")} ${basename2(projectName)}
|
|
705
708
|
`;
|
|
706
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
|
|
714
|
+
`;
|
|
715
|
+
summary += `
|
|
716
|
+
`;
|
|
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")}`;
|
|
707
728
|
} else {
|
|
708
729
|
if (dbUrl) summary += `${pc5.green("\u2713")} Database configured
|
|
709
730
|
`;
|
|
@@ -729,8 +750,13 @@ var init_default = defineCommand({
|
|
|
729
750
|
`;
|
|
730
751
|
summary += ` ${pc5.dim(`Or run ${pc5.bold("whop-kit deploy")} to deploy + auto-configure.`)}`;
|
|
731
752
|
}
|
|
732
|
-
|
|
733
|
-
|
|
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
|
+
}
|
|
734
760
|
}
|
|
735
761
|
});
|
|
736
762
|
|