gencow 0.1.106 → 0.1.107

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/bin/gencow.mjs CHANGED
@@ -796,6 +796,8 @@ export default defineConfig({
796
796
  dialect: "postgresql",
797
797
  schema: ["./gencow/schema.ts", "./gencow/auth-schema.ts"],
798
798
  out: "./gencow/migrations",
799
+ // _system_* 테이블은 Gencow 플랫폼 내부 테이블 — drizzle-kit이 무시하도록 필터링
800
+ tablesFilter: ["!_system_*"],
799
801
  // generate는 DB 연결 없이 스키마 파일만 비교하여 SQL 생성.
800
802
  // push(로컬 전용)는 DB 연결 필요.
801
803
  ...(process.env.DATABASE_URL
package/core/index.js CHANGED
@@ -1948,10 +1948,8 @@ function crud(table, options) {
1948
1948
  return conditions.length > 0 ? and(...conditions) : void 0;
1949
1949
  }
1950
1950
  async function fetchListWithTotal(db, whereClause) {
1951
- const [data, countResult] = await Promise.all([
1952
- db.select().from(anyTable).where(whereClause).orderBy(desc(defaultOrderCol)),
1953
- db.select({ count: drizzleCount() }).from(anyTable).where(whereClause)
1954
- ]);
1951
+ const data = await db.select().from(anyTable).where(whereClause).orderBy(desc(defaultOrderCol));
1952
+ const countResult = await db.select({ count: drizzleCount() }).from(anyTable).where(whereClause);
1955
1953
  return { data, total: Number(countResult[0]?.count ?? 0) };
1956
1954
  }
1957
1955
  const listDef = query(`${prefix}.list`, {
@@ -1977,10 +1975,8 @@ function crud(table, options) {
1977
1975
  } else {
1978
1976
  orderByClause = desc(defaultOrderCol);
1979
1977
  }
1980
- const [results, countResult] = await Promise.all([
1981
- ctx.db.select().from(anyTable).where(whereClause).orderBy(orderByClause).limit(limit).offset(offset),
1982
- ctx.db.select({ count: drizzleCount() }).from(anyTable).where(whereClause)
1983
- ]);
1978
+ const results = await ctx.db.select().from(anyTable).where(whereClause).orderBy(orderByClause).limit(limit).offset(offset);
1979
+ const countResult = await ctx.db.select({ count: drizzleCount() }).from(anyTable).where(whereClause);
1984
1980
  return {
1985
1981
  data: results,
1986
1982
  total: Number(countResult[0]?.count ?? 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gencow",
3
- "version": "0.1.106",
3
+ "version": "0.1.107",
4
4
  "description": "Gencow — AI Backend Engine",
5
5
  "type": "module",
6
6
  "bin": {
package/server/index.js CHANGED
@@ -1999,10 +1999,8 @@ function crud(table, options) {
1999
1999
  return conditions.length > 0 ? and(...conditions) : void 0;
2000
2000
  }
2001
2001
  async function fetchListWithTotal(db, whereClause) {
2002
- const [data, countResult] = await Promise.all([
2003
- db.select().from(anyTable).where(whereClause).orderBy(desc(defaultOrderCol)),
2004
- db.select({ count: drizzleCount() }).from(anyTable).where(whereClause)
2005
- ]);
2002
+ const data = await db.select().from(anyTable).where(whereClause).orderBy(desc(defaultOrderCol));
2003
+ const countResult = await db.select({ count: drizzleCount() }).from(anyTable).where(whereClause);
2006
2004
  return { data, total: Number(countResult[0]?.count ?? 0) };
2007
2005
  }
2008
2006
  const listDef = query(`${prefix}.list`, {
@@ -2028,10 +2026,8 @@ function crud(table, options) {
2028
2026
  } else {
2029
2027
  orderByClause = desc(defaultOrderCol);
2030
2028
  }
2031
- const [results, countResult] = await Promise.all([
2032
- ctx.db.select().from(anyTable).where(whereClause).orderBy(orderByClause).limit(limit).offset(offset),
2033
- ctx.db.select({ count: drizzleCount() }).from(anyTable).where(whereClause)
2034
- ]);
2029
+ const results = await ctx.db.select().from(anyTable).where(whereClause).orderBy(orderByClause).limit(limit).offset(offset);
2030
+ const countResult = await ctx.db.select({ count: drizzleCount() }).from(anyTable).where(whereClause);
2035
2031
  return {
2036
2032
  data: results,
2037
2033
  total: Number(countResult[0]?.count ?? 0)