#!/usr/bin/env node
import {
  exitCodeForPreflight,
  formatPreflightResult,
  runDevBaseImagePreflight,
  unexpectedPreflightErrorResult
} from "./src/dev-base-image-preflight.mjs";

try {
  const result = await runDevBaseImagePreflight({ env: process.env });
  console.log(formatPreflightResult(result));
  process.exitCode = exitCodeForPreflight(result);
} catch (error) {
  const result = unexpectedPreflightErrorResult(error);
  console.log(formatPreflightResult(result));
  process.exitCode = exitCodeForPreflight(result);
}
