Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DefaultMappingStrategy from http-problem-details-mapper #19

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@ jobs:
- node_modules
key: v1-dependencies-{{ checksum "yarn.lock" }}

# run tests!
- run: yarn test

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ Notice that the `HttpProblemResponse` must come last. A global error logger woul
precede it and forward the error to the `next` function.

```js
import { ExpressMappingStrategy, HttpProblemResponse } from 'express-http-problem-details'
import { MapperRegistry } from 'http-problem-details-mapper'
import { HttpProblemResponse } from 'express-http-problem-details'
import { DefaultMappingStrategy, MapperRegistry } from 'http-problem-details-mapper'

const strategy = new ExpressMappingStrategy(
const strategy = new DefaultMappingStrategy(
new MapperRegistry()
.registerMapper(new NotFoundErrorMapper()))

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"dependencies": {
"http-problem-details": "^0.1.2",
"http-problem-details-mapper": "^0.1.3"
"http-problem-details-mapper": "^0.1.4"
},
"husky": {
"hooks": {
Expand Down
20 changes: 0 additions & 20 deletions src/ExpressMappingStrategy.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { ExpressMappingStrategy } from './ExpressMappingStrategy'
import { HttpProblemResponse } from './HttpProblemResponse'

export {
ExpressMappingStrategy,
HttpProblemResponse
}
15 changes: 0 additions & 15 deletions test/ExpressMappingStrategyTests.ts

This file was deleted.

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1416,10 +1416,10 @@ hosted-git-info@^2.1.4:
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==

http-problem-details-mapper@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/http-problem-details-mapper/-/http-problem-details-mapper-0.1.3.tgz#4901e550d3081fb713b67157300b83ad41dc230d"
integrity sha512-Ps/DNwhH4cM6Sneh5Qg7ud+lTAsMmQuFDdMAKWwd7lx6pGPNh8A3c9T9O2BktN2J4mXk41zfTpMe1bMiItUviQ==
http-problem-details-mapper@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/http-problem-details-mapper/-/http-problem-details-mapper-0.1.4.tgz#c231858e3e3a1e9521a2750b82114e83cbe61ae9"
integrity sha512-gvNuKvQzJvAoN6QklhgZD70YpuQujNA+9zLUKV7Kj8ha04HMfp9TbBVyw3GA8kc9xaNcwx6/BTZevKTemzGikQ==

http-problem-details@^0.1.2:
version "0.1.4"
Expand Down