create-kofi-stack 1.2.6 → 1.2.7

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6370,8 +6370,33 @@ ${pc2.dim("Note: Make sure you have a Convex account at https://convex.dev")}
6370
6370
  `);
6371
6371
  try {
6372
6372
  const convexDir = config.structure === "monorepo" ? path18.join(config.targetDir, "packages/backend") : config.targetDir;
6373
- p6.log.info(`Running ${pc2.cyan("npx convex dev --once")} in ${pc2.dim(convexDir)}...`);
6374
6373
  const { spawn } = await import("child_process");
6374
+ p6.log.info(`Installing dependencies in ${pc2.dim(convexDir)}...`);
6375
+ const installSuccess = await new Promise((resolve) => {
6376
+ const installChild = spawn("pnpm", ["install"], {
6377
+ cwd: convexDir,
6378
+ stdio: "inherit",
6379
+ shell: true
6380
+ });
6381
+ installChild.on("close", (code) => {
6382
+ if (code === 0) {
6383
+ p6.log.success("Dependencies installed");
6384
+ resolve(true);
6385
+ } else {
6386
+ p6.log.warn("Failed to install dependencies");
6387
+ resolve(false);
6388
+ }
6389
+ });
6390
+ installChild.on("error", () => {
6391
+ resolve(false);
6392
+ });
6393
+ });
6394
+ if (!installSuccess) {
6395
+ p6.log.warn("Could not install dependencies. Skipping Convex setup.");
6396
+ p6.log.info(`Run ${pc2.cyan("pnpm install")} then ${pc2.cyan("pnpm convex dev")} manually.`);
6397
+ return;
6398
+ }
6399
+ p6.log.info(`Running ${pc2.cyan("npx convex dev --once")} in ${pc2.dim(convexDir)}...`);
6375
6400
  await new Promise((resolve) => {
6376
6401
  const child = spawn("npx", ["convex", "dev", "--once"], {
6377
6402
  cwd: convexDir,
@@ -6380,7 +6405,7 @@ ${pc2.dim("Note: Make sure you have a Convex account at https://convex.dev")}
6380
6405
  });
6381
6406
  child.on("close", (code) => {
6382
6407
  if (code === 0) {
6383
- p6.log.success("Convex project created successfully!");
6408
+ p6.log.success("Convex project created and deployed successfully!");
6384
6409
  resolve();
6385
6410
  } else {
6386
6411
  p6.log.warn(`Convex setup exited with code ${code}. You can run 'pnpm convex dev' manually later.`);
@@ -6395,7 +6420,7 @@ ${pc2.dim("Note: Make sure you have a Convex account at https://convex.dev")}
6395
6420
  });
6396
6421
  } catch (error) {
6397
6422
  p6.log.warn("Could not run Convex setup automatically.");
6398
- p6.log.info(`Run ${pc2.cyan("pnpm convex dev")} manually in your project directory.`);
6423
+ p6.log.info(`Run ${pc2.cyan("pnpm install")} then ${pc2.cyan("pnpm convex dev")} manually in your project directory.`);
6399
6424
  }
6400
6425
  } else if (convexChoice === "existing") {
6401
6426
  const deploymentName = await p6.text({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kofi-stack",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Scaffold opinionated full-stack projects with Next.js, Convex, Better-Auth, and more",
5
5
  "type": "module",
6
6
  "bin": {