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,61 +1,61 @@
1
1
  ---
2
2
  name: create-sonamu
3
- description: pnpm create sonamu CLI 옵션 레퍼런스. 프로젝트 생성 참조.
3
+ description: pnpm create sonamu CLI option reference. Use when creating a new project.
4
4
  ---
5
5
 
6
6
  # create-sonamu CLI
7
7
 
8
- ## 기본 사용법
8
+ ## Basic Usage
9
9
 
10
10
  ```bash
11
- pnpm create sonamu [프로젝트명]
11
+ pnpm create sonamu [project-name]
12
12
  ```
13
13
 
14
- ## 빠른 생성 (권장)
14
+ ## Quick Create (Recommended)
15
15
 
16
- 모든 옵션을 기본값으로 사용:
16
+ Use all options with default values:
17
17
 
18
18
  ```bash
19
- pnpm create sonamu [프로젝트명] --yes
19
+ pnpm create sonamu [project-name] --yes
20
20
  ```
21
21
 
22
- ## CLI 옵션
22
+ ## CLI Options
23
23
 
24
- ### 일반 옵션
24
+ ### General Options
25
25
 
26
- | 옵션 | 설명 | 기본값 |
26
+ | Option | Description | Default |
27
27
  |------|------|--------|
28
- | `--yes`, `-y` | 모든 옵션 기본값 사용 | - |
29
- | `--skip-pnpm` | pnpm install 스킵 | false |
30
- | `--skip-docker` | Docker 설정 스킵 | false |
31
- | `--pnpm y/n` | pnpm 설치 여부 | y |
32
- | `--docker y/n` | Docker 설정 여부 | y |
28
+ | `--yes`, `-y` | Use all options with default values | - |
29
+ | `--skip-pnpm` | Skip pnpm install | false |
30
+ | `--skip-docker` | Skip Docker setup | false |
31
+ | `--pnpm y/n` | Whether to install pnpm | y |
32
+ | `--docker y/n` | Whether to configure Docker | y |
33
33
 
34
- ### Docker/DB 옵션
34
+ ### Docker/DB Options
35
35
 
36
- | 옵션 | 설명 | 기본값 |
36
+ | Option | Description | Default |
37
37
  |------|------|--------|
38
- | `--docker-project` | Docker 프로젝트명 | `[프로젝트명]-docker` |
39
- | `--container-name` | 컨테이너명 | `[프로젝트명]-container` |
40
- | `--db-name` | 데이터베이스명 | `[프로젝트명]` |
41
- | `--db-user` | DB 사용자 | `postgres` |
42
- | `--db-password` | DB 비밀번호 | `1234` |
38
+ | `--docker-project` | Docker project name | `[project-name]-docker` |
39
+ | `--container-name` | Container name | `[project-name]-container` |
40
+ | `--db-name` | Database name | `[project-name]` |
41
+ | `--db-user` | DB user | `postgres` |
42
+ | `--db-password` | DB password | `1234` |
43
43
 
44
- ## 사용 예시
44
+ ## Usage Examples
45
45
 
46
- ### 기본값으로 빠르게 생성
46
+ ### Quick create with defaults
47
47
 
48
48
  ```bash
49
49
  pnpm create sonamu my_project --yes
50
50
  ```
51
51
 
52
- ### Docker 없이 생성
52
+ ### Create without Docker
53
53
 
54
54
  ```bash
55
55
  pnpm create sonamu my_project --skip-docker
56
56
  ```
57
57
 
58
- ### DB 설정 커스텀
58
+ ### Custom DB configuration
59
59
 
60
60
  ```bash
61
61
  pnpm create sonamu my_project \
@@ -64,7 +64,7 @@ pnpm create sonamu my_project \
64
64
  --db-password secret123
65
65
  ```
66
66
 
67
- ### 전체 커스텀
67
+ ### Fully custom
68
68
 
69
69
  ```bash
70
70
  pnpm create sonamu my_project \
@@ -75,10 +75,10 @@ pnpm create sonamu my_project \
75
75
  --db-password 1234
76
76
  ```
77
77
 
78
- ## 생성 후 구조
78
+ ## Generated Structure
79
79
 
80
80
  ```
81
- [프로젝트명]/
81
+ [project-name]/
82
82
  ├── packages/
83
83
  │ ├── api/
84
84
  │ │ ├── src/
@@ -94,95 +94,95 @@ pnpm create sonamu my_project \
94
94
  └── package.json
95
95
  ```
96
96
 
97
- ## 생성 다음 단계
97
+ ## Next Steps After Creation
98
98
 
99
- 1. DB 컨테이너 실행 (Docker 설정한 경우)
99
+ 1. Start the DB container (if Docker was configured)
100
100
  ```bash
101
- cd [프로젝트명]/packages/api/
101
+ cd [project-name]/packages/api/
102
102
  pnpm docker:up
103
103
  ```
104
- > 포트 충돌 오류 발생 → `database.md` 참조
104
+ > If a port conflict error occurs see `database.md`
105
105
 
106
- 2. Skills 동기화
106
+ 2. Sync Skills
107
107
  ```bash
108
- cd [프로젝트명]/packages/api
108
+ cd [project-name]/packages/api
109
109
  pnpm sonamu skills sync
110
110
  ```
111
- > sonamu npm 버전이면 실패함. 아래 "Sonamu 링크 설정" 참조
111
+ > Will fail if sonamu is an npm version. See "Sonamu Link Setup" below.
112
112
 
