{"action":"created","comment":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments/43245081","id":43245081,"diff_hunk":"@@ -0,0 +1,89 @@\n+///<reference path=\"../../.d.ts\"/>\n+\"use strict\";\n+\n+import helpers = require(\"../../common/helpers\");\n+import * as net from \"net\";\n+import * as iOSProxyServices from \"../../common/mobile/ios/ios-proxy-services\";\n+\n+let InspectorBackendPort = 18181;\n+\n+export class IOSSocketRequestExecutor implements IiOSSocketRequestExecutor {\n+\tconstructor(private $errors: IErrors,\n+\t\tprivate $injector: IInjector,\n+\t\tprivate $iOSNotification: IiOSNotification,\n+\t\tprivate $iOSNotificationService: IiOSNotificationService,\n+\t\tprivate $logger: ILogger,\n+\t\tprivate $projectData: IProjectData,\n+\t\tprivate $socketProxyFactory: ISocketProxyFactory) { }\n+\n+\tpublic executeAttachRequest(socketActions: ISocketActions, timeout: number, device: Mobile.IiOSDevice): IFuture<void> {\n+\t\treturn (() => {\n+\t\t\tlet npc = new iOSProxyServices.NotificationProxyClient(device, this.$injector);\n+\n+\t\t\tlet [alreadyConnected, readyForAttach, attachAvailable] = [this.$iOSNotification.alreadyConnected, this.$iOSNotification.readyForAttach, this.$iOSNotification.attachAvailable]\n+\t\t\t\t.map((notification) => this.$iOSNotificationService.awaitNotification(npc, notification, timeout));\n+\n+\t\t\tnpc.postNotificationAndAttachForData(this.$iOSNotification.attachAvailabilityQuery);\n+\n+\t\t\tlet receivedNotification: IFuture<string>;\n+\t\t\ttry {\n+\t\t\t\treceivedNotification = helpers.whenAny<string>(alreadyConnected, readyForAttach, attachAvailable).wait();","path":"lib/device-sockets/ios/socket-request-executor.ts","position":30,"original_position":30,"commit_id":"52f987f1bc48893d83e5d6f12f38ab6053f1ce7b","original_commit_id":"52f987f1bc48893d83e5d6f12f38ab6053f1ce7b","user":{"login":"ligaz","id":19437,"avatar_url":"https://avatars.githubusercontent.com/u/19437?v=3","gravatar_id":"","url":"https://api.github.com/users/ligaz","html_url":"https://github.com/ligaz","followers_url":"https://api.github.com/users/ligaz/followers","following_url":"https://api.github.com/users/ligaz/following{/other_user}","gists_url":"https://api.github.com/users/ligaz/gists{/gist_id}","starred_url":"https://api.github.com/users/ligaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ligaz/subscriptions","organizations_url":"https://api.github.com/users/ligaz/orgs","repos_url":"https://api.github.com/users/ligaz/repos","events_url":"https://api.github.com/users/ligaz/events{/privacy}","received_events_url":"https://api.github.com/users/ligaz/received_events","type":"User","site_admin":false},"body":"Is the generic argument necessary here?","created_at":"2015-10-28T11:46:54Z","updated_at":"2015-10-28T11:46:54Z","html_url":"https://github.com/NativeScript/nativescript-cli/pull/1107#discussion_r43245081","pull_request_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107","_links":{"self":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments/43245081"},"html":{"href":"https://github.com/NativeScript/nativescript-cli/pull/1107#discussion_r43245081"},"pull_request":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107"}}},"pull_request":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107","id":48839096,"html_url":"https://github.com/NativeScript/nativescript-cli/pull/1107","diff_url":"https://github.com/NativeScript/nativescript-cli/pull/1107.diff","patch_url":"https://github.com/NativeScript/nativescript-cli/pull/1107.patch","issue_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1107","number":1107,"state":"open","locked":false,"title":"Send page reload message to iOS runtime","user":{"login":"Fatme","id":760518,"avatar_url":"https://avatars.githubusercontent.com/u/760518?v=3","gravatar_id":"","url":"https://api.github.com/users/Fatme","html_url":"https://github.com/Fatme","followers_url":"https://api.github.com/users/Fatme/followers","following_url":"https://api.github.com/users/Fatme/following{/other_user}","gists_url":"https://api.github.com/users/Fatme/gists{/gist_id}","starred_url":"https://api.github.com/users/Fatme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fatme/subscriptions","organizations_url":"https://api.github.com/users/Fatme/orgs","repos_url":"https://api.github.com/users/Fatme/repos","events_url":"https://api.github.com/users/Fatme/events{/privacy}","received_events_url":"https://api.github.com/users/Fatme/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-27T08:08:16Z","updated_at":"2015-10-28T11:46:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20b3f4974ab510689d1ffb36dc726ea3ae80c2f5","assignee":null,"milestone":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/milestones/25","html_url":"https://github.com/NativeScript/nativescript-cli/milestones/1.5.0","labels_url":"https://api.github.com/repos/NativeScript/nativescript-cli/milestones/25/labels","id":1310062,"number":25,"title":"1.5.0","description":"","creator":{"login":"ligaz","id":19437,"avatar_url":"https://avatars.githubusercontent.com/u/19437?v=3","gravatar_id":"","url":"https://api.github.com/users/ligaz","html_url":"https://github.com/ligaz","followers_url":"https://api.github.com/users/ligaz/followers","following_url":"https://api.github.com/users/ligaz/following{/other_user}","gists_url":"https://api.github.com/users/ligaz/gists{/gist_id}","starred_url":"https://api.github.com/users/ligaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ligaz/subscriptions","organizations_url":"https://api.github.com/users/ligaz/orgs","repos_url":"https://api.github.com/users/ligaz/repos","events_url":"https://api.github.com/users/ligaz/events{/privacy}","received_events_url":"https://api.github.com/users/ligaz/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":19,"state":"open","created_at":"2015-09-17T10:08:29Z","updated_at":"2015-10-28T11:38:40Z","due_on":"2015-11-29T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107/commits","review_comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107/comments","review_comment_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1107/comments","statuses_url":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/52f987f1bc48893d83e5d6f12f38ab6053f1ce7b","head":{"label":"NativeScript:fatme/page-reload","ref":"fatme/page-reload","sha":"52f987f1bc48893d83e5d6f12f38ab6053f1ce7b","user":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":21347346,"name":"nativescript-cli","full_name":"NativeScript/nativescript-cli","owner":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NativeScript/nativescript-cli","description":"Command-line interface for building NativeScript apps","fork":false,"url":"https://api.github.com/repos/NativeScript/nativescript-cli","forks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/forks","keys_url":"https://api.github.com/repos/NativeScript/nativescript-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/nativescript-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/nativescript-cli/teams","hooks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/events","assignees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/nativescript-cli/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/tags","blobs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/nativescript-cli/languages","stargazers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscription","commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/nativescript-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/nativescript-cli/merges","archive_url":"https://api.github.com/repos/NativeScript/nativescript-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/nativescript-cli/downloads","issues_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/nativescript-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/nativescript-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/nativescript-cli/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/nativescript-cli/releases{/id}","created_at":"2014-06-30T10:21:20Z","updated_at":"2015-10-28T04:20:04Z","pushed_at":"2015-10-28T11:44:01Z","git_url":"git://github.com/NativeScript/nativescript-cli.git","ssh_url":"git@github.com:NativeScript/nativescript-cli.git","clone_url":"https://github.com/NativeScript/nativescript-cli.git","svn_url":"https://github.com/NativeScript/nativescript-cli","homepage":"https://www.npmjs.com/package/nativescript","size":41220,"stargazers_count":320,"watchers_count":320,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":118,"forks":55,"open_issues":118,"watchers":320,"default_branch":"master"}},"base":{"label":"NativeScript:master","ref":"master","sha":"d5d3c99b5e3b5230cc74c6b7e28d76cd8a989e04","user":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":21347346,"name":"nativescript-cli","full_name":"NativeScript/nativescript-cli","owner":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NativeScript/nativescript-cli","description":"Command-line interface for building NativeScript apps","fork":false,"url":"https://api.github.com/repos/NativeScript/nativescript-cli","forks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/forks","keys_url":"https://api.github.com/repos/NativeScript/nativescript-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/nativescript-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/nativescript-cli/teams","hooks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/events","assignees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/nativescript-cli/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/tags","blobs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/nativescript-cli/languages","stargazers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscription","commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/nativescript-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/nativescript-cli/merges","archive_url":"https://api.github.com/repos/NativeScript/nativescript-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/nativescript-cli/downloads","issues_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/nativescript-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/nativescript-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/nativescript-cli/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/nativescript-cli/releases{/id}","created_at":"2014-06-30T10:21:20Z","updated_at":"2015-10-28T04:20:04Z","pushed_at":"2015-10-28T11:44:01Z","git_url":"git://github.com/NativeScript/nativescript-cli.git","ssh_url":"git@github.com:NativeScript/nativescript-cli.git","clone_url":"https://github.com/NativeScript/nativescript-cli.git","svn_url":"https://github.com/NativeScript/nativescript-cli","homepage":"https://www.npmjs.com/package/nativescript","size":41220,"stargazers_count":320,"watchers_count":320,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":118,"forks":55,"open_issues":118,"watchers":320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107"},"html":{"href":"https://github.com/NativeScript/nativescript-cli/pull/1107"},"issue":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1107"},"comments":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1107/comments"},"review_comments":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107/comments"},"review_comment":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1107/commits"},"statuses":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/52f987f1bc48893d83e5d6f12f38ab6053f1ce7b"}}}}