{"action":"closed","number":26,"pull_request":{"url":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/26","id":318462032,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE4NDYyMDMy","html_url":"https://github.com/bitfocus/companion-module-atem/pull/26","diff_url":"https://github.com/bitfocus/companion-module-atem/pull/26.diff","patch_url":"https://github.com/bitfocus/companion-module-atem/pull/26.patch","issue_url":"https://api.github.com/repos/bitfocus/companion-module-atem/issues/26","number":26,"state":"closed","locked":false,"title":"Typescript and refactoring","user":{"login":"Julusian","id":1327476,"node_id":"MDQ6VXNlcjEzMjc0NzY=","avatar_url":"https://avatars0.githubusercontent.com/u/1327476?v=4","gravatar_id":"","url":"https://api.github.com/users/Julusian","html_url":"https://github.com/Julusian","followers_url":"https://api.github.com/users/Julusian/followers","following_url":"https://api.github.com/users/Julusian/following{/other_user}","gists_url":"https://api.github.com/users/Julusian/gists{/gist_id}","starred_url":"https://api.github.com/users/Julusian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Julusian/subscriptions","organizations_url":"https://api.github.com/users/Julusian/orgs","repos_url":"https://api.github.com/users/Julusian/repos","events_url":"https://api.github.com/users/Julusian/events{/privacy}","received_events_url":"https://api.github.com/users/Julusian/received_events","type":"User","site_admin":false},"body":"This is a refactor of the module to be written in typescript. This brings some better type safety within the module and should make it easier to make small changes with certainty of not breaking anything, and ensure nothing is missed.\r\n\r\nAs an example, one advantage here is that the feedback and actions systems use enums now. If someone tries to use a feedback id that is not in that enum the compiler will complain. This is also true if it is not included in the handlers, as there is a check to ensure all values are handled in the switch cases.\r\n\r\nIt is a bit of a hack as companion core doesnt have typescript definitions, so it doesnt play nicely, but I shall try and get them to support typescript in modules to make this cleaner and easier. \r\n\r\nAs part of this, I have gone through and tested every action, feedback and preset against my 2ME running 8.0.1, and everything is working nicely. Additionally, I tested most of it against a constellation running in both HD and 8K modes.\r\n\r\nOther improvements:\r\n* Better handling of unknown models. Try and parse out the various fields from the state.\r\n* Remove the internal state tracking, and use the state object created by atem-connection directly.\r\n* Improve source/macro names in the dropdowns. Use the names from the device if possible.\r\n* Use less hardcoded arrays of options when possible\r\n* Split code into shorter files, to make it easier to browse and find bits\r\n\r\nLeft to do:\r\n- [x] Remaining Constellation support #21\r\n- [x] Update atem-connection to release version\r\n- [x] Update readme for new workflow\r\n- [x] Dont commit dist folder\r\n- [x] Verify the postinstall script works for ci builds etc\r\n- [x] #15 \r\n- [x] #18\r\n- [x] #19\r\n- [x] #23\r\n- [x] #24\r\n- [x] #25\r\n\r\n","created_at":"2019-09-17T18:10:43Z","updated_at":"2019-09-29T14:14:02Z","closed_at":"2019-09-29T14:14:02Z","merged_at":"2019-09-29T14:14:01Z","merge_commit_sha":"3afea89a1b1394d609ee317009aafe14b589eb74","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/26/commits","review_comments_url":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/26/comments","review_comment_url":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitfocus/companion-module-atem/issues/26/comments","statuses_url":"https://api.github.com/repos/bitfocus/companion-module-atem/statuses/4941b5666dfb784690b4d345cffa45cc37e80f86","head":{"label":"Julusian:feat/typescript","ref":"feat/typescript","sha":"4941b5666dfb784690b4d345cffa45cc37e80f86","user":{"login":"Julusian","id":1327476,"node_id":"MDQ6VXNlcjEzMjc0NzY=","avatar_url":"https://avatars0.githubusercontent.com/u/1327476?v=4","gravatar_id":"","url":"https://api.github.com/users/Julusian","html_url":"https://github.com/Julusian","followers_url":"https://api.github.com/users/Julusian/followers","following_url":"https://api.github.com/users/Julusian/following{/other_user}","gists_url":"https://api.github.com/users/Julusian/gists{/gist_id}","starred_url":"https://api.github.com/users/Julusian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Julusian/subscriptions","organizations_url":"https://api.github.com/users/Julusian/orgs","repos_url":"https://api.github.com/users/Julusian/repos","events_url":"https://api.github.com/users/Julusian/events{/privacy}","received_events_url":"https://api.github.com/users/Julusian/received_events","type":"User","site_admin":false},"repo":{"id":209089830,"node_id":"MDEwOlJlcG9zaXRvcnkyMDkwODk4MzA=","name":"companion-module-atem","full_name":"Julusian/companion-module-atem","private":false,"owner":{"login":"Julusian","id":1327476,"node_id":"MDQ6VXNlcjEzMjc0NzY=","avatar_url":"https://avatars0.githubusercontent.com/u/1327476?v=4","gravatar_id":"","url":"https://api.github.com/users/Julusian","html_url":"https://github.com/Julusian","followers_url":"https://api.github.com/users/Julusian/followers","following_url":"https://api.github.com/users/Julusian/following{/other_user}","gists_url":"https://api.github.com/users/Julusian/gists{/gist_id}","starred_url":"https://api.github.com/users/Julusian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Julusian/subscriptions","organizations_url":"https://api.github.com/users/Julusian/orgs","repos_url":"https://api.github.com/users/Julusian/repos","events_url":"https://api.github.com/users/Julusian/events{/privacy}","received_events_url":"https://api.github.com/users/Julusian/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Julusian/companion-module-atem","description":null,"fork":true,"url":"https://api.github.com/repos/Julusian/companion-module-atem","forks_url":"https://api.github.com/repos/Julusian/companion-module-atem/forks","keys_url":"https://api.github.com/repos/Julusian/companion-module-atem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Julusian/companion-module-atem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Julusian/companion-module-atem/teams","hooks_url":"https://api.github.com/repos/Julusian/companion-module-atem/hooks","issue_events_url":"https://api.github.com/repos/Julusian/companion-module-atem/issues/events{/number}","events_url":"https://api.github.com/repos/Julusian/companion-module-atem/events","assignees_url":"https://api.github.com/repos/Julusian/companion-module-atem/assignees{/user}","branches_url":"https://api.github.com/repos/Julusian/companion-module-atem/branches{/branch}","tags_url":"https://api.github.com/repos/Julusian/companion-module-atem/tags","blobs_url":"https://api.github.com/repos/Julusian/companion-module-atem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Julusian/companion-module-atem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Julusian/companion-module-atem/git/refs{/sha}","trees_url":"https://api.github.com/repos/Julusian/companion-module-atem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Julusian/companion-module-atem/statuses/{sha}","languages_url":"https://api.github.com/repos/Julusian/companion-module-atem/languages","stargazers_url":"https://api.github.com/repos/Julusian/companion-module-atem/stargazers","contributors_url":"https://api.github.com/repos/Julusian/companion-module-atem/contributors","subscribers_url":"https://api.github.com/repos/Julusian/companion-module-atem/subscribers","subscription_url":"https://api.github.com/repos/Julusian/companion-module-atem/subscription","commits_url":"https://api.github.com/repos/Julusian/companion-module-atem/commits{/sha}","git_commits_url":"https://api.github.com/repos/Julusian/companion-module-atem/git/commits{/sha}","comments_url":"https://api.github.com/repos/Julusian/companion-module-atem/comments{/number}","issue_comment_url":"https://api.github.com/repos/Julusian/companion-module-atem/issues/comments{/number}","contents_url":"https://api.github.com/repos/Julusian/companion-module-atem/contents/{+path}","compare_url":"https://api.github.com/repos/Julusian/companion-module-atem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Julusian/companion-module-atem/merges","archive_url":"https://api.github.com/repos/Julusian/companion-module-atem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Julusian/companion-module-atem/downloads","issues_url":"https://api.github.com/repos/Julusian/companion-module-atem/issues{/number}","pulls_url":"https://api.github.com/repos/Julusian/companion-module-atem/pulls{/number}","milestones_url":"https://api.github.com/repos/Julusian/companion-module-atem/milestones{/number}","notifications_url":"https://api.github.com/repos/Julusian/companion-module-atem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Julusian/companion-module-atem/labels{/name}","releases_url":"https://api.github.com/repos/Julusian/companion-module-atem/releases{/id}","deployments_url":"https://api.github.com/repos/Julusian/companion-module-atem/deployments","created_at":"2019-09-17T15:24:33Z","updated_at":"2019-09-17T15:24:34Z","pushed_at":"2019-09-29T12:29:25Z","git_url":"git://github.com/Julusian/companion-module-atem.git","ssh_url":"git@github.com:Julusian/companion-module-atem.git","clone_url":"https://github.com/Julusian/companion-module-atem.git","svn_url":"https://github.com/Julusian/companion-module-atem","homepage":null,"size":193,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitfocus:master","ref":"master","sha":"d29d0cd33a262ca479eafd93bdaf334ddb3ce84c","user":{"login":"bitfocus","id":38660786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjYwNzg2","avatar_url":"https://avatars3.githubusercontent.com/u/38660786?v=4","gravatar_id":"","url":"https://api.github.com/users/bitfocus","html_url":"https://github.com/bitfocus","followers_url":"https://api.github.com/users/bitfocus/followers","following_url":"https://api.github.com/users/bitfocus/following{/other_user}","gists_url":"https://api.github.com/users/bitfocus/gists{/gist_id}","starred_url":"https://api.github.com/users/bitfocus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitfocus/subscriptions","organizations_url":"https://api.github.com/users/bitfocus/orgs","repos_url":"https://api.github.com/users/bitfocus/repos","events_url":"https://api.github.com/users/bitfocus/events{/privacy}","received_events_url":"https://api.github.com/users/bitfocus/received_events","type":"Organization","site_admin":false},"repo":{"id":137803276,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc4MDMyNzY=","name":"companion-module-atem","full_name":"bitfocus/companion-module-atem","private":false,"owner":{"login":"bitfocus","id":38660786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjYwNzg2","avatar_url":"https://avatars3.githubusercontent.com/u/38660786?v=4","gravatar_id":"","url":"https://api.github.com/users/bitfocus","html_url":"https://github.com/bitfocus","followers_url":"https://api.github.com/users/bitfocus/followers","following_url":"https://api.github.com/users/bitfocus/following{/other_user}","gists_url":"https://api.github.com/users/bitfocus/gists{/gist_id}","starred_url":"https://api.github.com/users/bitfocus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitfocus/subscriptions","organizations_url":"https://api.github.com/users/bitfocus/orgs","repos_url":"https://api.github.com/users/bitfocus/repos","events_url":"https://api.github.com/users/bitfocus/events{/privacy}","received_events_url":"https://api.github.com/users/bitfocus/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bitfocus/companion-module-atem","description":null,"fork":false,"url":"https://api.github.com/repos/bitfocus/companion-module-atem","forks_url":"https://api.github.com/repos/bitfocus/companion-module-atem/forks","keys_url":"https://api.github.com/repos/bitfocus/companion-module-atem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitfocus/companion-module-atem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitfocus/companion-module-atem/teams","hooks_url":"https://api.github.com/repos/bitfocus/companion-module-atem/hooks","issue_events_url":"https://api.github.com/repos/bitfocus/companion-module-atem/issues/events{/number}","events_url":"https://api.github.com/repos/bitfocus/companion-module-atem/events","assignees_url":"https://api.github.com/repos/bitfocus/companion-module-atem/assignees{/user}","branches_url":"https://api.github.com/repos/bitfocus/companion-module-atem/branches{/branch}","tags_url":"https://api.github.com/repos/bitfocus/companion-module-atem/tags","blobs_url":"https://api.github.com/repos/bitfocus/companion-module-atem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitfocus/companion-module-atem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitfocus/companion-module-atem/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitfocus/companion-module-atem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitfocus/companion-module-atem/statuses/{sha}","languages_url":"https://api.github.com/repos/bitfocus/companion-module-atem/languages","stargazers_url":"https://api.github.com/repos/bitfocus/companion-module-atem/stargazers","contributors_url":"https://api.github.com/repos/bitfocus/companion-module-atem/contributors","subscribers_url":"https://api.github.com/repos/bitfocus/companion-module-atem/subscribers","subscription_url":"https://api.github.com/repos/bitfocus/companion-module-atem/subscription","commits_url":"https://api.github.com/repos/bitfocus/companion-module-atem/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitfocus/companion-module-atem/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitfocus/companion-module-atem/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitfocus/companion-module-atem/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitfocus/companion-module-atem/contents/{+path}","compare_url":"https://api.github.com/repos/bitfocus/companion-module-atem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitfocus/companion-module-atem/merges","archive_url":"https://api.github.com/repos/bitfocus/companion-module-atem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitfocus/companion-module-atem/downloads","issues_url":"https://api.github.com/repos/bitfocus/companion-module-atem/issues{/number}","pulls_url":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls{/number}","milestones_url":"https://api.github.com/repos/bitfocus/companion-module-atem/milestones{/number}","notifications_url":"https://api.github.com/repos/bitfocus/companion-module-atem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitfocus/companion-module-atem/labels{/name}","releases_url":"https://api.github.com/repos/bitfocus/companion-module-atem/releases{/id}","deployments_url":"https://api.github.com/repos/bitfocus/companion-module-atem/deployments","created_at":"2018-06-18T20:31:18Z","updated_at":"2019-09-23T10:06:51Z","pushed_at":"2019-09-29T14:14:01Z","git_url":"git://github.com/bitfocus/companion-module-atem.git","ssh_url":"git@github.com:bitfocus/companion-module-atem.git","clone_url":"https://github.com/bitfocus/companion-module-atem.git","svn_url":"https://github.com/bitfocus/companion-module-atem","homepage":null,"size":103,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":9,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/26"},"html":{"href":"https://github.com/bitfocus/companion-module-atem/pull/26"},"issue":{"href":"https://api.github.com/repos/bitfocus/companion-module-atem/issues/26"},"comments":{"href":"https://api.github.com/repos/bitfocus/companion-module-atem/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitfocus/companion-module-atem/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/bitfocus/companion-module-atem/statuses/4941b5666dfb784690b4d345cffa45cc37e80f86"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"krocheck","id":749812,"node_id":"MDQ6VXNlcjc0OTgxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/749812?v=4","gravatar_id":"","url":"https://api.github.com/users/krocheck","html_url":"https://github.com/krocheck","followers_url":"https://api.github.com/users/krocheck/followers","following_url":"https://api.github.com/users/krocheck/following{/other_user}","gists_url":"https://api.github.com/users/krocheck/gists{/gist_id}","starred_url":"https://api.github.com/users/krocheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krocheck/subscriptions","organizations_url":"https://api.github.com/users/krocheck/orgs","repos_url":"https://api.github.com/users/krocheck/repos","events_url":"https://api.github.com/users/krocheck/events{/privacy}","received_events_url":"https://api.github.com/users/krocheck/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"maintainer_can_modify":false,"commits":35,"additions":5381,"deletions":2822,"changed_files":24}}
{"actor":{"display_login":"krocheck"}}