@simplysm/sd-cli 14.0.10 → 14.0.12

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.
Files changed (266) hide show
  1. package/README.md +58 -253
  2. package/dist/angular/client-transform-stylesheet.js +1 -1
  3. package/dist/angular/client-transform-stylesheet.js.map +1 -1
  4. package/dist/angular/vite-angular-plugin.d.ts +1 -1
  5. package/dist/angular/vite-angular-plugin.d.ts.map +1 -1
  6. package/dist/angular/vite-angular-plugin.js +60 -34
  7. package/dist/angular/vite-angular-plugin.js.map +1 -1
  8. package/dist/angular/vite-postcss-inline-plugin.d.ts +1 -1
  9. package/dist/angular/vite-postcss-inline-plugin.js +1 -1
  10. package/dist/capacitor/capacitor.d.ts +14 -2
  11. package/dist/capacitor/capacitor.d.ts.map +1 -1
  12. package/dist/capacitor/capacitor.js +131 -17
  13. package/dist/capacitor/capacitor.js.map +1 -1
  14. package/dist/commands/build.d.ts +3 -10
  15. package/dist/commands/build.d.ts.map +1 -1
  16. package/dist/commands/build.js +3 -10
  17. package/dist/commands/build.js.map +1 -1
  18. package/dist/commands/check.js +3 -3
  19. package/dist/commands/check.js.map +1 -1
  20. package/dist/commands/dev.d.ts +3 -9
  21. package/dist/commands/dev.d.ts.map +1 -1
  22. package/dist/commands/dev.js +3 -9
  23. package/dist/commands/dev.js.map +1 -1
  24. package/dist/commands/device.d.ts +13 -0
  25. package/dist/commands/device.d.ts.map +1 -0
  26. package/dist/commands/device.js +53 -0
  27. package/dist/commands/device.js.map +1 -0
  28. package/dist/commands/publish.d.ts +1 -1
  29. package/dist/commands/publish.d.ts.map +1 -1
  30. package/dist/commands/publish.js +18 -26
  31. package/dist/commands/publish.js.map +1 -1
  32. package/dist/commands/replace-deps.d.ts +3 -3
  33. package/dist/commands/replace-deps.d.ts.map +1 -1
  34. package/dist/commands/replace-deps.js +1 -1
  35. package/dist/commands/typecheck.d.ts +4 -3
  36. package/dist/commands/typecheck.d.ts.map +1 -1
  37. package/dist/commands/typecheck.js +5 -11
  38. package/dist/commands/typecheck.js.map +1 -1
  39. package/dist/commands/watch.d.ts +9 -9
  40. package/dist/commands/watch.js +9 -9
  41. package/dist/electron/electron.d.ts.map +1 -1
  42. package/dist/electron/electron.js +42 -3
  43. package/dist/electron/electron.js.map +1 -1
  44. package/dist/engines/BaseEngine.d.ts +1 -1
  45. package/dist/engines/BaseEngine.d.ts.map +1 -1
  46. package/dist/engines/BaseEngine.js +3 -1
  47. package/dist/engines/BaseEngine.js.map +1 -1
  48. package/dist/engines/NgtscEngine.d.ts +7 -7
  49. package/dist/engines/NgtscEngine.d.ts.map +1 -1
  50. package/dist/engines/NgtscEngine.js +3 -3
  51. package/dist/engines/ServerEsbuildEngine.d.ts +7 -7
  52. package/dist/engines/ServerEsbuildEngine.d.ts.map +1 -1
  53. package/dist/engines/ServerEsbuildEngine.js +3 -3
  54. package/dist/engines/TscEngine.d.ts +7 -7
  55. package/dist/engines/TscEngine.d.ts.map +1 -1
  56. package/dist/engines/TscEngine.js +3 -3
  57. package/dist/engines/ViteEngine.d.ts +1 -1
  58. package/dist/engines/ViteEngine.d.ts.map +1 -1
  59. package/dist/engines/ViteEngine.js +7 -12
  60. package/dist/engines/ViteEngine.js.map +1 -1
  61. package/dist/engines/index.d.ts +5 -5
  62. package/dist/engines/index.js +5 -5
  63. package/dist/engines/types.d.ts +20 -20
  64. package/dist/engines/types.d.ts.map +1 -1
  65. package/dist/infra/ResultCollector.d.ts +9 -9
  66. package/dist/infra/ResultCollector.js +8 -8
  67. package/dist/infra/SignalHandler.d.ts +7 -7
  68. package/dist/infra/SignalHandler.js +7 -7
  69. package/dist/infra/WorkerManager.d.ts +14 -14
  70. package/dist/infra/WorkerManager.js +14 -14
  71. package/dist/orchestrators/BuildOrchestrator.d.ts +25 -25
  72. package/dist/orchestrators/BuildOrchestrator.d.ts.map +1 -1
  73. package/dist/orchestrators/BuildOrchestrator.js +29 -29
  74. package/dist/orchestrators/BuildOrchestrator.js.map +1 -1
  75. package/dist/orchestrators/DevWatchOrchestrator.d.ts +7 -7
  76. package/dist/orchestrators/DevWatchOrchestrator.d.ts.map +1 -1
  77. package/dist/orchestrators/DevWatchOrchestrator.js +35 -57
  78. package/dist/orchestrators/DevWatchOrchestrator.js.map +1 -1
  79. package/dist/sd-cli-entry.d.ts +2 -2
  80. package/dist/sd-cli-entry.d.ts.map +1 -1
  81. package/dist/sd-cli-entry.js +45 -9
  82. package/dist/sd-cli-entry.js.map +1 -1
  83. package/dist/sd-cli.d.ts +3 -3
  84. package/dist/sd-cli.js +16 -16
  85. package/dist/sd-cli.js.map +1 -1
  86. package/dist/sd-config.types.d.ts +105 -105
  87. package/dist/sd-config.types.d.ts.map +1 -1
  88. package/dist/utils/angular-compiler.js +5 -5
  89. package/dist/utils/angular-compiler.js.map +1 -1
  90. package/dist/utils/build-env.d.ts +1 -1
  91. package/dist/utils/build-env.js +1 -1
  92. package/dist/utils/concurrency.d.ts +7 -7
  93. package/dist/utils/concurrency.js +7 -7
  94. package/dist/utils/copy-public.d.ts +9 -9
  95. package/dist/utils/copy-public.js +17 -17
  96. package/dist/utils/copy-public.js.map +1 -1
  97. package/dist/utils/copy-src.d.ts +9 -9
  98. package/dist/utils/copy-src.js +11 -11
  99. package/dist/utils/copy-src.js.map +1 -1
  100. package/dist/utils/engine-stop.d.ts +8 -9
  101. package/dist/utils/engine-stop.d.ts.map +1 -1
  102. package/dist/utils/engine-stop.js +9 -10
  103. package/dist/utils/engine-stop.js.map +1 -1
  104. package/dist/utils/esbuild-config.d.ts +23 -23
  105. package/dist/utils/esbuild-config.d.ts.map +1 -1
  106. package/dist/utils/esbuild-config.js +25 -25
  107. package/dist/utils/esbuild-config.js.map +1 -1
  108. package/dist/utils/lint-with-program.d.ts +15 -15
  109. package/dist/utils/lint-with-program.d.ts.map +1 -1
  110. package/dist/utils/lint-with-program.js +29 -29
  111. package/dist/utils/lint-with-program.js.map +1 -1
  112. package/dist/utils/ngtsc-build-core.d.ts +8 -8
  113. package/dist/utils/ngtsc-build-core.d.ts.map +1 -1
  114. package/dist/utils/ngtsc-build-core.js +14 -14
  115. package/dist/utils/ngtsc-build-core.js.map +1 -1
  116. package/dist/utils/output-path-rewriter.d.ts +14 -14
  117. package/dist/utils/output-path-rewriter.js +18 -18
  118. package/dist/utils/output-path-rewriter.js.map +1 -1
  119. package/dist/utils/output-utils.d.ts +6 -6
  120. package/dist/utils/output-utils.js +11 -11
  121. package/dist/utils/output-utils.js.map +1 -1
  122. package/dist/utils/package-utils.d.ts +21 -21
  123. package/dist/utils/package-utils.d.ts.map +1 -1
  124. package/dist/utils/package-utils.js +56 -45
  125. package/dist/utils/package-utils.js.map +1 -1
  126. package/dist/utils/replace-deps.d.ts +25 -25
  127. package/dist/utils/replace-deps.d.ts.map +1 -1
  128. package/dist/utils/replace-deps.js +84 -65
  129. package/dist/utils/replace-deps.js.map +1 -1
  130. package/dist/utils/sd-config.d.ts +3 -3
  131. package/dist/utils/sd-config.js +3 -3
  132. package/dist/utils/tsc-build.d.ts +13 -13
  133. package/dist/utils/tsc-build.d.ts.map +1 -1
  134. package/dist/utils/tsc-build.js +9 -9
  135. package/dist/utils/tsc-build.js.map +1 -1
  136. package/dist/utils/tsconfig.d.ts +11 -9
  137. package/dist/utils/tsconfig.d.ts.map +1 -1
  138. package/dist/utils/tsconfig.js +11 -9
  139. package/dist/utils/tsconfig.js.map +1 -1
  140. package/dist/utils/typecheck-non-package.d.ts +5 -6
  141. package/dist/utils/typecheck-non-package.d.ts.map +1 -1
  142. package/dist/utils/typecheck-non-package.js +7 -8
  143. package/dist/utils/typecheck-non-package.js.map +1 -1
  144. package/dist/utils/typecheck-serialization.d.ts +8 -8
  145. package/dist/utils/typecheck-serialization.d.ts.map +1 -1
  146. package/dist/utils/typecheck-serialization.js +12 -16
  147. package/dist/utils/typecheck-serialization.js.map +1 -1
  148. package/dist/utils/vite-config.d.ts +8 -5
  149. package/dist/utils/vite-config.d.ts.map +1 -1
  150. package/dist/utils/vite-config.js +36 -29
  151. package/dist/utils/vite-config.js.map +1 -1
  152. package/dist/utils/vite-scope-watch-plugin.d.ts.map +1 -1
  153. package/dist/utils/vite-scope-watch-plugin.js +1 -1
  154. package/dist/utils/vite-scope-watch-plugin.js.map +1 -1
  155. package/dist/utils/worker-events.d.ts +12 -12
  156. package/dist/utils/worker-events.d.ts.map +1 -1
  157. package/dist/utils/worker-events.js +10 -10
  158. package/dist/utils/worker-events.js.map +1 -1
  159. package/dist/utils/worker-utils.d.ts +12 -13
  160. package/dist/utils/worker-utils.d.ts.map +1 -1
  161. package/dist/utils/worker-utils.js +12 -13
  162. package/dist/utils/worker-utils.js.map +1 -1
  163. package/dist/vitest-plugin.d.ts.map +1 -1
  164. package/dist/vitest-plugin.js +5 -7
  165. package/dist/vitest-plugin.js.map +1 -1
  166. package/dist/workers/client.worker.d.ts +4 -2
  167. package/dist/workers/client.worker.d.ts.map +1 -1
  168. package/dist/workers/client.worker.js +209 -1
  169. package/dist/workers/client.worker.js.map +1 -1
  170. package/dist/workers/library-build.worker.d.ts +1 -1
  171. package/dist/workers/library-build.worker.d.ts.map +1 -1
  172. package/dist/workers/library-build.worker.js +7 -7
  173. package/dist/workers/library-build.worker.js.map +1 -1
  174. package/dist/workers/lint.worker.d.ts +2 -2
  175. package/dist/workers/lint.worker.js +2 -2
  176. package/dist/workers/ngtsc-build.worker.js +30 -30
  177. package/dist/workers/ngtsc-build.worker.js.map +1 -1
  178. package/dist/workers/server-build.worker.d.ts +17 -17
  179. package/dist/workers/server-build.worker.d.ts.map +1 -1
  180. package/dist/workers/server-build.worker.js +46 -46
  181. package/dist/workers/server-build.worker.js.map +1 -1
  182. package/dist/workers/server-runtime.worker.d.ts +7 -7
  183. package/dist/workers/server-runtime.worker.d.ts.map +1 -1
  184. package/dist/workers/server-runtime.worker.js +17 -17
  185. package/dist/workers/server-runtime.worker.js.map +1 -1
  186. package/docs/config.md +340 -0
  187. package/docs/publish-configuration-types.md +87 -0
  188. package/docs/pwa-configuration-types.md +55 -0
  189. package/docs/vitest-plugin.md +47 -0
  190. package/package.json +9 -7
  191. package/src/angular/client-transform-stylesheet.ts +1 -1
  192. package/src/angular/vite-angular-plugin.ts +70 -37
  193. package/src/angular/vite-postcss-inline-plugin.ts +1 -1
  194. package/src/capacitor/capacitor.ts +159 -23
  195. package/src/commands/build.ts +3 -10
  196. package/src/commands/check.ts +3 -3
  197. package/src/commands/dev.ts +3 -9
  198. package/src/commands/device.ts +65 -0
  199. package/src/commands/publish.ts +30 -26
  200. package/src/commands/replace-deps.ts +3 -3
  201. package/src/commands/typecheck.ts +7 -13
  202. package/src/commands/watch.ts +9 -9
  203. package/src/electron/electron.ts +49 -4
  204. package/src/engines/BaseEngine.ts +4 -1
  205. package/src/engines/NgtscEngine.ts +7 -7
  206. package/src/engines/ServerEsbuildEngine.ts +7 -7
  207. package/src/engines/TscEngine.ts +7 -7
  208. package/src/engines/ViteEngine.ts +8 -13
  209. package/src/engines/index.ts +5 -5
  210. package/src/engines/types.ts +20 -20
  211. package/src/infra/ResultCollector.ts +9 -9
  212. package/src/infra/SignalHandler.ts +7 -7
  213. package/src/infra/WorkerManager.ts +14 -14
  214. package/src/orchestrators/BuildOrchestrator.ts +37 -37
  215. package/src/orchestrators/DevWatchOrchestrator.ts +37 -61
  216. package/src/sd-cli-entry.ts +51 -9
  217. package/src/sd-cli.ts +16 -16
  218. package/src/sd-config.types.ts +107 -107
  219. package/src/utils/angular-compiler.ts +5 -5
  220. package/src/utils/build-env.ts +1 -1
  221. package/src/utils/concurrency.ts +7 -7
  222. package/src/utils/copy-public.ts +17 -17
  223. package/src/utils/copy-src.ts +11 -11
  224. package/src/utils/engine-stop.ts +9 -10
  225. package/src/utils/esbuild-config.ts +29 -29
  226. package/src/utils/lint-with-program.ts +34 -34
  227. package/src/utils/ngtsc-build-core.ts +17 -17
  228. package/src/utils/output-path-rewriter.ts +18 -18
  229. package/src/utils/output-utils.ts +11 -11
  230. package/src/utils/package-utils.ts +57 -45
  231. package/src/utils/replace-deps.ts +92 -67
  232. package/src/utils/sd-config.ts +3 -3
  233. package/src/utils/tsc-build.ts +18 -18
  234. package/src/utils/tsconfig.ts +11 -9
  235. package/src/utils/typecheck-non-package.ts +7 -8
  236. package/src/utils/typecheck-serialization.ts +13 -15
  237. package/src/utils/vite-config.ts +45 -35
  238. package/src/utils/vite-scope-watch-plugin.ts +6 -1
  239. package/src/utils/worker-events.ts +16 -16
  240. package/src/utils/worker-utils.ts +12 -13
  241. package/src/vitest-plugin.ts +5 -8
  242. package/src/workers/client.worker.ts +236 -2
  243. package/src/workers/library-build.worker.ts +8 -8
  244. package/src/workers/lint.worker.ts +2 -2
  245. package/src/workers/ngtsc-build.worker.ts +31 -31
  246. package/src/workers/server-build.worker.ts +60 -60
  247. package/src/workers/server-runtime.worker.ts +22 -22
  248. package/tests/angular/vite-angular-plugin-hmr-fallback.spec.ts +1 -0
  249. package/tests/angular/vite-angular-plugin-hmr.spec.ts +78 -0
  250. package/tests/angular/vite-angular-plugin.spec.ts +67 -0
  251. package/tests/capacitor/capacitor-build.spec.ts +6 -4
  252. package/tests/capacitor/capacitor-icon.spec.ts +7 -5
  253. package/tests/capacitor/capacitor-init.spec.ts +120 -10
  254. package/tests/capacitor/capacitor-run.spec.ts +14 -17
  255. package/tests/capacitor/capacitor-workspace.spec.ts +5 -3
  256. package/tests/commands/check.spec.ts +2 -2
  257. package/tests/commands/device.spec.ts +147 -0
  258. package/tests/commands/publish.spec.ts +2 -2
  259. package/tests/commands/typecheck.spec.ts +8 -0
  260. package/tests/electron/electron.spec.ts +12 -10
  261. package/tests/engines/base-engine.spec.ts +37 -0
  262. package/tests/engines/vite-engine.spec.ts +115 -3
  263. package/tests/orchestrators/dev-watch-orchestrator.spec.ts +21 -93
  264. package/tests/utils/vite-config.spec.ts +144 -90
  265. package/tests/workers/client-worker.spec.ts +690 -0
  266. package/tests/workers/server-build-worker.spec.ts +3 -3
