npm.io
2.26.2 • Published yesterday

@minecraft-docker/shared

Licence
Apache-2.0
Version
2.26.2
Deps
5
Size
1021 kB
Vulns
0
Weekly
831
Stars
2

@minecraft-docker/shared

Shared utilities and types for the Minecraft Docker platform.

Installation

npm install @minecraft-docker/shared

Usage

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

Keywords