{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/68","repository_url":"https://api.github.com/repos/aspnet/JavaScriptServices","labels_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/68/comments","events_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/68/events","html_url":"https://github.com/aspnet/JavaScriptServices/issues/68","id":153882476,"number":68,"title":"Add prerender pipeline hooks for better extensibility","user":{"login":"laskoviymishka","id":2754361,"avatar_url":"https://avatars.githubusercontent.com/u/2754361?v=3","gravatar_id":"","url":"https://api.github.com/users/laskoviymishka","html_url":"https://github.com/laskoviymishka","followers_url":"https://api.github.com/users/laskoviymishka/followers","following_url":"https://api.github.com/users/laskoviymishka/following{/other_user}","gists_url":"https://api.github.com/users/laskoviymishka/gists{/gist_id}","starred_url":"https://api.github.com/users/laskoviymishka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laskoviymishka/subscriptions","organizations_url":"https://api.github.com/users/laskoviymishka/orgs","repos_url":"https://api.github.com/users/laskoviymishka/repos","events_url":"https://api.github.com/users/laskoviymishka/events{/privacy}","received_events_url":"https://api.github.com/users/laskoviymishka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-09T22:15:41Z","updated_at":"2016-06-14T10:02:36Z","closed_at":null,"body":"This need some design, so i address it to @SteveSandersonMS, if you good with such approach i could implement this.\r\nSo for better extensability it will be realy nice to have some pipeline injects to manage some additional variables passing from asp.net server directly to server JS (like some auth info beside cookie, or may be initial state of Redux store, so we don't have to grab it from web api via additional http requests).\r\nFor example there is could be some `PrerenderOptions` class which could be extended via calling `AddPrerender` method in `ConfigureServices` method of application startup class. This method just register some hepler interface to run prerender manually and setup prerender opions.\r\nThis options could be something like\r\n```\r\n public class PrerenderOptions\r\n {\r\n        public Action<Request, NodeInvocationInfo> BeforeRenderModule{ get; set; }\r\n\r\n        public NodeServicesOptions() {\r\n            this.HostingModel = _ => { };\r\n        }\r\n }\r\n```\r\n\r\nInside on `NodeInvocationInfo` options already `Args[]` property which passing directly to the JS Module invocation, so we could push anything to our JS code from server via this hook.\r\n\r\nThis is kinda realted to issue #66 (both require prerry much same refactoring, to establish clearer pipeline for prerendering process)."},"comment":{"url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/comments/225836226","html_url":"https://github.com/aspnet/JavaScriptServices/issues/68#issuecomment-225836226","issue_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/68","id":225836226,"user":{"login":"SteveSandersonMS","id":1101362,"avatar_url":"https://avatars.githubusercontent.com/u/1101362?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveSandersonMS","html_url":"https://github.com/SteveSandersonMS","followers_url":"https://api.github.com/users/SteveSandersonMS/followers","following_url":"https://api.github.com/users/SteveSandersonMS/following{/other_user}","gists_url":"https://api.github.com/users/SteveSandersonMS/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveSandersonMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveSandersonMS/subscriptions","organizations_url":"https://api.github.com/users/SteveSandersonMS/orgs","repos_url":"https://api.github.com/users/SteveSandersonMS/repos","events_url":"https://api.github.com/users/SteveSandersonMS/events{/privacy}","received_events_url":"https://api.github.com/users/SteveSandersonMS/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T10:02:35Z","updated_at":"2016-06-14T10:02:35Z","body":"> it will be realy nice to have some pipeline injects to manage some additional variables passing from asp.net server directly to server JS (like some auth info beside cookie, or may be initial state of Redux store, so we don't have to grab it from web api via additional http requests)\r\n\r\nTotally agree. It seems to me that your `asp-prerender-model` proposal would cover this requirement. You could use that to pass any information you wanted into your server-side boot function.\r\n\r\nWould that be sufficient? I'm hoping we don't need to introduce anything more complex than that, because there are already a lot of unfamiliar wiring concepts that developers have to deal with here."}}
{"actor":{"display_login":"SteveSandersonMS"}}