@novu/framework 2.13.2-rc.dc9caee828 → 2.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/internal/index.d.cts +9 -9
- package/dist/cjs/servers/express.cjs +2 -2
- package/dist/cjs/servers/h3.cjs +2 -2
- package/dist/cjs/servers/hono.cjs +2 -2
- package/dist/cjs/servers/lambda.cjs +2 -2
- package/dist/cjs/servers/nest.cjs +2 -2
- package/dist/cjs/servers/next.cjs +2 -2
- package/dist/cjs/servers/nuxt.cjs +2 -2
- package/dist/cjs/servers/remix.cjs +2 -2
- package/dist/cjs/servers/sveltekit.cjs +2 -2
- package/dist/esm/{chunk-BXKRUYUB.js → chunk-JLKEQIWC.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/hono.js +1 -1
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as A,c as n,d as q,e as H}from"../chunk-
|
|
1
|
+
import{b as A,c as n,d as q,e as H}from"../chunk-JLKEQIWC.js";import{a as N}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as G,O as S,P as b,W as V}from"../chunk-4ETX7FIT.js";import{a as m,b as u,c as P,d as h,e as i,f as w,i as l,p as f,q as x,r as c}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as g}from"../chunk-IREH6K2M.js";import{f as E}from"../chunk-VY27ZAO7.js";import{b as I}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";var p="lambda",k=y=>new n({frameworkName:p,...y,handler:r=>{let s=(e=>e.version==="2.0")(r);return{url:()=>{let e=s?r.requestContext.http.path:r.path,t=r.headers["x-forwarded-proto"]||"https",a=new URL(e,`${t}://${r.headers.host||r.headers.Host||""}`);for(let o in r.queryStringParameters)o&&a.searchParams.set(o,r.queryStringParameters[o]);return a},body:()=>{let e="{}";return r.body&&(e=r.isBase64Encoded?Buffer.from(r.body,"base64").toString():r.body),JSON.parse(e)},headers:e=>r.headers[e],queryString:e=>{var t;return(t=r.queryStringParameters)==null?void 0:t[e]},transformResponse:({body:e,status:t,headers:a})=>Promise.resolve({body:e,statusCode:t,headers:a}),method:()=>s?r.requestContext.http.method:r.httpMethod}}}).createHandler();export{m as Actions,S as AgentDeliveryError,G as AgentError,u as Button,P as Card,h as CardLink,i as CardText,A as Client,E as CronExpression,w as Divider,l as Image,n as NovuRequestHandler,f as Select,x as SelectOption,V as SeverityLevelEnum,c as TextInput,q as agent,p as frameworkName,I as isFromWorkflow,g as providerSchemas,k as serve,N as step,b as toAgentError,H as workflow};
|
package/dist/esm/servers/nest.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as W,c as P,d as re,e as se}from"../chunk-
|
|
1
|
+
import{b as W,c as P,d as re,e as se}from"../chunk-JLKEQIWC.js";import{a as pe}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as X,O as Z,P as ee,W as oe}from"../chunk-4ETX7FIT.js";import{a as j,b as F,c as L,d as V,e as U,f as k,i as B,p as $,q as K,r as z}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as te}from"../chunk-IREH6K2M.js";import{f as J}from"../chunk-VY27ZAO7.js";import{b as Q}from"../chunk-PU74XQ2P.js";import{d as n,e as i}from"../chunk-FHYMHX3T.js";import{Inject as N,Injectable as H}from"@nestjs/common";import{ConfigurableModuleBuilder as x}from"@nestjs/common";var{ConfigurableModuleClass:u,MODULE_OPTIONS_TOKEN:m,OPTIONS_TYPE:ne,ASYNC_OPTIONS_TYPE:ie}=new x().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(o=>({...o,isGlobal:!0})).build();var h="REGISTER_API_PATH",E="REGISTER_CONTROLLER_DECORATORS";import{Injectable as A}from"@nestjs/common";var c=class{handler(e,r){return{body:()=>e.body,headers:t=>{let a=e.headers[t.toLowerCase()];return Array.isArray(a)?a[0]:a},method:()=>e.method||"GET",queryString:t=>{let a=e.query[t];return Array.isArray(a)?a[0]:a},url:()=>{let t=e.headers.host||"",a=t!=null&&t.includes("://")?"":`${e.protocol||"https"}://`;return new URL(e.originalUrl||e.url||"",`${a}${t||""}`)},transformResponse:({body:t,headers:a,status:y})=>(Object.entries(a).forEach(([I,_])=>{r.setHeader(I,_)}),r.status(y).send(t))}}};c=n([A()],c);var q="nest",l=class{constructor(e,r){this.options=e;this.novuHandler=r;this.novuRequestHandler=new P({frameworkName:q,...this.options,handler:this.novuHandler.handler})}async handleRequest(e,r){await this.novuRequestHandler.createHandler()(e,r)}};l=n([H(),i(0,N(m)),i(1,N(c))],l);import{Controller as M,Get as D,Inject as C,Options as b,Post as w,Req as f,Res as O}from"@nestjs/common";var p=class{constructor(e){this.novuService=e}async handleGet(e,r){await this.novuService.handleRequest(e,r)}async handlePost(e,r){await this.novuService.handleRequest(e,r)}async handleOptions(e,r){await this.novuService.handleRequest(e,r)}};n([D(),i(0,f()),i(1,O())],p.prototype,"handleGet",1),n([w(),i(0,f()),i(1,O())],p.prototype,"handlePost",1),n([b(),i(0,f()),i(1,O())],p.prototype,"handleOptions",1),p=n([M(),i(0,C(l))],p);import{Module as G}from"@nestjs/common";import{PATH_METADATA as Y}from"@nestjs/common/constants";var R={provide:h,useFactory:o=>{if(!o.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(Y,o.apiPath,p)},inject:[m]};function T(o,e=[]){return e.reduce((r,s)=>{let t=s(r);return t!=null?t:r},o)}function g(o,e){var r;for(let s of(r=Reflect.getMetadataKeys(o))!=null?r:[])Reflect.defineMetadata(s,Reflect.getMetadata(s,o),e)}function S(o,e=[]){let r=T(o,e);r!==o&&g(r,o)}var v={provide:E,useFactory:o=>{var e;S(p,(e=o.controllerDecorators)!=null?e:[])},inject:[m]};var d=class extends u{static register(e,r){var t;let s=u.register(e);return s.controllers=[T(p,e.controllerDecorators||[])],(t=s.providers)==null||t.push(R,l,c,...r||[]),s.exports=[l,c],s}static registerAsync(e,r){var t;let s=u.registerAsync(e);return s.controllers=[p],(t=s.providers)==null||t.push(R,v,l,c,...r||[]),s.exports=[l,c],s}};d=n([G({})],d);export{j as Actions,Z as AgentDeliveryError,X as AgentError,F as Button,L as Card,V as CardLink,U as CardText,W as Client,J as CronExpression,k as Divider,B as Image,m as NOVU_OPTIONS,l as NovuClient,p as NovuController,c as NovuHandler,d as NovuModule,P as NovuRequestHandler,h as REGISTER_API_PATH,E as REGISTER_CONTROLLER_DECORATORS,$ as Select,K as SelectOption,oe as SeverityLevelEnum,z as TextInput,re as agent,q as frameworkName,Q as isFromWorkflow,te as providerSchemas,R as registerApiPath,v as registerControllerDecorators,pe as step,ee as toAgentError,se as workflow};
|
package/dist/esm/servers/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,b as k,c as f,d as L,e as V}from"../chunk-
|
|
1
|
+
import{a as c,b as k,c as f,d as L,e as V}from"../chunk-JLKEQIWC.js";import{a as W}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as j,O as G,P as I,W as D}from"../chunk-4ETX7FIT.js";import{a as S,b as q,c as w,d as P,e as T,f as v,i as A,p as E,q as b,r as g}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as $}from"../chunk-IREH6K2M.js";import{f as F}from"../chunk-VY27ZAO7.js";import{b as U}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";import*as l from"next/server.js";var N="next",y=()=>{if(typeof l.after=="function")return r=>{try{l.after(r)}catch{}}},H=r=>typeof r=="object"&&r!==null&&typeof r.setHeader=="function"&&typeof r.status=="function"&&typeof r.send=="function",B=r=>{let i=new f({frameworkName:N,...r,handler:(h,R,d)=>{let n=R,p=e=>{let t=typeof n.headers.get=="function"?n.headers.get(e):n.headers[e];return Array.isArray(t)?t[0]:t};return{body:()=>typeof n.json=="function"?n.json():n.body,waitUntil:y(),headers:p,method:()=>h||n.method||"",queryString:(e,t)=>{var a;let o=((a=n.query)==null?void 0:a[e])||t.searchParams.get(e);return Array.isArray(o)?o[0]:o},url:()=>{let e;try{e=new URL(n.url)}catch{}if(e){let s=p("host");if(s){let u=new URL(s.includes("://")?s:`${e.protocol}//${s}`);e.protocol=u.protocol,e.host=u.host,e.port=u.port,e.username=u.username,e.password=u.password}return e}let t="https",o=p("host")||"";try{(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev")&&(t="http")}catch{}return new URL(n.url,`${t}://${o}`)},transformResponse:({body:e,headers:t,status:o})=>{if(H(d)){Object.entries(t).forEach(([s,u])=>{d.setHeader(s,u)}),d.status(o).send(e);return}let a=c();return new a(e,{status:o,headers:t})}}}}).createHandler(),m=i.bind(null,void 0);return Object.defineProperties(m,{GET:{value:i.bind(null,"GET")},POST:{value:i.bind(null,"POST")},OPTIONS:{value:i.bind(null,"OPTIONS")}})};export{S as Actions,G as AgentDeliveryError,j as AgentError,q as Button,w as Card,P as CardLink,T as CardText,k as Client,F as CronExpression,v as Divider,A as Image,f as NovuRequestHandler,E as Select,b as SelectOption,D as SeverityLevelEnum,g as TextInput,L as agent,N as frameworkName,U as isFromWorkflow,$ as providerSchemas,B as serve,W as step,I as toAgentError,V as workflow};
|
package/dist/esm/servers/nuxt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as k,c as t,d as F,e as C}from"../chunk-
|
|
1
|
+
import{b as k,c as t,d as F,e as C}from"../chunk-JLKEQIWC.js";import{a as D}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as O,O as b,P as q,W as B}from"../chunk-4ETX7FIT.js";import{a as l,b as H,c as S,d as i,e as y,f,i as g,p as N,q as w,r as c}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as $}from"../chunk-IREH6K2M.js";import{f as x}from"../chunk-VY27ZAO7.js";import{b as E}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";import{getHeader as o,getQuery as a,readBody as n,send as p,setHeaders as m}from"h3";var u="nuxt",U=d=>new t({frameworkName:u,...d,handler:r=>({queryString:e=>String(a(r)[e]),body:()=>n(r),headers:e=>o(r,e),url:()=>new URL(String(r.path),`${process.env.NODE_ENV==="development"?"http":"https"}://${String(o(r,"host"))}`),method:()=>r.method,transformResponse:e=>{let{res:s}=r.node;return s.statusCode=e.status,m(r,e.headers),p(r,e.body)}})}).createHandler();export{l as Actions,b as AgentDeliveryError,O as AgentError,H as Button,S as Card,i as CardLink,y as CardText,k as Client,x as CronExpression,f as Divider,g as Image,t as NovuRequestHandler,N as Select,w as SelectOption,B as SeverityLevelEnum,c as TextInput,F as agent,u as frameworkName,E as isFromWorkflow,$ as providerSchemas,U as serve,D as step,q as toAgentError,C as workflow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,b as N,c as o,d as q,e as b}from"../chunk-
|
|
1
|
+
import{a as t,b as N,c as o,d as q,e as b}from"../chunk-JLKEQIWC.js";import{a as j}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as S,O as g,P as y,W as O}from"../chunk-4ETX7FIT.js";import{a as u,b as h,c as l,d as R,e as c,f as i,i as w,p as f,q as x,r as k}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as F}from"../chunk-IREH6K2M.js";import{f as v}from"../chunk-VY27ZAO7.js";import{b as H}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";var m="remix",U=s=>new o({frameworkName:m,...s,handler:({request:e})=>({body:()=>e.json(),headers:r=>e.headers.get(r),method:()=>e.method,url:()=>new URL(e.url,`https://${e.headers.get("host")||""}`),transformResponse:({body:r,status:n,headers:p})=>{let a=t();return new a(r,{status:n,headers:p})}})}).createHandler();export{u as Actions,g as AgentDeliveryError,S as AgentError,h as Button,l as Card,R as CardLink,c as CardText,N as Client,v as CronExpression,i as Divider,w as Image,o as NovuRequestHandler,f as Select,x as SelectOption,O as SeverityLevelEnum,k as TextInput,q as agent,m as frameworkName,H as isFromWorkflow,F as providerSchemas,U as serve,j as step,y as toAgentError,b as workflow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,b,c as s,d as I,e as g}from"../chunk-
|
|
1
|
+
import{a as r,b,c as s,d as I,e as g}from"../chunk-JLKEQIWC.js";import{a as x}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as w,O as y,P as G,W as H}from"../chunk-4ETX7FIT.js";import{a as v,b as E,c as P,d as R,e as T,f as S,i as c,p as f,q as h,r as N}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as k}from"../chunk-IREH6K2M.js";import{f as q}from"../chunk-VY27ZAO7.js";import{b as F}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";var m="sveltekit",V=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{v as Actions,y as AgentDeliveryError,w as AgentError,E as Button,P as Card,R as CardLink,T as CardText,b as Client,q as CronExpression,S as Divider,c as Image,s as NovuRequestHandler,f as Select,h as SelectOption,H as SeverityLevelEnum,N as TextInput,I as agent,m as frameworkName,F as isFromWorkflow,k as providerSchemas,V as serve,x as step,G as toAgentError,g as workflow};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novu/framework",
|
|
3
|
-
"version": "2.13.2
|
|
3
|
+
"version": "2.13.2",
|
|
4
4
|
"description": "The Code-First Notifications Workflow SDK.",
|
|
5
5
|
"main": "./dist/cjs/index.cjs",
|
|
6
6
|
"types": "./dist/cjs/index.d.cts",
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
},
|
|
298
298
|
"devDependencies": {
|
|
299
299
|
"@apidevtools/json-schema-ref-parser": "11.6.4",
|
|
300
|
-
"@arethetypeswrong/cli": "^0.
|
|
300
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
301
301
|
"@langchain/core": "^1.1.44",
|
|
302
302
|
"@nestjs/common": "11.1.27",
|
|
303
303
|
"@sveltejs/kit": "^1.27.3",
|