{"action":"closed","number":3,"pull_request":{"url":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/3","id":74008847,"html_url":"https://github.com/inversify/inversify-express-utils/pull/3","diff_url":"https://github.com/inversify/inversify-express-utils/pull/3.diff","patch_url":"https://github.com/inversify/inversify-express-utils/pull/3.patch","issue_url":"https://api.github.com/repos/inversify/inversify-express-utils/issues/3","number":3,"state":"closed","locked":false,"title":"Add support for async controller methods and app-level error handlers","user":{"login":"codyjs","id":5133894,"avatar_url":"https://avatars.githubusercontent.com/u/5133894?v=3","gravatar_id":"","url":"https://api.github.com/users/codyjs","html_url":"https://github.com/codyjs","followers_url":"https://api.github.com/users/codyjs/followers","following_url":"https://api.github.com/users/codyjs/following{/other_user}","gists_url":"https://api.github.com/users/codyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/codyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codyjs/subscriptions","organizations_url":"https://api.github.com/users/codyjs/orgs","repos_url":"https://api.github.com/users/codyjs/repos","events_url":"https://api.github.com/users/codyjs/events{/privacy}","received_events_url":"https://api.github.com/users/codyjs/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\nAdded support for asynchronous controller methods, calls to next() in controller methods, and app-level error handlers through `InversifyExpressServer.setErrorConfig()`.\r\n\r\nThis code has also been refactored to remove the singleton class RouteContainer. Unfortunately this caused a slight breaking change, which is why I decided to make a PR versus committing it directly.\r\n\r\nThe breaking change is that the controllers __must__ be registered to the service identifier \"IController\" and tagged with their name, i.e:\r\n\r\n```ts\r\nkernel.bind<IController>(\"IController\").to(FooController).whenTargetNamed(\"FooController\");\r\n```\r\n<!--- Describe your changes in detail -->\r\n\r\n## Related Issue\r\ninversify/InversifyJS#241\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue first -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->\r\n<!--- Please link to the issue here: -->\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nAsynchronous controller methods should be expected to be a very common use case, so it is important to support that.\r\n\r\nError handlers are a key feature of express, and so there should be an easy way to handle registering them.\r\n\r\nRemoval of RouteContainer was to make the code more testable and less dependent on global state.\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [x] My change requires a change to the documentation.\r\n- [x] I have updated the documentation accordingly.\r\n- [x] My change requires a change to the type definitions.\r\n- [x] I have updated the type definitions accordingly.\r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.","created_at":"2016-06-16T01:12:57Z","updated_at":"2016-06-16T10:16:22Z","closed_at":"2016-06-16T10:16:22Z","merged_at":"2016-06-16T10:16:22Z","merge_commit_sha":"47b6972953d796a58d6ae2545b7af1073d87712c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/3/commits","review_comments_url":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/3/comments","review_comment_url":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inversify/inversify-express-utils/issues/3/comments","statuses_url":"https://api.github.com/repos/inversify/inversify-express-utils/statuses/1556e955b1db95e2d856b90355b739c98e121218","head":{"label":"codyjs:remove-singleton","ref":"remove-singleton","sha":"1556e955b1db95e2d856b90355b739c98e121218","user":{"login":"codyjs","id":5133894,"avatar_url":"https://avatars.githubusercontent.com/u/5133894?v=3","gravatar_id":"","url":"https://api.github.com/users/codyjs","html_url":"https://github.com/codyjs","followers_url":"https://api.github.com/users/codyjs/followers","following_url":"https://api.github.com/users/codyjs/following{/other_user}","gists_url":"https://api.github.com/users/codyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/codyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codyjs/subscriptions","organizations_url":"https://api.github.com/users/codyjs/orgs","repos_url":"https://api.github.com/users/codyjs/repos","events_url":"https://api.github.com/users/codyjs/events{/privacy}","received_events_url":"https://api.github.com/users/codyjs/received_events","type":"User","site_admin":false},"repo":{"id":59217733,"name":"inversify-express-utils","full_name":"codyjs/inversify-express-utils","owner":{"login":"codyjs","id":5133894,"avatar_url":"https://avatars.githubusercontent.com/u/5133894?v=3","gravatar_id":"","url":"https://api.github.com/users/codyjs","html_url":"https://github.com/codyjs","followers_url":"https://api.github.com/users/codyjs/followers","following_url":"https://api.github.com/users/codyjs/following{/other_user}","gists_url":"https://api.github.com/users/codyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/codyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codyjs/subscriptions","organizations_url":"https://api.github.com/users/codyjs/orgs","repos_url":"https://api.github.com/users/codyjs/repos","events_url":"https://api.github.com/users/codyjs/events{/privacy}","received_events_url":"https://api.github.com/users/codyjs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codyjs/inversify-express-utils","description":"Some utilities for the development of express application with Express","fork":true,"url":"https://api.github.com/repos/codyjs/inversify-express-utils","forks_url":"https://api.github.com/repos/codyjs/inversify-express-utils/forks","keys_url":"https://api.github.com/repos/codyjs/inversify-express-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codyjs/inversify-express-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codyjs/inversify-express-utils/teams","hooks_url":"https://api.github.com/repos/codyjs/inversify-express-utils/hooks","issue_events_url":"https://api.github.com/repos/codyjs/inversify-express-utils/issues/events{/number}","events_url":"https://api.github.com/repos/codyjs/inversify-express-utils/events","assignees_url":"https://api.github.com/repos/codyjs/inversify-express-utils/assignees{/user}","branches_url":"https://api.github.com/repos/codyjs/inversify-express-utils/branches{/branch}","tags_url":"https://api.github.com/repos/codyjs/inversify-express-utils/tags","blobs_url":"https://api.github.com/repos/codyjs/inversify-express-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codyjs/inversify-express-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codyjs/inversify-express-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/codyjs/inversify-express-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codyjs/inversify-express-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/codyjs/inversify-express-utils/languages","stargazers_url":"https://api.github.com/repos/codyjs/inversify-express-utils/stargazers","contributors_url":"https://api.github.com/repos/codyjs/inversify-express-utils/contributors","subscribers_url":"https://api.github.com/repos/codyjs/inversify-express-utils/subscribers","subscription_url":"https://api.github.com/repos/codyjs/inversify-express-utils/subscription","commits_url":"https://api.github.com/repos/codyjs/inversify-express-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/codyjs/inversify-express-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/codyjs/inversify-express-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/codyjs/inversify-express-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/codyjs/inversify-express-utils/contents/{+path}","compare_url":"https://api.github.com/repos/codyjs/inversify-express-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codyjs/inversify-express-utils/merges","archive_url":"https://api.github.com/repos/codyjs/inversify-express-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codyjs/inversify-express-utils/downloads","issues_url":"https://api.github.com/repos/codyjs/inversify-express-utils/issues{/number}","pulls_url":"https://api.github.com/repos/codyjs/inversify-express-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/codyjs/inversify-express-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/codyjs/inversify-express-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codyjs/inversify-express-utils/labels{/name}","releases_url":"https://api.github.com/repos/codyjs/inversify-express-utils/releases{/id}","deployments_url":"https://api.github.com/repos/codyjs/inversify-express-utils/deployments","created_at":"2016-05-19T15:11:01Z","updated_at":"2016-05-26T12:06:47Z","pushed_at":"2016-06-16T01:03:26Z","git_url":"git://github.com/codyjs/inversify-express-utils.git","ssh_url":"git@github.com:codyjs/inversify-express-utils.git","clone_url":"https://github.com/codyjs/inversify-express-utils.git","svn_url":"https://github.com/codyjs/inversify-express-utils","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"inversify:master","ref":"master","sha":"c205f8a6bc5723a1dc1ecd6230023d1b17b14e05","user":{"login":"inversify","id":11887183,"avatar_url":"https://avatars.githubusercontent.com/u/11887183?v=3","gravatar_id":"","url":"https://api.github.com/users/inversify","html_url":"https://github.com/inversify","followers_url":"https://api.github.com/users/inversify/followers","following_url":"https://api.github.com/users/inversify/following{/other_user}","gists_url":"https://api.github.com/users/inversify/gists{/gist_id}","starred_url":"https://api.github.com/users/inversify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inversify/subscriptions","organizations_url":"https://api.github.com/users/inversify/orgs","repos_url":"https://api.github.com/users/inversify/repos","events_url":"https://api.github.com/users/inversify/events{/privacy}","received_events_url":"https://api.github.com/users/inversify/received_events","type":"Organization","site_admin":false},"repo":{"id":59208533,"name":"inversify-express-utils","full_name":"inversify/inversify-express-utils","owner":{"login":"inversify","id":11887183,"avatar_url":"https://avatars.githubusercontent.com/u/11887183?v=3","gravatar_id":"","url":"https://api.github.com/users/inversify","html_url":"https://github.com/inversify","followers_url":"https://api.github.com/users/inversify/followers","following_url":"https://api.github.com/users/inversify/following{/other_user}","gists_url":"https://api.github.com/users/inversify/gists{/gist_id}","starred_url":"https://api.github.com/users/inversify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inversify/subscriptions","organizations_url":"https://api.github.com/users/inversify/orgs","repos_url":"https://api.github.com/users/inversify/repos","events_url":"https://api.github.com/users/inversify/events{/privacy}","received_events_url":"https://api.github.com/users/inversify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inversify/inversify-express-utils","description":"Some utilities for the development of express application with Express","fork":false,"url":"https://api.github.com/repos/inversify/inversify-express-utils","forks_url":"https://api.github.com/repos/inversify/inversify-express-utils/forks","keys_url":"https://api.github.com/repos/inversify/inversify-express-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inversify/inversify-express-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inversify/inversify-express-utils/teams","hooks_url":"https://api.github.com/repos/inversify/inversify-express-utils/hooks","issue_events_url":"https://api.github.com/repos/inversify/inversify-express-utils/issues/events{/number}","events_url":"https://api.github.com/repos/inversify/inversify-express-utils/events","assignees_url":"https://api.github.com/repos/inversify/inversify-express-utils/assignees{/user}","branches_url":"https://api.github.com/repos/inversify/inversify-express-utils/branches{/branch}","tags_url":"https://api.github.com/repos/inversify/inversify-express-utils/tags","blobs_url":"https://api.github.com/repos/inversify/inversify-express-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inversify/inversify-express-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inversify/inversify-express-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/inversify/inversify-express-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inversify/inversify-express-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/inversify/inversify-express-utils/languages","stargazers_url":"https://api.github.com/repos/inversify/inversify-express-utils/stargazers","contributors_url":"https://api.github.com/repos/inversify/inversify-express-utils/contributors","subscribers_url":"https://api.github.com/repos/inversify/inversify-express-utils/subscribers","subscription_url":"https://api.github.com/repos/inversify/inversify-express-utils/subscription","commits_url":"https://api.github.com/repos/inversify/inversify-express-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/inversify/inversify-express-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/inversify/inversify-express-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/inversify/inversify-express-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/inversify/inversify-express-utils/contents/{+path}","compare_url":"https://api.github.com/repos/inversify/inversify-express-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inversify/inversify-express-utils/merges","archive_url":"https://api.github.com/repos/inversify/inversify-express-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inversify/inversify-express-utils/downloads","issues_url":"https://api.github.com/repos/inversify/inversify-express-utils/issues{/number}","pulls_url":"https://api.github.com/repos/inversify/inversify-express-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/inversify/inversify-express-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/inversify/inversify-express-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inversify/inversify-express-utils/labels{/name}","releases_url":"https://api.github.com/repos/inversify/inversify-express-utils/releases{/id}","deployments_url":"https://api.github.com/repos/inversify/inversify-express-utils/deployments","created_at":"2016-05-19T13:24:29Z","updated_at":"2016-05-26T13:08:42Z","pushed_at":"2016-06-16T10:16:22Z","git_url":"git://github.com/inversify/inversify-express-utils.git","ssh_url":"git@github.com:inversify/inversify-express-utils.git","clone_url":"https://github.com/inversify/inversify-express-utils.git","svn_url":"https://github.com/inversify/inversify-express-utils","homepage":null,"size":27,"stargazers_count":4,"watchers_count":4,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/3"},"html":{"href":"https://github.com/inversify/inversify-express-utils/pull/3"},"issue":{"href":"https://api.github.com/repos/inversify/inversify-express-utils/issues/3"},"comments":{"href":"https://api.github.com/repos/inversify/inversify-express-utils/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inversify/inversify-express-utils/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/inversify/inversify-express-utils/statuses/1556e955b1db95e2d856b90355b739c98e121218"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"remojansen","id":10656223,"avatar_url":"https://avatars.githubusercontent.com/u/10656223?v=3","gravatar_id":"","url":"https://api.github.com/users/remojansen","html_url":"https://github.com/remojansen","followers_url":"https://api.github.com/users/remojansen/followers","following_url":"https://api.github.com/users/remojansen/following{/other_user}","gists_url":"https://api.github.com/users/remojansen/gists{/gist_id}","starred_url":"https://api.github.com/users/remojansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remojansen/subscriptions","organizations_url":"https://api.github.com/users/remojansen/orgs","repos_url":"https://api.github.com/users/remojansen/repos","events_url":"https://api.github.com/users/remojansen/events{/privacy}","received_events_url":"https://api.github.com/users/remojansen/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":4,"additions":279,"deletions":214,"changed_files":9}}
{"actor":{"display_login":"remojansen"}}