@kood/claude-code 0.1.7 → 0.1.9
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 +118 -3
- package/package.json +8 -2
- package/templates/hono/CLAUDE.md +53 -326
- package/templates/hono/docs/architecture/architecture.md +93 -747
- package/templates/hono/docs/deployment/cloudflare.md +59 -513
- package/templates/hono/docs/deployment/docker.md +41 -356
- package/templates/hono/docs/deployment/index.md +49 -190
- package/templates/hono/docs/deployment/railway.md +36 -306
- package/templates/hono/docs/deployment/vercel.md +49 -434
- package/templates/hono/docs/library/ai-sdk/index.md +53 -290
- package/templates/hono/docs/library/ai-sdk/openrouter.md +19 -387
- package/templates/hono/docs/library/ai-sdk/providers.md +28 -394
- package/templates/hono/docs/library/ai-sdk/streaming.md +52 -353
- package/templates/hono/docs/library/ai-sdk/structured-output.md +63 -395
- package/templates/hono/docs/library/ai-sdk/tools.md +62 -431
- package/templates/hono/docs/library/hono/env-setup.md +24 -313
- package/templates/hono/docs/library/hono/error-handling.md +34 -295
- package/templates/hono/docs/library/hono/index.md +24 -122
- package/templates/hono/docs/library/hono/middleware.md +21 -188
- package/templates/hono/docs/library/hono/rpc.md +40 -341
- package/templates/hono/docs/library/hono/validation.md +35 -195
- package/templates/hono/docs/library/pino/index.md +42 -333
- package/templates/hono/docs/library/prisma/cloudflare-d1.md +64 -367
- package/templates/hono/docs/library/prisma/config.md +19 -260
- package/templates/hono/docs/library/prisma/index.md +64 -320
- package/templates/hono/docs/library/zod/index.md +53 -257
- package/templates/npx/CLAUDE.md +58 -276
- package/templates/npx/docs/references/patterns.md +160 -0
- package/templates/tanstack-start/CLAUDE.md +0 -4
- package/templates/tanstack-start/docs/architecture/architecture.md +44 -589
- package/templates/tanstack-start/docs/design/index.md +119 -12
- package/templates/tanstack-start/docs/guides/conventions.md +103 -0
- package/templates/tanstack-start/docs/guides/env-setup.md +34 -340
- package/templates/tanstack-start/docs/guides/getting-started.md +22 -209
- package/templates/tanstack-start/docs/guides/hooks.md +166 -0
- package/templates/tanstack-start/docs/guides/routes.md +166 -0
- package/templates/tanstack-start/docs/guides/services.md +143 -0
- package/templates/tanstack-start/docs/library/tanstack-query/index.md +18 -2
- package/templates/tanstack-start/docs/library/zod/index.md +16 -1
- package/templates/tanstack-start/docs/design/accessibility.md +0 -163
- package/templates/tanstack-start/docs/design/color.md +0 -93
- package/templates/tanstack-start/docs/design/spacing.md +0 -122
- package/templates/tanstack-start/docs/design/typography.md +0 -80
- package/templates/tanstack-start/docs/guides/best-practices.md +0 -950
- package/templates/tanstack-start/docs/guides/husky-lint-staged.md +0 -303
- package/templates/tanstack-start/docs/guides/prettier.md +0 -189
- package/templates/tanstack-start/docs/guides/project-templates.md +0 -710
- package/templates/tanstack-start/docs/library/tanstack-query/setup.md +0 -48
- package/templates/tanstack-start/docs/library/zod/basic-types.md +0 -74
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# TanStack Query - 설치 및 설정
|
|
2
|
-
|
|
3
|
-
## 설치
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
yarn add @tanstack/react-query
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## QueryClient 옵션
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
const queryClient = new QueryClient({
|
|
13
|
-
defaultOptions: {
|
|
14
|
-
queries: {
|
|
15
|
-
staleTime: 1000 * 60 * 5, // 5분
|
|
16
|
-
gcTime: 1000 * 60 * 30, // 30분 (이전 cacheTime)
|
|
17
|
-
retry: 3,
|
|
18
|
-
refetchOnWindowFocus: true,
|
|
19
|
-
refetchOnReconnect: true,
|
|
20
|
-
},
|
|
21
|
-
mutations: { retry: 1 },
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Query Keys 패턴
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
['todos'] // 단순
|
|
30
|
-
['todo', { id: 5 }] // 파라미터
|
|
31
|
-
['todos', 'list', { filters }] // 계층적
|
|
32
|
-
['todos', 'detail', todoId]
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## DevTools
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
yarn add @tanstack/react-query-devtools
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
|
43
|
-
|
|
44
|
-
<QueryClientProvider client={queryClient}>
|
|
45
|
-
<YourApp />
|
|
46
|
-
<ReactQueryDevtools initialIsOpen={false} />
|
|
47
|
-
</QueryClientProvider>
|
|
48
|
-
```
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Zod - 기본 타입
|
|
2
|
-
|
|
3
|
-
## 문자열
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
z.string()
|
|
7
|
-
z.string().min(1).max(100).length(5)
|
|
8
|
-
z.string().regex(/^\d+$/)
|
|
9
|
-
z.string().trim().toLowerCase().toUpperCase()
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
### v4 최상위 포맷 API
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
z.email() z.url() z.uuid() z.base64()
|
|
16
|
-
z.nanoid() z.cuid() z.cuid2() z.ulid()
|
|
17
|
-
z.ipv4() z.ipv6() z.cidrv4() z.cidrv6()
|
|
18
|
-
|
|
19
|
-
z.iso.date() // 2024-01-15
|
|
20
|
-
z.iso.time() // 14:30:00
|
|
21
|
-
z.iso.datetime() // ISO 날짜시간
|
|
22
|
-
z.iso.duration() // P1D, PT1H
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### 템플릿 리터럴 (v4)
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
const css = z.templateLiteral([z.number(), z.enum(["px", "em", "rem"])])
|
|
29
|
-
// `${number}px` | `${number}em` | `${number}rem`
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## 숫자
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
z.number()
|
|
36
|
-
z.number().min(0).max(100).int()
|
|
37
|
-
z.number().positive().negative().nonnegative().nonpositive()
|
|
38
|
-
z.number().finite().safe()
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## 불리언
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
z.boolean()
|
|
45
|
-
|
|
46
|
-
// v4 문자열 불리언 (환경변수용)
|
|
47
|
-
z.stringbool() // "true"/"yes"/"1" → true, "false"/"no"/"0" → false
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## 날짜/BigInt/리터럴
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
z.date().min(new Date('2020-01-01')).max(new Date('2030-12-31'))
|
|
54
|
-
z.bigint().positive().negative()
|
|
55
|
-
z.literal('hello') z.literal(42) z.literal(true)
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## 특수 타입
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
z.null() z.undefined() z.void()
|
|
62
|
-
z.any() z.unknown() z.never()
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## 수정자
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
z.string().optional() // string | undefined
|
|
69
|
-
z.string().nullable() // string | null
|
|
70
|
-
z.string().nullish() // string | null | undefined
|
|
71
|
-
z.string().default('Anonymous')
|
|
72
|
-
|
|
73
|
-
type T = z.infer<typeof schema>
|
|
74
|
-
```
|