create-blitzpack 0.1.14 → 0.1.15

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 (3) hide show
  1. package/README.md +10 -1
  2. package/dist/index.js +91 -21
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -24,7 +24,16 @@ pnpm create blitzpack [project-name] [options]
24
24
  - **Web**: Next.js 16 + React 19 + Tailwind CSS v4 + shadcn/ui
25
25
  - **API**: Fastify 5 + Prisma 7 + PostgreSQL + Better Auth
26
26
  - **Monorepo**: Turborepo + pnpm workspaces
27
- - **Production-ready**: Auth, admin dashboard, logging, validation, testing, Docker
27
+ - **Production-ready app stack**: Auth, admin dashboard, logging, validation, testing
28
+ - **Optional deployment assets**: Dockerfiles + production compose + CD workflow
29
+
30
+ ## Setup Profiles
31
+
32
+ The scaffold wizard supports three profiles:
33
+
34
+ - **Recommended**: All app features plus Docker deployment assets and CD workflow.
35
+ - **Platform-First**: All app features, without deployment assets.
36
+ - **Custom**: Pick app features and deployment options independently.
28
37
 
29
38
  ## Requirements
30
39
 
package/dist/index.js CHANGED
@@ -155,7 +155,7 @@ var REPLACEABLE_FILES = [
155
155
  "README.md"
156
156
  ];
157
157
  var DEFAULT_DESCRIPTION = "A full-stack TypeScript monorepo built with Blitzpack";
