UNPKG

@lucidcms/core

Version:

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

2 lines 686 B
import{translate as e}from"../../i18n/translate.mjs";const t=(t,n)=>{if(n===void 0)return;let r=n.find(e=>!t.has(e));if(r!==void 0)throw Error(e(`server:core.tenants.unknown`,{data:{key:r}}))},n=n=>{let r=n.tenants.map(e=>e.key),i=r.find((e,t)=>r.indexOf(e)!==t);if(i!==void 0)throw Error(e(`server:core.config.duplicate.tenant`,{data:{key:i}}));let a=n.tenants.filter(e=>e.default);if(a.length>1)throw Error(e(`server:core.config.duplicate.default.tenant`,{data:{keys:a.map(e=>e.key).join(`, `)}}));let o=new Set(r);for(let e of n.collections){t(o,e.getData.tenants);for(let n of e.brickInstances)t(o,n.config.tenants)}};export{n as default}; //# sourceMappingURL=check-tenants.mjs.map