sonamu 0.8.24 → 0.8.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.
Files changed (88) hide show
  1. package/dist/api/__tests__/config.test.js +189 -0
  2. package/dist/api/config.d.ts.map +1 -1
  3. package/dist/api/config.js +7 -2
  4. package/dist/api/sonamu.d.ts.map +1 -1
  5. package/dist/api/sonamu.js +14 -10
  6. package/dist/auth/index.d.ts +1 -0
  7. package/dist/auth/index.d.ts.map +1 -1
  8. package/dist/auth/index.js +2 -1
  9. package/dist/auth/knex-adapter.d.ts +23 -0
  10. package/dist/auth/knex-adapter.d.ts.map +1 -0
  11. package/dist/auth/knex-adapter.js +163 -0
  12. package/dist/auth/plugins/wrappers/admin.d.ts +2 -2
  13. package/dist/bin/__tests__/ts-loader-register.test.js +45 -0
  14. package/dist/bin/cli.js +47 -9
  15. package/dist/bin/ts-loader-register.js +3 -29
  16. package/dist/bin/ts-loader-registration.d.ts +2 -0
  17. package/dist/bin/ts-loader-registration.d.ts.map +1 -0
  18. package/dist/bin/ts-loader-registration.js +42 -0
  19. package/dist/cone/cone-generator.js +3 -3
  20. package/dist/database/puri-subset.test-d.js +9 -1
  21. package/dist/database/puri-subset.types.d.ts +1 -1
  22. package/dist/database/puri-subset.types.d.ts.map +1 -1
  23. package/dist/database/puri-subset.types.js +1 -1
  24. package/dist/testing/fixture-generator.js +5 -5
  25. package/dist/ui/ai-client.js +2 -2
  26. package/dist/ui/api.d.ts.map +1 -1
  27. package/dist/ui/api.js +14 -14
  28. package/dist/ui/cdd-service.d.ts +15 -18
  29. package/dist/ui/cdd-service.d.ts.map +1 -1
  30. package/dist/ui/cdd-service.js +246 -222
  31. package/dist/ui/cdd-types.d.ts +41 -68
  32. package/dist/ui/cdd-types.d.ts.map +1 -1
  33. package/dist/ui/cdd-types.js +2 -2
  34. package/dist/ui-web/assets/index-CKo0Z2Iu.css +1 -0
  35. package/dist/ui-web/assets/{index-CxiydzeC.js → index-DK-2aacv.js} +83 -83
  36. package/dist/ui-web/index.html +2 -2
  37. package/package.json +6 -2
  38. package/src/api/__tests__/config.test.ts +225 -0
  39. package/src/api/config.ts +10 -4
  40. package/src/api/sonamu.ts +16 -13
  41. package/src/auth/index.ts +1 -0
  42. package/src/auth/knex-adapter.ts +208 -0
  43. package/src/bin/__tests__/ts-loader-register.test.ts +62 -0
  44. package/src/bin/cli.ts +52 -9
  45. package/src/bin/ts-loader-register.ts +2 -32
  46. package/src/bin/ts-loader-registration.ts +55 -0
  47. package/src/cone/cone-generator.ts +2 -2
  48. package/src/database/puri-subset.test-d.ts +102 -0
  49. package/src/database/puri-subset.types.ts +1 -1
  50. package/src/skills/commands/sonamu-skills.md +20 -0
  51. package/src/skills/sonamu/SKILL.md +179 -137
  52. package/src/skills/sonamu/ai-agents.md +69 -69
  53. package/src/skills/sonamu/api.md +147 -147
  54. package/src/skills/sonamu/auth-migration.md +220 -220
  55. package/src/skills/sonamu/auth-plugins.md +83 -83
  56. package/src/skills/sonamu/auth.md +106 -106
  57. package/src/skills/sonamu/cdd.md +65 -200
  58. package/src/skills/sonamu/cone.md +138 -138
  59. package/src/skills/sonamu/config.md +191 -191
  60. package/src/skills/sonamu/create-sonamu.md +66 -66
  61. package/src/skills/sonamu/database.md +158 -158
  62. package/src/skills/sonamu/entity-basic.md +292 -293
  63. package/src/skills/sonamu/entity-relations.md +246 -246
  64. package/src/skills/sonamu/entity-validation-checklist.md +124 -124
  65. package/src/skills/sonamu/fixture-cli.md +231 -231
  66. package/src/skills/sonamu/framework-change.md +37 -37
  67. package/src/skills/sonamu/frontend.md +223 -223
  68. package/src/skills/sonamu/i18n.md +82 -82
  69. package/src/skills/sonamu/migration.md +77 -77
  70. package/src/skills/sonamu/model.md +222 -222
  71. package/src/skills/sonamu/naite.md +86 -86
  72. package/src/skills/sonamu/project-init.md +228 -228
  73. package/src/skills/sonamu/puri.md +122 -122
  74. package/src/skills/sonamu/scaffolding.md +154 -154
  75. package/src/skills/sonamu/skill-contribution.md +124 -124
  76. package/src/skills/sonamu/subset.md +46 -46
  77. package/src/skills/sonamu/tasks.md +82 -82
  78. package/src/skills/sonamu/testing-devrunner.md +147 -147
  79. package/src/skills/sonamu/testing.md +673 -673
  80. package/src/skills/sonamu/upsert.md +79 -79
  81. package/src/skills/sonamu/vector.md +67 -67
  82. package/src/testing/fixture-generator.ts +4 -4
  83. package/src/ui/ai-client.ts +1 -1
  84. package/src/ui/api.ts +18 -17
  85. package/src/ui/cdd-service.ts +264 -254
  86. package/src/ui/cdd-types.ts +40 -75
  87. package/dist/ui-web/assets/index-BrQKU3j9.css +0 -1
  88. package/src/skills/sonamu/workflow.md +0 -317
