@minecraft-docker/shared 1.6.1 → 1.6.3
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.
- package/dist/application/ports/inbound/IWorldManagementUseCase.d.ts +41 -0
- package/dist/application/ports/inbound/IWorldManagementUseCase.d.ts.map +1 -1
- package/dist/application/ports/inbound/index.d.ts +1 -1
- package/dist/application/ports/inbound/index.d.ts.map +1 -1
- package/dist/application/ports/index.d.ts +2 -2
- package/dist/application/ports/index.d.ts.map +1 -1
- package/dist/application/ports/outbound/IModSourcePort.d.ts +71 -0
- package/dist/application/ports/outbound/IModSourcePort.d.ts.map +1 -0
- package/dist/application/ports/outbound/IModSourcePort.js +19 -0
- package/dist/application/ports/outbound/IModSourcePort.js.map +1 -0
- package/dist/application/ports/outbound/IPromptPort.d.ts +12 -0
- package/dist/application/ports/outbound/IPromptPort.d.ts.map +1 -1
- package/dist/application/ports/outbound/IServiceManagerPort.d.ts +115 -0
- package/dist/application/ports/outbound/IServiceManagerPort.d.ts.map +1 -0
- package/dist/application/ports/outbound/IServiceManagerPort.js +2 -0
- package/dist/application/ports/outbound/IServiceManagerPort.js.map +1 -0
- package/dist/application/ports/outbound/IShellPort.d.ts +10 -2
- package/dist/application/ports/outbound/IShellPort.d.ts.map +1 -1
- package/dist/application/ports/outbound/IUserRepository.d.ts +42 -0
- package/dist/application/ports/outbound/IUserRepository.d.ts.map +1 -0
- package/dist/application/ports/outbound/IUserRepository.js +2 -0
- package/dist/application/ports/outbound/IUserRepository.js.map +1 -0
- package/dist/application/ports/outbound/IWorldRepository.d.ts +19 -0
- package/dist/application/ports/outbound/IWorldRepository.d.ts.map +1 -1
- package/dist/application/ports/outbound/index.d.ts +4 -1
- package/dist/application/ports/outbound/index.d.ts.map +1 -1
- package/dist/application/use-cases/CreateServerUseCase.d.ts.map +1 -1
- package/dist/application/use-cases/CreateServerUseCase.js +2 -3
- package/dist/application/use-cases/CreateServerUseCase.js.map +1 -1
- package/dist/application/use-cases/DeleteServerUseCase.js +5 -5
- package/dist/application/use-cases/DeleteServerUseCase.js.map +1 -1
- package/dist/application/use-cases/WorldManagementUseCase.d.ts +18 -1
- package/dist/application/use-cases/WorldManagementUseCase.d.ts.map +1 -1
- package/dist/application/use-cases/WorldManagementUseCase.js +332 -0
- package/dist/application/use-cases/WorldManagementUseCase.js.map +1 -1
- package/dist/docker/index.d.ts +51 -1
- package/dist/docker/index.d.ts.map +1 -1
- package/dist/docker/index.js +194 -4
- package/dist/docker/index.js.map +1 -1
- package/dist/domain/entities/User.d.ts +77 -0
- package/dist/domain/entities/User.d.ts.map +1 -0
- package/dist/domain/entities/User.js +121 -0
- package/dist/domain/entities/User.js.map +1 -0
- package/dist/domain/entities/World.d.ts +7 -1
- package/dist/domain/entities/World.d.ts.map +1 -1
- package/dist/domain/entities/World.js +14 -1
- package/dist/domain/entities/World.js.map +1 -1
- package/dist/domain/entities/index.d.ts +1 -0
- package/dist/domain/entities/index.d.ts.map +1 -1
- package/dist/domain/entities/index.js +1 -0
- package/dist/domain/entities/index.js.map +1 -1
- package/dist/domain/index.d.ts +2 -2
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +4 -2
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/mod/ModDependency.d.ts +18 -0
- package/dist/domain/mod/ModDependency.d.ts.map +1 -0
- package/dist/domain/mod/ModDependency.js +5 -0
- package/dist/domain/mod/ModDependency.js.map +1 -0
- package/dist/domain/mod/ModFile.d.ts +27 -0
- package/dist/domain/mod/ModFile.d.ts.map +1 -0
- package/dist/domain/mod/ModFile.js +5 -0
- package/dist/domain/mod/ModFile.js.map +1 -0
- package/dist/domain/mod/ModProject.d.ts +36 -0
- package/dist/domain/mod/ModProject.d.ts.map +1 -0
- package/dist/domain/mod/ModProject.js +5 -0
- package/dist/domain/mod/ModProject.js.map +1 -0
- package/dist/domain/mod/ModSearchResult.d.ts +18 -0
- package/dist/domain/mod/ModSearchResult.d.ts.map +1 -0
- package/dist/domain/mod/ModSearchResult.js +5 -0
- package/dist/domain/mod/ModSearchResult.js.map +1 -0
- package/dist/domain/mod/ModVersion.d.ts +36 -0
- package/dist/domain/mod/ModVersion.d.ts.map +1 -0
- package/dist/domain/mod/ModVersion.js +5 -0
- package/dist/domain/mod/ModVersion.js.map +1 -0
- package/dist/domain/mod/index.d.ts +11 -0
- package/dist/domain/mod/index.d.ts.map +1 -0
- package/dist/domain/mod/index.js +6 -0
- package/dist/domain/mod/index.js.map +1 -0
- package/dist/domain/mod/types.d.ts +43 -0
- package/dist/domain/mod/types.d.ts.map +1 -0
- package/dist/domain/mod/types.js +6 -0
- package/dist/domain/mod/types.js.map +1 -0
- package/dist/domain/value-objects/ProcessInfo.d.ts +99 -0
- package/dist/domain/value-objects/ProcessInfo.d.ts.map +1 -0
- package/dist/domain/value-objects/ProcessInfo.js +171 -0
- package/dist/domain/value-objects/ProcessInfo.js.map +1 -0
- package/dist/domain/value-objects/Role.d.ts +41 -0
- package/dist/domain/value-objects/Role.d.ts.map +1 -0
- package/dist/domain/value-objects/Role.js +66 -0
- package/dist/domain/value-objects/Role.js.map +1 -0
- package/dist/domain/value-objects/ServerType.d.ts +1 -0
- package/dist/domain/value-objects/ServerType.d.ts.map +1 -1
- package/dist/domain/value-objects/ServerType.js +8 -0
- package/dist/domain/value-objects/ServerType.js.map +1 -1
- package/dist/domain/value-objects/ServiceStatus.d.ts +64 -0
- package/dist/domain/value-objects/ServiceStatus.d.ts.map +1 -0
- package/dist/domain/value-objects/ServiceStatus.js +99 -0
- package/dist/domain/value-objects/ServiceStatus.js.map +1 -0
- package/dist/domain/value-objects/UserId.d.ts +21 -0
- package/dist/domain/value-objects/UserId.d.ts.map +1 -0
- package/dist/domain/value-objects/UserId.js +43 -0
- package/dist/domain/value-objects/UserId.js.map +1 -0
- package/dist/domain/value-objects/Username.d.ts +16 -0
- package/dist/domain/value-objects/Username.d.ts.map +1 -0
- package/dist/domain/value-objects/Username.js +46 -0
- package/dist/domain/value-objects/Username.js.map +1 -0
- package/dist/domain/value-objects/index.d.ts +5 -0
- package/dist/domain/value-objects/index.d.ts.map +1 -1
- package/dist/domain/value-objects/index.js +7 -0
- package/dist/domain/value-objects/index.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/adapters/ApiPromptAdapter.d.ts +115 -0
- package/dist/infrastructure/adapters/ApiPromptAdapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/ApiPromptAdapter.js +268 -0
- package/dist/infrastructure/adapters/ApiPromptAdapter.js.map +1 -0
- package/dist/infrastructure/adapters/ServerRepository.js +3 -3
- package/dist/infrastructure/adapters/ServerRepository.js.map +1 -1
- package/dist/infrastructure/adapters/ShellAdapter.d.ts +4 -2
- package/dist/infrastructure/adapters/ShellAdapter.d.ts.map +1 -1
- package/dist/infrastructure/adapters/ShellAdapter.js +15 -5
- package/dist/infrastructure/adapters/ShellAdapter.js.map +1 -1
- package/dist/infrastructure/adapters/SqliteUserRepository.d.ts +70 -0
- package/dist/infrastructure/adapters/SqliteUserRepository.d.ts.map +1 -0
- package/dist/infrastructure/adapters/SqliteUserRepository.js +149 -0
- package/dist/infrastructure/adapters/SqliteUserRepository.js.map +1 -0
- package/dist/infrastructure/adapters/WorldRepository.d.ts +12 -0
- package/dist/infrastructure/adapters/WorldRepository.d.ts.map +1 -1
- package/dist/infrastructure/adapters/WorldRepository.js +73 -3
- package/dist/infrastructure/adapters/WorldRepository.js.map +1 -1
- package/dist/infrastructure/adapters/YamlUserRepository.d.ts +67 -0
- package/dist/infrastructure/adapters/YamlUserRepository.d.ts.map +1 -0
- package/dist/infrastructure/adapters/YamlUserRepository.js +161 -0
- package/dist/infrastructure/adapters/YamlUserRepository.js.map +1 -0
- package/dist/infrastructure/adapters/index.d.ts +3 -0
- package/dist/infrastructure/adapters/index.d.ts.map +1 -1
- package/dist/infrastructure/adapters/index.js +3 -0
- package/dist/infrastructure/adapters/index.js.map +1 -1
- package/dist/infrastructure/config/Pm2EcosystemConfig.d.ts +192 -0
- package/dist/infrastructure/config/Pm2EcosystemConfig.d.ts.map +1 -0
- package/dist/infrastructure/config/Pm2EcosystemConfig.js +48 -0
- package/dist/infrastructure/config/Pm2EcosystemConfig.js.map +1 -0
- package/dist/infrastructure/config/index.d.ts +6 -0
- package/dist/infrastructure/config/index.d.ts.map +1 -0
- package/dist/infrastructure/config/index.js +6 -0
- package/dist/infrastructure/config/index.js.map +1 -0
- package/dist/infrastructure/factories/ModSourceFactory.d.ts +73 -0
- package/dist/infrastructure/factories/ModSourceFactory.d.ts.map +1 -0
- package/dist/infrastructure/factories/ModSourceFactory.js +98 -0
- package/dist/infrastructure/factories/ModSourceFactory.js.map +1 -0
- package/dist/infrastructure/factories/index.d.ts +5 -0
- package/dist/infrastructure/factories/index.d.ts.map +1 -0
- package/dist/infrastructure/factories/index.js +5 -0
- package/dist/infrastructure/factories/index.js.map +1 -0
- package/dist/infrastructure/index.d.ts +1 -0
- package/dist/infrastructure/index.d.ts.map +1 -1
- package/dist/infrastructure/index.js +1 -0
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +10 -2
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PM2 Ecosystem Configuration Types
|
|
3
|
+
* Based on PM2 ecosystem.config.js specification
|
|
4
|
+
* @see https://pm2.keymetrics.io/docs/usage/application-declaration/
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* PM2 execution mode
|
|
8
|
+
*/
|
|
9
|
+
export type Pm2ExecMode = 'fork' | 'cluster';
|
|
10
|
+
/**
|
|
11
|
+
* PM2 interpreter type
|
|
12
|
+
*/
|
|
13
|
+
export type Pm2Interpreter = 'node' | 'bash' | 'python' | 'python3' | 'ruby' | 'perl' | string;
|
|
14
|
+
/**
|
|
15
|
+
* PM2 log configuration
|
|
16
|
+
*/
|
|
17
|
+
export interface IPm2LogConfig {
|
|
18
|
+
/** Output log file path */
|
|
19
|
+
output?: string;
|
|
20
|
+
/** Error log file path */
|
|
21
|
+
error?: string;
|
|
22
|
+
/** Combined log file path */
|
|
23
|
+
log?: string;
|
|
24
|
+
/** Log date format */
|
|
25
|
+
logDateFormat?: string;
|
|
26
|
+
/** Merge logs from different instances */
|
|
27
|
+
mergeLogs?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* PM2 restart strategy
|
|
31
|
+
*/
|
|
32
|
+
export interface IPm2RestartConfig {
|
|
33
|
+
/** Delay between restart (ms) */
|
|
34
|
+
restartDelay?: number;
|
|
35
|
+
/** Maximum restarts within exponential backoff window */
|
|
36
|
+
maxRestarts?: number;
|
|
37
|
+
/** Minimum uptime to be considered started (ms) */
|
|
38
|
+
minUptime?: number;
|
|
39
|
+
/** Maximum memory before restart */
|
|
40
|
+
maxMemoryRestart?: string;
|
|
41
|
+
/** Enable exponential backoff restart */
|
|
42
|
+
expBackoffRestartDelay?: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* PM2 watch configuration
|
|
46
|
+
*/
|
|
47
|
+
export interface IPm2WatchConfig {
|
|
48
|
+
/** Enable watching */
|
|
49
|
+
watch?: boolean | string[];
|
|
50
|
+
/** Paths to ignore for watching */
|
|
51
|
+
ignoreWatch?: string[];
|
|
52
|
+
/** Watch options passed to chokidar */
|
|
53
|
+
watchOptions?: {
|
|
54
|
+
usePolling?: boolean;
|
|
55
|
+
interval?: number;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* PM2 application configuration
|
|
60
|
+
* Defines a single application/service in PM2
|
|
61
|
+
*/
|
|
62
|
+
export interface IPm2AppConfig {
|
|
63
|
+
/** Application name (required) */
|
|
64
|
+
name: string;
|
|
65
|
+
/** Script path to run (required) */
|
|
66
|
+
script: string;
|
|
67
|
+
/** Working directory */
|
|
68
|
+
cwd?: string;
|
|
69
|
+
/** Script arguments */
|
|
70
|
+
args?: string | string[];
|
|
71
|
+
/** Interpreter to use */
|
|
72
|
+
interpreter?: Pm2Interpreter;
|
|
73
|
+
/** Interpreter arguments */
|
|
74
|
+
interpreterArgs?: string | string[];
|
|
75
|
+
/** Node.js arguments (alias for interpreterArgs when using node) */
|
|
76
|
+
nodeArgs?: string | string[];
|
|
77
|
+
/** Number of instances (cluster mode) */
|
|
78
|
+
instances?: number | 'max';
|
|
79
|
+
/** Execution mode: 'fork' or 'cluster' */
|
|
80
|
+
execMode?: Pm2ExecMode;
|
|
81
|
+
/** Environment variables */
|
|
82
|
+
env?: Record<string, string>;
|
|
83
|
+
/** Production environment variables */
|
|
84
|
+
envProduction?: Record<string, string>;
|
|
85
|
+
/** Development environment variables */
|
|
86
|
+
envDevelopment?: Record<string, string>;
|
|
87
|
+
/** Log configuration */
|
|
88
|
+
logConfig?: IPm2LogConfig;
|
|
89
|
+
/** Output log file path (shorthand) */
|
|
90
|
+
output?: string;
|
|
91
|
+
/** Error log file path (shorthand) */
|
|
92
|
+
error?: string;
|
|
93
|
+
/** Combined log file path (shorthand) */
|
|
94
|
+
log?: string;
|
|
95
|
+
/** Log date format */
|
|
96
|
+
logDateFormat?: string;
|
|
97
|
+
/** Merge logs from different instances */
|
|
98
|
+
mergeLogs?: boolean;
|
|
99
|
+
/** Restart configuration */
|
|
100
|
+
restartConfig?: IPm2RestartConfig;
|
|
101
|
+
/** Delay between restart (ms, shorthand) */
|
|
102
|
+
restartDelay?: number;
|
|
103
|
+
/** Maximum restarts within exponential backoff window (shorthand) */
|
|
104
|
+
maxRestarts?: number;
|
|
105
|
+
/** Minimum uptime to be considered started (ms, shorthand) */
|
|
106
|
+
minUptime?: number;
|
|
107
|
+
/** Maximum memory before restart (shorthand) */
|
|
108
|
+
maxMemoryRestart?: string;
|
|
109
|
+
/** Enable exponential backoff restart (shorthand) */
|
|
110
|
+
expBackoffRestartDelay?: number;
|
|
111
|
+
/** Watch configuration */
|
|
112
|
+
watchConfig?: IPm2WatchConfig;
|
|
113
|
+
/** Enable watching (shorthand) */
|
|
114
|
+
watch?: boolean | string[];
|
|
115
|
+
/** Paths to ignore for watching (shorthand) */
|
|
116
|
+
ignoreWatch?: string[];
|
|
117
|
+
/** Auto restart on crash */
|
|
118
|
+
autorestart?: boolean;
|
|
119
|
+
/** Cron pattern for scheduled restart */
|
|
120
|
+
cron?: string;
|
|
121
|
+
/** Enable listening on a port */
|
|
122
|
+
listenTimeout?: number;
|
|
123
|
+
/** Kill timeout (ms) */
|
|
124
|
+
killTimeout?: number;
|
|
125
|
+
/** Wait ready signal (process.send('ready')) */
|
|
126
|
+
waitReady?: boolean;
|
|
127
|
+
/** Source map support */
|
|
128
|
+
sourceMapSupport?: boolean;
|
|
129
|
+
/** Instance variable name for environment */
|
|
130
|
+
instanceVar?: string;
|
|
131
|
+
/** Filter environment variables */
|
|
132
|
+
filterEnv?: string[];
|
|
133
|
+
/** Additional raw PM2 options */
|
|
134
|
+
[key: string]: unknown;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* PM2 Ecosystem Configuration
|
|
138
|
+
* Defines the complete ecosystem.config.js structure
|
|
139
|
+
*/
|
|
140
|
+
export interface IPm2EcosystemConfig {
|
|
141
|
+
/** List of applications */
|
|
142
|
+
apps: IPm2AppConfig[];
|
|
143
|
+
/** Deploy configuration (optional) */
|
|
144
|
+
deploy?: Record<string, IPm2DeployConfig>;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* PM2 Deploy Configuration
|
|
148
|
+
* For deployment targets
|
|
149
|
+
*/
|
|
150
|
+
export interface IPm2DeployConfig {
|
|
151
|
+
/** User to use for SSH */
|
|
152
|
+
user: string;
|
|
153
|
+
/** Host(s) to deploy to */
|
|
154
|
+
host: string | string[];
|
|
155
|
+
/** SSH port */
|
|
156
|
+
port?: number;
|
|
157
|
+
/** Git repository URL */
|
|
158
|
+
repo: string;
|
|
159
|
+
/** Git reference to deploy */
|
|
160
|
+
ref: string;
|
|
161
|
+
/** Path on remote server */
|
|
162
|
+
path: string;
|
|
163
|
+
/** SSH key path */
|
|
164
|
+
key?: string;
|
|
165
|
+
/** Pre-setup commands */
|
|
166
|
+
preSetup?: string;
|
|
167
|
+
/** Post-setup commands */
|
|
168
|
+
postSetup?: string;
|
|
169
|
+
/** Pre-deploy commands (local) */
|
|
170
|
+
preDeploy?: string;
|
|
171
|
+
/** Post-deploy commands (remote) */
|
|
172
|
+
postDeploy?: string;
|
|
173
|
+
/** Environment variables */
|
|
174
|
+
env?: Record<string, string>;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Create a minimal PM2 app configuration
|
|
178
|
+
*/
|
|
179
|
+
export declare function createPm2AppConfig(name: string, script: string, options?: Partial<Omit<IPm2AppConfig, 'name' | 'script'>>): IPm2AppConfig;
|
|
180
|
+
/**
|
|
181
|
+
* Create a PM2 ecosystem configuration
|
|
182
|
+
*/
|
|
183
|
+
export declare function createPm2EcosystemConfig(apps: IPm2AppConfig[], deploy?: Record<string, IPm2DeployConfig>): IPm2EcosystemConfig;
|
|
184
|
+
/**
|
|
185
|
+
* Default PM2 app configuration values
|
|
186
|
+
*/
|
|
187
|
+
export declare const PM2_APP_DEFAULTS: Partial<IPm2AppConfig>;
|
|
188
|
+
/**
|
|
189
|
+
* Merge app config with defaults
|
|
190
|
+
*/
|
|
191
|
+
export declare function withPm2Defaults(config: IPm2AppConfig): IPm2AppConfig;
|
|
192
|
+
//# sourceMappingURL=Pm2EcosystemConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pm2EcosystemConfig.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/Pm2EcosystemConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,cAAc,GA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AC;IAElB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,4BAA4B;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,GACxD,aAAa,CAMf;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,aAAa,EAAE,EACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GACxC,mBAAmB,CAKrB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,aAAa,CAU1C,CAAC;AAEX;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAKpE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PM2 Ecosystem Configuration Types
|
|
3
|
+
* Based on PM2 ecosystem.config.js specification
|
|
4
|
+
* @see https://pm2.keymetrics.io/docs/usage/application-declaration/
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Create a minimal PM2 app configuration
|
|
8
|
+
*/
|
|
9
|
+
export function createPm2AppConfig(name, script, options) {
|
|
10
|
+
return {
|
|
11
|
+
name,
|
|
12
|
+
script,
|
|
13
|
+
...options,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a PM2 ecosystem configuration
|
|
18
|
+
*/
|
|
19
|
+
export function createPm2EcosystemConfig(apps, deploy) {
|
|
20
|
+
return {
|
|
21
|
+
apps,
|
|
22
|
+
...(deploy && { deploy }),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Default PM2 app configuration values
|
|
27
|
+
*/
|
|
28
|
+
export const PM2_APP_DEFAULTS = {
|
|
29
|
+
interpreter: 'node',
|
|
30
|
+
execMode: 'fork',
|
|
31
|
+
instances: 1,
|
|
32
|
+
autorestart: true,
|
|
33
|
+
maxRestarts: 10,
|
|
34
|
+
minUptime: 1000,
|
|
35
|
+
killTimeout: 3000,
|
|
36
|
+
listenTimeout: 3000,
|
|
37
|
+
mergeLogs: true,
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Merge app config with defaults
|
|
41
|
+
*/
|
|
42
|
+
export function withPm2Defaults(config) {
|
|
43
|
+
return {
|
|
44
|
+
...PM2_APP_DEFAULTS,
|
|
45
|
+
...config,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=Pm2EcosystemConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pm2EcosystemConfig.js","sourceRoot":"","sources":["../../../src/infrastructure/config/Pm2EcosystemConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmOH;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAY,EACZ,MAAc,EACd,OAAyD;IAEzD,OAAO;QACL,IAAI;QACJ,MAAM;QACN,GAAG,OAAO;KACX,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,IAAqB,EACrB,MAAyC;IAEzC,OAAO;QACL,IAAI;QACJ,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,EAAE;IACf,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,IAAI;CACP,CAAC;AAEX;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAqB;IACnD,OAAO;QACL,GAAG,gBAAgB;QACnB,GAAG,MAAM;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure Configuration Types
|
|
3
|
+
* Configuration type definitions for external services
|
|
4
|
+
*/
|
|
5
|
+
export { type Pm2ExecMode, type Pm2Interpreter, type IPm2LogConfig, type IPm2RestartConfig, type IPm2WatchConfig, type IPm2AppConfig, type IPm2EcosystemConfig, type IPm2DeployConfig, createPm2AppConfig, createPm2EcosystemConfig, PM2_APP_DEFAULTS, withPm2Defaults, } from './Pm2EcosystemConfig.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,GAChB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/config/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EASL,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,GAChB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModSourceFactory - Factory pattern for mod source adapters
|
|
3
|
+
*
|
|
4
|
+
* This factory manages registration and retrieval of mod source adapters.
|
|
5
|
+
* Adapters register themselves when their modules are imported.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Register an adapter
|
|
10
|
+
* ModSourceFactory.register(new ModrinthAdapter());
|
|
11
|
+
*
|
|
12
|
+
* // Get an adapter by name
|
|
13
|
+
* const source = ModSourceFactory.get('modrinth');
|
|
14
|
+
* const results = await source.search('sodium');
|
|
15
|
+
*
|
|
16
|
+
* // List available sources
|
|
17
|
+
* const sources = ModSourceFactory.getSupportedSources();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import type { IModSourcePort } from '../../application/ports/outbound/IModSourcePort.js';
|
|
21
|
+
/**
|
|
22
|
+
* Factory for creating and managing mod source adapters
|
|
23
|
+
*/
|
|
24
|
+
export declare class ModSourceFactory {
|
|
25
|
+
/** Registered adapters by source name */
|
|
26
|
+
private static adapters;
|
|
27
|
+
/**
|
|
28
|
+
* Register a mod source adapter
|
|
29
|
+
* @param adapter - Adapter instance to register
|
|
30
|
+
* @throws Error if an adapter with the same name is already registered
|
|
31
|
+
*/
|
|
32
|
+
static register(adapter: IModSourcePort): void;
|
|
33
|
+
/**
|
|
34
|
+
* Get a registered adapter by source name
|
|
35
|
+
* @param source - Source name (case-insensitive)
|
|
36
|
+
* @returns The registered adapter
|
|
37
|
+
* @throws Error if no adapter is registered for the given source
|
|
38
|
+
*/
|
|
39
|
+
static get(source: string): IModSourcePort;
|
|
40
|
+
/**
|
|
41
|
+
* Get a registered adapter or null if not found
|
|
42
|
+
* @param source - Source name (case-insensitive)
|
|
43
|
+
* @returns The registered adapter or null
|
|
44
|
+
*/
|
|
45
|
+
static getOrNull(source: string): IModSourcePort | null;
|
|
46
|
+
/**
|
|
47
|
+
* Check if a source is registered
|
|
48
|
+
* @param source - Source name (case-insensitive)
|
|
49
|
+
* @returns true if the source is registered
|
|
50
|
+
*/
|
|
51
|
+
static isSupported(source: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Get list of all registered source names
|
|
54
|
+
* @returns Array of source names
|
|
55
|
+
*/
|
|
56
|
+
static getSupportedSources(): string[];
|
|
57
|
+
/**
|
|
58
|
+
* Get all registered adapters
|
|
59
|
+
* @returns Array of all adapters
|
|
60
|
+
*/
|
|
61
|
+
static getAllAdapters(): IModSourcePort[];
|
|
62
|
+
/**
|
|
63
|
+
* Get the default source name
|
|
64
|
+
* @returns 'modrinth' as the default source
|
|
65
|
+
*/
|
|
66
|
+
static getDefaultSource(): string;
|
|
67
|
+
/**
|
|
68
|
+
* Clear all registered adapters
|
|
69
|
+
* Primarily used for testing
|
|
70
|
+
*/
|
|
71
|
+
static clear(): void;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=ModSourceFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModSourceFactory.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/factories/ModSourceFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AAEzF;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,yCAAyC;IACzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAqC;IAE5D;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAY9C;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc;IAc1C;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAIvD;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAI3C;;;OAGG;IACH,MAAM,CAAC,mBAAmB,IAAI,MAAM,EAAE;IAItC;;;OAGG;IACH,MAAM,CAAC,cAAc,IAAI,cAAc,EAAE;IAIzC;;;OAGG;IACH,MAAM,CAAC,gBAAgB,IAAI,MAAM;IAIjC;;;OAGG;IACH,MAAM,CAAC,KAAK,IAAI,IAAI;CAGrB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModSourceFactory - Factory pattern for mod source adapters
|
|
3
|
+
*
|
|
4
|
+
* This factory manages registration and retrieval of mod source adapters.
|
|
5
|
+
* Adapters register themselves when their modules are imported.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Register an adapter
|
|
10
|
+
* ModSourceFactory.register(new ModrinthAdapter());
|
|
11
|
+
*
|
|
12
|
+
* // Get an adapter by name
|
|
13
|
+
* const source = ModSourceFactory.get('modrinth');
|
|
14
|
+
* const results = await source.search('sodium');
|
|
15
|
+
*
|
|
16
|
+
* // List available sources
|
|
17
|
+
* const sources = ModSourceFactory.getSupportedSources();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Factory for creating and managing mod source adapters
|
|
22
|
+
*/
|
|
23
|
+
export class ModSourceFactory {
|
|
24
|
+
/** Registered adapters by source name */
|
|
25
|
+
static adapters = new Map();
|
|
26
|
+
/**
|
|
27
|
+
* Register a mod source adapter
|
|
28
|
+
* @param adapter - Adapter instance to register
|
|
29
|
+
* @throws Error if an adapter with the same name is already registered
|
|
30
|
+
*/
|
|
31
|
+
static register(adapter) {
|
|
32
|
+
const key = adapter.sourceName.toLowerCase();
|
|
33
|
+
if (this.adapters.has(key)) {
|
|
34
|
+
throw new Error(`Mod source adapter '${adapter.sourceName}' is already registered`);
|
|
35
|
+
}
|
|
36
|
+
this.adapters.set(key, adapter);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get a registered adapter by source name
|
|
40
|
+
* @param source - Source name (case-insensitive)
|
|
41
|
+
* @returns The registered adapter
|
|
42
|
+
* @throws Error if no adapter is registered for the given source
|
|
43
|
+
*/
|
|
44
|
+
static get(source) {
|
|
45
|
+
const key = source.toLowerCase();
|
|
46
|
+
const adapter = this.adapters.get(key);
|
|
47
|
+
if (!adapter) {
|
|
48
|
+
const available = this.getSupportedSources().join(', ');
|
|
49
|
+
throw new Error(`Unknown mod source: '${source}'. Available sources: ${available || 'none'}`);
|
|
50
|
+
}
|
|
51
|
+
return adapter;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get a registered adapter or null if not found
|
|
55
|
+
* @param source - Source name (case-insensitive)
|
|
56
|
+
* @returns The registered adapter or null
|
|
57
|
+
*/
|
|
58
|
+
static getOrNull(source) {
|
|
59
|
+
return this.adapters.get(source.toLowerCase()) ?? null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if a source is registered
|
|
63
|
+
* @param source - Source name (case-insensitive)
|
|
64
|
+
* @returns true if the source is registered
|
|
65
|
+
*/
|
|
66
|
+
static isSupported(source) {
|
|
67
|
+
return this.adapters.has(source.toLowerCase());
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get list of all registered source names
|
|
71
|
+
* @returns Array of source names
|
|
72
|
+
*/
|
|
73
|
+
static getSupportedSources() {
|
|
74
|
+
return Array.from(this.adapters.keys());
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get all registered adapters
|
|
78
|
+
* @returns Array of all adapters
|
|
79
|
+
*/
|
|
80
|
+
static getAllAdapters() {
|
|
81
|
+
return Array.from(this.adapters.values());
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get the default source name
|
|
85
|
+
* @returns 'modrinth' as the default source
|
|
86
|
+
*/
|
|
87
|
+
static getDefaultSource() {
|
|
88
|
+
return 'modrinth';
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Clear all registered adapters
|
|
92
|
+
* Primarily used for testing
|
|
93
|
+
*/
|
|
94
|
+
static clear() {
|
|
95
|
+
this.adapters.clear();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=ModSourceFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModSourceFactory.js","sourceRoot":"","sources":["../../../src/infrastructure/factories/ModSourceFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAC3B,yCAAyC;IACjC,MAAM,CAAC,QAAQ,GAAG,IAAI,GAAG,EAA0B,CAAC;IAE5D;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAuB;QACrC,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;QAE7C,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CACb,uBAAuB,OAAO,CAAC,UAAU,yBAAyB,CACnE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,MAAc;QACvB,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEvC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxD,MAAM,IAAI,KAAK,CACb,wBAAwB,MAAM,yBAAyB,SAAS,IAAI,MAAM,EAAE,CAC7E,CAAC;QACJ,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAc;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,IAAI,CAAC;IACzD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,MAAc;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,mBAAmB;QACxB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,cAAc;QACnB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,gBAAgB;QACrB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,KAAK;QACV,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/factories/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/factories/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/infrastructure/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/infrastructure/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/infrastructure/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/infrastructure/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server status types
|
|
3
3
|
*/
|
|
4
|
-
export type ContainerStatus = 'running' | 'exited' | 'paused' | 'restarting' | 'dead' | 'created' | 'not_found';
|
|
4
|
+
export type ContainerStatus = 'running' | 'exited' | 'paused' | 'restarting' | 'dead' | 'created' | 'not_found' | 'not_created';
|
|
5
5
|
export type HealthStatus = 'healthy' | 'unhealthy' | 'starting' | 'none' | 'unknown';
|
|
6
6
|
export interface ServerInfo {
|
|
7
7
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CA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ACf,YAAY,EAAE,eAAe,CAAC;CAC/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft-docker/shared",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Shared utilities and types for Minecraft Docker platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dev": "tsc --watch",
|
|
47
47
|
"clean": "rm -rf dist",
|
|
48
48
|
"lint": "eslint src --ext .ts",
|
|
49
|
-
"test": "
|
|
49
|
+
"test": "npx tsx --test tests/*.test.ts"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"minecraft",
|
|
@@ -61,8 +61,16 @@
|
|
|
61
61
|
"directory": "platform/services/shared"
|
|
62
62
|
},
|
|
63
63
|
"homepage": "https://minecraft-server-manager.readthedocs.io/",
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"bcryptjs": "^3.0.3",
|
|
66
|
+
"better-sqlite3": "^12.6.2",
|
|
67
|
+
"js-yaml": "^4.1.1"
|
|
68
|
+
},
|
|
64
69
|
"devDependencies": {
|
|
70
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
71
|
+
"@types/js-yaml": "^4.0.9",
|
|
65
72
|
"@types/node": "^20.10.0",
|
|
73
|
+
"tsx": "^4.21.0",
|
|
66
74
|
"typescript": "^5.3.0"
|
|
67
75
|
}
|
|
68
76
|
}
|