@uofx/cli 1.0.2 → 1.1.0

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 (240) hide show
  1. package/README.md +159 -3
  2. package/THIRD-PARTY-NOTICES.txt +84 -2
  3. package/dist/application/dtos/config/index.js +22 -0
  4. package/dist/application/dtos/config/request/index.js +19 -0
  5. package/dist/application/dtos/config/request/set-config.request.dto.js +3 -0
  6. package/dist/application/dtos/config/response/get-config.response.dto.js +8 -0
  7. package/dist/application/dtos/config/response/index.js +21 -0
  8. package/dist/application/dtos/dev/index.js +24 -0
  9. package/dist/application/dtos/dev/request/generate-component.request.dto.js +3 -0
  10. package/dist/application/dtos/dev/request/index.js +25 -0
  11. package/dist/application/dtos/dev/request/install-template.request.dto.js +3 -0
  12. package/dist/application/dtos/dev/request/new-project.request.dto.js +3 -0
  13. package/dist/application/dtos/dev/request/publish-plugin.request.dto.js +3 -0
  14. package/dist/application/dtos/dev/request/uninstall-template.request.dto.js +3 -0
  15. package/dist/application/dtos/dev/response/generate-component.response.dto.js +3 -0
  16. package/dist/application/dtos/dev/response/index.js +24 -0
  17. package/dist/application/dtos/dev/response/new-project.response.dto.js +3 -0
  18. package/dist/application/dtos/dev/response/publish-plugin.response.dto.js +3 -0
  19. package/dist/application/dtos/dev/response/template-info.response.dto.js +3 -0
  20. package/dist/application/dtos/env/index.js +24 -0
  21. package/dist/application/dtos/{request → env/request}/index.js +1 -3
  22. package/dist/application/dtos/env/request/list-running-instances.request.dto.js +3 -0
  23. package/dist/application/dtos/{response → env/response}/index.js +1 -1
  24. package/dist/application/dtos/env/response/list-running-instances.response.dto.js +3 -0
  25. package/dist/application/dtos/index.js +9 -2
  26. package/dist/application/dtos/logs/index.js +22 -0
  27. package/dist/application/dtos/logs/request/index.js +18 -0
  28. package/dist/application/dtos/logs/response/index.js +18 -0
  29. package/dist/application/index.js +1 -0
  30. package/dist/application/services/env/environment-validator.service.js +120 -0
  31. package/dist/application/services/env/index.js +11 -0
  32. package/dist/application/services/env/instance-cleanup.service.js +79 -0
  33. package/dist/application/services/index.js +21 -0
  34. package/dist/application/use-cases/config/get-all-config.use-case.js +54 -0
  35. package/dist/application/use-cases/config/get-config.use-case.js +7 -17
  36. package/dist/application/use-cases/config/index.js +23 -0
  37. package/dist/application/use-cases/config/set-config.use-case.js +49 -3
  38. package/dist/application/use-cases/dev/generate-component.use-case.js +138 -0
  39. package/dist/application/use-cases/dev/index.js +28 -0
  40. package/dist/application/use-cases/dev/install-template.use-case.js +60 -0
  41. package/dist/application/use-cases/dev/list-templates.use-case.js +45 -0
  42. package/dist/application/use-cases/dev/new-project.use-case.js +130 -0
  43. package/dist/application/use-cases/dev/publish-plugin.use-case.js +243 -0
  44. package/dist/application/use-cases/dev/uninstall-template.use-case.js +50 -0
  45. package/dist/application/use-cases/{instance → env}/delete-instance.use-case.js +2 -2
  46. package/dist/application/use-cases/{credentials → env}/get-credentials.use-case.js +1 -1
  47. package/dist/application/use-cases/{instance → env}/index.js +11 -0
  48. package/dist/application/use-cases/{instance → env}/install-instance.use-case.js +25 -136
  49. package/dist/application/use-cases/env/list-running-instances.use-case.js +47 -0
  50. package/dist/application/use-cases/{setup → env}/setup-environment.use-case.js +35 -4
  51. package/dist/application/use-cases/{instance → env}/start-instance.use-case.js +53 -41
  52. package/dist/application/use-cases/index.js +9 -6
  53. package/dist/application/use-cases/logs/index.js +21 -0
  54. package/dist/cli.js +175 -26
  55. package/dist/constants/defaults.js +8 -1
  56. package/dist/constants/oci-artifacts.js +4 -0
  57. package/dist/constants/paths.js +0 -4
  58. package/dist/constants/timeouts.js +5 -0
  59. package/dist/di/modules/application.module.js +13 -44
  60. package/dist/di/modules/config.module.js +19 -0
  61. package/dist/di/modules/dev.module.js +45 -0
  62. package/dist/di/modules/env.module.js +42 -0
  63. package/dist/di/modules/index.js +30 -0
  64. package/dist/di/modules/infrastructure.module.js +65 -82
  65. package/dist/di/modules/logs.module.js +15 -0
  66. package/dist/di/modules/presentation.module.js +18 -7
  67. package/dist/di/tokens.js +42 -30
  68. package/dist/domain/entities/credentials-resolver.entity.js +4 -1
  69. package/dist/domain/entities/credentials.entity.js +2 -5
  70. package/dist/domain/entities/delete-instance-validation.entity.js +4 -1
  71. package/dist/domain/entities/deployment-parameters.entity.js +11 -8
  72. package/dist/domain/entities/index.js +5 -1
  73. package/dist/domain/entities/instance-list-aggregator.entity.js +2 -2
  74. package/dist/domain/entities/instance-metadata.entity.js +2 -3
  75. package/dist/domain/entities/instance.entity.js +2 -1
  76. package/dist/domain/entities/log-filter.entity.js +6 -6
  77. package/dist/domain/entities/template-info.entity.js +63 -0
  78. package/dist/{infrastructure/utils/error-formatter.util.js → domain/errors/error-utils.js} +1 -1
  79. package/dist/domain/errors/index.js +19 -0
  80. package/dist/domain/index.js +6 -0
  81. package/dist/domain/interfaces/index.js +21 -0
  82. package/dist/domain/ports/dotnet-publisher.port.js +9 -0
  83. package/dist/{infrastructure/http/interfaces/http-client.interface.js → domain/ports/file-system.port.js} +1 -1
  84. package/dist/domain/ports/http-client.port.js +3 -0
  85. package/dist/domain/ports/index.js +10 -0
  86. package/dist/domain/ports/logger.port.js +3 -3
  87. package/dist/domain/ports/progress.port.js +10 -0
  88. package/dist/domain/ports/project-scaffolder.port.js +9 -0
  89. package/dist/domain/ports/schematics-runner.port.js +9 -0
  90. package/dist/domain/ports/template-manager.port.js +9 -0
  91. package/dist/domain/ports/wsl-setup.port.js +3 -0
  92. package/dist/domain/types/index.js +1 -0
  93. package/dist/domain/value-objects/acr-credentials.value-object.js +13 -1
  94. package/dist/domain/value-objects/chart-version.value-object.js +20 -3
  95. package/dist/domain/value-objects/config-log-level.value-object.js +2 -1
  96. package/dist/domain/value-objects/index.js +3 -1
  97. package/dist/domain/value-objects/instance-name.value-object.js +6 -3
  98. package/dist/domain/value-objects/jwt-key.value-object.js +27 -5
  99. package/dist/domain/value-objects/mssql-password.value-object.js +27 -5
  100. package/dist/domain/value-objects/output-path.value-object.js +85 -0
  101. package/dist/domain/value-objects/rsa-key-pair.value-object.js +29 -3
  102. package/dist/index.js +6 -1
  103. package/dist/infrastructure/config/{app-config.service.js → app-config.adapter.js} +29 -17
  104. package/dist/infrastructure/config/{config-validator.js → config-validator.util.js} +1 -1
  105. package/dist/infrastructure/config/index.js +14 -0
  106. package/dist/infrastructure/config/interfaces/index.js +3 -0
  107. package/dist/infrastructure/config/{crypto.service.js → services/crypto.service.js} +4 -1
  108. package/dist/infrastructure/config/services/index.js +9 -0
  109. package/dist/infrastructure/deployment/deployment.adapter.js +5 -5
  110. package/dist/infrastructure/deployment/index.js +9 -0
  111. package/dist/infrastructure/deployment/interfaces/index.js +3 -0
  112. package/dist/infrastructure/deployment/services/acr-credential-manager.service.js +18 -7
  113. package/dist/infrastructure/deployment/services/app-manager.service.js +3 -3
  114. package/dist/infrastructure/deployment/services/base-helm-deployment.service.js +13 -5
  115. package/dist/infrastructure/deployment/services/helm-registry.service.js +10 -3
  116. package/dist/infrastructure/deployment/services/index.js +35 -0
  117. package/dist/infrastructure/deployment/services/infra-manager.service.js +19 -15
  118. package/dist/infrastructure/deployment/services/k8s-job-runner.service.js +24 -6
  119. package/dist/infrastructure/deployment/services/mssql-database-init.service.js +75 -11
  120. package/dist/infrastructure/deployment/services/mssql-helm-deployment.service.js +17 -5
  121. package/dist/infrastructure/deployment/services/mssql-storage.service.js +5 -1
  122. package/dist/infrastructure/deployment/services/mssql-user-manager.service.js +7 -3
  123. package/dist/infrastructure/deployment/services/oci-artifact.service.js +8 -3
  124. package/dist/infrastructure/deployment/services/secret-manager.service.js +14 -5
  125. package/dist/infrastructure/deployment/services/service-manager.service.js +1 -1
  126. package/dist/infrastructure/deployment/services/version-compatibility.service.js +9 -5
  127. package/dist/infrastructure/dotnet/dotnet-publisher.adapter.js +143 -0
  128. package/dist/infrastructure/dotnet/index.js +9 -0
  129. package/dist/infrastructure/environment/index.js +11 -0
  130. package/dist/infrastructure/environment/interfaces/index.js +3 -0
  131. package/dist/infrastructure/{platform-detector.js → environment/platform-detector.util.js} +1 -1
  132. package/dist/infrastructure/environment/services/hardware-info.service.js +8 -8
  133. package/dist/infrastructure/environment/services/index.js +11 -0
  134. package/dist/infrastructure/errors/{error-handler.js → error-handler.adapter.js} +17 -17
  135. package/dist/infrastructure/errors/index.js +5 -21
  136. package/dist/infrastructure/execution/builders/base-command.builder.js +32 -11
  137. package/dist/infrastructure/execution/builders/index.js +26 -0
  138. package/dist/infrastructure/execution/builders/wsl-command.builder.js +39 -1
  139. package/dist/infrastructure/execution/command-builder.util.js +94 -0
  140. package/dist/infrastructure/execution/environments/index.js +23 -0
  141. package/dist/infrastructure/execution/environments/wsl-execution.environment.js +22 -7
  142. package/dist/infrastructure/execution/index.js +1 -2
  143. package/dist/infrastructure/execution/services/command-executor.service.js +389 -0
  144. package/dist/infrastructure/execution/services/index.js +8 -0
  145. package/dist/infrastructure/execution/{script-executor.service.js → services/script-executor.service.js} +12 -15
  146. package/dist/infrastructure/filesystem/filesystem.adapter.js +86 -0
  147. package/dist/infrastructure/filesystem/index.js +23 -0
  148. package/dist/infrastructure/http/{http-client.service.js → http-client.adapter.js} +20 -13
  149. package/dist/infrastructure/http/index.js +1 -1
  150. package/dist/infrastructure/interceptors/decorators/index.js +23 -0
  151. package/dist/infrastructure/interceptors/index.js +2 -2
  152. package/dist/infrastructure/interceptors/interceptor.factory.js +3 -3
  153. package/dist/infrastructure/interceptors/interfaces/index.js +3 -0
  154. package/dist/infrastructure/interceptors/services/index.js +6 -0
  155. package/dist/infrastructure/interceptors/{logging.interceptor.js → services/logging-interceptor.service.js} +4 -4
  156. package/dist/infrastructure/logger/services/file-log-reader.repository.js +1 -1
  157. package/dist/infrastructure/logger/services/file-log-writer.repository.js +1 -1
  158. package/dist/infrastructure/persistence/instance-metadata.adapter.js +2 -1
  159. package/dist/infrastructure/persistence/services/file-system-config.repository.js +10 -4
  160. package/dist/infrastructure/persistence/services/file-system-instance.repository.js +2 -2
  161. package/dist/infrastructure/platforms/index.js +18 -0
  162. package/dist/infrastructure/platforms/windows/index.js +13 -0
  163. package/dist/infrastructure/platforms/windows/interfaces/index.js +3 -0
  164. package/dist/infrastructure/platforms/windows/parsers/index.js +9 -0
  165. package/dist/infrastructure/platforms/windows/services/index.js +33 -0
  166. package/dist/infrastructure/platforms/windows/services/microk8s.service.js +28 -10
  167. package/dist/infrastructure/platforms/windows/services/rootfs-manager.service.js +7 -3
  168. package/dist/infrastructure/platforms/windows/services/windows-features.service.js +22 -8
  169. package/dist/infrastructure/platforms/windows/services/windows-info.service.js +10 -6
  170. package/dist/infrastructure/platforms/windows/services/wsl-config.service.js +15 -6
  171. package/dist/infrastructure/platforms/windows/services/wsl-info.service.js +12 -12
  172. package/dist/infrastructure/platforms/windows/services/wsl-instance-inspection.service.js +3 -3
  173. package/dist/infrastructure/platforms/windows/services/wsl-instance-lifecycle.service.js +76 -22
  174. package/dist/infrastructure/platforms/windows/services/wsl-updater.service.js +20 -15
  175. package/dist/infrastructure/platforms/windows/services/wslconfig-parser.service.js +3 -3
  176. package/dist/infrastructure/platforms/windows/wsl-instance-manager.adapter.js +8 -3
  177. package/dist/infrastructure/platforms/windows/wsl-setup.adapter.js +100 -0
  178. package/dist/infrastructure/schematics/index.js +11 -0
  179. package/dist/infrastructure/schematics/project-scaffolder.adapter.js +314 -0
  180. package/dist/infrastructure/schematics/schematics-runner.adapter.js +175 -0
  181. package/dist/infrastructure/template/index.js +25 -0
  182. package/dist/infrastructure/template/interfaces/index.js +22 -0
  183. package/dist/infrastructure/template/interfaces/template-downloader.interface.js +6 -0
  184. package/dist/infrastructure/template/interfaces/template-registry.interface.js +6 -0
  185. package/dist/infrastructure/template/services/index.js +24 -0
  186. package/dist/infrastructure/template/services/template-downloader.service.js +319 -0
  187. package/dist/infrastructure/template/services/template-registry.service.js +175 -0
  188. package/dist/infrastructure/template/template-manager.adapter.js +196 -0
  189. package/dist/infrastructure/utils/index.js +23 -0
  190. package/dist/infrastructure/utils/input-validator.util.js +7 -6
  191. package/dist/presentation/controllers/base.controller.js +36 -0
  192. package/dist/presentation/controllers/{config.controller.js → config/config.controller.js} +17 -62
  193. package/dist/presentation/controllers/config/index.js +21 -0
  194. package/dist/presentation/controllers/dev/dev.controller.js +202 -0
  195. package/dist/presentation/controllers/dev/index.js +23 -0
  196. package/dist/presentation/controllers/dev/template.controller.js +158 -0
  197. package/dist/presentation/controllers/{credentials.controller.js → env/credentials.controller.js} +8 -14
  198. package/dist/presentation/controllers/env/index.js +23 -0
  199. package/dist/presentation/controllers/{instance.controller.js → env/instance.controller.js} +35 -92
  200. package/dist/presentation/controllers/{setup.controller.js → env/setup.controller.js} +33 -66
  201. package/dist/presentation/controllers/index.js +9 -5
  202. package/dist/presentation/controllers/logs/index.js +21 -0
  203. package/dist/presentation/controllers/{logs.controller.js → logs/logs.controller.js} +8 -14
  204. package/dist/presentation/interfaces/index.js +21 -0
  205. package/dist/presentation/prompts/acr-credentials.prompt.js +37 -9
  206. package/dist/presentation/ui/constants/index.js +23 -0
  207. package/dist/presentation/ui/interaction.service.js +4 -4
  208. package/dist/presentation/ui/interfaces/cli-progress.interface.js +0 -6
  209. package/dist/presentation/ui/interfaces/index.js +6 -0
  210. package/package.json +6 -1
  211. package/dist/application/dtos/request/set-config.request.dto.js +0 -16
  212. package/dist/infrastructure/errors/error-handler.interface.js +0 -3
  213. package/dist/infrastructure/execution/command-builder.js +0 -252
  214. package/dist/infrastructure/execution/command-executor.service.js +0 -230
  215. /package/dist/application/dtos/{request → config/request}/get-config.request.dto.js +0 -0
  216. /package/dist/application/dtos/{request → env/request}/delete-instance.request.dto.js +0 -0
  217. /package/dist/application/dtos/{request → env/request}/get-credentials.request.dto.js +0 -0
  218. /package/dist/application/dtos/{request → env/request}/install-instance.request.dto.js +0 -0
  219. /package/dist/application/dtos/{request → env/request}/list-charts.request.dto.js +0 -0
  220. /package/dist/application/dtos/{request → env/request}/setup-environment.request.dto.js +0 -0
  221. /package/dist/application/dtos/{request → env/request}/start-instance.request.dto.js +0 -0
  222. /package/dist/application/dtos/{request → env/request}/stop-instance.request.dto.js +0 -0
  223. /package/dist/application/dtos/{response → env/response}/credentials.response.dto.js +0 -0
  224. /package/dist/application/dtos/{response → env/response}/delete-instance.response.dto.js +0 -0
  225. /package/dist/application/dtos/{response → env/response}/install-instance.response.dto.js +0 -0
  226. /package/dist/application/dtos/{response → env/response}/instance-list.response.dto.js +0 -0
  227. /package/dist/application/dtos/{response → env/response}/instance-status.response.dto.js +0 -0
  228. /package/dist/application/dtos/{response → env/response}/setup-result.response.dto.js +0 -0
  229. /package/dist/application/dtos/{response → env/response}/start-instance.response.dto.js +0 -0
  230. /package/dist/application/dtos/{response → env/response}/stop-instance.response.dto.js +0 -0
  231. /package/dist/application/dtos/{request → logs/request}/show-logs.request.dto.js +0 -0
  232. /package/dist/application/dtos/{response → logs/response}/show-logs.response.dto.js +0 -0
  233. /package/dist/application/use-cases/{instance → env}/list-charts.use-case.js +0 -0
  234. /package/dist/application/use-cases/{instance → env}/list-instances.use-case.js +0 -0
  235. /package/dist/application/use-cases/{instance → env}/stop-instance.use-case.js +0 -0
  236. /package/dist/{infrastructure → domain}/errors/app-error.js +0 -0
  237. /package/dist/{infrastructure → domain}/errors/exit-codes.js +0 -0
  238. /package/dist/infrastructure/config/{app-config.interface.js → interfaces/app-config.interface.js} +0 -0
  239. /package/dist/{domain → infrastructure/interceptors}/decorators/sensitive.decorator.js +0 -0
  240. /package/dist/infrastructure/interceptors/{interceptor.interface.js → interfaces/interceptor.interface.js} +0 -0
