Comparing version 0.5.0-exp-230428.1743 to 0.5.0-exp-230428.1744
@@ -237,2 +237,2 @@ let e;import{parse as r}from"fast-querystring";import{mapEarlyResponse as t,mapResponse as a}from"./handler";import{SCHEMA as s,DEFS as o,createValidationError as n,removeHostnameRegex as c,removeFragmentRegex as l,removePathRegex as i,removeQueryRegex as u}from"./utils";import{mapErrorCode as d}from"./error";let f="AsyncFunction",p=e=>e.constructor.name===f,y=(e,r)=>{let t=r.slice(r.indexOf("(")+1,r.indexOf(")"));if(""===t)return!1;if(123===t.charCodeAt(0))return!!(t.includes(`{ ${e}`)||t.includes(`, ${e}`));if(r.includes(`${t}.${e}`))return!0;let a=RegExp(" (\\w+) = context","g"),s=[t];for(let e of r.matchAll(a))s.push(e[1]);let o=RegExp(`{.*?} = (${s.join("|")})`,"g");for(let[t]of r.matchAll(o))if(t.includes(`{ ${e}`)||t.includes(`, ${e}`))return!0;return!1};export const composeHandler=({method:e,hooks:c,validator:l,handler:i,handleError:u,meta:h})=>{let m="try {\n",b="string"==typeof c.type,$="GET"!==e&&(l.body||b||[i,...c.transform,...c.beforeHandle,...c.afterHandle].some(e=>y("body",e.toString()))),g=$||i.constructor.name===f||c.parse.length||c.afterHandle.find(p)||c.beforeHandle.find(p)||c.transform.find(p);if($){let e=l?.body?.schema;if(e&&"anyOf"in e){let r=!1,t=e.anyOf[0].type;for(let a of e.anyOf)if(a.type!==t){r=!0;break}r&&(e=void 0)}if(b||e){if(e||(m+="if(body) "),m+=`try { | ||
} | ||
}`;return e=[o,a.event.request.length,d],console.log(d),Function("data",d)({app:a,parseQuery:r,mapEarlyResponse:t,removeHostnameRegex:c,removeQueryRegex:u,removePathRegex:i,removeFragmentRegex:l})}; | ||
}`;return e=[o,a.event.request.length,d],Function("data",d)({app:a,parseQuery:r,mapEarlyResponse:t,removeHostnameRegex:c,removeQueryRegex:u,removePathRegex:i,removeFragmentRegex:l})}; |
{ | ||
"name": "elysia", | ||
"description": "Fast, and friendly Bun web framework", | ||
"version": "0.5.0-exp-230428.1743", | ||
"version": "0.5.0-exp-230428.1744", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "saltyAom", |
@@ -569,3 +569,3 @@ import { Elysia } from '.' | ||
console.log(fnLiteral) | ||
// console.log(fnLiteral) | ||
@@ -572,0 +572,0 @@ return Function( |
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
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
214605