@simplysm/sd-cli 12.13.23 → 12.13.36

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 (209) hide show
  1. package/dist/entry/SdCliAiCommand.d.ts +3 -0
  2. package/dist/entry/SdCliAiCommand.js +65 -0
  3. package/dist/entry/SdCliAiCommand.js.map +1 -0
  4. package/dist/entry/SdCliCordova.d.ts +16 -0
  5. package/dist/entry/SdCliCordova.js +398 -0
  6. package/dist/entry/SdCliCordova.js.map +1 -0
  7. package/dist/entry/SdCliElectron.d.ts +18 -0
  8. package/dist/entry/SdCliElectron.js +129 -0
  9. package/dist/entry/SdCliElectron.js.map +1 -0
  10. package/dist/entry/SdCliLocalUpdate.d.ts +11 -0
  11. package/dist/entry/SdCliLocalUpdate.js +84 -0
  12. package/dist/entry/SdCliLocalUpdate.js.map +1 -0
  13. package/dist/entry/SdCliPostinstall.d.ts +3 -0
  14. package/dist/entry/SdCliPostinstall.js +39 -0
  15. package/dist/entry/SdCliPostinstall.js.map +1 -0
  16. package/dist/entry/SdCliProject.d.ts +21 -0
  17. package/dist/entry/SdCliProject.js +302 -0
  18. package/dist/entry/SdCliProject.js.map +1 -0
  19. package/dist/fix/convert-extends-sd-modal-base-to-interface.d.ts +1 -0
  20. package/dist/fix/convert-extends-sd-modal-base-to-interface.js +289 -0
  21. package/dist/fix/convert-extends-sd-modal-base-to-interface.js.map +1 -0
  22. package/dist/fix/convert-extends-sd-print-template-base-to-interface.d.ts +1 -0
  23. package/dist/fix/convert-extends-sd-print-template-base-to-interface.js +179 -0
  24. package/dist/fix/convert-extends-sd-print-template-base-to-interface.js.map +1 -0
  25. package/dist/fix/convert-flat-pages-to-flat-menus.d.ts +1 -0
  26. package/dist/fix/convert-flat-pages-to-flat-menus.js +68 -0
  27. package/dist/fix/convert-flat-pages-to-flat-menus.js.map +1 -0
  28. package/dist/fix/convert-get-menus-to-usable-menus.d.ts +1 -0
  29. package/dist/fix/convert-get-menus-to-usable-menus.js +48 -0
  30. package/dist/fix/convert-get-menus-to-usable-menus.js.map +1 -0
  31. package/dist/fix/convert-modal-show-params.d.ts +1 -0
  32. package/dist/fix/convert-modal-show-params.js +29 -0
  33. package/dist/fix/convert-modal-show-params.js.map +1 -0
  34. package/dist/fix/convert-print-params.d.ts +1 -0
  35. package/dist/fix/convert-print-params.js +37 -0
  36. package/dist/fix/convert-print-params.js.map +1 -0
  37. package/dist/fix/convert-private-to-hash.d.ts +1 -0
  38. package/dist/fix/convert-private-to-hash.js +59 -0
  39. package/dist/fix/convert-private-to-hash.js.map +1 -0
  40. package/dist/fix/convert-sd-angular-symbol-names.d.ts +1 -0
  41. package/dist/fix/convert-sd-angular-symbol-names.js +23 -0
  42. package/dist/fix/convert-sd-angular-symbol-names.js.map +1 -0
  43. package/dist/fix/convert-sd-icon-to-fa-icon.d.ts +1 -0
  44. package/dist/fix/convert-sd-icon-to-fa-icon.js +80 -0
  45. package/dist/fix/convert-sd-icon-to-fa-icon.js.map +1 -0
  46. package/dist/fix/convert-sd-sheet-bindings-safety.d.ts +1 -0
  47. package/dist/fix/convert-sd-sheet-bindings-safety.js +57 -0
  48. package/dist/fix/convert-sd-sheet-bindings-safety.js.map +1 -0
  49. package/dist/fix/convert-select-modal-button-to-select-button.d.ts +1 -0
  50. package/dist/fix/convert-select-modal-button-to-select-button.js +64 -0
  51. package/dist/fix/convert-select-modal-button-to-select-button.js.map +1 -0
  52. package/dist/fix/convert-setup-cumulate-selected-keys-to-object-param.d.ts +1 -0
  53. package/dist/fix/convert-setup-cumulate-selected-keys-to-object-param.js +38 -0
  54. package/dist/fix/convert-setup-cumulate-selected-keys-to-object-param.js.map +1 -0
  55. package/dist/fix/convert-to-use-perms-signal.d.ts +1 -0
  56. package/dist/fix/convert-to-use-perms-signal.js +99 -0
  57. package/dist/fix/convert-to-use-perms-signal.js.map +1 -0
  58. package/dist/fix/core/convert-symbol.d.ts +1 -0
  59. package/dist/fix/core/convert-symbol.js +102 -0
  60. package/dist/fix/core/convert-symbol.js.map +1 -0
  61. package/dist/fix/core/get-ts-morph-source-files.d.ts +1 -0
  62. package/dist/fix/core/get-ts-morph-source-files.js +8 -0
  63. package/dist/fix/core/get-ts-morph-source-files.js.map +1 -0
  64. package/dist/fix/core/remove-named-import.d.ts +1 -0
  65. package/dist/fix/core/remove-named-import.js +14 -0
  66. package/dist/fix/core/remove-named-import.js.map +1 -0
  67. package/dist/fix/core/remove-symbol.d.ts +1 -0
  68. package/dist/fix/core/remove-symbol.js +76 -0
  69. package/dist/fix/core/remove-symbol.js.map +1 -0
  70. package/dist/fix/remove-sd-angular-symbol-names.d.ts +1 -0
  71. package/dist/fix/remove-sd-angular-symbol-names.js +9 -0
  72. package/dist/fix/remove-sd-angular-symbol-names.js.map +1 -0
  73. package/dist/fix/remove-unused-imports.d.ts +1 -0
  74. package/dist/fix/remove-unused-imports.js +42 -0
  75. package/dist/fix/remove-unused-imports.js.map +1 -0
  76. package/dist/fix/remove-unused-injects.d.ts +1 -0
  77. package/dist/fix/remove-unused-injects.js +38 -0
  78. package/dist/fix/remove-unused-injects.js.map +1 -0
  79. package/dist/fix/remove-unused-protected-readonly.d.ts +1 -0
  80. package/dist/fix/remove-unused-protected-readonly.js +58 -0
  81. package/dist/fix/remove-unused-protected-readonly.js.map +1 -0
  82. package/dist/pkg-builders/SdProjectBuildRunner.d.ts +18 -0
  83. package/dist/pkg-builders/SdProjectBuildRunner.js +235 -0
  84. package/dist/pkg-builders/SdProjectBuildRunner.js.map +1 -0
  85. package/dist/pkg-builders/client/SdCliNgRoutesFileGenerator.d.ts +9 -0
  86. package/dist/pkg-builders/client/SdCliNgRoutesFileGenerator.js +89 -0
  87. package/dist/pkg-builders/client/SdCliNgRoutesFileGenerator.js.map +1 -0
  88. package/dist/pkg-builders/client/SdClientBuildRunner.d.ts +8 -0
  89. package/dist/pkg-builders/client/SdClientBuildRunner.js +115 -0
  90. package/dist/pkg-builders/client/SdClientBuildRunner.js.map +1 -0
  91. package/dist/pkg-builders/client/SdNgBundler.d.ts +23 -0
  92. package/dist/pkg-builders/client/SdNgBundler.js +490 -0
  93. package/dist/pkg-builders/client/SdNgBundler.js.map +1 -0
  94. package/dist/pkg-builders/client/SdNgBundlerContext.d.ts +22 -0
  95. package/dist/pkg-builders/client/SdNgBundlerContext.js +90 -0
  96. package/dist/pkg-builders/client/SdNgBundlerContext.js.map +1 -0
  97. package/dist/pkg-builders/client/createSdNgPlugin.d.ts +14 -0
  98. package/dist/pkg-builders/client/createSdNgPlugin.js +143 -0
  99. package/dist/pkg-builders/client/createSdNgPlugin.js.map +1 -0
  100. package/dist/pkg-builders/commons/ScopePathSet.d.ts +7 -0
  101. package/dist/pkg-builders/commons/ScopePathSet.js +14 -0
  102. package/dist/pkg-builders/commons/ScopePathSet.js.map +1 -0
  103. package/dist/pkg-builders/commons/SdBuildRunnerBase.d.ts +20 -0
  104. package/dist/pkg-builders/commons/SdBuildRunnerBase.js +30 -0
  105. package/dist/pkg-builders/commons/SdBuildRunnerBase.js.map +1 -0
  106. package/dist/pkg-builders/lib/SdCliDbContextFileGenerator.d.ts +9 -0
  107. package/dist/pkg-builders/lib/SdCliDbContextFileGenerator.js +134 -0
  108. package/dist/pkg-builders/lib/SdCliDbContextFileGenerator.js.map +1 -0
  109. package/dist/pkg-builders/lib/SdCliIndexFileGenerator.d.ts +10 -0
  110. package/dist/pkg-builders/lib/SdCliIndexFileGenerator.js +61 -0
  111. package/dist/pkg-builders/lib/SdCliIndexFileGenerator.js.map +1 -0
  112. package/dist/pkg-builders/lib/SdJsLibBuildRunner.d.ts +8 -0
  113. package/dist/pkg-builders/lib/SdJsLibBuildRunner.js +45 -0
  114. package/dist/pkg-builders/lib/SdJsLibBuildRunner.js.map +1 -0
  115. package/dist/pkg-builders/lib/SdTsLibBuildRunner.d.ts +8 -0
  116. package/dist/pkg-builders/lib/SdTsLibBuildRunner.js +36 -0
  117. package/dist/pkg-builders/lib/SdTsLibBuildRunner.js.map +1 -0
  118. package/dist/pkg-builders/lib/SdTsLibBuilder.d.ts +9 -0
  119. package/dist/pkg-builders/lib/SdTsLibBuilder.js +65 -0
  120. package/dist/pkg-builders/lib/SdTsLibBuilder.js.map +1 -0
  121. package/dist/pkg-builders/server/SdServerBuildRunner.d.ts +8 -0
  122. package/dist/pkg-builders/server/SdServerBuildRunner.js +249 -0
  123. package/dist/pkg-builders/server/SdServerBuildRunner.js.map +1 -0
  124. package/dist/pkg-builders/server/SdServerBundler.d.ts +18 -0
  125. package/dist/pkg-builders/server/SdServerBundler.js +153 -0
  126. package/dist/pkg-builders/server/SdServerBundler.js.map +1 -0
  127. package/dist/pkg-builders/server/createSdServerPlugin.d.ts +14 -0
  128. package/dist/pkg-builders/server/createSdServerPlugin.js +63 -0
  129. package/dist/pkg-builders/server/createSdServerPlugin.js.map +1 -0
  130. package/dist/sd-cli-entry.d.ts +2 -0
  131. package/dist/sd-cli-entry.js +257 -0
  132. package/dist/sd-cli-entry.js.map +1 -0
  133. package/dist/sd-cli.d.ts +2 -0
  134. package/dist/sd-cli.js +85 -0
  135. package/dist/sd-cli.js.map +1 -0
  136. package/dist/ts-compiler/SdDepAnalyzer.d.ts +15 -0
  137. package/dist/ts-compiler/SdDepAnalyzer.js +300 -0
  138. package/dist/ts-compiler/SdDepAnalyzer.js.map +1 -0
  139. package/dist/ts-compiler/SdDepCache.d.ts +33 -0
  140. package/dist/ts-compiler/SdDepCache.js +247 -0
  141. package/dist/ts-compiler/SdDepCache.js.map +1 -0
  142. package/dist/ts-compiler/SdStyleBundler.d.ts +16 -0
  143. package/dist/ts-compiler/SdStyleBundler.js +118 -0
  144. package/dist/ts-compiler/SdStyleBundler.js.map +1 -0
  145. package/dist/ts-compiler/SdTsCompiler.d.ts +9 -0
  146. package/dist/ts-compiler/SdTsCompiler.js +407 -0
  147. package/dist/ts-compiler/SdTsCompiler.js.map +1 -0
  148. package/dist/types/build/ISdBuildMessage.d.ts +10 -0
  149. package/dist/types/build/ISdBuildMessage.js +2 -0
  150. package/dist/types/build/ISdBuildMessage.js.map +1 -0
  151. package/dist/types/build/ISdBuildResult.d.ts +8 -0
  152. package/dist/types/build/ISdBuildResult.js +2 -0
  153. package/dist/types/build/ISdBuildResult.js.map +1 -0
  154. package/dist/types/build/ISdTsCompilerOptions.d.ts +13 -0
  155. package/dist/types/build/ISdTsCompilerOptions.js +2 -0
  156. package/dist/types/build/ISdTsCompilerOptions.js.map +1 -0
  157. package/dist/types/build/ISdTsCompilerResult.d.ts +14 -0
  158. package/dist/types/build/ISdTsCompilerResult.js +2 -0
  159. package/dist/types/build/ISdTsCompilerResult.js.map +1 -0
  160. package/dist/types/build/TStylesheetBundlingResult.d.ts +12 -0
  161. package/dist/types/build/TStylesheetBundlingResult.js +2 -0
  162. package/dist/types/build/TStylesheetBundlingResult.js.map +1 -0
  163. package/dist/types/common-config/INpmConfig.d.ts +17 -0
  164. package/dist/types/common-config/INpmConfig.js +2 -0
  165. package/dist/types/common-config/INpmConfig.js.map +1 -0
  166. package/dist/types/common-config/ITsConfig.d.ts +7 -0
  167. package/dist/types/common-config/ITsConfig.js +2 -0
  168. package/dist/types/common-config/ITsConfig.js.map +1 -0
  169. package/dist/types/config/ISdProjectConfig.d.ts +108 -0
  170. package/dist/types/config/ISdProjectConfig.js +2 -0
  171. package/dist/types/config/ISdProjectConfig.js.map +1 -0
  172. package/dist/types/plugin/ISdCliNgPluginResultCache.d.ts +8 -0
  173. package/dist/types/plugin/ISdCliNgPluginResultCache.js +2 -0
  174. package/dist/types/plugin/ISdCliNgPluginResultCache.js.map +1 -0
  175. package/dist/types/plugin/ISdCliServerPluginResultCache.d.ts +8 -0
  176. package/dist/types/plugin/ISdCliServerPluginResultCache.js +2 -0
  177. package/dist/types/plugin/ISdCliServerPluginResultCache.js.map +1 -0
  178. package/dist/types/worker/ISdBuildRunnerWorkerType.d.ts +23 -0
  179. package/dist/types/worker/ISdBuildRunnerWorkerType.js +2 -0
  180. package/dist/types/worker/ISdBuildRunnerWorkerType.js.map +1 -0
  181. package/dist/types/worker/IServerWorkerType.d.ts +17 -0
  182. package/dist/types/worker/IServerWorkerType.js +2 -0
  183. package/dist/types/worker/IServerWorkerType.js.map +1 -0
  184. package/dist/utils/SdCliConvertMessageUtils.d.ts +21 -0
  185. package/dist/utils/SdCliConvertMessageUtils.js +139 -0
  186. package/dist/utils/SdCliConvertMessageUtils.js.map +1 -0
  187. package/dist/utils/SdCliPerformanceTimer.d.ts +9 -0
  188. package/dist/utils/SdCliPerformanceTimer.js +51 -0
  189. package/dist/utils/SdCliPerformanceTimer.js.map +1 -0
  190. package/dist/utils/loadProjConfAsync.d.ts +5 -0
  191. package/dist/utils/loadProjConfAsync.js +8 -0
  192. package/dist/utils/loadProjConfAsync.js.map +1 -0
  193. package/dist/workers/build-runner.worker.d.ts +1 -0
  194. package/dist/workers/build-runner.worker.js +39 -0
  195. package/dist/workers/build-runner.worker.js.map +1 -0
  196. package/dist/workers/server.worker.d.ts +1 -0
  197. package/dist/workers/server.worker.js +50 -0
  198. package/dist/workers/server.worker.js.map +1 -0
  199. package/package.json +5 -5
  200. package/src/fix/core/convert-symbol.ts +35 -16
  201. package/src/fix/remove-unused-protected-readonly.ts +7 -1
  202. package/src/pkg-builders/SdProjectBuildRunner.ts +8 -1
  203. package/src/pkg-builders/commons/SdBuildRunnerBase.ts +1 -1
  204. package/src/pkg-builders/lib/SdTsLibBuilder.ts +0 -1
  205. package/src/sd-cli.ts +8 -8
  206. package/src/ts-compiler/SdTsCompiler.ts +26 -31
  207. package/src/types/build/ISdTsCompilerOptions.ts +0 -1
  208. package/src/types/worker/ISdBuildRunnerWorkerType.ts +1 -1
  209. package/src/workers/build-runner.worker.ts +1 -1
