create-fate 1.5.2 → 1.6.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 (138) hide show
  1. package/README.md +1 -2
  2. package/bin/create-fate.mjs +14 -50
  3. package/package.json +1 -1
  4. package/templates/fate/README.md +1 -2
  5. package/templates/fate/_shared/vue-app/package.json +4 -3
  6. package/templates/fate/_shared/vue-app/vite.config.ts +18 -11
  7. package/templates/fate/drizzle/client/package.json +6 -6
  8. package/templates/fate/graphql/client/package.json +6 -6
  9. package/templates/fate/graphql/server/.gitignore +5 -0
  10. package/templates/fate/graphql/server/node_modules/.bin/esbuild +22 -0
  11. package/templates/fate/graphql/server/node_modules/.bin/eslint +22 -0
  12. package/templates/fate/graphql/server/node_modules/.bin/fate +22 -0
  13. package/templates/fate/graphql/server/node_modules/.bin/intent +22 -0
  14. package/templates/fate/graphql/server/node_modules/.bin/jiti +22 -0
  15. package/templates/fate/graphql/server/node_modules/.bin/nft +22 -0
  16. package/templates/fate/graphql/server/node_modules/.bin/nodemon +22 -0
  17. package/templates/fate/graphql/server/node_modules/.bin/oxfmt +22 -0
  18. package/templates/fate/graphql/server/node_modules/.bin/oxlint +22 -0
  19. package/templates/fate/graphql/server/node_modules/.bin/prisma +22 -0
  20. package/templates/fate/graphql/server/node_modules/.bin/prisma-json-types-generator +22 -0
  21. package/templates/fate/graphql/server/node_modules/.bin/prisma-pothos-types +22 -0
  22. package/templates/fate/graphql/server/node_modules/.bin/tsc +22 -0
  23. package/templates/fate/graphql/server/node_modules/.bin/tsgolint +22 -0
  24. package/templates/fate/graphql/server/node_modules/.bin/tsx +22 -0
  25. package/templates/fate/graphql/server/node_modules/.bin/vitest +22 -0
  26. package/templates/fate/graphql/server/node_modules/.bin/vp +22 -0
  27. package/templates/fate/graphql/server/node_modules/.bin/vpr +22 -0
  28. package/templates/fate/graphql/server/node_modules/.bin/yaml +22 -0
  29. package/templates/fate/graphql-client/README.md +11 -1
  30. package/templates/fate/graphql-client/env.ts +6 -0
  31. package/templates/fate/graphql-client/package.json +6 -6
  32. package/templates/fate/http/client/package.json +6 -6
  33. package/templates/fate/prisma/client/package.json +6 -6
  34. package/templates/fate/void/README.md +12 -0
  35. package/templates/fate/void/db/migrations/20260918045815_legal_dragon_lord.sql +15 -0
  36. package/templates/fate/{cloudflare/server/db/migrations/meta/20260508073357_snapshot.json → void/db/migrations/meta/20260918045815_snapshot.json} +174 -124
  37. package/templates/fate/void/db/migrations/meta/_journal.json +7 -0
  38. package/templates/fate/void/package.json +6 -7
  39. package/templates/fate/cloudflare/.github/workflows/push.yml +0 -27
  40. package/templates/fate/cloudflare/.vite-hooks/pre-commit +0 -1
  41. package/templates/fate/cloudflare/.vscode/extensions.json +0 -12
  42. package/templates/fate/cloudflare/.vscode/settings.json +0 -25
  43. package/templates/fate/cloudflare/AGENTS.md +0 -55
  44. package/templates/fate/cloudflare/README.md +0 -137
  45. package/templates/fate/cloudflare/_gitignore +0 -20
  46. package/templates/fate/cloudflare/client/node_modules/.bin/browserslist +0 -22
  47. package/templates/fate/cloudflare/client/node_modules/.bin/cf-wrangler +0 -22
  48. package/templates/fate/cloudflare/client/node_modules/.bin/drizzle-kit +0 -22
  49. package/templates/fate/cloudflare/client/node_modules/.bin/esbuild +0 -22
  50. package/templates/fate/cloudflare/client/node_modules/.bin/fate +0 -22
  51. package/templates/fate/cloudflare/client/node_modules/.bin/fbtee +0 -22
  52. package/templates/fate/cloudflare/client/node_modules/.bin/intent +0 -22
  53. package/templates/fate/cloudflare/client/node_modules/.bin/jiti +0 -22
  54. package/templates/fate/cloudflare/client/node_modules/.bin/oxfmt +0 -22
  55. package/templates/fate/cloudflare/client/node_modules/.bin/oxlint +0 -22
  56. package/templates/fate/cloudflare/client/node_modules/.bin/rolldown +0 -22
  57. package/templates/fate/cloudflare/client/node_modules/.bin/tsc +0 -22
  58. package/templates/fate/cloudflare/client/node_modules/.bin/tsx +0 -22
  59. package/templates/fate/cloudflare/client/node_modules/.bin/vitest +0 -22
  60. package/templates/fate/cloudflare/client/node_modules/.bin/void +0 -22
  61. package/templates/fate/cloudflare/client/node_modules/.bin/vp +0 -22
  62. package/templates/fate/cloudflare/client/node_modules/.bin/vpr +0 -22
  63. package/templates/fate/cloudflare/client/node_modules/.bin/workerd +0 -22
  64. package/templates/fate/cloudflare/client/node_modules/.bin/wrangler +0 -22
  65. package/templates/fate/cloudflare/client/node_modules/.bin/wrangler2 +0 -22
  66. package/templates/fate/cloudflare/client/package.json +0 -62
  67. package/templates/fate/cloudflare/client/pages/index.tsx +0 -96
  68. package/templates/fate/cloudflare/client/pages/layout.tsx +0 -68
  69. package/templates/fate/cloudflare/client/pages/login.tsx +0 -107
  70. package/templates/fate/cloudflare/client/pages/post/[id].tsx +0 -22
  71. package/templates/fate/cloudflare/client/pages/search.tsx +0 -99
  72. package/templates/fate/cloudflare/client/public/icon.svg +0 -1
  73. package/templates/fate/cloudflare/client/src/App.css +0 -153
  74. package/templates/fate/cloudflare/client/src/lib/AvailableLanguages.tsx +0 -5
  75. package/templates/fate/cloudflare/client/src/lib/LocaleContext.tsx +0 -61
  76. package/templates/fate/cloudflare/client/src/lib/cx.tsx +0 -6
  77. package/templates/fate/cloudflare/client/src/lib/env.tsx +0 -5
  78. package/templates/fate/cloudflare/client/src/ui/Badge.tsx +0 -31
  79. package/templates/fate/cloudflare/client/src/ui/Button.tsx +0 -108
  80. package/templates/fate/cloudflare/client/src/ui/Card.tsx +0 -32
  81. package/templates/fate/cloudflare/client/src/ui/CommentCard.tsx +0 -75
  82. package/templates/fate/cloudflare/client/src/ui/Error.tsx +0 -19
  83. package/templates/fate/cloudflare/client/src/ui/H2.tsx +0 -15
  84. package/templates/fate/cloudflare/client/src/ui/H3.tsx +0 -20
  85. package/templates/fate/cloudflare/client/src/ui/Header.tsx +0 -98
  86. package/templates/fate/cloudflare/client/src/ui/Input.tsx +0 -17
  87. package/templates/fate/cloudflare/client/src/ui/Link.tsx +0 -11
  88. package/templates/fate/cloudflare/client/src/ui/LocaleSwitcher.tsx +0 -34
  89. package/templates/fate/cloudflare/client/src/ui/PostCard.tsx +0 -303
  90. package/templates/fate/cloudflare/client/src/ui/Section.tsx +0 -23
  91. package/templates/fate/cloudflare/client/src/ui/UserCard.tsx +0 -131
  92. package/templates/fate/cloudflare/client/src/user/AuthClient.tsx +0 -6
  93. package/templates/fate/cloudflare/client/start.mjs +0 -11
  94. package/templates/fate/cloudflare/client/translations/de-DE.json +0 -632
  95. package/templates/fate/cloudflare/client/translations/ja-JP.json +0 -632
  96. package/templates/fate/cloudflare/client/vite.config.ts +0 -41
  97. package/templates/fate/cloudflare/client/void.json +0 -29
  98. package/templates/fate/cloudflare/package.json +0 -42
  99. package/templates/fate/cloudflare/pnpm-workspace.yaml +0 -41
  100. package/templates/fate/cloudflare/server/.env.example +0 -1
  101. package/templates/fate/cloudflare/server/db/db.ts +0 -30
  102. package/templates/fate/cloudflare/server/db/migrations/20260508073357_initial_schema.sql +0 -134
  103. package/templates/fate/cloudflare/server/db/migrations/20260508120500_seed_cloudflare_demo.sql +0 -170
  104. package/templates/fate/cloudflare/server/db/migrations/meta/_journal.json +0 -20
  105. package/templates/fate/cloudflare/server/db/queries.ts +0 -211
  106. package/templates/fate/cloudflare/server/db/schema.ts +0 -331
  107. package/templates/fate/cloudflare/server/node_modules/.bin/cf-wrangler +0 -22
  108. package/templates/fate/cloudflare/server/node_modules/.bin/drizzle-kit +0 -22
  109. package/templates/fate/cloudflare/server/node_modules/.bin/esbuild +0 -22
  110. package/templates/fate/cloudflare/server/node_modules/.bin/fate +0 -22
  111. package/templates/fate/cloudflare/server/node_modules/.bin/intent +0 -22
  112. package/templates/fate/cloudflare/server/node_modules/.bin/jiti +0 -22
  113. package/templates/fate/cloudflare/server/node_modules/.bin/oxfmt +0 -22
  114. package/templates/fate/cloudflare/server/node_modules/.bin/oxlint +0 -22
  115. package/templates/fate/cloudflare/server/node_modules/.bin/tsc +0 -22
  116. package/templates/fate/cloudflare/server/node_modules/.bin/tsx +0 -22
  117. package/templates/fate/cloudflare/server/node_modules/.bin/vitest +0 -22
  118. package/templates/fate/cloudflare/server/node_modules/.bin/vp +0 -22
  119. package/templates/fate/cloudflare/server/node_modules/.bin/vpr +0 -22
  120. package/templates/fate/cloudflare/server/node_modules/.bin/workerd +0 -22
  121. package/templates/fate/cloudflare/server/node_modules/.bin/wrangler +0 -22
  122. package/templates/fate/cloudflare/server/node_modules/.bin/wrangler2 +0 -22
  123. package/templates/fate/cloudflare/server/package.json +0 -34
  124. package/templates/fate/cloudflare/server/src/fate/commentPermissions.ts +0 -17
  125. package/templates/fate/cloudflare/server/src/fate/context.ts +0 -15
  126. package/templates/fate/cloudflare/server/src/fate/live.ts +0 -7
  127. package/templates/fate/cloudflare/server/src/fate/server.ts +0 -414
  128. package/templates/fate/cloudflare/server/src/fate/views.ts +0 -164
  129. package/templates/fate/cloudflare/server/src/index.ts +0 -80
  130. package/templates/fate/cloudflare/server/src/lib/auth.ts +0 -64
  131. package/templates/fate/cloudflare/server/src/lib/origins.ts +0 -17
  132. package/templates/fate/cloudflare/server/src/router.ts +0 -2
  133. package/templates/fate/cloudflare/server/src/user/SessionUser.tsx +0 -17
  134. package/templates/fate/cloudflare/server/tsconfig.json +0 -10
  135. package/templates/fate/cloudflare/server/wrangler.jsonc +0 -29
  136. package/templates/fate/cloudflare/tsconfig.json +0 -24
  137. package/templates/fate/cloudflare/vite.config.ts +0 -75
  138. package/templates/fate/graphql-client/.env.example +0 -3
