@simplysm/sd-cli 13.0.96 → 13.0.97
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/orchestrators/WatchOrchestrator.d.ts +7 -0
- package/dist/orchestrators/WatchOrchestrator.d.ts.map +1 -1
- package/dist/orchestrators/WatchOrchestrator.js +93 -49
- package/dist/orchestrators/WatchOrchestrator.js.map +1 -1
- package/dist/sd-config.types.d.ts +14 -1
- package/dist/sd-config.types.d.ts.map +1 -1
- package/dist/utils/package-utils.js +1 -1
- package/dist/utils/package-utils.js.map +1 -1
- package/dist/utils/vite-config.d.ts +4 -0
- package/dist/utils/vite-config.d.ts.map +1 -1
- package/dist/utils/vite-config.js +4 -1
- package/dist/utils/vite-config.js.map +1 -1
- package/dist/workers/client.worker.d.ts.map +1 -1
- package/dist/workers/client.worker.js +7 -2
- package/dist/workers/client.worker.js.map +1 -1
- package/package.json +6 -6
- package/src/orchestrators/WatchOrchestrator.ts +124 -67
- package/src/sd-config.types.ts +15 -1
- package/src/utils/package-utils.ts +2 -2
- package/src/utils/vite-config.ts +9 -1
- package/src/workers/client.worker.ts +9 -1
- package/templates/init/.gitignore.hbs +1 -2
- package/templates/init/package.json.hbs +5 -6
- package/templates/init/packages/client-admin/package.json.hbs +7 -7
- package/templates/init/packages/db-main/package.json.hbs +2 -2
- package/templates/init/packages/server/package.json.hbs +5 -5
- package/templates/init/tests-e2e/package.json.hbs +1 -1
- package/tests/run-watch.spec.ts +35 -0
- package/tests/vite-config-outdir.spec.ts +38 -0
- package/README.md +0 -360
- package/docs/architecture.md +0 -311
- package/docs/config-types.md +0 -263
package/docs/config-types.md
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
# 설정 타입 레퍼런스
|
|
2
|
-
|
|
3
|
-
`sd.config.ts`에서 사용하는 모든 타입의 상세 레퍼런스.
|
|
4
|
-
|
|
5
|
-
## SdConfig
|
|
6
|
-
|
|
7
|
-
`sd.config.ts`의 최상위 설정 타입.
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
interface SdConfig {
|
|
11
|
-
packages: Record<string, SdPackageConfig | undefined>;
|
|
12
|
-
replaceDeps?: Record<string, string>;
|
|
13
|
-
postPublish?: SdPostPublishScriptConfig[];
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
| 필드 | 타입 | 설명 |
|
|
18
|
-
|------|------|------|
|
|
19
|
-
| `packages` | `Record<string, SdPackageConfig>` | 패키지별 설정. 키는 `packages/` 하위 디렉토리명 |
|
|
20
|
-
| `replaceDeps` | `Record<string, string>` | 의존성 교체 설정. 키: glob 패턴, 값: 로컬 경로 (`*` 치환 지원) |
|
|
21
|
-
| `postPublish` | `SdPostPublishScriptConfig[]` | 배포 완료 후 실행할 스크립트 |
|
|
22
|
-
|
|
23
|
-
### replaceDeps 예시
|
|
24
|
-
|
|
25
|
-
```typescript
|
|
26
|
-
replaceDeps: {
|
|
27
|
-
"@simplysm/*": "../simplysm/packages/*"
|
|
28
|
-
}
|
|
29
|
-
// @simplysm/core-common -> ../simplysm/packages/core-common 으로 심링크
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## SdConfigFn / SdConfigParams
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
type SdConfigFn = (params: SdConfigParams) => SdConfig | Promise<SdConfig>;
|
|
36
|
-
|
|
37
|
-
interface SdConfigParams {
|
|
38
|
-
cwd: string; // 현재 작업 디렉토리
|
|
39
|
-
dev: boolean; // 개발 모드 여부 (dev/watch: true, build/publish: false)
|
|
40
|
-
options: string[]; // CLI -o 플래그 값 (예: ["key=value"])
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## 패키지 설정 타입
|
|
45
|
-
|
|
46
|
-
### SdPackageConfig (유니온)
|
|
47
|
-
|
|
48
|
-
```typescript
|
|
49
|
-
type SdPackageConfig =
|
|
50
|
-
| SdBuildPackageConfig
|
|
51
|
-
| SdClientPackageConfig
|
|
52
|
-
| SdServerPackageConfig
|
|
53
|
-
| SdScriptsPackageConfig;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### SdBuildPackageConfig
|
|
57
|
-
|
|
58
|
-
라이브러리 패키지 (node/browser/neutral) 설정.
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
interface SdBuildPackageConfig {
|
|
62
|
-
target: "node" | "browser" | "neutral";
|
|
63
|
-
publish?: SdPublishConfig;
|
|
64
|
-
copySrc?: string[];
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
| 필드 | 타입 | 설명 |
|
|
69
|
-
|------|------|------|
|
|
70
|
-
| `target` | `BuildTarget` | 빌드 대상 플랫폼 |
|
|
71
|
-
| `publish` | `SdPublishConfig` | 배포 설정 |
|
|
72
|
-
| `copySrc` | `string[]` | `src/`에서 `dist/`로 복사할 파일 glob 패턴 (src 기준 상대 경로) |
|
|
73
|
-
|
|
74
|
-
### SdClientPackageConfig
|
|
75
|
-
|
|
76
|
-
클라이언트 앱 패키지 설정 (Vite + SolidJS).
|
|
77
|
-
|
|
78
|
-
```typescript
|
|
79
|
-
interface SdClientPackageConfig {
|
|
80
|
-
target: "client";
|
|
81
|
-
server: string | number;
|
|
82
|
-
env?: Record<string, string>;
|
|
83
|
-
publish?: SdPublishConfig;
|
|
84
|
-
capacitor?: SdCapacitorConfig;
|
|
85
|
-
electron?: SdElectronConfig;
|
|
86
|
-
configs?: Record<string, unknown>;
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
| 필드 | 타입 | 설명 |
|
|
91
|
-
|------|------|------|
|
|
92
|
-
| `target` | `"client"` | 고정값 |
|
|
93
|
-
| `server` | `string \| number` | 서버 패키지명(프록시 연결) 또는 Vite 포트 번호 |
|
|
94
|
-
| `env` | `Record<string, string>` | 빌드 시 `process.env` 치환 값 |
|
|
95
|
-
| `publish` | `SdPublishConfig` | 배포 설정 |
|
|
96
|
-
| `capacitor` | `SdCapacitorConfig` | Capacitor 설정 (모바일 앱) |
|
|
97
|
-
| `electron` | `SdElectronConfig` | Electron 설정 (데스크톱 앱) |
|
|
98
|
-
| `configs` | `Record<string, unknown>` | 런타임 설정 (`dist/.config.json`에 기록) |
|
|
99
|
-
|
|
100
|
-
### SdServerPackageConfig
|
|
101
|
-
|
|
102
|
-
서버 앱 패키지 설정 (Fastify).
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
interface SdServerPackageConfig {
|
|
106
|
-
target: "server";
|
|
107
|
-
env?: Record<string, string>;
|
|
108
|
-
publish?: SdPublishConfig;
|
|
109
|
-
configs?: Record<string, unknown>;
|
|
110
|
-
externals?: string[];
|
|
111
|
-
pm2?: {
|
|
112
|
-
name?: string;
|
|
113
|
-
ignoreWatchPaths?: string[];
|
|
114
|
-
};
|
|
115
|
-
packageManager?: "volta" | "mise";
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
| 필드 | 타입 | 설명 |
|
|
120
|
-
|------|------|------|
|
|
121
|
-
| `target` | `"server"` | 고정값 |
|
|
122
|
-
| `env` | `Record<string, string>` | `process.env.KEY` 치환 값 |
|
|
123
|
-
| `publish` | `SdPublishConfig` | 배포 설정 |
|
|
124
|
-
| `configs` | `Record<string, unknown>` | 런타임 설정 (`dist/.config.json`에 기록) |
|
|
125
|
-
| `externals` | `string[]` | esbuild 번들에서 제외할 외부 모듈 (binding.gyp 자동 감지 외 추가분) |
|
|
126
|
-
| `pm2` | `object` | PM2 설정 (`dist/pm2.config.cjs` 생성) |
|
|
127
|
-
| `packageManager` | `"volta" \| "mise"` | 패키지 매니저 설정 파일 생성 |
|
|
128
|
-
|
|
129
|
-
### SdScriptsPackageConfig
|
|
130
|
-
|
|
131
|
-
스크립트 전용 패키지 (빌드/watch/typecheck 제외).
|
|
132
|
-
|
|
133
|
-
```typescript
|
|
134
|
-
interface SdScriptsPackageConfig {
|
|
135
|
-
target: "scripts";
|
|
136
|
-
publish?: SdPublishConfig;
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## 배포 설정 타입
|
|
141
|
-
|
|
142
|
-
### SdPublishConfig (유니온)
|
|
143
|
-
|
|
144
|
-
```typescript
|
|
145
|
-
type SdPublishConfig = SdNpmPublishConfig | SdLocalDirectoryPublishConfig | SdStoragePublishConfig;
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### SdNpmPublishConfig
|
|
149
|
-
|
|
150
|
-
```typescript
|
|
151
|
-
interface SdNpmPublishConfig {
|
|
152
|
-
type: "npm";
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### SdLocalDirectoryPublishConfig
|
|
157
|
-
|
|
158
|
-
```typescript
|
|
159
|
-
interface SdLocalDirectoryPublishConfig {
|
|
160
|
-
type: "local-directory";
|
|
161
|
-
path: string; // %VER%, %PROJECT% 치환 지원
|
|
162
|
-
}
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### SdStoragePublishConfig
|
|
166
|
-
|
|
167
|
-
```typescript
|
|
168
|
-
interface SdStoragePublishConfig {
|
|
169
|
-
type: "ftp" | "ftps" | "sftp";
|
|
170
|
-
host: string;
|
|
171
|
-
port?: number;
|
|
172
|
-
path?: string;
|
|
173
|
-
user?: string;
|
|
174
|
-
password?: string; // 미지정 시 SSH 키 인증 사용 (SFTP)
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### SdPostPublishScriptConfig
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
interface SdPostPublishScriptConfig {
|
|
182
|
-
type: "script";
|
|
183
|
-
cmd: string;
|
|
184
|
-
args: string[]; // %VER%, %PROJECT% 치환 지원
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Capacitor 설정
|
|
189
|
-
|
|
190
|
-
### SdCapacitorConfig
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
interface SdCapacitorConfig {
|
|
194
|
-
appId: string; // 예: "com.example.app"
|
|
195
|
-
appName: string;
|
|
196
|
-
plugins?: Record<string, Record<string, unknown> | true>;
|
|
197
|
-
icon?: string; // 패키지 디렉토리 기준 상대 경로
|
|
198
|
-
debug?: boolean;
|
|
199
|
-
platform?: {
|
|
200
|
-
android?: SdCapacitorAndroidConfig;
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### SdCapacitorAndroidConfig
|
|
206
|
-
|
|
207
|
-
```typescript
|
|
208
|
-
interface SdCapacitorAndroidConfig {
|
|
209
|
-
config?: Record<string, string>; // AndroidManifest application 속성
|
|
210
|
-
bundle?: boolean; // true: AAB, false: APK
|
|
211
|
-
intentFilters?: SdCapacitorIntentFilter[];
|
|
212
|
-
sign?: SdCapacitorSignConfig;
|
|
213
|
-
sdkVersion?: number; // minSdk, targetSdk
|
|
214
|
-
permissions?: SdCapacitorPermission[];
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### SdCapacitorSignConfig
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
interface SdCapacitorSignConfig {
|
|
222
|
-
keystore: string; // 패키지 디렉토리 기준 상대 경로
|
|
223
|
-
storePassword: string;
|
|
224
|
-
alias: string;
|
|
225
|
-
password: string;
|
|
226
|
-
keystoreType?: string; // 기본값: "jks"
|
|
227
|
-
}
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### SdCapacitorPermission
|
|
231
|
-
|
|
232
|
-
```typescript
|
|
233
|
-
interface SdCapacitorPermission {
|
|
234
|
-
name: string; // 예: "CAMERA"
|
|
235
|
-
maxSdkVersion?: number;
|
|
236
|
-
ignore?: string; // tools:ignore 속성
|
|
237
|
-
}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### SdCapacitorIntentFilter
|
|
241
|
-
|
|
242
|
-
```typescript
|
|
243
|
-
interface SdCapacitorIntentFilter {
|
|
244
|
-
action?: string; // 예: "android.intent.action.VIEW"
|
|
245
|
-
category?: string; // 예: "android.intent.category.DEFAULT"
|
|
246
|
-
}
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Electron 설정
|
|
250
|
-
|
|
251
|
-
### SdElectronConfig
|
|
252
|
-
|
|
253
|
-
```typescript
|
|
254
|
-
interface SdElectronConfig {
|
|
255
|
-
appId: string; // 예: "com.example.myapp"
|
|
256
|
-
portable?: boolean; // true: portable .exe, false: NSIS 설치
|
|
257
|
-
installerIcon?: string; // .ico 파일 경로
|
|
258
|
-
reinstallDependencies?: string[]; // Electron에 포함할 npm 패키지
|
|
259
|
-
postInstallScript?: string; // npm postinstall 스크립트
|
|
260
|
-
nsisOptions?: Record<string, unknown>;
|
|
261
|
-
env?: Record<string, string>; // electron-main.ts에서 사용할 환경 변수
|
|
262
|
-
}
|
|
263
|
-
```
|