UNPKG

@lucidcms/core

Version:

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

2 lines 547 B
import e from"./get-adapter.mjs";import{createAdapterLifecycleContext as t}from"../runtime/adapter-lifecycle.mjs";const n=async(n,r={})=>{let i=await e(n),a=t({config:n,env:r.env,runtimeContext:r.runtimeContext});try{await i.lifecycle?.init?.(a)}catch(e){throw await Promise.allSettled([i.lifecycle?.destroy?.(a)]),e}return i},r=async(e,n)=>{e&&await e.lifecycle?.destroy?.(t({config:n.config,env:n.env,runtimeContext:n.runtimeContext}))};export{r as destroyImageProcessor,n as getInitializedImageProcessor}; //# sourceMappingURL=lifecycle.mjs.map