create-fate 1.8.0 → 1.10.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.
Files changed (45) hide show
  1. package/bin/create-fate.mjs +10 -2
  2. package/package.json +1 -1
  3. package/templates/fate/_shared/vue-app/package.json +11 -11
  4. package/templates/fate/drizzle/client/package.json +15 -15
  5. package/templates/fate/drizzle/client/src/ui/PostCard.tsx +6 -1
  6. package/templates/fate/drizzle/package.json +6 -7
  7. package/templates/fate/drizzle/pnpm-workspace.yaml +5 -5
  8. package/templates/fate/drizzle/server/package.json +8 -8
  9. package/templates/fate/graphql/AGENTS.md +1 -1
  10. package/templates/fate/graphql/README.md +12 -1
  11. package/templates/fate/graphql/client/package.json +14 -14
  12. package/templates/fate/graphql/client/pages/index.tsx +1 -1
  13. package/templates/fate/graphql/client/pages/search.tsx +2 -2
  14. package/templates/fate/graphql/client/src/fate/graphql.ts +20 -0
  15. package/templates/fate/graphql/client/src/ui/CommentCard.tsx +1 -1
  16. package/templates/fate/graphql/client/src/ui/PostCard.tsx +7 -2
  17. package/templates/fate/graphql/client/src/ui/UserCard.tsx +1 -1
  18. package/templates/fate/graphql/client/vite.config.ts +1 -1
  19. package/templates/fate/graphql/package.json +6 -7
  20. package/templates/fate/graphql/pnpm-workspace.yaml +5 -5
  21. package/templates/fate/graphql/server/README.md +3 -4
  22. package/templates/fate/graphql/server/package.json +19 -19
  23. package/templates/fate/graphql/server/scripts/generate-graphql.tsx +7 -1
  24. package/templates/fate/graphql/server/src/graphql/fate.ts +0 -56
  25. package/templates/fate/graphql/server/src/graphql/schema.tsx +22 -3
  26. package/templates/fate/graphql/server/src/graphql/views.ts +0 -43
  27. package/templates/fate/graphql-client/README.md +8 -14
  28. package/templates/fate/graphql-client/package.json +14 -13
  29. package/templates/fate/graphql-client/pages/index.tsx +2 -2
  30. package/templates/fate/graphql-client/pnpm-workspace.yaml +5 -6
  31. package/templates/fate/graphql-client/src/fate/graphql.ts +7 -48
  32. package/templates/fate/graphql-client/src/fate/schema.graphql +48 -0
  33. package/templates/fate/http/client/package.json +13 -13
  34. package/templates/fate/http/client/src/ui/PostCard.tsx +6 -1
  35. package/templates/fate/http/package.json +6 -7
  36. package/templates/fate/http/pnpm-workspace.yaml +5 -5
  37. package/templates/fate/http/server/package.json +7 -7
  38. package/templates/fate/prisma/client/package.json +15 -15
  39. package/templates/fate/prisma/client/src/ui/PostCard.tsx +6 -1
  40. package/templates/fate/prisma/package.json +6 -7
  41. package/templates/fate/prisma/pnpm-workspace.yaml +5 -5
  42. package/templates/fate/prisma/server/package.json +8 -8
  43. package/templates/fate/void/package.json +16 -16
  44. package/templates/fate/void/pnpm-workspace.yaml +5 -6
  45. package/templates/fate/void/src/ui/PostCard.tsx +6 -1
@@ -1,4 +1,3 @@
1
- import { graphqlMutation } from '@nkzw/fate';
2
1
  import { createLiveEventBus } from '@nkzw/fate/server';
3
2
  import { createPrismaSourceAdapter } from '@nkzw/fate/server/prisma';
4
3
  import type { AppContext } from './context.tsx';
@@ -11,38 +10,8 @@ import {
11
10
  Root,
12
11
  tagDataView,
13
12
  userDataView,
14
- type Comment,
15
- type Post,
16
- type User,
17
13
  } from './views.ts';
18
14
 
