create-start-kit-dev 0.1.4 → 0.1.5

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.mjs +15 -9
  2. package/package.json +5 -1
package/dist/index.mjs CHANGED
@@ -179,6 +179,12 @@ async function runBranding(state) {
179
179
 
180
180
  //#endregion
181
181
  //#region src/phases/database.ts
182
+ const ENV_PLACEHOLDERS = {
183
+ RESEND_API_KEY: "re_dummy_replace_me",
184
+ S3_ACCESS_KEY_ID: "dummy_replace_me",
185
+ S3_SECRET_ACCESS_KEY: "dummy_replace_me",
186
+ S3_BUCKET: "dummy-bucket"
187
+ };
182
188
  async function runDatabase(state) {
183
189
  const dbChoice = await select({
184
190
  message: "Do you already have a PostgreSQL database?",
@@ -241,18 +247,18 @@ async function runDatabase(state) {
241
247
  if (isCancel(shouldMigrate)) process.exit(0);
242
248
  if (shouldMigrate) {
243
249
  const ms = spinner();
244
- ms.start("Running migrations...");
250
+ ms.start("Pushing schema to database...");
245
251
  const envVars = readEnvFile(".env");
246
- if (!envVars.DATABASE_URL) {
247
- envVars.DATABASE_URL = databaseUrl;
248
- writeEnvFile(".env", envVars);
249
- }
250
- const migrateResult = await exec("bun run db:push");
252
+ envVars.DATABASE_URL = envVars.DATABASE_URL || databaseUrl;
253
+ envVars.BETTER_AUTH_SECRET = envVars.BETTER_AUTH_SECRET || generateSecret();
254
+ for (const [key, value] of Object.entries(ENV_PLACEHOLDERS)) envVars[key] = envVars[key] || value;
255
+ writeEnvFile(".env", envVars);
256
+ const migrateResult = await exec("bun --env-file=.env drizzle-kit push --force");
251
257
  if (migrateResult.exitCode !== 0) {
252
- ms.stop("Migration failed");
258
+ ms.stop("Schema push failed");
253
259
  log.error(migrateResult.stderr);
254
- log.info("You can run migrations later with: bun run db:push");
255
- } else ms.stop("Migrations applied!");
260
+ log.info("You can push later with: bun run db:push");
261
+ } else ms.stop("Schema pushed to database!");
256
262
  }
257
263
  state.database = {
258
264
  provider: dbChoice,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-start-kit-dev",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "CLI for scaffolding and configuring Start Kit projects",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -48,6 +48,10 @@
48
48
  "tsdown": "^0.20.3",
49
49
  "typescript": "^5.9.3"
50
50
  },
51
+ "publishConfig": {
52
+ "access": "public",
53
+ "tag": "latest"
54
+ },
51
55
  "engines": {
52
56
  "bun": ">=1.0.0"
53
57
  }