{"action":"created","comment":{"url":"https://api.github.com/repos/urish/typewiz/pulls/comments/180001750","pull_request_review_id":110344805,"id":180001750,"diff_hunk":"@@ -0,0 +1,65 @@\n+import * as Ajv from 'ajv';\n+import * as fs from 'fs';\n+import * as path from 'path';\n+import * as ts from 'typescript';\n+import * as util from 'util';\n+import { IApplyTypesOptions } from './apply-types';\n+import { ICompilerOptions } from './compiler-helper';\n+import { IInstrumentOptions } from './instrument';\n+const readFileAsync = util.promisify(fs.readFile);\n+\n+export class ConfigurationParser {\n+    private typewizConfig: any;\n+    private configurationPath: string | undefined;\n+\n+    public findConfigFile(cwd: string): string {\n+        return ts.findConfigFile(cwd, ts.sys.fileExists, 'typewiz.json');\n+    }\n+\n+    public async parse(configurationPath: string): Promise<void> {\n+        const typewizConfigSchema = JSON.parse(\n+            await readFileAsync(path.join(__dirname, 'typewiz.json'), { encoding: 'utf8' }),","path":"packages/typewiz-core/src/configuration-parser.ts","position":null,"original_position":21,"commit_id":"be0a02c8629f32f59232b6b38343ae0e26b6ec6a","original_commit_id":"1f10f8cdb21b46af72ea66e82f295949f7bd2eaa","user":{"login":"urish","id":892318,"avatar_url":"https://avatars0.githubusercontent.com/u/892318?v=4","gravatar_id":"","url":"https://api.github.com/users/urish","html_url":"https://github.com/urish","followers_url":"https://api.github.com/users/urish/followers","following_url":"https://api.github.com/users/urish/following{/other_user}","gists_url":"https://api.github.com/users/urish/gists{/gist_id}","starred_url":"https://api.github.com/users/urish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urish/subscriptions","organizations_url":"https://api.github.com/users/urish/orgs","repos_url":"https://api.github.com/users/urish/repos","events_url":"https://api.github.com/users/urish/events{/privacy}","received_events_url":"https://api.github.com/users/urish/received_events","type":"User","site_admin":false},"body":"Thanks 👍 ","created_at":"2018-04-09T06:56:32Z","updated_at":"2018-04-09T06:56:32Z","html_url":"https://github.com/urish/typewiz/pull/55#discussion_r180001750","pull_request_url":"https://api.github.com/repos/urish/typewiz/pulls/55","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/urish/typewiz/pulls/comments/180001750"},"html":{"href":"https://github.com/urish/typewiz/pull/55#discussion_r180001750"},"pull_request":{"href":"https://api.github.com/repos/urish/typewiz/pulls/55"}},"in_reply_to_id":179962586},"pull_request":{"url":"https://api.github.com/repos/urish/typewiz/pulls/55","id":178741321,"html_url":"https://github.com/urish/typewiz/pull/55","diff_url":"https://github.com/urish/typewiz/pull/55.diff","patch_url":"https://github.com/urish/typewiz/pull/55.patch","issue_url":"https://api.github.com/repos/urish/typewiz/issues/55","number":55,"state":"open","locked":false,"title":"feat: config file [WIP]","user":{"login":"zoehneto","id":8282547,"avatar_url":"https://avatars3.githubusercontent.com/u/8282547?v=4","gravatar_id":"","url":"https://api.github.com/users/zoehneto","html_url":"https://github.com/zoehneto","followers_url":"https://api.github.com/users/zoehneto/followers","following_url":"https://api.github.com/users/zoehneto/following{/other_user}","gists_url":"https://api.github.com/users/zoehneto/gists{/gist_id}","starred_url":"https://api.github.com/users/zoehneto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoehneto/subscriptions","organizations_url":"https://api.github.com/users/zoehneto/orgs","repos_url":"https://api.github.com/users/zoehneto/repos","events_url":"https://api.github.com/users/zoehneto/events{/privacy}","received_events_url":"https://api.github.com/users/zoehneto/received_events","type":"User","site_admin":false},"body":"Implements #31 \r\n\r\n- [x] Implement configuration parsing and validation against schema\r\n- [x] Implement helpers which generate the config for `instrument` and `applyTypes`\r\n- [x] Add support to typewiz-webpack\r\n- [ ] Add support for applying types with config to typewiz-webpack (potentially in another PR)\r\n- [x] Add support to typewiz-node\r\n- [ ] Add schema to [Schema Store](https://github.com/SchemaStore/schemastore) for editor support\r\n- [ ] Update urish/typewiz-webpack-demo\r\n- [ ] Update typewiz-webpack and typewiz-node dependency on typewiz-core to the correct (published) version\r\n- [ ] Update documentation (describe typewiz.json, explain loader config for typewiz-webpack)","created_at":"2018-04-01T18:30:07Z","updated_at":"2018-04-09T06:56:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f24d9ee11fd9d67023789d50810247f0999c866","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/urish/typewiz/pulls/55/commits","review_comments_url":"https://api.github.com/repos/urish/typewiz/pulls/55/comments","review_comment_url":"https://api.github.com/repos/urish/typewiz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urish/typewiz/issues/55/comments","statuses_url":"https://api.github.com/repos/urish/typewiz/statuses/be0a02c8629f32f59232b6b38343ae0e26b6ec6a","head":{"label":"zoehneto:config-file","ref":"config-file","sha":"be0a02c8629f32f59232b6b38343ae0e26b6ec6a","user":{"login":"zoehneto","id":8282547,"avatar_url":"https://avatars3.githubusercontent.com/u/8282547?v=4","gravatar_id":"","url":"https://api.github.com/users/zoehneto","html_url":"https://github.com/zoehneto","followers_url":"https://api.github.com/users/zoehneto/followers","following_url":"https://api.github.com/users/zoehneto/following{/other_user}","gists_url":"https://api.github.com/users/zoehneto/gists{/gist_id}","starred_url":"https://api.github.com/users/zoehneto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoehneto/subscriptions","organizations_url":"https://api.github.com/users/zoehneto/orgs","repos_url":"https://api.github.com/users/zoehneto/repos","events_url":"https://api.github.com/users/zoehneto/events{/privacy}","received_events_url":"https://api.github.com/users/zoehneto/received_events","type":"User","site_admin":false},"repo":{"id":126341075,"name":"typewiz","full_name":"zoehneto/typewiz","owner":{"login":"zoehneto","id":8282547,"avatar_url":"https://avatars3.githubusercontent.com/u/8282547?v=4","gravatar_id":"","url":"https://api.github.com/users/zoehneto","html_url":"https://github.com/zoehneto","followers_url":"https://api.github.com/users/zoehneto/followers","following_url":"https://api.github.com/users/zoehneto/following{/other_user}","gists_url":"https://api.github.com/users/zoehneto/gists{/gist_id}","starred_url":"https://api.github.com/users/zoehneto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoehneto/subscriptions","organizations_url":"https://api.github.com/users/zoehneto/orgs","repos_url":"https://api.github.com/users/zoehneto/repos","events_url":"https://api.github.com/users/zoehneto/events{/privacy}","received_events_url":"https://api.github.com/users/zoehneto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zoehneto/typewiz","description":"Automatically discover and add missing types in your TypeScript code","fork":true,"url":"https://api.github.com/repos/zoehneto/typewiz","forks_url":"https://api.github.com/repos/zoehneto/typewiz/forks","keys_url":"https://api.github.com/repos/zoehneto/typewiz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zoehneto/typewiz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zoehneto/typewiz/teams","hooks_url":"https://api.github.com/repos/zoehneto/typewiz/hooks","issue_events_url":"https://api.github.com/repos/zoehneto/typewiz/issues/events{/number}","events_url":"https://api.github.com/repos/zoehneto/typewiz/events","assignees_url":"https://api.github.com/repos/zoehneto/typewiz/assignees{/user}","branches_url":"https://api.github.com/repos/zoehneto/typewiz/branches{/branch}","tags_url":"https://api.github.com/repos/zoehneto/typewiz/tags","blobs_url":"https://api.github.com/repos/zoehneto/typewiz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zoehneto/typewiz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zoehneto/typewiz/git/refs{/sha}","trees_url":"https://api.github.com/repos/zoehneto/typewiz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zoehneto/typewiz/statuses/{sha}","languages_url":"https://api.github.com/repos/zoehneto/typewiz/languages","stargazers_url":"https://api.github.com/repos/zoehneto/typewiz/stargazers","contributors_url":"https://api.github.com/repos/zoehneto/typewiz/contributors","subscribers_url":"https://api.github.com/repos/zoehneto/typewiz/subscribers","subscription_url":"https://api.github.com/repos/zoehneto/typewiz/subscription","commits_url":"https://api.github.com/repos/zoehneto/typewiz/commits{/sha}","git_commits_url":"https://api.github.com/repos/zoehneto/typewiz/git/commits{/sha}","comments_url":"https://api.github.com/repos/zoehneto/typewiz/comments{/number}","issue_comment_url":"https://api.github.com/repos/zoehneto/typewiz/issues/comments{/number}","contents_url":"https://api.github.com/repos/zoehneto/typewiz/contents/{+path}","compare_url":"https://api.github.com/repos/zoehneto/typewiz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zoehneto/typewiz/merges","archive_url":"https://api.github.com/repos/zoehneto/typewiz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zoehneto/typewiz/downloads","issues_url":"https://api.github.com/repos/zoehneto/typewiz/issues{/number}","pulls_url":"https://api.github.com/repos/zoehneto/typewiz/pulls{/number}","milestones_url":"https://api.github.com/repos/zoehneto/typewiz/milestones{/number}","notifications_url":"https://api.github.com/repos/zoehneto/typewiz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zoehneto/typewiz/labels{/name}","releases_url":"https://api.github.com/repos/zoehneto/typewiz/releases{/id}","deployments_url":"https://api.github.com/repos/zoehneto/typewiz/deployments","created_at":"2018-03-22T13:40:51Z","updated_at":"2018-04-04T07:34:14Z","pushed_at":"2018-04-09T06:42:23Z","git_url":"git://github.com/zoehneto/typewiz.git","ssh_url":"git@github.com:zoehneto/typewiz.git","clone_url":"https://github.com/zoehneto/typewiz.git","svn_url":"https://github.com/zoehneto/typewiz","homepage":"https://medium.com/@urish/manual-typing-is-no-fun-introducing-typewiz-58e3e8813f4c","size":223,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"urish:master","ref":"master","sha":"d9b532c4c6e6b1b456b1043f6efddb8a66c08b4f","user":{"login":"urish","id":892318,"avatar_url":"https://avatars0.githubusercontent.com/u/892318?v=4","gravatar_id":"","url":"https://api.github.com/users/urish","html_url":"https://github.com/urish","followers_url":"https://api.github.com/users/urish/followers","following_url":"https://api.github.com/users/urish/following{/other_user}","gists_url":"https://api.github.com/users/urish/gists{/gist_id}","starred_url":"https://api.github.com/users/urish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urish/subscriptions","organizations_url":"https://api.github.com/users/urish/orgs","repos_url":"https://api.github.com/users/urish/repos","events_url":"https://api.github.com/users/urish/events{/privacy}","received_events_url":"https://api.github.com/users/urish/received_events","type":"User","site_admin":false},"repo":{"id":117014891,"name":"typewiz","full_name":"urish/typewiz","owner":{"login":"urish","id":892318,"avatar_url":"https://avatars0.githubusercontent.com/u/892318?v=4","gravatar_id":"","url":"https://api.github.com/users/urish","html_url":"https://github.com/urish","followers_url":"https://api.github.com/users/urish/followers","following_url":"https://api.github.com/users/urish/following{/other_user}","gists_url":"https://api.github.com/users/urish/gists{/gist_id}","starred_url":"https://api.github.com/users/urish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urish/subscriptions","organizations_url":"https://api.github.com/users/urish/orgs","repos_url":"https://api.github.com/users/urish/repos","events_url":"https://api.github.com/users/urish/events{/privacy}","received_events_url":"https://api.github.com/users/urish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/urish/typewiz","description":"Automatically discover and add missing types in your TypeScript code","fork":false,"url":"https://api.github.com/repos/urish/typewiz","forks_url":"https://api.github.com/repos/urish/typewiz/forks","keys_url":"https://api.github.com/repos/urish/typewiz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urish/typewiz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urish/typewiz/teams","hooks_url":"https://api.github.com/repos/urish/typewiz/hooks","issue_events_url":"https://api.github.com/repos/urish/typewiz/issues/events{/number}","events_url":"https://api.github.com/repos/urish/typewiz/events","assignees_url":"https://api.github.com/repos/urish/typewiz/assignees{/user}","branches_url":"https://api.github.com/repos/urish/typewiz/branches{/branch}","tags_url":"https://api.github.com/repos/urish/typewiz/tags","blobs_url":"https://api.github.com/repos/urish/typewiz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urish/typewiz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urish/typewiz/git/refs{/sha}","trees_url":"https://api.github.com/repos/urish/typewiz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urish/typewiz/statuses/{sha}","languages_url":"https://api.github.com/repos/urish/typewiz/languages","stargazers_url":"https://api.github.com/repos/urish/typewiz/stargazers","contributors_url":"https://api.github.com/repos/urish/typewiz/contributors","subscribers_url":"https://api.github.com/repos/urish/typewiz/subscribers","subscription_url":"https://api.github.com/repos/urish/typewiz/subscription","commits_url":"https://api.github.com/repos/urish/typewiz/commits{/sha}","git_commits_url":"https://api.github.com/repos/urish/typewiz/git/commits{/sha}","comments_url":"https://api.github.com/repos/urish/typewiz/comments{/number}","issue_comment_url":"https://api.github.com/repos/urish/typewiz/issues/comments{/number}","contents_url":"https://api.github.com/repos/urish/typewiz/contents/{+path}","compare_url":"https://api.github.com/repos/urish/typewiz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urish/typewiz/merges","archive_url":"https://api.github.com/repos/urish/typewiz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urish/typewiz/downloads","issues_url":"https://api.github.com/repos/urish/typewiz/issues{/number}","pulls_url":"https://api.github.com/repos/urish/typewiz/pulls{/number}","milestones_url":"https://api.github.com/repos/urish/typewiz/milestones{/number}","notifications_url":"https://api.github.com/repos/urish/typewiz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urish/typewiz/labels{/name}","releases_url":"https://api.github.com/repos/urish/typewiz/releases{/id}","deployments_url":"https://api.github.com/repos/urish/typewiz/deployments","created_at":"2018-01-10T21:48:31Z","updated_at":"2018-04-07T19:02:50Z","pushed_at":"2018-04-09T06:42:25Z","git_url":"git://github.com/urish/typewiz.git","ssh_url":"git@github.com:urish/typewiz.git","clone_url":"https://github.com/urish/typewiz.git","svn_url":"https://github.com/urish/typewiz","homepage":"https://medium.com/@urish/manual-typing-is-no-fun-introducing-typewiz-58e3e8813f4c","size":232,"stargazers_count":547,"watchers_count":547,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":21,"license":null,"forks":18,"open_issues":21,"watchers":547,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urish/typewiz/pulls/55"},"html":{"href":"https://github.com/urish/typewiz/pull/55"},"issue":{"href":"https://api.github.com/repos/urish/typewiz/issues/55"},"comments":{"href":"https://api.github.com/repos/urish/typewiz/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/urish/typewiz/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/urish/typewiz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urish/typewiz/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/urish/typewiz/statuses/be0a02c8629f32f59232b6b38343ae0e26b6ec6a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"urish"}}