Skip to content

Commit 325748d

Browse files
chore(release) publish v4.6.2
1 parent 0c06d41 commit 325748d

7 files changed

Lines changed: 20 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.6.2
2+
- **core**: [improvement] simplify `NestFactory.create(...args)` signature
3+
14
## 4.6.1
25
- **common**: [improvement] create `ModuleMetadata` interface
36
- **common**: [bugfix] update `class-validator` #417

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"packages": [
44
"lib/*"
55
],
6-
"version": "4.6.1"
6+
"version": "4.6.2"
77
}

lib/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestjs/common",
3-
"version": "4.6.1",
3+
"version": "4.6.2",
44
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
55
"author": "Kamil Mysliwiec",
66
"license": "MIT",

lib/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestjs/core",
3-
"version": "4.6.1",
3+
"version": "4.6.2",
44
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
55
"author": "Kamil Mysliwiec",
66
"license": "MIT",

src/common/interfaces/nest-application-options.interface.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { HttpsOptions } from './https-options.interface';
22
import { LoggerService } from '../services/logger.service';
33
import { NestApplicationContextOptions } from './nest-application-context-options.interface';
44

5-
export interface NestApplicationOptions
6-
extends HttpsOptions,
7-
NestApplicationContextOptions {
5+
export interface NestApplicationOptions extends NestApplicationContextOptions {
86
cors?: boolean;
97
bodyParser?: boolean;
8+
httpsOptions?: HttpsOptions;
109
}

src/core/nest-application.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ export class NestApplication extends NestApplicationContext
9595
}
9696

9797
public createServer(): any {
98-
if (this.appOptions && this.appOptions.key) {
99-
return https.createServer(this.appOptions, this.express);
98+
if (this.appOptions && this.appOptions.httpsOptions) {
99+
return https.createServer(this.appOptions.httpsOptions, this.express);
100100
}
101101
return http.createServer(this.express);
102102
}

src/core/nest-factory.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ export class NestFactoryStatic {
3333
* Creates an instance of the NestApplication (returns Promise)
3434
* @returns an `Promise` of the INestApplication instance
3535
*/
36+
public async create(module: any);
37+
public async create(module: any, options: NestApplicationOptions);
38+
public async create(module: any, express: any, options: NestApplicationOptions);
3639
public async create(
3740
module: any,
38-
expressOrOptions?: any | NestApplicationOptions,
41+
expressOrOptions?: any,
3942
options?: NestApplicationOptions,
4043
): Promise<INestApplication> {
4144
const isExpressInstance = expressOrOptions && expressOrOptions.response;
@@ -47,7 +50,12 @@ export class NestFactoryStatic {
4750
const applicationConfig = new ApplicationConfig();
4851

4952
this.applyLogger(appOptions);
50-
await this.initialize(module, container, applicationConfig, expressInstance);
53+
await this.initialize(
54+
module,
55+
container,
56+
applicationConfig,
57+
expressInstance,
58+
);
5159
return this.createNestInstance<NestApplication>(
5260
new NestApplication(
5361
container,

0 commit comments

Comments
 (0)