UNPKG

@lucidcms/core

Version:

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

1 lines 1.07 kB
{"version":3,"file":"check-all-plugins-compatibility.mjs","names":[],"sources":["../../../src/libs/plugins/check-all-plugins-compatibility.ts"],"sourcesContent":["import type { Config } from \"../../types/config.js\";\nimport type { AdapterRuntimeContext } from \"../runtime/types.js\";\n\n/**\n * Responsible for checking the compatibility of the plugins with the current runtime context and config.\n *\n * When this throws, its on the CLI commands to handle catching the error and logging the message.\n */\nconst checkAllPluginsCompatibility = async (props: {\n\truntimeContext: AdapterRuntimeContext;\n\tconfig: Config;\n}) => {\n\tfor (const plugin of props.config.plugins) {\n\t\tif (plugin.checkCompatibility) {\n\t\t\tawait plugin.checkCompatibility({\n\t\t\t\truntimeContext: props.runtimeContext,\n\t\t\t\tconfig: props.config,\n\t\t\t});\n\t\t}\n\t}\n};\n\nexport default checkAllPluginsCompatibility;\n"],"mappings":"AAQA,MAAM,EAA+B,KAAO,IAGtC,CACL,IAAK,IAAM,KAAU,EAAM,OAAO,QAC7B,EAAO,oBACV,MAAM,EAAO,mBAAmB,CAC/B,eAAgB,EAAM,eACtB,OAAQ,EAAM,MACf,CAAC,CAGJ"}