-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(@nestjs) publish v5.2.0 release
- Loading branch information
1 parent
d5833e3
commit 1f0de49
Showing
139 changed files
with
1,046 additions
and
2,681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import 'reflect-metadata'; | ||
import { Type } from '../../interfaces'; | ||
/** | ||
* Defines the Exceptions Filter. Takes set of exception types as an argument which has to be caught by this Filter. | ||
* The class should implement the `ExceptionFilter` interface. | ||
*/ | ||
export declare function Catch(...exceptions: any[]): ClassDecorator; | ||
export declare function Catch(...exceptions: Type<any>[]): ClassDecorator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
export * from './controller.decorator'; | ||
export * from './bind.decorator'; | ||
export * from './catch.decorator'; | ||
export * from './component.decorator'; | ||
export * from './controller.decorator'; | ||
export * from './dependencies.decorator'; | ||
export * from './inject.decorator'; | ||
export * from './catch.decorator'; | ||
export * from './exception-filters.decorator'; | ||
export * from './use-pipes.decorator'; | ||
export * from './use-guards.decorator'; | ||
export * from './inject.decorator'; | ||
export * from './optional.decorator'; | ||
export * from './reflect-metadata.decorator'; | ||
export * from './use-guards.decorator'; | ||
export * from './use-interceptors.decorator'; | ||
export * from './bind.decorator'; | ||
export * from './use-pipes.decorator'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import 'reflect-metadata'; | ||
/** | ||
* Sets dependency as an optional one. | ||
*/ | ||
export declare function Optional(): ParameterDecorator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
require("reflect-metadata"); | ||
const constants_1 = require("../../constants"); | ||
/** | ||
* Sets dependency as an optional one. | ||
*/ | ||
function Optional() { | ||
return (target, key, index) => { | ||
const args = Reflect.getMetadata(constants_1.OPTIONAL_DEPS_METADATA, target) || []; | ||
Reflect.defineMetadata(constants_1.OPTIONAL_DEPS_METADATA, [...args, index], target); | ||
}; | ||
} | ||
exports.Optional = Optional; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
bundle/common/decorators/http/create-route-param-metadata.decorator.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const AXIOS_INSTANCE_TOKEN = "AXIOS_INSTANCE_TOKEN"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AXIOS_INSTANCE_TOKEN = 'AXIOS_INSTANCE_TOKEN'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
import { AxiosRequestConfig } from 'axios'; | ||
import { DynamicModule } from '../interfaces'; | ||
export declare class HttpModule { | ||
static register(config: AxiosRequestConfig): DynamicModule; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import { AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
import { Observable } from 'rxjs'; | ||
export declare class HttpService { | ||
private readonly instance; | ||
constructor(instance?: AxiosInstance); | ||
request<T = any>(config: AxiosRequestConfig): Observable<AxiosResponse<T>>; | ||
get<T = any>(url: string, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>; | ||
delete<T = any>(url: string, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>; | ||
head<T = any>(url: string, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>; | ||
post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>; | ||
put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>; | ||
patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>; | ||
readonly axiosRef: any; | ||
readonly axiosRef: AxiosInstance; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,52 @@ | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = require("axios"); | ||
const rxjs_1 = require("rxjs"); | ||
class HttpService { | ||
const decorators_1 = require("../decorators"); | ||
const http_constants_1 = require("./http.constants"); | ||
let HttpService = class HttpService { | ||
constructor(instance = axios_1.default) { | ||
this.instance = instance; | ||
} | ||
request(config) { | ||
return rxjs_1.from(axios_1.default.request(config)); | ||
return rxjs_1.defer(() => this.instance.request(config)); | ||
} | ||
get(url, config) { | ||
return rxjs_1.from(axios_1.default.get(url, config)); | ||
return rxjs_1.defer(() => this.instance.get(url, config)); | ||
} | ||
delete(url, config) { | ||
return rxjs_1.from(axios_1.default.delete(url, config)); | ||
return rxjs_1.defer(() => this.instance.delete(url, config)); | ||
} | ||
head(url, config) { | ||
return rxjs_1.from(axios_1.default.head(url, config)); | ||
return rxjs_1.defer(() => this.instance.head(url, config)); | ||
} | ||
post(url, data, config) { | ||
return rxjs_1.from(axios_1.default.post(url, data, config)); | ||
return rxjs_1.defer(() => this.instance.post(url, data, config)); | ||
} | ||
put(url, data, config) { | ||
return rxjs_1.from(axios_1.default.put(url, data, config)); | ||
return rxjs_1.defer(() => this.instance.put(url, data, config)); | ||
} | ||
patch(url, data, config) { | ||
return rxjs_1.from(axios_1.default.patch(url, data, config)); | ||
return rxjs_1.defer(() => this.instance.patch(url, data, config)); | ||
} | ||
get axiosRef() { | ||
return axios_1.default; | ||
return this.instance; | ||
} | ||
} | ||
}; | ||
HttpService = __decorate([ | ||
__param(0, decorators_1.Inject(http_constants_1.AXIOS_INSTANCE_TOKEN)), | ||
__metadata("design:paramtypes", [Object]) | ||
], HttpService); | ||
exports.HttpService = HttpService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export * from './decorators'; | ||
export * from './enums'; | ||
export { NestModule, INestApplication, INestMicroservice, NestMiddleware, MiddlewareFunction, MiddlewareConsumer, OnModuleInit, ExceptionFilter, WebSocketAdapter, PipeTransform, Paramtype, ArgumentMetadata, OnModuleDestroy, ExecutionContext, CanActivate, RpcExceptionFilter, WsExceptionFilter, NestInterceptor, DynamicModule, INestApplicationContext, HttpServer, Provider, Type, HttpServerFactory, ArgumentsHost, INestExpressApplication, INestFastifyApplication, ForwardReference } from './interfaces'; | ||
export * from './exceptions'; | ||
export * from './http'; | ||
export * from './interceptors'; | ||
export * from './services/logger.service'; | ||
export { ArgumentMetadata, ArgumentsHost, CanActivate, DynamicModule, ExceptionFilter, ExecutionContext, ForwardReference, HttpServer, HttpServerFactory, INestApplication, INestApplicationContext, INestExpressApplication, INestFastifyApplication, INestMicroservice, MiddlewareConsumer, MiddlewareFunction, NestInterceptor, NestMiddleware, NestModule, OnModuleDestroy, OnModuleInit, Paramtype, PipeTransform, Provider, RpcExceptionFilter, Type, WebSocketAdapter, WsExceptionFilter } from './interfaces'; | ||
export * from './pipes'; | ||
export * from './services/logger.service'; | ||
export * from './utils'; | ||
export * from './exceptions'; | ||
export * from './http'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
import { Observable } from 'rxjs'; | ||
import { ExecutionContext } from '../interfaces'; | ||
import { MulterField, MulterOptions } from '../interfaces/external/multer-options.interface'; | ||
export declare function FileFieldsInterceptor(uploadFields: MulterField[], options?: MulterOptions): { | ||
new (): { | ||
readonly upload: any; | ||
intercept(context: ExecutionContext, call$: Observable<any>): Promise<Observable<any>>; | ||
}; | ||
}; | ||
export declare function FileFieldsInterceptor(uploadFields: MulterField[], options?: MulterOptions): any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
import { Observable } from 'rxjs'; | ||
import { MulterOptions } from '../interfaces/external/multer-options.interface'; | ||
import { ExecutionContext } from '../interfaces'; | ||
export declare function FilesInterceptor(fieldName: string, maxCount?: number, options?: MulterOptions): { | ||
new (): { | ||
readonly upload: any; | ||
intercept(context: ExecutionContext, call$: Observable<any>): Promise<Observable<any>>; | ||
}; | ||
}; | ||
export declare function FilesInterceptor(fieldName: string, maxCount?: number, options?: MulterOptions): any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.