create-guren-app 1.20.2 → 1.21.0
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 +1 -1
- package/package.json +1 -1
- package/templates/api-only/bunfig.toml +25 -0
- package/templates/api-only/guren.arch.ts +14 -0
- package/templates/api-only/package.json +3 -3
- package/templates/blog/resources/js/pages/auth/Login.tsx +1 -1
- package/templates/blog/resources/js/pages/auth/Register.tsx +1 -1
- package/templates/blog/resources/js/pages/dashboard/Index.tsx +2 -0
- package/templates/default/.env.example +4 -0
- package/templates/default/_gitignore +1 -0
- package/templates/default/bunfig.toml +25 -0
- package/templates/default/guren.arch.ts +19 -0
- package/templates/default/package.json +6 -7
package/dist/cli.js
CHANGED
|
@@ -1806,7 +1806,7 @@ async function updateSsrPackageJson(destination) {
|
|
|
1806
1806
|
const raw = await readFile(packageJsonPath, "utf8");
|
|
1807
1807
|
const pkg = JSON.parse(raw);
|
|
1808
1808
|
pkg.scripts ??= {};
|
|
1809
|
-
pkg.scripts.build = "bun run codegen && bunx vite build && bunx vite build --ssr";
|
|
1809
|
+
pkg.scripts.build = "bun run codegen && bunx vite build && bunx vite build --ssr && bunx vite build --mode mcp-app";
|
|
1810
1810
|
await writeFile(packageJsonPath, `${JSON.stringify(pkg, null, 2)}\n`, "utf8");
|
|
1811
1811
|
}
|
|
1812
1812
|
async function runAppCli(targetDir, cliArgs) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-guren-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
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",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Bun skips package versions published less than minimumReleaseAge seconds
|
|
2
|
+
# ago (3 days), so a compromised release has time to be found and pulled
|
|
3
|
+
# before an install here picks it up. To take a fix that is newer than that, add
|
|
4
|
+
# its exact version to the list below, for example "some-package@1.2.4".
|
|
5
|
+
# The @guren packages are listed one by one because Bun does not read "@guren/*",
|
|
6
|
+
# and a Guren upgrade asks for releases newer than the gate allows.
|
|
7
|
+
[install]
|
|
8
|
+
minimumReleaseAge = 259200
|
|
9
|
+
minimumReleaseAgeExcludes = [
|
|
10
|
+
"@guren/cli",
|
|
11
|
+
"@guren/core",
|
|
12
|
+
"@guren/inertia-client",
|
|
13
|
+
"@guren/openapi",
|
|
14
|
+
"@guren/orm",
|
|
15
|
+
"@guren/plugin-agents",
|
|
16
|
+
"@guren/plugin-ai",
|
|
17
|
+
"@guren/plugin-cloudflare",
|
|
18
|
+
"@guren/plugin-lambda",
|
|
19
|
+
"@guren/plugin-markdown",
|
|
20
|
+
"@guren/plugin-mcp",
|
|
21
|
+
"@guren/plugin-vercel",
|
|
22
|
+
"@guren/plugin-webmcp",
|
|
23
|
+
"@guren/server",
|
|
24
|
+
"@guren/testing",
|
|
25
|
+
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineArchRules } from '@guren/cli/arch'
|
|
2
|
+
|
|
3
|
+
// Read by `guren check` (and so `guren gate`). The rules see each file's own runtime
|
|
4
|
+
// imports, not what a local module it imports reaches.
|
|
5
|
+
export default defineArchRules({
|
|
6
|
+
rules: [
|
|
7
|
+
{
|
|
8
|
+
from: 'app/Http/Controllers/**',
|
|
9
|
+
disallowPackages: ['drizzle-orm'],
|
|
10
|
+
severity: 'warn',
|
|
11
|
+
message: 'Query through a Model, or move the raw query out of the controller.',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
})
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"test": "bun test"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@guren/cli": "^2.
|
|
25
|
-
"@guren/core": "^1.26.
|
|
24
|
+
"@guren/cli": "^2.36.0",
|
|
25
|
+
"@guren/core": "^1.26.1",
|
|
26
26
|
"@guren/orm": "^2.15.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.14.
|
|
31
|
+
"@guren/testing": "^1.14.4",
|
|
32
32
|
"bun-types": "^1.3.1",
|
|
33
33
|
"drizzle-kit": "1.0.0-rc.4",
|
|
34
34
|
"oxlint": "~1.81.0",
|
|
@@ -43,7 +43,7 @@ export default function Login({ email = '', errors = {} }: Props) {
|
|
|
43
43
|
|
|
44
44
|
<p className="mt-6 text-center text-sm text-g-text-2">
|
|
45
45
|
Don't have an account?{' '}
|
|
46
|
-
<Link href="/register" className="text-g-accent-text transition hover:underline">
|
|
46
|
+
<Link href="/register" className="text-g-accent-text underline underline-offset-2 transition hover:no-underline">
|
|
47
47
|
Sign up
|
|
48
48
|
</Link>
|
|
49
49
|
</p>
|
|
@@ -42,7 +42,7 @@ export default function Register({ errors = {} }: Props) {
|
|
|
42
42
|
|
|
43
43
|
<p className="mt-6 text-center text-sm text-g-text-2">
|
|
44
44
|
Already have an account?{' '}
|
|
45
|
-
<Link href="/login" className="text-g-accent-text transition hover:underline">
|
|
45
|
+
<Link href="/login" className="text-g-accent-text underline underline-offset-2 transition hover:no-underline">
|
|
46
46
|
Sign in
|
|
47
47
|
</Link>
|
|
48
48
|
</p>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Head } from '@inertiajs/react'
|
|
1
2
|
import Layout from '../../components/Layout.js'
|
|
2
3
|
import { Alert } from '@/resources/js/components/ui/Alert'
|
|
3
4
|
|
|
@@ -8,6 +9,7 @@ interface Props {
|
|
|
8
9
|
export default function Dashboard({ user }: Props) {
|
|
9
10
|
return (
|
|
10
11
|
<Layout>
|
|
12
|
+
<Head title="Dashboard" />
|
|
11
13
|
<section className="space-y-6">
|
|
12
14
|
<header>
|
|
13
15
|
<h1 className="flex items-center gap-3 text-3xl font-bold text-g-heading">
|
|
@@ -11,5 +11,9 @@ DATABASE_URL=./data/guren.db
|
|
|
11
11
|
# Blank uses ./data/guren.test.db. Set it to shard parallel CI runs.
|
|
12
12
|
TEST_DATABASE_URL=
|
|
13
13
|
|
|
14
|
+
# Optional: the port the dev server starts Vite on (5173 when unset). Vite
|
|
15
|
+
# takes the next free port when it is busy, and the banner shows the one in use.
|
|
16
|
+
# GUREN_VITE_PORT=5173
|
|
17
|
+
|
|
14
18
|
# Optional: point to an already-running external Vite dev server.
|
|
15
19
|
# VITE_DEV_SERVER_URL=http://localhost:5173
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Bun skips package versions published less than minimumReleaseAge seconds
|
|
2
|
+
# ago (3 days), so a compromised release has time to be found and pulled
|
|
3
|
+
# before an install here picks it up. To take a fix that is newer than that, add
|
|
4
|
+
# its exact version to the list below, for example "some-package@1.2.4".
|
|
5
|
+
# The @guren packages are listed one by one because Bun does not read "@guren/*",
|
|
6
|
+
# and a Guren upgrade asks for releases newer than the gate allows.
|
|
7
|
+
[install]
|
|
8
|
+
minimumReleaseAge = 259200
|
|
9
|
+
minimumReleaseAgeExcludes = [
|
|
10
|
+
"@guren/cli",
|
|
11
|
+
"@guren/core",
|
|
12
|
+
"@guren/inertia-client",
|
|
13
|
+
"@guren/openapi",
|
|
14
|
+
"@guren/orm",
|
|
15
|
+
"@guren/plugin-agents",
|
|
16
|
+
"@guren/plugin-ai",
|
|
17
|
+
"@guren/plugin-cloudflare",
|
|
18
|
+
"@guren/plugin-lambda",
|
|
19
|
+
"@guren/plugin-markdown",
|
|
20
|
+
"@guren/plugin-mcp",
|
|
21
|
+
"@guren/plugin-vercel",
|
|
22
|
+
"@guren/plugin-webmcp",
|
|
23
|
+
"@guren/server",
|
|
24
|
+
"@guren/testing",
|
|
25
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineArchRules } from '@guren/cli/arch'
|
|
2
|
+
|
|
3
|
+
// Read by `guren check` (and so `guren gate`). The rules see each file's own runtime
|
|
4
|
+
// imports, not what a local module it imports reaches.
|
|
5
|
+
export default defineArchRules({
|
|
6
|
+
rules: [
|
|
7
|
+
{
|
|
8
|
+
from: 'resources/js/**',
|
|
9
|
+
disallowPackages: ['drizzle-orm', 'postgres', 'mysql2', '@guren/orm', '@guren/core'],
|
|
10
|
+
message: 'Pages run in the browser; load data in the controller and pass it as props.',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
from: 'app/Http/Controllers/**',
|
|
14
|
+
disallowPackages: ['drizzle-orm'],
|
|
15
|
+
severity: 'warn',
|
|
16
|
+
message: 'Query through a Model, or move the raw query out of the controller.',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
})
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"lint": "bunx oxlint",
|
|
13
13
|
"lint:fix": "bunx oxlint --fix",
|
|
14
14
|
"test": "bun test",
|
|
15
|
-
"build": "bun run codegen && bunx vite build",
|
|
15
|
+
"build": "bun run codegen && bunx vite build && bunx vite build --mode mcp-app",
|
|
16
16
|
"preview": "NODE_ENV=production bun bin/serve.ts",
|
|
17
17
|
"start": "NODE_ENV=production bun bin/serve.ts",
|
|
18
18
|
"db:make": "bunx guren make:migration",
|
|
@@ -22,25 +22,24 @@
|
|
|
22
22
|
"db:seed": "bunx guren db:seed"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@guren/cli": "^2.
|
|
26
|
-
"@guren/core": "^1.26.
|
|
27
|
-
"@guren/inertia-client": "^1.
|
|
25
|
+
"@guren/cli": "^2.36.0",
|
|
26
|
+
"@guren/core": "^1.26.1",
|
|
27
|
+
"@guren/inertia-client": "^1.4.0",
|
|
28
28
|
"@guren/orm": "^2.15.0",
|
|
29
|
-
"@inertiajs/react": "^3.
|
|
29
|
+
"@inertiajs/react": "^3.11.0",
|
|
30
30
|
"drizzle-orm": "1.0.0-rc.4",
|
|
31
31
|
"react": "^19.0.0",
|
|
32
32
|
"react-dom": "^19.0.0",
|
|
33
33
|
"zod": "^4.5.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@guren/testing": "^1.14.
|
|
36
|
+
"@guren/testing": "^1.14.4",
|
|
37
37
|
"@tailwindcss/vite": "^4.2.2",
|
|
38
38
|
"@types/react": "^19.0.0",
|
|
39
39
|
"@types/react-dom": "^19.0.0",
|
|
40
40
|
"@vitejs/plugin-react": "^6.0.0",
|
|
41
41
|
"bun-types": "^1.3.1",
|
|
42
42
|
"drizzle-kit": "1.0.0-rc.4",
|
|
43
|
-
"mermaid": "^11.0.0",
|
|
44
43
|
"oxlint": "~1.81.0",
|
|
45
44
|
"tailwindcss": "^4.2.2",
|
|
46
45
|
"typescript": "^7.0.2",
|