create-kofi-stack 1.2.14 → 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.
- package/dist/index.js +32 -30
- 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().
|
|
1088
|
-
BETTER_AUTH_SECRET: z.string().
|
|
1089
|
-
GOOGLE_CLIENT_ID: z.string().
|
|
1090
|
-
GOOGLE_CLIENT_SECRET: z.string().
|
|
1091
|
-
RESEND_API_KEY: z.string().
|
|
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().
|
|
1096
|
-
${envPrefix}_CLIENT_SECRET: z.string().
|
|
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().
|
|
1101
|
-
UPLOADTHING_APP_ID: z.string().
|
|
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().
|
|
1106
|
-
AWS_SECRET_ACCESS_KEY: z.string().
|
|
1107
|
-
AWS_REGION: z.string().
|
|
1108
|
-
AWS_BUCKET_NAME: z.string().
|
|
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().
|
|
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().
|
|
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().
|
|
1121
|
-
UPSTASH_REDIS_REST_TOKEN: z.string().
|
|
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().
|
|
1126
|
-
SENTRY_AUTH_TOKEN: z.string().
|
|
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().
|
|
1136
|
-
NEXT_PUBLIC_POSTHOG_HOST: z.string().
|
|
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);
|
|
@@ -1939,12 +1942,12 @@ export const getCurrentUser = query({
|
|
|
1939
1942
|
}
|
|
1940
1943
|
async function generateHttp(convexDir) {
|
|
1941
1944
|
const content = `import { httpRouter } from 'convex/server'
|
|
1942
|
-
import { authComponent } from './auth'
|
|
1945
|
+
import { authComponent, createAuth } from './auth'
|
|
1943
1946
|
|
|
1944
1947
|
const http = httpRouter()
|
|
1945
1948
|
|
|
1946
|
-
//
|
|
1947
|
-
authComponent.
|
|
1949
|
+
// Register Better Auth HTTP routes
|
|
1950
|
+
authComponent.registerRoutes(http, createAuth)
|
|
1948
1951
|
|
|
1949
1952
|
export default http
|
|
1950
1953
|
`;
|
|
@@ -4342,7 +4345,7 @@ async function generateFumadocsTsConfig(docsDir) {
|
|
|
4342
4345
|
plugins: [{ name: "next" }],
|
|
4343
4346
|
paths: {
|
|
4344
4347
|
"@/*": ["./src/*"],
|
|
4345
|
-
"@/.source": ["./.source
|
|
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
|
|
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:
|
|
4369
|
+
source: docs.toFumadocsSource(),
|
|
4368
4370
|
})
|
|
4369
4371
|
`;
|
|
4370
4372
|
await writeFile(path16.join(docsDir, "src/lib/source.ts"), content);
|