Shared utilities and types for Minecraft Docker platform
npm install @minecraft-docker/sharedShared utilities and types for the Minecraft Docker platform.
``bash`
npm install @minecraft-docker/shared
This package provides shared components for the @minecraft-docker/mcctl CLI tool.
`typescript
import { ServerName, ServerType, McVersion, Memory } from '@minecraft-docker/shared/domain';
const name = ServerName.create('myserver');
const type = ServerType.create('PAPER');
const version = McVersion.create('1.21.1');
const memory = Memory.create('4G');
`
`typescript`
import { ICreateServerUseCase, IServerRepository } from '@minecraft-docker/shared/application';
`typescript`
import { ShellAdapter, ServerRepository } from '@minecraft-docker/shared/infrastructure';
This package follows Hexagonal Architecture (Clean Architecture):
```
┌─────────────────────────────────────┐
│ Application Layer │
│ - Use Cases (ports/inbound) │
│ - Ports (ports/outbound) │
└──────────────────┬──────────────────┘
│
┌──────────────────▼──────────────────┐
│ Domain Layer │
│ - Entities (Server, World) │
│ - Value Objects (ServerName, etc.) │
└──────────────────┬──────────────────┘
│
┌──────────────────▼──────────────────┐
│ Infrastructure Layer │
│ - Adapters (Shell, Repository) │
└─────────────────────────────────────┘
- Full Documentation
- GitHub Repository
Apache-2.0