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,82 +1,82 @@
1
1
  ---
2
2
  name: sonamu-framework-change
3
- description: Sonamu 프레임워크 소스 수정 vs. 프로젝트 레벨 우회 판단 기준. @upload 파라미터 패턴 포함. Use when a Sonamu bug or limitation is discovered during project development.
3
+ description: Criteria for deciding between modifying Sonamu framework source vs. applying project-level workarounds. Includes the @upload parameter pattern. Use when a Sonamu bug or limitation is discovered during project development.
4
4
  ---
5
5
 
6
- # Sonamu Framework 변경 판단
6
+ # Sonamu Framework Change Decision
7
7
 
8
- 프레임워크 버그나 제약을 발견했을 때, 프레임워크를 직접 수정할지 프로젝트 레벨에서 우회할지 판단하는 기준.
8
+ Criteria for deciding whether to directly modify the framework or apply a project-level workaround when a framework bug or limitation is discovered.
9
9
 
10
10
  ---
11
11
 
12
- ## 판단 rubric
12
+ ## Decision rubric
13
13
 
14
- 아래 4 축을 평가한다:
14
+ Evaluate along the following 4 axes:
15
15
 
16
- | | 프로젝트 우회 | 프레임워크 수정 |
16
+ | Axis | Project workaround | Framework fix |
17
17
  |----|-------------|----------------|
18
- | **재현 범위** | 특정 사용 패턴에서만 발생 | 어떤 사용 방식에서도 발생 |
19
- | **우회 비용** | 프로젝트 수정으로 해결 | 모든 프로젝트에 우회 전파 필요 |
20
- | **영향 범위** | 프레임워크 변경 다른 프로젝트 파급 불확실 | 변경 범위가 격리되고 부작용 명확 |
21
- | **소유권** | 해당 코드 작성자가 있어 논의 필요 | 버그가 명확하고 리뷰 경로 확보됨 |
18
+ | **Reproduction scope** | Only occurs in specific usage patterns | Occurs regardless of usage pattern |
19
+ | **Workaround cost** | Resolved by modifying one place in the project | Workaround must be propagated to all projects |
20
+ | **Impact scope** | Uncertain ripple effects on other projects if framework is changed | Change scope is isolated and side effects are clear |
21
+ | **Ownership** | The code has a known author and discussion is needed | Bug is clear and a review path is available |
22
22
 
23
- **프로젝트 우회 선택 기준**: 4 2개 이상이 "프로젝트 우회" 해당하면 우선 우회한다.
23
+ **Criteria for choosing project workaround**: If 2 or more of the 4 axes lean toward "project workaround", apply the workaround first.
24
24
 
25
- **프레임워크 수정 선택 기준**: 재현 범위가 "어떤 사용 방식에서도"이고 우회 비용이 높으면 수정을 검토한다.
25
+ **Criteria for choosing framework fix**: If the reproduction scope is "any usage pattern" and the workaround cost is high, consider a fix.
26
26
 
27
27
  ---
28
28
 
29
- ## 판단 불가 사용자에게 물어본다
29
+ ## When the decision is unclear Ask the user
30
30
 
31
- 다음 하나라도 해당하면 혼자 결정하지 않는다:
31
+ Do not decide alone if any of the following apply:
32
32
 
33
- - 재현 범위 확인이 어려움 (다른 프로젝트의 사용 패턴을 모름)
34
- - 프레임워크 소유자(CTO) 명확히 있고, 해당 코드를 최근 작성함
35
- - 우회 방법이 API 시맨틱을 훼손할 가능성이 있음
33
+ - Reproduction scope is difficult to confirm (unknown usage patterns in other projects)
34
+ - The framework owner (e.g. CTO) is clearly identified and recently wrote the code
35
+ - The workaround might compromise API semantics
36
36
 