@@ -18,11 +18,18 @@ function parseReplacements(input: Record<string, string>): SymbolReplacement[] {
18
18
  });
19
19
  }
20
20
 
21
+ function getSourceFileModule(filePath: string): string {
22
+ const match = filePath.match(/packages[\\/](.*?)[\\/]src[\\/]/);
23
+ return `@simplysm/${match![1]}`;
24
+ }
25
+
21
26
  export default function convertSymbols(raw: Record<string, string>) {
22
27
  const replacements = parseReplacements(raw);
23
28
  const sourceFiles = getTsMortphSourceFiles();
24
29
 
25
30
  for (const sourceFile of sourceFiles) {
31
+ const sourceFileModule = getSourceFileModule(sourceFile.getFilePath());
32
+
26
33
  let changed = false;
27
34
 
28
35
  const usedReplacements = new Set<string>(); // 실제 사용된 newModule#newName 추적
@@ -47,13 +54,16 @@ export default function convertSymbols(raw: Record<string, string>) {
47
54
 
48
55
  const importModule = importDecl.getModuleSpecifierValue();
49
56
 
50
- const match = replacements.find(r => r.oldModule === importModule && r.oldName === name);
51
- if (!match) return;
57
+ const match = replacements.find((r) => r.oldModule === importModule && r.oldName === name);
58
+ if (!match || match.oldModule === sourceFileModule || match.newModule === sourceFileModule)
59
+ return;
52
60
 
53
61
  identifier.replaceWithText(match.newName);
54
62
  usedReplacements.add(`${match.newModule}#${match.newName}`);
55
63
  changed = true;
56
- console.log(`[ref] ${sourceFile.getBaseName()} :: ${importModule} :: ${name} → ${match.newName}`);
64
+ console.log(
65
+ `[ref] ${sourceFile.getBaseName()} :: ${importModule} :: ${name} → ${match.newName}`,
66
+ );
57
67
  });
58
68
 
59
69
  // 2. import 교체
@@ -64,8 +74,18 @@ export default function convertSymbols(raw: Record<string, string>) {
64
74
  for (const ni of namedImports) {
65
75
  const oldName = ni.getName();
66
76
 
67
- const match = replacements.find(r => r.oldModule === specifier && r.oldName === oldName);
68
- if (match) {
77
+ const match = replacements.find((r) => r.oldModule === specifier && r.oldName === oldName);
78
+ if (
79
+ !match ||
80
+ match.oldModule === sourceFileModule ||
81
+ match.newModule === sourceFileModule
82
+ ) {
83
+ // 기존 import 유지 기록
84
+ if (!existingImportMap.has(specifier)) {
85
+ existingImportMap.set(specifier, new Set());
86
+ }
87
+ existingImportMap.get(specifier)!.add(oldName);
88
+ } else {
69
89
  ni.remove();
70
90
 
71
91
  // 만약 모듈이 동일하다면 즉시 대체
@@ -77,13 +97,9 @@ export default function convertSymbols(raw: Record<string, string>) {
77
97
  }
78
98
 
79
99
  changed = true;
80
- console.log(`[import] ${sourceFile.getBaseName()} :: ${specifier} :: ${oldName} → ${match.newName}`);
81
- } else {
82
- // 기존 import 유지 기록
83
- if (!existingImportMap.has(specifier)) {
84
- existingImportMap.set(specifier, new Set());
85
- }
86
- existingImportMap.get(specifier)!.add(oldName);
100
+ console.log(
101
+ `[import] ${sourceFile.getBaseName()} :: ${specifier} :: ${oldName} → ${match.newName}`,
102
+ );
87
103
  }
88
104
  }
89
105
  }
@@ -93,10 +109,13 @@ export default function convertSymbols(raw: Record<string, string>) {
93
109
  const [newModule, newName] = key.split("#");
94
110
 
95
111
  const already = existingImportMap.get(newModule)?.has(newName);
96
- const existsInFile = sourceFile.getImportDeclarations().some(decl =>
97
- decl.getModuleSpecifierValue() === newModule &&
98
- decl.getNamedImports().some(ni => ni.getName() === newName)
99
- );
112
+ const existsInFile = sourceFile
113
+ .getImportDeclarations()
114
+ .some(
115
+ (decl) =>
116
+ decl.getModuleSpecifierValue() === newModule &&
117
+ decl.getNamedImports().some((ni) => ni.getName() === newName),
118
+ );
100
119
 
101
120
  if (already || existsInFile) continue;
102
121
 
@@ -51,7 +51,13 @@ export default function removeUnusedProtectedReadonly() {
51
51
  const usedInTemplate =
52
52
  templateText.includes(name) || new RegExp(`\\b${name}\\b`).test(templateText);
53
53
 
54
- if (!usedInTemplate) {
54
+ const identifiers = cls.getDescendantsOfKind(SyntaxKind.Identifier);
55
+ const usedInClass = identifiers.some((id) => {
56
+ if (id.getText() !== name) return false;
57
+ return id !== field.getNameNode();
58
+ });
59
+
60
+ if (!usedInTemplate && !usedInClass) {
55
61
  console.log(`🧹 Removing unused field: ${name} in ${sourceFile.getBaseName()}`);
56
62
  field.remove();
57
63
  }
@@ -88,10 +88,11 @@ export class SdProjectBuildRunner {
88
88
  {
89
89
  pkgPath: changedPkgInfo.pkgPath,
90
90
  projConf: opt.projConf,
91
+ scopePathSet: scopePathSet,
92
+
91
93
  watch: true,
92
94
  emitOnly: opt.emitOnly,
93
95
  noEmit: opt.noEmit,
94
- scopePathSet: scopePathSet,
95
96
  },
96
97
  ]);
97
98
 
@@ -272,6 +273,11 @@ export class SdProjectBuildRunner {
272
273
  }
273
274
 
274
275
  static async buildAsync(opt: { pkgPaths: TNormPath[]; projConf: ISdProjectConfig }) {
276
+ const scopePathSet = await this.#getScopePathSetAsync(
277
+ opt.pkgPaths,
278
+ Object.keys(opt.projConf.localUpdates ?? {}),
279
+ );
280
+
275
281
  const buildResults = await opt.pkgPaths.parallelAsync(async (pkgPath) => {
276
282
  const worker = new SdWorker<ISdBuildRunnerWorkerType>(
277
283
  import.meta.resolve("../workers/build-runner.worker"),
@@ -281,6 +287,7 @@ export class SdProjectBuildRunner {
281
287
  {
282
288
  pkgPath,
283
289
  projConf: opt.projConf,
290
+ scopePathSet: scopePathSet,
284
291
  },
285
292
  ]);
286
293
 
@@ -15,11 +15,11 @@ export abstract class SdBuildRunnerBase<T extends "server" | "library" | "client
15
15
  constructor(
16
16
  protected _pkgPath: TNormPath,
17
17
  protected _projConf: ISdProjectConfig,
18
+ scopePathSet: Set<TNormPath>,
18
19
  protected _watch: boolean,
19
20
  protected _dev: boolean,
20
21
  protected _emitOnly?: boolean,
21
22
  protected _noEmit?: boolean,
22
- scopePathSet?: Set<TNormPath>,
23
23
  ) {
24
24
  this._pkgName = path.basename(_pkgPath);
25
25
  this._pkgConf = _projConf.packages[this._pkgName] as TSdPackageConfig<T>;
@@ -24,7 +24,6 @@ export class SdTsLibBuilder {
24
24
  isDevMode: dev,
25
25
  isEmitOnly: emitOnly,
26
26
  isNoEmit: noEmit,
27
- globalStyleFilePath: PathUtils.norm(this._pkgPath, "src/styles.scss"),
28
27
  isForBundle: false,
29
28
  scopePathSet,
30
29
  });
package/src/sd-cli.ts CHANGED
@@ -19,14 +19,14 @@ if (path.extname(cliPath) === ".ts") {
19
19
  // .js 번들 실행 (배포본)
20
20
 
21
21
  // 로컬 업데이트
22
- if (!process.argv.includes("--noEmit")) {
23
- if (!process.argv.slice(2).includes("local-update")) {
24
- await spawnWaitAsync(`node`, [
25
- "--import=specifier-resolution-node/register",
26
- fileURLToPath(cliPath),
27
- "local-update",
28
- ]);
29
- }
22
+ if (process.argv.slice(2).includes("watch") && !process.argv.slice(2).includes("--noEmit")) {
23
+ // if (!process.argv.slice(2).includes("local-update")) {
24
+ await spawnWaitAsync(`node`, [
25
+ "--import=specifier-resolution-node/register",
26
+ fileURLToPath(cliPath),
27
+ "local-update",
28
+ ]);
29
+ // }
30
30
  }
31
31
 
32
32
  // 프로세스 실행
@@ -368,40 +368,35 @@ export class SdTsCompiler {
368
368
  }
369
369
 
370
370
  async #buildGlobalStyleAsync() {
371
+ if (!this.#isForAngular) return;
372
+
371
373
  //-- global style
372
- if (
373
- this._opt.globalStyleFilePath != null &&
374
- FsUtils.exists(this._opt.globalStyleFilePath) &&
375
- !this.#emittedFilesCacheMap.has(this._opt.globalStyleFilePath)
376
- ) {
377
- this.#debug(`전역 스타일 번들링 중...`);
378
-
379
- await this.#perf.run("전역 스타일 번들링", async () => {
380
- const data = await FsUtils.readFileAsync(this._opt.globalStyleFilePath!);
381
- const stylesheetBundlingResult = await this.#styleBundler!.bundleAsync(
382
- data,
383
- this._opt.globalStyleFilePath!,
384
- this._opt.globalStyleFilePath,
385
- );
386
- const emitFileInfos = this.#emittedFilesCacheMap.getOrCreate(
387
- this._opt.globalStyleFilePath!,
388
- [],
389
- );
390
- emitFileInfos.push({
391
- outAbsPath: PathUtils.norm(
392
- this._opt.pkgPath,
393
- path
394
- .relative(path.resolve(this._opt.pkgPath, "src"), this._opt.globalStyleFilePath!)
395
- .replace(/\.scss$/, ".css"),
396
- ),
397
- text: stylesheetBundlingResult.contents ?? "",
398
- });
374
+ const globalStyleFilePath = PathUtils.norm(this._opt.pkgPath, "src/styles.scss");
375
+ if (this.#emittedFilesCacheMap.has(globalStyleFilePath)) return;
376
+ if (!FsUtils.exists(globalStyleFilePath)) return;
377
+
378
+ this.#debug(`전역 스타일 번들링 중...`);
379
+
380
+ await this.#perf.run("전역 스타일 번들링", async () => {
381
+ const data = await FsUtils.readFileAsync(globalStyleFilePath);
382
+ const stylesheetBundlingResult = await this.#styleBundler!.bundleAsync(
383
+ data,
384
+ globalStyleFilePath,
385
+ globalStyleFilePath,
386
+ );
387
+ const emitFileInfos = this.#emittedFilesCacheMap.getOrCreate(globalStyleFilePath, []);
388
+ emitFileInfos.push({
389
+ outAbsPath: PathUtils.norm(
390
+ this._opt.pkgPath,
391
+ path
392
+ .relative(path.resolve(this._opt.pkgPath, "src"), globalStyleFilePath)
393
+ .replace(/\.scss$/, ".css"),
394
+ ),
395
+ text: stylesheetBundlingResult.contents ?? "",
399
396
  });
397
+ });
400
398
 
401
- return this._opt.globalStyleFilePath;
402
- }
403
-
404
- return undefined;
399
+ return globalStyleFilePath;
405
400
  }
406
401
 
407
402
  #build(prepareResult: IPrepareResult) {
@@ -11,5 +11,4 @@ export interface ISdTsCompilerOptions {
11
11
  isEmitOnly: boolean;
12
12
  isNoEmit: boolean;
13
13
  scopePathSet: ScopePathSet;
14
- globalStyleFilePath?: TNormPath;
15
14
  }
@@ -15,10 +15,10 @@ export interface ISdBuildRunnerWorkerType extends ISdWorkerType {
15
15
  export interface ISdBuildRunnerInitializeRequest {
16
16
  pkgPath: TNormPath;
17
17
  projConf: ISdProjectConfig;
18
+ scopePathSet: Set<TNormPath>;
18
19
 
19
20
  // watch
20
21
  watch?: boolean;
21
22
  emitOnly?: boolean;
22
23
  noEmit?: boolean;
23
- scopePathSet?: Set<TNormPath>;
24
24
  }
@@ -50,11 +50,11 @@ createSdWorker<ISdBuildRunnerWorkerType>({
50
50
  buildRunner = new buildRunnerType(
51
51
  req.pkgPath,
52
52
  req.projConf,
53
+ req.scopePathSet,
53
54
  req.watch ?? false,
54
55
  req.watch ? !pkgConf.forceProductionMode : false,
55
56
  req.emitOnly,
56
57
  req.noEmit,
57
- req.scopePathSet,
58
58
  );
59
59
  },
60
60
  async rebuild(modifiedFileSet?: Set<TNormPath>) {