@simplysm/sd-cli 14.0.49 → 14.0.51

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 (59) hide show
  1. package/README.md +22 -679
  2. package/dist/engines/EsbuildClientEngine.d.ts.map +1 -1
  3. package/dist/engines/EsbuildClientEngine.js +1 -2
  4. package/dist/engines/EsbuildClientEngine.js.map +1 -1
  5. package/dist/esbuild/esbuild-angular-compiler-plugin.js.map +1 -1
  6. package/dist/lint/lint-core.js.map +1 -1
  7. package/dist/orchestrators/DevOrchestrator.js.map +1 -1
  8. package/dist/orchestrators/ServerRuntimeManager.d.ts.map +1 -1
  9. package/dist/orchestrators/ServerRuntimeManager.js +2 -4
  10. package/dist/orchestrators/ServerRuntimeManager.js.map +1 -1
  11. package/dist/ts-compiler/SdTsCompiler.d.ts +1 -7
  12. package/dist/ts-compiler/SdTsCompiler.d.ts.map +1 -1
  13. package/dist/ts-compiler/SdTsCompiler.js +109 -116
  14. package/dist/ts-compiler/SdTsCompiler.js.map +1 -1
  15. package/dist/utils/package-utils.d.ts.map +1 -1
  16. package/dist/utils/package-utils.js.map +1 -1
  17. package/docs/angular-vite-plugin/sd-angular-plugin.md +54 -0
  18. package/docs/config/build-target.md +31 -0
  19. package/docs/config/npm-config.md +27 -0
  20. package/docs/config/sd-browser-support-config.md +19 -0
  21. package/docs/config/sd-build-package-config.md +21 -0
  22. package/docs/config/sd-capacitor-config.md +109 -0
  23. package/docs/config/sd-client-package-config.md +33 -0
  24. package/docs/config/sd-config.md +73 -0
  25. package/docs/config/sd-electron-config.md +27 -0
  26. package/docs/config/sd-package-config.md +18 -0
  27. package/docs/config/sd-post-publish-script-config.md +19 -0
  28. package/docs/config/sd-publish-config.md +72 -0
  29. package/docs/config/sd-pwa-config.md +41 -0
  30. package/docs/config/sd-scripts-package-config.md +19 -0
  31. package/docs/config/sd-server-package-config.md +32 -0
  32. package/docs/config/sd-watch-hook-config.md +19 -0
  33. package/docs/ts-compiler/sd-ts-compiler.md +152 -0
  34. package/package.json +6 -5
  35. package/src/engines/EsbuildClientEngine.ts +1 -2
  36. package/src/esbuild/esbuild-angular-compiler-plugin.ts +1 -1
  37. package/src/lint/lint-core.ts +1 -1
  38. package/src/orchestrators/DevOrchestrator.ts +3 -3
  39. package/src/orchestrators/ServerRuntimeManager.ts +2 -5
  40. package/src/ts-compiler/SdTsCompiler.ts +136 -154
  41. package/src/utils/package-utils.ts +1 -2
  42. package/tests/esbuild/esbuild-angular-compiler-plugin.spec.ts +1 -1
  43. package/tests/esbuild/esbuild-postcss-plugin.acc.spec.ts +1 -1
  44. package/tests/esbuild/esbuild-tsc-plugin.acc.spec.ts +2 -2
  45. package/tests/esbuild/esbuild-tsc-plugin.spec.ts +3 -3
  46. package/tests/esbuild/esbuild-worker-plugin.spec.ts +1 -1
  47. package/tests/orchestrators/build-orchestrator.spec.ts +9 -9
  48. package/tests/orchestrators/dev-orchestrator.spec.ts +4 -4
  49. package/tests/orchestrators/watch-orchestrator.spec.ts +2 -2
  50. package/tests/ts-compiler/SdTsCompiler-crash-handling.verify.md +24 -0
  51. package/tests/utils/copy-src.spec.ts +5 -5
  52. package/tests/utils/esbuild-client-config.acc.spec.ts +1 -1
  53. package/tests/utils/esbuild-client-config.spec.ts +4 -4
  54. package/tests/utils/esbuild-config.spec.ts +3 -3
  55. package/tests/utils/esbuild-postcss-plugin.spec.ts +1 -1
  56. package/tests/utils/hmr-client-script.acc.spec.ts +1 -1
  57. package/tests/utils/ngtsc-build-core.spec.ts +1 -1
  58. package/tests/utils/package-utils.spec.ts +6 -6
  59. package/tests/workers/server-build-worker.spec.ts +1 -1