@@ -1,32 +1,32 @@
1
1
  ---
2
2
  name: sonamu-entity-validation-checklist
3
- description: Entity 생성 필수 검증 체크리스트. entity.json 검증(인덱스 type, Subset FieldExpr, 중복 컨럼, Boolean dbDefault), 필수 파일 생성, sync, migration, scaffolding 단계별 검증. Use when entity.json validation fails or verifying entity creation steps.
3
+ description: Required validation checklist after entity creation. Covers entity.json validation (index type, Subset FieldExpr, duplicate columns, Boolean dbDefault), required file generation, sync, migration, and scaffolding steps. Use when entity.json validation fails or verifying entity creation steps.
4
4
  ---
5
5
 
6
- # Entity 생성 검증 체크리스트
6
+ # Entity Creation Validation Checklist
7
7
 
8
- Entity를 생성한 반드시 다음 단계를 순서대로 수행하세요. 단계를 건너뛰면 scaffolding 오류가 발생합니다.
8
+ After creating an entity, you must perform the following steps in order. Skipping any step will cause scaffolding errors.
9
9
 
10
- ## 전체 워크플로우
10
+ ## Overall Workflow
11
11
 
12
12
  ```
13
- 1. stub 생성
14
- 2. entity.json 작성
15
- 3. 자동 검증 실행 ( 체크리스트)
16
- 4. model.ts, types.ts 생성
17
- 5. sync 실행
18
- 6. migration 생성
19
- 7. migration apply
20
- 8. scaffolding 실행
13
+ 1. Generate stub
14
+ 2. Write entity.json
15
+ 3. Run automated validation (this checklist)
16
+ 4. Create model.ts, types.ts
17
+ 5. Run sync
18
+ 6. Create migration
19
+ 7. Apply migration
20
+ 8. Run scaffolding
21
21
  ```
22
22
 
23
- ## PHASE 1: entity.json 검증 (sync )
23
+ ## PHASE 1: entity.json Validation (Before Sync)
24
24
 
25
- Entity.json 파일을 작성한 직후, **sync 실행 전에** 다음을 검증하세요.
25
+ Immediately after writing your entity.json file, validate the following **before running sync**.
26
26
 
