@finda-co/novu-framework
Version:
The Code-First Notifications Workflow SDK.
2 lines (1 loc) • 808 B
JavaScript
import{a as r,b as P,c as s,d as R}from"../chunk-ZGHLT6HM.js";import{h as v}from"../chunk-J2MPR7MB.js";var m="sveltekit",f=o=>{let t=new s({frameworkName:m,...o,handler:(p,e)=>({method:()=>p||e.request.method||"",body:()=>e.request.json(),headers:n=>e.request.headers.get(n),url:()=>{let n=process.env.NODE_ENV==="development"?"http":"https";return new URL(e.request.url,`${n}://${e.request.headers.get("host")||""}`)},transformResponse:({body:n,headers:d,status:a})=>{let l=r();return new l(n,{status:a,headers:d})}})}).createHandler(),u=t.bind(null,void 0);return Object.defineProperties(u,{GET:{value:t.bind(null,"GET")},POST:{value:t.bind(null,"POST")},OPTIONS:{value:t.bind(null,"OPTIONS")}})};export{P as Client,v as CronExpression,s as NovuRequestHandler,m as frameworkName,f as serve,R as workflow};