@minecraft-docker/shared 1.3.0 → 1.3.1
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/README.md +68 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @minecraft-docker/shared
|
|
2
|
+
|
|
3
|
+
Shared utilities and types for the Minecraft Docker platform.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @minecraft-docker/shared
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
This package provides shared components for the [@minecraft-docker/mcctl](https://www.npmjs.com/package/@minecraft-docker/mcctl) CLI tool.
|
|
14
|
+
|
|
15
|
+
### Domain Layer
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { ServerName, ServerType, McVersion, Memory } from '@minecraft-docker/shared/domain';
|
|
19
|
+
|
|
20
|
+
const name = ServerName.create('myserver');
|
|
21
|
+
const type = ServerType.create('PAPER');
|
|
22
|
+
const version = McVersion.create('1.21.1');
|
|
23
|
+
const memory = Memory.create('4G');
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Application Layer
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { ICreateServerUseCase, IServerRepository } from '@minecraft-docker/shared/application';
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Infrastructure Layer
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { ShellAdapter, ServerRepository } from '@minecraft-docker/shared/infrastructure';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Architecture
|
|
39
|
+
|
|
40
|
+
This package follows **Hexagonal Architecture** (Clean Architecture):
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
┌─────────────────────────────────────┐
|
|
44
|
+
│ Application Layer │
|
|
45
|
+
│ - Use Cases (ports/inbound) │
|
|
46
|
+
│ - Ports (ports/outbound) │
|
|
47
|
+
└──────────────────┬──────────────────┘
|
|
48
|
+
│
|
|
49
|
+
┌──────────────────▼──────────────────┐
|
|
50
|
+
│ Domain Layer │
|
|
51
|
+
│ - Entities (Server, World) │
|
|
52
|
+
│ - Value Objects (ServerName, etc.) │
|
|
53
|
+
└──────────────────┬──────────────────┘
|
|
54
|
+
│
|
|
55
|
+
┌──────────────────▼──────────────────┐
|
|
56
|
+
│ Infrastructure Layer │
|
|
57
|
+
│ - Adapters (Shell, Repository) │
|
|
58
|
+
└─────────────────────────────────────┘
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Documentation
|
|
62
|
+
|
|
63
|
+
- [Full Documentation](https://smallmiro.github.io/minecraft-server-manager/)
|
|
64
|
+
- [GitHub Repository](https://github.com/smallmiro/minecraft-server-manager)
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
Apache-2.0
|