Shipping port for developers. Cargo ships are deploys, cranes are CI/CD, containers are Docker, customs is code review.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
code-port
Shipping port for developers. Cargo ships are deploys, cranes are CI/CD, containers are Docker, customs is code review.
Usage
const { Port, SHIP_TYPES, WEATHER } = require('./src/port');
const port = new Port('Harbor Production');
port.setHarborMaster('Captain Hook');
// Ship incoming
port.expectShip('SS Release v2.0', SHIP_TYPES.CARGO);
port.expectShip('SS Hotfix-4993', SHIP_TYPES.EXPRESS);
// Ships approach
for (let i = 0; i < 20; i++) port.tick();
// Customs (code review)
port.runCustoms('SS Release v2.0');
// Unload (CI/CD)
port.unloadShip('SS Release v2.0');
// Deploy
port.deploy();
console.log(port.harborView());
console.log(port.report());
Ship Types
- Container Ship (Major Deploy) — 50 containers, slow
- Bulk Carrier (Config Update) — 20 containers, medium
- Tanker (Data Migration) — 15 containers, careful
- Express Ferry (Hotfix) — 5 containers, fast
- Barge (Asset Delivery) — 30 containers, heavy
Components
- Ship — Cargo with containers, approach/dock/customs/unload lifecycle
- Crane — CI/CD lifting containers, efficiency degradation, servicing
- Container — Docker image with type/weight/scan/deploy states
- Port — Harbor master, weather, tide, yard management, ASCII harbor