create-fullstack-scaffold 0.6.3 → 0.6.4

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.6.3",
3
+ "version": "0.6.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-fullstack-scaffold": "dist/cli/index.js"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "biomimic-todo-app",
3
3
  "private": true,
4
- "version": "0.6.3",
4
+ "version": "0.6.4",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "biomimic": "./dist/cli/index.js"
@@ -105,13 +105,13 @@ export async function closeDb(): Promise<void> {
105
105
  async function stampJournalIfPushBuilt(migrationsFolder: string): Promise<void> {
106
106
  if (!_client || !('execute' in _client)) return
107
107
 
108
- // todos 表在(= 当前 schema 形态、由 push 建成)。只查 todos——
109
- // tenants 仅存在于含 tenant 模块的 preset,用它做条件会漏掉全部
110
- // tenant preset 的库(0.6.2 首次部署七杀五的根因)
111
- const shape = await _client.execute(
112
- "SELECT COUNT(*) AS c FROM sqlite_master WHERE type='table' AND name='todos'"
108
+ // 普适判定:库里有任何业务表 && 账本为空 = push 建库形态。
109
+ // 不能锚定具体表名——preset 组合差异大(forum/plugin todos、
110
+ // 多数 preset 无 tenants,0.6.2/0.6.3 两次部署事故均源于此)
111
+ const bizTables = await _client.execute(
112
+ "SELECT COUNT(*) AS c FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' AND name != '__drizzle_migrations'"
113
113
  )
114
- if (Number(shape.rows[0]?.c ?? 0) < 1) return
114
+ if (Number(bizTables.rows[0]?.c ?? 0) < 1) return
115
115
 
116
116
  const journalTable = await _client.execute(
117
117
  "SELECT COUNT(*) AS c FROM sqlite_master WHERE type='table' AND name='__drizzle_migrations'"