@simplysm/sd-cli 13.0.68 → 13.0.70

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 (201) hide show
  1. package/README.md +10 -957
  2. package/dist/builders/BaseBuilder.d.ts +23 -23
  3. package/dist/builders/BaseBuilder.d.ts.map +1 -1
  4. package/dist/builders/BaseBuilder.js +15 -15
  5. package/dist/builders/DtsBuilder.d.ts +4 -4
  6. package/dist/builders/DtsBuilder.js +1 -1
  7. package/dist/builders/LibraryBuilder.d.ts +3 -3
  8. package/dist/builders/types.d.ts +10 -10
  9. package/dist/capacitor/capacitor.d.ts +36 -36
  10. package/dist/capacitor/capacitor.js +63 -63
  11. package/dist/capacitor/capacitor.js.map +1 -1
  12. package/dist/commands/add-client.d.ts +8 -8
  13. package/dist/commands/add-client.js +15 -15
  14. package/dist/commands/add-client.js.map +1 -1
  15. package/dist/commands/add-server.d.ts +9 -9
  16. package/dist/commands/add-server.js +13 -13
  17. package/dist/commands/add-server.js.map +1 -1
  18. package/dist/commands/build.d.ts +9 -9
  19. package/dist/commands/check.js +3 -3
  20. package/dist/commands/check.js.map +1 -1
  21. package/dist/commands/dev.d.ts +9 -9
  22. package/dist/commands/device.d.ts +9 -9
  23. package/dist/commands/device.d.ts.map +1 -1
  24. package/dist/commands/device.js +17 -17
  25. package/dist/commands/device.js.map +1 -1
  26. package/dist/commands/init.d.ts +6 -6
  27. package/dist/commands/init.js +12 -12
  28. package/dist/commands/init.js.map +1 -1
  29. package/dist/commands/lint.d.ts +23 -23
  30. package/dist/commands/lint.d.ts.map +1 -1
  31. package/dist/commands/lint.js +25 -25
  32. package/dist/commands/lint.js.map +1 -1
  33. package/dist/commands/publish.d.ts +13 -13
  34. package/dist/commands/publish.d.ts.map +1 -1
  35. package/dist/commands/publish.js +61 -61
  36. package/dist/commands/publish.js.map +1 -1
  37. package/dist/commands/replace-deps.d.ts +3 -3
  38. package/dist/commands/replace-deps.d.ts.map +1 -1
  39. package/dist/commands/replace-deps.js +1 -1
  40. package/dist/commands/replace-deps.js.map +1 -1
  41. package/dist/commands/typecheck.d.ts +20 -20
  42. package/dist/commands/typecheck.d.ts.map +1 -1
  43. package/dist/commands/typecheck.js +20 -20
  44. package/dist/commands/typecheck.js.map +1 -1
  45. package/dist/commands/watch.d.ts +7 -7
  46. package/dist/electron/electron.d.ts +27 -27
  47. package/dist/electron/electron.js +32 -32
  48. package/dist/electron/electron.js.map +1 -1
  49. package/dist/infra/ResultCollector.d.ts +9 -9
  50. package/dist/infra/ResultCollector.js +5 -5
  51. package/dist/infra/SignalHandler.d.ts +7 -7
  52. package/dist/infra/SignalHandler.js +4 -4
  53. package/dist/infra/WorkerManager.d.ts +14 -14
  54. package/dist/infra/WorkerManager.js +11 -11
  55. package/dist/orchestrators/BuildOrchestrator.d.ts +19 -19
  56. package/dist/orchestrators/BuildOrchestrator.d.ts.map +1 -1
  57. package/dist/orchestrators/BuildOrchestrator.js +26 -26
  58. package/dist/orchestrators/BuildOrchestrator.js.map +1 -1
  59. package/dist/orchestrators/DevOrchestrator.d.ts +25 -25
  60. package/dist/orchestrators/DevOrchestrator.d.ts.map +1 -1
  61. package/dist/orchestrators/DevOrchestrator.js +30 -30
  62. package/dist/orchestrators/DevOrchestrator.js.map +1 -1
  63. package/dist/orchestrators/WatchOrchestrator.d.ts +13 -13
  64. package/dist/orchestrators/WatchOrchestrator.js +17 -17
  65. package/dist/orchestrators/WatchOrchestrator.js.map +1 -1
  66. package/dist/sd-cli-entry.d.ts +2 -2
  67. package/dist/sd-cli-entry.js +38 -38
  68. package/dist/sd-cli-entry.js.map +1 -1
  69. package/dist/sd-cli.d.ts +2 -2
  70. package/dist/sd-cli.js +1 -1
  71. package/dist/sd-cli.js.map +1 -1
  72. package/dist/sd-config.types.d.ts +84 -84
  73. package/dist/sd-config.types.d.ts.map +1 -1
  74. package/dist/utils/build-env.d.ts +1 -1
  75. package/dist/utils/config-editor.d.ts +5 -5
  76. package/dist/utils/config-editor.js +2 -2
  77. package/dist/utils/config-editor.js.map +1 -1
  78. package/dist/utils/copy-public.d.ts +9 -9
  79. package/dist/utils/copy-src.d.ts +9 -9
  80. package/dist/utils/esbuild-config.d.ts +30 -30
  81. package/dist/utils/esbuild-config.d.ts.map +1 -1
  82. package/dist/utils/output-utils.d.ts +6 -6
  83. package/dist/utils/package-utils.d.ts +6 -6
  84. package/dist/utils/package-utils.js +1 -1
  85. package/dist/utils/package-utils.js.map +1 -1
  86. package/dist/utils/rebuild-manager.js +3 -3
  87. package/dist/utils/rebuild-manager.js.map +1 -1
  88. package/dist/utils/replace-deps.d.ts +25 -25
  89. package/dist/utils/replace-deps.js +3 -3
  90. package/dist/utils/replace-deps.js.map +1 -1
  91. package/dist/utils/sd-config.d.ts +3 -3
  92. package/dist/utils/sd-config.js +3 -3
  93. package/dist/utils/sd-config.js.map +1 -1
  94. package/dist/utils/tailwind-config-deps.d.ts +3 -3
  95. package/dist/utils/template.d.ts +8 -8
  96. package/dist/utils/tsconfig.d.ts +16 -16
  97. package/dist/utils/tsconfig.js +2 -2
  98. package/dist/utils/tsconfig.js.map +1 -1
  99. package/dist/utils/typecheck-serialization.d.ts +8 -8
  100. package/dist/utils/vite-config.d.ts +8 -8
  101. package/dist/utils/vite-config.d.ts.map +1 -1
  102. package/dist/utils/vite-config.js +3 -3
  103. package/dist/utils/worker-events.d.ts +12 -12
  104. package/dist/utils/worker-events.d.ts.map +1 -1
  105. package/dist/utils/worker-utils.d.ts +3 -3
  106. package/dist/utils/worker-utils.js +2 -2
  107. package/dist/utils/worker-utils.js.map +1 -1
  108. package/dist/workers/client.worker.d.ts +14 -14
  109. package/dist/workers/client.worker.d.ts.map +1 -1
  110. package/dist/workers/client.worker.js +1 -1
  111. package/dist/workers/client.worker.js.map +1 -1
  112. package/dist/workers/dts.worker.d.ts +13 -13
  113. package/dist/workers/dts.worker.d.ts.map +1 -1
  114. package/dist/workers/dts.worker.js +3 -3
  115. package/dist/workers/dts.worker.js.map +1 -1
  116. package/dist/workers/library.worker.d.ts +12 -12
  117. package/dist/workers/library.worker.js +1 -1
  118. package/dist/workers/library.worker.js.map +1 -1
  119. package/dist/workers/lint.worker.d.ts +1 -1
  120. package/dist/workers/server-runtime.worker.d.ts +6 -6
  121. package/dist/workers/server-runtime.worker.js +6 -6
  122. package/dist/workers/server-runtime.worker.js.map +1 -1
  123. package/dist/workers/server.worker.d.ts +20 -20
  124. package/dist/workers/server.worker.d.ts.map +1 -1
  125. package/dist/workers/server.worker.js +6 -6
  126. package/dist/workers/server.worker.js.map +1 -1
  127. package/package.json +8 -7
  128. package/src/builders/BaseBuilder.ts +33 -33
  129. package/src/builders/DtsBuilder.ts +5 -5
  130. package/src/builders/LibraryBuilder.ts +9 -9
  131. package/src/builders/types.ts +10 -10
  132. package/src/capacitor/capacitor.ts +119 -119
  133. package/src/commands/add-client.ts +31 -31
  134. package/src/commands/add-server.ts +34 -34
  135. package/src/commands/build.ts +9 -9
  136. package/src/commands/check.ts +5 -5
  137. package/src/commands/dev.ts +9 -9
  138. package/src/commands/device.ts +30 -30
  139. package/src/commands/init.ts +25 -25
  140. package/src/commands/lint.ts +64 -64
  141. package/src/commands/publish.ts +139 -139
  142. package/src/commands/replace-deps.ts +4 -4
  143. package/src/commands/typecheck.ts +74 -74
  144. package/src/commands/watch.ts +7 -7
  145. package/src/electron/electron.ts +51 -51
  146. package/src/infra/ResultCollector.ts +9 -9
  147. package/src/infra/SignalHandler.ts +7 -7
  148. package/src/infra/WorkerManager.ts +14 -14
  149. package/src/orchestrators/BuildOrchestrator.ts +76 -76
  150. package/src/orchestrators/DevOrchestrator.ts +88 -88
  151. package/src/orchestrators/WatchOrchestrator.ts +39 -39
  152. package/src/sd-cli-entry.ts +43 -43
  153. package/src/sd-cli.ts +15 -15
  154. package/src/sd-config.types.ts +85 -85
  155. package/src/utils/build-env.ts +1 -1
  156. package/src/utils/config-editor.ts +19 -19
  157. package/src/utils/copy-public.ts +17 -17
  158. package/src/utils/copy-src.ts +11 -11
  159. package/src/utils/esbuild-config.ts +33 -33
  160. package/src/utils/output-utils.ts +11 -11
  161. package/src/utils/package-utils.ts +12 -12
  162. package/src/utils/rebuild-manager.ts +3 -3
  163. package/src/utils/replace-deps.ts +361 -361
  164. package/src/utils/sd-config.ts +44 -44
  165. package/src/utils/tailwind-config-deps.ts +98 -98
  166. package/src/utils/template.ts +56 -56
  167. package/src/utils/tsconfig.ts +127 -127
  168. package/src/utils/typecheck-serialization.ts +86 -86
  169. package/src/utils/vite-config.ts +341 -341
  170. package/src/utils/worker-events.ts +16 -16
  171. package/src/utils/worker-utils.ts +45 -45
  172. package/src/workers/client.worker.ts +34 -34
  173. package/src/workers/dts.worker.ts +467 -467
  174. package/src/workers/library.worker.ts +314 -314
  175. package/src/workers/lint.worker.ts +16 -16
  176. package/src/workers/server-runtime.worker.ts +157 -157
  177. package/src/workers/server.worker.ts +572 -572
  178. package/templates/add-client/__CLIENT__/package.json.hbs +1 -1
  179. package/templates/add-server/__SERVER__/package.json.hbs +2 -2
  180. package/templates/init/package.json.hbs +3 -3
  181. package/tests/config-editor.spec.ts +160 -0
  182. package/tests/copy-src.spec.ts +50 -0
  183. package/tests/get-compiler-options-for-package.spec.ts +139 -0
  184. package/tests/get-package-source-files.spec.ts +181 -0
  185. package/tests/get-types-from-package-json.spec.ts +107 -0
  186. package/tests/infra/ResultCollector.spec.ts +39 -0
  187. package/tests/infra/SignalHandler.spec.ts +38 -0
  188. package/tests/infra/WorkerManager.spec.ts +97 -0
  189. package/tests/load-ignore-patterns.spec.ts +188 -0
  190. package/tests/load-sd-config.spec.ts +137 -0
  191. package/tests/package-utils.spec.ts +188 -0
  192. package/tests/parse-root-tsconfig.spec.ts +89 -0
  193. package/tests/replace-deps.spec.ts +308 -0
  194. package/tests/run-lint.spec.ts +415 -0
  195. package/tests/run-typecheck.spec.ts +653 -0
  196. package/tests/run-watch.spec.ts +75 -0
  197. package/tests/sd-cli.spec.ts +330 -0
  198. package/tests/tailwind-config-deps.spec.ts +30 -0
  199. package/tests/template.spec.ts +70 -0
  200. package/tests/utils/rebuild-manager.spec.ts +43 -0
  201. package/tests/write-changed-output-files.spec.ts +97 -0
