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.
- package/README.md +10 -1
- package/dist/index.js +91 -21
- 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
|
|
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
|
|
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: "
|
|
176
|
-
name: "
|
|
177
|
-
description: "
|
|
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
|
-
|
|
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: "
|
|
413
|
+
message: "Project profile:",
|
|
401
414
|
choices: [
|
|
402
415
|
{
|
|
403
416
|
title: "Recommended",
|
|
404
|
-
description: "all features
|
|
417
|
+
description: "all app features + Docker deploy assets + CD workflow",
|
|
405
418
|
value: "recommended"
|
|
406
419
|
},
|
|
407
420
|
{
|
|
408
|
-
title: "
|
|
409
|
-
description: "
|
|
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
|
-
|
|
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
|
|
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 {
|
|
491
|
+
const { selectedDeploymentFeatures } = await prompts(
|
|
440
492
|
{
|
|
441
493
|
type: "multiselect",
|
|
442
|
-
name: "
|
|
443
|
-
message: "Select
|
|
444
|
-
choices:
|
|
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
|
|
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:
|
|
460
|
-
admin:
|
|
461
|
-
uploads:
|
|
462
|
-
|
|
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
|
|
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();
|