create-guren-app 1.17.0 → 1.17.2
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 +17 -10
- package/package.json +18 -1
- package/templates/api-only/package.json +4 -4
- package/templates/default/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -1396,7 +1396,8 @@ const blueprintRegistry = {
|
|
|
1396
1396
|
description: "API-only starter — no Inertia, no React, no frontend assets.",
|
|
1397
1397
|
baseTemplate: "api-only",
|
|
1398
1398
|
overlayTemplates: {},
|
|
1399
|
-
transformFiles: API_TRANSFORM_FILES
|
|
1399
|
+
transformFiles: API_TRANSFORM_FILES,
|
|
1400
|
+
apiOnly: true
|
|
1400
1401
|
},
|
|
1401
1402
|
blog: {
|
|
1402
1403
|
name: "blog",
|
|
@@ -1981,7 +1982,7 @@ runMain(defineCommand({
|
|
|
1981
1982
|
if (!force && !targetWasEmpty) throw new Error(`Directory "${targetDir}" is not empty. Use --force to scaffold anyway.`);
|
|
1982
1983
|
} else await ensureTargetDirectory(targetDir, true);
|
|
1983
1984
|
const blueprint = getAppBlueprint(typeof args.blueprint === "string" ? args.blueprint : void 0);
|
|
1984
|
-
const renderingMode = blueprint.
|
|
1985
|
+
const renderingMode = blueprint.apiOnly ? "spa" : await resolveRenderingMode(args.mode);
|
|
1985
1986
|
const database = await resolveDatabase(args.db);
|
|
1986
1987
|
const agents = await resolveAgents(args.agents);
|
|
1987
1988
|
const shouldInitGit = await resolveGitInit(args.git, {
|
|
@@ -1995,12 +1996,16 @@ runMain(defineCommand({
|
|
|
1995
1996
|
database
|
|
1996
1997
|
});
|
|
1997
1998
|
if (renderingMode === "ssr") await updateSsrPackageJson(targetDir);
|
|
1998
|
-
|
|
1999
|
-
|
|
1999
|
+
let includeAuth = false;
|
|
2000
|
+
if (args.auth) {
|
|
2001
|
+
if (blueprint.includesAuth) consola.info(`The ${blueprint.name} blueprint already ships authentication — ignoring --auth.`);
|
|
2002
|
+
else if (blueprint.apiOnly) consola.info(`The ${blueprint.name} blueprint has no pages to sign in on — ignoring --auth. Guard routes/api.ts with createBearerTokenMiddleware from @guren/core instead: https://guren.dev/docs/guides/api-tokens`);
|
|
2003
|
+
else includeAuth = true;
|
|
2004
|
+
}
|
|
2000
2005
|
const shouldInstall = args.install !== false;
|
|
2001
2006
|
let installed = false;
|
|
2002
2007
|
if (shouldInstall) installed = await installDependencies(targetDir);
|
|
2003
|
-
if (args.prototype && blueprint.
|
|
2008
|
+
if (args.prototype && !blueprint.apiOnly) {
|
|
2004
2009
|
let prototypeInstalled = false;
|
|
2005
2010
|
if (installed) {
|
|
2006
2011
|
consola.start("Installing prototype mode...");
|
|
@@ -2008,7 +2013,7 @@ runMain(defineCommand({
|
|
|
2008
2013
|
if (prototypeInstalled) consola.success("Prototype mode installed: bun run dev:prototype / bun run build:prototype");
|
|
2009
2014
|
}
|
|
2010
2015
|
if (!prototypeInstalled) consola.warn("Prototype mode was not installed automatically. Run `bunx guren add prototype` inside the app after installing dependencies.");
|
|
2011
|
-
} else if (args.prototype) consola.info(
|
|
2016
|
+
} else if (args.prototype) consola.info(`The ${blueprint.name} blueprint has no pages to prototype — ignoring --prototype.`);
|
|
2012
2017
|
if (agents === null) consola.info("Skipping the AI agent harness. Add it later with `bunx guren agent:init --target <agents>`.");
|
|
2013
2018
|
else {
|
|
2014
2019
|
const targetList = agents.join(",");
|
|
@@ -2035,7 +2040,7 @@ runMain(defineCommand({
|
|
|
2035
2040
|
]);
|
|
2036
2041
|
if (authInstalled) consola.success("Authentication scaffolding added");
|
|
2037
2042
|
}
|
|
2038
|
-
if (!authInstalled) consola.warn("Authentication was not scaffolded automatically. Run `bunx guren add auth` inside the app after installing dependencies.");
|
|
2043
|
+
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.");
|
|
2039
2044
|
}
|
|
2040
2045
|
if (shouldInitGit) reportGitInit(targetDir);
|
|
2041
2046
|
const relativeTarget = relative(g$1.cwd(), targetDir) || ".";
|
|
@@ -2046,8 +2051,11 @@ runMain(defineCommand({
|
|
|
2046
2051
|
if (usesDatabaseContainer(database)) consola.log(" bun run db:up");
|
|
2047
2052
|
consola.log("");
|
|
2048
2053
|
consola.info("Add features:");
|
|
2049
|
-
if (
|
|
2050
|
-
|
|
2054
|
+
if (blueprint.apiOnly) consola.log(" bunx guren make:controller Post # then register its actions in routes/api.ts");
|
|
2055
|
+
else {
|
|
2056
|
+
if (!blueprint.includesAuth && !authInstalled) consola.log(" bunx guren add auth");
|
|
2057
|
+
consola.log(" bunx guren add resource posts --fields \"title:string,body:text\"");
|
|
2058
|
+
}
|
|
2051
2059
|
consola.log("");
|
|
2052
2060
|
consola.info("Generate types and set up database:");
|
|
2053
2061
|
consola.log(" bun run codegen");
|
|
@@ -2062,7 +2070,6 @@ runMain(defineCommand({
|
|
|
2062
2070
|
if (authInstalled) {
|
|
2063
2071
|
consola.log("");
|
|
2064
2072
|
consola.info("Auth scaffolding was included automatically.");
|
|
2065
|
-
consola.info("Set up the users table with: bun run db:make && bun run db:migrate && bun run db:seed");
|
|
2066
2073
|
}
|
|
2067
2074
|
if (renderingMode === "ssr") {
|
|
2068
2075
|
consola.log("");
|
package/package.json
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-guren-app",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.2",
|
|
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
|
+
"keywords": [
|
|
6
|
+
"guren",
|
|
7
|
+
"bun",
|
|
8
|
+
"typescript",
|
|
9
|
+
"fullstack",
|
|
10
|
+
"framework",
|
|
11
|
+
"bun-framework",
|
|
12
|
+
"create-app",
|
|
13
|
+
"starter",
|
|
14
|
+
"laravel",
|
|
15
|
+
"hono",
|
|
16
|
+
"drizzle",
|
|
17
|
+
"inertia",
|
|
18
|
+
"react",
|
|
19
|
+
"claude-code"
|
|
20
|
+
],
|
|
4
21
|
"type": "module",
|
|
5
22
|
"license": "MIT",
|
|
6
23
|
"repository": {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"test": "bun test"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@guren/cli": "^2.
|
|
24
|
-
"@guren/core": "^1.
|
|
25
|
-
"@guren/orm": "^2.
|
|
23
|
+
"@guren/cli": "^2.27.0",
|
|
24
|
+
"@guren/core": "^1.21.0",
|
|
25
|
+
"@guren/orm": "^2.12.0",
|
|
26
26
|
"drizzle-orm": "1.0.0-rc.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@guren/testing": "^1.
|
|
29
|
+
"@guren/testing": "^1.14.0",
|
|
30
30
|
"bun-types": "^1.3.1",
|
|
31
31
|
"drizzle-kit": "1.0.0-rc.4",
|
|
32
32
|
"oxlint": "~1.81.0",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"db:seed": "bunx guren db:seed"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@guren/cli": "^2.
|
|
25
|
-
"@guren/core": "^1.
|
|
26
|
-
"@guren/inertia-client": "^1.2.
|
|
27
|
-
"@guren/orm": "^2.
|
|
24
|
+
"@guren/cli": "^2.27.0",
|
|
25
|
+
"@guren/core": "^1.21.0",
|
|
26
|
+
"@guren/inertia-client": "^1.2.2",
|
|
27
|
+
"@guren/orm": "^2.12.0",
|
|
28
28
|
"@inertiajs/react": "^3.6.1",
|
|
29
29
|
"drizzle-orm": "1.0.0-rc.4",
|
|
30
30
|
"react": "^19.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"zod": "^4.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@guren/testing": "^1.
|
|
35
|
+
"@guren/testing": "^1.14.0",
|
|
36
36
|
"@tailwindcss/vite": "^4.2.2",
|
|
37
37
|
"@types/react": "^19.0.0",
|
|
38
38
|
"@types/react-dom": "^19.0.0",
|