create-guren-app 1.14.1 → 1.15.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-guren-app",
3
- "version": "1.14.1",
3
+ "version": "1.15.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,13 +20,13 @@
20
20
  "test": "bun test"
21
21
  },
22
22
  "dependencies": {
23
- "@guren/cli": "^2.21.0",
24
- "@guren/core": "^1.17.0",
25
- "@guren/orm": "^2.8.0",
23
+ "@guren/cli": "^2.23.0",
24
+ "@guren/core": "^1.18.0",
25
+ "@guren/orm": "^2.10.0",
26
26
  "drizzle-orm": "1.0.0-rc.4"
27
27
  },
28
28
  "devDependencies": {
29
- "@guren/testing": "^1.10.0",
29
+ "@guren/testing": "^1.10.1",
30
30
  "bun-types": "^1.3.1",
31
31
  "drizzle-kit": "1.0.0-rc.4",
32
32
  "oxlint": "~1.81.0",
@@ -73,9 +73,10 @@ bunx guren add schedule # task scheduling
73
73
  ## Favicon
74
74
 
75
75
  `public/favicon.svg` ships as a placeholder and is linked from `src/app.ts` via
76
- `setInertiaDocument({ head })`, which is the only path that reaches the
77
- production document — `public/index.html` is not read by the server. Replace the
78
- file to change the icon, or edit the `head` markup to add more tags.
76
+ `createApp({ inertia: { document: { head } } })`, which is the only path that
77
+ reaches the production document — `public/index.html` is not read by the
78
+ server. Replace the file to change the icon, or edit the `head` markup to add
79
+ more tags.
79
80
 
80
81
  Files at the root of `public/` are served by the Bun runtime. On Node-based
81
82
  deployments (AWS Lambda, for example) serve them from a CDN instead.
@@ -1,4 +1,4 @@
1
- import { ServiceProvider, getGate } from '@guren/core'
1
+ import { ServiceProvider } from '@guren/core'
2
2
  import { Post } from '../Models/Post.js'
3
3
  import { PostPolicy } from '../Policies/PostPolicy.js'
4
4
 
@@ -10,9 +10,9 @@ import { PostPolicy } from '../Policies/PostPolicy.js'
10
10
  export default class AuthorizationProvider extends ServiceProvider {
11
11
  register(): void {}
12
12
 
13
- // The framework's own provider creates the gate during registration, so this
14
- // runs in boot() — getGate() throws before that.
13
+ // The framework's own provider binds the gate during registration, so this
14
+ // runs in boot() — make('gate') throws before that.
15
15
  boot(): void {
16
- getGate().policy(Post, PostPolicy)
16
+ this.container.make('gate').policy(Post, PostPolicy)
17
17
  }
18
18
  }
@@ -5,18 +5,12 @@
5
5
  // on invalid input, refinements/transforms can run twice (fast path, then
6
6
  // fallback), so keep .refine()/.transform() free of side effects.
7
7
  import 'zod/compile'
8
- import { createApp, setInertiaDocument } from '@guren/core'
8
+ import { createApp } from '@guren/core'
9
9
  import DatabaseProvider from '../app/Providers/DatabaseProvider.js'
10
10
  import AuthProvider from '../app/Providers/AuthProvider.js'
11
11
  import AuthorizationProvider from '../app/Providers/AuthorizationProvider.js'
12
12
  import { registerWebRoutes } from '../routes/web.js'
13
13
 
14
- // Rendered into every server-rendered document. Replace public/favicon.svg
15
- // with your own artwork, or add more tags here (Open Graph, apple-touch-icon).
16
- setInertiaDocument({
17
- head: '<link rel="icon" type="image/svg+xml" href="/favicon.svg" />',
18
- })
19
-
20
14
  // The Host header is client-controlled, so production should answer only to the
21
15
  // host this app is deployed as, which APP_URL carries. Emailed links do not
22
16
  // depend on this — app/Auth/AppUrl.ts resolves those per request and fails
@@ -44,6 +38,13 @@ function hostAuthorization() {
44
38
  }
45
39
 
46
40
  const app = createApp({
41
+ // Rendered into every server-rendered document. Replace public/favicon.svg
42
+ // with your own artwork, or add more tags here (Open Graph, apple-touch-icon).
43
+ inertia: {
44
+ document: {
45
+ head: '<link rel="icon" type="image/svg+xml" href="/favicon.svg" />',
46
+ },
47
+ },
47
48
  auth: {},
48
49
  routes: registerWebRoutes,
49
50
  providers: [DatabaseProvider, AuthProvider, AuthorizationProvider],
@@ -40,9 +40,10 @@ bunx guren add schedule # task scheduling
40
40
  ## Favicon
41
41
 
42
42
  `public/favicon.svg` ships as a placeholder and is linked from `src/app.ts` via
43
- `setInertiaDocument({ head })`, which is the only path that reaches the
44
- production document — `public/index.html` is not read by the server. Replace the
45
- file to change the icon, or edit the `head` markup to add more tags.
43
+ `createApp({ inertia: { document: { head } } })`, which is the only path that
44
+ reaches the production document — `public/index.html` is not read by the
45
+ server. Replace the file to change the icon, or edit the `head` markup to add
46
+ more tags.
46
47
 
47
48
  Files at the root of `public/` are served by the Bun runtime. On Node-based
48
49
  deployments (AWS Lambda, for example) serve them from a CDN instead.
@@ -21,10 +21,10 @@
21
21
  "db:seed": "bunx guren db:seed"
22
22
  },
23
23
  "dependencies": {
24
- "@guren/cli": "^2.21.0",
25
- "@guren/core": "^1.17.0",
24
+ "@guren/cli": "^2.23.0",
25
+ "@guren/core": "^1.18.0",
26
26
  "@guren/inertia-client": "^1.2.1",
27
- "@guren/orm": "^2.8.0",
27
+ "@guren/orm": "^2.10.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.10.0",
35
+ "@guren/testing": "^1.10.1",
36
36
  "@tailwindcss/vite": "^4.2.2",
37
37
  "@types/react": "^19.0.0",
38
38
  "@types/react-dom": "^19.0.0",
@@ -6,16 +6,9 @@
6
6
  // fallback), so keep .refine()/.transform() free of side effects.
7
7
  import 'zod/compile'
8
8
  import { createApp } from '@guren/core'
9
- import { setInertiaDocument } from '@guren/core'
10
9
  import DatabaseProvider from '../app/Providers/DatabaseProvider.js'
11
10
  import { registerWebRoutes } from '../routes/web.js'
12
11
 
13
- // Rendered into every server-rendered document. Replace public/favicon.svg
14
- // with your own artwork, or add more tags here (Open Graph, apple-touch-icon).
15
- setInertiaDocument({
16
- head: '<link rel="icon" type="image/svg+xml" href="/favicon.svg" />',
17
- })
18
-
19
12
  // The Host header is client-controlled, so production should answer only to the
20
13
  // host this app is deployed as, which APP_URL carries. Emailed links do not
21
14
  // depend on this — app/Auth/AppUrl.ts resolves those per request and fails
@@ -43,6 +36,13 @@ function hostAuthorization() {
43
36
  }
44
37
 
45
38
  const app = createApp({
39
+ // Rendered into every server-rendered document. Replace public/favicon.svg
40
+ // with your own artwork, or add more tags here (Open Graph, apple-touch-icon).
41
+ inertia: {
42
+ document: {
43
+ head: '<link rel="icon" type="image/svg+xml" href="/favicon.svg" />',
44
+ },
45
+ },
46
46
  routes: registerWebRoutes,
47
47
  providers: [DatabaseProvider],
48
48
  // Translations live in lang/<locale>/*.json. Add locales to `supported`