create-better-t-stack 2.40.1 → 2.40.3-canary.0e4f85b3
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-DCgC3MR2.js → src-D59j3XG5.js} +13 -13
- package/package.json +1 -1
- package/templates/db/prisma/mongodb/prisma/schema/schema.prisma.hbs +19 -0
- package/templates/db/prisma/mysql/prisma/schema/schema.prisma.hbs +19 -0
- package/templates/db/prisma/postgres/prisma/schema/schema.prisma.hbs +10 -1
- package/templates/db/prisma/sqlite/prisma/schema/schema.prisma.hbs +19 -0
- package/templates/db/prisma/mongodb/prisma/schema/schema.prisma +0 -10
- package/templates/db/prisma/mysql/prisma/schema/schema.prisma +0 -10
- package/templates/db/prisma/sqlite/prisma/schema/schema.prisma +0 -10
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -74,8 +74,8 @@ const dependencyVersionMap = {
|
|
|
74
74
|
"@types/ws": "^8.18.1",
|
|
75
75
|
ws: "^8.18.3",
|
|
76
76
|
mysql2: "^3.14.0",
|
|
77
|
-
"@prisma/client": "^6.
|
|
78
|
-
prisma: "^6.
|
|
77
|
+
"@prisma/client": "^6.15.0",
|
|
78
|
+
prisma: "^6.15.0",
|
|
79
79
|
"@prisma/extension-accelerate": "^2.0.2",
|
|
80
80
|
mongoose: "^8.14.0",
|
|
81
81
|
"vite-plugin-pwa": "^1.0.1",
|
|
@@ -108,9 +108,9 @@ const dependencyVersionMap = {
|
|
|
108
108
|
"@ai-sdk/svelte": "^3.0.9",
|
|
109
109
|
"@ai-sdk/react": "^2.0.9",
|
|
110
110
|
streamdown: "^1.1.6",
|
|
111
|
-
"@orpc/server": "^1.8.
|
|
112
|
-
"@orpc/client": "^1.8.
|
|
113
|
-
"@orpc/tanstack-query": "^1.8.
|
|
111
|
+
"@orpc/server": "^1.8.6",
|
|
112
|
+
"@orpc/client": "^1.8.6",
|
|
113
|
+
"@orpc/tanstack-query": "^1.8.6",
|
|
114
114
|
"@trpc/tanstack-react-query": "^11.5.0",
|
|
115
115
|
"@trpc/server": "^11.5.0",
|
|
116
116
|
"@trpc/client": "^11.5.0",
|
|
@@ -496,8 +496,6 @@ function ensureSingleWebAndNative(frontends) {
|
|
|
496
496
|
function validateWorkersCompatibility(providedFlags, options, config) {
|
|
497
497
|
if (providedFlags.has("runtime") && options.runtime === "workers" && config.backend && config.backend !== "hono") exitWithError(`Cloudflare Workers runtime (--runtime workers) is only supported with Hono backend (--backend hono). Current backend: ${config.backend}. Please use '--backend hono' or choose a different runtime.`);
|
|
498
498
|
if (providedFlags.has("backend") && config.backend && config.backend !== "hono" && config.runtime === "workers") exitWithError(`Backend '${config.backend}' is not compatible with Cloudflare Workers runtime. Cloudflare Workers runtime is only supported with Hono backend. Please use '--backend hono' or choose a different runtime.`);
|
|
499
|
-
if (providedFlags.has("runtime") && options.runtime === "workers" && config.orm && config.orm !== "drizzle" && config.orm !== "none") exitWithError(`Cloudflare Workers runtime (--runtime workers) is only supported with Drizzle ORM (--orm drizzle) or no ORM (--orm none). Current ORM: ${config.orm}. Please use '--orm drizzle', '--orm none', or choose a different runtime.`);
|
|
500
|
-
if (providedFlags.has("orm") && config.orm && config.orm !== "drizzle" && config.orm !== "none" && config.runtime === "workers") exitWithError(`ORM '${config.orm}' is not compatible with Cloudflare Workers runtime. Cloudflare Workers runtime is only supported with Drizzle ORM or no ORM. Please use '--orm drizzle', '--orm none', or choose a different runtime.`);
|
|
501
499
|
if (providedFlags.has("runtime") && options.runtime === "workers" && config.database === "mongodb") exitWithError("Cloudflare Workers runtime (--runtime workers) is not compatible with MongoDB database. MongoDB requires Prisma or Mongoose ORM, but Workers runtime only supports Drizzle ORM. Please use a different database or runtime.");
|
|
502
500
|
if (providedFlags.has("runtime") && options.runtime === "workers" && config.dbSetup === "docker") exitWithError("Cloudflare Workers runtime (--runtime workers) is not compatible with Docker setup. Workers runtime uses serverless databases (D1) and doesn't support local Docker containers. Please use '--db-setup d1' for SQLite or choose a different runtime.");
|
|
503
501
|
if (providedFlags.has("database") && config.database === "mongodb" && config.runtime === "workers") exitWithError("MongoDB database is not compatible with Cloudflare Workers runtime. MongoDB requires Prisma or Mongoose ORM, but Workers runtime only supports Drizzle ORM. Please use a different database or runtime.");
|
|
@@ -828,8 +826,11 @@ async function getDBSetupChoice(databaseType, dbSetup, orm, backend, runtime) {
|
|
|
828
826
|
//#endregion
|
|
829
827
|
//#region src/prompts/examples.ts
|
|
830
828
|
async function getExamplesChoice(examples, database, frontends, backend, api) {
|
|
831
|
-
if (api === "none") return [];
|
|
832
829
|
if (examples !== void 0) return examples;
|
|
830
|
+
if (api === "none") {
|
|
831
|
+
if (backend === "convex") return ["todo"];
|
|
832
|
+
return [];
|
|
833
|
+
}
|
|
833
834
|
if (backend === "convex") return ["todo"];
|
|
834
835
|
if (backend === "none") return [];
|
|
835
836
|
if (database === "none") return [];
|
|
@@ -992,12 +993,11 @@ async function getORMChoice(orm, hasDatabase, database, backend, runtime) {
|
|
|
992
993
|
if (backend === "convex") return "none";
|
|
993
994
|
if (!hasDatabase) return "none";
|
|
994
995
|
if (orm !== void 0) return orm;
|
|
995
|
-
if (runtime === "workers") return "drizzle";
|
|
996
996
|
const options = [...database === "mongodb" ? [ormOptions.prisma, ormOptions.mongoose] : [ormOptions.drizzle, ormOptions.prisma]];
|
|
997
997
|
const response = await select({
|
|
998
998
|
message: "Select ORM",
|
|
999
999
|
options,
|
|
1000
|
-
initialValue: database === "mongodb" ? "prisma" : DEFAULT_CONFIG.orm
|
|
1000
|
+
initialValue: database === "mongodb" ? "prisma" : runtime === "workers" ? "drizzle" : DEFAULT_CONFIG.orm
|
|
1001
1001
|
});
|
|
1002
1002
|
if (isCancel(response)) return exitCancelled("Operation cancelled");
|
|
1003
1003
|
return response;
|
|
@@ -1330,7 +1330,7 @@ const getLatestCLIVersion = () => {
|
|
|
1330
1330
|
*/
|
|
1331
1331
|
function isTelemetryEnabled() {
|
|
1332
1332
|
const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
|
|
1333
|
-
const BTS_TELEMETRY = "
|
|
1333
|
+
const BTS_TELEMETRY = "0";
|
|
1334
1334
|
if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
|
|
1335
1335
|
if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
|
|
1336
1336
|
return true;
|
|
@@ -1338,8 +1338,8 @@ function isTelemetryEnabled() {
|
|
|
1338
1338
|
|
|
1339
1339
|
//#endregion
|
|
1340
1340
|
//#region src/utils/analytics.ts
|
|
1341
|
-
const POSTHOG_API_KEY = "
|
|
1342
|
-
const POSTHOG_HOST = "
|
|
1341
|
+
const POSTHOG_API_KEY = "random";
|
|
1342
|
+
const POSTHOG_HOST = "random";
|
|
1343
1343
|
function generateSessionId() {
|
|
1344
1344
|
const rand = Math.random().toString(36).slice(2);
|
|
1345
1345
|
const now = Date.now().toString(36);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.40.
|
|
3
|
+
"version": "2.40.3-canary.0e4f85b3",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client"
|
|
3
|
+
output = "../generated"
|
|
4
|
+
moduleFormat = "esm"
|
|
5
|
+
{{#if (eq runtime "bun")}}
|
|
6
|
+
runtime = "bun"
|
|
7
|
+
{{/if}}
|
|
8
|
+
{{#if (eq runtime "node")}}
|
|
9
|
+
runtime = "nodejs"
|
|
10
|
+
{{/if}}
|
|
11
|
+
{{#if (eq runtime "workers")}}
|
|
12
|
+
runtime = "workerd"
|
|
13
|
+
{{/if}}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
datasource db {
|
|
17
|
+
provider = "mongodb"
|
|
18
|
+
url = env("DATABASE_URL")
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client"
|
|
3
|
+
output = "../generated"
|
|
4
|
+
moduleFormat = "esm"
|
|
5
|
+
{{#if (eq runtime "bun")}}
|
|
6
|
+
runtime = "bun"
|
|
7
|
+
{{/if}}
|
|
8
|
+
{{#if (eq runtime "node")}}
|
|
9
|
+
runtime = "nodejs"
|
|
10
|
+
{{/if}}
|
|
11
|
+
{{#if (eq runtime "workers")}}
|
|
12
|
+
runtime = "workerd"
|
|
13
|
+
{{/if}}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
datasource db {
|
|
17
|
+
provider = "mysql"
|
|
18
|
+
url = env("DATABASE_URL")
|
|
19
|
+
}
|
|
@@ -2,10 +2,19 @@ generator client {
|
|
|
2
2
|
provider = "prisma-client"
|
|
3
3
|
output = "../generated"
|
|
4
4
|
moduleFormat = "esm"
|
|
5
|
+
{{#if (eq runtime "bun")}}
|
|
6
|
+
runtime = "bun"
|
|
7
|
+
{{/if}}
|
|
8
|
+
{{#if (eq runtime "node")}}
|
|
9
|
+
runtime = "nodejs"
|
|
10
|
+
{{/if}}
|
|
11
|
+
{{#if (eq runtime "workers")}}
|
|
12
|
+
runtime = "workerd"
|
|
13
|
+
{{/if}}
|
|
5
14
|
}
|
|
6
15
|
|
|
7
16
|
datasource db {
|
|
8
|
-
provider = "
|
|
17
|
+
provider = "postgresql"
|
|
9
18
|
url = env("DATABASE_URL")
|
|
10
19
|
{{#if (eq dbSetup "supabase")}}
|
|
11
20
|
directUrl = env("DIRECT_URL")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client"
|
|
3
|
+
output = "../generated"
|
|
4
|
+
moduleFormat = "esm"
|
|
5
|
+
{{#if (eq runtime "bun")}}
|
|
6
|
+
runtime = "bun"
|
|
7
|
+
{{/if}}
|
|
8
|
+
{{#if (eq runtime "node")}}
|
|
9
|
+
runtime = "nodejs"
|
|
10
|
+
{{/if}}
|
|
11
|
+
{{#if (eq runtime "workers")}}
|
|
12
|
+
runtime = "workerd"
|
|
13
|
+
{{/if}}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
datasource db {
|
|
17
|
+
provider = "sqlite"
|
|
18
|
+
url = env("DATABASE_URL")
|
|
19
|
+
}
|