Commit Graph

124 Commits

Author SHA1 Message Date
Joey Baker
38ccb3adf6 Chore (deps) update eslint (major)
Breaking changes shouldn't affect us
2016-09-05 15:43:48 -07:00
Joey Baker
506d42f39a 2.5.4 2016-09-05 12:30:15 -07:00
Joey Baker
3dfa72ddee Merge pull request #21 from Getable/better-error
Fix a bug in error parsing
2016-09-05 12:25:14 -07:00
Joey Baker
bab2e90cbb Feat (error) parse PG 42* errors 2016-09-04 17:28:16 -07:00
Joey Baker
da6b3ce963 Feat (error) include hint on PG errors
Provides useful info!
2016-09-04 17:28:09 -07:00
Joey Baker
b032be20d1 Fix (error) always reply with an error #oops
We had a case where reply would never be called. This could case a
server hang.
2016-09-04 17:28:01 -07:00
Mahdi Dibaiee
79c6a81a3a chore(version): bump version 2016-08-30 09:49:07 +04:30
Mahdi Dibaiee
517f2b8157 Merge pull request #17 from Getable/fix-babel-polyfill
Fixes for babel-polyfill
2016-08-30 09:48:20 +04:30
Joey Baker
a9fa790ae9 Fix (deps): install babel-polyfill as optionalDep
We only require it if something else hasn't so this is a optionalDep.
2016-08-29 17:08:44 -07:00
Joey Baker
ce6f1fedde Fix: bad merge in error.js 2016-08-28 09:57:23 -07:00
Joey Baker
db86507ef9 Fix: correct babel-polyfill version
This installs the babel-polyfill for babel 6. #oops
2016-08-28 09:56:46 -07:00
Mahdi Dibaiee
6ad9df2db1 chore: bump version 2016-08-26 13:15:50 +04:30
Mahdi Dibaiee
17105f66f4 feat(errors): parse sequelize errors and use the relevant Boom error type 2016-08-26 13:15:15 +04:30
Mahdi Dibaiee
b18479e02e Merge pull request #16 from Getable/parse-sequelize-errors
Parse Sequelize errors
2016-08-26 13:11:29 +04:30
Joey Baker
0e9cd935b9 Add: parse Sequelize errors
This adds intelligence around sequelize errors to parse out the correct
error status code and ensure it's always formatted as a Boom error.
2016-08-25 21:28:23 -07:00
Mahdi Dibaiee
9524e55690 chore(version): bump version 2016-08-04 10:38:18 +04:30
Mahdi Dibaiee
1752d700f5 Merge pull request #15 from Getable/better-errors
Add: Better errors
2016-08-04 10:37:29 +04:30
Joey Baker
6d289d6d78 Add: Better errors
Now looks at the error that comes back from sequelize and uses boom to
format the error in a more friendly way. This should yield useful error
messages instead of generic 500s.
2016-08-03 14:42:20 -07:00
Mahdi Dibaiee
0d6a715511 chore(CONTRIBUTING): a contribution guide, git commit messages and code linting
@joeybaker ^
2016-07-22 23:29:54 +04:30
Mahdi Dibaiee
e5d72fd034 chore(version): bump version to 2.5.0, we have a new feature 2016-07-22 23:25:55 +04:30
Mahdi Dibaiee
a0aeaef3a9 Merge pull request #14 from Getable/fix-permissions
Change: permissions must always be an array
2016-07-22 23:25:26 +04:30
Joey Baker
79b9fc1242 Change: permissions must always be an array
This allows us to set different configs per model. I should have thought
of this usecase when I first did permissions.
2016-07-22 11:50:08 -07:00
Mahdi Dibaiee
fb8275abca Merge pull request #12 from Getable/rm-extraneous-babel
Build: rm extraneous babel dep
2016-07-22 21:59:26 +04:30
Mahdi Dibaiee
098aabfea5 Merge pull request #11 from Getable/add-permissions
Add: permissions
2016-07-22 21:58:36 +04:30
Joey Baker
f95f411a65 Add: permissions
It's now possible to limit the models rest routes are created for. This
is done via a `models` option that can be simple to complex. The readme
has been updated to reflect this.
2016-07-22 10:14:17 -07:00
Joey Baker
0416986896 Build: rm extraneous babel dep #oops 2016-07-22 09:52:21 -07:00
Mahdi Dibaiee
6c46ff68d0 fix(primaryKey): use model.primaryKey instead of hardcoded id for id routes, fixes #9 2016-07-13 11:27:48 +04:30
Mahdi Dibaiee
29ee49fc62 fix(name): default name parameter on options object itself 2016-07-13 10:05:33 +04:30
Mahdi Dibaiee
d142e6c553 fix(options): take a name parameter, same as the name parameter used in hapi-sequelize, fixes #8 2016-07-13 10:03:00 +04:30
Mahdi Dibaiee
fb06d9cd27 chore(version): bump version up 2016-07-13 09:59:55 +04:30
Mahdi Dibaiee
b9e150200f chore: switch from Gruntfiles to npm scripts, see #5 2016-07-13 09:59:12 +04:30
Mahdi Dibaiee
fe6881099f Merge branch 'babel6' of github.com:Getable/hapi-sequelize-crud into babel6 2016-07-13 09:50:44 +04:30
Mahdi Dibaiee
6786b9b487 style: updated eslint config 2016-07-09 09:41:23 +04:30
Mahdi Dibaiee
aa06808ab2 chore(version): bump version to 2.1.1, two small patches were applied by @joeybaker 2016-07-09 09:14:18 +04:30
Mahdi Dibaiee
2d1ab6b75a Merge pull request #6 from Getable/fix-include
Fix: include option api correction
2016-07-09 09:13:14 +04:30
Joey Baker
2ea6c2e3a8 Fix: include option api correction
AFAIK, hapi-sequelize doesn't have a `request.models`, but it does have
a `request.getDb()` method that has `models` on it. This calls that
method to get the related models, but allows `request.models` to keep
working for backward compatibility.
2016-07-08 15:28:33 -07:00
Mahdi Dibaiee
c0cb2c44e0 Merge pull request #7 from Getable/require-payload-on-put
Fix: PUT requires a payload to work
2016-07-08 17:17:40 +04:30
Joey Baker
fee846eb4a Fix: PUT requires a payload to work 2016-07-05 18:34:56 -07:00
Joey Baker
e7bc048a46 Internal: upgrade to babel6
Upgrades to babel 6. The major win (aside from some minor
performance gains), is that this module can now be `npm link`ed into a
babel 6 code base.
2016-07-05 14:47:44 -07:00
Mahdi Dibaiee
07af23cb5a chore(eslint): use eslint for a more consistent style throughout the code 2016-06-30 18:28:02 +04:30
Mahdi Dibaiee
3d78b467ac Merge pull request #4 from Getable/boom
Boom
2016-06-30 18:14:07 +04:30
Joey Baker
0698a8a3ad Fix: crud: GET id's can be strings or numbers 2016-06-29 21:30:27 -07:00
Joey Baker
3f419284be Fix: Reply with 404 when required 2016-06-29 21:28:56 -07:00
Joey Baker
6958c49622 Build: install boom 2016-06-29 21:27:44 -07:00
Mahdi Dibaiee
ca6298d6f4 chore(README, defaultConfig): add defaultConfig to README 2016-06-05 21:37:58 +04:30
Mahdi Dibaiee
1a87621ce9 chore(defaultConfig): bump version, thanks to @Istar-Eldritch 2016-06-05 21:34:30 +04:30
Mahdi Dibaiee
557ea8e9a9 Merge pull request #2 from Istar-Eldritch/defaultconfig
Added defaultConfig parameter to the options
2016-06-05 21:32:40 +04:30
Ruben Paz
2fd7fa09b0 Replace defaults by defaultsDeep 2016-06-05 17:51:54 +01:00
Ruben Paz
9a28dbcc02 Added defaultConfig parameter to the options 2016-06-05 14:44:24 +01:00
Mahdi Dibaiee
f8e1a27572 chore: add babel as dependency 2016-05-24 18:05:38 +04:30