create-kofi-stack 1.2.17 → 1.2.18

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 (2) hide show
  1. package/dist/index.js +20 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1061,17 +1061,17 @@ export const {
1061
1061
  } = authClient
1062
1062
  `;
1063
1063
  await writeFile(path3.join(appDir, "src/lib/auth.ts"), authClientContent);
1064
- const isMonorepo = config.structure === "monorepo";
1065
- const convexContent = isMonorepo ? `import { ConvexProvider, ConvexReactClient } from 'convex/react'
1064
+ const convexContent = `import { ConvexProvider, ConvexReactClient } from 'convex/react'
1066
1065
  import { env } from '@/env'
1067
1066
 
1068
- export const convex = new ConvexReactClient(env.NEXT_PUBLIC_CONVEX_URL)
1069
-
1070
- export { ConvexProvider }
1071
- ` : `import { ConvexProvider, ConvexReactClient } from 'convex/react'
1072
- import { env } from '@/env'
1067
+ const convexUrl = env.NEXT_PUBLIC_CONVEX_URL
1068
+ if (!convexUrl) {
1069
+ throw new Error(
1070
+ 'NEXT_PUBLIC_CONVEX_URL is not set. Run "npx convex dev" to set up Convex.'
1071
+ )
1072
+ }
1073
1073
 
1074
- export const convex = new ConvexReactClient(env.NEXT_PUBLIC_CONVEX_URL)
1074
+ export const convex = new ConvexReactClient(convexUrl)
1075
1075
 
1076
1076
  export { ConvexProvider }
1077
1077
  `;
@@ -2058,12 +2058,19 @@ import { convexAdapter } from '@convex-dev/better-auth/adapter'
2058
2058
  import { ConvexHttpClient } from 'convex/browser'
2059
2059
  import { env } from '@/env'
2060
2060
 
2061
- const convex = new ConvexHttpClient(env.NEXT_PUBLIC_CONVEX_URL)
2061
+ const convexUrl = env.NEXT_PUBLIC_CONVEX_URL
2062
+ if (!convexUrl) {
2063
+ throw new Error(
2064
+ 'NEXT_PUBLIC_CONVEX_URL is not set. Run "npx convex dev" to set up Convex.'
2065
+ )
2066
+ }
2067
+
2068
+ const convex = new ConvexHttpClient(convexUrl)
2062
2069
 
2063
2070
  export const auth = betterAuth({
2064
2071
  database: convexAdapter(convex),
2065
- secret: env.BETTER_AUTH_SECRET,
2066
- baseURL: env.NEXT_PUBLIC_APP_URL,
2072
+ secret: env.BETTER_AUTH_SECRET || '',
2073
+ baseURL: env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000',
2067
2074
  emailAndPassword: {
2068
2075
  enabled: true,
2069
2076
  sendResetPassword: async ({ user, url }) => {
@@ -4346,7 +4353,7 @@ async function generateFumadocsTsConfig(docsDir) {
4346
4353
  plugins: [{ name: "next" }],
4347
4354
  paths: {
4348
4355
  "@/*": ["./src/*"],
4349
- "@/.source": ["./.source"]
4356
+ "fumadocs-mdx:collections/*": ["./.source/*"]
4350
4357
  }
4351
4358
  },
4352
4359
  include: [
@@ -4362,7 +4369,7 @@ async function generateFumadocsTsConfig(docsDir) {
4362
4369
  await writeJSON(path16.join(docsDir, "tsconfig.json"), tsConfig);
4363
4370
  }
4364
4371
  async function generateFumadocsSource(docsDir) {
4365
- const content = `import { docs } from '@/.source'
4372
+ const content = `import { docs } from 'fumadocs-mdx:collections/server'
4366
4373
  import { loader } from 'fumadocs-core/source'
4367
4374
 
4368
4375
  export const source = loader({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kofi-stack",
3
- "version": "1.2.17",
3
+ "version": "1.2.18",
4
4
  "description": "Scaffold opinionated full-stack projects with Next.js, Convex, Better-Auth, and more",
5
5
  "type": "module",
6
6
  "bin": {