Skip to content

Commit 3d62c31

Browse files
author
KoLiBer
committed
Merge branch 'release/1.0.0'
2 parents 6241190 + ad87dda commit 3d62c31

29 files changed

+6636
-923
lines changed

.gitignore

+64-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1-
.vscode
2-
.idea
3-
.vs
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# Transpiled JavaScript files from Typescript
61+
/dist
62+
63+
# Cache used by TypeScript's incremental build
64+
*.tsbuildinfo
File renamed without changes.

.yo-rc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"@loopback/cli": {
3+
"packageManager": "npm",
4+
"version": "2.15.1"
5+
}
6+
}

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v1.0.0
4+
5+
- **Deps**: update packages
6+
- **Clean**: remove `sources` folder
7+
- **Feat**: add `model mapper` method for `create`, `update` operations
8+
- **Feat**: add unit-tests for `create`, `find`, `edit`, `delete`
9+
- **Docs**: add shields to `README`
10+
311
## v0.5.0
412

513
- **Deps**: update packages

CONTRIBUTING.md

-92
This file was deleted.

README.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# loopback-component-filter
22

3-
[![Build Status](https://travis-ci.com/loopback4/loopback-component-filter.svg?branch=master)](https://travis-ci.com/loopback4/loopback-component-filter)
3+
![Travis (.org) branch](https://img.shields.io/travis/loopback4/loopback-component-filter/master)
4+
![npm](https://img.shields.io/npm/v/loopback-component-filter)
5+
![npm bundle size](https://img.shields.io/bundlephobia/min/loopback-component-filter)
6+
![GitHub](https://img.shields.io/github/license/loopback4/loopback-component-filter)
47

58
Using this simple extension you can filter models in repository level.
69

@@ -41,30 +44,26 @@ import { FilterRepositoryMixin } from "loopback-component-filter";
4144

4245
export class UserRepository extends FilterRepositoryMixin<
4346
User,
44-
string,
47+
typeof User.prototype.id,
4548
UserRelations
4649
>({
47-
id: "id",
48-
where: async (
49-
context,
50-
where
51-
) => where;
52-
fields: async (
53-
context,
54-
fields
55-
) => fields;
56-
})() {
50+
models: async (context, entities) => entities,
51+
where: async (context, where) => where,
52+
fields: async (context, fields) => fields,
53+
})<Constructor<DefaultCrudRepository<User, string, UserRelations>>>(
54+
DefaultCrudRepository
55+
) {
5756
// ...
5857
}
5958
```
6059

6160
---
6261

63-
## Contributions
62+
## Contributors
6463

6564
- [KoLiBer](https://www.linkedin.com/in/mohammad-hosein-nemati-665b1813b/)
6665

6766
## License
6867

69-
This project is licensed under the [MIT license](LICENSE).
68+
This project is licensed under the [MIT license](LICENSE.md).
7069
Copyright (c) KoLiBer ([email protected])

0 commit comments

Comments
 (0)