UNPKG

@lucidcms/core

Version:

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

1 lines 782 B
{"version":3,"file":"check-open-repeaters.mjs","names":[],"sources":["../../../../src/libs/config/checks/check-open-repeaters.ts"],"sourcesContent":["import { translate } from \"../../i18n/index.js\";\n\nconst checkOpenRepeaters = (\n\ttype: \"brick\" | \"collection\",\n\ttypeKey: string,\n\trepeaterStack: string[],\n) => {\n\tif (repeaterStack.length === 0) return;\n\n\tthrow new Error(\n\t\ttranslate(\"server:core.fields.repeater.validation.unclosed\", {\n\t\t\tdata: {\n\t\t\t\tkeys: repeaterStack.join(\", \"),\n\t\t\t\ttype,\n\t\t\t\ttypeKey,\n\t\t\t},\n\t\t}),\n\t);\n};\n\nexport default checkOpenRepeaters;\n"],"mappings":"qDAEA,MAAM,GACL,EACA,EACA,IACI,CACA,KAAc,SAAW,EAE7B,MAAU,MACT,EAAU,kDAAmD,CAC5D,KAAM,CACL,KAAM,EAAc,KAAK,IAAI,EAC7B,OACA,SACD,CACD,CAAC,CACF,CACD"}