import path from "node:path";
import { fileURLToPath } from "node:url";

import { assertCloudWebDistFresh, buildCloudWebDist } from "./dist-contract.ts";

const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const distDir = await buildCloudWebDist(rootDir);
const distFreshness = await assertCloudWebDistFresh(rootDir);
console.log(`hwlab-cloud-web build ok: ${distDir} (${distFreshness.files.length} dist files verified fresh)`);
