Socket
Socket
Sign inDemoInstall

elysia

Package Overview
Dependencies
Maintainers
1
Versions
400
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.0-rc.1 to 1.1.0-rc.2

3

dist/cjs/types.d.ts

@@ -5,3 +5,2 @@ import type { Elysia } from '.';

import type { TypeCheck, ValueError } from '@sinclair/typebox/compiler';
import type { AsyncLocalStorage } from 'async_hooks';
import type { OpenAPIV3 } from 'openapi-types';

@@ -124,3 +123,2 @@ import type { CookieOptions } from './cookies';

normalize?: boolean;
asyncLocalStorage?: AsyncLocalStorage<unknown>;
};

@@ -667,2 +665,3 @@ export type MaybeArray<T> = T | T[];

export type ContextAppendType = 'append' | 'override';
export type HigherOrderFunction<T extends (...arg: unknown[]) => Function = (...arg: unknown[]) => Function> = (fn: T, request: Request) => ReturnType<T>;
export type HTTPHeaders = Record<string, string> & {

@@ -669,0 +668,0 @@ 'www-authenticate'?: string;

@@ -1252,23 +1252,23 @@ "use strict";

};
var injectChecksum = (checksum2, x) => {
if (!x)
return;
if (!Array.isArray(x)) {
const fn = x;
if (checksum2 && !fn.checksum)
fn.checksum = checksum2;
if (fn.scope === "scoped")
fn.scope = "local";
return fn;
}
const fns = [...x];
for (const fn of fns) {
if (checksum2 && !fn.checksum)
fn.checksum = checksum2;
if (fn.scope === "scoped")
fn.scope = "local";
}
return fns;
};
var mergeLifeCycle = (a, b, checksum2) => {
const injectChecksum = (x) => {
if (!x)
return;
if (!Array.isArray(x)) {
const fn = x;
if (checksum2 && !fn.checksum)
fn.checksum = checksum2;
if (fn.scope === "scoped")
fn.scope = "local";
return fn;
}
const fns = [...x];
for (const fn of fns) {
if (checksum2 && !fn.checksum)
fn.checksum = checksum2;
if (fn.scope === "scoped")
fn.scope = "local";
}
return fns;
};
return {

@@ -1279,31 +1279,31 @@ // ...a,

a.start,
injectChecksum(b?.start)
injectChecksum(checksum2, b?.start)
),
request: mergeObjectArray(
a.request,
injectChecksum(b?.request)
injectChecksum(checksum2, b?.request)
),
parse: mergeObjectArray(
a.parse,
injectChecksum(b?.parse)
injectChecksum(checksum2, b?.parse)
),
transform: mergeObjectArray(
a.transform,
injectChecksum(b?.transform)
injectChecksum(checksum2, b?.transform)
),
beforeHandle: mergeObjectArray(
a.beforeHandle,
injectChecksum(b?.beforeHandle)
injectChecksum(checksum2, b?.beforeHandle)
),
afterHandle: mergeObjectArray(
a.afterHandle,
injectChecksum(b?.afterHandle)
injectChecksum(checksum2, b?.afterHandle)
),
mapResponse: mergeObjectArray(
a.mapResponse,
injectChecksum(b?.mapResponse)
injectChecksum(checksum2, b?.mapResponse)
),
afterResponse: mergeObjectArray(
a.afterResponse,
injectChecksum(b?.afterResponse)
injectChecksum(checksum2, b?.afterResponse)
),

@@ -1313,11 +1313,11 @@ // Already merged on Elysia._use, also logic is more complicated, can't directly merge

a.trace,
injectChecksum(b?.trace)
injectChecksum(checksum2, b?.trace)
),
error: mergeObjectArray(
a.error,
injectChecksum(b?.error)
injectChecksum(checksum2, b?.error)
),
stop: mergeObjectArray(
a.stop,
injectChecksum(b?.stop)
injectChecksum(checksum2, b?.stop)
)

@@ -1324,0 +1324,0 @@ };

@@ -5,3 +5,2 @@ import type { Elysia } from '.';

import type { TypeCheck, ValueError } from '@sinclair/typebox/compiler';
import type { AsyncLocalStorage } from 'async_hooks';
import type { OpenAPIV3 } from 'openapi-types';

@@ -124,3 +123,2 @@ import type { CookieOptions } from './cookies';

normalize?: boolean;
asyncLocalStorage?: AsyncLocalStorage<unknown>;
};

@@ -667,2 +665,3 @@ export type MaybeArray<T> = T | T[];

export type ContextAppendType = 'append' | 'override';
export type HigherOrderFunction<T extends (...arg: unknown[]) => Function = (...arg: unknown[]) => Function> = (fn: T, request: Request) => ReturnType<T>;
export type HTTPHeaders = Record<string, string> & {

@@ -669,0 +668,0 @@ 'www-authenticate'?: string;

{
"name": "elysia",
"description": "Ergonomic Framework for Human",
"version": "1.1.0-rc.1",
"version": "1.1.0-rc.2",
"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 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 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