create-kide-app 0.0.19 → 0.0.21

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/index.js +9 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -22,6 +22,7 @@ const runAsync = (cmd, cwd) =>
22
22
  else {
23
23
  const err = new Error(`Command failed: ${cmd}`);
24
24
  err.stderr = stderr;
25
+ err.stdout = stdout;
25
26
  reject(err);
26
27
  }
27
28
  });
@@ -29,7 +30,7 @@ const runAsync = (cmd, cwd) =>
29
30
 
30
31
  // --- Package manager detection ---
31
32
 
32
- const pm = { name: "pnpm", exec: "pnpm dlx", run: "pnpm", install: "pnpm install" };
33
+ const pm = { name: "pnpm", exec: "pnpm exec", dlx: "pnpm dlx", run: "pnpm", install: "pnpm install" };
33
34
 
34
35
  // --- Main ---
35
36
 
@@ -206,9 +207,9 @@ async function main() {
206
207
  [
207
208
  "Seeding for Cloudflare requires a D1 database.",
208
209
  "",
209
- ` ${pm.exec} wrangler d1 create ${projectName}-db`,
210
+ ` ${pm.dlx} wrangler d1 create ${projectName}-db`,
210
211
  " # Add the database_id to wrangler.toml",
211
- ` ${pm.exec} wrangler d1 migrations apply ${projectName}-db --local`,
212
+ ` ${pm.dlx} wrangler d1 migrations apply ${projectName}-db --local`,
212
213
  ` ${pm.run} cms:seed`,
213
214
  ].join("\n"),
214
215
  "Seed manually",
@@ -344,7 +345,8 @@ async function main() {
344
345
  s.stop("Deployed to Cloudflare");
345
346
  } catch (err) {
346
347
  s.stop("Deploy failed — run manually with: pnpm run deploy");
347
- if (err.stderr) console.error(err.stderr.slice(-500));
348
+ if (err.stderr) console.error(err.stderr.slice(-1500));
349
+ if (err.stdout) console.error(err.stdout.slice(-1500));
348
350
  }
349
351
  }
350
352
  }
@@ -371,15 +373,15 @@ async function main() {
371
373
  const remaining = [];
372
374
  if (!cf.d1Created) {
373
375
  remaining.push(
374
- ` ${pm.exec} wrangler d1 create ${projectName}-db`,
376
+ ` ${pm.dlx} wrangler d1 create ${projectName}-db`,
375
377
  " # Copy the database_id to wrangler.toml",
376
378
  );
377
379
  }
378
380
  if (!cf.r2Created) {
379
- remaining.push(` ${pm.exec} wrangler r2 bucket create ${projectName}-assets`);
381
+ remaining.push(` ${pm.dlx} wrangler r2 bucket create ${projectName}-assets`);
380
382
  }
381
383
  if (!cf.migrationsApplied) {
382
- remaining.push(` ${pm.exec} wrangler d1 migrations apply ${projectName}-db --remote`);
384
+ remaining.push(` ${pm.dlx} wrangler d1 migrations apply ${projectName}-db --remote`);
383
385
  }
384
386
  if (!cf.deployed) {
385
387
  remaining.push(` ${pm.run} run deploy`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kide-app",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "Scaffold a new Kide CMS project",
5
5
  "author": "Matti Hernesniemi",
6
6
  "license": "MIT",