Commit Graph
38 Commits
Author SHA1 Message Date
Scott Cooper 81bd412152 fix: allow joi object to be passed directly to response.schema 2018-02-26 22:43:00 -08:00
Justin SimmsandAndy 1a3679e14c Hapi 17: Fix inability to augment server.plugins type (#23855)
* Fix inability to augment server.plugins type

* Replacing more 'any' types and other misc fixes

* Change server.inject to use ApplicationState
2018-02-26 11:28:41 -08:00
Rodrigo Saboya c576e544be Updating catbox to hapi 17 bindings. 2018-02-26 15:24:45 -03:00
Justin SimmsandAndy 2056f990d0 Fix issues identified with the Hapi 17 update (#23691)
* Fix issues identified with the Hapi 17 update

This commit introduces a variety of changes, primarily fixes, but it
also collapses the typings into a single file.  Collapsing it into a
single file means simpler augmentation of types, which is common in
Hapi.

Thank you to SimonSchick for contributing a number of changes here.

* fix response property
2018-02-22 07:06:11 -08:00
Justin Simms b7edd5c1db Add generic types for plugins 2018-02-08 23:41:49 -06:00
Justin Simms d6324664f5 Making some of the typings more specific. 2018-02-08 22:07:48 -06:00
Justin Simms 1d964920cf Remove the enums 2018-02-08 20:15:33 -06:00
Justin Simms be8330e0b8 Apply fixes suggested in code review 2018-02-08 20:01:15 -06:00
Justin SimmsandJustin Simms c423899d98 Fix the remaining failing tests and add promise return types for async functions. 2018-02-07 22:35:26 -06:00
Rafael S. FijalkowskiandJustin Simms b7757327fd Add server route validation test file. 2018-02-07 22:00:59 -06:00
rafaelsouzafandJustin Simms f91e43df7a Hapi v17 setup. 2018-02-07 22:00:59 -06:00
AndyandGitHub 8b10461a43 Revert "Merge pull request #22107 from rafaelsouzaf/master" (#22417)
This reverts commit fb68b21bea, reversing
changes made to ae47b3c7d0.
2017-12-21 07:23:39 -08:00
rafaelsouzaf 3fe936dace Remove old, and not more useful, comments in test files. 2017-12-16 22:32:23 -03:00
rafaelsouzaf 3e29b6e832 Move v17 definitions and tests to "types/hapi" root folder and delete v17 temp folder. 2017-12-13 22:32:28 -03:00
rafaelsouzaf 39d8d03a0f Move v16 types to ./v16 folder. 2017-12-13 22:27:07 -03:00
Matteo Ferrando da1373bcdb added timeout tests 2017-08-18 18:44:32 -04:00
Alexander James PhillipsandAndy 5d4032b836 Fixes #18283 (#18404) 2017-08-01 09:12:55 -07:00
mailto1587 6c2fd39fcd [hapi] Added test for request.query 2017-06-22 19:35:03 +08:00
Nathan Shively-Sanders 4874667de9 Fix primitive weak type errors
These weak type errors were not caught in TS 2.4 RC. The final TS 2.4
will catch weak type errors with primitives, so this PR fixes those
now-caught errors.
2017-06-15 11:46:46 -07:00
ChristianandAndy 3b2f53cf6a hapi: fix incorrect connection.table() result type (#17070) 2017-06-09 15:05:33 -07:00
Niklas WulfandAndy 046b7d5ff9 [Boom, Hapi] Add default generic type to all error creation functions (#17048)
* [Boom] Add default generic type to all error creation functions

* [Boom] Change default generic Data type to any instead of null

* [Boom] Add tests for error creation without custom data

* [Boom, Hapi] Move tests for passing Boom errors to Hapi continuation functions into hapi package

* [boom] add wrap and unauthorized return BoomError with data as null
2017-06-08 06:33:24 -07:00
Niklas WulfandAndy d45137018d [Hapi] Fix input and response validation function signatures (#16802)
* [Hapi] Fix input and response validation function signatures

Fixes #16750

* [Hapi] Allow custom validation options in route input and response

* [Hapi] Adjust validation contexts to match Hapi version 16.1.1

* [Hapi] Adjust test/route/validate.ts to match newest changes

* [Hapi] Add custom options to response validation test

* [Hapi] Update TypeScript version to 2.3 in packages that import Hapi

* [Hapi] Clarify documentation on validation function value, allow null
2017-06-07 06:37:04 -07:00
Arthur OzgaandGitHub cb4bcbe4fb Merge pull request #16595 from AJamesPhillips/FixJoiValidationObject
[hapi] Correct JoiValidationObject for route validate option.  Correct inject result.
2017-05-18 16:58:24 -07:00
Alexander James Phillips cec538087c Correct inject result type 2017-05-18 23:27:48 +01:00
Alexander James Phillips bbcb50a4e1 Update hapi route validate to allow joi Schema SchemaMap or array of those 2017-05-18 11:08:06 +01:00
Alexander James Phillips 678cc80ff5 Attempt to fix correct JoiValidationObject for hapi route validate option 2017-05-17 23:50:18 +01:00
Alexander James PhillipsandSimon Schick cbda0a036b Fix tests for pluginSpecificConfiguration 2017-05-17 14:10:58 +02:00
Alexander James PhillipsandSimon Schick 95144bb247 Include Plugin specific config for route server and connection level 2017-05-17 13:32:57 +02:00
Simon Schick f2cf1da49c address comments #2 2017-05-17 01:22:34 +02:00
Simon Schick ac46bea13a address comments 2017-05-16 13:47:24 +02:00
Simon Schick 2d2f11dd8d rm additional whitespace 2017-05-16 04:24:20 +02:00
Simon Schick 87156fde6b fixed ext option and narrowed the type, fixed compression being mandatory 2017-05-16 04:19:15 +02:00
Alexander James Phillips 63c96d3815 Allow exclusion of conflicting properties #16416 2017-05-12 12:13:09 +01:00
Alexander James Phillips dee8894855 Simpler typings than #16416 to catch some errors again 2017-05-11 13:21:49 +01:00
Alexander James Phillips 1557cefe0c Include @theefer's work in #16416 2017-05-11 11:10:05 +01:00
Alexander James Phillips d20f912c77 Add scope and entity to route.options.auth 2017-05-08 20:28:19 +01:00
Alexander James Phillips 9fc3c9cd40 Fix some tslint errors and temporarily remove tslint.json 2017-05-07 20:43:03 +01:00
Alexander James Phillips 22d7c1dbcf Move hapi tests directory from tests to test 2017-05-07 15:06:09 +01:00