create-bakery 2.0.0-alpha.1 → 2.0.0-alpha.12

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/package.json +2 -2
  2. package/src/template.ts +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bakery",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.12",
4
4
  "description": "Scaffold a Bakery app: bun create bakery <directory>",
5
5
  "keywords": [
6
6
  "bakery",
@@ -39,6 +39,6 @@
39
39
  "!src/tests"
40
40
  ],
41
41
  "engines": {
42
- "bun": ">=1.3.14"
42
+ "bun": ">=1.4.0"
43
43
  }
44
44
  }
package/src/template.ts CHANGED
@@ -460,7 +460,16 @@ export function templateFiles(
460
460
  dev: 'bakery --dev',
461
461
  start: 'bakery',
462
462
  typecheck: 'tsc --noEmit',
463
- ...(orm ? { 'db:sync': 'bun run scripts/db-sync.ts' } : {}),
463
+ ...(orm
464
+ ? {
465
+ 'db:sync': 'bun run scripts/db-sync.ts',
466
+ // The codegen entry point: write the schema *from* the database,
467
+ // touching no tables. `--migrate` is the sync engine's adoption
468
+ // flag; naming it here is what makes generation discoverable as a
469
+ // command rather than folklore about a flag.
470
+ 'db:codegen': 'bun run scripts/db-sync.ts --migrate',
471
+ }
472
+ : {}),
464
473
  },
465
474
  // Sorted, because the key order here is otherwise "whichever plugin was
466
475
  // listed first", and a generated file that differs run to run is a diff
@@ -481,7 +490,7 @@ export function templateFiles(
481
490
  // alternative is core taking a dependency, and having none is a property
482
491
  // worth more than this convenience.
483
492
  devDependencies: {
484
- 'bun-types': '^1.3.14',
493
+ 'bun-types': '^1.4.0',
485
494
  // **`^5`, not `^7`, and the reason is `vue-tsc`.** TypeScript 7 is the
486
495
  // native port and does not ship `typescript/lib/tsc`, which `vue-tsc`
487
496
  // requires to patch — so a Vue app that installs TS 7 gets