@simplysm/sd-cli 12.7.4 → 12.7.6

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 (167) hide show
  1. package/dist/entry/sd-cli-ai-command.d.ts +3 -0
  2. package/dist/entry/{SdAiCommand.js → sd-cli-ai-command.js} +14 -9
  3. package/dist/entry/sd-cli-ai-command.js.map +1 -0
  4. package/dist/entry/{SdCliCordova.d.ts → sd-cli-cordova.d.ts} +1 -1
  5. package/dist/entry/{SdCliCordova.js → sd-cli-cordova.js} +33 -31
  6. package/dist/entry/sd-cli-cordova.js.map +1 -0
  7. package/dist/entry/{SdCliElectron.d.ts → sd-cli-electron.d.ts} +1 -1
  8. package/dist/entry/{SdCliElectron.js → sd-cli-electron.js} +18 -16
  9. package/dist/entry/sd-cli-electron.js.map +1 -0
  10. package/dist/entry/{SdCliLocalUpdate.js → sd-cli-local-update.js} +12 -11
  11. package/dist/entry/sd-cli-local-update.js.map +1 -0
  12. package/dist/entry/{SdCliProject.js → sd-cli-project.js} +36 -33
  13. package/dist/entry/sd-cli-project.js.map +1 -0
  14. package/dist/index.d.ts +30 -30
  15. package/dist/index.js +30 -30
  16. package/dist/index.js.map +1 -1
  17. package/dist/pkg-builders/client/{SdCliNgRoutesFileGenerator.js → sd-cli-ng-routes.file-generator.js} +13 -12
  18. package/dist/pkg-builders/client/sd-cli-ng-routes.file-generator.js.map +1 -0
  19. package/dist/pkg-builders/client/{SdClientBuildRunner.d.ts → sd-client.build-runner.d.ts} +3 -3
  20. package/dist/pkg-builders/client/{SdClientBuildRunner.js → sd-client.build-runner.js} +34 -24
  21. package/dist/pkg-builders/client/sd-client.build-runner.js.map +1 -0
  22. package/dist/pkg-builders/client/{SdNgBundlerContext.js → sd-ng.bundler-context.js} +5 -5
  23. package/dist/pkg-builders/client/sd-ng.bundler-context.js.map +1 -0
  24. package/dist/pkg-builders/client/{SdNgBundler.d.ts → sd-ng.bundler.d.ts} +3 -3
  25. package/dist/pkg-builders/client/{SdNgBundler.js → sd-ng.bundler.js} +55 -96
  26. package/dist/pkg-builders/client/sd-ng.bundler.js.map +1 -0
  27. package/dist/pkg-builders/client/{createSdNgPlugin.d.ts → sd-ng.plugin-creator.d.ts} +2 -2
  28. package/dist/pkg-builders/client/{createSdNgPlugin.js → sd-ng.plugin-creator.js} +18 -15
  29. package/dist/pkg-builders/client/sd-ng.plugin-creator.js.map +1 -0
  30. package/dist/pkg-builders/lib/{SdCliIndexFileGenerator.js → sd-cli-index.file-generator.js} +8 -8
  31. package/dist/pkg-builders/lib/sd-cli-index.file-generator.js.map +1 -0
  32. package/dist/pkg-builders/lib/{SdJsLibBuildRunner.d.ts → sd-js-lib.build-runner.d.ts} +2 -2
  33. package/dist/pkg-builders/lib/{SdJsLibBuildRunner.js → sd-js-lib.build-runner.js} +18 -15
  34. package/dist/pkg-builders/lib/sd-js-lib.build-runner.js.map +1 -0
  35. package/dist/pkg-builders/lib/{SdTsLibBuildRunner.d.ts → sd-ts-lib.build-runner.d.ts} +2 -2
  36. package/dist/pkg-builders/lib/{SdTsLibBuildRunner.js → sd-ts-lib.build-runner.js} +17 -15
  37. package/dist/pkg-builders/lib/sd-ts-lib.build-runner.js.map +1 -0
  38. package/dist/pkg-builders/lib/{SdTsLibBuilder.d.ts → sd-ts-lib.builder.d.ts} +2 -2
  39. package/dist/pkg-builders/lib/{SdTsLibBuilder.js → sd-ts-lib.builder.js} +11 -10
  40. package/dist/pkg-builders/lib/sd-ts-lib.builder.js.map +1 -0
  41. package/dist/pkg-builders/{SdMultiBuildRunner.d.ts → sd-multi.build-runner.d.ts} +2 -2
  42. package/dist/pkg-builders/{SdMultiBuildRunner.js → sd-multi.build-runner.js} +13 -8
  43. package/dist/pkg-builders/sd-multi.build-runner.js.map +1 -0
  44. package/dist/pkg-builders/server/{SdServerBuildRunner.d.ts → sd-server.build-runner.d.ts} +3 -3
  45. package/dist/pkg-builders/server/{SdServerBuildRunner.js → sd-server.build-runner.js} +35 -32
  46. package/dist/pkg-builders/server/sd-server.build-runner.js.map +1 -0
  47. package/dist/pkg-builders/server/{SdServerBundler.d.ts → sd-server.bundler.d.ts} +2 -2
  48. package/dist/pkg-builders/server/{SdServerBundler.js → sd-server.bundler.js} +15 -13
  49. package/dist/pkg-builders/server/sd-server.bundler.js.map +1 -0
  50. package/dist/pkg-builders/server/{createSdServerPlugin.d.ts → sd-server.plugin-creator.d.ts} +2 -2
  51. package/dist/pkg-builders/server/{createSdServerPlugin.js → sd-server.plugin-creator.js} +11 -8
  52. package/dist/pkg-builders/server/sd-server.plugin-creator.js.map +1 -0
  53. package/dist/sd-cli.js +10 -10
  54. package/dist/sd-cli.js.map +1 -1
  55. package/dist/{ts-builder/SdTsCompiler.d.ts → ts-compiler/sd-ts-compiler.d.ts} +2 -2
  56. package/dist/{ts-builder/SdTsCompiler.js → ts-compiler/sd-ts-compiler.js} +72 -65
  57. package/dist/ts-compiler/sd-ts-compiler.js.map +1 -0
  58. package/dist/types/{build-plugin.type.d.ts → build-plugin.types.d.ts} +1 -1
  59. package/dist/types/build-plugin.types.js +3 -0
  60. package/dist/types/build-plugin.types.js.map +1 -0
  61. package/dist/types/{build-runner.type.d.ts → build-runner.types.d.ts} +2 -2
  62. package/dist/types/build-runner.types.js +3 -0
  63. package/dist/types/build-runner.types.js.map +1 -0
  64. package/dist/types/{build.type.d.ts → build.types.d.ts} +1 -1
  65. package/dist/types/build.types.js +2 -0
  66. package/dist/types/build.types.js.map +1 -0
  67. package/dist/types/common-configs.types.js +2 -0
  68. package/dist/types/common-configs.types.js.map +1 -0
  69. package/dist/types/config.types.js +2 -0
  70. package/dist/types/config.types.js.map +1 -0
  71. package/dist/types/{ts-compiler.type.d.ts → ts-compiler.types.d.ts} +3 -3
  72. package/dist/types/ts-compiler.types.js +5 -0
  73. package/dist/types/ts-compiler.types.js.map +1 -0
  74. package/dist/types/{workers.type.d.ts → worker.types.d.ts} +2 -2
  75. package/dist/types/worker.types.js +3 -0
  76. package/dist/types/worker.types.js.map +1 -0
  77. package/dist/utils/{SdCliConvertMessageUtil.d.ts → sd-cli-convert-message.utils.d.ts} +3 -3
  78. package/dist/utils/{SdCliConvertMessageUtil.js → sd-cli-convert-message.utils.js} +9 -6
  79. package/dist/utils/sd-cli-convert-message.utils.js.map +1 -0
  80. package/dist/utils/{SdCliPerformanceTime.js → sd-cli-performance-time.js} +1 -1
  81. package/dist/utils/sd-cli-performance-time.js.map +1 -0
  82. package/dist/workers/{build-runner-worker.js → build-runner.worker.js} +13 -10
  83. package/dist/workers/build-runner.worker.js.map +1 -0
  84. package/dist/workers/{server-worker.js → server.worker.js} +6 -5
  85. package/dist/workers/server.worker.js.map +1 -0
  86. package/package.json +7 -7
  87. package/src/entry/{SdAiCommand.ts → sd-cli-ai-command.ts} +18 -8
  88. package/src/entry/{SdCliCordova.ts → sd-cli-cordova.ts} +32 -32
  89. package/src/entry/{SdCliElectron.ts → sd-cli-electron.ts} +17 -17
  90. package/src/entry/{SdCliLocalUpdate.ts → sd-cli-local-update.ts} +11 -11
  91. package/src/entry/{SdCliProject.ts → sd-cli-project.ts} +36 -36
  92. package/src/index.ts +30 -30
  93. package/src/pkg-builders/client/{SdCliNgRoutesFileGenerator.ts → sd-cli-ng-routes.file-generator.ts} +14 -12
  94. package/src/pkg-builders/client/{SdClientBuildRunner.ts → sd-client.build-runner.ts} +52 -45
  95. package/src/pkg-builders/client/{SdNgBundlerContext.ts → sd-ng.bundler-context.ts} +4 -4
  96. package/src/pkg-builders/client/{SdNgBundler.ts → sd-ng.bundler.ts} +98 -130
  97. package/src/pkg-builders/client/{createSdNgPlugin.ts → sd-ng.plugin-creator.ts} +16 -16
  98. package/src/pkg-builders/lib/{SdCliIndexFileGenerator.ts → sd-cli-index.file-generator.ts} +7 -7
  99. package/src/pkg-builders/lib/{SdJsLibBuildRunner.ts → sd-js-lib.build-runner.ts} +16 -16
  100. package/src/pkg-builders/lib/{SdTsLibBuildRunner.ts → sd-ts-lib.build-runner.ts} +17 -17
  101. package/src/pkg-builders/lib/{SdTsLibBuilder.ts → sd-ts-lib.builder.ts} +10 -10
  102. package/src/pkg-builders/{SdMultiBuildRunner.ts → sd-multi.build-runner.ts} +12 -12
  103. package/src/pkg-builders/server/{SdServerBuildRunner.ts → sd-server.build-runner.ts} +34 -34
  104. package/src/pkg-builders/server/{SdServerBundler.ts → sd-server.bundler.ts} +15 -15
  105. package/src/pkg-builders/server/{createSdServerPlugin.ts → sd-server.plugin-creator.ts} +9 -9
  106. package/src/sd-cli.ts +10 -10
  107. package/src/{ts-builder/SdTsCompiler.ts → ts-compiler/sd-ts-compiler.ts} +146 -78
  108. package/src/types/{build-plugin.type.ts → build-plugin.types.ts} +1 -1
  109. package/src/types/{build-runner.type.ts → build-runner.types.ts} +2 -2
  110. package/src/types/{build.type.ts → build.types.ts} +1 -1
  111. package/src/types/{ts-compiler.type.ts → ts-compiler.types.ts} +3 -3
  112. package/src/types/{workers.type.ts → worker.types.ts} +2 -2
  113. package/src/utils/{SdCliConvertMessageUtil.ts → sd-cli-convert-message.utils.ts} +7 -7
  114. package/src/workers/{build-runner-worker.ts → build-runner.worker.ts} +12 -12
  115. package/src/workers/{server-worker.ts → server.worker.ts} +5 -5
  116. package/tsconfig.json +2 -1
  117. package/dist/entry/SdAiCommand.d.ts +0 -3
  118. package/dist/entry/SdAiCommand.js.map +0 -1
  119. package/dist/entry/SdCliCordova.js.map +0 -1
  120. package/dist/entry/SdCliElectron.js.map +0 -1
  121. package/dist/entry/SdCliLocalUpdate.js.map +0 -1
  122. package/dist/entry/SdCliProject.js.map +0 -1
  123. package/dist/pkg-builders/SdMultiBuildRunner.js.map +0 -1
  124. package/dist/pkg-builders/client/SdCliNgRoutesFileGenerator.js.map +0 -1
  125. package/dist/pkg-builders/client/SdClientBuildRunner.js.map +0 -1
  126. package/dist/pkg-builders/client/SdNgBundler.js.map +0 -1
  127. package/dist/pkg-builders/client/SdNgBundlerContext.js.map +0 -1
  128. package/dist/pkg-builders/client/createSdNgPlugin.js.map +0 -1
  129. package/dist/pkg-builders/lib/SdCliIndexFileGenerator.js.map +0 -1
  130. package/dist/pkg-builders/lib/SdJsLibBuildRunner.js.map +0 -1
  131. package/dist/pkg-builders/lib/SdTsLibBuildRunner.js.map +0 -1
  132. package/dist/pkg-builders/lib/SdTsLibBuilder.js.map +0 -1
  133. package/dist/pkg-builders/server/SdServerBuildRunner.js.map +0 -1
  134. package/dist/pkg-builders/server/SdServerBundler.js.map +0 -1
  135. package/dist/pkg-builders/server/createSdServerPlugin.js.map +0 -1
  136. package/dist/ts-builder/SdTsCompiler.js.map +0 -1
  137. package/dist/types/build-plugin.type.js +0 -2
  138. package/dist/types/build-plugin.type.js.map +0 -1
  139. package/dist/types/build-runner.type.js +0 -2
  140. package/dist/types/build-runner.type.js.map +0 -1
  141. package/dist/types/build.type.js +0 -2
  142. package/dist/types/build.type.js.map +0 -1
  143. package/dist/types/common-configs.type.js +0 -2
  144. package/dist/types/common-configs.type.js.map +0 -1
  145. package/dist/types/sd-configs.type.js +0 -2
  146. package/dist/types/sd-configs.type.js.map +0 -1
  147. package/dist/types/ts-compiler.type.js +0 -2
  148. package/dist/types/ts-compiler.type.js.map +0 -1
  149. package/dist/types/workers.type.js +0 -2
  150. package/dist/types/workers.type.js.map +0 -1
  151. package/dist/utils/SdCliConvertMessageUtil.js.map +0 -1
  152. package/dist/utils/SdCliPerformanceTime.js.map +0 -1
  153. package/dist/workers/build-runner-worker.js.map +0 -1
  154. package/dist/workers/server-worker.js.map +0 -1
  155. /package/dist/entry/{SdCliLocalUpdate.d.ts → sd-cli-local-update.d.ts} +0 -0
  156. /package/dist/entry/{SdCliProject.d.ts → sd-cli-project.d.ts} +0 -0
  157. /package/dist/pkg-builders/client/{SdCliNgRoutesFileGenerator.d.ts → sd-cli-ng-routes.file-generator.d.ts} +0 -0
  158. /package/dist/pkg-builders/client/{SdNgBundlerContext.d.ts → sd-ng.bundler-context.d.ts} +0 -0
  159. /package/dist/pkg-builders/lib/{SdCliIndexFileGenerator.d.ts → sd-cli-index.file-generator.d.ts} +0 -0
  160. /package/dist/types/{common-configs.type.d.ts → common-configs.types.d.ts} +0 -0
  161. /package/dist/types/{sd-configs.type.d.ts → config.types.d.ts} +0 -0
  162. /package/dist/utils/{SdCliPerformanceTime.d.ts → sd-cli-performance-time.d.ts} +0 -0
  163. /package/dist/workers/{build-runner-worker.d.ts → build-runner.worker.d.ts} +0 -0
  164. /package/dist/workers/{server-worker.d.ts → server.worker.d.ts} +0 -0
  165. /package/src/types/{common-configs.type.ts → common-configs.types.ts} +0 -0
  166. /package/src/types/{sd-configs.type.ts → config.types.ts} +0 -0
  167. /package/src/utils/{SdCliPerformanceTime.ts → sd-cli-performance-time.ts} +0 -0
