@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 1.24 kB
Source Map (JSON)
{"version":3,"file":"configure-lucid.mjs","names":[],"sources":["../../../src/libs/runtime/configure-lucid.ts"],"sourcesContent":["import { produce } from \"immer\";\nimport type { LucidConfigDefinition } from \"./types.js\";\n\n/**\n * Wraps your Lucid CMS config and gives it the right shape for `lucid.config.*`.\n * Use it to pass the runtime/database adapters and return the rest of your\n * config from the `config(env)` callback. Optionally export a named `env`\n * schema to validate and type environment variables.\n *\n * @example\n * ```ts\n * import { configureLucid, z } from \"@lucidcms/core\";\n * import { node } from \"@lucidcms/runtime-node\";\n * import { sqlite } from \"@lucidcms/db-sqlite\";\n *\n * export const env = z.object({\n * SECRET: z.string().length(64),\n * });\n *\n * export default configureLucid({\n * runtime: node,\n * db: sqlite,\n * config: (env) => ({\n * secrets: env.SECRET,\n * collections: [],\n * plugins: [],\n * }),\n * });\n * ```\n */\nconst configureLucid = (\n\tdefinition: LucidConfigDefinition,\n): LucidConfigDefinition => {\n\treturn produce(definition, () => {});\n};\n\nexport default configureLucid;\n"],"mappings":"gCA8BA,MAAM,EACL,GAEO,EAAQ,MAAkB,CAAC,CAAC"}