From 23e9a607353a21e5094a0165fafc8c92d36fe899 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 28 Jun 2017 15:41:19 +0100 Subject: [PATCH 001/212] WIP --- .meteor/packages | 1 + .meteor/versions | 1 + .../.npm/package/.gitignore | 1 + .../rocketchat-graphql/.npm/package/README | 7 + .../.npm/package/npm-shrinkwrap.json | 334 ++++++++++++++++++ packages/rocketchat-graphql/package.js | 27 ++ packages/rocketchat-graphql/server/api.js | 36 ++ .../server/helpers/findChannelByIdAndUser.js | 8 + .../server/helpers/property.js | 3 + packages/rocketchat-graphql/server/schema.js | 179 ++++++++++ 10 files changed, 597 insertions(+) create mode 100644 packages/rocketchat-graphql/.npm/package/.gitignore create mode 100644 packages/rocketchat-graphql/.npm/package/README create mode 100644 packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json create mode 100644 packages/rocketchat-graphql/package.js create mode 100644 packages/rocketchat-graphql/server/api.js create mode 100644 packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js create mode 100644 packages/rocketchat-graphql/server/helpers/property.js create mode 100644 packages/rocketchat-graphql/server/schema.js diff --git a/.meteor/packages b/.meteor/packages index 1baeab932dec..53fb9389b819 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -63,6 +63,7 @@ rocketchat:file-upload rocketchat:github-enterprise rocketchat:gitlab rocketchat:google-vision +rocketchat:graphql rocketchat:highlight-words rocketchat:iframe-login rocketchat:importer diff --git a/.meteor/versions b/.meteor/versions index 56584e33d724..5ceb7cee121a 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -151,6 +151,7 @@ rocketchat:file-upload@0.0.1 rocketchat:github-enterprise@0.0.1 rocketchat:gitlab@0.0.1 rocketchat:google-vision@0.0.1 +rocketchat:graphql@0.0.1 rocketchat:highlight-words@0.0.1 rocketchat:i18n@0.0.1 rocketchat:iframe-login@1.0.0 diff --git a/packages/rocketchat-graphql/.npm/package/.gitignore b/packages/rocketchat-graphql/.npm/package/.gitignore new file mode 100644 index 000000000000..3c3629e647f5 --- /dev/null +++ b/packages/rocketchat-graphql/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/rocketchat-graphql/.npm/package/README b/packages/rocketchat-graphql/.npm/package/README new file mode 100644 index 000000000000..3d492553a438 --- /dev/null +++ b/packages/rocketchat-graphql/.npm/package/README @@ -0,0 +1,7 @@ +This directory and the files immediately inside it are automatically generated +when you change this package's NPM dependencies. Commit the files in this +directory (npm-shrinkwrap.json, .gitignore, and this README) to source control +so that others run the same versions of sub-dependencies. + +You should NOT check in the node_modules directory that Meteor automatically +creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json new file mode 100644 index 000000000000..99bd39438b7f --- /dev/null +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,334 @@ +{ + "dependencies": { + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "from": "accepts@>=1.3.3 <1.4.0" + }, + "apollo-client": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-1.6.0.tgz", + "from": "apollo-client@1.6.0" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "from": "array-flatten@1.1.1" + }, + "body-parser": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", + "from": "body-parser@1.17.2" + }, + "bytes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "from": "bytes@2.4.0" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "from": "content-disposition@0.5.2" + }, + "content-type": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "from": "content-type@>=1.0.2 <1.1.0" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "from": "cookie@0.3.1" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "from": "cookie-signature@1.0.6" + }, + "cors": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.3.tgz", + "from": "cors@2.8.3" + }, + "debug": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", + "from": "debug@2.6.7" + }, + "depd": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "from": "depd@>=1.1.0 <1.2.0" + }, + "deprecated-decorator": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", + "from": "deprecated-decorator@>=0.1.6 <0.2.0" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "from": "destroy@>=1.0.4 <1.1.0" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "from": "ee-first@1.1.1" + }, + "encodeurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "from": "encodeurl@>=1.0.1 <1.1.0" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "from": "escape-html@>=1.0.3 <1.1.0" + }, + "etag": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", + "from": "etag@>=1.8.0 <1.9.0" + }, + "express": { + "version": "4.15.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", + "from": "express@4.15.3" + }, + "finalhandler": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", + "from": "finalhandler@>=1.0.3 <1.1.0" + }, + "forwarded": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", + "from": "forwarded@>=0.1.0 <0.2.0" + }, + "fresh": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", + "from": "fresh@0.5.0" + }, + "graphql": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.10.3.tgz", + "from": "graphql@0.10.3" + }, + "graphql-anywhere": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-3.1.0.tgz", + "from": "graphql-anywhere@>=3.0.1 <4.0.0" + }, + "graphql-server-core": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/graphql-server-core/-/graphql-server-core-0.9.0.tgz", + "from": "graphql-server-core@>=0.9.0 <0.10.0" + }, + "graphql-server-express": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/graphql-server-express/-/graphql-server-express-0.9.0.tgz", + "from": "graphql-server-express@0.9.0" + }, + "graphql-server-module-graphiql": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/graphql-server-module-graphiql/-/graphql-server-module-graphiql-0.9.0.tgz", + "from": "graphql-server-module-graphiql@>=0.9.0 <0.10.0" + }, + "graphql-tag": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.4.2.tgz", + "from": "graphql-tag@>=2.0.0 <3.0.0" + }, + "graphql-tools": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.0.0.tgz", + "from": "graphql-tools@1.0.0" + }, + "http-errors": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", + "from": "http-errors@>=1.6.1 <1.7.0" + }, + "iconv-lite": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "from": "iconv-lite@0.4.15" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "from": "inherits@2.0.3" + }, + "ipaddr.js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", + "from": "ipaddr.js@1.3.0" + }, + "iterall": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.1.1.tgz", + "from": "iterall@>=1.1.0 <2.0.0" + }, + "js-tokens": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz", + "from": "js-tokens@>=3.0.0 <4.0.0" + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "from": "lodash@>=4.2.1 <5.0.0" + }, + "lodash-es": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz", + "from": "lodash-es@>=4.2.1 <5.0.0" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "from": "loose-envify@>=1.1.0 <2.0.0" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "from": "media-typer@0.3.0" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "from": "merge-descriptors@1.0.1" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "from": "methods@>=1.1.2 <1.2.0" + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "from": "mime@1.3.4" + }, + "mime-db": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "from": "mime-db@>=1.27.0 <1.28.0" + }, + "mime-types": { + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "from": "mime-types@>=2.1.11 <2.2.0" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "from": "ms@2.0.0" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "from": "negotiator@0.6.1" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "from": "object-assign@>=4.0.0 <5.0.0" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "from": "on-finished@>=2.3.0 <2.4.0" + }, + "parseurl": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "from": "parseurl@>=1.3.1 <1.4.0" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "from": "path-to-regexp@0.1.7" + }, + "proxy-addr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", + "from": "proxy-addr@>=1.1.4 <1.2.0" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "from": "qs@6.4.0" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "from": "range-parser@>=1.2.0 <1.3.0" + }, + "raw-body": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", + "from": "raw-body@>=2.2.0 <2.3.0" + }, + "redux": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.1.tgz", + "from": "redux@>=3.4.0 <4.0.0" + }, + "send": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", + "from": "send@0.15.3" + }, + "serve-static": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", + "from": "serve-static@1.12.3" + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "from": "setprototypeof@1.0.3" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "from": "statuses@>=1.3.1 <1.4.0" + }, + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", + "from": "symbol-observable@>=1.0.2 <2.0.0" + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "from": "type-is@>=1.6.15 <1.7.0" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "from": "unpipe@>=1.0.0 <1.1.0" + }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "from": "utils-merge@1.0.0" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "from": "uuid@>=3.0.1 <4.0.0" + }, + "vary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", + "from": "vary@>=1.0.0 <2.0.0" + }, + "whatwg-fetch": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", + "from": "whatwg-fetch@>=2.0.0 <3.0.0" + } + } +} diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js new file mode 100644 index 000000000000..37791a9b9c39 --- /dev/null +++ b/packages/rocketchat-graphql/package.js @@ -0,0 +1,27 @@ +Package.describe({ + name: 'rocketchat:graphql', + version: '0.0.1', + summary: 'GraphQL API', + git: '' +}); + +Package.onUse(function(api) { + api.use([ + 'underscore', + 'ecmascript', + 'rocketchat:lib', + 'rocketchat:api' + ]); + + api.addFiles('server/api.js', 'server'); +}); + +Npm.depends({ + 'apollo-client': '1.6.0', + cors: '2.8.3', + express: '4.15.3', + graphql: '0.10.3', + 'graphql-server-express': '0.9.0', + 'graphql-tools': '1.0.0', + 'body-parser': '1.17.2' +}); diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js new file mode 100644 index 000000000000..295b777518cc --- /dev/null +++ b/packages/rocketchat-graphql/server/api.js @@ -0,0 +1,36 @@ +import { graphqlExpress, graphiqlExpress } from 'graphql-server-express'; +import bodyParser from 'body-parser'; +import express from 'express'; +import cors from 'cors'; +import { Meteor } from 'meteor/meteor'; +import { WebApp } from 'meteor/webapp'; + +import { executableSchema } from './schema'; + +// the Meteor GraphQL server is an Express server +const graphQLServer = express(); + +graphQLServer.use(cors()); +graphQLServer.use(bodyParser.urlencoded({ extended: true })); + +graphQLServer.use( + '/graphql', + bodyParser.json(), + graphqlExpress(() => ({ + schema: executableSchema, + context: {}, + formatError: e => ({ + message: e.message, + locations: e.locations, + path: e.path + }), + debug: Meteor.isDevelopment + }))); + +graphQLServer.use('/graphiql', graphiqlExpress({ + endpointURL: '/graphql' +})); + + +// this binds the specified paths to the Express server running Apollo + GraphiQL +WebApp.connectHandlers.use(graphQLServer); diff --git a/packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js b/packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js new file mode 100644 index 000000000000..b36f972203e6 --- /dev/null +++ b/packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js @@ -0,0 +1,8 @@ +export function findChannelByIdAndUser({ params, options = {} }) { + const sub = RocketChat.models.Subscriptions.findOne({ + rid: params.roomId, + 'u._id': params.userId + }, options); + + return sub; +} diff --git a/packages/rocketchat-graphql/server/helpers/property.js b/packages/rocketchat-graphql/server/helpers/property.js new file mode 100644 index 000000000000..65485cae9868 --- /dev/null +++ b/packages/rocketchat-graphql/server/helpers/property.js @@ -0,0 +1,3 @@ +export function property(key) { + return (object) => object == null ? undefined : object[key]; +} diff --git a/packages/rocketchat-graphql/server/schema.js b/packages/rocketchat-graphql/server/schema.js new file mode 100644 index 000000000000..8bf5a3bb1dda --- /dev/null +++ b/packages/rocketchat-graphql/server/schema.js @@ -0,0 +1,179 @@ +import { + makeExecutableSchema +} from 'graphql-tools'; + +import { + property +} from './helpers/property'; + +import { + findChannelByIdAndUser +} from './helpers/findChannelByIdAndUser'; + +// mys:admin +const testUser = 'fnw4B4suFsTXf8rZq'; + +const schema = ` + type schema { + query: Query + } + + type Query { + channels(filter: ChannelFilter = { + privacy: ALL, + joinedChannels: false, + sortBy: NAME + }): [Channel] + } + + type Channel { + id: String! + name: String + description: String + announcement: String + topic: String + members: [Member] + owners: [Member] + numberOfMembers: Int + numberOfMessages: Int + readOnly: Boolean + direct: Boolean + privateChannel: Boolean + favourite: Boolean + unseenMessages: Int + } + + enum Privacy { + PRIVATE + PUBLIC + ALL + } + + enum ChannelSort { + NAME + NUMBER_OF_MESSAGES + } + + input ChannelFilter { + nameFilter: String + privacy: Privacy + joinedChannels: Boolean + sortBy: ChannelSort + } + + type Member { + id: String! + name: String + } +`; + +const resolvers = { + Query: { + channels: (root, args) => { + const query = {}; + const options = { + sort: { + name: 1 + }, + fields: { + t: 1, + name: 1, + description: 1, + announcement: 1, + topic: 1, + usernames: 1, + msgs: 1, + ro: 1, + u: 1, + archived: 1 + } + }; + + // Filter + if (typeof args.filter !== 'undefined') { + // sortBy + if (args.filter.sortBy === 'NUMBER_OF_MESSAGES') { + options.sort = { + msgs: -1 + }; + } + + // privacy + switch (args.filter.privacy) { + case 'PRIVATE': + query.t = 'p'; + break; + case 'PUBLIC': + query.t = { + $ne: 'p' + }; + break; + } + } + + return RocketChat.models.Rooms.find(query, options).fetch(); + } + }, + Channel: { + id: property('_id'), + members: (root) => { + return root.usernames.map( + username => RocketChat.models.Users.findOneByUsername(username, { + fields: { + name: 1 + } + }) + ); + }, + owners: (root) => { + // there might be no owner + if (!root.u) { + return []; + } + + return [RocketChat.models.Users.findOneByUsername(root.u.username, { + fields: { + name: 1 + } + })]; + }, + numberOfMembers: (root) => (root.usernames || []).length, + numberOfMessages: property('msgs'), + readOnly: (root) => root.ro === true, + direct: (root) => root.t === 'd', + privateChannel: (root) => root.t === 'p', + favourite: (root) => { + const room = findChannelByIdAndUser({ + params: { + roomId: root._id, + userId: testUser + }, + options: { fields: { f: 1 }} + }); + + return room && room.f === true; + }, + unseenMessages: (root) => { + const room = findChannelByIdAndUser({ + params: { + roomId: root._id, + userId: testUser + }, + options: { fields: { unread: 1 }} + }); + + return (room || {}).unread; + } + }, + Member: { + id: property('_id') + } +}; + +export const executableSchema = makeExecutableSchema({ + typeDefs: [schema], + resolvers, + logger: { + log: (e) => console.log(e) + } +}); From 42ed8a429328ecd2bff82a260b77267454378439 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 29 Jun 2017 17:40:24 +0100 Subject: [PATCH 002/212] WIP --- packages/rocketchat-graphql/server/api.js | 4 +- .../server/mocks/accounts/graphql-api.js | 9 + .../server/mocks/accounts/server.js | 14 ++ packages/rocketchat-graphql/server/schema.js | 227 +++++++++++++++--- 4 files changed, 217 insertions(+), 37 deletions(-) create mode 100644 packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js create mode 100644 packages/rocketchat-graphql/server/mocks/accounts/server.js diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index 295b777518cc..040845247a44 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -18,7 +18,9 @@ graphQLServer.use( bodyParser.json(), graphqlExpress(() => ({ schema: executableSchema, - context: {}, + context: { + models: RocketChat.models + }, formatError: e => ({ message: e.message, locations: e.locations, diff --git a/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js new file mode 100644 index 000000000000..ac01fd1b681a --- /dev/null +++ b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js @@ -0,0 +1,9 @@ +export const authenticated = (Accounts, func) => (async(root, args, context, info) => { + const userObject = await Accounts.resumeSession(); + + if (userObject === null) { + throw new Error('Invalid or expired token!'); + } + + return await func(root, args, Object.assign(context, { user: userObject }), info); +}); diff --git a/packages/rocketchat-graphql/server/mocks/accounts/server.js b/packages/rocketchat-graphql/server/mocks/accounts/server.js new file mode 100644 index 000000000000..2d472b58e125 --- /dev/null +++ b/packages/rocketchat-graphql/server/mocks/accounts/server.js @@ -0,0 +1,14 @@ +const loggedOut = false; + +const AccountsServer = { + async resumeSession() { + if (loggedOut) { + throw new Error('User not found'); + } + // User credentials + // mys:admin + return RocketChat.models.Users.findOneById('fnw4B4suFsTXf8rZq'); + } +}; + +export default AccountsServer; diff --git a/packages/rocketchat-graphql/server/schema.js b/packages/rocketchat-graphql/server/schema.js index 8bf5a3bb1dda..d60196d79faf 100644 --- a/packages/rocketchat-graphql/server/schema.js +++ b/packages/rocketchat-graphql/server/schema.js @@ -1,7 +1,12 @@ +/* global processWebhookMessage */ + import { makeExecutableSchema } from 'graphql-tools'; +import { authenticated } from './mocks/accounts/graphql-api'; +import AccountsServer from './mocks/accounts/server'; + import { property } from './helpers/property'; @@ -10,12 +15,11 @@ import { findChannelByIdAndUser } from './helpers/findChannelByIdAndUser'; -// mys:admin -const testUser = 'fnw4B4suFsTXf8rZq'; const schema = ` type schema { query: Query + mutation: Mutation } type Query { @@ -24,11 +28,18 @@ const schema = ` joinedChannels: false, sortBy: NAME }): [Channel] + channelByName(name: String!, isDirect: Boolean!): Channel + channelsByUser(userId: String!): [Channel] + messages(channelId: String): MessagesWithCursor + } + + type Mutation { + sendMessage(channelId: String!, content: String!): Message } type Channel { id: String! - name: String + name: String description: String announcement: String topic: String @@ -44,7 +55,7 @@ const schema = ` } enum Privacy { - PRIVATE + PRIVATE PUBLIC ALL } @@ -65,28 +76,54 @@ const schema = ` id: String! name: String } + + type MessagesWithCursor { + cursor: String + channel: Channel + messagesArray: [Message] + } + + type Message { + id: String + author: Member + content: String + creationTime: String + fromServer: Boolean + userRef: [Member] + channelRef: [Channel] + reactions: [Reaction] + # TODO + tags: [String] + } + + type Reaction { + username: String + icon: String + } `; +const roomPublicFields = { + t: 1, + name: 1, + description: 1, + announcement: 1, + topic: 1, + usernames: 1, + msgs: 1, + ro: 1, + u: 1, + archived: 1 +}; + const resolvers = { Query: { - channels: (root, args) => { + channels: authenticated(AccountsServer, (root, args, { models }) => { const query = {}; const options = { sort: { name: 1 }, - fields: { - t: 1, - name: 1, - description: 1, - announcement: 1, - topic: 1, - usernames: 1, - msgs: 1, - ro: 1, - u: 1, - archived: 1 - } + fields: roomPublicFields }; // Filter @@ -111,53 +148,112 @@ const resolvers = { } } - return RocketChat.models.Rooms.find(query, options).fetch(); - } + return models.Rooms.find(query, options).fetch(); + }), + channelByName: authenticated(AccountsServer, (root, { name, isDirect }, { models }) => { + const query = { + name + }; + + if (isDirect === true) { + query.c = 'd'; + } + + return models.Rooms.findOne(query, { + fields: roomPublicFields + }); + }), + channelsByUser: authenticated(AccountsServer, (root, { userId }, { models }) => { + const user = models.Users.findOneById(userId); + + if (!user) { + // TODO: + throw new Error('No user'); + } + + return models.Rooms.find({ + 'usernames': { + $in: user.username + } + }, { + sort: { + name: 1 + }, + fields: roomPublicFields + }).fetch(); + }), + messages: authenticated(AccountsServer, (root, args, { models }) => { + if (!args.channelId) { + console.error('messages query must be called with channelId'); + return null; + } + + const query = {}; + + if (args.channelId) { + query.rid = args.channelId; + } + + const messagesArray = models.Messages.find(query).fetch(); + const channel = models.Rooms.findOne(args.channelId); + + return { + cursor: 'CURSOR', + channel, + messagesArray + }; + }) + }, + Mutation: { + sendMessage: authenticated(AccountsServer, (root, { channelId, content }, { user }) => { + const messageReturn = processWebhookMessage({ + roomId: channelId, + text: content + }, user)[0]; + + if (!messageReturn) { + throw new Error('Unknown error'); + } + + return messageReturn.message; + }) }, Channel: { id: property('_id'), - members: (root) => { + members: (root, args, { models }) => { return root.usernames.map( - username => RocketChat.models.Users.findOneByUsername(username, { - fields: { - name: 1 - } - }) + username => models.Users.findOneByUsername(username) ); }, - owners: (root) => { + owners: (root, args, { models }) => { // there might be no owner if (!root.u) { - return []; + return; } - return [RocketChat.models.Users.findOneByUsername(root.u.username, { - fields: { - name: 1 - } - })]; + return [models.Users.findOneByUsername(root.u.username)]; }, numberOfMembers: (root) => (root.usernames || []).length, numberOfMessages: property('msgs'), readOnly: (root) => root.ro === true, direct: (root) => root.t === 'd', privateChannel: (root) => root.t === 'p', - favourite: (root) => { + favourite: (root, args, { user }) => { const room = findChannelByIdAndUser({ params: { roomId: root._id, - userId: testUser + userId: user._id }, options: { fields: { f: 1 }} }); return room && room.f === true; }, - unseenMessages: (root) => { + unseenMessages: (root, args, { user }) => { const room = findChannelByIdAndUser({ params: { roomId: root._id, - userId: testUser + userId: user._id }, options: { fields: { unread: 1 }} }); @@ -167,6 +263,65 @@ const resolvers = { }, Member: { id: property('_id') + }, + Message: { + id: property('_id'), + content: property('msg'), + creationTime: property('ts'), + author: (root, args, { models }) => { + return models.Users.findOne(root.u._id); + }, + fromServer: (root) => typeof root.t !== 'undefined', // on a message sent by user `true` otherwise `false` + channelRef: (root, args, { models }) => { + if (!root.channels) { + return; + } + + return models.Rooms.find({ + _id: { + $in: root.channels.map(c => c._id) + } + }, { + sort: { + name: 1 + } + }).fetch(); + }, + userRef: (root, args, { models }) => { + if (!root.mentions) { + return; + } + + return models.Users.find({ + _id: { + $in: root.mentions.map(c => c._id) + } + }, { + sort: { + username: 1 + } + }).fetch(); + }, + reactions: (root) => { + if (!root.reactions || Object.keys(root.reactions).length === 0) { + return; + } + + const reactions = []; + + Object.keys(root.reactions).forEach(icon => { + root.reactions[icon].usernames.forEach(username => { + reactions.push({ + icon, + username + }); + }); + }); + + return reactions; + }, + // TODO + tags: () => {} } }; From b8687217af6242a8aa4466ca73b0a91406966a42 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 29 Jun 2017 20:17:49 +0100 Subject: [PATCH 003/212] WIP --- packages/rocketchat-graphql/server/schema.js | 98 +++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/packages/rocketchat-graphql/server/schema.js b/packages/rocketchat-graphql/server/schema.js index d60196d79faf..c89d5521ee52 100644 --- a/packages/rocketchat-graphql/server/schema.js +++ b/packages/rocketchat-graphql/server/schema.js @@ -4,7 +4,10 @@ import { makeExecutableSchema } from 'graphql-tools'; +import { Meteor } from 'meteor/meteor'; + import { authenticated } from './mocks/accounts/graphql-api'; + import AccountsServer from './mocks/accounts/server'; import { @@ -34,7 +37,11 @@ const schema = ` } type Mutation { + setStatus(status: UserStatus!): Member sendMessage(channelId: String!, content: String!): Message + editMessage(id: MessageIdentifier!, content: String!): Message + deleteMessage(id: MessageIdentifier!): Message + createChannel(name: String!, private: Boolean = false, readOnly: Boolean = false, membersId: [String!]): Channel } type Channel { @@ -72,9 +79,18 @@ const schema = ` sortBy: ChannelSort } + enum UserStatus { + ONLINE + AWAY + BUSY + INVISIBLE + } + type Member { id: String! name: String + # TODO: change to UserStatus + status: String } type MessagesWithCursor { @@ -83,10 +99,16 @@ const schema = ` messagesArray: [Message] } + input MessageIdentifier { + channelId: String! + messageId: String! + } + type Message { id: String author: Member content: String + channel: Channel creationTime: String fromServer: Boolean userRef: [Member] @@ -216,6 +238,76 @@ const resolvers = { } return messageReturn.message; + }), + editMessage: authenticated(AccountsServer, (root, { id, content }, { user, models }) => { + const msg = models.Messages.findOneById(id.messageId); + + //Ensure the message exists + if (!msg) { + throw new Error(`No message found with the id of "${ id.messageId }".`); + } + + if (id.channelId !== msg.rid) { + throw new Error('The channel id provided does not match where the message is from.'); + } + + //Permission checks are already done in the updateMessage method, so no need to duplicate them + Meteor.runAsUser(user._id, () => { + Meteor.call('updateMessage', { _id: msg._id, msg: content, rid: msg.rid }); + }); + + return models.Messages.findOneById(msg._id); + }), + deleteMessage: authenticated(AccountsServer, (root, { id }, { models, user }) => { + const msg = models.Messages.findOneById(id.messageId, { fields: { u: 1, rid: 1 }}); + + if (!msg) { + throw new Error(`No message found with the id of "${ id.messageId }".`); + } + + if (id.channelId !== msg.rid) { + throw new Error('The room id provided does not match where the message is from.'); + } + + Meteor.runAsUser(user._id, () => { + Meteor.call('deleteMessage', { _id: msg._id }); + }); + + return msg; + }), + setStatus: authenticated(AccountsServer, (root, { status }, { models, user }) => { + models.Users.update(user._id, { + $set: { + status: status.toLowerCase() + } + }); + + return models.Users.findOne(user._id); + }), + createChannel: authenticated(AccountsServer, (root, args, { models, user }) => { + if (!RocketChat.authz.hasPermission(user._id, 'create-c')) { + return RocketChat.API.v1.unauthorized(); + } + + if (!args.name) { + throw new Error('Param "name" is required'); + } + + if (args.membersId && !_.isArray(args.membersId)) { + throw new Error('Param "membersId" must be an array if provided'); + } + + let readOnly = false; + if (typeof args.readOnly !== 'undefined') { + readOnly = args.readOnly; + } + + let id; + Meteor.runAsUser(user._id, () => { + id = Meteor.call('createChannel', args.name, args.membersId ? args.membersId : [], readOnly); + }); + + return models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }); }) }, Channel: { @@ -262,7 +354,8 @@ const resolvers = { } }, Member: { - id: property('_id') + id: property('_id'), + status: ({status}) => status.toUpperCase() }, Message: { id: property('_id'), @@ -271,6 +364,9 @@ const resolvers = { author: (root, args, { models }) => { return models.Users.findOne(root.u._id); }, + channel: (root, args, { models }) => { + return models.Rooms.findOne(root.rid); + }, fromServer: (root) => typeof root.t !== 'undefined', // on a message sent by user `true` otherwise `false` channelRef: (root, args, { models }) => { if (!root.channels) { From c195f46ad570d96a208666a29993c5b86cafe8e8 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Fri, 30 Jun 2017 17:32:16 +0100 Subject: [PATCH 004/212] Separate features --- .../.npm/package/npm-shrinkwrap.json | 20 +- packages/rocketchat-graphql/package.js | 5 +- packages/rocketchat-graphql/server/schema.js | 390 +----------------- .../server/schemas/channels/Channel-type.js | 67 +++ .../schemas/channels/ChannelFilter-input.js | 8 + .../schemas/channels/ChannelSort-enum.js | 6 + .../server/schemas/channels/Privacy-enum.js | 7 + .../server/schemas/channels/channelByName.js | 27 ++ .../server/schemas/channels/channels.js | 51 +++ .../server/schemas/channels/channelsByUser.js | 33 ++ .../server/schemas/channels/createChannel.js | 41 ++ .../server/schemas/channels/index.js | 38 ++ .../server/schemas/channels/settings.js | 12 + .../server/schemas/messages/Message-type.js | 82 ++++ .../messages/MessageIdentifier-input.js | 6 + .../messages/MessagesWithCursor-type.js | 7 + .../server/schemas/messages/Reaction-type.js | 6 + .../server/schemas/messages/deleteMessage.js | 32 ++ .../server/schemas/messages/editMessage.js | 34 ++ .../server/schemas/messages/index.js | 38 ++ .../server/schemas/messages/messages.js | 34 ++ .../server/schemas/messages/sendMessage.js | 27 ++ 22 files changed, 591 insertions(+), 380 deletions(-) create mode 100644 packages/rocketchat-graphql/server/schemas/channels/Channel-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/channelByName.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/channels.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/createChannel.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/index.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/settings.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/Message-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/editMessage.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/index.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/messages.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/sendMessage.js diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 99bd39438b7f..1c663c3f6914 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -55,6 +55,11 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", "from": "debug@2.6.7" }, + "deepmerge": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.4.4.tgz", + "from": "deepmerge@>=1.3.2 <2.0.0" + }, "depd": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", @@ -141,9 +146,9 @@ "from": "graphql-tag@>=2.0.0 <3.0.0" }, "graphql-tools": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.0.0.tgz", - "from": "graphql-tools@1.0.0" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.1.0.tgz", + "from": "graphql-tools@1.1.0" }, "http-errors": { "version": "1.6.1", @@ -171,8 +176,8 @@ "from": "iterall@>=1.1.0 <2.0.0" }, "js-tokens": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", "from": "js-tokens@>=3.0.0 <4.0.0" }, "lodash": { @@ -200,6 +205,11 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "from": "merge-descriptors@1.0.1" }, + "merge-graphql-schemas": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-graphql-schemas/-/merge-graphql-schemas-1.1.0.tgz", + "from": "merge-graphql-schemas@1.1.0" + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js index 37791a9b9c39..3c29cdb70911 100644 --- a/packages/rocketchat-graphql/package.js +++ b/packages/rocketchat-graphql/package.js @@ -22,6 +22,7 @@ Npm.depends({ express: '4.15.3', graphql: '0.10.3', 'graphql-server-express': '0.9.0', - 'graphql-tools': '1.0.0', - 'body-parser': '1.17.2' + 'graphql-tools': '1.1.0', + 'body-parser': '1.17.2', + 'merge-graphql-schemas': '1.1.0' }); diff --git a/packages/rocketchat-graphql/server/schema.js b/packages/rocketchat-graphql/server/schema.js index c89d5521ee52..dd1fbb53097f 100644 --- a/packages/rocketchat-graphql/server/schema.js +++ b/packages/rocketchat-graphql/server/schema.js @@ -1,10 +1,8 @@ -/* global processWebhookMessage */ - import { makeExecutableSchema } from 'graphql-tools'; -import { Meteor } from 'meteor/meteor'; +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; import { authenticated } from './mocks/accounts/graphql-api'; @@ -14,69 +12,12 @@ import { property } from './helpers/property'; -import { - findChannelByIdAndUser -} from './helpers/findChannelByIdAndUser'; - - -const schema = ` - type schema { - query: Query - mutation: Mutation - } - - type Query { - channels(filter: ChannelFilter = { - privacy: ALL, - joinedChannels: false, - sortBy: NAME - }): [Channel] - channelByName(name: String!, isDirect: Boolean!): Channel - channelsByUser(userId: String!): [Channel] - messages(channelId: String): MessagesWithCursor - } +import * as channels from './schemas/channels'; +import * as messages from './schemas/messages'; +const rootSchema = ` type Mutation { setStatus(status: UserStatus!): Member - sendMessage(channelId: String!, content: String!): Message - editMessage(id: MessageIdentifier!, content: String!): Message - deleteMessage(id: MessageIdentifier!): Message - createChannel(name: String!, private: Boolean = false, readOnly: Boolean = false, membersId: [String!]): Channel - } - - type Channel { - id: String! - name: String - description: String - announcement: String - topic: String - members: [Member] - owners: [Member] - numberOfMembers: Int - numberOfMessages: Int - readOnly: Boolean - direct: Boolean - privateChannel: Boolean - favourite: Boolean - unseenMessages: Int - } - - enum Privacy { - PRIVATE - PUBLIC - ALL - } - - enum ChannelSort { - NAME - NUMBER_OF_MESSAGES - } - - input ChannelFilter { - nameFilter: String - privacy: Privacy - joinedChannels: Boolean - sortBy: ChannelSort } enum UserStatus { @@ -92,189 +33,10 @@ const schema = ` # TODO: change to UserStatus status: String } - - type MessagesWithCursor { - cursor: String - channel: Channel - messagesArray: [Message] - } - - input MessageIdentifier { - channelId: String! - messageId: String! - } - - type Message { - id: String - author: Member - content: String - channel: Channel - creationTime: String - fromServer: Boolean - userRef: [Member] - channelRef: [Channel] - reactions: [Reaction] - # TODO - tags: [String] - } - - type Reaction { - username: String - icon: String - } `; -const roomPublicFields = { - t: 1, - name: 1, - description: 1, - announcement: 1, - topic: 1, - usernames: 1, - msgs: 1, - ro: 1, - u: 1, - archived: 1 -}; - -const resolvers = { - Query: { - channels: authenticated(AccountsServer, (root, args, { models }) => { - const query = {}; - const options = { - sort: { - name: 1 - }, - fields: roomPublicFields - }; - - // Filter - if (typeof args.filter !== 'undefined') { - // sortBy - if (args.filter.sortBy === 'NUMBER_OF_MESSAGES') { - options.sort = { - msgs: -1 - }; - } - - // privacy - switch (args.filter.privacy) { - case 'PRIVATE': - query.t = 'p'; - break; - case 'PUBLIC': - query.t = { - $ne: 'p' - }; - break; - } - } - - return models.Rooms.find(query, options).fetch(); - }), - channelByName: authenticated(AccountsServer, (root, { name, isDirect }, { models }) => { - const query = { - name - }; - - if (isDirect === true) { - query.c = 'd'; - } - - return models.Rooms.findOne(query, { - fields: roomPublicFields - }); - }), - channelsByUser: authenticated(AccountsServer, (root, { userId }, { models }) => { - const user = models.Users.findOneById(userId); - - if (!user) { - // TODO: - throw new Error('No user'); - } - - return models.Rooms.find({ - 'usernames': { - $in: user.username - } - }, { - sort: { - name: 1 - }, - fields: roomPublicFields - }).fetch(); - }), - messages: authenticated(AccountsServer, (root, args, { models }) => { - if (!args.channelId) { - console.error('messages query must be called with channelId'); - return null; - } - - const query = {}; - - if (args.channelId) { - query.rid = args.channelId; - } - - const messagesArray = models.Messages.find(query).fetch(); - const channel = models.Rooms.findOne(args.channelId); - - return { - cursor: 'CURSOR', - channel, - messagesArray - }; - }) - }, +const rootResolvers = { Mutation: { - sendMessage: authenticated(AccountsServer, (root, { channelId, content }, { user }) => { - const messageReturn = processWebhookMessage({ - roomId: channelId, - text: content - }, user)[0]; - - if (!messageReturn) { - throw new Error('Unknown error'); - } - - return messageReturn.message; - }), - editMessage: authenticated(AccountsServer, (root, { id, content }, { user, models }) => { - const msg = models.Messages.findOneById(id.messageId); - - //Ensure the message exists - if (!msg) { - throw new Error(`No message found with the id of "${ id.messageId }".`); - } - - if (id.channelId !== msg.rid) { - throw new Error('The channel id provided does not match where the message is from.'); - } - - //Permission checks are already done in the updateMessage method, so no need to duplicate them - Meteor.runAsUser(user._id, () => { - Meteor.call('updateMessage', { _id: msg._id, msg: content, rid: msg.rid }); - }); - - return models.Messages.findOneById(msg._id); - }), - deleteMessage: authenticated(AccountsServer, (root, { id }, { models, user }) => { - const msg = models.Messages.findOneById(id.messageId, { fields: { u: 1, rid: 1 }}); - - if (!msg) { - throw new Error(`No message found with the id of "${ id.messageId }".`); - } - - if (id.channelId !== msg.rid) { - throw new Error('The room id provided does not match where the message is from.'); - } - - Meteor.runAsUser(user._id, () => { - Meteor.call('deleteMessage', { _id: msg._id }); - }); - - return msg; - }), setStatus: authenticated(AccountsServer, (root, { status }, { models, user }) => { models.Users.update(user._id, { $set: { @@ -283,144 +45,26 @@ const resolvers = { }); return models.Users.findOne(user._id); - }), - createChannel: authenticated(AccountsServer, (root, args, { models, user }) => { - if (!RocketChat.authz.hasPermission(user._id, 'create-c')) { - return RocketChat.API.v1.unauthorized(); - } - - if (!args.name) { - throw new Error('Param "name" is required'); - } - - if (args.membersId && !_.isArray(args.membersId)) { - throw new Error('Param "membersId" must be an array if provided'); - } - - let readOnly = false; - if (typeof args.readOnly !== 'undefined') { - readOnly = args.readOnly; - } - - let id; - Meteor.runAsUser(user._id, () => { - id = Meteor.call('createChannel', args.name, args.membersId ? args.membersId : [], readOnly); - }); - - return models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }); }) }, - Channel: { - id: property('_id'), - members: (root, args, { models }) => { - return root.usernames.map( - username => models.Users.findOneByUsername(username) - ); - }, - owners: (root, args, { models }) => { - // there might be no owner - if (!root.u) { - return; - } - - return [models.Users.findOneByUsername(root.u.username)]; - }, - numberOfMembers: (root) => (root.usernames || []).length, - numberOfMessages: property('msgs'), - readOnly: (root) => root.ro === true, - direct: (root) => root.t === 'd', - privateChannel: (root) => root.t === 'p', - favourite: (root, args, { user }) => { - const room = findChannelByIdAndUser({ - params: { - roomId: root._id, - userId: user._id - }, - options: { fields: { f: 1 }} - }); - - return room && room.f === true; - }, - unseenMessages: (root, args, { user }) => { - const room = findChannelByIdAndUser({ - params: { - roomId: root._id, - userId: user._id - }, - options: { fields: { unread: 1 }} - }); - - return (room || {}).unread; - } - }, Member: { id: property('_id'), status: ({status}) => status.toUpperCase() - }, - Message: { - id: property('_id'), - content: property('msg'), - creationTime: property('ts'), - author: (root, args, { models }) => { - return models.Users.findOne(root.u._id); - }, - channel: (root, args, { models }) => { - return models.Rooms.findOne(root.rid); - }, - fromServer: (root) => typeof root.t !== 'undefined', // on a message sent by user `true` otherwise `false` - channelRef: (root, args, { models }) => { - if (!root.channels) { - return; - } - - return models.Rooms.find({ - _id: { - $in: root.channels.map(c => c._id) - } - }, { - sort: { - name: 1 - } - }).fetch(); - }, - userRef: (root, args, { models }) => { - if (!root.mentions) { - return; - } - - return models.Users.find({ - _id: { - $in: root.mentions.map(c => c._id) - } - }, { - sort: { - username: 1 - } - }).fetch(); - }, - reactions: (root) => { - if (!root.reactions || Object.keys(root.reactions).length === 0) { - return; - } - - const reactions = []; - - Object.keys(root.reactions).forEach(icon => { - root.reactions[icon].usernames.forEach(username => { - reactions.push({ - icon, - username - }); - }); - }); - - return reactions; - }, - // TODO - tags: () => {} } }; +const schema = mergeTypes([ + rootSchema, + channels.schema, + messages.schema +]); + +const resolvers = mergeResolvers([ + rootResolvers, + channels.resolvers, + messages.resolvers +]); + export const executableSchema = makeExecutableSchema({ typeDefs: [schema], resolvers, diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js new file mode 100644 index 000000000000..0d6dbac4512f --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js @@ -0,0 +1,67 @@ +import { property } from '../../helpers/property'; +import { findChannelByIdAndUser } from '../../helpers/findChannelByIdAndUser'; + +export const schema = ` + type Channel { + id: String! + name: String + description: String + announcement: String + topic: String + members: [Member] + owners: [Member] + numberOfMembers: Int + numberOfMessages: Int + readOnly: Boolean + direct: Boolean + privateChannel: Boolean + favourite: Boolean + unseenMessages: Int + } +`; + +export const resolver = { + Channel: { + id: property('_id'), + members: (root, args, { models }) => { + return root.usernames.map( + username => models.Users.findOneByUsername(username) + ); + }, + owners: (root, args, { models }) => { + // there might be no owner + if (!root.u) { + return; + } + + return [models.Users.findOneByUsername(root.u.username)]; + }, + numberOfMembers: (root) => (root.usernames || []).length, + numberOfMessages: property('msgs'), + readOnly: (root) => root.ro === true, + direct: (root) => root.t === 'd', + privateChannel: (root) => root.t === 'p', + favourite: (root, args, { user }) => { + const room = findChannelByIdAndUser({ + params: { + roomId: root._id, + userId: user._id + }, + options: { fields: { f: 1 }} + }); + + return room && room.f === true; + }, + unseenMessages: (root, args, { user }) => { + const room = findChannelByIdAndUser({ + params: { + roomId: root._id, + userId: user._id + }, + options: { fields: { unread: 1 }} + }); + + return (room || {}).unread; + } + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js b/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js new file mode 100644 index 000000000000..b80d4c680a95 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js @@ -0,0 +1,8 @@ +export const schema = ` + input ChannelFilter { + nameFilter: String + privacy: Privacy + joinedChannels: Boolean + sortBy: ChannelSort + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js b/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js new file mode 100644 index 000000000000..beecdedd89ef --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js @@ -0,0 +1,6 @@ +export const schema = ` + enum ChannelSort { + NAME + NUMBER_OF_MESSAGES + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js b/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js new file mode 100644 index 000000000000..d0cd977a9470 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js @@ -0,0 +1,7 @@ +export const schema = ` + enum Privacy { + PRIVATE + PUBLIC + ALL + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js new file mode 100644 index 000000000000..9e0f0ca3c39c --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js @@ -0,0 +1,27 @@ +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; +import { roomPublicFields } from './settings'; + +export const schema = ` + type Query { + channelByName(name: String!, isDirect: Boolean!): Channel + } +`; + +export const resolver = { + Query: { + channelByName: authenticated(AccountsServer, (root, { name, isDirect }, { models }) => { + const query = { + name + }; + + if (isDirect === true) { + query.c = 'd'; + } + + return models.Rooms.findOne(query, { + fields: roomPublicFields + }); + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.js b/packages/rocketchat-graphql/server/schemas/channels/channels.js new file mode 100644 index 000000000000..f53979adf037 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/channels.js @@ -0,0 +1,51 @@ +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; +import { roomPublicFields } from './settings'; + +export const schema = ` + type Query { + channels(filter: ChannelFilter = { + privacy: ALL, + joinedChannels: false, + sortBy: NAME + }): [Channel] + } +`; + +export const resolver = { + Query: { + channels: authenticated(AccountsServer, (root, args, { models }) => { + const query = {}; + const options = { + sort: { + name: 1 + }, + fields: roomPublicFields + }; + + // Filter + if (typeof args.filter !== 'undefined') { + // sortBy + if (args.filter.sortBy === 'NUMBER_OF_MESSAGES') { + options.sort = { + msgs: -1 + }; + } + + // privacy + switch (args.filter.privacy) { + case 'PRIVATE': + query.t = 'p'; + break; + case 'PUBLIC': + query.t = { + $ne: 'p' + }; + break; + } + } + + return models.Rooms.find(query, options).fetch(); + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js new file mode 100644 index 000000000000..98a888fe8970 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js @@ -0,0 +1,33 @@ +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; +import { roomPublicFields } from './settings'; + +export const schema = ` + type Query { + channelsByUser(userId: String!): [Channel] + } +`; + +export const resolver = { + Query: { + channelsByUser: authenticated(AccountsServer, (root, { userId }, { models }) => { + const user = models.Users.findOneById(userId); + + if (!user) { + // TODO: + throw new Error('No user'); + } + + return models.Rooms.find({ + 'usernames': { + $in: user.username + } + }, { + sort: { + name: 1 + }, + fields: roomPublicFields + }).fetch(); + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js new file mode 100644 index 000000000000..736afdaf00c0 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js @@ -0,0 +1,41 @@ +import { Meteor } from 'meteor/meteor'; + +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + createChannel(name: String!, private: Boolean = false, readOnly: Boolean = false, membersId: [String!]): Channel + } +`; + +export const resolver = { + Mutation: { + createChannel: authenticated(AccountsServer, (root, args, { models, user }) => { + if (!RocketChat.authz.hasPermission(user._id, 'create-c')) { + return RocketChat.API.v1.unauthorized(); + } + + if (!args.name) { + throw new Error('Param "name" is required'); + } + + if (args.membersId && !_.isArray(args.membersId)) { + throw new Error('Param "membersId" must be an array if provided'); + } + + let readOnly = false; + if (typeof args.readOnly !== 'undefined') { + readOnly = args.readOnly; + } + + let id; + Meteor.runAsUser(user._id, () => { + id = Meteor.call('createChannel', args.name, args.membersId ? args.membersId : [], readOnly); + }); + + return models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }); + }) + } +}; + diff --git a/packages/rocketchat-graphql/server/schemas/channels/index.js b/packages/rocketchat-graphql/server/schemas/channels/index.js new file mode 100644 index 000000000000..25a1efcb4ebb --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/index.js @@ -0,0 +1,38 @@ +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; + +// queries +import * as channels from './channels'; +import * as channelByName from './channelByName'; +import * as channelsByUser from './channelsByUser'; +// mutations +import * as createChannel from './createChannel'; +// types +import * as channelType from './Channel-type'; +import * as channelSort from './ChannelSort-enum'; +import * as channelFilter from './ChannelFilter-input'; +import * as Privacy from './Privacy-enum'; + +export const schema = mergeTypes([ + // queries + channels.schema, + channelByName.schema, + channelsByUser.schema, + // mutations + createChannel.schema, + // types + channelType.schema, + channelSort.schema, + channelFilter.schema, + Privacy.schema +]); + +export const resolvers = mergeResolvers([ + // queries + channels.resolver, + channelByName.resolver, + channelsByUser.resolver, + // mutations + createChannel.resolver, + // types + channelType.resolver +]); diff --git a/packages/rocketchat-graphql/server/schemas/channels/settings.js b/packages/rocketchat-graphql/server/schemas/channels/settings.js new file mode 100644 index 000000000000..7cace07a7cbc --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/settings.js @@ -0,0 +1,12 @@ +export const roomPublicFields = { + t: 1, + name: 1, + description: 1, + announcement: 1, + topic: 1, + usernames: 1, + msgs: 1, + ro: 1, + u: 1, + archived: 1 +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js new file mode 100644 index 000000000000..9513feb12e10 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -0,0 +1,82 @@ +import { property } from '../../helpers/property'; + +export const schema = ` + type Message { + id: String + author: Member + content: String + channel: Channel + creationTime: String + fromServer: Boolean + userRef: [Member] + channelRef: [Channel] + reactions: [Reaction] + # TODO + tags: [String] + } +`; + +export const resolver = { + Message: { + id: property('_id'), + content: property('msg'), + creationTime: property('ts'), + author: (root, args, { models }) => { + return models.Users.findOne(root.u._id); + }, + channel: (root, args, { models }) => { + return models.Rooms.findOne(root.rid); + }, + fromServer: (root) => typeof root.t !== 'undefined', // on a message sent by user `true` otherwise `false` + channelRef: (root, args, { models }) => { + if (!root.channels) { + return; + } + + return models.Rooms.find({ + _id: { + $in: root.channels.map(c => c._id) + } + }, { + sort: { + name: 1 + } + }).fetch(); + }, + userRef: (root, args, { models }) => { + if (!root.mentions) { + return; + } + + return models.Users.find({ + _id: { + $in: root.mentions.map(c => c._id) + } + }, { + sort: { + username: 1 + } + }).fetch(); + }, + reactions: (root) => { + if (!root.reactions || Object.keys(root.reactions).length === 0) { + return; + } + + const reactions = []; + + Object.keys(root.reactions).forEach(icon => { + root.reactions[icon].usernames.forEach(username => { + reactions.push({ + icon, + username + }); + }); + }); + + return reactions; + }, + // TODO + tags: () => {} + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js b/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js new file mode 100644 index 000000000000..bb8571477bfe --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js @@ -0,0 +1,6 @@ +export const schema = ` + input MessageIdentifier { + channelId: String! + messageId: String! + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js b/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js new file mode 100644 index 000000000000..b70b287321b8 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js @@ -0,0 +1,7 @@ +export const schema = ` + type MessagesWithCursor { + cursor: String + channel: Channel + messagesArray: [Message] + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js b/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js new file mode 100644 index 000000000000..c337f52ce6bf --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js @@ -0,0 +1,6 @@ +export const schema = ` + type Reaction { + username: String + icon: String + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js new file mode 100644 index 000000000000..0b941817a8dd --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js @@ -0,0 +1,32 @@ +import { Meteor } from 'meteor/meteor'; + +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + deleteMessage(id: MessageIdentifier!): Message + } +`; + +export const resolver = { + Mutation: { + deleteMessage: authenticated(AccountsServer, (root, { id }, { models, user }) => { + const msg = models.Messages.findOneById(id.messageId, { fields: { u: 1, rid: 1 }}); + + if (!msg) { + throw new Error(`No message found with the id of "${ id.messageId }".`); + } + + if (id.channelId !== msg.rid) { + throw new Error('The room id provided does not match where the message is from.'); + } + + Meteor.runAsUser(user._id, () => { + Meteor.call('deleteMessage', { _id: msg._id }); + }); + + return msg; + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js new file mode 100644 index 000000000000..6eacb619f51d --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js @@ -0,0 +1,34 @@ +import { Meteor } from 'meteor/meteor'; + +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + editMessage(id: MessageIdentifier!, content: String!): Message + } +`; + +export const resolver = { + Mutation: { + editMessage: authenticated(AccountsServer, (root, { id, content }, { user, models }) => { + const msg = models.Messages.findOneById(id.messageId); + + //Ensure the message exists + if (!msg) { + throw new Error(`No message found with the id of "${ id.messageId }".`); + } + + if (id.channelId !== msg.rid) { + throw new Error('The channel id provided does not match where the message is from.'); + } + + //Permission checks are already done in the updateMessage method, so no need to duplicate them + Meteor.runAsUser(user._id, () => { + Meteor.call('updateMessage', { _id: msg._id, msg: content, rid: msg.rid }); + }); + + return models.Messages.findOneById(msg._id); + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/index.js b/packages/rocketchat-graphql/server/schemas/messages/index.js new file mode 100644 index 000000000000..438930fe8698 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/index.js @@ -0,0 +1,38 @@ +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; + +// queries +import * as messages from './messages'; +// mutations +import * as sendMessage from './sendMessage'; +import * as editMessage from './editMessage'; +import * as deleteMessage from './deleteMessage'; +// types +import * as MessageType from './Message-type'; +import * as MessagesWithCursorType from './MessagesWithCursor-type'; +import * as MessageIdentifier from './MessageIdentifier-input'; +import * as ReactionType from './Reaction-type'; + +export const schema = mergeTypes([ + // queries + messages.schema, + // mutations + sendMessage.schema, + editMessage.schema, + deleteMessage.schema, + // types + MessageType.schema, + MessagesWithCursorType.schema, + MessageIdentifier.schema, + ReactionType.schema +]); + +export const resolvers = mergeResolvers([ + // queries + messages.resolver, + // mutations + sendMessage.resolver, + editMessage.resolver, + deleteMessage.resolver, + // types + MessageType.resolver +]); diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/schemas/messages/messages.js new file mode 100644 index 000000000000..84d0509f0fdc --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.js @@ -0,0 +1,34 @@ +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Query { + messages(channelId: String): MessagesWithCursor + } +`; + +export const resolver = { + Query: { + messages: authenticated(AccountsServer, (root, args, { models }) => { + if (!args.channelId) { + console.error('messages query must be called with channelId'); + return null; + } + + const query = {}; + + if (args.channelId) { + query.rid = args.channelId; + } + + const messagesArray = models.Messages.find(query).fetch(); + const channel = models.Rooms.findOne(args.channelId); + + return { + cursor: 'CURSOR', + channel, + messagesArray + }; + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js new file mode 100644 index 000000000000..ed675ce002d8 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js @@ -0,0 +1,27 @@ +/* global processWebhookMessage */ + +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + sendMessage(channelId: String!, content: String!): Message + } +`; + +export const resolver = { + Mutation: { + sendMessage: authenticated(AccountsServer, (root, { channelId, content }, { user }) => { + const messageReturn = processWebhookMessage({ + roomId: channelId, + text: content + }, user)[0]; + + if (!messageReturn) { + throw new Error('Unknown error'); + } + + return messageReturn.message; + }) + } +}; From 373e8e56afcc51d41a1c94ee4c752e01c55f1d13 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Sat, 1 Jul 2017 15:20:05 +0100 Subject: [PATCH 005/212] Support nameFilter in channels query --- .../rocketchat-graphql/server/schemas/channels/channels.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.js b/packages/rocketchat-graphql/server/schemas/channels/channels.js index f53979adf037..4fa4dbfe224a 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channels.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channels.js @@ -25,6 +25,13 @@ export const resolver = { // Filter if (typeof args.filter !== 'undefined') { + // nameFilter + if (typeof args.filter.nameFilter !== undefined) { + query.name = { + $regex: new RegExp(args.filter.nameFilter, 'i') + }; + } + // sortBy if (args.filter.sortBy === 'NUMBER_OF_MESSAGES') { options.sort = { From 858a9c09ea33189d07b0efcc144ae22f187f8ee5 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 19 Jul 2017 17:03:30 +0100 Subject: [PATCH 006/212] WIP --- .meteor/packages | 1 + .meteor/versions | 1 + .../.npm/package/.gitignore | 1 + .../rocketchat-accounts/.npm/package/README | 7 + .../.npm/package/npm-shrinkwrap.json | 236 ++++++++++++++++++ packages/rocketchat-accounts/package.js | 23 ++ packages/rocketchat-accounts/server/config.js | 21 ++ packages/rocketchat-accounts/server/index.js | 7 + .../.npm/package/npm-shrinkwrap.json | 175 ++++++++++++- packages/rocketchat-graphql/package.js | 18 +- packages/rocketchat-graphql/server/api.js | 21 +- .../server/mocks/accounts/server.js | 2 +- packages/rocketchat-graphql/server/schema.js | 58 +---- .../schemas/accounts/LoginResult-type.js | 6 + .../server/schemas/accounts/index.js | 8 + .../accounts/loginWithServiceAccessToken.js | 32 +++ .../server/schemas/channels/Channel-type.js | 4 +- .../channels/ChannelNameAndDirect-input.js | 6 + .../server/schemas/channels/channels.js | 3 + .../server/schemas/channels/createChannel.js | 7 +- .../server/schemas/channels/hideChannel.js | 41 +++ .../server/schemas/channels/index.js | 24 +- .../server/schemas/channels/leaveChannel.js | 31 +++ .../server/schemas/messages/Message-type.js | 4 +- .../schemas/messages/addReactionToMessage.js | 24 ++ .../schemas/messages/chatMessageAdded.js | 29 +++ .../server/schemas/messages/index.js | 9 + .../server/schemas/messages/messages.js | 68 ++++- .../server/schemas/users/User-type.js | 36 +++ .../server/schemas/users/UserStatus-enum.js | 9 + .../server/schemas/users/index.js | 22 ++ .../server/schemas/users/setStatus.js | 22 ++ .../server/subscriptions.js | 3 + packages/rocketchat-lib/package.js | 1 + 34 files changed, 866 insertions(+), 94 deletions(-) create mode 100644 packages/rocketchat-accounts/.npm/package/.gitignore create mode 100644 packages/rocketchat-accounts/.npm/package/README create mode 100644 packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json create mode 100644 packages/rocketchat-accounts/package.js create mode 100644 packages/rocketchat-accounts/server/config.js create mode 100644 packages/rocketchat-accounts/server/index.js create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/index.js create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/hideChannel.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.js create mode 100644 packages/rocketchat-graphql/server/schemas/users/User-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js create mode 100644 packages/rocketchat-graphql/server/schemas/users/index.js create mode 100644 packages/rocketchat-graphql/server/schemas/users/setStatus.js create mode 100644 packages/rocketchat-graphql/server/subscriptions.js diff --git a/.meteor/packages b/.meteor/packages index 53fb9389b819..c2f5c2bc98e6 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -38,6 +38,7 @@ tracker@1.1.3 rocketchat:2fa rocketchat:action-links +rocketchat:accounts rocketchat:analytics rocketchat:api rocketchat:assets diff --git a/.meteor/versions b/.meteor/versions index 5ceb7cee121a..253d100b0338 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -123,6 +123,7 @@ reactive-var@1.0.11 reload@1.1.11 retry@1.0.9 rocketchat:2fa@0.0.1 +rocketchat:accounts@0.0.1 rocketchat:action-links@0.0.1 rocketchat:analytics@0.0.2 rocketchat:api@0.0.1 diff --git a/packages/rocketchat-accounts/.npm/package/.gitignore b/packages/rocketchat-accounts/.npm/package/.gitignore new file mode 100644 index 000000000000..3c3629e647f5 --- /dev/null +++ b/packages/rocketchat-accounts/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/rocketchat-accounts/.npm/package/README b/packages/rocketchat-accounts/.npm/package/README new file mode 100644 index 000000000000..3d492553a438 --- /dev/null +++ b/packages/rocketchat-accounts/.npm/package/README @@ -0,0 +1,7 @@ +This directory and the files immediately inside it are automatically generated +when you change this package's NPM dependencies. Commit the files in this +directory (npm-shrinkwrap.json, .gitignore, and this README) to source control +so that others run the same versions of sub-dependencies. + +You should NOT check in the node_modules directory that Meteor automatically +creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json new file mode 100644 index 000000000000..0ff3f7f21819 --- /dev/null +++ b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,236 @@ +{ + "dependencies": { + "addressparser": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-0.3.2.tgz", + "from": "addressparser@>=0.3.2 <0.4.0" + }, + "babel-polyfill": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", + "from": "babel-polyfill@>=6.23.0 <7.0.0" + }, + "babel-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", + "from": "babel-runtime@>=6.22.0 <7.0.0" + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "from": "base64url@>=2.0.0 <3.0.0" + }, + "bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "from": "bcryptjs@>=2.4.0 <3.0.0" + }, + "bson": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.4.tgz", + "from": "bson@>=1.0.4 <1.1.0" + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "from": "buffer-equal-constant-time@1.0.1" + }, + "buffer-shims": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "from": "buffer-shims@>=1.0.0 <1.1.0" + }, + "bufferjs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bufferjs/-/bufferjs-1.1.0.tgz", + "from": "bufferjs@1.1.0" + }, + "core-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "from": "core-js@>=2.4.0 <3.0.0" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "from": "core-util-is@>=1.0.0 <1.1.0" + }, + "crypto": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz", + "from": "crypto@>=0.0.3 <0.0.4" + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "from": "ecdsa-sig-formatter@1.0.9" + }, + "emailjs": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/emailjs/-/emailjs-1.0.11.tgz", + "from": "emailjs@>=1.0.8 <2.0.0" + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "from": "encoding@>=0.1.0 <0.2.0" + }, + "es6-promise": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz", + "from": "es6-promise@3.2.1" + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "from": "hoek@>=2.0.0 <3.0.0" + }, + "iconv-lite": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", + "from": "iconv-lite@>=0.4.13 <0.5.0" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "from": "inherits@>=2.0.1 <2.1.0" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "from": "isarray@>=1.0.0 <1.1.0" + }, + "isemail": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "from": "isemail@>=1.0.0 <2.0.0" + }, + "joi": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "from": "joi@>=6.10.1 <7.0.0" + }, + "jsonwebtoken": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.1.tgz", + "from": "jsonwebtoken@>=7.2.1 <8.0.0" + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "from": "jwa@>=1.1.4 <2.0.0" + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "from": "jws@>=3.1.4 <4.0.0" + }, + "jwt-decode": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", + "from": "jwt-decode@>=2.1.0 <3.0.0" + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "from": "lodash@>=4.16.4 <5.0.0" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "from": "lodash.once@>=4.0.0 <5.0.0" + }, + "mimelib": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/mimelib/-/mimelib-0.2.14.tgz", + "from": "mimelib@0.2.14", + "dependencies": { + "addressparser": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-0.2.1.tgz", + "from": "addressparser@>=0.2.0 <0.3.0" + } + } + }, + "moment": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.11.2.tgz", + "from": "moment@2.11.2" + }, + "mongodb": { + "version": "2.2.30", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.30.tgz", + "from": "mongodb@>=2.2.22 <3.0.0" + }, + "mongodb-core": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.14.tgz", + "from": "mongodb-core@2.1.14" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "from": "ms@>=2.0.0 <3.0.0" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "from": "process-nextick-args@>=1.0.6 <1.1.0" + }, + "readable-stream": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz", + "from": "readable-stream@2.2.7" + }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "from": "regenerator-runtime@>=0.10.0 <0.11.0" + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "from": "require_optional@>=1.0.0 <1.1.0" + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "from": "resolve-from@>=2.0.0 <3.0.0" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "from": "safe-buffer@>=5.0.1 <6.0.0" + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "from": "semver@>=5.1.0 <6.0.0" + }, + "starttls": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/starttls/-/starttls-1.0.1.tgz", + "from": "starttls@1.0.1" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "from": "string_decoder@>=1.0.0 <1.1.0" + }, + "topo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", + "from": "topo@>=1.0.0 <2.0.0" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "from": "util-deprecate@>=1.0.1 <1.1.0" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "from": "xtend@>=4.0.1 <5.0.0" + } + } +} diff --git a/packages/rocketchat-accounts/package.js b/packages/rocketchat-accounts/package.js new file mode 100644 index 000000000000..ad3d2abb5687 --- /dev/null +++ b/packages/rocketchat-accounts/package.js @@ -0,0 +1,23 @@ +Package.describe({ + name: 'rocketchat:accounts', + version: '0.0.1', + summary: 'JS-Accounts integration', + git: '' +}); + +Package.onUse(function(api) { + api.use([ + 'underscore', + 'ecmascript' + ]); + + api.use('mongo', ['client', 'server']); + + api.mainModule('server/index.js', 'server'); +}); + +Npm.depends({ + '@accounts/server': '0.0.17', + '@accounts/mongo': '0.0.12-0', + '@accounts/meteor-adapter': '0.1.1' +}); diff --git a/packages/rocketchat-accounts/server/config.js b/packages/rocketchat-accounts/server/config.js new file mode 100644 index 000000000000..a9c215fdbd77 --- /dev/null +++ b/packages/rocketchat-accounts/server/config.js @@ -0,0 +1,21 @@ +import AccountsServer from '@accounts/server'; +import MongoAdapter from '@accounts/mongo'; +import { MongoInternals } from 'meteor/mongo'; +import { Meteor } from 'meteor/meteor'; + +Meteor.startup(() => { + const mongodb = MongoInternals.defaultRemoteCollectionDriver().mongo.db; + + const mongoAdapter = new MongoAdapter(mongodb); + + AccountsServer.config({ + tokenConfigs: { + accessToken: { + expiresIn: '3d' + }, + refreshToken: { + expiresIn: '30d' + } + } + }, mongoAdapter); +}); diff --git a/packages/rocketchat-accounts/server/index.js b/packages/rocketchat-accounts/server/index.js new file mode 100644 index 000000000000..7e25e6061c78 --- /dev/null +++ b/packages/rocketchat-accounts/server/index.js @@ -0,0 +1,7 @@ +import './config'; + +import AccountsServer from '@accounts/server'; + +export { + AccountsServer +}; diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 1c663c3f6914..9d5e2541f031 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -15,11 +15,36 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "from": "array-flatten@1.1.1" }, + "babel-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", + "from": "babel-runtime@>=6.23.0 <7.0.0" + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "from": "backo2@>=1.0.2 <2.0.0" + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "from": "base64url@>=2.0.0 <3.0.0" + }, + "bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "from": "bcryptjs@>=2.4.0 <3.0.0" + }, "body-parser": { "version": "1.17.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", "from": "body-parser@1.17.2" }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "from": "buffer-equal-constant-time@1.0.1" + }, "bytes": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", @@ -45,19 +70,29 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "from": "cookie-signature@1.0.6" }, + "core-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "from": "core-js@>=2.4.0 <3.0.0" + }, "cors": { "version": "2.8.3", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.3.tgz", "from": "cors@2.8.3" }, + "crypto": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz", + "from": "crypto@>=0.0.3 <0.0.4" + }, "debug": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", "from": "debug@2.6.7" }, "deepmerge": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.4.4.tgz", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.0.tgz", "from": "deepmerge@>=1.3.2 <2.0.0" }, "depd": { @@ -75,6 +110,11 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "from": "destroy@>=1.0.4 <1.1.0" }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "from": "ecdsa-sig-formatter@1.0.9" + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -85,6 +125,11 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", "from": "encodeurl@>=1.0.1 <1.1.0" }, + "es6-promise": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", + "from": "es6-promise@>=4.0.5 <5.0.0" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -95,6 +140,11 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", "from": "etag@>=1.8.0 <1.9.0" }, + "eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", + "from": "eventemitter3@>=2.0.3 <3.0.0" + }, "express": { "version": "4.15.3", "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", @@ -140,6 +190,11 @@ "resolved": "https://registry.npmjs.org/graphql-server-module-graphiql/-/graphql-server-module-graphiql-0.9.0.tgz", "from": "graphql-server-module-graphiql@>=0.9.0 <0.10.0" }, + "graphql-subscriptions": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.4.4.tgz", + "from": "graphql-subscriptions@0.4.4" + }, "graphql-tag": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.4.2.tgz", @@ -150,6 +205,11 @@ "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.1.0.tgz", "from": "graphql-tools@1.1.0" }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "from": "hoek@>=2.0.0 <3.0.0" + }, "http-errors": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", @@ -170,26 +230,76 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", "from": "ipaddr.js@1.3.0" }, + "isemail": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "from": "isemail@>=1.0.0 <2.0.0" + }, "iterall": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.1.1.tgz", "from": "iterall@>=1.1.0 <2.0.0" }, + "joi": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "from": "joi@>=6.10.1 <7.0.0" + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", "from": "js-tokens@>=3.0.0 <4.0.0" }, + "jsonwebtoken": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.1.tgz", + "from": "jsonwebtoken@>=7.2.1 <8.0.0" + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "from": "jwa@>=1.1.4 <2.0.0" + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "from": "jws@>=3.1.4 <4.0.0" + }, + "jwt-decode": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", + "from": "jwt-decode@>=2.1.0 <3.0.0" + }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "from": "lodash@>=4.2.1 <5.0.0" + "from": "lodash@>=4.16.4 <5.0.0" }, "lodash-es": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz", "from": "lodash-es@>=4.2.1 <5.0.0" }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "from": "lodash.assign@>=4.2.0 <5.0.0" + }, + "lodash.isobject": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", + "from": "lodash.isobject@>=3.0.2 <4.0.0" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "from": "lodash.isstring@>=4.0.1 <5.0.0" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "from": "lodash.once@>=4.0.0 <5.0.0" + }, "loose-envify": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", @@ -228,12 +338,17 @@ "mime-types": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "from": "mime-types@>=2.1.11 <2.2.0" + "from": "mime-types@>=2.1.15 <2.2.0" + }, + "moment": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "from": "moment@>=2.0.0 <3.0.0" }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "from": "ms@2.0.0" + "from": "ms@>=2.0.0 <3.0.0" }, "negotiator": { "version": "0.6.1", @@ -281,10 +396,20 @@ "from": "raw-body@>=2.2.0 <2.3.0" }, "redux": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.1.tgz", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", "from": "redux@>=3.4.0 <4.0.0" }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "from": "regenerator-runtime@>=0.10.0 <0.11.0" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "from": "safe-buffer@>=5.0.1 <6.0.0" + }, "send": { "version": "0.15.3", "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", @@ -303,22 +428,37 @@ "statuses": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "from": "statuses@>=1.3.1 <1.4.0" + "from": "statuses@>=1.3.1 <2.0.0" + }, + "subscriptions-transport-ws": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.1.tgz", + "from": "subscriptions-transport-ws@0.8.1" }, "symbol-observable": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", "from": "symbol-observable@>=1.0.2 <2.0.0" }, + "topo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", + "from": "topo@>=1.0.0 <2.0.0" + }, "type-is": { "version": "1.6.15", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", "from": "type-is@>=1.6.15 <1.7.0" }, + "ultron": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz", + "from": "ultron@>=1.1.0 <1.2.0" + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "from": "unpipe@>=1.0.0 <1.1.0" + "from": "unpipe@1.0.0" }, "utils-merge": { "version": "1.0.0", @@ -339,6 +479,23 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", "from": "whatwg-fetch@>=2.0.0 <3.0.0" + }, + "ws": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.0.0.tgz", + "from": "ws@>=3.0.0 <4.0.0", + "dependencies": { + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "from": "safe-buffer@>=5.0.1 <5.1.0" + } + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "from": "xtend@>=4.0.1 <5.0.0" } } } diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js index 3c29cdb70911..24f1b58779af 100644 --- a/packages/rocketchat-graphql/package.js +++ b/packages/rocketchat-graphql/package.js @@ -10,19 +10,23 @@ Package.onUse(function(api) { 'underscore', 'ecmascript', 'rocketchat:lib', - 'rocketchat:api' + 'rocketchat:api', + 'rocketchat:accounts' ]); - api.addFiles('server/api.js', 'server'); + api.mainModule('server/api.js', 'server'); }); Npm.depends({ + '@accounts/graphql-api': '0.1.1', 'apollo-client': '1.6.0', - cors: '2.8.3', - express: '4.15.3', - graphql: '0.10.3', + 'cors': '2.8.3', + 'body-parser': '1.17.2', + 'express': '4.15.3', + 'graphql': '0.10.3', 'graphql-server-express': '0.9.0', + 'graphql-subscriptions': '0.4.4', 'graphql-tools': '1.1.0', - 'body-parser': '1.17.2', - 'merge-graphql-schemas': '1.1.0' + 'merge-graphql-schemas': '1.1.0', + 'subscriptions-transport-ws': '0.8.1' }); diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index 040845247a44..069ada537a9b 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -1,4 +1,7 @@ import { graphqlExpress, graphiqlExpress } from 'graphql-server-express'; +import { JSAccountsContext as jsAccountsContext } from '@accounts/graphql-api'; +import { SubscriptionServer } from 'subscriptions-transport-ws'; +import { execute, subscribe } from 'graphql'; import bodyParser from 'body-parser'; import express from 'express'; import cors from 'cors'; @@ -16,11 +19,11 @@ graphQLServer.use(bodyParser.urlencoded({ extended: true })); graphQLServer.use( '/graphql', bodyParser.json(), - graphqlExpress(() => ({ + graphqlExpress(request => ({ schema: executableSchema, - context: { + context: Object.assign({ models: RocketChat.models - }, + }, jsAccountsContext(request)), formatError: e => ({ message: e.message, locations: e.locations, @@ -30,9 +33,19 @@ graphQLServer.use( }))); graphQLServer.use('/graphiql', graphiqlExpress({ - endpointURL: '/graphql' + endpointURL: '/graphql', + subscriptionsEndpoint: 'ws://localhost:3000/subscriptions' })); +new SubscriptionServer({ + schema: executableSchema, + execute, + subscribe +}, +{ + path: '/subscriptions', + server: WebApp.httpServer +}); // this binds the specified paths to the Express server running Apollo + GraphiQL WebApp.connectHandlers.use(graphQLServer); diff --git a/packages/rocketchat-graphql/server/mocks/accounts/server.js b/packages/rocketchat-graphql/server/mocks/accounts/server.js index 2d472b58e125..d44d2d09efae 100644 --- a/packages/rocketchat-graphql/server/mocks/accounts/server.js +++ b/packages/rocketchat-graphql/server/mocks/accounts/server.js @@ -7,7 +7,7 @@ const AccountsServer = { } // User credentials // mys:admin - return RocketChat.models.Users.findOneById('fnw4B4suFsTXf8rZq'); + return RocketChat.models.Users.findOne({username: 'mys'}); } }; diff --git a/packages/rocketchat-graphql/server/schema.js b/packages/rocketchat-graphql/server/schema.js index dd1fbb53097f..3ee5b41532fa 100644 --- a/packages/rocketchat-graphql/server/schema.js +++ b/packages/rocketchat-graphql/server/schema.js @@ -4,65 +4,23 @@ import { import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; -import { authenticated } from './mocks/accounts/graphql-api'; - -import AccountsServer from './mocks/accounts/server'; - -import { - property -} from './helpers/property'; - import * as channels from './schemas/channels'; import * as messages from './schemas/messages'; - -const rootSchema = ` - type Mutation { - setStatus(status: UserStatus!): Member - } - - enum UserStatus { - ONLINE - AWAY - BUSY - INVISIBLE - } - - type Member { - id: String! - name: String - # TODO: change to UserStatus - status: String - } -`; - -const rootResolvers = { - Mutation: { - setStatus: authenticated(AccountsServer, (root, { status }, { models, user }) => { - models.Users.update(user._id, { - $set: { - status: status.toLowerCase() - } - }); - - return models.Users.findOne(user._id); - }) - }, - Member: { - id: property('_id'), - status: ({status}) => status.toUpperCase() - } -}; +import * as accounts from './schemas/accounts'; +import * as users from './schemas/users'; const schema = mergeTypes([ - rootSchema, channels.schema, - messages.schema + messages.schema, + accounts.schema, + users.schema ]); const resolvers = mergeResolvers([ - rootResolvers, channels.resolvers, - messages.resolvers + messages.resolvers, + accounts.resolvers, + users.resolvers ]); export const executableSchema = makeExecutableSchema({ diff --git a/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js b/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js new file mode 100644 index 000000000000..4a0a7c8397b4 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js @@ -0,0 +1,6 @@ +export const schema = ` + type LoginResult { + accessToken: String! + refreshToken: String! + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/index.js b/packages/rocketchat-graphql/server/schemas/accounts/index.js new file mode 100644 index 000000000000..cf41ed398f04 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/index.js @@ -0,0 +1,8 @@ +import { createJSAccountsGraphQL } from '@accounts/graphql-api'; +import { AccountsServer } from 'meteor/rocketchat:accounts'; + +const accountsGraphQL = createJSAccountsGraphQL(AccountsServer); + +export const schema = accountsGraphQL.schema; + +export const resolvers = accountsGraphQL.extendWithResolvers({}); diff --git a/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js b/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js new file mode 100644 index 000000000000..26d95f49c0cf --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js @@ -0,0 +1,32 @@ +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + loginWithServiceAccessToken(service: String!, accessToken: String!): LoginResult + } +`; + +export const resolver = { + Mutation: { + loginWithServiceAccessToken: async(root, { service, accessToken }) => { + try { + const userData = await oauthResolver.getUserDataFromService(accessToken, service); + const accountsServer = AccountsServer; + const user = await oauthResolver.getUserFromServiceUserData(service, userData); + + if (!user) { + return null; + } + + const loginResult = await accountsServer.loginWithUser(user); + + return { + refreshToken: loginResult.tokens.refreshToken, + accessToken: loginResult.tokens.accessToken + }; + } catch (e) { + console.error('Failed to login with service', e); + } + } + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js index 0d6dbac4512f..9d394c536aae 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js +++ b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js @@ -8,8 +8,8 @@ export const schema = ` description: String announcement: String topic: String - members: [Member] - owners: [Member] + members: [User] + owners: [User] numberOfMembers: Int numberOfMessages: Int readOnly: Boolean diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js b/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js new file mode 100644 index 000000000000..f3bbda3125d1 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js @@ -0,0 +1,6 @@ +export const schema = ` + input ChannelNameAndDirect { + name: String! + direct: Boolean! + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.js b/packages/rocketchat-graphql/server/schemas/channels/channels.js index 4fa4dbfe224a..61a8535da41d 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channels.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channels.js @@ -50,6 +50,9 @@ export const resolver = { }; break; } + + // joinedChannels + // TODO: } return models.Rooms.find(query, options).fetch(); diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js index 736afdaf00c0..e7fe0ce09a16 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js @@ -5,7 +5,12 @@ import AccountsServer from '../../mocks/accounts/server'; export const schema = ` type Mutation { - createChannel(name: String!, private: Boolean = false, readOnly: Boolean = false, membersId: [String!]): Channel + createChannel( + name: String!, + private: Boolean = false, + readOnly: Boolean = false, + membersId: [String!] + ): Channel } `; diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js new file mode 100644 index 000000000000..95a8e0f0486f --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js @@ -0,0 +1,41 @@ +import { Meteor } from 'meteor/meteor'; + +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + hideChannel(channelId: String!): Boolean + } +`; + +export const resolver = { + Mutation: { + hideChannel: authenticated(AccountsServer, (root, args, { models, user }) => { + const channel = models.Rooms.findOne({ + _id: args.channelId, + t: 'c' + }); + + if (!channel) { + throw new Error('error-room-not-found', 'The required "channelId" param provided does not match any channel'); + } + + const sub = models.Subscriptions.findOneByRoomIdAndUserId(channel._id, user._id); + + if (!sub) { + throw new Error(`The user/callee is not in the channel "${ channel.name }.`); + } + + if (!sub.open) { + throw new Error(`The channel, ${ channel.name }, is already closed to the sender`); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call('hideRoom', channel._id); + }); + + return true; + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/index.js b/packages/rocketchat-graphql/server/schemas/channels/index.js index 25a1efcb4ebb..aa340a0030c5 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/index.js +++ b/packages/rocketchat-graphql/server/schemas/channels/index.js @@ -6,11 +6,14 @@ import * as channelByName from './channelByName'; import * as channelsByUser from './channelsByUser'; // mutations import * as createChannel from './createChannel'; +import * as leaveChannel from './leaveChannel'; +import * as hideChannel from './hideChannel'; // types -import * as channelType from './Channel-type'; -import * as channelSort from './ChannelSort-enum'; -import * as channelFilter from './ChannelFilter-input'; +import * as ChannelType from './Channel-type'; +import * as ChannelSort from './ChannelSort-enum'; +import * as ChannelFilter from './ChannelFilter-input'; import * as Privacy from './Privacy-enum'; +import * as ChannelNameAndDirect from './ChannelNameAndDirect-input'; export const schema = mergeTypes([ // queries @@ -19,11 +22,14 @@ export const schema = mergeTypes([ channelsByUser.schema, // mutations createChannel.schema, + leaveChannel.schema, + hideChannel.schema, // types - channelType.schema, - channelSort.schema, - channelFilter.schema, - Privacy.schema + ChannelType.schema, + ChannelSort.schema, + ChannelFilter.schema, + Privacy.schema, + ChannelNameAndDirect.schema ]); export const resolvers = mergeResolvers([ @@ -33,6 +39,8 @@ export const resolvers = mergeResolvers([ channelsByUser.resolver, // mutations createChannel.resolver, + leaveChannel.resolver, + hideChannel.resolver, // types - channelType.resolver + ChannelType.resolver ]); diff --git a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js new file mode 100644 index 000000000000..d20c6042b0e9 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js @@ -0,0 +1,31 @@ +import { Meteor } from 'meteor/meteor'; + +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + leaveChannel(channelId: String!): Boolean + } +`; + +export const resolver = { + Mutation: { + leaveChannel: authenticated(AccountsServer, (root, args, { models, user }) => { + const channel = models.Rooms.findOne({ + _id: args.channelId, + t: 'c' + }); + + if (!channel) { + throw new Error('error-room-not-found', 'The required "channelId" param provided does not match any channel'); + } + + Meteor.runAsUser(user._id, () => { + Meteor.call('leaveRoom', channel._id); + }); + + return true; + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js index 9513feb12e10..3c6a1f0b34be 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -3,12 +3,12 @@ import { property } from '../../helpers/property'; export const schema = ` type Message { id: String - author: Member + author: User content: String channel: Channel creationTime: String fromServer: Boolean - userRef: [Member] + userRef: [User] channelRef: [Channel] reactions: [Reaction] # TODO diff --git a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js new file mode 100644 index 000000000000..89d020ea82b1 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js @@ -0,0 +1,24 @@ +import { Meteor } from 'meteor/meteor'; + +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + addReactionToMassage(id: MessageIdentifier!, icon: String!): Message + } +`; + +export const resolver = { + Mutation: { + addReactionToMassage: authenticated(AccountsServer, (root, { id, icon }, { models, user }) => { + return new Promise((resolve) => { + Meteor.runAsUser(user._id, () => { + Meteor.call('setReaction', id.messageId, icon, () => { + resolve(models.findOne(id.messageId)); + }); + }); + }); + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.js b/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.js new file mode 100644 index 000000000000..0f127c3c934f --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.js @@ -0,0 +1,29 @@ +import { withFilter } from 'graphql-subscriptions'; + +import { pubsub } from '../../subscriptions'; + +export const CHAT_MESSAGE_SUBSCRIPTION_TOPIC = 'CHAT_MESSAGE_ADDED'; + +export function publishMessage(message) { + pubsub.publish(CHAT_MESSAGE_SUBSCRIPTION_TOPIC, { chatMessageAdded: message }); +} + +export const schema = ` + type Subscription { + chatMessageAdded(channelId: String!): Message + } +`; + +export const resolver = { + Subscription: { + chatMessageAdded: { + subscribe: withFilter(() => pubsub.asyncIterator(CHAT_MESSAGE_SUBSCRIPTION_TOPIC), (payload, args) => { + return payload.chatMessageAdded.rid === args.channelId; + }) + } + } +}; + +RocketChat.callbacks.add('afterSaveMessage', (message) => { + publishMessage(message); +}, null, 'chatMessageAddedSubscription'); diff --git a/packages/rocketchat-graphql/server/schemas/messages/index.js b/packages/rocketchat-graphql/server/schemas/messages/index.js index 438930fe8698..fb9728b19815 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/index.js +++ b/packages/rocketchat-graphql/server/schemas/messages/index.js @@ -6,6 +6,9 @@ import * as messages from './messages'; import * as sendMessage from './sendMessage'; import * as editMessage from './editMessage'; import * as deleteMessage from './deleteMessage'; +import * as addReactionToMessage from './addReactionToMessage'; +// subscriptions +import * as chatMessageAdded from './chatMessageAdded'; // types import * as MessageType from './Message-type'; import * as MessagesWithCursorType from './MessagesWithCursor-type'; @@ -19,6 +22,9 @@ export const schema = mergeTypes([ sendMessage.schema, editMessage.schema, deleteMessage.schema, + addReactionToMessage.schema, + // subscriptions + chatMessageAdded.schema, // types MessageType.schema, MessagesWithCursorType.schema, @@ -33,6 +39,9 @@ export const resolvers = mergeResolvers([ sendMessage.resolver, editMessage.resolver, deleteMessage.resolver, + addReactionToMessage.resolver, + // subscriptions + chatMessageAdded.resolver, // types MessageType.resolver ]); diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/schemas/messages/messages.js index 84d0509f0fdc..a55aa09981b0 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.js +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.js @@ -3,29 +3,77 @@ import AccountsServer from '../../mocks/accounts/server'; export const schema = ` type Query { - messages(channelId: String): MessagesWithCursor + messages( + channelId: String, + channelDetails: ChannelNameAndDirect, + channelName: String, + cursor: String, + count: Int, + searchRegex: String + ): MessagesWithCursor } `; export const resolver = { Query: { messages: authenticated(AccountsServer, (root, args, { models }) => { - if (!args.channelId) { - console.error('messages query must be called with channelId'); + const messagesQuery = {}; + const messagesOptions = { + sort: { ts: 1 } + }; + const channelQuery = {}; + const isPagination = !!args.cursor || args.count > 0; + let cursor; + + if (args.channelId) { + // channelId + channelQuery._id = args.channelId; + } else if (args.channelDetails) { + // channelDetails + channelQuery.name = args.channelDetails.name; + channelQuery.t = args.channelDetails.direct === true ? 'd' : { $ne: 'd' }; + } else { + console.error('messages query must be called with channelId or channelDetails'); return null; } - const query = {}; + const channel = models.Rooms.findOne(channelQuery); + let messagesArray = []; - if (args.channelId) { - query.rid = args.channelId; - } + if (channel) { + + // cursor + if (isPagination && args.cursor) { + const cursorMsg = models.Messages.findOne(args.cursor, { fields: { ts: 1 } }); + messagesQuery.ts = { $gt: cursorMsg.ts }; + } - const messagesArray = models.Messages.find(query).fetch(); - const channel = models.Rooms.findOne(args.channelId); + // searchRegex + if (typeof args.searchRegex !== undefined) { + messagesQuery.msg = { + $regex: new RegExp(args.searchRegex, 'i') + }; + } + + // count + if (isPagination && args.count) { + messagesOptions.limit = args.count; + } + + const messages = models.Messages.find( + Object.assign({}, messagesQuery, { rid: channel._id }), + messagesOptions + ); + + messagesArray = messages.fetch(); + + if (isPagination) { + cursor = (messagesArray[messagesArray.length - 1] || {})._id; + } + } return { - cursor: 'CURSOR', + cursor, channel, messagesArray }; diff --git a/packages/rocketchat-graphql/server/schemas/users/User-type.js b/packages/rocketchat-graphql/server/schemas/users/User-type.js new file mode 100644 index 000000000000..76f75c194153 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/users/User-type.js @@ -0,0 +1,36 @@ +import { + property +} from '../../helpers/property'; + +export const schema = ` + extend type User { + status: UserStatus + avatar: String + name: String + lastLogin: String + channels: [Channel] + directMessages: [Channel] + } +`; + +export const resolver = { + User: { + id: property('_id'), + status: ({status}) => status.toUpperCase(), + avatar: ({ _id}, args, { models }) => { + const avatar = models.Avatars.findOne({ + userId: _id + }, { fields: { url: 1 }}); + + if (avatar) { + return avatar.url; + } + }, + channels: ({ _id }, args, { models }) => { + return models.Rooms.findBySubscriptionUserId(_id).fetch(); + }, + directMessages: ({ username }, args, { models }) => { + return models.Rooms.findByTypeContainingUsername('d', username).fetch(); + } + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js b/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js new file mode 100644 index 000000000000..5e821bb5ee2a --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js @@ -0,0 +1,9 @@ +export const schema = ` + enum UserStatus { + ONLINE + AWAY + BUSY + INVISIBLE + OFFLINE + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/users/index.js b/packages/rocketchat-graphql/server/schemas/users/index.js new file mode 100644 index 000000000000..7647d5a5fdd6 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/users/index.js @@ -0,0 +1,22 @@ +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; + +// mutations +import * as setStatus from './setStatus'; +// types +import * as UserType from './User-type'; +import * as UserStatus from './UserStatus-enum'; + +export const schema = mergeTypes([ + // mutations + setStatus.schema, + // types + UserType.schema, + UserStatus.schema +]); + +export const resolvers = mergeResolvers([ + // mutations + setStatus.resolver, + // types + UserType.resolver +]); diff --git a/packages/rocketchat-graphql/server/schemas/users/setStatus.js b/packages/rocketchat-graphql/server/schemas/users/setStatus.js new file mode 100644 index 000000000000..007ae3cf050e --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/users/setStatus.js @@ -0,0 +1,22 @@ +import { authenticated } from '../../mocks/accounts/graphql-api'; +import AccountsServer from '../../mocks/accounts/server'; + +export const schema = ` + type Mutation { + setStatus(status: UserStatus!): User + } +`; + +export const resolver = { + Mutation: { + setStatus: authenticated(AccountsServer, (root, { status }, { models, user }) => { + models.Users.update(user._id, { + $set: { + status: status.toLowerCase() + } + }); + + return models.Users.findOne(user._id); + }) + } +}; diff --git a/packages/rocketchat-graphql/server/subscriptions.js b/packages/rocketchat-graphql/server/subscriptions.js new file mode 100644 index 000000000000..d86d23f85d05 --- /dev/null +++ b/packages/rocketchat-graphql/server/subscriptions.js @@ -0,0 +1,3 @@ +import { PubSub } from 'graphql-subscriptions'; + +export const pubsub = new PubSub(); diff --git a/packages/rocketchat-lib/package.js b/packages/rocketchat-lib/package.js index 7be42499e08a..5eed6181d88b 100644 --- a/packages/rocketchat-lib/package.js +++ b/packages/rocketchat-lib/package.js @@ -34,6 +34,7 @@ Package.onUse(function(api) { api.use('matb33:collection-hooks'); api.use('service-configuration'); api.use('check'); + api.use('rocketchat:accounts'); api.use('rocketchat:i18n'); api.use('rocketchat:streamer'); api.use('rocketchat:version'); From 7bb4bfca525c6c1eefde09dcd6db9451af1e2922 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 20 Jul 2017 10:29:22 +0100 Subject: [PATCH 007/212] WIP --- packages/rocketchat-accounts/server/config.js | 8 ++++++-- packages/rocketchat-accounts/server/fix.js | 3 +++ packages/rocketchat-accounts/server/index.js | 1 + .../schemas/accounts/loginWithServiceAccessToken.js | 2 +- .../server/schemas/channels/channelByName.js | 5 +++-- .../server/schemas/channels/channels.js | 5 +++-- .../server/schemas/channels/channelsByUser.js | 5 +++-- .../server/schemas/channels/createChannel.js | 5 ++--- .../server/schemas/channels/hideChannel.js | 5 ++--- .../server/schemas/channels/leaveChannel.js | 5 ++--- .../server/schemas/messages/addReactionToMessage.js | 5 ++--- .../server/schemas/messages/deleteMessage.js | 5 ++--- .../server/schemas/messages/editMessage.js | 5 ++--- .../server/schemas/messages/messages.js | 4 ++-- .../server/schemas/messages/sendMessage.js | 4 ++-- .../rocketchat-graphql/server/schemas/users/setStatus.js | 4 ++-- 16 files changed, 38 insertions(+), 33 deletions(-) create mode 100644 packages/rocketchat-accounts/server/fix.js diff --git a/packages/rocketchat-accounts/server/config.js b/packages/rocketchat-accounts/server/config.js index a9c215fdbd77..621db418d784 100644 --- a/packages/rocketchat-accounts/server/config.js +++ b/packages/rocketchat-accounts/server/config.js @@ -6,7 +6,10 @@ import { Meteor } from 'meteor/meteor'; Meteor.startup(() => { const mongodb = MongoInternals.defaultRemoteCollectionDriver().mongo.db; - const mongoAdapter = new MongoAdapter(mongodb); + const mongoAdapter = new MongoAdapter(mongodb, { + // XXX: UserId in RocketChat is a string(17) value + convertUserIdToMongoObjectId: false + }); AccountsServer.config({ tokenConfigs: { @@ -16,6 +19,7 @@ Meteor.startup(() => { refreshToken: { expiresIn: '30d' } - } + }, + passwordHashAlgorithm: 'sha256' }, mongoAdapter); }); diff --git a/packages/rocketchat-accounts/server/fix.js b/packages/rocketchat-accounts/server/fix.js new file mode 100644 index 000000000000..f1900a19c465 --- /dev/null +++ b/packages/rocketchat-accounts/server/fix.js @@ -0,0 +1,3 @@ +import regeneratorRuntime from 'babel-runtime/regenerator'; + +global.regeneratorRuntime = regeneratorRuntime; diff --git a/packages/rocketchat-accounts/server/index.js b/packages/rocketchat-accounts/server/index.js index 7e25e6061c78..a1fd2ccb053e 100644 --- a/packages/rocketchat-accounts/server/index.js +++ b/packages/rocketchat-accounts/server/index.js @@ -1,3 +1,4 @@ +import './fix'; import './config'; import AccountsServer from '@accounts/server'; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js b/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js index 26d95f49c0cf..0aeb4a1647f7 100644 --- a/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js +++ b/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js @@ -1,4 +1,4 @@ -import AccountsServer from '../../mocks/accounts/server'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js index 9e0f0ca3c39c..de526a3659ed 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js @@ -1,5 +1,6 @@ -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; + import { roomPublicFields } from './settings'; export const schema = ` diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.js b/packages/rocketchat-graphql/server/schemas/channels/channels.js index 61a8535da41d..8f50a32442dc 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channels.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channels.js @@ -1,5 +1,6 @@ -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; + import { roomPublicFields } from './settings'; export const schema = ` diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js index 98a888fe8970..188f715e2e8e 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js @@ -1,5 +1,6 @@ -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; + import { roomPublicFields } from './settings'; export const schema = ` diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js index e7fe0ce09a16..a98db3e8529e 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js @@ -1,7 +1,6 @@ import { Meteor } from 'meteor/meteor'; - -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js index 95a8e0f0486f..41b3a9ec48b5 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js @@ -1,7 +1,6 @@ import { Meteor } from 'meteor/meteor'; - -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js index d20c6042b0e9..a4d7cf9cc97a 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js @@ -1,7 +1,6 @@ import { Meteor } from 'meteor/meteor'; - -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js index 89d020ea82b1..b986dbc9b447 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js @@ -1,7 +1,6 @@ import { Meteor } from 'meteor/meteor'; - -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js index 0b941817a8dd..332909ea9493 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js @@ -1,7 +1,6 @@ import { Meteor } from 'meteor/meteor'; - -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js index 6eacb619f51d..7e412a02076c 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js @@ -1,7 +1,6 @@ import { Meteor } from 'meteor/meteor'; - -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/schemas/messages/messages.js index a55aa09981b0..d2ad849a2da1 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.js +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.js @@ -1,5 +1,5 @@ -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Query { diff --git a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js index ed675ce002d8..a7d40e13213b 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js @@ -1,7 +1,7 @@ /* global processWebhookMessage */ -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { diff --git a/packages/rocketchat-graphql/server/schemas/users/setStatus.js b/packages/rocketchat-graphql/server/schemas/users/setStatus.js index 007ae3cf050e..65311303b7a5 100644 --- a/packages/rocketchat-graphql/server/schemas/users/setStatus.js +++ b/packages/rocketchat-graphql/server/schemas/users/setStatus.js @@ -1,5 +1,5 @@ -import { authenticated } from '../../mocks/accounts/graphql-api'; -import AccountsServer from '../../mocks/accounts/server'; +import { authenticated } from '@accounts/graphql-api'; +import AccountsServer from '@accounts/server'; export const schema = ` type Mutation { From a75b31212a1638a4b7b505af3e25da224729d195 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Fri, 21 Jul 2017 13:32:35 +0100 Subject: [PATCH 008/212] WIP --- packages/rocketchat-accounts/package.js | 2 +- packages/rocketchat-accounts/server/index.js | 1 + packages/rocketchat-graphql/server/api.js | 31 ++++++++++-------- .../server/helpers/authenticated.js | 7 ++++ .../accounts/loginWithServiceAccessToken.js | 32 ------------------- .../server/schemas/channels/channelByName.js | 6 ++-- .../server/schemas/channels/channels.js | 6 ++-- .../server/schemas/channels/channelsByUser.js | 17 +++++----- .../server/schemas/channels/createChannel.js | 6 ++-- .../server/schemas/channels/hideChannel.js | 6 ++-- .../server/schemas/channels/leaveChannel.js | 6 ++-- .../schemas/messages/addReactionToMessage.js | 8 ++--- .../server/schemas/messages/deleteMessage.js | 6 ++-- .../server/schemas/messages/editMessage.js | 6 ++-- .../server/schemas/messages/messages.js | 5 ++- .../server/schemas/messages/sendMessage.js | 5 ++- .../server/schemas/users/User-type.js | 7 ++-- .../server/schemas/users/setStatus.js | 5 ++- 18 files changed, 69 insertions(+), 93 deletions(-) create mode 100644 packages/rocketchat-graphql/server/helpers/authenticated.js delete mode 100644 packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js diff --git a/packages/rocketchat-accounts/package.js b/packages/rocketchat-accounts/package.js index ad3d2abb5687..fd29a0c2ebae 100644 --- a/packages/rocketchat-accounts/package.js +++ b/packages/rocketchat-accounts/package.js @@ -17,7 +17,7 @@ Package.onUse(function(api) { }); Npm.depends({ - '@accounts/server': '0.0.17', + '@accounts/server': '0.0.18', '@accounts/mongo': '0.0.12-0', '@accounts/meteor-adapter': '0.1.1' }); diff --git a/packages/rocketchat-accounts/server/index.js b/packages/rocketchat-accounts/server/index.js index a1fd2ccb053e..87ec121feca8 100644 --- a/packages/rocketchat-accounts/server/index.js +++ b/packages/rocketchat-accounts/server/index.js @@ -3,6 +3,7 @@ import './config'; import AccountsServer from '@accounts/server'; + export { AccountsServer }; diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index 069ada537a9b..73aa590b4f07 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -2,11 +2,11 @@ import { graphqlExpress, graphiqlExpress } from 'graphql-server-express'; import { JSAccountsContext as jsAccountsContext } from '@accounts/graphql-api'; import { SubscriptionServer } from 'subscriptions-transport-ws'; import { execute, subscribe } from 'graphql'; +import { Meteor } from 'meteor/meteor'; +import { WebApp } from 'meteor/webapp'; import bodyParser from 'body-parser'; import express from 'express'; import cors from 'cors'; -import { Meteor } from 'meteor/meteor'; -import { WebApp } from 'meteor/webapp'; import { executableSchema } from './schema'; @@ -19,18 +19,21 @@ graphQLServer.use(bodyParser.urlencoded({ extended: true })); graphQLServer.use( '/graphql', bodyParser.json(), - graphqlExpress(request => ({ - schema: executableSchema, - context: Object.assign({ - models: RocketChat.models - }, jsAccountsContext(request)), - formatError: e => ({ - message: e.message, - locations: e.locations, - path: e.path - }), - debug: Meteor.isDevelopment - }))); + graphqlExpress(request => { + return { + schema: executableSchema, + context: Object.assign({ + models: RocketChat.models + }, jsAccountsContext(request)), + formatError: e => ({ + message: e.message, + locations: e.locations, + path: e.path + }), + debug: Meteor.isDevelopment + }; + }) +); graphQLServer.use('/graphiql', graphiqlExpress({ endpointURL: '/graphql', diff --git a/packages/rocketchat-graphql/server/helpers/authenticated.js b/packages/rocketchat-graphql/server/helpers/authenticated.js new file mode 100644 index 000000000000..789101545ca1 --- /dev/null +++ b/packages/rocketchat-graphql/server/helpers/authenticated.js @@ -0,0 +1,7 @@ +import { Meteor } from 'meteor/meteor'; +import { AccountsServer } from 'meteor/rocketchat:accounts'; +import { authenticated as _authenticated } from '@accounts/graphql-api'; + +export const authenticated = (resolver) => { + return _authenticated(AccountsServer, Meteor.bindEnvironment(resolver), (error) => { throw error; }); +}; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js b/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js deleted file mode 100644 index 0aeb4a1647f7..000000000000 --- a/packages/rocketchat-graphql/server/schemas/accounts/loginWithServiceAccessToken.js +++ /dev/null @@ -1,32 +0,0 @@ -import AccountsServer from '@accounts/server'; - -export const schema = ` - type Mutation { - loginWithServiceAccessToken(service: String!, accessToken: String!): LoginResult - } -`; - -export const resolver = { - Mutation: { - loginWithServiceAccessToken: async(root, { service, accessToken }) => { - try { - const userData = await oauthResolver.getUserDataFromService(accessToken, service); - const accountsServer = AccountsServer; - const user = await oauthResolver.getUserFromServiceUserData(service, userData); - - if (!user) { - return null; - } - - const loginResult = await accountsServer.loginWithUser(user); - - return { - refreshToken: loginResult.tokens.refreshToken, - accessToken: loginResult.tokens.accessToken - }; - } catch (e) { - console.error('Failed to login with service', e); - } - } - } -}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js index de526a3659ed..213af845243c 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js @@ -1,6 +1,4 @@ -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; - +import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; export const schema = ` @@ -11,7 +9,7 @@ export const schema = ` export const resolver = { Query: { - channelByName: authenticated(AccountsServer, (root, { name, isDirect }, { models }) => { + channelByName: authenticated((root, { name, isDirect }, { models }) => { const query = { name }; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.js b/packages/rocketchat-graphql/server/schemas/channels/channels.js index 8f50a32442dc..f926ab80a1af 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channels.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channels.js @@ -1,6 +1,4 @@ -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; - +import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; export const schema = ` @@ -15,7 +13,7 @@ export const schema = ` export const resolver = { Query: { - channels: authenticated(AccountsServer, (root, args, { models }) => { + channels: authenticated((root, args, { models }) => { const query = {}; const options = { sort: { diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js index 188f715e2e8e..5651ef1a27b8 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js @@ -1,5 +1,4 @@ -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; +import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; @@ -11,7 +10,7 @@ export const schema = ` export const resolver = { Query: { - channelsByUser: authenticated(AccountsServer, (root, { userId }, { models }) => { + channelsByUser: authenticated((root, { userId }, { models }) => { const user = models.Users.findOneById(userId); if (!user) { @@ -19,16 +18,18 @@ export const resolver = { throw new Error('No user'); } - return models.Rooms.find({ - 'usernames': { - $in: user.username - } - }, { + // TODO: empty + const rooms = models.Rooms.findByContainingUsername(user.username, { sort: { name: 1 }, fields: roomPublicFields }).fetch(); + + console.log('user.username', user.username); + console.log('rooms', rooms); + + return rooms; }) } }; diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js index a98db3e8529e..8d0274c8a311 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; + +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -15,7 +15,7 @@ export const schema = ` export const resolver = { Mutation: { - createChannel: authenticated(AccountsServer, (root, args, { models, user }) => { + createChannel: authenticated((root, args, { models, user }) => { if (!RocketChat.authz.hasPermission(user._id, 'create-c')) { return RocketChat.API.v1.unauthorized(); } diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js index 41b3a9ec48b5..3bb3627fe661 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; + +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -10,7 +10,7 @@ export const schema = ` export const resolver = { Mutation: { - hideChannel: authenticated(AccountsServer, (root, args, { models, user }) => { + hideChannel: authenticated((root, args, { models, user }) => { const channel = models.Rooms.findOne({ _id: args.channelId, t: 'c' diff --git a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js index a4d7cf9cc97a..4eee709e2df4 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; + +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -10,7 +10,7 @@ export const schema = ` export const resolver = { Mutation: { - leaveChannel: authenticated(AccountsServer, (root, args, { models, user }) => { + leaveChannel: authenticated((root, args, { models, user }) => { const channel = models.Rooms.findOne({ _id: args.channelId, t: 'c' diff --git a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js index b986dbc9b447..0e1104c541e8 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; + +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -10,11 +10,11 @@ export const schema = ` export const resolver = { Mutation: { - addReactionToMassage: authenticated(AccountsServer, (root, { id, icon }, { models, user }) => { + addReactionToMassage: authenticated((root, { id, icon }, { models, user }) => { return new Promise((resolve) => { Meteor.runAsUser(user._id, () => { Meteor.call('setReaction', id.messageId, icon, () => { - resolve(models.findOne(id.messageId)); + resolve(models.Messages.findOne(id.messageId)); }); }); }); diff --git a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js index 332909ea9493..2f0aed85073b 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; + +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -10,7 +10,7 @@ export const schema = ` export const resolver = { Mutation: { - deleteMessage: authenticated(AccountsServer, (root, { id }, { models, user }) => { + deleteMessage: authenticated((root, { id }, { models, user }) => { const msg = models.Messages.findOneById(id.messageId, { fields: { u: 1, rid: 1 }}); if (!msg) { diff --git a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js index 7e412a02076c..1da2201d331e 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; + +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -10,7 +10,7 @@ export const schema = ` export const resolver = { Mutation: { - editMessage: authenticated(AccountsServer, (root, { id, content }, { user, models }) => { + editMessage: authenticated((root, { id, content }, { user, models }) => { const msg = models.Messages.findOneById(id.messageId); //Ensure the message exists diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/schemas/messages/messages.js index d2ad849a2da1..7417470fdf0c 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.js +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.js @@ -1,5 +1,4 @@ -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Query { @@ -16,7 +15,7 @@ export const schema = ` export const resolver = { Query: { - messages: authenticated(AccountsServer, (root, args, { models }) => { + messages: authenticated((root, args, { models }) => { const messagesQuery = {}; const messagesOptions = { sort: { ts: 1 } diff --git a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js index a7d40e13213b..430460b72de8 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js @@ -1,7 +1,6 @@ /* global processWebhookMessage */ -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -11,7 +10,7 @@ export const schema = ` export const resolver = { Mutation: { - sendMessage: authenticated(AccountsServer, (root, { channelId, content }, { user }) => { + sendMessage: authenticated((root, { channelId, content }, { user }) => { const messageReturn = processWebhookMessage({ roomId: channelId, text: content diff --git a/packages/rocketchat-graphql/server/schemas/users/User-type.js b/packages/rocketchat-graphql/server/schemas/users/User-type.js index 76f75c194153..f6c0ff0d60e5 100644 --- a/packages/rocketchat-graphql/server/schemas/users/User-type.js +++ b/packages/rocketchat-graphql/server/schemas/users/User-type.js @@ -1,3 +1,5 @@ +import { Meteor } from 'meteor/meteor'; + import { property } from '../../helpers/property'; @@ -17,7 +19,7 @@ export const resolver = { User: { id: property('_id'), status: ({status}) => status.toUpperCase(), - avatar: ({ _id}, args, { models }) => { + avatar: Meteor.bindEnvironment(({ _id }, args, { models }) => { const avatar = models.Avatars.findOne({ userId: _id }, { fields: { url: 1 }}); @@ -25,7 +27,8 @@ export const resolver = { if (avatar) { return avatar.url; } - }, + return; + }), channels: ({ _id }, args, { models }) => { return models.Rooms.findBySubscriptionUserId(_id).fetch(); }, diff --git a/packages/rocketchat-graphql/server/schemas/users/setStatus.js b/packages/rocketchat-graphql/server/schemas/users/setStatus.js index 65311303b7a5..ca5362c0d945 100644 --- a/packages/rocketchat-graphql/server/schemas/users/setStatus.js +++ b/packages/rocketchat-graphql/server/schemas/users/setStatus.js @@ -1,5 +1,4 @@ -import { authenticated } from '@accounts/graphql-api'; -import AccountsServer from '@accounts/server'; +import { authenticated } from '../../helpers/authenticated'; export const schema = ` type Mutation { @@ -9,7 +8,7 @@ export const schema = ` export const resolver = { Mutation: { - setStatus: authenticated(AccountsServer, (root, { status }, { models, user }) => { + setStatus: authenticated((root, { status }, { models, user }) => { models.Users.update(user._id, { $set: { status: status.toLowerCase() From 9ea0ccef988b1cf1eb739b8b078fd2326fb4670b Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Fri, 21 Jul 2017 22:53:20 +0100 Subject: [PATCH 009/212] WIP --- packages/rocketchat-graphql/server/api.js | 4 +--- .../server/helpers/authenticated.js | 7 +++--- .../server/mocks/accounts/graphql-api.js | 23 ++++++++++++++++++- .../server/mocks/accounts/server.js | 5 ++-- .../server/schemas/channels/Channel-type.js | 8 +++---- .../server/schemas/channels/channelByName.js | 4 ++-- .../server/schemas/channels/channels.js | 4 ++-- .../server/schemas/channels/channelsByUser.js | 9 +++----- .../server/schemas/channels/createChannel.js | 4 ++-- .../server/schemas/channels/hideChannel.js | 6 ++--- .../server/schemas/channels/leaveChannel.js | 4 ++-- .../server/schemas/messages/Message-type.js | 16 ++++++------- .../schemas/messages/addReactionToMessage.js | 4 ++-- .../server/schemas/messages/deleteMessage.js | 4 ++-- .../server/schemas/messages/editMessage.js | 6 ++--- .../server/schemas/messages/messages.js | 10 ++++---- .../server/schemas/users/User-type.js | 16 ++++++------- .../server/schemas/users/setStatus.js | 6 ++--- 18 files changed, 77 insertions(+), 63 deletions(-) diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index 73aa590b4f07..7a82b6acec00 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -22,9 +22,7 @@ graphQLServer.use( graphqlExpress(request => { return { schema: executableSchema, - context: Object.assign({ - models: RocketChat.models - }, jsAccountsContext(request)), + context: jsAccountsContext(request), formatError: e => ({ message: e.message, locations: e.locations, diff --git a/packages/rocketchat-graphql/server/helpers/authenticated.js b/packages/rocketchat-graphql/server/helpers/authenticated.js index 789101545ca1..a0a39e676560 100644 --- a/packages/rocketchat-graphql/server/helpers/authenticated.js +++ b/packages/rocketchat-graphql/server/helpers/authenticated.js @@ -1,7 +1,8 @@ -import { Meteor } from 'meteor/meteor'; import { AccountsServer } from 'meteor/rocketchat:accounts'; -import { authenticated as _authenticated } from '@accounts/graphql-api'; +//import { authenticated as _authenticated } from '@accounts/graphql-api'; + +import { authenticated as _authenticated } from '../mocks/accounts/graphql-api'; export const authenticated = (resolver) => { - return _authenticated(AccountsServer, Meteor.bindEnvironment(resolver), (error) => { throw error; }); + return _authenticated(AccountsServer, resolver); }; diff --git a/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js index ac01fd1b681a..adbaaaa71d7e 100644 --- a/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js +++ b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js @@ -1,9 +1,30 @@ -export const authenticated = (Accounts, func) => (async(root, args, context, info) => { +/*export const authenticated = (Accounts, func) => (async(root, args, context, info) => { const userObject = await Accounts.resumeSession(); if (userObject === null) { throw new Error('Invalid or expired token!'); } + return await func(root, args, Object.assign(context, { user: userObject }), info); +});*/ + +// Same as here: https://github.com/js-accounts/graphql/blob/master/packages/graphql-api/src/utils/authenticated-resolver.js +// except code below works +// It might be like that because of async/await, +// maybe Promise is not wrapped with Fiber +// See: https://github.com/meteor/meteor/blob/a362e20a37547362b581fed52f7171d022e83b62/packages/promise/server.js +export const authenticated = (Accounts, func) => (async(root, args, context, info) => { + const authToken = context.authToken; + + if (!authToken || authToken === '' || authToken === null) { + throw new Error('Unable to find authorization token in request'); + } + + const userObject = await Accounts.resumeSession(authToken); + + if (userObject === null) { + throw new Error('Invalid or expired token!'); + } + return await func(root, args, Object.assign(context, { user: userObject }), info); }); diff --git a/packages/rocketchat-graphql/server/mocks/accounts/server.js b/packages/rocketchat-graphql/server/mocks/accounts/server.js index d44d2d09efae..8bf64b3bccbf 100644 --- a/packages/rocketchat-graphql/server/mocks/accounts/server.js +++ b/packages/rocketchat-graphql/server/mocks/accounts/server.js @@ -1,14 +1,13 @@ const loggedOut = false; const AccountsServer = { - async resumeSession() { + resumeSession: (async() => { if (loggedOut) { throw new Error('User not found'); } // User credentials - // mys:admin return RocketChat.models.Users.findOne({username: 'mys'}); - } + }) }; export default AccountsServer; diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js index 9d394c536aae..8ae65ddb16aa 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js +++ b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js @@ -23,18 +23,18 @@ export const schema = ` export const resolver = { Channel: { id: property('_id'), - members: (root, args, { models }) => { + members: (root) => { return root.usernames.map( - username => models.Users.findOneByUsername(username) + username => RocketChat.models.Users.findOneByUsername(username) ); }, - owners: (root, args, { models }) => { + owners: (root) => { // there might be no owner if (!root.u) { return; } - return [models.Users.findOneByUsername(root.u.username)]; + return [RocketChat.models.Users.findOneByUsername(root.u.username)]; }, numberOfMembers: (root) => (root.usernames || []).length, numberOfMessages: property('msgs'), diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js index 213af845243c..32e6d1e44000 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js @@ -9,7 +9,7 @@ export const schema = ` export const resolver = { Query: { - channelByName: authenticated((root, { name, isDirect }, { models }) => { + channelByName: authenticated((root, { name, isDirect }) => { const query = { name }; @@ -18,7 +18,7 @@ export const resolver = { query.c = 'd'; } - return models.Rooms.findOne(query, { + return RocketChat.models.Rooms.findOne(query, { fields: roomPublicFields }); }) diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.js b/packages/rocketchat-graphql/server/schemas/channels/channels.js index f926ab80a1af..c188819c96b3 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channels.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channels.js @@ -13,7 +13,7 @@ export const schema = ` export const resolver = { Query: { - channels: authenticated((root, args, { models }) => { + channels: authenticated((root, args) => { const query = {}; const options = { sort: { @@ -54,7 +54,7 @@ export const resolver = { // TODO: } - return models.Rooms.find(query, options).fetch(); + return RocketChat.models.Rooms.find(query, options).fetch(); }) } }; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js index 5651ef1a27b8..b16e9f0c12fd 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js @@ -10,8 +10,8 @@ export const schema = ` export const resolver = { Query: { - channelsByUser: authenticated((root, { userId }, { models }) => { - const user = models.Users.findOneById(userId); + channelsByUser: authenticated((root, { userId }) => { + const user = RocketChat.models.Users.findOneById(userId); if (!user) { // TODO: @@ -19,16 +19,13 @@ export const resolver = { } // TODO: empty - const rooms = models.Rooms.findByContainingUsername(user.username, { + const rooms = RocketChat.models.Rooms.findByContainingUsername(user.username, { sort: { name: 1 }, fields: roomPublicFields }).fetch(); - console.log('user.username', user.username); - console.log('rooms', rooms); - return rooms; }) } diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js index 8d0274c8a311..c87e88991767 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js @@ -15,7 +15,7 @@ export const schema = ` export const resolver = { Mutation: { - createChannel: authenticated((root, args, { models, user }) => { + createChannel: authenticated((root, args, { user }) => { if (!RocketChat.authz.hasPermission(user._id, 'create-c')) { return RocketChat.API.v1.unauthorized(); } @@ -38,7 +38,7 @@ export const resolver = { id = Meteor.call('createChannel', args.name, args.membersId ? args.membersId : [], readOnly); }); - return models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }); + return RocketChat.models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }); }) } }; diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js index 3bb3627fe661..cab57e119468 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js @@ -10,8 +10,8 @@ export const schema = ` export const resolver = { Mutation: { - hideChannel: authenticated((root, args, { models, user }) => { - const channel = models.Rooms.findOne({ + hideChannel: authenticated((root, args, { user }) => { + const channel = RocketChat.models.Rooms.findOne({ _id: args.channelId, t: 'c' }); @@ -20,7 +20,7 @@ export const resolver = { throw new Error('error-room-not-found', 'The required "channelId" param provided does not match any channel'); } - const sub = models.Subscriptions.findOneByRoomIdAndUserId(channel._id, user._id); + const sub = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(channel._id, user._id); if (!sub) { throw new Error(`The user/callee is not in the channel "${ channel.name }.`); diff --git a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js index 4eee709e2df4..141f1eba171f 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js @@ -10,8 +10,8 @@ export const schema = ` export const resolver = { Mutation: { - leaveChannel: authenticated((root, args, { models, user }) => { - const channel = models.Rooms.findOne({ + leaveChannel: authenticated((root, args, { user }) => { + const channel = RocketChat.models.Rooms.findOne({ _id: args.channelId, t: 'c' }); diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js index 3c6a1f0b34be..3e52885e0ff2 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -21,19 +21,19 @@ export const resolver = { id: property('_id'), content: property('msg'), creationTime: property('ts'), - author: (root, args, { models }) => { - return models.Users.findOne(root.u._id); + author: (root) => { + return RocketChat.models.Users.findOne(root.u._id); }, - channel: (root, args, { models }) => { - return models.Rooms.findOne(root.rid); + channel: (root) => { + return RocketChat.models.Rooms.findOne(root.rid); }, fromServer: (root) => typeof root.t !== 'undefined', // on a message sent by user `true` otherwise `false` - channelRef: (root, args, { models }) => { + channelRef: (root) => { if (!root.channels) { return; } - return models.Rooms.find({ + return RocketChat.models.Rooms.find({ _id: { $in: root.channels.map(c => c._id) } @@ -43,12 +43,12 @@ export const resolver = { } }).fetch(); }, - userRef: (root, args, { models }) => { + userRef: (root) => { if (!root.mentions) { return; } - return models.Users.find({ + return RocketChat.models.Users.find({ _id: { $in: root.mentions.map(c => c._id) } diff --git a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js index 0e1104c541e8..2dc894969880 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js @@ -10,11 +10,11 @@ export const schema = ` export const resolver = { Mutation: { - addReactionToMassage: authenticated((root, { id, icon }, { models, user }) => { + addReactionToMassage: authenticated((root, { id, icon }, { user }) => { return new Promise((resolve) => { Meteor.runAsUser(user._id, () => { Meteor.call('setReaction', id.messageId, icon, () => { - resolve(models.Messages.findOne(id.messageId)); + resolve(RocketChat.models.Messages.findOne(id.messageId)); }); }); }); diff --git a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js index 2f0aed85073b..91b3d0fa7e92 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js @@ -10,8 +10,8 @@ export const schema = ` export const resolver = { Mutation: { - deleteMessage: authenticated((root, { id }, { models, user }) => { - const msg = models.Messages.findOneById(id.messageId, { fields: { u: 1, rid: 1 }}); + deleteMessage: authenticated((root, { id }, { user }) => { + const msg = RocketChat.models.Messages.findOneById(id.messageId, { fields: { u: 1, rid: 1 }}); if (!msg) { throw new Error(`No message found with the id of "${ id.messageId }".`); diff --git a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js index 1da2201d331e..da1e1c8e850e 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js +++ b/packages/rocketchat-graphql/server/schemas/messages/editMessage.js @@ -10,8 +10,8 @@ export const schema = ` export const resolver = { Mutation: { - editMessage: authenticated((root, { id, content }, { user, models }) => { - const msg = models.Messages.findOneById(id.messageId); + editMessage: authenticated((root, { id, content }, { user }) => { + const msg = RocketChat.models.Messages.findOneById(id.messageId); //Ensure the message exists if (!msg) { @@ -27,7 +27,7 @@ export const resolver = { Meteor.call('updateMessage', { _id: msg._id, msg: content, rid: msg.rid }); }); - return models.Messages.findOneById(msg._id); + return RocketChat.models.Messages.findOneById(msg._id); }) } }; diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/schemas/messages/messages.js index 7417470fdf0c..ad8bb24cdfed 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.js +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.js @@ -15,7 +15,7 @@ export const schema = ` export const resolver = { Query: { - messages: authenticated((root, args, { models }) => { + messages: authenticated((root, args) => { const messagesQuery = {}; const messagesOptions = { sort: { ts: 1 } @@ -36,19 +36,19 @@ export const resolver = { return null; } - const channel = models.Rooms.findOne(channelQuery); + const channel = RocketChat.models.Rooms.findOne(channelQuery); let messagesArray = []; if (channel) { // cursor if (isPagination && args.cursor) { - const cursorMsg = models.Messages.findOne(args.cursor, { fields: { ts: 1 } }); + const cursorMsg = RocketChat.models.Messages.findOne(args.cursor, { fields: { ts: 1 } }); messagesQuery.ts = { $gt: cursorMsg.ts }; } // searchRegex - if (typeof args.searchRegex !== undefined) { + if (typeof args.searchRegex === 'string') { messagesQuery.msg = { $regex: new RegExp(args.searchRegex, 'i') }; @@ -59,7 +59,7 @@ export const resolver = { messagesOptions.limit = args.count; } - const messages = models.Messages.find( + const messages = RocketChat.models.Messages.find( Object.assign({}, messagesQuery, { rid: channel._id }), messagesOptions ); diff --git a/packages/rocketchat-graphql/server/schemas/users/User-type.js b/packages/rocketchat-graphql/server/schemas/users/User-type.js index f6c0ff0d60e5..34978665bcdb 100644 --- a/packages/rocketchat-graphql/server/schemas/users/User-type.js +++ b/packages/rocketchat-graphql/server/schemas/users/User-type.js @@ -1,5 +1,3 @@ -import { Meteor } from 'meteor/meteor'; - import { property } from '../../helpers/property'; @@ -19,8 +17,8 @@ export const resolver = { User: { id: property('_id'), status: ({status}) => status.toUpperCase(), - avatar: Meteor.bindEnvironment(({ _id }, args, { models }) => { - const avatar = models.Avatars.findOne({ + avatar: async({ _id }) => { + const avatar = RocketChat.models.Avatars.findOne({ userId: _id }, { fields: { url: 1 }}); @@ -28,12 +26,12 @@ export const resolver = { return avatar.url; } return; - }), - channels: ({ _id }, args, { models }) => { - return models.Rooms.findBySubscriptionUserId(_id).fetch(); }, - directMessages: ({ username }, args, { models }) => { - return models.Rooms.findByTypeContainingUsername('d', username).fetch(); + channels: ({ _id }) => { + return RocketChat.models.Rooms.findBySubscriptionUserId(_id).fetch(); + }, + directMessages: ({ username }) => { + return RocketChat.models.Rooms.findByTypeContainingUsername('d', username).fetch(); } } }; diff --git a/packages/rocketchat-graphql/server/schemas/users/setStatus.js b/packages/rocketchat-graphql/server/schemas/users/setStatus.js index ca5362c0d945..6c61f4675b77 100644 --- a/packages/rocketchat-graphql/server/schemas/users/setStatus.js +++ b/packages/rocketchat-graphql/server/schemas/users/setStatus.js @@ -8,14 +8,14 @@ export const schema = ` export const resolver = { Mutation: { - setStatus: authenticated((root, { status }, { models, user }) => { - models.Users.update(user._id, { + setStatus: authenticated((root, { status }, { user }) => { + RocketChat.models.Users.update(user._id, { $set: { status: status.toLowerCase() } }); - return models.Users.findOne(user._id); + return RocketChat.models.Users.findOne(user._id); }) } }; From 5f1bbc127b919953caed6b63a320c56380f14024 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Sat, 22 Jul 2017 12:49:43 +0100 Subject: [PATCH 010/212] Date to Float --- packages/rocketchat-graphql/server/helpers/dateToFloat.js | 5 +++++ .../server/schemas/messages/Message-type.js | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 packages/rocketchat-graphql/server/helpers/dateToFloat.js diff --git a/packages/rocketchat-graphql/server/helpers/dateToFloat.js b/packages/rocketchat-graphql/server/helpers/dateToFloat.js new file mode 100644 index 000000000000..faf206706f1b --- /dev/null +++ b/packages/rocketchat-graphql/server/helpers/dateToFloat.js @@ -0,0 +1,5 @@ +export function dateToFloat(date) { + if (date) { + return new Date(date).getTime(); + } +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js index 3e52885e0ff2..09204793acf7 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -1,4 +1,5 @@ import { property } from '../../helpers/property'; +import { dateToFloat } from '../../helpers/dateToFloat'; export const schema = ` type Message { @@ -6,7 +7,7 @@ export const schema = ` author: User content: String channel: Channel - creationTime: String + creationTime: Float fromServer: Boolean userRef: [User] channelRef: [Channel] @@ -20,7 +21,7 @@ export const resolver = { Message: { id: property('_id'), content: property('msg'), - creationTime: property('ts'), + creationTime: (root) => dateToFloat(root.ts), author: (root) => { return RocketChat.models.Users.findOne(root.u._id); }, From a036416feda5e4ae79aa956da2bc24912211d844 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Mon, 31 Jul 2017 19:13:56 +0200 Subject: [PATCH 011/212] Add directChannel query --- .../.npm/package/npm-shrinkwrap.json | 50 +++++++++---------- .../server/schemas/channels/channelByName.js | 11 ++-- .../server/schemas/channels/channelsByUser.js | 1 - .../server/schemas/channels/directChannel.js | 34 +++++++++++++ .../server/schemas/channels/hideChannel.js | 2 +- .../server/schemas/channels/index.js | 3 ++ 6 files changed, 67 insertions(+), 34 deletions(-) create mode 100644 packages/rocketchat-graphql/server/schemas/channels/directChannel.js diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 9d5e2541f031..5e620381c5c9 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -16,8 +16,8 @@ "from": "array-flatten@1.1.1" }, "babel-runtime": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", "from": "babel-runtime@>=6.23.0 <7.0.0" }, "backo2": { @@ -96,8 +96,8 @@ "from": "deepmerge@>=1.3.2 <2.0.0" }, "depd": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", "from": "depd@>=1.1.0 <1.2.0" }, "deprecated-decorator": { @@ -213,7 +213,14 @@ "http-errors": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", - "from": "http-errors@>=1.6.1 <1.7.0" + "from": "http-errors@>=1.6.1 <1.7.0", + "dependencies": { + "depd": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "from": "depd@1.1.0" + } + } }, "iconv-lite": { "version": "0.4.15", @@ -226,9 +233,9 @@ "from": "inherits@2.0.3" }, "ipaddr.js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", - "from": "ipaddr.js@1.3.0" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", + "from": "ipaddr.js@1.4.0" }, "isemail": { "version": "1.2.0", @@ -331,13 +338,13 @@ "from": "mime@1.3.4" }, "mime-db": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", - "from": "mime-db@>=1.27.0 <1.28.0" + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", + "from": "mime-db@>=1.29.0 <1.30.0" }, "mime-types": { - "version": "2.1.15", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", "from": "mime-types@>=2.1.15 <2.2.0" }, "moment": { @@ -376,8 +383,8 @@ "from": "path-to-regexp@0.1.7" }, "proxy-addr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", "from": "proxy-addr@>=1.1.4 <1.2.0" }, "qs": { @@ -481,16 +488,9 @@ "from": "whatwg-fetch@>=2.0.0 <3.0.0" }, "ws": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.0.0.tgz", - "from": "ws@>=3.0.0 <4.0.0", - "dependencies": { - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "from": "safe-buffer@>=5.0.1 <5.1.0" - } - } + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.1.0.tgz", + "from": "ws@>=3.0.0 <4.0.0" }, "xtend": { "version": "4.0.1", diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js index 32e6d1e44000..63b70ddf360e 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelByName.js @@ -3,21 +3,18 @@ import { roomPublicFields } from './settings'; export const schema = ` type Query { - channelByName(name: String!, isDirect: Boolean!): Channel + channelByName(name: String!): Channel } `; export const resolver = { Query: { - channelByName: authenticated((root, { name, isDirect }) => { + channelByName: authenticated((root, { name }) => { const query = { - name + name, + t: 'c' }; - if (isDirect === true) { - query.c = 'd'; - } - return RocketChat.models.Rooms.findOne(query, { fields: roomPublicFields }); diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js index b16e9f0c12fd..0784da1854a0 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js +++ b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js @@ -18,7 +18,6 @@ export const resolver = { throw new Error('No user'); } - // TODO: empty const rooms = RocketChat.models.Rooms.findByContainingUsername(user.username, { sort: { name: 1 diff --git a/packages/rocketchat-graphql/server/schemas/channels/directChannel.js b/packages/rocketchat-graphql/server/schemas/channels/directChannel.js new file mode 100644 index 000000000000..e2431551e811 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/directChannel.js @@ -0,0 +1,34 @@ +import { authenticated } from '../../helpers/authenticated'; +import { roomPublicFields } from './settings'; + +export const schema = ` + type Query { + directChannel(username: String, channelId: String): Channel + } +`; + +export const resolver = { + Query: { + directChannel: authenticated((root, { username, channelId }, { user }) => { + const query = { + t: 'd', + usernames: user.username + }; + + if (typeof username !== 'undefined') { + if (username === user.username) { + throw new Error('You cannot specify your username'); + } + query.usernames = { $all: [ user.username, username ] }; + } else if (typeof channelId !== 'undefined') { + query.id = channelId; + } else { + throw new Error('Use one of those fields: username, channelId'); + } + + return RocketChat.models.Rooms.findOne(query, { + fields: roomPublicFields + }); + }) + } +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js index cab57e119468..2904ca9dcd2f 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js +++ b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js @@ -30,7 +30,7 @@ export const resolver = { throw new Error(`The channel, ${ channel.name }, is already closed to the sender`); } - Meteor.runAsUser(this.userId, () => { + Meteor.runAsUser(user._id, () => { Meteor.call('hideRoom', channel._id); }); diff --git a/packages/rocketchat-graphql/server/schemas/channels/index.js b/packages/rocketchat-graphql/server/schemas/channels/index.js index aa340a0030c5..063e9da41804 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/index.js +++ b/packages/rocketchat-graphql/server/schemas/channels/index.js @@ -3,6 +3,7 @@ import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; // queries import * as channels from './channels'; import * as channelByName from './channelByName'; +import * as directChannel from './directChannel'; import * as channelsByUser from './channelsByUser'; // mutations import * as createChannel from './createChannel'; @@ -19,6 +20,7 @@ export const schema = mergeTypes([ // queries channels.schema, channelByName.schema, + directChannel.schema, channelsByUser.schema, // mutations createChannel.schema, @@ -36,6 +38,7 @@ export const resolvers = mergeResolvers([ // queries channels.resolver, channelByName.resolver, + directChannel.resolver, channelsByUser.resolver, // mutations createChannel.resolver, From 0ac6e21c5729674e52acd5dbd0f77b7c558888b6 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 1 Aug 2017 16:07:48 +0200 Subject: [PATCH 012/212] Expose username as name of direct channel --- .../server/schemas/channels/Channel-type.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js index 8ae65ddb16aa..b980acad0f7b 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js +++ b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js @@ -23,6 +23,13 @@ export const schema = ` export const resolver = { Channel: { id: property('_id'), + name: (root, args, { user }) => { + if (root.t === 'd') { + return root.usernames.find(u => u !== user.username); + } + + return root.name; + }, members: (root) => { return root.usernames.map( username => RocketChat.models.Users.findOneByUsername(username) From 0499617c603681eeb30ec54084cdbd8207d3c96b Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Fri, 4 Aug 2017 22:13:44 +0200 Subject: [PATCH 013/212] WIP: rocketchat:grant --- .meteor/packages | 1 + .meteor/versions | 3 +- .../.npm/package/npm-shrinkwrap.json | 8 +- .../rocketchat-grant/.npm/package/.gitignore | 1 + packages/rocketchat-grant/.npm/package/README | 7 + .../.npm/package/npm-shrinkwrap.json | 538 ++++++++++++++++++ packages/rocketchat-grant/README.md | 10 + packages/rocketchat-grant/package.js | 23 + packages/rocketchat-grant/server/grant.js | 62 ++ packages/rocketchat-grant/server/index.js | 53 ++ packages/rocketchat-grant/server/redirect.js | 71 +++ .../.npm/package/npm-shrinkwrap.json | 17 +- 12 files changed, 784 insertions(+), 10 deletions(-) create mode 100644 packages/rocketchat-grant/.npm/package/.gitignore create mode 100644 packages/rocketchat-grant/.npm/package/README create mode 100644 packages/rocketchat-grant/.npm/package/npm-shrinkwrap.json create mode 100644 packages/rocketchat-grant/README.md create mode 100644 packages/rocketchat-grant/package.js create mode 100644 packages/rocketchat-grant/server/grant.js create mode 100644 packages/rocketchat-grant/server/index.js create mode 100644 packages/rocketchat-grant/server/redirect.js diff --git a/.meteor/packages b/.meteor/packages index c2f5c2bc98e6..4231ae96279e 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -64,6 +64,7 @@ rocketchat:file-upload rocketchat:github-enterprise rocketchat:gitlab rocketchat:google-vision +rocketchat:grant rocketchat:graphql rocketchat:highlight-words rocketchat:iframe-login diff --git a/.meteor/versions b/.meteor/versions index 253d100b0338..3d64471778f4 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -42,7 +42,7 @@ ecmascript-runtime-server@0.4.1 edgee:slingshot@0.7.1 ejson@1.0.14 email@1.2.3 -emojione:emojione@2.2.6 +emojione:emojione@3.0.3 facebook-oauth@1.3.2 fastclick@1.0.13 francocatena:status@1.5.3 @@ -152,6 +152,7 @@ rocketchat:file-upload@0.0.1 rocketchat:github-enterprise@0.0.1 rocketchat:gitlab@0.0.1 rocketchat:google-vision@0.0.1 +rocketchat:grant@0.0.1 rocketchat:graphql@0.0.1 rocketchat:highlight-words@0.0.1 rocketchat:i18n@0.0.1 diff --git a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json index 0ff3f7f21819..f279fb73a316 100644 --- a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json @@ -11,8 +11,8 @@ "from": "babel-polyfill@>=6.23.0 <7.0.0" }, "babel-runtime": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", "from": "babel-runtime@>=6.22.0 <7.0.0" }, "base64url": { @@ -203,8 +203,8 @@ "from": "safe-buffer@>=5.0.1 <6.0.0" }, "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", "from": "semver@>=5.1.0 <6.0.0" }, "starttls": { diff --git a/packages/rocketchat-grant/.npm/package/.gitignore b/packages/rocketchat-grant/.npm/package/.gitignore new file mode 100644 index 000000000000..3c3629e647f5 --- /dev/null +++ b/packages/rocketchat-grant/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/rocketchat-grant/.npm/package/README b/packages/rocketchat-grant/.npm/package/README new file mode 100644 index 000000000000..3d492553a438 --- /dev/null +++ b/packages/rocketchat-grant/.npm/package/README @@ -0,0 +1,7 @@ +This directory and the files immediately inside it are automatically generated +when you change this package's NPM dependencies. Commit the files in this +directory (npm-shrinkwrap.json, .gitignore, and this README) to source control +so that others run the same versions of sub-dependencies. + +You should NOT check in the node_modules directory that Meteor automatically +creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/rocketchat-grant/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-grant/.npm/package/npm-shrinkwrap.json new file mode 100644 index 000000000000..d824bf98528a --- /dev/null +++ b/packages/rocketchat-grant/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,538 @@ +{ + "dependencies": { + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "from": "accepts@>=1.3.3 <1.4.0" + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "from": "ajv@>=4.9.1 <5.0.0" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "from": "array-flatten@1.1.1" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "from": "asn1@>=0.2.3 <0.3.0" + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "from": "assert-plus@>=0.2.0 <0.3.0" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "from": "asynckit@>=0.4.0 <0.5.0" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "from": "aws-sign2@>=0.6.0 <0.7.0" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "from": "aws4@>=1.2.1 <2.0.0" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "from": "bcrypt-pbkdf@>=1.0.0 <2.0.0" + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "from": "boom@>=2.0.0 <3.0.0" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "from": "caseless@>=0.12.0 <0.13.0" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "from": "co@>=4.6.0 <5.0.0" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "from": "combined-stream@>=1.0.5 <1.1.0" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "from": "content-disposition@0.5.2" + }, + "content-type": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "from": "content-type@>=1.0.2 <1.1.0" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "from": "cookie@0.3.1" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "from": "cookie-signature@1.0.6" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "from": "core-util-is@1.0.2" + }, + "crc": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz", + "from": "crc@3.4.4" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "from": "cryptiles@>=2.0.0 <3.0.0" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "from": "dashdash@>=1.12.0 <2.0.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@>=1.0.0 <2.0.0" + } + } + }, + "debug": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", + "from": "debug@2.6.7" + }, + "deep-copy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/deep-copy/-/deep-copy-1.2.0.tgz", + "from": "deep-copy@>=1.2.0 <2.0.0" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "from": "delayed-stream@>=1.0.0 <1.1.0" + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "from": "depd@>=1.1.0 <1.2.0" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "from": "destroy@>=1.0.4 <1.1.0" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "from": "ecc-jsbn@>=0.1.1 <0.2.0" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "from": "ee-first@1.1.1" + }, + "encodeurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "from": "encodeurl@>=1.0.1 <1.1.0" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "from": "escape-html@>=1.0.3 <1.1.0" + }, + "etag": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", + "from": "etag@>=1.8.0 <1.9.0" + }, + "express": { + "version": "4.15.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", + "from": "express@4.15.3" + }, + "express-session": { + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.15.4.tgz", + "from": "express-session@1.15.4", + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "from": "debug@2.6.8" + } + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "from": "extend@>=3.0.0 <3.1.0" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "from": "extsprintf@1.3.0" + }, + "finalhandler": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", + "from": "finalhandler@>=1.0.3 <1.1.0" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "from": "forever-agent@>=0.6.1 <0.7.0" + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "from": "form-data@>=2.1.1 <2.2.0" + }, + "forwarded": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", + "from": "forwarded@>=0.1.0 <0.2.0" + }, + "fresh": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", + "from": "fresh@0.5.0" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "from": "getpass@>=0.1.1 <0.2.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@>=1.0.0 <2.0.0" + } + } + }, + "grant": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/grant/-/grant-3.8.0.tgz", + "from": "grant@3.8.0" + }, + "grant-express": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/grant-express/-/grant-express-3.8.0.tgz", + "from": "grant-express@3.8.0" + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "from": "har-schema@>=1.0.5 <2.0.0" + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "from": "har-validator@>=4.2.1 <4.3.0" + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "from": "hawk@>=3.1.3 <3.2.0" + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "from": "hoek@>=2.0.0 <3.0.0" + }, + "http-errors": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", + "from": "http-errors@>=1.6.1 <1.7.0", + "dependencies": { + "depd": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "from": "depd@1.1.0" + } + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "from": "http-signature@>=1.1.0 <1.2.0" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "from": "inherits@2.0.3" + }, + "ipaddr.js": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", + "from": "ipaddr.js@1.4.0" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "from": "is-typedarray@>=1.0.0 <1.1.0" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "from": "isstream@>=0.1.2 <0.2.0" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "from": "jsbn@>=0.1.0 <0.2.0" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "from": "json-schema@0.2.3" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "from": "json-stable-stringify@>=1.0.1 <2.0.0" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "from": "json-stringify-safe@>=5.0.1 <5.1.0" + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "from": "jsonify@>=0.0.0 <0.1.0" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "from": "jsprim@>=1.2.2 <2.0.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@1.0.0" + } + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "from": "media-typer@0.3.0" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "from": "merge-descriptors@1.0.1" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "from": "methods@>=1.1.2 <1.2.0" + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "from": "mime@1.3.4" + }, + "mime-db": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", + "from": "mime-db@>=1.29.0 <1.30.0" + }, + "mime-types": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", + "from": "mime-types@>=2.1.11 <2.2.0" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "from": "ms@2.0.0" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "from": "negotiator@0.6.1" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "from": "oauth-sign@>=0.8.1 <0.9.0" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "from": "on-finished@>=2.3.0 <2.4.0" + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "from": "on-headers@>=1.0.1 <1.1.0" + }, + "parseurl": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "from": "parseurl@>=1.3.1 <1.4.0" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "from": "path-to-regexp@0.1.7" + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "from": "performance-now@>=0.2.0 <0.3.0" + }, + "proxy-addr": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", + "from": "proxy-addr@>=1.1.4 <1.2.0" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "from": "punycode@>=1.4.1 <2.0.0" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "from": "qs@6.4.0" + }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "from": "random-bytes@>=1.0.0 <1.1.0" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "from": "range-parser@>=1.2.0 <1.3.0" + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "from": "request@2.81.0" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "from": "safe-buffer@>=5.0.1 <6.0.0" + }, + "send": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", + "from": "send@0.15.3" + }, + "serve-static": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", + "from": "serve-static@1.12.3" + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "from": "setprototypeof@1.0.3" + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "from": "sntp@>=1.0.0 <2.0.0" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "from": "sshpk@>=1.7.0 <2.0.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@>=1.0.0 <2.0.0" + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "from": "statuses@>=1.3.1 <1.4.0" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "from": "stringstream@>=0.0.4 <0.1.0" + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "from": "tough-cookie@>=2.3.0 <2.4.0" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "from": "tunnel-agent@>=0.6.0 <0.7.0" + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "from": "tweetnacl@>=0.14.0 <0.15.0" + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "from": "type-is@>=1.6.15 <1.7.0" + }, + "uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "from": "uid-safe@>=2.1.4 <2.2.0" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "from": "unpipe@>=1.0.0 <1.1.0" + }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "from": "utils-merge@1.0.0" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "from": "uuid@>=3.0.0 <4.0.0" + }, + "vary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", + "from": "vary@>=1.1.1 <1.2.0" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "from": "verror@1.10.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@>=1.0.0 <2.0.0" + } + } + } + } +} diff --git a/packages/rocketchat-grant/README.md b/packages/rocketchat-grant/README.md new file mode 100644 index 000000000000..b6b58a1c818f --- /dev/null +++ b/packages/rocketchat-grant/README.md @@ -0,0 +1,10 @@ +1. Settings should be the same as in OAuth section +1. Should be extendable (rocketchat:grant, rocketchat:grant-github etc) +1. Each package with provider should transform it's scope to user data so we can register a new user +1. rocketchat:grant-sub - to define sub configurations to allow for using external apps +1. rocketchat:grant should contain a middleware and startup fn with setup, that is already in rocketchat:oauth-external +1. in callback it would create and / or log in a user +1. without any specified sub configuration, it would redirect to localhost:3000 by default +1. with a specified sub configuration it would redirect to a path and add access_token to the URL + + diff --git a/packages/rocketchat-grant/package.js b/packages/rocketchat-grant/package.js new file mode 100644 index 000000000000..f6d63e698106 --- /dev/null +++ b/packages/rocketchat-grant/package.js @@ -0,0 +1,23 @@ +Package.describe({ + name: 'rocketchat:grant', + version: '0.0.1', + summary: 'OAuth2', + git: '' +}); + +Package.onUse(function(api) { + api.use([ + 'webapp', + 'mongo', + 'ecmascript', + 'rocketchat:lib' + ]); + + api.mainModule('server/index.js', 'server'); +}); + +Npm.depends({ + 'express': '4.15.3', + 'express-session': '1.15.4', + 'grant-express': '3.8.0' +}); diff --git a/packages/rocketchat-grant/server/grant.js b/packages/rocketchat-grant/server/grant.js new file mode 100644 index 000000000000..947d3d597c86 --- /dev/null +++ b/packages/rocketchat-grant/server/grant.js @@ -0,0 +1,62 @@ +export const path = '/_oauth_apps'; + +function generateCallback(serviceName) { + return `${ path }/${ serviceName }/callback`; +} + +function generateAppCallback(serviceName, appName) { + return generateCallback(`${ serviceName }/${ appName }`); +} + +function addProviders(config) { + const services = RocketChat.settings.get(/^(Accounts_OAuth_)[a-z0-9_]+$/i); + + services.forEach((service) => { + let serviceName = service.key.replace('Accounts_OAuth_', '').toLowerCase(); + + if (serviceName === 'meteor') { + serviceName = 'meteor-developer'; + } + + if (service.value === true) { + // TODO: scope + const data = { + key: RocketChat.settings.get(`${ service.key }_id`), + secret: RocketChat.settings.get(`${ service.key }_secret`), + callback: generateCallback(serviceName) + }; + + // TODO: create a space to set up OAuth services + if (serviceName === 'github') { + data.key = '96db2753350cfe8c8ae1'; + data.secret = '546317a561df5e3d350fca9b5500f270b54f3301'; + + console.log('PWA for GitHub'); + + // TODO: create a space to define Apps + data['pwa'] = { + callback: generateAppCallback(serviceName, 'pwa') + }; + } + + config[serviceName] = data; + } + }); + + return config; +} + +export function generateConfig() { + const config = { + server: { + protocol: 'http', + host: RocketChat.hostname, + path, + state: true + } + }; + + addProviders(config); + + return config; +} diff --git a/packages/rocketchat-grant/server/index.js b/packages/rocketchat-grant/server/index.js new file mode 100644 index 000000000000..c0cdba8bd7e1 --- /dev/null +++ b/packages/rocketchat-grant/server/index.js @@ -0,0 +1,53 @@ +/* +- localhost:3000/_oauth/facebook +- get the URI that this request comes from +- set it as redirectUrl +- do things +- add ?access_token= and ?service= to the URL +- redirect to it +*/ + +/*app.get(`${GRANT_PATH}/google/callback`, function (req, res) { + const accessToken = req.query.access_token; + res.redirect(`${STATIC_SERVER}/login?service=google&access_token=${accessToken}`); +});*/ + +import { WebApp } from 'meteor/webapp'; +import session from 'express-session'; +import Grant from 'grant-express'; +import fiber from 'fibers'; + +import { generateConfig, path } from './grant'; +import { middleware } from './redirect'; + +let grant; + +WebApp.connectHandlers.use(session({ + secret: 'grant', + resave: true, + saveUninitialized: true +})); + +// grant +WebApp.connectHandlers.use(path, (req, res, next) => { + if (grant) { + grant(req, res, next); + } else { + next(); + } +}); + +// callbacks +WebApp.connectHandlers.use((req, res, next) => { + fiber(() => { + middleware(req, res, next); + }).run(); +}); + +Meteor.startup(() => { + const config = generateConfig(); + + grant = new Grant(config); +}); + + diff --git a/packages/rocketchat-grant/server/redirect.js b/packages/rocketchat-grant/server/redirect.js new file mode 100644 index 000000000000..7b52a9b5fb28 --- /dev/null +++ b/packages/rocketchat-grant/server/redirect.js @@ -0,0 +1,71 @@ +function getEntry(req) { + let provider; + let app; + + const i = req.url.indexOf('?'); + let barePath; + + if (i === -1) { + barePath = req.url; + } else { + barePath = req.url.substring(0, i); + } + + const splitPath = barePath.split('/'); + + // Any non-oauth request will continue down the default + // middlewares. + if (splitPath[1] === '_oauth_apps') { + provider = splitPath[2]; + app = splitPath && splitPath[3] !== 'callback' ? splitPath[3] : null; + } + + return { + provider, + app + }; +} + +function getAccessToken(req) { + const i = req.url.indexOf('?'); + + if (i === -1) { + return; + } + + const barePath = req.url.substring(i + 1); + const splitPath = barePath.split('&'); + const token = splitPath.find(p => p.match(/access_token=[a-zA-Z0-9]+/)); + + if (token) { + return token.replace('access_token=', ''); + } +} + +export function middleware(req, res, next) { + const { + provider, + app + } = getEntry(req); + + if (!provider || !app) { + next(); + return; + } + + console.log('provider', provider); + console.log('app', app); + + // handle providers and apps + if (provider === 'github' && app === 'pwa') { + const token = getAccessToken(req); + console.log('token', token); + + // TODO: get redirect URL from settings + const redirectUrl = 'http://localhost:4200/login'; + + res.redirect(`${ redirectUrl }?service=${ provider }&access_token=${ token }`); + } + + next(); +} diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 5e620381c5c9..13032f7d6a0d 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -151,9 +151,16 @@ "from": "express@4.15.3" }, "finalhandler": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", - "from": "finalhandler@>=1.0.3 <1.1.0" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz", + "from": "finalhandler@>=1.0.3 <1.1.0", + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "from": "debug@2.6.8" + } + } }, "forwarded": { "version": "0.1.0", @@ -258,8 +265,8 @@ "from": "js-tokens@>=3.0.0 <4.0.0" }, "jsonwebtoken": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.1.tgz", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.2.tgz", "from": "jsonwebtoken@>=7.2.1 <8.0.0" }, "jwa": { From ebe18ed35f93d2cf389bcd8bbdf26e889b444353 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 9 Aug 2017 15:25:42 +0200 Subject: [PATCH 014/212] rocketchat-grant --- .meteor/packages | 3 + .meteor/versions | 3 + .../.npm/package/npm-shrinkwrap.json | 8 +- packages/rocketchat-grant-facebook/package.js | 16 +++ .../rocketchat-grant-facebook/server/index.js | 65 ++++++++++++ packages/rocketchat-grant-github/package.js | 16 +++ .../rocketchat-grant-github/server/index.js | 51 ++++++++++ packages/rocketchat-grant-google/package.js | 16 +++ .../rocketchat-grant-google/server/index.js | 43 ++++++++ packages/rocketchat-grant/README.md | 2 - packages/rocketchat-grant/package.js | 4 +- .../rocketchat-grant/server/authenticate.js | 84 ++++++++++++++++ packages/rocketchat-grant/server/grant.js | 73 ++++++-------- packages/rocketchat-grant/server/index.js | 38 +++---- packages/rocketchat-grant/server/providers.js | 42 ++++++++ packages/rocketchat-grant/server/redirect.js | 99 ++++++++----------- packages/rocketchat-grant/server/routes.js | 48 +++++++++ packages/rocketchat-grant/server/settings.js | 42 ++++++++ packages/rocketchat-grant/server/storage.js | 33 +++++++ .../.npm/package/npm-shrinkwrap.json | 17 +--- packages/rocketchat-graphql/package.js | 1 + .../schemas/accounts/OauthProvider-type.js | 5 + .../server/schemas/accounts/index.js | 17 +++- .../server/schemas/accounts/oauthProviders.js | 41 ++++++++ server/configuration/grant.js | 27 +++++ 25 files changed, 653 insertions(+), 141 deletions(-) create mode 100644 packages/rocketchat-grant-facebook/package.js create mode 100644 packages/rocketchat-grant-facebook/server/index.js create mode 100644 packages/rocketchat-grant-github/package.js create mode 100644 packages/rocketchat-grant-github/server/index.js create mode 100644 packages/rocketchat-grant-google/package.js create mode 100644 packages/rocketchat-grant-google/server/index.js create mode 100644 packages/rocketchat-grant/server/authenticate.js create mode 100644 packages/rocketchat-grant/server/providers.js create mode 100644 packages/rocketchat-grant/server/routes.js create mode 100644 packages/rocketchat-grant/server/settings.js create mode 100644 packages/rocketchat-grant/server/storage.js create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js create mode 100644 server/configuration/grant.js diff --git a/.meteor/packages b/.meteor/packages index 4231ae96279e..610aee81c3d2 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -65,6 +65,9 @@ rocketchat:github-enterprise rocketchat:gitlab rocketchat:google-vision rocketchat:grant +rocketchat:grant-facebook +rocketchat:grant-github +rocketchat:grant-google rocketchat:graphql rocketchat:highlight-words rocketchat:iframe-login diff --git a/.meteor/versions b/.meteor/versions index 3d64471778f4..e178545da53a 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -153,6 +153,9 @@ rocketchat:github-enterprise@0.0.1 rocketchat:gitlab@0.0.1 rocketchat:google-vision@0.0.1 rocketchat:grant@0.0.1 +rocketchat:grant-facebook@0.0.1 +rocketchat:grant-github@0.0.1 +rocketchat:grant-google@0.0.1 rocketchat:graphql@0.0.1 rocketchat:highlight-words@0.0.1 rocketchat:i18n@0.0.1 diff --git a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json index f279fb73a316..548e1696bac6 100644 --- a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json @@ -46,8 +46,8 @@ "from": "bufferjs@1.1.0" }, "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", "from": "core-js@>=2.4.0 <3.0.0" }, "core-util-is": { @@ -111,8 +111,8 @@ "from": "joi@>=6.10.1 <7.0.0" }, "jsonwebtoken": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.1.tgz", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.2.tgz", "from": "jsonwebtoken@>=7.2.1 <8.0.0" }, "jwa": { diff --git a/packages/rocketchat-grant-facebook/package.js b/packages/rocketchat-grant-facebook/package.js new file mode 100644 index 000000000000..ad67058dde82 --- /dev/null +++ b/packages/rocketchat-grant-facebook/package.js @@ -0,0 +1,16 @@ +Package.describe({ + name: 'rocketchat:grant-facebook', + version: '0.0.1', + summary: 'Provides Facebook to rocketchat:grant', + git: '' +}); + +Package.onUse(function(api) { + api.use([ + 'ecmascript', + 'http', + 'rocketchat:grant' + ]); + + api.mainModule('server/index.js', 'server'); +}); diff --git a/packages/rocketchat-grant-facebook/server/index.js b/packages/rocketchat-grant-facebook/server/index.js new file mode 100644 index 000000000000..882ef18ac129 --- /dev/null +++ b/packages/rocketchat-grant-facebook/server/index.js @@ -0,0 +1,65 @@ +import { Providers } from 'meteor/rocketchat:grant'; +import { HTTP } from 'meteor/http'; + +const userAgent = 'Meteor'; +const version = 'v2.10'; + +function getIdentity(accessToken, fields) { + try { + return HTTP.get( + `https://graph.facebook.com/${ version }/me`, { + headers: { 'User-Agent': userAgent }, + params: { + access_token: accessToken, + fields: fields.join(',') + } + }).data; + } catch (err) { + console.log('err', err); + throw Object.assign( + new Error(`Failed to fetch identity from Facebook. ${ err.message }`), + { response: err.response } + ); + } +} + +function getPicture(accessToken) { + try { + return HTTP.get( + `https://graph.facebook.com/${ version }/me/picture`, { + headers: { 'User-Agent': userAgent }, + params: { + redirect: false, + height: 200, + width: 200, + type: 'normal', + access_token: accessToken + } + }).data; + } catch (err) { + throw Object.assign( + new Error(`Failed to fetch profile picture from Facebook. ${ err.message }`), + { response: err.response } + ); + } +} + +export function getUser(accessToken) { + const whitelisted = ['id', 'email', 'name', 'first_name', 'last_name']; + const identity = getIdentity(accessToken, whitelisted); + const avatar = getPicture(accessToken); + const username = identity.name.toLowerCase().replace(' ', '.'); + + return { + id: identity.id, + email: identity.email, + username, + profile: { + name: `${ identity.first_name } ${ identity.last_name }`, + avatar: avatar.data.url + } + }; +} + +// Register Facebook OAuth +Providers.register('facebook', { scope: ['public_profile', 'email'] }, getUser); diff --git a/packages/rocketchat-grant-github/package.js b/packages/rocketchat-grant-github/package.js new file mode 100644 index 000000000000..0e3ce2d86198 --- /dev/null +++ b/packages/rocketchat-grant-github/package.js @@ -0,0 +1,16 @@ +Package.describe({ + name: 'rocketchat:grant-github', + version: '0.0.1', + summary: 'Provides GitHub to rocketchat:grant', + git: '' +}); + +Package.onUse(function(api) { + api.use([ + 'ecmascript', + 'http', + 'rocketchat:grant' + ]); + + api.mainModule('server/index.js', 'server'); +}); diff --git a/packages/rocketchat-grant-github/server/index.js b/packages/rocketchat-grant-github/server/index.js new file mode 100644 index 000000000000..4359fe07754b --- /dev/null +++ b/packages/rocketchat-grant-github/server/index.js @@ -0,0 +1,51 @@ +import { Providers } from 'meteor/rocketchat:grant'; +import { HTTP } from 'meteor/http'; + +const userAgent = 'Meteor'; + +function getIdentity(accessToken) { + try { + return HTTP.get( + 'https://api.github.com/user', { + headers: { 'User-Agent': userAgent }, // http://developer.github.com/v3/#user-agent-required + params: { access_token: accessToken } + }).data; + } catch (err) { + throw Object.assign( + new Error(`Failed to fetch identity from Github. ${ err.message }`), + { response: err.response } + ); + } +} + +function getEmails(accessToken) { + try { + return HTTP.get( + 'https://api.github.com/user/emails', { + headers: { 'User-Agent': userAgent }, // http://developer.github.com/v3/#user-agent-required + params: { access_token: accessToken } + }).data; + } catch (err) { + return []; + } +} + +export function getUser(accessToken) { + const identity = getIdentity(accessToken); + const emails = getEmails(accessToken); + const primaryEmail = (emails || []).find(email => email.primary === true); + + return { + id: identity.id, + email: identity.email || (primaryEmail && primaryEmail.email) || '', + username: identity.login, + emails, + profile: { + name: identity.name, + avatar: identity.avatar_url + } + }; +} + +// Register GitHub OAuth +Providers.register('github', { scope: ['user', 'user:email'] }, getUser); diff --git a/packages/rocketchat-grant-google/package.js b/packages/rocketchat-grant-google/package.js new file mode 100644 index 000000000000..b0a538c44e57 --- /dev/null +++ b/packages/rocketchat-grant-google/package.js @@ -0,0 +1,16 @@ +Package.describe({ + name: 'rocketchat:grant-google', + version: '0.0.1', + summary: 'Provides Google to rocketchat:grant', + git: '' +}); + +Package.onUse(function(api) { + api.use([ + 'ecmascript', + 'http', + 'rocketchat:grant' + ]); + + api.mainModule('server/index.js', 'server'); +}); diff --git a/packages/rocketchat-grant-google/server/index.js b/packages/rocketchat-grant-google/server/index.js new file mode 100644 index 000000000000..5cc545c18cda --- /dev/null +++ b/packages/rocketchat-grant-google/server/index.js @@ -0,0 +1,43 @@ +import { Providers } from 'meteor/rocketchat:grant'; +import { HTTP } from 'meteor/http'; + +const userAgent = 'Meteor'; + +function getIdentity(accessToken) { + try { + return HTTP.get( + 'https://www.googleapis.com/oauth2/v1/userinfo', { + headers: { 'User-Agent': userAgent }, + params: { + access_token: accessToken + } + }).data; + } catch (err) { + throw Object.assign( + new Error(`Failed to fetch identity from Google. ${ err.message }`), + { response: err.response } + ); + } +} + +export function getUser(accessToken) { + const whitelisted = [ + 'id', 'email', 'verified_email', 'name', + 'given_name', 'family_name', 'picture' + ]; + const identity = getIdentity(accessToken, whitelisted); + const username = `${ identity.given_name.toLowerCase() }.${ identity.family_name.toLowerCase() }`; + + return { + id: identity.id, + email: identity.email, + username, + profile: { + name: identity.name, + avatar: identity.picture + } + }; +} + +// Register Google OAuth +Providers.register('google', { scope: ['openid', 'email'] }, getUser); diff --git a/packages/rocketchat-grant/README.md b/packages/rocketchat-grant/README.md index b6b58a1c818f..c526711cf6c9 100644 --- a/packages/rocketchat-grant/README.md +++ b/packages/rocketchat-grant/README.md @@ -6,5 +6,3 @@ 1. in callback it would create and / or log in a user 1. without any specified sub configuration, it would redirect to localhost:3000 by default 1. with a specified sub configuration it would redirect to a path and add access_token to the URL - - diff --git a/packages/rocketchat-grant/package.js b/packages/rocketchat-grant/package.js index f6d63e698106..bec938b3cb22 100644 --- a/packages/rocketchat-grant/package.js +++ b/packages/rocketchat-grant/package.js @@ -9,8 +9,10 @@ Package.onUse(function(api) { api.use([ 'webapp', 'mongo', + 'check', 'ecmascript', - 'rocketchat:lib' + 'rocketchat:lib', + 'rocketchat:accounts' ]); api.mainModule('server/index.js', 'server'); diff --git a/packages/rocketchat-grant/server/authenticate.js b/packages/rocketchat-grant/server/authenticate.js new file mode 100644 index 000000000000..bf2512d1f1aa --- /dev/null +++ b/packages/rocketchat-grant/server/authenticate.js @@ -0,0 +1,84 @@ +import { AccountsServer } from 'meteor/rocketchat:accounts'; +import { Accounts } from 'meteor/accounts-base'; + +import Providers from './providers'; + +const findUserByOAuthId = (providerName, id) => { + return RocketChat.models.Users.findOne({ [`settings.profile.oauth.${ providerName }`]: id }); +}; + +const addOAuthIdToUserProfile = (user, providerName, providerId) => { + const profile = Object.assign({}, user.settings.profile, { + oauth: { + ...user.settings.profile.oauth, + [providerName]: providerId + } + }); + + RocketChat.models.Users.setProfile(user.id, profile); +}; + +function getAccessToken(req) { + const i = req.url.indexOf('?'); + + if (i === -1) { + return; + } + + const barePath = req.url.substring(i + 1); + const splitPath = barePath.split('&'); + const token = splitPath.find(p => p.match(/access_token=[a-zA-Z0-9]+/)); + + if (token) { + return token.replace('access_token=', ''); + } +} + +export async function authenticate(providerName, req) { + let tokens; + const accessToken = getAccessToken(req); + const provider = Providers.get(providerName); + + if (!provider) { + throw new Error(`Provider '${ providerName }' not found`); + } + + const userData = provider.getUser(accessToken); + + let user = findUserByOAuthId(providerName, userData.id); + + if (user) { + user.id = user._id; + } else { + user = RocketChat.models.Users.findOneByEmailAddress(userData.email); + if (user) { + user.id = user._id; + } + } + + if (user) { + addOAuthIdToUserProfile(user, providerName, userData.id); + + const loginResult = await AccountsServer.loginWithUser({ id: user.id }); + + tokens = loginResult.tokens; + } else { + const id = Accounts.createUser({ + email: userData.email + }); + + RocketChat.models.Users.setProfile(id, { + name: userData.profile.name, + avatar: userData.profile.avatar, + oauth: { + [providerName]: userData.id + } + }); + + const loginResult = await AccountsServer.loginWithUser({ id }); + + tokens = loginResult.tokens; + } + + return tokens; +} diff --git a/packages/rocketchat-grant/server/grant.js b/packages/rocketchat-grant/server/grant.js index 947d3d597c86..0f8890652909 100644 --- a/packages/rocketchat-grant/server/grant.js +++ b/packages/rocketchat-grant/server/grant.js @@ -1,62 +1,51 @@ -export const path = '/_oauth_apps'; - -function generateCallback(serviceName) { - return `${ path }/${ serviceName }/callback`; -} - -function generateAppCallback(serviceName, appName) { - return generateCallback(`${ serviceName }/${ appName }`); -} +import Providers from './providers'; +import Settings from './settings'; +import { path, generateCallback, generateAppCallback } from './routes'; function addProviders(config) { - const services = RocketChat.settings.get(/^(Accounts_OAuth_)[a-z0-9_]+$/i); - - services.forEach((service) => { - let serviceName = service.key.replace('Accounts_OAuth_', '').toLowerCase(); + Settings.forEach((settings, providerName) => { + if (settings.enabled === true) { + const registeredProvider = Providers.get(providerName); - if (serviceName === 'meteor') { - serviceName = 'meteor-developer'; - } + if (!registeredProvider) { + console.error(`No configuration for '${ providerName }' provider`); + } - if (service.value === true) { - // TODO: scope + // basic settings const data = { - key: RocketChat.settings.get(`${ service.key }_id`), - secret: RocketChat.settings.get(`${ service.key }_secret`), - callback: generateCallback(serviceName) + key: settings.key, + secret: settings.secret, + scope: registeredProvider.scope, + callback: generateCallback(providerName) }; - // TODO: create a space to set up OAuth services - if (serviceName === 'github') { - data.key = '96db2753350cfe8c8ae1'; - data.secret = '546317a561df5e3d350fca9b5500f270b54f3301'; - - console.log('PWA for GitHub'); - - // TODO: create a space to define Apps - data['pwa'] = { - callback: generateAppCallback(serviceName, 'pwa') + // set each app + Settings.apps.forEach((_, appName) => { + data[appName] = { + callback: generateAppCallback(providerName, appName) }; - } + }); - config[serviceName] = data; + config[providerName] = data; } }); - - return config; } +const config = {}; + export function generateConfig() { - const config = { - server: { - protocol: 'http', - host: RocketChat.hostname, - path, - state: true - } + config['server'] = { + protocol: 'http', + host: RocketChat.hostname, + path, + state: true }; addProviders(config); return config; } + +export function getConfig() { + return config; +} diff --git a/packages/rocketchat-grant/server/index.js b/packages/rocketchat-grant/server/index.js index c0cdba8bd7e1..fc06ae57ba3a 100644 --- a/packages/rocketchat-grant/server/index.js +++ b/packages/rocketchat-grant/server/index.js @@ -1,24 +1,13 @@ -/* -- localhost:3000/_oauth/facebook -- get the URI that this request comes from -- set it as redirectUrl -- do things -- add ?access_token= and ?service= to the URL -- redirect to it -*/ - -/*app.get(`${GRANT_PATH}/google/callback`, function (req, res) { - const accessToken = req.query.access_token; - res.redirect(`${STATIC_SERVER}/login?service=google&access_token=${accessToken}`); -});*/ - import { WebApp } from 'meteor/webapp'; import session from 'express-session'; import Grant from 'grant-express'; import fiber from 'fibers'; -import { generateConfig, path } from './grant'; -import { middleware } from './redirect'; +import { generateConfig } from './grant'; +import { path, generateCallback, generateAppCallback } from './routes'; +import { middleware as redirect } from './redirect'; +import Providers, { middleware as providers } from './providers'; +import Settings from './settings'; let grant; @@ -40,7 +29,14 @@ WebApp.connectHandlers.use(path, (req, res, next) => { // callbacks WebApp.connectHandlers.use((req, res, next) => { fiber(() => { - middleware(req, res, next); + redirect(req, res, next); + }).run(); +}); + +// providers +WebApp.connectHandlers.use((req, res, next) => { + fiber(() => { + providers(req, res, next); }).run(); }); @@ -50,4 +46,10 @@ Meteor.startup(() => { grant = new Grant(config); }); - +export { + path, + generateCallback, + generateAppCallback, + Providers, + Settings +}; diff --git a/packages/rocketchat-grant/server/providers.js b/packages/rocketchat-grant/server/providers.js new file mode 100644 index 000000000000..4b2aad10cee5 --- /dev/null +++ b/packages/rocketchat-grant/server/providers.js @@ -0,0 +1,42 @@ +import { check } from 'meteor/check'; + +import { Storage } from './storage'; +import { routes } from './routes'; + +class Providers extends Storage { + register(name, options, getUser) { + check(name, String); + check(options, { + // eslint-disable-next-line + scope: Match.OneOf(String, [String]) + }); + check(getUser, Function); + + this._add(name.toLowerCase(), { + scope: options.scope, + getUser + }); + } +} + +const providers = new Providers; + +export default providers; + +export function middleware(req, res, next) { + const route = routes.providers(req); + + if (route) { + const list = []; + + providers.forEach((_, name) => list.push(name)); + + // TODO: send a list of providers + res.end(JSON.stringify({ + data: list + })); + return; + } + + next(); +} diff --git a/packages/rocketchat-grant/server/redirect.js b/packages/rocketchat-grant/server/redirect.js index 7b52a9b5fb28..25faad1e1ca9 100644 --- a/packages/rocketchat-grant/server/redirect.js +++ b/packages/rocketchat-grant/server/redirect.js @@ -1,70 +1,49 @@ -function getEntry(req) { - let provider; - let app; +import { authenticate } from './authenticate'; +import Settings from './settings'; +import { routes } from './routes'; - const i = req.url.indexOf('?'); - let barePath; - - if (i === -1) { - barePath = req.url; - } else { - barePath = req.url.substring(0, i); - } - - const splitPath = barePath.split('/'); - - // Any non-oauth request will continue down the default - // middlewares. - if (splitPath[1] === '_oauth_apps') { - provider = splitPath[2]; - app = splitPath && splitPath[3] !== 'callback' ? splitPath[3] : null; - } - - return { - provider, - app - }; +function parseUrl(url, config) { + return url.replace(/\{[\ ]*(provider|accessToken|refreshToken|error)[\ ]*\}/g, (_, key) => config[key]); } -function getAccessToken(req) { - const i = req.url.indexOf('?'); +function getAppConfig(providerName, appName) { + const providerConfig = Settings.get(providerName); - if (i === -1) { - return; - } - - const barePath = req.url.substring(i + 1); - const splitPath = barePath.split('&'); - const token = splitPath.find(p => p.match(/access_token=[a-zA-Z0-9]+/)); - - if (token) { - return token.replace('access_token=', ''); + if (providerConfig) { + return Settings.apps.get(appName); } } -export function middleware(req, res, next) { - const { - provider, - app - } = getEntry(req); - - if (!provider || !app) { - next(); - return; - } - - console.log('provider', provider); - console.log('app', app); - - // handle providers and apps - if (provider === 'github' && app === 'pwa') { - const token = getAccessToken(req); - console.log('token', token); - - // TODO: get redirect URL from settings - const redirectUrl = 'http://localhost:4200/login'; - - res.redirect(`${ redirectUrl }?service=${ provider }&access_token=${ token }`); +export async function middleware(req, res, next) { + const route = routes.appCallback(req); + + // handle app callback + if (route) { + const config = { + provider: route.provider + }; + const appConfig = getAppConfig(route.provider, route.app); + + if (appConfig) { + const { + redirectUrl, + errorUrl + } = appConfig; + + try { + const tokens = await authenticate(route.provider, req); + + config.accessToken = tokens.accessToken; + config.refreshToken = tokens.refreshToken; + + res.redirect(parseUrl(redirectUrl, config)); + return; + } catch (error) { + config.error = error.message; + res.redirect(parseUrl(errorUrl, config)); + return; + } + } } next(); diff --git a/packages/rocketchat-grant/server/routes.js b/packages/rocketchat-grant/server/routes.js new file mode 100644 index 000000000000..041156f2abca --- /dev/null +++ b/packages/rocketchat-grant/server/routes.js @@ -0,0 +1,48 @@ +export const path = '/_oauth_apps'; + +export function generateCallback(providerName) { + return `${ path }/${ providerName }/callback`; +} + +export function generateAppCallback(providerName, appName) { + return generateCallback(`${ providerName }/${ appName }`); +} + +export function getPaths(req) { + const i = req.url.indexOf('?'); + let barePath; + + if (i === -1) { + barePath = req.url; + } else { + barePath = req.url.substring(0, i); + } + + const splitPath = barePath.split('/'); + + // Any non-oauth request will continue down the default + // middlewares. + if (splitPath[1] === '_oauth_apps') { + return splitPath.slice(2); + } +} + +export const routes = { + // :path/:provider/:app/callback + appCallback: (req) => { + const paths = getPaths(req); + + if (paths && paths[2] === 'callback') { + return { + provider: paths[0], + app: paths[1] + }; + } + }, + // :path/providers + providers: (req) => { + const paths = getPaths(req); + + return paths && paths[0] === 'providers'; + } +}; diff --git a/packages/rocketchat-grant/server/settings.js b/packages/rocketchat-grant/server/settings.js new file mode 100644 index 000000000000..e53b466fa87f --- /dev/null +++ b/packages/rocketchat-grant/server/settings.js @@ -0,0 +1,42 @@ +import { check } from 'meteor/check'; + +import { Storage } from './storage'; + +class Apps extends Storage { + add(name, body) { + check(name, String); + check(body, { + redirectUrl: String, + errorUrl: String + }); + + this._add(name, body); + } +} + +class Settings extends Storage { + constructor() { + super(); + + this.apps = new Apps; + } + add(settings) { + check(settings, { + enabled: Match.Optional(Boolean), + provider: String, + key: String, + secret: String + }); + + this._add(settings.provider, { + enabled: settings.enabled === true, + provider: settings.provider, + key: settings.key, + secret: settings.secret + }); + } +} + +const settings = new Settings; + +export default settings; diff --git a/packages/rocketchat-grant/server/storage.js b/packages/rocketchat-grant/server/storage.js new file mode 100644 index 000000000000..90d506681a83 --- /dev/null +++ b/packages/rocketchat-grant/server/storage.js @@ -0,0 +1,33 @@ +export class Storage { + constructor() { + this._data = {}; + } + + all() { + return this._data; + } + + forEach(fn) { + Object.keys(this.all()) + .forEach((name) => { + fn(this.get(name), name); + }); + } + + get(name) { + return this.all()[name.toLowerCase()]; + } + + has(name) { + return !!this._data[name]; + } + + _add(name, body) { + if (this.has(name)) { + console.error(`'${ name }' have been already defined`); + return; + } + + this._data[name] = body; + } +} diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 13032f7d6a0d..482cfcaf4242 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -71,8 +71,8 @@ "from": "cookie-signature@1.0.6" }, "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", "from": "core-js@>=2.4.0 <3.0.0" }, "cors": { @@ -218,16 +218,9 @@ "from": "hoek@>=2.0.0 <3.0.0" }, "http-errors": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", - "from": "http-errors@>=1.6.1 <1.7.0", - "dependencies": { - "depd": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", - "from": "depd@1.1.0" - } - } + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "from": "http-errors@>=1.6.1 <1.7.0" }, "iconv-lite": { "version": "0.4.15", diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js index 24f1b58779af..1fbde6720c12 100644 --- a/packages/rocketchat-graphql/package.js +++ b/packages/rocketchat-graphql/package.js @@ -9,6 +9,7 @@ Package.onUse(function(api) { api.use([ 'underscore', 'ecmascript', + 'http', 'rocketchat:lib', 'rocketchat:api', 'rocketchat:accounts' diff --git a/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js b/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js new file mode 100644 index 000000000000..dd4a4253fd37 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js @@ -0,0 +1,5 @@ +export const schema = ` + type OauthProvider { + name: String! + } +`; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/index.js b/packages/rocketchat-graphql/server/schemas/accounts/index.js index cf41ed398f04..e82a7077059b 100644 --- a/packages/rocketchat-graphql/server/schemas/accounts/index.js +++ b/packages/rocketchat-graphql/server/schemas/accounts/index.js @@ -1,8 +1,21 @@ import { createJSAccountsGraphQL } from '@accounts/graphql-api'; import { AccountsServer } from 'meteor/rocketchat:accounts'; +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; + +// queries +import * as oauthProviders from './oauthProviders'; +// types +import * as OauthProviderType from './OauthProvider-type'; const accountsGraphQL = createJSAccountsGraphQL(AccountsServer); -export const schema = accountsGraphQL.schema; +export const schema = mergeTypes([ + accountsGraphQL.schema, + oauthProviders.schema, + OauthProviderType.schema +]); -export const resolvers = accountsGraphQL.extendWithResolvers({}); +export const resolvers = mergeResolvers([ + accountsGraphQL.extendWithResolvers({}), + oauthProviders.resolver +]); diff --git a/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js b/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js new file mode 100644 index 000000000000..270f17a355b7 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js @@ -0,0 +1,41 @@ +import { HTTP } from 'meteor/http'; +import { Meteor } from 'meteor/meteor'; + +function isJSON(obj) { + try { + JSON.parse(obj); + return true; + } catch (e) { + return false; + } +} + +export const schema = ` + type Query { + oauthProviders: [OauthProvider] + } +`; + +export const resolver = { + Query: { + oauthProviders: async() => { + // depends on rocketchat:grant package + try { + const url = Meteor.absoluteUrl('_oauth_apps/providers'); + console.log('url', url); + const result = HTTP.get(Meteor.absoluteUrl('_oauth_apps/providers')).content; + + if (isJSON(result)) { + const providers = JSON.parse(result).data; + + return providers.map((name) => ({ name })); + } else { + throw new Error('Could not parse the result'); + } + } catch (e) { + console.error('oauthProviders resolver', e); + throw new Error('rocketchat:grant not installed'); + } + } + } +}; diff --git a/server/configuration/grant.js b/server/configuration/grant.js new file mode 100644 index 000000000000..f12a59c300be --- /dev/null +++ b/server/configuration/grant.js @@ -0,0 +1,27 @@ +import { Settings } from 'meteor/rocketchat:grant'; + +Settings.add({ + enabled: true, + provider: 'github', + key: '96db2753350cfe8c8ae1', + secret: '546317a561df5e3d350fca9b5500f270b54f3301' +}); + +Settings.add({ + enabled: true, + provider: 'facebook', + key: '494859557516801', + secret: '5274d3495cebaf01f7e1b90fe1331fba' +}); + +Settings.add({ + enabled: true, + provider: 'google', + key: '979285364697-pob8soqche90ng1af0pj9if6ed69jalh.apps.googleusercontent.com', + secret: 'lFWtrtJngtlNBdrAoevwPjZh' +}); + +Settings.apps.add('pwa', { + redirectUrl: 'http://localhost:4200/login?service={provider}&access_token={accessToken}&refresh_token={refreshToken}', + errorUrl: 'http://localhost:4200/login?service={provider}&error={error}' +}); From e6e9b1be357ea044b80934f9170bc15e3fff2f4d Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 9 Aug 2017 18:51:43 +0200 Subject: [PATCH 015/212] Moar --- .../rocketchat-grant-facebook/server/index.js | 19 +++++-------------- .../rocketchat-grant-github/server/index.js | 15 ++++++--------- .../rocketchat-grant-google/server/index.js | 13 ++++--------- .../rocketchat-grant/server/authenticate.js | 13 +++++++++---- packages/rocketchat-grant/server/error.js | 5 +++++ packages/rocketchat-grant/server/index.js | 4 +++- packages/rocketchat-grant/server/redirect.js | 6 +++++- .../server/schemas/messages/Message-type.js | 2 ++ .../server/schemas/messages/messages.js | 7 ++++++- 9 files changed, 45 insertions(+), 39 deletions(-) create mode 100644 packages/rocketchat-grant/server/error.js diff --git a/packages/rocketchat-grant-facebook/server/index.js b/packages/rocketchat-grant-facebook/server/index.js index 882ef18ac129..7dc87f6494f9 100644 --- a/packages/rocketchat-grant-facebook/server/index.js +++ b/packages/rocketchat-grant-facebook/server/index.js @@ -1,4 +1,4 @@ -import { Providers } from 'meteor/rocketchat:grant'; +import { Providers, GrantError } from 'meteor/rocketchat:grant'; import { HTTP } from 'meteor/http'; const userAgent = 'Meteor'; @@ -15,11 +15,7 @@ function getIdentity(accessToken, fields) { } }).data; } catch (err) { - console.log('err', err); - throw Object.assign( - new Error(`Failed to fetch identity from Facebook. ${ err.message }`), - { response: err.response } - ); + throw new GrantError(`Failed to fetch identity from Facebook. ${ err.message }`); } } @@ -37,10 +33,7 @@ function getPicture(accessToken) { } }).data; } catch (err) { - throw Object.assign( - new Error(`Failed to fetch profile picture from Facebook. ${ err.message }`), - { response: err.response } - ); + throw new GrantError(`Failed to fetch profile picture from Facebook. ${ err.message }`); } } @@ -54,10 +47,8 @@ export function getUser(accessToken) { id: identity.id, email: identity.email, username, - profile: { - name: `${ identity.first_name } ${ identity.last_name }`, - avatar: avatar.data.url - } + name: `${ identity.first_name } ${ identity.last_name }`, + avatar: avatar.data.url }; } diff --git a/packages/rocketchat-grant-github/server/index.js b/packages/rocketchat-grant-github/server/index.js index 4359fe07754b..2d82479b7e09 100644 --- a/packages/rocketchat-grant-github/server/index.js +++ b/packages/rocketchat-grant-github/server/index.js @@ -1,4 +1,4 @@ -import { Providers } from 'meteor/rocketchat:grant'; +import { Providers, GrantError } from 'meteor/rocketchat:grant'; import { HTTP } from 'meteor/http'; const userAgent = 'Meteor'; @@ -11,10 +11,7 @@ function getIdentity(accessToken) { params: { access_token: accessToken } }).data; } catch (err) { - throw Object.assign( - new Error(`Failed to fetch identity from Github. ${ err.message }`), - { response: err.response } - ); + throw new GrantError(`Failed to fetch identity from Github. ${ err.message }`); } } @@ -35,15 +32,15 @@ export function getUser(accessToken) { const emails = getEmails(accessToken); const primaryEmail = (emails || []).find(email => email.primary === true); + console.log('identity', identity); + return { id: identity.id, email: identity.email || (primaryEmail && primaryEmail.email) || '', username: identity.login, emails, - profile: { - name: identity.name, - avatar: identity.avatar_url - } + name: identity.name, + avatar: identity.avatar_url }; } diff --git a/packages/rocketchat-grant-google/server/index.js b/packages/rocketchat-grant-google/server/index.js index 5cc545c18cda..f1cf2ae853a6 100644 --- a/packages/rocketchat-grant-google/server/index.js +++ b/packages/rocketchat-grant-google/server/index.js @@ -1,4 +1,4 @@ -import { Providers } from 'meteor/rocketchat:grant'; +import { Providers, GrantError } from 'meteor/rocketchat:grant'; import { HTTP } from 'meteor/http'; const userAgent = 'Meteor'; @@ -13,10 +13,7 @@ function getIdentity(accessToken) { } }).data; } catch (err) { - throw Object.assign( - new Error(`Failed to fetch identity from Google. ${ err.message }`), - { response: err.response } - ); + throw new GrantError(`Failed to fetch identity from Google. ${ err.message }`); } } @@ -32,10 +29,8 @@ export function getUser(accessToken) { id: identity.id, email: identity.email, username, - profile: { - name: identity.name, - avatar: identity.picture - } + name: identity.name, + avatar: identity.picture }; } diff --git a/packages/rocketchat-grant/server/authenticate.js b/packages/rocketchat-grant/server/authenticate.js index bf2512d1f1aa..33544467875b 100644 --- a/packages/rocketchat-grant/server/authenticate.js +++ b/packages/rocketchat-grant/server/authenticate.js @@ -1,6 +1,7 @@ import { AccountsServer } from 'meteor/rocketchat:accounts'; import { Accounts } from 'meteor/accounts-base'; +import { GrantError } from './error'; import Providers from './providers'; const findUserByOAuthId = (providerName, id) => { @@ -40,11 +41,13 @@ export async function authenticate(providerName, req) { const provider = Providers.get(providerName); if (!provider) { - throw new Error(`Provider '${ providerName }' not found`); + throw new GrantError(`Provider '${ providerName }' not found`); } const userData = provider.getUser(accessToken); + console.log('userData', userData); + let user = findUserByOAuthId(providerName, userData.id); if (user) { @@ -64,17 +67,19 @@ export async function authenticate(providerName, req) { tokens = loginResult.tokens; } else { const id = Accounts.createUser({ - email: userData.email + email: userData.email, + username: userData.username }); RocketChat.models.Users.setProfile(id, { - name: userData.profile.name, - avatar: userData.profile.avatar, + avatar: userData.avatar, oauth: { [providerName]: userData.id } }); + RocketChat.models.Users.setName(id, userData.name); + const loginResult = await AccountsServer.loginWithUser({ id }); tokens = loginResult.tokens; diff --git a/packages/rocketchat-grant/server/error.js b/packages/rocketchat-grant/server/error.js new file mode 100644 index 000000000000..16ab38913db8 --- /dev/null +++ b/packages/rocketchat-grant/server/error.js @@ -0,0 +1,5 @@ +export class GrantError extends Error { + constructor(...args) { + super(...args); + } +} diff --git a/packages/rocketchat-grant/server/index.js b/packages/rocketchat-grant/server/index.js index fc06ae57ba3a..5aec92218200 100644 --- a/packages/rocketchat-grant/server/index.js +++ b/packages/rocketchat-grant/server/index.js @@ -3,6 +3,7 @@ import session from 'express-session'; import Grant from 'grant-express'; import fiber from 'fibers'; +import { GrantError } from './error'; import { generateConfig } from './grant'; import { path, generateCallback, generateAppCallback } from './routes'; import { middleware as redirect } from './redirect'; @@ -51,5 +52,6 @@ export { generateCallback, generateAppCallback, Providers, - Settings + Settings, + GrantError }; diff --git a/packages/rocketchat-grant/server/redirect.js b/packages/rocketchat-grant/server/redirect.js index 25faad1e1ca9..2423758f48ca 100644 --- a/packages/rocketchat-grant/server/redirect.js +++ b/packages/rocketchat-grant/server/redirect.js @@ -1,6 +1,7 @@ import { authenticate } from './authenticate'; import Settings from './settings'; import { routes } from './routes'; +import { GrantError } from './error'; function parseUrl(url, config) { return url.replace(/\{[\ ]*(provider|accessToken|refreshToken|error)[\ ]*\}/g, (_, key) => config[key]); @@ -39,7 +40,10 @@ export async function middleware(req, res, next) { res.redirect(parseUrl(redirectUrl, config)); return; } catch (error) { - config.error = error.message; + config.error = error instanceof GrantError ? error.message : 'Something went wrong'; + + console.error(error); + res.redirect(parseUrl(errorUrl, config)); return; } diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js index 09204793acf7..b1234eb9a574 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -9,6 +9,7 @@ export const schema = ` channel: Channel creationTime: Float fromServer: Boolean + type: String userRef: [User] channelRef: [Channel] reactions: [Reaction] @@ -29,6 +30,7 @@ export const resolver = { return RocketChat.models.Rooms.findOne(root.rid); }, fromServer: (root) => typeof root.t !== 'undefined', // on a message sent by user `true` otherwise `false` + type: property('t'), channelRef: (root) => { if (!root.channels) { return; diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/schemas/messages/messages.js index ad8bb24cdfed..b47062932e96 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.js +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.js @@ -8,7 +8,8 @@ export const schema = ` channelName: String, cursor: String, count: Int, - searchRegex: String + searchRegex: String, + excludeServer: Boolean ): MessagesWithCursor } `; @@ -59,6 +60,10 @@ export const resolver = { messagesOptions.limit = args.count; } + if (args.excludeServer === true) { + messagesQuery.t = { $exists: false }; + } + const messages = RocketChat.models.Messages.find( Object.assign({}, messagesQuery, { rid: channel._id }), messagesOptions From 09157fe1d5a33ea3be7cd66310560847d379c746 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 9 Aug 2017 19:04:17 +0200 Subject: [PATCH 016/212] Remove console.logs and set email as verified --- packages/rocketchat-grant-github/server/index.js | 2 -- packages/rocketchat-grant/server/authenticate.js | 4 +--- .../server/schemas/accounts/oauthProviders.js | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/rocketchat-grant-github/server/index.js b/packages/rocketchat-grant-github/server/index.js index 2d82479b7e09..1358986420c3 100644 --- a/packages/rocketchat-grant-github/server/index.js +++ b/packages/rocketchat-grant-github/server/index.js @@ -32,8 +32,6 @@ export function getUser(accessToken) { const emails = getEmails(accessToken); const primaryEmail = (emails || []).find(email => email.primary === true); - console.log('identity', identity); - return { id: identity.id, email: identity.email || (primaryEmail && primaryEmail.email) || '', diff --git a/packages/rocketchat-grant/server/authenticate.js b/packages/rocketchat-grant/server/authenticate.js index 33544467875b..305ff3ad37c6 100644 --- a/packages/rocketchat-grant/server/authenticate.js +++ b/packages/rocketchat-grant/server/authenticate.js @@ -46,8 +46,6 @@ export async function authenticate(providerName, req) { const userData = provider.getUser(accessToken); - console.log('userData', userData); - let user = findUserByOAuthId(providerName, userData.id); if (user) { @@ -77,8 +75,8 @@ export async function authenticate(providerName, req) { [providerName]: userData.id } }); - RocketChat.models.Users.setName(id, userData.name); + RocketChat.models.Users.setEmailVerified(id, userData.email); const loginResult = await AccountsServer.loginWithUser({ id }); diff --git a/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js b/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js index 270f17a355b7..9cefedb7a15e 100644 --- a/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js +++ b/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js @@ -21,8 +21,6 @@ export const resolver = { oauthProviders: async() => { // depends on rocketchat:grant package try { - const url = Meteor.absoluteUrl('_oauth_apps/providers'); - console.log('url', url); const result = HTTP.get(Meteor.absoluteUrl('_oauth_apps/providers')).content; if (isJSON(result)) { From 4d5e0b616dc2341bdd3806039c153c08e9fb6754 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 17 Aug 2017 16:09:56 +0200 Subject: [PATCH 017/212] Implemented saving avatars properly and fixed messages sorting (DESC `ts`) --- .../rocketchat-grant/server/authenticate.js | 23 +++++++++++++++++++ .../server/schemas/messages/Message-type.js | 4 +++- .../server/schemas/messages/messages.js | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-grant/server/authenticate.js b/packages/rocketchat-grant/server/authenticate.js index 305ff3ad37c6..ad68fb009681 100644 --- a/packages/rocketchat-grant/server/authenticate.js +++ b/packages/rocketchat-grant/server/authenticate.js @@ -1,9 +1,30 @@ import { AccountsServer } from 'meteor/rocketchat:accounts'; import { Accounts } from 'meteor/accounts-base'; +import { Meteor } from 'meteor/meteor'; import { GrantError } from './error'; import Providers from './providers'; +const setAvatarFromUrl = (userId, url) => { + return new Promise((resolve, reject) => { + Meteor.runAsUser(userId, () => { + Meteor.call('setAvatarFromService', url, '', 'url', (err) => { + if (err) { + if (err.details.timeToReset && err.details.timeToReset) { + reject((t('error-too-many-requests', { + seconds: parseInt(err.details.timeToReset / 1000) + }))); + } else { + reject(t('Avatar_url_invalid_or_error')); + } + } else { + resolve(); + } + }); + }); + }); +}; + const findUserByOAuthId = (providerName, id) => { return RocketChat.models.Users.findOne({ [`settings.profile.oauth.${ providerName }`]: id }); }; @@ -78,6 +99,8 @@ export async function authenticate(providerName, req) { RocketChat.models.Users.setName(id, userData.name); RocketChat.models.Users.setEmailVerified(id, userData.email); + await setAvatarFromUrl(id, userData.avatar); + const loginResult = await AccountsServer.loginWithUser({ id }); tokens = loginResult.tokens; diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js index b1234eb9a574..177a84bd213c 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -24,7 +24,9 @@ export const resolver = { content: property('msg'), creationTime: (root) => dateToFloat(root.ts), author: (root) => { - return RocketChat.models.Users.findOne(root.u._id); + const user = RocketChat.models.Users.findOne(root.u._id); + + return user || root.u; }, channel: (root) => { return RocketChat.models.Rooms.findOne(root.rid); diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/schemas/messages/messages.js index b47062932e96..8083d2fa6fdf 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.js +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.js @@ -19,7 +19,7 @@ export const resolver = { messages: authenticated((root, args) => { const messagesQuery = {}; const messagesOptions = { - sort: { ts: 1 } + sort: { ts: -1 } }; const channelQuery = {}; const isPagination = !!args.cursor || args.count > 0; From f90e302a15efa0fe6b5dbc6c1ceb91fb6f3e9193 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 29 Aug 2017 11:40:38 +0200 Subject: [PATCH 018/212] Use findOneByRoomIdAndUserId instead of custom one --- .../server/helpers/findChannelByIdAndUser.js | 8 -------- .../server/schemas/channels/Channel-type.js | 17 ++--------------- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js diff --git a/packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js b/packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js deleted file mode 100644 index b36f972203e6..000000000000 --- a/packages/rocketchat-graphql/server/helpers/findChannelByIdAndUser.js +++ /dev/null @@ -1,8 +0,0 @@ -export function findChannelByIdAndUser({ params, options = {} }) { - const sub = RocketChat.models.Subscriptions.findOne({ - rid: params.roomId, - 'u._id': params.userId - }, options); - - return sub; -} diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js index b980acad0f7b..cfcbebe2a327 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js +++ b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js @@ -1,5 +1,4 @@ import { property } from '../../helpers/property'; -import { findChannelByIdAndUser } from '../../helpers/findChannelByIdAndUser'; export const schema = ` type Channel { @@ -49,24 +48,12 @@ export const resolver = { direct: (root) => root.t === 'd', privateChannel: (root) => root.t === 'p', favourite: (root, args, { user }) => { - const room = findChannelByIdAndUser({ - params: { - roomId: root._id, - userId: user._id - }, - options: { fields: { f: 1 }} - }); + const room = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(root._id, user._id); return room && room.f === true; }, unseenMessages: (root, args, { user }) => { - const room = findChannelByIdAndUser({ - params: { - roomId: root._id, - userId: user._id - }, - options: { fields: { unread: 1 }} - }); + const room = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(root._id, user._id); return (room || {}).unread; } From c522dd9a5262fe17fee22f3656df97becf4eb0fa Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 29 Aug 2017 13:00:43 +0200 Subject: [PATCH 019/212] Update deps in rocketchat:graphql --- packages/rocketchat-graphql/package.js | 13 ++++++------- packages/rocketchat-graphql/server/api.js | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js index 1fbde6720c12..b4ceb319ed9b 100644 --- a/packages/rocketchat-graphql/package.js +++ b/packages/rocketchat-graphql/package.js @@ -20,14 +20,13 @@ Package.onUse(function(api) { Npm.depends({ '@accounts/graphql-api': '0.1.1', - 'apollo-client': '1.6.0', - 'cors': '2.8.3', + 'apollo-server-express': '1.1.2', + 'cors': '2.8.4', 'body-parser': '1.17.2', - 'express': '4.15.3', + 'express': '4.15.4', 'graphql': '0.10.3', - 'graphql-server-express': '0.9.0', 'graphql-subscriptions': '0.4.4', - 'graphql-tools': '1.1.0', - 'merge-graphql-schemas': '1.1.0', - 'subscriptions-transport-ws': '0.8.1' + 'graphql-tools': '1.2.2', + 'merge-graphql-schemas': '1.1.2', + 'subscriptions-transport-ws': '0.8.2' }); diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index 7a82b6acec00..a8262a0d33f4 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -1,4 +1,4 @@ -import { graphqlExpress, graphiqlExpress } from 'graphql-server-express'; +import { graphqlExpress, graphiqlExpress } from 'apollo-server-express'; import { JSAccountsContext as jsAccountsContext } from '@accounts/graphql-api'; import { SubscriptionServer } from 'subscriptions-transport-ws'; import { execute, subscribe } from 'graphql'; From 7a6bce9317cd0d9b22fce4c192fe8d0d4b5a80be Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 29 Aug 2017 13:03:54 +0200 Subject: [PATCH 020/212] Add comments on the schema about meaning of the types --- .../rocketchat-graphql/server/schemas/messages/Message-type.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js index 177a84bd213c..b6567e26f40c 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -8,9 +8,12 @@ export const schema = ` content: String channel: Channel creationTime: Float + # Message sent by server e.g. User joined channel fromServer: Boolean type: String + # List of mentioned users userRef: [User] + # list of mentioned channels channelRef: [Channel] reactions: [Reaction] # TODO From eac0aac4793e37b2e49459038eaf7127bf573ecb Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 29 Aug 2017 13:06:44 +0200 Subject: [PATCH 021/212] Remove unnecessary return statement --- packages/rocketchat-graphql/server/schemas/users/User-type.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/rocketchat-graphql/server/schemas/users/User-type.js b/packages/rocketchat-graphql/server/schemas/users/User-type.js index 34978665bcdb..3891f47e1d65 100644 --- a/packages/rocketchat-graphql/server/schemas/users/User-type.js +++ b/packages/rocketchat-graphql/server/schemas/users/User-type.js @@ -25,7 +25,6 @@ export const resolver = { if (avatar) { return avatar.url; } - return; }, channels: ({ _id }) => { return RocketChat.models.Rooms.findBySubscriptionUserId(_id).fetch(); From 10e4b273fe0982a06ffdf00d2c1db90590663d92 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 29 Aug 2017 13:07:36 +0200 Subject: [PATCH 022/212] Remove unused todos from Message type --- .../server/schemas/messages/Message-type.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js index b6567e26f40c..264ef427390b 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.js @@ -16,8 +16,6 @@ export const schema = ` # list of mentioned channels channelRef: [Channel] reactions: [Reaction] - # TODO - tags: [String] } `; @@ -83,8 +81,6 @@ export const resolver = { }); return reactions; - }, - // TODO - tags: () => {} + } } }; From 0fff6a00712d0574e4ef332e794dde5b4f0892f3 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 31 Aug 2017 16:59:33 +0200 Subject: [PATCH 023/212] READMEs, separate schema from resolvers, fix sorting and cursor messages resolver, graphql.config.json --- .meteor/versions | 1 + graphql.config.json | 9 + .../.npm/package/npm-shrinkwrap.json | 45 ++- packages/rocketchat-accounts/package.js | 3 +- packages/rocketchat-accounts/server/fix.js | 3 - packages/rocketchat-accounts/server/index.js | 2 +- packages/rocketchat-api/server/v1/channels.js | 93 +++-- packages/rocketchat-grant-facebook/README.md | 3 + packages/rocketchat-grant-github/README.md | 3 + packages/rocketchat-grant-google/README.md | 3 + packages/rocketchat-grant/README.md | 109 +++++- packages/rocketchat-grant/server/providers.js | 1 - .../.npm/package/npm-shrinkwrap.json | 337 +++++++++--------- packages/rocketchat-graphql/README.md | 3 + packages/rocketchat-graphql/package.js | 7 +- packages/rocketchat-graphql/server/api.js | 2 +- .../server/helpers/authenticated.js | 2 +- .../server/mocks/accounts/graphql-api.js | 10 - .../server/mocks/accounts/server.js | 13 - .../resolvers/accounts/OauthProvider-type.js | 5 + .../{schemas => resolvers}/accounts/index.js | 4 +- .../accounts/oauthProviders.js | 16 +- .../channels/Channel-type.js | 27 +- .../resolvers/channels/ChannelFilter-input.js | 5 + .../channels/ChannelNameAndDirect-input.js | 5 + .../resolvers/channels/ChannelSort-enum.js | 5 + .../server/resolvers/channels/Privacy-enum.js | 5 + .../channels/channelByName.js | 14 +- .../channels/channels.js | 22 +- .../channels/channelsByUser.js | 16 +- .../resolvers/channels/createChannel.js | 38 ++ .../channels/directChannel.js | 15 +- .../channels/hideChannel.js | 14 +- .../{schemas => resolvers}/channels/index.js | 2 +- .../channels/leaveChannel.js | 14 +- .../channels/settings.js | 0 .../messages/Message-type.js | 26 +- .../messages/MessageIdentifier-input.js | 5 + .../messages/MessagesWithCursor-type.js | 5 + .../resolvers/messages/Reaction-type.js | 5 + .../messages/addReactionToMessage.js | 14 +- .../messages/chatMessageAdded.js | 14 +- .../messages/deleteMessage.js | 14 +- .../messages/editMessage.js | 14 +- .../{schemas => resolvers}/messages/index.js | 2 +- .../messages/messages.js | 43 ++- .../messages/sendMessage.js | 14 +- .../{schemas => resolvers}/users/User-type.js | 23 +- .../server/resolvers/users/UserStatus-enum.js | 5 + .../{schemas => resolvers}/users/index.js | 2 +- .../{schemas => resolvers}/users/setStatus.js | 14 +- packages/rocketchat-graphql/server/schema.js | 15 +- .../schemas/accounts/LoginResult-type.graphql | 4 + .../schemas/accounts/LoginResult-type.js | 6 - .../accounts/OauthProvider-type.graphql | 3 + .../schemas/accounts/OauthProvider-type.js | 5 - .../schemas/accounts/oauthProviders.graphql | 3 + .../schemas/channels/Channel-type.graphql | 16 + .../channels/ChannelFilter-input.graphql | 6 + .../schemas/channels/ChannelFilter-input.js | 8 - .../ChannelNameAndDirect-input.graphql | 4 + .../channels/ChannelNameAndDirect-input.js | 6 - .../schemas/channels/ChannelSort-enum.graphql | 4 + .../schemas/channels/ChannelSort-enum.js | 6 - .../schemas/channels/Privacy-enum.graphql | 5 + .../server/schemas/channels/Privacy-enum.js | 7 - .../schemas/channels/channelByName.graphql | 3 + .../server/schemas/channels/channels.graphql | 7 + .../schemas/channels/channelsByUser.graphql | 3 + .../schemas/channels/createChannel.graphql | 8 + .../server/schemas/channels/createChannel.js | 45 --- .../schemas/channels/directChannel.graphql | 3 + .../schemas/channels/hideChannel.graphql | 3 + .../schemas/channels/leaveChannel.graphql | 3 + .../schemas/messages/Message-type.graphql | 15 + .../messages/MessageIdentifier-input.graphql | 4 + .../messages/MessageIdentifier-input.js | 6 - .../messages/MessagesWithCursor-type.graphql | 5 + .../messages/MessagesWithCursor-type.js | 7 - .../schemas/messages/Reaction-type.graphql | 4 + .../server/schemas/messages/Reaction-type.js | 6 - .../messages/addReactionToMessage.graphql | 3 + .../schemas/messages/chatMessageAdded.graphql | 3 + .../schemas/messages/deleteMessage.graphql | 3 + .../schemas/messages/editMessage.graphql | 3 + .../server/schemas/messages/messages.graphql | 11 + .../schemas/messages/sendMessage.graphql | 3 + .../server/schemas/users/User-type.graphql | 8 + .../schemas/users/UserStatus-enum.graphql | 7 + .../server/schemas/users/UserStatus-enum.js | 9 - .../server/schemas/users/setStatus.graphql | 3 + 91 files changed, 778 insertions(+), 551 deletions(-) create mode 100644 graphql.config.json delete mode 100644 packages/rocketchat-accounts/server/fix.js create mode 100644 packages/rocketchat-grant-facebook/README.md create mode 100644 packages/rocketchat-grant-github/README.md create mode 100644 packages/rocketchat-grant-google/README.md create mode 100644 packages/rocketchat-graphql/README.md delete mode 100644 packages/rocketchat-graphql/server/mocks/accounts/server.js create mode 100644 packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js rename packages/rocketchat-graphql/server/{schemas => resolvers}/accounts/index.js (76%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/accounts/oauthProviders.js (80%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/Channel-type.js (75%) create mode 100644 packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js create mode 100644 packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js create mode 100644 packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js create mode 100644 packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/channelByName.js (73%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/channels.js (80%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/channelsByUser.js (78%) create mode 100644 packages/rocketchat-graphql/server/resolvers/channels/createChannel.js rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/directChannel.js (84%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/hideChannel.js (87%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/index.js (93%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/leaveChannel.js (81%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/channels/settings.js (100%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/Message-type.js (78%) create mode 100644 packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js create mode 100644 packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js create mode 100644 packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/addReactionToMessage.js (74%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/chatMessageAdded.js (83%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/deleteMessage.js (83%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/editMessage.js (85%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/index.js (93%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/messages.js (66%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/messages/sendMessage.js (75%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/users/User-type.js (65%) create mode 100644 packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js rename packages/rocketchat-graphql/server/{schemas => resolvers}/users/index.js (82%) rename packages/rocketchat-graphql/server/{schemas => resolvers}/users/setStatus.js (73%) create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/channelByName.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/channels/channels.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/channels/createChannel.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/channels/createChannel.js create mode 100644 packages/rocketchat-graphql/server/schemas/channels/directChannel.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/Message-type.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js create mode 100644 packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/editMessage.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/messages.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/users/User-type.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphql delete mode 100644 packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js create mode 100644 packages/rocketchat-graphql/server/schemas/users/setStatus.graphql diff --git a/.meteor/versions b/.meteor/versions index e178545da53a..c608ae9d789f 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -246,6 +246,7 @@ spacebars-compiler@1.1.3 srp@1.0.10 standard-minifier-js@2.1.1 steffo:meteor-accounts-saml@0.0.1 +swydo:graphql@0.0.3 tap:i18n@1.8.2 templating@1.3.2 templating-compiler@1.3.2 diff --git a/graphql.config.json b/graphql.config.json new file mode 100644 index 000000000000..2c316a3dbb9f --- /dev/null +++ b/graphql.config.json @@ -0,0 +1,9 @@ +{ + "schema": { + "request": { + "url" : "http://localhost:3000/graphql", + "method" : "POST", + "postIntrospectionQuery" : true + } + } +} diff --git a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json index 548e1696bac6..720452518c3b 100644 --- a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json @@ -6,14 +6,21 @@ "from": "addressparser@>=0.3.2 <0.4.0" }, "babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", "from": "babel-polyfill@>=6.23.0 <7.0.0" }, "babel-runtime": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", - "from": "babel-runtime@>=6.22.0 <7.0.0" + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "from": "babel-runtime@>=6.26.0 <7.0.0", + "dependencies": { + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "from": "regenerator-runtime@>=0.11.0 <0.12.0" + } + } }, "base64url": { "version": "2.0.0", @@ -48,7 +55,7 @@ "core-js": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", - "from": "core-js@>=2.4.0 <3.0.0" + "from": "core-js@>=2.5.0 <3.0.0" }, "core-util-is": { "version": "1.0.2", @@ -66,8 +73,8 @@ "from": "ecdsa-sig-formatter@1.0.9" }, "emailjs": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/emailjs/-/emailjs-1.0.11.tgz", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/emailjs/-/emailjs-1.0.12.tgz", "from": "emailjs@>=1.0.8 <2.0.0" }, "encoding": { @@ -111,8 +118,8 @@ "from": "joi@>=6.10.1 <7.0.0" }, "jsonwebtoken": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.2.tgz", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz", "from": "jsonwebtoken@>=7.2.1 <8.0.0" }, "jwa": { @@ -153,19 +160,19 @@ } }, "moment": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.11.2.tgz", - "from": "moment@2.11.2" + "version": "2.15.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.15.2.tgz", + "from": "moment@2.15.2" }, "mongodb": { - "version": "2.2.30", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.30.tgz", + "version": "2.2.31", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.31.tgz", "from": "mongodb@>=2.2.22 <3.0.0" }, "mongodb-core": { - "version": "2.1.14", - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.14.tgz", - "from": "mongodb-core@2.1.14" + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.15.tgz", + "from": "mongodb-core@2.1.15" }, "ms": { "version": "2.0.0", @@ -185,7 +192,7 @@ "regenerator-runtime": { "version": "0.10.5", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "from": "regenerator-runtime@>=0.10.0 <0.11.0" + "from": "regenerator-runtime@>=0.10.5 <0.11.0" }, "require_optional": { "version": "1.0.1", diff --git a/packages/rocketchat-accounts/package.js b/packages/rocketchat-accounts/package.js index fd29a0c2ebae..777c614620ba 100644 --- a/packages/rocketchat-accounts/package.js +++ b/packages/rocketchat-accounts/package.js @@ -18,6 +18,5 @@ Package.onUse(function(api) { Npm.depends({ '@accounts/server': '0.0.18', - '@accounts/mongo': '0.0.12-0', - '@accounts/meteor-adapter': '0.1.1' + '@accounts/mongo': '0.0.12' }); diff --git a/packages/rocketchat-accounts/server/fix.js b/packages/rocketchat-accounts/server/fix.js deleted file mode 100644 index f1900a19c465..000000000000 --- a/packages/rocketchat-accounts/server/fix.js +++ /dev/null @@ -1,3 +0,0 @@ -import regeneratorRuntime from 'babel-runtime/regenerator'; - -global.regeneratorRuntime = regeneratorRuntime; diff --git a/packages/rocketchat-accounts/server/index.js b/packages/rocketchat-accounts/server/index.js index 87ec121feca8..88ebb9b52977 100644 --- a/packages/rocketchat-accounts/server/index.js +++ b/packages/rocketchat-accounts/server/index.js @@ -1,4 +1,4 @@ -import './fix'; +// import './fix'; import './config'; import AccountsServer from '@accounts/server'; diff --git a/packages/rocketchat-api/server/v1/channels.js b/packages/rocketchat-api/server/v1/channels.js index 15a6c3d0eaf4..86abc6ab38e6 100644 --- a/packages/rocketchat-api/server/v1/channels.js +++ b/packages/rocketchat-api/server/v1/channels.js @@ -126,37 +126,82 @@ RocketChat.API.v1.addRoute('channels.close', { authRequired: true }, { } }); -RocketChat.API.v1.addRoute('channels.create', { authRequired: true }, { - post() { - if (!RocketChat.authz.hasPermission(this.userId, 'create-c')) { - return RocketChat.API.v1.unauthorized(); - } +// Channel -> create - if (!this.bodyParams.name) { - return RocketChat.API.v1.failure('Body param "name" is required'); - } +function createChannelValidator(params) { + if (!RocketChat.authz.hasPermission(params.user.value, 'create-c')) { + throw new Error('unauthorized'); + } - if (this.bodyParams.members && !_.isArray(this.bodyParams.members)) { - return RocketChat.API.v1.failure('Body param "members" must be an array if provided'); - } + if (!params.name.value) { + throw new Error(`Param "${ params.name.key }" is required`); + } - if (this.bodyParams.customFields && !(typeof this.bodyParams.customFields === 'object')) { - return RocketChat.API.v1.failure('Body param "customFields" must be an object if provided'); - } + if (params.members.value && !_.isArray(params.members.value)) { + throw new Error(`Param "${ params.members.key }" must be an array if provided`); + } + + if (params.customFields.value && !(typeof params.customFields.value === 'object')) { + throw new Error(`Param "${ params.customFields.key }" must be an object if provided`); + } +} + +function createChannel(userId, params) { + let readOnly = false; + if (typeof params.readOnly !== 'undefined') { + readOnly = params.readOnly; + } + + let id; + Meteor.runAsUser(userId, () => { + id = Meteor.call('createChannel', params.name, params.members ? params.members : [], readOnly, params.customFields); + }); + + return { + channel: RocketChat.models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }) + }; +} - let readOnly = false; - if (typeof this.bodyParams.readOnly !== 'undefined') { - readOnly = this.bodyParams.readOnly; +RocketChat.API.channels = {}; +RocketChat.API.channels.create = { + validate: createChannelValidator, + execute: createChannel +}; + +RocketChat.API.v1.addRoute('channels.create', { authRequired: true }, { + post() { + const userId = this.userId; + const bodyParams = this.bodyParams; + + let error; + + try { + RocketChat.API.create.validate({ + user: { + value: userId + }, + name: { + value: bodyParams.name, + key: 'name' + }, + members: { + value: bodyParams.members, + key: 'members' + } + }); + } catch (e) { + if (e.message === 'unauthorized') { + error = RocketChat.API.v1.unauthorized(); + } else { + error = RocketChat.API.v1.failure(e.message); + } } - let id; - Meteor.runAsUser(this.userId, () => { - id = Meteor.call('createChannel', this.bodyParams.name, this.bodyParams.members ? this.bodyParams.members : [], readOnly, this.bodyParams.customFields); - }); + if (error) { + return error; + } - return RocketChat.API.v1.success({ - channel: RocketChat.models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }) - }); + return RocketChat.API.v1.success(RocketChat.API.channels.create.execute(userId, bodyParams)); } }); diff --git a/packages/rocketchat-grant-facebook/README.md b/packages/rocketchat-grant-facebook/README.md new file mode 100644 index 000000000000..9d2da06860b2 --- /dev/null +++ b/packages/rocketchat-grant-facebook/README.md @@ -0,0 +1,3 @@ +# rocketchat:grant-facebook + +An implementation of the Facebook OAuth flow. diff --git a/packages/rocketchat-grant-github/README.md b/packages/rocketchat-grant-github/README.md new file mode 100644 index 000000000000..e5fea3c781c7 --- /dev/null +++ b/packages/rocketchat-grant-github/README.md @@ -0,0 +1,3 @@ +# rocketchat:grant-github + +An implementation of the GitHub OAuth flow. diff --git a/packages/rocketchat-grant-google/README.md b/packages/rocketchat-grant-google/README.md new file mode 100644 index 000000000000..cdd59d97b562 --- /dev/null +++ b/packages/rocketchat-grant-google/README.md @@ -0,0 +1,3 @@ +# rocketchat:grant-google + +An implementation of the Google OAuth flow. diff --git a/packages/rocketchat-grant/README.md b/packages/rocketchat-grant/README.md index c526711cf6c9..716b57bfcf80 100644 --- a/packages/rocketchat-grant/README.md +++ b/packages/rocketchat-grant/README.md @@ -1,8 +1,101 @@ -1. Settings should be the same as in OAuth section -1. Should be extendable (rocketchat:grant, rocketchat:grant-github etc) -1. Each package with provider should transform it's scope to user data so we can register a new user -1. rocketchat:grant-sub - to define sub configurations to allow for using external apps -1. rocketchat:grant should contain a middleware and startup fn with setup, that is already in rocketchat:oauth-external -1. in callback it would create and / or log in a user -1. without any specified sub configuration, it would redirect to localhost:3000 by default -1. with a specified sub configuration it would redirect to a path and add access_token to the URL +# rocketchat:grant + +The main idea behind creating this package was to allow external apps (i.e. PWA) to use OAuth smoothely with currently available accounts system. + +## Usage + +1. Define providers using `Settings.add()` +1. Add apps with `Settings.apps.add()` +1. Put the path that stars OAuth flow in your app +1. You app should be able to authenticate user with received tokens + +## Paths + +There are few paths you need to be familiar with. + +### Start OAuth flow + +> \/_oauth_apps/connect/\/\ + +### Authorization callback URL + +> \/_oauth_apps/connect/\/callback + +### List of available providers + +> \/_oauth_apps/providers + +## API + +### Providers + +#### Providers.register(name, options, getUser) + +Allows to register an OAuth Provider. + +- name - string that represents the name of an OAuth provider +- options - contains fields like _scope_ +- getUser - a function that returns fields: _id, email, username, name and avatar_ + +### Settings + +#### Settings.add(options) + +Defines a provider that is able for being used in OAuth. + +**options**: + +- enabled - __boolean__ - tells to `rocketchat:grant` if provider could be used +- provider - __string__ - id of a provider +- key - __string__ - client ID provided for your OAuth access +- secret - __string__ - secret key + +Example: + +```js + Settings.add({ + enabled: true, + provider: 'google', + key: 'CLIENT_ID', + secret: 'SECRET' + }); +``` + +#### Settings.apps.add(name, options) + +Defines an app that is able for using OAuth. + +**options**: + +- redirectUrl - __string__ - where to redirect if auth was succesful +- errorUrl - __string__ - place to redirect on failure + +Example: + +```js + + const redirectUrl = 'http://localhost:4200/login?service={provider}&access_token={accessToken}&refresh_token={refreshToken}'; + + const errorUrl = 'http://localhost:4200/login?service={provider}&error={error}' + + + Settings.apps.add('PWA', { + redirectUrl, + errorUrl + }); +``` + +About URLs: + +We use a parser to produce a URL. +There are few available variables for each type of redirect. + +- redirectUrl - provider, accessToken, refreshToken +- errorUrl - provider, error + +Example: + +``` +http://localhost:4200/login?provider={provider} +// outputs: http://localhost:4200/login?provider=google +``` diff --git a/packages/rocketchat-grant/server/providers.js b/packages/rocketchat-grant/server/providers.js index 4b2aad10cee5..debad8d091e8 100644 --- a/packages/rocketchat-grant/server/providers.js +++ b/packages/rocketchat-grant/server/providers.js @@ -31,7 +31,6 @@ export function middleware(req, res, next) { providers.forEach((_, name) => list.push(name)); - // TODO: send a list of providers res.end(JSON.stringify({ data: list })); diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 482cfcaf4242..6a2374ea66c7 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -1,501 +1,512 @@ { "dependencies": { "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", - "from": "accepts@>=1.3.3 <1.4.0" + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "from": "accepts@https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz" + }, + "apollo-server-core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-1.1.0.tgz", + "from": "apollo-server-core@https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-1.1.0.tgz" }, - "apollo-client": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-1.6.0.tgz", - "from": "apollo-client@1.6.0" + "apollo-server-express": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-1.1.2.tgz", + "from": "apollo-server-express@https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-1.1.2.tgz" + }, + "apollo-server-module-graphiql": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/apollo-server-module-graphiql/-/apollo-server-module-graphiql-1.1.2.tgz", + "from": "apollo-server-module-graphiql@https://registry.npmjs.org/apollo-server-module-graphiql/-/apollo-server-module-graphiql-1.1.2.tgz" + }, + "apollo-tracing": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.0.7.tgz", + "from": "apollo-tracing@https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.0.7.tgz" }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "from": "array-flatten@1.1.1" + "from": "array-flatten@https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "from": "babel-polyfill@https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "from": "regenerator-runtime@https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz" + } + } }, "babel-runtime": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", - "from": "babel-runtime@>=6.23.0 <7.0.0" + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "from": "babel-runtime@https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz" }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "from": "backo2@>=1.0.2 <2.0.0" + "from": "backo2@https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz" }, "base64url": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", - "from": "base64url@>=2.0.0 <3.0.0" + "from": "base64url@https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz" }, "bcryptjs": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "from": "bcryptjs@>=2.4.0 <3.0.0" + "from": "bcryptjs@https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz" }, "body-parser": { "version": "1.17.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", - "from": "body-parser@1.17.2" + "from": "body-parser@https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz" }, "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "from": "buffer-equal-constant-time@1.0.1" + "from": "buffer-equal-constant-time@https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" }, "bytes": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", - "from": "bytes@2.4.0" + "from": "bytes@https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz" }, "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "from": "content-disposition@0.5.2" + "from": "content-disposition@https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz" }, "content-type": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", - "from": "content-type@>=1.0.2 <1.1.0" + "from": "content-type@https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz" }, "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "from": "cookie@0.3.1" + "from": "cookie@https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz" }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "from": "cookie-signature@1.0.6" + "from": "cookie-signature@https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" }, "core-js": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", - "from": "core-js@>=2.4.0 <3.0.0" + "from": "core-js@https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz" }, "cors": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.3.tgz", - "from": "cors@2.8.3" + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz", + "from": "cors@https://registry.npmjs.org/cors/-/cors-2.8.4.tgz" }, "crypto": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz", - "from": "crypto@>=0.0.3 <0.0.4" + "from": "crypto@https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz" }, "debug": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "from": "debug@2.6.7" + "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.7.tgz" }, "deepmerge": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.0.tgz", - "from": "deepmerge@>=1.3.2 <2.0.0" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.1.tgz", + "from": "deepmerge@https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.1.tgz" }, "depd": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "from": "depd@>=1.1.0 <1.2.0" + "from": "depd@https://registry.npmjs.org/depd/-/depd-1.1.1.tgz" }, "deprecated-decorator": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", - "from": "deprecated-decorator@>=0.1.6 <0.2.0" + "from": "deprecated-decorator@https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz" }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "from": "destroy@>=1.0.4 <1.1.0" + "from": "destroy@https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" }, "ecdsa-sig-formatter": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", - "from": "ecdsa-sig-formatter@1.0.9" + "from": "ecdsa-sig-formatter@https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz" }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "from": "ee-first@1.1.1" + "from": "ee-first@https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" }, "encodeurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", - "from": "encodeurl@>=1.0.1 <1.1.0" + "from": "encodeurl@https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz" }, "es6-promise": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", - "from": "es6-promise@>=4.0.5 <5.0.0" + "from": "es6-promise@https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz" }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "from": "escape-html@>=1.0.3 <1.1.0" + "from": "escape-html@https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" }, "etag": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", - "from": "etag@>=1.8.0 <1.9.0" + "from": "etag@https://registry.npmjs.org/etag/-/etag-1.8.0.tgz" }, "eventemitter3": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", - "from": "eventemitter3@>=2.0.3 <3.0.0" + "from": "eventemitter3@https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz" }, "express": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", - "from": "express@4.15.3" + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.15.4.tgz", + "from": "express@https://registry.npmjs.org/express/-/express-4.15.4.tgz", + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" + }, + "qs": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", + "from": "qs@https://registry.npmjs.org/qs/-/qs-6.5.0.tgz" + } + } }, "finalhandler": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz", - "from": "finalhandler@>=1.0.3 <1.1.0", + "from": "finalhandler@https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz", "dependencies": { "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "from": "debug@2.6.8" + "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" } } }, "forwarded": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", - "from": "forwarded@>=0.1.0 <0.2.0" + "from": "forwarded@https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz" }, "fresh": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", - "from": "fresh@0.5.0" + "from": "fresh@https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz" }, "graphql": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.10.3.tgz", - "from": "graphql@0.10.3" - }, - "graphql-anywhere": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-3.1.0.tgz", - "from": "graphql-anywhere@>=3.0.1 <4.0.0" - }, - "graphql-server-core": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/graphql-server-core/-/graphql-server-core-0.9.0.tgz", - "from": "graphql-server-core@>=0.9.0 <0.10.0" - }, - "graphql-server-express": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/graphql-server-express/-/graphql-server-express-0.9.0.tgz", - "from": "graphql-server-express@0.9.0" - }, - "graphql-server-module-graphiql": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/graphql-server-module-graphiql/-/graphql-server-module-graphiql-0.9.0.tgz", - "from": "graphql-server-module-graphiql@>=0.9.0 <0.10.0" + "from": "graphql@https://registry.npmjs.org/graphql/-/graphql-0.10.3.tgz" }, "graphql-subscriptions": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.4.4.tgz", - "from": "graphql-subscriptions@0.4.4" + "from": "graphql-subscriptions@https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.4.4.tgz" }, "graphql-tag": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.4.2.tgz", - "from": "graphql-tag@>=2.0.0 <3.0.0" + "from": "graphql-tag@https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.4.2.tgz" }, "graphql-tools": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.1.0.tgz", - "from": "graphql-tools@1.1.0" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.2.2.tgz", + "from": "graphql-tools@https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.2.2.tgz" }, "hoek": { "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "from": "hoek@>=2.0.0 <3.0.0" + "from": "hoek@https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" }, "http-errors": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "from": "http-errors@>=1.6.1 <1.7.0" + "from": "http-errors@https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz" }, "iconv-lite": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "from": "iconv-lite@0.4.15" + "from": "iconv-lite@https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz" }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "from": "inherits@2.0.3" + "from": "inherits@https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" }, "ipaddr.js": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", - "from": "ipaddr.js@1.4.0" + "from": "ipaddr.js@https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz" }, "isemail": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", - "from": "isemail@>=1.0.0 <2.0.0" + "from": "isemail@https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz" }, "iterall": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.1.1.tgz", - "from": "iterall@>=1.1.0 <2.0.0" + "from": "iterall@https://registry.npmjs.org/iterall/-/iterall-1.1.1.tgz" }, "joi": { "version": "6.10.1", "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", - "from": "joi@>=6.10.1 <7.0.0" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "from": "js-tokens@>=3.0.0 <4.0.0" + "from": "joi@https://registry.npmjs.org/joi/-/joi-6.10.1.tgz" }, "jsonwebtoken": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.2.tgz", - "from": "jsonwebtoken@>=7.2.1 <8.0.0" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz", + "from": "jsonwebtoken@https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz" }, "jwa": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "from": "jwa@>=1.1.4 <2.0.0" + "from": "jwa@https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz" }, "jws": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "from": "jws@>=3.1.4 <4.0.0" + "from": "jws@https://registry.npmjs.org/jws/-/jws-3.1.4.tgz" }, "jwt-decode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", - "from": "jwt-decode@>=2.1.0 <3.0.0" + "from": "jwt-decode@https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz" + }, + "kamilkisiela-graphql-api": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/kamilkisiela-graphql-api/-/kamilkisiela-graphql-api-0.1.1.tgz", + "from": "kamilkisiela-graphql-api@https://registry.npmjs.org/kamilkisiela-graphql-api/-/kamilkisiela-graphql-api-0.1.1.tgz" + }, + "kamilkisiela-merge-graphql-schemas": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/kamilkisiela-merge-graphql-schemas/-/kamilkisiela-merge-graphql-schemas-1.1.2.tgz", + "from": "kamilkisiela-merge-graphql-schemas@https://registry.npmjs.org/kamilkisiela-merge-graphql-schemas/-/kamilkisiela-merge-graphql-schemas-1.1.2.tgz" }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "from": "lodash@>=4.16.4 <5.0.0" - }, - "lodash-es": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz", - "from": "lodash-es@>=4.2.1 <5.0.0" + "from": "lodash@https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" }, "lodash.assign": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "from": "lodash.assign@>=4.2.0 <5.0.0" + "from": "lodash.assign@https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz" }, "lodash.isobject": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", - "from": "lodash.isobject@>=3.0.2 <4.0.0" + "from": "lodash.isobject@https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz" }, "lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "from": "lodash.isstring@>=4.0.1 <5.0.0" + "from": "lodash.isstring@https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "from": "lodash.once@>=4.0.0 <5.0.0" - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "from": "loose-envify@>=1.1.0 <2.0.0" + "from": "lodash.once@https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "from": "media-typer@0.3.0" + "from": "media-typer@https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "from": "merge-descriptors@1.0.1" + "from": "merge-descriptors@https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" }, - "merge-graphql-schemas": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-graphql-schemas/-/merge-graphql-schemas-1.1.0.tgz", - "from": "merge-graphql-schemas@1.1.0" + "meteor-promise": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/meteor-promise/-/meteor-promise-0.8.6.tgz", + "from": "meteor-promise@https://registry.npmjs.org/meteor-promise/-/meteor-promise-0.8.6.tgz" }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "from": "methods@>=1.1.2 <1.2.0" + "from": "methods@https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" }, "mime": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", - "from": "mime@1.3.4" + "from": "mime@https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" }, "mime-db": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", - "from": "mime-db@>=1.29.0 <1.30.0" + "from": "mime-db@https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz" }, "mime-types": { "version": "2.1.16", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", - "from": "mime-types@>=2.1.15 <2.2.0" + "from": "mime-types@https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz" }, "moment": { "version": "2.18.1", "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", - "from": "moment@>=2.0.0 <3.0.0" + "from": "moment@https://registry.npmjs.org/moment/-/moment-2.18.1.tgz" }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "from": "ms@>=2.0.0 <3.0.0" + "from": "ms@https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "from": "negotiator@0.6.1" + "from": "negotiator@https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz" }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "from": "object-assign@>=4.0.0 <5.0.0" + "from": "object-assign@https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "from": "on-finished@>=2.3.0 <2.4.0" + "from": "on-finished@https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" }, "parseurl": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", - "from": "parseurl@>=1.3.1 <1.4.0" + "from": "parseurl@https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz" }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "from": "path-to-regexp@0.1.7" + "from": "path-to-regexp@https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" }, "proxy-addr": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", - "from": "proxy-addr@>=1.1.4 <1.2.0" + "from": "proxy-addr@https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz" }, "qs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "from": "qs@6.4.0" + "from": "qs@https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "from": "range-parser@>=1.2.0 <1.3.0" + "from": "range-parser@https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" }, "raw-body": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", - "from": "raw-body@>=2.2.0 <2.3.0" - }, - "redux": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", - "from": "redux@>=3.4.0 <4.0.0" + "from": "raw-body@https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz" }, "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "from": "regenerator-runtime@>=0.10.0 <0.11.0" + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "from": "regenerator-runtime@https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz" }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "from": "safe-buffer@>=5.0.1 <6.0.0" + "from": "safe-buffer@https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" }, "send": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", - "from": "send@0.15.3" + "version": "0.15.4", + "resolved": "https://registry.npmjs.org/send/-/send-0.15.4.tgz", + "from": "send@https://registry.npmjs.org/send/-/send-0.15.4.tgz", + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" + } + } }, "serve-static": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", - "from": "serve-static@1.12.3" + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.4.tgz", + "from": "serve-static@https://registry.npmjs.org/serve-static/-/serve-static-1.12.4.tgz" }, "setprototypeof": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "from": "setprototypeof@1.0.3" + "from": "setprototypeof@https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz" }, "statuses": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "from": "statuses@>=1.3.1 <2.0.0" + "from": "statuses@https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" }, "subscriptions-transport-ws": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.1.tgz", - "from": "subscriptions-transport-ws@0.8.1" + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.2.tgz", + "from": "subscriptions-transport-ws@https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.2.tgz" }, "symbol-observable": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "from": "symbol-observable@>=1.0.2 <2.0.0" + "from": "symbol-observable@https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz" }, "topo": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", - "from": "topo@>=1.0.0 <2.0.0" + "from": "topo@https://registry.npmjs.org/topo/-/topo-1.1.0.tgz" }, "type-is": { "version": "1.6.15", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "from": "type-is@>=1.6.15 <1.7.0" + "from": "type-is@https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz" }, "ultron": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz", - "from": "ultron@>=1.1.0 <1.2.0" + "from": "ultron@https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz" }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "from": "unpipe@1.0.0" + "from": "unpipe@https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" }, "utils-merge": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", - "from": "utils-merge@1.0.0" + "from": "utils-merge@https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" }, "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "from": "uuid@>=3.0.1 <4.0.0" + "from": "uuid@https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" }, "vary": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", - "from": "vary@>=1.0.0 <2.0.0" - }, - "whatwg-fetch": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", - "from": "whatwg-fetch@>=2.0.0 <3.0.0" + "from": "vary@https://registry.npmjs.org/vary/-/vary-1.1.1.tgz" }, "ws": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ws/-/ws-3.1.0.tgz", - "from": "ws@>=3.0.0 <4.0.0" + "from": "ws@https://registry.npmjs.org/ws/-/ws-3.1.0.tgz" }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "from": "xtend@>=4.0.1 <5.0.0" + "from": "xtend@https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" } } } diff --git a/packages/rocketchat-graphql/README.md b/packages/rocketchat-graphql/README.md new file mode 100644 index 000000000000..712c36fd39ae --- /dev/null +++ b/packages/rocketchat-graphql/README.md @@ -0,0 +1,3 @@ +# rocketchat:graphql + +GraphQL API diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js index b4ceb319ed9b..def84c4c84c9 100644 --- a/packages/rocketchat-graphql/package.js +++ b/packages/rocketchat-graphql/package.js @@ -12,14 +12,15 @@ Package.onUse(function(api) { 'http', 'rocketchat:lib', 'rocketchat:api', - 'rocketchat:accounts' + 'rocketchat:accounts', + 'swydo:graphql' ]); api.mainModule('server/api.js', 'server'); }); Npm.depends({ - '@accounts/graphql-api': '0.1.1', + 'kamilkisiela-graphql-api': '0.1.1', 'apollo-server-express': '1.1.2', 'cors': '2.8.4', 'body-parser': '1.17.2', @@ -27,6 +28,6 @@ Npm.depends({ 'graphql': '0.10.3', 'graphql-subscriptions': '0.4.4', 'graphql-tools': '1.2.2', - 'merge-graphql-schemas': '1.1.2', + 'kamilkisiela-merge-graphql-schemas': '1.1.2', 'subscriptions-transport-ws': '0.8.2' }); diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index a8262a0d33f4..9c1f36c00a90 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -1,5 +1,5 @@ import { graphqlExpress, graphiqlExpress } from 'apollo-server-express'; -import { JSAccountsContext as jsAccountsContext } from '@accounts/graphql-api'; +import { JSAccountsContext as jsAccountsContext } from 'kamilkisiela-graphql-api'; import { SubscriptionServer } from 'subscriptions-transport-ws'; import { execute, subscribe } from 'graphql'; import { Meteor } from 'meteor/meteor'; diff --git a/packages/rocketchat-graphql/server/helpers/authenticated.js b/packages/rocketchat-graphql/server/helpers/authenticated.js index a0a39e676560..c36223b94b5a 100644 --- a/packages/rocketchat-graphql/server/helpers/authenticated.js +++ b/packages/rocketchat-graphql/server/helpers/authenticated.js @@ -1,6 +1,6 @@ import { AccountsServer } from 'meteor/rocketchat:accounts'; //import { authenticated as _authenticated } from '@accounts/graphql-api'; - +// import { authenticated as _authenticated } from 'kamilkisiela-graphql-api'; import { authenticated as _authenticated } from '../mocks/accounts/graphql-api'; export const authenticated = (resolver) => { diff --git a/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js index adbaaaa71d7e..8bd3dde10230 100644 --- a/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js +++ b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js @@ -1,13 +1,3 @@ -/*export const authenticated = (Accounts, func) => (async(root, args, context, info) => { - const userObject = await Accounts.resumeSession(); - - if (userObject === null) { - throw new Error('Invalid or expired token!'); - } - - return await func(root, args, Object.assign(context, { user: userObject }), info); -});*/ - // Same as here: https://github.com/js-accounts/graphql/blob/master/packages/graphql-api/src/utils/authenticated-resolver.js // except code below works // It might be like that because of async/await, diff --git a/packages/rocketchat-graphql/server/mocks/accounts/server.js b/packages/rocketchat-graphql/server/mocks/accounts/server.js deleted file mode 100644 index 8bf64b3bccbf..000000000000 --- a/packages/rocketchat-graphql/server/mocks/accounts/server.js +++ /dev/null @@ -1,13 +0,0 @@ -const loggedOut = false; - -const AccountsServer = { - resumeSession: (async() => { - if (loggedOut) { - throw new Error('User not found'); - } - // User credentials - return RocketChat.models.Users.findOne({username: 'mys'}); - }) -}; - -export default AccountsServer; diff --git a/packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js b/packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js new file mode 100644 index 000000000000..fd13e7f61106 --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/accounts/OauthProvider-type.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/index.js b/packages/rocketchat-graphql/server/resolvers/accounts/index.js similarity index 76% rename from packages/rocketchat-graphql/server/schemas/accounts/index.js rename to packages/rocketchat-graphql/server/resolvers/accounts/index.js index e82a7077059b..57d98cce5962 100644 --- a/packages/rocketchat-graphql/server/schemas/accounts/index.js +++ b/packages/rocketchat-graphql/server/resolvers/accounts/index.js @@ -1,6 +1,6 @@ -import { createJSAccountsGraphQL } from '@accounts/graphql-api'; +import { createJSAccountsGraphQL } from 'kamilkisiela-graphql-api'; import { AccountsServer } from 'meteor/rocketchat:accounts'; -import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; // queries import * as oauthProviders from './oauthProviders'; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js b/packages/rocketchat-graphql/server/resolvers/accounts/oauthProviders.js similarity index 80% rename from packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js rename to packages/rocketchat-graphql/server/resolvers/accounts/oauthProviders.js index 9cefedb7a15e..0cccbc9381d9 100644 --- a/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.js +++ b/packages/rocketchat-graphql/server/resolvers/accounts/oauthProviders.js @@ -1,6 +1,8 @@ import { HTTP } from 'meteor/http'; import { Meteor } from 'meteor/meteor'; +import schema from '../../schemas/accounts/oauthProviders.graphql'; + function isJSON(obj) { try { JSON.parse(obj); @@ -10,13 +12,7 @@ function isJSON(obj) { } } -export const schema = ` - type Query { - oauthProviders: [OauthProvider] - } -`; - -export const resolver = { +const resolver = { Query: { oauthProviders: async() => { // depends on rocketchat:grant package @@ -31,9 +27,13 @@ export const resolver = { throw new Error('Could not parse the result'); } } catch (e) { - console.error('oauthProviders resolver', e); throw new Error('rocketchat:grant not installed'); } } } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js b/packages/rocketchat-graphql/server/resolvers/channels/Channel-type.js similarity index 75% rename from packages/rocketchat-graphql/server/schemas/channels/Channel-type.js rename to packages/rocketchat-graphql/server/resolvers/channels/Channel-type.js index cfcbebe2a327..e4dfb9ba4371 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/Channel-type.js @@ -1,25 +1,7 @@ import { property } from '../../helpers/property'; +import schema from '../../schemas/channels/Channel-type.graphql'; -export const schema = ` - type Channel { - id: String! - name: String - description: String - announcement: String - topic: String - members: [User] - owners: [User] - numberOfMembers: Int - numberOfMessages: Int - readOnly: Boolean - direct: Boolean - privateChannel: Boolean - favourite: Boolean - unseenMessages: Int - } -`; - -export const resolver = { +const resolver = { Channel: { id: property('_id'), name: (root, args, { user }) => { @@ -59,3 +41,8 @@ export const resolver = { } } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js b/packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js new file mode 100644 index 000000000000..54c5be23b0ff --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/channels/ChannelFilter-input.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js b/packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js new file mode 100644 index 000000000000..ad769ae36913 --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/channels/ChannelNameAndDirect-input.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js b/packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js new file mode 100644 index 000000000000..3cd8b5f7b8d3 --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/channels/ChannelSort-enum.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js b/packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js new file mode 100644 index 000000000000..bc0172b74adb --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/channels/Privacy-enum.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js b/packages/rocketchat-graphql/server/resolvers/channels/channelByName.js similarity index 73% rename from packages/rocketchat-graphql/server/schemas/channels/channelByName.js rename to packages/rocketchat-graphql/server/resolvers/channels/channelByName.js index 63b70ddf360e..060e2a2526a6 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelByName.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/channelByName.js @@ -1,13 +1,8 @@ import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; +import schema from '../../schemas/channels/channelByName.graphql'; -export const schema = ` - type Query { - channelByName(name: String!): Channel - } -`; - -export const resolver = { +const resolver = { Query: { channelByName: authenticated((root, { name }) => { const query = { @@ -21,3 +16,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.js b/packages/rocketchat-graphql/server/resolvers/channels/channels.js similarity index 80% rename from packages/rocketchat-graphql/server/schemas/channels/channels.js rename to packages/rocketchat-graphql/server/resolvers/channels/channels.js index c188819c96b3..6087771b86fd 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channels.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/channels.js @@ -1,17 +1,8 @@ import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; +import schema from '../../schemas/channels/channels.graphql'; -export const schema = ` - type Query { - channels(filter: ChannelFilter = { - privacy: ALL, - joinedChannels: false, - sortBy: NAME - }): [Channel] - } -`; - -export const resolver = { +const resolver = { Query: { channels: authenticated((root, args) => { const query = {}; @@ -49,12 +40,15 @@ export const resolver = { }; break; } - - // joinedChannels - // TODO: } return RocketChat.models.Rooms.find(query, options).fetch(); }) } }; + + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js b/packages/rocketchat-graphql/server/resolvers/channels/channelsByUser.js similarity index 78% rename from packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js rename to packages/rocketchat-graphql/server/resolvers/channels/channelsByUser.js index 0784da1854a0..29a240e5c000 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/channelsByUser.js @@ -1,20 +1,13 @@ import { authenticated } from '../../helpers/authenticated'; - import { roomPublicFields } from './settings'; +import schema from '../../schemas/channels/channelsByUser.graphql'; -export const schema = ` - type Query { - channelsByUser(userId: String!): [Channel] - } -`; - -export const resolver = { +const resolver = { Query: { channelsByUser: authenticated((root, { userId }) => { const user = RocketChat.models.Users.findOneById(userId); if (!user) { - // TODO: throw new Error('No user'); } @@ -29,3 +22,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/resolvers/channels/createChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/createChannel.js new file mode 100644 index 000000000000..e0f8a84d6a3d --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/channels/createChannel.js @@ -0,0 +1,38 @@ +import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/channels/createChannel.graphql'; + +const resolver = { + Mutation: { + createChannel: authenticated((root, args, { user }) => { + try { + RocketChat.API.channels.create.validate({ + user: { + value: user._id + }, + name: { + value: args.name, + key: 'name' + }, + members: { + value: args.membersId, + key: 'membersId' + } + }); + } catch (e) { + throw e; + } + + const { channel } = RocketChat.API.channels.create.execute(user._id, { + name: args.name, + members: args.membersId + }); + + return channel; + }) + } +}; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/directChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/directChannel.js similarity index 84% rename from packages/rocketchat-graphql/server/schemas/channels/directChannel.js rename to packages/rocketchat-graphql/server/resolvers/channels/directChannel.js index e2431551e811..2218cdf7837b 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/directChannel.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/directChannel.js @@ -1,13 +1,8 @@ import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; +import schema from '../../schemas/channels/directChannel.graphql'; -export const schema = ` - type Query { - directChannel(username: String, channelId: String): Channel - } -`; - -export const resolver = { +const resolver = { Query: { directChannel: authenticated((root, { username, channelId }, { user }) => { const query = { @@ -19,6 +14,7 @@ export const resolver = { if (username === user.username) { throw new Error('You cannot specify your username'); } + query.usernames = { $all: [ user.username, username ] }; } else if (typeof channelId !== 'undefined') { query.id = channelId; @@ -32,3 +28,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/hideChannel.js similarity index 87% rename from packages/rocketchat-graphql/server/schemas/channels/hideChannel.js rename to packages/rocketchat-graphql/server/resolvers/channels/hideChannel.js index 2904ca9dcd2f..23cd1017f985 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/hideChannel.js @@ -1,14 +1,9 @@ import { Meteor } from 'meteor/meteor'; import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/channels/hideChannel.graphql'; -export const schema = ` - type Mutation { - hideChannel(channelId: String!): Boolean - } -`; - -export const resolver = { +const resolver = { Mutation: { hideChannel: authenticated((root, args, { user }) => { const channel = RocketChat.models.Rooms.findOne({ @@ -38,3 +33,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/index.js b/packages/rocketchat-graphql/server/resolvers/channels/index.js similarity index 93% rename from packages/rocketchat-graphql/server/schemas/channels/index.js rename to packages/rocketchat-graphql/server/resolvers/channels/index.js index 063e9da41804..82a9dbff107d 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/index.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/index.js @@ -1,4 +1,4 @@ -import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; // queries import * as channels from './channels'; diff --git a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/leaveChannel.js similarity index 81% rename from packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js rename to packages/rocketchat-graphql/server/resolvers/channels/leaveChannel.js index 141f1eba171f..306beff5d7a6 100644 --- a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/leaveChannel.js @@ -1,14 +1,9 @@ import { Meteor } from 'meteor/meteor'; import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/channels/leaveChannel.graphql'; -export const schema = ` - type Mutation { - leaveChannel(channelId: String!): Boolean - } -`; - -export const resolver = { +const resolver = { Mutation: { leaveChannel: authenticated((root, args, { user }) => { const channel = RocketChat.models.Rooms.findOne({ @@ -28,3 +23,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/channels/settings.js b/packages/rocketchat-graphql/server/resolvers/channels/settings.js similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/settings.js rename to packages/rocketchat-graphql/server/resolvers/channels/settings.js diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js b/packages/rocketchat-graphql/server/resolvers/messages/Message-type.js similarity index 78% rename from packages/rocketchat-graphql/server/schemas/messages/Message-type.js rename to packages/rocketchat-graphql/server/resolvers/messages/Message-type.js index 264ef427390b..0fc8c6c36bb4 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/Message-type.js @@ -1,25 +1,8 @@ import { property } from '../../helpers/property'; import { dateToFloat } from '../../helpers/dateToFloat'; +import schema from '../../schemas/messages/Message-type.graphql'; -export const schema = ` - type Message { - id: String - author: User - content: String - channel: Channel - creationTime: Float - # Message sent by server e.g. User joined channel - fromServer: Boolean - type: String - # List of mentioned users - userRef: [User] - # list of mentioned channels - channelRef: [Channel] - reactions: [Reaction] - } -`; - -export const resolver = { +const resolver = { Message: { id: property('_id'), content: property('msg'), @@ -84,3 +67,8 @@ export const resolver = { } } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js b/packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js new file mode 100644 index 000000000000..63f5a8bbb300 --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/messages/MessageIdentifier-input.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js b/packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js new file mode 100644 index 000000000000..e25dfb592f7a --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/messages/MessagesWithCursor-type.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js b/packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js new file mode 100644 index 000000000000..81ec44c5b9b8 --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/messages/Reaction-type.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/addReactionToMessage.js similarity index 74% rename from packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js rename to packages/rocketchat-graphql/server/resolvers/messages/addReactionToMessage.js index 2dc894969880..1c915d3a4c9a 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/addReactionToMessage.js @@ -1,14 +1,9 @@ import { Meteor } from 'meteor/meteor'; import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/messages/addReactionToMessage.graphql'; -export const schema = ` - type Mutation { - addReactionToMassage(id: MessageIdentifier!, icon: String!): Message - } -`; - -export const resolver = { +const resolver = { Mutation: { addReactionToMassage: authenticated((root, { id, icon }, { user }) => { return new Promise((resolve) => { @@ -21,3 +16,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.js b/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js similarity index 83% rename from packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.js rename to packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js index 0f127c3c934f..dfbb818e12b2 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js @@ -1,6 +1,7 @@ import { withFilter } from 'graphql-subscriptions'; import { pubsub } from '../../subscriptions'; +import schema from '../../schemas/messages/chatMessageAdded.graphql'; export const CHAT_MESSAGE_SUBSCRIPTION_TOPIC = 'CHAT_MESSAGE_ADDED'; @@ -8,13 +9,7 @@ export function publishMessage(message) { pubsub.publish(CHAT_MESSAGE_SUBSCRIPTION_TOPIC, { chatMessageAdded: message }); } -export const schema = ` - type Subscription { - chatMessageAdded(channelId: String!): Message - } -`; - -export const resolver = { +const resolver = { Subscription: { chatMessageAdded: { subscribe: withFilter(() => pubsub.asyncIterator(CHAT_MESSAGE_SUBSCRIPTION_TOPIC), (payload, args) => { @@ -27,3 +22,8 @@ export const resolver = { RocketChat.callbacks.add('afterSaveMessage', (message) => { publishMessage(message); }, null, 'chatMessageAddedSubscription'); + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/deleteMessage.js similarity index 83% rename from packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js rename to packages/rocketchat-graphql/server/resolvers/messages/deleteMessage.js index 91b3d0fa7e92..851767060869 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/deleteMessage.js @@ -1,14 +1,9 @@ import { Meteor } from 'meteor/meteor'; import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/messages/deleteMessage.graphql'; -export const schema = ` - type Mutation { - deleteMessage(id: MessageIdentifier!): Message - } -`; - -export const resolver = { +const resolver = { Mutation: { deleteMessage: authenticated((root, { id }, { user }) => { const msg = RocketChat.models.Messages.findOneById(id.messageId, { fields: { u: 1, rid: 1 }}); @@ -29,3 +24,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/editMessage.js similarity index 85% rename from packages/rocketchat-graphql/server/schemas/messages/editMessage.js rename to packages/rocketchat-graphql/server/resolvers/messages/editMessage.js index da1e1c8e850e..42973929e23a 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/editMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/editMessage.js @@ -1,14 +1,9 @@ import { Meteor } from 'meteor/meteor'; import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/messages/editMessage.graphql'; -export const schema = ` - type Mutation { - editMessage(id: MessageIdentifier!, content: String!): Message - } -`; - -export const resolver = { +const resolver = { Mutation: { editMessage: authenticated((root, { id, content }, { user }) => { const msg = RocketChat.models.Messages.findOneById(id.messageId); @@ -31,3 +26,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/index.js b/packages/rocketchat-graphql/server/resolvers/messages/index.js similarity index 93% rename from packages/rocketchat-graphql/server/schemas/messages/index.js rename to packages/rocketchat-graphql/server/resolvers/messages/index.js index fb9728b19815..ad5fc67076e6 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/index.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/index.js @@ -1,4 +1,4 @@ -import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; // queries import * as messages from './messages'; diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.js b/packages/rocketchat-graphql/server/resolvers/messages/messages.js similarity index 66% rename from packages/rocketchat-graphql/server/schemas/messages/messages.js rename to packages/rocketchat-graphql/server/resolvers/messages/messages.js index 8083d2fa6fdf..6ef4b7502591 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/messages.js @@ -1,20 +1,7 @@ import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/messages/messages.graphql'; -export const schema = ` - type Query { - messages( - channelId: String, - channelDetails: ChannelNameAndDirect, - channelName: String, - cursor: String, - count: Int, - searchRegex: String, - excludeServer: Boolean - ): MessagesWithCursor - } -`; - -export const resolver = { +const resolver = { Query: { messages: authenticated((root, args) => { const messagesQuery = {}; @@ -45,10 +32,10 @@ export const resolver = { // cursor if (isPagination && args.cursor) { const cursorMsg = RocketChat.models.Messages.findOne(args.cursor, { fields: { ts: 1 } }); - messagesQuery.ts = { $gt: cursorMsg.ts }; + messagesQuery.ts = { $lt: cursorMsg.ts }; } - // searchRegex + // search if (typeof args.searchRegex === 'string') { messagesQuery.msg = { $regex: new RegExp(args.searchRegex, 'i') @@ -60,19 +47,26 @@ export const resolver = { messagesOptions.limit = args.count; } + // exclude messages generated by server if (args.excludeServer === true) { messagesQuery.t = { $exists: false }; } - const messages = RocketChat.models.Messages.find( - Object.assign({}, messagesQuery, { rid: channel._id }), - messagesOptions - ); + // look for messages that belongs to specific channel + messagesQuery.rid = channel._id; + + const messages = RocketChat.models.Messages.find(messagesQuery, messagesOptions); messagesArray = messages.fetch(); if (isPagination) { - cursor = (messagesArray[messagesArray.length - 1] || {})._id; + // oldest first (because of findOne) + messagesOptions.sort.ts = 1; + + const firstMessage = RocketChat.models.Messages.findOne(messagesQuery, messagesOptions); + const lastId = (messagesArray[messagesArray.length - 1] || {})._id; + + cursor = !lastId || lastId === firstMessage._id ? null : lastId; } } @@ -84,3 +78,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/sendMessage.js similarity index 75% rename from packages/rocketchat-graphql/server/schemas/messages/sendMessage.js rename to packages/rocketchat-graphql/server/resolvers/messages/sendMessage.js index 430460b72de8..c0930382578b 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/sendMessage.js @@ -1,14 +1,9 @@ /* global processWebhookMessage */ import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/messages/sendMessage.graphql'; -export const schema = ` - type Mutation { - sendMessage(channelId: String!, content: String!): Message - } -`; - -export const resolver = { +const resolver = { Mutation: { sendMessage: authenticated((root, { channelId, content }, { user }) => { const messageReturn = processWebhookMessage({ @@ -24,3 +19,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schemas/users/User-type.js b/packages/rocketchat-graphql/server/resolvers/users/User-type.js similarity index 65% rename from packages/rocketchat-graphql/server/schemas/users/User-type.js rename to packages/rocketchat-graphql/server/resolvers/users/User-type.js index 3891f47e1d65..6eede62b43ef 100644 --- a/packages/rocketchat-graphql/server/schemas/users/User-type.js +++ b/packages/rocketchat-graphql/server/resolvers/users/User-type.js @@ -1,19 +1,7 @@ -import { - property -} from '../../helpers/property'; +import { property } from '../../helpers/property'; +import schema from '../../schemas/users/User-type.graphql'; -export const schema = ` - extend type User { - status: UserStatus - avatar: String - name: String - lastLogin: String - channels: [Channel] - directMessages: [Channel] - } -`; - -export const resolver = { +const resolver = { User: { id: property('_id'), status: ({status}) => status.toUpperCase(), @@ -34,3 +22,8 @@ export const resolver = { } } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js b/packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js new file mode 100644 index 000000000000..61c84d39a6e5 --- /dev/null +++ b/packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js @@ -0,0 +1,5 @@ +import schema from '../../schemas/users/UserStatus-enum.graphql'; + +export { + schema +}; diff --git a/packages/rocketchat-graphql/server/schemas/users/index.js b/packages/rocketchat-graphql/server/resolvers/users/index.js similarity index 82% rename from packages/rocketchat-graphql/server/schemas/users/index.js rename to packages/rocketchat-graphql/server/resolvers/users/index.js index 7647d5a5fdd6..6de11371bf97 100644 --- a/packages/rocketchat-graphql/server/schemas/users/index.js +++ b/packages/rocketchat-graphql/server/resolvers/users/index.js @@ -1,4 +1,4 @@ -import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; // mutations import * as setStatus from './setStatus'; diff --git a/packages/rocketchat-graphql/server/schemas/users/setStatus.js b/packages/rocketchat-graphql/server/resolvers/users/setStatus.js similarity index 73% rename from packages/rocketchat-graphql/server/schemas/users/setStatus.js rename to packages/rocketchat-graphql/server/resolvers/users/setStatus.js index 6c61f4675b77..6d6f4aca4902 100644 --- a/packages/rocketchat-graphql/server/schemas/users/setStatus.js +++ b/packages/rocketchat-graphql/server/resolvers/users/setStatus.js @@ -1,12 +1,7 @@ import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/users/setStatus.graphql'; -export const schema = ` - type Mutation { - setStatus(status: UserStatus!): User - } -`; - -export const resolver = { +const resolver = { Mutation: { setStatus: authenticated((root, { status }, { user }) => { RocketChat.models.Users.update(user._id, { @@ -19,3 +14,8 @@ export const resolver = { }) } }; + +export { + schema, + resolver +}; diff --git a/packages/rocketchat-graphql/server/schema.js b/packages/rocketchat-graphql/server/schema.js index 3ee5b41532fa..1cbf6c38eeac 100644 --- a/packages/rocketchat-graphql/server/schema.js +++ b/packages/rocketchat-graphql/server/schema.js @@ -1,13 +1,10 @@ -import { - makeExecutableSchema -} from 'graphql-tools'; +import { makeExecutableSchema } from 'graphql-tools'; +import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; -import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; - -import * as channels from './schemas/channels'; -import * as messages from './schemas/messages'; -import * as accounts from './schemas/accounts'; -import * as users from './schemas/users'; +import * as channels from './resolvers/channels'; +import * as messages from './resolvers/messages'; +import * as accounts from './resolvers/accounts'; +import * as users from './resolvers/users'; const schema = mergeTypes([ channels.schema, diff --git a/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphql b/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphql new file mode 100644 index 000000000000..0bdf1ed7e00b --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphql @@ -0,0 +1,4 @@ +type LoginResult { + accessToken: String! + refreshToken: String! +} diff --git a/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js b/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js deleted file mode 100644 index 4a0a7c8397b4..000000000000 --- a/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.js +++ /dev/null @@ -1,6 +0,0 @@ -export const schema = ` - type LoginResult { - accessToken: String! - refreshToken: String! - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphql b/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphql new file mode 100644 index 000000000000..c91fe5e6379a --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphql @@ -0,0 +1,3 @@ +type OauthProvider { + name: String! +} diff --git a/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js b/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js deleted file mode 100644 index dd4a4253fd37..000000000000 --- a/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.js +++ /dev/null @@ -1,5 +0,0 @@ -export const schema = ` - type OauthProvider { - name: String! - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphql b/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphql new file mode 100644 index 000000000000..9ba76de8adb8 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphql @@ -0,0 +1,3 @@ +type Query { + oauthProviders: [OauthProvider] +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphql b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphql new file mode 100644 index 000000000000..03c4557918df --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphql @@ -0,0 +1,16 @@ +type Channel { + id: String! + name: String + description: String + announcement: String + topic: String + members: [User] + owners: [User] + numberOfMembers: Int + numberOfMessages: Int + readOnly: Boolean + direct: Boolean + privateChannel: Boolean + favourite: Boolean + unseenMessages: Int +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphql b/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphql new file mode 100644 index 000000000000..a00850e371cc --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphql @@ -0,0 +1,6 @@ +input ChannelFilter { + nameFilter: String + privacy: Privacy + joinedChannels: Boolean + sortBy: ChannelSort +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js b/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js deleted file mode 100644 index b80d4c680a95..000000000000 --- a/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.js +++ /dev/null @@ -1,8 +0,0 @@ -export const schema = ` - input ChannelFilter { - nameFilter: String - privacy: Privacy - joinedChannels: Boolean - sortBy: ChannelSort - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphql b/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphql new file mode 100644 index 000000000000..139567e862e9 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphql @@ -0,0 +1,4 @@ +input ChannelNameAndDirect { + name: String! + direct: Boolean! +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js b/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js deleted file mode 100644 index f3bbda3125d1..000000000000 --- a/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.js +++ /dev/null @@ -1,6 +0,0 @@ -export const schema = ` - input ChannelNameAndDirect { - name: String! - direct: Boolean! - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphql b/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphql new file mode 100644 index 000000000000..8a2c2902e6db --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphql @@ -0,0 +1,4 @@ +enum ChannelSort { + NAME + NUMBER_OF_MESSAGES +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js b/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js deleted file mode 100644 index beecdedd89ef..000000000000 --- a/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.js +++ /dev/null @@ -1,6 +0,0 @@ -export const schema = ` - enum ChannelSort { - NAME - NUMBER_OF_MESSAGES - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphql b/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphql new file mode 100644 index 000000000000..f28a57d51c28 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphql @@ -0,0 +1,5 @@ +enum Privacy { + PRIVATE + PUBLIC + ALL +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js b/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js deleted file mode 100644 index d0cd977a9470..000000000000 --- a/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.js +++ /dev/null @@ -1,7 +0,0 @@ -export const schema = ` - enum Privacy { - PRIVATE - PUBLIC - ALL - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.graphql b/packages/rocketchat-graphql/server/schemas/channels/channelByName.graphql new file mode 100644 index 000000000000..e301ce38f7f6 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/channelByName.graphql @@ -0,0 +1,3 @@ +type Query { + channelByName(name: String!): Channel +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.graphql b/packages/rocketchat-graphql/server/schemas/channels/channels.graphql new file mode 100644 index 000000000000..6e4ac5608249 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/channels.graphql @@ -0,0 +1,7 @@ +type Query { + channels(filter: ChannelFilter = { + privacy: ALL, + joinedChannels: false, + sortBy: NAME + }): [Channel] +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphql b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphql new file mode 100644 index 000000000000..8dfe20a071c5 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphql @@ -0,0 +1,3 @@ +type Query { + channelsByUser(userId: String!): [Channel] +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/createChannel.graphql new file mode 100644 index 000000000000..85317c86603a --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/createChannel.graphql @@ -0,0 +1,8 @@ +type Mutation { + createChannel( + name: String!, + private: Boolean = false, + readOnly: Boolean = false, + membersId: [String!] + ): Channel +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js b/packages/rocketchat-graphql/server/schemas/channels/createChannel.js deleted file mode 100644 index c87e88991767..000000000000 --- a/packages/rocketchat-graphql/server/schemas/channels/createChannel.js +++ /dev/null @@ -1,45 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { authenticated } from '../../helpers/authenticated'; - -export const schema = ` - type Mutation { - createChannel( - name: String!, - private: Boolean = false, - readOnly: Boolean = false, - membersId: [String!] - ): Channel - } -`; - -export const resolver = { - Mutation: { - createChannel: authenticated((root, args, { user }) => { - if (!RocketChat.authz.hasPermission(user._id, 'create-c')) { - return RocketChat.API.v1.unauthorized(); - } - - if (!args.name) { - throw new Error('Param "name" is required'); - } - - if (args.membersId && !_.isArray(args.membersId)) { - throw new Error('Param "membersId" must be an array if provided'); - } - - let readOnly = false; - if (typeof args.readOnly !== 'undefined') { - readOnly = args.readOnly; - } - - let id; - Meteor.runAsUser(user._id, () => { - id = Meteor.call('createChannel', args.name, args.membersId ? args.membersId : [], readOnly); - }); - - return RocketChat.models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }); - }) - } -}; - diff --git a/packages/rocketchat-graphql/server/schemas/channels/directChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/directChannel.graphql new file mode 100644 index 000000000000..4e41994bce80 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/directChannel.graphql @@ -0,0 +1,3 @@ +type Query { + directChannel(username: String, channelId: String): Channel +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphql new file mode 100644 index 000000000000..5ea9517f5741 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphql @@ -0,0 +1,3 @@ +type Mutation { + hideChannel(channelId: String!): Boolean +} diff --git a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphql new file mode 100644 index 000000000000..e6ceb4075c4e --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphql @@ -0,0 +1,3 @@ +type Mutation { + leaveChannel(channelId: String!): Boolean +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.graphql b/packages/rocketchat-graphql/server/schemas/messages/Message-type.graphql new file mode 100644 index 000000000000..8ccfdebfbf1d --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/Message-type.graphql @@ -0,0 +1,15 @@ +type Message { + id: String + author: User + content: String + channel: Channel + creationTime: Float + # Message sent by server e.g. User joined channel + fromServer: Boolean + type: String + # List of mentioned users + userRef: [User] + # list of mentioned channels + channelRef: [Channel] + reactions: [Reaction] +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphql b/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphql new file mode 100644 index 000000000000..88fbe90711cf --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphql @@ -0,0 +1,4 @@ +input MessageIdentifier { + channelId: String! + messageId: String! +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js b/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js deleted file mode 100644 index bb8571477bfe..000000000000 --- a/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.js +++ /dev/null @@ -1,6 +0,0 @@ -export const schema = ` - input MessageIdentifier { - channelId: String! - messageId: String! - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphql b/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphql new file mode 100644 index 000000000000..e890725f6efb --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphql @@ -0,0 +1,5 @@ +type MessagesWithCursor { + cursor: String + channel: Channel + messagesArray: [Message] +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js b/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js deleted file mode 100644 index b70b287321b8..000000000000 --- a/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.js +++ /dev/null @@ -1,7 +0,0 @@ -export const schema = ` - type MessagesWithCursor { - cursor: String - channel: Channel - messagesArray: [Message] - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphql b/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphql new file mode 100644 index 000000000000..e6eedf75d1e1 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphql @@ -0,0 +1,4 @@ +type Reaction { + username: String + icon: String +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js b/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js deleted file mode 100644 index c337f52ce6bf..000000000000 --- a/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.js +++ /dev/null @@ -1,6 +0,0 @@ -export const schema = ` - type Reaction { - username: String - icon: String - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphql new file mode 100644 index 000000000000..61c74c26c499 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphql @@ -0,0 +1,3 @@ +type Mutation { + addReactionToMassage(id: MessageIdentifier!, icon: String!): Message +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql b/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql new file mode 100644 index 000000000000..f88b2979ca5a --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql @@ -0,0 +1,3 @@ +type Subscription { + chatMessageAdded(channelId: String!): Message +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphql new file mode 100644 index 000000000000..f298a14ebf98 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphql @@ -0,0 +1,3 @@ +type Mutation { + deleteMessage(id: MessageIdentifier!): Message +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/editMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/editMessage.graphql new file mode 100644 index 000000000000..19900c58b272 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/editMessage.graphql @@ -0,0 +1,3 @@ +type Mutation { + editMessage(id: MessageIdentifier!, content: String!): Message +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.graphql b/packages/rocketchat-graphql/server/schemas/messages/messages.graphql new file mode 100644 index 000000000000..2b9774942e76 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.graphql @@ -0,0 +1,11 @@ +type Query { + messages( + channelId: String, + channelDetails: ChannelNameAndDirect, + channelName: String, + cursor: String, + count: Int, + searchRegex: String, + excludeServer: Boolean + ): MessagesWithCursor +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql new file mode 100644 index 000000000000..6f160fef1c94 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql @@ -0,0 +1,3 @@ +type Mutation { + sendMessage(channelId: String!, content: String!): Message +} diff --git a/packages/rocketchat-graphql/server/schemas/users/User-type.graphql b/packages/rocketchat-graphql/server/schemas/users/User-type.graphql new file mode 100644 index 000000000000..2a345415227e --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/users/User-type.graphql @@ -0,0 +1,8 @@ +extend type User { + status: UserStatus + avatar: String + name: String + lastLogin: String + channels: [Channel] + directMessages: [Channel] +} diff --git a/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphql b/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphql new file mode 100644 index 000000000000..a360cc2a72b9 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphql @@ -0,0 +1,7 @@ +enum UserStatus { + ONLINE + AWAY + BUSY + INVISIBLE + OFFLINE +} diff --git a/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js b/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js deleted file mode 100644 index 5e821bb5ee2a..000000000000 --- a/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.js +++ /dev/null @@ -1,9 +0,0 @@ -export const schema = ` - enum UserStatus { - ONLINE - AWAY - BUSY - INVISIBLE - OFFLINE - } -`; diff --git a/packages/rocketchat-graphql/server/schemas/users/setStatus.graphql b/packages/rocketchat-graphql/server/schemas/users/setStatus.graphql new file mode 100644 index 000000000000..7beb3512a91b --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/users/setStatus.graphql @@ -0,0 +1,3 @@ +type Mutation { + setStatus(status: UserStatus!): User +} From dfe8d1448a51193795949dde0a3bbca16dee1535 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Sat, 2 Sep 2017 12:26:44 +0200 Subject: [PATCH 024/212] WIP - LAST ONE --- .../.npm/package/npm-shrinkwrap.json | 4 +- packages/rocketchat-accounts/README.md | 3 + packages/rocketchat-accounts/server/config.js | 1 - packages/rocketchat-accounts/server/index.js | 1 - .../rocketchat-grant/server/authenticate.js | 1 + packages/rocketchat-grant/server/grant.js | 2 + .../.npm/package/npm-shrinkwrap.json | 215 +++++++++--------- packages/rocketchat-graphql/package.js | 3 +- packages/rocketchat-graphql/server/api.js | 10 +- .../server/helpers/authenticated.js | 1 - .../server/helpers/property.js | 3 - .../resolvers/accounts/OauthProvider-type.js | 2 +- .../server/resolvers/accounts/index.js | 2 +- .../resolvers/accounts/oauthProviders.js | 2 +- .../server/resolvers/channels/Channel-type.js | 6 +- .../resolvers/channels/ChannelFilter-input.js | 2 +- .../channels/ChannelNameAndDirect-input.js | 2 +- .../resolvers/channels/ChannelSort-enum.js | 2 +- .../server/resolvers/channels/Privacy-enum.js | 2 +- .../resolvers/channels/channelByName.js | 4 +- .../server/resolvers/channels/channels.js | 4 +- .../resolvers/channels/channelsByUser.js | 4 +- .../resolvers/channels/createChannel.js | 4 +- .../resolvers/channels/directChannel.js | 4 +- .../server/resolvers/channels/hideChannel.js | 3 +- .../server/resolvers/channels/leaveChannel.js | 3 +- .../server/resolvers/messages/Message-type.js | 6 +- .../messages/MessageIdentifier-input.js | 2 +- .../messages/MessagesWithCursor-type.js | 2 +- .../resolvers/messages/Reaction-type.js | 2 +- .../messages/addReactionToMessage.js | 3 +- .../resolvers/messages/chatMessageAdded.js | 32 ++- .../resolvers/messages/deleteMessage.js | 3 +- .../server/resolvers/messages/editMessage.js | 3 +- .../server/resolvers/messages/messages.js | 22 +- .../server/resolvers/messages/sendMessage.js | 14 +- .../server/resolvers/users/User-type.js | 6 +- .../server/resolvers/users/UserStatus-enum.js | 2 +- .../server/resolvers/users/setStatus.js | 4 +- ...type.graphql => LoginResult-type.graphqls} | 0 ...pe.graphql => OauthProvider-type.graphqls} | 0 ...viders.graphql => oauthProviders.graphqls} | 0 ...nel-type.graphql => Channel-type.graphqls} | 0 ...t.graphql => ChannelFilter-input.graphqls} | 0 ...ql => ChannelNameAndDirect-input.graphqls} | 0 ...enum.graphql => ChannelSort-enum.graphqls} | 0 ...acy-enum.graphql => Privacy-enum.graphqls} | 0 ...lByName.graphql => channelByName.graphqls} | 0 .../{channels.graphql => channels.graphqls} | 0 ...ByUser.graphql => channelsByUser.graphqls} | 0 ...Channel.graphql => createChannel.graphqls} | 0 ...Channel.graphql => directChannel.graphqls} | 0 ...deChannel.graphql => hideChannel.graphqls} | 0 ...eChannel.graphql => leaveChannel.graphqls} | 0 ...age-type.graphql => Message-type.graphqls} | 0 ...aphql => MessageIdentifier-input.graphqls} | 0 ...aphql => MessagesWithCursor-type.graphqls} | 0 ...on-type.graphql => Reaction-type.graphqls} | 0 ....graphql => addReactionToMessage.graphqls} | 0 .../schemas/messages/chatMessageAdded.graphql | 3 - .../messages/chatMessageAdded.graphqls | 3 + ...Message.graphql => deleteMessage.graphqls} | 0 ...itMessage.graphql => editMessage.graphqls} | 0 .../{messages.graphql => messages.graphqls} | 2 +- .../schemas/messages/sendMessage.graphql | 3 - .../schemas/messages/sendMessage.graphqls | 3 + .../{User-type.graphql => User-type.graphqls} | 0 ...-enum.graphql => UserStatus-enum.graphqls} | 0 .../{setStatus.graphql => setStatus.graphqls} | 0 69 files changed, 232 insertions(+), 173 deletions(-) create mode 100644 packages/rocketchat-accounts/README.md delete mode 100644 packages/rocketchat-graphql/server/helpers/property.js rename packages/rocketchat-graphql/server/schemas/accounts/{LoginResult-type.graphql => LoginResult-type.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/accounts/{OauthProvider-type.graphql => OauthProvider-type.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/accounts/{oauthProviders.graphql => oauthProviders.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{Channel-type.graphql => Channel-type.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{ChannelFilter-input.graphql => ChannelFilter-input.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{ChannelNameAndDirect-input.graphql => ChannelNameAndDirect-input.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{ChannelSort-enum.graphql => ChannelSort-enum.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{Privacy-enum.graphql => Privacy-enum.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{channelByName.graphql => channelByName.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{channels.graphql => channels.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{channelsByUser.graphql => channelsByUser.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{createChannel.graphql => createChannel.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{directChannel.graphql => directChannel.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{hideChannel.graphql => hideChannel.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/channels/{leaveChannel.graphql => leaveChannel.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/messages/{Message-type.graphql => Message-type.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/messages/{MessageIdentifier-input.graphql => MessageIdentifier-input.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/messages/{MessagesWithCursor-type.graphql => MessagesWithCursor-type.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/messages/{Reaction-type.graphql => Reaction-type.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/messages/{addReactionToMessage.graphql => addReactionToMessage.graphqls} (100%) delete mode 100644 packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphqls rename packages/rocketchat-graphql/server/schemas/messages/{deleteMessage.graphql => deleteMessage.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/messages/{editMessage.graphql => editMessage.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/messages/{messages.graphql => messages.graphqls} (81%) delete mode 100644 packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql create mode 100644 packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphqls rename packages/rocketchat-graphql/server/schemas/users/{User-type.graphql => User-type.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/users/{UserStatus-enum.graphql => UserStatus-enum.graphqls} (100%) rename packages/rocketchat-graphql/server/schemas/users/{setStatus.graphql => setStatus.graphqls} (100%) diff --git a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json index 720452518c3b..9bee17427949 100644 --- a/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-accounts/.npm/package/npm-shrinkwrap.json @@ -53,8 +53,8 @@ "from": "bufferjs@1.1.0" }, "core-js": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", "from": "core-js@>=2.5.0 <3.0.0" }, "core-util-is": { diff --git a/packages/rocketchat-accounts/README.md b/packages/rocketchat-accounts/README.md new file mode 100644 index 000000000000..91ee3cc93aa5 --- /dev/null +++ b/packages/rocketchat-accounts/README.md @@ -0,0 +1,3 @@ +# rocketchat:accounts + +Integration with `js-accounts` system. diff --git a/packages/rocketchat-accounts/server/config.js b/packages/rocketchat-accounts/server/config.js index 621db418d784..21a6629b0b08 100644 --- a/packages/rocketchat-accounts/server/config.js +++ b/packages/rocketchat-accounts/server/config.js @@ -7,7 +7,6 @@ Meteor.startup(() => { const mongodb = MongoInternals.defaultRemoteCollectionDriver().mongo.db; const mongoAdapter = new MongoAdapter(mongodb, { - // XXX: UserId in RocketChat is a string(17) value convertUserIdToMongoObjectId: false }); diff --git a/packages/rocketchat-accounts/server/index.js b/packages/rocketchat-accounts/server/index.js index 88ebb9b52977..7651774b4e8c 100644 --- a/packages/rocketchat-accounts/server/index.js +++ b/packages/rocketchat-accounts/server/index.js @@ -1,4 +1,3 @@ -// import './fix'; import './config'; import AccountsServer from '@accounts/server'; diff --git a/packages/rocketchat-grant/server/authenticate.js b/packages/rocketchat-grant/server/authenticate.js index ad68fb009681..7e5aae261e1f 100644 --- a/packages/rocketchat-grant/server/authenticate.js +++ b/packages/rocketchat-grant/server/authenticate.js @@ -1,4 +1,5 @@ import { AccountsServer } from 'meteor/rocketchat:accounts'; +import { RocketChat } from 'meteor/rocketchat:lib'; import { Accounts } from 'meteor/accounts-base'; import { Meteor } from 'meteor/meteor'; diff --git a/packages/rocketchat-grant/server/grant.js b/packages/rocketchat-grant/server/grant.js index 0f8890652909..b4adfd3081dd 100644 --- a/packages/rocketchat-grant/server/grant.js +++ b/packages/rocketchat-grant/server/grant.js @@ -1,3 +1,5 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import Providers from './providers'; import Settings from './settings'; import { path, generateCallback, generateAppCallback } from './routes'; diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 6a2374ea66c7..10d14533cd41 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -3,510 +3,505 @@ "accepts": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", - "from": "accepts@https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz" + "from": "accepts@>=1.3.3 <1.4.0" }, "apollo-server-core": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-1.1.0.tgz", - "from": "apollo-server-core@https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-1.1.0.tgz" + "from": "apollo-server-core@>=1.1.0 <2.0.0" }, "apollo-server-express": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-1.1.2.tgz", - "from": "apollo-server-express@https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-1.1.2.tgz" + "from": "apollo-server-express@1.1.2" }, "apollo-server-module-graphiql": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/apollo-server-module-graphiql/-/apollo-server-module-graphiql-1.1.2.tgz", - "from": "apollo-server-module-graphiql@https://registry.npmjs.org/apollo-server-module-graphiql/-/apollo-server-module-graphiql-1.1.2.tgz" + "from": "apollo-server-module-graphiql@>=1.1.2 <2.0.0" }, "apollo-tracing": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.0.7.tgz", - "from": "apollo-tracing@https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.0.7.tgz" + "from": "apollo-tracing@>=0.0.7 <0.0.8" }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "from": "array-flatten@https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" + "from": "array-flatten@1.1.1" }, "babel-polyfill": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", - "from": "babel-polyfill@https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "from": "babel-polyfill@>=6.23.0 <7.0.0", "dependencies": { "regenerator-runtime": { "version": "0.10.5", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "from": "regenerator-runtime@https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz" + "from": "regenerator-runtime@>=0.10.5 <0.11.0" } } }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "from": "babel-runtime@https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz" + "from": "babel-runtime@>=6.23.0 <7.0.0" }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "from": "backo2@https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz" + "from": "backo2@>=1.0.2 <2.0.0" }, "base64url": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", - "from": "base64url@https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz" + "from": "base64url@>=2.0.0 <3.0.0" }, "bcryptjs": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "from": "bcryptjs@https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz" + "from": "bcryptjs@>=2.4.0 <3.0.0" }, "body-parser": { "version": "1.17.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", - "from": "body-parser@https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz" + "from": "body-parser@1.17.2" }, "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "from": "buffer-equal-constant-time@https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" + "from": "buffer-equal-constant-time@1.0.1" }, "bytes": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", - "from": "bytes@https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz" + "from": "bytes@2.4.0" }, "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "from": "content-disposition@https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz" + "from": "content-disposition@0.5.2" }, "content-type": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", - "from": "content-type@https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz" + "from": "content-type@>=1.0.2 <1.1.0" }, "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "from": "cookie@https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz" + "from": "cookie@0.3.1" }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "from": "cookie-signature@https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" + "from": "cookie-signature@1.0.6" }, "core-js": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", - "from": "core-js@https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "from": "core-js@>=2.4.0 <3.0.0" }, "cors": { "version": "2.8.4", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz", - "from": "cors@https://registry.npmjs.org/cors/-/cors-2.8.4.tgz" + "from": "cors@2.8.4" }, "crypto": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz", - "from": "crypto@https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz" + "from": "crypto@>=0.0.3 <0.0.4" }, "debug": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.7.tgz" + "from": "debug@2.6.7" }, "deepmerge": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.1.tgz", - "from": "deepmerge@https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.1.tgz" + "from": "deepmerge@>=1.3.2 <2.0.0" }, "depd": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "from": "depd@https://registry.npmjs.org/depd/-/depd-1.1.1.tgz" + "from": "depd@>=1.1.0 <1.2.0" }, "deprecated-decorator": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", - "from": "deprecated-decorator@https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz" + "from": "deprecated-decorator@>=0.1.6 <0.2.0" }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "from": "destroy@https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" + "from": "destroy@>=1.0.4 <1.1.0" }, "ecdsa-sig-formatter": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", - "from": "ecdsa-sig-formatter@https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz" + "from": "ecdsa-sig-formatter@1.0.9" }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "from": "ee-first@https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + "from": "ee-first@1.1.1" }, "encodeurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", - "from": "encodeurl@https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz" + "from": "encodeurl@>=1.0.1 <1.1.0" }, "es6-promise": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", - "from": "es6-promise@https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz" + "from": "es6-promise@>=4.0.5 <5.0.0" }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "from": "escape-html@https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" + "from": "escape-html@>=1.0.3 <1.1.0" }, "etag": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", - "from": "etag@https://registry.npmjs.org/etag/-/etag-1.8.0.tgz" + "from": "etag@>=1.8.0 <1.9.0" }, "eventemitter3": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", - "from": "eventemitter3@https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz" + "from": "eventemitter3@>=2.0.3 <3.0.0" }, "express": { "version": "4.15.4", "resolved": "https://registry.npmjs.org/express/-/express-4.15.4.tgz", - "from": "express@https://registry.npmjs.org/express/-/express-4.15.4.tgz", + "from": "express@4.15.4", "dependencies": { "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" + "from": "debug@2.6.8" }, "qs": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", - "from": "qs@https://registry.npmjs.org/qs/-/qs-6.5.0.tgz" + "from": "qs@6.5.0" } } }, "finalhandler": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz", - "from": "finalhandler@https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz", + "from": "finalhandler@>=1.0.4 <1.1.0", "dependencies": { "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" + "from": "debug@2.6.8" } } }, "forwarded": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", - "from": "forwarded@https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz" + "from": "forwarded@>=0.1.0 <0.2.0" }, "fresh": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", - "from": "fresh@https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz" + "from": "fresh@0.5.0" }, "graphql": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.10.3.tgz", - "from": "graphql@https://registry.npmjs.org/graphql/-/graphql-0.10.3.tgz" + "from": "graphql@0.10.3" }, "graphql-subscriptions": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.4.4.tgz", - "from": "graphql-subscriptions@https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.4.4.tgz" + "from": "graphql-subscriptions@0.4.4" }, "graphql-tag": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.4.2.tgz", - "from": "graphql-tag@https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.4.2.tgz" + "from": "graphql-tag@>=2.4.2 <3.0.0" }, "graphql-tools": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.2.2.tgz", - "from": "graphql-tools@https://registry.npmjs.org/graphql-tools/-/graphql-tools-1.2.2.tgz" + "from": "graphql-tools@1.2.2" }, "hoek": { "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "from": "hoek@https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" + "from": "hoek@>=2.0.0 <3.0.0" }, "http-errors": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "from": "http-errors@https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz" + "from": "http-errors@>=1.6.1 <1.7.0" }, "iconv-lite": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "from": "iconv-lite@https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz" + "from": "iconv-lite@0.4.15" }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "from": "inherits@https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "from": "inherits@2.0.3" }, "ipaddr.js": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", - "from": "ipaddr.js@https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz" + "from": "ipaddr.js@1.4.0" }, "isemail": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", - "from": "isemail@https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz" + "from": "isemail@>=1.0.0 <2.0.0" }, "iterall": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.1.1.tgz", - "from": "iterall@https://registry.npmjs.org/iterall/-/iterall-1.1.1.tgz" + "from": "iterall@>=1.1.0 <2.0.0" }, "joi": { "version": "6.10.1", "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", - "from": "joi@https://registry.npmjs.org/joi/-/joi-6.10.1.tgz" + "from": "joi@>=6.10.1 <7.0.0" }, "jsonwebtoken": { "version": "7.4.3", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz", - "from": "jsonwebtoken@https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz" + "from": "jsonwebtoken@>=7.2.1 <8.0.0" }, "jwa": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "from": "jwa@https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz" + "from": "jwa@>=1.1.4 <2.0.0" }, "jws": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "from": "jws@https://registry.npmjs.org/jws/-/jws-3.1.4.tgz" + "from": "jws@>=3.1.4 <4.0.0" }, "jwt-decode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", - "from": "jwt-decode@https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz" - }, - "kamilkisiela-graphql-api": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/kamilkisiela-graphql-api/-/kamilkisiela-graphql-api-0.1.1.tgz", - "from": "kamilkisiela-graphql-api@https://registry.npmjs.org/kamilkisiela-graphql-api/-/kamilkisiela-graphql-api-0.1.1.tgz" + "from": "jwt-decode@>=2.1.0 <3.0.0" }, "kamilkisiela-merge-graphql-schemas": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/kamilkisiela-merge-graphql-schemas/-/kamilkisiela-merge-graphql-schemas-1.1.2.tgz", - "from": "kamilkisiela-merge-graphql-schemas@https://registry.npmjs.org/kamilkisiela-merge-graphql-schemas/-/kamilkisiela-merge-graphql-schemas-1.1.2.tgz" + "from": "kamilkisiela-merge-graphql-schemas@1.1.2" }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "from": "lodash@https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + "from": "lodash@>=4.16.4 <5.0.0" }, "lodash.assign": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "from": "lodash.assign@https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz" + "from": "lodash.assign@>=4.2.0 <5.0.0" }, "lodash.isobject": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", - "from": "lodash.isobject@https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz" + "from": "lodash.isobject@>=3.0.2 <4.0.0" }, "lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "from": "lodash.isstring@https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" + "from": "lodash.isstring@>=4.0.1 <5.0.0" }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "from": "lodash.once@https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" + "from": "lodash.once@>=4.0.0 <5.0.0" + }, + "lodash.property": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.property/-/lodash.property-4.4.2.tgz", + "from": "lodash.property@4.4.2" }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "from": "media-typer@https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" + "from": "media-typer@0.3.0" }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "from": "merge-descriptors@https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - }, - "meteor-promise": { - "version": "0.8.6", - "resolved": "https://registry.npmjs.org/meteor-promise/-/meteor-promise-0.8.6.tgz", - "from": "meteor-promise@https://registry.npmjs.org/meteor-promise/-/meteor-promise-0.8.6.tgz" + "from": "merge-descriptors@1.0.1" }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "from": "methods@https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" + "from": "methods@>=1.1.2 <1.2.0" }, "mime": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", - "from": "mime@https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" + "from": "mime@1.3.4" }, "mime-db": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", - "from": "mime-db@https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz" + "from": "mime-db@>=1.29.0 <1.30.0" }, "mime-types": { "version": "2.1.16", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", - "from": "mime-types@https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz" + "from": "mime-types@>=2.1.15 <2.2.0" }, "moment": { "version": "2.18.1", "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", - "from": "moment@https://registry.npmjs.org/moment/-/moment-2.18.1.tgz" + "from": "moment@>=2.0.0 <3.0.0" }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "from": "ms@https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + "from": "ms@>=2.0.0 <3.0.0" }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "from": "negotiator@https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz" + "from": "negotiator@0.6.1" }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "from": "object-assign@https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + "from": "object-assign@>=4.0.0 <5.0.0" }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "from": "on-finished@https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" + "from": "on-finished@>=2.3.0 <2.4.0" }, "parseurl": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", - "from": "parseurl@https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz" + "from": "parseurl@>=1.3.1 <1.4.0" }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "from": "path-to-regexp@https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" + "from": "path-to-regexp@0.1.7" }, "proxy-addr": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", - "from": "proxy-addr@https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz" + "from": "proxy-addr@>=1.1.5 <1.2.0" }, "qs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "from": "qs@https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" + "from": "qs@6.4.0" }, "range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "from": "range-parser@https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" + "from": "range-parser@>=1.2.0 <1.3.0" }, "raw-body": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", - "from": "raw-body@https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz" + "from": "raw-body@>=2.2.0 <2.3.0" }, "regenerator-runtime": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "from": "regenerator-runtime@https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz" + "from": "regenerator-runtime@>=0.11.0 <0.12.0" }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "from": "safe-buffer@https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + "from": "safe-buffer@>=5.0.1 <6.0.0" }, "send": { "version": "0.15.4", "resolved": "https://registry.npmjs.org/send/-/send-0.15.4.tgz", - "from": "send@https://registry.npmjs.org/send/-/send-0.15.4.tgz", + "from": "send@0.15.4", "dependencies": { "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "from": "debug@https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" + "from": "debug@2.6.8" } } }, "serve-static": { "version": "1.12.4", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.4.tgz", - "from": "serve-static@https://registry.npmjs.org/serve-static/-/serve-static-1.12.4.tgz" + "from": "serve-static@1.12.4" }, "setprototypeof": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "from": "setprototypeof@https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz" + "from": "setprototypeof@1.0.3" }, "statuses": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "from": "statuses@https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" + "from": "statuses@>=1.3.1 <2.0.0" }, "subscriptions-transport-ws": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.2.tgz", - "from": "subscriptions-transport-ws@https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.2.tgz" + "from": "subscriptions-transport-ws@0.8.2" }, "symbol-observable": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "from": "symbol-observable@https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz" + "from": "symbol-observable@>=1.0.4 <2.0.0" }, "topo": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", - "from": "topo@https://registry.npmjs.org/topo/-/topo-1.1.0.tgz" + "from": "topo@>=1.0.0 <2.0.0" }, "type-is": { "version": "1.6.15", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "from": "type-is@https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz" + "from": "type-is@>=1.6.15 <1.7.0" }, "ultron": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz", - "from": "ultron@https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz" + "from": "ultron@>=1.1.0 <1.2.0" }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "from": "unpipe@https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + "from": "unpipe@1.0.0" }, "utils-merge": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", - "from": "utils-merge@https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" + "from": "utils-merge@1.0.0" }, "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "from": "uuid@https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" + "from": "uuid@>=3.0.1 <4.0.0" }, "vary": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", - "from": "vary@https://registry.npmjs.org/vary/-/vary-1.1.1.tgz" + "from": "vary@>=1.0.0 <2.0.0" }, "ws": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ws/-/ws-3.1.0.tgz", - "from": "ws@https://registry.npmjs.org/ws/-/ws-3.1.0.tgz" + "from": "ws@>=3.0.0 <4.0.0" }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "from": "xtend@https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "from": "xtend@>=4.0.1 <5.0.0" } } } diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js index def84c4c84c9..8d6ff940e0c1 100644 --- a/packages/rocketchat-graphql/package.js +++ b/packages/rocketchat-graphql/package.js @@ -20,7 +20,7 @@ Package.onUse(function(api) { }); Npm.depends({ - 'kamilkisiela-graphql-api': '0.1.1', + '@accounts/graphql-api': '0.1.1', 'apollo-server-express': '1.1.2', 'cors': '2.8.4', 'body-parser': '1.17.2', @@ -28,6 +28,7 @@ Npm.depends({ 'graphql': '0.10.3', 'graphql-subscriptions': '0.4.4', 'graphql-tools': '1.2.2', + 'lodash.property': '4.4.2', 'kamilkisiela-merge-graphql-schemas': '1.1.2', 'subscriptions-transport-ws': '0.8.2' }); diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index 9c1f36c00a90..494429f52e97 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -1,5 +1,5 @@ import { graphqlExpress, graphiqlExpress } from 'apollo-server-express'; -import { JSAccountsContext as jsAccountsContext } from 'kamilkisiela-graphql-api'; +import { JSAccountsContext as jsAccountsContext } from '@accounts/graphql-api'; import { SubscriptionServer } from 'subscriptions-transport-ws'; import { execute, subscribe } from 'graphql'; import { Meteor } from 'meteor/meteor'; @@ -41,7 +41,13 @@ graphQLServer.use('/graphiql', graphiqlExpress({ new SubscriptionServer({ schema: executableSchema, execute, - subscribe + subscribe, + onOperation: ({context}) => { + console.log('context', context); + return { + authToken: context.Authorization + }; + } }, { path: '/subscriptions', diff --git a/packages/rocketchat-graphql/server/helpers/authenticated.js b/packages/rocketchat-graphql/server/helpers/authenticated.js index c36223b94b5a..44c54e053996 100644 --- a/packages/rocketchat-graphql/server/helpers/authenticated.js +++ b/packages/rocketchat-graphql/server/helpers/authenticated.js @@ -1,6 +1,5 @@ import { AccountsServer } from 'meteor/rocketchat:accounts'; //import { authenticated as _authenticated } from '@accounts/graphql-api'; -// import { authenticated as _authenticated } from 'kamilkisiela-graphql-api'; import { authenticated as _authenticated } from '../mocks/accounts/graphql-api'; export const authenticated = (resolver) => { diff --git a/packages/rocketchat-graphql/server/helpers/property.js b/packages/rocketchat-graphql/server/helpers/property.js deleted file mode 100644 index 65485cae9868..000000000000 --- a/packages/rocketchat-graphql/server/helpers/property.js +++ /dev/null @@ -1,3 +0,0 @@ -export function property(key) { - return (object) => object == null ? undefined : object[key]; -} diff --git a/packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js b/packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js index fd13e7f61106..7cf39ff56139 100644 --- a/packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js +++ b/packages/rocketchat-graphql/server/resolvers/accounts/OauthProvider-type.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/accounts/OauthProvider-type.graphql'; +import schema from '../../schemas/accounts/OauthProvider-type.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/accounts/index.js b/packages/rocketchat-graphql/server/resolvers/accounts/index.js index 57d98cce5962..02aceb574911 100644 --- a/packages/rocketchat-graphql/server/resolvers/accounts/index.js +++ b/packages/rocketchat-graphql/server/resolvers/accounts/index.js @@ -1,4 +1,4 @@ -import { createJSAccountsGraphQL } from 'kamilkisiela-graphql-api'; +import { createJSAccountsGraphQL } from '@accounts/graphql-api'; import { AccountsServer } from 'meteor/rocketchat:accounts'; import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; diff --git a/packages/rocketchat-graphql/server/resolvers/accounts/oauthProviders.js b/packages/rocketchat-graphql/server/resolvers/accounts/oauthProviders.js index 0cccbc9381d9..de487b8f9265 100644 --- a/packages/rocketchat-graphql/server/resolvers/accounts/oauthProviders.js +++ b/packages/rocketchat-graphql/server/resolvers/accounts/oauthProviders.js @@ -1,7 +1,7 @@ import { HTTP } from 'meteor/http'; import { Meteor } from 'meteor/meteor'; -import schema from '../../schemas/accounts/oauthProviders.graphql'; +import schema from '../../schemas/accounts/oauthProviders.graphqls'; function isJSON(obj) { try { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/Channel-type.js b/packages/rocketchat-graphql/server/resolvers/channels/Channel-type.js index e4dfb9ba4371..e16dffa8ab83 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/Channel-type.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/Channel-type.js @@ -1,5 +1,7 @@ -import { property } from '../../helpers/property'; -import schema from '../../schemas/channels/Channel-type.graphql'; +import { RocketChat } from 'meteor/rocketchat:lib'; +import property from 'lodash.property'; + +import schema from '../../schemas/channels/Channel-type.graphqls'; const resolver = { Channel: { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js b/packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js index 54c5be23b0ff..cb1c26b0efa5 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/ChannelFilter-input.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/channels/ChannelFilter-input.graphql'; +import schema from '../../schemas/channels/ChannelFilter-input.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js b/packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js index ad769ae36913..70cb2f18e6b6 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/ChannelNameAndDirect-input.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/channels/ChannelNameAndDirect-input.graphql'; +import schema from '../../schemas/channels/ChannelNameAndDirect-input.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js b/packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js index 3cd8b5f7b8d3..39e2cfc9aef5 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/ChannelSort-enum.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/channels/ChannelSort-enum.graphql'; +import schema from '../../schemas/channels/ChannelSort-enum.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js b/packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js index bc0172b74adb..978a69b5ac0f 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/Privacy-enum.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/channels/Privacy-enum.graphql'; +import schema from '../../schemas/channels/Privacy-enum.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/channels/channelByName.js b/packages/rocketchat-graphql/server/resolvers/channels/channelByName.js index 060e2a2526a6..580280b549a2 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/channelByName.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/channelByName.js @@ -1,6 +1,8 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; -import schema from '../../schemas/channels/channelByName.graphql'; +import schema from '../../schemas/channels/channelByName.graphqls'; const resolver = { Query: { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/channels.js b/packages/rocketchat-graphql/server/resolvers/channels/channels.js index 6087771b86fd..04723ff5f5d4 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/channels.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/channels.js @@ -1,6 +1,8 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; -import schema from '../../schemas/channels/channels.graphql'; +import schema from '../../schemas/channels/channels.graphqls'; const resolver = { Query: { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/channelsByUser.js b/packages/rocketchat-graphql/server/resolvers/channels/channelsByUser.js index 29a240e5c000..4fdc6e15a309 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/channelsByUser.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/channelsByUser.js @@ -1,6 +1,8 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; -import schema from '../../schemas/channels/channelsByUser.graphql'; +import schema from '../../schemas/channels/channelsByUser.graphqls'; const resolver = { Query: { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/createChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/createChannel.js index e0f8a84d6a3d..59435add38bb 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/createChannel.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/createChannel.js @@ -1,5 +1,7 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/channels/createChannel.graphql'; +import schema from '../../schemas/channels/createChannel.graphqls'; const resolver = { Mutation: { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/directChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/directChannel.js index 2218cdf7837b..e18e39af19dc 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/directChannel.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/directChannel.js @@ -1,6 +1,8 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import { authenticated } from '../../helpers/authenticated'; import { roomPublicFields } from './settings'; -import schema from '../../schemas/channels/directChannel.graphql'; +import schema from '../../schemas/channels/directChannel.graphqls'; const resolver = { Query: { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/hideChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/hideChannel.js index 23cd1017f985..08c55efa7796 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/hideChannel.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/hideChannel.js @@ -1,7 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { RocketChat } from 'meteor/rocketchat:lib'; import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/channels/hideChannel.graphql'; +import schema from '../../schemas/channels/hideChannel.graphqls'; const resolver = { Mutation: { diff --git a/packages/rocketchat-graphql/server/resolvers/channels/leaveChannel.js b/packages/rocketchat-graphql/server/resolvers/channels/leaveChannel.js index 306beff5d7a6..46afd2a08940 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/leaveChannel.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/leaveChannel.js @@ -1,7 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { RocketChat } from 'meteor/rocketchat:lib'; import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/channels/leaveChannel.graphql'; +import schema from '../../schemas/channels/leaveChannel.graphqls'; const resolver = { Mutation: { diff --git a/packages/rocketchat-graphql/server/resolvers/messages/Message-type.js b/packages/rocketchat-graphql/server/resolvers/messages/Message-type.js index 0fc8c6c36bb4..362ce8b50b60 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/Message-type.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/Message-type.js @@ -1,6 +1,8 @@ -import { property } from '../../helpers/property'; +import { RocketChat } from 'meteor/rocketchat:lib'; +import property from 'lodash.property'; + import { dateToFloat } from '../../helpers/dateToFloat'; -import schema from '../../schemas/messages/Message-type.graphql'; +import schema from '../../schemas/messages/Message-type.graphqls'; const resolver = { Message: { diff --git a/packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js b/packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js index 63f5a8bbb300..bda12ad6ac68 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/MessageIdentifier-input.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/messages/MessageIdentifier-input.graphql'; +import schema from '../../schemas/messages/MessageIdentifier-input.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js b/packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js index e25dfb592f7a..02e630ff4589 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/MessagesWithCursor-type.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/messages/MessagesWithCursor-type.graphql'; +import schema from '../../schemas/messages/MessagesWithCursor-type.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js b/packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js index 81ec44c5b9b8..37a9c7a71ef6 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/Reaction-type.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/messages/Reaction-type.graphql'; +import schema from '../../schemas/messages/Reaction-type.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/messages/addReactionToMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/addReactionToMessage.js index 1c915d3a4c9a..29a55ded3d95 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/addReactionToMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/addReactionToMessage.js @@ -1,7 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { RocketChat } from 'meteor/rocketchat:lib'; import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/messages/addReactionToMessage.graphql'; +import schema from '../../schemas/messages/addReactionToMessage.graphqls'; const resolver = { Mutation: { diff --git a/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js b/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js index dfbb818e12b2..08cb14bdb274 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js @@ -1,7 +1,9 @@ import { withFilter } from 'graphql-subscriptions'; +import { RocketChat } from 'meteor/rocketchat:lib'; import { pubsub } from '../../subscriptions'; -import schema from '../../schemas/messages/chatMessageAdded.graphql'; +import { authenticated } from '../../helpers/authenticated'; +import schema from '../../schemas/messages/chatMessageAdded.graphqls'; export const CHAT_MESSAGE_SUBSCRIPTION_TOPIC = 'CHAT_MESSAGE_ADDED'; @@ -9,11 +11,35 @@ export function publishMessage(message) { pubsub.publish(CHAT_MESSAGE_SUBSCRIPTION_TOPIC, { chatMessageAdded: message }); } +function shouldPublish(message, { id, directTo }, username) { + if (id) { + return message.rid === id; + } else if (directTo) { + const room = RocketChat.models.Rooms.findOne({ + usernames: { $all: [directTo, username] }, + t: 'd' + }); + + return room && room._id === message.rid; + } + + return false; +} + const resolver = { Subscription: { chatMessageAdded: { - subscribe: withFilter(() => pubsub.asyncIterator(CHAT_MESSAGE_SUBSCRIPTION_TOPIC), (payload, args) => { - return payload.chatMessageAdded.rid === args.channelId; + subscribe: withFilter(() => pubsub.asyncIterator(CHAT_MESSAGE_SUBSCRIPTION_TOPIC), (payload, args, ctx) => { + // FIX: there's no authToken in context + // TODO: check if middleware applies to subscriptions, probably not. + const channel = { + id: args.channelId, + directTo: args.directTo + }; + + console.log('context in sub', ctx); + + return shouldPublish(payload.chatMessageAdded, channel, ctx.user.username); }) } } diff --git a/packages/rocketchat-graphql/server/resolvers/messages/deleteMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/deleteMessage.js index 851767060869..33225c02f282 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/deleteMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/deleteMessage.js @@ -1,7 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { RocketChat } from 'meteor/rocketchat:lib'; import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/messages/deleteMessage.graphql'; +import schema from '../../schemas/messages/deleteMessage.graphqls'; const resolver = { Mutation: { diff --git a/packages/rocketchat-graphql/server/resolvers/messages/editMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/editMessage.js index 42973929e23a..0fabc8b34db9 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/editMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/editMessage.js @@ -1,7 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { RocketChat } from 'meteor/rocketchat:lib'; import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/messages/editMessage.graphql'; +import schema from '../../schemas/messages/editMessage.graphqls'; const resolver = { Mutation: { diff --git a/packages/rocketchat-graphql/server/resolvers/messages/messages.js b/packages/rocketchat-graphql/server/resolvers/messages/messages.js index 6ef4b7502591..a163ebefa406 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/messages.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/messages.js @@ -1,9 +1,11 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/messages/messages.graphql'; +import schema from '../../schemas/messages/messages.graphqls'; const resolver = { Query: { - messages: authenticated((root, args) => { + messages: authenticated((root, args, { user }) => { const messagesQuery = {}; const messagesOptions = { sort: { ts: -1 } @@ -15,20 +17,24 @@ const resolver = { if (args.channelId) { // channelId channelQuery._id = args.channelId; - } else if (args.channelDetails) { - // channelDetails - channelQuery.name = args.channelDetails.name; - channelQuery.t = args.channelDetails.direct === true ? 'd' : { $ne: 'd' }; + } else if (args.directTo) { + // direct message where directTo is a user id + channelQuery.t = 'd'; + channelQuery.usernames = { $all: [args.directTo, user.username] }; + } else if (args.channelName) { + // non-direct channel + channelQuery.t = { $ne: 'd' }; + channelQuery.name = args.channelName; } else { - console.error('messages query must be called with channelId or channelDetails'); + console.error('messages query must be called with channelId or directTo'); return null; } const channel = RocketChat.models.Rooms.findOne(channelQuery); + let messagesArray = []; if (channel) { - // cursor if (isPagination && args.cursor) { const cursorMsg = RocketChat.models.Messages.findOne(args.cursor, { fields: { ts: 1 } }); diff --git a/packages/rocketchat-graphql/server/resolvers/messages/sendMessage.js b/packages/rocketchat-graphql/server/resolvers/messages/sendMessage.js index c0930382578b..7bbd20b71ec0 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/sendMessage.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/sendMessage.js @@ -1,15 +1,17 @@ /* global processWebhookMessage */ import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/messages/sendMessage.graphql'; +import schema from '../../schemas/messages/sendMessage.graphqls'; const resolver = { Mutation: { - sendMessage: authenticated((root, { channelId, content }, { user }) => { - const messageReturn = processWebhookMessage({ - roomId: channelId, - text: content - }, user)[0]; + sendMessage: authenticated((root, { channelId, directTo, content }, { user }) => { + const options = { + text: content, + channel: channelId || directTo + }; + + const messageReturn = processWebhookMessage(options, user)[0]; if (!messageReturn) { throw new Error('Unknown error'); diff --git a/packages/rocketchat-graphql/server/resolvers/users/User-type.js b/packages/rocketchat-graphql/server/resolvers/users/User-type.js index 6eede62b43ef..f2c13fc58bf3 100644 --- a/packages/rocketchat-graphql/server/resolvers/users/User-type.js +++ b/packages/rocketchat-graphql/server/resolvers/users/User-type.js @@ -1,5 +1,7 @@ -import { property } from '../../helpers/property'; -import schema from '../../schemas/users/User-type.graphql'; +import { RocketChat } from 'meteor/rocketchat:lib'; +import property from 'lodash.property'; + +import schema from '../../schemas/users/User-type.graphqls'; const resolver = { User: { diff --git a/packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js b/packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js index 61c84d39a6e5..d1d526338c1a 100644 --- a/packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js +++ b/packages/rocketchat-graphql/server/resolvers/users/UserStatus-enum.js @@ -1,4 +1,4 @@ -import schema from '../../schemas/users/UserStatus-enum.graphql'; +import schema from '../../schemas/users/UserStatus-enum.graphqls'; export { schema diff --git a/packages/rocketchat-graphql/server/resolvers/users/setStatus.js b/packages/rocketchat-graphql/server/resolvers/users/setStatus.js index 6d6f4aca4902..ad6b4ebef6b6 100644 --- a/packages/rocketchat-graphql/server/resolvers/users/setStatus.js +++ b/packages/rocketchat-graphql/server/resolvers/users/setStatus.js @@ -1,5 +1,7 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + import { authenticated } from '../../helpers/authenticated'; -import schema from '../../schemas/users/setStatus.graphql'; +import schema from '../../schemas/users/setStatus.graphqls'; const resolver = { Mutation: { diff --git a/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphql b/packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphql rename to packages/rocketchat-graphql/server/schemas/accounts/LoginResult-type.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphql b/packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphql rename to packages/rocketchat-graphql/server/schemas/accounts/OauthProvider-type.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphql b/packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphql rename to packages/rocketchat-graphql/server/schemas/accounts/oauthProviders.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphql b/packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphql rename to packages/rocketchat-graphql/server/schemas/channels/Channel-type.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphql b/packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphql rename to packages/rocketchat-graphql/server/schemas/channels/ChannelFilter-input.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphql b/packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphql rename to packages/rocketchat-graphql/server/schemas/channels/ChannelNameAndDirect-input.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphql b/packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphql rename to packages/rocketchat-graphql/server/schemas/channels/ChannelSort-enum.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphql b/packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphql rename to packages/rocketchat-graphql/server/schemas/channels/Privacy-enum.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelByName.graphql b/packages/rocketchat-graphql/server/schemas/channels/channelByName.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/channelByName.graphql rename to packages/rocketchat-graphql/server/schemas/channels/channelByName.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/channels.graphql b/packages/rocketchat-graphql/server/schemas/channels/channels.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/channels.graphql rename to packages/rocketchat-graphql/server/schemas/channels/channels.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphql b/packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphql rename to packages/rocketchat-graphql/server/schemas/channels/channelsByUser.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/createChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/createChannel.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/createChannel.graphql rename to packages/rocketchat-graphql/server/schemas/channels/createChannel.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/directChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/directChannel.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/directChannel.graphql rename to packages/rocketchat-graphql/server/schemas/channels/directChannel.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphql rename to packages/rocketchat-graphql/server/schemas/channels/hideChannel.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphql b/packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphql rename to packages/rocketchat-graphql/server/schemas/channels/leaveChannel.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/Message-type.graphql b/packages/rocketchat-graphql/server/schemas/messages/Message-type.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/messages/Message-type.graphql rename to packages/rocketchat-graphql/server/schemas/messages/Message-type.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphql b/packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphql rename to packages/rocketchat-graphql/server/schemas/messages/MessageIdentifier-input.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphql b/packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphql rename to packages/rocketchat-graphql/server/schemas/messages/MessagesWithCursor-type.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphql b/packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphql rename to packages/rocketchat-graphql/server/schemas/messages/Reaction-type.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphql rename to packages/rocketchat-graphql/server/schemas/messages/addReactionToMessage.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql b/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql deleted file mode 100644 index f88b2979ca5a..000000000000 --- a/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphql +++ /dev/null @@ -1,3 +0,0 @@ -type Subscription { - chatMessageAdded(channelId: String!): Message -} diff --git a/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphqls b/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphqls new file mode 100644 index 000000000000..d05c00afc3bc --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/chatMessageAdded.graphqls @@ -0,0 +1,3 @@ +type Subscription { + chatMessageAdded(channelId: String, directTo: String): Message +} diff --git a/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphql rename to packages/rocketchat-graphql/server/schemas/messages/deleteMessage.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/editMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/editMessage.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/messages/editMessage.graphql rename to packages/rocketchat-graphql/server/schemas/messages/editMessage.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/messages/messages.graphql b/packages/rocketchat-graphql/server/schemas/messages/messages.graphqls similarity index 81% rename from packages/rocketchat-graphql/server/schemas/messages/messages.graphql rename to packages/rocketchat-graphql/server/schemas/messages/messages.graphqls index 2b9774942e76..a81fe2186ca7 100644 --- a/packages/rocketchat-graphql/server/schemas/messages/messages.graphql +++ b/packages/rocketchat-graphql/server/schemas/messages/messages.graphqls @@ -1,8 +1,8 @@ type Query { messages( channelId: String, - channelDetails: ChannelNameAndDirect, channelName: String, + directTo: String, cursor: String, count: Int, searchRegex: String, diff --git a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql deleted file mode 100644 index 6f160fef1c94..000000000000 --- a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphql +++ /dev/null @@ -1,3 +0,0 @@ -type Mutation { - sendMessage(channelId: String!, content: String!): Message -} diff --git a/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphqls b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphqls new file mode 100644 index 000000000000..78933ec6a763 --- /dev/null +++ b/packages/rocketchat-graphql/server/schemas/messages/sendMessage.graphqls @@ -0,0 +1,3 @@ +type Mutation { + sendMessage(channelId: String, directTo: String, content: String!): Message +} diff --git a/packages/rocketchat-graphql/server/schemas/users/User-type.graphql b/packages/rocketchat-graphql/server/schemas/users/User-type.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/users/User-type.graphql rename to packages/rocketchat-graphql/server/schemas/users/User-type.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphql b/packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphql rename to packages/rocketchat-graphql/server/schemas/users/UserStatus-enum.graphqls diff --git a/packages/rocketchat-graphql/server/schemas/users/setStatus.graphql b/packages/rocketchat-graphql/server/schemas/users/setStatus.graphqls similarity index 100% rename from packages/rocketchat-graphql/server/schemas/users/setStatus.graphql rename to packages/rocketchat-graphql/server/schemas/users/setStatus.graphqls From 388ba96aec4e4a86ee1436c709d9862c0afba736 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 6 Sep 2017 12:13:59 +0200 Subject: [PATCH 025/212] Add a ref to the issue with @accounts/graphql-api --- packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js index 8bd3dde10230..b94a295187f9 100644 --- a/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js +++ b/packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js @@ -3,6 +3,7 @@ // It might be like that because of async/await, // maybe Promise is not wrapped with Fiber // See: https://github.com/meteor/meteor/blob/a362e20a37547362b581fed52f7171d022e83b62/packages/promise/server.js +// Opened issue: https://github.com/js-accounts/graphql/issues/16 export const authenticated = (Accounts, func) => (async(root, args, context, info) => { const authToken = context.authToken; From 8dffc899a447a31e876bd5b5b2e2d112f4c43ee5 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 6 Sep 2017 12:15:23 +0200 Subject: [PATCH 026/212] Back to merge-graphql-schemas@1.1.3 Since they fixed https://github.com/okgrow/merge-graphql-schemas/pull/83 --- packages/rocketchat-graphql/package.js | 2 +- packages/rocketchat-graphql/server/resolvers/accounts/index.js | 2 +- packages/rocketchat-graphql/server/resolvers/channels/index.js | 2 +- packages/rocketchat-graphql/server/resolvers/messages/index.js | 2 +- packages/rocketchat-graphql/server/resolvers/users/index.js | 2 +- packages/rocketchat-graphql/server/schema.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/rocketchat-graphql/package.js b/packages/rocketchat-graphql/package.js index 8d6ff940e0c1..436d212f3e89 100644 --- a/packages/rocketchat-graphql/package.js +++ b/packages/rocketchat-graphql/package.js @@ -29,6 +29,6 @@ Npm.depends({ 'graphql-subscriptions': '0.4.4', 'graphql-tools': '1.2.2', 'lodash.property': '4.4.2', - 'kamilkisiela-merge-graphql-schemas': '1.1.2', + 'merge-graphql-schemas': '1.1.3', 'subscriptions-transport-ws': '0.8.2' }); diff --git a/packages/rocketchat-graphql/server/resolvers/accounts/index.js b/packages/rocketchat-graphql/server/resolvers/accounts/index.js index 02aceb574911..e82a7077059b 100644 --- a/packages/rocketchat-graphql/server/resolvers/accounts/index.js +++ b/packages/rocketchat-graphql/server/resolvers/accounts/index.js @@ -1,6 +1,6 @@ import { createJSAccountsGraphQL } from '@accounts/graphql-api'; import { AccountsServer } from 'meteor/rocketchat:accounts'; -import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; // queries import * as oauthProviders from './oauthProviders'; diff --git a/packages/rocketchat-graphql/server/resolvers/channels/index.js b/packages/rocketchat-graphql/server/resolvers/channels/index.js index 82a9dbff107d..063e9da41804 100644 --- a/packages/rocketchat-graphql/server/resolvers/channels/index.js +++ b/packages/rocketchat-graphql/server/resolvers/channels/index.js @@ -1,4 +1,4 @@ -import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; // queries import * as channels from './channels'; diff --git a/packages/rocketchat-graphql/server/resolvers/messages/index.js b/packages/rocketchat-graphql/server/resolvers/messages/index.js index ad5fc67076e6..fb9728b19815 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/index.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/index.js @@ -1,4 +1,4 @@ -import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; // queries import * as messages from './messages'; diff --git a/packages/rocketchat-graphql/server/resolvers/users/index.js b/packages/rocketchat-graphql/server/resolvers/users/index.js index 6de11371bf97..7647d5a5fdd6 100644 --- a/packages/rocketchat-graphql/server/resolvers/users/index.js +++ b/packages/rocketchat-graphql/server/resolvers/users/index.js @@ -1,4 +1,4 @@ -import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; // mutations import * as setStatus from './setStatus'; diff --git a/packages/rocketchat-graphql/server/schema.js b/packages/rocketchat-graphql/server/schema.js index 1cbf6c38eeac..e8d3cbdd489e 100644 --- a/packages/rocketchat-graphql/server/schema.js +++ b/packages/rocketchat-graphql/server/schema.js @@ -1,5 +1,5 @@ import { makeExecutableSchema } from 'graphql-tools'; -import { mergeTypes, mergeResolvers } from 'kamilkisiela-merge-graphql-schemas'; +import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas'; import * as channels from './resolvers/channels'; import * as messages from './resolvers/messages'; From 5619e785652193e0ce42f9db5dd3e0a7608cc178 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Fri, 8 Sep 2017 19:29:13 +0200 Subject: [PATCH 027/212] Add Authorization token to WebSocket connection --- .../.npm/package/npm-shrinkwrap.json | 20 +++++++++---------- packages/rocketchat-graphql/server/api.js | 7 +------ .../resolvers/messages/chatMessageAdded.js | 10 +++------- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json index 10d14533cd41..d496fa3ccc45 100644 --- a/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-graphql/.npm/package/npm-shrinkwrap.json @@ -291,11 +291,6 @@ "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", "from": "jwt-decode@>=2.1.0 <3.0.0" }, - "kamilkisiela-merge-graphql-schemas": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/kamilkisiela-merge-graphql-schemas/-/kamilkisiela-merge-graphql-schemas-1.1.2.tgz", - "from": "kamilkisiela-merge-graphql-schemas@1.1.2" - }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", @@ -336,6 +331,11 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "from": "merge-descriptors@1.0.1" }, + "merge-graphql-schemas": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/merge-graphql-schemas/-/merge-graphql-schemas-1.1.3.tgz", + "from": "merge-graphql-schemas@1.1.3" + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -347,13 +347,13 @@ "from": "mime@1.3.4" }, "mime-db": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", - "from": "mime-db@>=1.29.0 <1.30.0" + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "from": "mime-db@>=1.30.0 <1.31.0" }, "mime-types": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", "from": "mime-types@>=2.1.15 <2.2.0" }, "moment": { diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index 494429f52e97..ede3862d58c0 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -42,12 +42,7 @@ new SubscriptionServer({ schema: executableSchema, execute, subscribe, - onOperation: ({context}) => { - console.log('context', context); - return { - authToken: context.Authorization - }; - } + onConnect: (connectionParams) => ({ authToken: connectionParams.Authorization }) }, { path: '/subscriptions', diff --git a/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js b/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js index 08cb14bdb274..8a81c66a69b3 100644 --- a/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js +++ b/packages/rocketchat-graphql/server/resolvers/messages/chatMessageAdded.js @@ -29,18 +29,14 @@ function shouldPublish(message, { id, directTo }, username) { const resolver = { Subscription: { chatMessageAdded: { - subscribe: withFilter(() => pubsub.asyncIterator(CHAT_MESSAGE_SUBSCRIPTION_TOPIC), (payload, args, ctx) => { - // FIX: there's no authToken in context - // TODO: check if middleware applies to subscriptions, probably not. + subscribe: withFilter(() => pubsub.asyncIterator(CHAT_MESSAGE_SUBSCRIPTION_TOPIC), authenticated((payload, args, { user }) => { const channel = { id: args.channelId, directTo: args.directTo }; - console.log('context in sub', ctx); - - return shouldPublish(payload.chatMessageAdded, channel, ctx.user.username); - }) + return shouldPublish(payload.chatMessageAdded, channel, user.username); + })) } } }; From 04e2494d29e65d4f55c9ab38d03bfac015aa2392 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 12 Sep 2017 09:54:05 +0200 Subject: [PATCH 028/212] Fix an issue with Fiber (User.avatar) --- .../rocketchat-graphql/server/resolvers/users/User-type.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rocketchat-graphql/server/resolvers/users/User-type.js b/packages/rocketchat-graphql/server/resolvers/users/User-type.js index f2c13fc58bf3..67d0e451925f 100644 --- a/packages/rocketchat-graphql/server/resolvers/users/User-type.js +++ b/packages/rocketchat-graphql/server/resolvers/users/User-type.js @@ -8,7 +8,8 @@ const resolver = { id: property('_id'), status: ({status}) => status.toUpperCase(), avatar: async({ _id }) => { - const avatar = RocketChat.models.Avatars.findOne({ + // XXX js-accounts/graphql#16 + const avatar = await RocketChat.models.Avatars.model.rawCollection().findOne({ userId: _id }, { fields: { url: 1 }}); From 9dd51b363d68e239185f9e0b90143dc135fe0427 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 12 Sep 2017 16:11:20 +0200 Subject: [PATCH 029/212] Meteor 1.5.2 --- .meteor/versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meteor/versions b/.meteor/versions index c608ae9d789f..8d8ebbff6657 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -42,7 +42,7 @@ ecmascript-runtime-server@0.4.1 edgee:slingshot@0.7.1 ejson@1.0.14 email@1.2.3 -emojione:emojione@3.0.3 +emojione:emojione@2.2.6 facebook-oauth@1.3.2 fastclick@1.0.13 francocatena:status@1.5.3 From 161f9a1b0ab368d21aadd4b3034f9a25d722a5b5 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Sat, 16 Sep 2017 22:24:01 +0200 Subject: [PATCH 030/212] Use a separate server for graphql subscriptions and fix channels.create (#2) * Use a separate server for graphql subscriptions * Fix an issue with channel creation in REST API --- packages/rocketchat-api/server/v1/channels.js | 8 ++-- packages/rocketchat-graphql/server/api.js | 42 ++++++++++++------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/packages/rocketchat-api/server/v1/channels.js b/packages/rocketchat-api/server/v1/channels.js index 86abc6ab38e6..1075a0f2be34 100644 --- a/packages/rocketchat-api/server/v1/channels.js +++ b/packages/rocketchat-api/server/v1/channels.js @@ -133,15 +133,15 @@ function createChannelValidator(params) { throw new Error('unauthorized'); } - if (!params.name.value) { + if (!params.name || !params.name.value) { throw new Error(`Param "${ params.name.key }" is required`); } - if (params.members.value && !_.isArray(params.members.value)) { + if (params.members && params.members.value && !_.isArray(params.members.value)) { throw new Error(`Param "${ params.members.key }" must be an array if provided`); } - if (params.customFields.value && !(typeof params.customFields.value === 'object')) { + if (params.customFields && params.customFields.value && !(typeof params.customFields.value === 'object')) { throw new Error(`Param "${ params.customFields.key }" must be an object if provided`); } } @@ -176,7 +176,7 @@ RocketChat.API.v1.addRoute('channels.create', { authRequired: true }, { let error; try { - RocketChat.API.create.validate({ + RocketChat.API.channels.create.validate({ user: { value: userId }, diff --git a/packages/rocketchat-graphql/server/api.js b/packages/rocketchat-graphql/server/api.js index ede3862d58c0..1b2177a653d9 100644 --- a/packages/rocketchat-graphql/server/api.js +++ b/packages/rocketchat-graphql/server/api.js @@ -10,11 +10,12 @@ import cors from 'cors'; import { executableSchema } from './schema'; +const subscriptionPort = 3100; + // the Meteor GraphQL server is an Express server const graphQLServer = express(); graphQLServer.use(cors()); -graphQLServer.use(bodyParser.urlencoded({ extended: true })); graphQLServer.use( '/graphql', @@ -33,20 +34,31 @@ graphQLServer.use( }) ); -graphQLServer.use('/graphiql', graphiqlExpress({ - endpointURL: '/graphql', - subscriptionsEndpoint: 'ws://localhost:3000/subscriptions' -})); - -new SubscriptionServer({ - schema: executableSchema, - execute, - subscribe, - onConnect: (connectionParams) => ({ authToken: connectionParams.Authorization }) -}, -{ - path: '/subscriptions', - server: WebApp.httpServer +graphQLServer.use( + '/graphiql', + graphiqlExpress({ + endpointURL: '/graphql', + subscriptionsEndpoint: `ws://localhost:${ subscriptionPort }` + }) +); + +function startSubscriptionServer() { + SubscriptionServer.create({ + schema: executableSchema, + execute, + subscribe, + onConnect: (connectionParams) => ({ authToken: connectionParams.Authorization }) + }, + { + port: subscriptionPort, + host: process.env.BIND_IP || '0.0.0.0' + }); + + console.log('GraphQL Subscription server runs on port:', subscriptionPort); +} + +WebApp.onListening(() => { + startSubscriptionServer(); }); // this binds the specified paths to the Express server running Apollo + GraphiQL From 576ae0565769077782b5963bca761ccce4e85d47 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Wed, 27 Sep 2017 14:15:36 -0500 Subject: [PATCH 031/212] Add Circle CI build for contextual bar redesign --- .circleci/Dockerfile | 20 ++++++++++++ .circleci/config.yml | 77 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 .circleci/Dockerfile create mode 100644 .circleci/config.yml diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile new file mode 100644 index 000000000000..2d2fd2c845e5 --- /dev/null +++ b/.circleci/Dockerfile @@ -0,0 +1,20 @@ +FROM node:4 + +ADD . /app + +ENV RC_VERSION=0.57.0-designpreview \ + DEPLOY_METHOD=docker \ + NODE_ENV=production \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 + +RUN set -x \ + && cd /app/bundle/programs/server \ + && npm install \ + && npm cache clear + +WORKDIR /app/bundle + +EXPOSE 3000 + +CMD ["node", "main.js"] diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000000..108353fd513a --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,77 @@ +# Javascript Node CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2 +jobs: + build: + docker: + # specify the version you desire here + - image: circleci/node:7.10 + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/mongo:3.4.4 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: Install Meteor + command: if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi + filters: + branches: + only: contextual-bar-redesign + + # Download and cache dependencies + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} + filters: + branches: + only: contextual-bar-redesign + + - run: + name: Build Rocket.Chat + command: | + meteor npm install + set +e + meteor add rocketchat:lib + set -e + meteor build --server-only --directory /tmp/build + filters: + branches: + only: contextual-bar-redesign + + - save_cache: + key: dependency-cache-{{ checksum "package.json" }} + paths: + - ./node_modules + - ./.meteor + - $HOME/.meteor + filters: + branches: + only: contextual-bar-redesign + + - setup_remote_docker + + - run: + name: Build Docker image + command: | + docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD + cp .circleci/Dockerfile /tmp/build + cd /tmp/build + docker build -t rocketchat/rocket.chat:contextual-bar-redesign . + docker push rocketchat/rocket.chat:contextual-bar-redesign + filters: + branches: + only: contextual-bar-redesign + - run: + name: Notify on demo + command: | + curl -X POST -H 'Content-Type: application/json' --data "{\"text\":\"@here Nova [build](${CIRCLE_BUILD_URL}) pronta :marioparty:\"}" $WEBHOOK_URL + filters: + branches: + only: contextual-bar-redesign From be8747e7fecdfc7d5ba159709e2ea45337b52ed9 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Wed, 27 Sep 2017 16:36:34 -0500 Subject: [PATCH 032/212] remove circleci and add droneci --- .circleci/config.yml | 77 ------------------- .../Dockerfile => .docker/Dockerfile.local | 0 .drone.yml | 17 ++++ 3 files changed, 17 insertions(+), 77 deletions(-) delete mode 100644 .circleci/config.yml rename .circleci/Dockerfile => .docker/Dockerfile.local (100%) create mode 100644 .drone.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 108353fd513a..000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# -version: 2 -jobs: - build: - docker: - # specify the version you desire here - - image: circleci/node:7.10 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/mongo:3.4.4 - - working_directory: ~/repo - - steps: - - checkout - - - run: - name: Install Meteor - command: if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi - filters: - branches: - only: contextual-bar-redesign - - # Download and cache dependencies - - restore_cache: - key: dependency-cache-{{ checksum "package.json" }} - filters: - branches: - only: contextual-bar-redesign - - - run: - name: Build Rocket.Chat - command: | - meteor npm install - set +e - meteor add rocketchat:lib - set -e - meteor build --server-only --directory /tmp/build - filters: - branches: - only: contextual-bar-redesign - - - save_cache: - key: dependency-cache-{{ checksum "package.json" }} - paths: - - ./node_modules - - ./.meteor - - $HOME/.meteor - filters: - branches: - only: contextual-bar-redesign - - - setup_remote_docker - - - run: - name: Build Docker image - command: | - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD - cp .circleci/Dockerfile /tmp/build - cd /tmp/build - docker build -t rocketchat/rocket.chat:contextual-bar-redesign . - docker push rocketchat/rocket.chat:contextual-bar-redesign - filters: - branches: - only: contextual-bar-redesign - - run: - name: Notify on demo - command: | - curl -X POST -H 'Content-Type: application/json' --data "{\"text\":\"@here Nova [build](${CIRCLE_BUILD_URL}) pronta :marioparty:\"}" $WEBHOOK_URL - filters: - branches: - only: contextual-bar-redesign diff --git a/.circleci/Dockerfile b/.docker/Dockerfile.local similarity index 100% rename from .circleci/Dockerfile rename to .docker/Dockerfile.local diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 000000000000..49dda54f02c1 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,17 @@ +pipeline: + build: + image: ubuntu:16.04 + commands: + - apt update && apt install curl git bzip2 -y + - if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi + - meteor npm install + - set +e + - meteor add rocketchat:lib + - set -e + - meteor build --allow-superuser --server-only --directory /drone/build + docker: + image: plugins/docker + repo: rocketchat/rocket.chat + dockerfile: .docker/Dockerfile.local + storage_driver: overlay + context: /drone/build From be84dde00844d81c91a19390645aa6772e82874b Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Wed, 27 Sep 2017 21:23:57 -0500 Subject: [PATCH 033/212] fix drone build --- .drone.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 49dda54f02c1..47b406db72db 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,10 +8,13 @@ pipeline: - set +e - meteor add rocketchat:lib - set -e + - mkdir /drone/build - meteor build --allow-superuser --server-only --directory /drone/build + - cp .docker/Dockerfile.local /drone/build/Dockerfile + - ls -lah /drone/build docker: image: plugins/docker repo: rocketchat/rocket.chat - dockerfile: .docker/Dockerfile.local + #dockerfile: .docker/Dockerfile.local storage_driver: overlay context: /drone/build From 13cbf121cff1b76df0b69a8ee0163c4925133b2a Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 28 Sep 2017 10:50:36 -0300 Subject: [PATCH 034/212] Fix drone build --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index 47b406db72db..0b4b8efafc8c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,8 @@ pipeline: build: image: ubuntu:16.04 + environment: + - METEOR_ALLOW_SUPERUSER=true commands: - apt update && apt install curl git bzip2 -y - if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi @@ -18,3 +20,4 @@ pipeline: #dockerfile: .docker/Dockerfile.local storage_driver: overlay context: /drone/build + secrets: [ docker_username, docker_password ] From f775e20bd9c31faf338d541d6cdfd8910919cc5f Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 28 Sep 2017 11:54:01 -0300 Subject: [PATCH 035/212] Fix Drone docker build --- .drone.yml | 2 +- .drone.yml.sig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .drone.yml.sig diff --git a/.drone.yml b/.drone.yml index 0b4b8efafc8c..84eb67fcbd30 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,7 +17,7 @@ pipeline: docker: image: plugins/docker repo: rocketchat/rocket.chat - #dockerfile: .docker/Dockerfile.local + dockerfile: /drone/build/Dockerfile storage_driver: overlay context: /drone/build secrets: [ docker_username, docker_password ] diff --git a/.drone.yml.sig b/.drone.yml.sig new file mode 100644 index 000000000000..60ca007c23f7 --- /dev/null +++ b/.drone.yml.sig @@ -0,0 +1 @@ +eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgYnVpbGQ6CiAgICBpbWFnZTogdWJ1bnR1OjE2LjA0CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBNRVRFT1JfQUxMT1dfU1VQRVJVU0VSPXRydWUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBpZiBbICEgLWUgIiRIT01FLy5tZXRlb3IvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgICAtIGxzIC1sYWggL2Ryb25lL2J1aWxkCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCg.otjnxUe-M8f8M6IIgbcMdzCJOOp-LKUHImcD2Z4-NVI \ No newline at end of file From cab62b55590254c99cc937ac5472339bdfc61a9c Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 28 Sep 2017 12:30:31 -0300 Subject: [PATCH 036/212] Add Docker tag --- .drone.yml | 1 + .drone.yml.sig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 84eb67fcbd30..09e0f9ee632b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,3 +21,4 @@ pipeline: storage_driver: overlay context: /drone/build secrets: [ docker_username, docker_password ] + tag: designpreview diff --git a/.drone.yml.sig b/.drone.yml.sig index 60ca007c23f7..ae0f94aa2e89 100644 --- a/.drone.yml.sig +++ b/.drone.yml.sig @@ -1 +1 @@ -eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgYnVpbGQ6CiAgICBpbWFnZTogdWJ1bnR1OjE2LjA0CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBNRVRFT1JfQUxMT1dfU1VQRVJVU0VSPXRydWUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBpZiBbICEgLWUgIiRIT01FLy5tZXRlb3IvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgICAtIGxzIC1sYWggL2Ryb25lL2J1aWxkCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCg.otjnxUe-M8f8M6IIgbcMdzCJOOp-LKUHImcD2Z4-NVI \ No newline at end of file +eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgYnVpbGQ6CiAgICBpbWFnZTogdWJ1bnR1OjE2LjA0CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBNRVRFT1JfQUxMT1dfU1VQRVJVU0VSPXRydWUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBpZiBbICEgLWUgIiRIT01FLy5tZXRlb3IvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgICAtIGxzIC1sYWggL2Ryb25lL2J1aWxkCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCiAgICB0YWc6IGRlc2lnbnByZXZpZXcK.giKVh9AARDC8H58kmMLaD7LCHOjItAFgtMGWZlKYtOE \ No newline at end of file From db551c6e6f378d4e072c1763b58203b66afee223 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 28 Sep 2017 13:50:29 -0500 Subject: [PATCH 037/212] try cache for drone --- .drone.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 09e0f9ee632b..f920d3b24269 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,11 +1,19 @@ pipeline: + restore-cache: + image: drillster/drone-volume-cache + restore: true + mount: + - /drone/meteor_install/ + volumes: + - /tmp/cache/Rocket.Chat:/cache build: image: ubuntu:16.04 environment: - METEOR_ALLOW_SUPERUSER=true + - HOME=/drone commands: - apt update && apt install curl git bzip2 -y - - if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi + - if [ ! -e "/drone/meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else mv /drone/meteor_install $HOME/.meteor; cp $HOME/.meteor/meteor /usr/local/bin/ fi - meteor npm install - set +e - meteor add rocketchat:lib @@ -13,7 +21,14 @@ pipeline: - mkdir /drone/build - meteor build --allow-superuser --server-only --directory /drone/build - cp .docker/Dockerfile.local /drone/build/Dockerfile - - ls -lah /drone/build + - mv $HOME/.meteor /drone/meteor_install + rebuild-cache: + image: drillster/drone-volume-cache + rebuild: true + mount: + - /drone/meteor_install/ + volumes: + - /tmp/cache/Rocket.Chat:/cache docker: image: plugins/docker repo: rocketchat/rocket.chat From 6e8a3b841e5336abe9a2e822d09e509549ad22f5 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 28 Sep 2017 14:08:46 -0500 Subject: [PATCH 038/212] add additional cache locations --- .drone.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f920d3b24269..d196abf229d1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,6 +4,8 @@ pipeline: restore: true mount: - /drone/meteor_install/ + - ./node_modules + - ./.meteor/local volumes: - /tmp/cache/Rocket.Chat:/cache build: @@ -13,7 +15,7 @@ pipeline: - HOME=/drone commands: - apt update && apt install curl git bzip2 -y - - if [ ! -e "/drone/meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else mv /drone/meteor_install $HOME/.meteor; cp $HOME/.meteor/meteor /usr/local/bin/ fi + - if [ ! -e "/drone/meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else mv /drone/meteor_install $HOME/.meteor; cp $HOME/.meteor/meteor /usr/local/bin/; fi - meteor npm install - set +e - meteor add rocketchat:lib @@ -27,6 +29,8 @@ pipeline: rebuild: true mount: - /drone/meteor_install/ + - ./node_modules + - ./.meteor/local volumes: - /tmp/cache/Rocket.Chat:/cache docker: From 5762d56f98bda39ade400736d49b0dfa95fd38b3 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 28 Sep 2017 14:27:38 -0500 Subject: [PATCH 039/212] fix proper path for meteor launcher --- .drone.yml | 2 +- .drone.yml.sig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index d196abf229d1..9a70fea4a9e8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,7 +15,7 @@ pipeline: - HOME=/drone commands: - apt update && apt install curl git bzip2 -y - - if [ ! -e "/drone/meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else mv /drone/meteor_install $HOME/.meteor; cp $HOME/.meteor/meteor /usr/local/bin/; fi + - if [ ! -e "/drone/meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else mv /drone/meteor_install $HOME/.meteor; cp $HOME/.meteor/$(dirname $(readlink "$HOME/.meteor/meteor"))/scripts/admin/launch-meteor /usr/local/bin/; fi - meteor npm install - set +e - meteor add rocketchat:lib diff --git a/.drone.yml.sig b/.drone.yml.sig index ae0f94aa2e89..961dcdef9f8e 100644 --- a/.drone.yml.sig +++ b/.drone.yml.sig @@ -1 +1 @@ -eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgYnVpbGQ6CiAgICBpbWFnZTogdWJ1bnR1OjE2LjA0CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBNRVRFT1JfQUxMT1dfU1VQRVJVU0VSPXRydWUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBpZiBbICEgLWUgIiRIT01FLy5tZXRlb3IvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgICAtIGxzIC1sYWggL2Ryb25lL2J1aWxkCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCiAgICB0YWc6IGRlc2lnbnByZXZpZXcK.giKVh9AARDC8H58kmMLaD7LCHOjItAFgtMGWZlKYtOE \ No newline at end of file +eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvbWV0ZW9yX2luc3RhbGwvCiAgICAgIC0gLi9ub2RlX21vZHVsZXMKICAgICAgLSAuLy5tZXRlb3IvbG9jYWwKICAgIHZvbHVtZXM6CiAgICAgIC0gL3RtcC9jYWNoZS9Sb2NrZXQuQ2hhdDovY2FjaGUKICBidWlsZDoKICAgIGltYWdlOiB1YnVudHU6MTYuMDQKICAgIGVudmlyb25tZW50OgogICAgICAtIE1FVEVPUl9BTExPV19TVVBFUlVTRVI9dHJ1ZQogICAgICAtIEhPTUU9L2Ryb25lCiAgICBjb21tYW5kczoKICAgICAgLSBhcHQgdXBkYXRlICYmIGFwdCBpbnN0YWxsIGN1cmwgZ2l0IGJ6aXAyIC15CiAgICAgIC0gaWYgWyAhIC1lICIvZHJvbmUvbWV0ZW9yX2luc3RhbGwvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGVsc2UgbXYgL2Ryb25lL21ldGVvcl9pbnN0YWxsICRIT01FLy5tZXRlb3I7IGNwICRIT01FLy5tZXRlb3IvJChkaXJuYW1lICQocmVhZGxpbmsgIiRIT01FLy5tZXRlb3IvbWV0ZW9yIikpL3NjcmlwdHMvYWRtaW4vbGF1bmNoLW1ldGVvciAvdXNyL2xvY2FsL2Jpbi87IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgICAtIG12ICRIT01FLy5tZXRlb3IgL2Ryb25lL21ldGVvcl9pbnN0YWxsCiAgcmVidWlsZC1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZWJ1aWxkOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvbWV0ZW9yX2luc3RhbGwvCiAgICAgIC0gLi9ub2RlX21vZHVsZXMKICAgICAgLSAuLy5tZXRlb3IvbG9jYWwKICAgIHZvbHVtZXM6CiAgICAgIC0gL3RtcC9jYWNoZS9Sb2NrZXQuQ2hhdDovY2FjaGUKICBkb2NrZXI6CiAgICBpbWFnZTogcGx1Z2lucy9kb2NrZXIKICAgIHJlcG86IHJvY2tldGNoYXQvcm9ja2V0LmNoYXQKICAgIGRvY2tlcmZpbGU6IC9kcm9uZS9idWlsZC9Eb2NrZXJmaWxlCiAgICBzdG9yYWdlX2RyaXZlcjogb3ZlcmxheQogICAgY29udGV4dDogL2Ryb25lL2J1aWxkCiAgICBzZWNyZXRzOiBbIGRvY2tlcl91c2VybmFtZSwgZG9ja2VyX3Bhc3N3b3JkIF0KICAgIHRhZzogZGVzaWducHJldmlldwo.jXIixhmu9ReQHZtWXzl9WsSqGLSBMhPhC4pkyC7IypM \ No newline at end of file From 302ec9e7ce69ca5ad48336f4285d9258e11c62ee Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 28 Sep 2017 15:17:25 -0500 Subject: [PATCH 040/212] clean up meteor install and cache step --- .drone.yml | 9 ++++++--- .drone.yml.sig | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9a70fea4a9e8..2647629355f8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,7 +3,8 @@ pipeline: image: drillster/drone-volume-cache restore: true mount: - - /drone/meteor_install/ + - /.meteor_install/ + - . - ./node_modules - ./.meteor/local volumes: @@ -15,7 +16,10 @@ pipeline: - HOME=/drone commands: - apt update && apt install curl git bzip2 -y - - if [ ! -e "/drone/meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else mv /drone/meteor_install $HOME/.meteor; cp $HOME/.meteor/$(dirname $(readlink "$HOME/.meteor/meteor"))/scripts/admin/launch-meteor /usr/local/bin/; fi + - mkdir -p $PWD/.meteor_install $HOME/.meteor + - ln -s $PWD/.meteor_install $HOME/.meteor + - export PATH="$HOME/.meteor:$PATH" + - if [ ! -e "$PWD/.meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi - meteor npm install - set +e - meteor add rocketchat:lib @@ -23,7 +27,6 @@ pipeline: - mkdir /drone/build - meteor build --allow-superuser --server-only --directory /drone/build - cp .docker/Dockerfile.local /drone/build/Dockerfile - - mv $HOME/.meteor /drone/meteor_install rebuild-cache: image: drillster/drone-volume-cache rebuild: true diff --git a/.drone.yml.sig b/.drone.yml.sig index 961dcdef9f8e..2f4072ec64ed 100644 --- a/.drone.yml.sig +++ b/.drone.yml.sig @@ -1 +1 @@ -eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvbWV0ZW9yX2luc3RhbGwvCiAgICAgIC0gLi9ub2RlX21vZHVsZXMKICAgICAgLSAuLy5tZXRlb3IvbG9jYWwKICAgIHZvbHVtZXM6CiAgICAgIC0gL3RtcC9jYWNoZS9Sb2NrZXQuQ2hhdDovY2FjaGUKICBidWlsZDoKICAgIGltYWdlOiB1YnVudHU6MTYuMDQKICAgIGVudmlyb25tZW50OgogICAgICAtIE1FVEVPUl9BTExPV19TVVBFUlVTRVI9dHJ1ZQogICAgICAtIEhPTUU9L2Ryb25lCiAgICBjb21tYW5kczoKICAgICAgLSBhcHQgdXBkYXRlICYmIGFwdCBpbnN0YWxsIGN1cmwgZ2l0IGJ6aXAyIC15CiAgICAgIC0gaWYgWyAhIC1lICIvZHJvbmUvbWV0ZW9yX2luc3RhbGwvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGVsc2UgbXYgL2Ryb25lL21ldGVvcl9pbnN0YWxsICRIT01FLy5tZXRlb3I7IGNwICRIT01FLy5tZXRlb3IvJChkaXJuYW1lICQocmVhZGxpbmsgIiRIT01FLy5tZXRlb3IvbWV0ZW9yIikpL3NjcmlwdHMvYWRtaW4vbGF1bmNoLW1ldGVvciAvdXNyL2xvY2FsL2Jpbi87IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgICAtIG12ICRIT01FLy5tZXRlb3IgL2Ryb25lL21ldGVvcl9pbnN0YWxsCiAgcmVidWlsZC1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZWJ1aWxkOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvbWV0ZW9yX2luc3RhbGwvCiAgICAgIC0gLi9ub2RlX21vZHVsZXMKICAgICAgLSAuLy5tZXRlb3IvbG9jYWwKICAgIHZvbHVtZXM6CiAgICAgIC0gL3RtcC9jYWNoZS9Sb2NrZXQuQ2hhdDovY2FjaGUKICBkb2NrZXI6CiAgICBpbWFnZTogcGx1Z2lucy9kb2NrZXIKICAgIHJlcG86IHJvY2tldGNoYXQvcm9ja2V0LmNoYXQKICAgIGRvY2tlcmZpbGU6IC9kcm9uZS9idWlsZC9Eb2NrZXJmaWxlCiAgICBzdG9yYWdlX2RyaXZlcjogb3ZlcmxheQogICAgY29udGV4dDogL2Ryb25lL2J1aWxkCiAgICBzZWNyZXRzOiBbIGRvY2tlcl91c2VybmFtZSwgZG9ja2VyX3Bhc3N3b3JkIF0KICAgIHRhZzogZGVzaWducHJldmlldwo.jXIixhmu9ReQHZtWXzl9WsSqGLSBMhPhC4pkyC7IypM \ No newline at end of file +eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvLm1ldGVvcl9pbnN0YWxsLwogICAgICAtIC4KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICAgIC0gSE9NRT0vZHJvbmUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBta2RpciAtcCAkUFdELy5tZXRlb3JfaW5zdGFsbCAkSE9NRS8ubWV0ZW9yCiAgICAgIC0gbG4gLXMgJFBXRC8ubWV0ZW9yX2luc3RhbGwgJEhPTUUvLm1ldGVvcgogICAgICAtIGV4cG9ydCBQQVRIPSIkSE9NRS8ubWV0ZW9yOiRQQVRIIgogICAgICAtIGlmIFsgISAtZSAiJFBXRC8ubWV0ZW9yX2luc3RhbGwvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogIHJlYnVpbGQtY2FjaGU6CiAgICBpbWFnZTogZHJpbGxzdGVyL2Ryb25lLXZvbHVtZS1jYWNoZQogICAgcmVidWlsZDogdHJ1ZQogICAgbW91bnQ6CiAgICAgIC0gL2Ryb25lL21ldGVvcl9pbnN0YWxsLwogICAgICAtIC4vbm9kZV9tb2R1bGVzCiAgICAgIC0gLi8ubWV0ZW9yL2xvY2FsCiAgICB2b2x1bWVzOgogICAgICAtIC90bXAvY2FjaGUvUm9ja2V0LkNoYXQ6L2NhY2hlCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCiAgICB0YWc6IGRlc2lnbnByZXZpZXcK.5lshC7-gH-3fgElu-6NTmdnxv9XWA6qnHEquhYKz458 \ No newline at end of file From 6859e73d81b9aef1d555245cec12dbd706768ecd Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 28 Sep 2017 15:20:09 -0500 Subject: [PATCH 041/212] I guess lets just go with the good ol: CI BUMP --- .drone.yml | 5 ++--- .drone.yml.sig | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2647629355f8..ded56ab8d3d8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,8 +3,7 @@ pipeline: image: drillster/drone-volume-cache restore: true mount: - - /.meteor_install/ - - . + - ./.meteor_install/ - ./node_modules - ./.meteor/local volumes: @@ -31,7 +30,7 @@ pipeline: image: drillster/drone-volume-cache rebuild: true mount: - - /drone/meteor_install/ + - ./.meteor_install/ - ./node_modules - ./.meteor/local volumes: diff --git a/.drone.yml.sig b/.drone.yml.sig index 2f4072ec64ed..9f4995974793 100644 --- a/.drone.yml.sig +++ b/.drone.yml.sig @@ -1 +1 @@ -eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvLm1ldGVvcl9pbnN0YWxsLwogICAgICAtIC4KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICAgIC0gSE9NRT0vZHJvbmUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBta2RpciAtcCAkUFdELy5tZXRlb3JfaW5zdGFsbCAkSE9NRS8ubWV0ZW9yCiAgICAgIC0gbG4gLXMgJFBXRC8ubWV0ZW9yX2luc3RhbGwgJEhPTUUvLm1ldGVvcgogICAgICAtIGV4cG9ydCBQQVRIPSIkSE9NRS8ubWV0ZW9yOiRQQVRIIgogICAgICAtIGlmIFsgISAtZSAiJFBXRC8ubWV0ZW9yX2luc3RhbGwvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogIHJlYnVpbGQtY2FjaGU6CiAgICBpbWFnZTogZHJpbGxzdGVyL2Ryb25lLXZvbHVtZS1jYWNoZQogICAgcmVidWlsZDogdHJ1ZQogICAgbW91bnQ6CiAgICAgIC0gL2Ryb25lL21ldGVvcl9pbnN0YWxsLwogICAgICAtIC4vbm9kZV9tb2R1bGVzCiAgICAgIC0gLi8ubWV0ZW9yL2xvY2FsCiAgICB2b2x1bWVzOgogICAgICAtIC90bXAvY2FjaGUvUm9ja2V0LkNoYXQ6L2NhY2hlCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCiAgICB0YWc6IGRlc2lnbnByZXZpZXcK.5lshC7-gH-3fgElu-6NTmdnxv9XWA6qnHEquhYKz458 \ No newline at end of file +eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAuLy5tZXRlb3JfaW5zdGFsbC8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICAgIC0gSE9NRT0vZHJvbmUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBta2RpciAtcCAkUFdELy5tZXRlb3JfaW5zdGFsbCAkSE9NRS8ubWV0ZW9yCiAgICAgIC0gbG4gLXMgJFBXRC8ubWV0ZW9yX2luc3RhbGwgJEhPTUUvLm1ldGVvcgogICAgICAtIGV4cG9ydCBQQVRIPSIkSE9NRS8ubWV0ZW9yOiRQQVRIIgogICAgICAtIGlmIFsgISAtZSAiJFBXRC8ubWV0ZW9yX2luc3RhbGwvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogIHJlYnVpbGQtY2FjaGU6CiAgICBpbWFnZTogZHJpbGxzdGVyL2Ryb25lLXZvbHVtZS1jYWNoZQogICAgcmVidWlsZDogdHJ1ZQogICAgbW91bnQ6CiAgICAgIC0gLi8ubWV0ZW9yX2luc3RhbGwvCiAgICAgIC0gLi9ub2RlX21vZHVsZXMKICAgICAgLSAuLy5tZXRlb3IvbG9jYWwKICAgIHZvbHVtZXM6CiAgICAgIC0gL3RtcC9jYWNoZS9Sb2NrZXQuQ2hhdDovY2FjaGUKICBkb2NrZXI6CiAgICBpbWFnZTogcGx1Z2lucy9kb2NrZXIKICAgIHJlcG86IHJvY2tldGNoYXQvcm9ja2V0LmNoYXQKICAgIGRvY2tlcmZpbGU6IC9kcm9uZS9idWlsZC9Eb2NrZXJmaWxlCiAgICBzdG9yYWdlX2RyaXZlcjogb3ZlcmxheQogICAgY29udGV4dDogL2Ryb25lL2J1aWxkCiAgICBzZWNyZXRzOiBbIGRvY2tlcl91c2VybmFtZSwgZG9ja2VyX3Bhc3N3b3JkIF0KICAgIHRhZzogZGVzaWducHJldmlldwo.xOvmkuXZHBQY9gq4Zn0zdNs24_e6VZGm7CUSfyLXpAI \ No newline at end of file From afe6750302d46426db4810a37a673ca2249b4b2a Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 28 Sep 2017 16:00:47 -0500 Subject: [PATCH 042/212] drone fixed I think.. --- .drone.yml | 5 +---- .drone.yml.sig | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index ded56ab8d3d8..2601a6758483 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,10 +15,7 @@ pipeline: - HOME=/drone commands: - apt update && apt install curl git bzip2 -y - - mkdir -p $PWD/.meteor_install $HOME/.meteor - - ln -s $PWD/.meteor_install $HOME/.meteor - - export PATH="$HOME/.meteor:$PATH" - - if [ ! -e "$PWD/.meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi + - if [ ! -e "$PWD/.meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else ln -s $PWD/.meteor_install/ $HOME/.meteor; export PATH="$PWD/.meteor_install:$PATH"; fi - meteor npm install - set +e - meteor add rocketchat:lib diff --git a/.drone.yml.sig b/.drone.yml.sig index 9f4995974793..13af4a165f97 100644 --- a/.drone.yml.sig +++ b/.drone.yml.sig @@ -1 +1 @@ -eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAuLy5tZXRlb3JfaW5zdGFsbC8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICAgIC0gSE9NRT0vZHJvbmUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBta2RpciAtcCAkUFdELy5tZXRlb3JfaW5zdGFsbCAkSE9NRS8ubWV0ZW9yCiAgICAgIC0gbG4gLXMgJFBXRC8ubWV0ZW9yX2luc3RhbGwgJEhPTUUvLm1ldGVvcgogICAgICAtIGV4cG9ydCBQQVRIPSIkSE9NRS8ubWV0ZW9yOiRQQVRIIgogICAgICAtIGlmIFsgISAtZSAiJFBXRC8ubWV0ZW9yX2luc3RhbGwvbWV0ZW9yIiBdOyB0aGVuIGN1cmwgaHR0cHM6Ly9pbnN0YWxsLm1ldGVvci5jb20gfCBzZWQgcy8tLXByb2dyZXNzLWJhci8tc0wvZyB8IC9iaW4vc2g7IGZpCiAgICAgIC0gbWV0ZW9yIG5wbSBpbnN0YWxsCiAgICAgIC0gc2V0ICtlCiAgICAgIC0gbWV0ZW9yIGFkZCByb2NrZXRjaGF0OmxpYgogICAgICAtIHNldCAtZQogICAgICAtIG1rZGlyIC9kcm9uZS9idWlsZAogICAgICAtIG1ldGVvciBidWlsZCAtLWFsbG93LXN1cGVydXNlciAtLXNlcnZlci1vbmx5IC0tZGlyZWN0b3J5IC9kcm9uZS9idWlsZAogICAgICAtIGNwIC5kb2NrZXIvRG9ja2VyZmlsZS5sb2NhbCAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogIHJlYnVpbGQtY2FjaGU6CiAgICBpbWFnZTogZHJpbGxzdGVyL2Ryb25lLXZvbHVtZS1jYWNoZQogICAgcmVidWlsZDogdHJ1ZQogICAgbW91bnQ6CiAgICAgIC0gLi8ubWV0ZW9yX2luc3RhbGwvCiAgICAgIC0gLi9ub2RlX21vZHVsZXMKICAgICAgLSAuLy5tZXRlb3IvbG9jYWwKICAgIHZvbHVtZXM6CiAgICAgIC0gL3RtcC9jYWNoZS9Sb2NrZXQuQ2hhdDovY2FjaGUKICBkb2NrZXI6CiAgICBpbWFnZTogcGx1Z2lucy9kb2NrZXIKICAgIHJlcG86IHJvY2tldGNoYXQvcm9ja2V0LmNoYXQKICAgIGRvY2tlcmZpbGU6IC9kcm9uZS9idWlsZC9Eb2NrZXJmaWxlCiAgICBzdG9yYWdlX2RyaXZlcjogb3ZlcmxheQogICAgY29udGV4dDogL2Ryb25lL2J1aWxkCiAgICBzZWNyZXRzOiBbIGRvY2tlcl91c2VybmFtZSwgZG9ja2VyX3Bhc3N3b3JkIF0KICAgIHRhZzogZGVzaWducHJldmlldwo.xOvmkuXZHBQY9gq4Zn0zdNs24_e6VZGm7CUSfyLXpAI \ No newline at end of file +eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAuLy5tZXRlb3JfaW5zdGFsbC8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICAgIC0gSE9NRT0vZHJvbmUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBpZiBbICEgLWUgIiRQV0QvLm1ldGVvcl9pbnN0YWxsL21ldGVvciIgXTsgdGhlbiBjdXJsIGh0dHBzOi8vaW5zdGFsbC5tZXRlb3IuY29tIHwgc2VkIHMvLS1wcm9ncmVzcy1iYXIvLXNML2cgfCAvYmluL3NoOyBlbHNlIGxuIC1zICRQV0QvLm1ldGVvcl9pbnN0YWxsLyAkSE9NRS8ubWV0ZW9yOyBleHBvcnQgUEFUSD0iJFBXRC8ubWV0ZW9yX2luc3RhbGw6JFBBVEgiOyBmaQogICAgICAtIG1ldGVvciBucG0gaW5zdGFsbAogICAgICAtIHNldCArZQogICAgICAtIG1ldGVvciBhZGQgcm9ja2V0Y2hhdDpsaWIKICAgICAgLSBzZXQgLWUKICAgICAgLSBta2RpciAvZHJvbmUvYnVpbGQKICAgICAgLSBtZXRlb3IgYnVpbGQgLS1hbGxvdy1zdXBlcnVzZXIgLS1zZXJ2ZXItb25seSAtLWRpcmVjdG9yeSAvZHJvbmUvYnVpbGQKICAgICAgLSBjcCAuZG9ja2VyL0RvY2tlcmZpbGUubG9jYWwgL2Ryb25lL2J1aWxkL0RvY2tlcmZpbGUKICByZWJ1aWxkLWNhY2hlOgogICAgaW1hZ2U6IGRyaWxsc3Rlci9kcm9uZS12b2x1bWUtY2FjaGUKICAgIHJlYnVpbGQ6IHRydWUKICAgIG1vdW50OgogICAgICAtIC4vLm1ldGVvcl9pbnN0YWxsLwogICAgICAtIC4vbm9kZV9tb2R1bGVzCiAgICAgIC0gLi8ubWV0ZW9yL2xvY2FsCiAgICB2b2x1bWVzOgogICAgICAtIC90bXAvY2FjaGUvUm9ja2V0LkNoYXQ6L2NhY2hlCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCiAgICB0YWc6IGRlc2lnbnByZXZpZXcK.Tm-oVUO_o2XbrrVj4comy0_Ws0MWO3JIzzFA7Q9Rj94 \ No newline at end of file From 6ab5d913985abac1e854fb05618f35414f84f50f Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 28 Sep 2017 16:44:10 -0500 Subject: [PATCH 043/212] another attempt to clean up by setting home folder on drone --- .drone.yml | 10 ++++++---- .drone.yml.sig | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2601a6758483..64c7a6e1f06a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,7 +3,7 @@ pipeline: image: drillster/drone-volume-cache restore: true mount: - - ./.meteor_install/ + - /drone/.meteor/ - ./node_modules - ./.meteor/local volumes: @@ -12,10 +12,12 @@ pipeline: image: ubuntu:16.04 environment: - METEOR_ALLOW_SUPERUSER=true - - HOME=/drone commands: - apt update && apt install curl git bzip2 -y - - if [ ! -e "$PWD/.meteor_install/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; else ln -s $PWD/.meteor_install/ $HOME/.meteor; export PATH="$PWD/.meteor_install:$PATH"; fi + - export HOME=/drone + - export PATH="/drone/.meteor:$PATH" + - if [ ! -e "/drone/.meteor/meteor" ]; then export HOME=/drone; curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi + - which meteor - meteor npm install - set +e - meteor add rocketchat:lib @@ -27,7 +29,7 @@ pipeline: image: drillster/drone-volume-cache rebuild: true mount: - - ./.meteor_install/ + - /drone/.meteor/ - ./node_modules - ./.meteor/local volumes: diff --git a/.drone.yml.sig b/.drone.yml.sig index 13af4a165f97..d5119416c445 100644 --- a/.drone.yml.sig +++ b/.drone.yml.sig @@ -1 +1 @@ -eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAuLy5tZXRlb3JfaW5zdGFsbC8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICAgIC0gSE9NRT0vZHJvbmUKICAgIGNvbW1hbmRzOgogICAgICAtIGFwdCB1cGRhdGUgJiYgYXB0IGluc3RhbGwgY3VybCBnaXQgYnppcDIgLXkKICAgICAgLSBpZiBbICEgLWUgIiRQV0QvLm1ldGVvcl9pbnN0YWxsL21ldGVvciIgXTsgdGhlbiBjdXJsIGh0dHBzOi8vaW5zdGFsbC5tZXRlb3IuY29tIHwgc2VkIHMvLS1wcm9ncmVzcy1iYXIvLXNML2cgfCAvYmluL3NoOyBlbHNlIGxuIC1zICRQV0QvLm1ldGVvcl9pbnN0YWxsLyAkSE9NRS8ubWV0ZW9yOyBleHBvcnQgUEFUSD0iJFBXRC8ubWV0ZW9yX2luc3RhbGw6JFBBVEgiOyBmaQogICAgICAtIG1ldGVvciBucG0gaW5zdGFsbAogICAgICAtIHNldCArZQogICAgICAtIG1ldGVvciBhZGQgcm9ja2V0Y2hhdDpsaWIKICAgICAgLSBzZXQgLWUKICAgICAgLSBta2RpciAvZHJvbmUvYnVpbGQKICAgICAgLSBtZXRlb3IgYnVpbGQgLS1hbGxvdy1zdXBlcnVzZXIgLS1zZXJ2ZXItb25seSAtLWRpcmVjdG9yeSAvZHJvbmUvYnVpbGQKICAgICAgLSBjcCAuZG9ja2VyL0RvY2tlcmZpbGUubG9jYWwgL2Ryb25lL2J1aWxkL0RvY2tlcmZpbGUKICByZWJ1aWxkLWNhY2hlOgogICAgaW1hZ2U6IGRyaWxsc3Rlci9kcm9uZS12b2x1bWUtY2FjaGUKICAgIHJlYnVpbGQ6IHRydWUKICAgIG1vdW50OgogICAgICAtIC4vLm1ldGVvcl9pbnN0YWxsLwogICAgICAtIC4vbm9kZV9tb2R1bGVzCiAgICAgIC0gLi8ubWV0ZW9yL2xvY2FsCiAgICB2b2x1bWVzOgogICAgICAtIC90bXAvY2FjaGUvUm9ja2V0LkNoYXQ6L2NhY2hlCiAgZG9ja2VyOgogICAgaW1hZ2U6IHBsdWdpbnMvZG9ja2VyCiAgICByZXBvOiByb2NrZXRjaGF0L3JvY2tldC5jaGF0CiAgICBkb2NrZXJmaWxlOiAvZHJvbmUvYnVpbGQvRG9ja2VyZmlsZQogICAgc3RvcmFnZV9kcml2ZXI6IG92ZXJsYXkKICAgIGNvbnRleHQ6IC9kcm9uZS9idWlsZAogICAgc2VjcmV0czogWyBkb2NrZXJfdXNlcm5hbWUsIGRvY2tlcl9wYXNzd29yZCBdCiAgICB0YWc6IGRlc2lnbnByZXZpZXcK.Tm-oVUO_o2XbrrVj4comy0_Ws0MWO3JIzzFA7Q9Rj94 \ No newline at end of file +eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvLm1ldGVvci8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICBjb21tYW5kczoKICAgICAgLSBhcHQgdXBkYXRlICYmIGFwdCBpbnN0YWxsIGN1cmwgZ2l0IGJ6aXAyIC15CiAgICAgIC0gZXhwb3J0IEhPTUU9L2Ryb25lCiAgICAgIC0gZXhwb3J0IFBBVEg9Ii9kcm9uZS8ubWV0ZW9yOiRQQVRIIgogICAgICAtIGlmIFsgISAtZSAiL2Ryb25lLy5tZXRlb3IvbWV0ZW9yIiBdOyB0aGVuIGV4cG9ydCBIT01FPS9kcm9uZTsgY3VybCBodHRwczovL2luc3RhbGwubWV0ZW9yLmNvbSB8IHNlZCBzLy0tcHJvZ3Jlc3MtYmFyLy1zTC9nIHwgL2Jpbi9zaDsgZmkKICAgICAgLSB3aGljaCBtZXRlb3IKICAgICAgLSBtZXRlb3IgbnBtIGluc3RhbGwKICAgICAgLSBzZXQgK2UKICAgICAgLSBtZXRlb3IgYWRkIHJvY2tldGNoYXQ6bGliCiAgICAgIC0gc2V0IC1lCiAgICAgIC0gbWtkaXIgL2Ryb25lL2J1aWxkCiAgICAgIC0gbWV0ZW9yIGJ1aWxkIC0tYWxsb3ctc3VwZXJ1c2VyIC0tc2VydmVyLW9ubHkgLS1kaXJlY3RvcnkgL2Ryb25lL2J1aWxkCiAgICAgIC0gY3AgLmRvY2tlci9Eb2NrZXJmaWxlLmxvY2FsIC9kcm9uZS9idWlsZC9Eb2NrZXJmaWxlCiAgcmVidWlsZC1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZWJ1aWxkOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvLm1ldGVvci8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGRvY2tlcjoKICAgIGltYWdlOiBwbHVnaW5zL2RvY2tlcgogICAgcmVwbzogcm9ja2V0Y2hhdC9yb2NrZXQuY2hhdAogICAgZG9ja2VyZmlsZTogL2Ryb25lL2J1aWxkL0RvY2tlcmZpbGUKICAgIHN0b3JhZ2VfZHJpdmVyOiBvdmVybGF5CiAgICBjb250ZXh0OiAvZHJvbmUvYnVpbGQKICAgIHNlY3JldHM6IFsgZG9ja2VyX3VzZXJuYW1lLCBkb2NrZXJfcGFzc3dvcmQgXQogICAgdGFnOiBkZXNpZ25wcmV2aWV3Cg.xYcBD1th17aUlLzA3Es2Ux0ghs4grfme2RxEUTXJZ3s \ No newline at end of file From 0dd396c4e2af0b4c65c05425d2e7001ac9901548 Mon Sep 17 00:00:00 2001 From: Martin Schoeler Date: Thu, 5 Oct 2017 11:05:17 -0300 Subject: [PATCH 044/212] [NEW] Header Redesign (#7750) * Rc main content header work in progress * header redesign work in progress * Clean up some css and fix burger * Fix reviews * Apply the new header to some admin pages * Start using typography on fonts * add the new header to more pages * add more new headers * Fix admin buttons * add the new header to the account screens and fix some flexs * fix profile header and use new burger * Add favorite star fill * allign preferences contents to center * Put description under the title * fix overflow on channel topic and title * start making the header a component * move channel header template to the new one and fix burger menu * Make the header a modular component * fix some buttons on integrations * add channel icons and fix star fill * fix line height and css lint * add livechat icon * fix part of the tests * fix tests * add a max-width to header * hide room image on channels * Fix reviews and some issues with firefox also remove a console.log() * fix mobile max width * Fix Reviews reduce some elements and try to improve the naming of elements * Fix realNames on Header * [FIX] After deleting the room, cache is not synchronizing * Put delete action on another popover group * check if user can delete * [FIX] Email Subjects not being sent * fix on android * fix for ios * Tab Bar Icons moved to header * remove sidebar header on admin embedded version * fix lint issue * remove console.log * contextual bar header * remove last activity * Update meteor to 1.5.2.2-rc.0 * Fix missing i18n translations * fix header on administration * migration 101 * fix admin view header * remove accountBox from admin menu * add sidebar flex title and icons * smaller accountBox * Fix some tests and skip others skipping due some features that need fixing * Update sidebarItem.html * unify unread and mentions badge * make sidebar item width 100% * fixed tests * LingoHub Update :rocket: Manual push by LingoHub User: Gabriel Engel. Project: Rocket.Chat Made with :heart: by https://lingohub.com * meteor update --all-packages * LingoHub Update :rocket: Manual push by LingoHub User: Gabriel Engel. Project: Rocket.Chat Made with :heart: by https://lingohub.com * meteor update --release 1.5.2.2 * [FIX] Vairous LDAP issues & add pagination * LingoHub Update :rocket: Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with :heart: by https://lingohub.com * LingoHub Update :rocket: Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with :heart: by https://lingohub.com * contextual-bar template * fix stylelinty * fix icons --- .meteor/packages | 10 +- .meteor/release | 2 +- .meteor/versions | 12 +- package-lock.json | 10363 ++++++++++++++-- package.json | 10 +- .../client/accountSecurity.html | 15 +- .../client/startup.js | 1 + .../client/admin/adminSounds.html | 7 +- .../client/admin/startup.js | 1 + .../admin/adminEmoji.html | 7 +- .../rocketchat-emoji-custom/admin/startup.js | 1 + .../.npm/package/npm-shrinkwrap.json | 10 +- packages/rocketchat-i18n/i18n/ar.i18n.json | 402 +- packages/rocketchat-i18n/i18n/ca.i18n.json | 665 +- packages/rocketchat-i18n/i18n/cs.i18n.json | 697 +- packages/rocketchat-i18n/i18n/de-AT.i18n.json | 51 +- packages/rocketchat-i18n/i18n/de.i18n.json | 1565 ++- packages/rocketchat-i18n/i18n/el.i18n.json | 37 +- packages/rocketchat-i18n/i18n/en.i18n.json | 55 +- packages/rocketchat-i18n/i18n/es.i18n.json | 69 +- packages/rocketchat-i18n/i18n/fa.i18n.json | 84 +- packages/rocketchat-i18n/i18n/fi.i18n.json | 55 +- packages/rocketchat-i18n/i18n/fr.i18n.json | 194 +- packages/rocketchat-i18n/i18n/he.i18n.json | 39 +- packages/rocketchat-i18n/i18n/hr.i18n.json | 78 +- packages/rocketchat-i18n/i18n/hu.i18n.json | 51 +- packages/rocketchat-i18n/i18n/id.i18n.json | 37 +- packages/rocketchat-i18n/i18n/it.i18n.json | 264 +- packages/rocketchat-i18n/i18n/ja.i18n.json | 49 +- packages/rocketchat-i18n/i18n/km.i18n.json | 37 +- packages/rocketchat-i18n/i18n/ko.i18n.json | 53 +- packages/rocketchat-i18n/i18n/ku.i18n.json | 37 +- packages/rocketchat-i18n/i18n/lo.i18n.json | 37 +- packages/rocketchat-i18n/i18n/ms-MY.i18n.json | 37 +- packages/rocketchat-i18n/i18n/nl.i18n.json | 37 +- packages/rocketchat-i18n/i18n/no.i18n.json | 4 +- packages/rocketchat-i18n/i18n/pl.i18n.json | 129 +- packages/rocketchat-i18n/i18n/pt-BR.i18n.json | 39 +- packages/rocketchat-i18n/i18n/pt.i18n.json | 67 +- packages/rocketchat-i18n/i18n/ro.i18n.json | 37 +- packages/rocketchat-i18n/i18n/ru.i18n.json | 644 +- packages/rocketchat-i18n/i18n/sl-SI.i18n.json | 3 + packages/rocketchat-i18n/i18n/sq.i18n.json | 37 +- packages/rocketchat-i18n/i18n/sr.i18n.json | 37 +- packages/rocketchat-i18n/i18n/sv.i18n.json | 128 +- packages/rocketchat-i18n/i18n/ta-IN.i18n.json | 37 +- packages/rocketchat-i18n/i18n/tr.i18n.json | 95 +- packages/rocketchat-i18n/i18n/ug.i18n.json | 37 +- packages/rocketchat-i18n/i18n/uk.i18n.json | 37 +- packages/rocketchat-i18n/i18n/zh-TW.i18n.json | 37 +- packages/rocketchat-i18n/i18n/zh.i18n.json | 126 +- .../client/admin/adminImport.html | 7 +- .../client/admin/adminImportPrepare.html | 7 +- .../rocketchat-integrations/client/startup.js | 1 + .../client/views/integrations.html | 15 +- .../client/views/integrationsNew.html | 7 +- .../client/views/integrationsOutgoing.html | 17 +- .../client/views/integrationsOutgoing.js | 6 +- .../views/integrationsOutgoingHistory.html | 17 +- packages/rocketchat-katex/package-lock.json | 6 +- packages/rocketchat-ldap/package.js | 10 +- packages/rocketchat-ldap/server/index.js | 5 + packages/rocketchat-ldap/server/ldap.js | 314 +- .../rocketchat-ldap/server/loginHandler.js | 30 +- packages/rocketchat-ldap/server/settings.js | 114 +- packages/rocketchat-ldap/server/sync.js | 211 +- packages/rocketchat-ldap/server/syncUsers.js | 18 +- .../rocketchat-ldap/server/testConnection.js | 3 +- .../rocketchat-lib/client/MessageAction.js | 1 + .../client/lib/cachedCollection.js | 1 + .../server/lib/notifyUsersOnMessage.js | 2 - .../server/lib/sendEmailOnMessage.js | 2 +- .../server/models/Subscriptions.js | 13 - .../rocketchat-livechat/app/.meteor/packages | 16 +- .../rocketchat-livechat/app/.meteor/release | 2 +- .../rocketchat-livechat/app/.meteor/versions | 10 +- .../rocketchat-livechat/app/i18n/de.i18n.json | 12 +- .../rocketchat-livechat/app/i18n/fa.i18n.json | 22 +- .../rocketchat-livechat/app/i18n/fi.i18n.json | 1 + .../rocketchat-livechat/app/i18n/pl.i18n.json | 2 +- .../app/i18n/sl-SI.i18n.json | 4 + .../rocketchat-livechat/app/i18n/tr.i18n.json | 12 +- .../client/views/sideNav/livechatFlex.html | 15 +- .../client/views/sideNav/livechatFlex.js | 5 +- packages/rocketchat-logger/client/viewLogs.js | 3 +- packages/rocketchat-mailer/client/startup.js | 1 + .../client/views/mailer.html | 7 +- packages/rocketchat-markdown/markdown.js | 14 +- .../parser/marked/marked.js | 1 + .../admin/client/startup.js | 1 + .../client/rocketchat.otr.room.js | 2 +- .../client/imports/components/badge.css | 3 +- .../imports/components/contextual-bar.css | 63 + .../client/imports/components/header.css | 350 + .../client/imports/components/popover.css | 27 +- .../imports/components/sidebar/rooms-list.css | 18 +- .../components/sidebar/sidebar-account.css | 7 +- .../components/sidebar/sidebar-flex.css | 17 +- .../components/sidebar/sidebar-item.css | 30 +- .../imports/components/sidebar/toolbar.css | 2 +- .../client/imports/components/tooltip.css | 39 +- .../client/imports/forms/button.css | 12 + .../client/imports/general/base.css | 47 +- .../client/imports/general/base_old.css | 9 +- .../client/imports/general/forms.css | 21 +- .../client/imports/general/variables.css | 48 +- packages/rocketchat-theme/client/main.css | 2 + .../client/accountFlex.html | 15 +- .../client/accountFlex.js | 5 +- .../client/accountPreferences.html | 25 +- .../client/accountPreferences.js | 2 +- .../client/accountProfile.html | 9 +- .../client/avatar/prompt.html | 7 +- .../rocketchat-ui-admin/client/admin.html | 40 +- packages/rocketchat-ui-admin/client/admin.js | 12 +- .../rocketchat-ui-admin/client/adminFlex.html | 26 +- .../rocketchat-ui-admin/client/adminFlex.js | 5 +- .../rocketchat-ui-admin/client/adminInfo.html | 7 +- .../client/rooms/adminRooms.html | 7 +- .../client/users/adminUsers.html | 7 +- .../client/flexTabBar.html | 56 + .../client/flexTabBar.js | 190 +- .../rocketchat-ui-master/public/icons.svg | 10 +- .../startup/messageBoxActions.js | 47 +- .../rocketchat-ui-sidenav/client/roomList.js | 8 +- .../client/sidebarItem.html | 21 +- .../client/sidebarItem.js | 4 + .../client/components/contextualBar.html | 18 + .../client/components/contextualBar.js | 23 + .../client/components/header/header.html | 68 + .../client/components/header/header.js | 124 + .../client/views/404/roomNotFound.html | 7 +- .../client/views/app/burger.html | 8 +- .../rocketchat-ui/client/views/app/burger.js | 6 + .../rocketchat-ui/client/views/app/home.html | 7 +- .../client/views/app/pageContainer.html | 19 +- .../views/app/pageSettingsContainer.html | 7 +- .../client/views/app/popover.html | 48 +- .../rocketchat-ui/client/views/app/popover.js | 100 +- .../client/views/app/privateHistory.html | 7 +- .../rocketchat-ui/client/views/app/room.html | 41 +- .../rocketchat-ui/client/views/app/room.js | 116 +- packages/rocketchat-ui/package.js | 4 + .../rocketchat-videobridge/lib/messageType.js | 2 +- .../server/methods/jitsiSetTimeout.js | 2 +- server/publications/room.js | 3 +- server/publications/subscription.js | 1 - server/startup/migrations/v101.js | 6 + server/startup/migrations/v102.js | 136 + .../end-to-end/ui/04-main-elements-render.js | 42 +- tests/end-to-end/ui/09-channel.js | 2 +- tests/end-to-end/ui/11-admin.js | 6 +- tests/end-to-end/ui/13-permissions.js | 2 +- tests/pageobjects/flex-tab.page.js | 1 + tests/pageobjects/main-content.page.js | 6 +- tests/pageobjects/side-nav.page.js | 26 +- 156 files changed, 14712 insertions(+), 4824 deletions(-) create mode 100644 packages/rocketchat-i18n/i18n/sl-SI.i18n.json create mode 100644 packages/rocketchat-ldap/server/index.js create mode 100644 packages/rocketchat-livechat/app/i18n/sl-SI.i18n.json create mode 100644 packages/rocketchat-theme/client/imports/components/contextual-bar.css create mode 100644 packages/rocketchat-theme/client/imports/components/header.css create mode 100644 packages/rocketchat-ui/client/components/contextualBar.html create mode 100644 packages/rocketchat-ui/client/components/contextualBar.js create mode 100644 packages/rocketchat-ui/client/components/header/header.html create mode 100644 packages/rocketchat-ui/client/components/header/header.js create mode 100644 server/startup/migrations/v101.js create mode 100644 server/startup/migrations/v102.js diff --git a/.meteor/packages b/.meteor/packages index 72d393aa44b6..750803841107 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -13,7 +13,7 @@ accounts-twitter@1.3.0 blaze-html-templates check@1.2.5 ddp-rate-limiter@1.0.7 -ecmascript@0.8.2 +ecmascript@0.8.3 ejson@1.0.14 email@1.2.3 fastclick@1.0.13 @@ -22,8 +22,8 @@ jquery@1.11.10 less@2.7.9 logging@1.1.17 meteor-base@1.1.0 -mobile-experience@1.0.4 -mongo@1.2.0 +mobile-experience@1.0.5 +mongo@1.2.2 random@1.0.10 rate-limit@1.0.8 reactive-dict@1.1.9 @@ -33,7 +33,7 @@ service-configuration@1.0.11 session@1.1.7 shell-server@0.2.4 spacebars -standard-minifier-js@2.1.1 +standard-minifier-js@2.1.2 tracker@1.1.3 rocketchat:2fa @@ -175,5 +175,5 @@ yasaricli:slugify yasinuslu:blaze-meta deepwell:bootstrap-datepicker2 rocketchat:postcss -dynamic-import@0.1.1 +dynamic-import@0.1.3 keepnox:perfect-scrollbar diff --git a/.meteor/release b/.meteor/release index 47c31abcf451..099d5b9c0e8a 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.5.2 +METEOR@1.5.2.2 diff --git a/.meteor/versions b/.meteor/versions index 61b6df76fa60..752e9253d1d0 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,4 +1,4 @@ -accounts-base@1.3.3 +accounts-base@1.3.4 accounts-facebook@1.2.1 accounts-github@1.3.0 accounts-google@1.2.0 @@ -35,7 +35,7 @@ deps@1.0.12 diff-sequence@1.0.7 dispatch:run-as-user@1.1.1 dynamic-import@0.1.3 -ecmascript@0.8.2 +ecmascript@0.8.3 ecmascript-runtime@0.4.1 ecmascript-runtime-client@0.4.3 ecmascript-runtime-server@0.4.1 @@ -84,11 +84,11 @@ meteorhacks:inject-initial@1.0.4 meteorhacks:meteorx@1.4.1 meteorspark:util@0.2.0 minifier-css@1.2.16 -minifier-js@2.1.3 -minimongo@1.3.1 +minifier-js@2.1.4 +minimongo@1.3.2 mizzao:autocomplete@0.5.1 mizzao:timesync@0.3.4 -mobile-experience@1.0.4 +mobile-experience@1.0.5 mobile-status-bar@1.0.14 modules@0.10.0 modules-runtime@0.8.0 @@ -239,7 +239,7 @@ smoral:sweetalert@1.1.1 spacebars@1.0.15 spacebars-compiler@1.1.3 srp@1.0.10 -standard-minifier-js@2.1.1 +standard-minifier-js@2.1.2 steffo:meteor-accounts-saml@0.0.1 tap:i18n@1.8.2 templating@1.3.2 diff --git a/package-lock.json b/package-lock.json index 516cfc5322a6..6ca86bcb0222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,9 +30,9 @@ } }, "@google-cloud/storage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.2.1.tgz", - "integrity": "sha1-oPLiCHG4YvDqZKkKxI/AiEXPlQU=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.3.0.tgz", + "integrity": "sha512-kZ2Q7vTyeCQP/V3Ru0DwolSsXVFaZhrX5LeCdi+jh3IDF/GiYrgLVXL7fO8IPTqS4ZfzMdPcrSxycr0rF/CM3Q==", "requires": { "@google-cloud/common": "0.13.5", "arrify": "1.0.1", @@ -41,12 +41,13 @@ "create-error-class": "3.0.2", "duplexify": "3.5.1", "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "gcs-resumable-upload": "0.8.1", + "gcs-resumable-upload": "0.8.2", "hash-stream-validation": "0.2.1", "is": "3.2.1", "mime-types": "2.1.17", "once": "1.4.0", "pumpify": "1.3.5", + "safe-buffer": "5.1.1", "stream-events": "1.0.2", "string-format-obj": "1.1.0", "through2": "2.0.3" @@ -59,19 +60,81 @@ "requires": { "mime-db": "1.30.0" } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" } } }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "dev": true, + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "abbrev": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" }, + "acorn": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", + "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", + "dev": true + }, "addressparser": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=" }, + "agent-base": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", + "dev": true, + "requires": { + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "semver": "5.0.3" + }, + "dependencies": { + "semver": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", + "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", + "dev": true + } + } + }, "ajv": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", @@ -81,6 +144,35 @@ "json-stable-stringify": "1.0.1" } }, + "ajv-keywords": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.0.tgz", + "integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, "ansi-regex": { "version": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" @@ -90,10 +182,121 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "any-promise": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-0.1.0.tgz", + "integrity": "sha1-gwtoCqflbzNFHUsEnzvYBESY7ic=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, "aproba": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz", - "integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==" + "integrity": "sha1-RcZikJTeTpb2k+9+q3SuB5wkD8E=" + }, + "archiver": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz", + "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=", + "dev": true, + "requires": { + "archiver-utils": "1.3.0", + "async": "2.5.0", + "buffer-crc32": "0.2.13", + "glob": "7.1.2", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "readable-stream": "2.3.3", + "tar-stream": "1.5.2", + "walkdir": "0.0.11", + "zip-stream": "1.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "archiver-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", + "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "dev": true, + "requires": { + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lazystream": "1.0.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "normalize-path": "2.1.1", + "readable-stream": "2.3.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } }, "are-we-there-yet": { "version": "1.1.4", @@ -133,6 +336,50 @@ } } }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, "array-includes": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", @@ -142,11 +389,26 @@ "es-abstract": "1.7.0" } }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, "array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -162,6 +424,12 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=", + "dev": true + }, "async": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", @@ -170,14 +438,40 @@ "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" } }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, "asynckit": { "version": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "atob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-1.1.3.tgz", + "integrity": "sha1-lfE2KbEsOlGl0hWr3OKqnzL4B3M=", + "dev": true + }, + "autoprefixer": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.1.4.tgz", + "integrity": "sha512-MB1XybOJqu1uAwpfSilAa1wSURNc4W310CFKvMj1fNaJBFxr1PGgz72vZaPr9ryKGqs2vYZ6jDyJ0aiGELjsoA==", + "dev": true, + "requires": { + "browserslist": "2.4.0", + "caniuse-lite": "1.0.30000738", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.12", + "postcss-value-parser": "3.3.0" + } + }, "aws-sdk": { - "version": "2.111.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.111.0.tgz", - "integrity": "sha1-qDTOE/9ECzSOReBHyNx71pbxsm0=", + "version": "2.123.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.123.0.tgz", + "integrity": "sha1-JFKDMjznPj050KFmhhRRzhKcqL4=", "requires": { "buffer": "4.9.1", "crypto-browserify": "1.0.9", @@ -851,6 +1145,15 @@ "regenerator-transform": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz" } }, + "babel-plugin-transform-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz", + "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, "babel-plugin-transform-strict-mode": { "version": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", @@ -860,6 +1163,25 @@ "babel-types": "https://registry.npmjs.org/babel-types/-/babel-types-6.24.1.tgz" } }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "core-js": "2.5.1", + "regenerator-runtime": "0.10.5" + }, + "dependencies": { + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", + "dev": true + } + } + }, "babel-preset-es2015": { "version": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.3.13.tgz", "integrity": "sha1-l9zn7ykuGMubK3VF2AxZPCjZUX8=", @@ -1072,7 +1394,7 @@ "bcrypt": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", - "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", + "integrity": "sha1-sC3cbAtS6ha40883XVoy54DatUg=", "requires": { "nan": "2.6.2", "node-pre-gyp": "0.6.36" @@ -1087,11 +1409,48 @@ "tweetnacl": "0.14.5" } }, + "binary-extensions": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", + "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=", + "dev": true + }, "bintrees": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.1.tgz", "integrity": "sha1-DmVcm5wkNeqraL9AJyJtK1WjRSQ=" }, + "bl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", + "dev": true, + "requires": { + "readable-stream": "2.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "string_decoder": "0.10.31", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -1100,6 +1459,12 @@ "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" } }, + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=", + "dev": true + }, "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", @@ -1116,6 +1481,33 @@ "concat-map": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" } }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "browserslist": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.4.0.tgz", + "integrity": "sha512-aM2Gt4x9bVlCUteADBS6JP0F+2tMWKM1jQzUulVROtdFWFIcIVvY76AJbr7GDqy0eDhn+PcnpzzivGxY4qiaKQ==", + "dev": true, + "requires": { + "caniuse-lite": "1.0.30000738", + "electron-to-chromium": "1.3.22" + } + }, "buffer": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", @@ -1126,6 +1518,12 @@ "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, "buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", @@ -1140,1304 +1538,7534 @@ "version": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "caller-id": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-id/-/caller-id-0.1.0.tgz", + "integrity": "sha1-Wb2sCJPRLDhxQIJ5Ix+XRYNk8Hs=", + "dev": true, + "requires": { + "stack-trace": "0.0.10" + } }, - "chalk": { - "version": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "ansi-styles": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "has-ansi": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "supports-color": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + "callsites": "0.2.0" } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true }, - "codemirror": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.29.0.tgz", - "integrity": "sha512-nlG9m0YQ0gFhdEdnKDG+XJRB/bW+K6M9Axs01+LScjVamWtd4dEwgyohf/r4voW1efnGi6U6hHHvDQ9tt9BtoA==" + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true }, - "combined-stream": { - "version": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, "requires": { - "delayed-stream": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, - "component-emitter": { - "version": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "concat-map": { - "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "dev": true, "requires": { - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" + "browserslist": "1.7.7", + "caniuse-db": "1.0.30000738", + "lodash.memoize": "4.1.2", + "lodash.uniq": "4.5.0" }, "dependencies": { - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, "requires": { - "safe-buffer": "5.1.1" + "caniuse-db": "1.0.30000738", + "electron-to-chromium": "1.3.22" } } } }, - "configstore": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", - "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.0.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "convert-source-map": { - "version": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", - "dev": true - }, - "cookiejar": { - "version": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=", + "caniuse-db": { + "version": "1.0.30000738", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000738.tgz", + "integrity": "sha1-hICavEmjkOWowiSrk2nT+NAaogI=", "dev": true }, - "core-js": { - "version": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=", + "caniuse-lite": { + "version": "1.0.30000738", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000738.tgz", + "integrity": "sha1-GCDDya25oRfjEaW9yh0lvDQojro=", "dev": true }, - "core-util-is": { - "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "requires": { - "capture-stack-trace": "1.0.0" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "requires": { - "boom": "2.10.1" - } - }, - "crypto-browserify": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz", - "integrity": "sha1-zFRJaF37hesRyYKKzHy4erW7/MA=" - }, - "crypto-random-string": { + "capture-stack-trace": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, - "debug": { - "version": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "dev": true, + "optional": true, "requires": { - "ms": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" - } - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, - "define-properties": { - "version": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "object-keys": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, - "delayed-stream": { - "version": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "detect-indent": { - "version": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", "dev": true, "requires": { - "repeating": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz" + "assertion-error": "1.0.2", + "deep-eql": "0.1.3", + "type-detect": "1.0.0" } }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "chai-as-promised": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-6.0.0.tgz", + "integrity": "sha1-GgKkM6byTa+sY7nJb6FoTbGqjaY=", + "dev": true, "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" - } + "check-error": "1.0.2" } }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" - }, - "domhandler": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", - "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "chalk": { + "version": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, "requires": { - "domelementtype": "1.3.0" + "ansi-styles": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "has-ansi": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "supports-color": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" } }, - "domutils": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.6.2.tgz", - "integrity": "sha1-GVjMC0yUJuntNn+xyOhUiRsPo/8=", - "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" - } + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "requires": { - "is-obj": "1.0.1" - } + "child-process-debug": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/child-process-debug/-/child-process-debug-0.0.7.tgz", + "integrity": "sha1-VOEfuBw7b5Spa2MfrKk+0a9/itA=", + "dev": true }, - "duplexify": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", - "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "chimp": { + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/chimp/-/chimp-0.50.0.tgz", + "integrity": "sha512-OZiGO1UWMi/msriskMGy0lCofI+BMVTZoGwY3u/feHA2UfxMtEYIuCbX+MQMJT6bsSWkIah7DpmBlFPD1rOPnA==", + "dev": true, "requires": { - "end-of-stream": "1.4.0", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readable-stream": "2.3.3", - "stream-shift": "1.0.0" + "async": "0.9.2", + "babel-core": "https://registry.npmjs.org/babel-core/-/babel-core-6.9.1.tgz", + "babel-plugin-transform-runtime": "6.23.0", + "babel-polyfill": "6.26.0", + "babel-preset-es2015": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.3.13.tgz", + "babel-preset-stage-2": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "bluebird": "3.5.0", + "chai": "3.5.0", + "chai-as-promised": "6.0.0", + "child-process-debug": "0.0.7", + "chokidar": "1.6.1", + "chromedriver": "2.32.3", + "colors": "1.1.2", + "commander": "2.11.0", + "cucumber": "1.3.0", + "deep-extend": "0.4.2", + "exit": "0.1.2", + "fibers": "1.0.15", + "freeport": "1.0.5", + "fs-extra": "1.0.0", + "glob": "7.1.1", + "hapi": "8.8.0", + "jasmine": "2.8.0", + "loglevel": "1.4.1", + "minimist": "1.2.0", + "mocha": "3.5.3", + "phantomjs-prebuilt": "2.1.13", + "progress": "1.1.8", + "request": "2.81.0", + "requestretry": "1.5.0", + "saucelabs": "1.4.0", + "selenium-standalone": "5.11.2", + "underscore": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "xolvio-ddp": "0.12.3", + "xolvio-jasmine-expect": "1.1.0", + "xolvio-sync-webdriverio": "9.0.1" }, "dependencies": { - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "esutils": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "js-tokens": "3.0.2" } }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "dev": true, + "requires": { + "babel-messages": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "jsesc": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz" + } }, - "string_decoder": { + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.1", + "home-or-tmp": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "lodash": "4.17.4", + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "source-map-support": "0.4.18" + }, + "dependencies": { + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.0", + "babel-helpers": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "babel-messages": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", + "slash": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "source-map": "0.5.7" + } + } + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "lodash": "4.17.4", + "to-fast-properties": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "camel-case": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "no-case": "2.3.1", + "upper-case": "1.1.3" + } + }, + "cli-table": { + "version": "0.3.1", + "bundled": true, + "dev": true, + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "bundled": true, + "dev": true + } + } + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true + }, + "colors": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "commander": { + "version": "2.11.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", + "dev": true + }, + "cucumber": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "camel-case": "3.0.0", + "cli-table": "0.3.1", + "co": "4.6.0", + "colors": "1.1.2", + "commander": "2.11.0", + "duration": "0.2.0", + "fibers": "1.0.15", + "figures": "1.7.0", + "gherkin": "4.0.0", + "glob": "7.1.1", + "is-generator": "1.0.3", + "lodash": "4.17.4", + "meteor-promise": "0.8.6", + "stack-chain": "1.3.7", + "stacktrace-js": "1.3.1" + } + }, + "d": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "es5-ext": "0.10.30" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "duration": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "requires": { + "d": "0.1.1", + "es5-ext": "0.10.30" + } + }, + "error-stack-parser": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "requires": { + "stackframe": "0.3.1" + } + }, + "es5-ext": { + "version": "0.10.30", + "bundled": true, + "dev": true, + "requires": { + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-symbol": "3.1.1" + }, + "dependencies": { + "d": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "es5-ext": "0.10.30" + } + } + } + }, + "es6-symbol": { + "version": "3.1.1", + "bundled": true, + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30" + }, + "dependencies": { + "d": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "es5-ext": "0.10.30" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "fibers": { + "version": "1.0.15", + "bundled": true, + "dev": true + }, + "figures": { + "version": "1.7.0", + "bundled": true, + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "gherkin": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.1.1", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.0", + "path-is-absolute": "1.0.1" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.3.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "is-generator": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "bundled": true, + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "lodash": { + "version": "4.17.4", + "bundled": true, + "dev": true + }, + "lower-case": { + "version": "1.1.4", + "bundled": true, + "dev": true + }, + "meteor-promise": { + "version": "0.8.6", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, "requires": { - "safe-buffer": "5.1.1" + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "no-case": { + "version": "2.3.1", + "bundled": true, + "dev": true, + "requires": { + "lower-case": "1.1.4" + } + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "once": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "stack-chain": { + "version": "1.3.7", + "bundled": true, + "dev": true + }, + "stack-generator": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "stackframe": "1.0.4" + }, + "dependencies": { + "stackframe": { + "version": "1.0.4", + "bundled": true, + "dev": true + } + } + }, + "stackframe": { + "version": "0.3.1", + "bundled": true, + "dev": true + }, + "stacktrace-gps": { + "version": "2.4.4", + "bundled": true, + "dev": true, + "requires": { + "source-map": "0.5.6", + "stackframe": "0.3.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.6", + "bundled": true, + "dev": true + } + } + }, + "stacktrace-js": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "error-stack-parser": "1.3.6", + "stack-generator": "1.1.0", + "stacktrace-gps": "2.4.4" } + }, + "upper-case": { + "version": "1.1.3", + "bundled": true, + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "chokidar": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.1.tgz", + "integrity": "sha1-L0RHq16W5Q+z14n9kNTHLg5McMI=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.1.2", + "glob-parent": "2.0.0", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "readdirp": "2.1.0" + } + }, + "chromedriver": { + "version": "2.32.3", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-2.32.3.tgz", + "integrity": "sha1-zoTwVb7ny/5W8xGCsnbzMlaxK/E=", + "dev": true, + "requires": { + "extract-zip": "1.6.5", + "kew": "0.7.0", + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "request": "2.81.0", + "rimraf": "2.6.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true } } }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", + "dev": true + }, + "clone-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.0.tgz", + "integrity": "sha1-6uCiQT9VwJQvgYwin+/OhF1/Oxw=", + "dev": true, + "requires": { + "is-regexp": "1.0.0", + "is-supported-regexp-flag": "1.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "codemirror": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.30.0.tgz", + "integrity": "sha512-pfJV/7fLAUUenuGK3iANkQu1AxNLuWpeF7HV6YFDjSBMp53F8FTa2F6oPs9NKAHFweT2m08usmXUIA+7sohdew==" + }, + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "dev": true, + "requires": { + "clone": "1.0.2", + "color-convert": "1.9.0", + "color-string": "0.3.0" + } + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "combined-stream": { + "version": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + } + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": "1.0.1" + } + }, + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "dev": true, + "requires": { + "array-ify": "1.0.0", + "dot-prop": "3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + } + } + }, + "complex.js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.0.4.tgz", + "integrity": "sha512-Syl95HpxUTS0QjwNxencZsKukgh1zdS9uXeXX2Us0pHaqBR6kiZZi0AkZ9VpZFwHJyVIUVzI4EumjWdXP3fy6w==", + "dev": true + }, + "component-emitter": { + "version": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "compress-commons": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.0.tgz", + "integrity": "sha1-WFhwku8g03y1i68AARLJJ4/3O58=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13", + "crc32-stream": "2.0.0", + "normalize-path": "2.1.1", + "readable-stream": "2.3.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "concat-map": { + "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "configstore": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "requires": { + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.0.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "conventional-changelog": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.5.tgz", + "integrity": "sha512-DUM0iXhgE11uRCoEQnFuYQA5zJcxfvKn940ZFyXziFl0y05yBCoy5ci2fcQYFWQ+OyyxgE2H02EdgYpuz9XG4w==", + "dev": true, + "requires": { + "conventional-changelog-angular": "1.5.0", + "conventional-changelog-atom": "0.1.1", + "conventional-changelog-codemirror": "0.2.0", + "conventional-changelog-core": "1.9.1", + "conventional-changelog-ember": "0.2.7", + "conventional-changelog-eslint": "0.2.0", + "conventional-changelog-express": "0.2.0", + "conventional-changelog-jquery": "0.1.0", + "conventional-changelog-jscs": "0.1.0", + "conventional-changelog-jshint": "0.2.0" + } + }, + "conventional-changelog-angular": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.5.0.tgz", + "integrity": "sha512-Gt0qSf5wdFmLabgdSlqjguDAmPyYTXtUl4WH5W3SlpElHhnU/UiCY3M7xcIkZxrNQfVA1UxUBgu65eBbaJnZVA==", + "dev": true, + "requires": { + "compare-func": "1.3.2", + "q": "1.5.0" + } + }, + "conventional-changelog-atom": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz", + "integrity": "sha512-6Nlu/+MiD4gi7k3Z+N1vMJWpaPSdvFPWzPGnH4OXewHAxiAl0L/TT9CGgA01fosPxmYr4hMNtD7kyN0tkg8vIA==", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "conventional-changelog-cli": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-1.3.3.tgz", + "integrity": "sha512-2bsDXAidc7TWErFHl58IDPPkcHvtscDr6a63tpne7OZPu5JAqeDc3iKimvzvhdUfcWLowlXmoei8sBHMQ0sMYw==", + "dev": true, + "requires": { + "add-stream": "1.0.0", + "conventional-changelog": "1.1.5", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "meow": "3.7.0", + "tempfile": "1.1.1" + } + }, + "conventional-changelog-codemirror": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz", + "integrity": "sha512-jUbY98JoKdAOR5k3pOBiKZ+Iz9t2F84hL7x4WjSRW6x7FdeCEUOjyfml+YClE2h/h62Tf3mwur5jSO8upxxc1g==", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "conventional-changelog-core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-1.9.1.tgz", + "integrity": "sha512-Fo0bSeO+NsO6GtuQXts0xQeRpLrxaABTPU8NK4Zij9sJB3zFkU4BObSefJS4F4+EkKujaKCWtfS6Uih+9NpXrQ==", + "dev": true, + "requires": { + "conventional-changelog-writer": "2.0.1", + "conventional-commits-parser": "2.0.0", + "dateformat": "1.0.12", + "get-pkg-repo": "1.4.0", + "git-raw-commits": "1.2.0", + "git-remote-origin-url": "2.0.0", + "git-semver-tags": "1.2.1", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "normalize-package-data": "2.4.0", + "q": "1.5.0", + "read-pkg": "1.1.0", + "read-pkg-up": "1.0.1", + "through2": "2.0.3" + } + }, + "conventional-changelog-ember": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.2.7.tgz", + "integrity": "sha512-Xj1v9uVcKM8N798hMr7e6yiw8IFyvI6Ik+TdjdmG54uGupqvEEWW37xAbPPbdKvgoitbyZkqUTancj055actEg==", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "conventional-changelog-eslint": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz", + "integrity": "sha512-WGKnC0bGPD6BHGiRBfYqNGfy6DZDn2jGs1yxPRT8I2796wYdGqsbDF4477o4fdsxUJvckoW2OFPqkmRMQaCHSA==", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "conventional-changelog-express": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz", + "integrity": "sha512-ujSEmbWfozC1iIjH5Pl7AKtREowvAl10whs1q6c7nZLnoNZK5CmdB2PQ/V42O6rCgUzaLX+ACRW2+g0A/Htqvw==", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "conventional-changelog-jquery": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", + "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "conventional-changelog-jscs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz", + "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "conventional-changelog-jshint": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz", + "integrity": "sha512-uUP4c0et6F2teapl+YY2JHFAHD401U5CkgI+P8PyU0y1zS8BdBy6EnhqgZEXhFOp9fPzUdic+Wv/9alOqw3agQ==", + "dev": true, + "requires": { + "compare-func": "1.3.2", + "q": "1.5.0" + } + }, + "conventional-changelog-writer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz", + "integrity": "sha512-X4qC758celQOKw0iUPAsH5sJX6fH6N5dboFc3elXb1/SIKhsYMukhhaxWmxRdtVUSqGt9rZg8giwBQG5B2GeKg==", + "dev": true, + "requires": { + "compare-func": "1.3.2", + "conventional-commits-filter": "1.0.0", + "dateformat": "1.0.12", + "handlebars": "4.0.10", + "json-stringify-safe": "5.0.1", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "meow": "3.7.0", + "semver": "5.4.1", + "split": "1.0.1", + "through2": "2.0.3" + } + }, + "conventional-commits-filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz", + "integrity": "sha1-b8KmWTcrw/IznPn//34bA0S5MDk=", + "dev": true, + "requires": { + "is-subset": "0.1.1", + "modify-values": "1.0.0" + } + }, + "conventional-commits-parser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz", + "integrity": "sha512-8od6g684Fhi5Vpp4ABRv/RBsW1AY6wSHbJHEK6FGTv+8jvAAnlABniZu/FVmX9TcirkHepaEsa1QGkRvbg0CKw==", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "is-text-path": "1.0.1", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "meow": "3.7.0", + "split2": "2.2.0", + "through2": "2.0.3", + "trim-off-newlines": "1.0.1" + } + }, + "convert-source-map": { + "version": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "cookiejar": { + "version": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", + "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=", + "dev": true + }, + "core-js": { + "version": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=", + "dev": true + }, + "core-util-is": { + "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "dev": true, + "requires": { + "is-directory": "0.3.1", + "js-yaml": "3.10.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "parse-json": "2.2.0", + "require-from-string": "1.2.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "crc": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz", + "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ=", + "dev": true + }, + "crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "dev": true, + "requires": { + "crc": "3.5.0", + "readable-stream": "2.3.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.2.14" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "requires": { + "boom": "2.10.1" + } + }, + "crypto-browserify": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz", + "integrity": "sha1-zFRJaF37hesRyYKKzHy4erW7/MA=" + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" + }, + "css": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.1.tgz", + "integrity": "sha1-c6TIHehdtmTU7mdPfUcIXjstVdw=", + "dev": true, + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "source-map": "0.1.43", + "source-map-resolve": "0.3.1", + "urix": "0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "css-color-function": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/css-color-function/-/css-color-function-1.3.0.tgz", + "integrity": "sha1-csdnuvl48BuKipT0Lxe6XSKndvw=", + "dev": true, + "requires": { + "balanced-match": "0.1.0", + "color": "0.11.4", + "debug": "0.7.4", + "rgb": "0.1.0" + }, + "dependencies": { + "balanced-match": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.1.0.tgz", + "integrity": "sha1-tQS9BYabOSWd0MXvw12EMXbczEo=", + "dev": true + }, + "debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk=", + "dev": true + } + } + }, + "css-parse": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz", + "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", + "dev": true, + "requires": { + "css": "2.2.1" + } + }, + "css-value": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/css-value/-/css-value-0.0.1.tgz", + "integrity": "sha1-Xv1sLupeof1rasV+wEJ7GEUkJOo=", + "dev": true + }, + "ctype": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", + "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "1.0.2" + } + }, + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "4.0.1", + "meow": "3.7.0" + }, + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + } + } + }, + "ddp-ejson": { + "version": "0.8.1-3", + "resolved": "https://registry.npmjs.org/ddp-ejson/-/ddp-ejson-0.8.1-3.tgz", + "integrity": "sha1-6dZ0Zqt4m9dOfZcHSjbiQGkO7sI=", + "dev": true, + "requires": { + "ddp-underscore-patched": "0.8.1-2" + } + }, + "ddp-underscore-patched": { + "version": "0.8.1-2", + "resolved": "https://registry.npmjs.org/ddp-underscore-patched/-/ddp-underscore-patched-0.8.1-2.tgz", + "integrity": "sha1-ZaQU6fIuxagqoWOG40NmtI/Ozx0=", + "dev": true + }, + "debug": { + "version": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decimal.js": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-7.2.3.tgz", + "integrity": "sha512-AoFI37QS0S87Ft0r3Bdz4q9xSpm1Paa9lSeKLXgMPk/u/+QPIM5Gy4DHcZQS1seqPJH4gHLauPGn347z0HbsrA==", + "dev": true + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", + "dev": true + } + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "deepmerge": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.3.2.tgz", + "integrity": "sha1-FmNpFinU2/42T6EqKk8KqGqjoFA=", + "dev": true + }, + "define-properties": { + "version": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "object-keys": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz" + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.1" + }, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "delayed-stream": { + "version": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "detect-indent": { + "version": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz" + } + }, + "diff": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "dev": true + }, + "doctrine": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", + "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dev": true, + "requires": { + "esutils": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + }, + "domhandler": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", + "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.6.2.tgz", + "integrity": "sha1-GVjMC0yUJuntNn+xyOhUiRsPo/8=", + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "requires": { + "is-obj": "1.0.1" + } + }, + "duplexify": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "requires": { + "end-of-stream": "1.4.0", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "readable-stream": "2.3.3", + "stream-shift": "1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "2.0.0", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, + "ejs": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", + "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.22", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.22.tgz", + "integrity": "sha1-QyLVLBUUBuPq73StAmdog+hBZBg=", + "dev": true + }, + "emailreplyparser": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/emailreplyparser/-/emailreplyparser-0.0.5.tgz", + "integrity": "sha1-BpYswKRCFnWbo7mOOyV3wM4w/Aw=" + }, + "end-of-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", + "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "requires": { + "once": "1.4.0" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es-abstract": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.7.0.tgz", + "integrity": "sha1-363ndOAb/Nl/lhgCmMRJyGI/uUw=", + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "requires": { + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } + }, + "es6-promise": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.0.5.tgz", + "integrity": "sha1-eILzCt3lskDM+n99eMVIMwlRrkI=", + "dev": true + }, + "escape-string-regexp": { + "version": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.7.2.tgz", + "integrity": "sha1-/29fUZOEiifum2J74+c/ucteZi4=", + "dev": true, + "requires": { + "ajv": "5.2.3", + "babel-code-frame": "6.26.0", + "chalk": "2.1.0", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.0.0", + "eslint-scope": "3.7.1", + "espree": "3.5.1", + "esquery": "1.0.0", + "estraverse": "4.2.0", + "esutils": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.5", + "imurmurhash": "0.1.4", + "inquirer": "3.0.6", + "is-resolvable": "1.0.0", + "js-yaml": "3.10.0", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "require-uncached": "1.0.3", + "semver": "5.4.1", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.2", + "text-table": "0.2.0" + }, + "dependencies": { + "ajv": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", + "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "json-schema-traverse": "0.3.1", + "json-stable-stringify": "1.0.1" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "js-tokens": "3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "has-ansi": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "strip-ansi": "3.0.1", + "supports-color": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "supports-color": "4.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + } + } + } + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "espree": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz", + "integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4=", + "dev": true, + "requires": { + "acorn": "5.1.2", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true, + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "execall": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz", + "integrity": "sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=", + "dev": true, + "requires": { + "clone-regexp": "1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extend": { + "version": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "external-editor": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.5.tgz", + "integrity": "sha512-Msjo64WT5W+NhOpQXh0nOHm+n0RfU1QUwDnKYvJ8dEJ8zlwLrqXNTv5mSUTJpepf41PDJGyhueTw2vNZW+Fr/w==", + "dev": true, + "requires": { + "iconv-lite": "0.4.19", + "jschardet": "1.5.1", + "tmp": "0.0.33" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "extract-zip": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.5.tgz", + "integrity": "sha1-maBnNbbqIOqbcF13ms/8yHz/BEA=", + "dev": true, + "requires": { + "concat-stream": "1.6.0", + "debug": "2.2.0", + "mkdirp": "0.5.0", + "yauzl": "2.4.1" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "mkdirp": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", + "dev": true, + "requires": { + "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "faye-websocket": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.4.tgz", + "integrity": "sha1-iFk0x57/sECVSeDAo4Ae0XpAza0=", + "dev": true, + "requires": { + "websocket-driver": "0.7.0" + } + }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "dev": true, + "requires": { + "pend": "1.2.0" + } + }, + "fg-lodash": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/fg-lodash/-/fg-lodash-0.0.2.tgz", + "integrity": "sha1-mINSU39CfaavIiEpu2OsyknmL6M=", + "dev": true, + "requires": { + "lodash": "2.4.2", + "underscore.string": "2.3.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", + "dev": true + } + } + }, + "fibers": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/fibers/-/fibers-1.0.15.tgz", + "integrity": "sha1-IvA5yPGLhWGQ+75N7PBWFUwerpw=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "requires": { + "is-object": "1.0.1", + "merge-descriptors": "1.0.1" + } + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + } + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreach": { + "version": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "requires": { + "asynckit": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "mime-types": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz" + } + }, + "formidable": { + "version": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", + "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=", + "dev": true + }, + "fraction.js": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.2.tgz", + "integrity": "sha512-OswcigOSil3vYXgrPSx4NCaSyPikXqVNYN/4CyhS0ucVOJ4GVYr6KQQLLcAudvS/4bBOzxqJ3XIsFaaMjl98ZQ==", + "dev": true + }, + "freeport": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/freeport/-/freeport-1.0.5.tgz", + "integrity": "sha1-JV6KuEFwwzuoXZkOghrl9KGpvF0=", + "dev": true + }, + "fs-extra": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", + "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "2.4.0", + "klaw": "1.3.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", + "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.6.2", + "node-pre-gyp": "0.6.36" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.36", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "requires": { + "fstream": "1.0.11", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + } + }, + "function-bind": { + "version": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "1.1.2", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "wide-align": "1.1.2" + } + }, + "gaze": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", + "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", + "dev": true, + "requires": { + "globule": "1.2.0" + } + }, + "gcp-metadata": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.3.1.tgz", + "integrity": "sha512-5kJPX/RXuqoLmHiOOgkSDk/LI0QaXpEvZ3pvQP4ifjGGDKZKVSOjL/GcDjXA5kLxppFCOjmmsu0Uoop9d1upaQ==", + "requires": { + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "retry-request": "3.0.0" + }, + "dependencies": { + "retry-request": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.0.0.tgz", + "integrity": "sha1-i60rHc8Ek4uyEeLO2GLlkbgvGRc=", + "requires": { + "request": "2.81.0", + "through2": "2.0.3" + } + } + } + }, + "gcs-resumable-upload": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.2.tgz", + "integrity": "sha512-PBl1OFABYxubxfYPh000I0+JLbQzBRtNqxzgxYboIQk2tdw7BvjJ2dVukk3YH4QM6GiUwqItyNqWBuxjLH8GhA==", + "requires": { + "buffer-equal": "1.0.0", + "configstore": "3.1.1", + "google-auto-auth": "0.7.2", + "pumpify": "1.3.5", + "request": "2.81.0", + "stream-events": "1.0.2", + "through2": "2.0.3" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "1.0.2" + } + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "meow": "3.7.0", + "normalize-package-data": "2.4.0", + "parse-github-repo-url": "1.4.1", + "through2": "2.0.3" + } + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "git-raw-commits": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.2.0.tgz", + "integrity": "sha1-DzqL/ZmuDy2LkiTViJKXXppS0Dw=", + "dev": true, + "requires": { + "dargs": "4.1.0", + "lodash.template": "4.4.0", + "meow": "3.7.0", + "split2": "2.2.0", + "through2": "2.0.3" + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "dev": true, + "requires": { + "gitconfiglocal": "1.0.0", + "pify": "2.3.0" + } + }, + "git-semver-tags": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.1.tgz", + "integrity": "sha512-fFyxtzTHCTQKwB4clA2AInVrlflBbVbbJD4NWwmxKXHUgsU/K9kmHNlkPLqFiuy9xu9q3lNopghR4VXeQwZbTQ==", + "dev": true, + "requires": { + "meow": "3.7.0", + "semver": "5.4.1" + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "dev": true, + "requires": { + "ini": "1.3.4" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "1.4.0", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "https://registry.npmjs.org/globals/-/globals-9.17.0.tgz", + "integrity": "sha1-DAymltm5u2lNLlRwvTd3fKrVAoY=", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=", + "dev": true + }, + "globule": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", + "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", + "dev": true, + "requires": { + "glob": "7.1.2", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + } + }, + "gonzales-pe": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.2.2.tgz", + "integrity": "sha512-jbQFnd6CD3iEuGtSKVhsh37tQIkkx+/eil3tufyYOHMouG89uqtkWGP03P4vxY+XGeJnCi3ewIY+BnBogyC61Q==", + "dev": true, + "requires": { + "minimist": "1.1.3" + }, + "dependencies": { + "minimist": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", + "integrity": "sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag=", + "dev": true + } + } + }, + "google-auth-library": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-0.10.0.tgz", + "integrity": "sha1-bhW6vuhf0d0U2NEoopW2g41SE24=", + "requires": { + "gtoken": "1.2.2", + "jws": "3.1.4", + "lodash.noop": "3.0.1", + "request": "2.81.0" + } + }, + "google-auto-auth": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.2.tgz", + "integrity": "sha512-ux2n2AE2g3+vcLXwL4dP/M12SFMRX5dzCzBfhAEkTeAB7dpyGdOIEj7nmUx0BHKaCcUQrRWg9kT63X/Mmtk1+A==", + "requires": { + "async": "2.5.0", + "gcp-metadata": "0.3.1", + "google-auth-library": "0.10.0", + "request": "2.81.0" + } + }, + "google-p12-pem": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-0.1.2.tgz", + "integrity": "sha1-M8RqsCGqc0+gMys5YKmj/8svMXc=", + "requires": { + "node-forge": "0.7.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "gtoken": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-1.2.2.tgz", + "integrity": "sha1-Fyd2oanZasCfwioA9b6DzubeiCA=", + "requires": { + "google-p12-pem": "0.1.2", + "jws": "3.1.4", + "mime": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", + "request": "2.81.0" + } + }, + "handlebars": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", + "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "hapi": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/hapi/-/hapi-8.8.0.tgz", + "integrity": "sha1-h+N6Bum0meiXkOLcERqpZotuYX8=", + "dev": true, + "requires": { + "accept": "1.0.0", + "ammo": "1.0.0", + "boom": "2.7.2", + "call": "2.0.1", + "catbox": "4.3.0", + "catbox-memory": "1.1.1", + "cryptiles": "2.0.4", + "h2o2": "4.0.1", + "heavy": "3.0.0", + "hoek": "2.14.0", + "inert": "2.1.5", + "iron": "2.1.2", + "items": "1.1.0", + "joi": "6.4.1", + "kilt": "1.1.1", + "mimos": "2.0.2", + "peekaboo": "1.0.0", + "qs": "4.0.0", + "shot": "1.5.3", + "statehood": "2.1.1", + "subtext": "1.1.1", + "topo": "1.0.2", + "vision": "2.0.1" + }, + "dependencies": { + "accept": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/accept/-/accept-1.0.0.tgz", + "integrity": "sha1-g++IOWi4WkDFARYEKCoiD/AeYq0=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0" + } + }, + "ammo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ammo/-/ammo-1.0.0.tgz", + "integrity": "sha1-4FlIG/aAhzj66G1GT3L6DBLWeoU=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0" + } + }, + "boom": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.7.2.tgz", + "integrity": "sha1-2tYo2Jf3/S4yzIIZfxMweXHPg1Q=", + "dev": true, + "requires": { + "hoek": "2.14.0" + } + }, + "call": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/call/-/call-2.0.1.tgz", + "integrity": "sha1-SbQnCZQ96JoyJYqpEbWHUeI3eg4=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0" + } + }, + "catbox": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/catbox/-/catbox-4.3.0.tgz", + "integrity": "sha1-IiN3vWfxKRrA4l0AAC0GWp3385o=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0", + "joi": "6.4.1" + } + }, + "catbox-memory": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/catbox-memory/-/catbox-memory-1.1.1.tgz", + "integrity": "sha1-QqUvgLye+nJmAeltQBYDNhJIGig=", + "dev": true, + "requires": { + "hoek": "2.14.0" + } + }, + "cryptiles": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz", + "integrity": "sha1-CeoXdbnhx95+YKmdQqtvCM4aEoU=", + "dev": true, + "requires": { + "boom": "2.7.2" + } + }, + "h2o2": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/h2o2/-/h2o2-4.0.1.tgz", + "integrity": "sha1-eg4rztHZcXjsVs48ykjgxW3un40=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0", + "joi": "6.4.1", + "wreck": "6.0.0" + } + }, + "heavy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/heavy/-/heavy-3.0.0.tgz", + "integrity": "sha1-/QEIdiExYy+IVIontVQSws9SKwA=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0", + "joi": "6.4.1" + } + }, + "hoek": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.14.0.tgz", + "integrity": "sha1-gSEWkfUqWoNa5J7b8eickANHaqQ=", + "dev": true + }, + "inert": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/inert/-/inert-2.1.5.tgz", + "integrity": "sha1-eybZTEHGLAPsHU726LRe1WuDSFk=", + "dev": true, + "requires": { + "ammo": "1.0.0", + "boom": "2.7.2", + "hoek": "2.14.0", + "items": "1.1.0", + "joi": "6.4.1", + "lru-cache": "2.6.4" + }, + "dependencies": { + "lru-cache": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.4.tgz", + "integrity": "sha1-JnUZDM0bBwHsL2UqTQ09QA12wN0=", + "dev": true + } + } + }, + "iron": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/iron/-/iron-2.1.2.tgz", + "integrity": "sha1-WR2RiiVAdTxEbY5DfNzwz6gBEU8=", + "dev": true, + "requires": { + "boom": "2.7.2", + "cryptiles": "2.0.4", + "hoek": "2.14.0" + } + }, + "items": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/items/-/items-1.1.0.tgz", + "integrity": "sha1-rZ1VhAsimGDLPRYLMidMLUvZ4mI=", + "dev": true + }, + "joi": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.4.1.tgz", + "integrity": "sha1-9Q9CRTVgBo5jg9oVrC0w3Xzra24=", + "dev": true, + "requires": { + "hoek": "2.14.0", + "isemail": "1.1.1", + "moment": "2.10.3", + "topo": "1.0.2" + }, + "dependencies": { + "isemail": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.1.1.tgz", + "integrity": "sha1-4Mj23D9HCX53dzlcaJYnGqJWw7U=", + "dev": true + }, + "moment": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.10.3.tgz", + "integrity": "sha1-CruZ8wf2UhgwjGk17+KcV7Ggon8=", + "dev": true + } + } + }, + "kilt": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/kilt/-/kilt-1.1.1.tgz", + "integrity": "sha1-d7SmFjyn+lshN6iMFzNCFuwj1ds=", + "dev": true, + "requires": { + "hoek": "2.14.0" + } + }, + "mimos": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mimos/-/mimos-2.0.2.tgz", + "integrity": "sha1-wyQXF+dblZkr54esfdbbGptTmx4=", + "dev": true, + "requires": { + "hoek": "2.14.0", + "mime-db": "1.14.0" + }, + "dependencies": { + "mime-db": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.14.0.tgz", + "integrity": "sha1-1WHxC27mbbUflK5leilRp0IX7YM=", + "dev": true + } + } + }, + "peekaboo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/peekaboo/-/peekaboo-1.0.0.tgz", + "integrity": "sha1-wNspJq1lTSygH3ymUKtFkadk/EI=", + "dev": true + }, + "qs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz", + "integrity": "sha1-wx2bdOwn33XlQ6hseHKO2NRiNgc=", + "dev": true + }, + "shot": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/shot/-/shot-1.5.3.tgz", + "integrity": "sha1-SGEHREO8VHLCNRthpGtOrsAH9Xo=", + "dev": true, + "requires": { + "hoek": "2.14.0" + } + }, + "statehood": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/statehood/-/statehood-2.1.1.tgz", + "integrity": "sha1-AfFwtmxeklqvZ5qdMiulkYb8AAk=", + "dev": true, + "requires": { + "boom": "2.7.2", + "cryptiles": "2.0.4", + "hoek": "2.14.0", + "iron": "2.1.2", + "items": "1.1.0", + "joi": "6.4.1" + } + }, + "subtext": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/subtext/-/subtext-1.1.1.tgz", + "integrity": "sha1-DJGCWuZdUXhVWT2DHjPvdaKEFWs=", + "dev": true, + "requires": { + "boom": "2.7.2", + "content": "1.0.1", + "hoek": "2.14.0", + "pez": "1.0.0", + "qs": "4.0.0", + "wreck": "6.0.0" + }, + "dependencies": { + "content": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content/-/content-1.0.1.tgz", + "integrity": "sha1-gD60s7eJVGD9jGnGhMd1RmmvG6E=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0" + } + }, + "pez": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pez/-/pez-1.0.0.tgz", + "integrity": "sha1-hEMYpc5wku7d/6KV4YB5rHefoBg=", + "dev": true, + "requires": { + "b64": "2.0.0", + "boom": "2.7.2", + "content": "1.0.1", + "hoek": "2.14.0", + "nigel": "1.0.1" + }, + "dependencies": { + "b64": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/b64/-/b64-2.0.0.tgz", + "integrity": "sha1-tZlbJPR+v9nxMQF6bntdZHVvtvM=", + "dev": true, + "requires": { + "hoek": "2.14.0" + } + }, + "nigel": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nigel/-/nigel-1.0.1.tgz", + "integrity": "sha1-RjmJr4gSePuqHTzJOCPb0XtDYKE=", + "dev": true, + "requires": { + "hoek": "2.14.0", + "vise": "1.0.0" + }, + "dependencies": { + "vise": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vise/-/vise-1.0.0.tgz", + "integrity": "sha1-KDRb5N5aNB4V/SgW/Z6j5zA+jfM=", + "dev": true, + "requires": { + "hoek": "2.14.0" + } + } + } + } + } + } + } + }, + "topo": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.0.2.tgz", + "integrity": "sha1-QhV8N8HeTTeIPM3R1skChHqGDbk=", + "dev": true, + "requires": { + "hoek": "2.14.0" + } + }, + "vision": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/vision/-/vision-2.0.1.tgz", + "integrity": "sha1-0BIlW6buQm0GlqNOHfMy/sVeZzw=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0", + "items": "1.1.0", + "joi": "6.4.1" + } + }, + "wreck": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/wreck/-/wreck-6.0.0.tgz", + "integrity": "sha1-T0CGaWHl14rOBPMqa38x8/PFFjg=", + "dev": true, + "requires": { + "boom": "2.7.2", + "hoek": "2.14.0" + } + } + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "requires": { + "function-bind": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" + } + }, + "has-ansi": { + "version": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "hash-stream-validation": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/hash-stream-validation/-/hash-stream-validation-0.2.1.tgz", + "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", + "requires": { + "through2": "2.0.3" + } + }, + "hasha": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", + "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "pinkie-promise": "2.0.1" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" + }, + "highlight.js": { + "version": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz", + "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=" + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "home-or-tmp": { + "version": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + } + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", + "dev": true + }, + "html-to-text": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-3.1.0.tgz", + "integrity": "sha1-fwfvIXPloEQecxXBkgE6AKUtXko=", + "requires": { + "he": "1.1.1", + "htmlparser2": "3.9.2", + "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "underscore": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "underscore.string": "3.3.4" + }, + "dependencies": { + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "requires": { + "sprintf-js": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + } + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.1", + "domutils": "1.6.2", + "entities": "1.1.1", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "readable-stream": "2.3.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "http-parser-js": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.8.tgz", + "integrity": "sha512-jmHp99g6/fLx0pRNJqzsQgjsclCHAY7NhIeA3/U+bsGNvgbvUCQFQY9m5AYpqpAxY/2VcikfbKpjQozSTiz0jA==", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "dev": true, + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + }, + "ignore": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz", + "integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw==", + "dev": true + }, + "imap": { + "version": "0.8.19", + "resolved": "https://registry.npmjs.org/imap/-/imap-0.8.19.tgz", + "integrity": "sha1-NniHOTSrCc6mukh0HyhNoq9Z2NU=", + "requires": { + "readable-stream": "1.1.14", + "utf7": "1.0.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "inherits-ex": { + "version": "https://registry.npmjs.org/inherits-ex/-/inherits-ex-1.1.8.tgz", + "integrity": "sha1-9wmppZxYqT3f4B01MOZyR7rim+M=", + "requires": { + "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + }, + "inquirer": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz", + "integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=", + "dev": true, + "requires": { + "ansi-escapes": "1.4.0", + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.0.5", + "figures": "2.0.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx": "4.1.0", + "string-width": "2.1.1", + "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "through": "2.3.8" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + } + } + }, + "invariant": { + "version": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" + } + }, + "is": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", + "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=" + }, + "is-absolute": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz", + "integrity": "sha1-hHSREZ/MtftDYhfMc39/qtUPYD8=", + "dev": true, + "requires": { + "is-relative": "0.1.3" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.10.0" + } + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-my-json-valid": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", + "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "dev": true, + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "4.0.1", + "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "1.0.1" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, + "is-relative": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz", + "integrity": "sha1-kF/uiuhvRbPsYUvDwVyGnfCHboI=", + "dev": true + }, + "is-resolvable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "dev": true, + "requires": { + "tryit": "1.0.3" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-stream-ended": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.3.tgz", + "integrity": "sha1-oEc7Jnx1ZjVIa+7cfjNE5UnRUqw=" + }, + "is-subset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", + "dev": true + }, + "is-supported-regexp-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.0.tgz", + "integrity": "sha1-i1IMhfrnolM4LUsCZS4EVXbhO7g=", + "dev": true + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "1.6.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isnumeric": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/isnumeric/-/isnumeric-0.2.0.tgz", + "integrity": "sha1-ojR7o2DeGeM9D/1ZD933dVy/LmQ=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jasmine": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "7.1.2", + "jasmine-core": "2.8.0" + } + }, + "jasmine-core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", + "dev": true + }, + "javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k=", + "dev": true + }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" + }, + "jquery": { + "version": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz", + "integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=" + }, + "js-base64": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.3.2.tgz", + "integrity": "sha512-Y2/+DnfJJXT1/FCwUebUhLWb3QihxiSC42+ctHLGogmW2jPY6LCapMdFZXRvVP2z6qyKW7s6qncE/9gSqZiArw==", + "dev": true + }, + "js-tokens": { + "version": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz", + "integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=", + "dev": true + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "jschardet": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", + "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==", + "dev": true + }, + "jsesc": { + "version": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "json5": { + "version": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz", + "integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0=", + "dev": true + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, + "kew": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", + "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "known-css-properties": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.3.0.tgz", + "integrity": "sha512-QMQcnKAiQccfQTqtBh/qwquGZ2XK/DXND1jrcN9M8gMMy99Gwla7GQjndVUsEqIaRyP6bsFRuhwRj5poafBGJQ==", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "libbase64": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", + "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=" + }, + "libmime": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.1.0.tgz", + "integrity": "sha1-EVAS8WcgUa3IgJqPk5Vf/DZI7fk=", + "requires": { + "iconv-lite": "0.4.15", + "libbase64": "0.1.0", + "libqp": "1.1.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" + } + } + }, + "libqp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", + "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=" + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "lodash": { + "version": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "dev": true, + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._basecreate": "3.0.3", + "lodash._isiterateecall": "3.0.9" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.noop": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-3.0.1.tgz", + "integrity": "sha1-OBiPTWUKOkdCWEObluxFsyYXEzw=" + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "dev": true, + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.templatesettings": "4.1.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "dev": true, + "requires": { + "lodash._reinterpolate": "3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-driver": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", + "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=" + }, + "log-symbols": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.1.0.tgz", + "integrity": "sha512-zLeLrzMA1A2vRF1e/0Mo+LNINzi6jzBylHj5WqvQ/WK/5WCZt8si9SyN4p9llr/HRYvVR1AoXHRHl4WTHyQAzQ==", + "dev": true, + "requires": { + "chalk": "2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "supports-color": "4.4.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "loglevel": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.4.1.tgz", + "integrity": "sha1-lbOD+Ro8J1b9SrCTZn5DCRYfK80=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "mailparser-node4": { + "version": "2.0.2-2", + "resolved": "https://registry.npmjs.org/mailparser-node4/-/mailparser-node4-2.0.2-2.tgz", + "integrity": "sha1-IK4hESKWWldb3a6bTADTwtgkR/U=", + "requires": { + "addressparser": "1.0.1", + "array-includes": "3.0.3", + "buffer-shims": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "he": "1.1.1", + "html-to-text": "3.1.0", + "iconv-lite": "0.4.15", + "libmime": "3.1.0", + "mailsplit-node4": "4.0.1", + "marked": "0.3.6" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" + } + } + }, + "mailsplit-node4": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mailsplit-node4/-/mailsplit-node4-4.0.1.tgz", + "integrity": "sha1-XVEiiDVA/Ac/fQcWwv9ntlDP1oI=", + "requires": { + "buffer-shims": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "libbase64": "0.1.0", + "libmime": "3.1.0", + "libqp": "1.1.0" + } + }, + "make-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", + "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", + "requires": { + "pify": "2.3.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "marked": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", + "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=" + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "dev": true + }, + "mathjs": { + "version": "3.16.3", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-3.16.3.tgz", + "integrity": "sha512-lb7Q0+4RCFdAJk/+01nDpRuQfoPm2EXmAy9LSa8nXzAQjeTqeLELdsQsRlMBDvJ53KXC7IOTHdhBOwZd7Q6FjQ==", + "dev": true, + "requires": { + "complex.js": "2.0.4", + "decimal.js": "7.2.3", + "fraction.js": "4.0.2", + "javascript-natural-sort": "0.7.1", + "seed-random": "2.2.0", + "tiny-emitter": "2.0.0", + "typed-function": "0.10.5" + } + }, + "mathml-tag-names": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.0.1.tgz", + "integrity": "sha1-jUEmgWi/htEQK5gQnijlMeejRXg=", + "dev": true + }, + "media-typer": { + "version": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "meteor-promise": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/meteor-promise/-/meteor-promise-0.8.6.tgz", + "integrity": "sha512-HP6tOr67z/9XU2Dr0F2SSr8WRTuE23AG9Dj578DCJPEYHs67OLKBviU8A8rwvbwMD7Lu2+Of+yAMz2Wd8r4yxg==", + "dev": true + }, + "methmeth": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/methmeth/-/methmeth-1.1.0.tgz", + "integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk=" + }, + "methods": { + "version": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime": { + "version": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", + "integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA=" + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-type": { + "version": "https://registry.npmjs.org/mime-type/-/mime-type-3.0.5.tgz", + "integrity": "sha1-ftKSan2oImifgSVPWYf+lQNiLpo=", + "requires": { + "media-typer": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "path.js": "https://registry.npmjs.org/path.js/-/path.js-1.0.7.tgz", + "util-ex": "https://registry.npmjs.org/util-ex/-/util-ex-0.3.15.tgz" + } + }, + "mime-types": { + "version": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "requires": { + "mime-db": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz" + }, + "dependencies": { + "mime-db": { + "version": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=" + } + } + }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "dev": true + }, + "minimatch": { + "version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "requires": { + "brace-expansion": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz" + } + }, + "minimist": { + "version": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + }, + "mocha": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "2.6.8", + "diff": "3.2.0", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "glob": "7.1.1", + "growl": "1.9.2", + "he": "1.1.1", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "supports-color": "3.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "once": "1.4.0", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "mock-require": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mock-require/-/mock-require-2.0.2.tgz", + "integrity": "sha1-HqpxqtIwE3c9En3H6Ro/u0g31g0=", + "dev": true, + "requires": { + "caller-id": "0.1.0" + } + }, + "modelo": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/modelo/-/modelo-4.2.0.tgz", + "integrity": "sha1-O0tCACOmbKfjK9uhbnEJN+FNGws=" + }, + "modify-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz", + "integrity": "sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=", + "dev": true + }, + "module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", + "dev": true + }, + "moment": { + "version": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" + }, + "moment-timezone": { + "version": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.13.tgz", + "integrity": "sha1-mc5cfYJyYusPH3AgRBd/YHRde5A=", + "requires": { + "moment": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz" + } + }, + "ms": { + "version": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-forge": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", + "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=" + }, + "node-pre-gyp": { + "version": "0.6.36", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", + "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "requires": { + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.4.1", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "requires": { - "jsbn": "0.1.1" + "abbrev": "1.1.0", + "osenv": "0.1.4" } }, - "ecdsa-sig-formatter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", - "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, "requires": { - "base64url": "2.0.0", - "safe-buffer": "5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - } + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" } }, - "emailreplyparser": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/emailreplyparser/-/emailreplyparser-0.0.5.tgz", - "integrity": "sha1-BpYswKRCFnWbo7mOOyV3wM4w/Aw=" - }, - "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, "requires": { - "once": "1.4.0" + "remove-trailing-separator": "1.1.0" } }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + "normalize-selector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", + "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", + "dev": true }, - "es-abstract": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.7.0.tgz", - "integrity": "sha1-363ndOAb/Nl/lhgCmMRJyGI/uUw=", - "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "is-callable": "1.1.3", - "is-regex": "1.0.4" - } + "npm-install-package": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/npm-install-package/-/npm-install-package-2.1.0.tgz", + "integrity": "sha1-1+/jz816sAYUuJbqUxGdyaslkSU=", + "dev": true }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, - "escape-string-regexp": { - "version": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "esutils": { - "version": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", "dev": true }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" - }, - "extend": { - "version": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "number-is-nan": { + "version": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, - "file-type": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.1.0.tgz", - "integrity": "sha1-Wn26mBOPoKvsevxD5amgsqrHKfE=" + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, - "foreach": { - "version": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "object-keys": { + "version": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" }, - "form-data": { - "version": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "object.assign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.0.4.tgz", + "integrity": "sha1-scnMBE7xuf5jYG/BQau7MuFHMMw=", + "dev": true, "requires": { - "asynckit": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "mime-types": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz" + "define-properties": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "function-bind": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "object-keys": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz" } }, - "formidable": { - "version": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", - "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, "requires": { - "graceful-fs": "4.1.11", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "rimraf": "2.6.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "fstream": "1.0.11", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + "wrappy": "1.0.2" } }, - "function-bind": { - "version": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" + "onecolor": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/onecolor/-/onecolor-2.4.2.tgz", + "integrity": "sha1-pT7D/xccNEYBbdUhDRobVEv32HQ=", + "dev": true }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, "requires": { - "aproba": "1.1.2", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "wide-align": "1.1.2" + "mimic-fn": "1.1.0" } }, - "gcp-metadata": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.3.0.tgz", - "integrity": "sha512-puqMtZV/eukdfsafq0tir21+/k9hPbN9FRhgeN7NwtvEJQaviJoZOOlh1+dBeWgsRSYwAqcEVh63grU7a6bJyw==", + "optimist": { + "version": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "requires": { - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "retry-request": "3.0.0" + "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "wordwrap": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" }, "dependencies": { - "retry-request": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.0.0.tgz", - "integrity": "sha1-i60rHc8Ek4uyEeLO2GLlkbgvGRc=", - "requires": { - "request": "2.81.0", - "through2": "2.0.3" - } + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true } } }, - "gcs-resumable-upload": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz", - "integrity": "sha512-Ps/yvSzdNL41oiRzSE8UgjcW8hdNQNyMqdsDSmCAn+fwWG8Sg5TR2CqSPchkMiYQQDqN7WWkheTEd0w1hfn/dw==", + "os-homedir": { + "version": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", "requires": { - "buffer-equal": "1.0.0", - "configstore": "3.1.1", - "google-auto-auth": "0.7.2", - "pumpify": "1.3.5", - "request": "2.81.0", - "stream-events": "1.0.2", - "through2": "2.0.3" + "os-homedir": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" } }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" } }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "once": "1.4.0", - "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + "error-ex": "1.3.1" } }, - "globals": { - "version": "https://registry.npmjs.org/globals/-/globals-9.17.0.tgz", - "integrity": "sha1-DAymltm5u2lNLlRwvTd3fKrVAoY=", + "path-exists": { + "version": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", + "dev": true + }, + "path-is-absolute": { + "version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, - "google-auth-library": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-0.10.0.tgz", - "integrity": "sha1-bhW6vuhf0d0U2NEoopW2g41SE24=", - "requires": { - "gtoken": "1.2.2", - "jws": "3.1.4", - "lodash.noop": "3.0.1", - "request": "2.81.0" - } + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true }, - "google-auto-auth": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.2.tgz", - "integrity": "sha512-ux2n2AE2g3+vcLXwL4dP/M12SFMRX5dzCzBfhAEkTeAB7dpyGdOIEj7nmUx0BHKaCcUQrRWg9kT63X/Mmtk1+A==", + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, "requires": { - "async": "2.5.0", - "gcp-metadata": "0.3.0", - "google-auth-library": "0.10.0", - "request": "2.81.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, - "google-p12-pem": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-0.1.2.tgz", - "integrity": "sha1-M8RqsCGqc0+gMys5YKmj/8svMXc=", + "path.js": { + "version": "https://registry.npmjs.org/path.js/-/path.js-1.0.7.tgz", + "integrity": "sha1-fRNrYH3hm/2YugaIdJJih+ZTSTk=", "requires": { - "node-forge": "0.7.1" + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "inherits-ex": "https://registry.npmjs.org/inherits-ex/-/inherits-ex-1.1.8.tgz", + "util-ex": "https://registry.npmjs.org/util-ex/-/util-ex-0.3.15.tgz" } }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true }, - "gtoken": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-1.2.2.tgz", - "integrity": "sha1-Fyd2oanZasCfwioA9b6DzubeiCA=", + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + }, + "phantomjs-prebuilt": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.13.tgz", + "integrity": "sha1-ZlVq2ell2JPKWn3J52PffoaX920=", + "dev": true, "requires": { - "google-p12-pem": "0.1.2", - "jws": "3.1.4", - "mime": "1.4.0", - "request": "2.81.0" + "es6-promise": "4.0.5", + "extract-zip": "1.5.0", + "fs-extra": "0.30.0", + "hasha": "2.2.0", + "kew": "0.7.0", + "progress": "1.1.8", + "request": "2.74.0", + "request-progress": "2.0.1", + "which": "1.2.14" }, "dependencies": { - "mime": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.0.tgz", - "integrity": "sha512-n9ChLv77+QQEapYz8lV+rIZAW3HhAPW2CXnzb1GN5uMkuczshwvkW7XPsbzU0ZQN3sP47Er2KVkp2p3KyqZKSQ==" + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true + }, + "concat-stream": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz", + "integrity": "sha1-U/fUPFHF5D+ByP3QMyHGMb5o1hE=", + "dev": true, + "requires": { + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "readable-stream": "2.0.6", + "typedarray": "0.0.6" + } + }, + "debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk=", + "dev": true + }, + "extract-zip": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.5.0.tgz", + "integrity": "sha1-ksz22B73Cp+kwXRxFMzvbYaIpsQ=", + "dev": true, + "requires": { + "concat-stream": "1.5.0", + "debug": "0.7.4", + "mkdirp": "0.5.0", + "yauzl": "2.4.1" + } + }, + "form-data": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz", + "integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=", + "dev": true, + "requires": { + "async": "2.5.0", + "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "mime-types": "2.1.17" + } + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "2.4.0", + "klaw": "1.3.1", + "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "rimraf": "2.6.1" + } + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "commander": "2.9.0", + "is-my-json-valid": "2.16.1", + "pinkie-promise": "2.0.1" + } + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "dev": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "mkdirp": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", + "dev": true, + "requires": { + "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", + "dev": true + }, + "qs": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "string_decoder": "0.10.31", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "request": { + "version": "2.74.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.74.0.tgz", + "integrity": "sha1-dpPKdou7DqXIzgjAhKRe+gW4kqs=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "bl": "1.1.2", + "caseless": "0.11.0", + "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "forever-agent": "0.6.1", + "form-data": "1.0.1", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "node-uuid": "1.4.8", + "oauth-sign": "0.8.2", + "qs": "6.2.3", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.4.3" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true } } }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + "photoswipe": { + "version": "https://registry.npmjs.org/photoswipe/-/photoswipe-4.1.2.tgz", + "integrity": "sha1-lcIKdc6iO3DWKZZBytguA8rn95c=" }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "pinkie": "2.0.4" } }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "pixrem": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pixrem/-/pixrem-3.0.2.tgz", + "integrity": "sha1-MNG6+0w73Ojpu0vVahOYVhkyDDQ=", + "dev": true, "requires": { - "function-bind": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" + "browserslist": "1.7.7", + "postcss": "5.2.17", + "reduce-css-calc": "1.3.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "1.0.30000738", + "electron-to-chromium": "1.3.22" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "has-ansi": { - "version": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "pleeease-filters": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pleeease-filters/-/pleeease-filters-3.0.1.tgz", + "integrity": "sha1-Tf4OjxBGYTUXxktyi8gGCKfr8i8=", "dev": true, "requires": { - "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + "onecolor": "2.4.2", + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true }, - "hash-stream-validation": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/hash-stream-validation/-/hash-stream-validation-0.2.1.tgz", - "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", + "poplib": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/poplib/-/poplib-0.1.7.tgz", + "integrity": "sha1-L0tYtVkpcjUM2X9IKrpo+OBVdLw=", "requires": { - "through2": "2.0.3" + "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" } }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "postcss": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.12.tgz", + "integrity": "sha512-K6SLofXEK43FBSyZ6/ExQV7ji24OEw4tEY6x1CAf7+tcoMWJoO24Rf3rVFVpk+5IQL1e1Cy3sTKfg7hXuLzafg==", + "dev": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "chalk": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "supports-color": "4.4.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } } }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" - }, - "highlight.js": { - "version": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz", - "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=" - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" - }, - "home-or-tmp": { - "version": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "postcss-apply": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/postcss-apply/-/postcss-apply-0.3.0.tgz", + "integrity": "sha1-ovN8W9+ogeTBX08kXsDNlt0ucNU=", "dev": true, "requires": { - "os-homedir": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + "balanced-match": "0.4.2", + "postcss": "5.2.17" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "html-to-text": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-3.1.0.tgz", - "integrity": "sha1-fwfvIXPloEQecxXBkgE6AKUtXko=", + "postcss-attribute-case-insensitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-1.0.1.tgz", + "integrity": "sha1-zrc3d+EGFn6yM/GTjJvZ8uaXMI0=", + "dev": true, "requires": { - "he": "1.1.1", - "htmlparser2": "3.9.2", - "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "underscore": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "underscore.string": "3.3.4" + "postcss": "5.2.17", + "postcss-selector-parser": "2.2.3" }, "dependencies": { - "underscore.string": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", - "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, "requires": { - "sprintf-js": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" } } } }, - "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "dev": true, "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.4.1", - "domutils": "1.6.2", - "entities": "1.1.1", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readable-stream": "2.3.3" + "postcss": "5.2.17", + "postcss-message-helpers": "2.0.0", + "reduce-css-calc": "1.3.0" }, "dependencies": { - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" } }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, "requires": { - "safe-buffer": "5.1.1" + "has-flag": "1.0.0" } } } }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "postcss-color-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-color-function/-/postcss-color-function-2.0.1.tgz", + "integrity": "sha1-mtIm9VDop8f4uKd4YFRbbdf1UkE=", + "dev": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" + "css-color-function": "1.3.0", + "postcss": "5.2.17", + "postcss-message-helpers": "2.0.0", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" - }, - "imap": { - "version": "0.8.19", - "resolved": "https://registry.npmjs.org/imap/-/imap-0.8.19.tgz", - "integrity": "sha1-NniHOTSrCc6mukh0HyhNoq9Z2NU=", + "postcss-color-gray": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/postcss-color-gray/-/postcss-color-gray-3.0.1.tgz", + "integrity": "sha1-dEMu3mbdg7HRNjVlxos3bhj/Z3A=", + "dev": true, "requires": { - "readable-stream": "1.1.14", - "utf7": "1.0.2" + "color": "0.11.4", + "postcss": "5.2.17", + "postcss-message-helpers": "2.0.0", + "reduce-function-call": "1.0.2" }, "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "0.0.1", - "string_decoder": "0.10.31" + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "postcss-color-hex-alpha": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-2.0.0.tgz", + "integrity": "sha1-RP1uyt5mAoZIyIHLZQTNy/3GzQk=", + "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "color": "0.10.1", + "postcss": "5.2.17", + "postcss-message-helpers": "2.0.0" + }, + "dependencies": { + "color": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/color/-/color-0.10.1.tgz", + "integrity": "sha1-wEGI34KiCd3rzOzazT7DIPGTc58=", + "dev": true, + "requires": { + "color-convert": "0.5.3", + "color-string": "0.3.0" + } + }, + "color-convert": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz", + "integrity": "sha1-vbbGnOZg+t/+CwAHzER+G59ygr0=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "inherits": { - "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inherits-ex": { - "version": "https://registry.npmjs.org/inherits-ex/-/inherits-ex-1.1.8.tgz", - "integrity": "sha1-9wmppZxYqT3f4B01MOZyR7rim+M=", + "postcss-color-hsl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-color-hsl/-/postcss-color-hsl-1.0.5.tgz", + "integrity": "sha1-9Tuxw0gxDOMHrYnjGBqGRzi15oc=", + "dev": true, "requires": { - "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0", + "units-css": "0.4.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" - }, - "invariant": { - "version": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "postcss-color-hwb": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-color-hwb/-/postcss-color-hwb-2.0.1.tgz", + "integrity": "sha1-1jr6+bcMtZX5AKKcn+V78qMvq+w=", "dev": true, "requires": { - "loose-envify": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" + "color": "0.11.4", + "postcss": "5.2.17", + "postcss-message-helpers": "2.0.0", + "reduce-function-call": "1.0.2" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "is": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", - "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=" - }, - "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-finite": { - "version": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "postcss-color-rebeccapurple": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-2.0.1.tgz", + "integrity": "sha1-dMZETny7fYVhO19yht96SRYIRRw=", "dev": true, "requires": { - "number-is-nan": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + "color": "0.11.4", + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "postcss-color-rgb": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/postcss-color-rgb/-/postcss-color-rgb-1.1.4.tgz", + "integrity": "sha1-8pJD4i6OjBNDRHQJI3LUzmBb6Lw=", + "dev": true, "requires": { - "number-is-nan": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "postcss-color-rgba-fallback": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-color-rgba-fallback/-/postcss-color-rgba-fallback-2.2.0.tgz", + "integrity": "sha1-bSlJG+WZCpMXPUfnx29YELCUAro=", + "dev": true, "requires": { - "has": "1.0.1" + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0", + "rgb-hex": "1.0.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "is-stream-ended": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.3.tgz", - "integrity": "sha1-oEc7Jnx1ZjVIa+7cfjNE5UnRUqw=" - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" - }, - "jquery": { - "version": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz", - "integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=" - }, - "js-tokens": { - "version": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz", - "integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=", - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "jsesc": { - "version": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "postcss-cssnext": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/postcss-cssnext/-/postcss-cssnext-2.11.0.tgz", + "integrity": "sha1-MeaPAB5AlgTacDtm3hS4uMjJ8rE=", + "dev": true, "requires": { - "jsonify": "0.0.0" + "autoprefixer": "6.7.7", + "caniuse-api": "1.6.1", + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "pixrem": "3.0.2", + "pleeease-filters": "3.0.1", + "postcss": "5.2.17", + "postcss-apply": "0.3.0", + "postcss-attribute-case-insensitive": "1.0.1", + "postcss-calc": "5.3.1", + "postcss-color-function": "2.0.1", + "postcss-color-gray": "3.0.1", + "postcss-color-hex-alpha": "2.0.0", + "postcss-color-hsl": "1.0.5", + "postcss-color-hwb": "2.0.1", + "postcss-color-rebeccapurple": "2.0.1", + "postcss-color-rgb": "1.1.4", + "postcss-color-rgba-fallback": "2.2.0", + "postcss-custom-media": "5.0.1", + "postcss-custom-properties": "5.0.2", + "postcss-custom-selectors": "3.0.0", + "postcss-font-family-system-ui": "1.0.2", + "postcss-font-variant": "2.0.1", + "postcss-image-set-polyfill": "0.3.5", + "postcss-initial": "1.5.3", + "postcss-media-minmax": "2.1.2", + "postcss-nesting": "2.3.1", + "postcss-pseudo-class-any-link": "1.0.0", + "postcss-pseudoelements": "3.0.0", + "postcss-replace-overflow-wrap": "1.0.0", + "postcss-selector-matches": "2.0.5", + "postcss-selector-not": "2.0.0" + }, + "dependencies": { + "autoprefixer": { + "version": "6.7.7", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", + "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "dev": true, + "requires": { + "browserslist": "1.7.7", + "caniuse-db": "1.0.30000738", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "1.0.30000738", + "electron-to-chromium": "1.3.22" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "json-stringify-safe": { + "postcss-custom-media": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json5": { - "version": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz", - "integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0=", - "dev": true - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-5.0.1.tgz", + "integrity": "sha1-E40loYS/LrVN4S1VpsAcMKnYvYE=", + "dev": true, "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" + "postcss": "5.2.17" }, "dependencies": { - "assert-plus": { + "has-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "jwa": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "postcss-custom-properties": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-5.0.2.tgz", + "integrity": "sha1-lxnXjy2pz59TgQrrwj1GVhMKzrE=", + "dev": true, "requires": { - "base64url": "2.0.0", - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.9", - "safe-buffer": "5.1.1" + "balanced-match": "0.4.2", + "postcss": "5.2.17" }, "dependencies": { - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "jws": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "postcss-custom-selectors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-3.0.0.tgz", + "integrity": "sha1-j4Ekn17Qeo0JF89qOf5bBWt/lqw=", + "dev": true, "requires": { - "base64url": "2.0.0", - "jwa": "1.1.5", - "safe-buffer": "5.1.1" + "balanced-match": "0.2.1", + "postcss": "5.2.17", + "postcss-selector-matches": "2.0.5" }, "dependencies": { - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "balanced-match": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz", + "integrity": "sha1-e8ZYtL7WHu5CStdPdfXD4sTfPMc=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "libbase64": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", - "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=" - }, - "libmime": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.1.0.tgz", - "integrity": "sha1-EVAS8WcgUa3IgJqPk5Vf/DZI7fk=", + "postcss-font-family-system-ui": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/postcss-font-family-system-ui/-/postcss-font-family-system-ui-1.0.2.tgz", + "integrity": "sha1-PhpeP7fjHl6ecUOcyw6AFFVpJ8c=", + "dev": true, + "requires": { + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-font-variant": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-2.0.1.tgz", + "integrity": "sha1-fKKRA/WfoCyjrOLKIrL3VoU9Tvg=", + "dev": true, "requires": { - "iconv-lite": "0.4.15", - "libbase64": "0.1.0", - "libqp": "1.1.0" + "postcss": "5.2.17" }, "dependencies": { - "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "libqp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", - "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=" - }, - "lodash": { - "version": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "lodash.noop": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-3.0.1.tgz", - "integrity": "sha1-OBiPTWUKOkdCWEObluxFsyYXEzw=" - }, - "log-driver": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", - "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=" - }, - "loose-envify": { - "version": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "postcss-image-set-polyfill": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/postcss-image-set-polyfill/-/postcss-image-set-polyfill-0.3.5.tgz", + "integrity": "sha1-Dxk0E3AM8fgr05Bm7wFtZaShgYE=", "dev": true, "requires": { - "js-tokens": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz" + "postcss": "6.0.12", + "postcss-media-query-parser": "0.2.3" } }, - "mailparser-node4": { - "version": "2.0.2-2", - "resolved": "https://registry.npmjs.org/mailparser-node4/-/mailparser-node4-2.0.2-2.tgz", - "integrity": "sha1-IK4hESKWWldb3a6bTADTwtgkR/U=", + "postcss-initial": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-1.5.3.tgz", + "integrity": "sha1-IMPpHJaCLdsb7UlQjbltVrrDd9A=", + "dev": true, "requires": { - "addressparser": "1.0.1", - "array-includes": "3.0.3", - "buffer-shims": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "he": "1.1.1", - "html-to-text": "3.1.0", - "iconv-lite": "0.4.15", - "libmime": "3.1.0", - "mailsplit-node4": "4.0.1", - "marked": "0.3.6" + "lodash.template": "4.4.0", + "postcss": "5.2.17" }, "dependencies": { - "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "mailsplit-node4": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mailsplit-node4/-/mailsplit-node4-4.0.1.tgz", - "integrity": "sha1-XVEiiDVA/Ac/fQcWwv9ntlDP1oI=", + "postcss-less": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-1.1.0.tgz", + "integrity": "sha1-vcx2vmTEMk2HP7xc2foueZ5DBfo=", + "dev": true, "requires": { - "buffer-shims": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "libbase64": "0.1.0", - "libmime": "3.1.0", - "libqp": "1.1.0" + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "make-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", - "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", + "postcss-media-minmax": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-2.1.2.tgz", + "integrity": "sha1-RExc+JJqteT9iiUJ6Sl+dRZJzfg=", + "dev": true, "requires": { - "pify": "2.3.0" + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "marked": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", - "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=" - }, - "media-typer": { - "version": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "methmeth": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/methmeth/-/methmeth-1.1.0.tgz", - "integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk=" - }, - "methods": { - "version": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", "dev": true }, - "mime": { - "version": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", - "integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA=", + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", "dev": true }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" - }, - "mime-type": { - "version": "https://registry.npmjs.org/mime-type/-/mime-type-3.0.5.tgz", - "integrity": "sha1-ftKSan2oImifgSVPWYf+lQNiLpo=", + "postcss-nesting": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-2.3.1.tgz", + "integrity": "sha1-lKa2pO9wf77CCof+5clXdZtOAc8=", + "dev": true, "requires": { - "media-typer": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "path.js": "https://registry.npmjs.org/path.js/-/path.js-1.0.7.tgz", - "util-ex": "https://registry.npmjs.org/util-ex/-/util-ex-0.3.15.tgz" + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "mime-types": { - "version": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "postcss-pseudo-class-any-link": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-1.0.0.tgz", + "integrity": "sha1-kDI5GWQB0zX+c6x1YYb6YuaTryY=", + "dev": true, "requires": { - "mime-db": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz" + "postcss": "5.2.17", + "postcss-selector-parser": "1.3.3" }, "dependencies": { - "mime-db": { - "version": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", - "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=" + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "postcss-selector-parser": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-1.3.3.tgz", + "integrity": "sha1-0u4Z33pk+O8hwacchvfUg1yIwoE=", + "dev": true, + "requires": { + "flatten": "1.0.2", + "indexes-of": "1.0.1", + "uniq": "1.0.1" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "minimatch": { - "version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "postcss-pseudoelements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-pseudoelements/-/postcss-pseudoelements-3.0.0.tgz", + "integrity": "sha1-bGghd8eQC6BTtt8X+MWQKEx7i7w=", + "dev": true, "requires": { - "brace-expansion": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz" + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "postcss-replace-overflow-wrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-1.0.0.tgz", + "integrity": "sha1-8KA7Meq5Y2ppNr/SEOKu8bQ0pkM=", + "dev": true, "requires": { - "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - } - }, - "modelo": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/modelo/-/modelo-4.2.0.tgz", - "integrity": "sha1-O0tCACOmbKfjK9uhbnEJN+FNGws=" - }, - "moment": { - "version": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", - "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" - }, - "moment-timezone": { - "version": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.13.tgz", - "integrity": "sha1-mc5cfYJyYusPH3AgRBd/YHRde5A=", + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-reporter": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-5.0.0.tgz", + "integrity": "sha512-rBkDbaHAu5uywbCR2XE8a25tats3xSOsGNx6mppK6Q9kSFGKc/FyAzfci+fWM2l+K402p1D0pNcfDGxeje5IKg==", + "dev": true, "requires": { - "moment": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz" + "chalk": "2.1.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "log-symbols": "2.1.0", + "postcss": "6.0.12" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "supports-color": "4.4.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } } }, - "ms": { - "version": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=", "dev": true }, - "nan": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", - "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" - }, - "node-forge": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", - "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=" - }, - "node-pre-gyp": { - "version": "0.6.36", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", - "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "postcss-sass": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.1.0.tgz", + "integrity": "sha1-DSplW10kHsj0Gbs9o43lyhF0bds=", + "dev": true, "requires": { - "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "nopt": "4.0.1", - "npmlog": "4.1.2", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.4.1", - "tar": "2.2.1", - "tar-pack": "3.4.0" + "gonzales-pe": "4.2.2", + "mathjs": "3.16.3", + "postcss": "5.2.17" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "postcss-scss": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-1.0.2.tgz", + "integrity": "sha1-/0XPM1S4ee6JpOtoaA9GrJuxT5Q=", + "dev": true, "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" + "postcss": "6.0.12" } }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "postcss-selector-matches": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/postcss-selector-matches/-/postcss-selector-matches-2.0.5.tgz", + "integrity": "sha1-+g9Dvle2jneqTNEYBwI0kqExAn8=", + "dev": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "balanced-match": "0.4.2", + "postcss": "5.2.17" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "number-is-nan": { - "version": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-keys": { - "version": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "postcss-selector-not": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-2.0.0.tgz", + "integrity": "sha1-xzrSGj91I0vuf+4mnhVP1qhpeY0=", + "dev": true, "requires": { - "wrappy": "1.0.2" + "balanced-match": "0.2.1", + "postcss": "5.2.17" + }, + "dependencies": { + "balanced-match": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz", + "integrity": "sha1-e8ZYtL7WHu5CStdPdfXD4sTfPMc=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "js-base64": "2.3.2", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "optimist": { - "version": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "dev": true, "requires": { - "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "wordwrap": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + "flatten": "1.0.2", + "indexes-of": "1.0.1", + "uniq": "1.0.1" } }, - "os-homedir": { - "version": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "postcss-smart-import": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/postcss-smart-import/-/postcss-smart-import-0.7.5.tgz", + "integrity": "sha512-Bs9wAFxH5irGpenBg9a65jTcydZLh7VBTX6NYwMXvVXO6y9CQ83kRmfpQDs5lHhl6IODeIeQfJep5HBMd9UVCQ==", + "dev": true, "requires": { - "os-homedir": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + "babel-runtime": "6.26.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "object-assign": "4.1.1", + "postcss": "6.0.12", + "postcss-sass": "0.1.0", + "postcss-scss": "1.0.2", + "postcss-value-parser": "3.3.0", + "promise-each": "2.2.0", + "read-cache": "1.0.0", + "resolve": "1.4.0", + "sugarss": "1.0.0" } }, - "path-exists": { - "version": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", - "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", - "dev": true - }, - "path-is-absolute": { - "version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path.js": { - "version": "https://registry.npmjs.org/path.js/-/path.js-1.0.7.tgz", - "integrity": "sha1-fRNrYH3hm/2YugaIdJJih+ZTSTk=", + "postcss-sorting": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-3.0.2.tgz", + "integrity": "sha1-c+aRO3FUJiAdIuihdpsFAio3qvw=", + "dev": true, "requires": { - "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "inherits-ex": "https://registry.npmjs.org/inherits-ex/-/inherits-ex-1.1.8.tgz", - "util-ex": "https://registry.npmjs.org/util-ex/-/util-ex-0.3.15.tgz" + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "postcss": "6.0.12" } }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" - }, - "photoswipe": { - "version": "https://registry.npmjs.org/photoswipe/-/photoswipe-4.1.2.tgz", - "integrity": "sha1-lcIKdc6iO3DWKZZBytguA8rn95c=" + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true }, - "poplib": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/poplib/-/poplib-0.1.7.tgz", - "integrity": "sha1-L0tYtVkpcjUM2X9IKrpo+OBVdLw=", - "requires": { - "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" - } + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true }, "private": { "version": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", @@ -2448,6 +9076,12 @@ "version": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, "prom-client": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-10.1.0.tgz", @@ -2456,6 +9090,40 @@ "tdigest": "0.1.1" } }, + "promise-each": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/promise-each/-/promise-each-2.2.0.tgz", + "integrity": "sha1-M1MXTv8mlEgQN+BOAfd6oPttG2A=", + "dev": true, + "requires": { + "any-promise": "0.1.0" + } + }, + "proxyquire": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-1.8.0.tgz", + "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", + "dev": true, + "requires": { + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "pump": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", @@ -2480,6 +9148,12 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, + "q": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", + "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=", + "dev": true + }, "qs": { "version": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" @@ -2489,6 +9163,47 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, "rc": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", @@ -2507,6 +9222,36 @@ } } }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, "readable-stream": { "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", @@ -2521,11 +9266,107 @@ "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" } }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "math-expression-evaluator": "1.2.17", + "reduce-function-call": "1.0.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "dev": true, + "requires": { + "balanced-match": "0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, "regenerate": { "version": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=", "dev": true }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + }, "regenerator-transform": { "version": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz", "integrity": "sha1-On0GdSDLe3F2dp61/4aGkb7+EoM=", @@ -2536,6 +9377,15 @@ "private": "https://registry.npmjs.org/private/-/private-0.1.7.tgz" } }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, "regexpu-core": { "version": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", @@ -2566,6 +9416,24 @@ } } }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, "repeating": { "version": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", @@ -2618,6 +9486,80 @@ } } }, + "request-progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz", + "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=", + "dev": true, + "requires": { + "throttleit": "1.0.0" + } + }, + "requestretry": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.5.0.tgz", + "integrity": "sha1-7RV7ulNSbt6z7DKo5wSkmYvs5ic=", + "dev": true, + "requires": { + "fg-lodash": "0.0.2", + "request": "2.81.0" + } + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } + } + }, + "resolve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, "retry-request": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-2.0.5.tgz", @@ -2627,6 +9569,34 @@ "through2": "2.0.3" } }, + "rgb": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/rgb/-/rgb-0.1.0.tgz", + "integrity": "sha1-vieykej+/+rBvZlylyG/pA/AN7U=", + "dev": true + }, + "rgb-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rgb-hex/-/rgb-hex-1.0.0.tgz", + "integrity": "sha1-v6+M2c2RZLWibXHrTxWgllMks8E=", + "dev": true + }, + "rgb2hex": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.1.0.tgz", + "integrity": "sha1-zNVfhgrgxcTqN1BLlY5ELY0SMls=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, "rimraf": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", @@ -2635,26 +9605,227 @@ "glob": "7.1.2" } }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, "safe-buffer": { "version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", "dev": true }, + "saucelabs": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.4.0.tgz", + "integrity": "sha1-uTSpr52ih0s/QKrh/N5QpEZvXzg=", + "dev": true, + "requires": { + "https-proxy-agent": "1.0.0" + } + }, "sax": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" }, + "seed-random": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz", + "integrity": "sha1-KpsZ4lCoFwmSMaW5mk2vgLf77VQ=", + "dev": true + }, + "selenium-standalone": { + "version": "5.11.2", + "resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-5.11.2.tgz", + "integrity": "sha1-ckzKpy+ybzcR4OIJieR4xBM9+EQ=", + "dev": true, + "requires": { + "async": "1.2.1", + "commander": "2.6.0", + "lodash": "3.9.3", + "minimist": "1.1.0", + "mkdirp": "0.5.0", + "progress": "1.1.8", + "request": "2.79.0", + "tar-stream": "1.5.2", + "urijs": "1.16.1", + "which": "1.1.1", + "yauzl": "2.8.0" + }, + "dependencies": { + "async": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/async/-/async-1.2.1.tgz", + "integrity": "sha1-pIFqF81f9RbfosdpikUzabl5DeA=", + "dev": true + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true + }, + "commander": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", + "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", + "dev": true + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "requires": { + "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "commander": "2.11.0", + "is-my-json-valid": "2.16.1", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + } + } + }, + "lodash": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.9.3.tgz", + "integrity": "sha1-AVnoaDL+/8bWHYUrEqlTuZSWvTI=", + "dev": true + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "dev": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "minimist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz", + "integrity": "sha1-zfIl6ImPhAolje1E/JF3Z3Cv3JM=", + "dev": true + }, + "mkdirp": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", + "dev": true + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.11.0", + "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "forever-agent": "0.6.1", + "form-data": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "qs": "6.3.2", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.4.3", + "uuid": "3.1.0" + } + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true + }, + "which": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.1.1.tgz", + "integrity": "sha1-nOUSRZlGFm4SwIPwjsBzOA/Iy7s=", + "dev": true, + "requires": { + "is-absolute": "0.1.7" + } + }, + "yauzl": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz", + "integrity": "sha1-eUUK/yKyqcWkHvVOAtuQfM+/nuI=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13", + "fd-slicer": "1.0.1" + } + } + } + }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=" }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" + } + }, "shebang-regex": { "version": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", @@ -2665,11 +9836,54 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "simple-git": { + "version": "1.77.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.77.0.tgz", + "integrity": "sha1-UmU3RwuUbl9vk9ED71S0aUlgCTk=", + "dev": true, + "requires": { + "debug": "2.6.9" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "slash": { "version": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", "dev": true }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, "sntp": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", @@ -2683,12 +9897,66 @@ "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", "dev": true }, - "source-map-support": { - "version": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", - "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", + "source-map-resolve": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.3.1.tgz", + "integrity": "sha1-YQ9hIqRFuN1RU1oqcbeD38Ekh2E=", + "dev": true, + "requires": { + "atob": "1.1.3", + "resolve-url": "0.2.1", + "source-map-url": "0.3.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", + "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", + "dev": true, + "requires": { + "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + }, + "source-map-url": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.3.0.tgz", + "integrity": "sha1-fsrxO1e80J2opAxdJp2zN5nUqvk=", + "dev": true + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "specificity": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.3.2.tgz", + "integrity": "sha512-Nc/QN/A425Qog7j9aHmwOrlwX2e7pNI47ciwxwy4jOlvbbMHkNNJchit+FX+UjF3IAdiaaV5BKeWuDUnws6G1A==", + "dev": true + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "dev": true, "requires": { - "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + "through": "2.3.8" } }, "split-array-stream": { @@ -2700,6 +9968,15 @@ "is-stream-ended": "0.1.3" } }, + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "dev": true, + "requires": { + "through2": "2.0.3" + } + }, "sprintf-js": { "version": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" @@ -2726,6 +10003,12 @@ } } }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, "stream-events": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.2.tgz", @@ -2739,14 +10022,6 @@ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" }, - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", - "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", - "dev": true, - "requires": { - "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz" - } - }, "string-format-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.0.tgz", @@ -2762,6 +10037,14 @@ "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" } }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "dev": true, + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -2774,6 +10057,32 @@ "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" } }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "4.0.1" + }, + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + } + } + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -2784,6 +10093,166 @@ "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" }, + "style-search": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", + "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=", + "dev": true + }, + "stylelint": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-8.1.1.tgz", + "integrity": "sha512-RtjUtqG2h3dP4CuMU1M++GRJGvKXWozmv5yhLoOLy7NWP2jJZOwLZSVwtcjXQsBJBfGuC33mooBOwNaCIhi2tQ==", + "dev": true, + "requires": { + "autoprefixer": "7.1.4", + "balanced-match": "1.0.0", + "chalk": "2.1.0", + "cosmiconfig": "2.2.2", + "debug": "3.1.0", + "execall": "1.0.0", + "file-entry-cache": "2.0.0", + "get-stdin": "5.0.1", + "globby": "6.1.0", + "globjoin": "0.1.4", + "html-tags": "2.0.0", + "ignore": "3.3.5", + "imurmurhash": "0.1.4", + "known-css-properties": "0.3.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "log-symbols": "2.1.0", + "mathml-tag-names": "2.0.1", + "meow": "3.7.0", + "micromatch": "2.3.11", + "normalize-selector": "0.2.0", + "pify": "3.0.0", + "postcss": "6.0.12", + "postcss-less": "1.1.0", + "postcss-media-query-parser": "0.2.3", + "postcss-reporter": "5.0.0", + "postcss-resolve-nested-selector": "0.1.1", + "postcss-scss": "1.0.2", + "postcss-selector-parser": "2.2.3", + "postcss-value-parser": "3.3.0", + "resolve-from": "3.0.0", + "specificity": "0.3.2", + "string-width": "2.1.1", + "style-search": "0.1.0", + "sugarss": "1.0.0", + "svg-tags": "1.0.0", + "table": "4.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "supports-color": "4.4.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "stylelint-order": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-0.6.0.tgz", + "integrity": "sha1-ciIr4MZNh4Ky/CN9DZrJdAOflos=", + "dev": true, + "requires": { + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "postcss": "6.0.12", + "postcss-sorting": "3.0.2", + "stylelint": "8.1.1" + } + }, + "sugarss": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-1.0.0.tgz", + "integrity": "sha1-ZeUbOVhDL7cNVFGmi7M+MtDPHvc=", + "dev": true, + "requires": { + "postcss": "6.0.12" + } + }, "superagent": { "version": "https://registry.npmjs.org/superagent/-/superagent-3.5.2.tgz", "integrity": "sha1-M2GjlxVnUEw1EGOr6q4PqiPb8/g=", @@ -2815,6 +10284,100 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", + "dev": true + }, + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "dev": true, + "requires": { + "ajv": "5.2.3", + "ajv-keywords": "2.1.0", + "chalk": "2.1.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + }, + "dependencies": { + "ajv": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", + "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "json-schema-traverse": "0.3.1", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "supports-color": "4.4.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, "tar": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", @@ -2882,6 +10445,50 @@ } } }, + "tar-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.2.tgz", + "integrity": "sha1-+8bG6DwaGdTLSMfZYXH8JI7/x78=", + "dev": true, + "requires": { + "bl": "1.1.2", + "end-of-stream": "1.4.0", + "readable-stream": "2.3.3", + "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, "tdigest": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.1.tgz", @@ -2890,6 +10497,48 @@ "bintrees": "1.0.1" } }, + "tempfile": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-1.1.1.tgz", + "integrity": "sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I=", + "dev": true, + "requires": { + "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "uuid": "2.0.3" + }, + "dependencies": { + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", + "dev": true + } + } + }, + "text-extensions": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.6.0.tgz", + "integrity": "sha512-U2M04F2rbuYYCNioiTD14cImLTae4ys1rC57tllzKg3dt5DPR2JXs5yFdC017yOBrW6wM6s5gtAlFJ7yye04rA==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, "through2": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", @@ -2928,6 +10577,21 @@ } } }, + "tiny-emitter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.0.tgz", + "integrity": "sha1-utMnrbGAS0KiMa+nQVMr2ITNCa0=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + } + }, "to-fast-properties": { "version": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", @@ -2945,11 +10609,29 @@ "punycode": "1.4.1" } }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, "trim-right": { "version": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "dev": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2971,11 +10653,60 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "optional": true }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=", + "dev": true + }, + "typed-function": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-0.10.5.tgz", + "integrity": "sha1-Lg8Yq9BlIZ+raUpEamXG0ZgYMsA=", + "dev": true + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, "uid-number": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", @@ -2985,6 +10716,30 @@ "version": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "dev": true, + "requires": { + "sprintf-js": "1.1.1", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "dependencies": { + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=", + "dev": true + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, "unique-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", @@ -2993,6 +10748,28 @@ "crypto-random-string": "1.0.0" } }, + "units-css": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/units-css/-/units-css-0.4.0.tgz", + "integrity": "sha1-1iKGU6UZg9fBb/KPi53Dsf/tOgc=", + "dev": true, + "requires": { + "isnumeric": "0.2.0", + "viewport-dimensions": "0.2.0" + } + }, + "urijs": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.16.1.tgz", + "integrity": "sha1-hZrTGJD1+VKHJ76J8ZMslPtHMeI=", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, "url": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", @@ -3039,7 +10816,23 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=" + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "validator": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-7.0.0.tgz", + "integrity": "sha1-x03rgGNRL6w1VHk45vCxUEooL9I=", + "dev": true }, "verror": { "version": "1.10.0", @@ -3058,14 +10851,184 @@ } } }, + "viewport-dimensions": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz", + "integrity": "sha1-3nQHR9tTh/0XJfUXXpG6x2r982w=", + "dev": true + }, + "walkdir": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", + "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", + "dev": true + }, + "wdio-dot-reporter": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/wdio-dot-reporter/-/wdio-dot-reporter-0.0.9.tgz", + "integrity": "sha1-kpsq2v1J1rBTT9oGjocxm0fjj+U=", + "dev": true + }, + "wdio-sync": { + "version": "0.6.14", + "resolved": "https://registry.npmjs.org/wdio-sync/-/wdio-sync-0.6.14.tgz", + "integrity": "sha1-odzVkHuh0EFUquYXbGItkQw8qbM=", + "dev": true, + "requires": { + "babel-runtime": "6.23.0", + "fibers": "1.0.15", + "object.assign": "4.0.4" + }, + "dependencies": { + "babel-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", + "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=", + "dev": true, + "requires": { + "core-js": "2.5.1", + "regenerator-runtime": "0.10.5" + } + }, + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", + "dev": true + } + } + }, + "webdriverio": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-4.8.0.tgz", + "integrity": "sha1-1Skpt0kID4mWf24WFAUcvIFy0TI=", + "dev": true, + "requires": { + "archiver": "1.3.0", + "babel-runtime": "6.23.0", + "css-parse": "2.0.0", + "css-value": "0.0.1", + "deepmerge": "1.3.2", + "ejs": "2.5.7", + "gaze": "1.1.2", + "glob": "7.1.2", + "inquirer": "3.0.6", + "json-stringify-safe": "5.0.1", + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "npm-install-package": "2.1.0", + "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "q": "1.5.0", + "request": "2.81.0", + "rgb2hex": "0.1.0", + "safe-buffer": "5.0.1", + "supports-color": "3.2.3", + "url": "0.11.0", + "validator": "7.0.0", + "wdio-dot-reporter": "0.0.9", + "wgxpath": "1.0.0" + }, + "dependencies": { + "babel-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", + "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=", + "dev": true, + "requires": { + "core-js": "2.5.1", + "regenerator-runtime": "0.10.5" + } + }, + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + } + } + }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "dev": true, + "requires": { + "http-parser-js": "0.4.8", + "websocket-extensions": "0.1.2" + } + }, + "websocket-extensions": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.2.tgz", + "integrity": "sha1-Dhh4HeYpoYMIzhSBZQ9n/6JpOl0=", + "dev": true + }, + "wgxpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wgxpath/-/wgxpath-1.0.0.tgz", + "integrity": "sha1-7vikudVYzEla06mit1FZfs2a9pA=", + "dev": true + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", "requires": { "string-width": "1.0.2" } }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, "wolfy87-eventemitter": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.2.2.tgz", @@ -3080,6 +11043,15 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + } + }, "write-file-atomic": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", @@ -3112,9 +11084,326 @@ "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" } }, + "xolvio-ddp": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/xolvio-ddp/-/xolvio-ddp-0.12.3.tgz", + "integrity": "sha1-NqarlhKyQLWg0cCoNJCK8XwLjwI=", + "dev": true, + "requires": { + "bluebird": "2.11.0", + "ddp-ejson": "0.8.1-3", + "ddp-underscore-patched": "0.8.1-2", + "faye-websocket": "0.9.4", + "request": "2.53.0" + }, + "dependencies": { + "asn1": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", + "integrity": "sha1-VZvhg3bQik7E2+gId9J4GGObLfc=", + "dev": true + }, + "assert-plus": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", + "integrity": "sha1-7nQAlBMALYTOxyGcasgRgS5yMWA=", + "dev": true + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "aws-sign2": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", + "integrity": "sha1-xXED96F/wDfwLXwuZLYC6iI/fWM=", + "dev": true + }, + "bl": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "integrity": "sha1-wGt5evCF6gC8Unr8jvzxHeIjIFQ=", + "dev": true, + "requires": { + "readable-stream": "1.0.34" + } + }, + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=", + "dev": true + }, + "caseless": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", + "integrity": "sha1-t7Zc5r8UE4hlOc/VM/CzDv+pz4g=", + "dev": true + }, + "combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=", + "dev": true, + "requires": { + "delayed-stream": "0.0.5" + } + }, + "delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=", + "dev": true + }, + "forever-agent": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", + "integrity": "sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA=", + "dev": true + }, + "form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha1-Jvi8JtpkQOKZy9z7aQNcT3em5GY=", + "dev": true, + "requires": { + "async": "0.9.2", + "combined-stream": "0.0.7", + "mime-types": "2.0.14" + } + }, + "hawk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", + "integrity": "sha1-HnMc45RH+h0PbXB/e87r7A/R7B8=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "http-signature": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "integrity": "sha1-T72sEyVZqoMjEh5UB3nAoBKyfmY=", + "dev": true, + "requires": { + "asn1": "0.1.11", + "assert-plus": "0.1.5", + "ctype": "0.5.3" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha1-PQxjGA9FjrENMlqqN9fFiuMS6dc=", + "dev": true + }, + "mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha1-MQ4VnbI+B3+Lsit0jav6SVcUCqY=", + "dev": true, + "requires": { + "mime-db": "1.12.0" + } + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", + "dev": true + }, + "oauth-sign": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", + "integrity": "sha1-fb6uRPbKRU4fFoRR1jB0ZzWBPOM=", + "dev": true + }, + "qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "request": { + "version": "2.53.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", + "integrity": "sha1-GAo66St7Y5gC5PlUXdj83rcddgw=", + "dev": true, + "requires": { + "aws-sign2": "0.5.0", + "bl": "0.9.5", + "caseless": "0.9.0", + "combined-stream": "0.0.7", + "forever-agent": "0.5.2", + "form-data": "0.2.0", + "hawk": "2.3.1", + "http-signature": "0.10.1", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.0.14", + "node-uuid": "1.4.8", + "oauth-sign": "0.6.0", + "qs": "2.3.3", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.4.3" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true + } + } + }, + "xolvio-fiber-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/xolvio-fiber-utils/-/xolvio-fiber-utils-2.0.3.tgz", + "integrity": "sha1-vsjXDHQGGjFjFbun0w0lyz6C3FA=", + "dev": true, + "requires": { + "fibers": "1.0.15", + "underscore": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz" + } + }, + "xolvio-jasmine-expect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xolvio-jasmine-expect/-/xolvio-jasmine-expect-1.1.0.tgz", + "integrity": "sha1-vCud1ghCMR8EV59agtzqaisxnH0=", + "dev": true, + "requires": { + "jasmine-core": "2.8.0" + } + }, + "xolvio-sync-webdriverio": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/xolvio-sync-webdriverio/-/xolvio-sync-webdriverio-9.0.1.tgz", + "integrity": "sha1-WRri2MiqynQiZJWfzM+QtPndUWA=", + "dev": true, + "requires": { + "fibers": "1.0.15", + "meteor-promise": "0.8.6", + "underscore": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "wdio-sync": "0.6.14", + "webdriverio": "4.8.0", + "xolvio-fiber-utils": "2.0.3" + } + }, "xtend": { "version": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + } + } + }, + "yauzl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "dev": true, + "requires": { + "fd-slicer": "1.0.1" + } + }, + "zip-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", + "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", + "dev": true, + "requires": { + "archiver-utils": "1.3.0", + "compress-commons": "1.2.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "readable-stream": "2.3.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } } } } diff --git a/package.json b/package.json index ea3eab6bbf58..ac98474ff0d2 100644 --- a/package.json +++ b/package.json @@ -90,21 +90,21 @@ "babel-plugin-array-includes": "^2.0.3", "chimp": "^0.50.0", "conventional-changelog-cli": "^1.3.3", - "eslint": "^4.7.2", + "eslint": "^4.8.0", "mock-require": "^2.0.2", "postcss-cssnext": "^2.11.0", "postcss-smart-import": "^0.7.5", "proxyquire": "^1.8.0", "simple-git": "^1.77.0", "stylelint": "^8.1.1", - "stylelint-order": "^0.6.0", + "stylelint-order": "^0.7.0", "supertest": "^3.0.0", "underscore": "^1.8.3", "underscore.string": "^3.3.4" }, "dependencies": { - "@google-cloud/storage": "^1.3.0", - "aws-sdk": "^2.122.0", + "@google-cloud/storage": "^1.3.1", + "aws-sdk": "^2.125.0", "babel-runtime": "^6.26.0", "bcrypt": "^1.0.3", "codemirror": "^5.30.0", @@ -120,7 +120,7 @@ "moment-timezone": "^0.5.13", "photoswipe": "^4.1.2", "poplib": "^0.1.7", - "prom-client": "^10.1.0", + "prom-client": "^10.1.1", "semver": "^5.4.1", "toastr": "^2.1.2", "wolfy87-eventemitter": "^5.2.2" diff --git a/packages/rocketchat-2fa/client/accountSecurity.html b/packages/rocketchat-2fa/client/accountSecurity.html index ad8d6a1f231a..fedc074e5808 100644 --- a/packages/rocketchat-2fa/client/accountSecurity.html +++ b/packages/rocketchat-2fa/client/accountSecurity.html @@ -1,13 +1,8 @@ diff --git a/packages/rocketchat-authorization/client/startup.js b/packages/rocketchat-authorization/client/startup.js index c4ef2b2deaf5..fc62cafc60db 100644 --- a/packages/rocketchat-authorization/client/startup.js +++ b/packages/rocketchat-authorization/client/startup.js @@ -3,6 +3,7 @@ Meteor.subscribe('roles'); RocketChat.AdminBox.addOption({ href: 'admin-permissions', i18nLabel: 'Permissions', + icon: 'lock', permissionGranted() { return RocketChat.authz.hasAllPermission('access-permissions'); } diff --git a/packages/rocketchat-custom-sounds/client/admin/adminSounds.html b/packages/rocketchat-custom-sounds/client/admin/adminSounds.html index 018aab665eaa..f956516fd716 100644 --- a/packages/rocketchat-custom-sounds/client/admin/adminSounds.html +++ b/packages/rocketchat-custom-sounds/client/admin/adminSounds.html @@ -1,12 +1,7 @@