Airport v2 for developers. Flights are deploys, gates are environments, ATC is orchestration, turbulence is latency.
  • JavaScript 100%
Find a file
2026-06-30 11:15:07 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:11:12 +00:00
src feat(#1): airport v2 engine — flights, gates, ATC, passengers, weather, ASCII terminal 2026-06-15 23:37:50 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:15:04 +00:00
package.json feat(#1): airport v2 engine — flights, gates, ATC, passengers, weather, ASCII terminal 2026-06-15 23:37:50 +00:00
README.md feat(#1): airport v2 engine — flights, gates, ATC, passengers, weather, ASCII terminal 2026-06-15 23:37:50 +00:00

code-airport-v2

Airport v2 for developers. Flights are deploys, gates are environments, ATC is orchestration, turbulence is latency.

Usage

const { Airport, FLIGHT_TYPES, WEATHER } = require('./src/airport');

const airport = new Airport('DevPort International');

// Schedule flights (deploys)
airport.scheduleFlight(FLIGHT_TYPES.DEPLOY, 'CI Pipeline', 'Production', 'C');
airport.scheduleFlight(FLIGHT_TYPES.HOTFIX, 'Hotfix Branch', 'Production', 'C');
airport.scheduleFlight(FLIGHT_TYPES.CANARY, 'Staging', 'Production Subset', 'B');

// Board passengers (requests)
airport.boardPassenger(1, new (require('./src/airport').Passenger)('Alice', 'prod', 'vip'));

// Depart
airport.startBoarding(1);
airport.departFlight(1);

// Weather changes
airport.setWeather(WEATHER.FOG);

console.log(airport.airportView());
console.log(airport.report());

Flight Types

  • Deploy Flight (priority 2) — Standard production deploy
  • Hotfix Flight (priority 1) — Emergency, top priority
  • Rollback Flight (priority 1) — Reversing course
  • Data Migration (priority 3) — Heavy cargo, slow
  • Canary Release (priority 2) — Small test flight
  • Scheduled Maintenance (priority 4) — Routine

Gates

  • Gate A (Dev) — capacity 5
  • Gate B (Staging) — capacity 3
  • Gate C (Production) — capacity 2
  • Gate D (Quarantine) — capacity 4