create-kofi-stack 1.2.10 → 1.2.11
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/dist/index.js +10 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1838,16 +1838,14 @@ export default {
|
|
|
1838
1838
|
await writeFile(path6.join(convexDir, "auth.config.ts"), content);
|
|
1839
1839
|
}
|
|
1840
1840
|
async function generateSchema(config, convexDir) {
|
|
1841
|
-
let content = `import {
|
|
1842
|
-
import { defineSchema, defineTable } from 'convex/server'
|
|
1841
|
+
let content = `import { defineSchema, defineTable } from 'convex/server'
|
|
1843
1842
|
import { v } from 'convex/values'
|
|
1844
1843
|
|
|
1845
1844
|
export default defineSchema({
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
// Custom user extensions
|
|
1845
|
+
// Custom user extensions (links to Better Auth's internal user table)
|
|
1849
1846
|
userProfiles: defineTable({
|
|
1850
|
-
|
|
1847
|
+
// Reference to the user ID from Better Auth's internal tables
|
|
1848
|
+
userId: v.string(),
|
|
1851
1849
|
displayName: v.optional(v.string()),
|
|
1852
1850
|
avatarUrl: v.optional(v.string()),
|
|
1853
1851
|
createdAt: v.number(),
|
|
@@ -1860,13 +1858,13 @@ export default defineSchema({
|
|
|
1860
1858
|
organizations: defineTable({
|
|
1861
1859
|
name: v.string(),
|
|
1862
1860
|
slug: v.string(),
|
|
1863
|
-
ownerId: v.
|
|
1861
|
+
ownerId: v.string(), // User ID from Better Auth
|
|
1864
1862
|
createdAt: v.number(),
|
|
1865
1863
|
}).index('by_slug', ['slug']),
|
|
1866
1864
|
|
|
1867
1865
|
organizationMembers: defineTable({
|
|
1868
1866
|
organizationId: v.id('organizations'),
|
|
1869
|
-
userId: v.
|
|
1867
|
+
userId: v.string(), // User ID from Better Auth
|
|
1870
1868
|
role: v.union(v.literal('owner'), v.literal('admin'), v.literal('member')),
|
|
1871
1869
|
joinedAt: v.number(),
|
|
1872
1870
|
})
|
|
@@ -1930,7 +1928,7 @@ async function generateUsers(convexDir) {
|
|
|
1930
1928
|
import { v } from 'convex/values'
|
|
1931
1929
|
|
|
1932
1930
|
export const getUserProfile = query({
|
|
1933
|
-
args: { userId: v.
|
|
1931
|
+
args: { userId: v.string() },
|
|
1934
1932
|
handler: async (ctx, args) => {
|
|
1935
1933
|
return await ctx.db
|
|
1936
1934
|
.query('userProfiles')
|
|
@@ -1941,7 +1939,7 @@ export const getUserProfile = query({
|
|
|
1941
1939
|
|
|
1942
1940
|
export const createUserProfile = mutation({
|
|
1943
1941
|
args: {
|
|
1944
|
-
userId: v.
|
|
1942
|
+
userId: v.string(),
|
|
1945
1943
|
displayName: v.optional(v.string()),
|
|
1946
1944
|
avatarUrl: v.optional(v.string()),
|
|
1947
1945
|
},
|
|
@@ -1959,7 +1957,7 @@ export const createUserProfile = mutation({
|
|
|
1959
1957
|
|
|
1960
1958
|
export const updateUserProfile = mutation({
|
|
1961
1959
|
args: {
|
|
1962
|
-
userId: v.
|
|
1960
|
+
userId: v.string(),
|
|
1963
1961
|
displayName: v.optional(v.string()),
|
|
1964
1962
|
avatarUrl: v.optional(v.string()),
|
|
1965
1963
|
},
|
|
@@ -4304,7 +4302,7 @@ export const source = loader({
|
|
|
4304
4302
|
await writeFile(path16.join(docsDir, "src/lib/source.ts"), content);
|
|
4305
4303
|
}
|
|
4306
4304
|
async function generateFumadocsAppFiles(config, docsDir) {
|
|
4307
|
-
const layoutContent = `import { RootProvider } from 'fumadocs-ui/
|
|
4305
|
+
const layoutContent = `import { RootProvider } from 'fumadocs-ui/provider/next'
|
|
4308
4306
|
import { Inter } from 'next/font/google'
|
|
4309
4307
|
import type { Metadata } from 'next'
|
|
4310
4308
|
import type { ReactNode } from 'react'
|