{"action":"closed","issue":{"url":"https://api.github.com/repos/cardstack/cardstack/issues/403","repository_url":"https://api.github.com/repos/cardstack/cardstack","labels_url":"https://api.github.com/repos/cardstack/cardstack/issues/403/labels{/name}","comments_url":"https://api.github.com/repos/cardstack/cardstack/issues/403/comments","events_url":"https://api.github.com/repos/cardstack/cardstack/issues/403/events","html_url":"https://github.com/cardstack/cardstack/issues/403","id":377430444,"node_id":"MDU6SXNzdWUzNzc0MzA0NDQ=","number":403,"title":"Refactor cs-files content type","user":{"login":"ef4","id":319282,"node_id":"MDQ6VXNlcjMxOTI4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/319282?v=4","gravatar_id":"","url":"https://api.github.com/users/ef4","html_url":"https://github.com/ef4","followers_url":"https://api.github.com/users/ef4/followers","following_url":"https://api.github.com/users/ef4/following{/other_user}","gists_url":"https://api.github.com/users/ef4/gists{/gist_id}","starred_url":"https://api.github.com/users/ef4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef4/subscriptions","organizations_url":"https://api.github.com/users/ef4/orgs","repos_url":"https://api.github.com/users/ef4/repos","events_url":"https://api.github.com/users/ef4/events{/privacy}","received_events_url":"https://api.github.com/users/ef4/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-05T14:44:03Z","updated_at":"2018-11-21T09:53:12Z","closed_at":"2018-11-21T09:53:12Z","author_association":"COLLABORATOR","body":"The `cs-files` content type should get defined in its own `@cardstack/files` package.\r\n\r\nLet's rename it to \"cardstack-files\", none of our content types use \"cs-\" yet, and even where we're using that in templates it is a necessary evil until we can namespacing via Ember's module unification.\r\n\r\nSomething like this:\r\n\r\n```js\r\n// The user would write this to configure their file storage\r\nfactory.addResource('data-sources').withAttributes({\r\n  sourceType: '@cardstack/files',\r\n  params: {\r\n    storeFilesIn: { type: 'data-sources', id: 'whatever-data-source-goes-here' }\r\n  }\r\n});\r\n```\r\n\r\n```js\r\n// That would mean the files package has an opportunity to emit static \r\n// models based on that parameter:\r\n// \r\n// packages/files/cardstack/static-models.js\r\nmodule.exports = function({ storeIn }) {\r\n  return [\r\n    {\r\n       type: 'content-types',\r\n       id: 'cardstack-files',\r\n       attributes: {\r\n          // etc\r\n       },\r\n       relationships: {\r\n          'data-source': {\r\n             data: storeFilesIn\r\n          },\r\n          // etc\r\n       }\r\n    }\r\n  ];\r\n}\r\n```"}}
{"actor":{"display_login":"mansona"}}