@@ -7,11 +7,11 @@ import { solidPlugin } from "esbuild-plugin-solid";
7
7
  import type { TypecheckEnv } from "./tsconfig";
8
8
 
9
9
  /**
10
- * esbuild outputFiles 실제로 변경된 파일만 디스크에 쓴다.
10
+ * Write only changed files from esbuild outputFiles to disk
11
11
  *
12
- * - .js 파일: ESM 상대 import 경로에 .js 확장자를 추가한 비교
13
- * - 파일(.js.map ): 원본 그대로 비교
14
- * - 기존 파일과 내용이 동일하면 쓰기를 건너뛰어 타임스탬프를 유지한다.
12
+ * - .js files: Add .js extension to ESM relative import paths before comparing
13
+ * - Other files (.js.map etc): Compare original content as-is
14
+ * - Skip writing if content matches existing file to preserve timestamps
15
15
  */
16
16
  export async function writeChangedOutputFiles(outputFiles: esbuild.OutputFile[]): Promise<boolean> {
17
17
  let hasChanges = false;
@@ -43,9 +43,9 @@ export async function writeChangedOutputFiles(outputFiles: esbuild.OutputFile[])
43
43
  }
44
44
 
45
45
  /**
46
- * Library 빌드용 esbuild 옵션
47
- * - bundle: false (개별 파일 트랜스파일)
48
- * - platform: target에 따라 node 또는 browser
46
+ * esbuild options for Library build
47
+ * - bundle: false (transpile individual files)
48
+ * - platform: node or browser depending on target
49
49
  */
