Airport v2 for developers. Flights are deploys, gates are environments, ATC is orchestration, turbulence is latency.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
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