113
- 3. 개발 서버 실행
113
+ 3. Start the dev server
114
114
  ```bash
115
- cd [프로젝트명]/packages/api
115
+ cd [project-name]/packages/api
116
116
  pnpm dev
117
117
  ```
118
118
 
119
- 4. Entity 설계 진행 → `entity-basic.md` 참조
119
+ 4. Proceed to Entity designsee `entity-basic.md`
120
120
 
121
- ## Sonamu 링크 설정
121
+ ## Sonamu Link Setup
122
122
 
123
- **Skills 동기화는 sonamu 로컬 링크로 참조되어야 동작합니다.**
123
+ **Skills sync only works when sonamu is referenced as a local link.**
124
124
 
125
- ### 확인 방법
125
+ ### How to check
126
126
 
127
- `packages/api/package.json`에서 sonamu 의존성 확인:
127
+ Check the sonamu dependency in `packages/api/package.json`:
128
128
 
129
129
  ```json
130
- // ✓ 링크 참조 (Skills 동기화 가능)
130
+ // ✓ Link reference (Skills sync possible)
131
131
  "sonamu": "link:/path/to/sonamu/modules/sonamu"
132
132
 
133
- // ✗ npm 버전 (Skills 동기화 불가)
133
+ // ✗ npm version (Skills sync not available)
134
134
  "sonamu": "^0.7.47"
135
135
  ```
136
136
 
137
- ### 링크로 변경하는 방법
137
+ ### How to change to a link
138
138
 
139
- 1. `packages/api/package.json`에서 sonamu 버전을 링크로 변경:
139
+ 1. Change the sonamu version to a link in `packages/api/package.json`:
140
140
  ```json
141
141
  "dependencies": {
142
142
  "sonamu": "link:/path/to/sonamu/modules/sonamu"
143
143
  }
144
144
  ```
145
145
 
146
- 2. `pnpm install` 실행
146
+ 2. Run `pnpm install`
147
147
 
148
- 3. `pnpm sonamu skills sync` 다시 실행
148
+ 3. Run `pnpm sonamu skills sync` again
149
149
 
150
- ### 링크 경로 예시
150
+ ### Link path examples
151
151
 
152
- | sonamu 위치 | 링크 경로 |
152
+ | sonamu location | Link path |
153
153
  |------------|----------|
154
154
  | `~/Development/sonamu` | `link:~/Development/sonamu/modules/sonamu` |
155
- | 프로젝트와 같은 디렉토리 | `link:../../sonamu/modules/sonamu` |
155
+ | Same directory as project | `link:../../sonamu/modules/sonamu` |
156
156
 
157
- ## 프로젝트명 변경 (신규 프로젝트 생성 )
157
+ ## Renaming the Project (when creating a new project)
158
158
 
159
- 프로젝트 생성 후, 프론트엔드의 "Sonamu" 텍스트를 프로젝트명으로 변경해야 합니다.
159
+ After generating the project, you need to replace the "Sonamu" text in the frontend with your project name.
160
160
 
161
- **변경해야 파일 4개:**
161
+ **4 files to update:**
162
162
 
163
- 1. **`packages/web/index.html`** - 브라우저 제목
163
+ 1. **`packages/web/index.html`** - Browser tab title
164
164
  ```html
165
- <title>{프로젝트명}</title>
165
+ <title>{project-name}</title>
166
166
  ```
167
167
 
168
- 2. **`packages/web/src/routes/__root.tsx`** - TanStack Router head 설정 (가장 중요!)
168
+ 2. **`packages/web/src/routes/__root.tsx`** - TanStack Router head configuration (most important!)
169
169
  ```typescript
170
170
  head: () => ({
171
- meta: [{ title: "{프로젝트명}" }],
171
+ meta: [{ title: "{project-name}" }],
172
172
  }),
173
173
  ```
174
- **중요:** `__root.tsx`를 변경하지 않으면 HMR title이 "Sonamu" 되돌아갑니다!
174
+ **Important:** If you don't update `__root.tsx`, the title will revert to "Sonamu" on HMR!
175
175
 
176
- 3. **`packages/web/src/routes/index.tsx`** - 메인 페이지 제목
176
+ 3. **`packages/web/src/routes/index.tsx`** - Main page title
177
177
  ```tsx
178
- <h1 className="text-2xl font-bold mb-4">Welcome to {프로젝트명}</h1>
178
+ <h1 className="text-2xl font-bold mb-4">Welcome to {project-name}</h1>
179
179
  ```
180
180
 
181
- 4. **`packages/web/src/components/Sidebar.tsx`** - 사이드바 이름
181
+ 4. **`packages/web/src/components/Sidebar.tsx`** - Sidebar app name
182
182
  ```typescript
183
- const title = isAdmin ? "Admin" : "{프로젝트명}";
183
+ const title = isAdmin ? "Admin" : "{project-name}";
184
184
  ```
185
185
 
186
- **확인 방법:**
187
- - 브라우저 탭에 프로젝트명이 표시되는지 확인
188
- - 파일 저장 HMR로 제목이 변경되지 않는지 확인 (변경되면 `__root.tsx` 누락)
186
+ **How to verify:**
187
+ - Check that the project name is shown in the browser tab
188
+ - Confirm that the tab title does not change on file save via HMR (if it does, `__root.tsx` is missing)