@type {() => Promise }
()
| 113 | |
| 114 | /** @type {() => Promise<void>} */ |
| 115 | async function checkDist() { |
| 116 | if (!fs.existsSync(hashFile)) { |
| 117 | await build("initial build"); |
| 118 | } |
| 119 | |
| 120 | const distHash = fs.readFileSync(hashFile, "utf8"); |
| 121 | const hash = await currentHash(); |
| 122 | |
| 123 | if (hash !== "unknown" && distHash !== hash) { |
| 124 | await build("hash changed"); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | /** @type {() => Promise<void>} */ |
| 129 | async function start() { |
no test coverage detected