27
- ### 1.1 Index 검증
27
+ ### 1.1 Index Validation
28
28
 
29
- **모든 index `type` 필드가 있는가?**
29
+ **Does every index have a `type` field?**
30
30
 
31
31
  ```json
32
32
  // DO NOT - Incorrect
@@ -40,50 +40,50 @@ Entity.json 파일을 작성한 직후, **sync 실행 전에** 다음을 검증
40
40
  ]
41
41
  ```
42
42
 
43
- **검증 방법:**
43
+ **How to validate:**
44
44
  ```bash
45
- # 모든 entity.json에서 type 없는 index 찾기
45
+ # Find indexes without type in all entity.json files
46
46
  grep -r '"indexes"' packages/api/src/application/*/\*.entity.json | \
47
47
  xargs -I {} sh -c 'grep -L "\"type\":" {}'
48
48
  ```
49
49
 
50
- ### 1.2 Subset 검증
50
+ ### 1.2 Subset Validation
51
51
 
52
- **Foreign key를 직접 참조하지 않았는가?**
52
+ **Are you avoiding direct foreign key references?**
53
53
 
54
54
  ```json
55
- // DO NOT - Incorrect: foreign key 직접 참조
55
+ // DO NOT - Incorrect: direct foreign key reference
56
56
  "subsets": {
57
57
  "A": ["id", "user_id", "task_id"]
58
58
  }
59
59
 
60
- // DO - Correct: relation을 통한 참조 (Sonamu .id 참조 시 자동 최적화)
60
+ // DO - Correct: reference through relation (Sonamu auto-optimizes when only .id is referenced)
61
61
  "subsets": {
62
62
  "A": ["id", "user.id", "task.id"]
63
63
  }
64
64
  ```
65
65
 
66
- **규칙:**
66
+ **Rules:**
67
67
  - `{relation_name}_id` → `{relation_name}.id`
68
- - BelongsToOne relation 있으면 반드시 `relation.id` 형식 사용
69
- - Sonamu `.id`만 참조하는 경우 FK 컬럼을 직접 읽어 JOIN을 생략하는 최적화 수행
68
+ - If a BelongsToOne relation exists, always use `relation.id` format
69
+ - Sonamu optimizes by reading the FK column directly and skipping JOINs when only `.id` is referenced
70
70
 
71
- **검증 방법:**
71
+ **How to validate:**
72
72
  ```bash
73
- # entity.json에서 _id로 끝나는 subset 필드 찾기
73
+ # Find subset fields ending in _id in entity.json
74
74
  grep -A 20 '"subsets"' your-entity.entity.json | grep '_id"'
75
75
  ```
76
76
 
77
- **실제 동작 코드 참고:**
77
+ **Reference working code:**
78
78
  - `sonamu/examples/miomock/api/src/application/project/project.entity.json`
79
79
  - `sonamu/examples/miomock/api/src/application/employee/employee.entity.json`
80
80
 
81
- ### 1.3 Subset A 완전성 검증
81
+ ### 1.3 Subset A Completeness Validation
82
82
 
83
- **Subset A 모든 필드가 포함되어 있는가?**
83
+ **Does Subset A include all fields?**
84
84
 
85
85
  ```json
86
- // DO - Correct: 모든 props 포함
86
+ // DO - Correct: all props included
87
87
  {
88
88
  "props": [
89
89
  { "name": "id" },
@@ -103,20 +103,20 @@ grep -A 20 '"subsets"' your-entity.entity.json | grep '_id"'
103
103
  }
104
104
  ```
105
105
 
106
- **검증 항목:**
107
- - [ ] 모든 일반 필드 포함
108
- - [ ] 모든 relation은 최소한 `.id` 포함
109
- - [ ] nullable 아닌 relation은 필수 필드들도 포함
106
+ **Validation checklist:**
107
+ - [ ] All regular fields included
108
+ - [ ] All relations include at least `.id`
109
+ - [ ] Non-nullable relations also include required fields
110
110
 
