Socket
Socket
Sign inDemoInstall

@tsed/platform-middlewares

Package Overview
Dependencies
Maintainers
1
Versions
505
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsed/platform-middlewares - npm Package Compare versions

Comparing version 6.71.1 to 7.0.0-alpha.1

21

lib/decorators/authOptions.d.ts
import { Type } from "@tsed/core";
export interface IAuthOptions {
/**
* @deprecated Since v6. Use @Returns from @tsed/schema
*/
responses?: {
[statusCode: string]: {
description: string;
};
};
/**
* @deprecated Since v6. Use @Security from @tsed/schema
*/
security?: {
[securityName: string]: string[];
}[] | {
[securityName: string]: string[];
};
[key: string]: any;
}
/**

@@ -42,2 +23,2 @@ * Change authentication options.

*/
export declare function AuthOptions(guardAuth: Type<any>, options?: IAuthOptions): Function;
export declare function AuthOptions(guardAuth: Type<any>, options?: Record<string, unknown>): Function;

3

lib/decorators/useAuth.d.ts
import { Type } from "@tsed/core";
import { IAuthOptions } from "./authOptions";
/**

@@ -23,2 +22,2 @@ * Use custom authentication strategy on your endpoint.

*/
export declare function UseAuth(guardAuth: Type<any>, options?: IAuthOptions): Function;
export declare function UseAuth(guardAuth: Type<any>, options?: Record<string, unknown>): Function;
export interface MiddlewareMethods {
use(...args: any[]): void | any | Promise<any>;
}
/**
* @deprecated Since v6. Use MiddlewareMethods instead
*/
export interface IMiddleware extends MiddlewareMethods {
}

@@ -46,23 +46,2 @@ var di = require('@tsed/di');

const store = entity.store;
if (options.responses) {
const {
responses
} = options;
store.merge("responses", responses, true);
delete options.responses;
}
if (options.security) {
const {
security
} = options;
[].concat(security).forEach(security => {
Object.entries(security).forEach(([name, scopes]) => {
entity.operation.addSecurityScopes(name, scopes);
});
});
delete options.security;
}
store.merge(guardAuth, options, true);

@@ -69,0 +48,0 @@ })(...args);

@@ -46,23 +46,2 @@ import { Injectable, ProviderType } from '@tsed/di';

const store = entity.store;
if (options.responses) {
const {
responses
} = options;
store.merge("responses", responses, true);
delete options.responses;
}
if (options.security) {
const {
security
} = options;
[].concat(security).forEach(security => {
Object.entries(security).forEach(([name, scopes]) => {
entity.operation.addSecurityScopes(name, scopes);
});
});
delete options.security;
}
store.merge(guardAuth, options, true);

@@ -69,0 +48,0 @@ })(...args);

{
"name": "@tsed/platform-middlewares",
"version": "6.71.1",
"version": "7.0.0-alpha.1",
"description": "Middlewares module for Ts.ED Framework",

@@ -20,10 +20,10 @@ "private": false,

"devDependencies": {
"@tsed/core": "6.71.1",
"@tsed/di": "6.71.1",
"@tsed/schema": "6.71.1"
"@tsed/core": "7.0.0-alpha.1",
"@tsed/di": "7.0.0-alpha.1",
"@tsed/schema": "7.0.0-alpha.1"
},
"peerDependencies": {
"@tsed/core": "^6.71.1",
"@tsed/di": "^6.71.1",
"@tsed/schema": "^6.71.1"
"@tsed/core": "^7.0.0-alpha.1",
"@tsed/di": "^7.0.0-alpha.1",
"@tsed/schema": "^7.0.0-alpha.1"
},

@@ -34,5 +34,5 @@ "repository": "https://github.com/tsedio/tsed",

},
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-middlewares",
"homepage": "https://github.com/tsedio/tsed/tree/alpha/packages/platform/platform-middlewares",
"author": "Romain Lenzotti",
"license": "MIT"
}

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