@minecraft-docker/shared 1.6.0 → 1.6.2

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 (261) hide show
  1. package/dist/application/index.d.ts +3 -0
  2. package/dist/application/index.d.ts.map +1 -0
  3. package/dist/application/index.js +5 -0
  4. package/dist/application/index.js.map +1 -0
  5. package/dist/application/ports/inbound/IBackupUseCase.d.ts +69 -0
  6. package/dist/application/ports/inbound/IBackupUseCase.d.ts.map +1 -0
  7. package/dist/application/ports/inbound/IBackupUseCase.js +2 -0
  8. package/dist/application/ports/inbound/IBackupUseCase.js.map +1 -0
  9. package/dist/application/ports/inbound/ICreateServerUseCase.d.ts +32 -0
  10. package/dist/application/ports/inbound/ICreateServerUseCase.d.ts.map +1 -0
  11. package/dist/application/ports/inbound/ICreateServerUseCase.js +2 -0
  12. package/dist/application/ports/inbound/ICreateServerUseCase.js.map +1 -0
  13. package/dist/application/ports/inbound/IDeleteServerUseCase.d.ts +26 -0
  14. package/dist/application/ports/inbound/IDeleteServerUseCase.d.ts.map +1 -0
  15. package/dist/application/ports/inbound/IDeleteServerUseCase.js +2 -0
  16. package/dist/application/ports/inbound/IDeleteServerUseCase.js.map +1 -0
  17. package/dist/application/ports/inbound/IPlayerLookupUseCase.d.ts +47 -0
  18. package/dist/application/ports/inbound/IPlayerLookupUseCase.d.ts.map +1 -0
  19. package/dist/application/ports/inbound/IPlayerLookupUseCase.js +2 -0
  20. package/dist/application/ports/inbound/IPlayerLookupUseCase.js.map +1 -0
  21. package/dist/application/ports/inbound/IServerStatusUseCase.d.ts +34 -0
  22. package/dist/application/ports/inbound/IServerStatusUseCase.d.ts.map +1 -0
  23. package/dist/application/ports/inbound/IServerStatusUseCase.js +2 -0
  24. package/dist/application/ports/inbound/IServerStatusUseCase.js.map +1 -0
  25. package/dist/application/ports/inbound/IWorldManagementUseCase.d.ts +97 -0
  26. package/dist/application/ports/inbound/IWorldManagementUseCase.d.ts.map +1 -0
  27. package/dist/application/ports/inbound/IWorldManagementUseCase.js +2 -0
  28. package/dist/application/ports/inbound/IWorldManagementUseCase.js.map +1 -0
  29. package/dist/application/ports/inbound/index.d.ts +7 -0
  30. package/dist/application/ports/inbound/index.d.ts.map +1 -0
  31. package/dist/application/ports/inbound/index.js +2 -0
  32. package/dist/application/ports/inbound/index.js.map +1 -0
  33. package/dist/application/ports/index.d.ts +3 -0
  34. package/dist/application/ports/index.d.ts.map +1 -0
  35. package/dist/application/ports/index.js +2 -0
  36. package/dist/application/ports/index.js.map +1 -0
  37. package/dist/application/ports/outbound/IDocProvider.d.ts +73 -0
  38. package/dist/application/ports/outbound/IDocProvider.d.ts.map +1 -0
  39. package/dist/application/ports/outbound/IDocProvider.js +2 -0
  40. package/dist/application/ports/outbound/IDocProvider.js.map +1 -0
  41. package/dist/application/ports/outbound/IModSourcePort.d.ts +71 -0
  42. package/dist/application/ports/outbound/IModSourcePort.d.ts.map +1 -0
  43. package/dist/application/ports/outbound/IModSourcePort.js +19 -0
  44. package/dist/application/ports/outbound/IModSourcePort.js.map +1 -0
  45. package/dist/application/ports/outbound/IPromptPort.d.ts +148 -0
  46. package/dist/application/ports/outbound/IPromptPort.d.ts.map +1 -0
  47. package/dist/application/ports/outbound/IPromptPort.js +2 -0
  48. package/dist/application/ports/outbound/IPromptPort.js.map +1 -0
  49. package/dist/application/ports/outbound/IServerRepository.d.ts +54 -0
  50. package/dist/application/ports/outbound/IServerRepository.d.ts.map +1 -0
  51. package/dist/application/ports/outbound/IServerRepository.js +2 -0
  52. package/dist/application/ports/outbound/IServerRepository.js.map +1 -0
  53. package/dist/application/ports/outbound/IServiceManagerPort.d.ts +115 -0
  54. package/dist/application/ports/outbound/IServiceManagerPort.d.ts.map +1 -0
  55. package/dist/application/ports/outbound/IServiceManagerPort.js +2 -0
  56. package/dist/application/ports/outbound/IServiceManagerPort.js.map +1 -0
  57. package/dist/application/ports/outbound/IShellPort.d.ts +114 -0
  58. package/dist/application/ports/outbound/IShellPort.d.ts.map +1 -0
  59. package/dist/application/ports/outbound/IShellPort.js +2 -0
  60. package/dist/application/ports/outbound/IShellPort.js.map +1 -0
  61. package/dist/application/ports/outbound/IUserRepository.d.ts +42 -0
  62. package/dist/application/ports/outbound/IUserRepository.d.ts.map +1 -0
  63. package/dist/application/ports/outbound/IUserRepository.js +2 -0
  64. package/dist/application/ports/outbound/IUserRepository.js.map +1 -0
  65. package/dist/application/ports/outbound/IWorldRepository.d.ts +90 -0
  66. package/dist/application/ports/outbound/IWorldRepository.d.ts.map +1 -0
  67. package/dist/application/ports/outbound/IWorldRepository.js +2 -0
  68. package/dist/application/ports/outbound/IWorldRepository.js.map +1 -0
  69. package/dist/application/ports/outbound/index.d.ts +9 -0
  70. package/dist/application/ports/outbound/index.d.ts.map +1 -0
  71. package/dist/application/ports/outbound/index.js +2 -0
  72. package/dist/application/ports/outbound/index.js.map +1 -0
  73. package/dist/application/use-cases/BackupUseCase.d.ts +35 -0
  74. package/dist/application/use-cases/BackupUseCase.d.ts.map +1 -0
  75. package/dist/application/use-cases/BackupUseCase.js +222 -0
  76. package/dist/application/use-cases/BackupUseCase.js.map +1 -0
  77. package/dist/application/use-cases/CreateServerUseCase.d.ts +22 -0
  78. package/dist/application/use-cases/CreateServerUseCase.d.ts.map +1 -0
  79. package/dist/application/use-cases/CreateServerUseCase.js +144 -0
  80. package/dist/application/use-cases/CreateServerUseCase.js.map +1 -0
  81. package/dist/application/use-cases/DeleteServerUseCase.d.ts +24 -0
  82. package/dist/application/use-cases/DeleteServerUseCase.d.ts.map +1 -0
  83. package/dist/application/use-cases/DeleteServerUseCase.js +108 -0
  84. package/dist/application/use-cases/DeleteServerUseCase.js.map +1 -0
  85. package/dist/application/use-cases/PlayerLookupUseCase.d.ts +23 -0
  86. package/dist/application/use-cases/PlayerLookupUseCase.d.ts.map +1 -0
  87. package/dist/application/use-cases/PlayerLookupUseCase.js +130 -0
  88. package/dist/application/use-cases/PlayerLookupUseCase.js.map +1 -0
  89. package/dist/application/use-cases/ServerStatusUseCase.d.ts +30 -0
  90. package/dist/application/use-cases/ServerStatusUseCase.d.ts.map +1 -0
  91. package/dist/application/use-cases/ServerStatusUseCase.js +117 -0
  92. package/dist/application/use-cases/ServerStatusUseCase.js.map +1 -0
  93. package/dist/application/use-cases/WorldManagementUseCase.d.ts +50 -0
  94. package/dist/application/use-cases/WorldManagementUseCase.d.ts.map +1 -0
  95. package/dist/application/use-cases/WorldManagementUseCase.js +571 -0
  96. package/dist/application/use-cases/WorldManagementUseCase.js.map +1 -0
  97. package/dist/application/use-cases/index.d.ts +7 -0
  98. package/dist/application/use-cases/index.d.ts.map +1 -0
  99. package/dist/application/use-cases/index.js +7 -0
  100. package/dist/application/use-cases/index.js.map +1 -0
  101. package/dist/docker/index.d.ts +125 -0
  102. package/dist/docker/index.d.ts.map +1 -0
  103. package/dist/docker/index.js +557 -0
  104. package/dist/docker/index.js.map +1 -0
  105. package/dist/domain/entities/Server.d.ts +77 -0
  106. package/dist/domain/entities/Server.d.ts.map +1 -0
  107. package/dist/domain/entities/Server.js +138 -0
  108. package/dist/domain/entities/Server.js.map +1 -0
  109. package/dist/domain/entities/User.d.ts +77 -0
  110. package/dist/domain/entities/User.d.ts.map +1 -0
  111. package/dist/domain/entities/User.js +121 -0
  112. package/dist/domain/entities/User.js.map +1 -0
  113. package/dist/domain/entities/World.d.ts +76 -0
  114. package/dist/domain/entities/World.d.ts.map +1 -0
  115. package/dist/domain/entities/World.js +141 -0
  116. package/dist/domain/entities/World.js.map +1 -0
  117. package/dist/domain/entities/index.d.ts +4 -0
  118. package/dist/domain/entities/index.d.ts.map +1 -0
  119. package/dist/domain/entities/index.js +4 -0
  120. package/dist/domain/entities/index.js.map +1 -0
  121. package/dist/domain/index.d.ts +3 -0
  122. package/dist/domain/index.d.ts.map +1 -0
  123. package/dist/domain/index.js +7 -0
  124. package/dist/domain/index.js.map +1 -0
  125. package/dist/domain/mod/ModDependency.d.ts +18 -0
  126. package/dist/domain/mod/ModDependency.d.ts.map +1 -0
  127. package/dist/domain/mod/ModDependency.js +5 -0
  128. package/dist/domain/mod/ModDependency.js.map +1 -0
  129. package/dist/domain/mod/ModFile.d.ts +27 -0
  130. package/dist/domain/mod/ModFile.d.ts.map +1 -0
  131. package/dist/domain/mod/ModFile.js +5 -0
  132. package/dist/domain/mod/ModFile.js.map +1 -0
  133. package/dist/domain/mod/ModProject.d.ts +36 -0
  134. package/dist/domain/mod/ModProject.d.ts.map +1 -0
  135. package/dist/domain/mod/ModProject.js +5 -0
  136. package/dist/domain/mod/ModProject.js.map +1 -0
  137. package/dist/domain/mod/ModSearchResult.d.ts +18 -0
  138. package/dist/domain/mod/ModSearchResult.d.ts.map +1 -0
  139. package/dist/domain/mod/ModSearchResult.js +5 -0
  140. package/dist/domain/mod/ModSearchResult.js.map +1 -0
  141. package/dist/domain/mod/ModVersion.d.ts +36 -0
  142. package/dist/domain/mod/ModVersion.d.ts.map +1 -0
  143. package/dist/domain/mod/ModVersion.js +5 -0
  144. package/dist/domain/mod/ModVersion.js.map +1 -0
  145. package/dist/domain/mod/index.d.ts +11 -0
  146. package/dist/domain/mod/index.d.ts.map +1 -0
  147. package/dist/domain/mod/index.js +6 -0
  148. package/dist/domain/mod/index.js.map +1 -0
  149. package/dist/domain/mod/types.d.ts +43 -0
  150. package/dist/domain/mod/types.d.ts.map +1 -0
  151. package/dist/domain/mod/types.js +6 -0
  152. package/dist/domain/mod/types.js.map +1 -0
  153. package/dist/domain/value-objects/McVersion.d.ts +35 -0
  154. package/dist/domain/value-objects/McVersion.d.ts.map +1 -0
  155. package/dist/domain/value-objects/McVersion.js +117 -0
  156. package/dist/domain/value-objects/McVersion.js.map +1 -0
  157. package/dist/domain/value-objects/Memory.d.ts +37 -0
  158. package/dist/domain/value-objects/Memory.d.ts.map +1 -0
  159. package/dist/domain/value-objects/Memory.js +107 -0
  160. package/dist/domain/value-objects/Memory.js.map +1 -0
  161. package/dist/domain/value-objects/ProcessInfo.d.ts +99 -0
  162. package/dist/domain/value-objects/ProcessInfo.d.ts.map +1 -0
  163. package/dist/domain/value-objects/ProcessInfo.js +171 -0
  164. package/dist/domain/value-objects/ProcessInfo.js.map +1 -0
  165. package/dist/domain/value-objects/Role.d.ts +41 -0
  166. package/dist/domain/value-objects/Role.d.ts.map +1 -0
  167. package/dist/domain/value-objects/Role.js +66 -0
  168. package/dist/domain/value-objects/Role.js.map +1 -0
  169. package/dist/domain/value-objects/ServerName.d.ts +21 -0
  170. package/dist/domain/value-objects/ServerName.d.ts.map +1 -0
  171. package/dist/domain/value-objects/ServerName.js +58 -0
  172. package/dist/domain/value-objects/ServerName.js.map +1 -0
  173. package/dist/domain/value-objects/ServerType.d.ts +40 -0
  174. package/dist/domain/value-objects/ServerType.d.ts.map +1 -0
  175. package/dist/domain/value-objects/ServerType.js +136 -0
  176. package/dist/domain/value-objects/ServerType.js.map +1 -0
  177. package/dist/domain/value-objects/ServiceStatus.d.ts +64 -0
  178. package/dist/domain/value-objects/ServiceStatus.d.ts.map +1 -0
  179. package/dist/domain/value-objects/ServiceStatus.js +99 -0
  180. package/dist/domain/value-objects/ServiceStatus.js.map +1 -0
  181. package/dist/domain/value-objects/UserId.d.ts +21 -0
  182. package/dist/domain/value-objects/UserId.d.ts.map +1 -0
  183. package/dist/domain/value-objects/UserId.js +43 -0
  184. package/dist/domain/value-objects/UserId.js.map +1 -0
  185. package/dist/domain/value-objects/Username.d.ts +16 -0
  186. package/dist/domain/value-objects/Username.d.ts.map +1 -0
  187. package/dist/domain/value-objects/Username.js +46 -0
  188. package/dist/domain/value-objects/Username.js.map +1 -0
  189. package/dist/domain/value-objects/WorldOptions.d.ts +49 -0
  190. package/dist/domain/value-objects/WorldOptions.d.ts.map +1 -0
  191. package/dist/domain/value-objects/WorldOptions.js +149 -0
  192. package/dist/domain/value-objects/WorldOptions.js.map +1 -0
  193. package/dist/domain/value-objects/index.d.ts +11 -0
  194. package/dist/domain/value-objects/index.d.ts.map +1 -0
  195. package/dist/domain/value-objects/index.js +13 -0
  196. package/dist/domain/value-objects/index.js.map +1 -0
  197. package/dist/index.d.ts +9 -0
  198. package/dist/index.d.ts.map +1 -0
  199. package/dist/index.js +21 -0
  200. package/dist/index.js.map +1 -0
  201. package/dist/infrastructure/adapters/ApiPromptAdapter.d.ts +115 -0
  202. package/dist/infrastructure/adapters/ApiPromptAdapter.d.ts.map +1 -0
  203. package/dist/infrastructure/adapters/ApiPromptAdapter.js +268 -0
  204. package/dist/infrastructure/adapters/ApiPromptAdapter.js.map +1 -0
  205. package/dist/infrastructure/adapters/DocsAdapter.d.ts +45 -0
  206. package/dist/infrastructure/adapters/DocsAdapter.d.ts.map +1 -0
  207. package/dist/infrastructure/adapters/DocsAdapter.js +490 -0
  208. package/dist/infrastructure/adapters/DocsAdapter.js.map +1 -0
  209. package/dist/infrastructure/adapters/ServerRepository.d.ts +49 -0
  210. package/dist/infrastructure/adapters/ServerRepository.d.ts.map +1 -0
  211. package/dist/infrastructure/adapters/ServerRepository.js +206 -0
  212. package/dist/infrastructure/adapters/ServerRepository.js.map +1 -0
  213. package/dist/infrastructure/adapters/ShellAdapter.d.ts +41 -0
  214. package/dist/infrastructure/adapters/ShellAdapter.d.ts.map +1 -0
  215. package/dist/infrastructure/adapters/ShellAdapter.js +198 -0
  216. package/dist/infrastructure/adapters/ShellAdapter.js.map +1 -0
  217. package/dist/infrastructure/adapters/SqliteUserRepository.d.ts +70 -0
  218. package/dist/infrastructure/adapters/SqliteUserRepository.d.ts.map +1 -0
  219. package/dist/infrastructure/adapters/SqliteUserRepository.js +149 -0
  220. package/dist/infrastructure/adapters/SqliteUserRepository.js.map +1 -0
  221. package/dist/infrastructure/adapters/WorldRepository.d.ts +67 -0
  222. package/dist/infrastructure/adapters/WorldRepository.d.ts.map +1 -0
  223. package/dist/infrastructure/adapters/WorldRepository.js +283 -0
  224. package/dist/infrastructure/adapters/WorldRepository.js.map +1 -0
  225. package/dist/infrastructure/adapters/YamlUserRepository.d.ts +67 -0
  226. package/dist/infrastructure/adapters/YamlUserRepository.d.ts.map +1 -0
  227. package/dist/infrastructure/adapters/YamlUserRepository.js +161 -0
  228. package/dist/infrastructure/adapters/YamlUserRepository.js.map +1 -0
  229. package/dist/infrastructure/adapters/index.d.ts +12 -0
  230. package/dist/infrastructure/adapters/index.d.ts.map +1 -0
  231. package/dist/infrastructure/adapters/index.js +12 -0
  232. package/dist/infrastructure/adapters/index.js.map +1 -0
  233. package/dist/infrastructure/config/Pm2EcosystemConfig.d.ts +192 -0
  234. package/dist/infrastructure/config/Pm2EcosystemConfig.d.ts.map +1 -0
  235. package/dist/infrastructure/config/Pm2EcosystemConfig.js +48 -0
  236. package/dist/infrastructure/config/Pm2EcosystemConfig.js.map +1 -0
  237. package/dist/infrastructure/config/index.d.ts +6 -0
  238. package/dist/infrastructure/config/index.d.ts.map +1 -0
  239. package/dist/infrastructure/config/index.js +6 -0
  240. package/dist/infrastructure/config/index.js.map +1 -0
  241. package/dist/infrastructure/factories/ModSourceFactory.d.ts +73 -0
  242. package/dist/infrastructure/factories/ModSourceFactory.d.ts.map +1 -0
  243. package/dist/infrastructure/factories/ModSourceFactory.js +98 -0
  244. package/dist/infrastructure/factories/ModSourceFactory.js.map +1 -0
  245. package/dist/infrastructure/factories/index.d.ts +5 -0
  246. package/dist/infrastructure/factories/index.d.ts.map +1 -0
  247. package/dist/infrastructure/factories/index.js +5 -0
  248. package/dist/infrastructure/factories/index.js.map +1 -0
  249. package/dist/infrastructure/index.d.ts +7 -0
  250. package/dist/infrastructure/index.d.ts.map +1 -0
  251. package/dist/infrastructure/index.js +7 -0
  252. package/dist/infrastructure/index.js.map +1 -0
  253. package/dist/types/index.d.ts +151 -0
  254. package/dist/types/index.d.ts.map +1 -0
  255. package/dist/types/index.js +2 -0
  256. package/dist/types/index.js.map +1 -0
  257. package/dist/utils/index.d.ts +81 -0
  258. package/dist/utils/index.d.ts.map +1 -0
  259. package/dist/utils/index.js +200 -0
  260. package/dist/utils/index.js.map +1 -0
  261. package/package.json +10 -2
