{"action":"created","comment":{"url":"https://api.github.com/repos/appium/appium-ios-device/pulls/comments/304845194","pull_request_review_id":263564166,"id":304845194,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNDg0NTE5NA==","diff_hunk":"@@ -0,0 +1,116 @@\n+/* eslint-disable promise/prefer-await-to-callbacks */\n+import LengthBasedSplitter from '../util/transformer/length-based-splitter';\n+import { Operations, operationCode, Errors, errorCode } from './protocol';\n+import AfcEncoder from './transformer/afcencoder';\n+import AfcDecoder from './transformer/afcdecoder';\n+import B from 'bluebird';\n+\n+const AFC_SERVICE_NAME = 'com.apple.afc';\n+\n+const NULL_DELIMETER_CODE = 0x00;\n+\n+class AfcService {\n+\n+  constructor (socketClient) {\n+    this._socketClient = socketClient;\n+    this._splitter = new LengthBasedSplitter(true, 1000000, 8, 8, -8);\n+    this._decoder = new AfcDecoder();\n+    this._socketClient.pipe(this._splitter).pipe(this._decoder);\n+\n+    this._encoder = new AfcEncoder();\n+    this._encoder.pipe(this._socketClient);\n+\n+    this._responseCallbacks = {};\n+\n+    this._packetNumber = 0;\n+    this._decoder.on('data', this.handleData.bind(this));\n+  }\n+\n+  handleData (data) {\n+    const cb = this._responseCallbacks[data.packetNumber];\n+    if (!cb) {","path":"lib/afc/index.js","position":31,"original_position":31,"commit_id":"4823dba777aa04e59360aa447aa823082c07804b","original_commit_id":"4823dba777aa04e59360aa447aa823082c07804b","user":{"login":"mykola-mokhnach","id":7767781,"node_id":"MDQ6VXNlcjc3Njc3ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7767781?v=4","gravatar_id":"","url":"https://api.github.com/users/mykola-mokhnach","html_url":"https://github.com/mykola-mokhnach","followers_url":"https://api.github.com/users/mykola-mokhnach/followers","following_url":"https://api.github.com/users/mykola-mokhnach/following{/other_user}","gists_url":"https://api.github.com/users/mykola-mokhnach/gists{/gist_id}","starred_url":"https://api.github.com/users/mykola-mokhnach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykola-mokhnach/subscriptions","organizations_url":"https://api.github.com/users/mykola-mokhnach/orgs","repos_url":"https://api.github.com/users/mykola-mokhnach/repos","events_url":"https://api.github.com/users/mykola-mokhnach/events{/privacy}","received_events_url":"https://api.github.com/users/mykola-mokhnach/received_events","type":"User","site_admin":false},"body":"if !_.isFunction(cb) ?","created_at":"2019-07-18T10:25:34Z","updated_at":"2019-07-18T10:25:34Z","html_url":"https://github.com/appium/appium-ios-device/pull/29#discussion_r304845194","pull_request_url":"https://api.github.com/repos/appium/appium-ios-device/pulls/29","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/appium/appium-ios-device/pulls/comments/304845194"},"html":{"href":"https://github.com/appium/appium-ios-device/pull/29#discussion_r304845194"},"pull_request":{"href":"https://api.github.com/repos/appium/appium-ios-device/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/appium/appium-ios-device/pulls/29","id":298785298,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk4Nzg1Mjk4","html_url":"https://github.com/appium/appium-ios-device/pull/29","diff_url":"https://github.com/appium/appium-ios-device/pull/29.diff","patch_url":"https://github.com/appium/appium-ios-device/pull/29.patch","issue_url":"https://api.github.com/repos/appium/appium-ios-device/issues/29","number":29,"state":"open","locked":false,"title":"feat: add afc support for future installation operation","user":{"login":"umutuzgur","id":5844182,"node_id":"MDQ6VXNlcjU4NDQxODI=","avatar_url":"https://avatars2.githubusercontent.com/u/5844182?v=4","gravatar_id":"","url":"https://api.github.com/users/umutuzgur","html_url":"https://github.com/umutuzgur","followers_url":"https://api.github.com/users/umutuzgur/followers","following_url":"https://api.github.com/users/umutuzgur/following{/other_user}","gists_url":"https://api.github.com/users/umutuzgur/gists{/gist_id}","starred_url":"https://api.github.com/users/umutuzgur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umutuzgur/subscriptions","organizations_url":"https://api.github.com/users/umutuzgur/orgs","repos_url":"https://api.github.com/users/umutuzgur/repos","events_url":"https://api.github.com/users/umutuzgur/events{/privacy}","received_events_url":"https://api.github.com/users/umutuzgur/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-07-18T07:21:47Z","updated_at":"2019-07-18T10:25:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80abcb86331e84db834e11c26b0713b844345529","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/appium/appium-ios-device/pulls/29/commits","review_comments_url":"https://api.github.com/repos/appium/appium-ios-device/pulls/29/comments","review_comment_url":"https://api.github.com/repos/appium/appium-ios-device/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appium/appium-ios-device/issues/29/comments","statuses_url":"https://api.github.com/repos/appium/appium-ios-device/statuses/4823dba777aa04e59360aa447aa823082c07804b","head":{"label":"appium:afc","ref":"afc","sha":"4823dba777aa04e59360aa447aa823082c07804b","user":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":190578265,"node_id":"MDEwOlJlcG9zaXRvcnkxOTA1NzgyNjU=","name":"appium-ios-device","full_name":"appium/appium-ios-device","private":false,"owner":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/appium/appium-ios-device","description":"Tools for interacting with iOS devices","fork":false,"url":"https://api.github.com/repos/appium/appium-ios-device","forks_url":"https://api.github.com/repos/appium/appium-ios-device/forks","keys_url":"https://api.github.com/repos/appium/appium-ios-device/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/appium-ios-device/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/appium-ios-device/teams","hooks_url":"https://api.github.com/repos/appium/appium-ios-device/hooks","issue_events_url":"https://api.github.com/repos/appium/appium-ios-device/issues/events{/number}","events_url":"https://api.github.com/repos/appium/appium-ios-device/events","assignees_url":"https://api.github.com/repos/appium/appium-ios-device/assignees{/user}","branches_url":"https://api.github.com/repos/appium/appium-ios-device/branches{/branch}","tags_url":"https://api.github.com/repos/appium/appium-ios-device/tags","blobs_url":"https://api.github.com/repos/appium/appium-ios-device/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/appium-ios-device/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/appium-ios-device/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/appium-ios-device/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/appium-ios-device/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/appium-ios-device/languages","stargazers_url":"https://api.github.com/repos/appium/appium-ios-device/stargazers","contributors_url":"https://api.github.com/repos/appium/appium-ios-device/contributors","subscribers_url":"https://api.github.com/repos/appium/appium-ios-device/subscribers","subscription_url":"https://api.github.com/repos/appium/appium-ios-device/subscription","commits_url":"https://api.github.com/repos/appium/appium-ios-device/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/appium-ios-device/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/appium-ios-device/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/appium-ios-device/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/appium-ios-device/contents/{+path}","compare_url":"https://api.github.com/repos/appium/appium-ios-device/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/appium-ios-device/merges","archive_url":"https://api.github.com/repos/appium/appium-ios-device/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/appium-ios-device/downloads","issues_url":"https://api.github.com/repos/appium/appium-ios-device/issues{/number}","pulls_url":"https://api.github.com/repos/appium/appium-ios-device/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/appium-ios-device/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/appium-ios-device/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/appium-ios-device/labels{/name}","releases_url":"https://api.github.com/repos/appium/appium-ios-device/releases{/id}","deployments_url":"https://api.github.com/repos/appium/appium-ios-device/deployments","created_at":"2019-06-06T12:34:09Z","updated_at":"2019-07-15T10:22:10Z","pushed_at":"2019-07-18T09:32:12Z","git_url":"git://github.com/appium/appium-ios-device.git","ssh_url":"git@github.com:appium/appium-ios-device.git","clone_url":"https://github.com/appium/appium-ios-device.git","svn_url":"https://github.com/appium/appium-ios-device","homepage":null,"size":82,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"appium:master","ref":"master","sha":"914e60805724246ae6d83c32ce9a965d7fabca4c","user":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":190578265,"node_id":"MDEwOlJlcG9zaXRvcnkxOTA1NzgyNjU=","name":"appium-ios-device","full_name":"appium/appium-ios-device","private":false,"owner":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/appium/appium-ios-device","description":"Tools for interacting with iOS devices","fork":false,"url":"https://api.github.com/repos/appium/appium-ios-device","forks_url":"https://api.github.com/repos/appium/appium-ios-device/forks","keys_url":"https://api.github.com/repos/appium/appium-ios-device/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/appium-ios-device/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/appium-ios-device/teams","hooks_url":"https://api.github.com/repos/appium/appium-ios-device/hooks","issue_events_url":"https://api.github.com/repos/appium/appium-ios-device/issues/events{/number}","events_url":"https://api.github.com/repos/appium/appium-ios-device/events","assignees_url":"https://api.github.com/repos/appium/appium-ios-device/assignees{/user}","branches_url":"https://api.github.com/repos/appium/appium-ios-device/branches{/branch}","tags_url":"https://api.github.com/repos/appium/appium-ios-device/tags","blobs_url":"https://api.github.com/repos/appium/appium-ios-device/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/appium-ios-device/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/appium-ios-device/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/appium-ios-device/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/appium-ios-device/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/appium-ios-device/languages","stargazers_url":"https://api.github.com/repos/appium/appium-ios-device/stargazers","contributors_url":"https://api.github.com/repos/appium/appium-ios-device/contributors","subscribers_url":"https://api.github.com/repos/appium/appium-ios-device/subscribers","subscription_url":"https://api.github.com/repos/appium/appium-ios-device/subscription","commits_url":"https://api.github.com/repos/appium/appium-ios-device/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/appium-ios-device/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/appium-ios-device/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/appium-ios-device/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/appium-ios-device/contents/{+path}","compare_url":"https://api.github.com/repos/appium/appium-ios-device/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/appium-ios-device/merges","archive_url":"https://api.github.com/repos/appium/appium-ios-device/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/appium-ios-device/downloads","issues_url":"https://api.github.com/repos/appium/appium-ios-device/issues{/number}","pulls_url":"https://api.github.com/repos/appium/appium-ios-device/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/appium-ios-device/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/appium-ios-device/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/appium-ios-device/labels{/name}","releases_url":"https://api.github.com/repos/appium/appium-ios-device/releases{/id}","deployments_url":"https://api.github.com/repos/appium/appium-ios-device/deployments","created_at":"2019-06-06T12:34:09Z","updated_at":"2019-07-15T10:22:10Z","pushed_at":"2019-07-18T09:32:12Z","git_url":"git://github.com/appium/appium-ios-device.git","ssh_url":"git@github.com:appium/appium-ios-device.git","clone_url":"https://github.com/appium/appium-ios-device.git","svn_url":"https://github.com/appium/appium-ios-device","homepage":null,"size":82,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appium/appium-ios-device/pulls/29"},"html":{"href":"https://github.com/appium/appium-ios-device/pull/29"},"issue":{"href":"https://api.github.com/repos/appium/appium-ios-device/issues/29"},"comments":{"href":"https://api.github.com/repos/appium/appium-ios-device/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/appium/appium-ios-device/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/appium/appium-ios-device/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appium/appium-ios-device/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/appium/appium-ios-device/statuses/4823dba777aa04e59360aa447aa823082c07804b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mykola-mokhnach"}}