@@ -1,39 +1,39 @@
1
1
  /**
2
- * Build target type (built with esbuild)
3
- * - node: Node.js only package
4
- * - browser: browser only package
5
- * - neutral: Node/browser shared package
2
+ * 빌드 타겟 타입 (esbuild로 빌드)
3
+ * - node: Node.js 전용 패키지
4
+ * - browser: 브라우저 전용 패키지
5
+ * - neutral: Node/브라우저 공용 패키지
6
6
  */
7
7
  export type BuildTarget = "node" | "browser" | "neutral";
8
8
 
9
- //#region Publish configuration types
9
+ //#region 배포 설정 타입
10
10
 
11
11
  /**
12
- * npm registry publish configuration
12
+ * npm 레지스트리 배포 설정
13
13
  */
14
14
  export interface SdNpmPublishConfig {
15
15
  type: "npm";
16
16
  }
17
17
 
18
18
  /**
19
- * Package publish configuration
20
- * - SdNpmPublishConfig: deploy to npm registry
21
- * - SdLocalDirectoryPublishConfig: copy to local directory
22
- * - SdStoragePublishConfig: upload to FTP/FTPS/SFTP server
19
+ * 패키지 배포 설정
20
+ * - SdNpmPublishConfig: npm 레지스트리에 배포
21
+ * - SdLocalDirectoryPublishConfig: 로컬 디렉토리로 복사
22
+ * - SdStoragePublishConfig: FTP/FTPS/SFTP 서버에 업로드
23
23
  */
