@kood/claude-code 0.1.3 → 0.1.5
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 +1 -1
- package/templates/hono/docs/commands/git.md +145 -0
- package/templates/hono/docs/deployment/cloudflare.md +8 -18
- package/templates/hono/docs/deployment/docker.md +15 -18
- package/templates/hono/docs/deployment/index.md +0 -3
- package/templates/hono/docs/deployment/railway.md +6 -6
- package/templates/hono/docs/deployment/vercel.md +9 -14
- package/templates/hono/docs/library/hono/index.md +0 -3
- package/templates/npx/docs/commands/git.md +145 -0
- package/templates/tanstack-start/docs/commands/git.md +145 -0
- package/templates/tanstack-start/docs/deployment/cloudflare.md +13 -23
- package/templates/tanstack-start/docs/deployment/index.md +6 -6
- package/templates/tanstack-start/docs/deployment/nitro.md +10 -10
- package/templates/tanstack-start/docs/deployment/railway.md +9 -9
- package/templates/tanstack-start/docs/deployment/vercel.md +12 -17
- package/templates/tanstack-start/docs/library/prisma/index.md +0 -4
- package/templates/tanstack-start/docs/library/prisma/setup.md +0 -7
- package/templates/hono/docs/git/git.md +0 -285
- package/templates/npx/docs/git/git.md +0 -307
- package/templates/tanstack-start/docs/git/git.md +0 -277
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
현재 git 상태를 확인하고, 아래 규칙에 따라 작업을 진행해주세요.
|
|
2
|
+
|
|
3
|
+
**추가 지시사항**: $ARGUMENTS
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 실행 절차
|
|
8
|
+
|
|
9
|
+
### 추가 지시사항이 없는 경우 (기본 동작)
|
|
10
|
+
1. `git status`로 현재 상태 확인
|
|
11
|
+
2. `git diff`로 변경 내용 분석
|
|
12
|
+
3. 스테이징 안 된 변경사항 → `git add`
|
|
13
|
+
4. 커밋 안 된 변경사항 → 논리적 단위로 분리하여 `git commit`
|
|
14
|
+
5. 최종 `git status`로 완료 확인
|
|
15
|
+
|
|
16
|
+
### 추가 지시사항이 있는 경우
|
|
17
|
+
- 사용자의 지시사항을 우선적으로 따름
|
|
18
|
+
- 예: `/git push` → push 진행, `/git 특정파일만 커밋` → 해당 파일만 처리
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ⛔ NEVER (절대 금지)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
❌ 커밋에 "Generated with Claude Code" 포함
|
|
26
|
+
❌ 커밋에 "🤖" 또는 AI 관련 이모지 포함
|
|
27
|
+
❌ 커밋에 "Co-Authored-By:" 헤더 포함
|
|
28
|
+
❌ 커밋에 AI/봇이 작성했다는 어떤 표시도 포함
|
|
29
|
+
❌ 커밋 메시지 여러 줄 작성
|
|
30
|
+
❌ 커밋 메시지에 이모지 사용
|
|
31
|
+
❌ 커밋 메시지에 마침표(.) 사용
|
|
32
|
+
❌ 여러 작업을 하나의 커밋으로 퉁치기
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## ✅ ALWAYS (필수)
|
|
38
|
+
|
|
39
|
+
### 커밋 형식
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
<prefix>: <설명>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**한 줄로 간결하게** 작성합니다. 본문이나 푸터는 작성하지 않습니다.
|
|
46
|
+
|
|
47
|
+
### ⭐ 커밋 분리 원칙
|
|
48
|
+
|
|
49
|
+
**하나의 커밋 = 하나의 논리적 변경 단위**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# ❌ 잘못된 방식: 모든 작업을 하나로 퉁침
|
|
53
|
+
git add .
|
|
54
|
+
git commit -m "feat: 여러 기능 추가"
|
|
55
|
+
|
|
56
|
+
# ✅ 올바른 방식: 논리적 단위로 분리
|
|
57
|
+
git add src/auth/
|
|
58
|
+
git commit -m "feat: 사용자 인증 기능 추가"
|
|
59
|
+
|
|
60
|
+
git add src/users/
|
|
61
|
+
git commit -m "feat: 사용자 관리 기능 추가"
|
|
62
|
+
|
|
63
|
+
git add docs/
|
|
64
|
+
git commit -m "docs: API 문서 업데이트"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 🏷 Prefix 목록
|
|
70
|
+
|
|
71
|
+
| Prefix | 용도 | 예시 |
|
|
72
|
+
|--------|------|------|
|
|
73
|
+
| `feat` | 새로운 기능 | `feat: 사용자 인증 기능 추가` |
|
|
74
|
+
| `fix` | 버그 수정 | `fix: 토큰 검증 오류 수정` |
|
|
75
|
+
| `refactor` | 리팩토링 | `refactor: 인증 로직 분리` |
|
|
76
|
+
| `style` | 코드 스타일 | `style: prettier 적용` |
|
|
77
|
+
| `docs` | 문서 수정 | `docs: API 문서 업데이트` |
|
|
78
|
+
| `test` | 테스트 | `test: 인증 테스트 추가` |
|
|
79
|
+
| `chore` | 빌드/설정 | `chore: 의존성 업데이트` |
|
|
80
|
+
| `perf` | 성능 개선 | `perf: 쿼리 최적화` |
|
|
81
|
+
| `ci` | CI/CD | `ci: GitHub Actions 추가` |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## ✅ 올바른 예시
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
feat: 사용자 로그인 기능 추가
|
|
89
|
+
fix: 세션 만료 오류 수정
|
|
90
|
+
refactor: 서비스 클래스 구조 개선
|
|
91
|
+
docs: README 설치 가이드 추가
|
|
92
|
+
chore: 의존성 버전 업그레이드
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## ❌ 잘못된 예시
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# prefix 없음
|
|
101
|
+
사용자 인증 기능 추가함
|
|
102
|
+
|
|
103
|
+
# 마침표 불필요
|
|
104
|
+
feat: 사용자 인증 추가.
|
|
105
|
+
|
|
106
|
+
# 대문자 사용
|
|
107
|
+
FEAT: 사용자 인증 추가
|
|
108
|
+
|
|
109
|
+
# scope 불필요
|
|
110
|
+
feat(auth): 인증 추가
|
|
111
|
+
|
|
112
|
+
# AI 작성 표시 (절대 금지!)
|
|
113
|
+
feat: 로그인 기능 추가
|
|
114
|
+
|
|
115
|
+
🤖 Generated with Claude Code
|
|
116
|
+
|
|
117
|
+
# Co-Author 표시 (절대 금지!)
|
|
118
|
+
feat: 로그인 기능 추가
|
|
119
|
+
|
|
120
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
121
|
+
|
|
122
|
+
# 여러 줄 본문 (금지)
|
|
123
|
+
feat: 로그인 기능 추가
|
|
124
|
+
|
|
125
|
+
- 이메일 인증 추가
|
|
126
|
+
- 세션 관리 구현
|
|
127
|
+
|
|
128
|
+
# 여러 작업을 하나로 퉁침 (금지)
|
|
129
|
+
feat: 로그인, 회원가입, 프로필 기능 추가
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 📦 커밋 분리 가이드
|
|
135
|
+
|
|
136
|
+
### 언제 커밋을 분리해야 하나요?
|
|
137
|
+
|
|
138
|
+
| 상황 | 커밋 분리 |
|
|
139
|
+
|------|----------|
|
|
140
|
+
| 서로 다른 기능 구현 | ✅ 분리 |
|
|
141
|
+
| 버그 수정 + 새 기능 | ✅ 분리 |
|
|
142
|
+
| 코드 변경 + 문서 변경 | ✅ 분리 |
|
|
143
|
+
| 리팩토링 + 기능 추가 | ✅ 분리 |
|
|
144
|
+
| 동일 기능의 관련 파일들 | 🔄 묶어도 됨 |
|
|
145
|
+
| 동일 기능의 타입 + 구현 | 🔄 묶어도 됨 |
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
현재 git 상태를 확인하고, 아래 규칙에 따라 작업을 진행해주세요.
|
|
2
|
+
|
|
3
|
+
**추가 지시사항**: $ARGUMENTS
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 실행 절차
|
|
8
|
+
|
|
9
|
+
### 추가 지시사항이 없는 경우 (기본 동작)
|
|
10
|
+
1. `git status`로 현재 상태 확인
|
|
11
|
+
2. `git diff`로 변경 내용 분석
|
|
12
|
+
3. 스테이징 안 된 변경사항 → `git add`
|
|
13
|
+
4. 커밋 안 된 변경사항 → 논리적 단위로 분리하여 `git commit`
|
|
14
|
+
5. 최종 `git status`로 완료 확인
|
|
15
|
+
|
|
16
|
+
### 추가 지시사항이 있는 경우
|
|
17
|
+
- 사용자의 지시사항을 우선적으로 따름
|
|
18
|
+
- 예: `/git push` → push 진행, `/git 특정파일만 커밋` → 해당 파일만 처리
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ⛔ NEVER (절대 금지)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
❌ 커밋에 "Generated with Claude Code" 포함
|
|
26
|
+
❌ 커밋에 "🤖" 또는 AI 관련 이모지 포함
|
|
27
|
+
❌ 커밋에 "Co-Authored-By:" 헤더 포함
|
|
28
|
+
❌ 커밋에 AI/봇이 작성했다는 어떤 표시도 포함
|
|
29
|
+
❌ 커밋 메시지 여러 줄 작성
|
|
30
|
+
❌ 커밋 메시지에 이모지 사용
|
|
31
|
+
❌ 커밋 메시지에 마침표(.) 사용
|
|
32
|
+
❌ 여러 작업을 하나의 커밋으로 퉁치기
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## ✅ ALWAYS (필수)
|
|
38
|
+
|
|
39
|
+
### 커밋 형식
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
<prefix>: <설명>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**한 줄로 간결하게** 작성합니다. 본문이나 푸터는 작성하지 않습니다.
|
|
46
|
+
|
|
47
|
+
### ⭐ 커밋 분리 원칙
|
|
48
|
+
|
|
49
|
+
**하나의 커밋 = 하나의 논리적 변경 단위**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# ❌ 잘못된 방식: 모든 작업을 하나로 퉁침
|
|
53
|
+
git add .
|
|
54
|
+
git commit -m "feat: 여러 기능 추가"
|
|
55
|
+
|
|
56
|
+
# ✅ 올바른 방식: 논리적 단위로 분리
|
|
57
|
+
git add src/auth/
|
|
58
|
+
git commit -m "feat: 사용자 인증 기능 추가"
|
|
59
|
+
|
|
60
|
+
git add src/users/
|
|
61
|
+
git commit -m "feat: 사용자 관리 기능 추가"
|
|
62
|
+
|
|
63
|
+
git add docs/
|
|
64
|
+
git commit -m "docs: API 문서 업데이트"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 🏷 Prefix 목록
|
|
70
|
+
|
|
71
|
+
| Prefix | 용도 | 예시 |
|
|
72
|
+
|--------|------|------|
|
|
73
|
+
| `feat` | 새로운 기능 | `feat: 사용자 인증 기능 추가` |
|
|
74
|
+
| `fix` | 버그 수정 | `fix: 토큰 검증 오류 수정` |
|
|
75
|
+
| `refactor` | 리팩토링 | `refactor: 인증 로직 분리` |
|
|
76
|
+
| `style` | 코드 스타일 | `style: prettier 적용` |
|
|
77
|
+
| `docs` | 문서 수정 | `docs: API 문서 업데이트` |
|
|
78
|
+
| `test` | 테스트 | `test: 인증 테스트 추가` |
|
|
79
|
+
| `chore` | 빌드/설정 | `chore: 의존성 업데이트` |
|
|
80
|
+
| `perf` | 성능 개선 | `perf: 쿼리 최적화` |
|
|
81
|
+
| `ci` | CI/CD | `ci: GitHub Actions 추가` |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## ✅ 올바른 예시
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
feat: 사용자 로그인 기능 추가
|
|
89
|
+
fix: 세션 만료 오류 수정
|
|
90
|
+
refactor: 서비스 클래스 구조 개선
|
|
91
|
+
docs: README 설치 가이드 추가
|
|
92
|
+
chore: 의존성 버전 업그레이드
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## ❌ 잘못된 예시
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# prefix 없음
|
|
101
|
+
사용자 인증 기능 추가함
|
|
102
|
+
|
|
103
|
+
# 마침표 불필요
|
|
104
|
+
feat: 사용자 인증 추가.
|
|
105
|
+
|
|
106
|
+
# 대문자 사용
|
|
107
|
+
FEAT: 사용자 인증 추가
|
|
108
|
+
|
|
109
|
+
# scope 불필요
|
|
110
|
+
feat(auth): 인증 추가
|
|
111
|
+
|
|
112
|
+
# AI 작성 표시 (절대 금지!)
|
|
113
|
+
feat: 로그인 기능 추가
|
|
114
|
+
|
|
115
|
+
🤖 Generated with Claude Code
|
|
116
|
+
|
|
117
|
+
# Co-Author 표시 (절대 금지!)
|
|
118
|
+
feat: 로그인 기능 추가
|
|
119
|
+
|
|
120
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
121
|
+
|
|
122
|
+
# 여러 줄 본문 (금지)
|
|
123
|
+
feat: 로그인 기능 추가
|
|
124
|
+
|
|
125
|
+
- 이메일 인증 추가
|
|
126
|
+
- 세션 관리 구현
|
|
127
|
+
|
|
128
|
+
# 여러 작업을 하나로 퉁침 (금지)
|
|
129
|
+
feat: 로그인, 회원가입, 프로필 기능 추가
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 📦 커밋 분리 가이드
|
|
135
|
+
|
|
136
|
+
### 언제 커밋을 분리해야 하나요?
|
|
137
|
+
|
|
138
|
+
| 상황 | 커밋 분리 |
|
|
139
|
+
|------|----------|
|
|
140
|
+
| 서로 다른 기능 구현 | ✅ 분리 |
|
|
141
|
+
| 버그 수정 + 새 기능 | ✅ 분리 |
|
|
142
|
+
| 코드 변경 + 문서 변경 | ✅ 분리 |
|
|
143
|
+
| 리팩토링 + 기능 추가 | ✅ 분리 |
|
|
144
|
+
| 동일 기능의 관련 파일들 | 🔄 묶어도 됨 |
|
|
145
|
+
| 동일 기능의 타입 + 구현 | 🔄 묶어도 됨 |
|
|
@@ -39,7 +39,7 @@ export default defineConfig({
|
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
|
|
42
|
+
yarn build && wrangler deploy
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
---
|
|
@@ -60,7 +60,7 @@ TanStack Start 공식 권장 방식입니다.
|
|
|
60
60
|
### 1. 패키지 설치
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
|
-
|
|
63
|
+
yarn add -D @cloudflare/vite-plugin wrangler
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
### 2. Vite 설정
|
|
@@ -98,13 +98,13 @@ export default defineConfig({
|
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
100
|
# 빌드
|
|
101
|
-
|
|
101
|
+
yarn build
|
|
102
102
|
|
|
103
103
|
# 배포
|
|
104
104
|
wrangler deploy
|
|
105
105
|
|
|
106
106
|
# 또는 한번에
|
|
107
|
-
|
|
107
|
+
yarn build && wrangler deploy
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
---
|
|
@@ -116,7 +116,7 @@ Nitro 배포 레이어를 사용하는 방식입니다.
|
|
|
116
116
|
### 1. Nitro 설치
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
|
-
|
|
119
|
+
yarn add nitro@3
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
### 2. Vite 설정
|
|
@@ -160,7 +160,7 @@ export default defineNitroConfig({
|
|
|
160
160
|
|
|
161
161
|
```bash
|
|
162
162
|
# 빌드
|
|
163
|
-
|
|
163
|
+
yarn build
|
|
164
164
|
|
|
165
165
|
# Pages 배포
|
|
166
166
|
wrangler pages deploy .output/public
|
|
@@ -439,22 +439,17 @@ jobs:
|
|
|
439
439
|
steps:
|
|
440
440
|
- uses: actions/checkout@v4
|
|
441
441
|
|
|
442
|
-
- name: Setup pnpm
|
|
443
|
-
uses: pnpm/action-setup@v2
|
|
444
|
-
with:
|
|
445
|
-
version: 8
|
|
446
|
-
|
|
447
442
|
- name: Setup Node.js
|
|
448
443
|
uses: actions/setup-node@v4
|
|
449
444
|
with:
|
|
450
445
|
node-version: '20'
|
|
451
|
-
cache: '
|
|
446
|
+
cache: 'yarn'
|
|
452
447
|
|
|
453
448
|
- name: Install dependencies
|
|
454
|
-
run:
|
|
449
|
+
run: yarn install --frozen-lockfile
|
|
455
450
|
|
|
456
451
|
- name: Build
|
|
457
|
-
run:
|
|
452
|
+
run: yarn build
|
|
458
453
|
|
|
459
454
|
- name: Deploy to Workers
|
|
460
455
|
uses: cloudflare/wrangler-action@v3
|
|
@@ -478,22 +473,17 @@ jobs:
|
|
|
478
473
|
steps:
|
|
479
474
|
- uses: actions/checkout@v4
|
|
480
475
|
|
|
481
|
-
- name: Setup pnpm
|
|
482
|
-
uses: pnpm/action-setup@v2
|
|
483
|
-
with:
|
|
484
|
-
version: 8
|
|
485
|
-
|
|
486
476
|
- name: Setup Node.js
|
|
487
477
|
uses: actions/setup-node@v4
|
|
488
478
|
with:
|
|
489
479
|
node-version: '20'
|
|
490
|
-
cache: '
|
|
480
|
+
cache: 'yarn'
|
|
491
481
|
|
|
492
482
|
- name: Install dependencies
|
|
493
|
-
run:
|
|
483
|
+
run: yarn install --frozen-lockfile
|
|
494
484
|
|
|
495
485
|
- name: Build
|
|
496
|
-
run:
|
|
486
|
+
run: yarn build
|
|
497
487
|
|
|
498
488
|
- name: Deploy to Pages
|
|
499
489
|
uses: cloudflare/wrangler-action@v3
|
|
@@ -512,7 +502,7 @@ jobs:
|
|
|
512
502
|
"dev": "vite dev",
|
|
513
503
|
"build": "vite build && tsc --noEmit",
|
|
514
504
|
"preview": "vite preview",
|
|
515
|
-
"deploy": "
|
|
505
|
+
"deploy": "yarn build && wrangler deploy"
|
|
516
506
|
}
|
|
517
507
|
}
|
|
518
508
|
```
|
|
@@ -50,7 +50,7 @@ Cloudflare Workers 배포 시 공식 권장 방식입니다.
|
|
|
50
50
|
### 1. 패키지 설치
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
|
|
53
|
+
yarn add -D @cloudflare/vite-plugin wrangler
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
### 2. Vite 설정
|
|
@@ -88,7 +88,7 @@ export default defineConfig({
|
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
90
|
# 빌드 및 배포
|
|
91
|
-
|
|
91
|
+
yarn build && wrangler deploy
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
---
|
|
@@ -100,7 +100,7 @@ pnpm build && wrangler deploy
|
|
|
100
100
|
### 1. Nitro 설치
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
|
|
103
|
+
yarn add nitro@3
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
### 2. Vite 설정
|
|
@@ -140,10 +140,10 @@ export default defineNitroConfig({
|
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
142
|
# 빌드
|
|
143
|
-
|
|
143
|
+
yarn build
|
|
144
144
|
|
|
145
145
|
# 또는 환경변수로 preset 지정
|
|
146
|
-
NITRO_PRESET=vercel
|
|
146
|
+
NITRO_PRESET=vercel yarn build
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
---
|
|
@@ -195,7 +195,7 @@ export default defineConfig({
|
|
|
195
195
|
"build": "vite build && tsc --noEmit",
|
|
196
196
|
"start": "node .output/server/index.mjs",
|
|
197
197
|
"preview": "vite preview",
|
|
198
|
-
"deploy": "
|
|
198
|
+
"deploy": "yarn build && wrangler deploy"
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
```
|
|
@@ -21,8 +21,8 @@ export default defineNitroConfig({
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
# 설치 및 빌드
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
yarn add nitro@3
|
|
25
|
+
yarn build
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
---
|
|
@@ -30,8 +30,8 @@ pnpm build
|
|
|
30
30
|
## 설치
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
#
|
|
34
|
-
|
|
33
|
+
# yarn
|
|
34
|
+
yarn add nitro@3
|
|
35
35
|
|
|
36
36
|
# npm
|
|
37
37
|
npm install nitro@3
|
|
@@ -124,7 +124,7 @@ export default defineNitroConfig({
|
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
126
|
# 빌드 시 환경변수로 지정
|
|
127
|
-
NITRO_PRESET=cloudflare_pages
|
|
127
|
+
NITRO_PRESET=cloudflare_pages yarn build
|
|
128
128
|
|
|
129
129
|
# 또는 CLI 옵션
|
|
130
130
|
nitro build --preset cloudflare_pages
|
|
@@ -352,16 +352,16 @@ export default defineHandler(() => {
|
|
|
352
352
|
|
|
353
353
|
```bash
|
|
354
354
|
# 개발 서버
|
|
355
|
-
|
|
355
|
+
yarn dev
|
|
356
356
|
|
|
357
357
|
# 프로덕션 빌드
|
|
358
|
-
|
|
358
|
+
yarn build
|
|
359
359
|
|
|
360
360
|
# 빌드 결과 미리보기
|
|
361
|
-
|
|
361
|
+
yarn preview
|
|
362
362
|
|
|
363
363
|
# 특정 preset으로 빌드
|
|
364
|
-
NITRO_PRESET=vercel
|
|
364
|
+
NITRO_PRESET=vercel yarn build
|
|
365
365
|
```
|
|
366
366
|
|
|
367
367
|
---
|
|
@@ -372,7 +372,7 @@ NITRO_PRESET=vercel pnpm build
|
|
|
372
372
|
|
|
373
373
|
```bash
|
|
374
374
|
# 상세 로그 출력
|
|
375
|
-
DEBUG=nitro:*
|
|
375
|
+
DEBUG=nitro:* yarn build
|
|
376
376
|
```
|
|
377
377
|
|
|
378
378
|
### 출력 검사
|
|
@@ -106,7 +106,7 @@ export default defineConfig({
|
|
|
106
106
|
"$schema": "https://railway.app/railway.schema.json",
|
|
107
107
|
"build": {
|
|
108
108
|
"builder": "NIXPACKS",
|
|
109
|
-
"buildCommand": "
|
|
109
|
+
"buildCommand": "yarn install && yarn build"
|
|
110
110
|
},
|
|
111
111
|
"deploy": {
|
|
112
112
|
"startCommand": "node .output/server/index.mjs",
|
|
@@ -124,7 +124,7 @@ export default defineConfig({
|
|
|
124
124
|
# railway.toml
|
|
125
125
|
[build]
|
|
126
126
|
builder = "nixpacks"
|
|
127
|
-
buildCommand = "
|
|
127
|
+
buildCommand = "yarn install && yarn build"
|
|
128
128
|
|
|
129
129
|
[deploy]
|
|
130
130
|
startCommand = "node .output/server/index.mjs"
|
|
@@ -141,10 +141,10 @@ restartPolicyMaxRetries = 3
|
|
|
141
141
|
nixPkgs = ["nodejs_20"]
|
|
142
142
|
|
|
143
143
|
[phases.install]
|
|
144
|
-
cmds = ["
|
|
144
|
+
cmds = ["yarn install"]
|
|
145
145
|
|
|
146
146
|
[phases.build]
|
|
147
|
-
cmds = ["
|
|
147
|
+
cmds = ["yarn build"]
|
|
148
148
|
|
|
149
149
|
[start]
|
|
150
150
|
cmd = "node .output/server/index.mjs"
|
|
@@ -200,10 +200,10 @@ Railway는 Dockerfile을 자동으로 감지합니다.
|
|
|
200
200
|
# Dockerfile
|
|
201
201
|
FROM node:20-alpine AS builder
|
|
202
202
|
WORKDIR /app
|
|
203
|
-
COPY package.json
|
|
204
|
-
RUN
|
|
203
|
+
COPY package.json yarn.lock ./
|
|
204
|
+
RUN yarn install --frozen-lockfile
|
|
205
205
|
COPY . .
|
|
206
|
-
RUN
|
|
206
|
+
RUN yarn build
|
|
207
207
|
|
|
208
208
|
FROM node:20-alpine
|
|
209
209
|
WORKDIR /app
|
|
@@ -449,7 +449,7 @@ Railway 대시보드에서 설정:
|
|
|
449
449
|
|
|
450
450
|
| 문제 | 원인 | 해결 |
|
|
451
451
|
|------|------|------|
|
|
452
|
-
| 빌드 실패 | 의존성 오류 | `
|
|
452
|
+
| 빌드 실패 | 의존성 오류 | `yarn.lock` 커밋 확인 |
|
|
453
453
|
| 포트 바인딩 실패 | 하드코딩된 포트 | `process.env.PORT` 사용 |
|
|
454
454
|
| 메모리 초과 | 메모리 누수 | 리소스 제한 증가 또는 코드 최적화 |
|
|
455
455
|
| 헬스체크 실패 | 엔드포인트 없음 | `/health` 엔드포인트 추가 |
|
|
@@ -458,7 +458,7 @@ Railway 대시보드에서 설정:
|
|
|
458
458
|
|
|
459
459
|
```bash
|
|
460
460
|
# 로컬에서 Railway 환경 시뮬레이션
|
|
461
|
-
railway run
|
|
461
|
+
railway run yarn dev
|
|
462
462
|
|
|
463
463
|
# 환경 변수 확인
|
|
464
464
|
railway variables
|
|
@@ -22,7 +22,7 @@ export default defineNitroConfig({
|
|
|
22
22
|
```json
|
|
23
23
|
// vercel.json
|
|
24
24
|
{
|
|
25
|
-
"buildCommand": "
|
|
25
|
+
"buildCommand": "yarn build",
|
|
26
26
|
"outputDirectory": ".vercel/output"
|
|
27
27
|
}
|
|
28
28
|
```
|
|
@@ -115,10 +115,10 @@ export default defineConfig({
|
|
|
115
115
|
```json
|
|
116
116
|
{
|
|
117
117
|
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
118
|
-
"buildCommand": "
|
|
118
|
+
"buildCommand": "yarn build",
|
|
119
119
|
"outputDirectory": ".vercel/output",
|
|
120
120
|
"framework": null,
|
|
121
|
-
"installCommand": "
|
|
121
|
+
"installCommand": "yarn install"
|
|
122
122
|
}
|
|
123
123
|
```
|
|
124
124
|
|
|
@@ -127,7 +127,7 @@ export default defineConfig({
|
|
|
127
127
|
```json
|
|
128
128
|
{
|
|
129
129
|
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
130
|
-
"buildCommand": "
|
|
130
|
+
"buildCommand": "yarn build",
|
|
131
131
|
"outputDirectory": ".vercel/output",
|
|
132
132
|
|
|
133
133
|
"functions": {
|
|
@@ -165,9 +165,9 @@ export default defineConfig({
|
|
|
165
165
|
|
|
166
166
|
2. **빌드 설정**
|
|
167
167
|
- Framework Preset: "Other"
|
|
168
|
-
- Build Command: `
|
|
168
|
+
- Build Command: `yarn build`
|
|
169
169
|
- Output Directory: `.vercel/output`
|
|
170
|
-
- Install Command: `
|
|
170
|
+
- Install Command: `yarn install`
|
|
171
171
|
|
|
172
172
|
3. **환경 변수 설정**
|
|
173
173
|
- Vercel 대시보드에서 Settings → Environment Variables
|
|
@@ -355,8 +355,8 @@ export default defineNitroConfig({
|
|
|
355
355
|
```json
|
|
356
356
|
{
|
|
357
357
|
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
358
|
-
"installCommand": "
|
|
359
|
-
"buildCommand": "
|
|
358
|
+
"installCommand": "yarn install",
|
|
359
|
+
"buildCommand": "yarn workspace web build",
|
|
360
360
|
"outputDirectory": "apps/web/.vercel/output"
|
|
361
361
|
}
|
|
362
362
|
```
|
|
@@ -410,22 +410,17 @@ jobs:
|
|
|
410
410
|
steps:
|
|
411
411
|
- uses: actions/checkout@v4
|
|
412
412
|
|
|
413
|
-
- name: Setup pnpm
|
|
414
|
-
uses: pnpm/action-setup@v2
|
|
415
|
-
with:
|
|
416
|
-
version: 8
|
|
417
|
-
|
|
418
413
|
- name: Setup Node.js
|
|
419
414
|
uses: actions/setup-node@v4
|
|
420
415
|
with:
|
|
421
416
|
node-version: '20'
|
|
422
|
-
cache: '
|
|
417
|
+
cache: 'yarn'
|
|
423
418
|
|
|
424
419
|
- name: Install dependencies
|
|
425
|
-
run:
|
|
420
|
+
run: yarn install --frozen-lockfile
|
|
426
421
|
|
|
427
422
|
- name: Build
|
|
428
|
-
run:
|
|
423
|
+
run: yarn build
|
|
429
424
|
|
|
430
425
|
- name: Deploy to Vercel
|
|
431
426
|
uses: amondnet/vercel-action@v25
|
|
@@ -498,7 +493,7 @@ vercel domains inspect example.com
|
|
|
498
493
|
| Function Timeout | 실행 시간 초과 | `maxDuration` 증가 또는 최적화 |
|
|
499
494
|
| Edge 호환성 오류 | Node.js API 사용 | Edge 호환 API로 변경 |
|
|
500
495
|
| 환경 변수 누락 | 설정 안됨 | Vercel 대시보드에서 설정 |
|
|
501
|
-
| 빌드 실패 | 의존성 문제 | `
|
|
496
|
+
| 빌드 실패 | 의존성 문제 | `yarn.lock` 확인 |
|
|
502
497
|
|
|
503
498
|
### 디버깅
|
|
504
499
|
|
|
@@ -13,10 +13,6 @@ npm install -D prisma@7
|
|
|
13
13
|
yarn add @prisma/client@7
|
|
14
14
|
yarn add -D prisma@7
|
|
15
15
|
|
|
16
|
-
# pnpm
|
|
17
|
-
pnpm add @prisma/client@7
|
|
18
|
-
pnpm add -D prisma@7
|
|
19
|
-
|
|
20
16
|
# bun
|
|
21
17
|
bun add @prisma/client@7
|
|
22
18
|
bun add prisma@7 --dev
|
|
@@ -34,9 +30,6 @@ npm install -D prisma@7
|
|
|
34
30
|
|
|
35
31
|
# yarn
|
|
36
32
|
yarn up prisma@7 @prisma/client@7
|
|
37
|
-
|
|
38
|
-
# pnpm
|
|
39
|
-
pnpm upgrade prisma@7 @prisma/client@7
|
|
40
33
|
```
|
|
41
34
|
|
|
42
35
|
### Generator 변경 (필수)
|