Commit Graph

55 Commits

Author SHA1 Message Date
Chris Bargren
93143f1963 Fix type definitions for Hapi load configuration property (#19949)
Any or all of the properties in the load configuration object can be defined.
2017-09-26 11:26:42 -07:00
Matteo Ferrando
da1373bcdb added timeout tests 2017-08-18 18:44:32 -04:00
Matteo Ferrando
9b809a2ccc [Hapi] Updated timeout property of RoutePayloadConfigurationObject is an optional property which accepts a number or false 2017-08-18 18:40:48 -04:00
Andy
5d6c651a1a Apply stricter lint rules (#19063) 2017-08-17 14:53:41 -07:00
Alexander James Phillips
5d4032b836 Fixes #18283 (#18404) 2017-08-01 09:12:55 -07:00
Andy
af8b0d1294 FIx new lint errors (#18382) 2017-07-25 10:34:23 -07:00
mailto1587
94f1d2c48e Add the test file for request.query to tsconfig.json 2017-06-22 19:43:15 +08:00
mailto1587
0c95065c18 [hapi] Keep the version number of type definition as 16.1 2017-06-22 19:40:51 +08:00
mailto1587
161f65a193 [hapi] Updated docstring of request.query to the latest docs 2017-06-22 19:36:04 +08:00
mailto1587
6c2fd39fcd [hapi] Added test for request.query 2017-06-22 19:35:03 +08:00
mailto1587
e01f2d7d87 Change the type of Request.query to any instead of Object for building a fast prototype 2017-06-21 20:13:55 +08:00
Nathan Shively-Sanders
1119ad2d81 More fixes for 2.4. Not all for weak types:
2.4 also has been inference for generics, which finds more errors as
well.
2017-06-19 13:00:47 -07: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
Christian
3b2f53cf6a hapi: fix incorrect connection.table() result type (#17070) 2017-06-09 15:05:33 -07:00
Niklas Wulf
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 Wulf
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 Ozga
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
Simon Schick
a82323abc9 fix typo 2017-05-18 13:38:10 +02: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 Phillips
cbda0a036b Fix tests for pluginSpecificConfiguration 2017-05-17 14:10:58 +02:00
Alexander James Phillips
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
8b328fa9ab amend route plugins 2017-05-16 04:53:30 +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
c69e614bc1 Make error passed to Hapi.Server.register callback possible to be null 2017-05-08 14:31:32 +01:00
Alexander James Phillips
91fe980714 Revert "Move v15 hapi code to v16.0"
This reverts commit 7894a7eb25.
and commit 8ce61979e5
2017-05-08 01:08:05 +01:00
Alexander James Phillips
7894a7eb25 Move v16 hapi code to v16.0 2017-05-08 00:57:09 +01:00
Alexander James Phillips
8ce61979e5 Move v15 hapi code back to v16 now that all tests are passing 2017-05-08 00:54:25 +01:00
Alexander James Phillips
89f08736f0 Fix Podium tests 2017-05-08 00:43:40 +01:00
Alexander James Phillips
02389001d7 Fix hapi-auth-jwt2 to work with hapi-v16.1 typings 2017-05-07 20:57:39 +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
dc6224ad1c Follow instructions from failed test to set tsconfig types to empty array 2017-05-07 19:11:13 +01:00
Alexander James Phillips
5e7881120c Change version at top of index.d.ts 2017-05-07 18:58:22 +01:00
Alexander James Phillips
f902f7f1fb Temporarily move v16 code to v15 directory
To "fix" the error: "The latest major version is 16, but a directory v16 exists."
2017-05-07 18:51:57 +01:00
Alexander James Phillips
ca36987882 Try moving v16.0 code to v16 directory
Maybe that will fix "types/hapi/v16.0 has unused file hapi-tests.ts" error
2017-05-07 18:47:21 +01:00
Alexander James Phillips
7503dd0bd3 Add paths to v16.0 tsconfig to fix tests 2017-05-07 18:40:20 +01:00
Alexander James Phillips
cacacaa38a Update tsconfig files to reflect new location of tests 2017-05-07 15:13:09 +01:00
Alexander James Phillips
22d7c1dbcf Move hapi tests directory from tests to test 2017-05-07 15:06:09 +01:00
Alexander James Phillips
ae60b8ca46 Move hapi dependencies to own modules
catbox, h2o2, mime-db, mimos, podium, shot, vision
Add tests where possible.
Add note regarding apparent failure of some nested object literals to enforce typings
2017-05-07 15:04:37 +01:00
Alexander James Phillips
f20d1e1c2c Update definition for hapi 16.1
Use Object not object. app and plugins optional in server.inject options
Fix merge conlict with master
Type IPluginFunction. Simplify Plugin. Add backwards incompatibility note.
  Thanks mmc41 and jasonswearingen.
Remove Promise.
  Thanks mmc41.
Fix merge conflict with master
Renaming of all interfaces to remove preceding I in preparation of dtslint
Fix http links in docs and remove old I interface names
2e119e63a  Add example tests of server.decorate on server and request
2e119e63a  Improve comments regarding server.decorate
0d6b28656  Allow response.state to accept object
0d6b28656  request.response should also be responase or null.
0d6b28656  Allow some cookie config fields to be nullable.
Fix merge conflict with master again
2017-05-05 12:43:13 +01:00
Mohamed Hegazy
e564537f7f Fix lint failures (#16329)
* fix lint failures

* Fix more lint failures

* Fix some more lint errors
2017-05-04 15:31:42 -07:00
Eric Eslinger
cc56f233d4 select is optional here (#16157) 2017-05-03 14:28:14 -07:00