19
- type FateMutationInput<Input extends Record<string, unknown>> = Input & {
20
- args?: Record<string, unknown>;
21
- };
22
-
23
- export type PostAddInput = FateMutationInput<{
24
- content: string;
25
- title: string;
26
- }>;
27
- export type PostLikeInput = FateMutationInput<{
28
- error?: 'boundary' | 'callSite';
29
- id: string;
30
- slow?: boolean;
31
- }>;
32
- export type PostUnlikeInput = FateMutationInput<{
33
- id: string;
34
- }>;
35
- export type CommentAddInput = FateMutationInput<{
36
- content: string;
37
- postId: string;
38
- }>;
39
- export type CommentDeleteInput = FateMutationInput<{
40
- id: string;
41
- }>;
42
- export type UserUpdateInput = FateMutationInput<{
43
- name: string;
44
- }>;
45
-
46
15
  export const live = createLiveEventBus();
47
16
 
48
17
  export const fate = createPrismaSourceAdapter<AppContext>({
@@ -58,28 +27,3 @@ export const viewsByType = {
58
27
  Tag: tagDataView,
59
28
  User: userDataView,
60
29
  } as const;
61
-
62
- export const fateGraphQL = {
63
- mutations: {
64
- 'comment.add': graphqlMutation<Comment, CommentAddInput, Comment>('Comment', {
65
- field: 'commentAdd',
66
- }),
67
- 'comment.delete': graphqlMutation<Comment, CommentDeleteInput, Comment>('Comment', {
68
- field: 'commentDelete',
69
- }),
70
- 'post.add': graphqlMutation<Post, PostAddInput, Post>('Post', {
71
- field: 'postAdd',
72
- }),
73
- 'post.like': graphqlMutation<Post, PostLikeInput, Post>('Post', {
74
- field: 'postLike',
75
- }),
76
- 'post.unlike': graphqlMutation<Post, PostUnlikeInput, Post>('Post', {
77
- field: 'postUnlike',
78
- }),
79
- 'user.update': graphqlMutation<User, UserUpdateInput, User>('User', {
80
- field: 'userUpdate',
81
- }),
82
- },
83
- } as const;
84
-
85
- export * from './views.ts';
@@ -1,14 +1,33 @@
1
1
  import { writeFileSync } from 'node:fs';
2
2
  import './schemaImportMap.tsx';
3
- import { join } from 'node:path';
4
3
  import { printSchemaWithDirectives } from '@graphql-tools/utils';
4
+ import {
5
+ DirectiveLocation,
6
+ GraphQLBoolean,
7
+ GraphQLDirective,
8
+ GraphQLString,
9
+ specifiedDirectives,
10
+ } from 'graphql';
5
11
  import builder from './builder.tsx';
6
12
 
7
- const schema = builder.toSchema();
13
+ const schema = builder.toSchema({
14
+ directives: [
15
+ ...specifiedDirectives,
16
+ new GraphQLDirective({
17
+ args: { role: { type: GraphQLString }, self: { type: GraphQLBoolean } },
18
+ locations: [
19
+ DirectiveLocation.FIELD_DEFINITION,
20
+ DirectiveLocation.OBJECT,
21
+ DirectiveLocation.INTERFACE,
22
+ ],
23
+ name: 'auth',
24
+ }),
25
+ ],
26
+ });
8
27
 
9
28
  if (process.env.NODE_ENV === 'development') {
10
29
  writeFileSync(
11
- join(process.cwd(), 'src/graphql/schema.graphql'),
30
+ new URL('./schema.graphql', import.meta.url),
12
31
  printSchemaWithDirectives(schema),
13
32
  'utf8',
14
33
  );
@@ -138,49 +138,6 @@ export const eventDataView = dataView<EventItem>('Event')({
138
138
  type: true,
139
139
  });
140
140
 
141
- export type User = Entity<typeof userDataView, 'User'>;
142
- export type Tag = Entity<typeof tagDataView, 'Tag'>;
143
- export type Comment = Entity<
144
- typeof commentDataView,
145
- 'Comment',
146
- {
147
- author: User;
148
- post: Post;
149
- }
150
- >;
151
- export type EventAttendee = Entity<
152
- typeof eventAttendeeDataView,
153
- 'EventAttendee',
154
- {
155
- user: User;
156
- }
157
- >;
158
- export type Post = Entity<
159
- typeof postDataView,
160
- 'Post',
161
- {
162
- author: User;
163
- category: Category | null;
164
- comments: Array<Comment>;
165
- tags: Array<Tag>;
166
- }
167
- >;
168
- export type Category = Entity<
169
- typeof categoryDataView,
170
- 'Category',
171
- {
172
- posts: Array<Post>;
173
- }
174
- >;
175
- export type Event = Entity<
176
- typeof eventDataView,
177
- 'Event',
178
- {
179
- attendees: Array<EventAttendee>;
180
- host: User;
181
- }
182
- >;
183
-
184
141
  export const Root = {
185
142
  categories: list(categoryDataView, { orderBy: { createdAt: 'asc', id: 'asc' } }),
186
143
  commentSearch: {
@@ -34,22 +34,16 @@ VITE_GRAPHQL_URL="https://api.example.com/graphql" vp run build
34
34
 
35
35
  These `VITE_*` values are embedded in the client bundle. Do not put credentials in them. Production builds do not read `.env`.
36
36
 
37
- Then edit `src/fate/graphql.ts`. This file is the mapping layer between your GraphQL schema and _fate_:
37
+ Replace `src/fate/schema.graphql` with your server's schema, then edit `src/fate/graphql.ts`:
38
38
 
39
- - `dataView(...)` describes the fields React components are allowed to select.
40
- - `Root` describes the root GraphQL fields _fate_ can request.
41
- - `fateGraphQL.roots` maps _fate_ root names to GraphQL field names.
42
- - `fateGraphQL.mutations` maps _fate_ mutation names to GraphQL mutation fields.
39
+ - `fateGraphQL.schema` supplies the schema used to generate client types.
40
+ - `fateGraphQL.roots` exposes query fields. Use `field` to map a different name.
41
+ - `fateGraphQL.mutations` maps application mutation names to schema fields.
42
+ - `fateGraphQL.scalars` optionally describes custom scalar types, which default to `unknown`.
43
43
 
44
- The sample assumes your GraphQL server exposes:
44
+ The sample schema includes `viewer`, `posts(first:, after:)`, `postLike(input:)`, `node(id:)`, and `nodes(ids:)`, with Relay-style connections. Replace these with your server's fields and arguments.
45
45
 
46
- - `viewer`
47
- - `posts(first:, after:)`
48
- - `node(id:)` or `nodes(ids:)`
49
- - Relay-style connections with `edges`, `cursor`, `node`, and `pageInfo`
50
- - Entity objects with stable `id` and `__typename`
51
-
52
- Replace the sample `User` and `Post` views with your own schema types.
46
+ After changing the schema or mapping, run `vp run fate:generate`. Client views use `GraphQLEntities` from the generated `.fate/schema.generated.ts`. The schema stays out of the browser bundle.
53
47
 
54
48
  ## Development
55
49
 
@@ -74,7 +68,7 @@ vp run dev
74
68
  Common commands:
75
69
 
76
70
  - `vp run dev` starts the client.
77
- - `vp run fate:generate` refreshes _fate_ client support after changing `src/fate/graphql.ts`.
71
+ - `vp run fate:generate` refreshes _fate_ client support after changing the schema or `src/fate/graphql.ts`.
78
72
  - `vp check --fix` formats, lints, and type-checks the project.
79
73
  - `vp run test:all` verifies the project.
80
74
 
@@ -23,29 +23,30 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@nkzw/fate": "latest",
26
- "@void/react": "^1.1.0",
26
+ "@void/react": "^1.1.12",
27
27
  "fbtee": "^5.0.0",
28
- "graphql-sse": "^2.6.1",
29
- "lucide-react": "^1.34.0",
30
- "react": "^19.3.0",
31
- "react-dom": "^19.3.0",
32
- "react-error-boundary": "^6.1.3",
28
+ "graphql-sse": "^2.6.3",
29
+ "lucide-react": "^1.59.0",
30
+ "react": "^19.3.1",
31
+ "react-dom": "^19.3.1",
32
+ "react-error-boundary": "^6.1.6",
33
33
  "react-fate": "latest",
34
- "void": "^1.1.0"
34
+ "void": "^1.1.12"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@nkzw/eslint-plugin": "^2.0.0",
38
38
  "@nkzw/fbtee-compiler": "^5.0.0",
39
39
  "@nkzw/oxlint-config": "^2.0.1",
40
40
  "@nkzw/vite-plugin-fbtee": "^5.0.0",
41
- "@oxc-node/core": "^0.1.0",
42
- "@swc/core": "^1.16.1",
41
+ "@oxc-node/core": "^0.1.7",
42
+ "@swc/core": "^1.16.18",
43
43
  "@tailwindcss/vite": "^4.3.3",
44
- "@types/node": "^26.4.0",
44
+ "@types/node": "^26.6.5",
45
45
  "@types/react": "^19.3.0",
46
46
  "@types/react-dom": "^19.3.0",
47
- "@vitejs/plugin-react": "^6.1.0",
48
- "oxc-transform-react": "^0.147.0",
47
+ "@vitejs/plugin-react": "^6.1.2",
48
+ "graphql": "^17.0.2",
49
+ "oxc-transform-react": "^0.154.0",
49
50
  "tailwindcss": "^4.3.3",
50
51
  "typescript": "^7.0.2",
51
52
  "vite": "catalog:",
@@ -61,5 +62,5 @@
61
62
  "node": ">=24.0.0",
62
63
  "pnpm": ">=11.0.0"
63
64
  },
64
- "packageManager": "pnpm@11.0.6"
65
+ "packageManager": "pnpm@12.6.0"
65
66
  }
@@ -90,8 +90,8 @@ export default function HomePage() {
90
90
  </h1>
91
91
  <p className="max-w-2xl text-slate-600 dark:text-slate-300">
92
92
  <fbt desc="GraphQL client setup instructions">
93
- Replace the sample views in <code>src/fate/graphql.ts</code> with your schema types and
94
- point <code>VITE_GRAPHQL_URL</code> at your API.
93
+ Replace <code>src/fate/schema.graphql</code> with your server schema and point{' '}
94
+ <code>VITE_GRAPHQL_URL</code> at your API.
95
95
  </fbt>
96
96
  </p>
97
97
  </header>
@@ -3,15 +3,15 @@ packages:
3
3
 
4
4
  allowBuilds:
5
5
  '@swc/core': true
6
- better-sqlite3: true
6
+ better-sqlite3: false
7
7
  esbuild: true
8
8
  sharp: true
9
9
  workerd: true
10
10
 
11
11
  catalog:
12
- vite: npm:@voidzero-dev/vite-plus-core@1.2.0
13
- vite-plus: 1.2.0
14
- vitest: 5.0.4
12
+ vite: npm:@voidzero-dev/vite-plus-core@1.3.0
13
+ vite-plus: 1.3.0
14
+ vitest: 5.0.5
15
15
 
16
16
  minimumReleaseAgeExclude:
17
17
  - '@voidzero-dev/vite-plus-core'
@@ -20,14 +20,13 @@ minimumReleaseAgeExclude:
20
20
  onlyBuiltDependencies:
21
21
  - '@swc/core'
22
22
  - '@tailwindcss/oxide'
23
- - better-sqlite3
24
23
  - esbuild
25
24
  - msgpackr-extract
26
25
  - sharp
27
26
  - workerd
28
27
 
29
28
  overrides:
30
- better-auth: 1.7.7
29
+ better-auth: 1.7.11
31
30
  vite: 'catalog:'
32
31
  vitest: 'catalog:'
33
32
 
@@ -1,52 +1,11 @@
1
- import { graphqlMutation } from '@nkzw/fate';
2
- import { dataView, list, type Entity } from '@nkzw/fate/server';
1
+ import type { GraphQLEntities } from '../../.fate/schema.generated.ts';
2
+ import schema from './schema.graphql?raw';
3
3
 
4
- type GraphQLUser = {
5
- id: string;
6
- name?: string | null;
7
- username?: string | null;
8
- };
9
-
10
- type GraphQLPost = {
11
- author?: GraphQLUser | null;
12
- id: string;
13
- title: string;
14
- };
15
-
16
- export const userDataView = dataView<GraphQLUser>('User')({
17
- id: true,
18
- name: true,
19
- username: true,
20
- });
21
-
22
- export const postDataView = dataView<GraphQLPost>('Post')({
23
- author: userDataView,
24
- id: true,
25
- title: true,
26
- });
27
-
28
- export type User = Entity<typeof userDataView, 'User'>;
29
- export type Post = Entity<
30
- typeof postDataView,
31
- 'Post',
32
- {
33
- author: User | null;
34
- }
35
- >;
36
-
37
- export const Root = {
38
- posts: list(postDataView),
39
- viewer: userDataView,
40
- };
4
+ export type User = GraphQLEntities['User'];
5
+ export type Post = GraphQLEntities['Post'];
41
6
 
42
7
  export const fateGraphQL = {
43
- mutations: {
44
- 'post.like': graphqlMutation<Post, { id: string }, Post>('Post', {
45
- field: 'postLike',
46
- }),
47
- },
48
- roots: {
49
- posts: { field: 'posts' },
50
- viewer: { field: 'viewer' },
51
- },
8
+ mutations: { 'post.like': { entity: 'Post', field: 'postLike' } },
9
+ roots: { posts: {}, viewer: {} },
10
+ schema,
52
11
  } as const;
@@ -0,0 +1,48 @@
1
+ # Replace this sample with the schema exported by your GraphQL server.
2
+ interface Node {
3
+ id: ID!
4
+ }
5
+
6
+ type User implements Node {
7
+ id: ID!
8
+ name: String
9
+ username: String
10
+ }
11
+
12
+ type Post implements Node {
13
+ author: User
14
+ id: ID!
15
+ title: String!
16
+ }
17
+
18
+ type Query {
19
+ node(id: ID!): Node
20
+ nodes(ids: [ID!]!): [Node]!
21
+ posts(first: Int, after: String): PostConnection!
22
+ viewer: User
23
+ }
24
+
25
+ type PostConnection {
26
+ edges: [PostEdge!]!
27
+ pageInfo: PageInfo!
28
+ }
29
+
30
+ type PostEdge {
31
+ cursor: String!
32
+ node: Post!
33
+ }
34
+
35
+ type PageInfo {
36
+ startCursor: String
37
+ endCursor: String
38
+ hasNextPage: Boolean!
39
+ hasPreviousPage: Boolean!
40
+ }
41
+
42
+ type Mutation {
43
+ postLike(input: PostLikeInput!): Post
44
+ }
45
+
46
+ input PostLikeInput {
47
+ id: ID!
48
+ }
@@ -21,33 +21,33 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@app/server": "workspace:*",
24
- "@hono/node-server": "^2.1.1",
24
+ "@hono/node-server": "^2.1.5",
25
25
  "@nkzw/core": "^1.3.1",
26
26
  "@nkzw/define-env": "^1.1.0",
27
27
  "@nkzw/stack": "^2.3.2",
28
- "@radix-ui/react-slot": "^1.3.3",
29
- "@void/react": "^1.1.0",
30
- "better-auth": "^1.7.7",
28
+ "@radix-ui/react-slot": "^1.5.0",
29
+ "@void/react": "^1.1.12",
30
+ "better-auth": "^1.7.11",
31
31
  "class-variance-authority": "^0.7.1",
32
32
  "clsx": "^2.1.1",
33
33
  "fbtee": "^5.0.0",
34
- "lucide-react": "^1.34.0",
35
- "react": "^19.3.0",
36
- "react-dom": "^19.3.0",
37
- "react-error-boundary": "^6.1.3",
34
+ "lucide-react": "^1.59.0",
35
+ "react": "^19.3.1",
36
+ "react-dom": "^19.3.1",
37
+ "react-error-boundary": "^6.1.6",
38
38
  "react-fate": "latest",
39
- "tailwind-merge": "^3.6.0",
40
- "void": "^1.1.0"
39
+ "tailwind-merge": "^3.7.0",
40
+ "void": "^1.1.12"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@nkzw/fbtee-compiler": "^5.0.0",
44
44
  "@nkzw/vite-plugin-fbtee": "^5.0.0",
45
45
  "@tailwindcss/vite": "^4.3.3",
46
- "@types/node": "^26.4.0",
46
+ "@types/node": "^26.6.5",
47
47
  "@types/react": "^19.3.0",
48
48
  "@types/react-dom": "^19.3.0",
49
- "@vitejs/plugin-react": "^6.1.0",
50
- "oxc-transform-react": "^0.147.0",
49
+ "@vitejs/plugin-react": "^6.1.2",
50
+ "oxc-transform-react": "^0.154.0",
51
51
  "tailwindcss": "^4.3.3",
52
52
  "vite": "catalog:",
53
53
  "vite-plus": "catalog:"
@@ -74,7 +74,11 @@ const CommentInput = ({
74
74
  post,
75
75
  }: {
76
76
  error?: unknown;
77
- post: { commentCount: number; id: string };
77
+ post: {
78
+ commentCount: number;
79
+ comments: Deferred<{ items: ReadonlyArray<{ node: ViewRef<'Comment'> }> }>;
80
+ id: string;
81
+ };
78
82
  }) => {
79
83
  const fate = useFateClient();
80
84
  const { data: session } = AuthClient.useSession();
@@ -90,6 +94,7 @@ const CommentInput = ({
90
94
 
91
95
  const result = await fate.mutations.comment.add({
92
96
  input: { content, postId: post.id },
97
+ insert: { into: post.comments, position: 'after' },
93
98
  optimistic: {
94
99
  author: user
95
100
  ? {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "type": "module",
12
12
  "scripts": {
13
- "build": "dotenv -e server/.env -- vp run --filter '@app/client' --filter '@app/server' build",
13
+ "build": "dotenv run -f server/.env -- vp run --filter '@app/client' --filter '@app/server' build",
14
14
  "dev": "npm-run-all --parallel dev:client dev:server",
15
15
  "dev:client": "cd client && vp dev",
16
16
  "dev:server": "cd server && vp run dev",
@@ -23,11 +23,10 @@
23
23
  "@app/server": "workspace:*",
24
24
  "@nkzw/eslint-plugin": "^2.0.0",
25
25
  "@nkzw/oxlint-config": "^2.0.1",
26
- "@oxc-node/core": "^0.1.0",
27
- "@swc/core": "^1.16.1",
28
- "@types/node": "^26.4.0",
29
- "dotenv": "^17.4.2",
30
- "dotenv-cli": "^11.0.0",
26
+ "@oxc-node/core": "^0.1.7",
27
+ "@swc/core": "^1.16.18",
28
+ "@types/node": "^26.6.5",
29
+ "dotenv": "^18.0.8",
31
30
  "npm-run-all2": "^9.0.3",
32
31
  "typescript": "^7.0.2",
33
32
  "vite": "catalog:",
@@ -38,5 +37,5 @@
38
37
  "node": ">=24.0.0",
39
38
  "pnpm": ">=11.0.0"
40
39
  },
41
- "packageManager": "pnpm@11.0.6"
40
+ "packageManager": "pnpm@12.6.0"
42
41
  }
@@ -4,16 +4,16 @@ packages:
4
4
 
5
5
  allowBuilds:
6
6
  '@swc/core': true
7
- better-sqlite3: true
7
+ better-sqlite3: false
8
8
  drizzle-kit: true
9
9
  esbuild: true
10
10
  sharp: true
11
11
  workerd: true
12
12
 
13
13
  catalog:
14
- vite: npm:@voidzero-dev/vite-plus-core@1.2.0
15
- vite-plus: 1.2.0
16
- vitest: 5.0.4
14
+ vite: npm:@voidzero-dev/vite-plus-core@1.3.0
15
+ vite-plus: 1.3.0
16
+ vitest: 5.0.5
17
17
 
18
18
  minimumReleaseAgeExclude:
19
19
  - '@voidzero-dev/vite-plus-core'
@@ -28,7 +28,7 @@ onlyBuiltDependencies:
28
28
  - unrs-resolver
29
29
 
30
30
  overrides:
31
- better-auth: 1.7.7
31
+ better-auth: 1.7.11
32
32
  drizzle-orm: 0.45.4
33
33
  kysely: 0.28.17
34
34
  vite: 'catalog:'
@@ -20,20 +20,20 @@
20
20
  "drizzle": "drizzle-kit --config drizzle.config.ts"
21
21
  },
22
22
  "dependencies": {
23
- "@hono/node-server": "^2.1.1",
23
+ "@hono/node-server": "^2.1.5",
24
24
  "@nkzw/core": "^1.3.1",
25
25
  "@nkzw/define-env": "^1.1.0",
26
26
  "@nkzw/fate": "latest",
27
- "better-auth": "^1.7.7",
27
+ "better-auth": "^1.7.11",
28
28
  "drizzle-orm": "^0.45.4",
29
- "hono": "^4.13.5",
30
- "pg": "^8.23.1",
31
- "zod": "^4.4.3"
29
+ "hono": "^4.13.13",
30
+ "pg": "8.23.1",
31
+ "zod": "^4.6.7"
32
32
  },
33
33
  "devDependencies": {
34
- "@types/node": "^26.4.0",
34
+ "@types/node": "^26.6.5",
35
35
  "@types/pg": "^8.23.1",
36
- "drizzle-kit": "^0.31.10",
36
+ "drizzle-kit": "^0.31.11",
37
37
  "nodemon": "^3.1.14",
38
38
  "vite-plus": "catalog:"
39
39
  },
@@ -21,35 +21,35 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@app/server": "workspace:*",
24
- "@hono/node-server": "^2.1.1",
24
+ "@hono/node-server": "^2.1.5",
25
25
  "@nkzw/core": "^1.3.1",
26
26
  "@nkzw/define-env": "^1.1.0",
27
27
  "@nkzw/stack": "^2.3.2",
28
- "@radix-ui/react-slot": "^1.3.3",
29
- "@trpc/client": "^11.18.0",
30
- "@void/react": "^1.1.0",
31
- "better-auth": "^1.7.7",
28
+ "@radix-ui/react-slot": "^1.5.0",
29
+ "@trpc/client": "^11.19.0",
30
+ "@void/react": "^1.1.12",
31
+ "better-auth": "^1.7.11",
32
32
  "class-variance-authority": "^0.7.1",
33
33
  "clsx": "^2.1.1",
34
34
  "fbtee": "^5.0.0",
35
- "lucide-react": "^1.34.0",
36
- "react": "^19.3.0",
37
- "react-dom": "^19.3.0",
38
- "react-error-boundary": "^6.1.3",
35
+ "lucide-react": "^1.59.0",
36
+ "react": "^19.3.1",
37
+ "react-dom": "^19.3.1",
38
+ "react-error-boundary": "^6.1.6",
39
39
  "react-fate": "latest",
40
- "tailwind-merge": "^3.6.0",
41
- "void": "^1.1.0"
40
+ "tailwind-merge": "^3.7.0",
41
+ "void": "^1.1.12"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@nkzw/fbtee-compiler": "^5.0.0",
45
45
  "@nkzw/vite-plugin-fbtee": "^5.0.0",
46
46
  "@tailwindcss/vite": "^4.3.3",
47
- "@trpc/server": "^11.18.0",
48
- "@types/node": "^26.4.0",
47
+ "@trpc/server": "^11.19.0",
48
+ "@types/node": "^26.6.5",
49
49
  "@types/react": "^19.3.0",
50
50
  "@types/react-dom": "^19.3.0",
51
- "@vitejs/plugin-react": "^6.1.0",
52
- "oxc-transform-react": "^0.147.0",
51
+ "@vitejs/plugin-react": "^6.1.2",
52
+ "oxc-transform-react": "^0.154.0",
53
53
  "tailwindcss": "^4.3.3",
54
54
  "vite": "catalog:",
55
55
  "vite-plus": "catalog:"
@@ -74,7 +74,11 @@ const CommentInput = ({
74
74
  post,
75
75
  }: {
76
76
  error?: unknown;
77
- post: { commentCount: number; id: string };
77
+ post: {
78
+ commentCount: number;
79
+ comments: Deferred<{ items: ReadonlyArray<{ node: ViewRef<'Comment'> }> }>;
80
+ id: string;
81
+ };
78
82
  }) => {
79
83
  const fate = useFateClient();
80
84
  const { data: session } = AuthClient.useSession();
@@ -90,6 +94,7 @@ const CommentInput = ({
90
94
 
91
95
  const result = await fate.mutations.comment.add({
92
96
  input: { content, postId: post.id },
97
+ insert: { into: post.comments, position: 'after' },
93
98
  optimistic: {
94
99
  author: user
95
100
  ? {