create-fullstack-scaffold 0.6.2 → 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.2",
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.2",
4
+ "version": "0.6.4",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "biomimic": "./dist/cli/index.js"
@@ -105,11 +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
- // 核心表 + 租户表都在(= 当前 schema 形态、由 push 建成)
109
- const shape = await _client.execute(
110
- "SELECT COUNT(*) AS c FROM sqlite_master WHERE type='table' AND name IN ('todos','tenants')"
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'"
111
113
  )
112
- if (Number(shape.rows[0]?.c ?? 0) < 2) return
114
+ if (Number(bizTables.rows[0]?.c ?? 0) < 1) return
113
115
 
114
116
  const journalTable = await _client.execute(
115
117
  "SELECT COUNT(*) AS c FROM sqlite_master WHERE type='table' AND name='__drizzle_migrations'"