@simplysm/sd-cli 12.15.39 → 12.15.41

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 (58) hide show
  1. package/dist/entry/SdCliCordova.d.ts +33 -1
  2. package/dist/entry/SdCliCordova.js +84 -88
  3. package/dist/entry/SdCliElectron.d.ts +5 -1
  4. package/dist/entry/SdCliElectron.js +21 -21
  5. package/dist/entry/SdCliLocalUpdate.d.ts +1 -1
  6. package/dist/entry/SdCliLocalUpdate.js +3 -3
  7. package/dist/entry/SdCliProject.d.ts +4 -1
  8. package/dist/entry/SdCliProject.js +11 -11
  9. package/dist/pkg-builders/SdProjectBuildRunner.d.ts +6 -1
  10. package/dist/pkg-builders/SdProjectBuildRunner.js +27 -27
  11. package/dist/pkg-builders/client/SdClientBuildRunner.d.ts +2 -1
  12. package/dist/pkg-builders/client/SdClientBuildRunner.js +8 -10
  13. package/dist/pkg-builders/client/SdNgBundler.d.ts +22 -1
  14. package/dist/pkg-builders/client/SdNgBundler.js +70 -80
  15. package/dist/pkg-builders/client/SdNgBundlerContext.d.ts +3 -1
  16. package/dist/pkg-builders/client/SdNgBundlerContext.js +9 -10
  17. package/dist/pkg-builders/lib/SdCliIndexFileGenerator.d.ts +2 -1
  18. package/dist/pkg-builders/lib/SdCliIndexFileGenerator.js +5 -5
  19. package/dist/pkg-builders/lib/SdJsLibBuildRunner.d.ts +1 -1
  20. package/dist/pkg-builders/lib/SdJsLibBuildRunner.js +2 -2
  21. package/dist/pkg-builders/lib/SdTsLibBuildRunner.d.ts +1 -1
  22. package/dist/pkg-builders/lib/SdTsLibBuildRunner.js +2 -3
  23. package/dist/pkg-builders/lib/SdTsLibBuilder.d.ts +2 -1
  24. package/dist/pkg-builders/lib/SdTsLibBuilder.js +7 -8
  25. package/dist/pkg-builders/server/SdServerBuildRunner.d.ts +3 -1
  26. package/dist/pkg-builders/server/SdServerBuildRunner.js +6 -7
  27. package/dist/pkg-builders/server/SdServerBundler.d.ts +6 -1
  28. package/dist/pkg-builders/server/SdServerBundler.js +21 -23
  29. package/dist/ts-compiler/ScopePathSet.d.ts +1 -1
  30. package/dist/ts-compiler/ScopePathSet.js +3 -4
  31. package/dist/ts-compiler/SdDepCache.d.ts +45 -1
  32. package/dist/ts-compiler/SdDepCache.js +71 -69
  33. package/dist/ts-compiler/SdStyleBundler.d.ts +5 -1
  34. package/dist/ts-compiler/SdStyleBundler.js +25 -26
  35. package/dist/ts-compiler/SdTsCompiler.d.ts +20 -1
  36. package/dist/ts-compiler/SdTsCompiler.js +122 -129
  37. package/dist/utils/SdCliPerformanceTimer.d.ts +2 -1
  38. package/dist/utils/SdCliPerformanceTimer.js +9 -9
  39. package/package.json +8 -8
  40. package/src/entry/SdCliCordova.ts +89 -89
  41. package/src/entry/SdCliElectron.ts +21 -21
  42. package/src/entry/SdCliLocalUpdate.ts +3 -3
  43. package/src/entry/SdCliProject.ts +11 -11
  44. package/src/pkg-builders/SdProjectBuildRunner.ts +27 -27
  45. package/src/pkg-builders/client/SdClientBuildRunner.ts +10 -10
  46. package/src/pkg-builders/client/SdNgBundler.ts +78 -78
  47. package/src/pkg-builders/client/SdNgBundlerContext.ts +10 -10
  48. package/src/pkg-builders/lib/SdCliIndexFileGenerator.ts +5 -5
  49. package/src/pkg-builders/lib/SdJsLibBuildRunner.ts +2 -2
  50. package/src/pkg-builders/lib/SdTsLibBuildRunner.ts +3 -3
  51. package/src/pkg-builders/lib/SdTsLibBuilder.ts +8 -8
  52. package/src/pkg-builders/server/SdServerBuildRunner.ts +7 -7
  53. package/src/pkg-builders/server/SdServerBundler.ts +23 -23
  54. package/src/ts-compiler/ScopePathSet.ts +4 -4
  55. package/src/ts-compiler/SdDepCache.ts +47 -47
  56. package/src/ts-compiler/SdStyleBundler.ts +26 -26
  57. package/src/ts-compiler/SdTsCompiler.ts +130 -130
  58. package/src/utils/SdCliPerformanceTimer.ts +9 -9
