Shipping port for developers. Cargo ships are deploys, cranes are CI/CD, containers are Docker, customs is code review.
  • JavaScript 100%
Find a file
2026-06-30 11:13:54 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:09:16 +00:00
src feat(#1): port engine — ships, cranes, containers, customs, ASCII harbor 2026-06-15 10:08:47 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:13:51 +00:00
package.json feat(#1): port engine — ships, cranes, containers, customs, ASCII harbor 2026-06-15 10:08:47 +00:00
README.md feat(#1): port engine — ships, cranes, containers, customs, ASCII harbor 2026-06-15 10:08:47 +00:00

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