UNPKG

@lucidcms/core

Version:

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

2 lines 979 B
import{constants_default as e,translations_default as t}from"./errors-RyYO6qM6.js";const n=t=>`${e.db.generatedColumnPrefix}${t}`;var r=n;const i={document:`document`,fields:`fields`,versions:`versions`},a=(n,r)=>{let a=[i.document,r.collection];switch(n){case`document`:break;case`versions`:a.push(i.versions);break;case`brick`:if(!r.brick)return{data:void 0,error:{message:t(`collection_migrator_table_name_brick_key_missing_message`)}};a.push(r.brick);break;case`document-fields`:a.push(i.fields);break;case`repeater`:if(r.repeater===void 0||r.repeater?.length===0)return{data:void 0,error:{message:t(`collection_migrator_table_name_repeater_keys_missing_message`)}};r.brick?a.push(r.brick):a.push(i.fields),a.push(...r.repeater)}return{data:`${e.db.prefix}${a.join(e.db.collectionKeysJoin)}`,error:void 0}};var o=a;export{o as build_table_name_default,i as collectionTableParts,r as prefix_generated_column_name_default}; //# sourceMappingURL=build-table-name-yLR81YJn.js.map