@@ -0,0 +1,72 @@
1
+ # SdPublishConfig
2
+
3
+ 패키지 배포 설정. `type` 필드로 분기하는 discriminated union이다.
4
+
5
+ ```typescript
6
+ export type SdPublishConfig =
7
+ | SdNpmPublishConfig
8
+ | SdLocalDirectoryPublishConfig
9
+ | SdStoragePublishConfig;
10
+ ```
11
+
12
+ | `type` 값 | 타입 | 설명 |
13
+ |-----------|------|------|
14
+ | `"npm"` | `SdNpmPublishConfig` | npm 레지스트리 배포 |
15
+ | `"local-directory"` | `SdLocalDirectoryPublishConfig` | 로컬 디렉토리 복사 |
16
+ | `"ftp"` \| `"ftps"` \| `"sftp"` | `SdStoragePublishConfig` | 스토리지 업로드 |
17
+
18
+ ## Related Types
19
+
20
+ ### `SdNpmPublishConfig`
21
+
22
+ npm 레지스트리에 배포한다. 버전은 자동으로 증가된다.
23
+
24
+ ```typescript
25
+ export interface SdNpmPublishConfig {
26
+ type: "npm";
27
+ }
28
+ ```
29
+
30
+ | Field | Type | Description |
31
+ |-------|------|-------------|
32
+ | `type` | `"npm"` | 배포 타입 식별자 |
33
+
34
+ ### `SdLocalDirectoryPublishConfig`
35
+
36
+ 로컬 디렉토리로 빌드 산출물을 복사한다.
37
+
38
+ ```typescript
39
+ export interface SdLocalDirectoryPublishConfig {
40
+ type: "local-directory";
41
+ path: string;
42
+ }
43
+ ```
44
+
45
+ | Field | Type | Description |
46
+ |-------|------|-------------|
47
+ | `type` | `"local-directory"` | 배포 타입 식별자 |
48
+ | `path` | `string` | 배포 대상 경로. 환경 변수 치환 지원: `%VER%` (버전), `%PROJECT%` (프로젝트명) |
49
+
50
+ ### `SdStoragePublishConfig`
51
+
52
+ FTP/FTPS/SFTP 서버에 빌드 산출물을 업로드한다.
53
+
54
+ ```typescript
55
+ export interface SdStoragePublishConfig {
56
+ type: "ftp" | "ftps" | "sftp";
57
+ host: string;
58
+ port?: number;
59
+ path?: string;
60
+ user?: string;
61
+ password?: string;
62
+ }
63
+ ```
64
+
65
+ | Field | Type | Description |
66
+ |-------|------|-------------|
67
+ | `type` | `"ftp" \| "ftps" \| "sftp"` | 스토리지 프로토콜 |
68
+ | `host` | `string` | 서버 호스트 |
69
+ | `port` | `number?` | 서버 포트 |
70
+ | `path` | `string?` | 원격 경로 |
71
+ | `user` | `string?` | 사용자명 |
72
+ | `password` | `string?` | 비밀번호 |
@@ -0,0 +1,41 @@
1
+ # SdPwaConfig
2
+
3
+ PWA(Progressive Web App) 설정. [`SdClientPackageConfig`](./sd-client-package-config.md)의 `pwa` 필드에 사용한다.
4
+
5
+ ```typescript
6
+ export interface SdPwaConfig {
7
+ manifest?: SdPwaManifestConfig;
8
+ }
9
+ ```
10
+
11
+ ## Members
12
+
13
+ | Field | Type | Description |
14
+ |-------|------|-------------|
15
+ | `manifest` | `SdPwaManifestConfig?` | PWA manifest 설정 |
16
+
17
+ ## Related Types
18
+
19
+ ### `SdPwaManifestConfig`
20
+
21
+ PWA `manifest.json` 설정.
22
+
23
+ ```typescript
24
+ export interface SdPwaManifestConfig {
25
+ name?: string;
26
+ short_name?: string;
27
+ display?: "standalone" | "fullscreen" | "minimal-ui" | "browser";
28
+ theme_color?: string;
29
+ background_color?: string;
30
+ icons?: Array<{ src: string; sizes: string; type?: string }>;
31
+ }
32
+ ```
33
+
34
+ | Field | Type | Description |
35
+ |-------|------|-------------|
36
+ | `name` | `string?` | 앱 이름 |
37
+ | `short_name` | `string?` | 앱 짧은 이름 |
38
+ | `display` | `"standalone" \| "fullscreen" \| "minimal-ui" \| "browser"?` | 디스플레이 모드 |
39
+ | `theme_color` | `string?` | 테마 색상 (hex 코드) |
40
+ | `background_color` | `string?` | 배경 색상 (hex 코드) |
41
+ | `icons` | `Array<{ src: string; sizes: string; type?: string }>?` | 아이콘 목록 |
@@ -0,0 +1,19 @@
1
+ # SdScriptsPackageConfig
2
+
3
+ `scripts` 타겟 패키지 설정. 빌드 엔진이 없으며, `watch` 훅이 설정된 경우에만 watch/typecheck 대상에 포함된다.
4
+
5
+ ```typescript
6
+ export interface SdScriptsPackageConfig {
7
+ target: "scripts";
8
+ publish?: SdPublishConfig;
9
+ watch?: SdWatchHookConfig;
10
+ }
11
+ ```
12
+
13
+ ## Members
14
+
15
+ | Field | Type | Description |
16
+ |-------|------|-------------|
17
+ | `target` | `"scripts"` | 빌드 타겟 식별자 |
18
+ | `publish` | [`SdPublishConfig?`](./sd-publish-config.md) | 배포 설정 |
19
+ | `watch` | [`SdWatchHookConfig?`](./sd-watch-hook-config.md) | watch 훅 설정. 설정 시 watch 모드에 패키지가 포함된다 |
@@ -0,0 +1,32 @@
1
+ # SdServerPackageConfig
2
+
3
+ `server` 타겟 패키지 설정. esbuild로 단일 번들 빌드되며 Fastify 서버로 실행된다.
4
+
5
+ ```typescript
6
+ export interface SdServerPackageConfig {
7
+ target: "server";
8
+ env?: Record<string, string>;
9
+ publish?: SdPublishConfig;
10
+ configs?: Record<string, unknown>;
11
+ externals?: string[];
12
+ pm2?: {
13
+ name?: string;
14
+ ignoreWatchPaths?: string[];
15
+ };
16
+ packageManager?: "volta" | "mise";
17
+ }
18
+ ```
19
+
20
+ ## Members
21
+
22
+ | Field | Type | Description |
23
+ |-------|------|-------------|
24
+ | `target` | `"server"` | 빌드 타겟 식별자 |
25
+ | `env` | `Record<string, string>?` | 빌드 시 치환할 환경 변수. `process.env.KEY`를 상수로 치환 |
26
+ | `publish` | [`SdPublishConfig?`](./sd-publish-config.md) | 배포 설정 |
27
+ | `configs` | `Record<string, unknown>?` | 런타임 설정. 빌드 시 `dist/.config.json`으로 기록 |
28
+ | `externals` | `string[]?` | esbuild 번들에 포함하지 않을 외부 모듈. 자동 `binding.gyp` 감지 목록에 추가 |
29
+ | `pm2` | `{ name?: string; ignoreWatchPaths?: string[] }?` | PM2 설정. 지정 시 `dist/pm2.config.cjs` 생성 |
30
+ | `pm2.name` | `string?` | PM2 프로세스 이름. 미지정 시 `package.json`의 `name`에서 생성 |
31
+ | `pm2.ignoreWatchPaths` | `string[]?` | PM2 watch에서 제외할 경로 |
32
+ | `packageManager` | `"volta" \| "mise"?` | 사용할 패키지 매니저. `mise.toml` 또는 `volta` 설정 생성에 영향 |
@@ -0,0 +1,19 @@
1
+ # SdWatchHookConfig
2
+
3
+ watch 모드에서 파일 변경을 감지하고 명령어를 실행하는 훅 설정. [`SdBuildPackageConfig`](./sd-build-package-config.md) 및 [`SdScriptsPackageConfig`](./sd-scripts-package-config.md)의 `watch` 필드에 사용한다.
4
+
5
+ ```typescript
6
+ export interface SdWatchHookConfig {
7
+ target: string[];
8
+ cmd: string;
9
+ args?: string[];
10
+ }
11
+ ```
12
+
13
+ ## Members
14
+
15
+ | Field | Type | Description |
16
+ |-------|------|-------------|
17
+ | `target` | `string[]` | 감시할 glob 패턴 목록. 패키지 디렉토리 기준 상대 경로 |
18
+ | `cmd` | `string` | 파일 변경 시 실행할 명령어 |
19
+ | `args` | `string[]?` | 명령어 인수 |
@@ -0,0 +1,152 @@
1
+ # SdTsCompiler
2
+
3
+ TypeScript AOT 컴파일러. Angular 패키지(`angularCompilerOptions`가 `tsconfig.json`에 있는 경우)와 일반 TypeScript 패키지를 모두 지원한다. 증분 빌드, lint 통합, SCSS 컴파일을 관리한다.
4
+
5
+ ```typescript
6
+ export class SdTsCompiler {
7
+ constructor(options: ISdTsCompilerOptions);
8
+
9
+ async compileAsync(
10
+ modifiedFiles?: ReadonlySet<string>,
11
+ emitOptions?: ISdTsCompilerEmitOptions,
12
+ ): Promise<ISdTsCompilerResult>;
13
+
14
+ compileSideEffectScss(): void;
15
+
16
+ findAffectedByScss(scssPath: string): string[];
17
+
18
+ get sideEffectScssRegistry(): Map<string, SideEffectScssEntry>;
19
+ }
20
+ ```
21
+
22
+ ## Members
23
+
24
+ | Member | Kind | Type | Description |
25
+ |--------|------|------|-------------|
26
+ | `compileAsync` | method | `(modifiedFiles?, emitOptions?) => Promise<ISdTsCompilerResult>` | TypeScript 컴파일 실행. `modifiedFiles` 지정 시 증분 빌드 수행 |
27
+ | `compileSideEffectScss` | method | `() => void` | `sideEffectScssRegistry`의 모든 항목을 CSS로 컴파일 |
28
+ | `findAffectedByScss` | method | `(scssPath: string) => string[]` | SCSS 경로에 의존하는 TypeScript 파일 목록 반환. watch 역방향 추적용 |
29
+ | `sideEffectScssRegistry` | getter | `Map<string, SideEffectScssEntry>` | Angular 컴포넌트 `@Component.styles` 항목 저장소 |
30
+
31
+ ## Related Types
32
+
33
+ ### `ISdTsCompilerOptions`
34
+
35
+ `SdTsCompiler` 생성 옵션.
36
+
37
+ ```typescript
38
+ export interface ISdTsCompilerOptions {
39
+ pkgDir: string;
40
+ cwd: string;
41
+ output: { js: boolean; dts: boolean };
42
+ includeTests?: boolean;
43
+ env?: TypecheckEnv;
44
+ sourceFileCache?: AngularSourceFileCache;
45
+ transformStylesheet?: (
46
+ data: string,
47
+ containingFile: string,
48
+ stylesheetFile?: string,
49
+ ) => Promise<string | null>;
50
+ externalStylesheets?: Map<string, string>;
51
+ compilerOptionsTransformer?: (options: ts.CompilerOptions) => ts.CompilerOptions;
52
+ lint?: boolean;
53
+ globalScss?: boolean;
54
+ }
55
+ ```
56
+
57
+ | Field | Type | Description |
58
+ |-------|------|-------------|
59
+ | `pkgDir` | `string` | 패키지 디렉토리 (절대 경로) |
60
+ | `cwd` | `string` | workspace 루트. diagnostics 필터링 등에 사용 |
61
+ | `output` | `{ js: boolean; dts: boolean }` | emit 제어 플래그. `js`: JavaScript emit, `dts`: 타입 선언 emit |
62
+ | `includeTests` | `boolean?` | `tests/` 파일을 rootNames에 포함할지 여부. 기본값 `false` |
63
+ | `env` | `TypecheckEnv?` | 타입체크 환경. 설정 시 `getCompilerOptionsForEnv()` 적용 |
64
+ | `sourceFileCache` | `AngularSourceFileCache?` | Angular 증분 빌드용 SourceFile 캐시. 미제공 시 내부 생성 |
65
+ | `transformStylesheet` | `(data, containingFile, stylesheetFile?) => Promise<string \| null>?` | 스타일시트 변환 콜백. Angular 패키지 전용 |
66
+ | `externalStylesheets` | `Map<string, string>?` | 외부 스타일시트 맵. 클라이언트 빌드용, `resourceNameToFileName`에서 사용 |
67
+ | `compilerOptionsTransformer` | `(options: ts.CompilerOptions) => ts.CompilerOptions?` | `compilerOptions` 후처리. 클라이언트의 `target`/`module` 강제 등에 사용 |
68
+ | `lint` | `boolean?` | lint 실행 여부. `true`이면 `compileAsync` 결과에 lint 결과 포함 |
69
+ | `globalScss` | `boolean?` | 글로벌 SCSS 컴파일 여부. `true`이면 `scss/styles.scss` → `dist/styles.css` 생성 |
70
+
71
+ ### `ISdTsCompilerResult`
72
+
73
+ `compileAsync()` 반환 타입.
74
+
75
+ ```typescript
76
+ export interface ISdTsCompilerResult {
77
+ program: ts.Program;
78
+ builderProgram: ts.EmitAndSemanticDiagnosticsBuilderProgram;
79
+ isForAngular: boolean;
80
+ affectedFiles: ReadonlySet<string> | undefined;
81
+ diagnostics: SerializedDiagnostic[];
82
+ errorCount: number;
83
+ warningCount: number;
84
+ errors?: string[];
85
+ ngtscProgram?: NgtscProgram;
86
+ emitResults?: EmitResult[];
87
+ lint?: LintWithProgramResult;
88
+ scssErrors: string[];
89
+ scssDependencies: ReadonlyMap<string, ReadonlySet<string>>;
90
+ }
91
+ ```
92
+
93
+ | Field | Type | Description |
94
+ |-------|------|-------------|
95
+ | `program` | `ts.Program` | TypeScript Program 참조. lint, 외부 도구용 |
96
+ | `builderProgram` | `ts.EmitAndSemanticDiagnosticsBuilderProgram` | Builder Program 참조. 증분 빌드 상태 보유 |
97
+ | `isForAngular` | `boolean` | Angular 패키지 여부. `tsconfig.json`에 `angularCompilerOptions` 존재 시 `true` |
98
+ | `affectedFiles` | `ReadonlySet<string> \| undefined` | 이 빌드에서 영향받은 파일 (posix 경로). `undefined` = 전역 변경 (전체 리빌드) |
99
+ | `diagnostics` | `SerializedDiagnostic[]` | 직렬화된 진단 정보. Worker 경계 통과용 |
100
+ | `errorCount` | `number` | Error 카테고리 진단 수 |
101
+ | `warningCount` | `number` | Warning 카테고리 진단 수 |
102
+ | `errors` | `string[]?` | Error 카테고리 진단을 `"파일:줄:열: TS코드: 메시지"` 형식으로 포맷한 배열. 에러 없으면 `undefined` |
103
+ | `ngtscProgram` | `NgtscProgram?` | NgtscProgram 참조. Angular 패키지 전용, HMR용. Non-Angular이면 `undefined` |
104
+ | `emitResults` | `EmitResult[]?` | Angular emit 결과. Non-Angular이면 `undefined` (writeFile 훅으로 디스크 직접 쓰기) |
105
+ | `lint` | `LintWithProgramResult?` | lint 결과. `lint` 옵션 활성 시 반환 |
106
+ | `scssErrors` | `string[]` | SCSS 컴파일 에러 목록 |
107
+ | `scssDependencies` | `ReadonlyMap<string, ReadonlySet<string>>` | SCSS 의존성 맵. key: 소유자 파일, value: 의존 SCSS 경로 집합. watch 역방향 탐색용 |
108
+
109
+ ## Usage
110
+
111
+ ### 초기 컴파일
112
+
113
+ ```typescript
114
+ import { SdTsCompiler } from "@simplysm/sd-cli";
115
+
116
+ const compiler = new SdTsCompiler({
117
+ pkgDir: "/workspace/packages/my-lib",
118
+ cwd: "/workspace",
119
+ output: { js: true, dts: true },
120
+ lint: true,
121
+ globalScss: true,
122
+ });
123
+
124
+ const result = await compiler.compileAsync();
125
+
126
+ if (result.errors) {
127
+ console.error("Compilation errors:", result.errors);
128
+ process.exit(1);
129
+ }
130
+ ```
131
+
132
+ ### watch 모드에서 증분 컴파일
133
+
134
+ ```typescript
135
+ import { SdTsCompiler } from "@simplysm/sd-cli";
136
+
137
+ const compiler = new SdTsCompiler({
138
+ pkgDir: "/workspace/packages/my-lib",
139
+ cwd: "/workspace",
140
+ output: { js: true, dts: true },
141
+ });
142
+
143
+ // 초기 컴파일
144
+ let result = await compiler.compileAsync();
145
+
146
+ // 파일 변경 감지 시 증분 컴파일
147
+ const changedFiles = new Set(["/workspace/packages/my-lib/src/foo.ts"]);
148
+ result = await compiler.compileAsync(changedFiles);
149
+
150
+ // SCSS 의존성이 변경된 TS 파일 찾기
151
+ const affectedByScss = compiler.findAffectedByScss("/workspace/packages/my-lib/scss/variables.scss");
152
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/sd-cli",
3
- "version": "14.0.49",
3
+ "version": "14.0.51",
4
4
  "description": "Simplysm package - CLI tool",
5
5
  "author": "simplysm",
6
6
  "license": "Apache-2.0",
@@ -15,7 +15,8 @@
15
15
  "files": [
16
16
  "dist",
17
17
  "src",
18
- "tests"
18
+ "tests",
19
+ "docs"
19
20
  ],
20
21
  "sideEffects": false,
21
22
  "dependencies": {
@@ -44,9 +45,9 @@
44
45
  "ws": "^8.20.0",
45
46
  "yaml": "^2.8.3",
46
47
  "yargs": "^18.0.0",
47
- "@simplysm/core-node": "14.0.49",
48
- "@simplysm/storage": "14.0.49",
49
- "@simplysm/core-common": "14.0.49"
48
+ "@simplysm/core-common": "14.0.51",
49
+ "@simplysm/storage": "14.0.51",
50
+ "@simplysm/core-node": "14.0.51"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@types/semver": "^7.7.1",
@@ -96,8 +96,7 @@ export class EsbuildClientEngine implements BuildEngine {
96
96
 
97
97
  // serverReady를 감지하여 포트 캡처 (EsbuildClientEngine 전용)
98
98
  this._worker!.on("serverReady", (data) => {
99
- const event = data as { port: number };
100
- this.port = event.port;
99
+ this.port = data.port;
101
100
  });
102
101
 
103
102
  // 공통 이벤트 처리 (buildStart/build/error)
@@ -96,7 +96,7 @@ export function createCompilerOptionsTransformer(
96
96
  _enableHmr: !!options.templateUpdates,
97
97
  supportTestBed: !!options.includeTestMetadata,
98
98
  supportJitMode: !!options.includeTestMetadata,
99
- } as ts.CompilerOptions;
99
+ };
100
100
  };
101
101
  }
102
102
 
@@ -52,7 +52,7 @@ function isGlobalIgnoresConfig(item: unknown): item is { ignores: string[] } {
52
52
  if (item == null || typeof item !== "object") return false;
53
53
  if (!("ignores" in item)) return false;
54
54
  if ("files" in item) return false; // files가 있으면 globalIgnores가 아님
55
- const ignores = (item as { ignores: unknown }).ignores;
55
+ const ignores = item.ignores;
56
56
  if (!Array.isArray(ignores)) return false;
57
57
  return ignores.every((i) => typeof i === "string");
58
58
  }
@@ -8,7 +8,7 @@ import type {
8
8
  import { filterPackagesByTargets, classifyDevPackages } from "../utils/package-classify";
9
9
  import { printDiagnostics, printServers } from "../utils/output-utils";
10
10
  import { createBuildEngine } from "../engines/engine-factory";
11
- import type { BuildEngine, ClientPackageInfo, ServerPackageInfo } from "../engines/types";
11
+ import type { BuildEngine } from "../engines/types";
12
12
  import { Capacitor } from "../capacitor/capacitor";
13
13
  import { BaseOrchestrator } from "./BaseOrchestrator";
14
14
  import { ServerRuntimeManager } from "./ServerRuntimeManager";
@@ -85,7 +85,7 @@ export class DevOrchestrator extends BaseOrchestrator implements OrchestratorLif
85
85
  const engineConfig = { ...config, env: { ...this._baseEnv, ...config.env } };
86
86
 
87
87
  const engine = createBuildEngine(
88
- { name, dir, config: engineConfig } as ServerPackageInfo,
88
+ { name, dir, config: engineConfig },
89
89
  {
90
90
  cwd: this._cwd,
91
91
  replaceDeps: this._replaceDeps,
@@ -100,7 +100,7 @@ export class DevOrchestrator extends BaseOrchestrator implements OrchestratorLif
100
100
  for (const { name, dir, config } of this._clientPackages) {
101
101
  const engineConfig = { ...config, env: { ...this._baseEnv, ...config.env } };
102
102
  const engine = createBuildEngine(
103
- { name, dir, config: engineConfig } as ClientPackageInfo,
103
+ { name, dir, config: engineConfig },
104
104
  {
105
105
  cwd: this._cwd,
106
106
  replaceDeps: this._replaceDeps,
@@ -2,7 +2,6 @@ import type { ConsolaInstance } from "consola";
2
2
  import { Worker, type WorkerProxy } from "@simplysm/core-node";
3
3
  import { err as errNs } from "@simplysm/core-common";
4
4
  import type * as ServerRuntimeWorkerModule from "../workers/server-runtime.worker";
5
- import type { ServerReadyEventData, ErrorEventData } from "../runtime/worker-events";
6
5
  import type { ResultCollector } from "../runtime/ResultCollector";
7
6
 
8
7
  /**
@@ -42,25 +41,23 @@ export class ServerRuntimeManager {
42
41
 
43
42
  // 런타임 이벤트 핸들러
44
43
  runtimeWorker.on("serverReady", (readyData) => {
45
- const readyEvent = readyData as ServerReadyEventData;
46
44
  params.resultCollector.add({
47
45
  name: params.serverName,
48
46
  target: "server",
49
47
  type: "server",
50
48
  status: "running",
51
- port: readyEvent.port,
49
+ port: readyData.port,
52
50
  });
53
51
  params.onServerReady();
54
52
  });
55
53
 
56
54
  runtimeWorker.on("error", (errorData) => {
57
- const errorEvent = errorData as ErrorEventData;
58
55
  params.resultCollector.add({
59
56
  name: params.serverName,
60
57
  target: "server",
61
58
  type: "server",
62
59
  status: "error",
63
- message: errorEvent.message,
60
+ message: errorData.message,
64
61
  });
65
62
  });
66
63