24
24
  export type SdPublishConfig = SdNpmPublishConfig | SdLocalDirectoryPublishConfig | SdStoragePublishConfig;
25
25
 
26
26
  /**
27
- * Local directory publish configuration
27
+ * 로컬 디렉토리 배포 설정
28
28
  */
29
29
  export interface SdLocalDirectoryPublishConfig {
30
30
  type: "local-directory";
31
- /** deployment target path (supports environment variable substitution: %VER%, %PROJECT%) */
31
+ /** 배포 대상 경로 (환경 변수 치환 지원: %VER%, %PROJECT%) */
32
32
  path: string;
33
33
  }
34
34
 
35
35
  /**
36
- * Storage (FTP/FTPS/SFTP) publish configuration
36
+ * 스토리지 (FTP/FTPS/SFTP) 배포 설정
37
37
  */
38
38
  export interface SdStoragePublishConfig {
39
39
  type: "ftp" | "ftps" | "sftp";
@@ -45,131 +45,131 @@ export interface SdStoragePublishConfig {
45
45
  }
46
46
 
47
47
  /**
48
- * postPublish script configuration
48
+ * postPublish 스크립트 설정
49
49
  */
50
50
  export interface SdPostPublishScriptConfig {
51
51
  type: "script";
52
52
  cmd: string;
53
- /** script arguments (supports environment variable substitution: %VER%, %PROJECT%) */
53
+ /** 스크립트 인수 (환경 변수 치환 지원: %VER%, %PROJECT%) */
54
54
  args: string[];
55
55
  }
56
56
 
57
57
  //#endregion
58
58
 
59
59
  /**
60
- * Package configuration (node/browser/neutral)
60
+ * 패키지 설정 (node/browser/neutral)
61
61
  */
62
62
  export interface SdBuildPackageConfig {
63
- /** build target */
63
+ /** 빌드 타겟 */
64
64
  target: BuildTarget;
65
- /** publish configuration */
65
+ /** 배포 설정 */
66
66
  publish?: SdPublishConfig;
67
- /** glob patterns for files to copy from src/ to dist/ (relative path based on src/) */
67
+ /** src/에서 dist/로 복사할 파일의 glob 패턴 (src/ 기준 상대 경로) */
68
68
  copySrc?: string[];
69
- /** watch hook configuration (when set, hook runs alongside build engine in watch mode) */
69
+ /** watch 설정 (설정 시, watch 모드에서 빌드 엔진과 함께 훅이 실행됨) */
70
70
  watch?: SdWatchHookConfig;
71
71
  }
72
72
 
73
73
  /**
74
- * Capacitor Android sign configuration
74
+ * Capacitor Android 서명 설정
75
75
  */
76
76
  export interface SdCapacitorSignConfig {
77
- /** keystore file path (relative path based on package directory) */
77
+ /** keystore 파일 경로 (패키지 디렉토리 기준 상대 경로) */
78
78
  keystore: string;
79
- /** keystore password */
79
+ /** keystore 비밀번호 */
80
80
  storePassword: string;
81
- /** key alias */
81
+ /** 별칭 */
82
82
  alias: string;
83
- /** key password */
83
+ /** 비밀번호 */
84
84
  password: string;
85
- /** keystore type (default: "jks") */
85
+ /** keystore 타입 (기본값: "jks") */
86
86
  keystoreType?: string;
87
87
  }
88
88
 
89
89
  /**
90
- * Capacitor Android permission configuration
90
+ * Capacitor Android 권한 설정
91
91
  */
92
92
  export interface SdCapacitorPermission {
93
- /** permission name (e.g., "CAMERA", "WRITE_EXTERNAL_STORAGE") */
93
+ /** 권한 이름 (예: "CAMERA", "WRITE_EXTERNAL_STORAGE") */
94
94
  name: string;
95
- /** maximum SDK version */
95
+ /** 최대 SDK 버전 */
96
96
  maxSdkVersion?: number;
97
- /** tools:ignore attribute value */
97
+ /** tools:ignore 속성 */
98
98
  ignore?: string;
99
99
  }
100
100
 
101
101
  /**
102
- * Capacitor Android Intent Filter configuration
102
+ * Capacitor Android Intent Filter 설정
103
103
  */
104
104
  export interface SdCapacitorIntentFilter {
105
- /** intent action (e.g., "android.intent.action.VIEW") */
105
+ /** intent 액션 (예: "android.intent.action.VIEW") */
106
106
  action?: string;
107
- /** intent category (e.g., "android.intent.category.DEFAULT") */
107
+ /** intent 카테고리 (예: "android.intent.category.DEFAULT") */
108
108
  category?: string;
109
109
  }
110
110
 
111
111
  /**
112
- * Capacitor Android platform configuration
112
+ * Capacitor Android 플랫폼 설정
113
113
  */
114
114
  export interface SdCapacitorAndroidConfig {
115
- /** AndroidManifest.xml application tag attributes (e.g., { requestLegacyExternalStorage: "true" }) */
115
+ /** AndroidManifest.xml application 태그 속성 (예: { requestLegacyExternalStorage: "true" }) */
116
116
  config?: Record<string, string>;
117
- /** AAB bundle build flag (false for APK) */
117
+ /** AAB 번들 빌드 플래그 (false이면 APK) */
118
118
  bundle?: boolean;
119
- /** Intent Filter configuration */
119
+ /** Intent Filter 설정 */
120
120
  intentFilters?: SdCapacitorIntentFilter[];
121
- /** APK/AAB signing configuration */
121
+ /** APK/AAB 서명 설정 */
122
122
  sign?: SdCapacitorSignConfig;
123
- /** Android SDK version (minSdk, targetSdk) */
123
+ /** Android SDK 버전 (minSdk, targetSdk) */
124
124
  sdkVersion?: number;
125
- /** additional permission configuration */
125
+ /** 추가 권한 설정 */
126
126
  permissions?: SdCapacitorPermission[];
127
127
  }
128
128
 
129
129
  /**
130
- * Capacitor configuration
130
+ * Capacitor 설정
131
131
  */
132
132
  export interface SdCapacitorConfig {
133
- /** app ID (e.g., "com.example.app") */
133
+ /** ID (예: "com.example.app") */
134
134
  appId: string;
135
- /** app name */
135
+ /** 이름 */
136
136
  appName: string;
137
- /** Capacitor plugin configuration (key: package name, value: true or plugin options) */
137
+ /** Capacitor 플러그인 설정 (key: 패키지명, value: true 또는 플러그인 옵션) */
138
138
  plugins?: Record<string, Record<string, unknown> | true>;
139
- /** app icon path (relative path based on package directory) */
139
+ /** 아이콘 경로 (패키지 디렉토리 기준 상대 경로) */
140
140
  icon?: string;
141
- /** debug build flag */
141
+ /** 디버그 빌드 플래그 */
142
142
  debug?: boolean;
143
- /** per-platform configuration */
143
+ /** 플랫폼별 설정 */
144
144
  platform?: {
145
145
  android?: SdCapacitorAndroidConfig;
146
146
  };
147
147
  }
148
148
 
149
149
  /**
150
- * Electron configuration
150
+ * Electron 설정
151
151
  */
152
152
  export interface SdElectronConfig {
153
- /** Electron app ID (e.g., "com.example.myapp") */
153
+ /** Electron ID (예: "com.example.myapp") */
154
154
  appId: string;
155
- /** portable .exe (true) or NSIS installer (false/unspecified) */
155
+ /** 포터블 .exe (true) 또는 NSIS 설치 프로그램 (false/미지정) */
156
156
  portable?: boolean;
157
- /** installer icon path (.ico, relative path based on package directory) */
157
+ /** 설치 프로그램 아이콘 경로 (.ico, 패키지 디렉토리 기준 상대 경로) */
158
158
  installerIcon?: string;
159
- /** npm packages to include in Electron (native modules, etc.) */
159
+ /** Electron에 포함할 npm 패키지 (네이티브 모듈 ) */
160
160
  reinstallDependencies?: string[];
161
- /** npm postinstall script */
161
+ /** npm postinstall 스크립트 */
162
162
  postInstallScript?: string;
163
- /** NSIS options (when portable is false) */
163
+ /** NSIS 옵션 (portable false일 ) */
164
164
  nsisOptions?: Record<string, unknown>;
165
- /** environment variables (accessible via process.env in electron-main.ts) */
165
+ /** 환경 변수 (electron-main.ts에서 process.env 접근 가능) */
166
166
  env?: Record<string, string>;
167
167
  }
168
168
 
169
- //#region PWA configuration types
169
+ //#region PWA 설정 타입
170
170
 
171
171
  /**
172
- * PWA manifest configuration (subset of VitePWA manifest options)
172
+ * PWA manifest 설정 (VitePWA manifest 옵션의 서브셋)
173
173
  */
174
174
  export interface SdPwaManifestConfig {
175
175
  name?: string;
@@ -181,14 +181,14 @@ export interface SdPwaManifestConfig {
181
181
  }
182
182
 
183
183
  /**
184
- * PWA workbox configuration
184
+ * PWA workbox 설정
185
185
  */
186
186
  export interface SdPwaWorkboxConfig {
187
187
  globPatterns?: string[];
188
188
  }
189
189
 
190
190
  /**
191
- * PWA configuration
191
+ * PWA 설정
192
192
  */
193
193
  export interface SdPwaConfig {
194
194
  manifest?: SdPwaManifestConfig;
@@ -198,98 +198,98 @@ export interface SdPwaConfig {
198
198
  //#endregion
199
199
 
200
200
  /**
201
- * Browser support configuration for client packages
201
+ * 클라이언트 패키지용 브라우저 지원 설정
202
202
  */
203
203
  export interface SdBrowserSupportConfig {
204
- /** browserslist query (e.g., "last 2 Chrome versions" or ["ie 11", "last 2 versions"]) */
204
+ /** browserslist 쿼리 (예: "last 2 Chrome versions" 또는 ["ie 11", "last 2 versions"]) */
205
205
  browserslist?: string | string[];
206
- /** PostCSS plugins configuration */
206
+ /** PostCSS 플러그인 설정 */
207
207
  postCss?: { plugins: unknown[] };
208
- /** legacy module support (disables code splitting + replaces import.meta) */
208
+ /** 레거시 모듈 지원 (코드 분할 비활성화 + import.meta 치환) */
209
209
  legacyModule?: boolean;
210
210
  }
211
211
 
212
212
  /**
213
- * Client package configuration (Vite development server)
213
+ * 클라이언트 패키지 설정 (Vite 개발 서버)
214
214
  */
215
215
  export interface SdClientPackageConfig {
216
- /** build target */
216
+ /** 빌드 타겟 */
217
217
  target: "client";
218
218
  /**
219
- * server configuration
220
- * - string: server package name to connect to (e.g., "solid-demo-server")
221
- * - number: use Vite port directly (backward compatibility)
219
+ * 서버 설정
220
+ * - string: 연결할 서버 패키지명 (예: "solid-demo-server")
221
+ * - number: Vite 포트 직접 지정 (하위 호환)
222
222
  */
223
223
  server: string | number;
224
- /** environment variables to substitute during build (replace process.env with object) */
224
+ /** 빌드 치환할 환경 변수 (process.env 객체로 치환) */
225
225
  env?: Record<string, string>;
226
- /** publish configuration */
226
+ /** 배포 설정 */
227
227
  publish?: SdPublishConfig;
228
- /** Capacitor configuration */
228
+ /** Capacitor 설정 */
229
229
  capacitor?: SdCapacitorConfig;
230
- /** Electron configuration */
230
+ /** Electron 설정 */
231
231
  electron?: SdElectronConfig;
232
- /** runtime config (written to dist/.config.json during build) */
232
+ /** 런타임 설정 (빌드 dist/.config.json으로 기록) */
233
233
  configs?: Record<string, unknown>;
234
- /** packages to exclude from Vite optimizeDeps and add to Capacitor/Electron package.json */
234
+ /** Vite optimizeDeps에서 제외하고 Capacitor/Electron package.json 추가할 패키지 */
235
235
  exclude?: string[];
236
- /** browser support configuration (browserslist, PostCSS, legacyModule) */
236
+ /** 브라우저 지원 설정 (browserslist, PostCSS, legacyModule) */
237
237
  browserSupport?: SdBrowserSupportConfig;
238
- /** PWA configuration. false to disable. Enabled with defaults when not specified */
238
+ /** PWA 설정. false이면 비활성화. 미지정 기본값으로 활성화 */
239
239
  pwa?: false | SdPwaConfig;
240
240
  }
241
241
 
242
242
  /**
243
- * Server package configuration (Fastify server)
243
+ * 서버 패키지 설정 (Fastify 서버)
244
244
  */
245
245
  export interface SdServerPackageConfig {
246
- /** build target */
246
+ /** 빌드 타겟 */
247
247
  target: "server";
248
- /** environment variables to substitute during build (replace process.env.KEY with constant) */
248
+ /** 빌드 치환할 환경 변수 (process.env.KEY 상수로 치환) */
249
249
  env?: Record<string, string>;
250
- /** publish configuration */
250
+ /** 배포 설정 */
251
251
  publish?: SdPublishConfig;
252
- /** runtime config (written to dist/.config.json during build) */
252
+ /** 런타임 설정 (빌드 dist/.config.json으로 기록) */
253
253
  configs?: Record<string, unknown>;
254
- /** external modules not to include in esbuild bundle (in addition to automatic binding.gyp detection) */
254
+ /** esbuild 번들에 포함하지 않을 외부 모듈 (자동 binding.gyp 감지에 추가) */
255
255
  externals?: string[];
256
- /** PM2 configuration (generates dist/pm2.config.cjs when specified) */
256
+ /** PM2 설정 (지정 dist/pm2.config.cjs 생성) */
257
257
  pm2?: {
258
- /** PM2 process name (generated from package.json name if unspecified) */
258
+ /** PM2 프로세스 이름 (미지정 package.json name에서 생성) */
259
259
  name?: string;
260
- /** paths to exclude from PM2 watch */
260
+ /** PM2 watch에서 제외할 경로 */
261
261
  ignoreWatchPaths?: string[];
262
262
  };
263
- /** Package manager to use (affects mise.toml or volta settings generation) */
263
+ /** 사용할 패키지 매니저 (mise.toml 또는 volta 설정 생성에 영향) */
264
264
  packageManager?: "volta" | "mise";
265
265
  }
266
266
 
267
267
  /**
268
- * Watch hook configuration for scripts packages
268
+ * scripts 패키지용 watch 설정
269
269
  */
270
270
  export interface SdWatchHookConfig {
271
- /** glob patterns to watch (relative to package directory) */
271
+ /** 감시할 glob 패턴 (패키지 디렉토리 기준 상대 경로) */
272
272
  target: string[];
273
- /** command to execute on change */
273
+ /** 변경 실행할 명령어 */
274
274
  cmd: string;
275
- /** command arguments */
275
+ /** 명령어 인수 */
276
276
  args?: string[];
277
277
  }
278
278
 
279
279
  /**
280
- * Scripts-only package configuration (excluded from watch/typecheck unless watch hook is configured)
280
+ * 스크립트 전용 패키지 설정 (watch 훅이 설정되지 않으면 watch/typecheck에서 제외)
281
281
  */
282
282
  export interface SdScriptsPackageConfig {
283
- /** build target */
283
+ /** 빌드 타겟 */
284
284
  target: "scripts";
285
- /** publish configuration */
285
+ /** 배포 설정 */
286
286
  publish?: SdPublishConfig;
287
- /** watch hook configuration (when set, package is included in watch mode) */
287
+ /** watch 설정 (설정 시, watch 모드에 패키지가 포함됨) */
288
288
  watch?: SdWatchHookConfig;
289
289
  }
290
290
 
291
291
  /**
292
- * Package configuration
292
+ * 패키지 설정
293
293
  */
294
294
  export type SdPackageConfig =
295
295
  | SdBuildPackageConfig
@@ -298,36 +298,36 @@ export type SdPackageConfig =
298
298
  | SdScriptsPackageConfig;
299
299
 
300
300
  /**
301
- * sd.config.ts configuration type
301
+ * sd.config.ts 설정 타입
302
302
  */
303
303
  export interface SdConfig {
304
- /** per-package configuration (key: subdirectory name under packages/, e.g., "core-common") */
304
+ /** 패키지별 설정 (key: packages/ 하위 디렉토리명, 예: "core-common") */
305
305
  packages: Record<string, SdPackageConfig | undefined>;
306
306
  /**
307
- * dependency replacement configuration (replace node_modules packages with local sources via symlink)
308
- * - key: package glob pattern to find in node_modules (e.g., "@simplysm/*")
309
- * - value: source directory path (captured values from key's * are substituted into value's *)
310
- * - example: { "@simplysm/*": "../simplysm/packages/*" }
307
+ * 의존성 교체 설정 (node_modules 패키지를 로컬 소스로 심링크 교체)
308
+ * - key: node_modules에서 찾을 패키지 glob 패턴 (예: "@simplysm/*")
309
+ * - value: 소스 디렉토리 경로 (key *에서 캡처된 값이 value *에 치환됨)
310
+ * - 예시: { "@simplysm/*": "../simplysm/packages/*" }
311
311
  */
312
312
  replaceDeps?: Record<string, string>;
313
- /** script to execute after deployment completes */
313
+ /** 배포 완료 실행할 스크립트 */
314
314
  postPublish?: SdPostPublishScriptConfig[];
315
315
  }
316
316
 
317
317
  /**
318
- * parameters passed to sd.config.ts function
318
+ * sd.config.ts 함수에 전달되는 매개변수
319
319
  */
320
320
  export interface SdConfigParams {
321
- /** current working directory */
321
+ /** 현재 작업 디렉토리 */
322
322
  cwd: string;
323
- /** development mode flag */
323
+ /** 개발 모드 플래그 */
324
324
  dev: boolean;
325
- /** additional options (from CLI's -o flag) */
325
+ /** 추가 옵션 (CLI -o 플래그에서 전달) */
326
326
  options: string[];
327
327
  }
328
328
 
329
329
  /**
330
- * sd.config.ts must default export a function of the following form:
330
+ * sd.config.ts 반드시 다음 형식의 함수를 default export해야 한다:
331
331
  *
332
332
  * ```typescript
333
333
  * import type { SdConfig, SdConfigFn, SdConfigParams } from "@simplysm/sd-cli";
@@ -242,7 +242,7 @@ export class AngularCompiler {
242
242
  if (options.externalStylesheets == null || hasTemplateExtension(resolvedPath)) {
243
243
  return resolvedPath;
244
244
  }
245
- // stylesheet with externalStylesheets (client mode)
245
+ // externalStylesheets를 사용한 스타일시트 처리 (클라이언트 모드)
246
246
  let externalId = options.externalStylesheets.get(resolvedPath);
247
247
  if (externalId === undefined) {
248
248
  externalId = createHash("sha256").update(resolvedPath).digest("hex");
@@ -331,7 +331,7 @@ export class AngularCompiler {
331
331
  }
332
332
  }
333
333
 
334
- // 11. findAffectedFiles + 12. 리소스 의존성 기반 diagnosticCache 무효화
334
+ // 11. findAffectedFiles (내부에서 리소스 의존성 기반 diagnosticCache 무효화도 수행)
335
335
  const affectedFiles = this._findAffectedFiles(
336
336
  builderProgram,
337
337
  angularProgram.compiler,
@@ -378,10 +378,10 @@ export class AngularCompiler {
378
378
  break;
379
379
  }
380
380
  if ("fileName" in result.affected) {
381
- // ts.SourceFile — single file change
381
+ // ts.SourceFile — 단일 파일 변경
382
382
  affectedFiles.add(result.affected);
383
383
  } else {
384
- // ts.Program — global scope change, treat all source files as affected
384
+ // ts.Program — 전역 스코프 변경, 모든 소스 파일을 affected로 처리
385
385
  for (const sourceFile of builderProgram.getSourceFiles()) {
386
386
  if (!angularCompiler.ignoreForDiagnostics.has(sourceFile)) {
387
387
  affectedFiles.add(sourceFile);
@@ -557,7 +557,7 @@ export class AngularCompiler {
557
557
  yield* ngOptionDiags;
558
558
  yield* tsOptionDiags;
559
559
 
560
- // 2. Syntactic
560
+ // 2. Global
561
561
  yield* builderProgram.getGlobalDiagnostics();
562
562
 
563
563
  // 3. 파일별 루프
@@ -3,7 +3,7 @@ import fs from "fs/promises";
3
3
  import { pathx } from "@simplysm/core-node";
4
4
 
5
5
  /**
6
- * Get version from root package.json
6
+ * 루트 package.json에서 버전을 가져온다.
7
7
  */
8
8
  export async function getVersion(cwd: string): Promise<string> {
9
9
  const pkgJsonPath = pathx.posix(path.join(cwd, "package.json"));
@@ -1,12 +1,12 @@
1
1
  import os from "os";
2
2
 
3
3
  /**
4
- * Run task functions with limited concurrency.
5
- * Uses a shared index pattern each worker consumes the next available task.
4
+ * 제한된 동시성으로 태스크 함수를 실행한다.
5
+ * 공유 인덱스 패턴을 사용 워커가 다음 사용 가능한 태스크를 소비한다.
6
6
  *
7
- * @param tasks Array of async task functions to execute
8
- * @param concurrency Maximum number of tasks running simultaneously
9
- * @returns Array of PromiseSettledResult in the same order as input tasks
7
+ * @param tasks 실행할 비동기 태스크 함수 배열
8
+ * @param concurrency 동시에 실행할 최대 태스크
9
+ * @returns 입력 태스크와 동일한 순서의 PromiseSettledResult 배열
10
10
  */
11
11
  export async function runWithConcurrency<T>(
12
12
  tasks: Array<() => Promise<T>>,
@@ -35,8 +35,8 @@ export async function runWithConcurrency<T>(
35
35
  }
36
36
 
37
37
  /**
38
- * Get max concurrency based on CPU cores.
39
- * Uses 7/8 of available cores (minimum 1).
38
+ * CPU 코어 기반으로 최대 동시성을 반환한다.
39
+ * 사용 가능한 코어의 7/8 사용한다 (최소 1).
40
40
  */
41
41
  export function getMaxConcurrency(): number {
42
42
  return Math.max(Math.floor((os.cpus().length * 7) / 8), 1);
@@ -6,17 +6,17 @@ import {
6
6
  } from "@simplysm/core-node";
7
7
 
8
8
  /**
9
- * Copy files from public/ and public-dev/ directories to dist/.
10
- * public-dev/ takes priority over public/ (overlay).
9
+ * public/ public-dev/ 디렉토리의 파일을 dist/로 복사한다.
10
+ * public-dev/가 public/보다 우선한다 (오버레이).
11
11
  *
12
- * @param pkgDir Package root directory
13
- * @param includeDev Whether to include public-dev/ (true only in dev mode)
12
+ * @param pkgDir 패키지 루트 디렉토리
13
+ * @param includeDev public-dev/ 포함 여부 (dev 모드에서만 true)
14
14
  */
15
15
  export async function copyPublicFiles(pkgDir: string, includeDev: boolean): Promise<void> {
16
16
  const distDir = pathx.posix(path.join(pkgDir, "dist"));
17
17
  await fsx.mkdir(distDir);
18
18
 
19
- // Copy public/
19
+ // public/ 복사
20
20
  const publicDir = pathx.posix(path.join(pkgDir, "public"));
21
21
  if (await fsx.exists(publicDir)) {
22
22
  const files = await fsx.glob("**/*", { cwd: publicDir, absolute: true });
@@ -30,7 +30,7 @@ export async function copyPublicFiles(pkgDir: string, includeDev: boolean): Prom
30
30
  );
31
31
  }
32
32
 
33
- // Copy public-dev/ (overlay: overwrites public/)
33
+ // public-dev/ 복사 (오버레이: public/ 덮어쓰기)
34
34
  if (includeDev) {
35
35
  const publicDevDir = pathx.posix(path.join(pkgDir, "public-dev"));
36
36
  if (await fsx.exists(publicDevDir)) {
@@ -48,12 +48,12 @@ export async function copyPublicFiles(pkgDir: string, includeDev: boolean): Prom
48
48
  }
49
49
 
50
50
  /**
51
- * Watch public/ and public-dev/ directories and copy files to dist/ in real-time.
52
- * Automatically reflects changes/additions/deletions after initial copy.
51
+ * public/ public-dev/ 디렉토리를 감시하고 변경사항을 실시간으로 dist/에 복사한다.
52
+ * 초기 복사 변경/추가/삭제를 자동으로 반영한다.
53
53
  *
54
- * @param pkgDir Package root directory
55
- * @param includeDev Whether to include public-dev/ (true only in dev mode)
56
- * @returns FsWatcher instance (must call close() on shutdown) or undefined if no watch targets
54
+ * @param pkgDir 패키지 루트 디렉토리
55
+ * @param includeDev public-dev/ 포함 여부 (dev 모드에서만 true)
56
+ * @returns FsWatcher 인스턴스 (종료 close() 호출 필요) 또는 감시 대상이 없으면 undefined
57
57
  */
58
58
  export async function watchPublicFiles(
59
59
  pkgDir: string,
@@ -63,10 +63,10 @@ export async function watchPublicFiles(
63
63
  const publicDir = pathx.posix(path.join(pkgDir, "public"));
64
64
  const publicDevDir = pathx.posix(path.join(pkgDir, "public-dev"));
65
65
 
66
- // Initial copy
66
+ // 초기 복사
67
67
  await copyPublicFiles(pkgDir, includeDev);
68
68
 
69
- // Collect watch target paths
69
+ // 감시 대상 경로 수집
70
70
  const watchPaths: string[] = [];
71
71
  if (await fsx.exists(publicDir)) {
72
72
  watchPaths.push(pathx.posix(path.join(publicDir, "**/*")));
@@ -83,7 +83,7 @@ export async function watchPublicFiles(
83
83
 
84
84
  watcher.onChange({ delay: 300 }, async (changes) => {
85
85
  for (const { event, path: filePath } of changes) {
86
- // Determine which source directory the change came from
86
+ // 변경이 발생한 소스 디렉토리 결정
87
87
  let sourceDir: string;
88
88
  if (pathx.isChildPath(filePath, publicDevDir)) {
89
89
  sourceDir = publicDevDir;
@@ -95,14 +95,14 @@ export async function watchPublicFiles(
95
95
  const distPath = pathx.posix(path.join(distDir, relPath));
96
96
 
97
97
  if (event === "unlink") {
98
- // If deleted from public, don't delete if same file exists in public-dev
98
+ // public에서 삭제된 경우, public-dev에 같은 파일이 있으면 삭제하지 않음
99
99
  if (sourceDir === publicDir && includeDev) {
100
100
  const devOverride = pathx.posix(path.join(publicDevDir, relPath));
101
101
  if (await fsx.exists(devOverride)) {
102
102
  continue;
103
103
  }
104
104
  }
105
- // If deleted from public-dev, restore from public if it exists (fallback restore)
105
+ // public-dev에서 삭제된 경우, public 파일이 있으면 복원 (폴백 복원)
106
106
  if (sourceDir === publicDevDir && includeDev) {
107
107
  const publicFallback = pathx.posix(path.join(publicDir, relPath));
108
108
  if (await fsx.exists(publicFallback)) {
@@ -113,7 +113,7 @@ export async function watchPublicFiles(
113
113
  }
114
114
  await fsx.rm(distPath);
115
115
  } else if (event === "add" || event === "change") {
116
- // If changed in public, skip if same file exists in public-dev (overlay takes priority)
116
+ // public에서 변경된 경우, public-dev에 같은 파일이 있으면 스킵 (오버레이 우선)
117
117
  if (sourceDir === publicDir && includeDev) {
118
118
  const devOverride = pathx.posix(path.join(publicDevDir, relPath));
119
119
  if (await fsx.exists(devOverride)) {