create-fate 1.7.6 → 1.8.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 (51) hide show
  1. package/bin/create-fate.mjs +40 -6
  2. package/package.json +1 -1
  3. package/templates/fate/_shared/vue-app/package.json +3 -2
  4. package/templates/fate/_shared/vue-app/src/App.css +1 -6
  5. package/templates/fate/_shared/vue-app/vite.config.ts +12 -1
  6. package/templates/fate/drizzle/AGENTS.md +1 -1
  7. package/templates/fate/drizzle/_gitignore +1 -0
  8. package/templates/fate/drizzle/client/package.json +2 -2
  9. package/templates/fate/drizzle/client/pages/layout.tsx +2 -2
  10. package/templates/fate/drizzle/client/src/App.css +1 -6
  11. package/templates/fate/drizzle/pnpm-workspace.yaml +4 -4
  12. package/templates/fate/drizzle/server/package.json +1 -1
  13. package/templates/fate/drizzle/server/src/drizzle/schema.ts +18 -2
  14. package/templates/fate/graphql/AGENTS.md +1 -1
  15. package/templates/fate/graphql/_gitignore +1 -0
  16. package/templates/fate/graphql/client/package.json +2 -2
  17. package/templates/fate/graphql/client/pages/layout.tsx +2 -2
  18. package/templates/fate/graphql/client/src/App.css +1 -6
  19. package/templates/fate/graphql/pnpm-workspace.yaml +3 -3
  20. package/templates/fate/graphql/server/src/prisma/schema.prisma +23 -11
  21. package/templates/fate/graphql-client/AGENTS.md +20 -0
  22. package/templates/fate/graphql-client/_gitignore +1 -0
  23. package/templates/fate/graphql-client/package.json +2 -2
  24. package/templates/fate/graphql-client/pnpm-workspace.yaml +3 -3
  25. package/templates/fate/graphql-client/src/App.css +1 -7
  26. package/templates/fate/graphql-client/vite.config.ts +1 -11
  27. package/templates/fate/http/AGENTS.md +1 -1
  28. package/templates/fate/http/_gitignore +1 -0
  29. package/templates/fate/http/client/package.json +2 -2
  30. package/templates/fate/http/client/pages/layout.tsx +2 -2
  31. package/templates/fate/http/client/src/App.css +1 -6
  32. package/templates/fate/http/pnpm-workspace.yaml +4 -4
  33. package/templates/fate/http/server/package.json +1 -1
  34. package/templates/fate/http/server/src/drizzle/schema.ts +18 -2
  35. package/templates/fate/prisma/AGENTS.md +1 -1
  36. package/templates/fate/prisma/_gitignore +1 -0
  37. package/templates/fate/prisma/client/package.json +2 -2
  38. package/templates/fate/prisma/client/pages/layout.tsx +2 -2
  39. package/templates/fate/prisma/client/src/App.css +1 -6
  40. package/templates/fate/prisma/pnpm-workspace.yaml +3 -3
  41. package/templates/fate/prisma/server/src/prisma/schema.prisma +23 -11
  42. package/templates/fate/void/AGENTS.md +23 -0
  43. package/templates/fate/void/_gitignore +1 -0
  44. package/templates/fate/void/db/migrations/20261015035853_better_auth_accounts.sql +3 -0
  45. package/templates/fate/void/db/migrations/meta/20261015035853_snapshot.json +918 -0
  46. package/templates/fate/void/db/migrations/meta/_journal.json +7 -0
  47. package/templates/fate/void/db/schema.ts +20 -3
  48. package/templates/fate/void/package.json +4 -4
  49. package/templates/fate/void/pnpm-workspace.yaml +5 -4
  50. package/templates/fate/void/src/App.css +1 -6
  51. package/templates/fate/void/vite.config.ts +0 -7
@@ -11,9 +11,9 @@ allowBuilds:
11
11
  workerd: true
12
12
 
13
13
  catalog:
14
- vite: npm:@voidzero-dev/vite-plus-core@1.0.0
15
- vite-plus: 1.0.0
16
- vitest: 5.0.2
14
+ vite: npm:@voidzero-dev/vite-plus-core@1.2.0
15
+ vite-plus: 1.2.0
16
+ vitest: 5.0.4
17
17
 
18
18
  minimumReleaseAgeExclude:
19
19
  - '@voidzero-dev/vite-plus-core'
@@ -29,7 +29,7 @@ onlyBuiltDependencies:
29
29
 
30
30
  overrides:
31
31
  better-auth: 1.7.7
32
- drizzle-orm: 0.45.3
32
+ drizzle-orm: 0.45.4
33
33
  kysely: 0.28.17
34
34
  vite: 'catalog:'
35
35
  vitest: 'catalog:'
@@ -25,7 +25,7 @@
25
25
  "@nkzw/define-env": "^1.1.0",
