create-fate 1.16.1 → 2.0.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-fate",
3
- "version": "1.16.1",
3
+ "version": "2.0.1",
4
4
  "description": "Create a new fate app.",
5
5
  "homepage": "https://github.com/nkzw-tech/fate",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@clack/prompts": "^1.8.1"
25
+ "@clack/prompts": "^1.9.0"
26
26
  },
27
27
  "engines": {
28
28
  "node": ">=24.0.0"
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clientSchema,
3
- computed,
3
+ memo,
4
4
  createClient,
5
5
  dataView,
6
6
  field,
@@ -17,7 +17,7 @@ type WorkspaceData = { id: string; tasks: Array<TaskData> };
17
17
  const task = dataView<TaskData>('Task')({ done: true, id: true, title: true });
18
18
  const workspace = dataView<WorkspaceData>('Workspace')({
19
19
  id: true,
20
- progress: computed({
20
+ progress: memo({
21
21
  resolve: (_item: WorkspaceData, { done = [] }) =>
22
22
  `${done.filter(Boolean).length} of ${done.length} complete`,
23
23
  select: { done: field('tasks.done') },
@@ -107,7 +107,7 @@ Common commands from the project root:
107
107
 
108
108
  ## Translations
109
109
 
110
- The React app uses fbtee 5 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
110
+ The React app uses fbtee 6 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
111
111
 
112
112
  - Wrap UI text in `<fbt desc="Translator context">Text</fbt>`; use `fbs('Text', 'Translator context')` from `fbtee` for string attributes such as placeholders.
113
113
  - Run `vp run fbtee:collect` in `client/` to extract strings, then `vp run fbtee:prepare` to update the editable German and Japanese files in `translations/`.
@@ -32,7 +32,7 @@
32
32
  "better-auth": "^1.7.14",
33
33
  "class-variance-authority": "^0.7.1",
34
34
  "clsx": "^2.1.1",
35
- "fbtee": "^5.0.0",
35
+ "fbtee": "^6.0.0",
36
36
  "lucide-react": "^1.61.0",
37
37
  "react": "^19.3.1",
38
38
  "react-dom": "^19.3.1",
@@ -42,8 +42,8 @@
42
42
  "void": "^1.7.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@nkzw/fbtee-compiler": "^5.0.0",
46
- "@nkzw/vite-plugin-fbtee": "^5.0.0",
45
+ "@nkzw/fbtee-compiler": "^6.0.0",
46
+ "@nkzw/vite-plugin-fbtee": "^6.0.0",
47
47
  "@tailwindcss/vite": "^4.3.3",
48
48
  "@trpc/server": "^11.19.0",
49
49
  "@types/node": "^26.6.5",
@@ -1,4 +1,4 @@
1
- import { computed, count, dataView, list, type Entity } from '@nkzw/fate/server';
1
+ import { memo, count, dataView, list, type Entity } from '@nkzw/fate/server';
2
2
  import type { CommentRow, PostRow, UserRow } from '../drizzle/schema.ts';
3
3
 
4
4
  export type CommentItem = CommentRow & {
@@ -19,7 +19,7 @@ export const userDataView = dataView<UserRow>('User')({
19
19
 
20
20
  const basePost = {
21
21
  author: userDataView,
22
- commentCount: computed<PostItem, number>({
22
+ commentCount: memo<PostItem, number>({
23
23
  resolve: (_item, deps) => (deps.count as number) ?? 0,
24
24
  select: {
25
25
  count: count('comments'),
@@ -133,7 +133,7 @@ Common commands from the project root:
133
133
 
134
134
  ## Translations
135
135
 
136
- The React app uses fbtee 5 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
136
+ The React app uses fbtee 6 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
137
137
 
138
138
  - Wrap UI text in `<fbt desc="Translator context">Text</fbt>`; use `fbs('Text', 'Translator context')` from `fbtee` for string attributes such as placeholders.
139
139
  - Run `vp run fbtee:collect` in `client/` to extract strings, then `vp run fbtee:prepare` to update the editable German and Japanese files in `translations/`.
@@ -31,7 +31,7 @@
31
31
  "better-auth": "^1.7.14",
32
32
  "class-variance-authority": "^0.7.1",
33
33
  "clsx": "^2.1.1",
34
- "fbtee": "^5.0.0",
34
+ "fbtee": "^6.0.0",
35
35
  "graphql-sse": "^2.6.3",
36
36
  "lucide-react": "^1.61.0",
37
37
  "react": "^19.3.1",
@@ -42,8 +42,8 @@
42
42
  "void": "^1.7.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@nkzw/fbtee-compiler": "^5.0.0",
46
- "@nkzw/vite-plugin-fbtee": "^5.0.0",
45
+ "@nkzw/fbtee-compiler": "^6.0.0",
46
+ "@nkzw/vite-plugin-fbtee": "^6.0.0",
47
47
  "@tailwindcss/vite": "^4.3.3",
48
48
  "@types/node": "^26.6.5",
49
49
  "@types/react": "^19.3.0",
@@ -1,4 +1,4 @@
1
- import { computed, count, dataView, field, list, type Entity } from '@nkzw/fate/server';
1
+ import { memo, count, dataView, field, list, type Entity } from '@nkzw/fate/server';
2
2
  import type {
3
3
  Category as PrismaCategory,
4
4
  Comment as PrismaComment,
@@ -39,7 +39,7 @@ export type EventItem = PrismaEvent & {
39
39
  };
40
40
 
41
41
  export const userDataView = dataView<PrismaUser>('User')({
42
- email: computed<PrismaUser, string | null, AppContext>({
42
+ email: memo<PrismaUser, string | null, AppContext>({
43
43
  authorize: ({ id }, context) => context?.sessionUser?.id === id,
44
44
  resolve: (_item, deps) => (deps.email as string | null) ?? null,
45
45
  select: {
@@ -65,7 +65,7 @@ export const categorySummaryDataView = dataView<PrismaCategory>('Category')({
65
65
  const basePost = {
66
66
  author: userDataView,
67
67
  category: categorySummaryDataView,
68
- commentCount: computed<PostItem, number>({
68
+ commentCount: memo<PostItem, number>({
69
69
  resolve: (_item, deps) => (deps.count as number) ?? 0,
70
70
  select: {
71
71
  count: count('comments'),
@@ -99,7 +99,7 @@ export const categoryDataView = dataView<CategoryItem>('Category')({
99
99
  description: true,
100
100
  id: true,
101
101
  name: true,
102
- postCount: computed<CategoryItem, number>({
102
+ postCount: memo<CategoryItem, number>({
103
103
  resolve: (_item, deps) => (deps.count as number) ?? 0,
104
104
  select: {
105
105
  count: count('posts'),
@@ -117,7 +117,7 @@ export const eventAttendeeDataView = dataView<EventAttendeeItem>('EventAttendee'
117
117
 
118
118
  export const eventDataView = dataView<EventItem>('Event')({
119
119
  attendees: list(eventAttendeeDataView, { orderBy: { createdAt: 'asc', id: 'asc' } }),
120
- attendingCount: computed<EventItem, number>({
120
+ attendingCount: memo<EventItem, number>({
121
121
  resolve: (_item, deps) => (deps.count as number) ?? 0,
122
122
  select: {
123
123
  count: count('attendees', {
@@ -74,7 +74,7 @@ Common commands:
74
74
 
75
75
  ## Translations
76
76
 
77
- The React app uses fbtee 5 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
77
+ The React app uses fbtee 6 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
78
78
 
79
79
  - Wrap UI text in `<fbt desc="Translator context">Text</fbt>`; use `fbs('Text', 'Translator context')` from `fbtee` for string attributes such as placeholders.
80
80
  - Run `vp run fbtee:collect` in the app root to extract strings, then `vp run fbtee:prepare` to update the editable German and Japanese files in `translations/`.
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@nkzw/fate": "latest",
26
26
  "@void/react": "^1.7.0",
27
- "fbtee": "^5.0.0",
27
+ "fbtee": "^6.0.0",
28
28
  "graphql-sse": "^2.6.3",
29
29
  "lucide-react": "^1.61.0",
30
30
  "react": "^19.3.1",
@@ -35,9 +35,9 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@nkzw/eslint-plugin": "^2.0.0",
38
- "@nkzw/fbtee-compiler": "^5.0.0",
38
+ "@nkzw/fbtee-compiler": "^6.0.0",
39
39
  "@nkzw/oxlint-config": "^2.0.1",
40
- "@nkzw/vite-plugin-fbtee": "^5.0.0",
40
+ "@nkzw/vite-plugin-fbtee": "^6.0.0",
41
41
  "@oxc-node/core": "^1.0.1",
42
42
  "@swc/core": "^1.16.20",
43
43
  "@tailwindcss/vite": "^4.3.3",
@@ -107,7 +107,7 @@ Common commands from the project root:
107
107
 
108
108
  ## Translations
109
109
 
110
- The React app uses fbtee 5 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
110
+ The React app uses fbtee 6 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
111
111
 
112
112
  - Wrap UI text in `<fbt desc="Translator context">Text</fbt>`; use `fbs('Text', 'Translator context')` from `fbtee` for string attributes such as placeholders.
113
113
  - Run `vp run fbtee:collect` in `client/` to extract strings, then `vp run fbtee:prepare` to update the editable German and Japanese files in `translations/`.
@@ -31,7 +31,7 @@
31
31
  "better-auth": "^1.7.14",
32
32
  "class-variance-authority": "^0.7.1",
33
33
  "clsx": "^2.1.1",
34
- "fbtee": "^5.0.0",
34
+ "fbtee": "^6.0.0",
35
35
  "lucide-react": "^1.61.0",
36
36
  "react": "^19.3.1",
37
37
  "react-dom": "^19.3.1",
@@ -41,8 +41,8 @@
41
41
  "void": "^1.7.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@nkzw/fbtee-compiler": "^5.0.0",
45
- "@nkzw/vite-plugin-fbtee": "^5.0.0",
44
+ "@nkzw/fbtee-compiler": "^6.0.0",
45
+ "@nkzw/vite-plugin-fbtee": "^6.0.0",
46
46
  "@tailwindcss/vite": "^4.3.3",
47
47
  "@types/node": "^26.6.5",
48
48
  "@types/react": "^19.3.0",
@@ -1,4 +1,4 @@
1
- import { computed, count, dataView, list, type Entity } from '@nkzw/fate/server';
1
+ import { memo, count, dataView, list, type Entity } from '@nkzw/fate/server';
2
2
  import type { CommentRow, PostRow, UserRow } from '../drizzle/schema.ts';
3
3
 
4
4
  export type CommentItem = CommentRow & {
@@ -19,7 +19,7 @@ export const userDataView = dataView<UserRow>('User')({
19
19
 
20
20
  const basePost = {
21
21
  author: userDataView,
22
- commentCount: computed<PostItem, number>({
22
+ commentCount: memo<PostItem, number>({
23
23
  resolve: (_item, deps) => (deps.count as number) ?? 0,
24
24
  select: {
25
25
  count: count('comments'),
@@ -121,7 +121,7 @@ Common commands from the project root:
121
121
 
122
122
  ## Translations
123
123
 
124
- The React app uses fbtee 5 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
124
+ The React app uses fbtee 6 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
125
125
 
126
126
  - Wrap UI text in `<fbt desc="Translator context">Text</fbt>`; use `fbs('Text', 'Translator context')` from `fbtee` for string attributes such as placeholders.
127
127
  - Run `vp run fbtee:collect` in `client/` to extract strings, then `vp run fbtee:prepare` to update the editable German and Japanese files in `translations/`.
@@ -32,7 +32,7 @@
32
32
  "better-auth": "^1.7.14",
33
33
  "class-variance-authority": "^0.7.1",
34
34
  "clsx": "^2.1.1",
35
- "fbtee": "^5.0.0",
35
+ "fbtee": "^6.0.0",
36
36
  "lucide-react": "^1.61.0",
37
37
  "react": "^19.3.1",
38
38
  "react-dom": "^19.3.1",
@@ -42,8 +42,8 @@
42
42
  "void": "^1.7.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@nkzw/fbtee-compiler": "^5.0.0",
46
- "@nkzw/vite-plugin-fbtee": "^5.0.0",
45
+ "@nkzw/fbtee-compiler": "^6.0.0",
46
+ "@nkzw/vite-plugin-fbtee": "^6.0.0",
47
47
  "@tailwindcss/vite": "^4.3.3",
48
48
  "@trpc/server": "^11.19.0",
49
49
  "@types/node": "^26.6.5",
@@ -68,7 +68,7 @@ After changing the database schema or auth configuration, run `vp run db:generat
68
68
 
69
69
  ## Translations
70
70
 
71
- The React app uses fbtee 5 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
71
+ The React app uses fbtee 6 with its native Oxc Vite plugin and CLI. Setup and builds generate the runtime translation files automatically.
72
72
 
73
73
  - Wrap UI text in `<fbt desc="Translator context">Text</fbt>`; use `fbs('Text', 'Translator context')` from `fbtee` for string attributes such as placeholders.
74
74
  - Run `vp run fbtee:collect` in the app root to extract strings, then `vp run fbtee:prepare` to update the editable German and Japanese files in `translations/`.
@@ -34,7 +34,7 @@
34
34
  "class-variance-authority": "^0.7.1",
35
35
  "clsx": "^2.1.1",
36
36
  "drizzle-orm": "^0.45.4",
37
- "fbtee": "^5.0.0",
37
+ "fbtee": "^6.0.0",
38
38
  "lucide-react": "^1.61.0",
39
39
  "react": "^19.3.1",
40
40
  "react-dom": "^19.3.1",
@@ -48,9 +48,9 @@
48
48
  "devDependencies": {
49
49
  "@cloudflare/workers-types": "5.20261103.1",
50
50
  "@nkzw/eslint-plugin": "^2.0.0",
51
- "@nkzw/fbtee-compiler": "^5.0.0",
51
+ "@nkzw/fbtee-compiler": "^6.0.0",
52
52
  "@nkzw/oxlint-config": "^2.0.1",
53
- "@nkzw/vite-plugin-fbtee": "^5.0.0",
53
+ "@nkzw/vite-plugin-fbtee": "^6.0.0",
54
54
  "@oxc-node/core": "^1.0.1",
55
55
  "@tailwindcss/vite": "^4.3.3",
56
56
  "@types/node": "^26.6.5",
@@ -1,4 +1,4 @@
1
- import { computed, count, dataView, field, list, type Entity } from '@nkzw/fate/server';
1
+ import { memo, count, dataView, field, list, type Entity } from '@nkzw/fate/server';
2
2
  import type {
3
3
  CategoryItem,
4
4
  CommentItem,
@@ -10,7 +10,7 @@ import type { CategoryRow, TagRow, UserRow } from '../../db/schema.ts';
10
10
  import type { AppContext } from './context.ts';
11
11
 
12
12
  export const userDataView = dataView<UserRow>('User')({
13
- email: computed<UserRow, string | null, AppContext>({
13
+ email: memo<UserRow, string | null, AppContext>({
14
14
  authorize: ({ id }, context) => context?.sessionUser?.id === id,
15
15
  resolve: (_item, deps) => (deps.email as string | null) ?? null,
16
16
  select: {
@@ -36,7 +36,7 @@ export const categorySummaryDataView = dataView<CategoryRow>('Category')({
36
36
  const basePost = {
37
37
  author: userDataView,
38
38
  category: categorySummaryDataView,
39
- commentCount: computed<PostItem, number>({
39
+ commentCount: memo<PostItem, number>({
40
40
  resolve: (_item, deps) => (deps.count as number) ?? 0,
41
41
  select: {
42
42
  count: count('comments'),
@@ -70,7 +70,7 @@ export const categoryDataView = dataView<CategoryItem>('Category')({
70
70
  description: true,
71
71
  id: true,
72
72
  name: true,
73
- postCount: computed<CategoryItem, number>({
73
+ postCount: memo<CategoryItem, number>({
74
74
  resolve: (_item, deps) => (deps.count as number) ?? 0,
75
75
  select: {
76
76
  count: count('posts'),
@@ -88,7 +88,7 @@ export const eventAttendeeDataView = dataView<EventAttendeeItem>('EventAttendee'
88
88
 
89
89
  export const eventDataView = dataView<EventItem>('Event')({
90
90
  attendees: list(eventAttendeeDataView, { orderBy: { createdAt: 'asc', id: 'asc' } }),
91
- attendingCount: computed<EventItem, number>({
91
+ attendingCount: memo<EventItem, number>({
92
92
  resolve: (_item, deps) => (deps.count as number) ?? 0,
93
93
  select: {
94
94
  count: count('attendees', {