50
50
  export interface LibraryEsbuildOptions {
51
51
  pkgDir: string;
@@ -55,20 +55,20 @@ export interface LibraryEsbuildOptions {
55
55
  }
56
56
 
57
57
  /**
58
- * Server 빌드용 esbuild 옵션
59
- * - bundle: true (모든 의존성 포함한 단일 번들)
58
+ * esbuild options for Server build
59
+ * - bundle: true (single bundle with all dependencies)
60
60
  */
61
61
  export interface ServerEsbuildOptions {
62
62
  pkgDir: string;
63
63
  entryPoints: string[];
64
64
  compilerOptions: Record<string, unknown>;
65
65
  env?: Record<string, string>;
66
- /** 번들에서 제외할 외부 모듈 */
66
+ /** External modules to exclude from bundle */
67
67
  external?: string[];
68
68
  }
69
69
 
70
70
  /**
71
- * package.json에서 solid-js 의존성 감지
71
+ * Detect solid-js dependency in package.json
72
72
  */
73
73
  function hasSolidDependency(pkgDir: string): boolean {
74
74
  const pkgJson = JSON.parse(readFileSync(path.join(pkgDir, "package.json"), "utf-8")) as PkgJson;
@@ -77,12 +77,12 @@ function hasSolidDependency(pkgDir: string): boolean {
77
77
  }
78
78
 
79
79
  /**
80
- * Library용 esbuild 설정 생성
80
+ * Create esbuild config for Library build
81
81
  *
82
- * node/browser/neutral 타겟의 라이브러리 패키지 빌드에 사용합니다.
83
- * - bundle: false (개별 파일을 각각 트랜스파일)
84
- * - platform: target node면 node, 외는 browser
85
- * - target: node면 node20, 외는 chrome84
82
+ * Used to build library packages with node/browser/neutral targets
83
+ * - bundle: false (transpile each file individually)
84
+ * - platform: node if target is node, otherwise browser
85
+ * - target: node20 if target is node, otherwise chrome84
86
86
  */
87
87
  export function createLibraryEsbuildOptions(options: LibraryEsbuildOptions): esbuild.BuildOptions {
88
88
  const plugins: esbuild.Plugin[] = [];
@@ -110,13 +110,13 @@ export function createLibraryEsbuildOptions(options: LibraryEsbuildOptions): esb
110
110
  }
111
111
 
112
112
  /**
113
- * Server용 esbuild 설정 생성
113
+ * Create esbuild config for Server build
114
114
  *
115
- * 서버 패키지 빌드에 사용합니다.
116
- * - bundle: true (모든 의존성 포함한 단일 번들)
117
- * - minify: true (코드 보호를 위한 압축)
118
- * - banner: CJS 패키지의 require() 지원을 위한 createRequire shim
119
- * - env define 옵션으로 치환 (process.env.KEY 형태)
115
+ * Used for server package builds
116
+ * - bundle: true (single bundle with all dependencies)
117
+ * - minify: true (minify for code protection)
118
+ * - banner: createRequire shim for CJS package require() support
119
+ * - Replace env with define option (process.env.KEY format)
120
120
  */
121
121
  export function createServerEsbuildOptions(options: ServerEsbuildOptions): esbuild.BuildOptions {
122
122
  const define: Record<string, string> = {};
@@ -147,10 +147,10 @@ export function createServerEsbuildOptions(options: ServerEsbuildOptions): esbui
147
147
  }
148
148
 
149
149
  /**
150
- * 빌드 타겟에서 TypecheckEnv 추출
150
+ * Extract TypecheckEnv from build target
151
151
  *
152
- * 빌드용이므로 neutral은 browser 처리합니다.
153
- * (neutral 패키지는 Node/브라우저 공용이지만, 빌드 시에는 browser 환경 기준으로 처리)
152
+ * Neutral is treated as browser for builds.
153
+ * (neutral packages are Node/browser universal, but we treat as browser for build)
154
154
  */
155
155
  export function getTypecheckEnvFromTarget(target: "node" | "browser" | "neutral"): TypecheckEnv {
156
156
  return target === "node" ? "node" : "browser";
@@ -165,10 +165,10 @@ interface PkgJson {
165
165
  }
166
166
 
167
167
  /**
168
- * 의존성 트리에서 미설치 optional peer dep 수집
168
+ * Collect uninstalled optional peer deps from dependency tree
169
169
  *
170
- * 서버 빌드(bundle: true) 설치되지 않은 optional peer dependency를
171
- * esbuild external로 지정하여 빌드 실패를 방지한다.
170
+ * For server builds (bundle: true), specify uninstalled optional peer dependencies
171
+ * as esbuild externals to prevent build failures
172
172
  */
173
173
  export function collectUninstalledOptionalPeerDeps(pkgDir: string): string[] {
174
174
  const external = new Set<string>();
@@ -227,10 +227,10 @@ function scanOptionalPeerDeps(
227
227
  //#region Native Module Externals
228
228
 
229
229
  /**
230
- * 의존성 binding.gyp 있는 네이티브 모듈 수집
230
+ * Collect native modules with binding.gyp from dependencies
231
231
  *
232
- * node-gyp 빌드되는 네이티브 모듈은 esbuild가 번들링할 수 없으므로
233
- * external로 지정해야 한다.
232
+ * Native modules built with node-gyp cannot be bundled by esbuild,
233
+ * so they must be specified as externals.
234
234
  */
235
235
  export function collectNativeModuleExternals(pkgDir: string): string[] {
236
236
  const external = new Set<string>();
@@ -264,12 +264,12 @@ function scanNativeModules(
264
264
 
265
265
  const depDir = path.dirname(pkgJsonPath);
266
266
 
267
- // binding.gyp 존재 여부로 네이티브 모듈 감지
267
+ // Detect native modules by checking for binding.gyp
268
268
  if (existsSync(path.join(depDir, "binding.gyp"))) {
269
269
  external.add(pkgName);
270
270
  }
271
271
 
272
- // 하위 dependencies도 재귀 탐색
272
+ // Recursively traverse sub-dependencies
273
273
  const depPkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf-8")) as PkgJson;
274
274
  for (const dep of Object.keys(depPkgJson.dependencies ?? {})) {
275
275
  scanNativeModules(dep, depDir, external, visited);
@@ -2,7 +2,7 @@ import { consola } from "consola";
2
2
  import type { BuildResult } from "../infra/ResultCollector";
3
3
 
4
4
  /**
5
- * 빌드 경고/에러 메시지를 포맷팅한다.
5
+ * Format build warning/error messages
6
6
  */
7
7
  export function formatBuildMessages(name: string, label: string, messages: string[]): string {
8
8
  const lines: string[] = [`${name} (${label})`];
@@ -15,8 +15,8 @@ export function formatBuildMessages(name: string, label: string, messages: strin
15
15
  }
16
16
 
17
17
  /**
18
- * 에러만 출력한다.
19
- * @param results 패키지별 빌드 결과 상태
18
+ * Print only errors
19
+ * @param results Build result status per package
20
20
  */
21
21
  export function printErrors(results: Map<string, BuildResult>): void {
22
22
  for (const result of results.values()) {
@@ -32,34 +32,34 @@ export function printErrors(results: Map<string, BuildResult>): void {
32
32
  }
33
33
 
34
34
  /**
35
- * 서버 URL만 출력한다.
36
- * @param results 패키지별 빌드 결과 상태
37
- * @param serverClientsMap 서버별 연결된 클라이언트 목록
35
+ * Print server URLs only
36
+ * @param results Build result status per package
37
+ * @param serverClientsMap List of connected clients per server
38
38
  */
39
39
  export function printServers(
40
40
  results: Map<string, BuildResult>,
41
41
  serverClientsMap?: Map<string, string[]>,
42
42
  ): void {
43
- // 서버 정보 수집
43
+ // Collect server info
44
44
  const servers = [...results.values()].filter((r) => r.status === "running" && r.port != null);
45
45
 
46
- // 서버 정보 출력 (있으면 앞에 추가)
46
+ // Print server info (add blank line before if present)
47
47
  if (servers.length > 0) {
48
48
  process.stdout.write("\n");
49
49
  for (const server of servers) {
50
50
  if (server.target === "server") {
51
- // 서버에 연결된 클라이언트가 있으면 클라이언트 URL만 출력
51
+ // If server has connected clients, print only client URLs
52
52
  const clients = serverClientsMap?.get(server.name) ?? [];
53
53
  if (clients.length > 0) {
54
54
  for (const clientName of clients) {
55
55
  consola.info(`[server] http://localhost:${server.port}/${clientName}/`);
56
56
  }
57
57
  } else {
58
- // 연결된 클라이언트가 없으면 서버 루트 URL 출력
58
+ // If no connected clients, print server root URL
59
59
  consola.info(`[server] http://localhost:${server.port}/`);
60
60
  }
61
61
  } else {
62
- // standalone client 이름 포함해서 출력
62
+ // Standalone client: print with name included
63
63
  consola.info(`[server] http://localhost:${server.port}/${server.name}/`);
64
64
  }
65
65
  }
@@ -3,13 +3,13 @@ import fs from "fs";
3
3
  import type { SdPackageConfig } from "../sd-config.types";
4
4
 
5
5
  /**
6
- * import.meta.dirname에서 상위로 올라가며 package.json 찾아 패키지 루트를 반환한다.
6
+ * Walk up from import.meta.dirname to find package.json and return package root
7
7
  */
8
8
  export function findPackageRoot(startDir: string): string {
9
9
  let dir = startDir;
10
10
  while (!fs.existsSync(path.join(dir, "package.json"))) {
11
11
  const parent = path.dirname(dir);
12
- if (parent === dir) throw new Error("package.json 찾을 수 없습니다.");
12
+ if (parent === dir) throw new Error("package.json not found");
13
13
  dir = parent;
14
14
  }
15
15
  return dir;
@@ -55,7 +55,7 @@ export function collectDeps(
55
55
  if (visited.has(dep)) continue;
56
56
  visited.add(dep);
57
57
 
58
- // workspace package check
58
+ // Check for workspace package
59
59
  if (workspaceScope != null && dep.startsWith(workspaceScope + "/")) {
60
60
  const dirName = dep.slice(workspaceScope.length + 1);
61
61
  const depDir = path.join(cwd, "packages", dirName);
@@ -66,7 +66,7 @@ export function collectDeps(
66
66
  }
67
67
  }
68
68
 
69
- // replaceDeps pattern check
69
+ // Check replaceDeps pattern
70
70
  const matched = replaceDepsPatterns.find((p) => p.regex.test(dep));
71
71
  if (matched != null) {
72
72
  replaceDeps.push(dep);
@@ -84,11 +84,11 @@ export function collectDeps(
84
84
  }
85
85
 
86
86
  /**
87
- * 패키지 설정에서 targets 필터링 (scripts 타겟 제외)
88
- * @param packages 패키지 설정
89
- * @param targets 필터링할 패키지 이름 목록. 배열이면 scripts를 제외한 모든 패키지 반환
90
- * @returns 필터링된 패키지 설정
91
- * @internal 테스트용으로 export
87
+ * Filter packages config by targets (excluding scripts target)
88
+ * @param packages Package config map
89
+ * @param targets List of package names to filter. If empty array, return all packages except scripts
90
+ * @returns Filtered package config map
91
+ * @internal exported for testing
92
92
  */
93
93
  export function filterPackagesByTargets(
94
94
  packages: Record<string, SdPackageConfig | undefined>,
@@ -99,16 +99,16 @@ export function filterPackagesByTargets(
99
99
  for (const [name, config] of Object.entries(packages)) {
100
100
  if (config == null) continue;
101
101
 
102
- // scripts 타겟은 watch/dev 대상에서 제외
102
+ // Exclude scripts target from watch/dev targets
103
103
  if (config.target === "scripts") continue;
104
104
 
105
- // targets 비어있으면 모든 패키지 포함
105
+ // If targets is empty, include all packages
106
106
  if (targets.length === 0) {
107
107
  result[name] = config;
108
108
  continue;
109
109
  }
110
110
 
111
- // targets에 포함된 패키지만 필터링
111
+ // Filter only packages included in targets
112
112
  if (targets.includes(name)) {
113
113
  result[name] = config;
114
114
  }
@@ -45,18 +45,18 @@ export class RebuildManager extends EventEmitter<RebuildManagerEvents> {
45
45
 
46
46
  const tasks = Array.from(batchBuilds.entries());
47
47
  const titles = tasks.map(([, { title }]) => title).join(", ");
48
- this._logger.start(`리빌드 진행 중... (${titles})`);
48
+ this._logger.start(`Rebuilding... (${titles})`);
49
49
 
50
50
  const results = await Promise.allSettled(tasks.map(([, { promise }]) => promise));
51
51
 
52
52
  const failed = results.filter((r): r is PromiseRejectedResult => r.status === "rejected");
53
53
  if (failed.length > 0) {
54
54
  for (const result of failed) {
55
- this._logger.error("리빌드 오류 발생", { error: String(result.reason) });
55
+ this._logger.error("Error during rebuild", { error: String(result.reason) });
56
56
  }
57
57
  }
58
58
 
59
- this._logger.success(`리빌드 완료 (${titles})`);
59
+ this._logger.success(`Rebuild completed (${titles})`);
60
60
 
61
61
  this.emit("batchComplete");
62
62