@kood/claude-code 0.3.1 → 0.3.2

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/dist/index.js CHANGED
@@ -409,7 +409,7 @@ var init = async (options) => {
409
409
 
410
410
  // src/index.ts
411
411
  var program = new Command();
412
- program.name("claude-code").description("Claude Code documentation installer for projects").version("0.3.1");
412
+ program.name("claude-code").description("Claude Code documentation installer for projects").version("0.3.2");
413
413
  program.option(
414
414
  "-t, --template <names>",
415
415
  "template names (comma-separated: tanstack-start,hono)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kood/claude-code",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Claude Code documentation installer for projects",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
@@ -19,6 +19,7 @@
19
19
  | **레이어** | Service Layer 건너뛰기, Routes에서 직접 DB 접근 |
20
20
  | **검증** | Handler 내부 수동 검증, 인증 로직 분산 |
21
21
  | **Server Fn** | `createServerFn` 사용 (명시 요청 없으면 `createServerOnlyFn`) |
22
+ | **Barrel Export** | `functions/index.ts` 생성 (Tree Shaking 실패, 서버 라이브러리 Client 오염) |
22
23
 
23
24
  </forbidden>
24
25
 
@@ -144,7 +145,6 @@ services/<domain>/
144
145
 
145
146
  ```
146
147
  functions/ # 글로벌 (재사용)
147
- ├── index.ts
148
148
  ├── <function-name>.ts # 파일당 하나
149
149
  └── middlewares/
150
150
  └── <middleware-name>.ts
@@ -153,6 +153,24 @@ routes/<route>/-functions/ # 페이지 전용
153
153
  └── <function-name>.ts
154
154
  ```
155
155
 
156
+ > ⚠️ **`functions/index.ts` 생성 금지**
157
+ >
158
+ > `functions/` 폴더에 `index.ts` (barrel export) 파일을 만들지 마세요.
159
+ >
160
+ > **문제점:**
161
+ > 1. **Tree Shaking 실패** - 번들러가 사용하지 않는 함수도 포함
162
+ > 2. **Client 번들 오염** - `pg`, `prisma` 등 서버 전용 라이브러리가 클라이언트에 import되어 빌드 에러 발생
163
+ >
164
+ > ```typescript
165
+ > // ❌ functions/index.ts 만들지 말 것
166
+ > export * from './get-users'
167
+ > export * from './create-post' // pg import → 클라이언트 빌드 실패
168
+ >
169
+ > // ✅ 개별 파일에서 직접 import
170
+ > import { getUsers } from '@/functions/get-users'
171
+ > import { createPost } from '@/functions/create-post'
172
+ > ```
173
+
156
174
  ### 4. Database Layer
157
175
 
158
176
  ```typescript
@@ -8,12 +8,20 @@
8
8
 
9
9
  ## 파일 네이밍
10
10
 
11
+ > ⚠️ **camelCase 파일명 금지** - 모든 파일명은 **kebab-case** 사용
12
+
11
13
  | 타입 | 규칙 | 예시 |
12
14
  |------|------|------|
13
15
  | **일반 파일** | kebab-case | `user-profile.tsx`, `auth-service.ts` |
14
16
  | **Route 파일** | TanStack Router 규칙 | `__root.tsx`, `index.tsx`, `$id.tsx` |
15
- | **Hook 파일** | `use-` 접두사 | `use-user-filter.ts`, `use-auth.ts` |
16
- | **Component** | PascalCase (파일은 kebab) | `UserCard` in `user-card.tsx` |
17
+ | **Hook 파일** | `use-` 접두사 + kebab-case | `use-user-filter.ts`, `use-auth.ts` |
18
+ | **Component** | PascalCase 컴포넌트, kebab-case 파일 | `UserCard` in `user-card.tsx` |
19
+ | **Server Function** | kebab-case | `get-users.ts`, `create-post.ts` |
20
+
21
+ ```
22
+ ❌ camelCase 금지: getUserById.ts, authService.ts, useUserFilter.ts
23
+ ✅ kebab-case 필수: get-user-by-id.ts, auth-service.ts, use-user-filter.ts
24
+ ```
17
25
 
18
26
  </naming>
19
27