111
- ### 1.4 중복 컬럼 검증
111
+ ### 1.4 Duplicate Column Validation
112
112
 
113
- **BelongsToOne relation과 foreign key를 중복 정의하지 않았는가?**
113
+ **Are BelongsToOne relations and their foreign keys not defined twice?**
114
114
 
115
115
  ```json
116
- // DO NOT - Incorrect: 중복 정의
116
+ // DO NOT - Incorrect: duplicate definition
117
117
  {
118
118
  "props": [
119
- { "name": "user_id", "type": "integer" }, // 삭제해야
119
+ { "name": "user_id", "type": "integer" }, // should be removed
120
120
  {
121
121
  "type": "relation",
122
122
  "name": "user",
@@ -126,7 +126,7 @@ grep -A 20 '"subsets"' your-entity.entity.json | grep '_id"'
126
126
  ]
127
127
  }
128
128
 
129
- // DO - Correct: relation 정의
129
+ // DO - Correct: define relation only
130
130
  {
131
131
  "props": [
132
132
  {
@@ -139,16 +139,16 @@ grep -A 20 '"subsets"' your-entity.entity.json | grep '_id"'
139
139
  }
140
140
  ```
141
141
 
142
- **검증 방법:**
142
+ **How to validate:**
143
143
  ```bash
144
- # BelongsToOne relation 있는데 _id 필드도 있는지 확인
144
+ # Check if a BelongsToOne relation also has an _id field
145
145
  grep -A 5 '"relationType": "BelongsToOne"' your-entity.entity.json
146
146
  grep '"name": ".*_id"' your-entity.entity.json
147
147
  ```
148
148
 
149
- ### 1.5 Boolean dbDefault 검증
149
+ ### 1.5 Boolean dbDefault Validation
150
150
 
151
- **Boolean 타입의 dbDefault 문자열 "true"/"false"인가?**
151
+ **Is the dbDefault for Boolean types the string "true"/"false"?**
152
152
 
153
153
  ```json
154
154
  // DO NOT - Incorrect
@@ -160,31 +160,31 @@ grep '"name": ".*_id"' your-entity.entity.json
160
160
  { "name": "is_deleted", "type": "boolean", "dbDefault": "false" }
161
161
  ```
162
162
 
163
- ### 1.6 OrderBy Enum 검증
163
+ ### 1.6 OrderBy Enum Validation
164
164
 
165
- **OrderBy enum `id-desc`만 있는가?**
165
+ **Does the OrderBy enum contain only `id-desc`?**
166
166
 
167
167
  ```json
168
- // DO NOT - Incorrect: scaffolding 오류 발생!
168
+ // DO NOT - Incorrect: causes scaffolding errors!
169
169
  "enums": {
170
170
  "ProductOrderBy": {
171
- "id-desc": "ID최신순",
172
- "name-asc": "이름순",
173
- "created_at-desc": "등록일순"
171
+ "id-desc": "ID Latest",
172
+ "name-asc": "By Name",
173
+ "created_at-desc": "By Registration Date"
174
174
  }
175
175
  }
176
176
 
177
177
  // DO - Correct
178
178
  "enums": {
179
- "ProductOrderBy": { "id-desc": "ID최신순" }
179
+ "ProductOrderBy": { "id-desc": "ID Latest" }
180
180
  }
181
181
  ```
182
182
 
183
- **이유:** Scaffolding이 생성하는 model 코드는 `id-desc`만 처리합니다.
183
+ **Reason:** The model code generated by scaffolding only handles `id-desc`.
184
184
 
185
- ### 1.7 Enum dbDefault 검증
185
+ ### 1.7 Enum dbDefault Validation
186
186
 
187
- **Enum 타입의 dbDefault 이스케이프된 큰따옴표로 감싸져 있는가?**
187
+ **Is the dbDefault for Enum types wrapped in escaped double quotes?**
188
188
 
