From 421215c243bd8d7055c86fd7b2b9ae161a0cedaf Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Wed, 25 Apr 2018 15:10:21 -0400 Subject: [PATCH 1/9] Adds Space Avatar with selector in main Kibana menu --- .../lib/authentication/providers/basic.js | 2 +- .../lib/authentication/providers/saml.js | 2 +- .../server/routes/api/v1/authenticate.js | 2 +- x-pack/plugins/spaces/index.js | 6 ++ .../spaces/public/lib/spaces_manager.js | 42 +++++++++ .../public/views/components/space_card.js | 38 ++++++++ .../public/views/components/space_card.less | 3 + .../public/views/components/space_cards.js | 33 +++++++ .../public/views/nav_control/nav_control.html | 7 +- .../public/views/nav_control/nav_control.js | 18 +++- .../public/views/nav_control/nav_control.less | 8 ++ .../views/nav_control/nav_control_modal.js | 92 +++++++++++++++++++ .../public/views/space_selector/index.js | 6 +- .../views/space_selector/space_selector.js | 46 ++-------- .../lib/__tests__/__fixtures__/request.js | 22 +++++ .../lib/__tests__/can_redirect_request.js | 0 .../server/lib/can_redirect_request.js | 0 17 files changed, 276 insertions(+), 51 deletions(-) create mode 100644 x-pack/plugins/spaces/public/lib/spaces_manager.js create mode 100644 x-pack/plugins/spaces/public/views/components/space_card.js create mode 100644 x-pack/plugins/spaces/public/views/components/space_card.less create mode 100644 x-pack/plugins/spaces/public/views/components/space_cards.js create mode 100644 x-pack/plugins/spaces/public/views/nav_control/nav_control.less create mode 100644 x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js create mode 100644 x-pack/server/lib/__tests__/__fixtures__/request.js rename x-pack/{plugins/security => }/server/lib/__tests__/can_redirect_request.js (100%) rename x-pack/{plugins/security => }/server/lib/can_redirect_request.js (100%) diff --git a/x-pack/plugins/security/server/lib/authentication/providers/basic.js b/x-pack/plugins/security/server/lib/authentication/providers/basic.js index 756b8a6ee10ce..8f0f8c33196b5 100644 --- a/x-pack/plugins/security/server/lib/authentication/providers/basic.js +++ b/x-pack/plugins/security/server/lib/authentication/providers/basic.js @@ -5,7 +5,7 @@ */ import Boom from 'boom'; -import { canRedirectRequest } from '../../can_redirect_request'; +import { canRedirectRequest } from '../../../../../../server/lib/can_redirect_request'; import { AuthenticationResult } from '../authentication_result'; import { DeauthenticationResult } from '../deauthentication_result'; diff --git a/x-pack/plugins/security/server/lib/authentication/providers/saml.js b/x-pack/plugins/security/server/lib/authentication/providers/saml.js index 2490e10e127ac..d373857e2efea 100644 --- a/x-pack/plugins/security/server/lib/authentication/providers/saml.js +++ b/x-pack/plugins/security/server/lib/authentication/providers/saml.js @@ -5,7 +5,7 @@ */ import Boom from 'boom'; -import { canRedirectRequest } from '../../can_redirect_request'; +import { canRedirectRequest } from '../../../../../../server/lib/can_redirect_request'; import { AuthenticationResult } from '../authentication_result'; import { DeauthenticationResult } from '../deauthentication_result'; diff --git a/x-pack/plugins/security/server/routes/api/v1/authenticate.js b/x-pack/plugins/security/server/routes/api/v1/authenticate.js index 9697774bfe891..13e8d47f8cdc4 100644 --- a/x-pack/plugins/security/server/routes/api/v1/authenticate.js +++ b/x-pack/plugins/security/server/routes/api/v1/authenticate.js @@ -8,7 +8,7 @@ import Boom from 'boom'; import Joi from 'joi'; import { wrapError } from '../../../lib/errors'; import { BasicCredentials } from '../../../../server/lib/authentication/providers/basic'; -import { canRedirectRequest } from '../../../lib/can_redirect_request'; +import { canRedirectRequest } from '../../../../../../server/lib/can_redirect_request'; export function initAuthenticateApi(server) { server.route({ diff --git a/x-pack/plugins/spaces/index.js b/x-pack/plugins/spaces/index.js index 5780998378cf8..ac71909fb2482 100644 --- a/x-pack/plugins/spaces/index.js +++ b/x-pack/plugins/spaces/index.js @@ -10,6 +10,7 @@ import { checkLicense } from './server/lib/check_license'; import { initSpacesApi } from './server/routes/api/v1/spaces'; import { initSpacesRequestInterceptors } from './server/lib/space_request_interceptors'; import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status'; +import { canRedirectRequest } from '../../server/lib/can_redirect_request'; import mappings from './mappings.json'; export const spaces = (kibana) => new kibana.Plugin({ @@ -31,6 +32,7 @@ export const spaces = (kibana) => new kibana.Plugin({ id: 'space_selector', title: 'Spaces', main: 'plugins/spaces/views/space_selector', + url: 'space_selector', hidden: true, }], hacks: [], @@ -55,6 +57,10 @@ export const spaces = (kibana) => new kibana.Plugin({ const config = server.config(); validateConfig(config, message => server.log(['spaces', 'warning'], message)); + if (!config.get('xpack.spaces.enabled')) { + return; + } + initSpacesApi(server); initSpacesRequestInterceptors(server); diff --git a/x-pack/plugins/spaces/public/lib/spaces_manager.js b/x-pack/plugins/spaces/public/lib/spaces_manager.js new file mode 100644 index 0000000000000..ca11d3e719ea1 --- /dev/null +++ b/x-pack/plugins/spaces/public/lib/spaces_manager.js @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export class SpacesManager { + constructor(httpAgent, chrome) { + this._httpAgent = httpAgent; + this._baseUrl = chrome.addBasePath(`/api/spaces/v1/spaces`); + } + + async getSpaces() { + return await this._httpAgent + .get(this._baseUrl) + .then(response => response.data); + } + + async getSpace(id) { + return await this._httpAgent + .get(`${this._baseUrl}/${id}`) + .then(response => response.data); + } + + async createSpace(space) { + return await this._httpAgent + .post(`${this._baseUrl}/${space.id}`, space) + .then(response => response.data); + } + + async updateSpace(space) { + return await this._httpAgent + .post(`${this._baseUrl}/${space.id}?overwrite=true`, space) + .then(response => response.data); + } + + async deleteSpace(space) { + return await this._httpAgent + .delete(`${this._baseUrl}/${space.id}`) + .then(response => response.data); + } +} diff --git a/x-pack/plugins/spaces/public/views/components/space_card.js b/x-pack/plugins/spaces/public/views/components/space_card.js new file mode 100644 index 0000000000000..22d87a3591b3e --- /dev/null +++ b/x-pack/plugins/spaces/public/views/components/space_card.js @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { + EuiCard, + EuiAvatar, + EuiText +} from '@elastic/eui'; +import './space_card.less'; + +export const SpaceCard = (props) => { + const { + space, + onClick + } = props; + + return ( + + ); +}; + +function renderSpaceTitle(space) { + return ( +
+ +

{space.name}

+
+ ); +} \ No newline at end of file diff --git a/x-pack/plugins/spaces/public/views/components/space_card.less b/x-pack/plugins/spaces/public/views/components/space_card.less new file mode 100644 index 0000000000000..a878a59be13f0 --- /dev/null +++ b/x-pack/plugins/spaces/public/views/components/space_card.less @@ -0,0 +1,3 @@ +.spaceCard { + width: 225px; +} \ No newline at end of file diff --git a/x-pack/plugins/spaces/public/views/components/space_cards.js b/x-pack/plugins/spaces/public/views/components/space_cards.js new file mode 100644 index 0000000000000..b612664f04ef7 --- /dev/null +++ b/x-pack/plugins/spaces/public/views/components/space_cards.js @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { SpaceCard } from './space_card'; +import { + EuiFlexGroup, + EuiFlexItem, +} from '@elastic/eui'; + +export class SpaceCards extends Component { + render() { + return ( + + {this.props.spaces.map(this.renderSpace)} + + ); + } + + renderSpace = (space) => ( + + {}} /> + + ); +} + +SpaceCards.propTypes = { + spaces: PropTypes.array.isRequired +}; \ No newline at end of file diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control.html b/x-pack/plugins/spaces/public/views/nav_control/nav_control.html index 5baf3e7785798..284866cc43bed 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control.html +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control.html @@ -1,8 +1,3 @@
- +
diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control.js b/x-pack/plugins/spaces/public/views/nav_control/nav_control.js index c479488247b79..20703614e526f 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control.js +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control.js @@ -7,7 +7,13 @@ import { constant } from 'lodash'; import { chromeNavControlsRegistry } from 'ui/registry/chrome_nav_controls'; import { uiModules } from 'ui/modules'; +import { SpacesManager } from 'plugins/spaces/lib/spaces_manager'; import template from 'plugins/spaces/views/nav_control/nav_control.html'; +import 'plugins/spaces/views/nav_control/nav_control.less'; + +import React from 'react'; +import { render, unmountComponentAtNode } from 'react-dom'; +import { NavControlModal } from 'plugins/spaces/views/nav_control/nav_control_modal'; chromeNavControlsRegistry.register(constant({ name: 'spaces', @@ -17,6 +23,16 @@ chromeNavControlsRegistry.register(constant({ const module = uiModules.get('spaces', ['kibana']); -module.controller('spacesNavController', () => { +module.controller('spacesNavController', ($scope, $http, chrome) => { + const domNode = document.getElementById(`spacesNavReactRoot`); + + const spacesManager = new SpacesManager($http, chrome); + + render(, domNode); + + // unmount react on controller destroy + $scope.$on('$destroy', () => { + unmountComponentAtNode(domNode); + }); }); diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control.less b/x-pack/plugins/spaces/public/views/nav_control/nav_control.less new file mode 100644 index 0000000000000..f60a728a6d880 --- /dev/null +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control.less @@ -0,0 +1,8 @@ +.global-nav-link__icon .euiAvatar { + margin-top: 0.5em; +} + +.selectSpaceModal { + min-width: 450px; + width: 75vw; +} diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js new file mode 100644 index 0000000000000..231cf293f51af --- /dev/null +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js @@ -0,0 +1,92 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React, { Component } from 'react'; +import { + EuiModal, + EuiModalHeader, + EuiModalHeaderTitle, + EuiModalBody, + EuiOverlayMask, + EuiAvatar, +} from '@elastic/eui'; +import { SpaceCards } from '../components/space_cards'; + +export class NavControlModal extends Component { + state = { + isOpen: false, + loading: false, + spaces: [] + }; + + componentDidMount() { + this.loadSpaces(); + } + + loadSpaces() { + const { + spacesManager + } = this.props; + + this.setState({ + loading: true + }); + + spacesManager.getSpaces() + .then(spaces => { + this.setState({ + spaces, + loading: false + }); + }); + } + + render() { + const button = ( +
+ +
+
Engineering
+
+
+ ); + + let modal; + if (this.state.isOpen) { + modal = ( + + + Select a space + + + + + + ); + } + + return ( +
{button}{modal}
+ ); + } + + togglePortal = () => { + const isOpening = !this.state.isOpen; + if (isOpening) { + this.loadSpaces(); + } + + this.setState({ + isOpen: !this.state.isOpen + }); + }; + + closePortal = () => { + this.setState({ + isOpen: false + }); + } +} diff --git a/x-pack/plugins/spaces/public/views/space_selector/index.js b/x-pack/plugins/spaces/public/views/space_selector/index.js index 21efd3d762dda..21bc86bee93c2 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/index.js +++ b/x-pack/plugins/spaces/public/views/space_selector/index.js @@ -8,6 +8,7 @@ import 'ui/autoload/styles'; import chrome from 'ui/chrome'; import 'plugins/spaces/views/space_selector/space_selector.less'; import template from 'plugins/spaces/views/space_selector/space_selector.html'; +import { SpacesManager } from 'plugins/spaces/lib/spaces_manager'; import { uiModules } from 'ui/modules'; import React from 'react'; @@ -17,7 +18,10 @@ import { SpaceSelector } from './space_selector'; const module = uiModules.get('spaces_selector', []); module.controller('spacesSelectorController', ($scope, $http, spaces) => { const domNode = document.getElementById('spaceSelectorRoot'); - render(, domNode); + + const spacesManager = new SpacesManager($http, chrome); + + render(, domNode); // unmount react on controller destroy $scope.$on('$destroy', () => { diff --git a/x-pack/plugins/spaces/public/views/space_selector/space_selector.js b/x-pack/plugins/spaces/public/views/space_selector/space_selector.js index 9137262bc0efd..951efaec6bd83 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/space_selector.js +++ b/x-pack/plugins/spaces/public/views/space_selector/space_selector.js @@ -12,12 +12,10 @@ import { EuiPageBody, EuiPageContent, EuiPageHeaderSection, - EuiCard, EuiIcon, EuiText, - EuiFlexGroup, - EuiFlexItem, } from '@elastic/eui'; +import { SpaceCards } from '../components/space_cards'; export class SpaceSelector extends Component { state = { @@ -40,14 +38,13 @@ export class SpaceSelector extends Component { loadSpaces() { this.setState({ loading: true }); - const { httpAgent, chrome } = this.props; + const { spacesManager } = this.props; - httpAgent - .get(chrome.addBasePath(`/api/spaces/v1/spaces`)) - .then(response => { + spacesManager.getSpaces() + .then(spaces => { this.setState({ loading: false, - spaces: response.data + spaces }); }); } @@ -71,9 +68,7 @@ export class SpaceSelector extends Component {

Select a space to begin.

- - {spaces.map(this.renderSpace)} - +

You can change your workspace at anytime by accessing your profile within Kibana.

@@ -83,35 +78,6 @@ export class SpaceSelector extends Component { ); } - - renderSpace = (space) => { - return ( - - } - title={this.renderSpaceTitle(space)} - description={space.description} - onClick={this.createSpaceClickHandler(space)} - /> - - ); - }; - - renderSpaceTitle = (space) => { - return ( -
- {space.name} - {/* */} -
- ); - }; - - createSpaceClickHandler = (space) => { - return () => { - window.location = this.props.chrome.addBasePath(`/s/${space.urlContext}`); - }; - } - } SpaceSelector.propTypes = { diff --git a/x-pack/server/lib/__tests__/__fixtures__/request.js b/x-pack/server/lib/__tests__/__fixtures__/request.js new file mode 100644 index 0000000000000..d3ba20e4d5b61 --- /dev/null +++ b/x-pack/server/lib/__tests__/__fixtures__/request.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import url from 'url'; +export function requestFixture({ + headers = { accept: 'something/html' }, + path = '/wat', + search = '', + payload +} = {}) { + return { + raw: { req: { headers } }, + headers, + url: { path, search }, + query: search ? url.parse(search, { parseQueryString: true }).query : {}, + payload, + state: { user: 'these are the contents of the user client cookie' } + }; +} diff --git a/x-pack/plugins/security/server/lib/__tests__/can_redirect_request.js b/x-pack/server/lib/__tests__/can_redirect_request.js similarity index 100% rename from x-pack/plugins/security/server/lib/__tests__/can_redirect_request.js rename to x-pack/server/lib/__tests__/can_redirect_request.js diff --git a/x-pack/plugins/security/server/lib/can_redirect_request.js b/x-pack/server/lib/can_redirect_request.js similarity index 100% rename from x-pack/plugins/security/server/lib/can_redirect_request.js rename to x-pack/server/lib/can_redirect_request.js From 6da79c7d7a0e184e7edb2f40eb60bc8500c85554 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Fri, 27 Apr 2018 11:36:54 -0400 Subject: [PATCH 2/9] Move can_redirect_request back into security plugin. Not needed by spaces --- .../lib/__tests__/can_redirect_request.js | 0 .../lib/authentication/providers/basic.js | 2 +- .../lib/authentication/providers/saml.js | 2 +- .../server/lib/can_redirect_request.js | 0 .../server/routes/api/v1/authenticate.js | 2 +- x-pack/plugins/spaces/index.js | 1 - .../lib/__tests__/__fixtures__/request.js | 22 ------------------- 7 files changed, 3 insertions(+), 26 deletions(-) rename x-pack/{ => plugins/security}/server/lib/__tests__/can_redirect_request.js (100%) rename x-pack/{ => plugins/security}/server/lib/can_redirect_request.js (100%) delete mode 100644 x-pack/server/lib/__tests__/__fixtures__/request.js diff --git a/x-pack/server/lib/__tests__/can_redirect_request.js b/x-pack/plugins/security/server/lib/__tests__/can_redirect_request.js similarity index 100% rename from x-pack/server/lib/__tests__/can_redirect_request.js rename to x-pack/plugins/security/server/lib/__tests__/can_redirect_request.js diff --git a/x-pack/plugins/security/server/lib/authentication/providers/basic.js b/x-pack/plugins/security/server/lib/authentication/providers/basic.js index 8f0f8c33196b5..756b8a6ee10ce 100644 --- a/x-pack/plugins/security/server/lib/authentication/providers/basic.js +++ b/x-pack/plugins/security/server/lib/authentication/providers/basic.js @@ -5,7 +5,7 @@ */ import Boom from 'boom'; -import { canRedirectRequest } from '../../../../../../server/lib/can_redirect_request'; +import { canRedirectRequest } from '../../can_redirect_request'; import { AuthenticationResult } from '../authentication_result'; import { DeauthenticationResult } from '../deauthentication_result'; diff --git a/x-pack/plugins/security/server/lib/authentication/providers/saml.js b/x-pack/plugins/security/server/lib/authentication/providers/saml.js index d373857e2efea..2490e10e127ac 100644 --- a/x-pack/plugins/security/server/lib/authentication/providers/saml.js +++ b/x-pack/plugins/security/server/lib/authentication/providers/saml.js @@ -5,7 +5,7 @@ */ import Boom from 'boom'; -import { canRedirectRequest } from '../../../../../../server/lib/can_redirect_request'; +import { canRedirectRequest } from '../../can_redirect_request'; import { AuthenticationResult } from '../authentication_result'; import { DeauthenticationResult } from '../deauthentication_result'; diff --git a/x-pack/server/lib/can_redirect_request.js b/x-pack/plugins/security/server/lib/can_redirect_request.js similarity index 100% rename from x-pack/server/lib/can_redirect_request.js rename to x-pack/plugins/security/server/lib/can_redirect_request.js diff --git a/x-pack/plugins/security/server/routes/api/v1/authenticate.js b/x-pack/plugins/security/server/routes/api/v1/authenticate.js index 13e8d47f8cdc4..9697774bfe891 100644 --- a/x-pack/plugins/security/server/routes/api/v1/authenticate.js +++ b/x-pack/plugins/security/server/routes/api/v1/authenticate.js @@ -8,7 +8,7 @@ import Boom from 'boom'; import Joi from 'joi'; import { wrapError } from '../../../lib/errors'; import { BasicCredentials } from '../../../../server/lib/authentication/providers/basic'; -import { canRedirectRequest } from '../../../../../../server/lib/can_redirect_request'; +import { canRedirectRequest } from '../../../lib/can_redirect_request'; export function initAuthenticateApi(server) { server.route({ diff --git a/x-pack/plugins/spaces/index.js b/x-pack/plugins/spaces/index.js index ac71909fb2482..27fb8b4f84e18 100644 --- a/x-pack/plugins/spaces/index.js +++ b/x-pack/plugins/spaces/index.js @@ -10,7 +10,6 @@ import { checkLicense } from './server/lib/check_license'; import { initSpacesApi } from './server/routes/api/v1/spaces'; import { initSpacesRequestInterceptors } from './server/lib/space_request_interceptors'; import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status'; -import { canRedirectRequest } from '../../server/lib/can_redirect_request'; import mappings from './mappings.json'; export const spaces = (kibana) => new kibana.Plugin({ diff --git a/x-pack/server/lib/__tests__/__fixtures__/request.js b/x-pack/server/lib/__tests__/__fixtures__/request.js deleted file mode 100644 index d3ba20e4d5b61..0000000000000 --- a/x-pack/server/lib/__tests__/__fixtures__/request.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import url from 'url'; -export function requestFixture({ - headers = { accept: 'something/html' }, - path = '/wat', - search = '', - payload -} = {}) { - return { - raw: { req: { headers } }, - headers, - url: { path, search }, - query: search ? url.parse(search, { parseQueryString: true }).query : {}, - payload, - state: { user: 'these are the contents of the user client cookie' } - }; -} From dad0d8d1a608142ec34fa56ec64e781b50961606 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Fri, 4 May 2018 08:38:50 -0400 Subject: [PATCH 3/9] additional tests --- x-pack/plugins/spaces/common/mock_spaces.js | 22 ------ .../spaces/common/spaces_url_parser.js | 40 ++++++++++ .../spaces/common/spaces_url_parser.test.js | 35 +++++++++ .../spaces/public/lib/spaces_manager.js | 12 +++ .../public/views/components/space_card.less | 4 +- .../public/views/components/space_cards.js | 24 ++++-- .../public/views/nav_control/nav_control.less | 2 +- .../views/nav_control/nav_control_modal.js | 73 ++++++++++++++----- .../views/space_selector/space_selector.js | 3 +- .../views/space_selector/space_selector.less | 10 +-- .../space_selector/space_selector.test.js | 30 +++++--- .../spaces/server/routes/api/v1/spaces.js | 60 +++++++++++---- 12 files changed, 231 insertions(+), 84 deletions(-) delete mode 100644 x-pack/plugins/spaces/common/mock_spaces.js create mode 100644 x-pack/plugins/spaces/common/spaces_url_parser.js create mode 100644 x-pack/plugins/spaces/common/spaces_url_parser.test.js diff --git a/x-pack/plugins/spaces/common/mock_spaces.js b/x-pack/plugins/spaces/common/mock_spaces.js deleted file mode 100644 index a11d4d251a415..0000000000000 --- a/x-pack/plugins/spaces/common/mock_spaces.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export const mockSpaces = [{ - id: 'engineering', - name: 'Engineering', - description: 'This is the Engineering Space', - logo: 'logoKubernetes' -}, { - id: 'sales', - name: 'Sales', - description: 'This is the Sales Space', - logo: 'logoElastic' -}, { - id: 'support', - name: 'Support', - description: 'This is the Support Space', - logo: 'logoElasticStack' -}]; diff --git a/x-pack/plugins/spaces/common/spaces_url_parser.js b/x-pack/plugins/spaces/common/spaces_url_parser.js new file mode 100644 index 0000000000000..2bae42c28a6be --- /dev/null +++ b/x-pack/plugins/spaces/common/spaces_url_parser.js @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export function getSpaceUrlContext(basePath = '/', defaultContext = null) { + // Look for `/s/space-url-context` in the base path + const matchResult = basePath.match(/\/s\/([a-z0-9\-]+)/); + + if (!matchResult || matchResult.length === 0) { + return defaultContext; + } + + // Ignoring first result, we only want the capture group result at index 1 + const [, urlContext = defaultContext] = matchResult; + + return urlContext; +} + +export function stripSpaceUrlContext(basePath = '/') { + const currentSpaceUrlContext = getSpaceUrlContext(basePath); + + let basePathWithoutSpace; + if (currentSpaceUrlContext) { + const indexOfSpaceContext = basePath.indexOf(`/s/${currentSpaceUrlContext}`); + + const startsWithSpace = indexOfSpaceContext === 0; + + if (startsWithSpace) { + basePathWithoutSpace = '/'; + } else { + basePathWithoutSpace = basePath.substring(0, indexOfSpaceContext); + } + + return basePathWithoutSpace; + } + + return basePath; +} diff --git a/x-pack/plugins/spaces/common/spaces_url_parser.test.js b/x-pack/plugins/spaces/common/spaces_url_parser.test.js new file mode 100644 index 0000000000000..95d375f404530 --- /dev/null +++ b/x-pack/plugins/spaces/common/spaces_url_parser.test.js @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +import { stripSpaceUrlContext, getSpaceUrlContext } from './spaces_url_parser'; + +test('it removes the space url context from the base path when the space is not at the root', () => { + const basePath = `/foo/s/my-space`; + expect(stripSpaceUrlContext(basePath)).toEqual('/foo'); +}); + +test('it removes the space url context from the base path when the space is the root', () => { + const basePath = `/s/my-space`; + expect(stripSpaceUrlContext(basePath)).toEqual('/'); +}); + +test(`it doesn't change base paths without a space url context`, () => { + const basePath = `/this/is/a-base-path/ok`; + expect(stripSpaceUrlContext(basePath)).toEqual(basePath); +}); + +test('it accepts no parameters', () => { + expect(stripSpaceUrlContext()).toEqual('/'); +}); + +test('it identifies the space url context', () => { + const basePath = `/this/is/a/crazy/path/s/my-awesome-space-lives-here`; + expect(getSpaceUrlContext(basePath)).toEqual('my-awesome-space-lives-here'); +}); + +test('it handles base url without a space url context', () => { + const basePath = `/this/is/a/crazy/path/s`; + expect(getSpaceUrlContext(basePath)).toEqual(null); +}); diff --git a/x-pack/plugins/spaces/public/lib/spaces_manager.js b/x-pack/plugins/spaces/public/lib/spaces_manager.js index ca11d3e719ea1..738a29dd07550 100644 --- a/x-pack/plugins/spaces/public/lib/spaces_manager.js +++ b/x-pack/plugins/spaces/public/lib/spaces_manager.js @@ -7,7 +7,9 @@ export class SpacesManager { constructor(httpAgent, chrome) { this._httpAgent = httpAgent; + this.chrome = chrome; this._baseUrl = chrome.addBasePath(`/api/spaces/v1/spaces`); + this._activeSpace = null; } async getSpaces() { @@ -22,6 +24,16 @@ export class SpacesManager { .then(response => response.data); } + async getActiveSpace() { + if (!this._activeSpace) { + this._activeSpace = await this._httpAgent + .get(`${this._baseUrl}/_active`) + .then(response => response.data); + } + + return { ...this._activeSpace }; + } + async createSpace(space) { return await this._httpAgent .post(`${this._baseUrl}/${space.id}`, space) diff --git a/x-pack/plugins/spaces/public/views/components/space_card.less b/x-pack/plugins/spaces/public/views/components/space_card.less index a878a59be13f0..777bc20bd1747 100644 --- a/x-pack/plugins/spaces/public/views/components/space_card.less +++ b/x-pack/plugins/spaces/public/views/components/space_card.less @@ -1,3 +1,3 @@ -.spaceCard { +.spaceCard, .euiCard.euiCard--isClickable.spaceCard { width: 225px; -} \ No newline at end of file +} diff --git a/x-pack/plugins/spaces/public/views/components/space_cards.js b/x-pack/plugins/spaces/public/views/components/space_cards.js index b612664f04ef7..b37cd12c79e27 100644 --- a/x-pack/plugins/spaces/public/views/components/space_cards.js +++ b/x-pack/plugins/spaces/public/views/components/space_cards.js @@ -6,7 +6,9 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import chrome from 'ui/chrome'; import { SpaceCard } from './space_card'; +import { stripSpaceUrlContext } from '../../../common/spaces_url_parser'; import { EuiFlexGroup, EuiFlexItem, @@ -21,13 +23,21 @@ export class SpaceCards extends Component { ); } - renderSpace = (space) => ( - - {}} /> - - ); + renderSpace = (space) => ( + + + + ); + + createSpaceClickHandler = (space) => { + return () => { + const baseUrlWithoutSpace = stripSpaceUrlContext(chrome.getBasePath()); + + window.location = `${baseUrlWithoutSpace}/s/${space.urlContext}`; + }; + }; } SpaceCards.propTypes = { - spaces: PropTypes.array.isRequired -}; \ No newline at end of file + spaces: PropTypes.array.isRequired, +}; diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control.less b/x-pack/plugins/spaces/public/views/nav_control/nav_control.less index f60a728a6d880..8275d79693829 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control.less +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control.less @@ -1,4 +1,4 @@ -.global-nav-link__icon .euiAvatar { +.global-nav-link__icon .spaceNavGraphic { margin-top: 0.5em; } diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js index 231cf293f51af..cb3c65318c025 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js @@ -5,6 +5,7 @@ */ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { EuiModal, EuiModalHeader, @@ -12,6 +13,7 @@ import { EuiModalBody, EuiOverlayMask, EuiAvatar, + EuiLoadingSpinner } from '@elastic/eui'; import { SpaceCards } from '../components/space_cards'; @@ -19,7 +21,8 @@ export class NavControlModal extends Component { state = { isOpen: false, loading: false, - spaces: [] + spaces: [], + activeSpace: null }; componentDidMount() { @@ -35,31 +38,27 @@ export class NavControlModal extends Component { loading: true }); - spacesManager.getSpaces() - .then(spaces => { - this.setState({ - spaces, - loading: false - }); + Promise.all([ + spacesManager.getSpaces(), + spacesManager.getActiveSpace() + ]).then(([spaces, activeSpace]) => { + this.setState({ + spaces, + activeSpace, + loading: false }); + }); } render() { - const button = ( - - ); - let modal; if (this.state.isOpen) { modal = ( - Select a space + + Select a space + @@ -69,10 +68,44 @@ export class NavControlModal extends Component { } return ( -
{button}{modal}
+
{this.getActiveSpaceButton()}{modal}
); } + getActiveSpaceButton = () => { + const { + loading, + activeSpace + } = this.state; + + if (loading) { + return this.getButton( + , + '' + ); + } + + if (activeSpace && activeSpace.hasOwnProperty('name')) { + return this.getButton( + , + activeSpace.name + ); + } + + return null; + }; + + getButton = (linkIcon, linkTitle) => { + return ( + + ); + }; + togglePortal = () => { const isOpening = !this.state.isOpen; if (isOpening) { @@ -90,3 +123,7 @@ export class NavControlModal extends Component { }); } } + +NavControlModal.propTypes = { + spacesManager: PropTypes.object.isRequired +}; diff --git a/x-pack/plugins/spaces/public/views/space_selector/space_selector.js b/x-pack/plugins/spaces/public/views/space_selector/space_selector.js index 951efaec6bd83..373944ca3c4a5 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/space_selector.js +++ b/x-pack/plugins/spaces/public/views/space_selector/space_selector.js @@ -82,6 +82,5 @@ export class SpaceSelector extends Component { SpaceSelector.propTypes = { spaces: PropTypes.array, - httpAgent: PropTypes.func.isRequired, - chrome: PropTypes.object.isRequired, + spacesManager: PropTypes.object.isRequired }; diff --git a/x-pack/plugins/spaces/public/views/space_selector/space_selector.less b/x-pack/plugins/spaces/public/views/space_selector/space_selector.less index 85c93682fde6f..78bfc8e094fd0 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/space_selector.less +++ b/x-pack/plugins/spaces/public/views/space_selector/space_selector.less @@ -15,17 +15,9 @@ margin: 30px 0 50px 0; } -.spaceCard { - width: 225px; -} - -.spaceCardTitle .euiIcon { - float: right; -} - .euiText .welcomeLarge { font-size: 2em; - margin-bottom: 5px; + margin-bottom: 15px; } .welcomeMedium { diff --git a/x-pack/plugins/spaces/public/views/space_selector/space_selector.test.js b/x-pack/plugins/spaces/public/views/space_selector/space_selector.test.js index e32f604519129..2277ec4757a7e 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/space_selector.test.js +++ b/x-pack/plugins/spaces/public/views/space_selector/space_selector.test.js @@ -9,6 +9,8 @@ import { SpaceSelector } from './space_selector'; import chrome from 'ui/chrome'; import renderer from 'react-test-renderer'; import { render, shallow } from 'enzyme'; +import { SpacesManager } from '../../lib/spaces_manager'; + function getHttpAgent(spaces = []) { const httpAgent = () => {}; @@ -17,17 +19,26 @@ function getHttpAgent(spaces = []) { return httpAgent; } +function getSpacesManager(spaces = []) { + const manager = new SpacesManager(getHttpAgent(spaces), chrome); + + const origGet = manager.getSpaces; + manager.getSpaces = jest.fn(origGet); + + return manager; +} + test('it renders without crashing', () => { - const httpAgent = getHttpAgent(); + const spacesManager = getSpacesManager(); const component = renderer.create( - + ); expect(component).toMatchSnapshot(); }); test('it uses the spaces on props, when provided', () => { - const httpAgent = getHttpAgent(); + const spacesManager = getSpacesManager(); const spaces = [{ id: 'space-1', @@ -37,14 +48,14 @@ test('it uses the spaces on props, when provided', () => { }]; const component = render( - + ); return Promise .resolve() .then(() => { expect(component.find('.spaceCard')).toHaveLength(1); - expect(httpAgent.get).toHaveBeenCalledTimes(0); + expect(spacesManager.getSpaces).toHaveBeenCalledTimes(0); }); }); @@ -56,16 +67,15 @@ test('it queries for spaces when not provided on props', () => { urlContext: 'space-1-context' }]; - const httpAgent = getHttpAgent(spaces); + const spacesManager = getSpacesManager(spaces); - const component = shallow( - + shallow( + ); return Promise .resolve() .then(() => { - expect(httpAgent.get).toHaveBeenCalledTimes(1); - expect(component.update().find('.spaceCard')).toHaveLength(1); + expect(spacesManager.getSpaces).toHaveBeenCalledTimes(1); }); }); diff --git a/x-pack/plugins/spaces/server/routes/api/v1/spaces.js b/x-pack/plugins/spaces/server/routes/api/v1/spaces.js index 647cebe8dfce5..1ba0021a30d70 100644 --- a/x-pack/plugins/spaces/server/routes/api/v1/spaces.js +++ b/x-pack/plugins/spaces/server/routes/api/v1/spaces.js @@ -8,10 +8,18 @@ import { omit } from 'lodash'; import { routePreCheckLicense } from '../../../lib/route_pre_check_license'; import { spaceSchema } from '../../../lib/space_schema'; import { wrapError } from '../../../lib/errors'; +import { getSpaceUrlContext } from '../../../../common/spaces_url_parser'; export function initSpacesApi(server) { const routePreCheckLicenseFn = routePreCheckLicense(server); + function convertSavedObjectToSpace(savedObject) { + return { + id: savedObject.id, + ...savedObject.attributes + }; + } + server.route({ method: 'GET', path: '/api/spaces/v1/spaces', @@ -25,10 +33,7 @@ export function initSpacesApi(server) { type: 'space' }); - spaces = result.saved_objects.map(space => ({ - ...space.attributes, - id: space.id - })); + spaces = result.saved_objects.map(convertSavedObjectToSpace); } catch(e) { return reply(wrapError(e)); } @@ -40,6 +45,41 @@ export function initSpacesApi(server) { } }); + server.route({ + method: 'GET', + path: '/api/spaces/v1/spaces/_active', + async handler(request, reply) { + const basePath = request.getBasePath(); + + const spaceContext = getSpaceUrlContext(basePath); + + if (!spaceContext) { + return reply(); + } + + try { + const client = request.getSavedObjectsClient(); + + const { + saved_objects: spaces = [] + } = await client.find({ + type: 'space', + search: `"${spaceContext}"`, + search_fields: ['urlContext'], + }); + + if (spaces.length === 0) { + return reply(); + } + + return reply(convertSavedObjectToSpace(spaces[0])); + + } catch (e) { + return reply(wrapError(e)); + } + } + }); + server.route({ method: 'GET', path: '/api/spaces/v1/spaces/{id}', @@ -49,15 +89,9 @@ export function initSpacesApi(server) { const client = request.getSavedObjectsClient(); try { - const { - id, - attributes - } = await client.get('space', spaceId); + const response = await client.get('space', spaceId); - return reply({ - id, - ...attributes - }); + return reply(convertSavedObjectToSpace(response)); } catch (e) { return reply(wrapError(e)); } @@ -87,7 +121,7 @@ export function initSpacesApi(server) { return reply(wrapError(e)); } - return reply(result); + return reply(convertSavedObjectToSpace(result)); }, config: { validate: { From 8006885075ebc3e443c71092986d2401ee7a9011 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Tue, 8 May 2018 10:08:32 -0400 Subject: [PATCH 4/9] Determine active space before page load, instead of after page load --- x-pack/plugins/spaces/index.js | 23 +++- .../spaces/public/lib/spaces_manager.js | 28 ++--- .../components/manage_space_page.js | 23 ++-- .../public/views/management/page_routes.js | 7 ++ .../public/views/nav_control/nav_control.js | 4 +- .../views/nav_control/nav_control_modal.js | 46 ++++---- .../server/lib/check_duplicate_context.js | 36 +++++++ .../spaces/server/lib/get_active_space.js | 49 +++++++++ .../spaces/server/routes/api/v1/spaces.js | 102 +++++++++++------- 9 files changed, 214 insertions(+), 104 deletions(-) create mode 100644 x-pack/plugins/spaces/server/lib/check_duplicate_context.js create mode 100644 x-pack/plugins/spaces/server/lib/get_active_space.js diff --git a/x-pack/plugins/spaces/index.js b/x-pack/plugins/spaces/index.js index 27fb8b4f84e18..0bca945be795f 100644 --- a/x-pack/plugins/spaces/index.js +++ b/x-pack/plugins/spaces/index.js @@ -10,6 +10,8 @@ import { checkLicense } from './server/lib/check_license'; import { initSpacesApi } from './server/routes/api/v1/spaces'; import { initSpacesRequestInterceptors } from './server/lib/space_request_interceptors'; import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status'; +import { getActiveSpace } from './server/lib/get_active_space'; +import { wrapError } from './server/lib/errors'; import mappings from './mappings.json'; export const spaces = (kibana) => new kibana.Plugin({ @@ -39,8 +41,23 @@ export const spaces = (kibana) => new kibana.Plugin({ home: ['plugins/spaces/register_feature'], injectDefaultVars: function () { return { - spaces: [] + spaces: [], + activeSpace: null }; + }, + replaceInjectedVars: async function (vars, request) { + try { + vars.activeSpace = { + valid: true, + space: await getActiveSpace(request.getSavedObjectsClient(), request.getBasePath()) + }; + } catch(e) { + vars.activeSpace = { + valid: false, + error: wrapError(e).output.payload + }; + } + return vars; } }, @@ -56,10 +73,6 @@ export const spaces = (kibana) => new kibana.Plugin({ const config = server.config(); validateConfig(config, message => server.log(['spaces', 'warning'], message)); - if (!config.get('xpack.spaces.enabled')) { - return; - } - initSpacesApi(server); initSpacesRequestInterceptors(server); diff --git a/x-pack/plugins/spaces/public/lib/spaces_manager.js b/x-pack/plugins/spaces/public/lib/spaces_manager.js index 738a29dd07550..77b1ea9b514ca 100644 --- a/x-pack/plugins/spaces/public/lib/spaces_manager.js +++ b/x-pack/plugins/spaces/public/lib/spaces_manager.js @@ -7,48 +7,32 @@ export class SpacesManager { constructor(httpAgent, chrome) { this._httpAgent = httpAgent; - this.chrome = chrome; - this._baseUrl = chrome.addBasePath(`/api/spaces/v1/spaces`); - this._activeSpace = null; + this._baseUrl = chrome.addBasePath(`/api/spaces/v1`); } async getSpaces() { return await this._httpAgent - .get(this._baseUrl) + .get(`${this._baseUrl}/spaces`) .then(response => response.data); } async getSpace(id) { return await this._httpAgent - .get(`${this._baseUrl}/${id}`) - .then(response => response.data); - } - - async getActiveSpace() { - if (!this._activeSpace) { - this._activeSpace = await this._httpAgent - .get(`${this._baseUrl}/_active`) - .then(response => response.data); - } - - return { ...this._activeSpace }; + .get(`${this._baseUrl}/space/${id}`); } async createSpace(space) { return await this._httpAgent - .post(`${this._baseUrl}/${space.id}`, space) - .then(response => response.data); + .post(`${this._baseUrl}/space`, space); } async updateSpace(space) { return await this._httpAgent - .post(`${this._baseUrl}/${space.id}?overwrite=true`, space) - .then(response => response.data); + .put(`${this._baseUrl}/space/${space.id}?overwrite=true`, space); } async deleteSpace(space) { return await this._httpAgent - .delete(`${this._baseUrl}/${space.id}`) - .then(response => response.data); + .delete(`${this._baseUrl}/space/${space.id}`); } } diff --git a/x-pack/plugins/spaces/public/views/management/components/manage_space_page.js b/x-pack/plugins/spaces/public/views/management/components/manage_space_page.js index b7cc6e887e84d..2262e597fb433 100644 --- a/x-pack/plugins/spaces/public/views/management/components/manage_space_page.js +++ b/x-pack/plugins/spaces/public/views/management/components/manage_space_page.js @@ -37,13 +37,11 @@ export class ManageSpacePage extends React.Component { const { space, - httpAgent, - chrome + spacesManager } = this.props; if (space) { - httpAgent - .get(chrome.addBasePath(`/api/spaces/v1/spaces/${space}`)) + spacesManager.getSpace(space) .then(result => { if (result.data) { this.setState({ @@ -210,8 +208,6 @@ export class ManageSpacePage extends React.Component { urlContext } = this.state.space; - const { httpAgent, chrome } = this.props; - const params = { name, id, @@ -219,13 +215,17 @@ export class ManageSpacePage extends React.Component { urlContext }; - const overwrite = this.editingExistingSpace(); - if (name && description) { - httpAgent - .post(chrome.addBasePath(`/api/spaces/v1/spaces/${encodeURIComponent(id)}?overwrite=${overwrite}`), params) + let action; + if (this.editingExistingSpace()) { + action = this.props.spacesManager.updateSpace(params); + } else { + action = this.props.spacesManager.createSpace(params); + } + + action .then(result => { - toastNotifications.addSuccess(`Saved '${result.data.id}'`); + toastNotifications.addSuccess(`Saved '${result.data.name}'`); window.location.hash = `#/management/spaces/list`; }) .catch(error => { @@ -327,6 +327,7 @@ export class ManageSpacePage extends React.Component { ManageSpacePage.propTypes = { space: PropTypes.string, + spacesManager: PropTypes.object, httpAgent: PropTypes.func.isRequired, chrome: PropTypes.object, breadcrumbs: PropTypes.array.isRequired, diff --git a/x-pack/plugins/spaces/public/views/management/page_routes.js b/x-pack/plugins/spaces/public/views/management/page_routes.js index c7fd24674f00d..e07a5b95aeb23 100644 --- a/x-pack/plugins/spaces/public/views/management/page_routes.js +++ b/x-pack/plugins/spaces/public/views/management/page_routes.js @@ -11,6 +11,7 @@ import template from 'plugins/spaces/views/management/template.html'; import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { SpacesGridPage, ManageSpacePage } from './components'; +import { SpacesManager } from '../../lib/spaces_manager'; import routes from 'ui/routes'; @@ -39,10 +40,13 @@ routes.when('/management/spaces/create', { controller: function ($scope, $http, chrome) { const domNode = document.getElementById(reactRootNodeId); + const spacesManager = new SpacesManager($http, chrome); + render(, domNode); // unmount react on controller destroy @@ -63,11 +67,14 @@ routes.when('/management/spaces/edit/:space', { const { space } = $route.current.params; + const spacesManager = new SpacesManager($http, chrome); + render(, domNode); // unmount react on controller destroy diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control.js b/x-pack/plugins/spaces/public/views/nav_control/nav_control.js index 20703614e526f..74be5a7f627dd 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control.js +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control.js @@ -23,12 +23,12 @@ chromeNavControlsRegistry.register(constant({ const module = uiModules.get('spaces', ['kibana']); -module.controller('spacesNavController', ($scope, $http, chrome) => { +module.controller('spacesNavController', ($scope, $http, chrome, activeSpace) => { const domNode = document.getElementById(`spacesNavReactRoot`); const spacesManager = new SpacesManager($http, chrome); - render(, domNode); + render(, domNode); // unmount react on controller destroy $scope.$on('$destroy', () => { diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js index cb3c65318c025..f8ec1aa8f8317 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js @@ -13,7 +13,6 @@ import { EuiModalBody, EuiOverlayMask, EuiAvatar, - EuiLoadingSpinner } from '@elastic/eui'; import { SpaceCards } from '../components/space_cards'; @@ -21,15 +20,10 @@ export class NavControlModal extends Component { state = { isOpen: false, loading: false, - spaces: [], - activeSpace: null + spaces: [] }; - componentDidMount() { - this.loadSpaces(); - } - - loadSpaces() { + async loadSpaces() { const { spacesManager } = this.props; @@ -38,15 +32,10 @@ export class NavControlModal extends Component { loading: true }); - Promise.all([ - spacesManager.getSpaces(), - spacesManager.getActiveSpace() - ]).then(([spaces, activeSpace]) => { - this.setState({ - spaces, - activeSpace, - loading: false - }); + const spaces = await spacesManager.getSpaces(); + this.setState({ + spaces, + loading: false }); } @@ -74,21 +63,23 @@ export class NavControlModal extends Component { getActiveSpaceButton = () => { const { - loading, activeSpace - } = this.state; + } = this.props; - if (loading) { - return this.getButton( - , - '' - ); + if (!activeSpace) { + return null; } + console.log(activeSpace); - if (activeSpace && activeSpace.hasOwnProperty('name')) { + if (activeSpace.valid) { + return this.getButton( + , + activeSpace.space.name + ); + } else if (activeSpace.error) { return this.getButton( - , - activeSpace.name + , + 'error' ); } @@ -125,5 +116,6 @@ export class NavControlModal extends Component { } NavControlModal.propTypes = { + activeSpace: PropTypes.object, spacesManager: PropTypes.object.isRequired }; diff --git a/x-pack/plugins/spaces/server/lib/check_duplicate_context.js b/x-pack/plugins/spaces/server/lib/check_duplicate_context.js new file mode 100644 index 0000000000000..a3f0125fb777c --- /dev/null +++ b/x-pack/plugins/spaces/server/lib/check_duplicate_context.js @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export function createDuplicateContextQuery(index, { id, urlContext }) { + let mustNotClause = {}; + + if (id) { + mustNotClause = { + must_not: { + term: { + '_id': `space:${id}` + } + } + }; + } + + return { + index, + ignore: [404], + body: { + query: { + bool: { + must: { + term: { + [`space.urlContext`]: urlContext + } + }, + ...mustNotClause + } + } + } + }; +} diff --git a/x-pack/plugins/spaces/server/lib/get_active_space.js b/x-pack/plugins/spaces/server/lib/get_active_space.js new file mode 100644 index 0000000000000..b057b7b3ed136 --- /dev/null +++ b/x-pack/plugins/spaces/server/lib/get_active_space.js @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import Boom from 'boom'; +import { wrapError } from './errors'; +import { getSpaceUrlContext } from '../../common/spaces_url_parser'; + +export async function getActiveSpace(savedObjectsClient, basePath) { + const spaceContext = getSpaceUrlContext(basePath); + + if (!spaceContext) { + return null; + } + + let spaces; + try { + const { + saved_objects: savedObjects + } = await savedObjectsClient.find({ + type: 'space', + search: `"${spaceContext}"`, + search_fields: ['urlContext'], + }); + + spaces = savedObjects || []; + } catch(e) { + throw wrapError(e); + } + + if (spaces.length === 0) { + throw Boom.notFound(); + } + + if (spaces.length > 1) { + const spaceNames = spaces.map(s => s.attributes.name).join(', '); + + throw Boom.badRequest( + `Multiple Spaces share this URL Context: (${spaceNames}). Please correct this in the Management Section.` + ); + } + + return { + id: spaces[0].id, + ...spaces[0].attributes + }; +} diff --git a/x-pack/plugins/spaces/server/routes/api/v1/spaces.js b/x-pack/plugins/spaces/server/routes/api/v1/spaces.js index 1ba0021a30d70..80ee6993877f8 100644 --- a/x-pack/plugins/spaces/server/routes/api/v1/spaces.js +++ b/x-pack/plugins/spaces/server/routes/api/v1/spaces.js @@ -4,11 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ +import Boom from 'boom'; import { omit } from 'lodash'; +import { getClient } from '../../../../../../server/lib/get_client_shield'; import { routePreCheckLicense } from '../../../lib/route_pre_check_license'; import { spaceSchema } from '../../../lib/space_schema'; import { wrapError } from '../../../lib/errors'; -import { getSpaceUrlContext } from '../../../../common/spaces_url_parser'; +import { createDuplicateContextQuery } from '../../../lib/check_duplicate_context'; export function initSpacesApi(server) { const routePreCheckLicenseFn = routePreCheckLicense(server); @@ -20,6 +22,30 @@ export function initSpacesApi(server) { }; } + const callWithInternalUser = getClient(server).callWithInternalUser; + + const config = server.config(); + + async function checkForDuplicateContext(space) { + const query = createDuplicateContextQuery(config.get('kibana.index'), space); + + const { hits } = await callWithInternalUser('search', query); + + const { total, hits: conflicts } = hits; + + let error; + + if (total > 0) { + const firstConflictName = conflicts[0]._source.space.name; + + error = Boom.badRequest( + `Another Space (${firstConflictName}) already uses this URL Context. Please choose a different URL Context.` + ); + } + + return { error }; + } + server.route({ method: 'GET', path: '/api/spaces/v1/spaces', @@ -47,63 +73,59 @@ export function initSpacesApi(server) { server.route({ method: 'GET', - path: '/api/spaces/v1/spaces/_active', + path: '/api/spaces/v1/space/{id}', async handler(request, reply) { - const basePath = request.getBasePath(); - - const spaceContext = getSpaceUrlContext(basePath); + const spaceId = request.params.id; - if (!spaceContext) { - return reply(); - } + const client = request.getSavedObjectsClient(); try { - const client = request.getSavedObjectsClient(); - - const { - saved_objects: spaces = [] - } = await client.find({ - type: 'space', - search: `"${spaceContext}"`, - search_fields: ['urlContext'], - }); - - if (spaces.length === 0) { - return reply(); - } - - return reply(convertSavedObjectToSpace(spaces[0])); + const response = await client.get('space', spaceId); + return reply(convertSavedObjectToSpace(response)); } catch (e) { return reply(wrapError(e)); } + }, + config: { + pre: [routePreCheckLicenseFn] } }); server.route({ - method: 'GET', - path: '/api/spaces/v1/spaces/{id}', + method: 'POST', + path: '/api/spaces/v1/space', async handler(request, reply) { - const spaceId = request.params.id; - const client = request.getSavedObjectsClient(); - try { - const response = await client.get('space', spaceId); + const { + overwrite = false + } = request.query; - return reply(convertSavedObjectToSpace(response)); - } catch (e) { + const space = omit(request.payload, ['id']); + + const { error } = await checkForDuplicateContext(space); + + if (error) { + return reply(wrapError(error)); + } + + const id = request.params.id; + + let result; + try { + result = await client.create('space', { ...space }, { id, overwrite }); + } catch(e) { return reply(wrapError(e)); } - }, - config: { - pre: [routePreCheckLicenseFn] + + return reply(convertSavedObjectToSpace(result)); } }); server.route({ - method: 'POST', - path: '/api/spaces/v1/spaces/{id}', + method: 'PUT', + path: '/api/spaces/v1/space/{id}', async handler(request, reply) { const client = request.getSavedObjectsClient(); @@ -114,6 +136,12 @@ export function initSpacesApi(server) { const space = omit(request.payload, ['id']); const id = request.params.id; + const { error } = await checkForDuplicateContext({ ...space, id }); + + if (error) { + return reply(wrapError(error)); + } + let result; try { result = await client.create('space', { ...space }, { id, overwrite }); @@ -133,7 +161,7 @@ export function initSpacesApi(server) { server.route({ method: 'DELETE', - path: '/api/spaces/v1/spaces/{id}', + path: '/api/spaces/v1/space/{id}', async handler(request, reply) { const client = request.getSavedObjectsClient(); From 250639820dd13d739b7de500ec9d1c625856faee Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Tue, 8 May 2018 14:40:58 -0400 Subject: [PATCH 5/9] Show notification when navigating to an invalid space --- .../views/nav_control/nav_control_modal.js | 19 +++++++++++++++++-- .../spaces/server/lib/get_active_space.js | 4 +++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js index f8ec1aa8f8317..1827d5bf8519d 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control_modal.js @@ -15,6 +15,7 @@ import { EuiAvatar, } from '@elastic/eui'; import { SpaceCards } from '../components/space_cards'; +import { Notifier } from 'ui/notify'; export class NavControlModal extends Component { state = { @@ -23,6 +24,8 @@ export class NavControlModal extends Component { spaces: [] }; + notifier = new Notifier(`Spaces`); + async loadSpaces() { const { spacesManager @@ -39,6 +42,19 @@ export class NavControlModal extends Component { }); } + componentDidMount() { + const { + activeSpace + } = this.props; + + if (activeSpace && !activeSpace.valid) { + const { error = {} } = activeSpace; + if (error.message) { + this.notifier.error(error.message); + } + } + } + render() { let modal; if (this.state.isOpen) { @@ -69,9 +85,8 @@ export class NavControlModal extends Component { if (!activeSpace) { return null; } - console.log(activeSpace); - if (activeSpace.valid) { + if (activeSpace.valid && activeSpace.space) { return this.getButton( , activeSpace.space.name diff --git a/x-pack/plugins/spaces/server/lib/get_active_space.js b/x-pack/plugins/spaces/server/lib/get_active_space.js index b057b7b3ed136..7fb7821e75274 100644 --- a/x-pack/plugins/spaces/server/lib/get_active_space.js +++ b/x-pack/plugins/spaces/server/lib/get_active_space.js @@ -31,7 +31,9 @@ export async function getActiveSpace(savedObjectsClient, basePath) { } if (spaces.length === 0) { - throw Boom.notFound(); + throw Boom.notFound( + `The Space you requested could not be found. Please select a different Space to continue.` + ); } if (spaces.length > 1) { From d6ec0f6f5c50f9bb628e7f3e50a4fe4da3e79d17 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Tue, 8 May 2018 15:30:10 -0400 Subject: [PATCH 6/9] Fix navigation when basePath is not set --- x-pack/plugins/spaces/common/spaces_url_parser.js | 8 ++++++-- x-pack/plugins/spaces/common/spaces_url_parser.test.js | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/spaces/common/spaces_url_parser.js b/x-pack/plugins/spaces/common/spaces_url_parser.js index 2bae42c28a6be..075f09eea03a3 100644 --- a/x-pack/plugins/spaces/common/spaces_url_parser.js +++ b/x-pack/plugins/spaces/common/spaces_url_parser.js @@ -32,9 +32,13 @@ export function stripSpaceUrlContext(basePath = '/') { } else { basePathWithoutSpace = basePath.substring(0, indexOfSpaceContext); } + } else { + basePathWithoutSpace = basePath; + } - return basePathWithoutSpace; + if (basePathWithoutSpace.endsWith('/')) { + return basePathWithoutSpace.substr(0, -1); } - return basePath; + return basePathWithoutSpace; } diff --git a/x-pack/plugins/spaces/common/spaces_url_parser.test.js b/x-pack/plugins/spaces/common/spaces_url_parser.test.js index 95d375f404530..ee0813b2f70ac 100644 --- a/x-pack/plugins/spaces/common/spaces_url_parser.test.js +++ b/x-pack/plugins/spaces/common/spaces_url_parser.test.js @@ -12,7 +12,7 @@ test('it removes the space url context from the base path when the space is not test('it removes the space url context from the base path when the space is the root', () => { const basePath = `/s/my-space`; - expect(stripSpaceUrlContext(basePath)).toEqual('/'); + expect(stripSpaceUrlContext(basePath)).toEqual(''); }); test(`it doesn't change base paths without a space url context`, () => { @@ -21,7 +21,11 @@ test(`it doesn't change base paths without a space url context`, () => { }); test('it accepts no parameters', () => { - expect(stripSpaceUrlContext()).toEqual('/'); + expect(stripSpaceUrlContext()).toEqual(''); +}); + +test('it remove the trailing slash', () => { + expect(stripSpaceUrlContext('/')).toEqual(''); }); test('it identifies the space url context', () => { From 1b99186cdc9b7765d3c63ac2c2251e8e945b3097 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Fri, 18 May 2018 13:30:34 -0400 Subject: [PATCH 7/9] improved support for displaying a large number of spaces --- package.json | 2 +- x-pack/package.json | 2 +- .../public/views/components/space_card.js | 12 +- .../public/views/components/space_card.less | 8 +- .../public/views/components/space_cards.js | 23 +- .../public/views/nav_control/nav_control.less | 2 +- .../views/space_selector/space_selector.js | 11 +- .../views/space_selector/space_selector.less | 5 + x-pack/yarn.lock | 468 +----------------- yarn.lock | 352 +++---------- 10 files changed, 129 insertions(+), 756 deletions(-) diff --git a/package.json b/package.json index 9c6acdfd45264..5bdf13c020631 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "url": "https://github.com/elastic/kibana.git" }, "dependencies": { - "@elastic/eui": "v0.0.44", + "@elastic/eui": "v0.0.47", "@elastic/filesaver": "1.1.2", "@elastic/numeral": "2.3.2", "@elastic/ui-ace": "0.2.3", diff --git a/x-pack/package.json b/x-pack/package.json index 95c3ecd15dfb4..bfcb1dd5a9905 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -75,7 +75,7 @@ "yargs": "4.7.1" }, "dependencies": { - "@elastic/eui": "0.0.44", + "@elastic/eui": "0.0.47", "@elastic/node-crypto": "0.1.2", "@elastic/node-phantom-simple": "2.2.4", "@elastic/numeral": "2.3.2", diff --git a/x-pack/plugins/spaces/public/views/components/space_card.js b/x-pack/plugins/spaces/public/views/components/space_card.js index 22d87a3591b3e..f42003bea9f94 100644 --- a/x-pack/plugins/spaces/public/views/components/space_card.js +++ b/x-pack/plugins/spaces/public/views/components/space_card.js @@ -7,7 +7,6 @@ import React from 'react'; import { EuiCard, - EuiAvatar, EuiText } from '@elastic/eui'; import './space_card.less'; @@ -22,7 +21,7 @@ export const SpaceCard = (props) => { ); @@ -31,8 +30,13 @@ export const SpaceCard = (props) => { function renderSpaceTitle(space) { return (
-

{space.name}

); -} \ No newline at end of file +} + +function renderSpaceDescription(space) { + return ( +

{space.description}

+ ); +} diff --git a/x-pack/plugins/spaces/public/views/components/space_card.less b/x-pack/plugins/spaces/public/views/components/space_card.less index 777bc20bd1747..a75fbfaa2f343 100644 --- a/x-pack/plugins/spaces/public/views/components/space_card.less +++ b/x-pack/plugins/spaces/public/views/components/space_card.less @@ -1,3 +1,9 @@ .spaceCard, .euiCard.euiCard--isClickable.spaceCard { - width: 225px; + width: 310px; + height: 230px; + min-height: 200px; +} + +.spaceCardDescription { + margin-bottom: 10px; } diff --git a/x-pack/plugins/spaces/public/views/components/space_cards.js b/x-pack/plugins/spaces/public/views/components/space_cards.js index b37cd12c79e27..2e92ce4a290ea 100644 --- a/x-pack/plugins/spaces/public/views/components/space_cards.js +++ b/x-pack/plugins/spaces/public/views/components/space_cards.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Component } from 'react'; +import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import chrome from 'ui/chrome'; import { SpaceCard } from './space_card'; @@ -12,14 +12,29 @@ import { stripSpaceUrlContext } from '../../../common/spaces_url_parser'; import { EuiFlexGroup, EuiFlexItem, + EuiSpacer, } from '@elastic/eui'; +import { chunk } from 'lodash'; export class SpaceCards extends Component { render() { + const maxSpacesPerRow = 3; + const rows = chunk(this.props.spaces, maxSpacesPerRow); + return ( - - {this.props.spaces.map(this.renderSpace)} - + + { + rows.map((row, idx) => ( + + + {row.map(this.renderSpace)} + + + + )) + } + + ); } diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control.less b/x-pack/plugins/spaces/public/views/nav_control/nav_control.less index 8275d79693829..19f56c5ea1077 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control.less +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control.less @@ -4,5 +4,5 @@ .selectSpaceModal { min-width: 450px; - width: 75vw; + max-width: 1200px; } diff --git a/x-pack/plugins/spaces/public/views/space_selector/space_selector.js b/x-pack/plugins/spaces/public/views/space_selector/space_selector.js index 373944ca3c4a5..805dff7546dec 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/space_selector.js +++ b/x-pack/plugins/spaces/public/views/space_selector/space_selector.js @@ -13,7 +13,9 @@ import { EuiPageContent, EuiPageHeaderSection, EuiIcon, + EuiSpacer, EuiText, + EuiHorizontalRule, } from '@elastic/eui'; import { SpaceCards } from '../components/space_cards'; @@ -62,17 +64,18 @@ export class SpaceSelector extends Component { - +

Welcome to Kibana.

Select a space to begin.

+ + - -

You can change your workspace at anytime by accessing your profile within Kibana.

-
+ +
diff --git a/x-pack/plugins/spaces/public/views/space_selector/space_selector.less b/x-pack/plugins/spaces/public/views/space_selector/space_selector.less index 78bfc8e094fd0..4dcf7fad24b80 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/space_selector.less +++ b/x-pack/plugins/spaces/public/views/space_selector/space_selector.less @@ -23,3 +23,8 @@ .welcomeMedium { font-size: 1.4em; } + +.spaceSelectorPageContent { + box-shadow: none; + border: none; +} diff --git a/x-pack/yarn.lock b/x-pack/yarn.lock index 9747bb69a2f7c..fb4184fbbb632 100644 --- a/x-pack/yarn.lock +++ b/x-pack/yarn.lock @@ -10,30 +10,25 @@ esutils "^2.0.2" js-tokens "^3.0.0" -"@elastic/eui@0.0.44": - version "0.0.44" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.44.tgz#b0b58eb1b10d6f8de017f548bb06c5b5f71e3d61" +"@elastic/eui@0.0.47": + version "0.0.47" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.47.tgz#5bae27966bb1d68bb3106853610a407509053b44" dependencies: brace "^0.10.0" classnames "^2.2.5" core-js "^2.5.1" - eslint-config-prettier "^2.9.0" - eslint-plugin-prettier "^2.6.0" focus-trap-react "^3.0.4" highlight.js "^9.12.0" html "^1.0.0" - jquery "^3.2.1" keymirror "^0.1.1" lodash "^3.10.1" numeral "^2.0.6" - prettier "^1.11.1" prop-types "^15.6.0" react-ace "^5.5.0" react-color "^2.13.8" react-datepicker v1.4.1 react-input-autosize "^2.2.1" react-virtualized "^9.18.5" - serve "^6.3.1" tabbable "^1.1.0" uuid "^3.1.0" @@ -97,13 +92,6 @@ accept@2.x.x: boom "5.x.x" hoek "4.x.x" -accepts@~1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - acorn-globals@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" @@ -122,10 +110,6 @@ add-event-listener@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/add-event-listener/-/add-event-listener-0.0.1.tgz#a76229ebc64c8aefae204a16273a2f255abea2d0" -address@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" - agentkeepalive@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-2.2.0.tgz#c5d1bd4b129008f1163f236f86e5faea2026e2ef" @@ -185,12 +169,6 @@ angular-ui-bootstrap@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/angular-ui-bootstrap/-/angular-ui-bootstrap-1.2.5.tgz#b0c1eff0bf3b7a65668984a1b81820a90dc60995" -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - dependencies: - string-width "^2.0.0" - ansi-cyan@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" @@ -276,10 +254,6 @@ aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" -arch@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.0.tgz#3613aa46149064b3c1f0607919bf1d4786e82889" - archy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" @@ -304,15 +278,6 @@ argparse@~0.1.15: underscore "~1.7.0" underscore.string "~2.4.0" -args@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/args/-/args-4.0.0.tgz#5ca24cdba43d4b17111c56616f5f2e9d91933954" - dependencies: - camelcase "5.0.0" - chalk "2.3.2" - leven "2.1.0" - mri "1.1.0" - argv-split@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argv-split/-/argv-split-2.0.1.tgz#be264117790dbd5ccd63ec3f449a1804814ac4c5" @@ -947,12 +912,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -basic-auth@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.0.tgz#015db3f353e02e56377755f962742e8981e7bbba" - dependencies: - safe-buffer "5.1.1" - bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" @@ -979,7 +938,7 @@ bluebird@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.1.1.tgz#7e2e4318d62ae72a674f6aea6357bb4def1a6e41" -bluebird@3.5.1, bluebird@^3.3.1: +bluebird@^3.3.1: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" @@ -1017,18 +976,6 @@ boom@5.x.x: dependencies: hoek "4.x.x" -boxen@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^2.0.0" - brace-expansion@^1.0.0, brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" @@ -1144,10 +1091,6 @@ builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1180,10 +1123,6 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" -camelcase@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" - camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" @@ -1196,7 +1135,7 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -camelcase@^4.0.0, camelcase@^4.1.0: +camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -1232,22 +1171,6 @@ chai@~1.9.2: assertion-error "1.0.0" deep-eql "0.1.3" -chalk@2.3.2, chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -1266,6 +1189,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" +chalk@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chance@1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/chance/-/chance-1.0.10.tgz#03500b04ad94e778dd2891b09ec73a6ad87b1996" @@ -1312,10 +1243,6 @@ classnames@2.2.5, classnames@^2.1.2, classnames@^2.2.3, classnames@^2.2.4, class version "2.2.5" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - cli-cursor@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" @@ -1334,13 +1261,6 @@ clipboard@^1.6.1: select "^1.1.2" tiny-emitter "^2.0.0" -clipboardy@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" - dependencies: - arch "^2.1.0" - execa "^0.8.0" - cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -1460,24 +1380,6 @@ component-emitter@^1.2.0, component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" -compressible@~2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" - dependencies: - mime-db ">= 1.33.0 < 2" - -compression@^1.6.2: - version "1.7.2" - resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" - dependencies: - accepts "~1.3.4" - bytes "3.0.0" - compressible "~2.0.13" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.1" - vary "~1.1.2" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1514,10 +1416,6 @@ content-type-parser@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" -content-type@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - content@3.x.x: version "3.0.6" resolved "https://registry.yarnpkg.com/content/-/content-3.0.6.tgz#9c2e301e9ae515ed65a4b877d78aa5659bb1b809" @@ -1789,10 +1687,6 @@ d3@3.5.6: version "3.5.6" resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.6.tgz#9451c651ca733fb9672c81fb7f2655164a73a42d" -dargs@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -1828,7 +1722,7 @@ debug@2.2.0: dependencies: ms "0.7.1" -debug@2.6.9, debug@2.X, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8: +debug@2.X, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -1937,22 +1831,10 @@ delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -depd@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - deprecated@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - detect-file@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" @@ -1971,13 +1853,6 @@ detect-newline@2.X, detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" -detect-port@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.2.2.tgz#57a44533632d8bc74ad255676866ca43f96c7469" - dependencies: - address "^1.0.1" - debug "^2.6.0" - dfa@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/dfa/-/dfa-1.1.0.tgz#d30218bd10d030fa421df3ebbc82285463a31781" @@ -2089,10 +1964,6 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - elasticsearch@13.0.1: version "13.0.1" resolved "https://registry.yarnpkg.com/elasticsearch/-/elasticsearch-13.0.1.tgz#fa58204233052c4cd221e8721e48f3906b385b32" @@ -2104,10 +1975,6 @@ elasticsearch@13.0.1: lodash.isempty "^4.4.0" lodash.trimend "^4.5.1" -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" @@ -2200,10 +2067,6 @@ es6-promise@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-2.0.1.tgz#ccc4963e679f0ca9fb187c777b9e583d3c7573c2" -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - escape-string-regexp@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" @@ -2252,19 +2115,6 @@ escodegen@~1.3.2: optionalDependencies: source-map "~0.1.33" -eslint-config-prettier@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz#5ecd65174d486c22dff389fe036febf502d468a3" - dependencies: - get-stdin "^5.0.1" - -eslint-plugin-prettier@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz#33e4e228bdb06142d03c560ce04ec23f6c767dd7" - dependencies: - fast-diff "^1.1.1" - jest-docblock "^21.0.0" - esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -2301,10 +2151,6 @@ esutils@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.0.0.tgz#8151d358e20c8acc7fb745e7472c0025fe496570" -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - exec-sh@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" @@ -2335,18 +2181,6 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -2488,10 +2322,6 @@ fast-deep-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" -fast-diff@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" - fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -2550,10 +2380,6 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" -filesize@3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - fill-keys@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20" @@ -2731,22 +2557,10 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - from@^0.1.3: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" -fs-extra@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-mkdirp-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" @@ -2833,10 +2647,6 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" -get-stdin@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" - get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -3236,7 +3046,7 @@ gulplog@^1.0.0: dependencies: glogg "^1.0.0" -handlebars@4.0.11, handlebars@^4.0.3: +handlebars@^4.0.3: version "4.0.11" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" dependencies: @@ -3475,15 +3285,6 @@ htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^2.0.2" -http-errors@1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" - dependencies: - depd "1.1.1" - inherits "2.0.3" - setprototypeof "1.0.3" - statuses ">= 1.3.1 < 2" - http-errors@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.4.0.tgz#6c0242dea6b3df7afda153c71089b31c6e82aabf" @@ -3491,15 +3292,6 @@ http-errors@~1.4.0: inherits "2.0.1" statuses ">= 1.2.1 < 2" -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" @@ -3566,7 +3358,7 @@ inherits@1: version "1.0.2" resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -3611,10 +3403,6 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" -ip@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - iron@4.x.x: version "4.0.5" resolved "https://registry.yarnpkg.com/iron/-/iron-4.0.5.tgz#4f042cceb8b9738f346b59aa734c83a89bc31428" @@ -3834,7 +3622,7 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-stream@1.1.0, is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -3872,10 +3660,6 @@ is-windows@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -4065,10 +3849,6 @@ jest-diff@^22.4.3: jest-get-type "^22.4.3" pretty-format "^22.4.3" -jest-docblock@^21.0.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" - jest-docblock@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.3.tgz#50886f132b42b280c903c592373bb6e93bb68b19" @@ -4305,7 +4085,7 @@ jquery@^3.1.1: version "3.2.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787" -jquery@^3.2.1, jquery@^3.3.1: +jquery@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" @@ -4383,12 +4163,6 @@ json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - optionalDependencies: - graceful-fs "^4.1.6" - jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -4476,7 +4250,7 @@ left-pad@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" -leven@2.1.0, leven@^2.1.0: +leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -4858,21 +4632,6 @@ methods@^1.1.1, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micro-compress@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micro-compress/-/micro-compress-1.0.0.tgz#53f5a80b4ad0320ca165a559b6e3df145d4f704f" - dependencies: - compression "^1.6.2" - -micro@9.1.4: - version "9.1.4" - resolved "https://registry.yarnpkg.com/micro/-/micro-9.1.4.tgz#dbe655f34bb3390509898ddf3fda12348f5cbaa9" - dependencies: - content-type "1.0.4" - is-stream "1.1.0" - mri "1.1.0" - raw-body "2.3.2" - micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -4913,30 +4672,16 @@ mime-db@1.x.x: version "1.32.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.32.0.tgz#485b3848b01a3cda5f968b4882c0771e58e09414" -"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - mime-db@~1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" -mime-types@2.1.18, mime-types@~2.1.18: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - dependencies: - mime-db "~1.33.0" - mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: version "2.1.17" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: mime-db "~1.30.0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -5067,10 +4812,6 @@ moment@2.x.x, "moment@>= 2.9.0", moment@^2.13.0, moment@^2.20.1: version "2.20.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.20.1.tgz#d6eb1a46cbcc14a2b2f9434112c1ff8907f313fd" -mri@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.0.tgz#5c0a3f29c8ccffbbb1ec941dcec09d71fa32f36a" - ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -5141,10 +4882,6 @@ nearley@^2.7.10: railroad-diagrams "^1.0.0" randexp "^0.4.2" -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - ngreact@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/ngreact/-/ngreact-0.5.1.tgz#2dcccc1541771796689d13e51bb8d5010af41c57" @@ -5200,10 +4937,6 @@ node-pre-gyp@^0.6.39: tar "^2.2.1" tar-pack "^3.4.0" -node-version@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.3.tgz#1081c87cce6d2dbbd61d0e51e28c287782678496" - nomnom@~1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" @@ -5385,16 +5118,6 @@ object.values@^1.0.4: function-bind "^1.1.0" has "^1.0.1" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -5411,16 +5134,6 @@ onetime@^1.0.0: version "1.1.0" resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" -openssl-self-signed-certificate@1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/openssl-self-signed-certificate/-/openssl-self-signed-certificate-1.1.6.tgz#9d3a4776b1a57e9847350392114ad2f915a83dd4" - -opn@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" - dependencies: - is-wsl "^1.1.0" - optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -5582,7 +5295,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@1.0.2, path-is-inside@^1.0.1: +path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -5617,12 +5330,6 @@ path-to-regexp@^1.0.0, path-to-regexp@^1.7.0: dependencies: isarray "0.0.1" -path-type@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - dependencies: - pify "^3.0.0" - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -5685,10 +5392,6 @@ pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -5793,10 +5496,6 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.11.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" - pretty-format@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f" @@ -5969,28 +5668,6 @@ randomatic@^1.1.3: is-number "^3.0.0" kind-of "^4.0.0" -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -raw-body@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" - dependencies: - bytes "3.0.0" - http-errors "1.6.2" - iconv-lite "0.4.19" - unpipe "1.0.0" - -rc@^1.0.1, rc@^1.1.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.6.tgz#eb18989c6d4f4f162c399f79ddd29f3835568092" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - rc@^1.1.7: version "1.2.3" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.3.tgz#51575a900f8dd68381c710b4712c2154c3e2035b" @@ -6376,19 +6053,6 @@ regexpu-core@^2.0.0: regjsgen "^0.2.0" regjsparser "^0.1.4" -registry-auth-token@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - dependencies: - rc "^1.0.1" - regjsgen@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" @@ -6671,7 +6335,7 @@ rxjs@5.3.0: dependencies: symbol-observable "^1.0.1" -safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -6733,55 +6397,10 @@ semver@^5.4.1, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - sequencify@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" -serve@^6.3.1: - version "6.5.6" - resolved "https://registry.yarnpkg.com/serve/-/serve-6.5.6.tgz#579136688f80f6bf4a618ca8e8cba10dfb4d95e3" - dependencies: - args "4.0.0" - basic-auth "2.0.0" - bluebird "3.5.1" - boxen "1.3.0" - chalk "2.4.0" - clipboardy "1.2.3" - dargs "5.1.0" - detect-port "1.2.2" - filesize "3.6.1" - fs-extra "5.0.0" - handlebars "4.0.11" - ip "1.1.5" - micro "9.1.4" - micro-compress "1.0.0" - mime-types "2.1.18" - node-version "1.1.3" - openssl-self-signed-certificate "1.1.6" - opn "5.3.0" - path-is-inside "1.0.2" - path-type "3.0.0" - send "0.16.2" - update-check "1.3.2" - set-blocking@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-1.0.0.tgz#cd5e5d938048df1ac92dfe92e1f16add656f5ec5" @@ -6818,14 +6437,6 @@ setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" -setprototypeof@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - shallow-copy@~0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" @@ -7074,14 +6685,10 @@ static-module@^1.1.0: static-eval "~0.2.0" through2 "~0.4.1" -"statuses@>= 1.2.1 < 2", statuses@~1.4.0: +"statuses@>= 1.2.1 < 2": version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" -"statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" @@ -7339,12 +6946,6 @@ temp@^0.8.3: os-tmpdir "^1.0.0" rimraf "~2.2.6" -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - dependencies: - execa "^0.7.0" - test-exclude@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" @@ -7648,14 +7249,6 @@ unique-stream@^2.0.2: json-stable-stringify "^1.0.0" through2-filter "^2.0.0" -universalify@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" - -unpipe@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -7663,13 +7256,6 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -update-check@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.3.2.tgz#460f9e9ab24820367f3edbeb4d4142d9936ff171" - dependencies: - registry-auth-token "3.3.2" - registry-url "3.1.0" - urix@^0.1.0, urix@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" @@ -7732,10 +7318,6 @@ value-or-function@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - venn.js@0.2.9: version "0.2.9" resolved "https://registry.yarnpkg.com/venn.js/-/venn.js-0.2.9.tgz#33c29075efa484731d59d884752900cc33033656" @@ -7934,12 +7516,6 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2" -widest-line@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" - dependencies: - string-width "^2.1.1" - window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" diff --git a/yarn.lock b/yarn.lock index c544a9acbb457..2098dda85233c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -77,30 +77,25 @@ version "0.0.0" uid "" -"@elastic/eui@0.0.44", "@elastic/eui@v0.0.44": - version "0.0.44" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.44.tgz#b0b58eb1b10d6f8de017f548bb06c5b5f71e3d61" +"@elastic/eui@0.0.47", "@elastic/eui@v0.0.47": + version "0.0.47" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.47.tgz#5bae27966bb1d68bb3106853610a407509053b44" dependencies: brace "^0.10.0" classnames "^2.2.5" core-js "^2.5.1" - eslint-config-prettier "^2.9.0" - eslint-plugin-prettier "^2.6.0" focus-trap-react "^3.0.4" highlight.js "^9.12.0" html "^1.0.0" - jquery "^3.2.1" keymirror "^0.1.1" lodash "^3.10.1" numeral "^2.0.6" - prettier "^1.11.1" prop-types "^15.6.0" react-ace "^5.5.0" react-color "^2.13.8" react-datepicker v1.4.1 react-input-autosize "^2.2.1" react-virtualized "^9.18.5" - serve "^6.3.1" tabbable "^1.1.0" uuid "^3.1.0" @@ -181,14 +176,6 @@ version "9.4.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.7.tgz#57d81cd98719df2c9de118f2d5f3b1120dcd7275" -"@zeit/check-updates@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@zeit/check-updates/-/check-updates-1.1.0.tgz#d0f65026a36f27cd1fd54c647d8294447c1d2d8b" - dependencies: - chalk "2.3.0" - ms "2.1.1" - update-notifier "2.3.0" - JSONStream@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.1.1.tgz#c98bfd88c8f1e1e8694e53c5baa6c8691553e59a" @@ -226,13 +213,6 @@ accepts@1.3.3: mime-types "~2.1.11" negotiator "0.6.1" -accepts@~1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - acorn-dynamic-import@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" @@ -281,10 +261,6 @@ add-event-listener@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/add-event-listener/-/add-event-listener-0.0.1.tgz#a76229ebc64c8aefae204a16273a2f255abea2d0" -address@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" - adm-zip@0.4.7: version "0.4.7" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" @@ -506,10 +482,6 @@ aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" -arch@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.0.tgz#3613aa46149064b3c1f0607919bf1d4786e82889" - are-we-there-yet@~1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" @@ -530,16 +502,6 @@ argparse@~0.1.15: underscore "~1.7.0" underscore.string "~2.4.0" -args@3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/args/-/args-3.0.8.tgz#2f425ab639c69d74ff728f3d7c6e93b97b91af7c" - dependencies: - camelcase "4.1.0" - chalk "2.1.0" - mri "1.1.0" - pkginfo "0.4.1" - string-similarity "1.2.0" - arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -1560,12 +1522,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -basic-auth@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.0.tgz#015db3f353e02e56377755f962742e8981e7bbba" - dependencies: - safe-buffer "5.1.1" - batch-processor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/batch-processor/-/batch-processor-1.0.0.tgz#75c95c32b748e0850d10c2b168f6bdbe9891ace8" @@ -1622,14 +1578,14 @@ bluebird@3.4.6: version "3.4.6" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f" -bluebird@3.5.1, bluebird@^3.3.0: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" - bluebird@^2.10.0, bluebird@^2.9.24: version "2.11.0" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1" +bluebird@^3.3.0: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + bmp-js@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.0.3.tgz#64113e9c7cf1202b376ed607bf30626ebe57b18a" @@ -1716,7 +1672,7 @@ boom@5.2.0, boom@5.x.x: dependencies: hoek "4.x.x" -boxen@1.3.0, boxen@^1.2.1, boxen@^1.2.2: +boxen@^1.2.1, boxen@^1.2.2: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" dependencies: @@ -2064,10 +2020,6 @@ camelcase-keys@^3.0.0: camelcase "^3.0.0" map-obj "^1.0.0" -camelcase@4.1.0, camelcase@^4.0.0, camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" @@ -2080,6 +2032,10 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" +camelcase@^4.0.0, camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + caniuse-api@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" @@ -2139,14 +2095,6 @@ chai@3.5.0, "chai@>=1.9.2 <4.0.0": deep-eql "^0.1.3" type-detect "^1.0.0" -chalk@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - chalk@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" @@ -2155,14 +2103,6 @@ chalk@2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@2.3.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3, chalk@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -2173,6 +2113,14 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3, chalk@~1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174" @@ -2389,13 +2337,6 @@ clipboard@^1.6.1: select "^1.1.2" tiny-emitter "^2.0.0" -clipboardy@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" - dependencies: - arch "^2.1.0" - execa "^0.8.0" - cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -2607,24 +2548,6 @@ component-inherit@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" -compressible@~2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" - dependencies: - mime-db ">= 1.33.0 < 2" - -compression@^1.6.2: - version "1.7.2" - resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" - dependencies: - accepts "~1.3.4" - bytes "3.0.0" - compressible "~2.0.13" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.1" - vary "~1.1.2" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -2739,7 +2662,7 @@ content-type-parser@^1.0.1, content-type-parser@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" -content-type@1.0.4, content-type@~1.0.1, content-type@~1.0.4: +content-type@~1.0.1, content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" @@ -3301,10 +3224,6 @@ d@1: dependencies: es5-ext "^0.10.9" -dargs@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -3352,7 +3271,7 @@ debug@2.6.0: dependencies: ms "0.7.2" -debug@2.6.9, debug@2.X, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: +debug@2.6.9, debug@2.X, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -3531,7 +3450,7 @@ depd@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/depd/-/depd-1.0.1.tgz#80aec64c9d6d97e65cc2a9caa93c0aa6abf73aaa" -depd@~1.1.0, depd@~1.1.1, depd@~1.1.2: +depd@~1.1.0, depd@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -3542,10 +3461,6 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" @@ -3560,13 +3475,6 @@ detect-newline@2.X, detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" -detect-port@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.2.2.tgz#57a44533632d8bc74ad255676866ca43f96c7469" - dependencies: - address "^1.0.1" - debug "^2.6.0" - dezalgo@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" @@ -3845,7 +3753,7 @@ encode-uri-query@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/encode-uri-query/-/encode-uri-query-1.0.0.tgz#d632be4aafe8316c6145007ffb2844c5312b194c" -encodeurl@~1.0.1, encodeurl@~1.0.2: +encodeurl@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -4364,10 +4272,6 @@ esutils@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.0.0.tgz#8151d358e20c8acc7fb745e7472c0025fe496570" -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - even-better@7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/even-better/-/even-better-7.0.2.tgz#d056f429c90ecc20ee9494aca0a751f743504d2e" @@ -4446,18 +4350,6 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" @@ -4773,10 +4665,6 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" -filesize@3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.0.tgz#22d079615624bb6fd3c04026120628a41b3f4efa" - fill-keys@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20" @@ -4971,10 +4859,6 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - from@^0.1.3, from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" @@ -4997,14 +4881,6 @@ fs-extra@4.0.3, fs-extra@^4.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" @@ -5630,9 +5506,9 @@ h2o2@5.1.1: joi "9.X.X" wreck "9.X.X" -handlebars@4.0.11, handlebars@^4.0.1, handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" +handlebars@4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7" dependencies: async "^1.4.0" optimist "^0.6.1" @@ -5640,9 +5516,9 @@ handlebars@4.0.11, handlebars@^4.0.1, handlebars@^4.0.3: optionalDependencies: uglify-js "^2.6" -handlebars@4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7" +handlebars@^4.0.1, handlebars@^4.0.3: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" dependencies: async "^1.4.0" optimist "^0.6.1" @@ -6250,10 +6126,6 @@ ip-regex@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd" -ip@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - iron@4.x.x: version "4.0.5" resolved "https://registry.yarnpkg.com/iron/-/iron-4.0.5.tgz#4f042cceb8b9738f346b59aa734c83a89bc31428" @@ -6600,7 +6472,7 @@ is-retry-allowed@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" -is-stream@1.1.0, is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -6658,10 +6530,6 @@ is-word-character@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.1.tgz#5a03fa1ea91ace8a6eb0c7cd770eb86d65c8befb" -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -7336,7 +7204,7 @@ jpeg-js@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.2.0.tgz#53e448ec9d263e683266467e9442d2c5a2ef5482" -jquery@^3.1.1, jquery@^3.2.1, jquery@^3.3.1: +jquery@^3.1.1, jquery@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" @@ -8421,21 +8289,6 @@ methods@^1.1.1, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micro-compress@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micro-compress/-/micro-compress-1.0.0.tgz#53f5a80b4ad0320ca165a559b6e3df145d4f704f" - dependencies: - compression "^1.6.2" - -micro@9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/micro/-/micro-9.1.0.tgz#f2effba306639076e994c007c327dfc36a5185e9" - dependencies: - content-type "1.0.4" - is-stream "1.1.0" - mri "1.1.0" - raw-body "2.3.2" - micromatch@^2.1.5, micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -8479,11 +8332,11 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.x.x, "mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: +mime-db@1.x.x, mime-db@~1.33.0: version "1.33.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" -mime-types@2.1.18, mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: version "2.1.18" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" dependencies: @@ -8493,10 +8346,6 @@ mime@1.3.x: version "1.3.6" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - mime@^1.2.11, mime@^1.3.4, mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -8656,10 +8505,6 @@ moment@2.x.x, "moment@>= 2.9.0", moment@^2.10.6, moment@^2.13.0, moment@^2.20.1: version "2.21.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a" -mri@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.0.tgz#5c0a3f29c8ccffbbb1ec941dcec09d71fa32f36a" - ms@0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.0.tgz#865be94c2e7397ad8a57da6a633a6e2f30798b83" @@ -8676,7 +8521,7 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -ms@2.1.1, ms@^2.0.0: +ms@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" @@ -8879,10 +8724,6 @@ node-status-codes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f" -node-version@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.0.tgz#f437d7ba407e65e2c4eaef8887b1718ba523d4f0" - nomnom@~1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" @@ -9106,10 +8947,6 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -9126,16 +8963,6 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -openssl-self-signed-certificate@1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/openssl-self-signed-certificate/-/openssl-self-signed-certificate-1.1.6.tgz#9d3a4776b1a57e9847350392114ad2f915a83dd4" - -opn@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225" - dependencies: - is-wsl "^1.1.0" - optimist@^0.6.1, optimist@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -9387,7 +9214,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1, path-is-absolute@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@1.0.2, path-is-inside@^1.0.1, path-is-inside@^1.0.2: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -9412,12 +9239,6 @@ path-to-regexp@^1.0.0, path-to-regexp@^1.7.0: dependencies: isarray "0.0.1" -path-type@3.0.0, path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - dependencies: - pify "^3.0.0" - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -9432,6 +9253,12 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -9564,10 +9391,6 @@ pkg-up@^2.0.0: dependencies: find-up "^2.1.0" -pkginfo@0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" - plugin-error@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c" @@ -9903,10 +9726,6 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" - prettier@^1.12.1: version "1.12.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" @@ -10181,7 +10000,7 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -range-parser@^1.2.0, range-parser@~1.2.0: +range-parser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" @@ -11109,7 +10928,7 @@ rxjs@5.4.3: dependencies: symbol-observable "^1.0.1" -safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -11226,51 +11045,6 @@ semver@~4.3.3: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serve@^6.3.1: - version "6.5.3" - resolved "https://registry.yarnpkg.com/serve/-/serve-6.5.3.tgz#39ae7b7ff5934a9ca93ba7235344eb34b726cc48" - dependencies: - "@zeit/check-updates" "1.1.0" - args "3.0.8" - basic-auth "2.0.0" - bluebird "3.5.1" - boxen "1.3.0" - chalk "2.3.2" - clipboardy "1.2.3" - dargs "5.1.0" - detect-port "1.2.2" - filesize "3.6.0" - fs-extra "5.0.0" - handlebars "4.0.11" - ip "1.1.5" - micro "9.1.0" - micro-compress "1.0.0" - mime-types "2.1.18" - node-version "1.1.0" - openssl-self-signed-certificate "1.1.6" - opn "5.2.0" - path-is-inside "1.0.2" - path-type "3.0.0" - send "0.16.2" - set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -11745,7 +11519,7 @@ static-module@^2.2.0: static-eval "^2.0.0" through2 "~2.0.3" -statuses@1, "statuses@>= 1.2.1 < 2", "statuses@>= 1.3.1 < 2", statuses@~1.4.0: +statuses@1, "statuses@>= 1.2.1 < 2", "statuses@>= 1.3.1 < 2": version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" @@ -11817,12 +11591,6 @@ string-length@^2.0.0: astral-regex "^1.0.0" strip-ansi "^4.0.0" -string-similarity@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-1.2.0.tgz#d75153cb383846318b7a39a8d9292bb4db4e9c30" - dependencies: - lodash "^4.13.1" - string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -12720,7 +12488,19 @@ upath@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.4.tgz#ee2321ba0a786c50973db043a50b7bcba822361d" -update-notifier@2.3.0, update-notifier@^2.2.0: +update-notifier@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-0.5.0.tgz#07b5dc2066b3627ab3b4f530130f7eddda07a4cc" + dependencies: + chalk "^1.0.0" + configstore "^1.0.0" + is-npm "^1.0.0" + latest-version "^1.0.0" + repeating "^1.1.2" + semver-diff "^2.0.0" + string-length "^1.0.0" + +update-notifier@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.3.0.tgz#4e8827a6bb915140ab093559d7014e3ebb837451" dependencies: @@ -12734,18 +12514,6 @@ update-notifier@2.3.0, update-notifier@^2.2.0: semver-diff "^2.0.0" xdg-basedir "^3.0.0" -update-notifier@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-0.5.0.tgz#07b5dc2066b3627ab3b4f530130f7eddda07a4cc" - dependencies: - chalk "^1.0.0" - configstore "^1.0.0" - is-npm "^1.0.0" - latest-version "^1.0.0" - repeating "^1.1.2" - semver-diff "^2.0.0" - string-length "^1.0.0" - urix@^0.1.0, urix@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" @@ -12857,10 +12625,6 @@ value-or-function@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - vega-canvas@1: version "1.0.1" resolved "https://registry.yarnpkg.com/vega-canvas/-/vega-canvas-1.0.1.tgz#22cfa510af0cfbd920fc6af8b6111d3de5e63c44" From ad5c5dd61b357ff20754ffbb31b77d075c347668 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Fri, 18 May 2018 14:01:59 -0400 Subject: [PATCH 8/9] additional testing --- .../public/views/components/space_card.js | 4 +- .../views/components/space_card.test.js | 32 +++++++++++++ .../views/components/space_cards.test.js | 46 +++++++++++++++++++ .../__snapshots__/space_selector.test.js.snap | 14 ++---- 4 files changed, 84 insertions(+), 12 deletions(-) create mode 100644 x-pack/plugins/spaces/public/views/components/space_card.test.js create mode 100644 x-pack/plugins/spaces/public/views/components/space_cards.test.js diff --git a/x-pack/plugins/spaces/public/views/components/space_card.js b/x-pack/plugins/spaces/public/views/components/space_card.js index f42003bea9f94..12cc355517555 100644 --- a/x-pack/plugins/spaces/public/views/components/space_card.js +++ b/x-pack/plugins/spaces/public/views/components/space_card.js @@ -36,7 +36,5 @@ function renderSpaceTitle(space) { } function renderSpaceDescription(space) { - return ( -

{space.description}

- ); + return space.description; } diff --git a/x-pack/plugins/spaces/public/views/components/space_card.test.js b/x-pack/plugins/spaces/public/views/components/space_card.test.js new file mode 100644 index 0000000000000..f79c74201eeee --- /dev/null +++ b/x-pack/plugins/spaces/public/views/components/space_card.test.js @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { shallow, mount } from 'enzyme'; +import { SpaceCard } from './space_card'; + +test('it renders without crashing', () => { + const space = { + name: 'space name', + description: 'space description' + }; + + shallow(); +}); + +test('it is clickable', () => { + const space = { + name: 'space name', + description: 'space description' + }; + + const clickHandler = jest.fn(); + + const wrapper = mount(); + wrapper.simulate('click'); + + expect(clickHandler).toHaveBeenCalledTimes(1); +}); diff --git a/x-pack/plugins/spaces/public/views/components/space_cards.test.js b/x-pack/plugins/spaces/public/views/components/space_cards.test.js new file mode 100644 index 0000000000000..b221e6f337afc --- /dev/null +++ b/x-pack/plugins/spaces/public/views/components/space_cards.test.js @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { shallow, mount } from 'enzyme'; +import { SpaceCards } from './space_cards'; +import { EuiFlexGroup } from '@elastic/eui'; +import { SpaceCard } from './space_card'; + +test('it renders without crashing', () => { + const space = { + id: 'space-id', + name: 'space name', + description: 'space description' + }; + + shallow(); +}); + +test('it renders spaces in groups of 3', () => { + function buildSpace(name) { + return { + id: `id-${name}`, + name, + description: `desc-${name}` + }; + } + + const spaces = [ + buildSpace(1), + buildSpace(2), + buildSpace(3), + buildSpace(4) + ]; + + const wrapper = mount(); + + const groups = wrapper.find(EuiFlexGroup); + expect(groups).toHaveLength(2); + + expect(groups.at(0).find(SpaceCard)).toHaveLength(3); + expect(groups.at(1).find(SpaceCard)).toHaveLength(1); +}); diff --git a/x-pack/plugins/spaces/public/views/space_selector/__snapshots__/space_selector.test.js.snap b/x-pack/plugins/spaces/public/views/space_selector/__snapshots__/space_selector.test.js.snap index cfb329dd6d7a1..7de6fd437aabc 100644 --- a/x-pack/plugins/spaces/public/views/space_selector/__snapshots__/space_selector.test.js.snap +++ b/x-pack/plugins/spaces/public/views/space_selector/__snapshots__/space_selector.test.js.snap @@ -45,7 +45,7 @@ exports[`it renders without crashing 1`] = ` className="euiPageBody" >
-
-

- You can change your workspace at anytime by accessing your profile within Kibana. -

-
+ className="euiSpacer euiSpacer--l" + />
From 1ce4cc77ab69cc06dfcceb6a6ca7d6b97659e316 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Mon, 21 May 2018 11:37:43 -0400 Subject: [PATCH 9/9] add note to replace call with SOC repository --- x-pack/plugins/spaces/server/routes/api/v1/spaces.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/plugins/spaces/server/routes/api/v1/spaces.js b/x-pack/plugins/spaces/server/routes/api/v1/spaces.js index 80ee6993877f8..019513dafbb8c 100644 --- a/x-pack/plugins/spaces/server/routes/api/v1/spaces.js +++ b/x-pack/plugins/spaces/server/routes/api/v1/spaces.js @@ -29,6 +29,8 @@ export function initSpacesApi(server) { async function checkForDuplicateContext(space) { const query = createDuplicateContextQuery(config.get('kibana.index'), space); + // TODO(legrego): Once the SOC is split into a client & repository, this "callWithInternalUser" call should + // be replaced to use the repository instead. const { hits } = await callWithInternalUser('search', query); const { total, hits: conflicts } = hits;