create-whop-kit 0.6.3 → 0.6.4

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.
@@ -40,37 +40,42 @@ async function vercelLogin() {
40
40
  return ok;
41
41
  }
42
42
  async function vercelDeploy(projectDir) {
43
- p.log.step("Vercel: deploying to production (this may take a few minutes)...");
44
- console.log("");
45
- const ok = execInteractive("vercel deploy --prod --yes", projectDir);
46
- console.log("");
47
- if (!ok) {
48
- p.log.error("Vercel deployment failed. Check the output above for details.");
43
+ const s = p.spinner();
44
+ s.start("Vercel: deploying to production (this may take a few minutes)...");
45
+ const result = exec("vercel deploy --prod --yes", projectDir, 3e5);
46
+ if (!result.success) {
47
+ s.stop("Vercel deployment failed");
48
+ const errorOutput = result.stderr || result.stdout;
49
+ if (errorOutput) {
50
+ p.log.error("Build output:");
51
+ console.log(pc.dim(errorOutput.substring(0, 500)));
52
+ }
49
53
  return null;
50
54
  }
51
- const inspect = exec("vercel inspect --json", projectDir);
52
- if (inspect.success) {
53
- try {
54
- const data = JSON.parse(inspect.stdout);
55
- if (data.url) {
56
- const url = data.url.startsWith("https://") ? data.url : `https://${data.url}`;
57
- p.log.success(`Deployed to ${pc.cyan(url)}`);
58
- return url;
59
- }
60
- } catch {
55
+ const lines = result.stdout.split("\n");
56
+ let url = "";
57
+ for (const line of lines) {
58
+ const match = line.match(/https:\/\/[^\s\[\]]+\.vercel\.app/);
59
+ if (match) {
60
+ url = match[0];
61
+ if (!url.includes("-git-") && url.split("-").length < 5) break;
61
62
  }
62
63
  }
63
- const ls = exec("vercel ls --json 2>/dev/null | head -1", projectDir);
64
- if (ls.success) {
65
- const urlMatch = ls.stdout.match(/https:\/\/[^\s"]+\.vercel\.app/);
66
- if (urlMatch) {
67
- p.log.success(`Deployed to ${pc.cyan(urlMatch[0])}`);
68
- return urlMatch[0];
64
+ if (url) {
65
+ s.stop(`Deployed to ${pc.cyan(url)}`);
66
+ return url;
67
+ }
68
+ for (const line of lines) {
69
+ const match = line.match(/https:\/\/[^\s\[\]]+/);
70
+ if (match) {
71
+ url = match[0];
72
+ s.stop(`Deployed to ${pc.cyan(url)}`);
73
+ return url;
69
74
  }
70
75
  }
71
- p.log.warning("Could not determine deployment URL automatically.");
76
+ s.stop("Deployed but could not extract URL");
72
77
  const manual = await p.text({
73
- message: "Paste your Vercel deployment URL",
78
+ message: "Paste your Vercel production URL (shown in the output above)",
74
79
  placeholder: "https://your-app.vercel.app",
75
80
  validate: (v) => {
76
81
  if (!v?.startsWith("https://")) return "Must be a https:// URL";
@@ -675,7 +675,7 @@ var init_default = defineCommand({
675
675
  })();
676
676
  if (shouldDeploy) {
677
677
  deployAttempted = true;
678
- const { runDeployPipeline } = await import("./deploy-2HX64HTI.js");
678
+ const { runDeployPipeline } = await import("./deploy-ATDZ322S.js");
679
679
  deployResult = await runDeployPipeline({
680
680
  projectDir,
681
681
  projectName,
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-3USQ425V.js";
12
+ } from "./chunk-TPBUMYCP.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-3USQ425V.js";
4
+ } from "./chunk-TPBUMYCP.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.3",
3
+ "version": "0.6.4",
4
4
  "description": "Scaffold and manage Whop-powered apps with whop-kit",
5
5
  "type": "module",
6
6
  "license": "MIT",