158
- var OPTIONAL_FEATURES = [
158
+ var APP_FEATURES = [
159
159
  {
160
160
  key: "testing",
161
161
  name: "Testing",
@@ -170,11 +170,18 @@ var OPTIONAL_FEATURES = [
170
170
  key: "uploads",
171
171
  name: "File Uploads",
172
172
  description: "S3 storage, upload routes, file components"
173
+ }
174
+ ];
175
+ var DEPLOYMENT_FEATURES = [
176
+ {
177
+ key: "dockerDeploy",
178
+ name: "Docker Deployment",
179
+ description: "Dockerfiles for API/Web and production Docker Compose"
173
180
  },
174
181
  {
175
- key: "deployment",
176
- name: "Deployment",
177
- description: "Dockerfile, CI/CD workflows, production configs"
182
+ key: "ciCd",
183
+ name: "CD Workflow",
184
+ description: "GitHub Actions workflow to build and publish Docker images"
178
185
  }
179
186
  ];
180
187
  var FEATURE_EXCLUSIONS = {
@@ -218,7 +225,13 @@ var FEATURE_EXCLUSIONS = {
218
225
  "packages/ui/src/file-upload-input.tsx",
219
226
  "packages/types/src/upload.ts"
220
227
  ],
221
- deployment: ["Dockerfile", "Dockerfile.web", "docker-compose.prod.yml", ".github"]
228
+ dockerDeploy: [
229
+ "apps/api/.dockerignore",
230
+ "apps/api/Dockerfile",
231
+ "apps/web/Dockerfile",
232
+ "deploy/docker"
233
+ ],
234
+ ciCd: [".github/workflows/cd.yml"]
222
235
  };
223
236
 
224
237
  // src/utils.ts
@@ -397,16 +410,21 @@ async function promptFeatureSelection() {
397
410
  {
398
411
  type: "select",
399
412
  name: "setupType",
400
- message: "Setup type:",
413
+ message: "Project profile:",
401
414
  choices: [
402
415
  {
403
416
  title: "Recommended",
404
- description: "all features included",
417
+ description: "all app features + Docker deploy assets + CD workflow",
405
418
  value: "recommended"
406
419
  },
407
420
  {
408
- title: "Customize",
409
- description: "choose features",
421
+ title: "Platform-First",
422
+ description: "all app features, no deployment assets",
423
+ value: "platform"
424
+ },
425
+ {
426
+ title: "Custom",
427
+ description: "choose app and deployment features",
410
428
  value: "customize"
411
429
  }
412
430
  ],
@@ -427,21 +445,55 @@ async function promptFeatureSelection() {
427
445
  testing: true,
428
446
  admin: true,
429
447
  uploads: true,
430
- deployment: true
448
+ dockerDeploy: true,
449
+ ciCd: true
450
+ };
451
+ }
452
+ if (setupType === "platform") {
453
+ return {
454
+ testing: true,
455
+ admin: true,
456
+ uploads: true,
457
+ dockerDeploy: false,
458
+ ciCd: false
431
459
  };
432
460
  }
433
- const featureChoices = OPTIONAL_FEATURES.map((feature) => ({
461
+ const appFeatureChoices = APP_FEATURES.map((feature) => ({
462
+ title: feature.name,
463
+ description: feature.description,
464
+ value: feature.key,
465
+ selected: true
466
+ }));
467
+ const { selectedAppFeatures } = await prompts(
468
+ {
469
+ type: "multiselect",
470
+ name: "selectedAppFeatures",
471
+ message: "Select app features:",
472
+ choices: appFeatureChoices,
473
+ hint: "- Space to toggle, Enter to confirm",
474
+ instructions: false
475
+ },
476
+ {
477
+ onCancel: () => {
478
+ cancelled = true;
479
+ }
480
+ }
481
+ );
482
+ if (cancelled) {
483
+ return null;
484
+ }
485
+ const deploymentFeatureChoices = DEPLOYMENT_FEATURES.map((feature) => ({
434
486
  title: feature.name,
435
487
  description: feature.description,
436
488
  value: feature.key,
437
489
  selected: false
438
490
  }));
439
- const { selectedFeatures } = await prompts(
491
+ const { selectedDeploymentFeatures } = await prompts(
440
492
  {
441
493
  type: "multiselect",
442
- name: "selectedFeatures",
443
- message: "Select features to include:",
444
- choices: featureChoices,
494
+ name: "selectedDeploymentFeatures",
495
+ message: "Select deployment options (optional):",
496
+ choices: deploymentFeatureChoices,
445
497
  hint: "- Space to toggle, Enter to confirm",
446
498
  instructions: false
447
499
  },
@@ -454,12 +506,24 @@ async function promptFeatureSelection() {
454
506
  if (cancelled) {
455
507
  return null;
456
508
  }
457
- const selected = selectedFeatures || [];
509
+ const selectedApp = selectedAppFeatures || [];
510
+ const selectedDeployment = selectedDeploymentFeatures || [];
511
+ const includesCiCd = selectedDeployment.includes("ciCd");
512
+ const includesDockerDeploy = selectedDeployment.includes("dockerDeploy") || includesCiCd;
513
+ if (includesCiCd && !selectedDeployment.includes("dockerDeploy")) {
514
+ console.log();
515
+ console.log(
516
+ chalk3.dim(
517
+ " \u2139 CD workflow requires Docker deployment assets, enabling both."
518
+ )
519
+ );
520
+ }
458
521
  return {
459
- testing: selected.includes("testing"),
460
- admin: selected.includes("admin"),
461
- uploads: selected.includes("uploads"),
462
- deployment: selected.includes("deployment")
522
+ testing: selectedApp.includes("testing"),
523
+ admin: selectedApp.includes("admin"),
524
+ uploads: selectedApp.includes("uploads"),
525
+ dockerDeploy: includesDockerDeploy,
526
+ ciCd: includesCiCd
463
527
  };
464
528
  }
465
529
  async function promptAutomaticSetup() {
@@ -480,7 +544,7 @@ async function promptAutomaticSetup() {
480
544
  const { runSetup } = await prompts({
481
545
  type: "confirm",
482
546
  name: "runSetup",
483
- message: "Run initial setup now? (docker compose + database migrations)",
547
+ message: "Run local setup now? (start PostgreSQL with Docker + run migrations)",
484
548
  initial: true
485
549
  });
486
550
  return runSetup || false;
@@ -816,6 +880,12 @@ function printDryRun(options) {
816
880
  console.log(
817
881
  ` ${featureStatus(options.features.uploads)} File Uploads ${chalk4.dim("(S3 storage, upload routes)")}`
818
882
  );
883
+ console.log(
884
+ ` ${featureStatus(options.features.dockerDeploy)} Docker Deployment ${chalk4.dim("(API/Web Dockerfiles, production compose)")}`
885
+ );
886
+ console.log(
887
+ ` ${featureStatus(options.features.ciCd)} CD Workflow ${chalk4.dim("(GitHub Actions image build/push)")}`
888
+ );
819
889
  console.log();
820
890
  console.log(chalk4.bold(" Would run:"));
821
891
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-blitzpack",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Create a new Blitzpack project - full-stack TypeScript monorepo with Next.js and Fastify",
5
5
  "type": "module",
6
6
  "bin": {