package/dist/cli.js CHANGED
@@ -42,10 +42,11 @@ exports.run = run;
42
42
  const commander_1 = require("commander");
43
43
  const path = __importStar(require("path"));
44
44
  const fs = __importStar(require("fs"));
45
- const di_1 = require("./di");
45
+ const index_1 = require("./di/index");
46
46
  const tokens_1 = require("./di/tokens");
47
47
  const output_builder_service_1 = require("./presentation/ui/output-builder.service");
48
48
  const log_level_enum_1 = require("./presentation/ui/log-level.enum");
49
+ const errors_1 = require("./domain/errors");
49
50
  const logger_types_1 = require("./domain/types/logger.types");
50
51
  // 載入 package.json 以獲取版本資訊
51
52
  const packageJsonPath = path.join(__dirname, '..', 'package.json');
@@ -53,16 +54,18 @@ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
53
54
  function createProgram() {
54
55
  // 設定全域錯誤處理器以處理未被捕獲的錯誤
55
56
  // 注意:必須在 DI 容器完全初始化後才能解析
56
- di_1.container.resolve(tokens_1.TOKENS.IErrorHandlerPort).setupGlobalHandlers();
57
+ index_1.container.resolve(tokens_1.TOKENS.IErrorHandlerPort).setupGlobalHandlers();
57
58
  // 確保 CLI 啟動時使用者設定目錄存在
58
- di_1.container.resolve(tokens_1.TOKENS.IAppConfigPort).ensureUserConfigDir();
59
+ index_1.container.resolve(tokens_1.TOKENS.IAppConfigPort).ensureUserConfigDir();
59
60
  const program = new commander_1.Command();
60
61
  // 從 DI 容器獲取 Controllers
61
- const instanceController = di_1.container.resolve(tokens_1.TOKENS.InstanceController);
62
- const setupController = di_1.container.resolve(tokens_1.TOKENS.SetupController);
63
- const configController = di_1.container.resolve(tokens_1.TOKENS.ConfigController);
64
- const logsController = di_1.container.resolve(tokens_1.TOKENS.LogsController);
65
- const credentialsController = di_1.container.resolve(tokens_1.TOKENS.CredentialsController);
62
+ const instanceController = index_1.container.resolve(tokens_1.TOKENS.InstanceController);
63
+ const setupController = index_1.container.resolve(tokens_1.TOKENS.SetupController);
64
+ const configController = index_1.container.resolve(tokens_1.TOKENS.ConfigController);
65
+ const logsController = index_1.container.resolve(tokens_1.TOKENS.LogsController);
66
+ const credentialsController = index_1.container.resolve(tokens_1.TOKENS.CredentialsController);
67
+ const templateController = index_1.container.resolve(tokens_1.TOKENS.TemplateController);
68
+ const devController = index_1.container.resolve(tokens_1.TOKENS.DevController);
66
69
  program
67
70
  .name('uofx')
68
71
  .description('CLI tool for installing and managing the UOFX development environment on WSL2')
@@ -70,10 +73,10 @@ function createProgram() {
70
73
  .helpCommand(false);
71
74
  // 在指令執行前配置 OutputBuilder 和 AppLogger 的 Hook
72
75
  program.hook('preAction', (thisCommand) => {
73
- const outputBuilder = di_1.container.resolve(output_builder_service_1.OutputBuilder);
74
- const appConfig = di_1.container.resolve(tokens_1.TOKENS.IAppConfigPort);
75
- const appLogger = di_1.container.resolve(tokens_1.TOKENS.ILoggerPort);
76
- const correlationIdService = di_1.container.resolve(tokens_1.TOKENS.ICorrelationIdPort);
76
+ const outputBuilder = index_1.container.resolve(output_builder_service_1.OutputBuilder);
77
+ const appConfig = index_1.container.resolve(tokens_1.TOKENS.IAppConfigPort);
78
+ const appLogger = index_1.container.resolve(tokens_1.TOKENS.ILoggerPort);
79
+ const correlationIdService = index_1.container.resolve(tokens_1.TOKENS.ICorrelationIdPort);
77
80
  // 只在第一次執行 (根命令) 時設定日誌等級
78
81
  if (thisCommand.name() === 'uofx') {
79
82
  // 從設定檔載入日誌等級
@@ -138,9 +141,8 @@ function createProgram() {
138
141
  configCommand
139
142
  .command('list')
140
143
  .description('List all configuration values')
141
- .option('--format <format>', 'Output format: json or table', 'table')
142
- .action(async (options) => {
143
- await configController.list(options.format);
144
+ .action(async () => {
145
+ await configController.list();
144
146
  });
145
147
  // config set
146
148
  configCommand
@@ -171,14 +173,16 @@ function createProgram() {
171
173
  // env install
172
174
  envCommand
173
175
  .command('install')
176
+ .alias('i')
174
177
  .description('Install and deploy all services')
175
178
  .option('--name <name>', 'Instance name to install', 'dev')
176
179
  .option('--chart-version <version>', 'Helm chart version')
180
+ .option('--no-northwind', 'Skip Northwind sample database installation')
177
181
  // .option('--pull-secret <file>', 'ACR pull secret file path')
178
182
  .action(async (options) => {
179
183
  await instanceController.install(options);
180
184
  });
181
- // env list - 統一的查詢入口
185
+ // env list - 統一查詢入口(依 type 分發至不同 controller)
182
186
  envCommand
183
187
  .command('list [type]')
184
188
  .description('Display information about instances, credentials, or compatibility')
@@ -200,8 +204,9 @@ Examples:
200
204
  .action(async (type = 'instances', options) => {
201
205
  if (type === 'credentials') {
202
206
  if (!options.name) {
203
- console.error('Error: --name is required for credentials type');
204
- process.exit(1);
207
+ throw new errors_1.AppError('--name is required for credentials type', {
208
+ exitCode: errors_1.EXIT_CODES.VALIDATION_ERROR,
209
+ });
205
210
  }
206
211
  await credentialsController.get(options.name, options.reveal || false);
207
212
  }
@@ -266,21 +271,165 @@ Examples:
266
271
  };
267
272
  await logsController.show(parsedOptions);
268
273
  });
274
+ // ============================================================================
275
+ // DEV 指令群組 - 開發工具
276
+ // ============================================================================
277
+ const devCommand = program
278
+ .command('dev')
279
+ .description('Development tools for UOFX plugin development');
280
+ // dev template - 樣板管理
281
+ const templateCommand = devCommand
282
+ .command('template')
283
+ .alias('t')
284
+ .description('Manage UOFX plugin templates');
285
+ // dev template install
286
+ templateCommand
287
+ .command('install')
288
+ .alias('i')
289
+ .description('Install a template from GitHub Release or URL')
290
+ .option('--url <url>', 'Custom template URL (ZIP file)')
291
+ .option('--name <name>', 'Custom template name')
292
+ .option('--no-sample', 'Install template without sample code (uses UOFX-Plugin-Base)')
293
+ .addHelpText('after', `
294
+ Examples:
295
+ $ uofx dev template install
296
+ $ uofx dev template install --no-sample
297
+ $ uofx dev template install --url https://example.com/template.zip --name my-template
298
+ `)
299
+ .action(async (options) => {
300
+ await templateController.install(options);
301
+ });
302
+ // dev template list
303
+ templateCommand
304
+ .command('list')
305
+ .description('List installed templates')
306
+ .action(async () => {
307
+ await templateController.list();
308
+ });
309
+ // dev template delete
310
+ templateCommand
311
+ .command('delete')
312
+ .description('Delete a template')
313
+ .requiredOption('--name <name>', 'Template name to delete')
314
+ .action(async (options) => {
315
+ await templateController.uninstall(options.name);
316
+ });
317
+ // dev project - 專案管理
318
+ const projectCommand = devCommand
319
+ .command('project')
320
+ .alias('p')
321
+ .description('Manage plugin projects');
322
+ // dev project generate (別名 g)
323
+ projectCommand
324
+ .command('generate')
325
+ .alias('g')
326
+ .description('Create a new plugin project from an installed template')
327
+ .requiredOption('--template <template>', 'Specify which installed template to use (e.g. v2025R4.123.2)')
328
+ .option('--output <path>', 'Target directory for the project. Defaults to the current directory.')
329
+ .option('--skip-install', 'Skip running npm install after project creation. Useful for offline environments or when you want to install dependencies manually.')
330
+ .option('-f, --force', 'Skip non-empty directory check')
331
+ .addHelpText('after', `
332
+ Examples:
333
+ $ uofx dev project generate --template v2025R4.123.2
334
+ $ uofx dev project g --template v2025R4.123.2 --output ./dest
335
+ $ uofx dev project g --template v2025R4.123.2 --skip-install
336
+ $ uofx dev project g --template v2025R4.123.2 --force
337
+ `)
338
+ .action(async (options) => {
339
+ await devController.newProject(options);
340
+ });
341
+ // dev component - 元件管理
342
+ const componentCommand = devCommand
343
+ .command('component')
344
+ .alias('c')
345
+ .description('Generate plugin components');
346
+ // dev component generate (別名 g)
347
+ componentCommand
348
+ .command('generate')
349
+ .alias('g')
350
+ .description('Generate a plugin component using @uofx/plugin-schematics')
351
+ .requiredOption('--type <type>', 'Component type (field, mobile-field, admin-panel, user-panel, mobile-panel, admin-page, user-page, mobile-page)')
352
+ .requiredOption('--name <name>', 'Component name')
353
+ .option('--code <code>', 'Component code in camelCase (default: camelCase of <name>)')
354
+ .option('--display-name <name>', 'Display name shown in the UI (default: PascalCase of <name>)')
355
+ .option('-f, --force', 'Skip dry-run preview and confirmation prompt')
356
+ .addOption(new commander_1.Option('--group <group>', 'Field group code (default: "group1")').hideHelp())
357
+ .addOption(new commander_1.Option('--no-design', 'Skip design sub-component (field only)').hideHelp())
358
+ .addOption(new commander_1.Option('--no-print', 'Skip print sub-component (field only)').hideHelp())
359
+ .addOption(new commander_1.Option('--no-view', 'Skip view sub-component (field only)').hideHelp())
360
+ .addOption(new commander_1.Option('--layout <layout>', 'Page layout type (default: "basic")').hideHelp())
361
+ .addOption(new commander_1.Option('--func-id <id>', 'Authorization function ID for page types').hideHelp())
362
+ .addHelpText('after', `
363
+ Component types:
364
+ field Custom form field
365
+ mobile-field Mobile form field
366
+ admin-panel Admin-side panel component
367
+ user-panel User-side panel component
368
+ mobile-panel Mobile panel component
369
+ admin-page Admin-side page
370
+ user-page User-side page
371
+ mobile-page Mobile page
372
+
373
+ Field options:
374
+ --group <group> Field group code (default: "group1")
375
+ --no-design Skip design sub-component
376
+ --no-print Skip print sub-component
377
+ --no-view Skip view sub-component
378
+
379
+ Page options:
380
+ --layout <layout> Page layout type (default: "basic")
381
+ admin-page: basic, container, sider, tab
382
+ user-page: basic, full, tab
383
+ mobile-page: basic, tab
384
+ --func-id <id> Authorization function ID
385
+
386
+ Examples:
387
+ $ uofx dev component generate --type field --name hello-world
388
+ $ uofx dev component g --type mobile-field --name customer-info
389
+ $ uofx dev component g --type field --name hello-world --no-print
390
+ $ uofx dev component g --type admin-panel --name dashboard --display-name="Dashboard Panel"
391
+ $ uofx dev component g --type admin-page --name settings --layout container
392
+ $ uofx dev component g --type user-page --name profile --layout full
393
+ $ uofx dev component g --type mobile-page --name home --layout tab
394
+ `)
395
+ .action(async (options) => {
396
+ await devController.generate(options.type, options.name, options);
397
+ });
398
+ // dev project publish
399
+ projectCommand
400
+ .command('publish')
401
+ .alias('p')
402
+ .description('Publish a plugin project (version update + dotnet publish + organize output)')
403
+ .requiredOption('--service-version <version>', 'Plugin version number (e.g. 1.0)')
404
+ .requiredOption('--min-uofx-version <version>', 'Minimum UOFX version (e.g. 2.89.0)')
405
+ .requiredOption('--service-name <name>', 'Service name (e.g. Ede.Sample)')
406
+ .option('--output <path>', 'Output directory (defaults to ../wwwroot)')
407
+ .option('-f, --force', 'Skip confirmation prompts and overwrite existing output directories and version entries')
408
+ .addHelpText('after', `
409
+ Examples:
410
+ $ uofx dev project publish --service-version=1.0 --min-uofx-version=2.89.0 --service-name=Ede.Sample
411
+ $ uofx dev project publish --service-version=1.1 --min-uofx-version=2.89.0 --service-name=Ede.Sample --output=./publish
412
+ $ uofx dev project publish --service-version=1.0 --min-uofx-version=2.89.0 --service-name=Ede.Sample --force
413
+ `)
414
+ .action(async (options) => {
415
+ await devController.publish(options);
416
+ });
269
417
  // 處理未知指令
270
418
  program.on('command:*', (operands) => {
271
419
  const unknownCommand = operands[0];
272
- console.error(`\n✗ Error: Unknown command '${unknownCommand}'`);
273
- console.log('\nAvailable command groups:');
274
- console.log(' env Manage UOFX development environments');
275
- console.log(' config Manage CLI configuration');
276
- console.log(' logs View and filter logs');
277
- console.log('\nUse "uofx --help" for more information.\n');
420
+ process.stderr.write(`\n✗ Error: Unknown command '${unknownCommand}'\n`);
421
+ process.stdout.write('\nAvailable command groups:\n');
422
+ process.stdout.write(' env Manage UOFX development environments\n');
423
+ process.stdout.write(' config Manage CLI configuration\n');
424
+ process.stdout.write(' logs View and filter logs\n');
425
+ process.stdout.write(' dev Development tools for UOFX plugin development\n');
426
+ process.stdout.write('\nUse "uofx --help" for more information.\n\n');
278
427
  process.exit(1);
279
428
  });
280
429
  return program;
281
430
  }
282
- function run(argv) {
431
+ async function run(argv) {
283
432
  const program = createProgram();
284
- program.parse(argv);
433
+ await program.parseAsync(argv);
285
434
  }
286
435
  //# sourceMappingURL=cli.js.map
@@ -5,7 +5,7 @@
5
5
  * 定義專案中所有預設設定值
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.HELM_DEFAULTS = exports.SYSTEM_REQUIREMENTS = exports.FILE_SIZE = exports.LOG_DEFAULTS = exports.K8S_DEFAULTS = exports.INSTANCE_DEFAULTS = void 0;
8
+ exports.PROJECT_DEFAULTS = exports.HELM_DEFAULTS = exports.SYSTEM_REQUIREMENTS = exports.FILE_SIZE = exports.LOG_DEFAULTS = exports.K8S_DEFAULTS = exports.INSTANCE_DEFAULTS = void 0;
9
9
  /**
10
10
  * WSL 實例相關預設值
11
11
  */
@@ -86,4 +86,11 @@ exports.HELM_DEFAULTS = {
86
86
  /** 預設 Release 名稱前綴 */
87
87
  RELEASE_PREFIX: 'uofx',
88
88
  };
89
+ /**
90
+ * 專案相關預設值
91
+ */
92
+ exports.PROJECT_DEFAULTS = {
93
+ /** 前端應用程式目錄名稱 */
94
+ CLIENT_APP_DIR: 'ClientApp',
95
+ };
89
96
  //# sourceMappingURL=defaults.js.map
@@ -14,6 +14,8 @@ exports.OCI_ARTIFACTS = {
14
14
  CHART_COMPATIBILITY: 'uofx-cli/chart-compatibility',
15
15
  /** ubuntu-environment (environment.sh) 的 repository */
16
16
  UBUNTU_ENVIRONMENT: 'uofx-cli/ubuntu-environment',
17
+ /** Northwind 範例資料庫 SQL 腳本的 repository */
18
+ NORTHWIND_SQL: 'uofx-cli/northwind-sql',
17
19
  };
18
20
  /**
19
21
  * OCI Artifact 預設 Tag
@@ -21,5 +23,7 @@ exports.OCI_ARTIFACTS = {
21
23
  exports.OCI_ARTIFACT_TAGS = {
22
24
  /** chart-compatibility 固定用 latest */
23
25
  CHART_COMPATIBILITY: 'latest',
26
+ /** Northwind SQL 腳本固定用 latest */
27
+ NORTHWIND_SQL: 'latest',
24
28
  };
25
29
  //# sourceMappingURL=oci-artifacts.js.map
@@ -31,10 +31,6 @@ exports.LINUX_PATHS = {
31
31
  MICROK8S_CONFIG: '/var/snap/microk8s/current/credentials/client.config',
32
32
  /** MicroK8s 可執行檔 */
33
33
  MICROK8S_BIN: '/snap/bin/microk8s',
34
- /** MicroK8s Helm3 命令 */
35
- MICROK8S_HELM: '/snap/bin/microk8s helm3',
36
- /** MicroK8s kubectl 命令 */
37
- KUBECTL_BIN: '/snap/bin/microk8s kubectl',
38
34
  /** SQL Server 命令列工具 (MSSQL Tools 18) */
39
35
  SQLCMD_BIN: '/opt/mssql-tools18/bin/sqlcmd',
40
36
  /** MSSQL 資料目錄基礎路徑 */
@@ -52,6 +52,11 @@ exports.TIMEOUTS = {
52
52
  // ============================================================================
53
53
  // 指令執行相關
54
54
  // ============================================================================
55
+ /** Windows Defender 即時掃描等待時間 (5 秒) */
56
+ WINDOWS_DEFENDER_SCAN_WAIT: 5000,
57
+ // ============================================================================
58
+ // 指令執行相關
59
+ // ============================================================================
55
60
  /** 一般指令執行超時 (60 秒) */
56
61
  COMMAND_EXECUTION: 60000,
57
62
  /** 腳本執行超時 (30 分鐘) - 用於系統初始化等長時間操作 */
@@ -1,54 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.registerApplicationModule = registerApplicationModule;
4
- const tsyringe_1 = require("tsyringe");
5
- const tokens_1 = require("../tokens");
6
- // Instance Use Cases
7
- const install_instance_use_case_1 = require("../../application/use-cases/instance/install-instance.use-case");
8
- const start_instance_use_case_1 = require("../../application/use-cases/instance/start-instance.use-case");
9
- const stop_instance_use_case_1 = require("../../application/use-cases/instance/stop-instance.use-case");
10
- const delete_instance_use_case_1 = require("../../application/use-cases/instance/delete-instance.use-case");
11
- const list_instances_use_case_1 = require("../../application/use-cases/instance/list-instances.use-case");
12
- const list_charts_use_case_1 = require("../../application/use-cases/instance/list-charts.use-case");
13
- // Setup Use Cases
14
- const setup_environment_use_case_1 = require("../../application/use-cases/setup/setup-environment.use-case");
15
- // Config Use Cases
16
- const get_config_use_case_1 = require("../../application/use-cases/config/get-config.use-case");
17
- const set_config_use_case_1 = require("../../application/use-cases/config/set-config.use-case");
18
- // Credentials Use Cases
19
- const get_credentials_use_case_1 = require("../../application/use-cases/credentials/get-credentials.use-case");
20
- // Logs Use Cases
21
- const show_logs_use_case_1 = require("../../application/use-cases/logs/show-logs.use-case");
4
+ const env_module_1 = require("./env.module");
5
+ const config_module_1 = require("./config.module");
6
+ const logs_module_1 = require("./logs.module");
7
+ const dev_module_1 = require("./dev.module");
22
8
  /**
23
9
  * Application Module
24
10
  * 註冊所有 Application 層的服務(Use Cases)
11
+ * 按指令群組組織
25
12
  */
26
13
  function registerApplicationModule() {
27
- // =============================================================================
28
- // Instance Use Cases
29
- // =============================================================================
30
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.InstallInstanceUseCase, install_instance_use_case_1.InstallInstanceUseCase);
31
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.StartInstanceUseCase, start_instance_use_case_1.StartInstanceUseCase);
32
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.StopInstanceUseCase, stop_instance_use_case_1.StopInstanceUseCase);
33
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.DeleteInstanceUseCase, delete_instance_use_case_1.DeleteInstanceUseCase);
34
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ListInstancesUseCase, list_instances_use_case_1.ListInstancesUseCase);
35
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ListChartsUseCase, list_charts_use_case_1.ListChartsUseCase);
36
- // =============================================================================
37
- // Setup Use Cases
38
- // =============================================================================
39
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.SetupEnvironmentUseCase, setup_environment_use_case_1.SetupEnvironmentUseCase);
40
- // =============================================================================
41
- // Config Use Cases
42
- // =============================================================================
43
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.GetConfigUseCase, get_config_use_case_1.GetConfigUseCase);
44
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.SetConfigUseCase, set_config_use_case_1.SetConfigUseCase);
45
- // =============================================================================
46
- // Credentials Use Cases
47
- // =============================================================================
48
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.GetCredentialsUseCase, get_credentials_use_case_1.GetCredentialsUseCase);
49
- // =============================================================================
50
- // Logs Use Cases
51
- // =============================================================================
52
- tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ShowLogsUseCase, show_logs_use_case_1.ShowLogsUseCase);
14
+ // Env 指令群組 (instance, setup, credentials)
15
+ (0, env_module_1.registerEnvModule)();
16
+ // Config 指令群組
17
+ (0, config_module_1.registerConfigModule)();
18
+ // Logs 指令群組
19
+ (0, logs_module_1.registerLogsModule)();
20
+ // Dev 指令群組
21
+ (0, dev_module_1.registerDevModule)();
53
22
  }
