Comparing version 0.6.12 to 0.6.13-exp.0
@@ -316,6 +316,3 @@ "use strict"; | ||
group(prefix, schemaOrRun, run) { | ||
const instance = new Elysia({ | ||
...this.config, | ||
prefix: this.config.prefix + prefix | ||
}); | ||
const instance = new Elysia(this.config); | ||
instance.store = this.store; | ||
@@ -339,2 +336,3 @@ if (this.wsRouter) | ||
Object.values(instance.routes).forEach(({ method, path, handler, hooks }) => { | ||
path = this.config.prefix + prefix + path; | ||
if (isSchema) { | ||
@@ -376,2 +374,3 @@ const hook = schemaOrRun; | ||
instance.wsRouter.history.forEach(([method, path, handler]) => { | ||
path = this.config.prefix + prefix + path; | ||
if (path === '/') | ||
@@ -378,0 +377,0 @@ this.wsRouter?.add(method, prefix, handler); |
@@ -6,2 +6,2 @@ import{Memoirist as e}from"memoirist";import{mergeHook as t,getSchemaValidator as s,getResponseSchemaValidator as r,mergeDeep as i,checksum as o,mergeLifeCycle as n,injectLocalHookMeta as a,filterInlineHook as h}from"./utils";import{composeErrorHandler as d,composeGeneralHandler as u,composeHandler as c}from"./compose";import{ws as l}from"./ws";import{isProduction as p,ERROR_CODE as f}from"./error";import{createDynamicErrorHandler as m,createDynamicHandler as v}from"./dynamic-handle";export default class y{config;dependencies={};store={};meta={schema:Object.create(null),defs:Object.create(null),exposed:Object.create(null)};decorators={};event={start:[],request:[],parse:[],transform:[],beforeHandle:[],afterHandle:[],onResponse:[],error:[],stop:[]};server=null;$schema=null;error={};router=new e;routes=[];staticRouter={handlers:[],variables:"",map:{},all:""};wsRouter;dynamicRouter=new e;lazyLoadModules=[];path="";constructor(e){this.config={forceErrorEncapsulation:!1,prefix:"",aot:"undefined"==typeof CF,strictPath:!1,...e,seed:e?.name&&void 0===e.seed?"":e?.seed}}add(e,i,o,n,{allowMeta:a=!1,skipPrefix:h=!1}={allowMeta:!1,skipPrefix:!1}){i=""===i?i:47===i.charCodeAt(0)?i:`/${i}`,this.config.prefix&&!h&&(i=this.config.prefix+i);let d=this.meta.defs;if(n?.type)switch(n.type){case"text":n.type="text/plain";break;case"json":n.type="application/json";break;case"formdata":n.type="multipart/form-data";break;case"urlencoded":n.type="application/x-www-form-urlencoded";break;case"arrayBuffer":n.type="application/octet-stream"}let u={body:s(n?.body??this.$schema?.body,{dynamic:!this.config.aot,models:d}),headers:s(n?.headers??this.$schema?.headers,{dynamic:!this.config.aot,models:d,additionalProperties:!0}),params:s(n?.params??this.$schema?.params,{dynamic:!this.config.aot,models:d}),query:s(n?.query??this.$schema?.query,{dynamic:!this.config.aot,models:d}),response:r(n?.response??this.$schema?.response,{dynamic:!this.config.aot,models:d})},l=t(this.event,n),p=i.endsWith("/")?i.slice(0,i.length-1):i+"/";if(!1===this.config.aot){this.dynamicRouter.add(e,i,{validator:u,hooks:l,content:n?.type,handle:o}),!1===this.config.strictPath&&this.dynamicRouter.add(e,p,{validator:u,hooks:l,content:n?.type,handle:o}),this.routes.push({method:e,path:i,composed:null,handler:o,hooks:l});return}let f=c({path:i,method:e,hooks:l,validator:u,handler:o,handleError:this.handleError,meta:a?this.meta:void 0,onRequest:this.event.request,config:this.config});if(this.routes.push({method:e,path:i,composed:f,handler:o,hooks:l}),-1===i.indexOf(":")&&-1===i.indexOf("*")){let t=this.staticRouter.handlers.length;this.staticRouter.handlers.push(f),this.staticRouter.variables+=`const st${t} = staticRouter.handlers[${t}] | ||
`:this.staticRouter.map[p].code+=`case '${e}': return st${t}(ctx) | ||
`)}else this.router.add(e,i,f),this.config.strictPath||this.router.add(e,i.endsWith("/")?i.slice(0,i.length-1):i+"/",f)}onStart(e){return this.event.start.push(e),this}onRequest(e){return this.event.request.push(e),this}onParse(e){return this.event.parse.splice(this.event.parse.length-1,0,e),this}onTransform(e){return this.event.transform.push(e),this}onBeforeHandle(e){return this.event.beforeHandle.push(e),this}onAfterHandle(e){return this.event.afterHandle.push(e),this}onResponse(e){return this.event.onResponse.push(e),this}addError(e,t){if("string"==typeof e&&t)return t.prototype[f]=e,this;for(let[t,s]of Object.entries(e))s.prototype[f]=t;return this}onError(e){return e&&this.event.error.push(e),this}onStop(e){return this.event.stop.push(e),this}on(e,t){switch(e){case"start":this.event.start.push(t);break;case"request":this.event.request.push(t);break;case"response":this.event.onResponse.push(t);break;case"parse":this.event.parse.push(t);break;case"transform":this.event.transform.push(t);break;case"beforeHandle":this.event.beforeHandle.push(t);break;case"afterHandle":this.event.afterHandle.push(t);break;case"error":this.event.error.push(t);break;case"stop":this.event.stop.push(t)}return this}group(e,s,r){let o=new y({...this.config,prefix:this.config.prefix+e});o.store=this.store,this.wsRouter&&o.use(l());let n="object"==typeof s,a=(n?r:s)(o);return this.decorators=i(this.decorators,o.decorators),a.event.request.length&&(this.event.request=[...this.event.request,...a.event.request]),a.event.onResponse.length&&(this.event.onResponse=[...this.event.onResponse,...a.event.onResponse]),this.model(a.meta.defs),Object.values(o.routes).forEach(({method:e,path:r,handler:i,hooks:h})=>{if(n){let n=o.wsRouter?.find("subscribe",r);if(n){let e=o.wsRouter.history.find(([e,t])=>r===t);if(!e)return;return this.ws(r,e[2])}this.add(e,r,i,t(s,{...h,error:h.error?Array.isArray(h.error)?[...h.error,...a.event.error]:[h.error,...a.event.error]:a.event.error}))}else{let s=o.wsRouter?.find("subscribe",r);if(s){let e=o.wsRouter.history.find(([e,t])=>r===t);if(!e)return;return this.ws(r,e[2])}this.add(e,r,i,t(h,{error:a.event.error}),{skipPrefix:!0})}}),o.wsRouter&&this.wsRouter&&o.wsRouter.history.forEach(([t,s,r])=>{"/"===s?this.wsRouter?.add(t,e,r):this.wsRouter?.add(t,`${e}${s}`,r)}),this}guard(e,s){if(!s)return this.event=n(this.event,e),this.$schema={body:e.body,headers:e.headers,params:e.params,query:e.query,response:e.response},this;let r=new y;r.store=this.store,this.wsRouter&&r.use(l());let o=s(r);return this.decorators=i(this.decorators,r.decorators),o.event.request.length&&(this.event.request=[...this.event.request,...o.event.request]),o.event.onResponse.length&&(this.event.onResponse=[...this.event.onResponse,...o.event.onResponse]),this.model(o.meta.defs),Object.values(r.routes).forEach(({method:s,path:i,handler:n,hooks:h})=>{let d=r.wsRouter?.find("subscribe",i);if(d){let e=r.wsRouter.history.find(([e,t])=>i===t);if(!e)return;return this.ws(i,e[2])}this.add(s,i,n,a(t(e,{...h,error:h.error?Array.isArray(h.error)?[...h.error,...o.event.error]:[h.error,...o.event.error]:o.event.error})))}),r.wsRouter&&this.wsRouter&&r.wsRouter.history.forEach(([e,t,s])=>{this.wsRouter?.add(e,t,s)}),this}use(e){if(e instanceof Promise)return this.lazyLoadModules.push(e.then(e=>{if("function"==typeof e)return e(this);if("function"==typeof e.default)return e.default(this);let s=e.default,{config:{name:r,seed:a}}=s;if(r){this.dependencies[r]||(this.dependencies[r]=[]);let e=void 0!==a?o(r+JSON.stringify(a)):0;if(this.dependencies[r].some(t=>e===t))return this;this.dependencies[r].push(e),this.event=n(this.event,s.event,e)}else this.event=n(this.event,s.event);return this.decorators=i(this.decorators,s.decorators),this.model(s.meta.defs),Object.values(s.routes).forEach(({method:e,path:r,handler:i,hooks:o})=>{let n=s.wsRouter?.find("subscribe",r);if(n){let e=s.wsRouter.history.find(([e,t])=>r===t);if(!e)return;return this.ws(r,e[2])}this.add(e,r,i,t(o,{error:s.event.error}))}),this}).then(e=>e.compile())),this;if("function"==typeof e){let t=e(this);return t instanceof Promise?(this.lazyLoadModules.push(t.then(e=>e.compile())),this):t}let{config:{name:s,seed:r}}=e;if(s){s in this.dependencies||(this.dependencies[s]=[]);let t=void 0!==r?o(s+JSON.stringify(r)):0;if(this.dependencies[s].some(e=>t===e))return this;this.dependencies[s].push(t),this.event=n(this.event,e.event,t)}else this.event=n(this.event,e.event);return this.decorators=i(this.decorators,e.decorators),this.model(e.meta.defs),Object.values(e.routes).forEach(({method:s,path:r,handler:i,hooks:o})=>{let n=e.wsRouter?.find("subscribe",r);if(n){let t=e.wsRouter.history.find(([e,t])=>r===t);if(!t)return;return this.ws(r,t[2])}this.add(s,r,i,t(h(o),{error:e.event.error}))}),this}mount(e,t){if("function"==typeof e||0===e.length||"/"===e){let s="function"==typeof e?e:t,r=async({request:e,path:t})=>s(new Request("http://a.cc"+t,e));return this.all("/",r,{type:"none"}),this.all("/*",r,{type:"none"}),this}let s=e.length,r=async({request:e,path:r})=>t(new Request("http://a.cc"+r.slice(s),e));return this.all(e,r,{type:"none"}),this.all(e+(e.endsWith("/")?"*":"/*"),r,{type:"none"}),this}get(e,t,s){return this.add("GET",e,t,a(s)),this}post(e,t,s){return this.add("POST",e,t,a(s)),this}put(e,t,s){return this.add("PUT",e,t,a(s)),this}patch(e,t,s){return this.add("PATCH",e,t,a(s)),this}delete(e,t,s){return this.add("DELETE",e,t,a(s)),this}options(e,t,s){return this.add("OPTIONS",e,t,a(s)),this}all(e,t,s){return this.add("ALL",e,t,a(s)),this}head(e,t,s){return this.add("HEAD",e,t,a(s)),this}trace(e,t,s){return this.add("TRACE",e,t,a(s)),this}connect(e,t,s){return this.add("CONNECT",e,t,a(s)),this}ws(e,t){if(!this.wsRouter)throw Error("Can't find WebSocket. Please register WebSocket plugin first by importing 'elysia/ws'");return this.wsRouter.add("subscribe",e,t),this.get(e,e=>{if(!this.server?.upgrade(e.request,{headers:"function"==typeof t.upgrade?t.upgrade(e):t.upgrade,data:{...e,id:Date.now(),headers:e.request.headers.toJSON(),message:s(t?.body,{models:this.meta.defs}),transformMessage:t.transform?Array.isArray(t.transformMessage)?t.transformMessage:[t.transformMessage]:[]}}))return e.set.status=400,"Expected a websocket connection"},{beforeHandle:t.beforeHandle,transform:t.transform,headers:t?.headers,params:t?.params,query:t?.query}),this}route(e,t,s,{config:r,...i}={config:{allowMeta:!1}}){return this.add(e,t,s,a(i),r),this}state(e,t){return"object"==typeof e?this.store=i(this.store,e):e in this.store||(this.store[e]=t),this}decorate(e,t){return"object"==typeof e?this.decorators=i(this.decorators,e):e in this.decorators||(this.decorators[e]=t),this}derive(e){return e.$elysia="derive",this.onTransform(e)}schema(e){let t=this.meta.defs;return this.$schema={body:s(e.body,{models:t}),headers:s(e?.headers,{models:t,additionalProperties:!0}),params:s(e?.params,{models:t}),query:s(e?.query,{models:t}),response:s(e?.response,{models:t})},this}compile(){return this.fetch=this.config.aot?u(this):v(this),"function"==typeof this.server?.reload&&this.server.reload({...this.server,fetch:this.fetch}),this}handle=async e=>this.fetch(e);fetch=e=>(this.fetch=this.config.aot?u(this):v(this))(e);handleError=async(e,t,s)=>(this.handleError=this.config.aot?d(this):m(this))(e,t,s);outerErrorHandler=e=>new Response(e.message,{status:e?.status??500});listen=(e,t)=>{if(!Bun)throw Error("Bun to run");if(this.compile(),"string"==typeof e&&Number.isNaN(e=+e.trim()))throw Error("Port must be a numeric value");let s=this.fetch,r="object"==typeof e?{development:!p,...this.config.serve,...e,fetch:s,error:this.outerErrorHandler}:{development:!p,...this.config.serve,port:e,fetch:s,error:this.outerErrorHandler};if("undefined"==typeof Bun)throw Error(".listen() is designed to run on Bun only. If you are running Elysia in other environment please use a dedicated plugin or export the handler via Elysia.fetch");this.server=Bun?.serve(r);for(let e=0;e<this.event.start.length;e++)this.event.start[e](this);return t&&t(this.server),Promise.all(this.lazyLoadModules).then(()=>{Bun?.gc(!0)}),this};stop=async()=>{if(!this.server)throw Error("Elysia isn't running. Call `app.listen` to start the server.");this.server.stop();for(let e=0;e<this.event.stop.length;e++)await this.event.stop[e](this)};get modules(){return Promise.all(this.lazyLoadModules)}model(e,t){return"object"==typeof e?Object.entries(e).forEach(([e,t])=>{e in this.meta.defs||(this.meta.defs[e]=t)}):this.meta.defs[e]=t,this}}export{mapResponse,mapCompactResponse,mapEarlyResponse}from"./handler";export{t}from"./custom-types";export{ws}from"./ws";export{getSchemaValidator,mergeDeep,mergeHook,mergeObjectArray,getResponseSchemaValidator}from"./utils";export{ParseError,NotFoundError,ValidationError,InternalServerError}from"./error";export{y as Elysia}; | ||
`)}else this.router.add(e,i,f),this.config.strictPath||this.router.add(e,i.endsWith("/")?i.slice(0,i.length-1):i+"/",f)}onStart(e){return this.event.start.push(e),this}onRequest(e){return this.event.request.push(e),this}onParse(e){return this.event.parse.splice(this.event.parse.length-1,0,e),this}onTransform(e){return this.event.transform.push(e),this}onBeforeHandle(e){return this.event.beforeHandle.push(e),this}onAfterHandle(e){return this.event.afterHandle.push(e),this}onResponse(e){return this.event.onResponse.push(e),this}addError(e,t){if("string"==typeof e&&t)return t.prototype[f]=e,this;for(let[t,s]of Object.entries(e))s.prototype[f]=t;return this}onError(e){return e&&this.event.error.push(e),this}onStop(e){return this.event.stop.push(e),this}on(e,t){switch(e){case"start":this.event.start.push(t);break;case"request":this.event.request.push(t);break;case"response":this.event.onResponse.push(t);break;case"parse":this.event.parse.push(t);break;case"transform":this.event.transform.push(t);break;case"beforeHandle":this.event.beforeHandle.push(t);break;case"afterHandle":this.event.afterHandle.push(t);break;case"error":this.event.error.push(t);break;case"stop":this.event.stop.push(t)}return this}group(e,s,r){let o=new y(this.config);o.store=this.store,this.wsRouter&&o.use(l());let n="object"==typeof s,a=(n?r:s)(o);return this.decorators=i(this.decorators,o.decorators),a.event.request.length&&(this.event.request=[...this.event.request,...a.event.request]),a.event.onResponse.length&&(this.event.onResponse=[...this.event.onResponse,...a.event.onResponse]),this.model(a.meta.defs),Object.values(o.routes).forEach(({method:r,path:i,handler:h,hooks:d})=>{if(i=this.config.prefix+e+i,n){let e=o.wsRouter?.find("subscribe",i);if(e){let e=o.wsRouter.history.find(([e,t])=>i===t);if(!e)return;return this.ws(i,e[2])}this.add(r,i,h,t(s,{...d,error:d.error?Array.isArray(d.error)?[...d.error,...a.event.error]:[d.error,...a.event.error]:a.event.error}))}else{let e=o.wsRouter?.find("subscribe",i);if(e){let e=o.wsRouter.history.find(([e,t])=>i===t);if(!e)return;return this.ws(i,e[2])}this.add(r,i,h,t(d,{error:a.event.error}),{skipPrefix:!0})}}),o.wsRouter&&this.wsRouter&&o.wsRouter.history.forEach(([t,s,r])=>{"/"===(s=this.config.prefix+e+s)?this.wsRouter?.add(t,e,r):this.wsRouter?.add(t,`${e}${s}`,r)}),this}guard(e,s){if(!s)return this.event=n(this.event,e),this.$schema={body:e.body,headers:e.headers,params:e.params,query:e.query,response:e.response},this;let r=new y;r.store=this.store,this.wsRouter&&r.use(l());let o=s(r);return this.decorators=i(this.decorators,r.decorators),o.event.request.length&&(this.event.request=[...this.event.request,...o.event.request]),o.event.onResponse.length&&(this.event.onResponse=[...this.event.onResponse,...o.event.onResponse]),this.model(o.meta.defs),Object.values(r.routes).forEach(({method:s,path:i,handler:n,hooks:h})=>{let d=r.wsRouter?.find("subscribe",i);if(d){let e=r.wsRouter.history.find(([e,t])=>i===t);if(!e)return;return this.ws(i,e[2])}this.add(s,i,n,a(t(e,{...h,error:h.error?Array.isArray(h.error)?[...h.error,...o.event.error]:[h.error,...o.event.error]:o.event.error})))}),r.wsRouter&&this.wsRouter&&r.wsRouter.history.forEach(([e,t,s])=>{this.wsRouter?.add(e,t,s)}),this}use(e){if(e instanceof Promise)return this.lazyLoadModules.push(e.then(e=>{if("function"==typeof e)return e(this);if("function"==typeof e.default)return e.default(this);let s=e.default,{config:{name:r,seed:a}}=s;if(r){this.dependencies[r]||(this.dependencies[r]=[]);let e=void 0!==a?o(r+JSON.stringify(a)):0;if(this.dependencies[r].some(t=>e===t))return this;this.dependencies[r].push(e),this.event=n(this.event,s.event,e)}else this.event=n(this.event,s.event);return this.decorators=i(this.decorators,s.decorators),this.model(s.meta.defs),Object.values(s.routes).forEach(({method:e,path:r,handler:i,hooks:o})=>{let n=s.wsRouter?.find("subscribe",r);if(n){let e=s.wsRouter.history.find(([e,t])=>r===t);if(!e)return;return this.ws(r,e[2])}this.add(e,r,i,t(o,{error:s.event.error}))}),this}).then(e=>e.compile())),this;if("function"==typeof e){let t=e(this);return t instanceof Promise?(this.lazyLoadModules.push(t.then(e=>e.compile())),this):t}let{config:{name:s,seed:r}}=e;if(s){s in this.dependencies||(this.dependencies[s]=[]);let t=void 0!==r?o(s+JSON.stringify(r)):0;if(this.dependencies[s].some(e=>t===e))return this;this.dependencies[s].push(t),this.event=n(this.event,e.event,t)}else this.event=n(this.event,e.event);return this.decorators=i(this.decorators,e.decorators),this.model(e.meta.defs),Object.values(e.routes).forEach(({method:s,path:r,handler:i,hooks:o})=>{let n=e.wsRouter?.find("subscribe",r);if(n){let t=e.wsRouter.history.find(([e,t])=>r===t);if(!t)return;return this.ws(r,t[2])}this.add(s,r,i,t(h(o),{error:e.event.error}))}),this}mount(e,t){if("function"==typeof e||0===e.length||"/"===e){let s="function"==typeof e?e:t,r=async({request:e,path:t})=>s(new Request("http://a.cc"+t,e));return this.all("/",r,{type:"none"}),this.all("/*",r,{type:"none"}),this}let s=e.length,r=async({request:e,path:r})=>t(new Request("http://a.cc"+r.slice(s),e));return this.all(e,r,{type:"none"}),this.all(e+(e.endsWith("/")?"*":"/*"),r,{type:"none"}),this}get(e,t,s){return this.add("GET",e,t,a(s)),this}post(e,t,s){return this.add("POST",e,t,a(s)),this}put(e,t,s){return this.add("PUT",e,t,a(s)),this}patch(e,t,s){return this.add("PATCH",e,t,a(s)),this}delete(e,t,s){return this.add("DELETE",e,t,a(s)),this}options(e,t,s){return this.add("OPTIONS",e,t,a(s)),this}all(e,t,s){return this.add("ALL",e,t,a(s)),this}head(e,t,s){return this.add("HEAD",e,t,a(s)),this}trace(e,t,s){return this.add("TRACE",e,t,a(s)),this}connect(e,t,s){return this.add("CONNECT",e,t,a(s)),this}ws(e,t){if(!this.wsRouter)throw Error("Can't find WebSocket. Please register WebSocket plugin first by importing 'elysia/ws'");return this.wsRouter.add("subscribe",e,t),this.get(e,e=>{if(!this.server?.upgrade(e.request,{headers:"function"==typeof t.upgrade?t.upgrade(e):t.upgrade,data:{...e,id:Date.now(),headers:e.request.headers.toJSON(),message:s(t?.body,{models:this.meta.defs}),transformMessage:t.transform?Array.isArray(t.transformMessage)?t.transformMessage:[t.transformMessage]:[]}}))return e.set.status=400,"Expected a websocket connection"},{beforeHandle:t.beforeHandle,transform:t.transform,headers:t?.headers,params:t?.params,query:t?.query}),this}route(e,t,s,{config:r,...i}={config:{allowMeta:!1}}){return this.add(e,t,s,a(i),r),this}state(e,t){return"object"==typeof e?this.store=i(this.store,e):e in this.store||(this.store[e]=t),this}decorate(e,t){return"object"==typeof e?this.decorators=i(this.decorators,e):e in this.decorators||(this.decorators[e]=t),this}derive(e){return e.$elysia="derive",this.onTransform(e)}schema(e){let t=this.meta.defs;return this.$schema={body:s(e.body,{models:t}),headers:s(e?.headers,{models:t,additionalProperties:!0}),params:s(e?.params,{models:t}),query:s(e?.query,{models:t}),response:s(e?.response,{models:t})},this}compile(){return this.fetch=this.config.aot?u(this):v(this),"function"==typeof this.server?.reload&&this.server.reload({...this.server,fetch:this.fetch}),this}handle=async e=>this.fetch(e);fetch=e=>(this.fetch=this.config.aot?u(this):v(this))(e);handleError=async(e,t,s)=>(this.handleError=this.config.aot?d(this):m(this))(e,t,s);outerErrorHandler=e=>new Response(e.message,{status:e?.status??500});listen=(e,t)=>{if(!Bun)throw Error("Bun to run");if(this.compile(),"string"==typeof e&&Number.isNaN(e=+e.trim()))throw Error("Port must be a numeric value");let s=this.fetch,r="object"==typeof e?{development:!p,...this.config.serve,...e,fetch:s,error:this.outerErrorHandler}:{development:!p,...this.config.serve,port:e,fetch:s,error:this.outerErrorHandler};if("undefined"==typeof Bun)throw Error(".listen() is designed to run on Bun only. If you are running Elysia in other environment please use a dedicated plugin or export the handler via Elysia.fetch");this.server=Bun?.serve(r);for(let e=0;e<this.event.start.length;e++)this.event.start[e](this);return t&&t(this.server),Promise.all(this.lazyLoadModules).then(()=>{Bun?.gc(!0)}),this};stop=async()=>{if(!this.server)throw Error("Elysia isn't running. Call `app.listen` to start the server.");this.server.stop();for(let e=0;e<this.event.stop.length;e++)await this.event.stop[e](this)};get modules(){return Promise.all(this.lazyLoadModules)}model(e,t){return"object"==typeof e?Object.entries(e).forEach(([e,t])=>{e in this.meta.defs||(this.meta.defs[e]=t)}):this.meta.defs[e]=t,this}}export{mapResponse,mapCompactResponse,mapEarlyResponse}from"./handler";export{t}from"./custom-types";export{ws}from"./ws";export{getSchemaValidator,mergeDeep,mergeHook,mergeObjectArray,getResponseSchemaValidator}from"./utils";export{ParseError,NotFoundError,ValidationError,InternalServerError}from"./error";export{y as Elysia}; |
{ | ||
"name": "elysia", | ||
"description": "Fast, and friendly Bun web framework", | ||
"version": "0.6.12", | ||
"version": "0.6.13-exp.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "saltyAom", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1156997
51
6353
9