@@ -1,37 +1,39 @@
1
1
  export class SdDepCache {
2
- /**
3
- * 각 파일이 export한 심볼 집합 (예: export const A → "A")
4
- */
5
- #exportCache = new Map();
6
- /**
7
- * import한 타겟과 그 심볼 정보
8
- * - 값이 0이면 전체 import(import * 또는 리소스 import)
9
- * - 값이 Set이면 선택적 심볼 import (예: import { A } ...)
10
- */
11
- #importCache = new Map();
12
- /**
13
- * re-export한 타겟과 그 심볼 정보
14
- * - export * from ...
15
- * - export { A as B } from ...
16
- * - 값이 0이면 전체 reexport(export * from ...)
17
- */
18
- #reexportCache = new Map();
19
- /**
20
- * 역의존 정보 (revDep)
21
- * - 특정 파일이 어떤 파일에게 의존(참조)되는지
22
- * - symbol 기반 추적
23
- */
24
- #revDepCache = new Map();
25
- /**
26
- * 분석이 완료된 파일 경로
27
- */
28
- #collectedCache = new Set();
29
- #exportSymbolCache = new Map();
2
+ constructor() {
3
+ /**
4
+ * 각 파일이 export한 심볼 집합 (예: export const A → "A")
5
+ */
6
+ this._exportCache = new Map();
7
+ /**
8
+ * import 타겟과 심볼 정보
9
+ * - 값이 0이면 전체 import(import * 또는 리소스 import)
10
+ * - 값이 Set이면 선택적 심볼 import (예: import { A } ...)
11
+ */
12
+ this._importCache = new Map();
13
+ /**
14
+ * re-export 타겟과 심볼 정보
15
+ * - export * from ...
16
+ * - export { A as B } from ...
17
+ * - 값이 0이면 전체 reexport(export * from ...)
18
+ */
19
+ this._reexportCache = new Map();
20
+ /**
21
+ * 역의존 정보 (revDep)
22
+ * - 특정 파일이 어떤 파일에게 의존(참조)되는지
23
+ * - symbol 기반 추적
24
+ */
25
+ this._revDepCache = new Map();
26
+ /**
27
+ * 분석이 완료된 파일 경로
28
+ */
29
+ this._collectedCache = new Set();
30
+ this._exportSymbolCache = new Map();
31
+ }
30
32
  /**
31
33
  * .d.ts 또는 .js가 입력되었을 때 쌍으로 존재하는 파일 경로를 반환
32
34
  * 예: "/a.d.ts" → ["/a.d.ts", "/a.js"]
33
35
  */
34
- #getRelatedNPaths(nPath) {
36
+ _getRelatedNPaths(nPath) {
35
37
  if (nPath.endsWith(".d.ts")) {
36
38
  return [nPath, nPath.replace(/\.d\.ts$/, ".js")];
37
39
  }
@@ -44,20 +46,20 @@ export class SdDepCache {
44
46
  * 분석이 완료된 파일로 표시
45
47
  */
46
48
  addCollected(fileNPath) {
47
- for (const path of this.#getRelatedNPaths(fileNPath)) {
48
- this.#collectedCache.add(path);
49
+ for (const path of this._getRelatedNPaths(fileNPath)) {
50
+ this._collectedCache.add(path);
49
51
  }
50
52
  }
51
53
  hasCollected(fileNPath) {
52
- return this.#collectedCache.has(fileNPath);
54
+ return this._collectedCache.has(fileNPath);
53
55
  }
54
56
  /**
55
57
  * export한 심볼 등록
56
58
  * 예: export const A → "A"
57
59
  */
58
60
  addExport(fileNPath, exportSymbol) {
59
- for (const path of this.#getRelatedNPaths(fileNPath)) {
60
- const exportSymbolSet = this.#exportCache.getOrCreate(path, new Set());
61
+ for (const path of this._getRelatedNPaths(fileNPath)) {
62
+ const exportSymbolSet = this._exportCache.getOrCreate(path, new Set());
61
63
  exportSymbolSet.add(exportSymbol);
62
64
  }
63
65
  }
@@ -67,19 +69,19 @@ export class SdDepCache {
67
69
  * - import { A } from ... → symbol = "A"
68
70
  */
69
71
  addImport(fileNPath, targetNPath, targetSymbol) {
70
- for (const filePath of this.#getRelatedNPaths(fileNPath)) {
71
- const importTargetMap = this.#importCache.getOrCreate(filePath, new Map());
72
- for (const targetPath of this.#getRelatedNPaths(targetNPath)) {
72
+ for (const filePath of this._getRelatedNPaths(fileNPath)) {
73
+ const importTargetMap = this._importCache.getOrCreate(filePath, new Map());
74
+ for (const targetPath of this._getRelatedNPaths(targetNPath)) {
73
75
  if (typeof targetSymbol === "string") {
74
76
  const importTargetSymbolSet = importTargetMap.getOrCreate(targetPath, new Set());
75
77
  if (!(importTargetSymbolSet instanceof Set))
76
78
  continue;
77
79
  importTargetSymbolSet.add(targetSymbol);
78
- this.#addRevDep(targetPath, filePath, targetSymbol);
80
+ this._addRevDep(targetPath, filePath, targetSymbol);
79
81
  }
80
82
  else {
81
83
  importTargetMap.set(targetPath, targetSymbol);
82
- this.#addRevDep(targetPath, filePath, targetSymbol);
84
+ this._addRevDep(targetPath, filePath, targetSymbol);
83
85
  }
84
86
  }
85
87
  }
@@ -89,12 +91,12 @@ export class SdDepCache {
89
91
  * ※ export/import에 자동 등록되지 않으므로 외부에서 명시적으로 따로 입력해야 함
90
92
  */
91
93
  addReexport(fileNPath, targetNPath, targetSymbolInfo) {
92
- for (const filePath of this.#getRelatedNPaths(fileNPath)) {
93
- const reexportTargetMap = this.#reexportCache.getOrCreate(filePath, new Map());
94
- for (const targetPath of this.#getRelatedNPaths(targetNPath)) {
94
+ for (const filePath of this._getRelatedNPaths(fileNPath)) {
95
+ const reexportTargetMap = this._reexportCache.getOrCreate(filePath, new Map());
96
+ for (const targetPath of this._getRelatedNPaths(targetNPath)) {
95
97
  if (targetSymbolInfo === 0) {
96
98
  reexportTargetMap.set(targetPath, 0);
97
- this.#addRevDep(targetPath, filePath, 0);
99
+ this._addRevDep(targetPath, filePath, 0);
98
100
  }
99
101
  else {
100
102
  const reexportTargetSymbolInfos = reexportTargetMap.getOrCreate(targetPath, []);
@@ -103,7 +105,7 @@ export class SdDepCache {
103
105
  if (!reexportTargetSymbolInfos.some((item) => item.importSymbol === targetSymbolInfo.importSymbol &&
104
106
  item.exportSymbol === targetSymbolInfo.exportSymbol)) {
105
107
  reexportTargetSymbolInfos.push(targetSymbolInfo);
106
- this.#addRevDep(targetPath, filePath, targetSymbolInfo.importSymbol);
108
+ this._addRevDep(targetPath, filePath, targetSymbolInfo.importSymbol);
107
109
  }
108
110
  }
109
111
  }
@@ -112,10 +114,10 @@ export class SdDepCache {
112
114
  /**
113
115
  * 역의존 관계 등록 (revDep)
114
116
  */
115
- #addRevDep(targetNPath, fileNPath, exportSymbol) {
116
- for (const targetPath of this.#getRelatedNPaths(targetNPath)) {
117
- const revDepInfoMap = this.#revDepCache.getOrCreate(targetPath, new Map());
118
- for (const filePath of this.#getRelatedNPaths(fileNPath)) {
117
+ _addRevDep(targetNPath, fileNPath, exportSymbol) {
118
+ for (const targetPath of this._getRelatedNPaths(targetNPath)) {
119
+ const revDepInfoMap = this._revDepCache.getOrCreate(targetPath, new Map());
120
+ for (const filePath of this._getRelatedNPaths(fileNPath)) {
119
121
  if (typeof exportSymbol === "string") {
120
122
  const exportSymbolSet = revDepInfoMap.getOrCreate(filePath, new Set());
121
123
  if (!(exportSymbolSet instanceof Set))
@@ -141,9 +143,9 @@ export class SdDepCache {
141
143
  queue.push({ fileNPath, exportSymbol });
142
144
  }
143
145
  };
144
- for (const relatedNPath of this.#getRelatedNPaths(modifiedNPath)) {
146
+ for (const relatedNPath of this._getRelatedNPaths(modifiedNPath)) {
145
147
  result.add(relatedNPath);
146
- const exportSymbols = this.#getExportSymbols(relatedNPath);
148
+ const exportSymbols = this._getExportSymbols(relatedNPath);
147
149
  if (exportSymbols.size === 0) {
148
150
  enqueue(relatedNPath, undefined);
149
151
  }
@@ -155,7 +157,7 @@ export class SdDepCache {
155
157
  }
156
158
  while (queue.length > 0) {
157
159
  const curr = queue.shift();
158
- const revDepInfoMap = this.#revDepCache.get(curr.fileNPath);
160
+ const revDepInfoMap = this._revDepCache.get(curr.fileNPath);
159
161
  if (!revDepInfoMap)
160
162
  continue;
161
163
  for (const [revDepFileNPath, revDepInfo] of revDepInfoMap) {
@@ -163,7 +165,7 @@ export class SdDepCache {
163
165
  const hasImportSymbol = revDepInfo === 0 || revDepInfo.has(curr.exportSymbol);
164
166
  if (hasImportSymbol) {
165
167
  result.add(revDepFileNPath);
166
- const exportSymbol = this.#convertImportSymbolToExportSymbol(revDepFileNPath, curr.fileNPath, curr.exportSymbol);
168
+ const exportSymbol = this._convertImportSymbolToExportSymbol(revDepFileNPath, curr.fileNPath, curr.exportSymbol);
167
169
  enqueue(revDepFileNPath, exportSymbol);
168
170
  }
169
171
  }
@@ -182,17 +184,17 @@ export class SdDepCache {
182
184
  invalidates(fileNPathSet) {
183
185
  // const revDepCacheChanged = new Set<TNormPath>();
184
186
  for (const fileNPath of fileNPathSet) {
185
- this.#exportCache.delete(fileNPath);
186
- this.#importCache.delete(fileNPath);
187
- this.#reexportCache.delete(fileNPath);
188
- this.#exportSymbolCache.delete(fileNPath);
189
- this.#collectedCache.delete(fileNPath);
187
+ this._exportCache.delete(fileNPath);
188
+ this._importCache.delete(fileNPath);
189
+ this._reexportCache.delete(fileNPath);
190
+ this._exportSymbolCache.delete(fileNPath);
191
+ this._collectedCache.delete(fileNPath);
190
192
  // if (this.#revDepCache.has(fileNPath)) {
191
193
  // this.#revDepCache.delete(fileNPath); // 자신이 key인 경우
192
194
  // revDepCacheChanged.add(fileNPath);
193
195
  // }
194
196
  }
195
- for (const [targetNPath, infoMap] of this.#revDepCache) {
197
+ for (const [targetNPath, infoMap] of this._revDepCache) {
196
198
  for (const fileNPath of fileNPathSet) {
197
199
  if (infoMap.has(fileNPath)) {
198
200
  infoMap.delete(fileNPath);
@@ -200,15 +202,15 @@ export class SdDepCache {
200
202
  }
201
203
  }
202
204
  if (infoMap.size === 0) {
203
- this.#revDepCache.delete(targetNPath);
205
+ this._revDepCache.delete(targetNPath);
204
206
  }
205
207
  }
206
208
  }
207
209
  /**
208
210
  * reexport된 경우 importSymbol → exportSymbol로 변환
209
211
  */
210
- #convertImportSymbolToExportSymbol(fileNPath, targetNPath, importSymbol) {
211
- const symbolInfos = this.#reexportCache.get(fileNPath)?.get(targetNPath);
212
+ _convertImportSymbolToExportSymbol(fileNPath, targetNPath, importSymbol) {
213
+ const symbolInfos = this._reexportCache.get(fileNPath)?.get(targetNPath);
212
214
  if (symbolInfos != null && symbolInfos !== 0 && symbolInfos.length > 0) {
213
215
  const symbolInfo = symbolInfos.single((item) => item.importSymbol === importSymbol);
214
216
  if (symbolInfo)
@@ -219,20 +221,20 @@ export class SdDepCache {
219
221
  /**
220
222
  * 해당 파일에서 export된 모든 심볼 (직접 + 재export 포함)
221
223
  */
222
- #getExportSymbols(fileNPath) {
223
- if (this.#exportSymbolCache.has(fileNPath)) {
224
- return this.#exportSymbolCache.get(fileNPath);
224
+ _getExportSymbols(fileNPath) {
225
+ if (this._exportSymbolCache.has(fileNPath)) {
226
+ return this._exportSymbolCache.get(fileNPath);
225
227
  }
226
228
  const result = new Set();
227
- for (const path of this.#getRelatedNPaths(fileNPath)) {
228
- const set = this.#exportCache.get(path);
229
+ for (const path of this._getRelatedNPaths(fileNPath)) {
230
+ const set = this._exportCache.get(path);
229
231
  if (set)
230
232
  result.adds(...set);
231
- const map = this.#reexportCache.get(path);
233
+ const map = this._reexportCache.get(path);
232
234
  if (map) {
233
235
  for (const [key, val] of map) {
234
236
  if (val === 0) {
235
- result.adds(...this.#getExportSymbols(key));
237
+ result.adds(...this._getExportSymbols(key));
236
238
  }
237
239
  else {
238
240
  result.adds(...val.map((item) => item.exportSymbol));
@@ -240,7 +242,7 @@ export class SdDepCache {
240
242
  }
241
243
  }
242
244
  }
243
- this.#exportSymbolCache.set(fileNPath, result);
245
+ this._exportSymbolCache.set(fileNPath, result);
244
246
  return result;
245
247
  }
246
248
  }
@@ -2,8 +2,11 @@ import { TNormPath } from "@simplysm/sd-core-node";
2
2
  import { TStylesheetBundlingResult } from "../types/build/TStylesheetBundlingResult";
3
3
  import { ScopePathSet } from "./ScopePathSet";
4
4
  export declare class SdStyleBundler {
5
- #private;
6
5
  private readonly _opt;
6
+ private readonly _ngStyleBundler;
7
+ private readonly _resultCache;
8
+ private readonly _refCache;
9
+ private readonly _revRefCache;
7
10
  constructor(_opt: {
8
11
  pkgPath: TNormPath;
9
12
  scopePathSet: ScopePathSet;
@@ -14,6 +17,7 @@ export declare class SdStyleBundler {
14
17
  cached: boolean;
15
18
  }>;
16
19
  invalidate(modifiedNPathSet: Set<TNormPath>): Set<TNormPath>;
20
+ private _addReference;
17
21
  getAllStyleFileSet(): Set<TNormPath>;
18
22
  getAffectedFileSet(modifiedNPathSet: Set<TNormPath>): Set<TNormPath>;
19
23
  }
@@ -4,13 +4,12 @@ import { transformSupportedBrowsersToTargets } from "@angular/build/src/tools/es
4
4
  import browserslist from "browserslist";
5
5
  import path from "path";
6
6
  export class SdStyleBundler {
7
- #ngStyleBundler;
8
- #resultCache = new Map();
9
- #refCache = new Map();
10
- #revRefCache = new Map();
11
7
  constructor(_opt) {
12
8
  this._opt = _opt;
13
- this.#ngStyleBundler = new ComponentStylesheetBundler({
9
+ this._resultCache = new Map();
10
+ this._refCache = new Map();
11
+ this._revRefCache = new Map();
12
+ this._ngStyleBundler = new ComponentStylesheetBundler({
14
13
  workspaceRoot: this._opt.pkgPath,
15
14
  inlineFonts: !this._opt.dev,
16
15
  optimization: !this._opt.dev,
@@ -37,31 +36,31 @@ export class SdStyleBundler {
37
36
  }, "scss", this._opt.dev);
38
37
  }
39
38
  getResultCache() {
40
- return this.#resultCache;
39
+ return this._resultCache;
41
40
  }
42
41
  async bundleAsync(data, containingFile, resourceFile = null) {
43
42
  // containingFile: 포함된 파일 (.ts 혹은 global style.scss)
44
43
  // resourceFile: 외부 리소스 파일 (styleUrls로 입력하지 않고 styles에 직접 입력한 경우 null)
45
44
  // referencedFiles: import한 외부 scss 파일 혹은 woff파일등 외부 파일
46
45
  const fileNPath = PathUtils.norm(resourceFile ?? containingFile);
47
- if (this.#resultCache.has(fileNPath)) {
46
+ if (this._resultCache.has(fileNPath)) {
48
47
  return {
49
- ...this.#resultCache.get(fileNPath),
48
+ ...this._resultCache.get(fileNPath),
50
49
  cached: true,
51
50
  };
52
51
  }
53
52
  try {
54
53
  const result = resourceFile != null
55
- ? await this.#ngStyleBundler.bundleFile(resourceFile)
56
- : await this.#ngStyleBundler.bundleInline(data, containingFile, "scss");
54
+ ? await this._ngStyleBundler.bundleFile(resourceFile)
55
+ : await this._ngStyleBundler.bundleInline(data, containingFile, "scss");
57
56
  for (const referencedFile of result.referencedFiles ?? []) {
58
57
  if (!this._opt.scopePathSet.inScope(fileNPath) ||
59
58
  !this._opt.scopePathSet.inScope(PathUtils.norm(referencedFile)))
60
59
  continue;
61
60
  // 참조하는 파일과 참조된 파일 사이의 의존성 관계 추가
62
- this.#addReference(fileNPath, PathUtils.norm(referencedFile));
61
+ this._addReference(fileNPath, PathUtils.norm(referencedFile));
63
62
  }
64
- this.#resultCache.set(fileNPath, result);
63
+ this._resultCache.set(fileNPath, result);
65
64
  return { ...result, cached: false };
66
65
  }
67
66
  catch (err) {
@@ -74,45 +73,45 @@ export class SdStyleBundler {
74
73
  ],
75
74
  warnings: [],
76
75
  };
77
- this.#resultCache.set(fileNPath, result);
76
+ this._resultCache.set(fileNPath, result);
78
77
  return { ...result, cached: false };
79
78
  }
80
79
  }
81
80
  invalidate(modifiedNPathSet) {
82
81
  const affectedFileSet = this.getAffectedFileSet(modifiedNPathSet);
83
- this.#ngStyleBundler.invalidate(affectedFileSet);
82
+ this._ngStyleBundler.invalidate(affectedFileSet);
84
83
  for (const fileNPath of affectedFileSet) {
85
- this.#resultCache.delete(fileNPath);
84
+ this._resultCache.delete(fileNPath);
86
85
  }
87
86
  // revRefCache/refCache
88
87
  const targetSet = new Set();
89
88
  for (const fileNPath of affectedFileSet) {
90
- targetSet.adds(...(this.#refCache.get(fileNPath) ?? []));
89
+ targetSet.adds(...(this._refCache.get(fileNPath) ?? []));
91
90
  }
92
91
  for (const target of [...targetSet]) {
93
- const source = this.#revRefCache.get(target);
92
+ const source = this._revRefCache.get(target);
94
93
  if (source == null)
95
94
  continue;
96
95
  for (const affectedFile of affectedFileSet) {
97
96
  source.delete(affectedFile);
98
97
  }
99
98
  if (source.size === 0) {
100
- this.#revRefCache.delete(target);
99
+ this._revRefCache.delete(target);
101
100
  }
102
- this.#refCache.delete(target);
101
+ this._refCache.delete(target);
103
102
  }
104
103
  return affectedFileSet;
105
104
  }
106
- #addReference(fileNPath, referencedFile) {
105
+ _addReference(fileNPath, referencedFile) {
107
106
  if (fileNPath === referencedFile)
108
107
  return;
109
- this.#refCache.getOrCreate(fileNPath, new Set()).add(referencedFile);
110
- this.#revRefCache.getOrCreate(referencedFile, new Set()).add(fileNPath);
108
+ this._refCache.getOrCreate(fileNPath, new Set()).add(referencedFile);
109
+ this._revRefCache.getOrCreate(referencedFile, new Set()).add(fileNPath);
111
110
  }
112
111
  getAllStyleFileSet() {
113
112
  return new Set([
114
- ...this.#revRefCache.keys(),
115
- ...Array.from(this.#revRefCache.values()).mapMany((item) => Array.from(item)),
113
+ ...this._revRefCache.keys(),
114
+ ...Array.from(this._revRefCache.values()).mapMany((item) => Array.from(item)),
116
115
  ]);
117
116
  }
118
117
  getAffectedFileSet(modifiedNPathSet) {
@@ -120,12 +119,12 @@ export class SdStyleBundler {
120
119
  // 수정파일중 Result에 있는것
121
120
  const modifiedResultFiles = Array.from(modifiedNPathSet)
122
121
  // .filter((item) => item.endsWith(".scss"))
123
- .filter((item) => this.#resultCache.has(item));
122
+ .filter((item) => this._resultCache.has(item));
124
123
  affectedFileSet.adds(...modifiedResultFiles);
125
124
  // 수정파일을 사용하는 파일
126
125
  const modifiedScssFiles = Array.from(modifiedNPathSet).filter((item) => item.endsWith(".scss"));
127
126
  for (const modifiedScss of modifiedScssFiles) {
128
- affectedFileSet.adds(...(this.#revRefCache.get(modifiedScss) ?? []));
127
+ affectedFileSet.adds(...(this._revRefCache.get(modifiedScss) ?? []));
129
128
  }
130
129
  return affectedFileSet;
131
130
  }
@@ -2,9 +2,28 @@ import { TNormPath } from "@simplysm/sd-core-node";
2
2
  import { ISdTsCompilerOptions } from "../types/build/ISdTsCompilerOptions";
3
3
  import { ISdTsCompilerResult } from "../types/build/ISdTsCompilerResult";
4
4
  export declare class SdTsCompiler {
5
- #private;
6
5
  private readonly _opt;
7
6
  private readonly _forBundle;
7
+ private readonly _logger;
8
+ private readonly _isForAngular;
9
+ private readonly _scopePathSet;
10
+ private readonly _styleBundler;
11
+ private _moduleResolutionCache;
12
+ private _ngProgram;
13
+ private _program;
14
+ private readonly _cache;
15
+ private readonly _sourceFileCacheMap;
16
+ private readonly _emittedFilesCacheMap;
17
+ private _perf;
8
18
  constructor(_opt: ISdTsCompilerOptions, _forBundle: boolean);
19
+ private _parseTsConfig;
20
+ private _createCompilerHost;
9
21
  compileAsync(modifiedFileSet: Set<TNormPath>): Promise<ISdTsCompilerResult>;
22
+ private _prepareAsync;
23
+ private _lintAsync;
24
+ private _buildGlobalStyleAsync;
25
+ private _build;
26
+ private _convertOutputToReal;
27
+ private _removeOutputDevModeLine;
28
+ private _debug;
10
29
  }