26
26
  "@nkzw/fate": "latest",
27
27
  "better-auth": "^1.7.7",
28
- "drizzle-orm": "^0.45.3",
28
+ "drizzle-orm": "^0.45.4",
29
29
  "hono": "^4.13.5",
30
30
  "pg": "^8.23.1",
31
31
  "zod": "^4.4.3"
@@ -46,6 +46,7 @@ export const session = pgTable(
46
46
  createdAt: timestamp({ mode: 'date' }).notNull().defaultNow(),
47
47
  expiresAt: timestamp({ mode: 'date' }).notNull(),
48
48
  id: idColumn().primaryKey(),
49
+ impersonatedBy: text(),
49
50
  ipAddress: text(),
50
51
  token: text().notNull(),
51
52
  updatedAt: timestamp({ mode: 'date' }).notNull().defaultNow(),
@@ -66,7 +67,6 @@ export const account = pgTable(
66
67
  createdAt: timestamp({ mode: 'date' }).notNull().defaultNow(),
67
68
  id: idColumn().primaryKey(),
68
69
  idToken: text(),
69
- issuer: text().notNull(),
70
70
  password: text(),
71
71
  providerId: text().notNull(),
72
72
  refreshToken: text(),
@@ -77,7 +77,22 @@ export const account = pgTable(
77
77
  .notNull()
78
78
  .references(() => user.id, { onDelete: 'cascade' }),
79
79
  },
80
- (table) => [uniqueIndex('account_issuer_accountId_key').on(table.issuer, table.accountId)],
80
+ (table) => [
81
+ uniqueIndex('account_providerId_accountId_key').on(table.providerId, table.accountId),
82
+ ],
83
+ );
84
+
85
+ export const verification = pgTable(
86
+ 'verification',
87
+ {
88
+ createdAt: timestamp({ mode: 'date' }).notNull().defaultNow(),
89
+ expiresAt: timestamp({ mode: 'date' }).notNull(),
90
+ id: idColumn().primaryKey(),
91
+ identifier: text().notNull(),
92
+ updatedAt: timestamp({ mode: 'date' }).notNull().defaultNow(),
93
+ value: text().notNull(),
94
+ },
95
+ (table) => [index('verification_identifier_idx').on(table.identifier)],
81
96
  );
82
97
 
83
98
  export const post = pgTable(
@@ -164,6 +179,7 @@ const schema = {
164
179
  sessionRelations,
165
180
  user,
166
181
  userRelations,
182
+ verification,
167
183
  };
168
184
 
169
185
  export default schema;
@@ -29,7 +29,7 @@ This guidance is for agents working in projects bootstrapped from the fate templ
29
29
  - **fate client support** fate's local client support files are maintained by the Vite/fate tooling. Do not manually edit `.fate` files; make the proper schema changes on the server and run `pnpm fate:generate` when working outside Vite dev.
30
30
  - **Library Versions:** This repository uses the most recent releases of React, fate, Vite, tRPC, and more. You might not know about the new releases yet, please don't get confused. The versions you see are real, and there are no feature or version mismatches. You can search the internet for more information about them.
31
31
 
32
- Full documentation can be found on the filesystem at `./client/node_modules/react-fate/README.md` or online at [fate.technology](https://fate.technology/).
32
+ Before working on fate, read only the relevant Markdown docs in `client/node_modules/react-fate/docs/`. Start with `index.md` to find guides, integrations, and API references. The docs match the installed package version. Online documentation is at [fate.technology](https://fate.technology/).
33
33
 
34
34
  ## Review Checklist for Agents
35
35
 
@@ -1,6 +1,7 @@
1
1
  .fate/
2
2
  **/.fate/
3
3
  .void/
4
+ .wrangler/
4
5
  **/.void/
5
6
  .eslintcache
6
7
  .pnpm-debug.log
@@ -27,7 +27,7 @@
27
27
  "@nkzw/stack": "^2.3.2",
28
28
  "@radix-ui/react-slot": "^1.3.3",
29
29
  "@trpc/client": "^11.18.0",
30
- "@void/react": "^0.24.0",
30
+ "@void/react": "^1.1.0",
31
31
  "better-auth": "^1.7.7",
32
32
  "class-variance-authority": "^0.7.1",
33
33
  "clsx": "^2.1.1",
@@ -38,7 +38,7 @@
38
38
  "react-error-boundary": "^6.1.3",
39
39
  "react-fate": "latest",
40
40
  "tailwind-merge": "^3.6.0",
41
- "void": "^0.24.0"
41
+ "void": "^1.1.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@nkzw/fbtee-compiler": "^5.0.0",
@@ -23,7 +23,7 @@ const Thinking = () => (
23
23
  );
24
24
 
25
25
  export default function Layout({ children }: { children: ReactNode }) {
26
- const { data: session } = AuthClient.useSession();
26
+ const { data: session, isPending } = AuthClient.useSession();
27
27
  const userId = session?.user.id;
28
28
 
29
29
  const fate = useMemo(
@@ -48,7 +48,7 @@ export default function Layout({ children }: { children: ReactNode }) {
48
48
  <div className="min-h-screen bg-background text-foreground">
49
49
  <div className="min-h-screen bg-[radial-gradient(circle_at_20%_20%,rgba(59,130,246,0.08),transparent_35%),radial-gradient(circle_at_80%_0,rgba(99,102,241,0.08),transparent_28%)]">
50
50
  <Header />
51
- {session ? (
51
+ {isPending ? (
52
52
  <Thinking />
53
53
  ) : (
54
54
  <FateClient client={fate} key={userId}>
@@ -2,12 +2,7 @@
2
2
 
3
3
  body {
4
4
  font-family:
5
- system-ui,
6
- -apple-system,
7
- BlinkMacSystemFont,
8
- 'Segoe UI',
9
- 'Open Sans',
10
- 'Helvetica Neue',
5
+ system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', 'Helvetica Neue',
11
6
  sans-serif;
12
7
 
13
8
  background-color: hsl(var(--background));
@@ -12,9 +12,9 @@ allowBuilds:
12
12
  workerd: true
13
13
 
14
14
  catalog:
15
- vite: npm:@voidzero-dev/vite-plus-core@1.0.0
16
- vite-plus: 1.0.0
17
- vitest: 5.0.2
15
+ vite: npm:@voidzero-dev/vite-plus-core@1.2.0
16
+ vite-plus: 1.2.0
17
+ vitest: 5.0.4
18
18
 
19
19
  minimumReleaseAgeExclude:
20
20
  - '@voidzero-dev/vite-plus-core'
@@ -36,15 +36,16 @@ model User {
36
36
  }
37
37
 
38
38
  model Session {
39
- id String @unique @default(uuid(7))
40
- expiresAt DateTime
41
- token String
42
- createdAt DateTime
43
- updatedAt DateTime
44
- ipAddress String?
45
- userAgent String?
46
- userId String
47
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
39
+ id String @unique @default(uuid(7))
40
+ expiresAt DateTime
41
+ token String
42
+ createdAt DateTime
43
+ updatedAt DateTime
44
+ impersonatedBy String?
45
+ ipAddress String?
46
+ userAgent String?
47
+ userId String
48
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
48
49
 
49
50
  @@unique([token])
50
51
  @@map("session")
@@ -54,7 +55,6 @@ model Account {
54
55
  id String @unique @default(uuid(7))
55
56
  accountId String
56
57
  providerId String
57
- issuer String
58
58
  userId String
59
59
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
60
60
  accessToken String?
@@ -67,10 +67,22 @@ model Account {
67
67
  createdAt DateTime
68
68
  updatedAt DateTime
69
69
 
70
- @@unique([issuer, accountId])
70
+ @@unique([providerId, accountId])
71
71
  @@map("account")
72
72
  }
73
73
 
74
+ model Verification {
75
+ id String @id @default(uuid(7))
76
+ identifier String
77
+ value String
78
+ expiresAt DateTime
79
+ createdAt DateTime @default(now())
80
+ updatedAt DateTime @updatedAt
81
+
82
+ @@index([identifier])
83
+ @@map("verification")
84
+ }
85
+
74
86
  model Post {
75
87
  id String @id @default(uuid(7))
76
88
  title String
@@ -0,0 +1,23 @@
1
+ # Using fate
2
+
3
+ Before working on fate, read only the relevant Markdown docs in `node_modules/react-fate/docs/`. Start with `index.md` to find guides, integrations, and API references. The docs match the installed package version. Online documentation is at [fate.technology](https://fate.technology/).
4
+
5
+ <!--VITE PLUS START-->
6
+
7
+ # Using Vite+, the Unified Toolchain for the Web
8
+
9
+ This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
10
+
11
+ Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.
12
+
13
+ ## Review Checklist
14
+
15
+ - [ ] Run `vp install` after pulling remote changes and before getting started.
16
+ - [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
17
+ - [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
18
+
19
+ Run `vp run test:all` to verify changes.
20
+
21
+ Run `vp check --fix` to fix formatting and lint errors.
22
+
23
+ <!--VITE PLUS END-->
@@ -1,5 +1,6 @@
1
1
  .fate/
2
2
  .void/
3
+ .wrangler/
3
4
  .eslintcache
4
5
  .pnpm-debug.log
5
6
  node_modules/
@@ -0,0 +1,3 @@
1
+ DROP INDEX `account_issuer_accountId_key`;
2
+ --> statement-breakpoint
3
+ ALTER TABLE `account` DROP COLUMN `issuer`;