UNPKG

@novu/framework

Version:

The Code-First Notifications Workflow SDK.

2 lines (1 loc) 837 B
import{a as r,b as P,c as s,d as T}from"../chunk-CSADKVTU.js";import{h as v,ja as R}from"../chunk-LTQML2Z6.js";var m="sveltekit",h=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,R as providerSchemas,h as serve,T as workflow};