From a78aaa41fc1712fa1eb94b560a49da7a58dd7e9f Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Tue, 17 Dec 2019 12:04:44 -0800 Subject: [PATCH] [Fleet] Assign/Unassign data source from policy UI (#53058) * Add index files to export various modules; normalize imports * Clean up unused files; extract datasources table component from policy details page * Expose http client to frontend libs; remove unused types; import ES UI's useRequest lib * Adjust shape of rest api adapter interface to better match with rest of kibana; remove unused node adapter; change per_page param to perPage in agent events route * Initial pass at assign data sources flyout * Initial pass at unassigning data sources from policy * Make data sources table searchable by package values * Fix enrollment key lib for rest adapter param changes * Fix imports and types * `yarn.lock` changes after bootstrapping --- x-pack/legacy/plugins/fleet/package.json | 15 - .../components/agent_unenroll_provider.tsx | 4 +- .../plugins/fleet/public/components/index.ts | 15 + .../public/components/layouts/primary.tsx | 64 --- .../public/components/layouts/walkthrough.tsx | 54 -- .../fleet/public/components/loading.tsx | 2 +- .../components/navigation/child_routes.tsx | 4 +- .../components/navigation/connected_link.tsx | 1 - .../fleet/public/components/search_bar.tsx | 13 +- .../plugins/fleet/public/hooks/index.ts | 11 + .../fleet/public/hooks/use_request.tsx | 27 + .../fleet/public/hooks/with_url_state.tsx | 14 +- x-pack/legacy/plugins/fleet/public/index.tsx | 2 +- .../lib/adapters/agent/rest_agent_adapter.ts | 24 +- .../public/lib/adapters/elasticsearch/rest.ts | 6 +- .../adapters/policy/rest_policy_adapter.ts | 14 +- .../lib/adapters/rest_api/adapter_types.ts | 21 +- .../rest_api/axios_rest_api_adapter.ts | 26 +- .../rest_api/node_axios_api_adapter.ts | 92 ---- .../fleet/public/lib/compose/kibana.ts | 2 + .../fleet/public/lib/enrollment_api_key.ts | 14 +- .../legacy/plugins/fleet/public/lib/types.ts | 29 +- .../components/agent_events_table.tsx | 11 +- .../components/details_section.tsx | 12 +- .../pages/agent_details/components/index.ts | 7 + .../components/metadata_flyout.tsx | 5 +- .../components/metadata_form.tsx | 9 +- .../agent_details/hooks/index.ts} | 7 +- .../pages/agent_details/hooks/use_agent.tsx | 2 +- .../public/pages/agent_details/index.tsx | 15 +- .../components/agent_enrollment.tsx | 11 +- .../create_api_key_form.tsx | 3 +- .../components/enrollment_api_keys/hooks.tsx | 3 +- .../components/enrollment_api_keys/index.tsx | 7 +- .../enrollment_instructions/index.tsx | 1 - .../enrollment_instructions/shell/index.tsx | 2 +- .../pages/agent_list/components/index.ts | 6 + .../fleet/public/pages/agent_list/index.tsx | 12 +- .../public/pages/error/enforce_security.tsx | 5 +- .../public/pages/error/invalid_license.tsx | 5 +- .../fleet/public/pages/error/no_access.tsx | 5 +- .../components/assign_datasources.tsx | 235 ++++++++ .../components/datasources_table.tsx | 117 ++++ .../policy_details/components/donut_chart.tsx | 2 +- .../policy_details/components/edit_policy.tsx | 8 +- .../pages/policy_details/components/index.ts | 9 + .../pages/policy_details/hooks/index.ts | 7 + .../policy_details/hooks/use_agent_status.tsx | 2 +- .../pages/policy_details/hooks/use_policy.tsx | 2 +- .../public/pages/policy_details/index.tsx | 168 +++--- .../policy_list/components/create_policy.tsx | 4 +- .../pages/policy_list/components/index.ts | 6 + .../fleet/public/pages/policy_list/index.tsx | 8 +- x-pack/legacy/plugins/fleet/public/routes.tsx | 14 +- .../fleet/server/routes/agents/events.ts | 8 +- yarn.lock | 512 ++---------------- 56 files changed, 735 insertions(+), 949 deletions(-) delete mode 100644 x-pack/legacy/plugins/fleet/package.json create mode 100644 x-pack/legacy/plugins/fleet/public/components/index.ts delete mode 100644 x-pack/legacy/plugins/fleet/public/components/layouts/primary.tsx delete mode 100644 x-pack/legacy/plugins/fleet/public/components/layouts/walkthrough.tsx create mode 100644 x-pack/legacy/plugins/fleet/public/hooks/index.ts create mode 100644 x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx delete mode 100644 x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/node_axios_api_adapter.ts create mode 100644 x-pack/legacy/plugins/fleet/public/pages/agent_details/components/index.ts rename x-pack/legacy/plugins/fleet/public/{components/layouts/background.tsx => pages/agent_details/hooks/index.ts} (70%) create mode 100644 x-pack/legacy/plugins/fleet/public/pages/agent_list/components/index.ts create mode 100644 x-pack/legacy/plugins/fleet/public/pages/policy_details/components/assign_datasources.tsx create mode 100644 x-pack/legacy/plugins/fleet/public/pages/policy_details/components/datasources_table.tsx create mode 100644 x-pack/legacy/plugins/fleet/public/pages/policy_details/components/index.ts create mode 100644 x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/index.ts create mode 100644 x-pack/legacy/plugins/fleet/public/pages/policy_list/components/index.ts diff --git a/x-pack/legacy/plugins/fleet/package.json b/x-pack/legacy/plugins/fleet/package.json deleted file mode 100644 index a5c186f43fbeb..0000000000000 --- a/x-pack/legacy/plugins/fleet/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "author": "Elastic", - "name": "fleet", - "version": "8.0.0", - "private": true, - "license": "Elastic-License", - "devDependencies": { - "@stoplight/prism-cli": "^3.1.1" - }, - "workspaces": { - "nohoist": [ - "@stoplight/**" - ] - } -} diff --git a/x-pack/legacy/plugins/fleet/public/components/agent_unenroll_provider.tsx b/x-pack/legacy/plugins/fleet/public/components/agent_unenroll_provider.tsx index 256ee1eef893f..b9f3a386cf921 100644 --- a/x-pack/legacy/plugins/fleet/public/components/agent_unenroll_provider.tsx +++ b/x-pack/legacy/plugins/fleet/public/components/agent_unenroll_provider.tsx @@ -8,7 +8,7 @@ import React, { Fragment, useRef, useState } from 'react'; import { EuiConfirmModal, EuiOverlayMask } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { useLibs } from '../hooks/use_libs'; +import { useLibs } from '../hooks'; interface Props { children: (unenrollAgents: UnenrollAgents) => React.ReactElement; @@ -101,7 +101,7 @@ export const AgentUnenrollProvider: React.FunctionComponent = ({ children } catch (e) { libs.framework.notifications.addDanger( i18n.translate('xpack.fleet.unenrollAgents.fatalErrorNotificationTitle', { - defaultMessage: 'Fatal error unenrolling agents', + defaultMessage: 'Error unenrolling agents', }) ); } diff --git a/x-pack/legacy/plugins/fleet/public/components/index.ts b/x-pack/legacy/plugins/fleet/public/components/index.ts new file mode 100644 index 0000000000000..0bc6d62e1fe26 --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/components/index.ts @@ -0,0 +1,15 @@ +/* + * 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 { AgentHealth } from './agent_health'; +export { AgentUnenrollProvider } from './agent_unenroll_provider'; +export { Loading } from './loading'; +export { PolicyForm } from './policy_form'; +export { SearchBar } from './search_bar'; + +export { ChildRoutes } from './navigation/child_routes'; +export { ConnectedLink } from './navigation/connected_link'; + +export { NoDataLayout } from './layouts/no_data'; diff --git a/x-pack/legacy/plugins/fleet/public/components/layouts/primary.tsx b/x-pack/legacy/plugins/fleet/public/components/layouts/primary.tsx deleted file mode 100644 index 635ee687ba63d..0000000000000 --- a/x-pack/legacy/plugins/fleet/public/components/layouts/primary.tsx +++ /dev/null @@ -1,64 +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 { - EuiPage, - EuiPageBody, - EuiPageContent, - EuiPageContentBody, - EuiPageHeader, - EuiPageHeaderSection, - EuiTitle, -} from '@elastic/eui'; -import React, { Component, ReactNode } from 'react'; - -type RenderCallback = (component: () => JSX.Element) => void; - -interface PrimaryLayoutProps { - title: string | React.ReactNode; - actionSection?: React.ReactNode; - hideBreadcrumbs?: boolean; -} -export class PrimaryLayout extends Component { - private actionSection: (() => JSX.Element) | null = null; - constructor(props: PrimaryLayoutProps) { - super(props); - } - - public render() { - const children: (callback: RenderCallback) => void | ReactNode = this.props.children as any; - return ( - - - - - - -

{this.props.title}

-
-
- - {(this.actionSection && this.actionSection()) || this.props.actionSection} - -
- - - {(children && typeof children === 'function' - ? children(this.renderAction) - : children) || } - - -
-
-
- ); - } - - private renderAction = (component: () => JSX.Element) => { - this.actionSection = component; - this.forceUpdate(); - }; -} diff --git a/x-pack/legacy/plugins/fleet/public/components/layouts/walkthrough.tsx b/x-pack/legacy/plugins/fleet/public/components/layouts/walkthrough.tsx deleted file mode 100644 index bcedfc063b0e5..0000000000000 --- a/x-pack/legacy/plugins/fleet/public/components/layouts/walkthrough.tsx +++ /dev/null @@ -1,54 +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 React from 'react'; - -import { - EuiPageContent, - EuiPageContentBody, - // @ts-ignore - EuiStepsHorizontal, - EuiTitle, -} from '@elastic/eui'; - -interface LayoutProps { - title: string; - goTo: (path: string) => any; - walkthroughSteps: Array<{ - id: string; - name: string; - }>; - activePath: string; -} - -export const WalkthroughLayout: React.FC = ({ - walkthroughSteps, - title, - activePath, - goTo, - children, -}) => { - const indexOfCurrent = walkthroughSteps.findIndex(step => activePath === step.id); - return ( - - -

{title}

-
-
-
- ({ - title: step.name, - isComplete: i <= indexOfCurrent, - onClick: () => goTo(step.id), - }))} - /> -
-
- {children} -
- ); -}; diff --git a/x-pack/legacy/plugins/fleet/public/components/loading.tsx b/x-pack/legacy/plugins/fleet/public/components/loading.tsx index 625ecef3fa3d0..41b00cb52aab9 100644 --- a/x-pack/legacy/plugins/fleet/public/components/loading.tsx +++ b/x-pack/legacy/plugins/fleet/public/components/loading.tsx @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; -import * as React from 'react'; export const Loading: React.FC<{}> = () => ( diff --git a/x-pack/legacy/plugins/fleet/public/components/navigation/child_routes.tsx b/x-pack/legacy/plugins/fleet/public/components/navigation/child_routes.tsx index 89007e6b03ba6..8a08c96f0b898 100644 --- a/x-pack/legacy/plugins/fleet/public/components/navigation/child_routes.tsx +++ b/x-pack/legacy/plugins/fleet/public/components/navigation/child_routes.tsx @@ -3,7 +3,7 @@ * 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, { FC } from 'react'; +import React from 'react'; import { Route, Switch } from 'react-router-dom'; interface RouteConfig { @@ -12,7 +12,7 @@ interface RouteConfig { routes?: RouteConfig[]; } -export const ChildRoutes: FC<{ +export const ChildRoutes: React.FC<{ routes?: RouteConfig[]; useSwitch?: boolean; [other: string]: any; diff --git a/x-pack/legacy/plugins/fleet/public/components/navigation/connected_link.tsx b/x-pack/legacy/plugins/fleet/public/components/navigation/connected_link.tsx index 30d12c9ce10de..72cc5d6e74dde 100644 --- a/x-pack/legacy/plugins/fleet/public/components/navigation/connected_link.tsx +++ b/x-pack/legacy/plugins/fleet/public/components/navigation/connected_link.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ import React from 'react'; - import { EuiLink } from '@elastic/eui'; import { Link, withRouter } from 'react-router-dom'; diff --git a/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx b/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx index d5d49a80eb54d..f0e3dfb6fb7c9 100644 --- a/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx +++ b/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx @@ -4,13 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { FC, useState, useEffect } from 'react'; -import { - // @ts-ignore - EuiSuggest, -} from '@elastic/eui'; -import { useDebounce } from '../hooks/use_debounce'; -import { useLibs } from '../hooks/use_libs'; +import React, { useState, useEffect } from 'react'; +// @ts-ignore +import { EuiSuggest } from '@elastic/eui'; +import { useDebounce, useLibs } from '../hooks'; const DEBOUNCE_SEARCH_MS = 150; @@ -32,7 +29,7 @@ interface Props { onChange: (newValue: string) => void; } -export const SearchBar: FC = ({ value, fieldPrefix, onChange }) => { +export const SearchBar: React.FC = ({ value, fieldPrefix, onChange }) => { const { suggestions } = useSuggestions(fieldPrefix, value); const onAutocompleteClick = (suggestion: Suggestion) => { diff --git a/x-pack/legacy/plugins/fleet/public/hooks/index.ts b/x-pack/legacy/plugins/fleet/public/hooks/index.ts new file mode 100644 index 0000000000000..d495102396a48 --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/hooks/index.ts @@ -0,0 +1,11 @@ +/* + * 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 { useDebounce } from './use_debounce'; +export { useInput } from './use_input'; +export { useLibs, LibsContext } from './use_libs'; +export { usePagination, Pagination } from './use_pagination'; +export { useRequest, sendRequest } from './use_request'; +export { WithUrlState, URLStateProps } from './with_url_state'; diff --git a/x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx b/x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx new file mode 100644 index 0000000000000..a86a3fdfe01c5 --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx @@ -0,0 +1,27 @@ +/* + * 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 { + UseRequestConfig, + SendRequestConfig, + SendRequestResponse, + useRequest as _useRequest, + sendRequest as _sendRequest, + // eslint-disable-next-line @kbn/eslint/no-restricted-paths +} from '../../../../../../src/plugins/es_ui_shared/public/request/np_ready_request'; +import { useLibs } from './'; + +export const useRequest = (config: UseRequestConfig) => { + const { httpClient } = useLibs(); + // @ts-ignore + return _useRequest(httpClient, config); +}; + +export const sendRequest = ( + httpClient: any, + config: SendRequestConfig +): Promise => { + return _sendRequest(httpClient, config); +}; diff --git a/x-pack/legacy/plugins/fleet/public/hooks/with_url_state.tsx b/x-pack/legacy/plugins/fleet/public/hooks/with_url_state.tsx index 32a4be66a0794..3760b51f7b1c6 100644 --- a/x-pack/legacy/plugins/fleet/public/hooks/with_url_state.tsx +++ b/x-pack/legacy/plugins/fleet/public/hooks/with_url_state.tsx @@ -85,16 +85,4 @@ export class WithURLStateComponent extends React.Compon }); }; } -export const WithURLState = withRouter(WithURLStateComponent); - -export function withUrlState( - UnwrappedComponent: React.ComponentType -): React.FC { - return (origProps: OP) => { - return ( - - {(URLProps: URLStateProps) => } - - ); - }; -} +export const WithUrlState = withRouter(WithURLStateComponent); diff --git a/x-pack/legacy/plugins/fleet/public/index.tsx b/x-pack/legacy/plugins/fleet/public/index.tsx index 760c54fe4d4a2..b5aba1aee9ab6 100644 --- a/x-pack/legacy/plugins/fleet/public/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/index.tsx @@ -12,7 +12,7 @@ import { BASE_PATH } from '../common/constants'; import { compose } from './lib/compose/kibana'; import { FrontendLibs } from './lib/types'; import { AppRoutes } from './routes'; -import { LibsContext } from './hooks/use_libs'; +import { LibsContext } from './hooks'; async function startApp(libs: FrontendLibs) { libs.framework.renderUIAtPath( diff --git a/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts b/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts index 2d1bd3ade8d69..23d56b66ab0b9 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts @@ -39,7 +39,13 @@ export class RestAgentAdapter extends AgentAdapter { }> { const { total, list } = await this.REST.get>( `/api/fleet/agents/${id}/events`, - { page, per_page: perPage, kuery: kuery !== '' ? kuery : undefined } + { + query: { + page, + perPage, + kuery: kuery !== '' ? kuery : undefined, + }, + } ); return { @@ -66,10 +72,12 @@ export class RestAgentAdapter extends AgentAdapter { ): Promise> { try { return await this.REST.get>('/api/fleet/agents', { - page, - perPage, - kuery: kuery !== '' ? kuery : undefined, - showInactive, + query: { + page, + perPage, + kuery: kuery !== '' ? kuery : undefined, + showInactive, + }, }); } catch (e) { return { @@ -91,19 +99,19 @@ export class RestAgentAdapter extends AgentAdapter { } public async update(id: string, beatData: Partial): Promise { - await this.REST.put>(`/api/fleet/agents/${id}`, beatData); + await this.REST.put>(`/api/fleet/agents/${id}`, { body: beatData }); return true; } public async unenrollByIds(ids: string[]): Promise { return await this.REST.post(`/api/fleet/agents/unenroll`, { - ids, + body: { ids }, }); } public async unenrollByKuery(kuery: string): Promise { return await this.REST.post(`/api/fleet/agents/unenroll`, { - kuery, + body: { kuery }, }); } } diff --git a/x-pack/legacy/plugins/fleet/public/lib/adapters/elasticsearch/rest.ts b/x-pack/legacy/plugins/fleet/public/lib/adapters/elasticsearch/rest.ts index bea572685eb87..9007cc26192b3 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/adapters/elasticsearch/rest.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/adapters/elasticsearch/rest.ts @@ -64,9 +64,9 @@ export class RestElasticsearchAdapter implements ElasticsearchAdapter { if (this.cachedIndexPattern) { return this.cachedIndexPattern; } - const res = await this.api.get( - `/api/index_patterns/_fields_for_wildcard?pattern=${this.indexPatternName}` - ); + const res = await this.api.get(`/api/index_patterns/_fields_for_wildcard`, { + query: { pattern: this.indexPatternName }, + }); if (isEmpty(res.fields)) { return; } diff --git a/x-pack/legacy/plugins/fleet/public/lib/adapters/policy/rest_policy_adapter.ts b/x-pack/legacy/plugins/fleet/public/lib/adapters/policy/rest_policy_adapter.ts index 61b6cbf8d506c..4044df8e07b22 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/adapters/policy/rest_policy_adapter.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/adapters/policy/rest_policy_adapter.ts @@ -31,9 +31,11 @@ export class RestPolicyAdapter extends PolicyAdapter { public async getAll(page: number, perPage: number, kuery?: string) { try { return await this.REST.get>(`/api/ingest/policies`, { - page, - perPage, - kuery: kuery !== '' ? kuery : undefined, + query: { + page, + perPage, + kuery: kuery !== '' ? kuery : undefined, + }, }); } catch (e) { return { @@ -47,11 +49,13 @@ export class RestPolicyAdapter extends PolicyAdapter { } public async create(policy: Partial) { - return await this.REST.post>(`/api/ingest/policies`, policy); + return await this.REST.post>(`/api/ingest/policies`, { body: policy }); } public async update(id: string, policy: Partial) { - return await this.REST.put>(`/api/ingest/policies/${id}`, policy); + return await this.REST.put>(`/api/ingest/policies/${id}`, { + body: policy, + }); } public async getAgentStatus(policyId: string) { diff --git a/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/adapter_types.ts b/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/adapter_types.ts index c40575eb6567f..bbad9c3968400 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/adapter_types.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/adapter_types.ts @@ -6,8 +6,23 @@ import { FlatObject } from '../../../../common/types/helpers'; export interface RestAPIAdapter { - get(url: string, query?: FlatObject): Promise; - post(url: string, body?: { [key: string]: any }): Promise; + get( + url: string, + config?: { + query?: FlatObject; + } + ): Promise; + post( + url: string, + config: { + body: { [key: string]: any }; + } + ): Promise; delete(url: string): Promise; - put(url: string, body?: any): Promise; + put( + url: string, + config: { + body: { [key: string]: any }; + } + ): Promise; } diff --git a/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/axios_rest_api_adapter.ts b/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/axios_rest_api_adapter.ts index 4d0a1728c28f8..615427db3cfca 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/axios_rest_api_adapter.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/axios_rest_api_adapter.ts @@ -12,23 +12,37 @@ let globalAPI: AxiosInstance; export class AxiosRestAPIAdapter implements RestAPIAdapter { constructor(private readonly xsrfToken: string, private readonly basePath: string) {} - public async get(url: string, query?: FlatObject): Promise { - return await this.REST.get(url, query ? { params: query } : {}).then(resp => resp.data); + public async get( + url: string, + config?: { + query?: FlatObject; + } + ): Promise { + return await this.REST.get(url, config && config.query ? { params: config.query } : {}).then( + resp => resp.data + ); } public async post( url: string, - body?: { [key: string]: any } + config: { + body: { [key: string]: any }; + } ): Promise { - return await this.REST.post(url, body).then(resp => resp.data); + return await this.REST.post(url, config.body).then(resp => resp.data); } public async delete(url: string): Promise { return await this.REST.delete(url).then(resp => resp.data); } - public async put(url: string, body?: any): Promise { - return await this.REST.put(url, body).then(resp => resp.data); + public async put( + url: string, + config: { + body: { [key: string]: any }; + } + ): Promise { + return await this.REST.put(url, config.body).then(resp => resp.data); } private get REST() { diff --git a/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/node_axios_api_adapter.ts b/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/node_axios_api_adapter.ts deleted file mode 100644 index 112d8b2210065..0000000000000 --- a/x-pack/legacy/plugins/fleet/public/lib/adapters/rest_api/node_axios_api_adapter.ts +++ /dev/null @@ -1,92 +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 axios, { AxiosInstance } from 'axios'; -import fs from 'fs'; -import { join, resolve } from 'path'; -import { FlatObject } from '../../../../common/types/helpers'; -import { RestAPIAdapter } from './adapter_types'; -const pkg = JSON.parse( - fs.readFileSync(resolve(join(__dirname, '../../../../../../../package.json'))).toString() -); - -let globalAPI: AxiosInstance; - -export class NodeAxiosAPIAdapter implements RestAPIAdapter { - constructor( - private readonly username: string, - private readonly password: string, - private readonly basePath: string - ) {} - - public async get(url: string, query?: FlatObject): Promise { - return await this.REST.get(url, query ? { params: query } : {}).then(resp => resp.data); - } - - public async post( - url: string, - body?: { [key: string]: any } - ): Promise { - return await this.REST.post(url, body).then(resp => resp.data); - } - - public async delete(url: string): Promise { - return await this.REST.delete(url).then(resp => resp.data); - } - - public async put(url: string, body?: any): Promise { - return await this.REST.put(url, body).then(resp => resp.data); - } - - private get REST() { - if (globalAPI) { - return globalAPI; - } - - globalAPI = axios.create({ - baseURL: this.basePath, - withCredentials: true, - responseType: 'json', - timeout: 60 * 10 * 1000, // 10min - auth: { - username: this.username, - password: this.password, - }, - headers: { - 'Access-Control-Allow-Origin': '*', - Accept: 'application/json', - 'Content-Type': 'application/json', - 'kbn-version': (pkg as any).version, - 'kbn-xsrf': 'xxx', - }, - }); - // Add a request interceptor - globalAPI.interceptors.request.use( - config => { - // Do something before request is sent - return config; - }, - error => { - // Do something with request error - return Promise.reject(error); - } - ); - - // Add a response interceptor - globalAPI.interceptors.response.use( - response => { - // Do something with response data - return response; - }, - error => { - // Do something with response error - return Promise.reject(JSON.stringify(error.response.data)); - } - ); - - return globalAPI; - } -} diff --git a/x-pack/legacy/plugins/fleet/public/lib/compose/kibana.ts b/x-pack/legacy/plugins/fleet/public/lib/compose/kibana.ts index 84f5e36cce478..fcd97063445fa 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/compose/kibana.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/compose/kibana.ts @@ -57,6 +57,8 @@ export function compose(): FrontendLibs { agents, policies, enrollmentApiKeys, + httpClient: api, }; + return libs; } diff --git a/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts b/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts index 512ed367bc65b..da668fa224094 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts @@ -11,16 +11,18 @@ import { ReturnTypeDelete, } from '../../common/return_types'; import { RestAPIAdapter } from './adapters/rest_api/adapter_types'; -import { Pagination } from '../hooks/use_pagination'; import { EnrollmentApiKey } from '../../common/types/domain_data'; +import { Pagination } from '../hooks'; export class EnrollmentApiKeyLib { constructor(private readonly rest: RestAPIAdapter) {} public async listKeys(pagination: Pagination) { return await this.rest.get>('/api/fleet/enrollment-api-keys', { - page: pagination.currentPage, - perPage: pagination.pageSize, + query: { + page: pagination.currentPage, + perPage: pagination.pageSize, + }, }); } @@ -38,8 +40,10 @@ export class EnrollmentApiKeyLib { return await this.rest.post>( `/api/fleet/enrollment-api-keys`, { - name: data.name, - policy_id: data.policyId, + body: { + name: data.name, + policy_id: data.policyId, + }, } ); } diff --git a/x-pack/legacy/plugins/fleet/public/lib/types.ts b/x-pack/legacy/plugins/fleet/public/lib/types.ts index eebb2a806407c..585b491c252c9 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/types.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/types.ts @@ -3,9 +3,8 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { IModule, IScope } from 'angular'; -import { AxiosRequestConfig } from 'axios'; -import { FrameworkAdapter } from './adapters/framework/adapter_types'; +import { IScope } from 'angular'; +import { RestAPIAdapter } from './adapters/rest_api/adapter_types'; import { AgentsLib } from './agent'; import { PoliciesLib } from './policy'; import { ElasticsearchLib } from './elasticsearch'; @@ -18,25 +17,7 @@ export interface FrontendLibs { agents: AgentsLib; policies: PoliciesLib; enrollmentApiKeys: EnrollmentApiKeyLib; -} - -export type FramworkAdapterConstructable = new (uiModule: IModule) => FrameworkAdapter; - -// FIXME: replace AxiosRequestConfig with something more defined -export type RequestConfig = AxiosRequestConfig; - -export interface ApiAdapter { - kbnVersion: string; - - get(url: string, config?: RequestConfig | undefined): Promise; - post(url: string, data?: any, config?: AxiosRequestConfig | undefined): Promise; - delete(url: string, config?: RequestConfig | undefined): Promise; - put(url: string, data?: any, config?: RequestConfig | undefined): Promise; -} - -export interface UiKibanaAdapterScope extends IScope { - breadcrumbs: any[]; - topNavMenu: any[]; + httpClient: RestAPIAdapter; } export interface KibanaUIConfig { @@ -50,7 +31,3 @@ export interface KibanaAdapterServiceRefs { } export type BufferedKibanaServiceCall = (serviceRefs: ServiceRefs) => void; - -export interface Chrome { - setRootTemplate(template: string): void; -} diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx index 49d82fac3ac7f..e2196bf8407b9 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useState, useEffect, FC } from 'react'; +import React, { useState, useEffect } from 'react'; import { EuiBasicTable, // @ts-ignore @@ -15,14 +15,11 @@ import { EuiFlexItem, EuiTitle, } from '@elastic/eui'; - import { i18n } from '@kbn/i18n'; import { FormattedMessage, FormattedTime } from '@kbn/i18n/react'; import { AgentEvent, Agent } from '../../../../common/types/domain_data'; -import { usePagination } from '../../../hooks/use_pagination'; -import { SearchBar } from '../../../components/search_bar'; -import { useDebounce } from '../../../hooks/use_debounce'; -import { useLibs } from '../../../hooks/use_libs'; +import { useLibs, usePagination, useDebounce } from '../../../hooks'; +import { SearchBar } from '../../../components'; const DEBOUNCE_SEARCH_MS = 300; @@ -97,7 +94,7 @@ function useGetAgentEvents( return { ...state, refresh: fetchAgentEvents }; } -export const AgentEventsTable: FC<{ agent: Agent }> = ({ agent }) => { +export const AgentEventsTable: React.FC<{ agent: Agent }> = ({ agent }) => { const { pageSizeOptions, pagination, setPagination } = usePagination(); const { search, setSearch } = useSearch(); diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx index 0a7c6e410e148..be26af5c993bd 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { FC, useState } from 'react'; +import React, { useState } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiTitle, @@ -19,13 +19,11 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { Agent } from '../../../../common/types/domain_data'; -import { ConnectedLink } from '../../../components/navigation/connected_link'; -import { AgentHealth } from '../../../components/agent_health'; -import { AgentUnenrollProvider } from '../../../components/agent_unenroll_provider'; +import { ConnectedLink, AgentHealth, AgentUnenrollProvider } from '../../../components'; +import { useAgentRefresh } from '../hooks'; import { AgentMetadataFlyout } from './metadata_flyout'; -import { useAgentRefresh } from '../hooks/use_agent'; -const Item: FC<{ label: string }> = ({ label, children }) => { +const Item: React.FC<{ label: string }> = ({ label, children }) => { return ( @@ -48,7 +46,7 @@ function useFlyout() { interface Props { agent: Agent; } -export const AgentDetailSection: FC = ({ agent }) => { +export const AgentDetailSection: React.FC = ({ agent }) => { const metadataFlyout = useFlyout(); const refreshAgent = useAgentRefresh(); diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/index.ts b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/index.ts new file mode 100644 index 0000000000000..9dffa54aeaf7f --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/index.ts @@ -0,0 +1,7 @@ +/* + * 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 { AgentEventsTable } from './agent_events_table'; +export { AgentDetailSection } from './details_section'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_flyout.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_flyout.tsx index 7c109ebc43ef0..e135a97ae2207 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_flyout.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_flyout.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { FC } from 'react'; +import React from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiTitle, @@ -15,7 +15,6 @@ import { EuiFlyoutBody, EuiHorizontalRule, } from '@elastic/eui'; - import { Agent } from '../../../../common/types/domain_data'; import { MetadataForm } from './metadata_form'; @@ -23,7 +22,7 @@ interface Props { agent: Agent; flyout: { hide: () => void }; } -export const AgentMetadataFlyout: FC = ({ agent, flyout }) => { +export const AgentMetadataFlyout: React.FC = ({ agent, flyout }) => { const mapMetadata = (obj: { [key: string]: string } | undefined) => { return Object.keys(obj || {}).map(key => ({ title: key, diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx index f0d3edf6f069a..ca4eeef558ad7 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { FC, useState } from 'react'; +import React, { useState } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiButtonEmpty, @@ -19,9 +19,8 @@ import { import { i18n } from '@kbn/i18n'; import { AxiosError } from 'axios'; import { Agent } from '../../../../common/types/domain_data'; -import { useLibs } from '../../../hooks/use_libs'; -import { useAgentRefresh } from '../hooks/use_agent'; -import { useInput } from '../../../hooks/use_input'; +import { useLibs, useInput } from '../../../hooks'; +import { useAgentRefresh } from '../hooks'; function useAddMetadataForm(agent: Agent, done: () => void) { const libs = useLibs(); @@ -86,7 +85,7 @@ function useAddMetadataForm(agent: Agent, done: () => void) { }; } -export const MetadataForm: FC<{ agent: Agent }> = ({ agent }) => { +export const MetadataForm: React.FC<{ agent: Agent }> = ({ agent }) => { const [isOpen, setOpen] = useState(false); const form = useAddMetadataForm(agent, () => { diff --git a/x-pack/legacy/plugins/fleet/public/components/layouts/background.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/hooks/index.ts similarity index 70% rename from x-pack/legacy/plugins/fleet/public/components/layouts/background.tsx rename to x-pack/legacy/plugins/fleet/public/pages/agent_details/hooks/index.ts index a8eeda1f6571b..352244881dc8a 100644 --- a/x-pack/legacy/plugins/fleet/public/components/layouts/background.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/hooks/index.ts @@ -3,9 +3,4 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - -import styled from 'styled-components'; - -export const Background = styled.div` - flex-grow: 1; -`; +export { useGetAgent, useAgentRefresh, AgentRefreshContext } from './use_agent'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/hooks/use_agent.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/hooks/use_agent.tsx index cd3888774f12d..25985d90e708e 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/hooks/use_agent.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/hooks/use_agent.tsx @@ -5,7 +5,7 @@ */ import React, { useState, useEffect } from 'react'; import { Agent } from '../../../../common/types/domain_data'; -import { useLibs } from '../../../hooks/use_libs'; +import { useLibs } from '../../../hooks'; export function useGetAgent(id: string) { const { agents } = useLibs(); diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/index.tsx index 393dc2f012438..c4b0dba6e3186 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/index.tsx @@ -3,19 +3,18 @@ * 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, { useState } from 'react'; +import { RouteComponentProps } from 'react-router-dom'; import { EuiCallOut, EuiPageBody, EuiPageContent, EuiSpacer, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import useInterval from '@use-it/interval'; -import React, { FC, useState } from 'react'; -import { RouteComponentProps } from 'react-router-dom'; import { AGENT_POLLING_INTERVAL } from '../../../common/constants/agent'; -import { Loading } from '../../components/loading'; -import { AgentEventsTable } from './components/agent_events_table'; -import { AgentDetailSection } from './components/details_section'; -import { AgentRefreshContext, useGetAgent } from './hooks/use_agent'; +import { Loading } from '../../components'; +import { AgentEventsTable, AgentDetailSection } from './components'; +import { useGetAgent, AgentRefreshContext } from './hooks'; -export const Layout: FC = ({ children }) => ( +export const Layout: React.FC = ({ children }) => ( {children} @@ -25,7 +24,7 @@ type Props = RouteComponentProps<{ agentId: string; }>; -export const AgentDetailsPage: FC = ({ +export const AgentDetailsPage: React.FC = ({ match: { params: { agentId }, }, diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/agent_enrollment.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/agent_enrollment.tsx index 8682371abdfbd..d57e5106c9ead 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/agent_enrollment.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/agent_enrollment.tsx @@ -3,6 +3,7 @@ * 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, { Fragment, useState } from 'react'; import { EuiButton, EuiButtonEmpty, @@ -22,11 +23,13 @@ import { EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import React, { Fragment, useState } from 'react'; import { Policy } from '../../../../common/types/domain_data'; -import { useLibs } from '../../../hooks/use_libs'; -import { EnrollmentApiKeysTable } from './enrollment_api_keys'; -import { useEnrollmentApiKey, useEnrollmentApiKeys } from './enrollment_api_keys/hooks'; +import { useLibs } from '../../../hooks'; +import { + EnrollmentApiKeysTable, + useEnrollmentApiKey, + useEnrollmentApiKeys, +} from './enrollment_api_keys'; import { ContainerEnrollmentInstructions, ShellEnrollmentInstructions, diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx index 92ce7ac1cf96e..a3173d84be6bd 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx @@ -15,8 +15,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { useInput } from '../../../../hooks/use_input'; -import { useLibs } from '../../../../hooks/use_libs'; +import { useInput, useLibs } from '../../../../hooks'; import { usePolicies } from './hooks'; export const CreateApiKeyForm: React.FC<{ onChange: () => void }> = ({ onChange }) => { diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx index 42db6536340e2..03ce627ef62bc 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx @@ -5,8 +5,7 @@ */ import { useEffect, useState } from 'react'; -import { useLibs } from '../../../../hooks/use_libs'; -import { Pagination } from '../../../../hooks/use_pagination'; +import { useLibs, Pagination } from '../../../../hooks'; import { ReturnTypeList, ReturnTypeGet } from '../../../../../common/return_types'; import { EnrollmentApiKey } from '../../../../../common/types/domain_data'; import { Policy } from '../../../../../common/types/domain_data'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx index b7ac06cfae256..066b44597fa34 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx @@ -7,13 +7,14 @@ import React, { useState } from 'react'; import { EuiBasicTable, EuiButtonEmpty, EuiSpacer, EuiPopover } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { useEnrollmentApiKeys, useEnrollmentApiKey } from './hooks'; import { EnrollmentApiKey } from '../../../../../common/types/domain_data'; -import { useLibs } from '../../../../hooks/use_libs'; -import { usePagination } from '../../../../hooks/use_pagination'; +import { useLibs, usePagination } from '../../../../hooks'; +import { useEnrollmentApiKeys, useEnrollmentApiKey } from './hooks'; import { ConfirmDeleteModal } from './confirm_delete_modal'; import { CreateApiKeyForm } from './create_api_key_form'; +export { useEnrollmentApiKeys, useEnrollmentApiKey } from './hooks'; + export const EnrollmentApiKeysTable: React.FC = () => { const { enrollmentApiKeys } = useLibs(); const [confirmDeleteApiKeyId, setConfirmDeleteApiKeyId] = useState(null); diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/index.tsx index 1abf62367d68f..9d6a8752c427f 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/index.tsx @@ -6,7 +6,6 @@ import React from 'react'; import { EuiSteps, EuiText, EuiCodeBlock } from '@elastic/eui'; import { Writer } from 'mustache'; - export { ShellEnrollmentInstructions } from './shell'; export { ContainerEnrollmentInstructions } from './container'; export { ToolsEnrollmentInstructions } from './tools'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/shell/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/shell/index.tsx index c2dc301be42c3..355067fee9af0 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/shell/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_instructions/shell/index.tsx @@ -3,6 +3,7 @@ * 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, { Fragment, useState } from 'react'; import { EuiButtonEmpty, EuiContextMenuItem, @@ -14,7 +15,6 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import React, { Fragment, useState } from 'react'; import { ManualEnrollmentInstructions, ManualEnrollmentSteps } from '../'; import { EnrollmentApiKey } from '../../../../../../common/types/domain_data'; import * as MAC_COMMANDS from './mac_commands'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/index.ts b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/index.ts new file mode 100644 index 0000000000000..828f239fbe59f --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/index.ts @@ -0,0 +1,6 @@ +/* + * 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 { AgentEnrollmentFlyout } from './agent_enrollment'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/index.tsx index ea693abf8b163..d1ba8f12f5dd2 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/index.tsx @@ -3,6 +3,7 @@ * 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, { useEffect, useState } from 'react'; import { EuiBasicTable, EuiButton, @@ -24,16 +25,11 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import useInterval from '@use-it/interval'; -import React, { useEffect, useState } from 'react'; import { AGENT_POLLING_INTERVAL } from '../../../common/constants/agent'; import { Agent, Policy } from '../../../common/types/domain_data'; -import { AgentHealth } from '../../components/agent_health'; -import { AgentUnenrollProvider } from '../../components/agent_unenroll_provider'; -import { ConnectedLink } from '../../components/navigation/connected_link'; -import { SearchBar } from '../../components/search_bar'; -import { useLibs } from '../../hooks/use_libs'; -import { usePagination } from '../../hooks/use_pagination'; -import { AgentEnrollmentFlyout } from './components/agent_enrollment'; +import { AgentHealth, AgentUnenrollProvider, ConnectedLink, SearchBar } from '../../components'; +import { useLibs, usePagination } from '../../hooks'; +import { AgentEnrollmentFlyout } from './components'; export const AgentListPage: React.FC<{}> = () => { const libs = useLibs(); diff --git a/x-pack/legacy/plugins/fleet/public/pages/error/enforce_security.tsx b/x-pack/legacy/plugins/fleet/public/pages/error/enforce_security.tsx index 07f7efbb05e33..dcade19c73572 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/error/enforce_security.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/error/enforce_security.tsx @@ -3,10 +3,9 @@ * 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 { FormattedMessage, injectI18n } from '@kbn/i18n/react'; -import * as React from 'react'; -import { NoDataLayout } from '../../components/layouts/no_data'; +import { NoDataLayout } from '../../components'; export const EnforceSecurityPage = injectI18n(({ intl }) => ( ( ( void; +} + +export const AssignDatasourcesFlyout: React.FC = ({ + policyId, + existingDatasources, + onClose, +}) => { + const { framework, httpClient } = useLibs(); + const [selectedDatasources, setSelectedDatasources] = useState([]); + const [isLoading, setIsLoading] = useState(false); + + // Fetch data sources + const { + isLoading: isDatasourcesLoading, + data: datasourcesData, + error: datasourcesError, + sendRequest: refreshDatasources, + } = useRequest({ + path: '/api/ingest/datasources', + method: 'get', + query: { + page: 1, + perPage: 10000, + }, + }); + + // Filter out data sources already assigned to policy + const datasources: Datasource[] = + datasourcesData?.list?.filter((ds: Datasource) => { + return !existingDatasources.includes(ds.id); + }) || []; + + const assignSelectedDatasources = async () => { + setIsLoading(true); + const { error } = await sendRequest(httpClient, { + path: `/api/ingest/policies/${policyId}/addDatasources`, + method: 'post', + body: { + datasources: selectedDatasources, + }, + }); + setIsLoading(false); + if (error) { + framework.notifications.addDanger( + i18n.translate('xpack.fleet.assignDatasources.errorNotificationTitle', { + defaultMessage: + 'Error assigning {count, plural, one {data source} other {# data sources}}', + values: { + count: selectedDatasources.length, + }, + }) + ); + } else { + framework.notifications.addSuccess( + i18n.translate('xpack.fleet.assignDatasources.successNotificationTitle', { + defaultMessage: + 'Successfully assigned {count, plural, one {data source} other {# data sources}}', + values: { + count: selectedDatasources.length, + }, + }) + ); + onClose(); + } + }; + + const InstallDatasourcesButton = ( + + + + ); + + const header = ( + + +

+ +

+
+
+ ); + + const getTableMessage = () => { + if (datasourcesError) { + return ( + refreshDatasources()}> + + + ), + }} + /> + ); + } + + if (datasourcesData && !datasourcesData.list.length) { + return ( + + + + } + actions={InstallDatasourcesButton} + /> + ); + } + + if (!datasources.length && existingDatasources.length) { + return ( + + } + actions={InstallDatasourcesButton} + /> + ); + } + + return null; + }; + + const body = ( + + + setSelectedDatasources(selection.map(ds => ds.id)), + }} + isSelectable={true} + /> + + ); + + const footer = ( + + + + + + + + + + + + + + + ); + + return ( + + {header} + {body} + {footer} + + ); +}; diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/datasources_table.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/datasources_table.tsx new file mode 100644 index 0000000000000..d51fdcf2f2e73 --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/datasources_table.tsx @@ -0,0 +1,117 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { EuiInMemoryTable, EuiInMemoryTableProps, EuiLink } from '@elastic/eui'; +import { Datasource } from '../../../../common/types/domain_data'; +import { useLibs } from '../../../hooks'; + +interface Props extends EuiInMemoryTableProps { + datasources?: Datasource[]; +} + +export const DatasourcesTable: React.FC = ({ + datasources: originalDatasources, + ...rest +}) => { + const { framework } = useLibs(); + + // Flatten some values so that they can be searched via in-memory table search + const datasources = originalDatasources?.map( + ({ + id, + name, + streams, + package: { + name: packageName, + title: packageTitle, + version: packageVersion, + description: packageDescription, + }, + }) => ({ + id, + name, + streams: streams.length || 0, + packageName, + packageTitle, + packageVersion, + packageDescription, + }) + ); + + return ( + { + return ( + + + + ); + }, + }, + ], + width: '100px', + }, + ]} + sorting={{ + field: 'name', + direction: 'asc', + }} + {...rest} + /> + ); +}; diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/donut_chart.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/donut_chart.tsx index a51dc46f7310c..408ccc6e951f6 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/donut_chart.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/donut_chart.tsx @@ -5,7 +5,7 @@ */ import React, { useEffect, useRef } from 'react'; -import * as d3 from 'd3'; +import d3 from 'd3'; import { EuiFlexItem } from '@elastic/eui'; interface DonutChartProps { diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/edit_policy.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/edit_policy.tsx index 98e18b3627956..a16a7a0bedeb2 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/edit_policy.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/edit_policy.tsx @@ -18,15 +18,15 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { Policy } from '../../../../common/types/domain_data'; -import { PolicyForm } from '../../../components/policy_form'; -import { useLibs } from '../../../hooks/use_libs'; +import { PolicyForm } from '../../../components'; +import { useLibs } from '../../../hooks'; -interface RouterProps { +interface Props { policy: Policy; onClose: () => void; } -export const EditPolicyFlyout: React.FC = ({ policy: originalPolicy, onClose }) => { +export const EditPolicyFlyout: React.FC = ({ policy: originalPolicy, onClose }) => { const libs = useLibs(); const [policy, setPolicy] = useState>({ diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/index.ts b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/index.ts new file mode 100644 index 0000000000000..0771f5c2eff8a --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/components/index.ts @@ -0,0 +1,9 @@ +/* + * 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 { AssignDatasourcesFlyout } from './assign_datasources'; +export { DatasourcesTable } from './datasources_table'; +export { DonutChart } from './donut_chart'; +export { EditPolicyFlyout } from './edit_policy'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/index.ts b/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/index.ts new file mode 100644 index 0000000000000..fad1b53e8a8a1 --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/index.ts @@ -0,0 +1,7 @@ +/* + * 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 { useGetAgentStatus, AgentStatusRefreshContext } from './use_agent_status'; +export { useGetPolicy, PolicyRefreshContext } from './use_policy'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_agent_status.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_agent_status.tsx index 78cde637afdc4..05503ad4225e2 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_agent_status.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_agent_status.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import React, { useState, useEffect } from 'react'; -import { useLibs } from '../../../hooks/use_libs'; +import { useLibs } from '../../../hooks'; export function useGetAgentStatus(policyId: string) { const { policies } = useLibs(); diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_policy.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_policy.tsx index 450934c28a180..d21b8a1ab6c22 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_policy.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/hooks/use_policy.tsx @@ -5,7 +5,7 @@ */ import React, { useState, useEffect } from 'react'; import { Policy } from '../../../../common/types/domain_data'; -import { useLibs } from '../../../hooks/use_libs'; +import { useLibs } from '../../../hooks'; export function useGetPolicy(id: string) { const { policies } = useLibs(); diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_details/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_details/index.tsx index 90a2384af4f44..083b8889ca914 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/policy_details/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_details/index.tsx @@ -7,7 +7,6 @@ import React, { Fragment, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { - EuiInMemoryTable, EuiFlexGroup, EuiFlexItem, EuiPageBody, @@ -15,25 +14,28 @@ import { EuiCallOut, EuiText, EuiSpacer, - EuiEmptyPrompt, - EuiButton, EuiTitle, EuiHealth, + EuiButton, EuiButtonEmpty, + EuiEmptyPrompt, } from '@elastic/eui'; import { RouteComponentProps } from 'react-router-dom'; -import { - DEFAULT_AGENTS_PAGE_SIZE, - AGENTS_PAGE_SIZE_OPTIONS, -} from '../../../common/constants/agent'; import { Datasource } from '../../../common/types/domain_data'; -import { Loading } from '../../components/loading'; -import { ConnectedLink } from '../../components/navigation/connected_link'; -import { useLibs } from '../../hooks/use_libs'; -import { useGetPolicy, PolicyRefreshContext } from './hooks/use_policy'; -import { useGetAgentStatus, AgentStatusRefreshContext } from './hooks/use_agent_status'; -import { DonutChart } from './components/donut_chart'; -import { EditPolicyFlyout } from './components/edit_policy'; +import { Loading, ConnectedLink } from '../../components'; +import { useLibs, sendRequest } from '../../hooks'; +import { + useGetPolicy, + PolicyRefreshContext, + useGetAgentStatus, + AgentStatusRefreshContext, +} from './hooks'; +import { + DatasourcesTable, + DonutChart, + EditPolicyFlyout, + AssignDatasourcesFlyout, +} from './components'; export const Layout: React.FC = ({ children }) => ( @@ -50,7 +52,7 @@ export const PolicyDetailsPage: React.FC = ({ params: { policyId }, }, }) => { - const { framework } = useLibs(); + const { framework, httpClient } = useLibs(); const { policy, isLoading, error, refreshPolicy } = useGetPolicy(policyId); const { result: agentStatus, @@ -59,14 +61,54 @@ export const PolicyDetailsPage: React.FC = ({ refreshAgentStatus, } = useGetAgentStatus(policyId); - // Edit policy flyout state + // Unassign data sources states + const [isUnassignLoading, setIsUnassignLoading] = useState(false); + const [selectedDatasources, setSelectedDatasources] = useState([]); + + // Flyout states const [isEditPolicyFlyoutOpen, setIsEditPolicyFlyoutOpen] = useState(false); + const [isDatasourcesFlyoutOpen, setIsDatasourcesFlyoutOpen] = useState(false); const refreshData = () => { refreshPolicy(); refreshAgentStatus(); }; + const unassignSelectedDatasources = async () => { + setIsUnassignLoading(true); + const { error: unassignError } = await sendRequest(httpClient, { + path: `/api/ingest/policies/${policyId}/removeDatasources`, + method: 'post', + body: { + datasources: selectedDatasources, + }, + }); + setIsUnassignLoading(false); + if (unassignError) { + framework.notifications.addDanger( + i18n.translate('xpack.fleet.policyDetails.unassignDatasources.errorNotificationTitle', { + defaultMessage: + 'Error unassigning {count, plural, one {data source} other {# data sources}}', + values: { + count: selectedDatasources.length, + }, + }) + ); + } else { + framework.notifications.addSuccess( + i18n.translate('xpack.fleet.policyDetails.unassignDatasources.successNotificationTitle', { + defaultMessage: + 'Successfully unassigned {count, plural, one {data source} other {# data sources}}', + values: { + count: selectedDatasources.length, + }, + }) + ); + setSelectedDatasources([]); + refreshData(); + } + }; + if (isLoading) { return ; } @@ -116,6 +158,16 @@ export const PolicyDetailsPage: React.FC = ({ policy={policy} /> ) : null} + {isDatasourcesFlyoutOpen ? ( + ds.id)} + onClose={() => { + setIsDatasourcesFlyoutOpen(false); + refreshData(); + }} + /> + ) : null} @@ -284,7 +336,8 @@ export const PolicyDetailsPage: React.FC = ({ - = ({ setIsDatasourcesFlyoutOpen(true)} > } /> ) : null } - itemId="id" - items={policy.datasources} - columns={[ - { - field: 'name', - name: i18n.translate('xpack.fleet.policyList.datasourcesTable.ameColumnTitle', { - defaultMessage: 'Name/ID', - }), - }, - { - field: 'package.title', - name: i18n.translate( - 'xpack.fleet.policyList.datasourcesTable.packageNameColumnTitle', - { - defaultMessage: 'Package', - } - ), - }, - { - field: 'package.version', - name: i18n.translate( - 'xpack.fleet.policyList.datasourcesTable.packageVersionColumnTitle', - { - defaultMessage: 'Version', - } - ), - }, - { - field: 'streams', - name: i18n.translate( - 'xpack.fleet.policyList.datasourcesTable.streamsCountColumnTitle', - { - defaultMessage: 'Streams', - } - ), - render: (streams: Datasource['streams']) => (streams ? streams.length : 0), - }, - ]} - sorting={{ - field: 'name', - direction: 'asc', - }} - pagination={{ - initialPageSize: DEFAULT_AGENTS_PAGE_SIZE, - pageSizeOptions: AGENTS_PAGE_SIZE_OPTIONS, - }} search={{ toolsRight: [ setIsDatasourcesFlyoutOpen(true)} > , ], + toolsLeft: selectedDatasources.length + ? [ + + + , + ] + : null, box: { incremental: true, schema: true, }, }} + selection={{ + onSelectionChange: (selection: Datasource[]) => + setSelectedDatasources(selection.map(ds => ds.id)), + }} + isSelectable={true} /> diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_list/components/create_policy.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_list/components/create_policy.tsx index f841d49866568..942ce83c67d63 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/policy_list/components/create_policy.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_list/components/create_policy.tsx @@ -17,9 +17,9 @@ import { EuiButtonEmpty, EuiButton, } from '@elastic/eui'; -import { PolicyForm } from '../../../components/policy_form'; -import { useLibs } from '../../../hooks/use_libs'; import { Policy } from '../../../../common/types/domain_data'; +import { PolicyForm } from '../../../components'; +import { useLibs } from '../../../hooks'; interface RouterProps { onClose: () => void; diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_list/components/index.ts b/x-pack/legacy/plugins/fleet/public/pages/policy_list/components/index.ts new file mode 100644 index 0000000000000..b97bd48b1d94b --- /dev/null +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_list/components/index.ts @@ -0,0 +1,6 @@ +/* + * 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 { CreatePolicyFlyout } from './create_policy'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/policy_list/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/policy_list/index.tsx index b6f308b1d333a..6cfd589fbc0e4 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/policy_list/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/policy_list/index.tsx @@ -22,11 +22,9 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { Policy } from '../../../common/types/domain_data'; -import { useLibs } from '../../hooks/use_libs'; -import { usePagination } from '../../hooks/use_pagination'; -import { ConnectedLink } from '../../components/navigation/connected_link'; -import { SearchBar } from '../../components/search_bar'; -import { CreatePolicyFlyout } from './components/create_policy'; +import { useLibs, usePagination } from '../../hooks'; +import { ConnectedLink, SearchBar } from '../../components'; +import { CreatePolicyFlyout } from './components'; export const PolicyListPage: React.FC<{}> = () => { const libs = useLibs(); diff --git a/x-pack/legacy/plugins/fleet/public/routes.tsx b/x-pack/legacy/plugins/fleet/public/routes.tsx index 2b88acd1c18e5..3faa3c11f9cfb 100644 --- a/x-pack/legacy/plugins/fleet/public/routes.tsx +++ b/x-pack/legacy/plugins/fleet/public/routes.tsx @@ -5,13 +5,11 @@ */ import { get } from 'lodash'; -import React, { useState, useEffect, FC } from 'react'; +import React, { useState, useEffect } from 'react'; import { Redirect, Route, Switch } from 'react-router-dom'; -import { Loading } from './components/loading'; -import { ChildRoutes } from './components/navigation/child_routes'; -import { URLStateProps, WithURLState } from './hooks/with_url_state'; +import { Loading, ChildRoutes } from './components'; +import { useLibs, URLStateProps, WithUrlState } from './hooks'; import { routeMap } from './pages'; -import { useLibs } from './hooks/use_libs'; function useWaitUntilFrameworkReady() { const libs = useLibs(); @@ -34,7 +32,7 @@ function useWaitUntilFrameworkReady() { return { isLoading }; } -export const AppRoutes: FC = () => { +export const AppRoutes: React.FC = () => { const { isLoading } = useWaitUntilFrameworkReady(); const libs = useLibs(); @@ -84,9 +82,9 @@ export const AppRoutes: FC = () => { {/* Render routes from the FS */} - + {(URLProps: URLStateProps) => } - + ); }; diff --git a/x-pack/legacy/plugins/fleet/server/routes/agents/events.ts b/x-pack/legacy/plugins/fleet/server/routes/agents/events.ts index f2d6c2a492fa9..11aa827d57006 100644 --- a/x-pack/legacy/plugins/fleet/server/routes/agents/events.ts +++ b/x-pack/legacy/plugins/fleet/server/routes/agents/events.ts @@ -24,21 +24,21 @@ export const createGETAgentEventsRoute = (libs: FleetServerLib) => ({ .optional() .min(1) .default(1), - per_page: Joi.number() + perPage: Joi.number() .optional() .min(1) - .default(25), + .default(20), }), }, }, handler: async ( request: FrameworkRequest<{ params: { agentId: string }; - query: { page: string; per_page: string; kuery: string }; + query: { page: string; perPage: string; kuery: string }; }> ): Promise> => { const page = parseInt(request.query.page, 10); - const perPage = parseInt(request.query.per_page, 10); + const perPage = parseInt(request.query.perPage, 10); const { items, total } = await libs.agentEvents.getEventsById( request.user, diff --git a/yarn.lock b/yarn.lock index 9cfb5549c5c50..777eb0f428c57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2383,130 +2383,6 @@ "@types/node" ">=8.9.0" axios "^0.18.0" -"@stoplight/http-spec@^2.2.2": - version "2.2.7" - resolved "https://registry.yarnpkg.com/@stoplight/http-spec/-/http-spec-2.2.7.tgz#5be3e8105b8b9eaf936467504bc8f59b8b238028" - integrity sha512-3MQymbhQ4k1ryilaVTLhsB6P3dwJ94xkngYVBXwRdYWfm9BA6zNvU2UEZ+/MXJncAjOtM/F5i8nDaDTWIn4/kQ== - dependencies: - "@stoplight/json" "^3.1.1" - "@stoplight/types" "^11.1.0" - "@types/swagger-schema-official" "~2.0.18" - "@types/urijs" "~1.19.1" - lodash "^4.17.15" - openapi-schema-to-json-schema stoplightio/openapi-schema-to-json-schema#c8b5f0c74270d505fc39635edef28e09df89601f - openapi3-ts "~1.3.0" - urijs "~1.19.1" - -"@stoplight/json-ref-resolver@^2.2.0": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@stoplight/json-ref-resolver/-/json-ref-resolver-2.4.1.tgz#db54b0771226611e1beb2e908493903139f2a4a8" - integrity sha512-y9G0BybShiJ/1NaPPG1BPelL2zI8/0rKXRtUpD2JBHEb72L9n4Bin85+MfrHYoHeJxojDpewsJA3FVRnUVL1dw== - dependencies: - "@stoplight/json" "^3.1.2" - "@stoplight/path" "^1.3.0" - "@stoplight/types" "^11.0.0" - "@types/urijs" "1.x.x" - dependency-graph "~0.8.0" - fast-memoize "^2.5.1" - immer "^3.2.0" - lodash "^4.17.15" - tslib "^1.10.0" - urijs "~1.19.1" - -"@stoplight/json@^3.1.1", "@stoplight/json@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@stoplight/json/-/json-3.1.2.tgz#ae89d1974f0b6f8bc5778f792aeed4664c95ec62" - integrity sha512-7zt0zCN94m90X1sL7FrD7jXhPtkIup07MyG/00sELVrCvzb2wgNaiE+x2N7WSbk3Z0wS08e8B6kow81GQY+Isw== - dependencies: - "@stoplight/types" "^11.0.0" - jsonc-parser "~2.1.1" - lodash "^4.17.15" - safe-stable-stringify "^1.1" - -"@stoplight/path@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@stoplight/path/-/path-1.3.0.tgz#da2282352a4eb23c09d5106b9d1650d30a9ca2ad" - integrity sha512-t74/MHMgmFVMQhdQ/2Q766GryNTIW8McH8+vB25oeoBhYKTOrJ/wPDt+OCxIWHPUlcSi2fTWa4FKQ8qgmP2jVA== - -"@stoplight/prism-cli@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@stoplight/prism-cli/-/prism-cli-3.1.1.tgz#4cd44e548ae8adbbfb31ec1e6bba86492db396e6" - integrity sha512-q4Fsn4Bhyp05cLDlnGECA04fj4ZoyY1MfjlIlpYPxC2jB+zRYQc49NO2KDmeTsEqHtTSK4b0b+OBIzuRAhax4A== - dependencies: - "@stoplight/http-spec" "^2.2.2" - "@stoplight/json-ref-resolver" "^2.2.0" - "@stoplight/prism-core" "^3.1.1" - "@stoplight/prism-http-server" "^3.1.1" - "@stoplight/yaml" "^3.0.2" - axios "^0.18.0" - signale "^1.4.0" - split2 "^3.1.1" - tslib "^1.10.0" - urijs "^1.19.1" - yargs "^14.0.0" - -"@stoplight/prism-core@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@stoplight/prism-core/-/prism-core-3.1.1.tgz#7dfc0bd54763ba66c8733c2e8e2736c52f28aabc" - integrity sha512-rRKTKgFzj/uGeDvhm+hQhDYtsRngrtQoW6VqBG3kzpZ7xywASeE1Vr6xuEfcMkzt4fs5wS3towSgMyDrGv8kHg== - dependencies: - lodash "^4.17.15" - pino "^5.13.2" - tslib "^1.10.0" - -"@stoplight/prism-http-server@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@stoplight/prism-http-server/-/prism-http-server-3.1.1.tgz#0fd70dd8d2457adfa0b8840c6b00e1220576790c" - integrity sha512-XhH3vq6r0k3ZfauI/HV8/9yEcTvf/brnSILcQ01rTsPD3rE/MrqR3E6gswInMu3WIy6Clxe63Qio+V3NQn0Ckw== - dependencies: - "@stoplight/prism-core" "^3.1.1" - "@stoplight/prism-http" "^3.1.1" - fast-xml-parser "^3.12.20" - fastify "^2.7.1" - fastify-cors "^2.1.3" - fastify-formbody "^3.1.0" - tslib "^1.10.0" - type-is "^1.6.18" - -"@stoplight/prism-http@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@stoplight/prism-http/-/prism-http-3.1.1.tgz#f1f1fabd8892c81f6d9ca3def454903bb7de8619" - integrity sha512-ncJgQgbVgaXMQt0/J0aAvi655noZmXF2VSx72l6R1I7VU5yQA3oGexID+u/iYOzJE3urx5Ul/PGmvUvdAHxS7A== - dependencies: - "@stoplight/prism-core" "^3.1.1" - accepts "^1.3.7" - ajv "^6.10.2" - ajv-oai "^1.0.0" - axios "^0.18.0" - caseless "^0.12.0" - faker "^4.1.0" - fp-ts "^2.0.5" - json-schema-faker "0.5.0-rc20" - openapi-sampler "^1.0.0-beta.15" - pino "^5.13.2" - tslib "^1.10.0" - -"@stoplight/types@^11.0.0", "@stoplight/types@^11.1.0", "@stoplight/types@^11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@stoplight/types/-/types-11.1.1.tgz#a92d1833adb580a72439f42ba73de8f560fd68b4" - integrity sha512-IU8U9y/uO548z15DX/Jl053u9VQG8gCwNtypuD4RtskUA7pvHZl4+zzGK3klgIcO6Ql3Jk4/fcrFaN9vjmdEWg== - dependencies: - "@types/json-schema" "^7.0.3" - -"@stoplight/yaml-ast-parser@0.0.44": - version "0.0.44" - resolved "https://registry.yarnpkg.com/@stoplight/yaml-ast-parser/-/yaml-ast-parser-0.0.44.tgz#ed3c962564283e9983f7895a6effc3994286df5e" - integrity sha512-PdY8p2Ufgtorf4d2DbKMfknILMa8KwuyyMMR/2lgK1mLaU8F5PKWYc+h9hIzC+ar0bh7m9h2rINo32m7ADfVyA== - -"@stoplight/yaml@^3.0.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@stoplight/yaml/-/yaml-3.3.2.tgz#001049ed4a8733fca43cc60efe6bcd046abef210" - integrity sha512-KfrEsl3bA8mtoIklVvS4Hg8OrOYYtqi+K0IsQ7lJbZLVaUA4wMwDGwz85a6YWeo1OuVe8tumM6OynrFIjFutNA== - dependencies: - "@stoplight/types" "^11.1.1" - "@stoplight/yaml-ast-parser" "0.0.44" - lodash "^4.17.15" - "@storybook/addon-actions@^5.2.6": version "5.2.6" resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.2.6.tgz#4fe411fc3bdb1d44058f23fbc8eb8d1bac29d521" @@ -4188,11 +4064,6 @@ dependencies: "@types/superagent" "*" -"@types/swagger-schema-official@~2.0.18": - version "2.0.19" - resolved "https://registry.yarnpkg.com/@types/swagger-schema-official/-/swagger-schema-official-2.0.19.tgz#8e890e5b146b31c6fa9052616ca28229b11eb883" - integrity sha512-jxL2fC4PNNz1T7C5GLqcvYBX38W9VkQS/e0QM/8ljnyLrGakdzo27WX1PkGcim+GXwiQR0DaoMKjQOx398JeAA== - "@types/tar-fs@^1.16.1": version "1.16.1" resolved "https://registry.yarnpkg.com/@types/tar-fs/-/tar-fs-1.16.1.tgz#6e3fba276c173e365ae91e55f7b797a0e64298e5" @@ -4273,11 +4144,6 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== -"@types/urijs@1.x.x", "@types/urijs@~1.19.1": - version "1.19.4" - resolved "https://registry.yarnpkg.com/@types/urijs/-/urijs-1.19.4.tgz#29c4a694d4842d7f95e359a26223fc1865f1ab13" - integrity sha512-uHUvuLfy4YkRHL4UH8J8oRsINhdEHd9ymag7KJZVT94CjAmY1njoUzhazJsZjwfy+IpWKQKGVyXCwzhZvg73Fg== - "@types/uuid@^3.4.4": version "3.4.4" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.4.tgz#7af69360fa65ef0decb41fd150bf4ca5c0cefdf5" @@ -4693,11 +4559,6 @@ abortcontroller-polyfill@^1.3.0: resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.3.0.tgz#de69af32ae926c210b7efbcc29bf644ee4838b00" integrity sha512-lbWQgf+eRvku3va8poBlDBO12FigTQr9Zb7NIjXrePrhxWVKdCP2wbDl1tLDaYa18PWTom3UEWwdH13S46I+yA== -abstract-logging@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/abstract-logging/-/abstract-logging-1.0.0.tgz#8b7deafd310559bc28f77724dd1bb30177278c1b" - integrity sha1-i33q/TEFWbwo93ck3RuzAXcnjBs= - accept@3.x.x: version "3.0.2" resolved "https://registry.yarnpkg.com/accept/-/accept-3.0.2.tgz#83e41cec7e1149f3fd474880423873db6c6cc9ac" @@ -4706,14 +4567,6 @@ accept@3.x.x: boom "7.x.x" hoek "5.x.x" -accepts@^1.3.7, accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - accepts@~1.3.4, accepts@~1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" @@ -4722,6 +4575,14 @@ accepts@~1.3.4, accepts@~1.3.5: mime-types "~2.1.18" negotiator "0.6.1" +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + acorn-dynamic-import@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" @@ -4957,14 +4818,6 @@ ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv-oai@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ajv-oai/-/ajv-oai-1.1.1.tgz#5f3c19ebc6b1628465bc75436c1ade9031b3cab3" - integrity sha1-XzwZ68axYoRlvHVDbBrekDGzyrM= - dependencies: - ajv "^6.1.1" - decimal.js "^9.0.1" - ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" @@ -4993,7 +4846,7 @@ ajv@^6.1.0, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.1.1, ajv@^6.10.0, ajv@^6.10.2: +ajv@^6.10.0, ajv@^6.10.2: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -6010,14 +5863,6 @@ autoprefixer@9.6.1, autoprefixer@^9.4.9: postcss "^7.0.17" postcss-value-parser "^4.0.0" -avvio@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/avvio/-/avvio-6.2.2.tgz#af6ded59bde361fded817a6841a748142c659873" - integrity sha512-7+yznbJOMoHQ8Z8VH+1meyRjtxUW8za6gqnHBl8DqlX5qPtaclNIgWrKrTLuIbfn2+1/EGkcr+rQXI8DYVU4RA== - dependencies: - archy "^1.0.0" - debug "^4.0.0" - fastq "^1.6.0" await-event@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/await-event/-/await-event-2.1.0.tgz#78e9f92684bae4022f9fa0b5f314a11550f9aa76" @@ -7667,7 +7512,7 @@ case-sensitive-paths-webpack-plugin@^2.2.0: resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.2.0.tgz#3371ef6365ef9c25fa4b81c16ace0e9c7dc58c3e" integrity sha512-u5ElzokS8A1pm9vM3/iDgTcI3xqHxuCao94Oz8etI3cf0Tio0p8izkDYbTIn09uP3yUUr6+veaE6IkjnTYS46g== -caseless@^0.12.0, caseless@~0.12.0: +caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= @@ -9954,11 +9799,6 @@ decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, deca resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decimal.js@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-9.0.1.tgz#1cc8b228177da7ab6498c1cc06eb130a290e6e1e" - integrity sha512-2h0iKbJwnImBk4TGk7CG1xadoA0g3LDPlQhQzbZ221zvG0p2YVUedbKIPsOZXKZGx6YmZMJKYOalpCMxSdDqTQ== - decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -10235,11 +10075,6 @@ depd@~1.1.1, depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= -dependency-graph@~0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.8.0.tgz#2da2d35ed852ecc24a5d6c17788ba57c3708755b" - integrity sha512-DCvzSq2UiMsuLnj/9AL484ummEgLtZIcRS7YvtO38QnpX3vqh9nJ8P+zhu8Ja+SmLrBHO2iDbva20jq38qvBkQ== - dependency-tree@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/dependency-tree/-/dependency-tree-7.0.2.tgz#01df8bbdc51e41438f5bb93f4a53e1a9cf8301a1" @@ -10744,11 +10579,6 @@ dragselect@1.13.1: resolved "https://registry.yarnpkg.com/dragselect/-/dragselect-1.13.1.tgz#aa4166e1164b51ed5ee0cd89e0c5310a9c35be6a" integrity sha512-spfUz6/sNnlY4fF/OxPBwaKLa5hVz6V+fq5XhVuD+h47RAkA75TMkfvr4AoWUh5Ufq3V1oIAbfu+sjc9QbewoA== -drange@^1.0.2: - version "1.1.1" - resolved "https://registry.yarnpkg.com/drange/-/drange-1.1.1.tgz#b2aecec2aab82fcef11dbbd7b9e32b83f8f6c0b8" - integrity sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA== - duplexer2@^0.1.4, duplexer2@~0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" @@ -12380,11 +12210,6 @@ faker@1.1.0: resolved "https://registry.yarnpkg.com/faker/-/faker-1.1.0.tgz#230738ebd37edad9de4a421de12922bd8206a872" integrity sha1-Iwc469N+2tneSkId4SkivYIGqHI= -faker@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/faker/-/faker-4.1.0.tgz#1e45bbbecc6774b3c195fad2835109c6d748cc3f" - integrity sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8= - falafel@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/falafel/-/falafel-2.1.0.tgz#96bb17761daba94f46d001738b3cedf3a67fe06c" @@ -12404,11 +12229,6 @@ fancy-log@^1.3.2: color-support "^1.1.3" time-stamp "^1.0.0" -fast-decode-uri-component@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz#46f8b6c22b30ff7a81357d4f59abfae938202543" - integrity sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg== - 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" @@ -12468,29 +12288,11 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-json-stringify@^1.15.5: - version "1.15.6" - resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-1.15.6.tgz#47864aa15bc4be40ed959089a53a02c4fa7f5140" - integrity sha512-UKypbA85Qc53b8xdcXWI3g7TBnOV34+cYJczHJZv4KQ4mF3H9Mk3547FjX3lvUJO4Wf5kK0IhSO0eUTJKKcmEw== - dependencies: - ajv "^6.10.2" - deepmerge "^4.0.0" - fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-memoize@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/fast-memoize/-/fast-memoize-2.5.1.tgz#c3519241e80552ce395e1a32dcdde8d1fd680f5d" - integrity sha512-xdmw296PCL01tMOXx9mdJSmWY29jQgxyuZdq0rEHMu+Tpe1eOEtCycoG6chzlcrWsNgpZP7oL8RiQr7+G6Bl6g== - -fast-redact@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-2.0.0.tgz#17bb8f5e1f56ecf4a38c8455985e5eab4c478431" - integrity sha512-zxpkULI9W9MNTK2sJ3BpPQrTEXFNESd2X6O1tXMFpK/XM0G5c5Rll2EVYZH2TqI3xRGK/VaJ+eEOt7pnENJpeA== - fast-safe-stringify@^2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz#04b26106cc56681f51a044cfc0d76cf0008ac2c2" @@ -12501,53 +12303,6 @@ fast-safe-stringify@^2.0.7: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== -fast-xml-parser@^3.12.20: - version "3.13.0" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.13.0.tgz#3d46f517c0ac6c87393c6b6946808e9c799bb368" - integrity sha512-XYXC39VjE9dH6jpp5Gm5gsuR8Z4bMz44qMpT1PmqR+iyOJMhC0LcsN81asYkHP4OkEX8TTR8d6V/caCmy8Q8jQ== - -fastify-cors@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fastify-cors/-/fastify-cors-2.1.3.tgz#5ae8fcc620a47270cd68d46acc3b8dd7919b538b" - integrity sha512-ZHFzKn1DddymsxzvdtjEQfkuMfGgwcp++FKuTTMmAN2KFB7hJRmOINffjfRdmUcgXdE4LoSy5XJROWKx/b+CPQ== - dependencies: - fastify-plugin "^1.5.0" - vary "^1.1.2" - -fastify-formbody@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/fastify-formbody/-/fastify-formbody-3.1.0.tgz#604cdafdb9e3af6068e6d9940985baf692d6e922" - integrity sha512-GQQtRmI8w07SMcnXiWrk9H8GAMJwheKAkQS4q0FbJ56Qu8bV39GOffiZ8GLHQmvcJ2B65S+4IAtNjsG6vtMEig== - dependencies: - fastify-plugin "^1.0.0" - qs "^6.5.1" - -fastify-plugin@^1.0.0, fastify-plugin@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/fastify-plugin/-/fastify-plugin-1.6.0.tgz#c8198b08608f20c502b5dad26b36e9ae27206d7c" - integrity sha512-lFa9txg8LZx4tljj33oG53nUXhVg0baZxtP9Pxi0dJmI0NQxzkDk5DS9kr3D7iMalUAp3mvIq16OQumc7eIvLA== - dependencies: - semver "^6.0.0" - -fastify@^2.7.1: - version "2.10.0" - resolved "https://registry.yarnpkg.com/fastify/-/fastify-2.10.0.tgz#f5a83e6b8e801f3e80a9f81d0538977402cdf470" - integrity sha512-ieWwtPZPpcurQlRBmWer6rSq/2WAKAI3yPkh2oBbQ98U5BnWjhcLXYYgBRTS1TDu2evwbXwnRVdLpILVC2O5XA== - dependencies: - abstract-logging "^1.0.0" - ajv "^6.10.2" - avvio "^6.2.2" - fast-json-stringify "^1.15.5" - find-my-way "^2.0.0" - flatstr "^1.0.12" - light-my-request "^3.4.1" - middie "^4.0.1" - pino "^5.13.2" - proxy-addr "^2.0.4" - readable-stream "^3.1.1" - rfdc "^1.1.2" - secure-json-parse "^1.0.0" - tiny-lru "^7.0.0" fast-stream-to-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-stream-to-buffer/-/fast-stream-to-buffer-1.0.0.tgz#793340cc753e7ec9c7fb6d57a53a0b911cb0f588" @@ -12900,15 +12655,6 @@ find-cache-dir@^3.0.0: make-dir "^3.0.0" pkg-dir "^4.1.0" -find-my-way@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/find-my-way/-/find-my-way-2.2.1.tgz#248e939243af1b9df368bcc9b8c8286306caae7d" - integrity sha512-pzZA9/PlhDGG5PRzmd4vH4AbKW7FO68RE7q2I3NzjJHcVPukYbDA7bPdArg7ySKfS6pKki+qhrawFoN6aNZfjA== - dependencies: - fast-decode-uri-component "^1.0.0" - safe-regex2 "^2.0.0" - semver-store "^0.3.0" - find-root@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -13035,11 +12781,6 @@ flat@^4.1.0: dependencies: is-buffer "~2.0.3" -flatstr@^1.0.12, flatstr@^1.0.9: - version "1.0.12" - resolved "https://registry.yarnpkg.com/flatstr/-/flatstr-1.0.12.tgz#c2ba6a08173edbb6c9640e3055b95e287ceb5931" - integrity sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw== - flatted@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" @@ -13175,7 +12916,7 @@ for-own@^1.0.0: dependencies: for-in "^1.0.1" -foreach@^2.0.4, foreach@^2.0.5: +foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= @@ -13244,11 +12985,6 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -format-util@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.3.tgz#032dca4a116262a12c43f4c3ec8566416c5b2d95" - integrity sha1-Ay3KShFiYqEsQ/TD7IVmQWxbLZU= - formidable@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.1.1.tgz#96b8886f7c3c3508b932d6bd70c4d3a88f35f1a9" @@ -15380,6 +15116,7 @@ http-errors@~1.7.0: setprototypeof "1.1.1" statuses ">= 1.5.0 < 2" toidentifier "1.0.0" + http-headers@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/http-headers/-/http-headers-3.0.2.tgz#5147771292f0b39d6778d930a3a59a76fc7ef44d" @@ -15641,11 +15378,6 @@ immer@^1.5.0: resolved "https://registry.yarnpkg.com/immer/-/immer-1.12.1.tgz#40c6e5b292c00560836c2993bda3a24379d466f5" integrity sha512-3fmKM6ovaqDt0CdC9daXpNi5x/YCYS3i4cwLdTVkhJdk5jrDXoPs7lCm3IqM3yhfSnz4tjjxbRG2CziQ7m8ztg== -immer@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/immer/-/immer-3.3.0.tgz#ee7cf3a248d5dd2d4eedfbe7dfc1e9be8c72041d" - integrity sha512-vlWRjnZqoTHuEjadquVHK3GxsXe1gNoATffLEA8Qbrdd++Xb+wHEFiWtwAKTscMBoi1AsvEMXhYRzAXA8Ex9FQ== - immutable@^4.0.0-rc.9: version "4.0.0-rc.12" resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.12.tgz#ca59a7e4c19ae8d9bf74a97bdf0f6e2f2a5d0217" @@ -17524,7 +17256,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1, js-yaml@3.x, js-yaml@^3.10.0, js-yaml@^3.12.1, js-yaml@^3.13.1, js-yaml@^3.4.6, js-yaml@^3.5.1, js-yaml@^3.5.4, js-yaml@^3.9.0, js-yaml@~3.13.0, js-yaml@~3.13.1: +js-yaml@3.13.1, js-yaml@3.x, js-yaml@^3.10.0, js-yaml@^3.13.1, js-yaml@^3.4.6, js-yaml@^3.5.1, js-yaml@^3.5.4, js-yaml@^3.9.0, js-yaml@~3.13.0, js-yaml@~3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -17629,31 +17361,6 @@ json-parse-better-errors@^1.0.2: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== -json-pointer@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.0.tgz#8e500550a6aac5464a473377da57aa6cc22828d7" - integrity sha1-jlAFUKaqxUZKRzN32leqbMIoKNc= - dependencies: - foreach "^2.0.4" - -json-schema-faker@0.5.0-rc20: - version "0.5.0-rc20" - resolved "https://registry.yarnpkg.com/json-schema-faker/-/json-schema-faker-0.5.0-rc20.tgz#7e1c588185a16da8b7797409456467190818c03e" - integrity sha512-pmGqRvkU6xtJqJN0Py9yYtWaWfsb2DXvCXHwouxLiD18XNe3Ah96atf39kia1eaHGX9fPlinSRgsxZd+k2LVpw== - dependencies: - json-schema-ref-parser "^6.1.0" - jsonpath-plus "^1.0.0" - randexp "^0.5.3" - -json-schema-ref-parser@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz#30af34aeab5bee0431da805dac0eb21b574bf63d" - integrity sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw== - dependencies: - call-me-maybe "^1.0.1" - js-yaml "^3.12.1" - ono "^4.0.11" - json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" @@ -17730,11 +17437,6 @@ json5@^2.1.0: dependencies: minimist "^1.2.0" -jsonc-parser@~2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.1.1.tgz#83dc3d7a6e7186346b889b1280eefa04446c6d3e" - integrity sha512-VC0CjnWJylKB1iov4u76/W/5Ef0ydDkjtYWxoZ9t3HdWlSnZQwZL5MgFikaB/EtQ4RmMEw3tmQzuYnZA2/Ja1g== - jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -17774,11 +17476,6 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= -jsonpath-plus@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-1.1.0.tgz#7caaea4db88b761a0a3b55d715cb01eaa469dfa5" - integrity sha512-ydqTBOuLcFCUr9e7AxJlKCFgxzEQ03HjnIim0hJSdk2NxD8MOsaMOrRgP6XWEm5q3VuDY5+cRT1DM9vLlGo/qA== - jsonpointer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" @@ -18323,14 +18020,6 @@ liftoff@^3.1.0: rechoir "^0.6.2" resolve "^1.1.7" -light-my-request@^3.4.1: - version "3.5.0" - resolved "https://registry.yarnpkg.com/light-my-request/-/light-my-request-3.5.0.tgz#7310b06b64a6aef37735d9ebc95c03a24d01a513" - integrity sha512-40pGbzDCoTqJIojGWOvOR4H3S4rm372FcXP6LgfVNaFdAPErKpqPsLJOHpbGMqgVpr5+QHquZimAKIe9SS6xvw== - dependencies: - ajv "^6.10.2" - readable-stream "^3.4.0" - linebreak@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/linebreak/-/linebreak-0.3.0.tgz#0526480a62c05bd679f3e9d99830e09c6a7d0ed6" @@ -19654,14 +19343,6 @@ microseconds@0.1.0: resolved "https://registry.yarnpkg.com/microseconds/-/microseconds-0.1.0.tgz#47dc7bcf62171b8030e2152fd82f12a6894a7119" integrity sha1-R9x7z2IXG4Aw4hUv2C8SpolKcRk= -middie@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/middie/-/middie-4.0.1.tgz#24b4333034926ebd7831ed58766d050c1ce6300a" - integrity sha512-eYK6EEHZiYpQMYPmeCb/vC9ZzJg1HCqi1ot/fQs1sPZKt/XREgXouQ7g6c9J5XvDV5203JjbpovCYNkHcHgTpQ== - dependencies: - path-to-regexp "^3.0.0" - reusify "^1.0.2" - miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -21263,13 +20944,6 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -ono@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/ono/-/ono-4.0.11.tgz#c7f4209b3e396e8a44ef43b9cedc7f5d791d221d" - integrity sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g== - dependencies: - format-util "^1.0.3" - open@^6.1.0, open@^6.3.0: version "6.4.0" resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" @@ -21277,24 +20951,6 @@ open@^6.1.0, open@^6.3.0: dependencies: is-wsl "^1.1.0" -openapi-sampler@^1.0.0-beta.15: - version "1.0.0-beta.15" - resolved "https://registry.yarnpkg.com/openapi-sampler/-/openapi-sampler-1.0.0-beta.15.tgz#c087143826962fa07a0c7bda9ce5c36d732f45de" - integrity sha512-wUD/vD3iBHKik/sME3uwUu4X3HFA53rDrPcVvLzgEELjHLbnTpSYfm4Jo9qZT1dPfBRowAnrF/VRQfOjL5QRAw== - dependencies: - json-pointer "^0.6.0" - -openapi-schema-to-json-schema@stoplightio/openapi-schema-to-json-schema#c8b5f0c74270d505fc39635edef28e09df89601f: - version "2.2.0" - resolved "https://codeload.github.com/stoplightio/openapi-schema-to-json-schema/tar.gz/c8b5f0c74270d505fc39635edef28e09df89601f" - dependencies: - deep-equal "^1.0.1" - -openapi3-ts@~1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/openapi3-ts/-/openapi3-ts-1.3.0.tgz#a6b4a6dda1d037cb826f3230426ce5243c75edb3" - integrity sha512-Xk3hsB0PzB4dzr/r/FdmK+VfQbZH7lQQ2iipMS1/1eoz1wUvh5R7rmOakYvw0bQJJE6PYrOLx8UHsYmzgTr+YQ== - opener@^1.4.2: version "1.5.1" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" @@ -22065,11 +21721,6 @@ path-to-regexp@^2.2.1: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.4.0.tgz#35ce7f333d5616f1c1e1bfe266c3aba2e5b2e704" integrity sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w== -path-to-regexp@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.1.0.tgz#f45a9cc4dc6331ae8f131e0ce4fde8607f802367" - integrity sha512-PtHLisEvUOepjc+sStXxJ/pDV/s5UBTOKWJY2SOz3e6E/iN/jLknY9WL72kTwRrwXDUbZTEAtSnJbz2fF127DA== - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -22245,23 +21896,6 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pino-std-serializers@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz#cb5e3e58c358b26f88969d7e619ae54bdfcc1ae1" - integrity sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ== - -pino@^5.13.2: - version "5.13.5" - resolved "https://registry.yarnpkg.com/pino/-/pino-5.13.5.tgz#3bfd03c9e7d247adf806960a25c139572ce3cd4f" - integrity sha512-NSArDZnjIXgzTLsYA5EhYwLiMe2OmGJ73760Wt5Vj44kUcuPJk4ub29BKtWXGAMwVmW1cQ7Q8jQaLjY/5Gxqcw== - dependencies: - fast-redact "^2.0.0" - fast-safe-stringify "^2.0.7" - flatstr "^1.0.9" - pino-std-serializers "^2.3.0" - quick-format-unescaped "^3.0.3" - sonic-boom "^0.7.5" - pirates@^4.0.0, pirates@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" @@ -22276,13 +21910,6 @@ pixelmatch@^4.0.2: dependencies: pngjs "^3.0.0" -pkg-conf@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.1.0.tgz#2126514ca6f2abfebd168596df18ba57867f0058" - integrity sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg= - dependencies: - find-up "^2.0.0" - load-json-file "^4.0.0" pixelmatch@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-5.1.0.tgz#b640f0e5a03a09f235a4b818ef3b9b98d9d0b911" @@ -22826,14 +22453,6 @@ protocols@^1.1.0, protocols@^1.4.0: resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" integrity sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg== -proxy-addr@^2.0.4, proxy-addr@~2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" - integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.0" - proxy-addr@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" @@ -22842,6 +22461,14 @@ proxy-addr@~2.0.4: forwarded "~0.1.2" ipaddr.js "1.8.0" +proxy-addr@~2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" + integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.0" + proxy-from-env@1.0.0, proxy-from-env@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" @@ -23163,11 +22790,6 @@ querystringify@^2.0.0: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.0.tgz#7ded8dfbf7879dcc60d0a644ac6754b283ad17ef" integrity sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg== -quick-format-unescaped@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz#fb3e468ac64c01d22305806c39f121ddac0d1fb9" - integrity sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ== - quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -23247,18 +22869,11 @@ randexp@0.4.6: discontinuous-range "1.0.0" ret "~0.1.10" -randexp@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.5.3.tgz#f31c2de3148b30bdeb84b7c3f59b0ebb9fec3738" - integrity sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w== - dependencies: - drange "^1.0.2" - ret "^0.2.0" - random-bytes@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/random-bytes/-/random-bytes-1.0.0.tgz#4f68a1dc0ae58bd3fb95848c30324db75d64360b" integrity sha1-T2ih3Arli9P7lYSMMDJNt11kNgs= + random-poly-fill@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/random-poly-fill/-/random-poly-fill-1.0.1.tgz#13634dc0255a31ecf85d4a182d92c40f9bbcf5ed" @@ -24345,7 +23960,7 @@ readable-stream@1.0, readable-stream@~1.0.17, readable-stream@~1.0.27-1: isarray "0.0.1" string_decoder "~0.10.x" -"readable-stream@2 || 3", readable-stream@^3.0.0, readable-stream@^3.0.1, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0: +"readable-stream@2 || 3", readable-stream@^3.0.1, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== @@ -25325,11 +24940,6 @@ resumer@~0.0.0: dependencies: through "~2.3.4" -ret@^0.2.0, ret@~0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.2.2.tgz#b6861782a1f4762dce43402a71eb7a283f44573c" - integrity sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ== - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -25345,7 +24955,7 @@ retry@0.12.0, retry@^0.12.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= -reusify@^1.0.0, reusify@^1.0.2: +reusify@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== @@ -25572,13 +25182,6 @@ safe-json-parse@~1.0.1: resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" integrity sha1-PnZyPjjf3aE8mx0poeB//uSzC1c= -safe-regex2@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/safe-regex2/-/safe-regex2-2.0.0.tgz#b287524c397c7a2994470367e0185e1916b1f5b9" - integrity sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ== - dependencies: - ret "~0.2.0" - safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -25586,11 +25189,6 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -safe-stable-stringify@^1.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-1.1.0.tgz#f712b600f8f775444ccc66e8f31d250e43fdfe01" - integrity sha512-8h+96qSufNQrydRPzbHms38VftQQSRGbqUkaIMWUBWN4/N8sLNALIALa8KmFcQ8P/a9uzMkA+KY04Rj5WQiXPA== - safefs@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/safefs/-/safefs-4.1.0.tgz#f82aeb4bdd7ae51f653eb20f6728b3058c8d6445" @@ -25809,11 +25407,6 @@ scss-tokenizer@^0.2.3: js-base64 "^2.1.8" source-map "^0.4.2" -secure-json-parse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-1.0.0.tgz#fa32c6778166b783cf6315db967944e63f7747d0" - integrity sha512-kMg4jXttRQzVyLebIDc+MRxCueJ/zsmHpCn59BRd0mZUCd+V02wNd7/Pds8Nyhv7jfLHo1KkUOzdIF7cRMU4LQ== - seek-bzip@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" @@ -25867,11 +25460,6 @@ semver-regex@^1.0.0: resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" integrity sha1-kqSWkGX5xwxpR1PVUkj8aPj2Usk= -semver-store@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/semver-store/-/semver-store-0.3.0.tgz#ce602ff07df37080ec9f4fb40b29576547befbe9" - integrity sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg== - semver-truncate@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" @@ -26210,15 +25798,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= -signale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/signale/-/signale-1.4.0.tgz#c4be58302fb0262ac00fc3d886a7c113759042f1" - integrity sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w== - dependencies: - chalk "^2.3.2" - figures "^2.0.0" - pkg-conf "^2.1.0" - simple-git@1.116.0: version "1.116.0" resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.116.0.tgz#ea6e533466f1e0152186e306e004d4eefa6e3e00" @@ -26461,13 +26040,6 @@ sockjs@0.3.19: faye-websocket "^0.10.0" uuid "^3.0.1" -sonic-boom@^0.7.5: - version "0.7.6" - resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-0.7.6.tgz#c42df6df884a6a3d54fa7a45b11e4e2196818d45" - integrity sha512-k9E2QQ4zxuVRLDW+ZW6ISzJs3wlEorVdmM7ApDgor7wsGKSDG5YGHsGmgLY4XYh4DMlr/2ap2BWAE7yTFJtWnQ== - dependencies: - flatstr "^1.0.12" - sort-keys@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" @@ -26718,13 +26290,6 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" -split2@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/split2/-/split2-3.1.1.tgz#c51f18f3e06a8c4469aaab487687d8d956160bb6" - integrity sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q== - dependencies: - readable-stream "^3.0.0" - split@~0.2.10: version "0.2.10" resolved "https://registry.yarnpkg.com/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57" @@ -28050,11 +27615,6 @@ tiny-lr@^1.1.1: object-assign "^4.1.0" qs "^6.4.0" -tiny-lru@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/tiny-lru/-/tiny-lru-7.0.1.tgz#a5401035c317ea36ba86f91ce68b1b87e86c7630" - integrity sha512-BImmnAPNkaN7XjrvmOr4JAT2U6ubLmxiD9iDBMMow3/026OZ+yiuWzM1F0TgECLfq1KO2YkXEIJ2h6sPjXv9XA== - tiny-warning@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.2.tgz#1dfae771ee1a04396bdfde27a3adcebc6b648b28" @@ -28957,13 +28517,6 @@ type-fest@^0.6.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== -type-is@^1.6.18, type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -28977,6 +28530,14 @@ type-is@~1.6.15, type-is@~1.6.16: media-typer "0.3.0" mime-types "~2.1.18" +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + type-name@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/type-name/-/type-name-2.0.2.tgz#efe7d4123d8ac52afff7f40c7e4dec5266008fb4" @@ -29461,11 +29022,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -urijs@^1.19.1, urijs@~1.19.1: - version "1.19.2" - resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.2.tgz#f9be09f00c4c5134b7cb3cf475c1dd394526265a" - integrity sha512-s/UIq9ap4JPZ7H1EB5ULo/aOUbWqfDi7FKzMC2Nz+0Si8GiT1rIEaprt8hy3Vy2Ex2aJPpOQv4P4DuOZ+K1c6w== - urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" @@ -29797,7 +29353,7 @@ value-or-function@^3.0.0: resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= -vary@^1, vary@^1.1.2, vary@~1.1.2: +vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= @@ -31391,7 +30947,7 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" -yargs@^14.0.0, yargs@^14.2.0: +yargs@^14.2.0: version "14.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.0.tgz#f116a9242c4ed8668790b40759b4906c276e76c3" integrity sha512-/is78VKbKs70bVZH7w4YaZea6xcJWOAwkhbR0CFuZBmYtfTYF0xjGJF43AYd8g2Uii1yJwmS5GR2vBmrc32sbg==