import fs from "node:fs"; import path from "node:path"; const rootDir = path.resolve(path.dirname(new URL(import.meta.url).pathname), ".."); const requiredFiles = ["index.html", "styles.css", "app.mjs", "runtime.mjs"]; for (const file of requiredFiles) { const filePath = path.resolve(rootDir, file); if (!fs.existsSync(filePath)) { throw new Error(`missing web asset: ${file}`); } } const html = fs.readFileSync(path.resolve(rootDir, "index.html"), "utf8"); if (!html.includes("HWLAB Cloud Web")) { throw new Error("index.html missing title"); } console.log("hwlab-cloud-web check ok");