create-better-t-stack 2.22.9 → 2.22.10
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 +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3609,7 +3609,7 @@ This project uses Convex as a backend. You'll need to set up Convex before runni
|
|
|
3609
3609
|
${packageManagerRunCmd} dev:setup
|
|
3610
3610
|
\`\`\`
|
|
3611
3611
|
|
|
3612
|
-
Follow the prompts to create a new Convex project and connect it to your application.` : generateDatabaseSetup(database, auth, packageManagerRunCmd, orm)}
|
|
3612
|
+
Follow the prompts to create a new Convex project and connect it to your application.` : generateDatabaseSetup(database, auth, packageManagerRunCmd, orm, options.dbSetup)}
|
|
3613
3613
|
|
|
3614
3614
|
Then, run the development server:
|
|
3615
3615
|
|
|
@@ -3764,15 +3764,16 @@ function generateFeaturesList(database, auth, addons, orm, runtime, frontend, ba
|
|
|
3764
3764
|
else if (addon === "turborepo") addonsList.push("- **Turborepo** - Optimized monorepo build system");
|
|
3765
3765
|
return addonsList.join("\n");
|
|
3766
3766
|
}
|
|
3767
|
-
function generateDatabaseSetup(database, _auth, packageManagerRunCmd, orm) {
|
|
3767
|
+
function generateDatabaseSetup(database, _auth, packageManagerRunCmd, orm, dbSetup) {
|
|
3768
3768
|
if (database === "none") return "";
|
|
3769
3769
|
let setup = "## Database Setup\n\n";
|
|
3770
3770
|
if (database === "sqlite") setup += `This project uses SQLite${orm === "drizzle" ? " with Drizzle ORM" : orm === "prisma" ? " with Prisma" : ` with ${orm}`}.
|
|
3771
3771
|
|
|
3772
3772
|
1. Start the local SQLite database:
|
|
3773
|
-
|
|
3773
|
+
${dbSetup === "d1" ? "Local development for a Cloudflare D1 database will already be running as part of the `wrangler dev` command." : `\`\`\`bash
|
|
3774
3774
|
cd apps/server && ${packageManagerRunCmd} db:local
|
|
3775
3775
|
\`\`\`
|
|
3776
|
+
`}
|
|
3776
3777
|
|
|
3777
3778
|
2. Update your \`.env\` file in the \`apps/server\` directory with the appropriate connection details if needed.
|
|
3778
3779
|
`;
|
|
@@ -4110,7 +4111,7 @@ async function updateServerPackageJson(projectDir, options) {
|
|
|
4110
4111
|
if (!serverPackageJson.scripts) serverPackageJson.scripts = {};
|
|
4111
4112
|
const scripts = serverPackageJson.scripts;
|
|
4112
4113
|
if (options.database !== "none") {
|
|
4113
|
-
if (options.database === "sqlite" && options.orm === "drizzle") scripts["db:local"] = "turso dev --db-file local.db";
|
|
4114
|
+
if (options.database === "sqlite" && options.orm === "drizzle" && options.dbSetup !== "d1") scripts["db:local"] = "turso dev --db-file local.db";
|
|
4114
4115
|
if (options.orm === "prisma") {
|
|
4115
4116
|
scripts["db:push"] = "prisma db push --schema ./prisma/schema";
|
|
4116
4117
|
scripts["db:studio"] = "prisma studio";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.10",
|
|
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",
|