MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / checkDist

Function checkDist

index.js:115–126  ·  view source on GitHub ↗

@type {() => Promise }

()

Source from the content-addressed store, hash-verified

113
114/** @type {() => Promise<void>} */
115async 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>} */
129async function start() {

Callers 1

startFunction · 0.85

Calls 2

buildFunction · 0.85
currentHashFunction · 0.85

Tested by

no test coverage detected