@minecraft-docker/shared
v2.1.3
Published
Shared utilities and types for Minecraft Docker platform
Readme
@minecraft-docker/shared
Shared utilities and types for the Minecraft Docker platform.
Installation
npm install @minecraft-docker/sharedUsage
This package provides shared components for the @minecraft-docker/mcctl CLI tool.
Domain Layer
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');Application Layer
import { ICreateServerUseCase, IServerRepository } from '@minecraft-docker/shared/application';Infrastructure Layer
import { ShellAdapter, ServerRepository } from '@minecraft-docker/shared/infrastructure';Architecture
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) │
└─────────────────────────────────────┘Documentation
License
Apache-2.0