Skip to content

Commit 92d3ed4

Browse files
integration(@nestjs) add mongoose integration test
1 parent c5455de commit 92d3ed4

96 files changed

Lines changed: 1847 additions & 433 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Assigns the metadata to the class / function under specified `key`.
2+
* Assigns the metadata to the class/function under specified `key`.
33
* This metadata can be reflected using `Reflector` class.
44
*/
55
export declare const ReflectMetadata: (metadataKey: any, metadataValue: any) => (target: object, key?: any, descriptor?: any) => any;

bundle/common/decorators/core/reflect-metadata.decorator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
/**
4-
* Assigns the metadata to the class / function under specified `key`.
4+
* Assigns the metadata to the class/function under specified `key`.
55
* This metadata can be reflected using `Reflector` class.
66
*/
77
exports.ReflectMetadata = (metadataKey, metadataValue) => (target, key, descriptor) => {

bundle/common/http/http.service.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ class HttpService {
1919
return rxjs_1.from(axios_1.default.post(url, data, config));
2020
}
2121
put(url, data, config) {
22-
return rxjs_1.from(axios_1.default.post(url, data, config));
22+
return rxjs_1.from(axios_1.default.put(url, data, config));
2323
}
2424
patch(url, data, config) {
25-
return rxjs_1.from(axios_1.default.post(url, data, config));
25+
return rxjs_1.from(axios_1.default.patch(url, data, config));
2626
}
2727
}
2828
exports.HttpService = HttpService;

bundle/common/interfaces/external/validator-options.interface.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ export interface ValidatorOptions {
3939
*/
4040
value?: boolean;
4141
};
42+
/**
43+
* Settings true will cause fail validation of unknown objects.
44+
*/
45+
forbidUnknownValues?: boolean;
4246
}

bundle/common/interfaces/http/http-server.interface.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export interface HttpServer {
3131
setViewEngine?(engineOrOptions: any): this;
3232
getRequestMethod?(request: any): string;
3333
getRequestUrl?(request: any): string;
34+
getInstance(): any;
3435
getHttpServer(): any;
3536
close(): any;
3637
}

bundle/common/interfaces/microservices/microservice-configuration.interface.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Transport } from '../../enums/transport.enum';
2-
import { CustomTransportStrategy } from './custom-transport-strategy.interface';
32
import { MqttClientOptions } from '../external/mqtt-options.interface';
3+
import { CustomTransportStrategy } from './custom-transport-strategy.interface';
44
export declare type MicroserviceOptions = GrpcOptions | TcpOptions | RedisOptions | NatsOptions | MqttOptions | CustomStrategy;
55
export interface CustomStrategy {
66
strategy?: CustomTransportStrategy;
@@ -12,6 +12,7 @@ export interface GrpcOptions {
1212
url?: string;
1313
credentials?: any;
1414
protoPath: string;
15+
root?: string;
1516
package: string;
1617
};
1718
}

bundle/common/interfaces/websockets/web-socket-adapter.interface.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ export interface WebSocketAdapter<T = any> {
33
create(port: number, options?: T): any;
44
bindClientConnect(server: any, callback: (...args) => void): any;
55
bindClientDisconnect?(client: any, callback: (...args) => void): any;
6-
bindMessageHandlers(client: any, handler: {
6+
bindMessageHandlers(client: any, handlers: Array<{
77
message: any;
8-
callback: (...args) => Observable<any> | Promise<any> | any;
9-
}[], process: (data) => Observable<any>): any;
8+
callback: (...args: any[]) => Observable<any> | Promise<any> | any;
9+
}>, transform: (data: any) => Observable<any>): any;
1010
close(server: any): any;
1111
}

bundle/core/adapters/express-adapter.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export declare class ExpressAdapter implements HttpServer {
2626
setNotFoundHandler(handler: Function): any;
2727
setHeader(response: any, name: string, value: string): any;
2828
getHttpServer(): any;
29+
getInstance(): any;
2930
close(): any;
3031
set(...args: any[]): any;
3132
enable(...args: any[]): any;

bundle/core/adapters/express-adapter.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class ExpressAdapter {
5555
getHttpServer() {
5656
return this.instance;
5757
}
58+
getInstance() {
59+
return this.instance;
60+
}
5861
close() {
5962
return this.instance.close();
6063
}

bundle/core/adapters/fastify-adapter.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export declare class FastifyAdapter {
2626
setErrorHandler(handler: Function): any;
2727
setNotFoundHandler(handler: Function): any;
2828
getHttpServer(): any;
29+
getInstance(): any;
2930
register(...args: any[]): any;
3031
inject(...args: any[]): any;
3132
close(): any;

0 commit comments

Comments
 (0)