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,
|
|
194
|
+
for (const delay of [0, 3e3, 7e3]) {
|
|
193
195
|
if (delay > 0) {
|
|
194
|
-
s.stop(`Waiting for GitHub to propagate
|
|
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(
|
|
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(
|
|
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
|
}
|
package/dist/cli-create.js
CHANGED
|
@@ -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-
|
|
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