create-kofi-stack 1.2.15 → 1.2.16

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 +29 -27
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1084,56 +1084,56 @@ import { z } from 'zod'
1084
1084
 
1085
1085
  export const env = createEnv({
1086
1086
  server: {
1087
- CONVEX_DEPLOYMENT: z.string().min(1),
1088
- BETTER_AUTH_SECRET: z.string().min(1),
1089
- GOOGLE_CLIENT_ID: z.string().min(1),
1090
- GOOGLE_CLIENT_SECRET: z.string().min(1),
1091
- RESEND_API_KEY: z.string().min(1),`;
1087
+ CONVEX_DEPLOYMENT: z.string().optional(),
1088
+ BETTER_AUTH_SECRET: z.string().optional(),
1089
+ GOOGLE_CLIENT_ID: z.string().optional(),
1090
+ GOOGLE_CLIENT_SECRET: z.string().optional(),
1091
+ RESEND_API_KEY: z.string().optional(),`;
1092
1092
  for (const provider of config.auth.providers) {
1093
1093
  const envPrefix = provider.toUpperCase();
1094
1094
  content += `
1095
- ${envPrefix}_CLIENT_ID: z.string().min(1),
1096
- ${envPrefix}_CLIENT_SECRET: z.string().min(1),`;
1095
+ ${envPrefix}_CLIENT_ID: z.string().optional(),
1096
+ ${envPrefix}_CLIENT_SECRET: z.string().optional(),`;
1097
1097
  }
1098
1098
  if (config.integrations.uploads === "uploadthing") {
1099
1099
  content += `
1100
- UPLOADTHING_SECRET: z.string().min(1),
1101
- UPLOADTHING_APP_ID: z.string().min(1),`;
1100
+ UPLOADTHING_SECRET: z.string().optional(),
1101
+ UPLOADTHING_APP_ID: z.string().optional(),`;
1102
1102
  }
1103
1103
  if (config.integrations.uploads === "s3") {
1104
1104
  content += `
1105
- AWS_ACCESS_KEY_ID: z.string().min(1),
1106
- AWS_SECRET_ACCESS_KEY: z.string().min(1),
1107
- AWS_REGION: z.string().min(1),
1108
- AWS_BUCKET_NAME: z.string().min(1),`;
1105
+ AWS_ACCESS_KEY_ID: z.string().optional(),
1106
+ AWS_SECRET_ACCESS_KEY: z.string().optional(),
1107
+ AWS_REGION: z.string().optional(),
1108
+ AWS_BUCKET_NAME: z.string().optional(),`;
1109
1109
  }
1110
1110
  if (config.integrations.uploads === "vercel-blob") {
1111
1111
  content += `
1112
- BLOB_READ_WRITE_TOKEN: z.string().min(1),`;
1112
+ BLOB_READ_WRITE_TOKEN: z.string().optional(),`;
1113
1113
  }
1114
1114
  if (config.integrations.rateLimiting === "arcjet") {
1115
1115
  content += `
1116
- ARCJET_KEY: z.string().min(1),`;
1116
+ ARCJET_KEY: z.string().optional(),`;
1117
1117
  }
1118
1118
  if (config.integrations.rateLimiting === "upstash") {
1119
1119
  content += `
1120
- UPSTASH_REDIS_REST_URL: z.string().url(),
1121
- UPSTASH_REDIS_REST_TOKEN: z.string().min(1),`;
1120
+ UPSTASH_REDIS_REST_URL: z.string().optional(),
1121
+ UPSTASH_REDIS_REST_TOKEN: z.string().optional(),`;
1122
1122
  }
1123
1123
  if (config.integrations.monitoring === "sentry") {
1124
1124
  content += `
1125
- SENTRY_DSN: z.string().url(),
1126
- SENTRY_AUTH_TOKEN: z.string().min(1),`;
1125
+ SENTRY_DSN: z.string().optional(),
1126
+ SENTRY_AUTH_TOKEN: z.string().optional(),`;
1127
1127
  }
1128
1128
  content += `
1129
1129
  },
1130
1130
  client: {
1131
- NEXT_PUBLIC_APP_URL: z.string().url(),
1132
- NEXT_PUBLIC_CONVEX_URL: z.string().url(),`;
1131
+ NEXT_PUBLIC_APP_URL: z.string().url().optional(),
1132
+ NEXT_PUBLIC_CONVEX_URL: z.string().url().optional(),`;
1133
1133
  if (config.integrations.analytics === "posthog") {
1134
1134
  content += `
1135
- NEXT_PUBLIC_POSTHOG_KEY: z.string().min(1),
1136
- NEXT_PUBLIC_POSTHOG_HOST: z.string().url(),`;
1135
+ NEXT_PUBLIC_POSTHOG_KEY: z.string().optional(),
1136
+ NEXT_PUBLIC_POSTHOG_HOST: z.string().optional(),`;
1137
1137
  }
1138
1138
  content += `
1139
1139
  },
@@ -1188,6 +1188,9 @@ export const env = createEnv({
1188
1188
  }
1189
1189
  content += `
1190
1190
  },
1191
+ // Skip validation during build or when env vars not set yet
1192
+ skipValidation: !!process.env.SKIP_ENV_VALIDATION,
1193
+ emptyStringAsUndefined: true,
1191
1194
  })
1192
1195
  `;
1193
1196
  await writeFile(path3.join(appDir, "src/env.ts"), content);
@@ -4342,7 +4345,7 @@ async function generateFumadocsTsConfig(docsDir) {
4342
4345
  plugins: [{ name: "next" }],
4343
4346
  paths: {
4344
4347
  "@/*": ["./src/*"],
4345
- "@/.source": ["./.source/index.ts"]
4348
+ "@/.source": ["./.source"]
4346
4349
  }
4347
4350
  },
4348
4351
  include: [
@@ -4358,13 +4361,12 @@ async function generateFumadocsTsConfig(docsDir) {
4358
4361
  await writeJSON(path16.join(docsDir, "tsconfig.json"), tsConfig);
4359
4362
  }
4360
4363
  async function generateFumadocsSource(docsDir) {
4361
- const content = `import { docs, meta } from '@/.source'
4364
+ const content = `import { docs } from '@/.source'
4362
4365
  import { loader } from 'fumadocs-core/source'
4363
- import { createMDXSource } from 'fumadocs-mdx'
4364
4366
 
4365
4367
  export const source = loader({
4366
4368
  baseUrl: '/docs',
4367
- source: createMDXSource(docs, meta),
4369
+ source: docs.toFumadocsSource(),
4368
4370
  })
4369
4371
  `;
4370
4372
  await writeFile(path16.join(docsDir, "src/lib/source.ts"), content);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kofi-stack",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "Scaffold opinionated full-stack projects with Next.js, Convex, Better-Auth, and more",
5
5
  "type": "module",
6
6
  "bin": {