@@ -0,0 +1,149 @@
1
+ /**
2
+ * WorldOptions Value Object
3
+ * Represents world configuration options for server creation
4
+ */
5
+ export var WorldSetupType;
6
+ (function (WorldSetupType) {
7
+ WorldSetupType["NEW"] = "new";
8
+ WorldSetupType["EXISTING"] = "existing";
9
+ WorldSetupType["DOWNLOAD"] = "download";
10
+ })(WorldSetupType || (WorldSetupType = {}));
11
+ export class WorldOptions {
12
+ _data;
13
+ constructor(_data) {
14
+ this._data = _data;
15
+ Object.freeze(this);
16
+ Object.freeze(this._data);
17
+ }
18
+ get setupType() {
19
+ return this._data.setupType;
20
+ }
21
+ get seed() {
22
+ return this._data.seed;
23
+ }
24
+ get worldName() {
25
+ return this._data.worldName;
26
+ }
27
+ get downloadUrl() {
28
+ return this._data.downloadUrl;
29
+ }
30
+ get isNewWorld() {
31
+ return this._data.setupType === WorldSetupType.NEW;
32
+ }
33
+ get isExistingWorld() {
34
+ return this._data.setupType === WorldSetupType.EXISTING;
35
+ }
36
+ get isDownloadWorld() {
37
+ return this._data.setupType === WorldSetupType.DOWNLOAD;
38
+ }
39
+ /**
40
+ * Convert to CLI arguments for create-server.sh
41
+ */
42
+ toCliArgs() {
43
+ const args = [];
44
+ switch (this._data.setupType) {
45
+ case WorldSetupType.NEW:
46
+ if (this._data.seed) {
47
+ args.push('-s', this._data.seed);
48
+ }
49
+ break;
50
+ case WorldSetupType.EXISTING:
51
+ if (this._data.worldName) {
52
+ args.push('-w', this._data.worldName);
53
+ }
54
+ break;
55
+ case WorldSetupType.DOWNLOAD:
56
+ if (this._data.downloadUrl) {
57
+ args.push('-u', this._data.downloadUrl);
58
+ }
59
+ break;
60
+ }
61
+ return args;
62
+ }
63
+ /**
64
+ * Create new world options (optionally with seed)
65
+ */
66
+ static newWorld(seed) {
67
+ if (seed !== undefined) {
68
+ const trimmedSeed = seed.trim();
69
+ if (!trimmedSeed) {
70
+ throw new Error('World seed cannot be empty if provided');
71
+ }
72
+ // Seed can be any string or number
73
+ return new WorldOptions({
74
+ setupType: WorldSetupType.NEW,
75
+ seed: trimmedSeed,
76
+ });
77
+ }
78
+ return new WorldOptions({
79
+ setupType: WorldSetupType.NEW,
80
+ });
81
+ }
82
+ /**
83
+ * Use existing world from worlds/ directory
84
+ */
85
+ static existingWorld(worldName) {
86
+ const trimmed = worldName.trim();
87
+ if (!trimmed) {
88
+ throw new Error('World name cannot be empty');
89
+ }
90
+ // World name validation: lowercase letters, numbers, hyphens, underscores
91
+ if (!/^[a-z0-9_-]+$/i.test(trimmed)) {
92
+ throw new Error('World name can only contain letters, numbers, hyphens, and underscores');
93
+ }
94
+ return new WorldOptions({
95
+ setupType: WorldSetupType.EXISTING,
96
+ worldName: trimmed,
97
+ });
98
+ }
99
+ /**
100
+ * Download world from URL (ZIP file)
101
+ */
102
+ static downloadWorld(url) {
103
+ const trimmed = url.trim();
104
+ if (!trimmed) {
105
+ throw new Error('Download URL cannot be empty');
106
+ }
107
+ // Basic URL validation
108
+ try {
109
+ const parsedUrl = new URL(trimmed);
110
+ if (!['http:', 'https:'].includes(parsedUrl.protocol)) {
111
+ throw new Error('Download URL must use HTTP or HTTPS protocol');
112
+ }
113
+ }
114
+ catch (error) {
115
+ // Re-throw if it's our protocol error
116
+ if (error instanceof Error && error.message.includes('HTTP or HTTPS')) {
117
+ throw error;
118
+ }
119
+ throw new Error(`Invalid download URL: ${trimmed}`);
120
+ }
121
+ return new WorldOptions({
122
+ setupType: WorldSetupType.DOWNLOAD,
123
+ downloadUrl: trimmed,
124
+ });
125
+ }
126
+ /**
127
+ * Default: new world without seed
128
+ */
129
+ static default() {
130
+ return WorldOptions.newWorld();
131
+ }
132
+ equals(other) {
133
+ return (this._data.setupType === other._data.setupType &&
134
+ this._data.seed === other._data.seed &&
135
+ this._data.worldName === other._data.worldName &&
136
+ this._data.downloadUrl === other._data.downloadUrl);
137
+ }
138
+ toString() {
139
+ switch (this._data.setupType) {
140
+ case WorldSetupType.NEW:
141
+ return this._data.seed ? `New world (seed: ${this._data.seed})` : 'New world';
142
+ case WorldSetupType.EXISTING:
143
+ return `Existing world: ${this._data.worldName}`;
144
+ case WorldSetupType.DOWNLOAD:
145
+ return `Download from: ${this._data.downloadUrl}`;
146
+ }
147
+ }
148
+ }
149
+ //# sourceMappingURL=WorldOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorldOptions.js","sourceRoot":"","sources":["../../../src/domain/value-objects/WorldOptions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AASD,MAAM,OAAO,YAAY;IACc;IAArC,YAAqC,KAAuB;QAAvB,UAAK,GAAL,KAAK,CAAkB;QAC1D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;IAC9B,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,cAAc,CAAC,GAAG,CAAC;IACrD,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,cAAc,CAAC,QAAQ,CAAC;IAC1D,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,cAAc,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I,YAAY,CAAC;YACtB,SAAS,EAAE,cAAc,CAAC,QAAQ;YAClC,WAAW,EAAE,OAAO;SACrB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAO;QACZ,OAAO,YAAY,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,KAAmB;QACxB,OAAO,CACL,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,KAAK,CAAC,SAAS;YAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI;YACpC,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,KAAK,CAAC,SAAS;YAC9C,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,KAAK,CAAC,KAAK,CAAC,WAAW,CACnD,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,QAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YAC7B,KAAK,cAAc,CAAC,GAAG;gBACrB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;YAChF,KAAK,cAAc,CAAC,QAAQ;gBAC1B,OAAO,mBAAmB,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YACnD,KAAK,cAAc,CAAC,QAAQ;gBAC1B,OAAO,kBAAkB,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,11 @@
1
+ export { ServerName } from './ServerName.js';
2
+ export { ServerType, ServerTypeEnum, type ServerTypeInfo } from './ServerType.js';
3
+ export { McVersion } from './McVersion.js';
4
+ export { Memory } from './Memory.js';
5
+ export { WorldOptions, WorldSetupType, type WorldOptionsData } from './WorldOptions.js';
6
+ export { UserId } from './UserId.js';
7
+ export { Username } from './Username.js';
8
+ export { Role, RoleEnum } from './Role.js';
9
+ export { ServiceStatus, ServiceStatusEnum } from './ServiceStatus.js';
10
+ export { ProcessInfo, type ProcessInfoData, type ProcessMetrics } from './ProcessInfo.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/value-objects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGxF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export { ServerName } from './ServerName.js';
2
+ export { ServerType, ServerTypeEnum } from './ServerType.js';
3
+ export { McVersion } from './McVersion.js';
4
+ export { Memory } from './Memory.js';
5
+ export { WorldOptions, WorldSetupType } from './WorldOptions.js';
6
+ // User-related value objects
7
+ export { UserId } from './UserId.js';
8
+ export { Username } from './Username.js';
9
+ export { Role, RoleEnum } from './Role.js';
10
+ // Service management value objects
11
+ export { ServiceStatus, ServiceStatusEnum } from './ServiceStatus.js';
12
+ export { ProcessInfo } from './ProcessInfo.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/value-objects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAuB,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAyB,MAAM,mBAAmB,CAAC;AAExF,6BAA6B;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE3C,mCAAmC;AACnC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,WAAW,EAA6C,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { type ContainerStatus, type HealthStatus, type ServerInfo, type RouterInfo, type AvahiInfo, type PlatformStatus, type McctlConfig, type ServerType as LegacyServerType, type ServerConfig as LegacyServerConfig, type EnvConfig, type LockStatus, type WorldLock as LegacyWorldLock, type BackupInfo, type BackupStatus, type PlayerInfo, type CommandResult, type ContainerStats, type PlayerListResult, type DetailedServerInfo, type RouterDetailInfo, type RouteInfo, } from './types/index.js';
2
+ export { Paths, Config, colors, log, getPackageRoot } from './utils/index.js';
3
+ export { checkDocker, checkDockerCompose, getContainerStatus, getContainerHealth, containerExists, getContainerHostname, getMcContainers, getRunningMcContainers, getServerInfo, getRouterInfo, getAvahiStatus, getPlatformStatus, startContainer, stopContainer, getContainerLogs, execScript, execScriptInteractive, getContainerStats, getContainerUptime, getOnlinePlayers, getDetailedServerInfo, getDetailedServerInfoWithPlayers, getRouterDetailInfo, formatBytes, } from './docker/index.js';
4
+ export { ServerName, ServerType, ServerTypeEnum, type ServerTypeInfo, McVersion, Memory, WorldOptions, WorldSetupType, type WorldOptionsData, UserId, Username, Role, RoleEnum, ServiceStatus, ServiceStatusEnum, ProcessInfo, type ProcessInfoData, type ProcessMetrics, Server, ServerStatus, type ServerConfig, World, WorldLockStatus, type WorldLock, User, type UserData, } from './domain/index.js';
5
+ export type { ModSideSupport, ModProjectType, ModVersionType, ModDependencyType, ModSearchIndex, ModSearchOptions, ModVersionOptions, ModProject, ModVersion, ModFile, ModFileHashes, ModDependency, ModSearchResult, } from './domain/mod/index.js';
6
+ export { ModSourceFactory } from './infrastructure/factories/index.js';
7
+ export * from './application/index.js';
8
+ export * from './infrastructure/index.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,IAAI,gBAAgB,EACnC,KAAK,YAAY,IAAI,kBAAkB,EACvC,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,SAAS,IAAI,eAAe,EACjC,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EAElB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAG9E,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EAErB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,gCAAgC,EAChC,mBAAmB,EACnB,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAEL,UAAU,EACV,UAAU,EACV,cAAc,EACd,KAAK,cAAc,EACnB,SAAS,EACT,MAAM,EACN,YAAY,EACZ,cAAc,EACd,KAAK,gBAAgB,EACrB,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,QAAQ,EAER,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,cAAc,EAEnB,MAAM,EACN,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,EACL,eAAe,EACf,KAAK,SAAS,EACd,IAAI,EACJ,KAAK,QAAQ,GACd,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,OAAO,EACP,aAAa,EACb,aAAa,EACb,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,cAAc,wBAAwB,CAAC;AAGvC,cAAc,2BAA2B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ // Re-export utilities
2
+ export { Paths, Config, colors, log, getPackageRoot } from './utils/index.js';
3
+ // Re-export docker utilities
4
+ export { checkDocker, checkDockerCompose, getContainerStatus, getContainerHealth, containerExists, getContainerHostname, getMcContainers, getRunningMcContainers, getServerInfo, getRouterInfo, getAvahiStatus, getPlatformStatus, startContainer, stopContainer, getContainerLogs, execScript, execScriptInteractive,
5
+ // New detailed functions
6
+ getContainerStats, getContainerUptime, getOnlinePlayers, getDetailedServerInfo, getDetailedServerInfoWithPlayers, getRouterDetailInfo, formatBytes, } from './docker/index.js';
7
+ // Re-export domain layer (Value Objects and Entities)
8
+ export {
9
+ // Value Objects
10
+ ServerName, ServerType, ServerTypeEnum, McVersion, Memory, WorldOptions, WorldSetupType, UserId, Username, Role, RoleEnum,
11
+ // Service management value objects
12
+ ServiceStatus, ServiceStatusEnum, ProcessInfo,
13
+ // Entities
14
+ Server, ServerStatus, World, WorldLockStatus, User, } from './domain/index.js';
15
+ // Re-export ModSourceFactory
16
+ export { ModSourceFactory } from './infrastructure/factories/index.js';
17
+ // Re-export application layer (ports and use-cases)
18
+ export * from './application/index.js';
19
+ // Re-export infrastructure layer (adapters)
20
+ export * from './infrastructure/index.js';
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA0BA,sBAAsB;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9E,6BAA6B;AAC7B,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,qBAAqB;AACrB,yBAAyB;AACzB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,gCAAgC,EAChC,mBAAmB,EACnB,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAE3B,sDAAsD;AACtD,OAAO;AACL,gBAAgB;AAChB,UAAU,EACV,UAAU,EACV,cAAc,EAEd,SAAS,EACT,MAAM,EACN,YAAY,EACZ,cAAc,EAEd,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,QAAQ;AACR,mCAAmC;AACnC,aAAa,EACb,iBAAiB,EACjB,WAAW;AAGX,WAAW;AACX,MAAM,EACN,YAAY,EAEZ,KAAK,EACL,eAAe,EAEf,IAAI,GAEL,MAAM,mBAAmB,CAAC;AAmB3B,6BAA6B;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE,oDAAoD;AACpD,cAAc,wBAAwB,CAAC;AAEvC,4CAA4C;AAC5C,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,115 @@
1
+ import { ServerName, ServerType, McVersion, Memory, WorldOptions, Server, World } from '../../domain/index.js';
2
+ import type { IPromptPort, TextPromptOptions, SelectPromptOptions, ConfirmPromptOptions, PasswordPromptOptions, Spinner } from '../../application/ports/outbound/IPromptPort.js';
3
+ import type { WorldWithServerStatus } from '../../application/ports/outbound/IWorldRepository.js';
4
+ /**
5
+ * World setup types for API options
6
+ */
7
+ export type WorldSetupType = 'new' | 'existing' | 'download';
8
+ /**
9
+ * Options for ApiPromptAdapter
10
+ * Pre-configured values that would normally be collected via interactive prompts
11
+ */
12
+ export interface ApiPromptOptions {
13
+ /** Server name (e.g., "myserver") */
14
+ serverName?: string;
15
+ /** Server type (e.g., "PAPER", "FORGE") */
16
+ serverType?: string;
17
+ /** Minecraft version (e.g., "1.21.1", "LATEST") */
18
+ mcVersion?: string;
19
+ /** Memory allocation (e.g., "4G", "2048M") */
20
+ memory?: string;
21
+ /** World setup type */
22
+ worldSetup?: WorldSetupType;
23
+ /** World name for existing world */
24
+ worldName?: string;
25
+ /** World seed for new world */
26
+ worldSeed?: string;
27
+ /** World download URL */
28
+ worldDownloadUrl?: string;
29
+ /** Password value for password prompts */
30
+ password?: string;
31
+ /** Default value for confirm prompts (defaults to true) */
32
+ confirmValue?: boolean;
33
+ }
34
+ /**
35
+ * Message types for collected output
36
+ */
37
+ export type MessageType = 'intro' | 'outro' | 'success' | 'error' | 'warn' | 'info' | 'note';
38
+ /**
39
+ * Collected message
40
+ */
41
+ export interface CollectedMessage {
42
+ type: MessageType;
43
+ message: string;
44
+ title?: string;
45
+ }
46
+ /**
47
+ * Error thrown when API mode operation is not supported
48
+ */
49
+ export declare class ApiModeError extends Error {
50
+ constructor(message: string);
51
+ }
52
+ /**
53
+ * ApiPromptAdapter
54
+ * Implements IPromptPort for API/non-interactive contexts.
55
+ * Returns pre-configured values instead of interactive prompts.
56
+ *
57
+ * Usage:
58
+ * ```typescript
59
+ * const adapter = new ApiPromptAdapter({
60
+ * serverName: 'myserver',
61
+ * serverType: 'PAPER',
62
+ * mcVersion: '1.21.1',
63
+ * memory: '4G',
64
+ * worldSetup: 'new',
65
+ * });
66
+ *
67
+ * // Use with UseCase
68
+ * const useCase = new CreateServerUseCase(adapter, shell, serverRepo);
69
+ * await useCase.execute({ mode: 'cli' }); // Uses pre-configured values
70
+ * ```
71
+ */
72
+ export declare class ApiPromptAdapter implements IPromptPort {
73
+ private readonly options;
74
+ private readonly messages;
75
+ constructor(options: ApiPromptOptions);
76
+ intro(message: string): void;
77
+ outro(message: string): void;
78
+ text(options: TextPromptOptions): Promise<string>;
79
+ select<T>(options: SelectPromptOptions<T>): Promise<T>;
80
+ confirm(_options: ConfirmPromptOptions): Promise<boolean>;
81
+ password(_options: PasswordPromptOptions): Promise<string>;
82
+ promptServerName(): Promise<ServerName>;
83
+ promptServerType(): Promise<ServerType>;
84
+ promptMcVersion(_serverType: ServerType): Promise<McVersion>;
85
+ promptMemory(): Promise<Memory>;
86
+ promptWorldOptions(): Promise<WorldOptions>;
87
+ promptServerSelection(servers: Server[]): Promise<Server>;
88
+ promptWorldSelection(worlds: World[]): Promise<World>;
89
+ promptExistingWorldSelection(worlds: WorldWithServerStatus[]): Promise<World | null>;
90
+ spinner(): Spinner;
91
+ success(message: string): void;
92
+ error(message: string): void;
93
+ warn(message: string): void;
94
+ info(message: string): void;
95
+ note(message: string, title?: string): void;
96
+ isCancel(_value: unknown): boolean;
97
+ handleCancel(): never;
98
+ /**
99
+ * Get all collected messages
100
+ */
101
+ getMessages(): CollectedMessage[];
102
+ /**
103
+ * Clear collected messages
104
+ */
105
+ clearMessages(): void;
106
+ /**
107
+ * Resolve text prompt value from options based on message context
108
+ */
109
+ private resolveTextValue;
110
+ /**
111
+ * Resolve select prompt value from options based on message context
112
+ */
113
+ private resolveSelectValue;
114
+ }
115
+ //# sourceMappingURL=ApiPromptAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiPromptAdapter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/adapters/ApiPromptAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACN,YAAY,EACZ,MAAM,EACN,KAAK,EACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,OAAO,EACR,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,gBAAgB,C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C;IAO5D,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAO/B,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC;IA8B3C,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBzD,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC;IAgBrD,4BAA4B,CAChC,MAAM,EAAE,qBAAqB,EAAE,GAC9B,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAsBxB,OAAO,IAAI,OAAO;IASlB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAQ3C,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;IAKlC,YAAY,IAAI,KAAK;IAQrB;;OAEG;IACH,WAAW,IAAI,gBAAgB,EAAE;IAIjC;;OAEG;IACH,aAAa,IAAI,IAAI;IAQrB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA4BxB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAkB3B"}
@@ -0,0 +1,268 @@
1
+ import { ServerName, ServerType, McVersion, Memory, WorldOptions, } from '../../domain/index.js';
2
+ /**
3
+ * Error thrown when API mode operation is not supported
4
+ */
5
+ export class ApiModeError extends Error {
6
+ constructor(message) {
7
+ super(message);
8
+ this.name = 'ApiModeError';
9
+ }
10
+ }
11
+ /**
12
+ * ApiPromptAdapter
13
+ * Implements IPromptPort for API/non-interactive contexts.
14
+ * Returns pre-configured values instead of interactive prompts.
15
+ *
16
+ * Usage:
17
+ * ```typescript
18
+ * const adapter = new ApiPromptAdapter({
19
+ * serverName: 'myserver',
20
+ * serverType: 'PAPER',
21
+ * mcVersion: '1.21.1',
22
+ * memory: '4G',
23
+ * worldSetup: 'new',
24
+ * });
25
+ *
26
+ * // Use with UseCase
27
+ * const useCase = new CreateServerUseCase(adapter, shell, serverRepo);
28
+ * await useCase.execute({ mode: 'cli' }); // Uses pre-configured values
29
+ * ```
30
+ */
31
+ export class ApiPromptAdapter {
32
+ options;
33
+ messages = [];
34
+ constructor(options) {
35
+ this.options = options;
36
+ }
37
+ // ========================================
38
+ // Basic Prompts
39
+ // ========================================
40
+ intro(message) {
41
+ this.messages.push({ type: 'intro', message });
42
+ }
43
+ outro(message) {
44
+ this.messages.push({ type: 'outro', message });
45
+ }
46
+ async text(options) {
47
+ // Try to match the prompt message to a known option
48
+ const value = this.resolveTextValue(options.message);
49
+ if (value !== undefined) {
50
+ return value;
51
+ }
52
+ throw new ApiModeError(`Value for prompt "${options.message}" is required in API mode. ` +
53
+ 'Please provide the appropriate option when creating ApiPromptAdapter.');
54
+ }
55
+ async select(options) {
56
+ // Try to match based on message context
57
+ const value = this.resolveSelectValue(options.message);
58
+ if (value !== undefined) {
59
+ // Verify the value is in the options list
60
+ const found = options.options.find((opt) => {
61
+ if (typeof opt.value === 'string') {
62
+ return opt.value.toLowerCase() === String(value).toLowerCase();
63
+ }
64
+ return opt.value === value;
65
+ });
66
+ if (found) {
67
+ return found.value;
68
+ }
69
+ }
70
+ // Return first option as fallback if available
71
+ if (options.options.length > 0 && options.initialValue !== undefined) {
72
+ return options.initialValue;
73
+ }
74
+ throw new ApiModeError(`Selection for prompt "${options.message}" is required in API mode.`);
75
+ }
76
+ async confirm(_options) {
77
+ // Default to true in API mode unless explicitly configured
78
+ return this.options.confirmValue ?? true;
79
+ }
80
+ async password(_options) {
81
+ if (this.options.password !== undefined) {
82
+ return this.options.password;
83
+ }
84
+ throw new ApiModeError('Password is required in API mode.');
85
+ }
86
+ // ========================================
87
+ // Domain-Specific Prompts
88
+ // ========================================
89
+ async promptServerName() {
90
+ if (!this.options.serverName) {
91
+ throw new ApiModeError('serverName is required in API mode');
92
+ }
93
+ return ServerName.create(this.options.serverName);
94
+ }
95
+ async promptServerType() {
96
+ if (!this.options.serverType) {
97
+ throw new ApiModeError('serverType is required in API mode');
98
+ }
99
+ return ServerType.create(this.options.serverType);
100
+ }
101
+ async promptMcVersion(_serverType) {
102
+ if (!this.options.mcVersion) {
103
+ throw new ApiModeError('mcVersion is required in API mode');
104
+ }
105
+ return McVersion.create(this.options.mcVersion);
106
+ }
107
+ async promptMemory() {
108
+ if (!this.options.memory) {
109
+ throw new ApiModeError('memory is required in API mode');
110
+ }
111
+ return Memory.create(this.options.memory);
112
+ }
113
+ async promptWorldOptions() {
114
+ if (!this.options.worldSetup) {
115
+ throw new ApiModeError('worldSetup is required in API mode');
116
+ }
117
+ switch (this.options.worldSetup) {
118
+ case 'new':
119
+ return WorldOptions.newWorld(this.options.worldSeed);
120
+ case 'existing':
121
+ if (!this.options.worldName) {
122
+ throw new ApiModeError('worldName is required when worldSetup is "existing"');
123
+ }
124
+ return WorldOptions.existingWorld(this.options.worldName);
125
+ case 'download':
126
+ if (!this.options.worldDownloadUrl) {
127
+ throw new ApiModeError('worldDownloadUrl is required when worldSetup is "download"');
128
+ }
129
+ return WorldOptions.downloadWorld(this.options.worldDownloadUrl);
130
+ default:
131
+ throw new ApiModeError(`Invalid worldSetup: ${this.options.worldSetup}`);
132
+ }
133
+ }
134
+ async promptServerSelection(servers) {
135
+ if (!this.options.serverName) {
136
+ throw new ApiModeError('serverName is required in API mode for server selection');
137
+ }
138
+ const server = servers.find((s) => s.name.value.toLowerCase() === this.options.serverName.toLowerCase());
139
+ if (!server) {
140
+ throw new ApiModeError(`Server '${this.options.serverName}' not found`);
141
+ }
142
+ return server;
143
+ }
144
+ async promptWorldSelection(worlds) {
145
+ if (!this.options.worldName) {
146
+ throw new ApiModeError('worldName is required in API mode for world selection');
147
+ }
148
+ const world = worlds.find((w) => w.name.toLowerCase() === this.options.worldName.toLowerCase());
149
+ if (!world) {
150
+ throw new ApiModeError(`World '${this.options.worldName}' not found`);
151
+ }
152
+ return world;
153
+ }
154
+ async promptExistingWorldSelection(worlds) {
155
+ // If no worldName is configured, return null (no selection)
156
+ if (!this.options.worldName) {
157
+ return null;
158
+ }
159
+ const worldEntry = worlds.find((w) => w.world.name.toLowerCase() === this.options.worldName.toLowerCase());
160
+ if (!worldEntry) {
161
+ throw new ApiModeError(`World '${this.options.worldName}' not found`);
162
+ }
163
+ // In API mode, we don't warn about stopped servers - caller should check
164
+ return worldEntry.world;
165
+ }
166
+ // ========================================
167
+ // Status Display
168
+ // ========================================
169
+ spinner() {
170
+ // Return a no-op spinner for API mode
171
+ return {
172
+ start: (_message) => { },
173
+ stop: (_message) => { },
174
+ message: (_message) => { },
175
+ };
176
+ }
177
+ success(message) {
178
+ this.messages.push({ type: 'success', message });
179
+ }
180
+ error(message) {
181
+ this.messages.push({ type: 'error', message });
182
+ }
183
+ warn(message) {
184
+ this.messages.push({ type: 'warn', message });
185
+ }
186
+ info(message) {
187
+ this.messages.push({ type: 'info', message });
188
+ }
189
+ note(message, title) {
190
+ this.messages.push({ type: 'note', message, title });
191
+ }
192
+ // ========================================
193
+ // Utility
194
+ // ========================================
195
+ isCancel(_value) {
196
+ // In API mode, there's no user interaction to cancel
197
+ return false;
198
+ }
199
+ handleCancel() {
200
+ throw new ApiModeError('Cancel not supported in API mode');
201
+ }
202
+ // ========================================
203
+ // API-specific methods
204
+ // ========================================
205
+ /**
206
+ * Get all collected messages
207
+ */
208
+ getMessages() {
209
+ return [...this.messages];
210
+ }
211
+ /**
212
+ * Clear collected messages
213
+ */
214
+ clearMessages() {
215
+ this.messages.length = 0;
216
+ }
217
+ // ========================================
218
+ // Private Helpers
219
+ // ========================================
220
+ /**
221
+ * Resolve text prompt value from options based on message context
222
+ */
223
+ resolveTextValue(message) {
224
+ const lowerMessage = message.toLowerCase();
225
+ if (lowerMessage.includes('server name')) {
226
+ return this.options.serverName;
227
+ }
228
+ if (lowerMessage.includes('version')) {
229
+ return this.options.mcVersion;
230
+ }
231
+ if (lowerMessage.includes('memory')) {
232
+ return this.options.memory;
233
+ }
234
+ if (lowerMessage.includes('world') && lowerMessage.includes('name')) {
235
+ return this.options.worldName;
236
+ }
237
+ if (lowerMessage.includes('seed')) {
238
+ return this.options.worldSeed;
239
+ }
240
+ if (lowerMessage.includes('url')) {
241
+ return this.options.worldDownloadUrl;
242
+ }
243
+ if (lowerMessage.includes('password')) {
244
+ return this.options.password;
245
+ }
246
+ return undefined;
247
+ }
248
+ /**
249
+ * Resolve select prompt value from options based on message context
250
+ */
251
+ resolveSelectValue(message) {
252
+ const lowerMessage = message.toLowerCase();
253
+ if (lowerMessage.includes('server type') || lowerMessage.includes('type')) {
254
+ return this.options.serverType;
255
+ }
256
+ if (lowerMessage.includes('version')) {
257
+ return this.options.mcVersion;
258
+ }
259
+ if (lowerMessage.includes('memory')) {
260
+ return this.options.memory;
261
+ }
262
+ if (lowerMessage.includes('world') && lowerMessage.includes('setup')) {
263
+ return this.options.worldSetup;
264
+ }
265
+ return undefined;
266
+ }
267
+ }
268
+ //# sourceMappingURL=ApiPromptAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiPromptAdapter.js","sourceRoot":"","sources":["../../../src/infrastructure/adapters/ApiPromptAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACN,YAAY,GAGb,MAAM,uBAAuB,CAAC;AAyD/B;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,gBAAgB;IACV,OAAO,CAAmB;IAC1B,QAAQ,GAAuB,EAAE,CAAC;IAEn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