@@ -1,211 +0,0 @@
1
- import { and, db as runtimeDb, eq, gt, sql } from './db.ts';
2
- import {
3
- comment,
4
- event,
5
- eventAttendee,
6
- post,
7
- postToTag,
8
- type CategoryRow,
9
- type CommentRow,
10
- type EventAttendeeRow,
11
- type EventRow,
12
- type PostRow,
13
- type TagRow,
14
- type UserRow,
15
- } from './schema.ts';
16
-
17
- type ItemRecord = Record<string, unknown>;
18
- type InsertDatabase = Pick<typeof runtimeDb, 'insert'>;
19
-
20
- export type CommentItem = CommentRow &
21
- ItemRecord & {
22
- author?: UserRow | null;
23
- post?: PostItem | null;
24
- };
25
-
26
- export type PostItem = PostRow &
27
- ItemRecord & {
28
- author?: UserRow | null;
29
- category?: CategoryRow | null;
30
- comments?: Array<CommentItem>;
31
- tags?: Array<TagRow>;
32
- };
33
-
34
- export type CategoryItem = CategoryRow &
35
- ItemRecord & {
36
- posts?: Array<PostItem>;
37
- };
38
-
39
- export type EventAttendeeItem = EventAttendeeRow &
40
- ItemRecord & {
41
- user?: UserRow | null;
42
- };
43
-
44
- export type EventItem = EventRow &
45
- ItemRecord & {
46
- attendees?: Array<EventAttendeeItem>;
47
- host?: UserRow | null;
48
- };
49
-
50
- export const createPostRecord = async (
51
- {
52
- authorId,
53
- categoryId,
54
- content,
55
- likes = 0,
56
- tagIds = [],
57
- title,
58
- }: {
59
- authorId: string;
60
- categoryId?: string | null;
61
- content: string;
62
- likes?: number;
63
- tagIds?: Array<string>;
64
- title: string;
65
- },
66
- database: InsertDatabase = runtimeDb,
67
- ) => {
68
- const [created] = await database
69
- .insert(post)
70
- .values({
71
- authorId,
72
- categoryId,
73
- content,
74
- likes,
75
- title,
76
- updatedAt: new Date(),
77
- })
78
- .returning({ id: post.id });
79
-
80
- if (!created) {
81
- return null;
82
- }
83
-
84
- if (tagIds.length) {
85
- await database.insert(postToTag).values(tagIds.map((tagId) => ({ postId: created.id, tagId })));
86
- }
87
-
88
- return created.id;
89
- };
90
-
91
- export const likePostRecord = async (id: string) => {
92
- const [updated] = await runtimeDb
93
- .update(post)
94
- .set({
95
- likes: sql`${post.likes} + 1`,
96
- updatedAt: new Date(),
97
- })
98
- .where(eq(post.id, id))
99
- .returning({ id: post.id });
100
-
101
- return Boolean(updated);
102
- };
103
-
104
- export const unlikePostRecord = async (id: string) => {
105
- const [updated] = await runtimeDb
106
- .update(post)
107
- .set({
108
- likes: sql`${post.likes} - 1`,
109
- updatedAt: new Date(),
110
- })
111
- .where(and(eq(post.id, id), gt(post.likes, 0)))
112
- .returning({ id: post.id });
113
-
114
- if (updated) {
115
- return true;
116
- }
117
-
118
- const [existing] = await runtimeDb
119
- .select({ id: post.id })
120
- .from(post)
121
- .where(eq(post.id, id))
122
- .limit(1);
123
-
124
- return Boolean(existing);
125
- };
126
-
127
- export const createCommentRecord = async ({
128
- authorId,
129
- content,
130
- postId,
131
- }: {
132
- authorId: string;
133
- content: string;
134
- postId: string;
135
- }) => {
136
- const [created] = await runtimeDb
137
- .insert(comment)
138
- .values({
139
- authorId,
140
- content,
141
- postId,
142
- })
143
- .returning({ id: comment.id });
144
-
145
- return created?.id ?? null;
146
- };
147
-
148
- export const deleteCommentRecord = async (id: string) => {
149
- await runtimeDb.delete(comment).where(eq(comment.id, id));
150
- };
151
-
152
- export const createEventRecord = async (
153
- {
154
- attendees,
155
- capacity,
156
- description,
157
- endAt,
158
- hostId,
159
- livestreamUrl,
160
- location,
161
- name,
162
- startAt,
163
- topics,
164
- type,
165
- }: {
166
- attendees: Array<{ notes: string | null; status: EventAttendeeRow['status']; userId: string }>;
167
- capacity: number;
168
- description: string;
169
- endAt: Date;
170
- hostId: string;
171
- livestreamUrl: string | null;
172
- location: string;
173
- name: string;
174
- startAt: Date;
175
- topics: Array<string>;
176
- type: EventRow['type'];
177
- },
178
- database: InsertDatabase = runtimeDb,
179
- ) => {
180
- const [created] = await database
181
- .insert(event)
182
- .values({
183
- capacity,
184
- description,
185
- endAt,
186
- hostId,
187
- livestreamUrl,
188
- location,
189
- name,
190
- startAt,
191
- topics,
192
- type,
193
- updatedAt: new Date(),
194
- })
195
- .returning({ id: event.id });
196
-
197
- if (!created) {
198
- return null;
199
- }
200
-
201
- if (attendees.length) {
202
- await database.insert(eventAttendee).values(
203
- attendees.map((attendee) => ({
204
- ...attendee,
205
- eventId: created.id,
206
- })),
207
- );
208
- }
209
-
210
- return created.id;
211
- };
@@ -1,331 +0,0 @@
1
- import { relations } from 'drizzle-orm';
2
- import {
3
- index,
4
- integer,
5
- primaryKey,
6
- sqliteTable,
7
- text,
8
- uniqueIndex,
9
- } from 'drizzle-orm/sqlite-core';
10
- import { sql } from './db.ts';
11
-
12
- const idColumn = () =>
13
- text()
14
- .notNull()
15
- .$defaultFn(() => crypto.randomUUID());
16
-
17
- const timestampColumn = () =>
18
- integer({ mode: 'timestamp' })
19
- .notNull()
20
- .default(sql`(unixepoch())`);
21
- const nullableTimestampColumn = () => integer({ mode: 'timestamp' });
22
-
23
- export const rsvpStatus = ['INVITED', 'GOING', 'INTERESTED', 'DECLINED'] as const;
24
- export const eventType = ['WORKSHOP', 'MEETUP', 'AMA', 'LAUNCH', 'COMMUNITY_CALL'] as const;
25
-
26
- export const user = sqliteTable(
27
- 'user',
28
- {
29
- banExpires: nullableTimestampColumn(),
30
- banned: integer({ mode: 'boolean' }),
31
- banReason: text(),
32
- createdAt: timestampColumn(),
33
- displayUsername: text(),
34
- email: text().notNull(),
35
- emailVerified: integer({ mode: 'boolean' }).notNull().default(false),
36
- id: idColumn().primaryKey(),
37
- image: text(),
38
- name: text().notNull(),
39
- password: text(),
40
- role: text().notNull().default('user'),
41
- updatedAt: timestampColumn(),
42
- username: text(),
43
- },
44
- (table) => [
45
- uniqueIndex('user_email_key').on(table.email),
46
- uniqueIndex('user_username_key').on(table.username),
47
- index('user_id_idx').on(table.id),
48
- ],
49
- );
50
-
51
- export const session = sqliteTable(
52
- 'session',
53
- {
54
- createdAt: timestampColumn(),
55
- expiresAt: integer({ mode: 'timestamp' }).notNull(),
56
- id: idColumn().primaryKey(),
57
- ipAddress: text(),
58
- token: text().notNull(),
59
- updatedAt: timestampColumn(),
60
- userAgent: text(),
61
- userId: text()
62
- .notNull()
63
- .references(() => user.id, { onDelete: 'cascade' }),
64
- },
65
- (table) => [uniqueIndex('session_token_key').on(table.token)],
66
- );
67
-
68
- export const account = sqliteTable(
69
- 'account',
70
- {
71
- accessToken: text(),
72
- accessTokenExpiresAt: nullableTimestampColumn(),
73
- accountId: text().notNull(),
74
- createdAt: timestampColumn(),
75
- id: idColumn().primaryKey(),
76
- idToken: text(),
77
- issuer: text().notNull(),
78
- password: text(),
79
- providerId: text().notNull(),
80
- refreshToken: text(),
81
- refreshTokenExpiresAt: nullableTimestampColumn(),
82
- scope: text(),
83
- updatedAt: timestampColumn(),
84
- userId: text()
85
- .notNull()
86
- .references(() => user.id, { onDelete: 'cascade' }),
87
- },
88
- (table) => [uniqueIndex('account_issuer_accountId_key').on(table.issuer, table.accountId)],
89
- );
90
-
91
- export const category = sqliteTable(
92
- 'Category',
93
- {
94
- createdAt: timestampColumn(),
95
- description: text(),
96
- id: idColumn().primaryKey(),
97
- name: text().notNull(),
98
- },
99
- (table) => [uniqueIndex('Category_name_key').on(table.name)],
100
- );
101
-
102
- export const tag = sqliteTable(
103
- 'Tag',
104
- {
105
- createdAt: timestampColumn(),
106
- description: text(),
107
- id: idColumn().primaryKey(),
108
- name: text().notNull(),
109
- },
110
- (table) => [uniqueIndex('Tag_name_key').on(table.name)],
111
- );
112
-
113
- export const post = sqliteTable(
114
- 'Post',
115
- {
116
- authorId: text()
117
- .notNull()
118
- .references(() => user.id, { onDelete: 'cascade' }),
119
- categoryId: text().references(() => category.id, { onDelete: 'set null' }),
120
- content: text().notNull(),
121
- createdAt: timestampColumn(),
122
- id: idColumn().primaryKey(),
123
- likes: integer().notNull().default(0),
124
- title: text().notNull(),
125
- updatedAt: timestampColumn(),
126
- },
127
- (table) => [index('Post_authorId_idx').on(table.authorId)],
128
- );
129
-
130
- export const comment = sqliteTable(
131
- 'Comment',
132
- {
133
- authorId: text().references(() => user.id, { onDelete: 'set null' }),
134
- content: text().notNull(),
135
- createdAt: timestampColumn(),
136
- id: idColumn().primaryKey(),
137
- postId: text()
138
- .notNull()
139
- .references(() => post.id, { onDelete: 'cascade' }),
140
- },
141
- (table) => [
142
- index('Comment_authorId_idx').on(table.authorId),
143
- index('Comment_postId_idx').on(table.postId),
144
- ],
145
- );
146
-
147
- export const event = sqliteTable(
148
- 'Event',
149
- {
150
- capacity: integer().notNull(),
151
- createdAt: timestampColumn(),
152
- description: text().notNull(),
153
- endAt: integer({ mode: 'timestamp' }).notNull(),
154
- hostId: text()
155
- .notNull()
156
- .references(() => user.id, { onDelete: 'cascade' }),
157
- id: idColumn().primaryKey(),
158
- livestreamUrl: text(),
159
- location: text().notNull(),
160
- name: text().notNull(),
161
- startAt: integer({ mode: 'timestamp' }).notNull(),
162
- topics: text({ mode: 'json' })
163
- .$type<Array<string>>()
164
- .notNull()
165
- .default(sql`'[]'`),
166
- type: text({ enum: eventType }).notNull().default('MEETUP'),
167
- updatedAt: timestampColumn(),
168
- },
169
- (table) => [index('Event_hostId_idx').on(table.hostId)],
170
- );
171
-
172
- export const eventAttendee = sqliteTable(
173
- 'EventAttendee',
174
- {
175
- createdAt: timestampColumn(),
176
- eventId: text()
177
- .notNull()
178
- .references(() => event.id, { onDelete: 'cascade' }),
179
- id: idColumn().primaryKey(),
180
- notes: text(),
181
- status: text({ enum: rsvpStatus }).notNull().default('INVITED'),
182
- userId: text()
183
- .notNull()
184
- .references(() => user.id, { onDelete: 'cascade' }),
185
- },
186
- (table) => [
187
- uniqueIndex('EventAttendee_eventId_userId_key').on(table.eventId, table.userId),
188
- index('EventAttendee_userId_idx').on(table.userId),
189
- ],
190
- );
191
-
192
- export const postToTag = sqliteTable(
193
- '_PostTags',
194
- {
195
- postId: text('A')
196
- .notNull()
197
- .references(() => post.id, { onDelete: 'cascade' }),
198
- tagId: text('B')
199
- .notNull()
200
- .references(() => tag.id, { onDelete: 'cascade' }),
201
- },
202
- (table) => [
203
- primaryKey({ columns: [table.postId, table.tagId], name: '_PostTags_AB_pkey' }),
204
- index('_PostTags_B_index').on(table.tagId),
205
- ],
206
- );
207
-
208
- export const userRelations = relations(user, ({ many }) => ({
209
- accounts: many(account),
210
- comments: many(comment),
211
- eventAttendance: many(eventAttendee),
212
- hostedEvents: many(event, { relationName: 'EventHost' }),
213
- posts: many(post),
214
- sessions: many(session),
215
- }));
216
-
217
- export const sessionRelations = relations(session, ({ one }) => ({
218
- user: one(user, {
219
- fields: [session.userId],
220
- references: [user.id],
221
- }),
222
- }));
223
-
224
- export const accountRelations = relations(account, ({ one }) => ({
225
- user: one(user, {
226
- fields: [account.userId],
227
- references: [user.id],
228
- }),
229
- }));
230
-
231
- export const categoryRelations = relations(category, ({ many }) => ({
232
- posts: many(post),
233
- }));
234
-
235
- export const tagRelations = relations(tag, ({ many }) => ({
236
- postLinks: many(postToTag),
237
- }));
238
-
239
- export const postRelations = relations(post, ({ many, one }) => ({
240
- author: one(user, {
241
- fields: [post.authorId],
242
- references: [user.id],
243
- }),
244
- category: one(category, {
245
- fields: [post.categoryId],
246
- references: [category.id],
247
- }),
248
- comments: many(comment),
249
- postLinks: many(postToTag),
250
- }));
251
-
252
- export const commentRelations = relations(comment, ({ one }) => ({
253
- author: one(user, {
254
- fields: [comment.authorId],
255
- references: [user.id],
256
- }),
257
- post: one(post, {
258
- fields: [comment.postId],
259
- references: [post.id],
260
- }),
261
- }));
262
-
263
- export const eventRelations = relations(event, ({ many, one }) => ({
264
- attendees: many(eventAttendee),
265
- host: one(user, {
266
- fields: [event.hostId],
267
- references: [user.id],
268
- relationName: 'EventHost',
269
- }),
270
- }));
271
-
272
- export const eventAttendeeRelations = relations(eventAttendee, ({ one }) => ({
273
- event: one(event, {
274
- fields: [eventAttendee.eventId],
275
- references: [event.id],
276
- }),
277
- user: one(user, {
278
- fields: [eventAttendee.userId],
279
- references: [user.id],
280
- }),
281
- }));
282
-
283
- export const postToTagRelations = relations(postToTag, ({ one }) => ({
284
- post: one(post, {
285
- fields: [postToTag.postId],
286
- references: [post.id],
287
- }),
288
- tag: one(tag, {
289
- fields: [postToTag.tagId],
290
- references: [tag.id],
291
- }),
292
- }));
293
-
294
- export type UserRow = typeof user.$inferSelect;
295
- export type SessionRow = typeof session.$inferSelect;
296
- export type AccountRow = typeof account.$inferSelect;
297
- export type CategoryRow = typeof category.$inferSelect;
298
- export type TagRow = typeof tag.$inferSelect;
299
- export type PostRow = typeof post.$inferSelect;
300
- export type CommentRow = typeof comment.$inferSelect;
301
- export type EventRow = typeof event.$inferSelect;
302
- export type EventAttendeeRow = typeof eventAttendee.$inferSelect;
303
- export type RSVPStatus = (typeof rsvpStatus)[number];
304
- export type EventType = (typeof eventType)[number];
305
-
306
- const schema = {
307
- account,
308
- accountRelations,
309
- category,
310
- categoryRelations,
311
- comment,
312
- commentRelations,
313
- event,
314
- eventAttendee,
315
- eventAttendeeRelations,
316
- eventRelations,
317
- eventType,
318
- post,
319
- postRelations,
320
- postToTag,
321
- postToTagRelations,
322
- rsvpStatus,
323
- session,
324
- sessionRelations,
325
- tag,
326
- tagRelations,
327
- user,
328
- userRelations,
329
- } as const;
330
-
331
- export default schema;
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/wrangler@4.126.0_@cloudflare+workers-types@4.20260702.1/node_modules/wrangler/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/wrangler@4.126.0_@cloudflare+workers-types@4.20260702.1/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/wrangler@4.126.0_@cloudflare+workers-types@4.20260702.1/node_modules/wrangler/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/wrangler@4.126.0_@cloudflare+workers-types@4.20260702.1/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../../../node_modules/.pnpm/wrangler@4.126.0_@cloudflare+workers-types@4.20260702.1/node_modules/wrangler/bin/cf-wrangler.js" "$@"
19
- else
20
- exec node "$basedir/../../../node_modules/.pnpm/wrangler@4.126.0_@cloudflare+workers-types@4.20260702.1/node_modules/wrangler/bin/cf-wrangler.js" "$@"
21
- fi
22
- # cmd-shim-target=/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/wrangler@4.126.0_@cloudflare+workers-types@4.20260702.1/node_modules/wrangler/bin/cf-wrangler.js
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/drizzle-kit@0.31.10/node_modules/drizzle-kit/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/drizzle-kit@0.31.10/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/drizzle-kit@0.31.10/node_modules/drizzle-kit/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/drizzle-kit@0.31.10/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../../../node_modules/.pnpm/drizzle-kit@0.31.10/node_modules/drizzle-kit/bin.cjs" "$@"
19
- else
20
- exec node "$basedir/../../../node_modules/.pnpm/drizzle-kit@0.31.10/node_modules/drizzle-kit/bin.cjs" "$@"
21
- fi
22
- # cmd-shim-target=/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/drizzle-kit@0.31.10/node_modules/drizzle-kit/bin.cjs
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/esbuild@0.28.2/node_modules/esbuild/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/esbuild@0.28.2/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/esbuild@0.28.2/node_modules/esbuild/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/esbuild@0.28.2/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../../../node_modules/.pnpm/esbuild@0.28.2/node_modules/esbuild/bin/esbuild" "$@"
19
- else
20
- exec node "$basedir/../../../node_modules/.pnpm/esbuild@0.28.2/node_modules/esbuild/bin/esbuild" "$@"
21
- fi
22
- # cmd-shim-target=/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/esbuild@0.28.2/node_modules/esbuild/bin/esbuild
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@nkzw+fate@1.3.3_@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@7.0.2__typescript_a07e07136c6c6b191d3bb9a4df52e39d/node_modules/@nkzw/fate/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@nkzw+fate@1.3.3_@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@7.0.2__typescript_a07e07136c6c6b191d3bb9a4df52e39d/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@nkzw+fate@1.3.3_@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@7.0.2__typescript_a07e07136c6c6b191d3bb9a4df52e39d/node_modules/@nkzw/fate/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@nkzw+fate@1.3.3_@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@7.0.2__typescript_a07e07136c6c6b191d3bb9a4df52e39d/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../../../node_modules/.pnpm/@nkzw+fate@1.3.3_@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@7.0.2__typescript_a07e07136c6c6b191d3bb9a4df52e39d/node_modules/@nkzw/fate/lib/cli.mjs" "$@"
19
- else
20
- exec node "$basedir/../../../node_modules/.pnpm/@nkzw+fate@1.3.3_@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@7.0.2__typescript_a07e07136c6c6b191d3bb9a4df52e39d/node_modules/@nkzw/fate/lib/cli.mjs" "$@"
21
- fi
22
- # cmd-shim-target=/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@nkzw+fate@1.3.3_@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@7.0.2__typescript_a07e07136c6c6b191d3bb9a4df52e39d/node_modules/@nkzw/fate/lib/cli.mjs
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@trpc+server@11.18.0_typescript@7.0.2/node_modules/@trpc/server/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@trpc+server@11.18.0_typescript@7.0.2/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@trpc+server@11.18.0_typescript@7.0.2/node_modules/@trpc/server/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@trpc+server@11.18.0_typescript@7.0.2/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../../../node_modules/.pnpm/@trpc+server@11.18.0_typescript@7.0.2/node_modules/@trpc/server/bin/intent.js" "$@"
19
- else
20
- exec node "$basedir/../../../node_modules/.pnpm/@trpc+server@11.18.0_typescript@7.0.2/node_modules/@trpc/server/bin/intent.js" "$@"
21
- fi
22
- # cmd-shim-target=/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/@trpc+server@11.18.0_typescript@7.0.2/node_modules/@trpc/server/bin/intent.js
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/jiti@2.7.0/node_modules/jiti/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/jiti@2.7.0/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/jiti@2.7.0/node_modules/jiti/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/jiti@2.7.0/node_modules:/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../../../node_modules/.pnpm/jiti@2.7.0/node_modules/jiti/lib/jiti-cli.mjs" "$@"
19
- else
20
- exec node "$basedir/../../../node_modules/.pnpm/jiti@2.7.0/node_modules/jiti/lib/jiti-cli.mjs" "$@"
21
- fi
22
- # cmd-shim-target=/Users/cpojer/Projects/fate/packages/create-fate/templates/fate/cloudflare/node_modules/.pnpm/jiti@2.7.0/node_modules/jiti/lib/jiti-cli.mjs