Skip to content

Commit 153dba0

Browse files
Merge pull request #1588 from johannesschobel/fix-typo
Fix Typos and minor Formatting Issues
2 parents ac540cb + da89c18 commit 153dba0

File tree

16 files changed

+38
-39
lines changed

16 files changed

+38
-39
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/faq/request-lifecycle.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,22 @@ Filters are the only component that do not resolve global first. Instead, filter
6767
In general, the request lifecycle looks like the following:
6868

6969
1. Incoming request
70-
1. Globally bound middleware
71-
1. Module bound middleware
72-
1. Global guards
73-
1. Controller guards
74-
1. Route guards
75-
1. Global interceptors (pre-controller)
76-
1. Controller interceptors (pre-controller)
77-
1. Route interceptors (pre-controller)
78-
1. Global pipes
79-
1. Controller pipes
80-
1. Route pipes
81-
1. Route parameter pipes
82-
1. Controller (method handler)
83-
1. Service (if exists)
84-
1. Route interceptor (post-request)
85-
1. Controller interceptor (post-request)
86-
1. Global interceptor (post-request)
87-
1. Exception filters (route, then controller, then global)
88-
1. Server response
70+
2. Globally bound middleware
71+
3. Module bound middleware
72+
4. Global guards
73+
5. Controller guards
74+
6. Route guards
75+
7. Global interceptors (pre-controller)
76+
8. Controller interceptors (pre-controller)
77+
9. Route interceptors (pre-controller)
78+
10. Global pipes
79+
11. Controller pipes
80+
12. Route pipes
81+
13. Route parameter pipes
82+
14. Controller (method handler)
83+
15. Service (if exists)
84+
16. Route interceptor (post-request)
85+
17. Controller interceptor (post-request)
86+
18. Global interceptor (post-request)
87+
19. Exception filters (route, then controller, then global)
88+
20. Server response

content/fundamentals/dependency-injection.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export class AppModule {}
8989
What exactly is happening under the covers to make this work? There are three key steps in the process:
9090

9191
1. In `cats.service.ts`, the `@Injectable()` decorator declares the `CatsService` class as a class that can be managed by the Nest IoC container.
92-
9392
2. In `cats.controller.ts`, `CatsController` declares a dependency on the `CatsService` token with constructor injection:
9493

9594
```typescript

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/federation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ import { PostsResolvers } from './posts.resolvers';
203203
export class AppModule {}
204204
```
205205

206-
##### Code first
206+
#### Code first
207207

208208
We will need to create a class representing our `User` entity. Even though it lives in another service, we will be using and extending it. Note the `@extends` and `@external` directives.
209209

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 {

0 commit comments

Comments
 (0)