Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elysia

Package Overview
Dependencies
Maintainers
0
Versions
429
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elysia - npm Package Compare versions

Comparing version 1.1.9 to 1.1.11

2

dist/cjs/handler.d.ts
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,

10

dist/cjs/types.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc