create-fullstack-scaffold 0.5.1 → 0.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fullstack-scaffold",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-fullstack-scaffold": "dist/cli/index.js"
@@ -14,6 +14,8 @@ export default defineConfig({
14
14
  out: './drizzle',
15
15
  dialect: 'sqlite',
16
16
  dbCredentials: {
17
+ // 与运行时保持同一库文件:drizzle-kit 在无 NODE_ENV 下执行时
18
+ // config.sqlitePath 会解析为 development.db,这里不能写死 app.db
17
19
  url: config.sqlitePath || './data/app.db',
18
20
  },
19
21
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "biomimic-todo-app",
3
3
  "private": true,
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "biomimic": "./dist/cli/index.js"
@@ -66,9 +66,7 @@ export function getAppConfig(): AppConfig {
66
66
  database: {
67
67
  driver: isCloudflare ? 'd1' : dbDriver,
68
68
  sqlitePath:
69
- typeof process !== 'undefined'
70
- ? process.env.SQLITE_PATH || `./data/${nodeEnv}.db`
71
- : undefined,
69
+ typeof process !== 'undefined' ? process.env.SQLITE_PATH || './data/app.db' : undefined,
72
70
  mysqlHost: typeof process !== 'undefined' ? process.env.MYSQL_HOST || 'localhost' : undefined,
73
71
  mysqlPort:
74
72
  typeof process !== 'undefined' ? parseInt(process.env.MYSQL_PORT || '3306', 10) : undefined,
@@ -202,7 +202,9 @@ export async function startServer() {
202
202
  await initializeDatabase()
203
203
  bootstrapLog.info({}, 'Database ready')
204
204
  } catch (err) {
205
- bootstrapLog.error({ err }, 'Database initialization failed')
205
+ // pino 走异步 thread-stream transport,process.exit 前不 flush——
206
+ // 生产致命错误必须同步 console.error,否则静默死(exit 1 零输出)
207
+ console.error('Database initialization failed:', err)
206
208
  process.exit(1)
207
209
  }
208
210