@grlt-hub/app-compose
Version:
Compose modules into apps
1 lines • 968 B
JavaScript
import{LIBRARY_NAME as e,colors as n}from"./chunk-GQZ3QUEZ.js";var o=" ",i=`${o}${o}${o}`,t=({expected:t,received:r})=>{console.log(`${e} | diff command\nAll skipped containers are optional. If they are expected to work, please include them in the list when calling \`compose\` function\n\nStages:`),r.forEach(({id:e,containersToBoot:r,skippedContainers:s})=>{const c=t.find(n=>n[0]===e);if(!c)return;const p=r.reduce((e,o)=>{const i=c[1].some(e=>e.id===o.id);return e.push(i?o.id:n.bgGreen(o.id)),e},[]),d=(({skippedContainers:e,INDENT:o})=>{if(0===Object.keys(e).length)return"";const i={};for(const n in e)for(const o of e[n])(i[o]||(i[o]=[])).push(n);return Object.entries(i).map(([e,o])=>`- ${n.yellow(e)}: [${o.join(", ")}]`).join(`\n${o}`)})({skippedContainers:s,INDENT:i}),a=d.length?`\n${o}skipped:\n${i}${d}`:"";console.log(`- ${n.magenta(e)}:\n${o}expected: [ ${c[1].map(e=>e.id).join(", ")} ]\n${o}received: [ ${p.join(", ")} ]`+a)})};export{t as diff};