@simplysm/sd-claude 14.0.47 → 14.0.48
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/{claude/references/sd-simplysm14/sd-claude/usage.md → README.md} +2 -2
- package/claude/rules/sd-claude-rules.md +25 -10
- package/claude/rules/sd-options.md +11 -6
- package/claude/sd-subagent-start.sh +6 -0
- package/claude/settings.json +1 -12
- package/claude/skills/sd-check/SKILL.md +18 -9
- package/claude/skills/sd-claude-docs/SKILL.md +30 -58
- package/claude/skills/sd-claude-docs/references/package-claudemd.md +12 -0
- package/claude/skills/sd-claude-docs/references/package-doc-gen.md +22 -12
- package/claude/skills/sd-commit/SKILL.md +1 -1
- package/claude/skills/sd-debug/SKILL.md +5 -3
- package/claude/skills/sd-deliverable/SKILL.md +1 -1
- package/claude/skills/sd-dev/SKILL.md +14 -9
- package/claude/skills/sd-doc-extract/SKILL.md +8 -10
- package/claude/skills/sd-doc-extract/_common.py +8 -1
- package/claude/skills/sd-doc-extract/_extract_docx.py +74 -34
- package/claude/skills/sd-doc-extract/_extract_pdf.py +12 -1
- package/claude/skills/sd-doc-extract/_extract_pptx.py +103 -23
- package/claude/skills/sd-doc-extract/_extract_xlsb.py +93 -4
- package/claude/skills/sd-doc-extract/_extract_xlsx.py +98 -36
- package/claude/skills/sd-doc-extract/extract.py +22 -3
- package/claude/skills/sd-inner-clarify/SKILL.md +78 -0
- package/claude/skills/sd-inner-debug/SKILL.md +1 -1
- package/claude/skills/sd-inner-review/SKILL.md +13 -0
- package/claude/skills/sd-issue/SKILL.md +1 -1
- package/claude/skills/sd-outlook/SKILL.md +1 -1
- package/claude/skills/sd-plan/SKILL.md +50 -17
- package/claude/skills/sd-prompt/SKILL.md +180 -178
- package/claude/skills/sd-prompt/references/eval-runner.md +5 -30
- package/claude/skills/sd-prompt/references/sd-eval-env-template.md +23 -0
- package/claude/skills/sd-refactor/SKILL.md +2 -2
- package/claude/skills/sd-tdd/SKILL.md +40 -10
- package/claude/skills/sd-use/SKILL.md +84 -80
- package/claude/skills/sd-wbs/SKILL.md +84 -27
- package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/assets.md +2 -3
- package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/hooks.md +7 -6
- package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/scripts.md +1 -9
- package/package.json +3 -2
- package/scripts/sync.mjs +4 -2
- package/claude/references/sd-simplysm14/angular/docs/bootstrap.md +0 -48
- package/claude/references/sd-simplysm14/angular/docs/directives.md +0 -236
- package/claude/references/sd-simplysm14/angular/docs/features.md +0 -379
- package/claude/references/sd-simplysm14/angular/docs/pipes.md +0 -32
- package/claude/references/sd-simplysm14/angular/docs/plugins.md +0 -37
- package/claude/references/sd-simplysm14/angular/docs/provider-types.md +0 -283
- package/claude/references/sd-simplysm14/angular/docs/providers.md +0 -379
- package/claude/references/sd-simplysm14/angular/docs/styling.md +0 -222
- package/claude/references/sd-simplysm14/angular/docs/type-utilities.md +0 -250
- package/claude/references/sd-simplysm14/angular/docs/ui-data.md +0 -275
- package/claude/references/sd-simplysm14/angular/docs/ui-form.md +0 -490
- package/claude/references/sd-simplysm14/angular/docs/ui-layout.md +0 -140
- package/claude/references/sd-simplysm14/angular/docs/ui-navigation.md +0 -273
- package/claude/references/sd-simplysm14/angular/docs/ui-overlay.md +0 -157
- package/claude/references/sd-simplysm14/angular/docs/ui-visual.md +0 -127
- package/claude/references/sd-simplysm14/angular/docs/utils.md +0 -295
- package/claude/references/sd-simplysm14/angular/usage.md +0 -489
- package/claude/references/sd-simplysm14/capacitor-plugin-auto-update/usage.md +0 -182
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/file-operations.md +0 -154
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/permissions.md +0 -84
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/storage-paths.md +0 -107
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/types.md +0 -83
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/usage.md +0 -133
- package/claude/references/sd-simplysm14/capacitor-plugin-intent/usage.md +0 -203
- package/claude/references/sd-simplysm14/capacitor-plugin-usb-storage/usage.md +0 -258
- package/claude/references/sd-simplysm14/core-browser/usage.md +0 -306
- package/claude/references/sd-simplysm14/core-common/docs/errors.md +0 -82
- package/claude/references/sd-simplysm14/core-common/docs/extensions.md +0 -167
- package/claude/references/sd-simplysm14/core-common/docs/features.md +0 -136
- package/claude/references/sd-simplysm14/core-common/docs/types.md +0 -245
- package/claude/references/sd-simplysm14/core-common/docs/utils.md +0 -591
- package/claude/references/sd-simplysm14/core-common/usage.md +0 -255
- package/claude/references/sd-simplysm14/core-node/docs/child-process.md +0 -182
- package/claude/references/sd-simplysm14/core-node/docs/features.md +0 -214
- package/claude/references/sd-simplysm14/core-node/docs/file-system.md +0 -509
- package/claude/references/sd-simplysm14/core-node/docs/file-watching.md +0 -139
- package/claude/references/sd-simplysm14/core-node/docs/logging.md +0 -180
- package/claude/references/sd-simplysm14/core-node/docs/path.md +0 -176
- package/claude/references/sd-simplysm14/core-node/docs/utilities-cpx.md +0 -194
- package/claude/references/sd-simplysm14/core-node/docs/utilities-fsx.md +0 -469
- package/claude/references/sd-simplysm14/core-node/docs/utilities-pathx.md +0 -151
- package/claude/references/sd-simplysm14/core-node/docs/worker-threads.md +0 -334
- package/claude/references/sd-simplysm14/core-node/docs/worker.md +0 -205
- package/claude/references/sd-simplysm14/core-node/usage.md +0 -259
- package/claude/references/sd-simplysm14/excel/docs/core-classes.md +0 -453
- package/claude/references/sd-simplysm14/excel/docs/types.md +0 -459
- package/claude/references/sd-simplysm14/excel/docs/utilities.md +0 -194
- package/claude/references/sd-simplysm14/excel/docs/wrapper.md +0 -73
- package/claude/references/sd-simplysm14/excel/usage.md +0 -134
- package/claude/references/sd-simplysm14/lint/usage.md +0 -130
- package/claude/references/sd-simplysm14/orm-common/docs/core.md +0 -188
- package/claude/references/sd-simplysm14/orm-common/docs/expression.md +0 -190
- package/claude/references/sd-simplysm14/orm-common/docs/models.md +0 -17
- package/claude/references/sd-simplysm14/orm-common/docs/query-builder.md +0 -97
- package/claude/references/sd-simplysm14/orm-common/docs/queryable-executable.md +0 -250
- package/claude/references/sd-simplysm14/orm-common/docs/schema-builders.md +0 -364
- package/claude/references/sd-simplysm14/orm-common/docs/types.md +0 -522
- package/claude/references/sd-simplysm14/orm-common/usage.md +0 -229
- package/claude/references/sd-simplysm14/orm-node/docs/connections.md +0 -137
- package/claude/references/sd-simplysm14/orm-node/docs/core.md +0 -131
- package/claude/references/sd-simplysm14/orm-node/docs/types.md +0 -173
- package/claude/references/sd-simplysm14/orm-node/usage.md +0 -143
- package/claude/references/sd-simplysm14/sd-cli/usage.md +0 -782
- package/claude/references/sd-simplysm14/service-client/docs/features.md +0 -217
- package/claude/references/sd-simplysm14/service-client/docs/main.md +0 -148
- package/claude/references/sd-simplysm14/service-client/docs/protocol.md +0 -53
- package/claude/references/sd-simplysm14/service-client/docs/transport.md +0 -131
- package/claude/references/sd-simplysm14/service-client/docs/types.md +0 -129
- package/claude/references/sd-simplysm14/service-client/usage.md +0 -202
- package/claude/references/sd-simplysm14/service-common/docs/app-structure.md +0 -175
- package/claude/references/sd-simplysm14/service-common/docs/events.md +0 -64
- package/claude/references/sd-simplysm14/service-common/docs/protocol.md +0 -331
- package/claude/references/sd-simplysm14/service-common/docs/service-types.md +0 -90
- package/claude/references/sd-simplysm14/service-common/docs/types.md +0 -19
- package/claude/references/sd-simplysm14/service-common/usage.md +0 -154
- package/claude/references/sd-simplysm14/service-server/docs/auth.md +0 -64
- package/claude/references/sd-simplysm14/service-server/docs/core.md +0 -174
- package/claude/references/sd-simplysm14/service-server/docs/legacy.md +0 -25
- package/claude/references/sd-simplysm14/service-server/docs/main.md +0 -88
- package/claude/references/sd-simplysm14/service-server/docs/protocol.md +0 -33
- package/claude/references/sd-simplysm14/service-server/docs/services.md +0 -94
- package/claude/references/sd-simplysm14/service-server/docs/transport-http.md +0 -93
- package/claude/references/sd-simplysm14/service-server/docs/transport-socket.md +0 -119
- package/claude/references/sd-simplysm14/service-server/docs/types.md +0 -36
- package/claude/references/sd-simplysm14/service-server/docs/utils.md +0 -22
- package/claude/references/sd-simplysm14/service-server/usage.md +0 -171
- package/claude/references/sd-simplysm14/storage/usage.md +0 -301
- package/claude/references/sd-simplysm14.md +0 -35
- package/claude/rules/sd-clarify.md +0 -23
- package/claude/sd-session-start.sh +0 -10
- /package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/cli.md +0 -0
|
@@ -1,782 +0,0 @@
|
|
|
1
|
-
# @simplysm/sd-cli
|
|
2
|
-
|
|
3
|
-
Simplysm 모노레포용 빌드/개발/배포 CLI 도구. `sd.config.ts` 설정 타입과 Angular AOT Vite 플러그인(`sdAngularPlugin`)을 export한다.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @simplysm/sd-cli
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## API Overview
|
|
12
|
-
|
|
13
|
-
### Config
|
|
14
|
-
|
|
15
|
-
| API | Type | Description |
|
|
16
|
-
|-----|------|-------------|
|
|
17
|
-
| `NpmConfig` | interface | npm package.json 구조 |
|
|
18
|
-
| `BuildTarget` | type | 빌드 타겟 타입 (`"node"` \| `"browser"` \| `"neutral"`) |
|
|
19
|
-
| `SdNpmPublishConfig` | interface | npm 레지스트리 배포 설정 |
|
|
20
|
-
| `SdLocalDirectoryPublishConfig` | interface | 로컬 디렉토리 배포 설정 |
|
|
21
|
-
| `SdStoragePublishConfig` | interface | FTP/FTPS/SFTP 스토리지 배포 설정 |
|
|
22
|
-
| `SdPublishConfig` | type | 패키지 배포 설정 유니언 (`SdNpmPublishConfig` \| `SdLocalDirectoryPublishConfig` \| `SdStoragePublishConfig`) |
|
|
23
|
-
| `SdPostPublishScriptConfig` | interface | postPublish 스크립트 설정 |
|
|
24
|
-
| `SdBuildPackageConfig` | interface | node/browser/neutral 패키지 설정 |
|
|
25
|
-
| `SdCapacitorSignConfig` | interface | Capacitor Android APK/AAB 서명 설정 |
|
|
26
|
-
| `SdCapacitorPermission` | interface | Capacitor Android 권한 설정 |
|
|
27
|
-
| `SdCapacitorIntentFilter` | interface | Capacitor Android Intent Filter 설정 |
|
|
28
|
-
| `SdCapacitorAndroidConfig` | interface | Capacitor Android 플랫폼 설정 |
|
|
29
|
-
| `SdCapacitorConfig` | interface | Capacitor 설정 |
|
|
30
|
-
| `SdElectronConfig` | interface | Electron 설정 |
|
|
31
|
-
| `SdPwaManifestConfig` | interface | PWA manifest 설정 |
|
|
32
|
-
| `SdPwaConfig` | interface | PWA 설정 |
|
|
33
|
-
| `SdBrowserSupportConfig` | interface | 클라이언트 패키지용 브라우저 지원 설정 |
|
|
34
|
-
| `SdClientPackageConfig` | interface | 클라이언트 패키지 설정 (esbuild 기반 빌드) |
|
|
35
|
-
| `SdServerPackageConfig` | interface | 서버 패키지 설정 (Fastify 서버) |
|
|
36
|
-
| `SdWatchHookConfig` | interface | watch 훅 설정 |
|
|
37
|
-
| `SdScriptsPackageConfig` | interface | 스크립트 전용 패키지 설정 |
|
|
38
|
-
| `SdPackageConfig` | type | 패키지 설정 유니언 (`SdBuildPackageConfig` \| `SdClientPackageConfig` \| `SdServerPackageConfig` \| `SdScriptsPackageConfig`) |
|
|
39
|
-
| `SdConfig` | interface | sd.config.ts 설정 타입 |
|
|
40
|
-
| `SdConfigParams` | interface | sd.config.ts 함수에 전달되는 매개변수 |
|
|
41
|
-
| `SdConfigFn` | type | sd.config.ts default export 함수 타입 |
|
|
42
|
-
|
|
43
|
-
### TypeScript Compiler
|
|
44
|
-
|
|
45
|
-
| API | Type | Description |
|
|
46
|
-
|-----|------|-------------|
|
|
47
|
-
| `SdTsCompiler` | class | TypeScript AOT 컴파일러 (Angular 및 일반 TS 패키지 지원) |
|
|
48
|
-
| `ISdTsCompilerOptions` | interface | SdTsCompiler 생성 옵션 |
|
|
49
|
-
| `ISdTsCompilerResult` | interface | SdTsCompiler.compileAsync() 반환 타입 |
|
|
50
|
-
|
|
51
|
-
### Angular Vite Plugin
|
|
52
|
-
|
|
53
|
-
| API | Type | Description |
|
|
54
|
-
|-----|------|-------------|
|
|
55
|
-
| `SdAngularPluginOptions` | interface | sdAngularPlugin 옵션 |
|
|
56
|
-
| `sdAngularPlugin` | function | Angular AOT 컴파일을 수행하는 Vite 플러그인 |
|
|
57
|
-
|
|
58
|
-
## TypeScript Compiler 상세
|
|
59
|
-
|
|
60
|
-
### `SdTsCompiler`
|
|
61
|
-
|
|
62
|
-
TypeScript AOT 컴파일러. Angular 패키지와 일반 TypeScript 패키지 모두 지원하며 증분 빌드, lint 통합, SCSS 컴파일을 관리한다.
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
export class SdTsCompiler {
|
|
66
|
-
constructor(options: ISdTsCompilerOptions);
|
|
67
|
-
|
|
68
|
-
async compileAsync(
|
|
69
|
-
modifiedFiles?: ReadonlySet<string>,
|
|
70
|
-
emitOptions?: ISdTsCompilerEmitOptions,
|
|
71
|
-
): Promise<ISdTsCompilerResult>;
|
|
72
|
-
|
|
73
|
-
compileSideEffectScss(): void;
|
|
74
|
-
|
|
75
|
-
findAffectedByScss(scssPath: string): string[];
|
|
76
|
-
|
|
77
|
-
get sideEffectScssRegistry(): Map<string, SideEffectScssEntry>;
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
| Method | Description |
|
|
82
|
-
|--------|-------------|
|
|
83
|
-
| `compileAsync()` | TypeScript 컴파일 실행. modifiedFiles 지정 시 증분 빌드 수행. emitOptions로 emit 방식 제어 |
|
|
84
|
-
| `compileSideEffectScss()` | sideEffectScssRegistry의 모든 항목을 SCSS로 컴파일 |
|
|
85
|
-
| `findAffectedByScss()` | SCSS 경로에 의존하는 TypeScript 파일 목록 반환 (watch 역방향 추적용) |
|
|
86
|
-
| `sideEffectScssRegistry` | getter. Angular component @Component.styles 항목 저장소 |
|
|
87
|
-
|
|
88
|
-
### `ISdTsCompilerOptions`
|
|
89
|
-
|
|
90
|
-
SdTsCompiler 생성 옵션.
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
export interface ISdTsCompilerOptions {
|
|
94
|
-
pkgDir: string;
|
|
95
|
-
cwd: string;
|
|
96
|
-
output: { js: boolean; dts: boolean };
|
|
97
|
-
includeTests?: boolean;
|
|
98
|
-
env?: TypecheckEnv;
|
|
99
|
-
sourceFileCache?: AngularSourceFileCache;
|
|
100
|
-
transformStylesheet?: (data: string, containingFile: string, stylesheetFile?: string) => Promise<string | null>;
|
|
101
|
-
externalStylesheets?: Map<string, string>;
|
|
102
|
-
compilerOptionsTransformer?: (options: ts.CompilerOptions) => ts.CompilerOptions;
|
|
103
|
-
lint?: boolean;
|
|
104
|
-
globalScss?: boolean;
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
| Field | Type | Description |
|
|
109
|
-
|-------|------|-------------|
|
|
110
|
-
| `pkgDir` | `string` | 패키지 디렉토리 (절대 경로) |
|
|
111
|
-
| `cwd` | `string` | workspace 루트 (diagnostics 필터링 등에 사용) |
|
|
112
|
-
| `output` | `{ js: boolean; dts: boolean }` | emit 제어: js (JavaScript emit), dts (타입 선언 emit) |
|
|
113
|
-
| `includeTests` | `boolean?` | tests/ 파일을 rootNames에 포함할지 여부 (기본값: false) |
|
|
114
|
-
| `env` | `TypecheckEnv?` | 타입체크 환경. 설정 시 getCompilerOptionsForEnv() 적용 |
|
|
115
|
-
| `sourceFileCache` | `AngularSourceFileCache?` | Angular 증분 빌드용 SourceFile 캐시. 미제공 시 내부 생성 |
|
|
116
|
-
| `transformStylesheet` | `(data: string, containingFile: string, stylesheetFile?: string) => Promise<string \| null>?` | 스타일시트 변환 콜백 (Angular only) |
|
|
117
|
-
| `externalStylesheets` | `Map<string, string>?` | 외부 스타일시트 맵 (클라이언트 빌드용, resourceNameToFileName에서 사용) |
|
|
118
|
-
| `compilerOptionsTransformer` | `(options: ts.CompilerOptions) => ts.CompilerOptions?` | compilerOptions 후처리 (클라이언트의 target/module 강제 등) |
|
|
119
|
-
| `lint` | `boolean?` | lint 실행 여부. true이면 compileAsync 결과에 lint 결과 포함 |
|
|
120
|
-
| `globalScss` | `boolean?` | 글로벌 SCSS 컴파일 여부. true이면 scss/styles.scss → dist/styles.css 생성 |
|
|
121
|
-
|
|
122
|
-
### `ISdTsCompilerEmitOptions`
|
|
123
|
-
|
|
124
|
-
compileAsync()의 emit 옵션. Angular 컴파일러만 지원.
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
export interface ISdTsCompilerEmitOptions {
|
|
128
|
-
sourceFilter?: (fileName: string) => boolean;
|
|
129
|
-
additionalTransformers?: {
|
|
130
|
-
before?: ts.TransformerFactory<ts.SourceFile>[];
|
|
131
|
-
after?: ts.TransformerFactory<ts.SourceFile>[];
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
| Field | Type | Description |
|
|
137
|
-
|-------|------|-------------|
|
|
138
|
-
| `sourceFilter` | `(fileName: string) => boolean?` | emit 대상 소스 필터 (지정 시 해당 파일만 EmitResult에 포함). Angular only |
|
|
139
|
-
| `additionalTransformers` | `{ before?: ts.TransformerFactory<ts.SourceFile>[]; after?: ts.TransformerFactory<ts.SourceFile>[]; }?` | Angular transformers 외 추가 transformers. Angular only |
|
|
140
|
-
|
|
141
|
-
### `ISdTsCompilerResult`
|
|
142
|
-
|
|
143
|
-
compileAsync() 반환 타입.
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
export interface ISdTsCompilerResult {
|
|
147
|
-
program: ts.Program;
|
|
148
|
-
builderProgram: ts.EmitAndSemanticDiagnosticsBuilderProgram;
|
|
149
|
-
isForAngular: boolean;
|
|
150
|
-
affectedFiles: ReadonlySet<string> | undefined;
|
|
151
|
-
diagnostics: SerializedDiagnostic[];
|
|
152
|
-
errorCount: number;
|
|
153
|
-
warningCount: number;
|
|
154
|
-
errors?: string[];
|
|
155
|
-
ngtscProgram?: NgtscProgram;
|
|
156
|
-
emitResults?: EmitResult[];
|
|
157
|
-
lint?: LintWithProgramResult;
|
|
158
|
-
scssErrors: string[];
|
|
159
|
-
scssDependencies: ReadonlyMap<string, ReadonlySet<string>>;
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
| Field | Type | Description |
|
|
164
|
-
|-------|------|-------------|
|
|
165
|
-
| `program` | `ts.Program` | TypeScript Program 참조 (lint, 외부 도구용) |
|
|
166
|
-
| `builderProgram` | `ts.EmitAndSemanticDiagnosticsBuilderProgram` | Builder Program 참조 (증분 빌드 상태) |
|
|
167
|
-
| `isForAngular` | `boolean` | Angular 패키지 여부 (tsconfig.json에 angularCompilerOptions 존재) |
|
|
168
|
-
| `affectedFiles` | `ReadonlySet<string> \| undefined` | 이 빌드에서 영향받은 파일 (posix 경로). undefined = 전역 변경 (전체 리빌드) |
|
|
169
|
-
| `diagnostics` | `SerializedDiagnostic[]` | 직렬화된 진단 정보 (Worker 경계 통과용) |
|
|
170
|
-
| `errorCount` | `number` | Error 카테고리 진단 수 |
|
|
171
|
-
| `warningCount` | `number` | Warning 카테고리 진단 수 |
|
|
172
|
-
| `errors` | `string[]?` | Error 카테고리 진단을 "파일:줄:열: TS코드: 메시지" 형식으로 포맷한 배열 |
|
|
173
|
-
| `ngtscProgram` | `NgtscProgram?` | NgtscProgram 참조 (Angular only, HMR용). Non-Angular이면 undefined |
|
|
174
|
-
| `emitResults` | `EmitResult[]?` | Angular emit 결과 (Non-Angular이면 undefined — writeFile 훅으로 디스크 직접 쓰기) |
|
|
175
|
-
| `lint` | `LintWithProgramResult?` | lint 결과 (lint 옵션 활성 시) |
|
|
176
|
-
| `scssErrors` | `string[]` | SCSS 컴파일 에러 목록 |
|
|
177
|
-
| `scssDependencies` | `ReadonlyMap<string, ReadonlySet<string>>` | SCSS 의존성 맵 (소유자 파일 → 의존 SCSS 경로 집합). watch 역방향 탐색용 |
|
|
178
|
-
|
|
179
|
-
## Config 상세
|
|
180
|
-
|
|
181
|
-
### `NpmConfig`
|
|
182
|
-
|
|
183
|
-
npm package.json 구조를 나타내는 인터페이스.
|
|
184
|
-
|
|
185
|
-
```typescript
|
|
186
|
-
export interface NpmConfig {
|
|
187
|
-
name: string;
|
|
188
|
-
version: string;
|
|
189
|
-
description?: string;
|
|
190
|
-
dependencies?: Record<string, string>;
|
|
191
|
-
devDependencies?: Record<string, string>;
|
|
192
|
-
peerDependencies?: Record<string, string>;
|
|
193
|
-
volta?: unknown;
|
|
194
|
-
}
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
| Field | Type | Description |
|
|
198
|
-
|-------|------|-------------|
|
|
199
|
-
| `name` | `string` | 패키지명 |
|
|
200
|
-
| `version` | `string` | 패키지 버전 |
|
|
201
|
-
| `description` | `string?` | 패키지 설명 |
|
|
202
|
-
| `dependencies` | `Record<string, string>?` | 프로덕션 의존성 |
|
|
203
|
-
| `devDependencies` | `Record<string, string>?` | 개발 의존성 |
|
|
204
|
-
| `peerDependencies` | `Record<string, string>?` | 피어 의존성 |
|
|
205
|
-
| `volta` | `unknown?` | Volta 설정 |
|
|
206
|
-
|
|
207
|
-
### `BuildTarget`
|
|
208
|
-
|
|
209
|
-
빌드 타겟 타입. esbuild로 빌드된다.
|
|
210
|
-
|
|
211
|
-
```typescript
|
|
212
|
-
export type BuildTarget = "node" | "browser" | "neutral";
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
- `"node"`: Node.js 전용 패키지
|
|
216
|
-
- `"browser"`: 브라우저 전용 패키지
|
|
217
|
-
- `"neutral"`: Node/브라우저 공용 패키지
|
|
218
|
-
|
|
219
|
-
### `SdNpmPublishConfig`
|
|
220
|
-
|
|
221
|
-
npm 레지스트리 배포 설정.
|
|
222
|
-
|
|
223
|
-
```typescript
|
|
224
|
-
export interface SdNpmPublishConfig {
|
|
225
|
-
type: "npm";
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
| Field | Type | Description |
|
|
230
|
-
|-------|------|-------------|
|
|
231
|
-
| `type` | `"npm"` | 배포 타입 식별자 |
|
|
232
|
-
|
|
233
|
-
### `SdLocalDirectoryPublishConfig`
|
|
234
|
-
|
|
235
|
-
로컬 디렉토리 배포 설정.
|
|
236
|
-
|
|
237
|
-
```typescript
|
|
238
|
-
export interface SdLocalDirectoryPublishConfig {
|
|
239
|
-
type: "local-directory";
|
|
240
|
-
path: string;
|
|
241
|
-
}
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
| Field | Type | Description |
|
|
245
|
-
|-------|------|-------------|
|
|
246
|
-
| `type` | `"local-directory"` | 배포 타입 식별자 |
|
|
247
|
-
| `path` | `string` | 배포 대상 경로 (환경 변수 치환 지원: `%VER%`, `%PROJECT%`) |
|
|
248
|
-
|
|
249
|
-
### `SdStoragePublishConfig`
|
|
250
|
-
|
|
251
|
-
FTP/FTPS/SFTP 스토리지 배포 설정.
|
|
252
|
-
|
|
253
|
-
```typescript
|
|
254
|
-
export interface SdStoragePublishConfig {
|
|
255
|
-
type: "ftp" | "ftps" | "sftp";
|
|
256
|
-
host: string;
|
|
257
|
-
port?: number;
|
|
258
|
-
path?: string;
|
|
259
|
-
user?: string;
|
|
260
|
-
password?: string;
|
|
261
|
-
}
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
| Field | Type | Description |
|
|
265
|
-
|-------|------|-------------|
|
|
266
|
-
| `type` | `"ftp" \| "ftps" \| "sftp"` | 스토리지 프로토콜 |
|
|
267
|
-
| `host` | `string` | 서버 호스트 |
|
|
268
|
-
| `port` | `number?` | 서버 포트 |
|
|
269
|
-
| `path` | `string?` | 원격 경로 |
|
|
270
|
-
| `user` | `string?` | 사용자명 |
|
|
271
|
-
| `password` | `string?` | 비밀번호 |
|
|
272
|
-
|
|
273
|
-
### `SdPublishConfig`
|
|
274
|
-
|
|
275
|
-
패키지 배포 설정. `type` 필드로 분기하는 discriminated union이다.
|
|
276
|
-
|
|
277
|
-
```typescript
|
|
278
|
-
export type SdPublishConfig = SdNpmPublishConfig | SdLocalDirectoryPublishConfig | SdStoragePublishConfig;
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
- `type: "npm"` → `SdNpmPublishConfig`
|
|
282
|
-
- `type: "local-directory"` → `SdLocalDirectoryPublishConfig`
|
|
283
|
-
- `type: "ftp" | "ftps" | "sftp"` → `SdStoragePublishConfig`
|
|
284
|
-
|
|
285
|
-
### `SdPostPublishScriptConfig`
|
|
286
|
-
|
|
287
|
-
배포 완료 후 실행할 스크립트 설정.
|
|
288
|
-
|
|
289
|
-
```typescript
|
|
290
|
-
export interface SdPostPublishScriptConfig {
|
|
291
|
-
type: "script";
|
|
292
|
-
cmd: string;
|
|
293
|
-
args: string[];
|
|
294
|
-
}
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
| Field | Type | Description |
|
|
298
|
-
|-------|------|-------------|
|
|
299
|
-
| `type` | `"script"` | 타입 식별자 |
|
|
300
|
-
| `cmd` | `string` | 실행할 명령어 |
|
|
301
|
-
| `args` | `string[]` | 스크립트 인수 (환경 변수 치환 지원: `%VER%`, `%PROJECT%`) |
|
|
302
|
-
|
|
303
|
-
### `SdBuildPackageConfig`
|
|
304
|
-
|
|
305
|
-
node/browser/neutral 패키지 설정.
|
|
306
|
-
|
|
307
|
-
```typescript
|
|
308
|
-
export interface SdBuildPackageConfig {
|
|
309
|
-
target: BuildTarget;
|
|
310
|
-
publish?: SdPublishConfig;
|
|
311
|
-
copySrc?: string[];
|
|
312
|
-
watch?: SdWatchHookConfig;
|
|
313
|
-
}
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
| Field | Type | Description |
|
|
317
|
-
|-------|------|-------------|
|
|
318
|
-
| `target` | `BuildTarget` | 빌드 타겟 (`"node"` \| `"browser"` \| `"neutral"`) |
|
|
319
|
-
| `publish` | `SdPublishConfig?` | 배포 설정 |
|
|
320
|
-
| `copySrc` | `string[]?` | src/에서 dist/로 복사할 파일의 glob 패턴 (src/ 기준 상대 경로) |
|
|
321
|
-
| `watch` | `SdWatchHookConfig?` | watch 훅 설정 |
|
|
322
|
-
|
|
323
|
-
### `SdCapacitorSignConfig`
|
|
324
|
-
|
|
325
|
-
Capacitor Android APK/AAB 서명 설정.
|
|
326
|
-
|
|
327
|
-
```typescript
|
|
328
|
-
export interface SdCapacitorSignConfig {
|
|
329
|
-
keystore: string;
|
|
330
|
-
storePassword: string;
|
|
331
|
-
alias: string;
|
|
332
|
-
password: string;
|
|
333
|
-
keystoreType?: string;
|
|
334
|
-
}
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
| Field | Type | Description |
|
|
338
|
-
|-------|------|-------------|
|
|
339
|
-
| `keystore` | `string` | keystore 파일 경로 (패키지 디렉토리 기준 상대 경로) |
|
|
340
|
-
| `storePassword` | `string` | keystore 비밀번호 |
|
|
341
|
-
| `alias` | `string` | 키 별칭 |
|
|
342
|
-
| `password` | `string` | 키 비밀번호 |
|
|
343
|
-
| `keystoreType` | `string?` | keystore 타입 (기본값: `"jks"`) |
|
|
344
|
-
|
|
345
|
-
### `SdCapacitorPermission`
|
|
346
|
-
|
|
347
|
-
Capacitor Android 권한 설정.
|
|
348
|
-
|
|
349
|
-
```typescript
|
|
350
|
-
export interface SdCapacitorPermission {
|
|
351
|
-
name: string;
|
|
352
|
-
maxSdkVersion?: number;
|
|
353
|
-
ignore?: string;
|
|
354
|
-
}
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
| Field | Type | Description |
|
|
358
|
-
|-------|------|-------------|
|
|
359
|
-
| `name` | `string` | 권한 이름 (예: `"CAMERA"`, `"WRITE_EXTERNAL_STORAGE"`) |
|
|
360
|
-
| `maxSdkVersion` | `number?` | 최대 SDK 버전 |
|
|
361
|
-
| `ignore` | `string?` | `tools:ignore` 속성 값 |
|
|
362
|
-
|
|
363
|
-
### `SdCapacitorIntentFilter`
|
|
364
|
-
|
|
365
|
-
Capacitor Android Intent Filter 설정.
|
|
366
|
-
|
|
367
|
-
```typescript
|
|
368
|
-
export interface SdCapacitorIntentFilter {
|
|
369
|
-
action?: string;
|
|
370
|
-
category?: string;
|
|
371
|
-
}
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
| Field | Type | Description |
|
|
375
|
-
|-------|------|-------------|
|
|
376
|
-
| `action` | `string?` | intent 액션 (예: `"android.intent.action.VIEW"`) |
|
|
377
|
-
| `category` | `string?` | intent 카테고리 (예: `"android.intent.category.DEFAULT"`) |
|
|
378
|
-
|
|
379
|
-
### `SdCapacitorAndroidConfig`
|
|
380
|
-
|
|
381
|
-
Capacitor Android 플랫폼 설정.
|
|
382
|
-
|
|
383
|
-
```typescript
|
|
384
|
-
export interface SdCapacitorAndroidConfig {
|
|
385
|
-
config?: Record<string, string>;
|
|
386
|
-
bundle?: boolean;
|
|
387
|
-
intentFilters?: SdCapacitorIntentFilter[];
|
|
388
|
-
sign?: SdCapacitorSignConfig;
|
|
389
|
-
sdkVersion?: number;
|
|
390
|
-
permissions?: SdCapacitorPermission[];
|
|
391
|
-
}
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
| Field | Type | Description |
|
|
395
|
-
|-------|------|-------------|
|
|
396
|
-
| `config` | `Record<string, string>?` | AndroidManifest.xml application 태그 속성 |
|
|
397
|
-
| `bundle` | `boolean?` | AAB 번들 빌드 플래그 (false이면 APK) |
|
|
398
|
-
| `intentFilters` | `SdCapacitorIntentFilter[]?` | Intent Filter 설정 |
|
|
399
|
-
| `sign` | `SdCapacitorSignConfig?` | APK/AAB 서명 설정 |
|
|
400
|
-
| `sdkVersion` | `number?` | Android SDK 버전 (minSdk, targetSdk) |
|
|
401
|
-
| `permissions` | `SdCapacitorPermission[]?` | 추가 권한 설정 |
|
|
402
|
-
|
|
403
|
-
### `SdCapacitorConfig`
|
|
404
|
-
|
|
405
|
-
Capacitor 설정.
|
|
406
|
-
|
|
407
|
-
```typescript
|
|
408
|
-
export interface SdCapacitorConfig {
|
|
409
|
-
appId: string;
|
|
410
|
-
appName: string;
|
|
411
|
-
plugins?: Record<string, Record<string, unknown> | true>;
|
|
412
|
-
icon?: string;
|
|
413
|
-
debug?: boolean;
|
|
414
|
-
platform?: {
|
|
415
|
-
android?: SdCapacitorAndroidConfig;
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
| Field | Type | Description |
|
|
421
|
-
|-------|------|-------------|
|
|
422
|
-
| `appId` | `string` | 앱 ID (예: `"com.example.app"`) |
|
|
423
|
-
| `appName` | `string` | 앱 이름 |
|
|
424
|
-
| `plugins` | `Record<string, Record<string, unknown> \| true>?` | Capacitor 플러그인 설정 (key: 패키지명) |
|
|
425
|
-
| `icon` | `string?` | 앱 아이콘 경로 (패키지 디렉토리 기준 상대 경로) |
|
|
426
|
-
| `debug` | `boolean?` | 디버그 빌드 플래그 |
|
|
427
|
-
| `platform` | `{ android?: SdCapacitorAndroidConfig }?` | 플랫폼별 설정 |
|
|
428
|
-
|
|
429
|
-
### `SdElectronConfig`
|
|
430
|
-
|
|
431
|
-
Electron 설정.
|
|
432
|
-
|
|
433
|
-
```typescript
|
|
434
|
-
export interface SdElectronConfig {
|
|
435
|
-
appId: string;
|
|
436
|
-
portable?: boolean;
|
|
437
|
-
installerIcon?: string;
|
|
438
|
-
reinstallDependencies?: string[];
|
|
439
|
-
postInstallScript?: string;
|
|
440
|
-
nsisOptions?: Record<string, unknown>;
|
|
441
|
-
env?: Record<string, string>;
|
|
442
|
-
}
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
| Field | Type | Description |
|
|
446
|
-
|-------|------|-------------|
|
|
447
|
-
| `appId` | `string` | Electron 앱 ID (예: `"com.example.myapp"`) |
|
|
448
|
-
| `portable` | `boolean?` | 포터블 .exe (true) 또는 NSIS 설치 프로그램 (false/미지정) |
|
|
449
|
-
| `installerIcon` | `string?` | 설치 프로그램 아이콘 경로 (.ico, 패키지 디렉토리 기준 상대 경로) |
|
|
450
|
-
| `reinstallDependencies` | `string[]?` | Electron에 포함할 npm 패키지 (네이티브 모듈 등) |
|
|
451
|
-
| `postInstallScript` | `string?` | npm postinstall 스크립트 |
|
|
452
|
-
| `nsisOptions` | `Record<string, unknown>?` | NSIS 옵션 (portable이 false일 때) |
|
|
453
|
-
| `env` | `Record<string, string>?` | 환경 변수 (electron-main.ts에서 process.env로 접근 가능) |
|
|
454
|
-
|
|
455
|
-
### `SdPwaManifestConfig`
|
|
456
|
-
|
|
457
|
-
PWA manifest 설정.
|
|
458
|
-
|
|
459
|
-
```typescript
|
|
460
|
-
export interface SdPwaManifestConfig {
|
|
461
|
-
name?: string;
|
|
462
|
-
short_name?: string;
|
|
463
|
-
display?: "standalone" | "fullscreen" | "minimal-ui" | "browser";
|
|
464
|
-
theme_color?: string;
|
|
465
|
-
background_color?: string;
|
|
466
|
-
icons?: Array<{ src: string; sizes: string; type?: string }>;
|
|
467
|
-
}
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
| Field | Type | Description |
|
|
471
|
-
|-------|------|-------------|
|
|
472
|
-
| `name` | `string?` | 앱 이름 |
|
|
473
|
-
| `short_name` | `string?` | 앱 짧은 이름 |
|
|
474
|
-
| `display` | `"standalone" \| "fullscreen" \| "minimal-ui" \| "browser"?` | 디스플레이 모드 |
|
|
475
|
-
| `theme_color` | `string?` | 테마 색상 |
|
|
476
|
-
| `background_color` | `string?` | 배경 색상 |
|
|
477
|
-
| `icons` | `Array<{ src: string; sizes: string; type?: string }>?` | 아이콘 목록 |
|
|
478
|
-
|
|
479
|
-
### `SdPwaConfig`
|
|
480
|
-
|
|
481
|
-
PWA 설정.
|
|
482
|
-
|
|
483
|
-
```typescript
|
|
484
|
-
export interface SdPwaConfig {
|
|
485
|
-
manifest?: SdPwaManifestConfig;
|
|
486
|
-
}
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
| Field | Type | Description |
|
|
490
|
-
|-------|------|-------------|
|
|
491
|
-
| `manifest` | `SdPwaManifestConfig?` | PWA manifest 설정 |
|
|
492
|
-
|
|
493
|
-
### `SdBrowserSupportConfig`
|
|
494
|
-
|
|
495
|
-
클라이언트 패키지용 브라우저 지원 설정.
|
|
496
|
-
|
|
497
|
-
```typescript
|
|
498
|
-
export interface SdBrowserSupportConfig {
|
|
499
|
-
browserslist?: string | string[];
|
|
500
|
-
postCss?: { plugins: [string, (object | string)?][] };
|
|
501
|
-
legacyModule?: boolean;
|
|
502
|
-
}
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
| Field | Type | Description |
|
|
506
|
-
|-------|------|-------------|
|
|
507
|
-
| `browserslist` | `string \| string[]?` | browserslist 쿼리 (예: `"last 2 Chrome versions"`) |
|
|
508
|
-
| `postCss` | `{ plugins: [string, (object \| string)?][] }?` | PostCSS 플러그인 설정 ([name, options] 튜플 배열) |
|
|
509
|
-
| `legacyModule` | `boolean?` | 레거시 모듈 지원 (코드 분할 비활성화 + import.meta 치환) |
|
|
510
|
-
|
|
511
|
-
### `SdClientPackageConfig`
|
|
512
|
-
|
|
513
|
-
클라이언트 패키지 설정 (esbuild 기반 빌드).
|
|
514
|
-
|
|
515
|
-
```typescript
|
|
516
|
-
export interface SdClientPackageConfig {
|
|
517
|
-
target: "client";
|
|
518
|
-
server: string | number;
|
|
519
|
-
env?: Record<string, string>;
|
|
520
|
-
publish?: SdPublishConfig;
|
|
521
|
-
capacitor?: SdCapacitorConfig;
|
|
522
|
-
electron?: SdElectronConfig;
|
|
523
|
-
configs?: Record<string, unknown>;
|
|
524
|
-
exclude?: string[];
|
|
525
|
-
browserSupport?: SdBrowserSupportConfig;
|
|
526
|
-
pwa?: false | SdPwaConfig;
|
|
527
|
-
}
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
| Field | Type | Description |
|
|
531
|
-
|-------|------|-------------|
|
|
532
|
-
| `target` | `"client"` | 빌드 타겟 |
|
|
533
|
-
| `server` | `string \| number` | 연결할 서버 패키지명 또는 포트 직접 지정 |
|
|
534
|
-
| `env` | `Record<string, string>?` | 빌드 시 치환할 환경 변수 |
|
|
535
|
-
| `publish` | `SdPublishConfig?` | 배포 설정 |
|
|
536
|
-
| `capacitor` | `SdCapacitorConfig?` | Capacitor 설정 |
|
|
537
|
-
| `electron` | `SdElectronConfig?` | Electron 설정 |
|
|
538
|
-
| `configs` | `Record<string, unknown>?` | 런타임 설정 (빌드 시 dist/.config.json으로 기록) |
|
|
539
|
-
| `exclude` | `string[]?` | Capacitor/Electron package.json에 추가할 패키지 |
|
|
540
|
-
| `browserSupport` | `SdBrowserSupportConfig?` | 브라우저 지원 설정 |
|
|
541
|
-
| `pwa` | `false \| SdPwaConfig?` | PWA 설정. false이면 비활성화. 미지정 시 기본값으로 활성화 |
|
|
542
|
-
|
|
543
|
-
### `SdServerPackageConfig`
|
|
544
|
-
|
|
545
|
-
서버 패키지 설정 (Fastify 서버).
|
|
546
|
-
|
|
547
|
-
```typescript
|
|
548
|
-
export interface SdServerPackageConfig {
|
|
549
|
-
target: "server";
|
|
550
|
-
env?: Record<string, string>;
|
|
551
|
-
publish?: SdPublishConfig;
|
|
552
|
-
configs?: Record<string, unknown>;
|
|
553
|
-
externals?: string[];
|
|
554
|
-
pm2?: {
|
|
555
|
-
name?: string;
|
|
556
|
-
ignoreWatchPaths?: string[];
|
|
557
|
-
};
|
|
558
|
-
packageManager?: "volta" | "mise";
|
|
559
|
-
}
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
| Field | Type | Description |
|
|
563
|
-
|-------|------|-------------|
|
|
564
|
-
| `target` | `"server"` | 빌드 타겟 |
|
|
565
|
-
| `env` | `Record<string, string>?` | 빌드 시 치환할 환경 변수 |
|
|
566
|
-
| `publish` | `SdPublishConfig?` | 배포 설정 |
|
|
567
|
-
| `configs` | `Record<string, unknown>?` | 런타임 설정 (빌드 시 dist/.config.json으로 기록) |
|
|
568
|
-
| `externals` | `string[]?` | esbuild 번들에 포함하지 않을 외부 모듈 |
|
|
569
|
-
| `pm2` | `{ name?: string; ignoreWatchPaths?: string[] }?` | PM2 설정 (지정 시 dist/pm2.config.cjs 생성) |
|
|
570
|
-
| `packageManager` | `"volta" \| "mise"?` | 사용할 패키지 매니저 |
|
|
571
|
-
|
|
572
|
-
### `SdWatchHookConfig`
|
|
573
|
-
|
|
574
|
-
watch 훅 설정. 파일 변경 시 명령어를 실행한다.
|
|
575
|
-
|
|
576
|
-
```typescript
|
|
577
|
-
export interface SdWatchHookConfig {
|
|
578
|
-
target: string[];
|
|
579
|
-
cmd: string;
|
|
580
|
-
args?: string[];
|
|
581
|
-
}
|
|
582
|
-
```
|
|
583
|
-
|
|
584
|
-
| Field | Type | Description |
|
|
585
|
-
|-------|------|-------------|
|
|
586
|
-
| `target` | `string[]` | 감시할 glob 패턴 (패키지 디렉토리 기준 상대 경로) |
|
|
587
|
-
| `cmd` | `string` | 변경 시 실행할 명령어 |
|
|
588
|
-
| `args` | `string[]?` | 명령어 인수 |
|
|
589
|
-
|
|
590
|
-
### `SdScriptsPackageConfig`
|
|
591
|
-
|
|
592
|
-
스크립트 전용 패키지 설정. watch 훅이 설정되지 않으면 watch/typecheck에서 제외된다.
|
|
593
|
-
|
|
594
|
-
```typescript
|
|
595
|
-
export interface SdScriptsPackageConfig {
|
|
596
|
-
target: "scripts";
|
|
597
|
-
publish?: SdPublishConfig;
|
|
598
|
-
watch?: SdWatchHookConfig;
|
|
599
|
-
}
|
|
600
|
-
```
|
|
601
|
-
|
|
602
|
-
| Field | Type | Description |
|
|
603
|
-
|-------|------|-------------|
|
|
604
|
-
| `target` | `"scripts"` | 빌드 타겟 |
|
|
605
|
-
| `publish` | `SdPublishConfig?` | 배포 설정 |
|
|
606
|
-
| `watch` | `SdWatchHookConfig?` | watch 훅 설정 |
|
|
607
|
-
|
|
608
|
-
### `SdPackageConfig`
|
|
609
|
-
|
|
610
|
-
패키지 설정 유니언. `target` 필드로 분기하는 discriminated union이다.
|
|
611
|
-
|
|
612
|
-
```typescript
|
|
613
|
-
export type SdPackageConfig =
|
|
614
|
-
| SdBuildPackageConfig
|
|
615
|
-
| SdClientPackageConfig
|
|
616
|
-
| SdServerPackageConfig
|
|
617
|
-
| SdScriptsPackageConfig;
|
|
618
|
-
```
|
|
619
|
-
|
|
620
|
-
- `target: "node" | "browser" | "neutral"` → `SdBuildPackageConfig`
|
|
621
|
-
- `target: "client"` → `SdClientPackageConfig`
|
|
622
|
-
- `target: "server"` → `SdServerPackageConfig`
|
|
623
|
-
- `target: "scripts"` → `SdScriptsPackageConfig`
|
|
624
|
-
|
|
625
|
-
### `SdConfig`
|
|
626
|
-
|
|
627
|
-
sd.config.ts 설정 타입.
|
|
628
|
-
|
|
629
|
-
```typescript
|
|
630
|
-
export interface SdConfig {
|
|
631
|
-
packages: Record<string, SdPackageConfig | undefined>;
|
|
632
|
-
replaceDeps?: Record<string, string>;
|
|
633
|
-
postPublish?: SdPostPublishScriptConfig[];
|
|
634
|
-
}
|
|
635
|
-
```
|
|
636
|
-
|
|
637
|
-
| Field | Type | Description |
|
|
638
|
-
|-------|------|-------------|
|
|
639
|
-
| `packages` | `Record<string, SdPackageConfig \| undefined>` | 패키지별 설정 (key: packages/ 하위 디렉토리명) |
|
|
640
|
-
| `replaceDeps` | `Record<string, string>?` | 의존성 교체 설정 (node_modules 패키지를 로컬 소스로 심링크 교체). key: 패키지 glob 패턴, value: 소스 디렉토리 경로 |
|
|
641
|
-
| `postPublish` | `SdPostPublishScriptConfig[]?` | 배포 완료 후 실행할 스크립트 |
|
|
642
|
-
|
|
643
|
-
### `SdConfigParams`
|
|
644
|
-
|
|
645
|
-
sd.config.ts 함수에 전달되는 매개변수.
|
|
646
|
-
|
|
647
|
-
```typescript
|
|
648
|
-
export interface SdConfigParams {
|
|
649
|
-
cwd: string;
|
|
650
|
-
dev: boolean;
|
|
651
|
-
opt: string[];
|
|
652
|
-
}
|
|
653
|
-
```
|
|
654
|
-
|
|
655
|
-
| Field | Type | Description |
|
|
656
|
-
|-------|------|-------------|
|
|
657
|
-
| `cwd` | `string` | 현재 작업 디렉토리 |
|
|
658
|
-
| `dev` | `boolean` | 개발 모드 플래그 |
|
|
659
|
-
| `opt` | `string[]` | 추가 옵션 (CLI의 `-o` 플래그에서 전달) |
|
|
660
|
-
|
|
661
|
-
### `SdConfigFn`
|
|
662
|
-
|
|
663
|
-
sd.config.ts는 반드시 이 형식의 함수를 default export해야 한다.
|
|
664
|
-
|
|
665
|
-
```typescript
|
|
666
|
-
export type SdConfigFn = (params: SdConfigParams) => SdConfig | Promise<SdConfig>;
|
|
667
|
-
```
|
|
668
|
-
|
|
669
|
-
## Angular Vite Plugin 상세
|
|
670
|
-
|
|
671
|
-
### `SdAngularPluginOptions`
|
|
672
|
-
|
|
673
|
-
sdAngularPlugin 옵션.
|
|
674
|
-
|
|
675
|
-
```typescript
|
|
676
|
-
export interface SdAngularPluginOptions {
|
|
677
|
-
/** sd.config.ts packages 키 (패키지 디렉토리명) */
|
|
678
|
-
pkg: string;
|
|
679
|
-
}
|
|
680
|
-
```
|
|
681
|
-
|
|
682
|
-
| Field | Type | Description |
|
|
683
|
-
|-------|------|-------------|
|
|
684
|
-
| `pkg` | `string` | sd.config.ts packages 키 (패키지 디렉토리명) |
|
|
685
|
-
|
|
686
|
-
### `sdAngularPlugin`
|
|
687
|
-
|
|
688
|
-
Angular AOT 컴파일을 수행하는 Vite 플러그인 (Vitest 전용). AngularBuildPipeline + JavaScriptTransformer를 관리한다.
|
|
689
|
-
|
|
690
|
-
```typescript
|
|
691
|
-
export function sdAngularPlugin(options: SdAngularPluginOptions): Plugin;
|
|
692
|
-
```
|
|
693
|
-
|
|
694
|
-
| Parameter | Type | Description |
|
|
695
|
-
|-----------|------|-------------|
|
|
696
|
-
| `options` | `SdAngularPluginOptions` | 플러그인 옵션 |
|
|
697
|
-
|
|
698
|
-
**Returns**: `Plugin` (Vite 플러그인 객체)
|
|
699
|
-
|
|
700
|
-
Vite 훅: `config` (pkgDir 초기화), `watchChange` (파일 변경 추적), `buildStart` (Pipeline 초기화 + 컴파일 + emit, watch 재빌드 시 증분 재컴파일), `transform` (.ts 파일에 대해 캐싱된 JS 반환 + 인라인 소스맵 분리), `buildEnd` (pipeline 참조 해제).
|
|
701
|
-
|
|
702
|
-
## Usage Examples
|
|
703
|
-
|
|
704
|
-
### SdTsCompiler를 사용한 TypeScript 컴파일
|
|
705
|
-
|
|
706
|
-
```typescript
|
|
707
|
-
import { SdTsCompiler } from "@simplysm/sd-cli";
|
|
708
|
-
|
|
709
|
-
const compiler = new SdTsCompiler({
|
|
710
|
-
pkgDir: "/workspace/packages/my-lib",
|
|
711
|
-
cwd: "/workspace",
|
|
712
|
-
output: { js: true, dts: true },
|
|
713
|
-
lint: true,
|
|
714
|
-
globalScss: true,
|
|
715
|
-
});
|
|
716
|
-
|
|
717
|
-
// 초기 컴파일
|
|
718
|
-
const result = await compiler.compileAsync();
|
|
719
|
-
|
|
720
|
-
if (result.errors) {
|
|
721
|
-
console.error("Compilation errors:", result.errors);
|
|
722
|
-
process.exit(1);
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
console.log(`Compiled ${result.affectedFiles?.size ?? "all"} files`);
|
|
726
|
-
```
|
|
727
|
-
|
|
728
|
-
### watch 모드에서 증분 컴파일
|
|
729
|
-
|
|
730
|
-
```typescript
|
|
731
|
-
import { SdTsCompiler } from "@simplysm/sd-cli";
|
|
732
|
-
|
|
733
|
-
const compiler = new SdTsCompiler({
|
|
734
|
-
pkgDir: "/workspace/packages/my-lib",
|
|
735
|
-
cwd: "/workspace",
|
|
736
|
-
output: { js: true, dts: true },
|
|
737
|
-
});
|
|
738
|
-
|
|
739
|
-
// 초기 컴파일
|
|
740
|
-
let result = await compiler.compileAsync();
|
|
741
|
-
|
|
742
|
-
// 파일 변경 감지 시 증분 컴파일
|
|
743
|
-
const changedFiles = new Set(["/workspace/packages/my-lib/src/foo.ts"]);
|
|
744
|
-
result = await compiler.compileAsync(changedFiles);
|
|
745
|
-
|
|
746
|
-
// SCSS 의존성이 변경된 TS 파일 찾기
|
|
747
|
-
const affectedByScss = compiler.findAffectedByScss("/workspace/packages/my-lib/scss/variables.scss");
|
|
748
|
-
```
|
|
749
|
-
|
|
750
|
-
### sd.config.ts 작성
|
|
751
|
-
|
|
752
|
-
```typescript
|
|
753
|
-
import type { SdConfigFn } from "@simplysm/sd-cli";
|
|
754
|
-
|
|
755
|
-
const config: SdConfigFn = (params) => ({
|
|
756
|
-
packages: {
|
|
757
|
-
"core-common": { target: "neutral" },
|
|
758
|
-
"core-node": { target: "node" },
|
|
759
|
-
"my-client": {
|
|
760
|
-
target: "client",
|
|
761
|
-
server: "my-server",
|
|
762
|
-
},
|
|
763
|
-
"my-server": {
|
|
764
|
-
target: "server",
|
|
765
|
-
publish: { type: "npm" },
|
|
766
|
-
},
|
|
767
|
-
},
|
|
768
|
-
});
|
|
769
|
-
|
|
770
|
-
export default config;
|
|
771
|
-
```
|
|
772
|
-
|
|
773
|
-
### Vite에서 Angular AOT 플러그인 사용
|
|
774
|
-
|
|
775
|
-
```typescript
|
|
776
|
-
import { defineConfig } from "vite";
|
|
777
|
-
import { sdAngularPlugin } from "@simplysm/sd-cli";
|
|
778
|
-
|
|
779
|
-
export default defineConfig({
|
|
780
|
-
plugins: [sdAngularPlugin({ pkg: "my-client" })],
|
|
781
|
-
});
|
|
782
|
-
```
|