Skip to content

Commit c5ce734

Browse files
authored
Merge pull request #2 from hapinessjs/next
v1.0.0-rc.6
2 parents 1884c8e + 18768ee commit c5ce734

17 files changed

Lines changed: 2464 additions & 2 deletions

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
10+
# IDEs and editors
11+
.idea
12+
.project
13+
.classpath
14+
.c9/
15+
*.launch
16+
.settings/
17+
.vscode
18+
19+
# misc
20+
/.sass-cache
21+
/connect.lock
22+
/coverage
23+
/libpeerconnection.log
24+
npm-debug.log
25+
testem.log
26+
/typings
27+
28+
#System Files
29+
.DS_Store
30+
Thumbs.db

.istanbul.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
instrumentation:
2+
extensions:
3+
- .ts

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.1.3

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- "node"
4+
script:
5+
- yarn run test
6+
after_script:
7+
- yarn run coveralls

LICENSE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
====
3+
4+
**Copyright (c) 2017 [Hapiness](https://github.com/hapiness)**
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pretest:
2+
@node ./node_modules/.bin/tslint -p ./tsconfig.json --type-check "./src/**/*.ts" "./test/**/*.ts" --exclude "./src/**/*.d.ts"
3+
test:
4+
@node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha ./test
5+
coveralls:
6+
cat ./coverage/lcov.info | node ./node_modules/.bin/coveralls
7+
tsc:
8+
@node ./node_modules/.bin/tsc -p ./tsconfig.build.json
9+
clean:
10+
@node ./node_modules/.bin/rimraf ./dist
11+
packaging:
12+
@node ./node_modules/.bin/ts-node ./tools/packaging.ts
13+
14+
.PHONY: pretest test coveralls tsc clean packaging

README.md

Lines changed: 113 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,113 @@
1-
# error
2-
Error wrapper based on Boom library to handle and add data in payload response
1+
<img src="http://bit.ly/2mxmKKI" width="500" alt="Hapiness" />
2+
3+
<div style="margin-bottom:20px;">
4+
<div style="line-height:60px">
5+
<a href="https://travis-ci.org/hapinessjs/error.svg?branch=master">
6+
<img src="https://travis-ci.org/hapinessjs/error.svg?branch=master" alt="build" />
7+
</a>
8+
<a href="https://coveralls.io/github/hapinessjs/error?branch=master">
9+
<img src="https://coveralls.io/repos/github/hapinessjs/error/badge.svg?branch=master" alt="coveralls" />
10+
</a>
11+
<a href="https://david-dm.org/hapinessjs/error">
12+
<img src="https://david-dm.org/hapinessjs/error.svg" alt="dependencies" />
13+
</a>
14+
<a href="https://david-dm.org/hapinessjs/error?type=dev">
15+
<img src="https://david-dm.org/hapinessjs/error/dev-status.svg" alt="devDependencies" />
16+
</a>
17+
</div>
18+
<div>
19+
<a href="https://www.typescriptlang.org/docs/tutorial.html">
20+
<img src="https://cdn-images-1.medium.com/max/800/1*8lKzkDJVWuVbqumysxMRYw.png"
21+
align="right" alt="Typescript logo" width="50" height="50" style="border:none;" />
22+
</a>
23+
<a href="http://reactivex.io/rxjs">
24+
<img src="http://reactivex.io/assets/Rx_Logo_S.png"
25+
align="right" alt="ReactiveX logo" width="50" height="50" style="border:none;" />
26+
</a>
27+
<a href="http://hapijs.com">
28+
<img src="http://bit.ly/2lYPYPw"
29+
align="right" alt="Hapijs logo" width="75" style="border:none;" />
30+
</a>
31+
</div>
32+
</div>
33+
34+
# Hapiness Error
35+
36+
Error module based on [boom](https://github.com/hapijs/boom).
37+
38+
## Table of contents
39+
40+
* [Using error module](#using-config-module)
41+
* [Yarn or NPM it in your package.json](#yarn-or-npm-it-in-your-packagejson)
42+
* [Use](#use)
43+
* [Change History](#change-history)
44+
* [Maintainers](#maintainers)
45+
* [License](#license)
46+
47+
## Using config module
48+
49+
### `yarn` or `npm` it in your `package.json`
50+
51+
```bash
52+
$ npm install --save @hapiness/biim
53+
54+
or
55+
56+
$ yarn add @hapiness/biim
57+
```
58+
59+
```javascript
60+
"dependencies": {
61+
"@hapiness/core": "^1.0.0-rc.6",
62+
"@hapiness/biim": "^1.0.0-rc.6",
63+
//...
64+
}
65+
//...
66+
```
67+
68+
### Use
69+
70+
`Node.js Script`:
71+
72+
```javascript
73+
import { Biim } from '@hapiness/biim';
74+
75+
Biim.badRequest('my-message', 'some-data', { key: 'bad-request' });
76+
```
77+
78+
[Back to top](#table-of-contents)
79+
80+
## Change History
81+
82+
* v1.0.0-rc.6 (2017-07-16)
83+
* Init the project
84+
85+
[Back to top](#table-of-contents)
86+
87+
## Maintainers
88+
89+
<table>
90+
<tr>
91+
<td colspan="4" align="center"><a href="https://www.tadaweb.com"><img src="https://tadaweb.com/images/tadaweb/logo.png" width="117" alt="tadaweb" /></a></td>
92+
</tr>
93+
<tr>
94+
<td align="center"><a href="https://github.com/Juneil"><img src="https://avatars3.githubusercontent.com/u/6546204?v=3&s=117" width="117"/></a></td>
95+
<td align="center"><a href="https://github.com/antoinegomez"><img src="https://avatars3.githubusercontent.com/u/997028?v=3&s=117" width="117"/></a></td>
96+
<td align="center"><a href="https://github.com/reptilbud"><img src="https://avatars3.githubusercontent.com/u/6841511?v=3&s=117" width="117"/></a></td>
97+
<td align="center"><a href="https://github.com/njl07"><img src="https://avatars3.githubusercontent.com/u/1673977?v=3&s=117" width="117"/></a></td>
98+
</tr>
99+
<tr>
100+
<td align="center"><a href="https://github.com/Juneil">Julien Fauville</a></td>
101+
<td align="center"><a href="https://github.com/antoinegomez">Antoine Gomez</a></td>
102+
<td align="center"><a href="https://github.com/reptilbud">Sébastien Ritz</a></td>
103+
<td align="center"><a href="https://github.com/njl07">Nicolas Jessel</a></td>
104+
</tr>
105+
</table>
106+
107+
[Back to top](#table-of-contents)
108+
109+
## License
110+
111+
Copyright (c) 2017 **Hapiness** Licensed under the [MIT license](https://github.com/hapinessjs/error/blob/master/LICENSE.md).
112+
113+
[Back to top](#table-of-contents)

package.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"name": "@hapiness/biim",
3+
"version": "1.0.0-rc.6",
4+
"description": "Error Library to use it inside Hapiness framework or standalone using Boom",
5+
"main": "index.js",
6+
"types": "index.d.ts",
7+
"private": false,
8+
"scripts": {
9+
"test": "make test",
10+
"pretest": "make pretest",
11+
"coveralls": "make coveralls",
12+
"packaging": "make packaging",
13+
"prebuild": "make pretest && make test && make clean",
14+
"build": "make tsc",
15+
"postbuild": "make packaging"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "git+ssh://git@github.com/hapinessjs/config.git"
20+
},
21+
"keywords": [
22+
"error",
23+
"boom",
24+
"hapi",
25+
"hapijs",
26+
"Hapiness",
27+
"Framework",
28+
"NodeJS",
29+
"Node",
30+
"ES2015",
31+
"ES2016",
32+
"ES2017",
33+
"ES6",
34+
"ES7",
35+
"ES8",
36+
"Typescript"
37+
],
38+
"contributors": [
39+
{
40+
"name": "Julien Fauville",
41+
"url": "https://github.com/Juneil"
42+
},
43+
{
44+
"name": "Antoine Gomez",
45+
"url": "https://github.com/antoinegomez"
46+
},
47+
{
48+
"name": "Sébastien Ritz",
49+
"url": "https://github.com/reptilbud"
50+
},
51+
{
52+
"name": "Nicolas Jessel",
53+
"url": "https://github.com/njl07"
54+
}
55+
],
56+
"license": "SEE LICENSE IN https://github.com/hapinessjs/error/blob/master/LICENSE.md",
57+
"bugs": {
58+
"url": "https://github.com/hapinessjs/error/issues"
59+
},
60+
"homepage": "https://github.com/hapinessjs/error#readme",
61+
"dependencies": {
62+
"@types/boom": "^4.3.5",
63+
"@types/node": "^8.0.13",
64+
"boom": "^5.1.0",
65+
"debug": "^2.6.8"
66+
},
67+
"devDependencies": {
68+
"@types/fs-extra": "^3.0.2",
69+
"coveralls": "^2.13.1",
70+
"fs-extra": "^4.0.0",
71+
"istanbul": "^1.1.0-alpha.1",
72+
"mocha": "^3.4.2",
73+
"mocha-typescript": "^1.1.7",
74+
"rimraf": "^2.6.1",
75+
"rxjs": "^5.4.2",
76+
"ts-node": "^3.2.0",
77+
"tslint": "^5.5.0",
78+
"typescript": "^2.4.1",
79+
"unit.js": "^2.0.0"
80+
},
81+
"engines": {
82+
"node": ">=7.0.0"
83+
}
84+
}

0 commit comments

Comments
 (0)