{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/2821","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/2821/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/2821/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/2821/events","html_url":"https://github.com/serverless/serverless/pull/2821","id":192313764,"number":2821,"title":"add Visualize plugin for viewing lifecycle hooks","user":{"login":"dougmoscrop","id":586516,"avatar_url":"https://avatars.githubusercontent.com/u/586516?v=3","gravatar_id":"","url":"https://api.github.com/users/dougmoscrop","html_url":"https://github.com/dougmoscrop","followers_url":"https://api.github.com/users/dougmoscrop/followers","following_url":"https://api.github.com/users/dougmoscrop/following{/other_user}","gists_url":"https://api.github.com/users/dougmoscrop/gists{/gist_id}","starred_url":"https://api.github.com/users/dougmoscrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougmoscrop/subscriptions","organizations_url":"https://api.github.com/users/dougmoscrop/orgs","repos_url":"https://api.github.com/users/dougmoscrop/repos","events_url":"https://api.github.com/users/dougmoscrop/events{/privacy}","received_events_url":"https://api.github.com/users/dougmoscrop/received_events","type":"User","site_admin":false},"labels":[{"id":485438073,"url":"https://api.github.com/repos/serverless/serverless/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/serverless/serverless/milestones/20","html_url":"https://github.com/serverless/serverless/milestones/1.5","labels_url":"https://api.github.com/repos/serverless/serverless/milestones/20/labels","id":2175550,"number":20,"title":"1.5","description":"","creator":{"login":"mthenw","id":455261,"avatar_url":"https://avatars.githubusercontent.com/u/455261?v=3","gravatar_id":"","url":"https://api.github.com/users/mthenw","html_url":"https://github.com/mthenw","followers_url":"https://api.github.com/users/mthenw/followers","following_url":"https://api.github.com/users/mthenw/following{/other_user}","gists_url":"https://api.github.com/users/mthenw/gists{/gist_id}","starred_url":"https://api.github.com/users/mthenw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mthenw/subscriptions","organizations_url":"https://api.github.com/users/mthenw/orgs","repos_url":"https://api.github.com/users/mthenw/repos","events_url":"https://api.github.com/users/mthenw/events{/privacy}","received_events_url":"https://api.github.com/users/mthenw/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2016-12-05T11:11:22Z","updated_at":"2016-12-05T11:59:46Z","due_on":"2016-12-28T00:00:00Z","closed_at":null},"comments":6,"created_at":"2016-11-29T15:32:42Z","updated_at":"2016-12-06T06:30:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/serverless/serverless/pulls/2821","html_url":"https://github.com/serverless/serverless/pull/2821","diff_url":"https://github.com/serverless/serverless/pull/2821.diff","patch_url":"https://github.com/serverless/serverless/pull/2821.patch"},"body":"## What did you implement:\r\n\r\nCloses #1260\r\n\r\nThis adds a `visualize` command, via a Visualize plugin, which supports 1 subcommand currently:\r\n\r\n`sls visualize plugins -c <command name>`\r\n\r\n## How did you implement it:\r\n\r\nA slight modification to PluginManager to expose hooks, and using `archy` which is what npm uses (last I checked) to perform `npm ls`.\r\n\r\n## How can we verify it:\r\n\r\nGo to a project, any project. If you do `sls help`, you should see `Visualize` in the list of plugins.\r\n\r\nNow try something, such as `sls visualize plugins -c deploy`. If you want to visualize a subcommand, you must use quotes: `sls visualize plugins -c \"deploy function\"`\r\n\r\nHere's a screenshot. I mostly guessed at colours:\r\n\r\n<img width=\"323\" alt=\"screen shot 2016-11-29 at 10 29 54 am\" src=\"https://cloud.githubusercontent.com/assets/586516/20715991/e2cbc9f2-b61e-11e6-93c5-6cf9c4d949b9.png\">\r\n\r\nAt the end of the screenshot you can see a best practice, [if the hook is done using a bound function](https://github.com/serverless/serverless/blob/master/lib/plugins/aws/deploy/compile/functions/index.js#L14), I can display the function name within the plugin. Otherwise I just write `<function>`.\r\n\r\n## Todos:\r\n\r\n- [ ] Write tests\r\n- [ ] Write documentation\r\n- [x] Fix linting errors\r\n- [ ] Make sure code coverage hasn't dropped\r\n- [x] Provide verification config/commands/resources\r\n- [x] Enable [\"Allow edits from maintainers\"](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) for this PR\r\n- [ ] Change ready for review message below\r\n\r\n\r\n\r\n***Is this ready for review?:*** NO\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/265072125","html_url":"https://github.com/serverless/serverless/pull/2821#issuecomment-265072125","issue_url":"https://api.github.com/repos/serverless/serverless/issues/2821","id":265072125,"user":{"login":"pmuens","id":1606004,"avatar_url":"https://avatars.githubusercontent.com/u/1606004?v=3","gravatar_id":"","url":"https://api.github.com/users/pmuens","html_url":"https://github.com/pmuens","followers_url":"https://api.github.com/users/pmuens/followers","following_url":"https://api.github.com/users/pmuens/following{/other_user}","gists_url":"https://api.github.com/users/pmuens/gists{/gist_id}","starred_url":"https://api.github.com/users/pmuens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmuens/subscriptions","organizations_url":"https://api.github.com/users/pmuens/orgs","repos_url":"https://api.github.com/users/pmuens/repos","events_url":"https://api.github.com/users/pmuens/events{/privacy}","received_events_url":"https://api.github.com/users/pmuens/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T06:30:51Z","updated_at":"2016-12-06T06:30:51Z","body":"@dougmoscrop thanks for the answer.\r\n\r\nCould you please wait a little bit with the fix? We'll discuss this issue (and others as well) today and could give you an in-depth answer about this soon."}}
{"actor":{"display_login":"pmuens"}}