create-whop-kit 1.0.3 → 1.0.5
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.
|
@@ -77,49 +77,20 @@ async function vercelDeploy(projectDir) {
|
|
|
77
77
|
p.log.error("Vercel deployment failed. Check the build output above.");
|
|
78
78
|
return null;
|
|
79
79
|
}
|
|
80
|
-
const s = p.spinner();
|
|
81
|
-
s.start("Getting deployment URL...");
|
|
82
|
-
const ls = exec("vercel ls --json", projectDir, 15e3);
|
|
83
|
-
if (ls.success) {
|
|
84
|
-
try {
|
|
85
|
-
const data = JSON.parse(ls.stdout);
|
|
86
|
-
const prod = Array.isArray(data) ? data.find((d) => d.target === "production") : null;
|
|
87
|
-
if (prod?.url) {
|
|
88
|
-
const url = `https://${prod.url}`;
|
|
89
|
-
s.stop(`Deployed to ${pc.cyan(url)}`);
|
|
90
|
-
return url;
|
|
91
|
-
}
|
|
92
|
-
} catch {
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
const inspect = exec("vercel inspect --json", projectDir, 15e3);
|
|
96
|
-
if (inspect.success) {
|
|
97
|
-
const urlMatch = inspect.stdout.match(/https:\/\/[^\s"]+\.vercel\.app/);
|
|
98
|
-
if (urlMatch) {
|
|
99
|
-
s.stop(`Deployed to ${pc.cyan(urlMatch[0])}`);
|
|
100
|
-
return urlMatch[0];
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
80
|
try {
|
|
104
81
|
const { readFileSync } = await import("fs");
|
|
105
82
|
const { join } = await import("path");
|
|
106
83
|
const projectJson = JSON.parse(
|
|
107
84
|
readFileSync(join(projectDir, ".vercel", "project.json"), "utf-8")
|
|
108
85
|
);
|
|
109
|
-
if (projectJson.
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (urlMatch) {
|
|
114
|
-
s.stop(`Deployed to ${pc.cyan(urlMatch[0])}`);
|
|
115
|
-
return urlMatch[0];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
86
|
+
if (projectJson.projectName) {
|
|
87
|
+
const url = `https://${projectJson.projectName}.vercel.app`;
|
|
88
|
+
p.log.success(`Deployed to ${pc.cyan(url)}`);
|
|
89
|
+
return url;
|
|
118
90
|
}
|
|
119
91
|
} catch {
|
|
120
92
|
}
|
|
121
|
-
|
|
122
|
-
p.log.info("The deployment URL was shown in the build output above.");
|
|
93
|
+
p.log.info("The deployment URL was shown in the build output above (after 'Aliased:')");
|
|
123
94
|
const manual = await p.text({
|
|
124
95
|
message: "Paste your Vercel production URL",
|
|
125
96
|
placeholder: "https://your-app.vercel.app",
|
|
@@ -438,26 +409,13 @@ async function runDeployPipeline(options) {
|
|
|
438
409
|
if (!p3.isCancel(connectWhop) && connectWhop) {
|
|
439
410
|
p3.note(
|
|
440
411
|
[
|
|
441
|
-
`We need a Company API key to
|
|
442
|
-
"",
|
|
443
|
-
`${pc3.bold("1.")} Go to the Whop Developer Dashboard`,
|
|
444
|
-
` ${pc3.cyan("https://whop.com/dashboard/developer")}`,
|
|
412
|
+
`We need a Company API key to set up OAuth and webhooks.`,
|
|
445
413
|
"",
|
|
414
|
+
`${pc3.bold("1.")} Go to ${pc3.cyan("https://whop.com/dashboard/developer")}`,
|
|
446
415
|
`${pc3.bold("2.")} Click ${pc3.bold('"Create"')} under "Company API Keys"`,
|
|
447
|
-
""
|
|
448
|
-
`${pc3.bold("
|
|
449
|
-
""
|
|
450
|
-
`${pc3.bold("4.")} Select these permissions:`,
|
|
451
|
-
` ${pc3.green("\u2022")} company:basic:read ${pc3.dim("\u2014 identify your company")}`,
|
|
452
|
-
` ${pc3.green("\u2022")} developer:create_app ${pc3.dim("\u2014 create the OAuth app")}`,
|
|
453
|
-
` ${pc3.green("\u2022")} developer:update_app ${pc3.dim("\u2014 configure redirect URIs")}`,
|
|
454
|
-
` ${pc3.green("\u2022")} developer:manage_api_key ${pc3.dim("\u2014 get the app credentials")}`,
|
|
455
|
-
` ${pc3.green("\u2022")} developer:manage_webhook ${pc3.dim("\u2014 set up payment webhooks")}`,
|
|
456
|
-
"",
|
|
457
|
-
`${pc3.bold("5.")} Create the key and paste it below`,
|
|
458
|
-
"",
|
|
459
|
-
`${pc3.dim("This key is used once to set everything up.")}`,
|
|
460
|
-
`${pc3.dim("Your app uses OAuth (openid, profile, email) for user sign-in.")}`
|
|
416
|
+
`${pc3.bold("3.")} Give it a name (e.g. "${projectName}")`,
|
|
417
|
+
`${pc3.bold("4.")} Click Create ${pc3.dim("(default permissions are fine)")}`,
|
|
418
|
+
`${pc3.bold("5.")} Copy the key and paste it below`
|
|
461
419
|
].join("\n"),
|
|
462
420
|
"Whop Company API Key"
|
|
463
421
|
);
|
package/dist/cli-create.js
CHANGED
|
@@ -684,7 +684,7 @@ var init_default = defineCommand({
|
|
|
684
684
|
});
|
|
685
685
|
if (!isCancelled(deployChoice) && deployChoice === "deploy") {
|
|
686
686
|
deployAttempted = true;
|
|
687
|
-
const { runDeployPipeline } = await import("./deploy-
|
|
687
|
+
const { runDeployPipeline } = await import("./deploy-L6ITPGHX.js");
|
|
688
688
|
deployResult = await runDeployPipeline({
|
|
689
689
|
projectDir,
|
|
690
690
|
projectName,
|
package/dist/cli-kit.js
CHANGED