37
37
  ```
38
- "프레임워크 버그로 보입니다. 프로젝트 레벨 우회가 가능하지만,
39
- 프레임워크 수정이 적절할 있습니다. 어떻게 할까요?"
38
+ "This appears to be a framework bug. A project-level workaround is possible,
39
+ but a framework fix may be more appropriate. How would you like to proceed?"
40
40
  ```
41
41
 
42
42
  ---
43
43
 
44
- ## 프로젝트 우회 기록 의무
44
+ ## Documentation obligation when applying a workaround
45
45
 
46
- 우회를 선택했으면 다음 곳에 기록한다:
46
+ If a workaround is chosen, record it in the following two places:
47
47
 
48
- 1. **spec `knownIssues`**: 버그 원인, 우회 방법, 호출 패턴, 근본 원인 경로
49
- 2. **memory**: sync 반복 작업에서 우회가 되돌아올 가능성이 있으면 주의사항 기록
48
+ 1. **`knownIssues` in the spec**: bug cause, workaround approach, call pattern, root cause file path
49
+ 2. **memory**: if the workaround may be reverted by repeated operations like sync, record a caution note
50
50
 
51
51
  ---
52
52
 
53
- ## 구체 패턴: `@upload` 다중 파라미터
53
+ ## Concrete pattern: `@upload` multiple parameters
54
54
 
55
- ### 문제
55
+ ### Problem
56
56
 
57
- `@upload` 메서드에 primitive 파라미터가 여러 개이면 `services.template.ts`의 `split(':')` 버그로 `useUploadMutation`이 잘못 생성된다.
57
+ When an `@upload` method has multiple primitive parameters, a `split(':')` bug in `services.template.ts` causes `useUploadMutation` to be generated incorrectly.
58
58
 
59
59
  ```typescript
60
- // WRONG — 이렇게 쓰면 codegen 깨짐
60
+ // WRONG — codegen breaks with this pattern
61
61
  async upload(entity_type: string, entity_id: number, file_type: string)
62
62
  ```
63
63
 
64
- 생성 결과:
64
+ Generated result:
65
65
  ```typescript
66
- // mutationFn params.params, params.files 전달 (entity_id, file_type 누락)
66
+ // mutationFn only passes params.params and params.files (entity_id and file_type are missing)
67
67
  mutationFn: (params: { params: string; ... }) => upload(params.params, params.files)
68
68
  ```
69
69
 
70
- ### 해결: 단일 객체로 묶는다
70
+ ### Fix: wrap in a single object
71
71
 
72
72
  ```typescript
73
- // CORRECT — 단일 객체 파라미터
73
+ // CORRECT — single object parameter
74
74
  async upload(params: { entity_type: string; entity_id: number; file_type: string })
75
75
  ```
76
76
 
77
- Sonamu 백엔드가 `qs`로 `params[entity_type]` 형태의 중첩 formData를 자동 역직렬화하므로 동작에 영향 없다.
77
+ The Sonamu backend automatically deserializes nested formData in the form `params[entity_type]` using `qs`, so this has no effect on runtime behavior.
78
78
 
79
- 호출부 패턴:
79
+ Call-site pattern:
80
80
  ```typescript
81
81
  uploadMutation.mutate({
82
82
  params: { entity_type, entity_id, file_type },
@@ -84,11 +84,11 @@ uploadMutation.mutate({
84
84
  })
85
85
  ```
86
86
 
87
- **규칙**: `@upload` 메서드에 파라미터가 2 이상 필요하면 반드시 단일 객체로 묶는다.
87
+ **Rule**: If an `@upload` method requires 2 or more parameters, always wrap them in a single object.
88
88
 
89
89
  ---
90
90
 
91
- ## 참고
91
+ ## Reference
92
92
 
93
- - 버그 발생 소스: `modules/sonamu/src/template/implementations/services.template.ts`
94
- - 관련 스킬: `api.md`, `skill-contribution.md`
93
+ - Bug source: `modules/sonamu/src/template/implementations/services.template.ts`
94
+ - Related skills: `api.md`, `skill-contribution.md`