UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 844 B
import e from"../../logger/index.mjs";const t=(t,n)=>{let r=[],i=(e,t,i)=>{if(!t)return;let a=(n?.unsupported?.[i]||[]).find(e=>e.key===t);if(a){r.push({type:e,key:t,level:`unsupported`,message:a.message});return}let o=(n?.notices?.[i]||[]).find(e=>e.key===t);o&&r.push({type:e,key:t,level:`notice`,message:o.message})};i(`Database`,t.database,`databaseAdapter`),i(`Queue`,t.queue,`queueAdapter`),i(`KV`,t.kv,`kvAdapter`),i(`Media`,t.media,`mediaAdapter`),i(`Email`,t.email,`emailAdapter`);for(let t of r){let n=t.message||`${t.key} is not supported on this runtime`;t.level===`unsupported`?e.error({message:`[${t.type}] ${n}`}):e.warn({message:`[${t.type}] ${n}`})}return{hasErrors:r.some(e=>e.level===`unsupported`),hasWarnings:r.some(e=>e.level===`notice`),issues:r}};export{t as default}; //# sourceMappingURL=feature-support-checks.mjs.map