54
23
  //# sourceMappingURL=application.module.js.map
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerConfigModule = registerConfigModule;
4
+ const tsyringe_1 = require("tsyringe");
5
+ const tokens_1 = require("../tokens");
6
+ // Config Use Cases
7
+ const get_config_use_case_1 = require("../../application/use-cases/config/get-config.use-case");
8
+ const get_all_config_use_case_1 = require("../../application/use-cases/config/get-all-config.use-case");
9
+ const set_config_use_case_1 = require("../../application/use-cases/config/set-config.use-case");
10
+ /**
11
+ * Config Module
12
+ * 註冊 config 指令群組的 Use Cases
13
+ */
14
+ function registerConfigModule() {
15
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.GetConfigUseCase, get_config_use_case_1.GetConfigUseCase);
16
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.GetAllConfigUseCase, get_all_config_use_case_1.GetAllConfigUseCase);
17
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.SetConfigUseCase, set_config_use_case_1.SetConfigUseCase);
18
+ }
19
+ //# sourceMappingURL=config.module.js.map
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerDevModule = registerDevModule;
4
+ const tsyringe_1 = require("tsyringe");
5
+ const tokens_1 = require("../tokens");
6
+ // Template Infrastructure Services
7
+ const services_1 = require("../../infrastructure/template/services");
8
+ const template_manager_adapter_1 = require("../../infrastructure/template/template-manager.adapter");
9
+ // Schematics Infrastructure Services
10
+ const schematics_runner_adapter_1 = require("../../infrastructure/schematics/schematics-runner.adapter");
11
+ const project_scaffolder_adapter_1 = require("../../infrastructure/schematics/project-scaffolder.adapter");
12
+ // Dotnet Infrastructure Services
13
+ const dotnet_publisher_adapter_1 = require("../../infrastructure/dotnet/dotnet-publisher.adapter");
14
+ // Dev Template Use Cases
15
+ const install_template_use_case_1 = require("../../application/use-cases/dev/install-template.use-case");
16
+ const list_templates_use_case_1 = require("../../application/use-cases/dev/list-templates.use-case");
17
+ const uninstall_template_use_case_1 = require("../../application/use-cases/dev/uninstall-template.use-case");
18
+ // Dev Project/Generate Use Cases
19
+ const new_project_use_case_1 = require("../../application/use-cases/dev/new-project.use-case");
20
+ const generate_component_use_case_1 = require("../../application/use-cases/dev/generate-component.use-case");
21
+ const publish_plugin_use_case_1 = require("../../application/use-cases/dev/publish-plugin.use-case");
22
+ /**
23
+ * Dev Module
24
+ * 註冊 dev 指令群組的 Infrastructure 服務和 Use Cases
25
+ */
26
+ function registerDevModule() {
27
+ // Infrastructure - Template Services
28
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.Internal.TemplateDownloader, services_1.TemplateDownloader);
29
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.Internal.TemplateRegistry, services_1.TemplateRegistry);
30
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ITemplateManagerPort, template_manager_adapter_1.TemplateManagerAdapter);
31
+ // Infrastructure - Schematics Services
32
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ISchematicsRunnerPort, schematics_runner_adapter_1.SchematicsRunnerAdapter);
33
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.IProjectScaffolderPort, project_scaffolder_adapter_1.ProjectScaffolderAdapter);
34
+ // Infrastructure - Dotnet Services
35
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.IDotnetPublisherPort, dotnet_publisher_adapter_1.DotnetPublisherAdapter);
36
+ // Use Cases - Template
37
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.InstallTemplateUseCase, install_template_use_case_1.InstallTemplateUseCase);
38
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ListTemplatesUseCase, list_templates_use_case_1.ListTemplatesUseCase);
39
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.UninstallTemplateUseCase, uninstall_template_use_case_1.UninstallTemplateUseCase);
40
+ // Use Cases - Project/Generate/Publish
41
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.NewProjectUseCase, new_project_use_case_1.NewProjectUseCase);
42
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.GenerateComponentUseCase, generate_component_use_case_1.GenerateComponentUseCase);
43
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.PublishPluginUseCase, publish_plugin_use_case_1.PublishPluginUseCase);
44
+ }
45
+ //# sourceMappingURL=dev.module.js.map
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerEnvModule = registerEnvModule;
4
+ const tsyringe_1 = require("tsyringe");
5
+ const tokens_1 = require("../tokens");
6
+ // Application Services
7
+ const environment_validator_service_1 = require("../../application/services/env/environment-validator.service");
8
+ const instance_cleanup_service_1 = require("../../application/services/env/instance-cleanup.service");
9
+ // Instance Use Cases
10
+ const install_instance_use_case_1 = require("../../application/use-cases/env/install-instance.use-case");
11
+ const start_instance_use_case_1 = require("../../application/use-cases/env/start-instance.use-case");
12
+ const stop_instance_use_case_1 = require("../../application/use-cases/env/stop-instance.use-case");
13
+ const delete_instance_use_case_1 = require("../../application/use-cases/env/delete-instance.use-case");
14
+ const list_instances_use_case_1 = require("../../application/use-cases/env/list-instances.use-case");
15
+ const list_charts_use_case_1 = require("../../application/use-cases/env/list-charts.use-case");
16
+ const list_running_instances_use_case_1 = require("../../application/use-cases/env/list-running-instances.use-case");
17
+ // Setup Use Cases
18
+ const setup_environment_use_case_1 = require("../../application/use-cases/env/setup-environment.use-case");
19
+ // Credentials Use Cases
20
+ const get_credentials_use_case_1 = require("../../application/use-cases/env/get-credentials.use-case");
21
+ /**
22
+ * Env Module
23
+ * 註冊 env 指令群組的 Application Services 和 Use Cases
24
+ */
25
+ function registerEnvModule() {
26
+ // Application Services
27
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.EnvironmentValidator, environment_validator_service_1.EnvironmentValidator);
28
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.InstanceCleanupService, instance_cleanup_service_1.InstanceCleanupService);
29
+ // Instance Use Cases
30
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.InstallInstanceUseCase, install_instance_use_case_1.InstallInstanceUseCase);
31
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.StartInstanceUseCase, start_instance_use_case_1.StartInstanceUseCase);
32
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.StopInstanceUseCase, stop_instance_use_case_1.StopInstanceUseCase);
33
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.DeleteInstanceUseCase, delete_instance_use_case_1.DeleteInstanceUseCase);
34
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ListInstancesUseCase, list_instances_use_case_1.ListInstancesUseCase);
35
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ListChartsUseCase, list_charts_use_case_1.ListChartsUseCase);
36
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.ListRunningInstancesUseCase, list_running_instances_use_case_1.ListRunningInstancesUseCase);
37
+ // Setup Use Cases
38
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.SetupEnvironmentUseCase, setup_environment_use_case_1.SetupEnvironmentUseCase);
39
+ // Credentials Use Cases
40
+ tsyringe_1.container.registerSingleton(tokens_1.TOKENS.GetCredentialsUseCase, get_credentials_use_case_1.GetCredentialsUseCase);
41
+ }
42
+ //# sourceMappingURL=env.module.js.map
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /**
18
+ * DI 模組註冊
19
+ *
20
+ * 匯出所有模組註冊函式,供 DI 容器初始化時依序呼叫
21
+ */
22
+ __exportStar(require("./application.module"), exports);
23
+ __exportStar(require("./config.module"), exports);
24
+ __exportStar(require("./dev.module"), exports);
25
+ __exportStar(require("./env.module"), exports);
26
+ __exportStar(require("./infrastructure.module"), exports);
27
+ __exportStar(require("./interceptor.module"), exports);
28
+ __exportStar(require("./logs.module"), exports);
29
+ __exportStar(require("./presentation.module"), exports);
30
+ //# sourceMappingURL=index.js.map