@novu/framework
Version:
The Code-First Notifications Workflow SDK.
2 lines (1 loc) • 1.07 kB
JavaScript
import{a as r,b as E,c as s,d as T}from"../chunk-WSQ6EEHO.js";import{a as S}from"../chunk-MQSAHSED.js";import"../chunk-JKG63DBC.js";import{S as R}from"../chunk-APAOD3BG.js";import{a as P}from"../chunk-RCWIURDJ.js";import{f as v}from"../chunk-LPE4ME2M.js";import"../chunk-PLPQUHX6.js";var m="sveltekit",h=o=>{let t=new s({frameworkName:m,...o,handler:(u,e)=>({method:()=>u||e.request.method||"",body:()=>e.request.json(),headers:n=>e.request.headers.get(n),url:()=>{let n=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"?"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(),p=t.bind(null,void 0);return Object.defineProperties(p,{GET:{value:t.bind(null,"GET")},POST:{value:t.bind(null,"POST")},OPTIONS:{value:t.bind(null,"OPTIONS")}})};export{E as Client,v as CronExpression,s as NovuRequestHandler,R as SeverityLevelEnum,m as frameworkName,P as providerSchemas,h as serve,S as step,T as workflow};