create-guren-app 1.8.9 → 1.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-guren-app",
3
- "version": "1.8.9",
3
+ "version": "1.9.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,8 +18,8 @@
18
18
  "test": "bun test"
19
19
  },
20
20
  "dependencies": {
21
- "@guren/cli": "^2.9.1",
22
- "@guren/core": "^1.8.1",
21
+ "@guren/cli": "^2.10.0",
22
+ "@guren/core": "^1.9.0",
23
23
  "@guren/orm": "^2.6.1",
24
24
  "drizzle-orm": "1.0.0-rc.4"
25
25
  },
@@ -1,4 +1,4 @@
1
- // Generated from app/Http/Resources — DO NOT EDIT
1
+ // Generated from app/Http/Resources (and modules/*/app/Http/Resources) — DO NOT EDIT
2
2
  // Run `guren codegen` to regenerate.
3
3
 
4
4
  import type { PostRecord, PostAuthorSummary } from '../app/Models/Post.js'
@@ -16,25 +16,21 @@ export interface PostResourceData extends Record<string, unknown> {
16
16
  author?: PostAuthorSummary
17
17
  }
18
18
 
19
- export class PostResource extends Resource<PostRecord | PostWithAuthor> {
19
+ export class PostResource extends Resource<PostRecord | PostWithAuthor, PostResourceData> {
20
20
  toArray(): PostResourceData {
21
21
  const post = this.resource
22
22
 
23
23
  return {
24
- id: post.id as number,
25
- title: post.title as string,
26
- excerpt: post.excerpt as string,
27
- body: post.body as string,
28
- authorId: post.authorId as number,
29
- createdAt: new Date(post.createdAt as string | Date).toISOString(),
24
+ id: post.id,
25
+ title: post.title,
26
+ excerpt: post.excerpt,
27
+ body: post.body,
28
+ authorId: post.authorId,
29
+ createdAt: new Date(post.createdAt).toISOString(),
30
30
  author: this.whenLoaded('author', () => ({
31
31
  id: (post as PostWithAuthor).author?.id,
32
32
  name: (post as PostWithAuthor).author?.name,
33
33
  })) as PostAuthorSummary | undefined,
34
34
  }
35
35
  }
36
-
37
- override toJSON(): PostResourceData {
38
- return super.toJSON() as PostResourceData
39
- }
40
36
  }
@@ -1,4 +1,4 @@
1
- // Generated from app/Http/Resources — DO NOT EDIT
1
+ // Generated from app/Http/Resources (and modules/*/app/Http/Resources) — DO NOT EDIT
2
2
  // Run `guren codegen` to regenerate.
3
3
 
4
4
  /**
@@ -19,8 +19,8 @@
19
19
  "db:seed": "bunx guren db:seed"
20
20
  },
21
21
  "dependencies": {
22
- "@guren/cli": "^2.9.1",
23
- "@guren/core": "^1.8.1",
22
+ "@guren/cli": "^2.10.0",
23
+ "@guren/core": "^1.9.0",
24
24
  "@guren/inertia-client": "^1.1.2",
25
25
  "@guren/orm": "^2.6.1",
26
26
  "@inertiajs/react": "^3.6.1",