@uofx/cli 1.0.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 (238) hide show
  1. package/LICENSE +40 -0
  2. package/README.md +444 -0
  3. package/THIRD-PARTY-NOTICES.txt +894 -0
  4. package/dist/application/dtos/index.js +24 -0
  5. package/dist/application/dtos/request/delete-instance.request.dto.js +3 -0
  6. package/dist/application/dtos/request/get-config.request.dto.js +3 -0
  7. package/dist/application/dtos/request/get-credentials.request.dto.js +3 -0
  8. package/dist/application/dtos/request/index.js +27 -0
  9. package/dist/application/dtos/request/install-instance.request.dto.js +3 -0
  10. package/dist/application/dtos/request/list-charts.request.dto.js +3 -0
  11. package/dist/application/dtos/request/set-config.request.dto.js +16 -0
  12. package/dist/application/dtos/request/setup-environment.request.dto.js +16 -0
  13. package/dist/application/dtos/request/show-logs.request.dto.js +19 -0
  14. package/dist/application/dtos/request/start-instance.request.dto.js +3 -0
  15. package/dist/application/dtos/request/stop-instance.request.dto.js +3 -0
  16. package/dist/application/dtos/response/credentials.response.dto.js +3 -0
  17. package/dist/application/dtos/response/delete-instance.response.dto.js +3 -0
  18. package/dist/application/dtos/response/index.js +26 -0
  19. package/dist/application/dtos/response/install-instance.response.dto.js +3 -0
  20. package/dist/application/dtos/response/instance-list.response.dto.js +3 -0
  21. package/dist/application/dtos/response/instance-status.response.dto.js +3 -0
  22. package/dist/application/dtos/response/setup-result.response.dto.js +3 -0
  23. package/dist/application/dtos/response/show-logs.response.dto.js +3 -0
  24. package/dist/application/dtos/response/start-instance.response.dto.js +3 -0
  25. package/dist/application/dtos/response/stop-instance.response.dto.js +3 -0
  26. package/dist/application/index.js +25 -0
  27. package/dist/application/interfaces/index.js +24 -0
  28. package/dist/application/interfaces/use-case.interface.js +3 -0
  29. package/dist/application/use-cases/config/get-config.use-case.js +66 -0
  30. package/dist/application/use-cases/config/set-config.use-case.js +49 -0
  31. package/dist/application/use-cases/credentials/get-credentials.use-case.js +57 -0
  32. package/dist/application/use-cases/index.js +28 -0
  33. package/dist/application/use-cases/instance/delete-instance.use-case.js +81 -0
  34. package/dist/application/use-cases/instance/index.js +23 -0
  35. package/dist/application/use-cases/instance/install-instance.use-case.js +424 -0
  36. package/dist/application/use-cases/instance/list-charts.use-case.js +43 -0
  37. package/dist/application/use-cases/instance/list-instances.use-case.js +62 -0
  38. package/dist/application/use-cases/instance/start-instance.use-case.js +154 -0
  39. package/dist/application/use-cases/instance/stop-instance.use-case.js +55 -0
  40. package/dist/application/use-cases/logs/show-logs.use-case.js +66 -0
  41. package/dist/application/use-cases/setup/setup-environment.use-case.js +53 -0
  42. package/dist/cli.js +286 -0
  43. package/dist/constants/config-defaults.js +23 -0
  44. package/dist/constants/defaults.js +89 -0
  45. package/dist/constants/deployment.js +39 -0
  46. package/dist/constants/environments.js +93 -0
  47. package/dist/constants/index.js +53 -0
  48. package/dist/constants/oci-artifacts.js +25 -0
  49. package/dist/constants/paths.js +92 -0
  50. package/dist/constants/timeouts.js +60 -0
  51. package/dist/di/container.js +34 -0
  52. package/dist/di/index.js +22 -0
  53. package/dist/di/modules/application.module.js +54 -0
  54. package/dist/di/modules/infrastructure.module.js +206 -0
  55. package/dist/di/modules/interceptor.module.js +68 -0
  56. package/dist/di/modules/presentation.module.js +31 -0
  57. package/dist/di/tokens.js +149 -0
  58. package/dist/domain/decorators/sensitive.decorator.js +39 -0
  59. package/dist/domain/entities/credentials-resolver.entity.js +127 -0
  60. package/dist/domain/entities/credentials.entity.js +65 -0
  61. package/dist/domain/entities/delete-instance-validation.entity.js +100 -0
  62. package/dist/domain/entities/deployment-parameters.entity.js +120 -0
  63. package/dist/domain/entities/environment-validation.entity.js +125 -0
  64. package/dist/domain/entities/index.js +29 -0
  65. package/dist/domain/entities/instance-lifecycle-state.entity.js +100 -0
  66. package/dist/domain/entities/instance-list-aggregator.entity.js +104 -0
  67. package/dist/domain/entities/instance-metadata.entity.js +86 -0
  68. package/dist/domain/entities/instance-status.entity.js +79 -0
  69. package/dist/domain/entities/instance.entity.js +128 -0
  70. package/dist/domain/entities/log-filter.entity.js +141 -0
  71. package/dist/domain/index.js +29 -0
  72. package/dist/domain/interfaces/safe-loggable.interface.js +3 -0
  73. package/dist/domain/ports/app-config.port.js +3 -0
  74. package/dist/domain/ports/base-image.port.js +3 -0
  75. package/dist/domain/ports/chart-version.port.js +3 -0
  76. package/dist/domain/ports/correlation-id.port.js +3 -0
  77. package/dist/domain/ports/credentials.port.js +3 -0
  78. package/dist/domain/ports/deployment.port.js +3 -0
  79. package/dist/domain/ports/error-handler.port.js +3 -0
  80. package/dist/domain/ports/index.js +46 -0
  81. package/dist/domain/ports/instance-manager.port.js +3 -0
  82. package/dist/domain/ports/instance-metadata.port.js +8 -0
  83. package/dist/domain/ports/instance-storage.port.js +3 -0
  84. package/dist/domain/ports/k8s-deployer.port.js +3 -0
  85. package/dist/domain/ports/logger.port.js +14 -0
  86. package/dist/domain/ports/output.port.js +3 -0
  87. package/dist/domain/ports/runtime-environment.port.js +6 -0
  88. package/dist/domain/ports/user-interaction.port.js +9 -0
  89. package/dist/domain/ports/user-settings.port.js +3 -0
  90. package/dist/domain/types/index.js +22 -0
  91. package/dist/domain/types/logger.types.js +29 -0
  92. package/dist/domain/types/validation.types.js +9 -0
  93. package/dist/domain/value-objects/acr-credentials.value-object.js +92 -0
  94. package/dist/domain/value-objects/chart-version.value-object.js +124 -0
  95. package/dist/domain/value-objects/config-log-level.value-object.js +84 -0
  96. package/dist/domain/value-objects/connection-info.value-object.js +65 -0
  97. package/dist/domain/value-objects/index.js +25 -0
  98. package/dist/domain/value-objects/instance-name.value-object.js +91 -0
  99. package/dist/domain/value-objects/jwt-key.value-object.js +97 -0
  100. package/dist/domain/value-objects/mssql-password.value-object.js +140 -0
  101. package/dist/domain/value-objects/rsa-key-pair.value-object.js +181 -0
  102. package/dist/index.js +6 -0
  103. package/dist/infrastructure/config/app-config.interface.js +3 -0
  104. package/dist/infrastructure/config/app-config.service.js +280 -0
  105. package/dist/infrastructure/config/config-validator.js +31 -0
  106. package/dist/infrastructure/config/crypto.service.js +125 -0
  107. package/dist/infrastructure/deployment/deployment.adapter.js +118 -0
  108. package/dist/infrastructure/deployment/interfaces/acr-credential-manager.interface.js +3 -0
  109. package/dist/infrastructure/deployment/interfaces/app-manager.interface.js +3 -0
  110. package/dist/infrastructure/deployment/interfaces/helm-registry.interface.js +3 -0
  111. package/dist/infrastructure/deployment/interfaces/infra-manager.interface.js +3 -0
  112. package/dist/infrastructure/deployment/interfaces/k8s-job-runner.interface.js +3 -0
  113. package/dist/infrastructure/deployment/interfaces/mssql-database-init.interface.js +3 -0
  114. package/dist/infrastructure/deployment/interfaces/mssql-helm-deployment.interface.js +3 -0
  115. package/dist/infrastructure/deployment/interfaces/mssql-storage.interface.js +3 -0
  116. package/dist/infrastructure/deployment/interfaces/mssql-user-manager.interface.js +3 -0
  117. package/dist/infrastructure/deployment/interfaces/oci-artifact.interface.js +3 -0
  118. package/dist/infrastructure/deployment/interfaces/secret-manager.interface.js +3 -0
  119. package/dist/infrastructure/deployment/interfaces/service-manager.interface.js +3 -0
  120. package/dist/infrastructure/deployment/interfaces/version-compatibility.interface.js +3 -0
  121. package/dist/infrastructure/deployment/services/acr-credential-manager.service.js +144 -0
  122. package/dist/infrastructure/deployment/services/app-manager.service.js +193 -0
  123. package/dist/infrastructure/deployment/services/base-helm-deployment.service.js +163 -0
  124. package/dist/infrastructure/deployment/services/helm-registry.service.js +126 -0
  125. package/dist/infrastructure/deployment/services/infra-manager.service.js +130 -0
  126. package/dist/infrastructure/deployment/services/k8s-job-runner.service.js +194 -0
  127. package/dist/infrastructure/deployment/services/mssql-database-init.service.js +139 -0
  128. package/dist/infrastructure/deployment/services/mssql-helm-deployment.service.js +100 -0
  129. package/dist/infrastructure/deployment/services/mssql-storage.service.js +54 -0
  130. package/dist/infrastructure/deployment/services/mssql-user-manager.service.js +66 -0
  131. package/dist/infrastructure/deployment/services/oci-artifact.service.js +289 -0
  132. package/dist/infrastructure/deployment/services/secret-manager.service.js +179 -0
  133. package/dist/infrastructure/deployment/services/service-manager.service.js +82 -0
  134. package/dist/infrastructure/deployment/services/version-compatibility.service.js +291 -0
  135. package/dist/infrastructure/environment/interfaces/hardware-info.interface.js +3 -0
  136. package/dist/infrastructure/environment/interfaces/network-checker.interface.js +3 -0
  137. package/dist/infrastructure/environment/services/hardware-info.service.js +135 -0
  138. package/dist/infrastructure/environment/services/network-checker.service.js +142 -0
  139. package/dist/infrastructure/environment/windows-environment.adapter.js +162 -0
  140. package/dist/infrastructure/errors/app-error.js +73 -0
  141. package/dist/infrastructure/errors/error-handler.interface.js +3 -0
  142. package/dist/infrastructure/errors/error-handler.js +218 -0
  143. package/dist/infrastructure/errors/exit-codes.js +27 -0
  144. package/dist/infrastructure/errors/index.js +25 -0
  145. package/dist/infrastructure/execution/builders/base-command.builder.js +122 -0
  146. package/dist/infrastructure/execution/builders/host-command.builder.js +58 -0
  147. package/dist/infrastructure/execution/builders/windows-host-command.builder.js +50 -0
  148. package/dist/infrastructure/execution/builders/wsl-command.builder.js +29 -0
  149. package/dist/infrastructure/execution/command-builder.js +252 -0
  150. package/dist/infrastructure/execution/command-executor.service.js +230 -0
  151. package/dist/infrastructure/execution/environments/wsl-execution.environment.js +70 -0
  152. package/dist/infrastructure/execution/execution-environment.factory.js +53 -0
  153. package/dist/infrastructure/execution/index.js +25 -0
  154. package/dist/infrastructure/execution/interfaces/command-builder.interface.js +3 -0
  155. package/dist/infrastructure/execution/interfaces/command-executor.interface.js +3 -0
  156. package/dist/infrastructure/execution/interfaces/execution-environment-factory.interface.js +3 -0
  157. package/dist/infrastructure/execution/interfaces/execution-environment.interface.js +7 -0
  158. package/dist/infrastructure/execution/interfaces/host-command-builder.interface.js +3 -0
  159. package/dist/infrastructure/execution/interfaces/index.js +23 -0
  160. package/dist/infrastructure/execution/interfaces/script-executor.interface.js +3 -0
  161. package/dist/infrastructure/execution/script-executor.service.js +171 -0
  162. package/dist/infrastructure/http/http-client.service.js +176 -0
  163. package/dist/infrastructure/http/index.js +18 -0
  164. package/dist/infrastructure/http/interfaces/http-client.interface.js +3 -0
  165. package/dist/infrastructure/interceptors/index.js +8 -0
  166. package/dist/infrastructure/interceptors/interceptor.factory.js +44 -0
  167. package/dist/infrastructure/interceptors/interceptor.interface.js +3 -0
  168. package/dist/infrastructure/interceptors/logging.interceptor.js +171 -0
  169. package/dist/infrastructure/logger/correlation-id.adapter.js +68 -0
  170. package/dist/infrastructure/logger/index.js +23 -0
  171. package/dist/infrastructure/logger/interfaces/index.js +22 -0
  172. package/dist/infrastructure/logger/interfaces/log-reader.repository.interface.js +7 -0
  173. package/dist/infrastructure/logger/interfaces/log-writer.repository.interface.js +7 -0
  174. package/dist/infrastructure/logger/logger.adapter.js +274 -0
  175. package/dist/infrastructure/logger/services/file-log-reader.repository.js +148 -0
  176. package/dist/infrastructure/logger/services/file-log-writer.repository.js +307 -0
  177. package/dist/infrastructure/logger/services/index.js +22 -0
  178. package/dist/infrastructure/persistence/index.js +25 -0
  179. package/dist/infrastructure/persistence/instance-metadata.adapter.js +100 -0
  180. package/dist/infrastructure/persistence/instance-storage.adapter.js +64 -0
  181. package/dist/infrastructure/persistence/interfaces/config.repository.interface.js +3 -0
  182. package/dist/infrastructure/persistence/interfaces/index.js +22 -0
  183. package/dist/infrastructure/persistence/interfaces/instance.repository.interface.js +3 -0
  184. package/dist/infrastructure/persistence/services/file-system-config.repository.js +168 -0
  185. package/dist/infrastructure/persistence/services/file-system-instance.repository.js +170 -0
  186. package/dist/infrastructure/persistence/services/index.js +22 -0
  187. package/dist/infrastructure/persistence/user-settings.adapter.js +55 -0
  188. package/dist/infrastructure/platform-detector.js +71 -0
  189. package/dist/infrastructure/platforms/windows/interfaces/microk8s.interface.js +3 -0
  190. package/dist/infrastructure/platforms/windows/interfaces/rootfs-manager.interface.js +3 -0
  191. package/dist/infrastructure/platforms/windows/interfaces/windows-features.interface.js +3 -0
  192. package/dist/infrastructure/platforms/windows/interfaces/windows-info.interface.js +3 -0
  193. package/dist/infrastructure/platforms/windows/interfaces/wsl-config.interface.js +3 -0
  194. package/dist/infrastructure/platforms/windows/interfaces/wsl-info.interface.js +3 -0
  195. package/dist/infrastructure/platforms/windows/interfaces/wsl-instance-inspection.interface.js +3 -0
  196. package/dist/infrastructure/platforms/windows/interfaces/wsl-instance-lifecycle.interface.js +3 -0
  197. package/dist/infrastructure/platforms/windows/interfaces/wsl-instance-naming.interface.js +3 -0
  198. package/dist/infrastructure/platforms/windows/interfaces/wsl-manager.interface.js +3 -0
  199. package/dist/infrastructure/platforms/windows/interfaces/wsl-resources.interface.js +8 -0
  200. package/dist/infrastructure/platforms/windows/interfaces/wsl-updater.interface.js +3 -0
  201. package/dist/infrastructure/platforms/windows/interfaces/wslconfig-parser.interface.js +3 -0
  202. package/dist/infrastructure/platforms/windows/parsers/wsl-version.parser.js +133 -0
  203. package/dist/infrastructure/platforms/windows/services/microk8s.service.js +168 -0
  204. package/dist/infrastructure/platforms/windows/services/rootfs-manager.service.js +336 -0
  205. package/dist/infrastructure/platforms/windows/services/windows-features.service.js +191 -0
  206. package/dist/infrastructure/platforms/windows/services/windows-info.service.js +138 -0
  207. package/dist/infrastructure/platforms/windows/services/wsl-config.service.js +171 -0
  208. package/dist/infrastructure/platforms/windows/services/wsl-info.service.js +226 -0
  209. package/dist/infrastructure/platforms/windows/services/wsl-instance-inspection.service.js +325 -0
  210. package/dist/infrastructure/platforms/windows/services/wsl-instance-lifecycle.service.js +442 -0
  211. package/dist/infrastructure/platforms/windows/services/wsl-instance-naming.service.js +93 -0
  212. package/dist/infrastructure/platforms/windows/services/wsl-updater.service.js +273 -0
  213. package/dist/infrastructure/platforms/windows/services/wslconfig-parser.service.js +222 -0
  214. package/dist/infrastructure/platforms/windows/wsl-base-image.adapter.js +41 -0
  215. package/dist/infrastructure/platforms/windows/wsl-instance-manager.adapter.js +150 -0
  216. package/dist/infrastructure/utils/error-formatter.util.js +29 -0
  217. package/dist/infrastructure/utils/file-operations.util.js +201 -0
  218. package/dist/infrastructure/utils/input-validator.util.js +152 -0
  219. package/dist/infrastructure/utils/retry.util.js +98 -0
  220. package/dist/presentation/controllers/config.controller.js +146 -0
  221. package/dist/presentation/controllers/credentials.controller.js +105 -0
  222. package/dist/presentation/controllers/index.js +25 -0
  223. package/dist/presentation/controllers/instance.controller.js +363 -0
  224. package/dist/presentation/controllers/logs.controller.js +103 -0
  225. package/dist/presentation/controllers/setup.controller.js +175 -0
  226. package/dist/presentation/interfaces/cli-options.interface.js +8 -0
  227. package/dist/presentation/prompts/acr-credentials.prompt.js +76 -0
  228. package/dist/presentation/prompts/index.js +21 -0
  229. package/dist/presentation/ui/cli-progress.service.js +193 -0
  230. package/dist/presentation/ui/constants/output-symbols.js +42 -0
  231. package/dist/presentation/ui/index.js +27 -0
  232. package/dist/presentation/ui/interaction.service.js +276 -0
  233. package/dist/presentation/ui/interfaces/cli-progress.interface.js +9 -0
  234. package/dist/presentation/ui/interfaces/output-formatter.interface.js +23 -0
  235. package/dist/presentation/ui/log-level.enum.js +66 -0
  236. package/dist/presentation/ui/output-builder.service.js +378 -0
  237. package/dist/presentation/ui/output-formatter.service.js +393 -0
  238. package/package.json +65 -0
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ /**
3
+ * 預設值常數
4
+ *
5
+ * 定義專案中所有預設設定值
6
+ */
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;
9
+ /**
10
+ * WSL 實例相關預設值
11
+ */
12
+ exports.INSTANCE_DEFAULTS = {
13
+ /** 實例名稱前綴 */
14
+ PREFIX: 'uofx-',
15
+ /** 預設實例名稱 */
16
+ DEFAULT_NAME: 'dev',
17
+ /** 預設 Linux 發行版 */
18
+ DISTRIBUTION: 'ubuntu',
19
+ };
20
+ /**
21
+ * Kubernetes 相關預設值
22
+ */
23
+ exports.K8S_DEFAULTS = {
24
+ /** 預設命名空間 */
25
+ NAMESPACE: 'default',
26
+ /** UoFX 應用程式命名空間 */
27
+ UOFX_NAMESPACE: 'uofx',
28
+ /** 預設 Service Account */
29
+ SERVICE_ACCOUNT: 'default',
30
+ /** Docker Registry Secret 名稱 */
31
+ REGISTRY_SECRET_NAME: 'acr-secret',
32
+ };
33
+ /**
34
+ * 日誌相關預設值
35
+ */
36
+ exports.LOG_DEFAULTS = {
37
+ /** 日誌保留天數 */
38
+ RETENTION_DAYS: 7,
39
+ /** 最大日誌檔案大小 (50MB) */
40
+ MAX_FILE_SIZE: 50 * 1024 * 1024,
41
+ /** 最大日誌備份數量 */
42
+ MAX_BACKUP_COUNT: 7,
43
+ /** 預設日誌等級 */
44
+ DEFAULT_LEVEL: 'info',
45
+ };
46
+ /**
47
+ * 檔案大小相關常數
48
+ */
49
+ exports.FILE_SIZE = {
50
+ /** 1 KB */
51
+ KB: 1024,
52
+ /** 1 MB */
53
+ MB: 1024 * 1024,
54
+ /** 1 GB */
55
+ GB: 1024 * 1024 * 1024,
56
+ /** Rootfs 最小有效大小 (100MB) */
57
+ MIN_ROOTFS_SIZE: 100 * 1024 * 1024,
58
+ /** 命令執行最大緩衝區 (10MB) */
59
+ MAX_COMMAND_BUFFER: 10 * 1024 * 1024,
60
+ };
61
+ /**
62
+ * 系統資源需求常數
63
+ */
64
+ exports.SYSTEM_REQUIREMENTS = {
65
+ /** 最低可用磁碟空間 (GB) */
66
+ MIN_DISK_SPACE_GB: 20,
67
+ /** 最低記憶體需求 (GB) */
68
+ MIN_MEMORY_GB: 4,
69
+ /** 建議記憶體 (GB) */
70
+ RECOMMENDED_MEMORY_GB: 8,
71
+ /** 最低 CPU 核心數 */
72
+ MIN_CPU_CORES: 2,
73
+ /** Windows 10 最低建置版本 */
74
+ MIN_WINDOWS_BUILD: 19041,
75
+ };
76
+ /**
77
+ * Helm 相關預設值
78
+ */
79
+ exports.HELM_DEFAULTS = {
80
+ /** UoFX Infra Chart 名稱 */
81
+ UOFX_INFRA_CHART: 'uofx-infra',
82
+ /** UoFX Service Chart 名稱 */
83
+ UOFX_SERVICE_CHART: 'uofx-service',
84
+ /** MSSQL Chart 名稱 */
85
+ MSSQL_CHART: 'mssql',
86
+ /** 預設 Release 名稱前綴 */
87
+ RELEASE_PREFIX: 'uofx',
88
+ };
89
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * 部署相關預設值
4
+ *
5
+ * 定義 Helm 部署時使用的預設配置值
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.APP_LOG_DEFAULTS = exports.DEPLOYMENT_DEFAULTS = void 0;
9
+ /**
10
+ * UoFX 應用程式部署預設值
11
+ */
12
+ exports.DEPLOYMENT_DEFAULTS = {
13
+ /** UoFX Connect 服務 URL */
14
+ CONNECT_URL: 'https://connect.uof.tw',
15
+ /** 資料庫主機位址 */
16
+ DB_HOST: 'database-mssql-latest.mssql',
17
+ /** 資料庫使用者 */
18
+ DB_USER: 'sa',
19
+ /** 預設資料庫名稱 */
20
+ DB_NAME: 'uofx_dev',
21
+ /** 搜尋資料庫名稱 */
22
+ SEARCH_DB_NAME: 'uofx_search',
23
+ };
24
+ /**
25
+ * 應用程式日誌預設值
26
+ */
27
+ exports.APP_LOG_DEFAULTS = {
28
+ /** 預設日誌等級 */
29
+ LOG_LEVEL: 'Debug',
30
+ /** 日誌保留天數 */
31
+ LOG_RETENTION_PERIOD: '30',
32
+ /** Microsoft 命名空間日誌等級 */
33
+ LOG_LEVEL_MICROSOFT: 'Error',
34
+ /** Hosting Lifetime 日誌等級 */
35
+ LOG_LEVEL_HOSTING_LIFETIME: 'Error',
36
+ /** HTTP Client 日誌等級 */
37
+ LOG_LEVEL_HTTP_CLIENT: 'Error',
38
+ };
39
+ //# sourceMappingURL=deployment.js.map
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ /**
3
+ * 執行環境類型常數
4
+ *
5
+ * 集中管理執行環境相關的常數定義
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PLATFORM_TYPES = exports.WINDOWS_BUILD_NUMBERS = exports.WINDOWS_FEATURE_NAMES = exports.WINDOWS_FEATURE_STATES = exports.CONTAINER_RUNTIME_TYPES = exports.WSL_VERSIONS = exports.WSL_INSTANCE_STATES = exports.RUNTIME_ENVIRONMENT_TYPES = exports.EXECUTION_ENVIRONMENT_TYPES = void 0;
9
+ // ============================================================================
10
+ // 執行環境類型
11
+ // ============================================================================
12
+ /**
13
+ * 執行環境類型
14
+ * - wsl: WSL 實例內執行
15
+ * - hyper-v: Hyper-V 虛擬機內執行
16
+ * - local: 本地主機執行
17
+ */
18
+ exports.EXECUTION_ENVIRONMENT_TYPES = {
19
+ WSL: 'wsl',
20
+ HYPERV: 'hyper-v',
21
+ LOCAL: 'local',
22
+ };
23
+ /**
24
+ * 運行環境類型(Domain Layer)
25
+ */
26
+ exports.RUNTIME_ENVIRONMENT_TYPES = {
27
+ WSL: 'WSL',
28
+ DOCKER: 'Docker',
29
+ HYPERV: 'Hyper-V',
30
+ };
31
+ // ============================================================================
32
+ // WSL 相關常數
33
+ // ============================================================================
34
+ /**
35
+ * WSL 實例狀態
36
+ */
37
+ exports.WSL_INSTANCE_STATES = {
38
+ RUNNING: 'Running',
39
+ STOPPED: 'Stopped',
40
+ };
41
+ /**
42
+ * WSL 版本相關
43
+ */
44
+ exports.WSL_VERSIONS = {
45
+ MIN_RECOMMENDED: '2.0.0.0',
46
+ };
47
+ // ============================================================================
48
+ // 容器執行環境
49
+ // ============================================================================
50
+ /**
51
+ * 容器執行環境類型
52
+ */
53
+ exports.CONTAINER_RUNTIME_TYPES = {
54
+ DOCKER_DESKTOP: 'docker-desktop',
55
+ PODMAN_DESKTOP: 'podman-desktop',
56
+ };
57
+ // ============================================================================
58
+ // Windows 相關常數
59
+ // ============================================================================
60
+ /**
61
+ * Windows 功能狀態
62
+ */
63
+ exports.WINDOWS_FEATURE_STATES = {
64
+ ENABLED: 'Enabled',
65
+ DISABLED: 'Disabled',
66
+ UNKNOWN: 'Unknown',
67
+ };
68
+ /**
69
+ * Windows 功能名稱
70
+ */
71
+ exports.WINDOWS_FEATURE_NAMES = {
72
+ WSL: 'Microsoft-Windows-Subsystem-Linux',
73
+ VM_PLATFORM: 'VirtualMachinePlatform',
74
+ };
75
+ /**
76
+ * Windows Build 號
77
+ */
78
+ exports.WINDOWS_BUILD_NUMBERS = {
79
+ MIN_WIN10: 19041,
80
+ MIN_WIN11: 22000,
81
+ };
82
+ // ============================================================================
83
+ // 平台類型
84
+ // ============================================================================
85
+ /**
86
+ * Node.js process.platform 值
87
+ */
88
+ exports.PLATFORM_TYPES = {
89
+ WINDOWS: 'win32',
90
+ MACOS: 'darwin',
91
+ LINUX: 'linux',
92
+ };
93
+ //# sourceMappingURL=environments.js.map
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * 常數模組統一匯出
4
+ *
5
+ * 集中匯出所有常數,方便其他模組引用
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { TIMEOUTS, FILE_SIZE, INSTANCE_DEFAULTS } from '../constants';
10
+ *
11
+ * const timeout = TIMEOUTS.WSL_STARTUP_DELAY;
12
+ * const mb = FILE_SIZE.MB;
13
+ * const prefix = INSTANCE_DEFAULTS.PREFIX;
14
+ * ```
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.APP_LOG_DEFAULTS = exports.DEPLOYMENT_DEFAULTS = exports.OCI_ARTIFACT_TAGS = exports.OCI_ARTIFACTS = exports.PLATFORM_TYPES = exports.WINDOWS_BUILD_NUMBERS = exports.WINDOWS_FEATURE_NAMES = exports.WINDOWS_FEATURE_STATES = exports.CONTAINER_RUNTIME_TYPES = exports.WSL_VERSIONS = exports.WSL_INSTANCE_STATES = exports.RUNTIME_ENVIRONMENT_TYPES = exports.EXECUTION_ENVIRONMENT_TYPES = exports.HELM_DEFAULTS = exports.SYSTEM_REQUIREMENTS = exports.FILE_SIZE = exports.LOG_DEFAULTS = exports.K8S_DEFAULTS = exports.INSTANCE_DEFAULTS = exports.CONFIG_FILES = exports.WINDOWS_PATHS = exports.LINUX_PATHS = exports.TIMEOUTS = void 0;
18
+ // 超時時間常數
19
+ var timeouts_1 = require("./timeouts");
20
+ Object.defineProperty(exports, "TIMEOUTS", { enumerable: true, get: function () { return timeouts_1.TIMEOUTS; } });
21
+ // 路徑常數
22
+ var paths_1 = require("./paths");
23
+ Object.defineProperty(exports, "LINUX_PATHS", { enumerable: true, get: function () { return paths_1.LINUX_PATHS; } });
24
+ Object.defineProperty(exports, "WINDOWS_PATHS", { enumerable: true, get: function () { return paths_1.WINDOWS_PATHS; } });
25
+ Object.defineProperty(exports, "CONFIG_FILES", { enumerable: true, get: function () { return paths_1.CONFIG_FILES; } });
26
+ // 預設值常數
27
+ var defaults_1 = require("./defaults");
28
+ Object.defineProperty(exports, "INSTANCE_DEFAULTS", { enumerable: true, get: function () { return defaults_1.INSTANCE_DEFAULTS; } });
29
+ Object.defineProperty(exports, "K8S_DEFAULTS", { enumerable: true, get: function () { return defaults_1.K8S_DEFAULTS; } });
30
+ Object.defineProperty(exports, "LOG_DEFAULTS", { enumerable: true, get: function () { return defaults_1.LOG_DEFAULTS; } });
31
+ Object.defineProperty(exports, "FILE_SIZE", { enumerable: true, get: function () { return defaults_1.FILE_SIZE; } });
32
+ Object.defineProperty(exports, "SYSTEM_REQUIREMENTS", { enumerable: true, get: function () { return defaults_1.SYSTEM_REQUIREMENTS; } });
33
+ Object.defineProperty(exports, "HELM_DEFAULTS", { enumerable: true, get: function () { return defaults_1.HELM_DEFAULTS; } });
34
+ // 執行環境常數
35
+ var environments_1 = require("./environments");
36
+ Object.defineProperty(exports, "EXECUTION_ENVIRONMENT_TYPES", { enumerable: true, get: function () { return environments_1.EXECUTION_ENVIRONMENT_TYPES; } });
37
+ Object.defineProperty(exports, "RUNTIME_ENVIRONMENT_TYPES", { enumerable: true, get: function () { return environments_1.RUNTIME_ENVIRONMENT_TYPES; } });
38
+ Object.defineProperty(exports, "WSL_INSTANCE_STATES", { enumerable: true, get: function () { return environments_1.WSL_INSTANCE_STATES; } });
39
+ Object.defineProperty(exports, "WSL_VERSIONS", { enumerable: true, get: function () { return environments_1.WSL_VERSIONS; } });
40
+ Object.defineProperty(exports, "CONTAINER_RUNTIME_TYPES", { enumerable: true, get: function () { return environments_1.CONTAINER_RUNTIME_TYPES; } });
41
+ Object.defineProperty(exports, "WINDOWS_FEATURE_STATES", { enumerable: true, get: function () { return environments_1.WINDOWS_FEATURE_STATES; } });
42
+ Object.defineProperty(exports, "WINDOWS_FEATURE_NAMES", { enumerable: true, get: function () { return environments_1.WINDOWS_FEATURE_NAMES; } });
43
+ Object.defineProperty(exports, "WINDOWS_BUILD_NUMBERS", { enumerable: true, get: function () { return environments_1.WINDOWS_BUILD_NUMBERS; } });
44
+ Object.defineProperty(exports, "PLATFORM_TYPES", { enumerable: true, get: function () { return environments_1.PLATFORM_TYPES; } });
45
+ // OCI Artifacts 常數
46
+ var oci_artifacts_1 = require("./oci-artifacts");
47
+ Object.defineProperty(exports, "OCI_ARTIFACTS", { enumerable: true, get: function () { return oci_artifacts_1.OCI_ARTIFACTS; } });
48
+ Object.defineProperty(exports, "OCI_ARTIFACT_TAGS", { enumerable: true, get: function () { return oci_artifacts_1.OCI_ARTIFACT_TAGS; } });
49
+ // 部署相關常數
50
+ var deployment_1 = require("./deployment");
51
+ Object.defineProperty(exports, "DEPLOYMENT_DEFAULTS", { enumerable: true, get: function () { return deployment_1.DEPLOYMENT_DEFAULTS; } });
52
+ Object.defineProperty(exports, "APP_LOG_DEFAULTS", { enumerable: true, get: function () { return deployment_1.APP_LOG_DEFAULTS; } });
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * OCI Artifacts 常數
4
+ *
5
+ * 定義 OCI registry 中 artifacts 的 repository 路徑和預設 tag
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.OCI_ARTIFACT_TAGS = exports.OCI_ARTIFACTS = void 0;
9
+ /**
10
+ * OCI Artifact Repository 路徑
11
+ */
12
+ exports.OCI_ARTIFACTS = {
13
+ /** chart-compatibility.json 的 repository */
14
+ CHART_COMPATIBILITY: 'uofx-cli/chart-compatibility',
15
+ /** ubuntu-environment (environment.sh) 的 repository */
16
+ UBUNTU_ENVIRONMENT: 'uofx-cli/ubuntu-environment',
17
+ };
18
+ /**
19
+ * OCI Artifact 預設 Tag
20
+ */
21
+ exports.OCI_ARTIFACT_TAGS = {
22
+ /** chart-compatibility 固定用 latest */
23
+ CHART_COMPATIBILITY: 'latest',
24
+ };
25
+ //# sourceMappingURL=oci-artifacts.js.map
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /**
3
+ * 路徑常數
4
+ *
5
+ * 定義專案中所有常用的檔案路徑和目錄路徑
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CONFIG_FILES = exports.WINDOWS_PATHS = exports.LINUX_PATHS = void 0;
9
+ exports.getMssqlDataDirectories = getMssqlDataDirectories;
10
+ /**
11
+ * WSL/Linux 系統路徑
12
+ */
13
+ exports.LINUX_PATHS = {
14
+ /** WSL 設定檔 */
15
+ WSL_CONF: '/etc/wsl.conf',
16
+ /** Kubernetes 設定檔 */
17
+ KUBE_CONFIG: '~/.kube/config',
18
+ /** systemd 系統服務目錄 */
19
+ SYSTEMD_SYSTEM: '/etc/systemd/system',
20
+ /** systemd multi-user target wants 目錄 */
21
+ SYSTEMD_MULTI_USER_WANTS: '/etc/systemd/system/multi-user.target.wants',
22
+ /** MicroK8s snap 路徑 */
23
+ MICROK8S_SNAP: '/snap/microk8s',
24
+ /** MicroK8s kubectl 路徑 */
25
+ MICROK8S_KUBECTL: '/snap/bin/microk8s.kubectl',
26
+ /** Helm 安裝路徑 */
27
+ HELM_BIN: '/usr/local/bin/helm',
28
+ /** Ubuntu 使用者主目錄 */
29
+ USER_HOME: '/home/ubuntu',
30
+ /** MicroK8s kubeconfig 路徑 */
31
+ MICROK8S_CONFIG: '/var/snap/microk8s/current/credentials/client.config',
32
+ /** MicroK8s 可執行檔 */
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
+ /** SQL Server 命令列工具 (MSSQL Tools 18) */
39
+ SQLCMD_BIN: '/opt/mssql-tools18/bin/sqlcmd',
40
+ /** MSSQL 資料目錄基礎路徑 */
41
+ MSSQL_DATA_BASE: '/home/ubuntu/mssql/data',
42
+ /** MSSQL 資料目錄 - data */
43
+ MSSQL_DATA_DIR: '/home/ubuntu/mssql/data/data',
44
+ /** MSSQL 資料目錄 - log */
45
+ MSSQL_LOG_DIR: '/home/ubuntu/mssql/data/log',
46
+ /** MSSQL 資料目錄 - temp */
47
+ MSSQL_TEMP_DIR: '/home/ubuntu/mssql/data/temp',
48
+ /** MSSQL 資料目錄 - userdb */
49
+ MSSQL_USERDB_DIR: '/home/ubuntu/mssql/data/userdb',
50
+ /** UofX 存儲目錄基礎路徑 */
51
+ UOFX_STORAGE_BASE: '/home/ubuntu/uofx-storage',
52
+ };
53
+ /**
54
+ * Windows 系統路徑
55
+ */
56
+ exports.WINDOWS_PATHS = {
57
+ /** WSL 設定檔 */
58
+ WSLCONFIG: '.wslconfig',
59
+ /** 使用者設定目錄名稱 */
60
+ USER_CONFIG_DIR: '.uofx',
61
+ /** 預設 Helm Chart 相對路徑 */
62
+ HELM_CHARTS_DIR: 'helm',
63
+ /** Docker Desktop 可執行檔路徑 (相對於 Program Files) */
64
+ DOCKER_DESKTOP: 'Docker\\Docker\\Docker Desktop.exe',
65
+ /** Podman Desktop 可執行檔路徑 (相對於 Program Files) */
66
+ PODMAN_DESKTOP: 'Podman Desktop\\Podman Desktop.exe',
67
+ /** Ubuntu Rootfs 預設檔名 */
68
+ DEFAULT_ROOTFS: 'ubuntu-22.04-root.tar.xz',
69
+ };
70
+ /**
71
+ * 配置檔案名稱
72
+ */
73
+ exports.CONFIG_FILES = {
74
+ /** 預設配置檔名 */
75
+ DEFAULT: 'default.json',
76
+ /** 使用者配置檔名 */
77
+ USER: 'user.json',
78
+ /** 配置檔範例名稱 */
79
+ USER_EXAMPLE: 'user-config-example.json',
80
+ };
81
+ /**
82
+ * 輔助函式:取得 MSSQL 所有資料目錄
83
+ */
84
+ function getMssqlDataDirectories() {
85
+ return [
86
+ exports.LINUX_PATHS.MSSQL_DATA_DIR,
87
+ exports.LINUX_PATHS.MSSQL_LOG_DIR,
88
+ exports.LINUX_PATHS.MSSQL_TEMP_DIR,
89
+ exports.LINUX_PATHS.MSSQL_USERDB_DIR,
90
+ ];
91
+ }
92
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /**
3
+ * 超時時間常數
4
+ *
5
+ * 定義專案中所有與時間相關的超時設定
6
+ * 所有時間值單位為毫秒 (ms)
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.TIMEOUTS = void 0;
10
+ /**
11
+ * 超時時間常數集合
12
+ */
13
+ exports.TIMEOUTS = {
14
+ // ============================================================================
15
+ // WSL 相關超時
16
+ // ============================================================================
17
+ /** WSL 啟動後等待時間 (2 秒) */
18
+ WSL_STARTUP_DELAY: 2000,
19
+ /** WSL 停止後等待時間 (5 秒) */
20
+ WSL_SHUTDOWN_DELAY: 5000,
21
+ /** WSL 完全啟動等待時間 (10 秒) */
22
+ WSL_FULL_STARTUP: 10000,
23
+ /** WSL 設定套用後等待時間 (2 秒) */
24
+ WSL_CONFIG_APPLY: 2000,
25
+ // ============================================================================
26
+ // Kubernetes 相關超時
27
+ // ============================================================================
28
+ /** Kubernetes 就緒等待總時間 (5 分鐘) */
29
+ K8S_READY_TIMEOUT: 300000,
30
+ /** Kubernetes 就緒檢查間隔 (5 秒) */
31
+ K8S_READY_CHECK_INTERVAL: 5000,
32
+ /** MicroK8s 啟動後等待時間 (5 秒) */
33
+ MICROK8S_STARTUP: 5000,
34
+ /** Helm 安裝後等待時間 (5 秒) */
35
+ HELM_INSTALL_WAIT: 5000,
36
+ /** 狀態監控檢查間隔 (5 秒) */
37
+ STATUS_MONITOR_INTERVAL: 5000,
38
+ // ============================================================================
39
+ // 網路相關超時
40
+ // ============================================================================
41
+ /** 網路連線檢查超時 (5 秒) */
42
+ NETWORK_CHECK: 5000,
43
+ // ============================================================================
44
+ // 健康檢查相關
45
+ // ============================================================================
46
+ /** 後台健康檢查總超時時間 (5 分鐘) */
47
+ ADMIN_HEALTH_CHECK_TIMEOUT: 5 * 60 * 1000,
48
+ /** 健康檢查單次請求超時 (10 秒) */
49
+ HEALTH_CHECK_REQUEST_TIMEOUT: 10 * 1000,
50
+ /** 健康檢查重試間隔 (5 秒) */
51
+ HEALTH_CHECK_RETRY_INTERVAL: 5000,
52
+ // ============================================================================
53
+ // 指令執行相關
54
+ // ============================================================================
55
+ /** 一般指令執行超時 (60 秒) */
56
+ COMMAND_EXECUTION: 60000,
57
+ /** 腳本執行超時 (30 分鐘) - 用於系統初始化等長時間操作 */
58
+ SCRIPT_EXECUTION: 30 * 60 * 1000,
59
+ };
60
+ //# sourceMappingURL=timeouts.js.map
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.container = void 0;
4
+ exports.initializeContainer = initializeContainer;
5
+ require("reflect-metadata");
6
+ const tsyringe_1 = require("tsyringe");
7
+ Object.defineProperty(exports, "container", { enumerable: true, get: function () { return tsyringe_1.container; } });
8
+ const infrastructure_module_1 = require("./modules/infrastructure.module");
9
+ const application_module_1 = require("./modules/application.module");
10
+ const presentation_module_1 = require("./modules/presentation.module");
11
+ const interceptor_module_1 = require("./modules/interceptor.module");
12
+ /**
13
+ * 初始化 DI 容器
14
+ *
15
+ * 註冊順序:
16
+ * 1. Infrastructure - Domain Ports 的實作
17
+ * 2. Application - Use Cases(依賴 Infrastructure)
18
+ * 3. Presentation - Controllers 和 UI(依賴 Application)
19
+ * 4. Interceptor - 攔截器模組(最後註冊,套用到已註冊的服務)
20
+ */
21
+ function initializeContainer() {
22
+ // 清空容器(用於測試環境)
23
+ tsyringe_1.container.clearInstances();
24
+ // 依序註冊各層模組
25
+ (0, infrastructure_module_1.registerInfrastructureModule)();
26
+ (0, application_module_1.registerApplicationModule)();
27
+ (0, presentation_module_1.registerPresentationModule)();
28
+ // 註冊攔截器模組並套用到已註冊的服務
29
+ (0, interceptor_module_1.registerInterceptorModule)();
30
+ (0, interceptor_module_1.applyInterceptors)();
31
+ }
32
+ // 自動初始化容器
33
+ initializeContainer();
34
+ //# sourceMappingURL=container.js.map
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * DI Container 匯出
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./container"), exports);
21
+ __exportStar(require("./tokens"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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");
22
+ /**
23
+ * Application Module
24
+ * 註冊所有 Application 層的服務(Use Cases)
25
+ */
26
+ 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);
53
+ }
54
+ //# sourceMappingURL=application.module.js.map