Comparing version 1.1.9 to 1.1.11
import type { Context } from './context'; | ||
import { LocalHook } from './types'; | ||
export declare const isNotEmpty: (obj?: Object) => boolean; | ||
@@ -10,1 +11,2 @@ export declare const parseSetCookies: (headers: Headers, setCookie: string[]) => Headers; | ||
export declare const errorToResponse: (error: Error, set?: Context["set"]) => import("undici-types").Response; | ||
export declare const createStaticHandler: (handle: unknown, hooks: LocalHook<any, any, any, any, any, any, any>, setHeaders?: Context["set"]["headers"]) => (() => Response) | undefined; |
@@ -33,2 +33,3 @@ "use strict"; | ||
__export(handler_exports, { | ||
createStaticHandler: () => createStaticHandler, | ||
errorToResponse: () => errorToResponse, | ||
@@ -1727,4 +1728,13 @@ isNotEmpty: () => isNotEmpty, | ||
); | ||
var createStaticHandler = (handle, hooks, setHeaders = {}) => { | ||
if (typeof handle === "function") return; | ||
const response = mapResponse(handle, { | ||
headers: setHeaders | ||
}); | ||
if (hooks.parse.length === 0 && hooks.transform.length === 0 && hooks.beforeHandle.length === 0 && hooks.afterHandle.length === 0) | ||
return response.clone.bind(response); | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
createStaticHandler, | ||
errorToResponse, | ||
@@ -1731,0 +1741,0 @@ isNotEmpty, |
@@ -120,6 +120,12 @@ import type { Elysia } from '.'; | ||
* | ||
* @default false | ||
* @default true | ||
*/ | ||
normalize?: boolean; | ||
handler?: ComposerGeneralHandlerOptions; | ||
/** | ||
* Enable Bun static response | ||
* | ||
* @default true | ||
*/ | ||
nativeStaticResponse?: boolean; | ||
}; | ||
@@ -146,3 +152,3 @@ export type ValidatorLayer = { | ||
export type Prettify2<T> = { | ||
[K in keyof T]: Prettify<T[K]>; | ||
[K in keyof T]: T extends object ? Prettify<T[K]> : T[K]; | ||
} & {}; | ||
@@ -149,0 +155,0 @@ export type Partial2<T> = { |
@@ -1076,3 +1076,5 @@ "use strict"; | ||
Code: () => "", | ||
Clean: cleaner | ||
Clean: cleaner, | ||
Decode: (value) => import_value3.Value.Decode(schema, value), | ||
Encode: (value) => import_value3.Value.Encode(schema, value) | ||
}; | ||
@@ -1163,3 +1165,5 @@ if (normalize && schema.additionalProperties === false) | ||
Errors: (value) => import_value3.Value.Errors(schema, value), | ||
Code: () => "" | ||
Code: () => "", | ||
Decode: (value) => import_value3.Value.Decode(schema, value), | ||
Encode: (value) => import_value3.Value.Encode(schema, value) | ||
}; | ||
@@ -1166,0 +1170,0 @@ const compiledValidator = import_compiler3.TypeCompiler.Compile(schema, references); |
import type { Context } from './context'; | ||
import { LocalHook } from './types'; | ||
export declare const isNotEmpty: (obj?: Object) => boolean; | ||
@@ -10,1 +11,2 @@ export declare const parseSetCookies: (headers: Headers, setCookie: string[]) => Headers; | ||
export declare const errorToResponse: (error: Error, set?: Context["set"]) => import("undici-types").Response; | ||
export declare const createStaticHandler: (handle: unknown, hooks: LocalHook<any, any, any, any, any, any, any>, setHeaders?: Context["set"]["headers"]) => (() => Response) | undefined; |
@@ -120,6 +120,12 @@ import type { Elysia } from '.'; | ||
* | ||
* @default false | ||
* @default true | ||
*/ | ||
normalize?: boolean; | ||
handler?: ComposerGeneralHandlerOptions; | ||
/** | ||
* Enable Bun static response | ||
* | ||
* @default true | ||
*/ | ||
nativeStaticResponse?: boolean; | ||
}; | ||
@@ -146,3 +152,3 @@ export type ValidatorLayer = { | ||
export type Prettify2<T> = { | ||
[K in keyof T]: Prettify<T[K]>; | ||
[K in keyof T]: T extends object ? Prettify<T[K]> : T[K]; | ||
} & {}; | ||
@@ -149,0 +155,0 @@ export type Partial2<T> = { |
{ | ||
"name": "elysia", | ||
"description": "Ergonomic Framework for Human", | ||
"version": "1.1.9", | ||
"version": "1.1.11", | ||
"author": { | ||
@@ -76,3 +76,3 @@ "name": "saltyAom", | ||
}, | ||
"./fasti-querystring": { | ||
"./fast-querystring": { | ||
"types": "./dist/fast-querystring.d.ts", | ||
@@ -79,0 +79,0 @@ "import": "./dist/fast-querystring.mjs", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or 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
2605126
55778
24