New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

elysia

Package Overview
Dependencies
Maintainers
0
Versions
495
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.2.11 to 1.2.12

4

dist/cjs/compose.js

@@ -516,5 +516,5 @@ "use strict";

if (adapter.parser.declare) fnLiteral += adapter.parser.declare;
fnLiteral += "\nisParsing=true";
fnLiteral += "\nisParsing=true\n";
const parser = typeof hooks.parse === "string" ? hooks.parse : Array.isArray(hooks.parse) && hooks.parse.length === 1 ? typeof hooks.parse[0] === "string" ? hooks.parse[0] : typeof hooks.parse[0].fn === "string" ? hooks.parse[0].fn : void 0 : void 0;
if (parser && parser in defaultParsers) {
if (parser && defaultParsers.includes(parser)) {
const reporter = report("parse", {

@@ -521,0 +521,0 @@ total: hooks.parse?.length

@@ -475,4 +475,7 @@ import type { Elysia, AnyElysia } from '.';

export type ResolveResolutionsArray<T extends any[], Carry extends Record<RecordKey, unknown> = {}> = T extends [infer Fn extends AnyContextFn, ...infer Rest] ? ReturnType<Fn> extends infer Value extends Record<keyof any, unknown> ? ResolveResolutionsArray<Rest, Value & Carry> : ResolveResolutionsArray<Rest, Carry> : Prettify<Carry>;
export type AnyLocalHook = LocalHook<any, any, any, any, any>;
export type LocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Errors extends Record<string, Error>, Macro extends BaseMacro, Parser extends string = ''> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Macro & NoInfer<{
export type AnyLocalHook = LocalHook<any, any, any, any, any, any>;
type LocalHookKey = keyof InputSchema<any> | 'detail' | 'parse' | 'transform' | 'beforeHandle' | 'afterHandle' | 'mapResponse' | 'afterResponse' | 'error' | 'tags';
export type LocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Errors extends Record<string, Error>, Macro extends BaseMacro, MacroKey extends keyof any, Parser extends string = ''> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Macro & NoInfer<keyof Macro extends '' ? {} : {
[K in Exclude<keyof Macro, MacroKey | LocalHookKey>]: never;
}> & NoInfer<{
detail?: DocumentDecoration;

@@ -479,0 +482,0 @@ /**

import type { ElysiaWS } from './index';
import { WebSocketHandler } from './bun';
import type { Context } from '../context';
import { AfterHandler, AfterResponseHandler, BaseMacro, ContentType, DocumentDecoration, ErrorHandler, InputSchema, Isolate, MapResponse, MaybeArray, MaybePromise, OptionalHandler, Prettify, RouteSchema, SingletonBase, TransformHandler } from '../types';
import { AfterHandler, AfterResponseHandler, BaseMacro, DocumentDecoration, ErrorHandler, InputSchema, Isolate, MapResponse, MaybeArray, MaybePromise, OptionalHandler, Prettify, RouteSchema, SingletonBase, TransformHandler } from '../types';
type TypedWebSocketMethod = 'open' | 'message' | 'drain' | 'close' | 'ping' | 'pong';

@@ -24,16 +24,7 @@ export type FlattenResponse<Response extends RouteSchema['response']> = {} extends Response ? unknown : Response[keyof Response];

}>, message: unknown) => MaybePromise<Route['body'] | void | undefined>;
export type AnyWSLocalHook = WSLocalHook<any, any, any, any>;
export type WSLocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Extension extends BaseMacro> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Extension & {
/**
* Short for 'Content-Type'
*
* Available:
* - 'none': do not parse body
* - 'text' / 'text/plain': parse body as string
* - 'json' / 'application/json': parse body as json
* - 'formdata' / 'multipart/form-data': parse body as form-data
* - 'urlencoded' / 'application/x-www-form-urlencoded: parse body as urlencoded
* - 'arraybuffer': parse body as readable stream
*/
type?: ContentType;
export type AnyWSLocalHook = WSLocalHook<any, any, any, any, any>;
type WSLocalHookKey = keyof TypedWebSocketHandler<any, any> | 'detail' | 'upgrade' | 'parse' | 'transform' | 'beforeHandle' | 'afterHandle' | 'mapResponse' | 'afterResponse' | 'error' | 'tags' | keyof InputSchema<any>;
export type WSLocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Macro extends BaseMacro, MacroKey extends keyof any> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Macro & NoInfer<{
[K in Exclude<keyof Macro, MacroKey | WSLocalHookKey>]: never;
}> & {
detail?: DocumentDecoration;

@@ -40,0 +31,0 @@ /**

@@ -475,4 +475,7 @@ import type { Elysia, AnyElysia } from '.';

export type ResolveResolutionsArray<T extends any[], Carry extends Record<RecordKey, unknown> = {}> = T extends [infer Fn extends AnyContextFn, ...infer Rest] ? ReturnType<Fn> extends infer Value extends Record<keyof any, unknown> ? ResolveResolutionsArray<Rest, Value & Carry> : ResolveResolutionsArray<Rest, Carry> : Prettify<Carry>;
export type AnyLocalHook = LocalHook<any, any, any, any, any>;
export type LocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Errors extends Record<string, Error>, Macro extends BaseMacro, Parser extends string = ''> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Macro & NoInfer<{
export type AnyLocalHook = LocalHook<any, any, any, any, any, any>;
type LocalHookKey = keyof InputSchema<any> | 'detail' | 'parse' | 'transform' | 'beforeHandle' | 'afterHandle' | 'mapResponse' | 'afterResponse' | 'error' | 'tags';
export type LocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Errors extends Record<string, Error>, Macro extends BaseMacro, MacroKey extends keyof any, Parser extends string = ''> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Macro & NoInfer<keyof Macro extends '' ? {} : {
[K in Exclude<keyof Macro, MacroKey | LocalHookKey>]: never;
}> & NoInfer<{
detail?: DocumentDecoration;

@@ -479,0 +482,0 @@ /**

import type { ElysiaWS } from './index';
import { WebSocketHandler } from './bun';
import type { Context } from '../context';
import { AfterHandler, AfterResponseHandler, BaseMacro, ContentType, DocumentDecoration, ErrorHandler, InputSchema, Isolate, MapResponse, MaybeArray, MaybePromise, OptionalHandler, Prettify, RouteSchema, SingletonBase, TransformHandler } from '../types';
import { AfterHandler, AfterResponseHandler, BaseMacro, DocumentDecoration, ErrorHandler, InputSchema, Isolate, MapResponse, MaybeArray, MaybePromise, OptionalHandler, Prettify, RouteSchema, SingletonBase, TransformHandler } from '../types';
type TypedWebSocketMethod = 'open' | 'message' | 'drain' | 'close' | 'ping' | 'pong';

@@ -24,16 +24,7 @@ export type FlattenResponse<Response extends RouteSchema['response']> = {} extends Response ? unknown : Response[keyof Response];

}>, message: unknown) => MaybePromise<Route['body'] | void | undefined>;
export type AnyWSLocalHook = WSLocalHook<any, any, any, any>;
export type WSLocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Extension extends BaseMacro> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Extension & {
/**
* Short for 'Content-Type'
*
* Available:
* - 'none': do not parse body
* - 'text' / 'text/plain': parse body as string
* - 'json' / 'application/json': parse body as json
* - 'formdata' / 'multipart/form-data': parse body as form-data
* - 'urlencoded' / 'application/x-www-form-urlencoded: parse body as urlencoded
* - 'arraybuffer': parse body as readable stream
*/
type?: ContentType;
export type AnyWSLocalHook = WSLocalHook<any, any, any, any, any>;
type WSLocalHookKey = keyof TypedWebSocketHandler<any, any> | 'detail' | 'upgrade' | 'parse' | 'transform' | 'beforeHandle' | 'afterHandle' | 'mapResponse' | 'afterResponse' | 'error' | 'tags' | keyof InputSchema<any>;
export type WSLocalHook<LocalSchema extends InputSchema, Schema extends RouteSchema, Singleton extends SingletonBase, Macro extends BaseMacro, MacroKey extends keyof any> = (LocalSchema extends {} ? LocalSchema : Isolate<LocalSchema>) & Macro & NoInfer<{
[K in Exclude<keyof Macro, MacroKey | WSLocalHookKey>]: never;
}> & {
detail?: DocumentDecoration;

@@ -40,0 +31,0 @@ /**

{
"name": "elysia",
"description": "Ergonomic Framework for Human",
"version": "1.2.11",
"version": "1.2.12",
"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 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 not supported yet

Sorry, the diff of this file is too big to display

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