Skip to content

Commit 3773574

Browse files
committed
chore: update readme
1 parent 6c2ce8f commit 3773574

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646
- [Example Project](#example-project)
4747
- [Contribution](#contribution)
4848
- [Tests](#tests)
49-
- [Warning](#warning)
5049
- [License](#license)
5150

5251
---
5352

5453
## Install
5554

5655
```bash
57-
npm i @nestjsx/crud @nestjs/typeorm typeorm class-validator class-transformer --save
56+
npm i @nestjsx/crud --save
57+
npm i @nestjs/typeorm typeorm class-validator class-transformer --save
5858
```
5959

6060
## Getting Started
@@ -121,7 +121,7 @@ And that's it, no more inheritance and tight coupling. Let's see what happens he
121121

122122
We pass our `Hero` entity as a `dto` for [Validation](#validation) purpose and inject `HeroesService`. After that, all you have to do is to hook up everything in your module. And after being done with these simple steps your application will expose these endpoints:
123123

124-
## API Endpoints Examples
124+
## API Endpoints
125125

126126
### Get Many Entities
127127

@@ -158,7 +158,7 @@ _Request Body:_ array of entity objects | array of entity objects with nested (r
158158

159159
```json
160160
{
161-
"bulk": [{ "name": "Batman" }, { "name": "Batgirl" }, { "name": "Joker" }]
161+
"bulk": [{ "name": "Batman" }, { "name": "Batgirl" }]
162162
}
163163
```
164164

@@ -192,7 +192,7 @@ _Status codes:_ 200 | 404
192192
- [**`filter`**](#filter) (alias: `filter[]`) - filter GET result by `AND` type of condition
193193
- [**`or`**](#or) (alias: `or[]`) - filter GET result by `OR` type of condition
194194
- [**`sort`**](#sort) (alias: `sort[]`) - sort GET result by some `field` in `ASC | DESC` order
195-
- [**`join`**](join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
195+
- [**`join`**](#join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
196196
- [**`limit`**](#limit) (alias `per_page`) - receive `N` amount of entities
197197
- [**`offset`**](#offset) (alias `skip`) - offset `N` amount of entities
198198
- [**`page`**](#page) - receive a portion of `limit` (`per_page`) entities (alternative to `offset`)
@@ -693,7 +693,12 @@ Since all composed methods have `Base` ending in their names, overriding those e
693693

694694
```typescript
695695
...
696-
import { Crud, CrudController, Override, RestfulParamsDto } from '@nestjsx/crud';
696+
import {
697+
Crud,
698+
CrudController,
699+
Override,
700+
RestfulParamsDto
701+
} from '@nestjsx/crud';
697702

698703
@Crud(Hero)
699704
@Controller('heroes')
@@ -820,8 +825,8 @@ export class ACLGuard implements CanActivate {
820825
const handler = ctx.getHandler();
821826
const controller = ctx.getClass();
822827

823-
const feature = this.reflector.get<string>(FEAUTURE_NAME_METADATA, controller);
824-
const action = this.reflector.get<string>(ACTION_NAME_METADATA, handler);
828+
const feature = this.reflector.get(FEAUTURE_NAME_METADATA, controller);
829+
const action = this.reflector.get(ACTION_NAME_METADATA, handler);
825830

826831
console.log(`${feature}-${action}`); // e.g. 'Heroes-Read-All'
827832

@@ -845,7 +850,8 @@ Or you can open `integration/typeorm` folder separately in the Visual Studio Cod
845850
2. Clone the project
846851

847852
```shell
848-
git clone https://github.com/nestjsx/crud.git && cd crud/integration/typeorm
853+
git clone https://github.com/nestjsx/crud.git
854+
cd crud/integration/typeorm
849855
```
850856

851857
3. Install [Docker](https://docs.docker.com/install/) and [Docker Compose](https://docs.docker.com/compose/install/) if you haven't done it yet.

dist/README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646
- [Example Project](#example-project)
4747
- [Contribution](#contribution)
4848
- [Tests](#tests)
49-
- [Warning](#warning)
5049
- [License](#license)
5150

5251
---
5352

5453
## Install
5554

5655
```bash
57-
npm i @nestjsx/crud @nestjs/typeorm typeorm class-validator class-transformer --save
56+
npm i @nestjsx/crud --save
57+
npm i @nestjs/typeorm typeorm class-validator class-transformer --save
5858
```
5959

6060
## Getting Started
@@ -121,7 +121,7 @@ And that's it, no more inheritance and tight coupling. Let's see what happens he
121121

122122
We pass our `Hero` entity as a `dto` for [Validation](#validation) purpose and inject `HeroesService`. After that, all you have to do is to hook up everything in your module. And after being done with these simple steps your application will expose these endpoints:
123123

124-
## API Endpoints Examples
124+
## API Endpoints
125125

126126
### Get Many Entities
127127

@@ -158,7 +158,7 @@ _Request Body:_ array of entity objects | array of entity objects with nested (r
158158

159159
```json
160160
{
161-
"bulk": [{ "name": "Batman" }, { "name": "Batgirl" }, { "name": "Joker" }]
161+
"bulk": [{ "name": "Batman" }, { "name": "Batgirl" }]
162162
}
163163
```
164164

@@ -192,7 +192,7 @@ _Status codes:_ 200 | 404
192192
- [**`filter`**](#filter) (alias: `filter[]`) - filter GET result by `AND` type of condition
193193
- [**`or`**](#or) (alias: `or[]`) - filter GET result by `OR` type of condition
194194
- [**`sort`**](#sort) (alias: `sort[]`) - sort GET result by some `field` in `ASC | DESC` order
195-
- [**`join`**](join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
195+
- [**`join`**](#join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
196196
- [**`limit`**](#limit) (alias `per_page`) - receive `N` amount of entities
197197
- [**`offset`**](#offset) (alias `skip`) - offset `N` amount of entities
198198
- [**`page`**](#page) - receive a portion of `limit` (`per_page`) entities (alternative to `offset`)
@@ -693,7 +693,12 @@ Since all composed methods have `Base` ending in their names, overriding those e
693693

694694
```typescript
695695
...
696-
import { Crud, CrudController, Override, RestfulParamsDto } from '@nestjsx/crud';
696+
import {
697+
Crud,
698+
CrudController,
699+
Override,
700+
RestfulParamsDto
701+
} from '@nestjsx/crud';
697702

698703
@Crud(Hero)
699704
@Controller('heroes')
@@ -820,8 +825,8 @@ export class ACLGuard implements CanActivate {
820825
const handler = ctx.getHandler();
821826
const controller = ctx.getClass();
822827

823-
const feature = this.reflector.get<string>(FEAUTURE_NAME_METADATA, controller);
824-
const action = this.reflector.get<string>(ACTION_NAME_METADATA, handler);
828+
const feature = this.reflector.get(FEAUTURE_NAME_METADATA, controller);
829+
const action = this.reflector.get(ACTION_NAME_METADATA, handler);
825830

826831
console.log(`${feature}-${action}`); // e.g. 'Heroes-Read-All'
827832

@@ -845,7 +850,8 @@ Or you can open `integration/typeorm` folder separately in the Visual Studio Cod
845850
2. Clone the project
846851

847852
```shell
848-
git clone https://github.com/nestjsx/crud.git && cd crud/integration/typeorm
853+
git clone https://github.com/nestjsx/crud.git
854+
cd crud/integration/typeorm
849855
```
850856

851857
3. Install [Docker](https://docs.docker.com/install/) and [Docker Compose](https://docs.docker.com/compose/install/) if you haven't done it yet.

dist/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@nestjsx/crud",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "NestJs CRUD for RESTful APIs",
55
"main": "index.js",
66
"types": "index.d.ts",
77
"repository": {
88
"type": "git",
9-
"url": "https://github.com/zMotivat0r/nest-crud.git"
9+
"url": "https://github.com/nestjsx/crud.git"
1010
},
1111
"bugs": {
1212
"url": "https://github.com/nestjsx/crud/issues"

0 commit comments

Comments
 (0)