189
189
  ```json
190
190
  // DO NOT - Incorrect
@@ -195,36 +195,36 @@ grep '"name": ".*_id"' your-entity.entity.json
195
195
  { "name": "status", "type": "enum", "id": "Status", "dbDefault": "\"pending\"" }
196
196
  ```
197
197
 
198
- ## PHASE 2: 필수 파일 생성 검증
198
+ ## PHASE 2: Required File Generation Validation
199
199
 
200
- ### 2.1 model.ts 파일 생성
200
+ ### 2.1 model.ts File Creation
201
201
 
202
- **entity 폴더에 `{entity}.model.ts` 파일이 있는가?**
202
+ **Does the entity folder contain a `{entity}.model.ts` file?**
203
203
 
204
204
  ```bash
205
- # 확인
205
+ # Check
206
206
  ls packages/api/src/application/your-entity/your-entity.model.ts
207
207
  ```
208
208
 
209
- **없으면 수동 생성 필요** (다른 entity model.ts 참고)
209
+ **If missing, manual creation is required** (refer to another entity's model.ts)
210
210
 
211
- 필수 메서드:
211
+ Required methods:
212
212
  - `findById`
213
213
  - `findOne`
214
214
  - `findMany`
215
215
  - `save`
216
216
  - `del`
217
217
 
218
- ### 2.2 types.ts 파일 생성
218
+ ### 2.2 types.ts File Creation
219
219
 
220
- **entity 폴더에 `{entity}.types.ts` 파일이 있는가?**
220
+ **Does the entity folder contain a `{entity}.types.ts` file?**
221
221
 
222
222
  ```bash
223
- # 확인
223
+ # Check
224
224
  ls packages/api/src/application/your-entity/your-entity.types.ts
225
225
  ```
226
226
 
227
- **필수 내용:**
227
+ **Required content:**
228
228
  ```typescript
229
229
  import { z } from "zod";
230
230
  import {
@@ -235,7 +235,7 @@ import {
235
235
  export const YourEntityListParams = YourEntityBaseListParams;
236
236
  export type YourEntityListParams = z.infer<typeof YourEntityListParams>;
237
237
 
238
- // 기본 패턴 (relation 없음)
238
+ // Basic pattern (no relations)
239
239
  export const YourEntitySaveParams = YourEntityBaseSchema.partial({
240
240
  id: true,
241
241
  created_at: true,
@@ -243,9 +243,9 @@ export const YourEntitySaveParams = YourEntityBaseSchema.partial({
243
243
  export type YourEntitySaveParams = z.infer<typeof YourEntitySaveParams>;
244
244
  ```
245
245
 
246
- **ManyToMany relation 있는 경우:**
246
+ **If a ManyToMany relation exists:**
247
247
  ```typescript
248
- // ManyToMany 관계: {relation_name}_ids 배열 추가
248
+ // ManyToMany relation: add {relation_name}_ids array
249
249
  export const YourEntitySaveParams = YourEntityBaseSchema.partial({
250
250
  id: true,
251
251
  created_at: true,
@@ -256,29 +256,29 @@ export const YourEntitySaveParams = YourEntityBaseSchema.partial({
256
256
  export type YourEntitySaveParams = z.infer<typeof YourEntitySaveParams>;
257
257
  ```
258
258
 
259
- **실제 동작 코드 참고:**
260
- - `sonamu/examples/miomock/api/src/application/project/project.types.ts` - ManyToMany 예시
261
- - `sonamu/examples/miomock/api/src/application/employee/employee.types.ts` - 기본 패턴
259
+ **Reference working code:**
260
+ - `sonamu/examples/miomock/api/src/application/project/project.types.ts` - ManyToMany example
261
+ - `sonamu/examples/miomock/api/src/application/employee/employee.types.ts` - basic pattern
262
262
 
263
- ## PHASE 3: Sync 실행 검증
263
+ ## PHASE 3: Sync Execution and Validation
264
264
 
265
- ### 3.1 Sync 실행
265
+ ### 3.1 Run Sync
266
266
 
267
267
  ```bash
268
268
  cd packages/api
269
269
  pnpm sonamu sync
270
270
  ```
271
271
 
272
- ### 3.2 Sync 결과 검증
272
+ ### 3.2 Sync Result Validation
273
273
 
274
- **sonamu.lock에 3 파일이 모두 등록되었는가?**
274
+ **Are all 3 files registered in sonamu.lock?**
275
275
 
276
276
  ```bash
277
- # 확인
277
+ # Check
278
278
  grep "your-entity" packages/api/sonamu.lock
279
279
  ```
280
280
 
281
- **기대 결과:**
281
+ **Expected result:**
282
282
  ```json
283
283
  [
284
284
  {
@@ -296,102 +296,102 @@ grep "your-entity" packages/api/sonamu.lock
296
296
  ]
297
297
  ```
298
298
 
299
- ### 3.3 Web 패키지 동기화 검증
299
+ ### 3.3 Web Package Sync Validation
300
300
 
301
- **web 패키지에 필요한 파일들이 생성되었는가?**
301
+ **Have the required files been generated in the web package?**
302
302
 
303
303
  ```bash
304
- # Service 생성 확인
304
+ # Check service generation
305
305
  grep "YourEntityService" packages/web/src/services/services.generated.ts
306
306
 
307
- # Component 생성 확인
307
+ # Check component generation
308
308
  ls packages/web/src/components/your-entity/
309
309
 
310
- # Route 생성 확인
310
+ # Check route generation
311
311
  ls packages/web/src/routes/admin/your-entities/
312
312
  ```
313
313
 
314
- ### 3.4 i18n 생성 검증
314
+ ### 3.4 i18n Key Generation Validation
315
315
 
316
- **Foreign key 필드의 라벨이 생성되었는가?**
316
+ **Have labels been generated for foreign key fields?**
317
317
 
318
318
  ```bash
319
- # 확인
319
+ # Check
320
320
  grep "entity.YourEntity" packages/web/src/i18n/sd.generated.ts
321
321
  ```
322
322
 
323
- ## PHASE 4: Migration 검증
323
+ ## PHASE 4: Migration Validation
324
324
 
325
- ### 4.1 Migration 파일 생성
325
+ ### 4.1 Create Migration File
326
326
 
327
327
  ```bash
328
328
  cd packages/api
329
329
  pnpm sonamu migration:create
330
330
  ```
331
331
 
332
- ### 4.2 Migration 파일 검증
332
+ ### 4.2 Migration File Validation
333
333
 
334
- **생성된 migration 파일 확인:**
334
+ **Check the generated migration file:**
335
335
 
336
336
  ```bash
337
337
  ls packages/api/src/migrations/*_create__your_entities.ts
338
338
  ```
339
339
 
340
- **검증 항목:**
341
- - [ ] 테이블명이 올바른가? (복수형, snake_case)
342
- - [ ] 모든 컬럼이 정의되었는가?
343
- - [ ] Foreign key 제약조건이 있는가?
344
- - [ ] Index가 생성되는가?
345
- - [ ] Boolean 컬럼의 default 올바른가? (true/false)
340
+ **Validation checklist:**
341
+ - [ ] Is the table name correct? (plural, snake_case)
342
+ - [ ] Are all columns defined?
343
+ - [ ] Are foreign key constraints present?
344
+ - [ ] Are indexes created?
345
+ - [ ] Is the default for Boolean columns correct? (true/false)
346
346
 
347
347
  ### 4.3 Migration Dry-run
348
348
 
349
349
  ```bash
350
- # Migration 적용 SQL 확인
350
+ # Check SQL before applying migration
351
351
  cd packages/api
352
352
  pnpm sonamu migration:latest --dry-run
353
353
  ```
354
354
 
355
- **확인 사항:**
356
- - SQL 문법 오류 없음
357
- - 중복 컬럼 정의 없음
358
- - Boolean default 타입 오류 없음
355
+ **Check for:**
356
+ - No SQL syntax errors
357
+ - No duplicate column definitions
358
+ - No Boolean default type errors
359
359
 
360
- ## PHASE 5: Scaffolding 검증
360
+ ## PHASE 5: Scaffolding Validation
361
361
 
362
- ### 5.1 Scaffolding 실행 전 체크
362
+ ### 5.1 Pre-Scaffolding Check
363
363
 
364
- **모든 이전 단계가 완료되었는가?**
364
+ **Have all previous steps been completed?**
365
365
 
366
- - [ ] entity.json 검증 완료
367
- - [ ] model.ts, types.ts 생성 완료
368
- - [ ] sync 실행 완료
369
- - [ ] migration 생성 apply 완료
366
+ - [ ] entity.json validation complete
367
+ - [ ] model.ts, types.ts created
368
+ - [ ] sync executed
369
+ - [ ] migration created and applied
370
370
 
371
- ### 5.2 Scaffolding 실행
371
+ ### 5.2 Run Scaffolding
372
372
 
373
373
  ```bash
374
374
  cd packages/api
375
375
  pnpm sonamu scaffold your-entity
376
376
  ```
377
377
 
378
- ### 5.3 Build 검증
378
+ ### 5.3 Build Validation
379
379
 
380
380
  ```bash
381
- # API 빌드
381
+ # API build
382
382
  cd packages/api
383
383
  pnpm build
384
384
 
385
- # Web 빌드
385
+ # Web build
386
386
  cd packages/web
387
387
  pnpm build
388
388
  ```
389
389
 
390
- **빌드 오류가 없어야 합니다!**
390
+ **There must be no build errors!**
391
391
 
392
- ## 자동 검증 스크립트 (선택사항)
392
+ ## Automated Validation Script (Optional)
393
393
 
394
- 다음 스크립트를 `packages/api/scripts/validate-entity.sh`로 저장:
394
+ Save the following script as `packages/api/scripts/validate-entity.sh`:
395
395
 
396
396
  ```bash
397
397
  #!/bin/bash
@@ -442,27 +442,27 @@ fi
442
442
  echo "[COMPLETE] Entity validation complete!"
443
443
  ```
444
444
 
445
- **사용법:**
445
+ **Usage:**
446
446
  ```bash
447
447
  chmod +x packages/api/scripts/validate-entity.sh
448
448
  ./packages/api/scripts/validate-entity.sh your-entity
449
449
  ```
450
450
 
451
- ## 체크리스트 요약
451
+ ## Checklist Summary
452
452
 
453
- Entity 생성 **반드시** 다음 순서로 진행:
453
+ When creating an entity, **always** proceed in the following order:
454
454
 
455
455
  1. STEP 1: `pnpm sonamu stub entity YourEntity`
456
- 2. STEP 2: `your-entity.entity.json` 작성
457
- 3. STEP 3: **이 체크리스트로 검증** (CRITICAL - 반드시 수행)
458
- 4. STEP 4: `your-entity.model.ts` 생성
459
- 5. STEP 5: `your-entity.types.ts` 생성
456
+ 2. STEP 2: Write `your-entity.entity.json`
457
+ 3. STEP 3: **Validate using this checklist** (CRITICAL - must be performed)
458
+ 4. STEP 4: Create `your-entity.model.ts`
459
+ 5. STEP 5: Create `your-entity.types.ts`
460
460
  6. STEP 6: `pnpm sonamu sync`
461
- 7. STEP 7: Sync 결과 검증 (sonamu.lock, web 파일들)
461
+ 7. STEP 7: Validate sync results (sonamu.lock, web files)
462
462
  8. STEP 8: `pnpm sonamu migration:create`
463
- 9. STEP 9: Migration 파일 검증
463
+ 9. STEP 9: Validate migration file
464
464
  10. STEP 10: `pnpm sonamu migration:latest` (apply)
465
465
  11. STEP 11: `pnpm sonamu scaffold your-entity`
466
- 12. STEP 12: Build 테스트
466
+ 12. STEP 12: Build test
467
467
 
468
- **각 단계를 건너뛰지 마세요!** 순서가 중요합니다.
468
+ **Do not skip any step!** Order matters.