@gaonjs/cli 0.65.3 → 0.65.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.
@@ -123,7 +123,7 @@ import 하면 순환 참조가 생기므로, 실제 연결은 부팅 시 프레
123
123
  | `t.enum([...] as const)` | `text + CHECK` | union type | E-4 (a) |
124
124
  | `t.uuid()` | `uuid` | `string` | |
125
125
  | `t.uuidPk()` | `uuid` | `string` | PK · `gen_random_uuid()` (E-4 (d)) |
126
- | `t.json<T>()` / `t.jsonb<T>()` | `jsonb` | `T` (제네릭) | Postgres 권장 = jsonb |
126
+ | `t.json<T>()` / `t.jsonb<T>()` | `jsonb` | `T` (제네릭) | Postgres 권장 = jsonb · 값은 **`T` 를 그대로** 넘긴다 (결정 461) |
127
127
  | `t.int()` | `integer` | `number` | 4바이트 정수 |
128
128
  | `t.smallint()` | `smallint` | `number` | 2바이트 정수 |
129
129
  | `t.float()` | `real` | `number` | 4바이트 부동소수 |
@@ -1219,6 +1219,14 @@ await Post.upsert({ id, title, body }) // onConflict 생략 = 기
1219
1219
  - **벌크 3종은 행이 아니라 `{ count }` 를 준다** (결정 90) — 반환을 `Rec[]` 처럼
1220
1220
  다루지 말 것. 삽입된 행이 필요하면 소량은 `create()`, 대량은 유니크 키 재조회.
1221
1221
  `throw` 하던 옛 계약(비 RETURNING 방언)은 폐기 — MySQL 도 그냥 `count` 를 준다.
1222
+ - **jsonb 컬럼에는 `T` 를 그대로 넣는다 — JSON 문자열로 미리 인코딩하지 말 것** (결정 461).
1223
+ `t.jsonb<string[]>()` 에는 `['a','b']` 를, `t.jsonb<string>()` 에는 `'a@b.com'` 를 넘긴다.
1224
+ 프레임웍이 방언 무관으로 직렬화하므로 `JSON.stringify` 를 손수 부르면 **이중 인코딩**돼
1225
+ 읽을 때 문자열 안에 JSON 이 든 값이 나온다. 미리 인코딩한 텍스트를 꼭 넣어야 하면
1226
+ `Model.query()` 탈출구를 쓴다. (옛 판은 이 직렬화가 mysql 에서만 돌아
1227
+ `t.jsonb<string[]>()` 이 postgres 에서 **빈 배열을 `{}` 로 조용히 저장**하거나
1228
+ `invalid input syntax for type json` 으로 죽었다 — `jsonbValues.dialect.integration.test.ts` 가
1229
+ 양 방언으로 고정한다.)
1222
1230
  - **loop 안 관계 lazy 호출 = N+1** — doctor **n-plus-one** 검사가 잡는다.
1223
1231
  목록은 `include()` 로.
1224
1232
  - **스키마 파일명은 camelCase** — 테이블 `posts_tags` → 파일 `postsTags.ts`
@@ -1345,4 +1353,5 @@ await Post.upsert({ id, title, body }) // onConflict 생략 = 기
1345
1353
  | 결정 336 | 중첩 hidden dot-path 실지원(290 대체) — 중첩 객체·type:{} 서브도큐먼트·서브도큐먼트 배열 · 직렬화 경계 상속 스레딩 · 지원 밖 위치는 fail-loud(§7.1) |
1346
1354
  | E-4 | 컬럼 타입·수식어·체이닝 확장 · `Post.query()` 정정 · Serialized 명명 |
1347
1355
  | **결정 456** | **수식어 × 빌더 매트릭스(§3.1) + `t.belongsTo(...).unique()` 신설** — "모든 타입에 적용" 이라 적고 조합표가 없어 `t.belongsTo('x').unique()` 가 migrate 를 죽였다(auction 실측). 1:1 FK 는 정당한 도메인 요구라 `unique` 는 **열고**, `default`·`check` 는 참조 무결성과 어긋나 **닫는다**(표에 이유까지 명기 · `type-tests/columnModifiers.test-d.ts` 가 매트릭스를 타입으로 고정) |
1356
+ | 결정 461 | `t.jsonb<T>()` 값 직렬화가 **방언 무관** — mysql 전용이던 탓에 pg 에서 배열이 PG 배열 리터럴로 나가 `[]`→`{}` 무신호 손상·`['a']`→throw 였다. 이제 `T` 를 그대로 넘긴다(문자열 포함 · §2·함정) |
1348
1357
  | 결정 460 | unique·PK 컬럼의 `.index()` 는 DDL 이 건너뛴다(중복) — 조용한 no-op 을 `gaon doctor` `redundant-index` **경고**로 표면화(§3 `.index()`) · 빌더·타입은 무변경(체이닝 자유는 의도된 성질) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaonjs/cli",
3
- "version": "0.65.3",
3
+ "version": "0.65.4",
4
4
  "description": "Gaon CLI — 스캐폴딩·제너레이터·마이그레이션·dev/serve/work/hub·doctor·check (bin: gaon)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,13 +32,13 @@
32
32
  "@modelcontextprotocol/sdk": "^1.29.0",
33
33
  "typescript": "^5.9.0",
34
34
  "vite": "^7.0.0",
35
- "@gaonjs/core": "0.3.0",
35
+ "@gaonjs/config": "0.26.2",
36
36
  "@gaonjs/async": "0.22.0",
37
- "@gaonjs/config": "0.26.1",
38
- "@gaonjs/web": "0.33.0",
39
- "@gaonjs/mail": "0.5.4",
40
37
  "@gaonjs/i18n": "0.5.0",
41
- "@gaonjs/data": "0.26.3"
38
+ "@gaonjs/core": "0.3.0",
39
+ "@gaonjs/mail": "0.5.4",
40
+ "@gaonjs/data": "0.26.4",
41
+ "@gaonjs/web": "0.33.0"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "node ../../node_modules/typescript/bin/tsc -p tsconfig.json && node -e \"const fs=require('fs');fs.rmSync('dist/templates/project',{recursive:true,force:true});fs.cpSync('src/templates','dist/templates',{recursive:true,filter:(s)=>!s.endsWith('.ts')});fs.rmSync('dist/templates/index.ts',{force:true})\""