UNPKG

@lucidcms/core

Version:

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

2 lines 704 B
import{copy as e}from"../../libs/i18n/copy.mjs";import t from"../../libs/repositories/users.mjs";import n from"../seed/default-options.mjs";import r from"../sync/sync-roles.mjs";import i from"../sync/sync-tenants.mjs";import a from"../../libs/formatters/index.mjs";const o=async o=>{try{let e=await new t(o.db.client,o.config.db).count({where:[]});if(e.error)return e;let s=a.parseCount(e.data?.count)===0;if(s){let e=await Promise.all([n(o),r(o),i(o)]);for(let t of e)if(t.error)return t}return{error:void 0,data:{setupRequired:s}}}catch{return{error:{type:`basic`,message:e(`server:core.services.errors.unknown.message`)},data:void 0}}};export{o as default}; //# sourceMappingURL=setup-required.mjs.map