create-guren-app 1.21.2 → 1.21.3
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/dist/cli.js
CHANGED
|
@@ -1416,7 +1416,8 @@ const blueprintRegistry = {
|
|
|
1416
1416
|
resourceExample: {
|
|
1417
1417
|
name: "tags",
|
|
1418
1418
|
fields: "name:string"
|
|
1419
|
-
}
|
|
1419
|
+
},
|
|
1420
|
+
initialMigration: "create_users_and_posts"
|
|
1420
1421
|
},
|
|
1421
1422
|
worker: {
|
|
1422
1423
|
name: "worker",
|
|
@@ -1991,6 +1992,19 @@ async function runCodegen(cwd) {
|
|
|
1991
1992
|
consola.success("Generated route and page types");
|
|
1992
1993
|
return true;
|
|
1993
1994
|
}
|
|
1995
|
+
/**
|
|
1996
|
+
* `make:migration` exits 0 for "nothing to migrate" as well, so the folder
|
|
1997
|
+
* drizzle-kit writes per migration is the evidence that one exists.
|
|
1998
|
+
*/
|
|
1999
|
+
async function generateInitialMigration(cwd, name) {
|
|
2000
|
+
consola.start("Generating the first migration...");
|
|
2001
|
+
if (!(await runAppCli(cwd, ["make:migration", name]) ? await readdir(join(cwd, "db/migrations"), { withFileTypes: true }).catch(() => []) : []).some((entry) => entry.isDirectory())) {
|
|
2002
|
+
consola.warn("The first migration was not generated (see the output above). Run `bun run db:make` inside the app.");
|
|
2003
|
+
return false;
|
|
2004
|
+
}
|
|
2005
|
+
consola.success("Generated the first migration in db/migrations/");
|
|
2006
|
+
return true;
|
|
2007
|
+
}
|
|
1994
2008
|
runMain(defineCommand({
|
|
1995
2009
|
meta: {
|
|
1996
2010
|
name: "create-guren-app",
|
|
@@ -2111,6 +2125,7 @@ runMain(defineCommand({
|
|
|
2111
2125
|
}
|
|
2112
2126
|
if (!authInstalled) consola.warn(installed ? "Authentication scaffolding failed (see the output above). Run `bunx guren add auth` inside the app once that is fixed." : "Authentication was not scaffolded automatically. Run `bunx guren add auth` inside the app after installing dependencies.");
|
|
2113
2127
|
}
|
|
2128
|
+
const migrationGenerated = installed && blueprint.initialMigration !== void 0 && await generateInitialMigration(targetDir, blueprint.initialMigration);
|
|
2114
2129
|
const authFailed = includeAuth && !authInstalled;
|
|
2115
2130
|
if (installed && authFailed) consola.info("Skipping codegen until authentication is scaffolded; run `bun run codegen` after `bunx guren add auth`.");
|
|
2116
2131
|
const codegenRan = installed && !authFailed && await runCodegen(targetDir);
|
|
@@ -2132,7 +2147,7 @@ runMain(defineCommand({
|
|
|
2132
2147
|
consola.log("");
|
|
2133
2148
|
consola.info(codegenRan ? "Set up the database:" : "Generate types and set up database:");
|
|
2134
2149
|
if (!codegenRan) consola.log(" bun run codegen");
|
|
2135
|
-
consola.log(" bun run db:make");
|
|
2150
|
+
if (!migrationGenerated) consola.log(" bun run db:make");
|
|
2136
2151
|
consola.log(" bun run db:migrate");
|
|
2137
2152
|
consola.log(" bun run db:seed");
|
|
2138
2153
|
consola.log("");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-guren-app",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.3",
|
|
4
4
|
"description": "Scaffold a Guren app: a Bun-first fullstack TypeScript framework with Laravel-style conventions, Inertia.js + React, Drizzle ORM, and an agent harness for Claude Code and other coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"guren",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"test": "bun test"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@guren/cli": "^2.36.
|
|
25
|
-
"@guren/core": "^1.
|
|
26
|
-
"@guren/orm": "^2.
|
|
24
|
+
"@guren/cli": "^2.36.3",
|
|
25
|
+
"@guren/core": "^1.27.0",
|
|
26
|
+
"@guren/orm": "^2.16.0",
|
|
27
27
|
"drizzle-orm": "1.0.0-rc.4",
|
|
28
28
|
"zod": "^4.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@guren/testing": "^1.
|
|
31
|
+
"@guren/testing": "^1.15.0",
|
|
32
32
|
"bun-types": "^1.3.1",
|
|
33
33
|
"drizzle-kit": "1.0.0-rc.4",
|
|
34
34
|
"oxlint": "~1.81.0",
|
package/templates/blog/README.md
CHANGED
|
@@ -10,12 +10,13 @@ bun install
|
|
|
10
10
|
<!-- guren:container -->
|
|
11
11
|
bun run db:up # start the __DATABASE_LABEL__ container
|
|
12
12
|
<!-- /guren:container -->
|
|
13
|
-
bun run db:
|
|
14
|
-
bun run db:migrate
|
|
13
|
+
bun run db:migrate # create the users and posts tables
|
|
15
14
|
bun run db:seed # demo@example.com / secret, plus two sample posts
|
|
16
15
|
bun run dev
|
|
17
16
|
```
|
|
18
17
|
|
|
18
|
+
`create-guren-app` wrote the first migration into `db/migrations/` when it installed dependencies. If that folder holds no migration (the app was created with `--no-install`), run `bun run db:make` before `bun run db:migrate`.
|
|
19
|
+
|
|
19
20
|
<!-- guren:container -->
|
|
20
21
|
__DATABASE_LABEL__ runs in the container `docker-compose.yml` defines, and `DATABASE_URL` in `.env` points at it. `bun run db:down` stops it.
|
|
21
22
|
<!-- /guren:container -->
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"db:seed": "bunx guren db:seed"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@guren/cli": "^2.36.
|
|
26
|
-
"@guren/core": "^1.
|
|
25
|
+
"@guren/cli": "^2.36.3",
|
|
26
|
+
"@guren/core": "^1.27.0",
|
|
27
27
|
"@guren/inertia-client": "^1.4.0",
|
|
28
|
-
"@guren/orm": "^2.
|
|
28
|
+
"@guren/orm": "^2.16.0",
|
|
29
29
|
"@inertiajs/react": "^3.11.0",
|
|
30
30
|
"drizzle-orm": "1.0.0-rc.4",
|
|
31
31
|
"react": "^19.0.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"zod": "^4.5.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@guren/testing": "^1.
|
|
36
|
+
"@guren/testing": "^1.15.0",
|
|
37
37
|
"@tailwindcss/vite": "^4.2.2",
|
|
38
38
|
"@types/react": "^19.0.0",
|
|
39
39
|
"@types/react-dom": "^19.0.0",
|