Skip to content

Commit bd3b102

Browse files
Merge branch 'master' of https://github.com/nestjs/nest
2 parents 9cf27a3 + c1c5b15 commit bd3b102

5 files changed

Lines changed: 15 additions & 18 deletions

File tree

Readme.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737

3838
## Getting started
3939

40-
To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
40+
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
41+
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
4142

4243
## Support
4344

@@ -47,13 +48,13 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
4748

4849
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="300" /></a>
4950

50-
#### Silver Sponsor
51+
#### Silver Sponsors
5152

52-
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="130" /></a>
53+
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="130" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="160" /></a>
5354

5455
#### Sponsors
5556

56-
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="120" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="120" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="32" /></a> &nbsp; <a href="http://gojob.com"><img src="https://gojob.com/w/wp-content/uploads/2017/02/cropped-Logo-web-home.png" height="44" /> &nbsp; <a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="37" /></a> &nbsp; <a href="https://hostpresto.com"><img src="https://nestjs.com/img/hostpresto.png" height="32" /></a>
57+
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="120" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="32" /></a> &nbsp; <a href="http://gojob.com"><img src="https://gojob.com/w/wp-content/uploads/2017/02/cropped-Logo-web-home.png" height="44" /> &nbsp; <a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="37" /></a> &nbsp; <a href="https://hostpresto.com"><img src="https://nestjs.com/img/hostpresto.png" height="32" /></a>
5758

5859
## Backers
5960

@@ -68,5 +69,3 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
6869
## License
6970

7071
Nest is [MIT licensed](LICENSE).
71-
72-
<h4 align="center"> <a href="readme_zh.md">中文说明</a></h4>

packages/core/errors/messages.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ export const UnknownDependenciesMessage = (
1010
args[index] = '?';
1111
message += args.join(', ');
1212

13-
message += `). Please verify whether [${index}] argument is available in the current context.`;
13+
message += `). Please make sure that the argument at index [${index}] is available in the current context.`;
1414
return message;
1515
};
1616

1717
export const InvalidMiddlewareMessage = (name: string) =>
1818
`The middleware doesn't provide the 'resolve' method (${name})`;
1919

2020
export const InvalidModuleMessage = (scope: string) =>
21-
`Nest cannot create the module instance. The frequent reason of this exception is the circular dependency between modules. Use forwardRef() to avoid it (read more https://docs.nestjs.com/advanced/circular-dependency). Scope [${scope}]`;
21+
`Nest cannot create the module instance. Often, this is because of a circular dependency between modules. Use forwardRef() to avoid it. (Read more https://docs.nestjs.com/advanced/circular-dependency.) Scope [${scope}]`;
2222

2323
export const UnknownExportMessage = (module: string) =>
24-
`Nest cannot export component/module that is not a part of the currently proccessed module (${module}). Please verify whether each exported unit is available in this particular context.`;
24+
`Nest cannot export a component/module that is not a part of the currently processed module (${module}). Please verify whether each exported unit is available in this particular context.`;
2525

2626
export const INVALID_MIDDLEWARE_CONFIGURATION = `Invalid middleware configuration passed inside the module 'configure()' method.`;
2727
export const UNKNOWN_REQUEST_MAPPING = `Request mapping properties not defined in the @RequestMapping() annotation!`;
2828
export const UNHANDLED_RUNTIME_EXCEPTION = `Unhandled Runtime Exception.`;
2929
export const INVALID_EXCEPTION_FILTER = `Invalid exception filters (@UseFilters()).`;
30-
export const MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION = `Unable to load @nestjs/microservices package (please, make sure whether it's installed already).`;
30+
export const MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION = `Unable to load @nestjs/microservices package. (Please make sure that it's already installed.)`;

packages/core/helpers/external-context-creator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { InterceptorsContextCreator } from './../interceptors/interceptors-conte
55
import { InterceptorsConsumer } from './../interceptors/interceptors-consumer';
66
import { Controller } from '@nestjs/common/interfaces';
77
import { FORBIDDEN_MESSAGE } from '../guards/constants';
8-
import { HttpStatus, HttpException } from '@nestjs/common';
8+
import { ForbiddenException } from '@nestjs/common';
99
import { Module } from './../injector/module';
1010
import { ModulesContainer } from './../injector/modules-container';
1111

@@ -38,7 +38,7 @@ export class ExternalContextCreator {
3838
callback,
3939
);
4040
if (!canActivate) {
41-
throw new HttpException(FORBIDDEN_MESSAGE, HttpStatus.FORBIDDEN);
41+
throw new ForbiddenException(FORBIDDEN_MESSAGE);
4242
}
4343
const handler = () => callback.apply(instance, args);
4444
return await this.interceptorsConsumer.intercept(

packages/core/router/router-execution-context.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ import { PipesConsumer } from './../pipes/pipes-consumer';
2121
import {
2222
ParamData,
2323
PipeTransform,
24-
HttpStatus,
2524
RequestMethod,
26-
HttpException,
25+
ForbiddenException,
2726
HttpServer,
2827
} from '@nestjs/common';
2928
import { GuardsContextCreator } from '../guards/guards-context-creator';
@@ -238,7 +237,7 @@ export class RouterExecutionContext {
238237
callback,
239238
);
240239
if (!canActivate) {
241-
throw new HttpException(FORBIDDEN_MESSAGE, HttpStatus.FORBIDDEN);
240+
throw new ForbiddenException(FORBIDDEN_MESSAGE);
242241
}
243242
};
244243
return guards.length ? canActivateFn : null;

readme_zh.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838

3939
## 开始
4040

41-
要查看 [指南](https://docs.nestjs.cn), 请浏览 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
42-
43-
英文官方原文档: [docs.nestjs.com](https://docs.nestjs.com).
41+
* 要查看 [指南](https://docs.nestjs.cn), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
42+
* 要查看 [English指南](https://docs.nestjs.com), 请访问 [docs.nestjs.com](https://docs.nestjs.com). :books:
4443

4544
## 赞助商
4645

0 commit comments

Comments
 (0)