@@ -1,13 +1,13 @@
1
- import { FsUtil, Logger, SdProcess } from "@simplysm/sd-core-node";
1
+ import { FsUtils, SdLogger, SdProcess } from "@simplysm/sd-core-node";
2
2
  import { pathToFileURL } from "url";
3
3
  import path from "path";
4
4
  import electronBuilder from "electron-builder";
5
- import { ISdClientBuilderElectronConfig, ISdProjectConfig } from "../types/sd-configs.type";
6
- import { INpmConfig } from "../types/common-configs.type";
5
+ import { type ISdClientBuilderElectronConfig, type ISdProjectConfig } from "../types/config.types";
6
+ import { type INpmConfig } from "../types/common-configs.types";
7
7
 
8
8
  export class SdCliElectron {
9
9
  static async runAsync(opt: { confFileRelPath: string; optNames: string[]; pkgName: string }): Promise<void> {
10
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliElectron", "runAsync"]);
10
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliElectron", "runAsync"]);
11
11
 
12
12
  const pkgPath = path.resolve(process.cwd(), `packages/${opt.pkgName}`);
13
13
  const electronPath = path.resolve(pkgPath, "dist/electron");
@@ -23,11 +23,11 @@ export class SdCliElectron {
23
23
  }
24
24
 
25
25
  logger.log("package.json 파일 쓰기...");
26
- const npmConfig = FsUtil.readJson(path.resolve(pkgPath, `package.json`)) as INpmConfig;
26
+ const npmConfig = FsUtils.readJson(path.resolve(pkgPath, `package.json`)) as INpmConfig;
27
27
 
28
28
  const reinstallPkgNames = pkgConf.builder.electron.reinstallDependencies ?? [];
29
29
 
30
- FsUtil.writeJson(path.resolve(electronPath, `package.json`), {
30
+ FsUtils.writeJson(path.resolve(electronPath, `package.json`), {
31
31
  name: npmConfig.name.replace(/^@/, "").replace(/\//, "-"),
32
32
  version: npmConfig.version,
33
33
  description: npmConfig.description,
@@ -67,7 +67,7 @@ export class SdCliElectron {
67
67
  }
68
68
 
69
69
  static async buildForDevAsync(opt: { confFileRelPath: string; optNames: string[]; pkgName: string }): Promise<void> {
70
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliElectron", "buildForDevAsync"]);
70
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliElectron", "buildForDevAsync"]);
71
71
 
72
72
  const pkgPath = path.resolve(process.cwd(), `packages/${opt.pkgName}`);
73
73
  const electronPath = path.resolve(pkgPath, "dist/electron");
@@ -84,11 +84,11 @@ export class SdCliElectron {
84
84
  }
85
85
 
86
86
  logger.log("package.json 파일 쓰기...");
87
- const npmConfig = FsUtil.readJson(path.resolve(pkgPath, `package.json`)) as INpmConfig;
87
+ const npmConfig = FsUtils.readJson(path.resolve(pkgPath, `package.json`)) as INpmConfig;
88
88
 
89
89
  const reinstallPkgNames = pkgConf.builder.electron.reinstallDependencies ?? [];
90
90
 
91
- FsUtil.writeJson(path.resolve(electronPath, `package.json`), {
91
+ FsUtils.writeJson(path.resolve(electronPath, `package.json`), {
92
92
  name: npmConfig.name.replace(/^@/, "").replace(/\//, "-"),
93
93
  version: npmConfig.version,
94
94
  description: npmConfig.description,
@@ -110,7 +110,7 @@ export class SdCliElectron {
110
110
  await SdProcess.spawnAsync(`npm install`, { cwd: electronPath }, true);
111
111
 
112
112
  for (const reinstallPkgName of reinstallPkgNames) {
113
- if (FsUtil.exists(path.resolve(electronPath, "node_modules", reinstallPkgName, "binding.gyp"))) {
113
+ if (FsUtils.exists(path.resolve(electronPath, "node_modules", reinstallPkgName, "binding.gyp"))) {
114
114
  logger.log(`electron rebuild (${reinstallPkgName})...`);
115
115
  await SdProcess.spawnAsync(
116
116
  `electron-rebuild -m ./node_modules/${reinstallPkgName}`,
@@ -145,24 +145,24 @@ export class SdCliElectron {
145
145
  },
146
146
  });
147
147
 
148
- FsUtil.copy(
148
+ FsUtils.copy(
149
149
  path.resolve(electronDistPath, `${npmConfig.description} ${pkgConf.builder.electron.portable ? "" : "Setup "}${npmConfig.version}.exe`),
150
150
  path.resolve(pkgPath, `dist/electron/${npmConfig.description}${pkgConf.builder.electron.portable ? "-portable" : ""}-dev.exe`),
151
151
  );
152
152
  }
153
153
 
154
154
  static async buildAsync(opt: { pkgPath: string; config: ISdClientBuilderElectronConfig }): Promise<void> {
155
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliElectron", "buildAsync"]);
155
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliElectron", "buildAsync"]);
156
156
 
157
157
  const electronSrcPath = path.resolve(opt.pkgPath, ".electron/src");
158
158
  const electronDistPath = path.resolve(opt.pkgPath, ".electron/dist");
159
159
 
160
160
  logger.log("package.json 파일 쓰기...");
161
- const npmConfig = FsUtil.readJson(path.resolve(opt.pkgPath, `package.json`)) as INpmConfig;
161
+ const npmConfig = FsUtils.readJson(path.resolve(opt.pkgPath, `package.json`)) as INpmConfig;
162
162
 
163
163
  const reinstallPkgNames = opt.config.reinstallDependencies ?? [];
164
164
 
165
- FsUtil.writeJson(path.resolve(electronSrcPath, `package.json`), {
165
+ FsUtils.writeJson(path.resolve(electronSrcPath, `package.json`), {
166
166
  name: npmConfig.name.replace(/^@/, "").replace(/\//, "-"),
167
167
  version: npmConfig.version,
168
168
  description: npmConfig.description,
@@ -184,7 +184,7 @@ export class SdCliElectron {
184
184
  await SdProcess.spawnAsync(`npm install`, { cwd: electronSrcPath }, true);
185
185
 
186
186
  for (const reinstallPkgName of reinstallPkgNames) {
187
- if (FsUtil.exists(path.resolve(electronSrcPath, "node_modules", reinstallPkgName, "binding.gyp"))) {
187
+ if (FsUtils.exists(path.resolve(electronSrcPath, "node_modules", reinstallPkgName, "binding.gyp"))) {
188
188
  logger.log(`electron rebuild (${reinstallPkgName})...`);
189
189
  await SdProcess.spawnAsync(
190
190
  `electron-rebuild -m ./node_modules/${reinstallPkgName}`,
@@ -219,12 +219,12 @@ export class SdCliElectron {
219
219
  },
220
220
  });
221
221
 
222
- FsUtil.copy(
222
+ FsUtils.copy(
223
223
  path.resolve(electronDistPath, `${npmConfig.description} ${opt.config.portable ? "" : "Setup "}${npmConfig.version}.exe`),
224
224
  path.resolve(opt.pkgPath, `dist/electron/${npmConfig.description}${opt.config.portable ? "-portable" : ""}-latest.exe`),
225
225
  );
226
226
 
227
- FsUtil.copy(
227
+ FsUtils.copy(
228
228
  path.resolve(electronDistPath, `${npmConfig.description} ${opt.config.portable ? "" : "Setup "}${npmConfig.version}.exe`),
229
229
  path.resolve(opt.pkgPath, `dist/electron/updates/${npmConfig.version}.exe`),
230
230
  );
@@ -1,11 +1,11 @@
1
- import { FsUtil, Logger, PathUtil, SdFsWatcher } from "@simplysm/sd-core-node";
1
+ import { FsUtils, SdLogger, PathUtils, SdFsWatcher } from "@simplysm/sd-core-node";
2
2
  import path from "path";
3
3
  import { pathToFileURL } from "url";
4
- import { ISdProjectConfig } from "../types/sd-configs.type";
4
+ import { type ISdProjectConfig } from "../types/config.types";
5
5
 
6
6
  export class SdCliLocalUpdate {
7
7
  static async runAsync(opt: { confFileRelPath: string; optNames: string[] }): Promise<void> {
8
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliLocalUpdate", "runAsync"]);
8
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliLocalUpdate", "runAsync"]);
9
9
 
10
10
  logger.debug("프로젝트 설정 가져오기...");
11
11
  const projConf = (await import(pathToFileURL(path.resolve(process.cwd(), opt.confFileRelPath)).href)).default(
@@ -19,13 +19,13 @@ export class SdCliLocalUpdate {
19
19
 
20
20
  logger.log("로컬 라이브러리 업데이트 시작...");
21
21
  for (const updatePathInfo of updatePathInfos) {
22
- if (!FsUtil.exists(updatePathInfo.source)) {
22
+ if (!FsUtils.exists(updatePathInfo.source)) {
23
23
  logger.warn(`소스경로를 찾을 수 없어 무시됩니다(${updatePathInfo.source})`);
24
24
  return;
25
25
  }
26
26
 
27
27
  // 소스경로에서 대상경로로 파일 복사
28
- FsUtil.copy(updatePathInfo.source, updatePathInfo.target, (src) => {
28
+ FsUtils.copy(updatePathInfo.source, updatePathInfo.target, (src) => {
29
29
  return !src.includes("node_modules") && !src.endsWith("package.json");
30
30
  });
31
31
  }
@@ -33,7 +33,7 @@ export class SdCliLocalUpdate {
33
33
  }
34
34
 
35
35
  static async watchAsync(opt: { confFileRelPath: string; optNames: string[] }): Promise<void> {
36
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliLocalUpdate", "watchAsync"]);
36
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliLocalUpdate", "watchAsync"]);
37
37
 
38
38
  logger.debug("프로젝트 설정 가져오기...");
39
39
  const projConf = (await import(pathToFileURL(path.resolve(process.cwd(), opt.confFileRelPath)).href)).default(
@@ -56,17 +56,17 @@ export class SdCliLocalUpdate {
56
56
 
57
57
  for (const changedFileInfo of changedFileInfos) {
58
58
  for (const updatePathInfo of updatePathInfos) {
59
- if (!PathUtil.isChildPath(changedFileInfo.path, updatePathInfo.source)) continue;
59
+ if (!PathUtils.isChildPath(changedFileInfo.path, updatePathInfo.source)) continue;
60
60
 
61
61
  const sourceRelPath = path.relative(updatePathInfo.source, changedFileInfo.path);
62
62
  const targetFilePath = path.resolve(updatePathInfo.target, sourceRelPath);
63
63
 
64
64
  if (changedFileInfo.event === "unlink") {
65
65
  logger.debug(`변경파일감지(삭제): ${targetFilePath}`);
66
- FsUtil.remove(targetFilePath);
66
+ FsUtils.remove(targetFilePath);
67
67
  } else {
68
68
  logger.debug(`변경파일감지(복사): ${changedFileInfo.path} => ${targetFilePath}`);
69
- FsUtil.copy(changedFileInfo.path, targetFilePath);
69
+ FsUtils.copy(changedFileInfo.path, targetFilePath);
70
70
  }
71
71
  }
72
72
  }
@@ -84,8 +84,8 @@ export class SdCliLocalUpdate {
84
84
  for (const pkgGlobPath of Object.keys(record)) {
85
85
  // "node_modules'에서 로컬업데이트 설정에 맞는 패키지를 "glob"하여 대상 패키지경로 목록 가져오기
86
86
  const targetPaths = [
87
- ...FsUtil.glob(path.resolve(process.cwd(), "node_modules", pkgGlobPath)),
88
- ...FsUtil.glob(path.resolve(process.cwd(), "packages", "*", "node_modules", pkgGlobPath)),
87
+ ...FsUtils.glob(path.resolve(process.cwd(), "node_modules", pkgGlobPath)),
88
+ ...FsUtils.glob(path.resolve(process.cwd(), "packages", "*", "node_modules", pkgGlobPath)),
89
89
  ];
90
90
 
91
91
  result.push(
@@ -1,16 +1,16 @@
1
1
  import path from "path";
2
- import { FsUtil, Logger, PathUtil, SdProcess } from "@simplysm/sd-core-node";
2
+ import { FsUtils, SdLogger, PathUtils, SdProcess } from "@simplysm/sd-core-node";
3
3
  import { pathToFileURL } from "url";
4
4
  import semver from "semver";
5
- import { NeverEntryError, StringUtil, Wait } from "@simplysm/sd-core-common";
5
+ import { NeverEntryError, StringUtils, Wait } from "@simplysm/sd-core-common";
6
6
  import { SdStorage } from "@simplysm/sd-storage";
7
- import { SdCliLocalUpdate } from "./SdCliLocalUpdate";
7
+ import { SdCliLocalUpdate } from "./sd-cli-local-update";
8
8
  import xml2js from "xml2js";
9
- import { SdMultiBuildRunner } from "../pkg-builders/SdMultiBuildRunner";
10
- import { SdCliConvertMessageUtil } from "../utils/SdCliConvertMessageUtil";
11
- import { ISdProjectConfig, TSdPackageConfig } from "../types/sd-configs.type";
12
- import { INpmConfig } from "../types/common-configs.type";
13
- import { ISdBuildMessage } from "../types/build.type";
9
+ import { SdMultiBuildRunner } from "../pkg-builders/sd-multi.build-runner";
10
+ import { SdCliConvertMessageUtils } from "../utils/sd-cli-convert-message.utils";
11
+ import { type ISdProjectConfig, type TSdPackageConfig } from "../types/config.types";
12
+ import { type INpmConfig } from "../types/common-configs.types";
13
+ import { type ISdBuildMessage } from "../types/build.types";
14
14
 
15
15
  export class SdCliProject {
16
16
  static async watchAsync(opt: {
@@ -19,7 +19,7 @@ export class SdCliProject {
19
19
  pkgNames: string[];
20
20
  inspectNames: string[];
21
21
  }): Promise<void> {
22
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliProject", "watchAsync"]);
22
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliProject", "watchAsync"]);
23
23
 
24
24
  logger.debug("프로젝트 설정 가져오기...");
25
25
  const projConf = (await import(pathToFileURL(path.resolve(process.cwd(), opt.confFileRelPath)).href)).default(
@@ -36,16 +36,16 @@ export class SdCliProject {
36
36
  }
37
37
 
38
38
  logger.debug("프로젝트 package.json 가져오기...");
39
- const projNpmConf = FsUtil.readJson(path.resolve(process.cwd(), "package.json")) as INpmConfig;
39
+ const projNpmConf = FsUtils.readJson(path.resolve(process.cwd(), "package.json")) as INpmConfig;
40
40
 
41
41
  logger.debug("패키지 목록 구성...");
42
42
  if (!projNpmConf.workspaces) {
43
43
  throw new Error("프로젝트 package.json에 workspaces가 설정되어있지 않습니다.");
44
44
  }
45
45
  const allPkgPaths = projNpmConf.workspaces
46
- .mapMany((item) => FsUtil.glob(item))
46
+ .mapMany((item) => FsUtils.glob(item))
47
47
  .filter((item) => !item.includes("."))
48
- .map((item) => PathUtil.norm(item));
48
+ .map((item) => PathUtils.norm(item));
49
49
  let pkgPaths = allPkgPaths.filter((pkgPath) => path.basename(pkgPath) in projConf.packages);
50
50
  if (opt.pkgNames.length !== 0) {
51
51
  pkgPaths = pkgPaths.filter((pkgPath) => opt.pkgNames.includes(path.basename(pkgPath)));
@@ -78,7 +78,7 @@ export class SdCliProject {
78
78
  }
79
79
 
80
80
  static async buildAsync(opt: { confFileRelPath: string; optNames: string[]; pkgNames: string[] }): Promise<void> {
81
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliProject", "buildAsync"]);
81
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliProject", "buildAsync"]);
82
82
 
83
83
  logger.debug("프로젝트 설정 가져오기...");
84
84
  const projConf = (await import(pathToFileURL(path.resolve(process.cwd(), opt.confFileRelPath)).href)).default(
@@ -87,13 +87,13 @@ export class SdCliProject {
87
87
  ) as ISdProjectConfig;
88
88
 
89
89
  logger.debug("프로젝트 package.json 가져오기...");
90
- const projNpmConf = FsUtil.readJson(path.resolve(process.cwd(), "package.json")) as INpmConfig;
90
+ const projNpmConf = FsUtils.readJson(path.resolve(process.cwd(), "package.json")) as INpmConfig;
91
91
 
92
92
  logger.debug("패키지 목록 구성...");
93
93
  if (!projNpmConf.workspaces) {
94
94
  throw new Error("프로젝트 package.json에 workspaces가 설정되어있지 않습니다.");
95
95
  }
96
- const allPkgPaths = projNpmConf.workspaces.mapMany((item) => FsUtil.glob(item)).map((item) => PathUtil.norm(item));
96
+ const allPkgPaths = projNpmConf.workspaces.mapMany((item) => FsUtils.glob(item)).map((item) => PathUtils.norm(item));
97
97
  let pkgPaths = allPkgPaths.filter((pkgPath) => path.basename(pkgPath) in projConf.packages);
98
98
  if (opt.pkgNames.length !== 0) {
99
99
  pkgPaths = pkgPaths.filter((pkgPath) => opt.pkgNames.includes(path.basename(pkgPath)));
@@ -121,7 +121,7 @@ export class SdCliProject {
121
121
  optNames: string[];
122
122
  pkgNames: string[];
123
123
  }): Promise<void> {
124
- const logger = Logger.get(["simplysm", "sd-cli", "SdCliProject", "publishAsync"]);
124
+ const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliProject", "publishAsync"]);
125
125
 
126
126
  logger.debug("프로젝트 설정 가져오기...");
127
127
  const projConf = (await import(pathToFileURL(path.resolve(process.cwd(), opt.confFileRelPath)).href)).default(
@@ -130,7 +130,7 @@ export class SdCliProject {
130
130
  ) as ISdProjectConfig;
131
131
 
132
132
  logger.debug("프로젝트 package.json 가져오기...");
133
- const projNpmConf = FsUtil.readJson(path.resolve(process.cwd(), "package.json")) as INpmConfig;
133
+ const projNpmConf = FsUtils.readJson(path.resolve(process.cwd(), "package.json")) as INpmConfig;
134
134
 
135
135
  if (opt.noBuild) {
136
136
  logger.warn("빌드하지 않고, 배포하는것은 상당히 위험합니다.");
@@ -138,7 +138,7 @@ export class SdCliProject {
138
138
  }
139
139
 
140
140
  // GIT 사용중일 경우, 커밋되지 않은 수정사항이 있는지 확인
141
- if (FsUtil.exists(path.resolve(process.cwd(), ".git"))) {
141
+ if (FsUtils.exists(path.resolve(process.cwd(), ".git"))) {
142
142
  logger.debug("GIT 커밋여부 확인...");
143
143
  const gitStatusResult = await SdProcess.spawnAsync("git status");
144
144
  if (gitStatusResult.includes("Changes") || gitStatusResult.includes("Untracked")) {
@@ -151,9 +151,9 @@ export class SdCliProject {
151
151
  throw new Error("프로젝트 package.json에 workspaces가 설정되어있지 않습니다.");
152
152
  }
153
153
  const allPkgPaths = projNpmConf.workspaces
154
- .mapMany((item) => FsUtil.glob(item))
154
+ .mapMany((item) => FsUtils.glob(item))
155
155
  .filter((item) => !item.includes("."))
156
- .map((item) => PathUtil.norm(item));
156
+ .map((item) => PathUtils.norm(item));
157
157
  let pkgPaths = allPkgPaths.filter((pkgPath) => path.basename(pkgPath) in projConf.packages);
158
158
  if (opt.pkgNames.length !== 0) {
159
159
  pkgPaths = pkgPaths.filter((pkgPath) => opt.pkgNames.includes(path.basename(pkgPath)));
@@ -179,7 +179,7 @@ export class SdCliProject {
179
179
  }
180
180
 
181
181
  // GIT 사용중일경우, 새 버전 커밋 및 TAG 생성
182
- if (FsUtil.exists(path.resolve(process.cwd(), ".git"))) {
182
+ if (FsUtils.exists(path.resolve(process.cwd(), ".git"))) {
183
183
  logger.debug("새 버전 커밋 및 TAG 생성...");
184
184
  await SdProcess.spawnAsync("git add .");
185
185
  await SdProcess.spawnAsync(`git commit -m "v${projNpmConf.version}"`);
@@ -208,7 +208,7 @@ export class SdCliProject {
208
208
  if (postPublishItem.type === "script") {
209
209
  const script = postPublishItem.script.replace(/%([^%]*)%/g, (item) => {
210
210
  const envName = item.replace(/%/g, "");
211
- if (!StringUtil.isNullOrEmpty(projNpmConf.version) && envName === "SD_VERSION") {
211
+ if (!StringUtils.isNullOrEmpty(projNpmConf.version) && envName === "SD_VERSION") {
212
212
  return projNpmConf.version;
213
213
  }
214
214
  if (envName === "SD_PROJECT_PATH") {
@@ -230,11 +230,11 @@ export class SdCliProject {
230
230
  if (pkgPubConf === "npm") {
231
231
  await SdProcess.spawnAsync("yarn npm publish --access public", { cwd: pkgPath });
232
232
  } else if (pkgPubConf?.type === "local-directory") {
233
- const pkgNpmConf = FsUtil.readJson(path.resolve(pkgPath, "package.json")) as INpmConfig;
233
+ const pkgNpmConf = FsUtils.readJson(path.resolve(pkgPath, "package.json")) as INpmConfig;
234
234
 
235
235
  const targetRootPath = pkgPubConf.path.replace(/%([^%]*)%/g, (item) => {
236
236
  const envName = item.replace(/%/g, "");
237
- if (!StringUtil.isNullOrEmpty(pkgNpmConf.version) && envName === "SD_VERSION") {
237
+ if (!StringUtils.isNullOrEmpty(pkgNpmConf.version) && envName === "SD_VERSION") {
238
238
  return pkgNpmConf.version;
239
239
  }
240
240
  if (envName === "SD_PROJECT_PATH") {
@@ -243,15 +243,15 @@ export class SdCliProject {
243
243
  return process.env[envName] ?? item;
244
244
  });
245
245
 
246
- const filePaths = FsUtil.glob(path.resolve(pkgPath, "dist", "**", "*"), {
246
+ const filePaths = FsUtils.glob(path.resolve(pkgPath, "dist", "**", "*"), {
247
247
  dot: true,
248
248
  nodir: true,
249
249
  });
250
250
 
251
251
  for (const filePath of filePaths) {
252
252
  const relativeFilePath = path.relative(path.resolve(pkgPath, "dist"), filePath);
253
- const targetPath = PathUtil.posix(targetRootPath, relativeFilePath);
254
- FsUtil.copy(filePath, targetPath);
253
+ const targetPath = PathUtils.posix(targetRootPath, relativeFilePath);
254
+ FsUtils.copy(filePath, targetPath);
255
255
  }
256
256
  } else if (pkgPubConf?.type === "ftp" || pkgPubConf?.type === "ftps" || pkgPubConf?.type === "sftp") {
257
257
  const ftp = await SdStorage.connectAsync(pkgPubConf.type, {
@@ -286,7 +286,7 @@ export class SdCliProject {
286
286
  projNpmConf.version = newVersion;
287
287
 
288
288
  const pkgNames = allPkgPaths.map((pkgPath) => {
289
- const pkgNpmConf = FsUtil.readJson(path.resolve(pkgPath, "package.json"));
289
+ const pkgNpmConf = FsUtils.readJson(path.resolve(pkgPath, "package.json"));
290
290
  return pkgNpmConf.name;
291
291
  });
292
292
 
@@ -304,12 +304,12 @@ export class SdCliProject {
304
304
  updateDepVersion(projNpmConf.peerDependencies);
305
305
 
306
306
  const projNpmConfFilePath = path.resolve(process.cwd(), "package.json");
307
- FsUtil.writeJson(projNpmConfFilePath, projNpmConf, { space: 2 });
307
+ FsUtils.writeJson(projNpmConfFilePath, projNpmConf, { space: 2 });
308
308
 
309
309
  // 각 패키지 package.json 버전 설정
310
310
  await allPkgPaths.parallelAsync(async (pkgPath) => {
311
311
  const pkgNpmConfFilePath = path.resolve(pkgPath, "package.json");
312
- const pkgNpmConf = FsUtil.readJson(pkgNpmConfFilePath);
312
+ const pkgNpmConf = FsUtils.readJson(pkgNpmConfFilePath);
313
313
  pkgNpmConf.version = newVersion;
314
314
 
315
315
  updateDepVersion(pkgNpmConf.dependencies);
@@ -317,22 +317,22 @@ export class SdCliProject {
317
317
  updateDepVersion(pkgNpmConf.devDependencies);
318
318
  updateDepVersion(pkgNpmConf.peerDependencies);
319
319
 
320
- FsUtil.writeJson(pkgNpmConfFilePath, pkgNpmConf, { space: 2 });
320
+ FsUtils.writeJson(pkgNpmConfFilePath, pkgNpmConf, { space: 2 });
321
321
 
322
- if (FsUtil.exists(path.resolve(pkgPath, "plugin.xml"))) {
322
+ if (FsUtils.exists(path.resolve(pkgPath, "plugin.xml"))) {
323
323
  const cordovaPluginConfFilePath = path.resolve(pkgPath, "plugin.xml");
324
- const cordovaPluginConfXml = await xml2js.parseStringPromise(FsUtil.readFile(cordovaPluginConfFilePath));
324
+ const cordovaPluginConfXml = await xml2js.parseStringPromise(FsUtils.readFile(cordovaPluginConfFilePath));
325
325
  cordovaPluginConfXml.plugin.$.version = newVersion;
326
326
 
327
- FsUtil.writeFile(cordovaPluginConfFilePath, new xml2js.Builder().buildObject(cordovaPluginConfXml));
327
+ FsUtils.writeFile(cordovaPluginConfFilePath, new xml2js.Builder().buildObject(cordovaPluginConfXml));
328
328
  }
329
329
  });
330
330
  }
331
331
 
332
- static #logging(buildResults: ISdBuildMessage[], logger: Logger): void {
332
+ static #logging(buildResults: ISdBuildMessage[], logger: SdLogger): void {
333
333
  const messageMap = buildResults.toSetMap(
334
334
  (item) => item.severity,
335
- (item) => SdCliConvertMessageUtil.getBuildMessageString(item),
335
+ (item) => SdCliConvertMessageUtils.getBuildMessageString(item),
336
336
  );
337
337
 
338
338
  if (messageMap.has("message")) {
package/src/index.ts CHANGED
@@ -1,31 +1,31 @@
1
- export * from "./entry/SdAiCommand";
2
- export * from "./entry/SdCliCordova";
3
- export * from "./entry/SdCliElectron";
4
- export * from "./entry/SdCliLocalUpdate";
5
- export * from "./entry/SdCliProject";
6
- export * from "./pkg-builders/client/createSdNgPlugin";
7
- export * from "./pkg-builders/client/SdClientBuildRunner";
8
- export * from "./pkg-builders/client/SdCliNgRoutesFileGenerator";
9
- export * from "./pkg-builders/client/SdNgBundler";
10
- export * from "./pkg-builders/client/SdNgBundlerContext";
11
- export * from "./pkg-builders/lib/SdCliIndexFileGenerator";
12
- export * from "./pkg-builders/lib/SdJsLibBuildRunner";
13
- export * from "./pkg-builders/lib/SdTsLibBuilder";
14
- export * from "./pkg-builders/lib/SdTsLibBuildRunner";
15
- export * from "./pkg-builders/SdMultiBuildRunner";
16
- export * from "./pkg-builders/server/createSdServerPlugin";
17
- export * from "./pkg-builders/server/SdServerBuildRunner";
18
- export * from "./pkg-builders/server/SdServerBundler";
1
+ export * from "./entry/sd-cli-ai-command";
2
+ export * from "./entry/sd-cli-cordova";
3
+ export * from "./entry/sd-cli-electron";
4
+ export * from "./entry/sd-cli-local-update";
5
+ export * from "./entry/sd-cli-project";
6
+ export * from "./pkg-builders/client/sd-cli-ng-routes.file-generator";
7
+ export * from "./pkg-builders/client/sd-client.build-runner";
8
+ export * from "./pkg-builders/client/sd-ng.bundler-context";
9
+ export * from "./pkg-builders/client/sd-ng.bundler";
10
+ export * from "./pkg-builders/client/sd-ng.plugin-creator";
11
+ export * from "./pkg-builders/lib/sd-cli-index.file-generator";
12
+ export * from "./pkg-builders/lib/sd-js-lib.build-runner";
13
+ export * from "./pkg-builders/lib/sd-ts-lib.build-runner";
14
+ export * from "./pkg-builders/lib/sd-ts-lib.builder";
15
+ export * from "./pkg-builders/sd-multi.build-runner";
16
+ export * from "./pkg-builders/server/sd-server.build-runner";
17
+ export * from "./pkg-builders/server/sd-server.bundler";
18
+ export * from "./pkg-builders/server/sd-server.plugin-creator";
19
19
  import "./sd-cli";
20
- export * from "./ts-builder/SdTsCompiler";
21
- export * from "./types/build-plugin.type";
22
- export * from "./types/build-runner.type";
23
- export * from "./types/build.type";
24
- export * from "./types/common-configs.type";
25
- export * from "./types/sd-configs.type";
26
- export * from "./types/ts-compiler.type";
27
- export * from "./types/workers.type";
28
- export * from "./utils/SdCliConvertMessageUtil";
29
- export * from "./utils/SdCliPerformanceTime";
30
- import "./workers/build-runner-worker";
31
- import "./workers/server-worker";
20
+ export * from "./ts-compiler/sd-ts-compiler";
21
+ export * from "./types/build-plugin.types";
22
+ export * from "./types/build-runner.types";
23
+ export * from "./types/build.types";
24
+ export * from "./types/common-configs.types";
25
+ export * from "./types/config.types";
26
+ export * from "./types/ts-compiler.types";
27
+ export * from "./types/worker.types";
28
+ export * from "./utils/sd-cli-convert-message.utils";
29
+ export * from "./utils/sd-cli-performance-time";
30
+ import "./workers/build-runner.worker";
31
+ import "./workers/server.worker";
@@ -1,11 +1,11 @@
1
1
  import path from "path";
2
- import { FsUtil, PathUtil, SdFsWatcher } from "@simplysm/sd-core-node";
3
- import { StringUtil } from "@simplysm/sd-core-common";
2
+ import { FsUtils, PathUtils, SdFsWatcher } from "@simplysm/sd-core-node";
3
+ import { StringUtils } from "@simplysm/sd-core-common";
4
4
 
5
5
  export class SdCliNgRoutesFileGenerator {
6
6
  static watch(pkgPath: string, noLazyRoute?: boolean) {
7
7
  const routesFilePath = path.resolve(pkgPath, "src/routes.ts");
8
- let cache = FsUtil.exists(routesFilePath) ? FsUtil.readFile(routesFilePath) : undefined;
8
+ let cache = FsUtils.exists(routesFilePath) ? FsUtils.readFile(routesFilePath) : undefined;
9
9
 
10
10
  SdFsWatcher.watch([path.resolve(pkgPath, "src")]).onChange({ delay: 50 }, () => {
11
11
  cache = this.run(pkgPath, cache, noLazyRoute);
@@ -20,9 +20,9 @@ export class SdCliNgRoutesFileGenerator {
20
20
 
21
21
  // 내부 파일들 import
22
22
  const result: TInfo = new Map();
23
- const filePaths = FsUtil.glob(path.resolve(appDirPath, "**/*{P,.p}age.ts"));
23
+ const filePaths = FsUtils.glob(path.resolve(appDirPath, "**/*{P,.p}age.ts"));
24
24
  for (const filePath of filePaths.orderBy()) {
25
- const relModulePath = PathUtil.posix(path.relative(appDirPath, filePath)).slice(0, -3);
25
+ const relModulePath = PathUtils.posix(path.relative(appDirPath, filePath)).slice(0, -3);
26
26
  const codes = relModulePath
27
27
  .replace(/\.page$/, "")
28
28
  .replace(/Page$/, "")
@@ -35,7 +35,7 @@ export class SdCliNgRoutesFileGenerator {
35
35
  for (let i = 0; i < codes.length; i++) {
36
36
  if (i === codes.length - 2) continue; // 마지막 모음 폴더 무시.
37
37
  const code = codes[i];
38
- cursorItem = cursor.getOrCreate(StringUtil.toKebabCase(code), { children: new Map() });
38
+ cursorItem = cursor.getOrCreate(StringUtils.toKebabCase(code), { children: new Map() });
39
39
  cursor = cursorItem.children;
40
40
  }
41
41
 
@@ -52,14 +52,16 @@ export class SdCliNgRoutesFileGenerator {
52
52
  cont += indentStr + ` path: "${key}",\n`;
53
53
  if (val.relModulePath != null) {
54
54
  if (noLazyRoute) {
55
- cont += indentStr + ` component: ${StringUtil.toPascalCase(path.basename(val.relModulePath))},\n`;
56
- imports.push(`import { ${StringUtil.toPascalCase(path.basename(val.relModulePath))} } from "./app/${val.relModulePath}";`);
55
+ cont += indentStr
56
+ + ` component: ${StringUtils.toPascalCase(path.basename(val.relModulePath))},\n`;
57
+ imports.push(`import { ${StringUtils.toPascalCase(path.basename(val.relModulePath))} } from "./app/${val.relModulePath}";`);
57
58
  }
58
59
  else {
59
60
  cont +=
60
61
  indentStr +
61
- ` loadComponent: () => import("./app/${val.relModulePath}").then((m) => m.${StringUtil.toPascalCase(path.basename(
62
- val.relModulePath))}),\n`;
62
+ ` loadComponent: () => import("./app/${val.relModulePath}").then((m) => m.${StringUtils.toPascalCase(
63
+ path.basename(
64
+ val.relModulePath))}),\n`;
63
65
  }
64
66
  }
65
67
  if (val.children.size > 0) {
@@ -75,13 +77,13 @@ export class SdCliNgRoutesFileGenerator {
75
77
  const routes = fn(result, 2);
76
78
 
77
79
  const content = `
78
- import {Routes} from "@angular/router";
80
+ import type { Routes } from "@angular/router";
79
81
  ${imports.join("\n")}
80
82
  export const routes: Routes = [
81
83
  ${routes}
82
84
  ];`.trim();
83
85
  if (content !== cache) {
84
- FsUtil.writeFile(routesFilePath, content);
86
+ FsUtils.writeFile(routesFilePath, content);
85
87
  }
86
88
  return content;
87
89
  }