Skip to content

Commit 5d36adc

Browse files
fix(docs): fix some typos
1 parent ac540cb commit 5d36adc

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

content/cli/libraries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Many applications need to solve the same general problems, or re-use a modular component in several different contexts. Nest has a few ways of addressing this, but each works at a different level to solve the problem in a way that helps meet different architectural and organizational objectives.
44

5-
Nest [modules](/modules) are useful for providing an execution context that enables sharing components within a single application. Modules can also be packaged with [npm](https://npmjs.com) to create a reusable library that can be installed in different projects. This can be an effective way to distribute configurable, re-usable libraries that can be used by different, loosely connected or unafilliated organizations (e.g., by distributing/installing 3rd party libraries).
5+
Nest [modules](/modules) are useful for providing an execution context that enables sharing components within a single application. Modules can also be packaged with [npm](https://npmjs.com) to create a reusable library that can be installed in different projects. This can be an effective way to distribute configurable, re-usable libraries that can be used by different, loosely connected or unaffiliated organizations (e.g., by distributing/installing 3rd party libraries).
66

7-
For sharing code within closely organized groups (e.g., within company/project boundaries), it can be useful to have a more lightweight approach to sharing components. Monorepo's have arisen as a construct to enable that, and within a monorepo, a **library** provides a way to share code in an easy, lightweight fashion. In a Nest monorepo, using libraries enables easy assembly of applications that share components. In fact, this encourages decomposition of monolithic applications and development processes to focus on building and composing modular components.
7+
For sharing code within closely organized groups (e.g., within company/project boundaries), it can be useful to have a more lightweight approach to sharing components. Monorepos have arisen as a construct to enable that, and within a monorepo, a **library** provides a way to share code in an easy, lightweight fashion. In a Nest monorepo, using libraries enables easy assembly of applications that share components. In fact, this encourages decomposition of monolithic applications and development processes to focus on building and composing modular components.
88

99
#### Nest libraries
1010

content/faq/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ Scope [<module_import_chain>]
4040
# example chain AppModule -> FooModule
4141
```
4242

43-
Circular dependencies can arise from both providers depending on each other, or typescript files depending on each other for constants, such as exporting constants from a module file and importing them in a service file. In the latter case, it is advised to create a separate file for your constants. In the former case, please follow the guide on ciruclar dependencies and make sure that both the modules **and** the providers are marked with `forwardRef`.
43+
Circular dependencies can arise from both providers depending on each other, or typescript files depending on each other for constants, such as exporting constants from a module file and importing them in a service file. In the latter case, it is advised to create a separate file for your constants. In the former case, please follow the guide on circular dependencies and make sure that both the modules **and** the providers are marked with `forwardRef`.

content/faq/hybrid-application.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To bind `@MessagePattern()` to only one transport strategy (for example, MQTT) i
3939

4040
```typescript
4141
@@filename()
42-
@MessagePattern('time.us.*', Transport.NAST)
42+
@MessagePattern('time.us.*', Transport.NATS)
4343
getDate(@Payload() data: number[], @Ctx() context: NatsContext) {
4444
console.log(`Subject: ${context.getSubject()}`); // e.g. "time.us.east"
4545
return new Date().toLocaleTimeString(...);
@@ -50,7 +50,7 @@ getTCPDate(@Payload() data: number[]) {
5050
}
5151
@@switch
5252
@Bind(Payload(), Ctx())
53-
@MessagePattern('time.us.*', Transport.NAST)
53+
@MessagePattern('time.us.*', Transport.NATS)
5454
getDate(data, context) {
5555
console.log(`Subject: ${context.getSubject()}`); // e.g. "time.us.east"
5656
return new Date().toLocaleTimeString(...);

content/graphql/extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note, in addition to setting metadata on fields, you can use the `@Extensions()`
2020

2121
#### Using custom metadata
2222

23-
The logic that leverages the custom metatada can be as complex as needed. For example, you can create a simple interceptor that stores/logs events per method invocation, or create a sophisticated guard that **analyzes requested fields**, iterates through the `GraphQLObjectType` definition, and matches the roles required to retrieve specific fields with the caller permissions (field-level permissions system).
23+
The logic that leverages the custom metadata can be as complex as needed. For example, you can create a simple interceptor that stores/logs events per method invocation, or create a sophisticated guard that **analyzes requested fields**, iterates through the `GraphQLObjectType` definition, and matches the roles required to retrieve specific fields with the caller permissions (field-level permissions system).
2424

2525
Let's define a `FieldRolesGuard` that implements a basic version of such a field-level permissions system.
2626

content/graphql/resolvers-map.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class Author {
4848
4949
The `Author` object type, like any class, is made of a collection of fields, with each field declaring a type. A field's type corresponds to a [GraphQL type](https://graphql.org/learn/schema/). A field's GraphQL type can be either another object type or a scalar type. A GraphQL scalar type is a primitive (like `ID`, `String`, `Boolean`, or `Int`) that resolves to a single value.
5050

51-
> info **Hint** In addition to GraphQL's built-in scalar types, you can define custom scalar types (read [more](/graphql/scalars)).
51+
> info **Hint** In addition to GraphQLs built-in scalar types, you can define custom scalar types (read [more](/graphql/scalars)).
5252
5353
The above `Author` object type definition will cause Nest to **generate** the SDL we showed above:
5454

content/guards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class RolesGuard {
243243
}
244244
```
245245

246-
> info **Hint** In the node.js world, it's common practice to attach the authorized user to the `request` object. Thus, in our sample code above, we are assuming that `request.user` contains the user instance and allowed roles. In your app, you will probably make that association in your custom **authentication guard** (or middleware). Check [this chapter](/security/authentication) for more infomration on this topic.
246+
> info **Hint** In the node.js world, it's common practice to attach the authorized user to the `request` object. Thus, in our sample code above, we are assuming that `request.user` contains the user instance and allowed roles. In your app, you will probably make that association in your custom **authentication guard** (or middleware). Check [this chapter](/security/authentication) for more information on this topic.
247247
248248
> warning **Warning** The logic inside the `matchRoles()` function can be as simple or sophisticated as needed. The main point of this example is to show how guards fit into the request/response cycle.
249249

content/openapi/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The `SwaggerModule` automatically reflects all of your endpoints. Note that the
8888
8989
### Document options
9090
91-
When creating a document, it is possible to provide some extra options to finetune the library's behavior. These options should be of type `SwaggerDocumentOptions`, which can be the following:
91+
When creating a document, it is possible to provide some extra options to fine tune the library's behavior. These options should be of type `SwaggerDocumentOptions`, which can be the following:
9292
9393
```TypeScript
9494
export interface SwaggerDocumentOptions {

content/openapi/operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Lastly, since `PaginatedDto` is not directly referenced by any controller, the `
221221
export class CatsController {}
222222
```
223223

224-
If you run Swagger now, the generated `swagger.json` for this specific endpoint should have the followng response defined:
224+
If you run Swagger now, the generated `swagger.json` for this specific endpoint should have the following response defined:
225225

226226
```json
227227
"responses": {

content/security/csrf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Start by installing the required package:
2828
$ npm i --save fastify-csrf
2929
```
3030

31-
Once the installation is complete, register the `fastify-csrf` pluign, as follows:
31+
Once the installation is complete, register the `fastify-csrf` plugin, as follows:
3232

3333
```typescript
3434
import fastifyCsrf from 'fastify-csrf';

content/security/encryption-hashing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ const decryptedText = Buffer.concat([
3737

3838
#### Hashing
3939

40-
For hashing, we recommed using either the [bcrypt](https://www.npmjs.com/package/bcrypt) or [argon2](https://www.npmjs.com/package/argon2) packages. Nest itself does not provide any additional wrappers on top of these modules to avoid introducing unnecessary abstractions (making the learning curve short).
40+
For hashing, we recommend using either the [bcrypt](https://www.npmjs.com/package/bcrypt) or [argon2](https://www.npmjs.com/package/argon2) packages. Nest itself does not provide any additional wrappers on top of these modules to avoid introducing unnecessary abstractions (making the learning curve short).
4141

42-
As an example, let's use `bcrypt` to hash a random pasword.
42+
As an example, let's use `bcrypt` to hash a random password.
4343

4444
First install required packages:
4545

0 commit comments

Comments
 (0)