create-whop-kit 1.0.0 → 1.0.1

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.
@@ -188,19 +188,21 @@ async function createGitHubRepo(projectDir, projectName) {
188
188
  }
189
189
  s = p2.spinner();
190
190
  s.start("Pushing code to GitHub...");
191
+ const branchResult = exec("git branch --show-current", projectDir);
192
+ const branch = branchResult.success ? branchResult.stdout.trim() : "main";
191
193
  let pushOk = false;
192
- for (const delay of [0, 5e3, 1e4]) {
194
+ for (const delay of [0, 3e3, 7e3]) {
193
195
  if (delay > 0) {
194
- s.stop(`Waiting for GitHub to propagate (${delay / 1e3}s)...`);
196
+ s.stop(`Waiting for GitHub to propagate...`);
195
197
  await new Promise((r) => setTimeout(r, delay));
196
198
  s = p2.spinner();
197
199
  s.start("Pushing code to GitHub...");
198
200
  }
199
- pushOk = exec("git push -u origin main", projectDir, 3e4).success;
201
+ pushOk = exec(`git push -u origin ${branch}`, projectDir, 3e4).success;
200
202
  if (pushOk) break;
201
203
  }
202
204
  if (!pushOk) {
203
- s.stop("Could not push (push manually with: git push -u origin main)");
205
+ s.stop(`Could not push (try manually: git push -u origin ${branch})`);
204
206
  } else {
205
207
  s.stop("Code pushed to GitHub");
206
208
  }
@@ -346,6 +346,7 @@ function updatePackageName(projectDir, name) {
346
346
  }
347
347
  function initGit(projectDir) {
348
348
  exec("git init", projectDir);
349
+ exec("git branch -m main", projectDir);
349
350
  exec("git add -A", projectDir);
350
351
  exec('git commit -m "initial: scaffolded with create-whop-kit"', projectDir);
351
352
  }
@@ -683,7 +684,7 @@ var init_default = defineCommand({
683
684
  });
684
685
  if (!isCancelled(deployChoice) && deployChoice === "deploy") {
685
686
  deployAttempted = true;
686
- const { runDeployPipeline } = await import("./deploy-IDZMWMUP.js");
687
+ const { runDeployPipeline } = await import("./deploy-4OQC445A.js");
687
688
  deployResult = await runDeployPipeline({
688
689
  projectDir,
689
690
  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-OC5BYIPC.js";
12
+ } from "./chunk-BQZUZXDZ.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-OC5BYIPC.js";
4
+ } from "./chunk-BQZUZXDZ.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": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Scaffold and manage Whop-powered apps with whop-kit",
5
5
  "type": "module",
6
6
  "license": "MIT",