Skip to content

Commit 713e97f

Browse files
chore(nestjs) publish 5.3.1 release
1 parent c392da0 commit 713e97f

24 files changed

Lines changed: 143 additions & 77 deletions

bundle/common/cache/interceptors/cache.interceptor.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Observable } from 'rxjs';
22
import { ExecutionContext, HttpServer, NestInterceptor } from '../../interfaces';
33
export declare class CacheInterceptor implements NestInterceptor {
4-
private readonly httpServer;
5-
private readonly cacheManager;
6-
private readonly reflector;
7-
private readonly isHttpApp;
4+
protected readonly httpServer: HttpServer;
5+
protected readonly cacheManager: any;
6+
protected readonly reflector: any;
7+
protected readonly isHttpApp: boolean;
88
constructor(httpServer: HttpServer, cacheManager: any, reflector: any);
99
intercept(context: ExecutionContext, call$: Observable<any>): Promise<Observable<any>>;
1010
getCacheKey(context: ExecutionContext): string | undefined;

bundle/common/decorators/core/component.decorator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
const deprecate = require("deprecate");
4-
const generateSafeId = require("generate-safe-id");
4+
const uuid = require("uuid/v4");
55
/**
66
* Defines the injectable class. This class can inject dependencies through constructor.
77
* Those dependencies have to belong to the same module.
@@ -58,7 +58,7 @@ function Interceptor() {
5858
exports.Interceptor = Interceptor;
5959
function mixin(mixinClass) {
6060
Object.defineProperty(mixinClass, 'name', {
61-
value: generateSafeId(),
61+
value: uuid(),
6262
});
6363
Injectable()(mixinClass);
6464
return mixinClass;

bundle/common/decorators/http/create-route-param-metadata.decorator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
const deprecate = require("deprecate");
4-
const generateSafeId = require("generate-safe-id");
4+
const uuid = require("uuid/v4");
55
const constants_1 = require("../../constants");
66
const shared_utils_1 = require("../../utils/shared.utils");
77
const assignCustomMetadata = (args, paramtype, index, factory, data, ...pipes) => (Object.assign({}, args, { [`${paramtype}${constants_1.CUSTOM_ROUTE_AGRS_METADATA}:${index}`]: {
@@ -15,7 +15,7 @@ const assignCustomMetadata = (args, paramtype, index, factory, data, ...pipes) =
1515
* @param factory
1616
*/
1717
function createParamDecorator(factory, enhancers = []) {
18-
const paramtype = generateSafeId();
18+
const paramtype = uuid();
1919
return (data, ...pipes) => (target, key, index) => {
2020
const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || {};
2121
const isPipe = pipe => pipe &&

bundle/common/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export * from './enums';
44
export * from './exceptions';
55
export * from './files';
66
export * from './http';
7-
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';
7+
export { ArgumentMetadata, ArgumentsHost, CanActivate, DynamicModule, ExceptionFilter, ExecutionContext, ForwardReference, HttpServer, HttpServerFactory, INestApplication, INestApplicationContext, INestExpressApplication, INestFastifyApplication, INestMicroservice, MiddlewareConsumer, MiddlewareFunction, NestInterceptor, NestMiddleware, NestModule, OnApplicationBootstrap, OnModuleDestroy, OnModuleInit, Paramtype, PipeTransform, Provider, RpcExceptionFilter, Type, WebSocketAdapter, WsExceptionFilter } from './interfaces';
88
export * from './pipes';
99
export * from './serializer';
1010
export * from './services/logger.service';
Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
export * from './request-mapping-metadata.interface';
2-
export * from './modules/nest-module.interface';
3-
export * from './modules/module-metadata.interface';
4-
export * from './controllers/controller.interface';
5-
export * from './injectable.interface';
61
export * from './controllers/controller-metadata.interface';
7-
export * from './modules/module-metadata.interface';
8-
export * from './type.interface';
9-
export * from './nest-application.interface';
10-
export * from './nest-microservice.interface';
11-
export * from './nest-application-context.interface';
12-
export * from './modules/on-init.interface';
13-
export * from './modules/on-destroy.interface';
2+
export * from './controllers/controller.interface';
143
export * from './exceptions/exception-filter.interface';
15-
export * from './middleware';
16-
export * from './websockets/web-socket-adapter.interface';
17-
export * from './features/pipe-transform.interface';
18-
export * from './features/paramtype.interface';
19-
export * from './features/can-activate.interface';
204
export * from './exceptions/rpc-exception-filter.interface';
215
export * from './exceptions/ws-exception-filter.interface';
6+
export * from './features/arguments-host.interface';
7+
export * from './features/can-activate.interface';
8+
export * from './features/custom-route-param-factory.interface';
229
export * from './features/execution-context.interface';
2310
export * from './features/nest-interceptor.interface';
24-
export * from './features/custom-route-param-factory.interface';
25-
export * from './modules/dynamic-module.interface';
26-
export * from './http/http-server.interface';
11+
export * from './features/paramtype.interface';
12+
export * from './features/pipe-transform.interface';
2713
export * from './http/http-server-factory.interface';
28-
export * from './features/arguments-host.interface';
14+
export * from './http/http-server.interface';
15+
export * from './injectable.interface';
16+
export * from './middleware';
17+
export * from './modules/dynamic-module.interface';
18+
export * from './modules/forward-reference.interface';
19+
export * from './modules/module-metadata.interface';
20+
export * from './modules/nest-module.interface';
21+
export * from './modules/on-destroy.interface';
22+
export * from './modules/on-init.interface';
23+
export * from './modules/provider.interface';
24+
export * from './nest-application-context.interface';
25+
export * from './nest-application.interface';
2926
export * from './nest-express-application.interface';
3027
export * from './nest-fastify-application.interface';
31-
export * from './modules/provider.interface';
28+
export * from './nest-microservice.interface';
29+
export * from './on-application-bootstrap.interface';
30+
export * from './request-mapping-metadata.interface';
3231
export * from './type.interface';
33-
export * from './modules/forward-reference.interface';
32+
export * from './websockets/web-socket-adapter.interface';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export interface OnApplicationBootstrap {
2+
onApplicationBootstrap(): any;
3+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });

bundle/common/serializer/class-serializer.interceptor.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface PlainLiteralObject {
55
[key: string]: any;
66
}
77
export declare class ClassSerializerInterceptor implements NestInterceptor {
8-
private readonly reflector;
8+
protected readonly reflector: any;
99
constructor(reflector: any);
1010
intercept(context: ExecutionContext, call$: Observable<any>): Observable<any>;
1111
serialize(response: PlainLiteralObject | Array<PlainLiteralObject>, options: ClassTransformOptions): PlainLiteralObject | PlainLiteralObject[];
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
const generateSafeId = require("generate-safe-id");
4-
exports.randomStringGenerator = () => generateSafeId();
3+
const uuid = require("uuid/v4");
4+
exports.randomStringGenerator = () => uuid();

bundle/core/guards/guards-consumer.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class GuardsConsumer {
2525
if (result instanceof rxjs_1.Observable) {
2626
return await result.toPromise();
2727
}
28-
if (result instanceof Promise) {
29-
return await result;
30-
}
3128
return result;
3229
}
3330
}

0 commit comments

Comments
 (0)