{"action":"created","issue":{"url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/5","labels_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/5/comments","events_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/5/events","html_url":"https://github.com/joostfarla/serverless-cors-plugin/issues/5","id":127192703,"number":5,"title":"Not compatible with the latest version of serverless","user":{"login":"OneMuppet","id":4235764,"avatar_url":"https://avatars.githubusercontent.com/u/4235764?v=3","gravatar_id":"","url":"https://api.github.com/users/OneMuppet","html_url":"https://github.com/OneMuppet","followers_url":"https://api.github.com/users/OneMuppet/followers","following_url":"https://api.github.com/users/OneMuppet/following{/other_user}","gists_url":"https://api.github.com/users/OneMuppet/gists{/gist_id}","starred_url":"https://api.github.com/users/OneMuppet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OneMuppet/subscriptions","organizations_url":"https://api.github.com/users/OneMuppet/orgs","repos_url":"https://api.github.com/users/OneMuppet/repos","events_url":"https://api.github.com/users/OneMuppet/events{/privacy}","received_events_url":"https://api.github.com/users/OneMuppet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-18T10:05:22Z","updated_at":"2016-01-26T21:02:12Z","closed_at":"2016-01-26T21:02:11Z","body":"There are lot's of breaking changes in the new version of serverless released yesterday which is what is causing this. \r\n\r\nMaybe the CORS-functionality in this plugin could be achieved with the new templates introduced in serverless 0.1.0?\r\n\r\nhttps://github.com/serverless/serverless/releases\r\n\r\n```javascript\r\n/User/X/.node/lib/node_modules/serverless/node_modules/bluebird/js/main/async.js:43\r\n        fn = function () { throw arg; };\r\n                           ^\r\n\r\nTypeError: Cannot read property 'region' of undefined\r\n    at ServerlessCors.addPreflightRequests (/User/X/Code/chatter/node_modules/serverless-cors-plugin/src/index.js:68:29)\r\nFrom previous event:\r\n    at /User/X/.node/lib/node_modules/serverless/lib/Serverless.js:177:25\r\n    at Array.reduce (native)\r\n    at Serverless._execute (/User/X/.node/lib/node_modules/serverless/lib/Serverless.js:176:26)\r\n    at Object.actions.(anonymous function) [as endpointDeploy] (/User/X/.node/lib/node_modules/serverless/lib/Serverless.js:378:20)\r\n    at /User/X/.node/lib/node_modules/serverless/lib/actions/DashDeploy.js:288:34\r\nFrom previous event:\r\n    at DashDeploy._deploy (/User/X/.node/lib/node_modules/serverless/lib/actions/DashDeploy.js:283:10)\r\nFrom previous event:\r\n    at DashDeploy.dashDeploy (/User/X/.node/lib/node_modules/serverless/lib/actions/DashDeploy.js:132:10)\r\nFrom previous event:\r\n    at /User/X/.node/lib/node_modules/serverless/lib/Serverless.js:152:29\r\n    at Array.reduce (native)\r\n    at /User/X/.node/lib/node_modules/serverless/lib/Serverless.js:151:30\r\n    at processImmediate [as _immediateCallback] (timers.js:384:17)\r\nFrom previous event:\r\n    at Serverless._execute (/User/X/.node/lib/node_modules/serverless/lib/Serverless.js:149:10)\r\n    at Serverless.actions.(anonymous function) (/User/X/.node/lib/node_modules/serverless/lib/Serverless.js:378:20)\r\n    at Serverless.command (/User/X/.node/lib/node_modules/serverless/lib/Serverless.js:347:38)\r\n    at Object.<anonymous> (/User/X/.node/lib/node_modules/serverless/bin/serverless:16:12)\r\n    at Module._compile (module.js:399:26)\r\n    at Object.Module._extensions..js (module.js:406:10)\r\n    at Module.load (module.js:345:32)\r\n    at Function.Module._load (module.js:302:12)\r\n    at Function.Module.runMain (module.js:431:10)\r\n    at startup (node.js:141:18)\r\n    at node.js:977:3\r\n```"},"comment":{"url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/comments/175228457","html_url":"https://github.com/joostfarla/serverless-cors-plugin/issues/5#issuecomment-175228457","issue_url":"https://api.github.com/repos/joostfarla/serverless-cors-plugin/issues/5","id":175228457,"user":{"login":"joostfarla","id":851863,"avatar_url":"https://avatars.githubusercontent.com/u/851863?v=3","gravatar_id":"","url":"https://api.github.com/users/joostfarla","html_url":"https://github.com/joostfarla","followers_url":"https://api.github.com/users/joostfarla/followers","following_url":"https://api.github.com/users/joostfarla/following{/other_user}","gists_url":"https://api.github.com/users/joostfarla/gists{/gist_id}","starred_url":"https://api.github.com/users/joostfarla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joostfarla/subscriptions","organizations_url":"https://api.github.com/users/joostfarla/orgs","repos_url":"https://api.github.com/users/joostfarla/repos","events_url":"https://api.github.com/users/joostfarla/events{/privacy}","received_events_url":"https://api.github.com/users/joostfarla/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T21:02:11Z","updated_at":"2016-01-26T21:02:11Z","body":"The plugin is now compatible with the brand new release of Serverless (v0.2)!"}}