@gencow/core 0.1.25 → 0.1.26

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": "@gencow/core",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "Gencow core library — defineQuery, defineMutation, reactive subscriptions",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,8 +25,7 @@
25
25
  "db:generate:fixture-basic": "drizzle-kit generate --config ./src/__tests__/fixtures/basic/drizzle.config.ts",
26
26
  "build": "tsc",
27
27
  "typecheck": "tsc --noEmit",
28
- "prepublishOnly": "npm run build",
29
- "postinstall": "tsc"
28
+ "prepublishOnly": "npm run build"
30
29
  },
31
30
  "dependencies": {
32
31
  "node-cron": "^4.2.1"
@@ -4,7 +4,7 @@
4
4
  * the same generators as `seed()` without listing every column in test fixtures.
5
5
  */
6
6
 
7
- import { getColumns, getTableName } from "drizzle-orm";
7
+ import { getTableColumns, getTableName } from "drizzle-orm";
8
8
  import type { InferInsertModel } from "drizzle-orm";
9
9
  import type { PgColumn, PgTable } from "drizzle-orm/pg-core";
10
10
  import { getTableConfig } from "drizzle-orm/pg-core";
@@ -90,7 +90,7 @@ function getAllBaseColumns(baseColumn: PgColumn): NonNullable<SeedColumn["baseCo
90
90
  * Drizzle `PgTable` → drizzle-seed `Table` (same shape as `getPostgresInfo` in drizzle-seed).
91
91
  */
92
92
  export function drizzlePgTableToSeedTable(pgTable: PgTable, schemaKey: string): SeedTable {
93
- const colsMap = getColumns(pgTable) as Record<string, PgColumn>;
93
+ const colsMap = getTableColumns(pgTable) as Record<string, PgColumn>;
94
94
  const tableConfig = getTableConfig(pgTable);
95
95
  const columns: SeedColumn[] = Object.entries(colsMap).map(([tsName, column]) => {
96
96
  const c = pgColumnForSeed(column);
@@ -133,7 +133,7 @@ export function fillPartialRowsForInsert<T extends PgTable>(
133
133
  const schemaKey = options?.schemaKey ?? getTableName(pgTable);
134
134
  const seedService = new SeedService();
135
135
  const seedTable = drizzlePgTableToSeedTable(pgTable, schemaKey);
136
- const colsMap = getColumns(pgTable) as Record<string, PgColumn>;
136
+ const colsMap = getTableColumns(pgTable) as Record<string, PgColumn>;
137
137
  const tsNames = Object.keys(colsMap);
138
138
  const baseSeed = options?.seed ?? 0;
139
139
  const count = partialRows.length;
package/dist/db.d.ts DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- * @deprecated — 레거시 싱글톤 DB 인스턴스.
3
- * 새 코드에서는 ctx.db를 사용하세요.
4
- * 서버의 createDatabase() (database.ts)가 실제 DB 연결을 관리합니다.
5
- */
6
- import { PGlite } from "@electric-sql/pglite";
7
- /** @deprecated Use ctx.db instead */
8
- export declare function createDb(dataDir?: string): Promise<{
9
- db: import("drizzle-orm/pglite").PgliteDatabase<Record<string, never>> & {
10
- $client: PGlite;
11
- };
12
- client: PGlite;
13
- }>;
package/dist/db.js DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * @deprecated — 레거시 싱글톤 DB 인스턴스.
3
- * 새 코드에서는 ctx.db를 사용하세요.
4
- * 서버의 createDatabase() (database.ts)가 실제 DB 연결을 관리합니다.
5
- */
6
- import { PGlite } from "@electric-sql/pglite";
7
- import { drizzle } from "drizzle-orm/pglite";
8
- let pgliteInstance = null;
9
- /** @deprecated Use ctx.db instead */
10
- export async function createDb(dataDir = "./data") {
11
- if (!pgliteInstance) {
12
- pgliteInstance = new PGlite(dataDir);
13
- }
14
- const db = drizzle(pgliteInstance);
15
- return { db, client: pgliteInstance };
16
- }