From bf16300337bb46b02f813528f1cc094404db438b Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Wed, 13 Mar 2024 18:29:07 +0530 Subject: [PATCH 01/14] adding MDS support for ISM Pages: Indices, Aliases, DataStreams, Templates Signed-off-by: Ramakrishna Chilaka --- opensearch_dashboards.json | 15 +- package.json | 2 +- public/index_management_app.tsx | 15 +- .../Aliases/containers/Aliases/Aliases.tsx | 38 +- public/pages/Aliases/utils/constants.tsx | 2 + .../ComposableTemplates.tsx | 32 +- .../ComposableTemplates/utils/constants.tsx | 2 + .../CreateComposableTemplate.tsx | 31 +- .../CreateDataStream/CreateDataStream.tsx | 31 +- .../containers/CreateIndex/CreateIndex.tsx | 35 +- .../containers/IndexForm/index.tsx | 1 + .../CreateIndexTemplate.tsx | 31 +- .../containers/DataStreams/DataStreams.tsx | 39 +- .../DeleteDataStreamsModal.tsx | 4 + public/pages/DataStreams/utils/constants.tsx | 2 + .../container/ForceMerge/ForceMerge.tsx | 19 +- .../containers/IndexDetail/IndexDetail.tsx | 35 +- .../Indices/containers/IndexDetail/index.tsx | 14 +- .../Indices/containers/Indices/Indices.tsx | 70 +- public/pages/Indices/models/interfaces.ts | 1 + public/pages/Main/Main.tsx | 984 ++++++++++-------- .../Rollover/containers/Rollover/Rollover.tsx | 14 + .../containers/Templates/Templates.tsx | 38 +- public/pages/Templates/utils/constants.tsx | 2 + public/plugin.ts | 4 +- public/services/CommonService.ts | 5 +- public/services/DataSourceMenuContext.ts | 15 + public/services/IndexService.ts | 15 +- public/types.ts | 5 + server/plugin.ts | 28 +- server/routes/aliases.ts | 15 +- server/routes/dataStreams.ts | 16 +- server/routes/indices.ts | 45 +- server/services/AliasServices.ts | 19 +- server/services/CommonService.ts | 17 +- server/services/DataStreamService.ts | 30 +- server/services/IndexService.ts | 23 +- server/utils/helpers.ts | 17 + yarn.lock | 579 +++-------- 39 files changed, 1331 insertions(+), 959 deletions(-) create mode 100644 public/services/DataSourceMenuContext.ts create mode 100644 public/types.ts diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 1a1ffecc6..b608b93f2 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -2,16 +2,9 @@ "id": "indexManagementDashboards", "version": "3.0.0.0", "opensearchDashboardsVersion": "3.0.0", - "configPath": [ - "opensearch_index_management" - ], - "requiredPlugins": [ - "navigation", - "opensearchDashboardsReact" - ], - "optionalPlugins": [ - "managementOverview" - ], + "configPath": ["opensearch_index_management"], + "requiredPlugins": ["navigation", "opensearchDashboardsReact", "dataSourceManagement"], + "optionalPlugins": ["managementOverview", "dataSource"], "server": true, "ui": true -} \ No newline at end of file +} diff --git a/package.json b/package.json index 903cb5d43..e690cc00e 100644 --- a/package.json +++ b/package.json @@ -82,4 +82,4 @@ "engines": { "yarn": "^1.21.1" } -} \ No newline at end of file +} diff --git a/public/index_management_app.tsx b/public/index_management_app.tsx index f668540d2..15f976206 100644 --- a/public/index_management_app.tsx +++ b/public/index_management_app.tsx @@ -22,8 +22,14 @@ import { DarkModeContext } from "./components/DarkMode"; import Main from "./pages/Main"; import { CoreServicesContext } from "./components/core_services"; import "./app.scss"; +import { AppPluginStartDependencies } from "./types"; -export function renderApp(coreStart: CoreStart, params: AppMountParameters, landingPage: string) { +export function renderApp( + coreStart: CoreStart, + pluginStartDependencies: AppPluginStartDependencies, + params: AppMountParameters, + landingPage: string +) { const http = coreStart.http; const indexService = new IndexService(http); @@ -54,7 +60,12 @@ export function renderApp(coreStart: CoreStart, params: AppMountParameters, land -
+
diff --git a/public/pages/Aliases/containers/Aliases/Aliases.tsx b/public/pages/Aliases/containers/Aliases/Aliases.tsx index bfee996c8..c1b8f594e 100644 --- a/public/pages/Aliases/containers/Aliases/Aliases.tsx +++ b/public/pages/Aliases/containers/Aliases/Aliases.tsx @@ -36,9 +36,13 @@ import IndexControls, { SearchControlsProps } from "../../components/IndexContro import CreateAlias from "../CreateAlias"; import AliasesActions from "../AliasActions"; import { CoreStart } from "opensearch-dashboards/public"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; interface AliasesProps extends RouteComponentProps { commonService: CommonService; + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; } interface AliasesState { @@ -55,6 +59,8 @@ interface AliasesState { loading: boolean; aliasCreateFlyoutVisible: boolean; aliasEditFlyoutVisible: boolean; + dataSourceId: string; + dataSourceLabel: string; } function IndexNameDisplay(props: { indices: string[]; alias: string }) { @@ -113,6 +119,7 @@ const defaultFilter = { class Aliases extends Component { static contextType = CoreServicesContext; + constructor(props: AliasesProps) { super(props); const { @@ -145,6 +152,8 @@ class Aliases extends Component { aliasCreateFlyoutVisible: false, aliasEditFlyoutVisible: false, editingItem: null, + dataSourceId: this.props.dataSourceId, + dataSourceLabel: this.props.dataSourceLabel, }; this.getAliases = _.debounce(this.getAliases, 500, { leading: true }); @@ -164,6 +173,24 @@ class Aliases extends Component { }, {} as AliasesState); }; + static getDerivedStateFromProps(nextProps: AliasesProps, prevState: AliasesState) { + if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { + return { + dataSourceId: nextProps.dataSourceId, + dataSourceLabel: nextProps.dataSourceLabel, + }; + } + return null; + } + + async componentDidUpdate(prevProps: AliasesProps, prevState: AliasesState) { + const prevQuery = this.getQueryState(prevState); + const currQuery = this.getQueryState(this.state); + if (!_.isEqual(prevQuery, currQuery)) { + await this.getAliases(); + } + } + groupResponse = (array: IAlias[]) => { const groupedMap: Record = {}; array.forEach((item, index) => { @@ -473,5 +500,14 @@ class Aliases extends Component { export default function AliasContainer(props: Omit) { const context = useContext(ServicesContext); - return ; + const dataSourceMenuProps = useContext(DataSourceMenuContext); + return ( + + ); } diff --git a/public/pages/Aliases/utils/constants.tsx b/public/pages/Aliases/utils/constants.tsx index 16f10cfbb..643e1074e 100644 --- a/public/pages/Aliases/utils/constants.tsx +++ b/public/pages/Aliases/utils/constants.tsx @@ -14,4 +14,6 @@ export const DEFAULT_QUERY_PARAMS = { sortField: "alias" as keyof IAlias, sortDirection: SortDirection.DESC, status: "", + dataSourceId: "", + dataSourceLabel: "", }; diff --git a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx index 09fbb9a45..7cbcd6fb3 100644 --- a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx +++ b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx @@ -4,7 +4,7 @@ */ import React, { Component, useContext } from "react"; -import { debounce, isEqual, get } from "lodash"; +import _, { debounce, isEqual, get } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -38,11 +38,15 @@ import ComponentTemplateBadge from "../../../../components/ComponentTemplateBadg import AssociatedTemplatesModal from "../AssociatedTemplatesModal"; import { useComponentMapTemplate } from "../../utils/hooks"; import "./index.scss"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; interface ComposableTemplatesProps extends RouteComponentProps { commonService: CommonService; componentMapTemplate: Record; loading: boolean; + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; } type ComposableTemplatesState = { @@ -54,6 +58,8 @@ type ComposableTemplatesState = { selectedItems: ICatComposableTemplate[]; composableTemplates: ICatComposableTemplate[]; loading: boolean; + dataSourceId: string; + dataSourceLabel: string; } & SearchControlsProps["value"]; const defaultFilter = { @@ -89,6 +95,8 @@ class ComposableTemplates extends Component Promise | undefined; + static getDerivedStateFromProps(nextProps: ComposableTemplatesProps, prevState: ComposableTemplatesState) { + if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { + return { + dataSourceId: nextProps.dataSourceId, + dataSourceLabel: nextProps.dataSourceLabel, + }; + } + return null; + } + + async componentDidUpdate(prevProps: ComposableTemplatesProps, prevState: ComposableTemplatesState) { + const prevQuery = this.getQueryState(prevState); + const currQuery = this.getQueryState(this.state); + if (!_.isEqual(prevQuery, currQuery)) { + await this.getComposableTemplates(); + } + } + componentDidMount() { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.TEMPLATES]); this.getComposableTemplates(); @@ -452,6 +478,7 @@ export default function ComposableTemplatesContainer( props: Omit ) { const context = useContext(ServicesContext); + const dataSourceMenuProps = useContext(DataSourceMenuContext); const { componentMapTemplate, loading } = useComponentMapTemplate(); return ( ); } diff --git a/public/pages/ComposableTemplates/utils/constants.tsx b/public/pages/ComposableTemplates/utils/constants.tsx index 510f041fe..00adea8a5 100644 --- a/public/pages/ComposableTemplates/utils/constants.tsx +++ b/public/pages/ComposableTemplates/utils/constants.tsx @@ -13,4 +13,6 @@ export const DEFAULT_QUERY_PARAMS = { search: "", sortField: "name" as keyof ICatComposableTemplate, sortDirection: SortDirection.DESC, + dataSourceId: "", + dataSourceLabel: "", }; diff --git a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx index 334d0ce70..5d0b07b06 100644 --- a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx +++ b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx @@ -3,16 +3,22 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component } from "react"; +import React, { Component, useContext } from "react"; import { RouteComponentProps } from "react-router-dom"; import TemplateDetail from "../TemplateDetail"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; import { isEqual } from "lodash"; +import queryString from "query-string"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; -interface CreateComposableTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }> {} +interface CreateComposableTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }> { + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; +} -export default class CreateComposableTemplate extends Component { +class CreateComposableTemplate extends Component { static contextType = CoreServicesContext; get template() { @@ -43,14 +49,28 @@ export default class CreateComposableTemplate extends Component): void { if (!isEqual(prevProps, this.props)) { this.setBreadCrumb(); + this.updateDataSourcePropsInUrl(); } } componentDidMount = async (): Promise => { this.setBreadCrumb(); + this.updateDataSourcePropsInUrl(); }; onCancel = (): void => { @@ -71,3 +91,8 @@ export default class CreateComposableTemplate extends Component; +} diff --git a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx index 4faa1978c..f2b456e94 100644 --- a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx +++ b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx @@ -3,16 +3,22 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component } from "react"; +import React, { Component, useContext } from "react"; import { RouteComponentProps } from "react-router-dom"; import DataStreamDetail from "../DataStreamDetail"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; import { isEqual } from "lodash"; +import queryString from "query-string"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; -interface CreateDataStreamProps extends RouteComponentProps<{ dataStream?: string }> {} +interface CreateDataStreamProps extends RouteComponentProps<{ dataStream?: string }> { + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; +} -export default class CreateDataStream extends Component { +class CreateDataStream extends Component { static contextType = CoreServicesContext; get dataStream() { @@ -33,14 +39,28 @@ export default class CreateDataStream extends Component { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.DATA_STREAMS, lastBread]); } + updateDataSourcePropsInUrl() { + if (this.props.multiDataSourceEnabled) { + this.props.history.replace({ + ...this.props.location, + search: queryString.stringify({ + dataSourceId: this.props.dataSourceId, + dataSourceLabel: this.props.dataSourceLabel, + }), + }); + } + } + componentDidUpdate(prevProps: Readonly): void { if (!isEqual(prevProps, this.props)) { this.setBreadCrumb(); + this.updateDataSourcePropsInUrl(); } } componentDidMount = async (): Promise => { this.setBreadCrumb(); + this.updateDataSourcePropsInUrl(); }; onCancel = (): void => { @@ -60,3 +80,8 @@ export default class CreateDataStream extends Component { ); } } + +export default function (props: CreateDataStreamProps) { + const dataSourceMenuProps = useContext(DataSourceMenuContext); + return ; +} diff --git a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx index 5da962e8b..4946d9b9a 100644 --- a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx +++ b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx @@ -3,20 +3,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component } from "react"; +import React, { Component, useContext } from "react"; import { EuiSpacer, EuiTitle } from "@elastic/eui"; import { RouteComponentProps } from "react-router-dom"; import IndexForm from "../IndexForm"; import { BREADCRUMBS, IndicesUpdateMode, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; import { CommonService } from "../../../../services/index"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import queryString from "query-string"; interface CreateIndexProps extends RouteComponentProps<{ index?: string; mode?: IndicesUpdateMode }> { isEdit?: boolean; commonService: CommonService; + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; } -export default class CreateIndex extends Component { +export class CreateIndex extends Component { static contextType = CoreServicesContext; get index() { @@ -40,6 +45,19 @@ export default class CreateIndex extends Component { this.props.history.push(ROUTES.INDICES); }; + componentDidUpdate(prevProps: Readonly) { + if (this.props.multiDataSourceEnabled) { + if (prevProps.dataSourceId !== this.props.dataSourceId || prevProps.dataSourceLabel !== this.props.dataSourceLabel) { + this.props.history.replace({ + search: queryString.stringify({ + dataSourceId: this.props.dataSourceId, + dataSourceLabel: this.props.dataSourceLabel, + }), + }); + } + } + } + render() { const isEdit = this.isEdit; @@ -54,8 +72,21 @@ export default class CreateIndex extends Component { mode={this.props.match.params.mode} onCancel={this.onCancel} onSubmitSuccess={() => this.props.history.push(ROUTES.INDICES)} + dataSourceId={this.props.dataSourceId} /> ); } } + +export default function (props: CreateIndexProps) { + const dataSourceMenuProperties = useContext(DataSourceMenuContext); + return ( + + ); +} diff --git a/public/pages/CreateIndex/containers/IndexForm/index.tsx b/public/pages/CreateIndex/containers/IndexForm/index.tsx index 6786fed53..d5146f054 100644 --- a/public/pages/CreateIndex/containers/IndexForm/index.tsx +++ b/public/pages/CreateIndex/containers/IndexForm/index.tsx @@ -52,6 +52,7 @@ export interface IndexFormProps extends Pick void; onSubmitSuccess?: (indexName: string) => void; hideButtons?: boolean; + dataSourceId?: string; } interface CreateIndexState { diff --git a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx index 0420d4d08..c3bc6519b 100644 --- a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx +++ b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx @@ -3,16 +3,22 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component } from "react"; +import React, { Component, useContext } from "react"; import { RouteComponentProps } from "react-router-dom"; import { isEqual } from "lodash"; import TemplateDetail from "../TemplateDetail"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import queryString from "query-string"; -interface CreateIndexTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }> {} +interface CreateIndexTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }> { + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; +} -export default class CreateIndexTemplate extends Component { +class CreateIndexTemplate extends Component { static contextType = CoreServicesContext; get template() { @@ -42,14 +48,28 @@ export default class CreateIndexTemplate extends Component): void { if (!isEqual(prevProps, this.props)) { this.setBreadCrumb(); + this.updateDataSourcePropsInUrl(); } } componentDidMount = async (): Promise => { this.setBreadCrumb(); + this.updateDataSourcePropsInUrl(); }; onCancel = (): void => { @@ -70,3 +90,8 @@ export default class CreateIndexTemplate extends Component; +} diff --git a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx index f420af64a..369052da9 100644 --- a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx +++ b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx @@ -4,7 +4,7 @@ */ import React, { Component, useContext } from "react"; -import { debounce, isEqual } from "lodash"; +import _, { debounce, isEqual } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -35,9 +35,13 @@ import IndexControls, { SearchControlsProps } from "../../components/IndexContro import DataStreamsActions from "../DataStreamsActions"; import { CoreStart } from "opensearch-dashboards/public"; import { DataStream } from "../../../../../server/models/interfaces"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; interface DataStreamsProps extends RouteComponentProps { commonService: CommonService; + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; } type DataStreamsState = { @@ -49,6 +53,8 @@ type DataStreamsState = { selectedItems: DataStreamWithStats[]; dataStreams: DataStreamWithStats[]; loading: boolean; + dataSourceId: string; + dataSourceLabel: string; } & SearchControlsProps["value"]; const defaultFilter = { @@ -89,11 +95,31 @@ class DataStreams extends Component { selectedItems: [], dataStreams: [], loading: false, + dataSourceId: props.dataSourceId, + dataSourceLabel: props.dataSourceLabel, }; this.getDataStreams = debounce(this.getDataStreams, 500, { leading: true }); } + static getDerivedStateFromProps(nextProps: DataStreamsProps, prevState: DataStreamsState) { + if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { + return { + dataSourceId: nextProps.dataSourceId, + dataSourceLabel: nextProps.dataSourceLabel, + }; + } + return null; + } + + async componentDidUpdate(prevProps: DataStreamsProps, prevState: DataStreamsState) { + const prevQuery = this.getQueryState(prevState); + const currQuery = this.getQueryState(this.state); + if (!_.isEqual(prevQuery, currQuery)) { + await this.getDataStreams(); + } + } + componentDidMount() { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.DATA_STREAMS]); this.getDataStreams(); @@ -420,5 +446,14 @@ class DataStreams extends Component { export default function DataStreamsContainer(props: Omit) { const context = useContext(ServicesContext); - return ; + const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = useContext(DataSourceMenuContext); + return ( + + ); } diff --git a/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx b/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx index 0caf47937..2a56bd3bf 100644 --- a/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx +++ b/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx @@ -8,6 +8,7 @@ import { CoreStart } from "opensearch-dashboards/public"; import { ServicesContext } from "../../../../services"; import { CoreServicesContext } from "../../../../components/core_services"; import DeleteModal from "../../../../components/DeleteModal"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; interface DeleteTemplateModalProps { selectedItems: string[]; @@ -20,6 +21,8 @@ export default function DeleteTemplateModal(props: DeleteTemplateModalProps) { const { onClose, visible, selectedItems, onDelete } = props; const services = useContext(ServicesContext); const coreServices = useContext(CoreServicesContext) as CoreStart; + const dataSourceMenuProps = useContext(DataSourceMenuContext); + const { dataSourceId } = dataSourceMenuProps; const onConfirm = useCallback(async () => { if (services) { @@ -28,6 +31,7 @@ export default function DeleteTemplateModal(props: DeleteTemplateModalProps) { data: { path: `/_data_stream/${selectedItems.join(",")}`, method: "DELETE", + dataSourceId, }, }); if (result && result.ok) { diff --git a/public/pages/DataStreams/utils/constants.tsx b/public/pages/DataStreams/utils/constants.tsx index b46e0bb41..bd4c3cfb5 100644 --- a/public/pages/DataStreams/utils/constants.tsx +++ b/public/pages/DataStreams/utils/constants.tsx @@ -13,6 +13,8 @@ export const DEFAULT_QUERY_PARAMS = { search: "", sortField: "name" as keyof DataStream, sortDirection: SortDirection.DESC, + dataSourceId: "", + dataSourceLabel: "", }; export const HEALTH_TO_COLOR: { diff --git a/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx b/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx index 96e9450ee..f3ed9d350 100644 --- a/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx +++ b/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx @@ -24,6 +24,8 @@ import { ListenType } from "../../../../lib/JobScheduler"; import NotificationConfig, { NotificationConfigRef } from "../../../../containers/NotificationConfig"; import { ActionType } from "../../../Notifications/constant"; import { getClusterInfo } from "../../../../utils/helpers"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { useHistory } from "react-router"; interface ForceMergeProps extends RouteComponentProps<{ indexes?: string }> { services: BrowserServices; @@ -58,9 +60,24 @@ export default function ForceMergeWrapper(props: Omit { + history.replace({ + search: `?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`, + }); + }, [dataSourceId, dataSourceLabel]); + } const onCancel = () => { - props.history.push(ROUTES.INDICES); + if (multiDataSourceEnabled) { + props.history.push(`${ROUTES.INDICES}?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`); + } else { + props.history.push(ROUTES.INDICES); + } }; const onClickAction = async () => { const { errors, values } = await field.validatePromise(); diff --git a/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx b/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx index bb1a55207..78a012392 100644 --- a/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx +++ b/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx @@ -30,6 +30,8 @@ import { Modal } from "../../../../components/Modal"; import { IFinalDetail } from "./interface"; import { OVERVIEW_DISPLAY_INFO } from "./constants"; import { EVENT_MAP, destroyListener, listenEvent } from "../../../../JobHandler"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { useHistory } from "react-router"; export interface IndexDetailModalProps extends RouteComponentProps<{ index: string }> {} @@ -50,6 +52,17 @@ export default function IndexDetail(props: IndexDetailModalProps) { }; }, [record, detail]); const services = useContext(ServicesContext) as BrowserServices; + const dataSourceMenuProps = useContext(DataSourceMenuContext); + const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; + if (multiDataSourceEnabled) { + // mds flag can't change while the app is loaded + const history = useHistory(); + useEffect(() => { + history.replace({ + search: `?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`, + }); + }, [dataSourceId, dataSourceLabel]); + } const fetchIndicesDetail = () => services.commonService @@ -57,6 +70,7 @@ export default function IndexDetail(props: IndexDetailModalProps) { endpoint: "indices.get", data: { index, + dataSourceId, }, }) .then((res) => { @@ -146,7 +160,12 @@ export default function IndexDetail(props: IndexDetailModalProps) { - + ), @@ -188,7 +207,12 @@ export default function IndexDetail(props: IndexDetailModalProps) { } > - + ), @@ -202,7 +226,12 @@ export default function IndexDetail(props: IndexDetailModalProps) { - + ), diff --git a/public/pages/Indices/containers/IndexDetail/index.tsx b/public/pages/Indices/containers/IndexDetail/index.tsx index 7104b54d0..0de363709 100644 --- a/public/pages/Indices/containers/IndexDetail/index.tsx +++ b/public/pages/Indices/containers/IndexDetail/index.tsx @@ -3,10 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React from "react"; +import React, { useContext } from "react"; import { EuiButtonEmpty, EuiCopy, EuiLink } from "@elastic/eui"; import { RouteComponentProps } from "react-router-dom"; import { ROUTES } from "../../../../utils/constants"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; export interface IndexDetailModalProps { index: string; @@ -14,6 +15,8 @@ export interface IndexDetailModalProps { } export default function IndexDetail(props: IndexDetailModalProps) { + const dataSourceMenuProps = useContext(DataSourceMenuContext); + const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; const { index, history } = props; return ( @@ -21,7 +24,14 @@ export default function IndexDetail(props: IndexDetailModalProps) { {(copy) => } - history.push(`${ROUTES.INDEX_DETAIL}/${index}`)} data-test-subj={`viewIndexDetailButton-${index}`}> + { + multiDataSourceEnabled + ? history.push(`${ROUTES.INDEX_DETAIL}/${index}?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`) + : history.push(`${ROUTES.INDEX_DETAIL}/${index}`); + }} + data-test-subj={`viewIndexDetailButton-${index}`} + > {index} diff --git a/public/pages/Indices/containers/Indices/Indices.tsx b/public/pages/Indices/containers/Indices/Indices.tsx index 95adba12e..866cf75f3 100644 --- a/public/pages/Indices/containers/Indices/Indices.tsx +++ b/public/pages/Indices/containers/Indices/Indices.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component } from "react"; +import React, { Component, useContext } from "react"; import _ from "lodash"; import { RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; @@ -37,10 +37,14 @@ import { SECURITY_EXCEPTION_PREFIX } from "../../../../../server/utils/constants import IndicesActions from "../IndicesActions"; import { destroyListener, EVENT_MAP, listenEvent } from "../../../../JobHandler"; import "./index.scss"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; interface IndicesProps extends RouteComponentProps { indexService: IndexService; commonService: CommonService; + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; } interface IndicesState { @@ -58,8 +62,26 @@ interface IndicesState { isDataStreamColumnVisible: boolean; } -export default class Indices extends Component { +interface IndicesState { + totalIndices: number; + from: number; + size: number; + search: string; + query: Query; + sortField: keyof ManagedCatIndex; + sortDirection: Direction; + selectedItems: ManagedCatIndex[]; + indices: ManagedCatIndex[]; + loadingIndices: boolean; + showDataStreams: boolean; + isDataStreamColumnVisible: boolean; + dataSourceId: string; + dataSourceLabel: string; +} + +export class Indices extends Component { static contextType = CoreServicesContext; + constructor(props: IndicesProps) { super(props); const { from, size, search, sortField, sortDirection, showDataStreams } = getURLQueryParams(this.props.location); @@ -76,11 +98,23 @@ export default class Indices extends Component { loadingIndices: true, showDataStreams, isDataStreamColumnVisible: showDataStreams, + dataSourceId: props.dataSourceId, + dataSourceLabel: props.dataSourceLabel, }; this.getIndices = _.debounce(this.getIndices, 500, { leading: true }); } + static getDerivedStateFromProps(nextProps: IndicesProps, prevState: IndicesState) { + if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { + return { + dataSourceId: nextProps.dataSourceId, + dataSourceLabel: nextProps.dataSourceLabel, + }; + } + return null; + } + async componentDidMount() { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.INDICES]); listenEvent(EVENT_MAP.REINDEX_COMPLETE, this.getIndices); @@ -105,8 +139,16 @@ export default class Indices extends Component { } } - static getQueryObjectFromState({ from, size, search, sortField, sortDirection, showDataStreams }: IndicesState): IndicesQueryParams { - return { from, size, search, sortField, sortDirection, showDataStreams }; + static getQueryObjectFromState({ + from, + size, + search, + sortField, + sortDirection, + showDataStreams, + dataSourceId, + }: IndicesState): IndicesQueryParams { + return { from, size, search, sortField, sortDirection, showDataStreams, dataSourceId }; } getIndices = async (): Promise => { @@ -114,7 +156,7 @@ export default class Indices extends Component { try { const { indexService, history } = this.props; const queryObject = Indices.getQueryObjectFromState(this.state); - const queryParamsString = queryString.stringify(queryObject); + const queryParamsString = queryString.stringify({ ...queryObject, dataSourceLabel: this.state.dataSourceLabel }); history.replace({ ...this.props.location, search: queryParamsString }); const getIndicesResponse = await indexService.getIndices({ @@ -261,7 +303,11 @@ export default class Indices extends Component { buttonProps: { fill: true, onClick: () => { - this.props.history.push(ROUTES.CREATE_INDEX); + this.props.multiDataSourceEnabled + ? this.props.history.push( + `${ROUTES.CREATE_INDEX}?dataSourceId=${this.state.dataSourceId}&dataSourceLabel=${this.state.dataSourceLabel}` + ) + : this.props.history.push(`${ROUTES.CREATE_INDEX}`); }, }, }, @@ -301,3 +347,15 @@ export default class Indices extends Component { ); } } + +export default function IndicesHOC(props: IndicesProps) { + const dataSourceMenuProps = useContext(DataSourceMenuContext); + return ( + + ); +} diff --git a/public/pages/Indices/models/interfaces.ts b/public/pages/Indices/models/interfaces.ts index 22eaa153a..7bd32d299 100644 --- a/public/pages/Indices/models/interfaces.ts +++ b/public/pages/Indices/models/interfaces.ts @@ -19,4 +19,5 @@ export interface IndicesQueryParams { sortField: keyof ManagedCatIndex; sortDirection: Direction; showDataStreams: boolean; + dataSourceId: string; } diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index f078730a6..916dbc92d 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -3,11 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component } from "react"; +import React, { Component, createContext } from "react"; import { Switch, Route, Redirect, RouteComponentProps } from "react-router-dom"; // @ts-ignore -import { EuiSideNav, EuiPage, EuiPageBody, EuiPageSideBar } from "@elastic/eui"; -import { CoreStart } from "opensearch-dashboards/public"; +import { EuiSideNav, EuiPage, EuiPageBody, EuiPageSideBar, Query, Direction } from "@elastic/eui"; +import { CoreStart, MountPoint } from "opensearch-dashboards/public"; +import queryString from "query-string"; import Policies from "../Policies"; import ManagedIndices from "../ManagedIndices"; import Indices from "../Indices"; @@ -17,7 +18,7 @@ import ChangePolicy from "../ChangePolicy"; import PolicyDetails from "../PolicyDetails/containers/PolicyDetails"; import Rollups from "../Rollups"; import { ModalProvider, ModalRoot } from "../../components/Modal"; -import { ServicesConsumer } from "../../services"; +import { ServicesConsumer, ServicesContext } from "../../services"; import { BrowserServices } from "../../models/interfaces"; import { ROUTES } from "../../utils/constants"; import { CoreServicesConsumer } from "../../components/core_services"; @@ -27,7 +28,6 @@ import EditRollup from "../EditRollup/containers"; import RollupDetails from "../RollupDetails/containers/RollupDetails"; import { EditTransform, Transforms } from "../Transforms"; import TransformDetails from "../Transforms/containers/Transforms/TransformDetails"; -import queryString from "query-string"; import CreateSnapshotPolicy from "../CreateSnapshotPolicy"; import Repositories from "../Repositories"; import SnapshotPolicies from "../SnapshotPolicies"; @@ -48,6 +48,9 @@ import ForceMerge from "../ForceMerge"; import Notifications from "../Notifications"; import ComposableTemplates from "../ComposableTemplates"; import CreateComposableTemplate from "../CreateComposableTemplate"; +import { DataSourceMenu } from "../../../../../src/plugins/data_source_management/public"; +import { DataSourceMenuContext } from "../../services/DataSourceMenuContext"; +import { CommonService, IndexService } from "../../services"; enum Navigation { IndexManagement = "Index Management", @@ -113,9 +116,35 @@ const HIDDEN_NAV_STARTS_WITH_ROUTE = [ interface MainProps extends RouteComponentProps { landingPage: string; + setActionMenu: (menuMount: MountPoint | undefined) => void; + multiDataSourceEnabled: boolean; +} + +interface MainState { + dataSourceId: string; + dataSourceLabel: string; } -export default class Main extends Component { +export default class Main extends Component { + constructor(props: MainProps) { + super(props); + if (props.multiDataSourceEnabled) { + const { dataSourceId = "", dataSourceLabel = "" } = queryString.parse(this.props.location.search) as { + dataSourceId: string; + dataSourceLabel: string; + }; + this.state = { + dataSourceId: dataSourceId, + dataSourceLabel: dataSourceLabel, + }; + } else { + this.state = { + dataSourceId: "", + dataSourceLabel: "", + }; + } + } + render() { const { location: { pathname }, @@ -228,417 +257,544 @@ export default class Main extends Component { {(services: BrowserServices | null) => services && ( - - - - {/*Hide side navigation bar when creating or editing rollup job*/} - {!HIDDEN_NAV_ROUTES.includes(pathname) && !HIDDEN_NAV_STARTS_WITH_ROUTE.some((item) => pathname.startsWith(item)) ? ( - - - - ) : null} - - - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( - - )} - /> - ( - - )} - /> - ( - - )} - /> - ( - - )} - /> - - queryString.parse(this.props.location.search).type == "visual" ? ( - { + if (!this.props.multiDataSourceEnabled) { + return services; + } + services.indexService = new IndexService(core.http, this.state.dataSourceId); + services.commonService = new CommonService(core.http, this.state.dataSourceId); + return services; + })()} + > + + + {this.props.multiDataSourceEnabled && ( + + ( + { + this.setState({ dataSourceId, dataSourceLabel }); + }} + disableDataSourceSelectable={(() => { + return props.match.params.dataStream || props.match.params.template; + })()} + notifications={services.notificationService} + savedObjects={core.savedObjects.client} + selectedOption={(() => { + if (this.state.dataSourceId && this.state.dataSourceId !== "") { + return [ + { + id: this.state.dataSourceId, + label: this.state.dataSourceLabel, + }, + ]; + } + return undefined; + })()} + fullWidth={false} + hideLocalCluster={false} /> - ) : ( - - ) - } - /> - - queryString.parse(this.props.location.search).type == "visual" ? ( - + ( + { + this.setState({ dataSourceId, dataSourceLabel }); + }} + disableDataSourceSelectable={false} + notifications={services.notificationService} + savedObjects={core.savedObjects.client} + selectedOption={(() => { + if (this.state.dataSourceId && this.state.dataSourceId !== "") { + return [ + { + id: this.state.dataSourceId, + label: this.state.dataSourceLabel, + }, + ]; + } + return undefined; + })()} + fullWidth={false} + hideLocalCluster={false} /> - ) : ( - - ) - } - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- + ( + { + this.setState({ dataSourceId, dataSourceLabel }); + }} + disableDataSourceSelectable={true} + notifications={services.notificationService} + savedObjects={core.savedObjects.client} + selectedOption={(() => { + if (this.state.dataSourceId && this.state.dataSourceId !== "") { + return [ + { + id: this.state.dataSourceId, + label: this.state.dataSourceLabel, + }, + ]; + } + return undefined; + })()} + fullWidth={false} + hideLocalCluster={false} /> -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - ( -
- -
- )} - /> - -
-
-
-
+ )} + /> + + )} + + + {/* Hide side navigation bar when creating or editing rollup job*/} + {!HIDDEN_NAV_ROUTES.includes(pathname) && + !HIDDEN_NAV_STARTS_WITH_ROUTE.some((item) => pathname.startsWith(item)) ? ( + + + + ) : null} + + + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> + + queryString.parse(this.props.location.search).type == "visual" ? ( + + ) : ( + + ) + } + /> + + queryString.parse(this.props.location.search).type == "visual" ? ( + + ) : ( + + ) + } + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + ( +
+ +
+ )} + /> + +
+
+
+ + + ) }
diff --git a/public/pages/Rollover/containers/Rollover/Rollover.tsx b/public/pages/Rollover/containers/Rollover/Rollover.tsx index b5421b5b4..8253c2218 100644 --- a/public/pages/Rollover/containers/Rollover/Rollover.tsx +++ b/public/pages/Rollover/containers/Rollover/Rollover.tsx @@ -21,6 +21,9 @@ import { getIndexDetail, getOptions, getRolloveredIndex, onSubmit, submitWriteIn import { IRolloverRequestBody } from "../../interface"; import { filterByMinimatch } from "../../../../../utils/helper"; import { SYSTEM_ALIAS } from "../../../../../utils/constants"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { useHistory } from "react-router"; +import { CoreStart } from "opensearch-dashboards/public"; export interface RolloverProps extends RouteComponentProps<{ source?: string }> {} @@ -52,6 +55,17 @@ export default function Rollover(props: RolloverProps) { }, }, }); + const dataSourceMenuProps = useContext(DataSourceMenuContext); + const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; + if (multiDataSourceEnabled) { + // mds flag can't change while the app is loaded + const history = useHistory(); + useEffect(() => { + history.replace({ + search: `?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`, + }); + }, [dataSourceId, dataSourceLabel]); + } const onChange = (val?: Record) => { const finalResult = merge({}, tempValue, val); diff --git a/public/pages/Templates/containers/Templates/Templates.tsx b/public/pages/Templates/containers/Templates/Templates.tsx index 08970385e..e3d131dd1 100644 --- a/public/pages/Templates/containers/Templates/Templates.tsx +++ b/public/pages/Templates/containers/Templates/Templates.tsx @@ -4,7 +4,7 @@ */ import React, { Component, useContext } from "react"; -import { debounce, isEqual } from "lodash"; +import _, { debounce, isEqual } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -39,9 +39,13 @@ import { TemplateConvert } from "../../../CreateIndexTemplate/components/Templat import AssociatedComponentsModal from "../AssociatedComponentsModal"; import DeleteTemplate from "../../components/DeleteTemplate"; import IndexPatternDisplay from "./IndexPatternDisplay"; +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; interface TemplatesProps extends RouteComponentProps { commonService: CommonService; + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; } type TemplatesState = { @@ -53,6 +57,8 @@ type TemplatesState = { selectedItems: ITemplate[]; templates: ITemplate[]; loading: boolean; + dataSourceId: string; + dataSourceLabel: string; } & SearchControlsProps["value"]; const defaultFilter = { @@ -87,11 +93,30 @@ class Templates extends Component { selectedItems: [], templates: [], loading: false, + dataSourceId: props.dataSourceId, + dataSourceLabel: props.dataSourceLabel, }; this.getTemplates = debounce(this.getTemplates, 500, { leading: true }); } + static getDerivedStateFromProps(nextProps: TemplatesProps, prevState: TemplatesState) { + if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { + return { + dataSourceId: nextProps.dataSourceId, + dataSourceLabel: nextProps.dataSourceLabel, + }; + } + return null; + } + + async componentDidUpdate(prevProps: TemplatesProps, prevState: TemplatesState) { + const prevQuery = this.getQueryState(prevState); + const currQuery = this.getQueryState(this.state); + if (!_.isEqual(prevQuery, currQuery)) { + await this.getTemplates(); + } + } componentDidMount() { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.TEMPLATES]); this.getTemplates(); @@ -408,5 +433,14 @@ class Templates extends Component { export default function TemplatesContainer(props: Omit) { const context = useContext(ServicesContext); - return ; + const dataSourceMenuProps = useContext(DataSourceMenuContext); + return ( + + ); } diff --git a/public/pages/Templates/utils/constants.tsx b/public/pages/Templates/utils/constants.tsx index bbc6f5f6d..21230015d 100644 --- a/public/pages/Templates/utils/constants.tsx +++ b/public/pages/Templates/utils/constants.tsx @@ -13,4 +13,6 @@ export const DEFAULT_QUERY_PARAMS = { search: "", sortField: "name" as keyof ITemplate, sortDirection: SortDirection.DESC, + dataSourceId: "", + dataSourceLabel: "", }; diff --git a/public/plugin.ts b/public/plugin.ts index ccc688e63..24746efa7 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -58,7 +58,7 @@ export class IndexManagementPlugin implements Plugin { const { renderApp } = await import("./index_management_app"); const [coreStart, depsStart] = await core.getStartServices(); - return renderApp(coreStart, params, ROUTES.INDEX_POLICIES); + return renderApp(coreStart, depsStart, params, ROUTES.INDEX_POLICIES); }, }); @@ -70,7 +70,7 @@ export class IndexManagementPlugin implements Plugin { const { renderApp } = await import("./index_management_app"); const [coreStart, depsStart] = await core.getStartServices(); - return renderApp(coreStart, params, ROUTES.SNAPSHOT_POLICIES); + return renderApp(coreStart, depsStart, params, ROUTES.SNAPSHOT_POLICIES); }, }); diff --git a/public/services/CommonService.ts b/public/services/CommonService.ts index 62ec6c7e4..75dac4493 100644 --- a/public/services/CommonService.ts +++ b/public/services/CommonService.ts @@ -10,15 +10,18 @@ import { IAPICaller } from "../../models/interfaces"; export default class CommonService { httpClient: HttpSetup; + dataSourceId: string; - constructor(httpClient: HttpSetup) { + constructor(httpClient: HttpSetup, dataSourceId: string = "") { this.httpClient = httpClient; + this.dataSourceId = dataSourceId; } apiCaller = async (params: IAPICaller): Promise> => { let url = `${NODE_API.API_CALLER}`; const payload: HttpFetchOptions = {}; payload.method = "POST"; + params.data.dataSourceId = this.dataSourceId; payload.body = JSON.stringify({ data: params.data, endpoint: params.endpoint, diff --git a/public/services/DataSourceMenuContext.ts b/public/services/DataSourceMenuContext.ts new file mode 100644 index 000000000..220e8bda1 --- /dev/null +++ b/public/services/DataSourceMenuContext.ts @@ -0,0 +1,15 @@ +import { createContext } from "react"; + +interface DataSourceMenuProperties { + dataSourceId: string; + dataSourceLabel: string; + multiDataSourceEnabled: boolean; +} + +const DataSourceMenuContext = createContext({ + dataSourceId: "", + dataSourceLabel: "", + multiDataSourceEnabled: false, +}); + +export { DataSourceMenuContext }; diff --git a/public/services/IndexService.ts b/public/services/IndexService.ts index 777a32b52..949889f80 100644 --- a/public/services/IndexService.ts +++ b/public/services/IndexService.ts @@ -21,24 +21,34 @@ import { SECURITY_EXCEPTION_PREFIX } from "../../server/utils/constants"; export default class IndexService { httpClient: HttpSetup; + dataSourceId: string; - constructor(httpClient: HttpSetup) { + constructor(httpClient: HttpSetup, dataSourceId: string = "") { this.httpClient = httpClient; + this.dataSourceId = dataSourceId; + } + + patchQueryObjectWithObjectId(queryObject: HttpFetchQuery) { + queryObject.dataSourceId = this.dataSourceId; + return queryObject; } getIndices = async (queryObject: HttpFetchQuery): Promise> => { let url = `..${NODE_API._INDICES}`; + this.patchQueryObjectWithObjectId(queryObject); const response = (await this.httpClient.get(url, { query: queryObject })) as ServerResponse; return response; }; getDataStreams = async (queryObject: HttpFetchQuery): Promise> => { const url = `..${NODE_API._DATA_STREAMS}`; + this.patchQueryObjectWithObjectId(queryObject); return await this.httpClient.get(url, { query: queryObject }); }; getAliases = async (queryObject: HttpFetchQuery): Promise> => { const url = `..${NODE_API._ALIASES}`; + this.patchQueryObjectWithObjectId(queryObject); return await this.httpClient.get(url, { query: queryObject }); }; @@ -91,6 +101,7 @@ export default class IndexService { applyPolicy = async (indices: string[], policyId: string): Promise> => { const body = { indices, policyId }; + this.patchQueryObjectWithObjectId(body); const url = `..${NODE_API.APPLY_POLICY}`; const response = (await this.httpClient.post(url, { body: JSON.stringify(body) })) as ServerResponse; return response; @@ -98,6 +109,7 @@ export default class IndexService { editRolloverAlias = async (index: string, alias: string): Promise> => { const body = { index, alias }; + this.patchQueryObjectWithObjectId(body); const url = `..${NODE_API.EDIT_ROLLOVER_ALIAS}`; const response = (await this.httpClient.post(url, { body: JSON.stringify(body) })) as ServerResponse; return response; @@ -106,6 +118,7 @@ export default class IndexService { searchPolicies = async (searchValue: string, source: boolean = false): Promise> => { const str = searchValue.trim(); const queryObject = { from: 0, size: 10, search: str, sortDirection: "desc", sortField: "id" }; + this.patchQueryObjectWithObjectId(queryObject); const url = `..${NODE_API.POLICIES}`; const response = (await this.httpClient.get(url, { query: queryObject })) as ServerResponse; return response; diff --git a/public/types.ts b/public/types.ts new file mode 100644 index 000000000..9010386dd --- /dev/null +++ b/public/types.ts @@ -0,0 +1,5 @@ +import { DataSourcePluginStart } from "src/plugins/data_source/public/types"; + +export interface AppPluginStartDependencies { + dataSource: DataSourcePluginStart; +} diff --git a/server/plugin.ts b/server/plugin.ts index 43f0c5909..5ce598cb7 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -4,7 +4,7 @@ */ import { IndexManagementPluginSetup, IndexManagementPluginStart } from "."; -import { Plugin, CoreSetup, CoreStart, ILegacyCustomClusterClient } from "../../../src/core/server"; +import { Plugin, CoreSetup, CoreStart, ILegacyCustomClusterClient, LegacyAPICaller } from "../../../src/core/server"; import ismPlugin from "./clusters/ism/ismPlugin"; import { PolicyService, @@ -31,25 +31,32 @@ import { } from "../server/routes"; import dataStreams from "./routes/dataStreams"; import { NodeServices } from "./models/interfaces"; +import { DataSourcePluginSetup } from "../../../src/plugins/data_source/server"; + +export interface IndexManagementPluginDependencies { + dataSource: DataSourcePluginSetup; +} export class IndexPatternManagementPlugin implements Plugin { - public async setup(core: CoreSetup) { + public async setup(core: CoreSetup, { dataSource }: IndexManagementPluginDependencies) { // create OpenSearch client that aware of ISM API endpoints const osDriver: ILegacyCustomClusterClient = core.opensearch.legacy.createClient("index_management", { plugins: [ismPlugin], }); + const dataSourceEnabled = !!dataSource; + // Initialize services - const indexService = new IndexService(osDriver); - const dataStreamService = new DataStreamService(osDriver); + const indexService = new IndexService(osDriver, dataSourceEnabled); + const dataStreamService = new DataStreamService(osDriver, dataSourceEnabled); const policyService = new PolicyService(osDriver); const managedIndexService = new ManagedIndexService(osDriver); const rollupService = new RollupService(osDriver); const transformService = new TransformService(osDriver); const notificationService = new NotificationService(osDriver); const snapshotManagementService = new SnapshotManagementService(osDriver); - const commonService = new CommonService(osDriver); - const aliasService = new AliasServices(osDriver); + const commonService = new CommonService(osDriver, dataSourceEnabled); + const aliasService = new AliasServices(osDriver, dataSourceEnabled); const services: NodeServices = { indexService, dataStreamService, @@ -63,11 +70,14 @@ export class IndexPatternManagementPlugin implements Plugin>> => { @@ -32,8 +35,11 @@ export default class AliasServices { search?: string; }; - const client = this.osDriver.asScoped(request); - const [aliases, apiAccessible, errMsg] = await getAliases(client, search); + const useQuery = !request.body; + const usedParam = useQuery ? request.query : request.body; + const { dataSourceId = "" } = usedParam || {}; + const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); + const [aliases, apiAccessible, errMsg] = await getAliases(callWithRequest, search); if (!apiAccessible) return response.custom({ @@ -67,10 +73,7 @@ export default class AliasServices { }; } -export async function getAliases( - { callAsCurrentUser: callWithRequest }: ILegacyScopedClusterClient, - search?: string -): Promise<[Alias[], boolean, string]> { +export async function getAliases(callWithRequest: any, search?: string): Promise<[Alias[], boolean, string]> { const searchPattern = search ? `*${search}*` : "*"; let accessible = true; diff --git a/server/services/CommonService.ts b/server/services/CommonService.ts index a4eff7946..2aed41875 100644 --- a/server/services/CommonService.ts +++ b/server/services/CommonService.ts @@ -10,34 +10,37 @@ import { OpenSearchDashboardsResponseFactory, ILegacyCustomClusterClient, IOpenSearchDashboardsResponse, - RequestHandlerContext, } from "../../../../src/core/server"; import { IAPICaller } from "../../models/interfaces"; +import { getClientBasedOnDataSource } from "../utils/helpers"; const VALID_METHODS = ["HEAD", "GET", "POST", "PUT", "DELETE"]; -export interface ICommonCaller { - (arg: any): T; -} +export type ICommonCaller = (arg: any) => T; export default class CommonService { osDriver: ILegacyCustomClusterClient; + dataSourceEnabled: boolean; - constructor(osDriver: ILegacyCustomClusterClient) { + constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { this.osDriver = osDriver; + this.dataSourceEnabled = dataSourceEnabled; } apiCaller = async ( - context: RequestHandlerContext, + context: any, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory ): Promise>> => { const useQuery = !request.body; const usedParam = (useQuery ? request.query : request.body) as IAPICaller; const { endpoint, data, hideLog } = usedParam || {}; + try { - const { callAsCurrentUser: callWithRequest } = this.osDriver.asScoped(request); const finalData = data; + const { dataSourceId = "" } = data; + const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); + delete finalData.dataSourceId; /** * The endpoint must not be an empty string, reference from proxy caller diff --git a/server/services/DataStreamService.ts b/server/services/DataStreamService.ts index 5efaead04..923437bff 100644 --- a/server/services/DataStreamService.ts +++ b/server/services/DataStreamService.ts @@ -4,26 +4,30 @@ */ import { - RequestHandlerContext, - OpenSearchDashboardsRequest, - OpenSearchDashboardsResponseFactory, - IOpenSearchDashboardsResponse, ILegacyCustomClusterClient, ILegacyScopedClusterClient, + IOpenSearchDashboardsResponse, + OpenSearchDashboardsRequest, + OpenSearchDashboardsResponseFactory, + RequestHandlerContext, } from "opensearch-dashboards/server"; import { ServerResponse } from "../models/types"; import { DataStream, GetDataStreamsResponse, IndexToDataStream } from "../models/interfaces"; import { SECURITY_EXCEPTION_PREFIX } from "../utils/constants"; +import { IAPICaller } from "../../models/interfaces"; +import { getClientBasedOnDataSource } from "../utils/helpers"; export default class DataStreamService { osDriver: ILegacyCustomClusterClient; + dataSourceEnabled: boolean; - constructor(osDriver: ILegacyCustomClusterClient) { + constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { this.osDriver = osDriver; + this.dataSourceEnabled = dataSourceEnabled; } getDataStreams = async ( - context: RequestHandlerContext, + context: any, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory ): Promise>> => { @@ -32,8 +36,11 @@ export default class DataStreamService { search?: string; }; - const client = this.osDriver.asScoped(request); - const [dataStreams, apiAccessible, errMsg] = await getDataStreams(client, search); + const useQuery = !request.body; + const usedParam = useQuery ? request.query : request.body; + const { dataSourceId = "" } = usedParam || {}; + const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); + const [dataStreams, apiAccessible, errMsg] = await getDataStreams(callWithRequest, search); if (!apiAccessible) return response.custom({ @@ -67,10 +74,7 @@ export default class DataStreamService { }; } -export async function getDataStreams( - { callAsCurrentUser: callWithRequest }: ILegacyScopedClusterClient, - search?: string -): Promise<[DataStream[], boolean, string]> { +export async function getDataStreams(callWithRequest: any, search?: string): Promise<[DataStream[], boolean, string]> { const searchPattern = search ? `*${search}*` : "*"; let accessible = true; @@ -93,7 +97,7 @@ export async function getDataStreams( export async function getIndexToDataStreamMapping({ callAsCurrentUser: callWithRequest, }: ILegacyScopedClusterClient): Promise { - const [dataStreams] = await getDataStreams({ callAsCurrentUser: callWithRequest }); + const [dataStreams] = await getDataStreams(callWithRequest); const mapping: { [indexName: string]: string } = {}; dataStreams.forEach((dataStream) => { diff --git a/server/services/IndexService.ts b/server/services/IndexService.ts index d87de15ba..c1114ed34 100644 --- a/server/services/IndexService.ts +++ b/server/services/IndexService.ts @@ -21,20 +21,23 @@ import { ILegacyCustomClusterClient, IOpenSearchDashboardsResponse, RequestHandlerContext, + LegacyCallAPIOptions, } from "../../../../src/core/server"; -import { getSearchString } from "../utils/helpers"; +import { getClientBasedOnDataSource, getSearchString } from "../utils/helpers"; import { getIndexToDataStreamMapping } from "./DataStreamService"; import { IRecoveryItem, IReindexItem, ITaskItem } from "../../models/interfaces"; export default class IndexService { osDriver: ILegacyCustomClusterClient; + dataSourceEnabled: boolean; - constructor(osDriver: ILegacyCustomClusterClient) { + constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { this.osDriver = osDriver; + this.dataSourceEnabled = dataSourceEnabled; } getIndices = async ( - context: RequestHandlerContext, + context: any, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory ): Promise>> => { @@ -51,6 +54,7 @@ export default class IndexService { showDataStreams, expandWildcards, exactSearch, + dataSourceId = "", } = request.query as { from: string; size: string; @@ -61,7 +65,9 @@ export default class IndexService { indices?: string[]; dataStreams?: string[]; showDataStreams: boolean; + expandWildcards?: string; exactSearch?: string; + dataSourceId?: string; }; const params: { index: string; @@ -85,7 +91,7 @@ export default class IndexService { params.index = exactSearch; } - const { callAsCurrentUser: callWithRequest } = this.osDriver.asScoped(request); + const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); const [recoverys, tasks, indicesResponse, indexToDataStreamMapping]: [ IRecoveryItem[], @@ -175,7 +181,7 @@ export default class IndexService { const paginatedIndices = filteredIndices.slice(fromNumber, fromNumber + sizeNumber); const indexNames = paginatedIndices.map((value: CatIndex) => value.index); - const managedStatus = await this._getManagedStatus(request, indexNames); + const managedStatus = await this._getManagedStatus(callWithRequest, indexNames); const allIndices = paginatedIndices.map((catIndex: CatIndex) => ({ ...catIndex, @@ -219,12 +225,13 @@ export default class IndexService { } }; - _getManagedStatus = async (request: OpenSearchDashboardsRequest, indexNames: string[]): Promise<{ [indexName: string]: string }> => { + _getManagedStatus = async ( + callWithRequest: (endpoint: string, clientParams?: Record, options?: LegacyCallAPIOptions) => any, + indexNames: string[] + ): Promise<{ [p: string]: string }> => { try { const explainParamas = { index: indexNames.toString() }; - const { callAsCurrentUser: callWithRequest } = this.osDriver.asScoped(request); const explainResponse: ExplainResponse = await callWithRequest("ism.explain", explainParamas); - const managed: { [indexName: string]: string } = {}; for (const indexName in explainResponse) { if (indexName === "total_managed_indices") continue; diff --git a/server/utils/helpers.ts b/server/utils/helpers.ts index cd8fb8ac4..d1665e4c5 100644 --- a/server/utils/helpers.ts +++ b/server/utils/helpers.ts @@ -7,6 +7,7 @@ import _ from "lodash"; import { ExplainAPIManagedIndexMetaData, QueryStringQuery } from "../models/interfaces"; import { MatchAllQuery } from "../models/types"; import { ManagedIndexMetaData } from "../../models/interfaces"; +import { ILegacyCustomClusterClient, LegacyCallAPIOptions, OpenSearchDashboardsRequest } from "opensearch-dashboards/server"; export function transformManagedIndexMetaData(metaData: ExplainAPIManagedIndexMetaData | undefined): ManagedIndexMetaData | null { if (!metaData) return null; @@ -69,3 +70,19 @@ export function getSearchString(terms?: string[], indices?: string[], dataStream // We don't want to fetch managed datastream indices if there are not selected by caller. return showDataStreams ? resolved : resolved + " -.ds*"; } + +export function getClientBasedOnDataSource( + context: any, + dataSourceEnabled: boolean, + request: OpenSearchDashboardsRequest, + dataSourceId: string, + osDriver: ILegacyCustomClusterClient +): (endpoint: string, clientParams?: Record, options?: LegacyCallAPIOptions) => any { + if (dataSourceEnabled && dataSourceId && dataSourceId.trim().length != 0) { + // non-zero data source id + return context.dataSource.opensearch.legacy.getClient(dataSourceId).callAPI; + } else { + // fall back to default local cluster + return osDriver.asScoped(request).callAsCurrentUser; + } +} diff --git a/yarn.lock b/yarn.lock index 62f9b7c6d..d9c5ace62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,17 +35,7 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@cypress/listr-verbose-renderer@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#a77492f4b11dcc7c446a34b3e28721afd33c642a" - integrity sha512-EDiBsVPWC27DDLEJCo+dpl9ODHhdrwU57ccr9tspwCdG2ni0QVkf6LF0FGbhfujcjPxnXLIwsaks4sOrwrA4Qw== - dependencies: - chalk "^1.1.3" - cli-cursor "^1.0.2" - date-fns "^1.27.2" - figures "^1.7.0" - -"@cypress/request@^2.88.5", "@cypress/request@^3.0.0": +"@cypress/request@^2.88.10", "@cypress/request@^3.0.0": version "3.0.1" resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== @@ -178,13 +168,6 @@ "@node-rs/xxhash-win32-ia32-msvc" "1.4.0" "@node-rs/xxhash-win32-x64-msvc" "1.4.0" -"@samverschueren/stream-to-observable@^0.3.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" - integrity sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ== - dependencies: - any-observable "^0.3.0" - "@testing-library/dom@^8.11.3": version "8.20.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.20.0.tgz#914aa862cef0f5e89b98cc48e3445c4c921010f6" @@ -274,10 +257,17 @@ resolved "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== -"@types/node@12.12.50": - version "12.12.50" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.50.tgz#e9b2e85fafc15f2a8aa8fdd41091b983da5fd6ee" - integrity sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w== +"@types/node@*": + version "20.11.26" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.26.tgz#3fbda536e51d5c79281e1d9657dcb0131baabd2d" + integrity sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ== + dependencies: + undici-types "~5.26.4" + +"@types/node@^14.14.31": + version "14.18.63" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.63.tgz#1788fa8da838dbb5f9ea994b834278205db6ca2b" + integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -339,10 +329,10 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== -"@types/sinonjs__fake-timers@^6.0.1": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz#0ecc1b9259b76598ef01942f547904ce61a6a77d" - integrity sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A== +"@types/sinonjs__fake-timers@8.1.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" + integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g== "@types/sizzle@^2.3.2": version "2.3.3" @@ -361,6 +351,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yauzl@^2.9.1": + version "2.10.3" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" + integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== + dependencies: + "@types/node" "*" + "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -554,11 +551,6 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - ansi-escapes@^4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -566,16 +558,11 @@ ansi-escapes@^4.3.0: dependencies: type-fest "^0.21.3" -ansi-regex@^2.0.0, ansi-regex@^3.0.0, ansi-regex@^4.0.0, ansi-regex@^5.0.1: +ansi-regex@^4.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== - ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -595,11 +582,6 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -any-observable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" - integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -621,7 +603,7 @@ aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -arch@^2.1.2: +arch@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== @@ -776,7 +758,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.0.2: +base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -823,7 +805,7 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" -blob-util@2.0.2: +blob-util@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" integrity sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ== @@ -964,6 +946,14 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" +buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -1061,18 +1051,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -chalk@^1.0.0, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1143,6 +1122,11 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -1166,20 +1150,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cli-cursor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - integrity sha512-25tABq090YNKkF6JH7lcwO0zFJTRke4Jcq9iX2nr/Sz0Cjjv4gckmwlW6Ty/aoyFd6z3ysR2hMGC2GFugmBo6A== - dependencies: - restore-cursor "^1.0.1" - -cli-cursor@^2.0.0, cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== - dependencies: - restore-cursor "^2.0.0" - cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -1187,7 +1157,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-table3@~0.6.0: +cli-table3@~0.6.1: version "0.6.3" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== @@ -1196,14 +1166,6 @@ cli-table3@~0.6.0: optionalDependencies: "@colors/colors" "1.5.0" -cli-truncate@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" - integrity sha512-f4r4yJnbT++qUPI9NR4XLDLq41gQ+uqnPItWG0F5ZkehuNiTTa3EY0S4AqTSUOeJ7/zU41oWPQSNkW5BqPL9bg== - dependencies: - slice-ansi "0.0.4" - string-width "^1.0.1" - cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -1221,11 +1183,6 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== - collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -1305,7 +1262,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-stream@^1.5.0, concat-stream@^1.6.2: +concat-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -1451,50 +1408,52 @@ cyclist@^1.0.1: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A== -cypress@^6.0.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-6.9.1.tgz#ce1106bfdc47f8d76381dba63f943447883f864c" - integrity sha512-/RVx6sOhsyTR9sd9v0BHI4tnDZAhsH9rNat7CIKCUEr5VPWxyfGH0EzK4IHhAqAH8vjFcD4U14tPiJXshoUrmQ== +cypress@9.5.4: + version "9.5.4" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.4.tgz#49d9272f62eba12f2314faf29c2a865610e87550" + integrity sha512-6AyJAD8phe7IMvOL4oBsI9puRNOWxZjl8z1lgixJMcgJ85JJmyKeP6uqNA0dI1z14lmJ7Qklf2MOgP/xdAqJ/Q== dependencies: - "@cypress/listr-verbose-renderer" "^0.4.1" - "@cypress/request" "^2.88.5" + "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" - "@types/node" "12.12.50" - "@types/sinonjs__fake-timers" "^6.0.1" + "@types/node" "^14.14.31" + "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" - arch "^2.1.2" - blob-util "2.0.2" + arch "^2.2.0" + blob-util "^2.0.2" bluebird "^3.7.2" + buffer "^5.6.0" cachedir "^2.3.0" chalk "^4.1.0" check-more-types "^2.24.0" - cli-table3 "~0.6.0" + cli-cursor "^3.1.0" + cli-table3 "~0.6.1" commander "^5.1.0" common-tags "^1.8.0" - dayjs "^1.9.3" - debug "4.3.2" - eventemitter2 "^6.4.2" - execa "^4.0.2" + dayjs "^1.10.4" + debug "^4.3.2" + enquirer "^2.3.6" + eventemitter2 "^6.4.3" + execa "4.1.0" executable "^4.1.1" - extract-zip "^1.7.0" - fs-extra "^9.0.1" + extract-zip "2.0.1" + figures "^3.2.0" + fs-extra "^9.1.0" getos "^3.2.1" - is-ci "^2.0.0" - is-installed-globally "^0.3.2" + is-ci "^3.0.0" + is-installed-globally "~0.4.0" lazy-ass "^1.6.0" - listr "^0.14.3" - lodash "^4.17.19" + listr2 "^3.8.3" + lodash "^4.17.21" log-symbols "^4.0.0" - minimist "^1.2.5" - moment "^2.29.1" + minimist "^1.2.6" ospath "^1.2.2" - pretty-bytes "^5.4.1" - ramda "~0.27.1" + pretty-bytes "^5.6.0" + proxy-from-env "1.0.0" request-progress "^3.0.0" - supports-color "^7.2.0" + semver "^7.3.2" + supports-color "^8.1.1" tmp "~0.2.1" untildify "^4.0.0" - url "^0.11.0" yauzl "^2.10.0" dashdash@^1.12.0: @@ -1504,22 +1463,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -date-fns@^1.27.2: - version "1.30.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" - integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== - -dayjs@^1.9.3: - version "1.11.7" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" - integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ== - -debug@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" +dayjs@^1.10.4: + version "1.11.10" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" + integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" @@ -1535,7 +1482,7 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.2.0: +debug@^4.1.1, debug@^4.2.0, debug@^4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1688,11 +1635,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -elegant-spinner@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" - integrity sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ== - elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -1847,7 +1789,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== @@ -1929,7 +1871,7 @@ estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -eventemitter2@^6.4.2: +eventemitter2@^6.4.3: version "6.4.9" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.9.tgz#41f2750781b4230ed58827bc119d293471ecb125" integrity sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg== @@ -1947,20 +1889,7 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^4.0.2, execa@^4.1.0: +execa@4.1.0, execa@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== @@ -1975,6 +1904,19 @@ execa@^4.0.2, execa@^4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + executable@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" @@ -1982,11 +1924,6 @@ executable@^4.1.1: dependencies: pify "^2.2.0" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - integrity sha512-MsG3prOVw1WtLXAZbM3KiYtooKR1LvxHh3VHsVtIy0uiUu8usxgB/94DP2HxtD/661lLdB6yzQ09lGJSQr6nkg== - expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -2034,15 +1971,16 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" - integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== +extract-zip@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== dependencies: - concat-stream "^1.6.2" - debug "^2.6.9" - mkdirp "^0.5.4" + debug "^4.1.1" + get-stream "^5.1.0" yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" extsprintf@1.3.0: version "1.3.0" @@ -2076,18 +2014,10 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== -figures@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - integrity sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ== - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA== +figures@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== dependencies: escape-string-regexp "^1.0.5" @@ -2191,7 +2121,7 @@ from2@^2.1.0: inherits "^2.0.1" readable-stream "^2.0.0" -fs-extra@^9.0.1: +fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -2295,7 +2225,7 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0: +get-stream@^5.0.0, get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -2356,12 +2286,12 @@ glob@^7.1.3, glob@^7.1.4, glob@^7.2.3: once "^1.3.0" path-is-absolute "^1.0.0" -global-dirs@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.1.0.tgz#e9046a49c806ff04d6c1825e196c8f0091e8df4d" - integrity sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ== +global-dirs@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.1.tgz#0c488971f066baceda21447aecb1a8b911d22485" + integrity sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA== dependencies: - ini "1.3.7" + ini "2.0.0" globalthis@^1.0.3: version "1.0.3" @@ -2382,13 +2312,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== - dependencies: - ansi-regex "^2.0.0" - has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -2540,7 +2463,7 @@ husky@^3.0.0: run-node "^1.0.0" slash "^3.0.0" -ieee754@^1.1.4: +ieee754@^1.1.13, ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -2571,11 +2494,6 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== -indent-string@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" - integrity sha512-BYqTHXTGUIvg7t1r4sJNKcbDZkL92nkXA8YtRpbjFHRHGDL/NtUeiBJMeE60kIFN/Mg8ESaWQvftaYMGJzQZCQ== - indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" @@ -2609,10 +2527,10 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== -ini@1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" - integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== +ini@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== internal-slot@^1.0.4: version "1.0.4" @@ -2716,12 +2634,12 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== +is-ci@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== dependencies: - ci-info "^2.0.0" + ci-info "^3.2.0" is-core-module@^2.13.0, is-core-module@^2.13.1: version "2.13.1" @@ -2798,18 +2716,6 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" @@ -2822,13 +2728,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-installed-globally@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" - integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g== +is-installed-globally@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== dependencies: - global-dirs "^2.0.1" - is-path-inside "^3.0.1" + global-dirs "^3.0.0" + is-path-inside "^3.0.2" is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" @@ -2864,14 +2770,7 @@ is-obj@^1.0.1: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg== -is-observable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" - integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== - dependencies: - symbol-observable "^1.1.0" - -is-path-inside@^3.0.1: +is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -2883,11 +2782,6 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-promise@^2.1.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" - integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -3145,36 +3039,7 @@ lint-staged@^10.2.0: string-argv "0.3.1" stringify-object "^3.3.0" -listr-silent-renderer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" - integrity sha512-L26cIFm7/oZeSNVhWB6faeorXhMg4HNlb/dS/7jHhr708jxlXrtrBWo4YUxZQkc6dGoxEAe6J/D3juTRBUzjtA== - -listr-update-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz#4ea8368548a7b8aecb7e06d8c95cb45ae2ede6a2" - integrity sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA== - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^2.3.0" - strip-ansi "^3.0.1" - -listr-verbose-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz#f1132167535ea4c1261102b9f28dac7cba1e03db" - integrity sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw== - dependencies: - chalk "^2.4.1" - cli-cursor "^2.1.0" - date-fns "^1.27.2" - figures "^2.0.0" - -listr2@^3.2.2: +listr2@^3.2.2, listr2@^3.8.3: version "3.14.0" resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" integrity sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g== @@ -3188,21 +3053,6 @@ listr2@^3.2.2: through "^2.3.8" wrap-ansi "^7.0.0" -listr@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.3.tgz#2fea909604e434be464c50bddba0d496928fa586" - integrity sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== - dependencies: - "@samverschueren/stream-to-observable" "^0.3.0" - is-observable "^1.1.0" - is-promise "^2.1.0" - is-stream "^1.1.0" - listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.5.0" - listr-verbose-renderer "^0.5.0" - p-map "^2.0.0" - rxjs "^6.3.3" - loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -3237,18 +3087,11 @@ lodash.once@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== -lodash@^4.17.19, lodash@^4.17.21: +lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - integrity sha512-mmPrW0Fh2fxOzdBbFv4g1m6pR72haFLPJ2G5SJEELf1y+iaQrDG6cWCPjy54RHYbZAt7X+ls690Kw62AdWXBzQ== - dependencies: - chalk "^1.0.0" - log-symbols@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -3257,15 +3100,6 @@ log-symbols@^4.0.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -log-update@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" - integrity sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg== - dependencies: - ansi-escapes "^3.0.0" - cli-cursor "^2.0.0" - wrap-ansi "^3.0.1" - log-update@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" @@ -3405,11 +3239,6 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.52.0" -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -3432,10 +3261,10 @@ minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.5, minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== mississippi@^3.0.0: version "3.0.0" @@ -3461,14 +3290,14 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4: +mkdirp@^0.5.1, mkdirp@^0.5.3: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" -moment@^2.29.1, moment@^2.29.4: +moment@^2.29.4: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== @@ -3597,12 +3426,7 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== - -object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -3670,18 +3494,6 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - integrity sha512-GZ+g4jayMqzCRMgB2sol7GiCLjKfS1PINkjmx8spcKce1LiVqcbQreXwqs2YAFXC6R03VIG28ZS31t8M866v6A== - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== - dependencies: - mimic-fn "^1.0.0" - onetime@^5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" @@ -3730,11 +3542,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -3904,7 +3711,7 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== -pretty-bytes@^5.4.1: +pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== @@ -3943,6 +3750,11 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== +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" + integrity sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -4032,11 +3844,6 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== -ramda@~0.27.1: - version "0.27.2" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.2.tgz#84463226f7f36dc33592f6f4ed6374c48306c3f1" - integrity sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA== - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -4227,22 +4034,6 @@ resolve@^2.0.0-next.5: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - integrity sha512-reSjH4HuiFlxlaBaFCiS6O76ZGG2ygKoSlCsipKdaZuKSPx/+bt9mULkn4l0asVzbEfQQmXRg6Wp6gv6m0wElw== - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -4295,13 +4086,6 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.3.3: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - rxjs@^7.5.1: version "7.8.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" @@ -4364,7 +4148,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0, semver@^5.7.2, semver@^6.0.0, semver@^7.5.3: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0, semver@^5.7.2, semver@^6.0.0, semver@^7.3.2, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -4468,11 +4252,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - integrity sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw== - slice-ansi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" @@ -4672,23 +4451,6 @@ string-argv@0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -4748,20 +4510,6 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== - dependencies: - ansi-regex "^3.0.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -4779,11 +4527,6 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -4791,23 +4534,25 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.1.0, supports-color@^7.2.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -symbol-observable@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - tapable@^0.1.8: version "0.1.10" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" @@ -4933,11 +4678,6 @@ ts-loader@^6.2.1: micromatch "^4.0.0" semver "^6.0.0" -tslib@^1.9.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - tslib@^2.1.0: version "2.4.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" @@ -5024,6 +4764,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -5281,14 +5026,6 @@ worker-farm@^1.7.0: dependencies: errno "~0.1.7" -wrap-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" - integrity sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" From 1df0356b61f7dac4ee6af6bf4a462d9cdbec4e6f Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Wed, 13 Mar 2024 19:04:41 +0530 Subject: [PATCH 02/14] Reverting (not required) onCancel changes for forceMerge Signed-off-by: Ramakrishna Chilaka --- .../pages/ForceMerge/container/ForceMerge/ForceMerge.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx b/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx index f3ed9d350..5b9299567 100644 --- a/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx +++ b/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx @@ -73,12 +73,9 @@ export default function ForceMergeWrapper(props: Omit { - if (multiDataSourceEnabled) { - props.history.push(`${ROUTES.INDICES}?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`); - } else { - props.history.push(ROUTES.INDICES); - } + props.history.push(ROUTES.INDICES); }; + const onClickAction = async () => { const { errors, values } = await field.validatePromise(); if (advancedSettingsOpen) { From 9d5cfd5ee4dda1621ea3fdd2113facd33e7cc635 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Fri, 15 Mar 2024 18:38:31 +0530 Subject: [PATCH 03/14] force mounting IndexDetail page Signed-off-by: Ramakrishna Chilaka --- .../Aliases/containers/Aliases/Aliases.tsx | 10 +-- .../ComposableTemplates.tsx | 4 +- .../containers/CreateIndex/CreateIndex.tsx | 9 +-- .../containers/IndexForm/index.tsx | 5 +- .../containers/DataStreams/DataStreams.tsx | 12 +-- .../containers/Indices/Indices.test.tsx | 76 +++++++++++++++++-- .../Indices/containers/Indices/Indices.tsx | 11 +-- .../containers/Templates/Templates.tsx | 10 +-- public/services/DataSourceMenuContext.ts | 4 +- server/services/AliasServices.ts | 22 ++---- server/services/CommonService.ts | 22 ++---- server/services/DataStreamService.ts | 18 +---- server/services/IndexService.ts | 28 +++---- server/services/OpenSearchISMService.ts | 29 +++++++ server/utils/helpers.ts | 17 ----- 15 files changed, 140 insertions(+), 137 deletions(-) create mode 100644 server/services/OpenSearchISMService.ts diff --git a/public/pages/Aliases/containers/Aliases/Aliases.tsx b/public/pages/Aliases/containers/Aliases/Aliases.tsx index c1b8f594e..0725ecbf7 100644 --- a/public/pages/Aliases/containers/Aliases/Aliases.tsx +++ b/public/pages/Aliases/containers/Aliases/Aliases.tsx @@ -501,13 +501,5 @@ class Aliases extends Component { export default function AliasContainer(props: Omit) { const context = useContext(ServicesContext); const dataSourceMenuProps = useContext(DataSourceMenuContext); - return ( - - ); + return ; } diff --git a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx index 7cbcd6fb3..18999b929 100644 --- a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx +++ b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx @@ -486,9 +486,7 @@ export default function ComposableTemplatesContainer( loading={loading} componentMapTemplate={componentMapTemplate} commonService={context?.commonService as CommonService} - dataSourceId={dataSourceMenuProps.dataSourceId} - dataSourceLabel={dataSourceMenuProps.dataSourceLabel} - multiDataSourceEnabled={dataSourceMenuProps.multiDataSourceEnabled} + {...dataSourceMenuProps} /> ); } diff --git a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx index 4946d9b9a..2319d5696 100644 --- a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx +++ b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx @@ -81,12 +81,5 @@ export class CreateIndex extends Component { export default function (props: CreateIndexProps) { const dataSourceMenuProperties = useContext(DataSourceMenuContext); - return ( - - ); + return ; } diff --git a/public/pages/CreateIndex/containers/IndexForm/index.tsx b/public/pages/CreateIndex/containers/IndexForm/index.tsx index d5146f054..f564339cb 100644 --- a/public/pages/CreateIndex/containers/IndexForm/index.tsx +++ b/public/pages/CreateIndex/containers/IndexForm/index.tsx @@ -5,7 +5,7 @@ import React, { Component, forwardRef, useContext } from "react"; import { EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiButton, EuiButtonEmpty, EuiLoadingSpinner } from "@elastic/eui"; -import { get, set, differenceWith, isEqual, merge } from "lodash"; +import _, { get, set, differenceWith, isEqual, merge } from "lodash"; import { diffArrays } from "diff"; import flattern from "flat"; import { CoreStart } from "opensearch-dashboards/public"; @@ -52,7 +52,7 @@ export interface IndexFormProps extends Pick void; onSubmitSuccess?: (indexName: string) => void; hideButtons?: boolean; - dataSourceId?: string; + dataSourceId: string; } interface CreateIndexState { @@ -421,6 +421,7 @@ export class IndexForm extends Component (this.indexDetailRef = ref)} diff --git a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx index 369052da9..f911defe2 100644 --- a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx +++ b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx @@ -446,14 +446,6 @@ class DataStreams extends Component { export default function DataStreamsContainer(props: Omit) { const context = useContext(ServicesContext); - const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = useContext(DataSourceMenuContext); - return ( - - ); + const dataSourceMenuProperties = useContext(DataSourceMenuContext); + return ; } diff --git a/public/pages/Indices/containers/Indices/Indices.test.tsx b/public/pages/Indices/containers/Indices/Indices.test.tsx index c976f8e35..2e07a3fe6 100644 --- a/public/pages/Indices/containers/Indices/Indices.test.tsx +++ b/public/pages/Indices/containers/Indices/Indices.test.tsx @@ -18,10 +18,19 @@ import { ModalProvider, ModalRoot } from "../../../../components/Modal"; import { ServicesConsumer, ServicesContext } from "../../../../services"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesConsumer, CoreServicesContext } from "../../../../components/core_services"; - -function renderWithRouter(Component: React.ComponentType) { +import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; + +function renderWithRouter( + Component: React.ComponentType, + data: any = { + dataSourceId: "", + dataSourceLabel: "", + multiDataSourceEnabled: false, + }, + renderFn: any = render +) { return { - ...render( + ...renderFn( ) { {(core: CoreStart | null) => ( {({ indexService, commonService }: any) => ( - + + + )} )} @@ -52,7 +63,7 @@ function renderWithRouter(Component: React.ComponentType) { }; } -describe(" spec", () => { +describe(` spec`, () => { it("renders the component", async () => { browserServicesMock.indexService.getIndices = jest.fn().mockResolvedValue({ ok: true, response: { indices: [], totalIndices: 0 } }); const { container } = renderWithRouter(Indices); @@ -220,3 +231,58 @@ describe(" spec", () => { expect(queryByText("index_39")).toBeNull(); }); }); + +describe("re-render on data-source-id prop change", () => { + it("should re-render based on change in the data_source_id", async () => { + const indices_data_source_id1 = new Array(10).fill(null).map((_, index) => ({ + "docs.count": index, + "docs.deleted": 2, + health: "green", + index: `index_${index}`, + pri: "1", + "pri.store.size": "100KB", + rep: "0", + status: "open", + "store.size": "100KB", + uuid: "some_uuid", + })); + const indices_data_source_id2 = new Array(10).fill(null).map((_, index) => ({ + "docs.count": index, + "docs.deleted": 2, + health: "green", + index: `index_ds2_${index}`, + pri: "1", + "pri.store.size": "100KB", + rep: "0", + status: "open", + "store.size": "100KB", + uuid: "some_uuid", + })); + browserServicesMock.indexService.getIndices = jest + .fn() + .mockResolvedValueOnce({ ok: true, response: { indices: indices_data_source_id1, totalIndices: 10 } }) + .mockResolvedValueOnce({ ok: true, response: { indices: indices_data_source_id2, totalIndices: 10 } }); + + const { getByText, queryByText, rerender } = renderWithRouter(Indices, { + dataSourceId: "test_data_source_id", + dataSourceLabel: "test_data_source_label", + multiDataSourceEnabled: true, + }); + + await waitFor(() => getByText("index_0")); + expect(queryByText("index_11")).toBeNull(); + + // prop change, should re-trigger + renderWithRouter( + Indices, + { + dataSourceId: "test_data_source_id_2", + dataSourceLabel: "test_data_source_label_2", + multiDataSourceEnabled: true, + }, + rerender + ); + await waitFor(() => getByText("index_ds2_0")); + expect(queryByText("index_0")).toBeNull(); + }); +}); diff --git a/public/pages/Indices/containers/Indices/Indices.tsx b/public/pages/Indices/containers/Indices/Indices.tsx index 866cf75f3..a0c3ea57f 100644 --- a/public/pages/Indices/containers/Indices/Indices.tsx +++ b/public/pages/Indices/containers/Indices/Indices.tsx @@ -348,14 +348,7 @@ export class Indices extends Component { } } -export default function IndicesHOC(props: IndicesProps) { +export default function (props: IndicesProps) { const dataSourceMenuProps = useContext(DataSourceMenuContext); - return ( - - ); + return ; } diff --git a/public/pages/Templates/containers/Templates/Templates.tsx b/public/pages/Templates/containers/Templates/Templates.tsx index e3d131dd1..e31770c4b 100644 --- a/public/pages/Templates/containers/Templates/Templates.tsx +++ b/public/pages/Templates/containers/Templates/Templates.tsx @@ -434,13 +434,5 @@ class Templates extends Component { export default function TemplatesContainer(props: Omit) { const context = useContext(ServicesContext); const dataSourceMenuProps = useContext(DataSourceMenuContext); - return ( - - ); + return ; } diff --git a/public/services/DataSourceMenuContext.ts b/public/services/DataSourceMenuContext.ts index 220e8bda1..b24d8d013 100644 --- a/public/services/DataSourceMenuContext.ts +++ b/public/services/DataSourceMenuContext.ts @@ -12,4 +12,6 @@ const DataSourceMenuContext = createContext({ multiDataSourceEnabled: false, }); -export { DataSourceMenuContext }; +const DataSourceMenuConsumer = DataSourceMenuContext.Consumer; + +export { DataSourceMenuContext, DataSourceMenuConsumer }; diff --git a/server/services/AliasServices.ts b/server/services/AliasServices.ts index ecda31e6f..7dadcac1e 100644 --- a/server/services/AliasServices.ts +++ b/server/services/AliasServices.ts @@ -4,29 +4,19 @@ */ import { - RequestHandlerContext, + IOpenSearchDashboardsResponse, OpenSearchDashboardsRequest, OpenSearchDashboardsResponseFactory, - IOpenSearchDashboardsResponse, - ILegacyCustomClusterClient, - ILegacyScopedClusterClient, + RequestHandlerContext, } from "opensearch-dashboards/server"; import { ServerResponse } from "../models/types"; import { Alias, GetAliasesResponse } from "../models/interfaces"; import { SECURITY_EXCEPTION_PREFIX } from "../utils/constants"; -import { getClientBasedOnDataSource } from "../utils/helpers"; - -export default class AliasServices { - osDriver: ILegacyCustomClusterClient; - dataSourceEnabled: boolean; - - constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { - this.osDriver = osDriver; - this.dataSourceEnabled = dataSourceEnabled; - } +import { OpenSearchISMService } from "./OpenSearchISMService"; +export default class AliasServices extends OpenSearchISMService { getAliases = async ( - context: any, + context: RequestHandlerContext, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory ): Promise>> => { @@ -38,7 +28,7 @@ export default class AliasServices { const useQuery = !request.body; const usedParam = useQuery ? request.query : request.body; const { dataSourceId = "" } = usedParam || {}; - const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); + const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); const [aliases, apiAccessible, errMsg] = await getAliases(callWithRequest, search); if (!apiAccessible) diff --git a/server/services/CommonService.ts b/server/services/CommonService.ts index 2aed41875..5f89aceea 100644 --- a/server/services/CommonService.ts +++ b/server/services/CommonService.ts @@ -6,29 +6,19 @@ import { AcknowledgedResponse } from "../models/interfaces"; import { ServerResponse } from "../models/types"; import { + IOpenSearchDashboardsResponse, OpenSearchDashboardsRequest, OpenSearchDashboardsResponseFactory, - ILegacyCustomClusterClient, - IOpenSearchDashboardsResponse, + RequestHandlerContext, } from "../../../../src/core/server"; import { IAPICaller } from "../../models/interfaces"; -import { getClientBasedOnDataSource } from "../utils/helpers"; +import { OpenSearchISMService } from "./OpenSearchISMService"; const VALID_METHODS = ["HEAD", "GET", "POST", "PUT", "DELETE"]; -export type ICommonCaller = (arg: any) => T; - -export default class CommonService { - osDriver: ILegacyCustomClusterClient; - dataSourceEnabled: boolean; - - constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { - this.osDriver = osDriver; - this.dataSourceEnabled = dataSourceEnabled; - } - +export default class CommonService extends OpenSearchISMService { apiCaller = async ( - context: any, + context: RequestHandlerContext, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory ): Promise>> => { @@ -39,7 +29,7 @@ export default class CommonService { try { const finalData = data; const { dataSourceId = "" } = data; - const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); + const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); delete finalData.dataSourceId; /** diff --git a/server/services/DataStreamService.ts b/server/services/DataStreamService.ts index 923437bff..18ca4eed1 100644 --- a/server/services/DataStreamService.ts +++ b/server/services/DataStreamService.ts @@ -4,7 +4,6 @@ */ import { - ILegacyCustomClusterClient, ILegacyScopedClusterClient, IOpenSearchDashboardsResponse, OpenSearchDashboardsRequest, @@ -14,20 +13,11 @@ import { import { ServerResponse } from "../models/types"; import { DataStream, GetDataStreamsResponse, IndexToDataStream } from "../models/interfaces"; import { SECURITY_EXCEPTION_PREFIX } from "../utils/constants"; -import { IAPICaller } from "../../models/interfaces"; -import { getClientBasedOnDataSource } from "../utils/helpers"; - -export default class DataStreamService { - osDriver: ILegacyCustomClusterClient; - dataSourceEnabled: boolean; - - constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { - this.osDriver = osDriver; - this.dataSourceEnabled = dataSourceEnabled; - } +import { OpenSearchISMService } from "./OpenSearchISMService"; +export default class DataStreamService extends OpenSearchISMService { getDataStreams = async ( - context: any, + context: RequestHandlerContext, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory ): Promise>> => { @@ -39,7 +29,7 @@ export default class DataStreamService { const useQuery = !request.body; const usedParam = useQuery ? request.query : request.body; const { dataSourceId = "" } = usedParam || {}; - const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); + const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); const [dataStreams, apiAccessible, errMsg] = await getDataStreams(callWithRequest, search); if (!apiAccessible) diff --git a/server/services/IndexService.ts b/server/services/IndexService.ts index c1114ed34..1d540e250 100644 --- a/server/services/IndexService.ts +++ b/server/services/IndexService.ts @@ -6,38 +6,30 @@ import { Setting } from "../utils/constants"; import { AcknowledgedResponse, - ApplyPolicyResponse, AddResponse, + ApplyPolicyResponse, CatIndex, - GetIndicesResponse, - ExplainResponse, ExplainAPIManagedIndexMetaData, + ExplainResponse, + GetIndicesResponse, IndexToDataStream, } from "../models/interfaces"; import { ServerResponse } from "../models/types"; import { + IOpenSearchDashboardsResponse, + LegacyCallAPIOptions, OpenSearchDashboardsRequest, OpenSearchDashboardsResponseFactory, - ILegacyCustomClusterClient, - IOpenSearchDashboardsResponse, RequestHandlerContext, - LegacyCallAPIOptions, } from "../../../../src/core/server"; -import { getClientBasedOnDataSource, getSearchString } from "../utils/helpers"; +import { getSearchString } from "../utils/helpers"; import { getIndexToDataStreamMapping } from "./DataStreamService"; import { IRecoveryItem, IReindexItem, ITaskItem } from "../../models/interfaces"; +import { OpenSearchISMService } from "./OpenSearchISMService"; -export default class IndexService { - osDriver: ILegacyCustomClusterClient; - dataSourceEnabled: boolean; - - constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { - this.osDriver = osDriver; - this.dataSourceEnabled = dataSourceEnabled; - } - +export default class IndexService extends OpenSearchISMService { getIndices = async ( - context: any, + context: RequestHandlerContext, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory ): Promise>> => { @@ -91,7 +83,7 @@ export default class IndexService { params.index = exactSearch; } - const callWithRequest = getClientBasedOnDataSource(context, this.dataSourceEnabled, request, dataSourceId, this.osDriver); + const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); const [recoverys, tasks, indicesResponse, indexToDataStreamMapping]: [ IRecoveryItem[], diff --git a/server/services/OpenSearchISMService.ts b/server/services/OpenSearchISMService.ts new file mode 100644 index 000000000..313d00d55 --- /dev/null +++ b/server/services/OpenSearchISMService.ts @@ -0,0 +1,29 @@ +import { + ILegacyCustomClusterClient, + LegacyCallAPIOptions, + OpenSearchDashboardsRequest, + RequestHandlerContext, +} from "opensearch-dashboards/server"; + +export abstract class OpenSearchISMService { + osDriver: ILegacyCustomClusterClient; + dataSourceEnabled: boolean; + + constructor(osDriver: ILegacyCustomClusterClient, dataSourceEnabled: boolean = false) { + this.osDriver = osDriver; + this.dataSourceEnabled = dataSourceEnabled; + } + getClientBasedOnDataSource( + context: RequestHandlerContext, + request: OpenSearchDashboardsRequest, + dataSourceId: string + ): (endpoint: string, clientParams: Record, options?: LegacyCallAPIOptions | undefined) => Promise { + if (this.dataSourceEnabled && dataSourceId && dataSourceId.trim().length != 0) { + // non-zero data source id + return context.dataSource.opensearch.legacy.getClient(dataSourceId).callAPI; + } else { + // fall back to default local cluster + return this.osDriver.asScoped(request).callAsCurrentUser; + } + } +} diff --git a/server/utils/helpers.ts b/server/utils/helpers.ts index d1665e4c5..cd8fb8ac4 100644 --- a/server/utils/helpers.ts +++ b/server/utils/helpers.ts @@ -7,7 +7,6 @@ import _ from "lodash"; import { ExplainAPIManagedIndexMetaData, QueryStringQuery } from "../models/interfaces"; import { MatchAllQuery } from "../models/types"; import { ManagedIndexMetaData } from "../../models/interfaces"; -import { ILegacyCustomClusterClient, LegacyCallAPIOptions, OpenSearchDashboardsRequest } from "opensearch-dashboards/server"; export function transformManagedIndexMetaData(metaData: ExplainAPIManagedIndexMetaData | undefined): ManagedIndexMetaData | null { if (!metaData) return null; @@ -70,19 +69,3 @@ export function getSearchString(terms?: string[], indices?: string[], dataStream // We don't want to fetch managed datastream indices if there are not selected by caller. return showDataStreams ? resolved : resolved + " -.ds*"; } - -export function getClientBasedOnDataSource( - context: any, - dataSourceEnabled: boolean, - request: OpenSearchDashboardsRequest, - dataSourceId: string, - osDriver: ILegacyCustomClusterClient -): (endpoint: string, clientParams?: Record, options?: LegacyCallAPIOptions) => any { - if (dataSourceEnabled && dataSourceId && dataSourceId.trim().length != 0) { - // non-zero data source id - return context.dataSource.opensearch.legacy.getClient(dataSourceId).callAPI; - } else { - // fall back to default local cluster - return osDriver.asScoped(request).callAsCurrentUser; - } -} From d821f5e0c272b52e76a803565e73b4c75e915ad0 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Fri, 15 Mar 2024 23:48:49 +0530 Subject: [PATCH 04/14] force mounting template page Signed-off-by: Ramakrishna Chilaka --- .../CreateComposableTemplate/CreateComposableTemplate.tsx | 1 + .../containers/TemplateDetail/TemplateDetail.tsx | 3 ++- .../containers/CreateDataStream/CreateDataStream.tsx | 1 + .../containers/CreateIndexTemplate/CreateIndexTemplate.tsx | 1 + .../containers/TemplateDetail/TemplateDetail.tsx | 3 ++- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx index 5d0b07b06..b69af0954 100644 --- a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx +++ b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx @@ -86,6 +86,7 @@ class CreateComposableTemplate extends Component templateName={this.template} onCancel={this.onCancel} onSubmitSuccess={() => this.props.history.push(ROUTES.COMPOSABLE_TEMPLATES)} + dataSourceId={this.props.dataSourceId} /> ); diff --git a/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx b/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx index 17ef4b5c7..cb76dd64d 100644 --- a/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx +++ b/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx @@ -39,6 +39,7 @@ export interface TemplateDetailProps { hideTitle?: boolean; hideButton?: boolean; noPanel?: boolean; + dataSourceId: string; } export interface IComponentTemplateDetailInstance { @@ -209,7 +210,7 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref - + diff --git a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx index f2b456e94..a37f54a26 100644 --- a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx +++ b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx @@ -75,6 +75,7 @@ class CreateDataStream extends Component { dataStream={this.dataStream} onCancel={this.onCancel} onSubmitSuccess={() => this.props.history.push(ROUTES.DATA_STREAMS)} + key={this.props.dataSourceId} /> ); diff --git a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx index c3bc6519b..bb2980398 100644 --- a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx +++ b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx @@ -85,6 +85,7 @@ class CreateIndexTemplate extends Component { templateName={this.template} onCancel={this.onCancel} onSubmitSuccess={() => this.props.history.push(ROUTES.TEMPLATES)} + dataSourceId={this.props.dataSourceId} /> ); diff --git a/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx b/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx index 1a6eae283..63c4e90ab 100644 --- a/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx +++ b/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx @@ -50,6 +50,7 @@ export interface TemplateDetailProps { onSubmitSuccess?: (templateName: string) => void; history: RouteComponentProps["history"]; location: RouteComponentProps["location"]; + dataSourceId: string; } const TemplateDetail = (props: TemplateDetailProps, ref: Ref) => { @@ -316,7 +317,7 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref) => titleSize="s" > - + From 553f59a38729b2d041a6115195b145b8fa3b01aa Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Tue, 19 Mar 2024 18:57:50 +0530 Subject: [PATCH 05/14] clearing indexdetail on datasource change Signed-off-by: Ramakrishna Chilaka --- .../CreateIndex/containers/IndexForm/index.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/public/pages/CreateIndex/containers/IndexForm/index.tsx b/public/pages/CreateIndex/containers/IndexForm/index.tsx index f564339cb..c47d8c681 100644 --- a/public/pages/CreateIndex/containers/IndexForm/index.tsx +++ b/public/pages/CreateIndex/containers/IndexForm/index.tsx @@ -60,6 +60,7 @@ interface CreateIndexState { oldIndexDetail?: IndexItem; isSubmitting: boolean; loading: boolean; + dataSourceId: string; } const findLineNumber = (regexp: RegExp, str: string): number => { @@ -97,6 +98,7 @@ export class IndexForm extends Component Date: Tue, 19 Mar 2024 19:04:54 +0530 Subject: [PATCH 06/14] mounting data source menu as read only Signed-off-by: Ramakrishna Chilaka --- public/pages/Main/Main.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index 916dbc92d..fa713f7d0 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -278,7 +278,11 @@ export default class Main extends Component { {this.props.multiDataSourceEnabled && ( ( { this.setState({ dataSourceId, dataSourceLabel }); }} disableDataSourceSelectable={(() => { - return props.match.params.dataStream || props.match.params.template; + return ( + props.match.params.dataStream || props.match.params.template || props.match.params.composableTemplate + ); })()} notifications={services.notificationService} savedObjects={core.savedObjects.client} From 0973a1290ee60b1a5299e7bd79bc3afd5163252b Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Wed, 20 Mar 2024 11:56:21 +0530 Subject: [PATCH 07/14] integrating with readonly data source Signed-off-by: Ramakrishna Chilaka --- public/pages/Main/Main.tsx | 45 +++++--------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index fa713f7d0..8269a94d1 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -282,22 +282,16 @@ export default class Main extends Component { `${ROUTES.CREATE_DATA_STREAM}/:dataStream`, `${ROUTES.CREATE_TEMPLATE}/:template`, `${ROUTES.CREATE_COMPOSABLE_TEMPLATE}/:composableTemplate`, + ROUTES.FORCE_MERGE, + ROUTES.SPLIT_INDEX, + ROUTES.ROLLOVER, + ROUTES.INDEX_DETAIL, ]} render={(props) => ( { - this.setState({ dataSourceId, dataSourceLabel }); - }} - disableDataSourceSelectable={(() => { - return ( - props.match.params.dataStream || props.match.params.template || props.match.params.composableTemplate - ); - })()} - notifications={services.notificationService} - savedObjects={core.savedObjects.client} + showDataSourceView={true} selectedOption={(() => { if (this.state.dataSourceId && this.state.dataSourceId !== "") { return [ @@ -353,35 +347,6 @@ export default class Main extends Component { /> )} /> - ( - { - this.setState({ dataSourceId, dataSourceLabel }); - }} - disableDataSourceSelectable={true} - notifications={services.notificationService} - savedObjects={core.savedObjects.client} - selectedOption={(() => { - if (this.state.dataSourceId && this.state.dataSourceId !== "") { - return [ - { - id: this.state.dataSourceId, - label: this.state.dataSourceLabel, - }, - ]; - } - return undefined; - })()} - fullWidth={false} - hideLocalCluster={false} - /> - )} - /> )} From 677cba15ec21db0a0016de165371687b54f043a7 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Wed, 20 Mar 2024 12:44:06 +0530 Subject: [PATCH 08/14] re building services on page switches Signed-off-by: Ramakrishna Chilaka --- public/index_management_app.tsx | 50 +++--------------- public/pages/Main/Main.tsx | 91 ++++++++++++++++++++++++++------- 2 files changed, 80 insertions(+), 61 deletions(-) diff --git a/public/index_management_app.tsx b/public/index_management_app.tsx index 15f976206..40e5c7b6f 100644 --- a/public/index_management_app.tsx +++ b/public/index_management_app.tsx @@ -7,17 +7,6 @@ import { CoreStart, AppMountParameters } from "opensearch-dashboards/public"; import React from "react"; import ReactDOM from "react-dom"; import { HashRouter as Router, Route } from "react-router-dom"; -import { - IndexService, - ManagedIndexService, - PolicyService, - RollupService, - TransformService, - NotificationService, - ServicesContext, - SnapshotManagementService, - CommonService, -} from "./services"; import { DarkModeContext } from "./components/DarkMode"; import Main from "./pages/Main"; import { CoreServicesContext } from "./components/core_services"; @@ -30,27 +19,6 @@ export function renderApp( params: AppMountParameters, landingPage: string ) { - const http = coreStart.http; - - const indexService = new IndexService(http); - const managedIndexService = new ManagedIndexService(http); - const policyService = new PolicyService(http); - const rollupService = new RollupService(http); - const transformService = new TransformService(http); - const notificationService = new NotificationService(http); - const snapshotManagementService = new SnapshotManagementService(http); - const commonService = new CommonService(http); - const services = { - indexService, - managedIndexService, - policyService, - rollupService, - transformService, - notificationService, - snapshotManagementService, - commonService, - }; - const isDarkMode = coreStart.uiSettings.get("theme:darkMode") || false; ReactDOM.render( @@ -58,16 +26,14 @@ export function renderApp( ( - - -
- - + +
+ )} /> diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index 8269a94d1..f6c1a572d 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -7,7 +7,7 @@ import React, { Component, createContext } from "react"; import { Switch, Route, Redirect, RouteComponentProps } from "react-router-dom"; // @ts-ignore import { EuiSideNav, EuiPage, EuiPageBody, EuiPageSideBar, Query, Direction } from "@elastic/eui"; -import { CoreStart, MountPoint } from "opensearch-dashboards/public"; +import { CoreStart, HttpSetup, MountPoint } from "opensearch-dashboards/public"; import queryString from "query-string"; import Policies from "../Policies"; import ManagedIndices from "../ManagedIndices"; @@ -18,7 +18,16 @@ import ChangePolicy from "../ChangePolicy"; import PolicyDetails from "../PolicyDetails/containers/PolicyDetails"; import Rollups from "../Rollups"; import { ModalProvider, ModalRoot } from "../../components/Modal"; -import { ServicesConsumer, ServicesContext } from "../../services"; +import { + ManagedIndexService, + NotificationService, + PolicyService, + RollupService, + ServicesConsumer, + ServicesContext, + SnapshotManagementService, + TransformService, +} from "../../services"; import { BrowserServices } from "../../models/interfaces"; import { ROUTES } from "../../utils/constants"; import { CoreServicesConsumer } from "../../components/core_services"; @@ -125,6 +134,25 @@ interface MainState { dataSourceLabel: string; } +const dataSourceEnabledPaths: string[] = [ + ROUTES.CREATE_DATA_STREAM, + ROUTES.CREATE_TEMPLATE, + ROUTES.CREATE_COMPOSABLE_TEMPLATE, + ROUTES.FORCE_MERGE, + ROUTES.SPLIT_INDEX, + ROUTES.ROLLOVER, + ROUTES.INDEX_DETAIL, + ROUTES.INDICES, + ROUTES.CREATE_INDEX, + ROUTES.ALIASES, + ROUTES.DATA_STREAMS, + ROUTES.TEMPLATES, + ROUTES.CREATE_DATA_STREAM, + ROUTES.CREATE_TEMPLATE, + ROUTES.COMPOSABLE_TEMPLATES, + ROUTES.CREATE_COMPOSABLE_TEMPLATE, +]; + export default class Main extends Component { constructor(props: MainProps) { super(props); @@ -145,6 +173,40 @@ export default class Main extends Component { } } + isDataSourceEnabledForPath(path: string): boolean { + return dataSourceEnabledPaths.some((dataSourceEnabledPath: string) => path.startsWith(dataSourceEnabledPath)); + } + + getServices(http: HttpSetup) { + const { + location: { pathname }, + } = this.props; + const indexService = new IndexService(http); + const managedIndexService = new ManagedIndexService(http); + const policyService = new PolicyService(http); + const rollupService = new RollupService(http); + const transformService = new TransformService(http); + const notificationService = new NotificationService(http); + const snapshotManagementService = new SnapshotManagementService(http); + const commonService = new CommonService(http); + const services = { + indexService, + managedIndexService, + policyService, + rollupService, + transformService, + notificationService, + snapshotManagementService, + commonService, + }; + + if (this.props.multiDataSourceEnabled && this.isDataSourceEnabledForPath(pathname)) { + services.indexService = new IndexService(http, this.state.dataSourceId); + services.commonService = new CommonService(http, this.state.dataSourceId); + } + return services; + } + render() { const { location: { pathname }, @@ -254,19 +316,10 @@ export default class Main extends Component { {(core: CoreStart | null) => core && ( - - {(services: BrowserServices | null) => - services && ( - { - if (!this.props.multiDataSourceEnabled) { - return services; - } - services.indexService = new IndexService(core.http, this.state.dataSourceId); - services.commonService = new CommonService(core.http, this.state.dataSourceId); - return services; - })()} - > + + + {(services: BrowserServices | null) => + services && ( { - - ) - } - + ) + } + + ) } From f9018de076dbea43de9cf255083427733cad478a Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Thu, 21 Mar 2024 07:00:54 +0530 Subject: [PATCH 09/14] refactoring to common hooks and MDSEnabledComponent Signed-off-by: Ramakrishna Chilaka --- .../MDSEnabledComponent.tsx | 52 +++++++++++++++++++ .../components/MDSEnabledComponent/index.ts | 4 ++ public/index_management_app.tsx | 2 +- .../Aliases/containers/Aliases/Aliases.tsx | 30 +++-------- .../ComposableTemplates.tsx | 32 ++++-------- .../CreateComposableTemplate.tsx | 25 ++------- .../TemplateDetail/TemplateDetail.tsx | 1 + .../CreateDataStream/CreateDataStream.tsx | 25 ++------- .../containers/CreateIndex/CreateIndex.tsx | 23 ++------ .../containers/IndexForm/index.tsx | 23 ++++---- .../CreateIndexTemplate.tsx | 25 ++------- .../TemplateDetail/TemplateDetail.tsx | 1 + .../containers/DataStreams/DataStreams.tsx | 32 +++--------- .../DeleteDataStreamsModal.tsx | 4 -- .../container/ForceMerge/ForceMerge.tsx | 17 +----- .../containers/IndexDetail/IndexDetail.tsx | 37 ++----------- .../Indices/containers/IndexDetail/index.tsx | 14 +---- .../containers/Indices/Indices.test.tsx | 11 ++-- .../Indices/containers/Indices/Indices.tsx | 51 +++--------------- public/pages/Main/Main.tsx | 18 +++---- .../Reindex/container/Reindex/Reindex.tsx | 9 +++- .../Rollover/containers/Rollover/Rollover.tsx | 17 ++---- .../container/SplitIndex/SplitIndex.tsx | 3 ++ .../containers/Templates/Templates.tsx | 30 +++-------- public/services/DataSourceMenuContext.ts | 2 +- server/plugin.ts | 2 +- server/routes/aliases.ts | 4 +- 27 files changed, 166 insertions(+), 328 deletions(-) create mode 100644 public/components/MDSEnabledComponent/MDSEnabledComponent.tsx create mode 100644 public/components/MDSEnabledComponent/index.ts diff --git a/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx b/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx new file mode 100644 index 000000000..305b16840 --- /dev/null +++ b/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx @@ -0,0 +1,52 @@ +import React, { useContext, useEffect } from "react"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../services/DataSourceMenuContext"; +import { useHistory } from "react-router"; +import queryString from "query-string"; + +export default class MDSEnabledComponent< + Props extends DataSourceMenuProperties, + State extends DataSourceMenuProperties +> extends React.Component { + constructor(props: Props) { + super(props); + this.state = { + dataSourceId: props.dataSourceId, + dataSourceLabel: props.dataSourceLabel, + multiDataSourceEnabled: props.multiDataSourceEnabled, + } as State; + } + + static getDerivedStateFromProps( + nextProps: Props, + prevState: State + ) { + // static members cannot reference class type parameters + if ( + nextProps.multiDataSourceEnabled && + (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) + ) { + return { + dataSourceId: nextProps.dataSourceId, + dataSourceLabel: nextProps.dataSourceLabel, + }; + } + return null; + } +} + +export function useUpdateUrlWithDataSourceProperties() { + const dataSourceMenuProps = useContext(DataSourceMenuContext); + const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; + if (multiDataSourceEnabled) { + // mds flag can't change while the app is loaded + const history = useHistory(); + useEffect(() => { + history.replace({ + search: queryString.stringify({ + dataSourceId, + dataSourceLabel, + }), + }); + }, [dataSourceId, dataSourceLabel]); + } +} diff --git a/public/components/MDSEnabledComponent/index.ts b/public/components/MDSEnabledComponent/index.ts new file mode 100644 index 000000000..f711b2b29 --- /dev/null +++ b/public/components/MDSEnabledComponent/index.ts @@ -0,0 +1,4 @@ +import MDSEnabledComponent from "./MDSEnabledComponent"; + +export default MDSEnabledComponent; +export * from "./MDSEnabledComponent"; diff --git a/public/index_management_app.tsx b/public/index_management_app.tsx index 40e5c7b6f..17429d6c9 100644 --- a/public/index_management_app.tsx +++ b/public/index_management_app.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CoreStart, AppMountParameters } from "opensearch-dashboards/public"; +import { AppMountParameters, CoreStart } from "opensearch-dashboards/public"; import React from "react"; import ReactDOM from "react-dom"; import { HashRouter as Router, Route } from "react-router-dom"; diff --git a/public/pages/Aliases/containers/Aliases/Aliases.tsx b/public/pages/Aliases/containers/Aliases/Aliases.tsx index 0725ecbf7..b63f51a62 100644 --- a/public/pages/Aliases/containers/Aliases/Aliases.tsx +++ b/public/pages/Aliases/containers/Aliases/Aliases.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component, useContext, useState } from "react"; +import React, { useContext, useState } from "react"; import _, { isEqual } from "lodash"; import { RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; @@ -36,16 +36,14 @@ import IndexControls, { SearchControlsProps } from "../../components/IndexContro import CreateAlias from "../CreateAlias"; import AliasesActions from "../AliasActions"; import { CoreStart } from "opensearch-dashboards/public"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import MDSEnabledComponent from "../../../../components/MDSEnabledComponent"; -interface AliasesProps extends RouteComponentProps { +interface AliasesProps extends RouteComponentProps, DataSourceMenuProperties { commonService: CommonService; - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; } -interface AliasesState { +interface AliasesState extends DataSourceMenuProperties { totalAliases: number; from: string; size: string; @@ -59,8 +57,6 @@ interface AliasesState { loading: boolean; aliasCreateFlyoutVisible: boolean; aliasEditFlyoutVisible: boolean; - dataSourceId: string; - dataSourceLabel: string; } function IndexNameDisplay(props: { indices: string[]; alias: string }) { @@ -117,9 +113,8 @@ const defaultFilter = { status: DEFAULT_QUERY_PARAMS.status, }; -class Aliases extends Component { +class Aliases extends MDSEnabledComponent { static contextType = CoreServicesContext; - constructor(props: AliasesProps) { super(props); const { @@ -139,6 +134,7 @@ class Aliases extends Component { }; this.state = { ...defaultFilter, + ...this.state, totalAliases: 0, from, size, @@ -152,8 +148,6 @@ class Aliases extends Component { aliasCreateFlyoutVisible: false, aliasEditFlyoutVisible: false, editingItem: null, - dataSourceId: this.props.dataSourceId, - dataSourceLabel: this.props.dataSourceLabel, }; this.getAliases = _.debounce(this.getAliases, 500, { leading: true }); @@ -173,16 +167,6 @@ class Aliases extends Component { }, {} as AliasesState); }; - static getDerivedStateFromProps(nextProps: AliasesProps, prevState: AliasesState) { - if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { - return { - dataSourceId: nextProps.dataSourceId, - dataSourceLabel: nextProps.dataSourceLabel, - }; - } - return null; - } - async componentDidUpdate(prevProps: AliasesProps, prevState: AliasesState) { const prevQuery = this.getQueryState(prevState); const currQuery = this.getQueryState(this.state); diff --git a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx index 18999b929..066f63ac5 100644 --- a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx +++ b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx @@ -3,8 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component, useContext } from "react"; -import _, { debounce, isEqual, get } from "lodash"; +import React, { useContext } from "react"; +import { debounce, isEqual, get } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -38,15 +38,13 @@ import ComponentTemplateBadge from "../../../../components/ComponentTemplateBadg import AssociatedTemplatesModal from "../AssociatedTemplatesModal"; import { useComponentMapTemplate } from "../../utils/hooks"; import "./index.scss"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import MDSEnabledComponent from "../../../../components/MDSEnabledComponent"; -interface ComposableTemplatesProps extends RouteComponentProps { +interface ComposableTemplatesProps extends RouteComponentProps, DataSourceMenuProperties { commonService: CommonService; componentMapTemplate: Record; loading: boolean; - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; } type ComposableTemplatesState = { @@ -58,15 +56,14 @@ type ComposableTemplatesState = { selectedItems: ICatComposableTemplate[]; composableTemplates: ICatComposableTemplate[]; loading: boolean; - dataSourceId: string; - dataSourceLabel: string; -} & SearchControlsProps["value"]; +} & SearchControlsProps["value"] & + DataSourceMenuProperties; const defaultFilter = { search: DEFAULT_QUERY_PARAMS.search, }; -class ComposableTemplates extends Component { +class ComposableTemplates extends MDSEnabledComponent { static contextType = CoreServicesContext; constructor(props: ComposableTemplatesProps) { super(props); @@ -85,6 +82,7 @@ class ComposableTemplates extends Component Promise | undefined; - static getDerivedStateFromProps(nextProps: ComposableTemplatesProps, prevState: ComposableTemplatesState) { - if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { - return { - dataSourceId: nextProps.dataSourceId, - dataSourceLabel: nextProps.dataSourceLabel, - }; - } - return null; - } - async componentDidUpdate(prevProps: ComposableTemplatesProps, prevState: ComposableTemplatesState) { const prevQuery = this.getQueryState(prevState); const currQuery = this.getQueryState(this.state); diff --git a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx index b69af0954..2d31b6c0d 100644 --- a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx +++ b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx @@ -9,14 +9,10 @@ import TemplateDetail from "../TemplateDetail"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; import { isEqual } from "lodash"; -import queryString from "query-string"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; -interface CreateComposableTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }> { - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; -} +interface CreateComposableTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }>, DataSourceMenuProperties {} class CreateComposableTemplate extends Component { static contextType = CoreServicesContext; @@ -49,28 +45,14 @@ class CreateComposableTemplate extends Component this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.COMPOSABLE_TEMPLATES, lastBread]); } - updateDataSourcePropsInUrl() { - if (this.props.multiDataSourceEnabled) { - this.props.history.replace({ - ...this.props.location, - search: queryString.stringify({ - dataSourceId: this.props.dataSourceId, - dataSourceLabel: this.props.dataSourceLabel, - }), - }); - } - } - componentDidUpdate(prevProps: Readonly): void { if (!isEqual(prevProps, this.props)) { this.setBreadCrumb(); - this.updateDataSourcePropsInUrl(); } } componentDidMount = async (): Promise => { this.setBreadCrumb(); - this.updateDataSourcePropsInUrl(); }; onCancel = (): void => { @@ -95,5 +77,6 @@ class CreateComposableTemplate extends Component export default function (props: CreateComposableTemplateProps) { const dataSourceMenuProps = useContext(DataSourceMenuContext); + useUpdateUrlWithDataSourceProperties(); return ; } diff --git a/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx b/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx index cb76dd64d..a475cda3c 100644 --- a/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx +++ b/public/pages/CreateComposableTemplate/containers/TemplateDetail/TemplateDetail.tsx @@ -211,6 +211,7 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref + {/*{^ Passing dataSourceId as the key to force unmount and remount IndexAlias so as to refresh aliases in case of datasource changes }*/} diff --git a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx index a37f54a26..fda04b2ce 100644 --- a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx +++ b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx @@ -9,14 +9,10 @@ import DataStreamDetail from "../DataStreamDetail"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; import { isEqual } from "lodash"; -import queryString from "query-string"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; -interface CreateDataStreamProps extends RouteComponentProps<{ dataStream?: string }> { - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; -} +interface CreateDataStreamProps extends RouteComponentProps<{ dataStream?: string }>, DataSourceMenuProperties {} class CreateDataStream extends Component { static contextType = CoreServicesContext; @@ -39,28 +35,14 @@ class CreateDataStream extends Component { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.DATA_STREAMS, lastBread]); } - updateDataSourcePropsInUrl() { - if (this.props.multiDataSourceEnabled) { - this.props.history.replace({ - ...this.props.location, - search: queryString.stringify({ - dataSourceId: this.props.dataSourceId, - dataSourceLabel: this.props.dataSourceLabel, - }), - }); - } - } - componentDidUpdate(prevProps: Readonly): void { if (!isEqual(prevProps, this.props)) { this.setBreadCrumb(); - this.updateDataSourcePropsInUrl(); } } componentDidMount = async (): Promise => { this.setBreadCrumb(); - this.updateDataSourcePropsInUrl(); }; onCancel = (): void => { @@ -84,5 +66,6 @@ class CreateDataStream extends Component { export default function (props: CreateDataStreamProps) { const dataSourceMenuProps = useContext(DataSourceMenuContext); + useUpdateUrlWithDataSourceProperties(); return ; } diff --git a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx index 2319d5696..f39eca7a3 100644 --- a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx +++ b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx @@ -10,15 +10,12 @@ import IndexForm from "../IndexForm"; import { BREADCRUMBS, IndicesUpdateMode, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; import { CommonService } from "../../../../services/index"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; -import queryString from "query-string"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; -interface CreateIndexProps extends RouteComponentProps<{ index?: string; mode?: IndicesUpdateMode }> { +interface CreateIndexProps extends RouteComponentProps<{ index?: string; mode?: IndicesUpdateMode }>, DataSourceMenuProperties { isEdit?: boolean; commonService: CommonService; - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; } export class CreateIndex extends Component { @@ -45,19 +42,6 @@ export class CreateIndex extends Component { this.props.history.push(ROUTES.INDICES); }; - componentDidUpdate(prevProps: Readonly) { - if (this.props.multiDataSourceEnabled) { - if (prevProps.dataSourceId !== this.props.dataSourceId || prevProps.dataSourceLabel !== this.props.dataSourceLabel) { - this.props.history.replace({ - search: queryString.stringify({ - dataSourceId: this.props.dataSourceId, - dataSourceLabel: this.props.dataSourceLabel, - }), - }); - } - } - } - render() { const isEdit = this.isEdit; @@ -81,5 +65,6 @@ export class CreateIndex extends Component { export default function (props: CreateIndexProps) { const dataSourceMenuProperties = useContext(DataSourceMenuContext); + useUpdateUrlWithDataSourceProperties(); return ; } diff --git a/public/pages/CreateIndex/containers/IndexForm/index.tsx b/public/pages/CreateIndex/containers/IndexForm/index.tsx index c47d8c681..46300c96b 100644 --- a/public/pages/CreateIndex/containers/IndexForm/index.tsx +++ b/public/pages/CreateIndex/containers/IndexForm/index.tsx @@ -5,7 +5,7 @@ import React, { Component, forwardRef, useContext } from "react"; import { EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiButton, EuiButtonEmpty, EuiLoadingSpinner } from "@elastic/eui"; -import _, { get, set, differenceWith, isEqual, merge } from "lodash"; +import { get, set, differenceWith, isEqual, merge } from "lodash"; import { diffArrays } from "diff"; import flattern from "flat"; import { CoreStart } from "opensearch-dashboards/public"; @@ -17,6 +17,7 @@ import { transformArrayToObject, transformObjectToArray } from "../../../../comp import { ServerResponse } from "../../../../../server/models/types"; import { BrowserServices } from "../../../../models/interfaces"; import { ServicesContext } from "../../../../services"; +import { DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; export const getAliasActionsByDiffArray = ( oldAliases: string[], @@ -45,14 +46,13 @@ export const getAliasActionsByDiffArray = ( }, [] as IAliasAction[]); }; -export interface IndexFormProps extends Pick { +export interface IndexFormProps extends Pick, DataSourceMenuProperties { index?: string; value?: Partial; mode?: IndicesUpdateMode; onCancel?: () => void; onSubmitSuccess?: (indexName: string) => void; hideButtons?: boolean; - dataSourceId: string; } interface CreateIndexState { @@ -60,7 +60,6 @@ interface CreateIndexState { oldIndexDetail?: IndexItem; isSubmitting: boolean; loading: boolean; - dataSourceId: string; } const findLineNumber = (regexp: RegExp, str: string): number => { @@ -98,7 +97,6 @@ export class IndexForm extends Component (this.indexDetailRef = ref)} diff --git a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx index bb2980398..44c693074 100644 --- a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx +++ b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx @@ -9,14 +9,10 @@ import { isEqual } from "lodash"; import TemplateDetail from "../TemplateDetail"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; -import queryString from "query-string"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; -interface CreateIndexTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }> { - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; -} +interface CreateIndexTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }>, DataSourceMenuProperties {} class CreateIndexTemplate extends Component { static contextType = CoreServicesContext; @@ -48,28 +44,14 @@ class CreateIndexTemplate extends Component { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.TEMPLATES, lastBread]); } - updateDataSourcePropsInUrl() { - if (this.props.multiDataSourceEnabled) { - this.props.history.replace({ - ...this.props.location, - search: queryString.stringify({ - dataSourceId: this.props.dataSourceId, - dataSourceLabel: this.props.dataSourceLabel, - }), - }); - } - } - componentDidUpdate(prevProps: Readonly): void { if (!isEqual(prevProps, this.props)) { this.setBreadCrumb(); - this.updateDataSourcePropsInUrl(); } } componentDidMount = async (): Promise => { this.setBreadCrumb(); - this.updateDataSourcePropsInUrl(); }; onCancel = (): void => { @@ -94,5 +76,6 @@ class CreateIndexTemplate extends Component { export default function (props: CreateIndexTemplateProps) { const dataSourceMenuProps = useContext(DataSourceMenuContext); + useUpdateUrlWithDataSourceProperties(); return ; } diff --git a/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx b/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx index 63c4e90ab..a1c747e9b 100644 --- a/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx +++ b/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx @@ -318,6 +318,7 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref) => > + {/*{^ Passing dataSourceId as the key to force unmount and remount IndexAlias so as to refresh aliases in case of datasource changes }*/} diff --git a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx index f911defe2..eb33cc573 100644 --- a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx +++ b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx @@ -4,7 +4,7 @@ */ import React, { Component, useContext } from "react"; -import _, { debounce, isEqual } from "lodash"; +import { debounce, isEqual } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -35,13 +35,11 @@ import IndexControls, { SearchControlsProps } from "../../components/IndexContro import DataStreamsActions from "../DataStreamsActions"; import { CoreStart } from "opensearch-dashboards/public"; import { DataStream } from "../../../../../server/models/interfaces"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import MDSEnabledComponent from "../../../../components/MDSEnabledComponent"; -interface DataStreamsProps extends RouteComponentProps { +interface DataStreamsProps extends RouteComponentProps, DataSourceMenuProperties { commonService: CommonService; - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; } type DataStreamsState = { @@ -53,9 +51,8 @@ type DataStreamsState = { selectedItems: DataStreamWithStats[]; dataStreams: DataStreamWithStats[]; loading: boolean; - dataSourceId: string; - dataSourceLabel: string; -} & SearchControlsProps["value"]; +} & SearchControlsProps["value"] & + DataSourceMenuProperties; const defaultFilter = { search: DEFAULT_QUERY_PARAMS.search, @@ -67,7 +64,7 @@ export const healthExplanation = { red: "One or more primary shards are unassigned, so some data is unavailable.", }; -class DataStreams extends Component { +class DataStreams extends MDSEnabledComponent { static contextType = CoreServicesContext; constructor(props: DataStreamsProps) { super(props); @@ -86,6 +83,7 @@ class DataStreams extends Component { }; this.state = { ...defaultFilter, + ...this.state, totalDataStreams: 0, from, size, @@ -95,23 +93,10 @@ class DataStreams extends Component { selectedItems: [], dataStreams: [], loading: false, - dataSourceId: props.dataSourceId, - dataSourceLabel: props.dataSourceLabel, }; this.getDataStreams = debounce(this.getDataStreams, 500, { leading: true }); } - - static getDerivedStateFromProps(nextProps: DataStreamsProps, prevState: DataStreamsState) { - if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { - return { - dataSourceId: nextProps.dataSourceId, - dataSourceLabel: nextProps.dataSourceLabel, - }; - } - return null; - } - async componentDidUpdate(prevProps: DataStreamsProps, prevState: DataStreamsState) { const prevQuery = this.getQueryState(prevState); const currQuery = this.getQueryState(this.state); @@ -119,7 +104,6 @@ class DataStreams extends Component { await this.getDataStreams(); } } - componentDidMount() { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.DATA_STREAMS]); this.getDataStreams(); diff --git a/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx b/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx index 2a56bd3bf..0caf47937 100644 --- a/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx +++ b/public/pages/DataStreams/containers/DeleteDataStreamsModal/DeleteDataStreamsModal.tsx @@ -8,7 +8,6 @@ import { CoreStart } from "opensearch-dashboards/public"; import { ServicesContext } from "../../../../services"; import { CoreServicesContext } from "../../../../components/core_services"; import DeleteModal from "../../../../components/DeleteModal"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; interface DeleteTemplateModalProps { selectedItems: string[]; @@ -21,8 +20,6 @@ export default function DeleteTemplateModal(props: DeleteTemplateModalProps) { const { onClose, visible, selectedItems, onDelete } = props; const services = useContext(ServicesContext); const coreServices = useContext(CoreServicesContext) as CoreStart; - const dataSourceMenuProps = useContext(DataSourceMenuContext); - const { dataSourceId } = dataSourceMenuProps; const onConfirm = useCallback(async () => { if (services) { @@ -31,7 +28,6 @@ export default function DeleteTemplateModal(props: DeleteTemplateModalProps) { data: { path: `/_data_stream/${selectedItems.join(",")}`, method: "DELETE", - dataSourceId, }, }); if (result && result.ok) { diff --git a/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx b/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx index 5b9299567..58a4fef0e 100644 --- a/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx +++ b/public/pages/ForceMerge/container/ForceMerge/ForceMerge.tsx @@ -4,7 +4,6 @@ */ import { EuiButton, EuiButtonEmpty, EuiButtonIcon, EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from "@elastic/eui"; -import _ from "lodash"; import React, { useContext, useEffect, useRef, useState } from "react"; import { RouteComponentProps } from "react-router-dom"; import { CoreStart } from "opensearch-dashboards/public"; @@ -24,8 +23,7 @@ import { ListenType } from "../../../../lib/JobScheduler"; import NotificationConfig, { NotificationConfigRef } from "../../../../containers/NotificationConfig"; import { ActionType } from "../../../Notifications/constant"; import { getClusterInfo } from "../../../../utils/helpers"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; -import { useHistory } from "react-router"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; interface ForceMergeProps extends RouteComponentProps<{ indexes?: string }> { services: BrowserServices; @@ -60,22 +58,11 @@ export default function ForceMergeWrapper(props: Omit { - history.replace({ - search: `?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`, - }); - }, [dataSourceId, dataSourceLabel]); - } + useUpdateUrlWithDataSourceProperties(); const onCancel = () => { props.history.push(ROUTES.INDICES); }; - const onClickAction = async () => { const { errors, values } = await field.validatePromise(); if (advancedSettingsOpen) { diff --git a/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx b/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx index 78a012392..cf798138b 100644 --- a/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx +++ b/public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx @@ -30,8 +30,7 @@ import { Modal } from "../../../../components/Modal"; import { IFinalDetail } from "./interface"; import { OVERVIEW_DISPLAY_INFO } from "./constants"; import { EVENT_MAP, destroyListener, listenEvent } from "../../../../JobHandler"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; -import { useHistory } from "react-router"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; export interface IndexDetailModalProps extends RouteComponentProps<{ index: string }> {} @@ -52,17 +51,7 @@ export default function IndexDetail(props: IndexDetailModalProps) { }; }, [record, detail]); const services = useContext(ServicesContext) as BrowserServices; - const dataSourceMenuProps = useContext(DataSourceMenuContext); - const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; - if (multiDataSourceEnabled) { - // mds flag can't change while the app is loaded - const history = useHistory(); - useEffect(() => { - history.replace({ - search: `?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`, - }); - }, [dataSourceId, dataSourceLabel]); - } + useUpdateUrlWithDataSourceProperties(); const fetchIndicesDetail = () => services.commonService @@ -70,7 +59,6 @@ export default function IndexDetail(props: IndexDetailModalProps) { endpoint: "indices.get", data: { index, - dataSourceId, }, }) .then((res) => { @@ -160,12 +148,7 @@ export default function IndexDetail(props: IndexDetailModalProps) { - + ), @@ -207,12 +190,7 @@ export default function IndexDetail(props: IndexDetailModalProps) { } > - + ), @@ -226,12 +204,7 @@ export default function IndexDetail(props: IndexDetailModalProps) { - + ), diff --git a/public/pages/Indices/containers/IndexDetail/index.tsx b/public/pages/Indices/containers/IndexDetail/index.tsx index 0de363709..7104b54d0 100644 --- a/public/pages/Indices/containers/IndexDetail/index.tsx +++ b/public/pages/Indices/containers/IndexDetail/index.tsx @@ -3,11 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { useContext } from "react"; +import React from "react"; import { EuiButtonEmpty, EuiCopy, EuiLink } from "@elastic/eui"; import { RouteComponentProps } from "react-router-dom"; import { ROUTES } from "../../../../utils/constants"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; export interface IndexDetailModalProps { index: string; @@ -15,8 +14,6 @@ export interface IndexDetailModalProps { } export default function IndexDetail(props: IndexDetailModalProps) { - const dataSourceMenuProps = useContext(DataSourceMenuContext); - const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; const { index, history } = props; return ( @@ -24,14 +21,7 @@ export default function IndexDetail(props: IndexDetailModalProps) { {(copy) => } - { - multiDataSourceEnabled - ? history.push(`${ROUTES.INDEX_DETAIL}/${index}?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`) - : history.push(`${ROUTES.INDEX_DETAIL}/${index}`); - }} - data-test-subj={`viewIndexDetailButton-${index}`} - > + history.push(`${ROUTES.INDEX_DETAIL}/${index}`)} data-test-subj={`viewIndexDetailButton-${index}`}> {index} diff --git a/public/pages/Indices/containers/Indices/Indices.test.tsx b/public/pages/Indices/containers/Indices/Indices.test.tsx index 2e07a3fe6..4224efc51 100644 --- a/public/pages/Indices/containers/Indices/Indices.test.tsx +++ b/public/pages/Indices/containers/Indices/Indices.test.tsx @@ -5,11 +5,10 @@ import React from "react"; import "@testing-library/jest-dom/extend-expect"; -import { render, fireEvent, waitFor } from "@testing-library/react"; +import { fireEvent, render, waitFor } from "@testing-library/react"; // @ts-ignore import userEvent from "@testing-library/user-event"; -import { Redirect, Route, Switch } from "react-router-dom"; -import { HashRouter as Router } from "react-router-dom"; +import { HashRouter as Router, Redirect, Route, Switch } from "react-router-dom"; import { CoreStart } from "opensearch-dashboards/public"; import { browserServicesMock, coreServicesMock } from "../../../../../test/mocks"; import Indices from "./Indices"; @@ -18,16 +17,16 @@ import { ModalProvider, ModalRoot } from "../../../../components/Modal"; import { ServicesConsumer, ServicesContext } from "../../../../services"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { CoreServicesConsumer, CoreServicesContext } from "../../../../components/core_services"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; function renderWithRouter( Component: React.ComponentType, - data: any = { + data: DataSourceMenuProperties = { dataSourceId: "", dataSourceLabel: "", multiDataSourceEnabled: false, }, - renderFn: any = render + renderFn = render ) { return { ...renderFn( diff --git a/public/pages/Indices/containers/Indices/Indices.tsx b/public/pages/Indices/containers/Indices/Indices.tsx index a0c3ea57f..3955fc507 100644 --- a/public/pages/Indices/containers/Indices/Indices.tsx +++ b/public/pages/Indices/containers/Indices/Indices.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component, useContext } from "react"; +import React, { useContext } from "react"; import _ from "lodash"; import { RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; @@ -37,17 +37,15 @@ import { SECURITY_EXCEPTION_PREFIX } from "../../../../../server/utils/constants import IndicesActions from "../IndicesActions"; import { destroyListener, EVENT_MAP, listenEvent } from "../../../../JobHandler"; import "./index.scss"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import MDSEnabledComponent from "../../../../components/MDSEnabledComponent"; -interface IndicesProps extends RouteComponentProps { +interface IndicesProps extends RouteComponentProps, DataSourceMenuProperties { indexService: IndexService; commonService: CommonService; - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; } -interface IndicesState { +interface IndicesState extends DataSourceMenuProperties { totalIndices: number; from: number; size: number; @@ -62,30 +60,13 @@ interface IndicesState { isDataStreamColumnVisible: boolean; } -interface IndicesState { - totalIndices: number; - from: number; - size: number; - search: string; - query: Query; - sortField: keyof ManagedCatIndex; - sortDirection: Direction; - selectedItems: ManagedCatIndex[]; - indices: ManagedCatIndex[]; - loadingIndices: boolean; - showDataStreams: boolean; - isDataStreamColumnVisible: boolean; - dataSourceId: string; - dataSourceLabel: string; -} - -export class Indices extends Component { +export class Indices extends MDSEnabledComponent { static contextType = CoreServicesContext; - constructor(props: IndicesProps) { super(props); const { from, size, search, sortField, sortDirection, showDataStreams } = getURLQueryParams(this.props.location); this.state = { + ...this.state, totalIndices: 0, from, size, @@ -98,23 +79,11 @@ export class Indices extends Component { loadingIndices: true, showDataStreams, isDataStreamColumnVisible: showDataStreams, - dataSourceId: props.dataSourceId, - dataSourceLabel: props.dataSourceLabel, }; this.getIndices = _.debounce(this.getIndices, 500, { leading: true }); } - static getDerivedStateFromProps(nextProps: IndicesProps, prevState: IndicesState) { - if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { - return { - dataSourceId: nextProps.dataSourceId, - dataSourceLabel: nextProps.dataSourceLabel, - }; - } - return null; - } - async componentDidMount() { this.context.chrome.setBreadcrumbs([BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.INDICES]); listenEvent(EVENT_MAP.REINDEX_COMPLETE, this.getIndices); @@ -303,11 +272,7 @@ export class Indices extends Component { buttonProps: { fill: true, onClick: () => { - this.props.multiDataSourceEnabled - ? this.props.history.push( - `${ROUTES.CREATE_INDEX}?dataSourceId=${this.state.dataSourceId}&dataSourceLabel=${this.state.dataSourceLabel}` - ) - : this.props.history.push(`${ROUTES.CREATE_INDEX}`); + this.props.history.push(ROUTES.CREATE_INDEX); }, }, }, diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index f6c1a572d..f4b671cef 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -3,12 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component, createContext } from "react"; +import React, { Component } from "react"; import { Switch, Route, Redirect, RouteComponentProps } from "react-router-dom"; // @ts-ignore -import { EuiSideNav, EuiPage, EuiPageBody, EuiPageSideBar, Query, Direction } from "@elastic/eui"; +import { EuiSideNav, EuiPage, EuiPageBody, EuiPageSideBar } from "@elastic/eui"; import { CoreStart, HttpSetup, MountPoint } from "opensearch-dashboards/public"; -import queryString from "query-string"; import Policies from "../Policies"; import ManagedIndices from "../ManagedIndices"; import Indices from "../Indices"; @@ -19,6 +18,8 @@ import PolicyDetails from "../PolicyDetails/containers/PolicyDetails"; import Rollups from "../Rollups"; import { ModalProvider, ModalRoot } from "../../components/Modal"; import { + CommonService, + IndexService, ManagedIndexService, NotificationService, PolicyService, @@ -58,8 +59,8 @@ import Notifications from "../Notifications"; import ComposableTemplates from "../ComposableTemplates"; import CreateComposableTemplate from "../CreateComposableTemplate"; import { DataSourceMenu } from "../../../../../src/plugins/data_source_management/public"; -import { DataSourceMenuContext } from "../../services/DataSourceMenuContext"; -import { CommonService, IndexService } from "../../services"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../services/DataSourceMenuContext"; +import queryString from "query-string"; enum Navigation { IndexManagement = "Index Management", @@ -129,10 +130,7 @@ interface MainProps extends RouteComponentProps { multiDataSourceEnabled: boolean; } -interface MainState { - dataSourceId: string; - dataSourceLabel: string; -} +interface MainState extends Pick {} const dataSourceEnabledPaths: string[] = [ ROUTES.CREATE_DATA_STREAM, @@ -151,6 +149,7 @@ const dataSourceEnabledPaths: string[] = [ ROUTES.CREATE_TEMPLATE, ROUTES.COMPOSABLE_TEMPLATES, ROUTES.CREATE_COMPOSABLE_TEMPLATE, + ROUTES.REINDEX, ]; export default class Main extends Component { @@ -339,6 +338,7 @@ export default class Main extends Component { ROUTES.SPLIT_INDEX, ROUTES.ROLLOVER, ROUTES.INDEX_DETAIL, + ROUTES.REINDEX, ]} render={(props) => ( { +class Reindex extends Component { static contextType = CoreServicesContext; notificationRef: NotificationConfigRef | null = null; constructor(props: ReindexProps) { @@ -710,3 +711,9 @@ export default class Reindex extends Component { ); } } + +export default function (props: ReindexProps) { + // in re-index we don't change the data source picker + useUpdateUrlWithDataSourceProperties(); + return ; +} diff --git a/public/pages/Rollover/containers/Rollover/Rollover.tsx b/public/pages/Rollover/containers/Rollover/Rollover.tsx index 8253c2218..768c2acc5 100644 --- a/public/pages/Rollover/containers/Rollover/Rollover.tsx +++ b/public/pages/Rollover/containers/Rollover/Rollover.tsx @@ -21,9 +21,7 @@ import { getIndexDetail, getOptions, getRolloveredIndex, onSubmit, submitWriteIn import { IRolloverRequestBody } from "../../interface"; import { filterByMinimatch } from "../../../../../utils/helper"; import { SYSTEM_ALIAS } from "../../../../../utils/constants"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; -import { useHistory } from "react-router"; -import { CoreStart } from "opensearch-dashboards/public"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; export interface RolloverProps extends RouteComponentProps<{ source?: string }> {} @@ -55,17 +53,8 @@ export default function Rollover(props: RolloverProps) { }, }, }); - const dataSourceMenuProps = useContext(DataSourceMenuContext); - const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; - if (multiDataSourceEnabled) { - // mds flag can't change while the app is loaded - const history = useHistory(); - useEffect(() => { - history.replace({ - search: `?dataSourceId=${dataSourceId}&dataSourceLabel=${dataSourceLabel}`, - }); - }, [dataSourceId, dataSourceLabel]); - } + + useUpdateUrlWithDataSourceProperties(); const onChange = (val?: Record) => { const finalResult = merge({}, tempValue, val); diff --git a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx index 41656608f..494b1951e 100644 --- a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx +++ b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx @@ -28,6 +28,7 @@ import { CoreServicesContext } from "../../../../components/core_services"; import { BREADCRUMBS, ROUTES } from "../../../../utils/constants"; import { EVENT_MAP, destroyListener, listenEvent } from "../../../../JobHandler"; import { ServerResponse } from "../../../../../server/models/types"; +import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; interface SplitIndexProps extends RouteComponentProps { commonService: CommonService; @@ -269,5 +270,7 @@ export class SplitIndex extends Component { export default function SplitIndexWrapper(props: Omit) { const services = useContext(ServicesContext) as BrowserServices; const coreService = useContext(CoreServicesContext) as CoreStart; + // in split-index we don't change the data source picker + useUpdateUrlWithDataSourceProperties(); return ; } diff --git a/public/pages/Templates/containers/Templates/Templates.tsx b/public/pages/Templates/containers/Templates/Templates.tsx index e31770c4b..47d3ef8b1 100644 --- a/public/pages/Templates/containers/Templates/Templates.tsx +++ b/public/pages/Templates/containers/Templates/Templates.tsx @@ -4,7 +4,7 @@ */ import React, { Component, useContext } from "react"; -import _, { debounce, isEqual } from "lodash"; +import { debounce, isEqual } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -39,13 +39,11 @@ import { TemplateConvert } from "../../../CreateIndexTemplate/components/Templat import AssociatedComponentsModal from "../AssociatedComponentsModal"; import DeleteTemplate from "../../components/DeleteTemplate"; import IndexPatternDisplay from "./IndexPatternDisplay"; -import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; +import MDSEnabledComponent from "../../../../components/MDSEnabledComponent"; -interface TemplatesProps extends RouteComponentProps { +interface TemplatesProps extends RouteComponentProps, DataSourceMenuProperties { commonService: CommonService; - dataSourceId: string; - dataSourceLabel: string; - multiDataSourceEnabled: boolean; } type TemplatesState = { @@ -57,15 +55,14 @@ type TemplatesState = { selectedItems: ITemplate[]; templates: ITemplate[]; loading: boolean; - dataSourceId: string; - dataSourceLabel: string; -} & SearchControlsProps["value"]; +} & SearchControlsProps["value"] & + DataSourceMenuProperties; const defaultFilter = { search: DEFAULT_QUERY_PARAMS.search, }; -class Templates extends Component { +class Templates extends MDSEnabledComponent { static contextType = CoreServicesContext; constructor(props: TemplatesProps) { super(props); @@ -84,6 +81,7 @@ class Templates extends Component { }; this.state = { ...defaultFilter, + ...this.state, totalTemplates: 0, from, size, @@ -93,23 +91,11 @@ class Templates extends Component { selectedItems: [], templates: [], loading: false, - dataSourceId: props.dataSourceId, - dataSourceLabel: props.dataSourceLabel, }; this.getTemplates = debounce(this.getTemplates, 500, { leading: true }); } - static getDerivedStateFromProps(nextProps: TemplatesProps, prevState: TemplatesState) { - if (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) { - return { - dataSourceId: nextProps.dataSourceId, - dataSourceLabel: nextProps.dataSourceLabel, - }; - } - return null; - } - async componentDidUpdate(prevProps: TemplatesProps, prevState: TemplatesState) { const prevQuery = this.getQueryState(prevState); const currQuery = this.getQueryState(this.state); diff --git a/public/services/DataSourceMenuContext.ts b/public/services/DataSourceMenuContext.ts index b24d8d013..3770b1100 100644 --- a/public/services/DataSourceMenuContext.ts +++ b/public/services/DataSourceMenuContext.ts @@ -1,6 +1,6 @@ import { createContext } from "react"; -interface DataSourceMenuProperties { +export interface DataSourceMenuProperties { dataSourceId: string; dataSourceLabel: string; multiDataSourceEnabled: boolean; diff --git a/server/plugin.ts b/server/plugin.ts index 5ce598cb7..8d60434de 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -4,7 +4,7 @@ */ import { IndexManagementPluginSetup, IndexManagementPluginStart } from "."; -import { Plugin, CoreSetup, CoreStart, ILegacyCustomClusterClient, LegacyAPICaller } from "../../../src/core/server"; +import { Plugin, CoreSetup, CoreStart, ILegacyCustomClusterClient } from "../../../src/core/server"; import ismPlugin from "./clusters/ism/ismPlugin"; import { PolicyService, diff --git a/server/routes/aliases.ts b/server/routes/aliases.ts index d022b80cc..aa3eeab58 100644 --- a/server/routes/aliases.ts +++ b/server/routes/aliases.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { schema } from "@osd/config-schema"; +import { schema, Type } from "@osd/config-schema"; import { NodeServices } from "../models/interfaces"; import { NODE_API } from "../../utils/constants"; import { IRouter } from "../../../../src/core/server"; @@ -11,7 +11,7 @@ import { IRouter } from "../../../../src/core/server"; export default function (services: NodeServices, router: IRouter, dataSourceEnabled: boolean = false) { const { aliasService } = services; - let getAliasesQueryParam: any = { + let getAliasesQueryParam: { search: Type; dataSourceId?: Type } = { search: schema.maybe(schema.string()), }; if (dataSourceEnabled) { From 2c51c7a3a11e345f48ee061e5dfbfd0fed79b801 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka <49393831+RamakrishnaChilaka@users.noreply.github.com> Date: Thu, 21 Mar 2024 09:31:43 +0530 Subject: [PATCH 10/14] Update public/components/MDSEnabledComponent/MDSEnabledComponent.tsx Co-authored-by: SuZhou-Joe Signed-off-by: Ramakrishna Chilaka <49393831+RamakrishnaChilaka@users.noreply.github.com> Signed-off-by: Ramakrishna Chilaka --- .../MDSEnabledComponent/MDSEnabledComponent.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx b/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx index 305b16840..e1c58e22f 100644 --- a/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx +++ b/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx @@ -37,16 +37,15 @@ export default class MDSEnabledComponent< export function useUpdateUrlWithDataSourceProperties() { const dataSourceMenuProps = useContext(DataSourceMenuContext); const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; - if (multiDataSourceEnabled) { - // mds flag can't change while the app is loaded - const history = useHistory(); - useEffect(() => { + const history = useHistory(); + useEffect(() => { + if (multiDataSourceEnabled) { history.replace({ search: queryString.stringify({ dataSourceId, dataSourceLabel, }), }); - }, [dataSourceId, dataSourceLabel]); - } + } + }, [dataSourceId, dataSourceLabel, multiDataSourceEnabled]); } From e99e0ce253baecab6a4629ee5b0fa250df60a12c Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Fri, 22 Mar 2024 16:33:51 +0530 Subject: [PATCH 11/14] refactoring code for server & appending URL with datasourceId/datasourcelabel Signed-off-by: Ramakrishna Chilaka --- opensearch_dashboards.json | 4 +- .../MDSEnabledComponent.tsx | 5 +- public/index_management_app.tsx | 5 +- public/pages/Main/Main.tsx | 4 +- .../Reindex/container/Reindex/Reindex.tsx | 2 +- .../container/SplitIndex/SplitIndex.tsx | 2 +- public/plugin.ts | 8 +-- public/services/CommonService.ts | 18 +++---- public/services/IndexService.ts | 53 ++++++++----------- public/services/MDSEnabledClientService.ts | 17 ++++++ server/plugin.ts | 6 ++- server/routes/common.ts | 12 ++++- server/routes/dataStreams.ts | 4 +- server/routes/indices.ts | 20 ++++--- server/services/AliasServices.ts | 9 ++-- server/services/CommonService.ts | 8 ++- server/services/DataStreamService.ts | 9 ++-- server/services/IndexService.ts | 8 ++- ...MService.ts => MDSEnabledClientService.ts} | 7 +-- 19 files changed, 110 insertions(+), 91 deletions(-) create mode 100644 public/services/MDSEnabledClientService.ts rename server/services/{OpenSearchISMService.ts => MDSEnabledClientService.ts} (84%) diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index b608b93f2..f2e5d849d 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -3,8 +3,8 @@ "version": "3.0.0.0", "opensearchDashboardsVersion": "3.0.0", "configPath": ["opensearch_index_management"], - "requiredPlugins": ["navigation", "opensearchDashboardsReact", "dataSourceManagement"], - "optionalPlugins": ["managementOverview", "dataSource"], + "requiredPlugins": ["navigation", "opensearchDashboardsReact"], + "optionalPlugins": ["managementOverview", "dataSource", "dataSourceManagement"], "server": true, "ui": true } diff --git a/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx b/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx index e1c58e22f..340fe1120 100644 --- a/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx +++ b/public/components/MDSEnabledComponent/MDSEnabledComponent.tsx @@ -23,7 +23,7 @@ export default class MDSEnabledComponent< // static members cannot reference class type parameters if ( nextProps.multiDataSourceEnabled && - (nextProps.dataSourceId != prevState.dataSourceId || nextProps.dataSourceLabel != prevState.dataSourceLabel) + (nextProps.dataSourceId !== prevState.dataSourceId || nextProps.dataSourceLabel !== prevState.dataSourceLabel) ) { return { dataSourceId: nextProps.dataSourceId, @@ -38,10 +38,13 @@ export function useUpdateUrlWithDataSourceProperties() { const dataSourceMenuProps = useContext(DataSourceMenuContext); const { dataSourceId, dataSourceLabel, multiDataSourceEnabled } = dataSourceMenuProps; const history = useHistory(); + const currentSearch = history.location.search; + const currentQuery = queryString.parse(currentSearch); useEffect(() => { if (multiDataSourceEnabled) { history.replace({ search: queryString.stringify({ + ...currentQuery, dataSourceId, dataSourceLabel, }), diff --git a/public/index_management_app.tsx b/public/index_management_app.tsx index 17429d6c9..8f58e4e92 100644 --- a/public/index_management_app.tsx +++ b/public/index_management_app.tsx @@ -12,12 +12,14 @@ import Main from "./pages/Main"; import { CoreServicesContext } from "./components/core_services"; import "./app.scss"; import { AppPluginStartDependencies } from "./types"; +import { DataSourceManagementPluginSetup } from "../../../src/plugins/data_source_management/public"; export function renderApp( coreStart: CoreStart, pluginStartDependencies: AppPluginStartDependencies, params: AppMountParameters, - landingPage: string + landingPage: string, + dataSourceManagement: DataSourceManagementPluginSetup ) { const isDarkMode = coreStart.uiSettings.get("theme:darkMode") || false; @@ -32,6 +34,7 @@ export function renderApp( landingPage={landingPage} setActionMenu={params.setHeaderActionMenu} multiDataSourceEnabled={!!pluginStartDependencies.dataSource} + dataSourceManagement={dataSourceManagement} /> diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index f4b671cef..9f89c5c68 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -58,9 +58,9 @@ import ForceMerge from "../ForceMerge"; import Notifications from "../Notifications"; import ComposableTemplates from "../ComposableTemplates"; import CreateComposableTemplate from "../CreateComposableTemplate"; -import { DataSourceMenu } from "../../../../../src/plugins/data_source_management/public"; import { DataSourceMenuContext, DataSourceMenuProperties } from "../../services/DataSourceMenuContext"; import queryString from "query-string"; +import { DataSourceManagementPluginSetup } from "../../../../../src/plugins/data_source_management/public"; enum Navigation { IndexManagement = "Index Management", @@ -128,6 +128,7 @@ interface MainProps extends RouteComponentProps { landingPage: string; setActionMenu: (menuMount: MountPoint | undefined) => void; multiDataSourceEnabled: boolean; + dataSourceManagement: DataSourceManagementPluginSetup; } interface MainState extends Pick {} @@ -310,6 +311,7 @@ export default class Main extends Component { const { landingPage } = this.props; const ROUTE_STYLE = { padding: "25px 25px" }; + const DataSourceMenu = this.props.dataSourceManagement.ui.DataSourceMenu; return ( diff --git a/public/pages/Reindex/container/Reindex/Reindex.tsx b/public/pages/Reindex/container/Reindex/Reindex.tsx index c5944d671..427611b15 100644 --- a/public/pages/Reindex/container/Reindex/Reindex.tsx +++ b/public/pages/Reindex/container/Reindex/Reindex.tsx @@ -713,7 +713,7 @@ class Reindex extends Component { } export default function (props: ReindexProps) { - // in re-index we don't change the data source picker + // in re-index page, user can't change the data source i.e., its in read-only useUpdateUrlWithDataSourceProperties(); return ; } diff --git a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx index 494b1951e..960659f83 100644 --- a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx +++ b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx @@ -270,7 +270,7 @@ export class SplitIndex extends Component { export default function SplitIndexWrapper(props: Omit) { const services = useContext(ServicesContext) as BrowserServices; const coreService = useContext(CoreServicesContext) as CoreStart; - // in split-index we don't change the data source picker + // in split-index page, user can't change the data source i.e., its in read-only useUpdateUrlWithDataSourceProperties(); return ; } diff --git a/public/plugin.ts b/public/plugin.ts index 24746efa7..0c9f92331 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -17,9 +17,11 @@ import { actionRepoSingleton } from "./pages/VisualCreatePolicy/utils/helpers"; import { ROUTES } from "./utils/constants"; import { JobHandlerRegister } from "./JobHandler"; import { ManagementOverViewPluginSetup } from "../../../src/plugins/management_overview/public"; +import { DataSourceManagementPluginSetup } from "../../../src/plugins/data_source_management/public"; interface IndexManagementSetupDeps { managementOverview?: ManagementOverViewPluginSetup; + dataSourceManagement?: DataSourceManagementPluginSetup; } export class IndexManagementPlugin implements Plugin { @@ -27,7 +29,7 @@ export class IndexManagementPlugin implements Plugin { const { renderApp } = await import("./index_management_app"); const [coreStart, depsStart] = await core.getStartServices(); - return renderApp(coreStart, depsStart, params, ROUTES.INDEX_POLICIES); + return renderApp(coreStart, depsStart, params, ROUTES.INDEX_POLICIES, dataSourceManagement); }, }); @@ -70,7 +72,7 @@ export class IndexManagementPlugin implements Plugin { const { renderApp } = await import("./index_management_app"); const [coreStart, depsStart] = await core.getStartServices(); - return renderApp(coreStart, depsStart, params, ROUTES.SNAPSHOT_POLICIES); + return renderApp(coreStart, depsStart, params, ROUTES.SNAPSHOT_POLICIES, dataSourceManagement); }, }); diff --git a/public/services/CommonService.ts b/public/services/CommonService.ts index 75dac4493..333df4ab0 100644 --- a/public/services/CommonService.ts +++ b/public/services/CommonService.ts @@ -3,30 +3,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { HttpFetchOptions, HttpSetup } from "opensearch-dashboards/public"; +import { HttpFetchOptions, HttpFetchQuery } from "opensearch-dashboards/public"; import { ServerResponse } from "../../server/models/types"; import { NODE_API } from "../../utils/constants"; import { IAPICaller } from "../../models/interfaces"; +import { MDSEnabledClientService } from "./MDSEnabledClientService"; -export default class CommonService { - httpClient: HttpSetup; - dataSourceId: string; - - constructor(httpClient: HttpSetup, dataSourceId: string = "") { - this.httpClient = httpClient; - this.dataSourceId = dataSourceId; - } - - apiCaller = async (params: IAPICaller): Promise> => { +export default class CommonService extends MDSEnabledClientService { + apiCaller = async (params: IAPICaller, queryObject?: HttpFetchQuery): Promise> => { let url = `${NODE_API.API_CALLER}`; const payload: HttpFetchOptions = {}; + queryObject = this.patchQueryObjectWithDataSourceId(queryObject || {}); payload.method = "POST"; - params.data.dataSourceId = this.dataSourceId; payload.body = JSON.stringify({ data: params.data, endpoint: params.endpoint, hideLog: params.hideLog, }); + payload.query = queryObject; return (await this.httpClient.fetch(url, payload)) as ServerResponse; }; } diff --git a/public/services/IndexService.ts b/public/services/IndexService.ts index 949889f80..e5565f6a4 100644 --- a/public/services/IndexService.ts +++ b/public/services/IndexService.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { HttpFetchQuery, HttpSetup } from "opensearch-dashboards/public"; +import { HttpFetchQuery } from "opensearch-dashboards/public"; import { AcknowledgedResponse, ApplyPolicyResponse, @@ -18,37 +18,24 @@ import { ServerResponse } from "../../server/models/types"; import { NODE_API } from "../../utils/constants"; import { IndexItem } from "../../models/interfaces"; import { SECURITY_EXCEPTION_PREFIX } from "../../server/utils/constants"; +import { MDSEnabledClientService } from "./MDSEnabledClientService"; -export default class IndexService { - httpClient: HttpSetup; - dataSourceId: string; - - constructor(httpClient: HttpSetup, dataSourceId: string = "") { - this.httpClient = httpClient; - this.dataSourceId = dataSourceId; - } - - patchQueryObjectWithObjectId(queryObject: HttpFetchQuery) { - queryObject.dataSourceId = this.dataSourceId; - return queryObject; - } - +export default class IndexService extends MDSEnabledClientService { getIndices = async (queryObject: HttpFetchQuery): Promise> => { let url = `..${NODE_API._INDICES}`; - this.patchQueryObjectWithObjectId(queryObject); - const response = (await this.httpClient.get(url, { query: queryObject })) as ServerResponse; - return response; + queryObject = this.patchQueryObjectWithDataSourceId(queryObject); + return (await this.httpClient.get(url, { query: queryObject })) as ServerResponse; }; getDataStreams = async (queryObject: HttpFetchQuery): Promise> => { const url = `..${NODE_API._DATA_STREAMS}`; - this.patchQueryObjectWithObjectId(queryObject); + queryObject = this.patchQueryObjectWithDataSourceId(queryObject); return await this.httpClient.get(url, { query: queryObject }); }; getAliases = async (queryObject: HttpFetchQuery): Promise> => { const url = `..${NODE_API._ALIASES}`; - this.patchQueryObjectWithObjectId(queryObject); + queryObject = this.patchQueryObjectWithDataSourceId(queryObject); return await this.httpClient.get(url, { query: queryObject }); }; @@ -99,28 +86,30 @@ export default class IndexService { }; }; - applyPolicy = async (indices: string[], policyId: string): Promise> => { + applyPolicy = async (indices: string[], policyId: string, queryObject: HttpFetchQuery): Promise> => { const body = { indices, policyId }; - this.patchQueryObjectWithObjectId(body); + queryObject = this.patchQueryObjectWithDataSourceId(body); const url = `..${NODE_API.APPLY_POLICY}`; - const response = (await this.httpClient.post(url, { body: JSON.stringify(body) })) as ServerResponse; - return response; + return (await this.httpClient.post(url, { + body: JSON.stringify(body), + query: queryObject, + })) as ServerResponse; }; - editRolloverAlias = async (index: string, alias: string): Promise> => { + editRolloverAlias = async (index: string, alias: string, queryObject: HttpFetchQuery): Promise> => { const body = { index, alias }; - this.patchQueryObjectWithObjectId(body); + queryObject = this.patchQueryObjectWithDataSourceId(body); const url = `..${NODE_API.EDIT_ROLLOVER_ALIAS}`; - const response = (await this.httpClient.post(url, { body: JSON.stringify(body) })) as ServerResponse; - return response; + return (await this.httpClient.post(url, { + body: JSON.stringify(body), + query: queryObject, + })) as ServerResponse; }; searchPolicies = async (searchValue: string, source: boolean = false): Promise> => { const str = searchValue.trim(); - const queryObject = { from: 0, size: 10, search: str, sortDirection: "desc", sortField: "id" }; - this.patchQueryObjectWithObjectId(queryObject); + const queryObject = this.patchQueryObjectWithDataSourceId({ from: 0, size: 10, search: str, sortDirection: "desc", sortField: "id" }); const url = `..${NODE_API.POLICIES}`; - const response = (await this.httpClient.get(url, { query: queryObject })) as ServerResponse; - return response; + return (await this.httpClient.get(url, { query: queryObject })) as ServerResponse; }; } diff --git a/public/services/MDSEnabledClientService.ts b/public/services/MDSEnabledClientService.ts new file mode 100644 index 000000000..2b7c012d9 --- /dev/null +++ b/public/services/MDSEnabledClientService.ts @@ -0,0 +1,17 @@ +import { HttpFetchQuery, HttpSetup } from "opensearch-dashboards/public"; + +export abstract class MDSEnabledClientService { + httpClient: HttpSetup; + dataSourceId: string; + + constructor(httpClient: HttpSetup, dataSourceId: string = "") { + this.httpClient = httpClient; + this.dataSourceId = dataSourceId; + } + + patchQueryObjectWithDataSourceId(queryObject: HttpFetchQuery) { + queryObject = queryObject || {}; + queryObject.dataSourceId = this.dataSourceId; + return queryObject; + } +} diff --git a/server/plugin.ts b/server/plugin.ts index 8d60434de..f925e3be3 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -70,7 +70,9 @@ export class IndexPatternManagementPlugin implements Plugin; dataSourceId?: Type } = { search: schema.maybe(schema.string()), }; if (dataSourceEnabled) { diff --git a/server/routes/indices.ts b/server/routes/indices.ts index 94fdf7a38..b5cdc0eb4 100644 --- a/server/routes/indices.ts +++ b/server/routes/indices.ts @@ -7,6 +7,7 @@ import { schema } from "@osd/config-schema"; import { NodeServices } from "../models/interfaces"; import { NODE_API } from "../../utils/constants"; import { IRouter } from "../../../../src/core/server"; +import { ObjectType, AnyType } from "@osd/config-schema/target/out"; export default function (services: NodeServices, router: IRouter, dataSourceEnabled: boolean = false) { const { indexService } = services; @@ -40,12 +41,21 @@ export default function (services: NodeServices, router: IRouter, dataSourceEnab indexService.getIndices ); + let genericBodyAndDataSourceIdQuery: { body: AnyType; query?: ObjectType } = { + body: schema.any(), + }; + if (dataSourceEnabled) { + genericBodyAndDataSourceIdQuery = { + ...genericBodyAndDataSourceIdQuery, + query: schema.object({ + dataSourceId: schema.string(), + }), + }; + } router.post( { path: NODE_API.APPLY_POLICY, - validate: { - body: schema.any(), - }, + validate: genericBodyAndDataSourceIdQuery, }, indexService.applyPolicy ); @@ -53,9 +63,7 @@ export default function (services: NodeServices, router: IRouter, dataSourceEnab router.post( { path: NODE_API.EDIT_ROLLOVER_ALIAS, - validate: { - body: schema.any(), - }, + validate: genericBodyAndDataSourceIdQuery, }, indexService.editRolloverAlias ); diff --git a/server/services/AliasServices.ts b/server/services/AliasServices.ts index 7dadcac1e..39592b5af 100644 --- a/server/services/AliasServices.ts +++ b/server/services/AliasServices.ts @@ -12,9 +12,9 @@ import { import { ServerResponse } from "../models/types"; import { Alias, GetAliasesResponse } from "../models/interfaces"; import { SECURITY_EXCEPTION_PREFIX } from "../utils/constants"; -import { OpenSearchISMService } from "./OpenSearchISMService"; +import { MDSEnabledClientService } from "./MDSEnabledClientService"; -export default class AliasServices extends OpenSearchISMService { +export default class AliasServices extends MDSEnabledClientService { getAliases = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, @@ -25,10 +25,7 @@ export default class AliasServices extends OpenSearchISMService { search?: string; }; - const useQuery = !request.body; - const usedParam = useQuery ? request.query : request.body; - const { dataSourceId = "" } = usedParam || {}; - const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); + const callWithRequest = this.getClientBasedOnDataSource(context, request); const [aliases, apiAccessible, errMsg] = await getAliases(callWithRequest, search); if (!apiAccessible) diff --git a/server/services/CommonService.ts b/server/services/CommonService.ts index 5f89aceea..6d0c2674c 100644 --- a/server/services/CommonService.ts +++ b/server/services/CommonService.ts @@ -12,11 +12,11 @@ import { RequestHandlerContext, } from "../../../../src/core/server"; import { IAPICaller } from "../../models/interfaces"; -import { OpenSearchISMService } from "./OpenSearchISMService"; +import { MDSEnabledClientService } from "./MDSEnabledClientService"; const VALID_METHODS = ["HEAD", "GET", "POST", "PUT", "DELETE"]; -export default class CommonService extends OpenSearchISMService { +export default class CommonService extends MDSEnabledClientService { apiCaller = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, @@ -28,9 +28,7 @@ export default class CommonService extends OpenSearchISMService { try { const finalData = data; - const { dataSourceId = "" } = data; - const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); - delete finalData.dataSourceId; + const callWithRequest = this.getClientBasedOnDataSource(context, request); /** * The endpoint must not be an empty string, reference from proxy caller diff --git a/server/services/DataStreamService.ts b/server/services/DataStreamService.ts index 18ca4eed1..26f6296ef 100644 --- a/server/services/DataStreamService.ts +++ b/server/services/DataStreamService.ts @@ -13,9 +13,9 @@ import { import { ServerResponse } from "../models/types"; import { DataStream, GetDataStreamsResponse, IndexToDataStream } from "../models/interfaces"; import { SECURITY_EXCEPTION_PREFIX } from "../utils/constants"; -import { OpenSearchISMService } from "./OpenSearchISMService"; +import { MDSEnabledClientService } from "./MDSEnabledClientService"; -export default class DataStreamService extends OpenSearchISMService { +export default class DataStreamService extends MDSEnabledClientService { getDataStreams = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, @@ -26,10 +26,7 @@ export default class DataStreamService extends OpenSearchISMService { search?: string; }; - const useQuery = !request.body; - const usedParam = useQuery ? request.query : request.body; - const { dataSourceId = "" } = usedParam || {}; - const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); + const callWithRequest = this.getClientBasedOnDataSource(context, request); const [dataStreams, apiAccessible, errMsg] = await getDataStreams(callWithRequest, search); if (!apiAccessible) diff --git a/server/services/IndexService.ts b/server/services/IndexService.ts index 1d540e250..767a3374f 100644 --- a/server/services/IndexService.ts +++ b/server/services/IndexService.ts @@ -25,9 +25,9 @@ import { import { getSearchString } from "../utils/helpers"; import { getIndexToDataStreamMapping } from "./DataStreamService"; import { IRecoveryItem, IReindexItem, ITaskItem } from "../../models/interfaces"; -import { OpenSearchISMService } from "./OpenSearchISMService"; +import { MDSEnabledClientService } from "./MDSEnabledClientService"; -export default class IndexService extends OpenSearchISMService { +export default class IndexService extends MDSEnabledClientService { getIndices = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, @@ -46,7 +46,6 @@ export default class IndexService extends OpenSearchISMService { showDataStreams, expandWildcards, exactSearch, - dataSourceId = "", } = request.query as { from: string; size: string; @@ -59,7 +58,6 @@ export default class IndexService extends OpenSearchISMService { showDataStreams: boolean; expandWildcards?: string; exactSearch?: string; - dataSourceId?: string; }; const params: { index: string; @@ -83,7 +81,7 @@ export default class IndexService extends OpenSearchISMService { params.index = exactSearch; } - const callWithRequest = this.getClientBasedOnDataSource(context, request, dataSourceId); + const callWithRequest = this.getClientBasedOnDataSource(context, request); const [recoverys, tasks, indicesResponse, indexToDataStreamMapping]: [ IRecoveryItem[], diff --git a/server/services/OpenSearchISMService.ts b/server/services/MDSEnabledClientService.ts similarity index 84% rename from server/services/OpenSearchISMService.ts rename to server/services/MDSEnabledClientService.ts index 313d00d55..8ddfe5fe0 100644 --- a/server/services/OpenSearchISMService.ts +++ b/server/services/MDSEnabledClientService.ts @@ -5,7 +5,7 @@ import { RequestHandlerContext, } from "opensearch-dashboards/server"; -export abstract class OpenSearchISMService { +export abstract class MDSEnabledClientService { osDriver: ILegacyCustomClusterClient; dataSourceEnabled: boolean; @@ -13,11 +13,12 @@ export abstract class OpenSearchISMService { this.osDriver = osDriver; this.dataSourceEnabled = dataSourceEnabled; } + getClientBasedOnDataSource( context: RequestHandlerContext, - request: OpenSearchDashboardsRequest, - dataSourceId: string + request: OpenSearchDashboardsRequest ): (endpoint: string, clientParams: Record, options?: LegacyCallAPIOptions | undefined) => Promise { + const { dataSourceId = "" } = request.query as { dataSourceId?: string }; if (this.dataSourceEnabled && dataSourceId && dataSourceId.trim().length != 0) { // non-zero data source id return context.dataSource.opensearch.legacy.getClient(dataSourceId).callAPI; From ef6c242beada562a222d42f9faf178b9c76e3c85 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Mon, 25 Mar 2024 10:52:12 +0530 Subject: [PATCH 12/14] refactoring types & fixing tests Signed-off-by: Ramakrishna Chilaka --- .../Aliases/containers/Aliases/Aliases.tsx | 3 ++- .../ComposableTemplates.tsx | 4 ++-- .../CreateComposableTemplate.tsx | 2 +- .../CreateDataStream/CreateDataStream.tsx | 2 +- .../containers/CreateIndex/CreateIndex.tsx | 8 ++++---- .../CreateIndex/containers/IndexForm/index.tsx | 4 +++- .../CreateIndexTemplate.tsx | 9 +++++++-- .../containers/DataStreams/DataStreams.tsx | 4 ++-- .../Indices/containers/Indices/Indices.tsx | 18 ++++++++++++------ public/pages/Indices/models/interfaces.ts | 2 +- public/pages/Main/Main.tsx | 10 +++++----- .../containers/Templates/Templates.tsx | 6 +++--- public/services/CommonService.test.ts | 1 + public/services/CommonService.ts | 2 +- public/services/IndexService.ts | 4 ++-- public/services/MDSEnabledClientService.ts | 12 ++++++++---- server/services/MDSEnabledClientService.ts | 2 +- 17 files changed, 56 insertions(+), 37 deletions(-) diff --git a/public/pages/Aliases/containers/Aliases/Aliases.tsx b/public/pages/Aliases/containers/Aliases/Aliases.tsx index b63f51a62..7e447fa49 100644 --- a/public/pages/Aliases/containers/Aliases/Aliases.tsx +++ b/public/pages/Aliases/containers/Aliases/Aliases.tsx @@ -115,6 +115,7 @@ const defaultFilter = { class Aliases extends MDSEnabledComponent { static contextType = CoreServicesContext; + constructor(props: AliasesProps) { super(props); const { @@ -482,7 +483,7 @@ class Aliases extends MDSEnabledComponent { } } -export default function AliasContainer(props: Omit) { +export default function AliasContainer(props: Omit) { const context = useContext(ServicesContext); const dataSourceMenuProps = useContext(DataSourceMenuContext); return ; diff --git a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx index 066f63ac5..368f85d87 100644 --- a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx +++ b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx @@ -4,7 +4,7 @@ */ import React, { useContext } from "react"; -import { debounce, isEqual, get } from "lodash"; +import _, { debounce, isEqual, get } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -461,7 +461,7 @@ class ComposableTemplates extends MDSEnabledComponent + props: Omit ) { const context = useContext(ServicesContext); const dataSourceMenuProps = useContext(DataSourceMenuContext); diff --git a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx index 2d31b6c0d..462dfec12 100644 --- a/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx +++ b/public/pages/CreateComposableTemplate/containers/CreateComposableTemplate/CreateComposableTemplate.tsx @@ -75,7 +75,7 @@ class CreateComposableTemplate extends Component } } -export default function (props: CreateComposableTemplateProps) { +export default function (props: Omit) { const dataSourceMenuProps = useContext(DataSourceMenuContext); useUpdateUrlWithDataSourceProperties(); return ; diff --git a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx index fda04b2ce..9a075d855 100644 --- a/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx +++ b/public/pages/CreateDataStream/containers/CreateDataStream/CreateDataStream.tsx @@ -64,7 +64,7 @@ class CreateDataStream extends Component { } } -export default function (props: CreateDataStreamProps) { +export default function (props: Omit) { const dataSourceMenuProps = useContext(DataSourceMenuContext); useUpdateUrlWithDataSourceProperties(); return ; diff --git a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx index f39eca7a3..4f64e7f39 100644 --- a/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx +++ b/public/pages/CreateIndex/containers/CreateIndex/CreateIndex.tsx @@ -9,15 +9,15 @@ import { RouteComponentProps } from "react-router-dom"; import IndexForm from "../IndexForm"; import { BREADCRUMBS, IndicesUpdateMode, ROUTES } from "../../../../utils/constants"; import { CoreServicesContext } from "../../../../components/core_services"; -import { CommonService } from "../../../../services/index"; import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; -interface CreateIndexProps extends RouteComponentProps<{ index?: string; mode?: IndicesUpdateMode }>, DataSourceMenuProperties { +interface CreateIndexPropsBase extends RouteComponentProps<{ index?: string; mode?: IndicesUpdateMode }> { isEdit?: boolean; - commonService: CommonService; } +interface CreateIndexProps extends CreateIndexPropsBase, DataSourceMenuProperties {} + export class CreateIndex extends Component { static contextType = CoreServicesContext; @@ -63,7 +63,7 @@ export class CreateIndex extends Component { } } -export default function (props: CreateIndexProps) { +export default function (props: CreateIndexPropsBase) { const dataSourceMenuProperties = useContext(DataSourceMenuContext); useUpdateUrlWithDataSourceProperties(); return ; diff --git a/public/pages/CreateIndex/containers/IndexForm/index.tsx b/public/pages/CreateIndex/containers/IndexForm/index.tsx index 46300c96b..e4bdd0ede 100644 --- a/public/pages/CreateIndex/containers/IndexForm/index.tsx +++ b/public/pages/CreateIndex/containers/IndexForm/index.tsx @@ -46,7 +46,9 @@ export const getAliasActionsByDiffArray = ( }, [] as IAliasAction[]); }; -export interface IndexFormProps extends Pick, DataSourceMenuProperties { +export interface IndexFormProps + extends Pick, + Pick { index?: string; value?: Partial; mode?: IndicesUpdateMode; diff --git a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx index 44c693074..6ad7638a5 100644 --- a/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx +++ b/public/pages/CreateIndexTemplate/containers/CreateIndexTemplate/CreateIndexTemplate.tsx @@ -12,7 +12,12 @@ import { CoreServicesContext } from "../../../../components/core_services"; import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; -interface CreateIndexTemplateProps extends RouteComponentProps<{ template?: string; mode?: string }>, DataSourceMenuProperties {} +interface CreateIndexTemplateProps + extends RouteComponentProps<{ + template?: string; + mode?: string; + }>, + DataSourceMenuProperties {} class CreateIndexTemplate extends Component { static contextType = CoreServicesContext; @@ -74,7 +79,7 @@ class CreateIndexTemplate extends Component { } } -export default function (props: CreateIndexTemplateProps) { +export default function (props: Omit) { const dataSourceMenuProps = useContext(DataSourceMenuContext); useUpdateUrlWithDataSourceProperties(); return ; diff --git a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx index eb33cc573..3fbb7cbfe 100644 --- a/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx +++ b/public/pages/DataStreams/containers/DataStreams/DataStreams.tsx @@ -4,7 +4,7 @@ */ import React, { Component, useContext } from "react"; -import { debounce, isEqual } from "lodash"; +import _, { debounce, isEqual } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -428,7 +428,7 @@ class DataStreams extends MDSEnabledComponent) { +export default function DataStreamsContainer(props: Omit) { const context = useContext(ServicesContext); const dataSourceMenuProperties = useContext(DataSourceMenuContext); return ; diff --git a/public/pages/Indices/containers/Indices/Indices.tsx b/public/pages/Indices/containers/Indices/Indices.tsx index 3955fc507..21c04f967 100644 --- a/public/pages/Indices/containers/Indices/Indices.tsx +++ b/public/pages/Indices/containers/Indices/Indices.tsx @@ -62,6 +62,7 @@ interface IndicesState extends DataSourceMenuProperties { export class Indices extends MDSEnabledComponent { static contextType = CoreServicesContext; + constructor(props: IndicesProps) { super(props); const { from, size, search, sortField, sortDirection, showDataStreams } = getURLQueryParams(this.props.location); @@ -101,14 +102,14 @@ export class Indices extends MDSEnabledComponent { } async componentDidUpdate(prevProps: IndicesProps, prevState: IndicesState) { - const prevQuery = Indices.getQueryObjectFromState(prevState); - const currQuery = Indices.getQueryObjectFromState(this.state); + const prevQuery = this.getQueryObjectFromState(prevState); + const currQuery = this.getQueryObjectFromState(this.state); if (!_.isEqual(prevQuery, currQuery)) { await this.getIndices(); } } - static getQueryObjectFromState({ + getQueryObjectFromState({ from, size, search, @@ -117,14 +118,19 @@ export class Indices extends MDSEnabledComponent { showDataStreams, dataSourceId, }: IndicesState): IndicesQueryParams { - return { from, size, search, sortField, sortDirection, showDataStreams, dataSourceId }; + const queryObj = { from, size, search, sortField, sortDirection, showDataStreams }; + if (!this.props.multiDataSourceEnabled) { + // don't send dataSourceId, if MDS is not enabled + return queryObj; + } + return { ...queryObj, dataSourceId }; } getIndices = async (): Promise => { this.setState({ loadingIndices: true }); try { const { indexService, history } = this.props; - const queryObject = Indices.getQueryObjectFromState(this.state); + const queryObject = this.getQueryObjectFromState(this.state); const queryParamsString = queryString.stringify({ ...queryObject, dataSourceLabel: this.state.dataSourceLabel }); history.replace({ ...this.props.location, search: queryParamsString }); @@ -313,7 +319,7 @@ export class Indices extends MDSEnabledComponent { } } -export default function (props: IndicesProps) { +export default function (props: Omit) { const dataSourceMenuProps = useContext(DataSourceMenuContext); return ; } diff --git a/public/pages/Indices/models/interfaces.ts b/public/pages/Indices/models/interfaces.ts index 7bd32d299..59cafc716 100644 --- a/public/pages/Indices/models/interfaces.ts +++ b/public/pages/Indices/models/interfaces.ts @@ -19,5 +19,5 @@ export interface IndicesQueryParams { sortField: keyof ManagedCatIndex; sortDirection: Direction; showDataStreams: boolean; - dataSourceId: string; + dataSourceId?: string; } diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index 9f89c5c68..319567772 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -201,8 +201,8 @@ export default class Main extends Component { }; if (this.props.multiDataSourceEnabled && this.isDataSourceEnabledForPath(pathname)) { - services.indexService = new IndexService(http, this.state.dataSourceId); - services.commonService = new CommonService(http, this.state.dataSourceId); + services.indexService = new IndexService(http, this.state.dataSourceId, this.props.multiDataSourceEnabled); + services.commonService = new CommonService(http, this.state.dataSourceId, this.props.multiDataSourceEnabled); } return services; } @@ -311,7 +311,7 @@ export default class Main extends Component { const { landingPage } = this.props; const ROUTE_STYLE = { padding: "25px 25px" }; - const DataSourceMenu = this.props.dataSourceManagement.ui.DataSourceMenu; + const DataSourceMenu = this.props.dataSourceManagement?.ui?.DataSourceMenu; return ( @@ -626,7 +626,7 @@ export default class Main extends Component { path={`${ROUTES.CREATE_INDEX}/:index/:mode`} render={(props: RouteComponentProps) => (
- +
)} /> @@ -642,7 +642,7 @@ export default class Main extends Component { path={ROUTES.CREATE_INDEX} render={(props: RouteComponentProps) => (
- +
)} /> diff --git a/public/pages/Templates/containers/Templates/Templates.tsx b/public/pages/Templates/containers/Templates/Templates.tsx index 47d3ef8b1..737e8c9ab 100644 --- a/public/pages/Templates/containers/Templates/Templates.tsx +++ b/public/pages/Templates/containers/Templates/Templates.tsx @@ -3,8 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { Component, useContext } from "react"; -import { debounce, isEqual } from "lodash"; +import React, { useContext } from "react"; +import _, { debounce, isEqual } from "lodash"; import { Link, RouteComponentProps } from "react-router-dom"; import queryString from "query-string"; import { @@ -417,7 +417,7 @@ class Templates extends MDSEnabledComponent { } } -export default function TemplatesContainer(props: Omit) { +export default function TemplatesContainer(props: Omit) { const context = useContext(ServicesContext); const dataSourceMenuProps = useContext(DataSourceMenuContext); return ; diff --git a/public/services/CommonService.test.ts b/public/services/CommonService.test.ts index f332de572..320d6e51a 100644 --- a/public/services/CommonService.test.ts +++ b/public/services/CommonService.test.ts @@ -19,6 +19,7 @@ describe("CommonService spec", () => { expect(httpClientMock.fetch).toHaveBeenCalledWith(`${NODE_API.API_CALLER}`, { method: "POST", body: JSON.stringify(queryObject), + queryObject: undefined, }); }); }); diff --git a/public/services/CommonService.ts b/public/services/CommonService.ts index 333df4ab0..a0247d355 100644 --- a/public/services/CommonService.ts +++ b/public/services/CommonService.ts @@ -13,7 +13,7 @@ export default class CommonService extends MDSEnabledClientService { apiCaller = async (params: IAPICaller, queryObject?: HttpFetchQuery): Promise> => { let url = `${NODE_API.API_CALLER}`; const payload: HttpFetchOptions = {}; - queryObject = this.patchQueryObjectWithDataSourceId(queryObject || {}); + queryObject = this.patchQueryObjectWithDataSourceId(queryObject); payload.method = "POST"; payload.body = JSON.stringify({ data: params.data, diff --git a/public/services/IndexService.ts b/public/services/IndexService.ts index e5565f6a4..49e8baae9 100644 --- a/public/services/IndexService.ts +++ b/public/services/IndexService.ts @@ -88,7 +88,7 @@ export default class IndexService extends MDSEnabledClientService { applyPolicy = async (indices: string[], policyId: string, queryObject: HttpFetchQuery): Promise> => { const body = { indices, policyId }; - queryObject = this.patchQueryObjectWithDataSourceId(body); + queryObject = this.patchQueryObjectWithDataSourceId(queryObject); const url = `..${NODE_API.APPLY_POLICY}`; return (await this.httpClient.post(url, { body: JSON.stringify(body), @@ -98,7 +98,7 @@ export default class IndexService extends MDSEnabledClientService { editRolloverAlias = async (index: string, alias: string, queryObject: HttpFetchQuery): Promise> => { const body = { index, alias }; - queryObject = this.patchQueryObjectWithDataSourceId(body); + queryObject = this.patchQueryObjectWithDataSourceId(queryObject); const url = `..${NODE_API.EDIT_ROLLOVER_ALIAS}`; return (await this.httpClient.post(url, { body: JSON.stringify(body), diff --git a/public/services/MDSEnabledClientService.ts b/public/services/MDSEnabledClientService.ts index 2b7c012d9..14a4f60f0 100644 --- a/public/services/MDSEnabledClientService.ts +++ b/public/services/MDSEnabledClientService.ts @@ -3,15 +3,19 @@ import { HttpFetchQuery, HttpSetup } from "opensearch-dashboards/public"; export abstract class MDSEnabledClientService { httpClient: HttpSetup; dataSourceId: string; + mdsEnabled: boolean; - constructor(httpClient: HttpSetup, dataSourceId: string = "") { + constructor(httpClient: HttpSetup, dataSourceId: string = "", mdsEnabled: boolean = false) { this.httpClient = httpClient; this.dataSourceId = dataSourceId; + this.mdsEnabled = mdsEnabled; } - patchQueryObjectWithDataSourceId(queryObject: HttpFetchQuery) { - queryObject = queryObject || {}; - queryObject.dataSourceId = this.dataSourceId; + patchQueryObjectWithDataSourceId(queryObject?: HttpFetchQuery) { + if (this.mdsEnabled) { + queryObject = queryObject || {}; + queryObject.dataSourceId = this.dataSourceId; + } return queryObject; } } diff --git a/server/services/MDSEnabledClientService.ts b/server/services/MDSEnabledClientService.ts index 8ddfe5fe0..c5bb3404c 100644 --- a/server/services/MDSEnabledClientService.ts +++ b/server/services/MDSEnabledClientService.ts @@ -18,7 +18,7 @@ export abstract class MDSEnabledClientService { context: RequestHandlerContext, request: OpenSearchDashboardsRequest ): (endpoint: string, clientParams: Record, options?: LegacyCallAPIOptions | undefined) => Promise { - const { dataSourceId = "" } = request.query as { dataSourceId?: string }; + const { dataSourceId = "" } = (request.query || {}) as { dataSourceId?: string }; if (this.dataSourceEnabled && dataSourceId && dataSourceId.trim().length != 0) { // non-zero data source id return context.dataSource.opensearch.legacy.getClient(dataSourceId).callAPI; From bd37b5804d94bc85c1e41176ac1cf78946707a2f Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Tue, 26 Mar 2024 11:34:57 +0530 Subject: [PATCH 13/14] resolving yarn.lock conflict Signed-off-by: Ramakrishna Chilaka --- yarn.lock | 970 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 553 insertions(+), 417 deletions(-) diff --git a/yarn.lock b/yarn.lock index d9c5ace62..a340eec9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -258,9 +258,9 @@ integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== "@types/node@*": - version "20.11.26" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.26.tgz#3fbda536e51d5c79281e1d9657dcb0131baabd2d" - integrity sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ== + version "20.11.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.30.tgz#9c33467fc23167a347e73834f788f4b9f399d66f" + integrity sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw== dependencies: undici-types "~5.26.4" @@ -645,6 +645,14 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" @@ -673,15 +681,28 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + +asn1.js@^4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== dependencies: bn.js "^4.0.0" inherits "^2.0.1" minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" asn1@~0.2.3: version "0.2.6" @@ -718,10 +739,10 @@ async-each@^1.0.1: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== -async@0.9.x, async@^1.4.2, async@^2.6.1, async@^2.6.2, async@^3.2.0, async@^3.2.2, async@~3.2.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" - integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== +async@^3.2.0, async@^3.2.3: + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== asynckit@^0.4.0: version "0.4.0" @@ -743,6 +764,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -825,6 +853,11 @@ bn.js@^5.0.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -861,7 +894,7 @@ brorand@^1.0.1, brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browserify-aes@^1.0.0, browserify-aes@^1.0.4: +browserify-aes@^1.0.4, browserify-aes@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== @@ -1000,7 +1033,7 @@ cachedir@^2.3.0: resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.3.0.tgz#0c75892a052198f0b21c7c1804d8331edfcae0e8" integrity sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw== -call-bind@^1.0.0, call-bind@^1.0.2: +call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== @@ -1008,7 +1041,7 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" -call-bind@^1.0.4, call-bind@^1.0.5: +call-bind@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== @@ -1017,6 +1050,17 @@ call-bind@^1.0.4, call-bind@^1.0.5: get-intrinsic "^1.2.1" set-function-length "^1.1.1" +call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -1158,9 +1202,9 @@ cli-cursor@^3.1.0: restore-cursor "^3.1.0" cli-table3@~0.6.1: - version "0.6.3" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" - integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== + version "0.6.4" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.4.tgz#d1c536b8a3f2e7bec58f67ac9e5769b1b30088b0" + integrity sha512-Lm3L0p+/npIQWNIiyF/nAn7T5dnOwR3xNTHXYEBFBFVPXzCVNZ5lqEC/1eo/EVfpDsQ1I+TX4ORPQgp+UI0CRw== dependencies: string-width "^4.2.0" optionalDependencies: @@ -1463,6 +1507,33 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + dayjs@^1.10.4: version "1.11.10" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" @@ -1527,7 +1598,7 @@ deep-equal@^2.0.5: which-collection "^1.0.1" which-typed-array "^1.1.9" -define-data-property@^1.0.1, define-data-property@^1.1.1: +define-data-property@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== @@ -1536,7 +1607,16 @@ define-data-property@^1.0.1, define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" -define-properties@^1.1.3, define-properties@^1.1.4: +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-properties@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== @@ -1544,7 +1624,7 @@ define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" -define-properties@^1.2.0: +define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -1749,6 +1829,70 @@ es-abstract@^1.22.1: unbox-primitive "^1.0.2" which-typed-array "^1.1.13" +es-abstract@^1.22.3, es-abstract@^1.23.0: + version "1.23.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.2.tgz#693312f3940f967b8dd3eebacb590b01712622e0" + integrity sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.5" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-get-iterator@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -1764,6 +1908,13 @@ es-get-iterator@^1.1.2: isarray "^2.0.5" stop-iteration-iterator "^1.0.0" +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9" @@ -1773,6 +1924,15 @@ es-set-tostringtag@^2.0.1: has-tostringtag "^1.0.0" hasown "^2.0.0" +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + es-shim-unscopables@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" @@ -2179,7 +2339,7 @@ function.prototype.name@^1.1.6: es-abstract "^1.22.1" functions-have-names "^1.2.3" -functions-have-names@^1.2.2, functions-have-names@^1.2.3: +functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -2198,7 +2358,7 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: has "^1.0.3" has-symbols "^1.0.3" -get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: +get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== @@ -2208,6 +2368,17 @@ get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -2240,6 +2411,15 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -2267,10 +2447,17 @@ glob-all@^3.2.1: glob "^7.2.3" yargs "^15.3.1" -glob-parent@^3.1.0, glob-parent@^5.1.2, glob-parent@^6.0.0, glob-parent@~5.1.2: +glob-parent@^3.1.0, glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.0: version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" @@ -2308,9 +2495,9 @@ gopd@^1.0.1: get-intrinsic "^1.1.3" graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" @@ -2327,29 +2514,29 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== dependencies: - get-intrinsic "^1.1.1" + es-define-property "^1.0.0" -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== +has-proto@^1.0.1, has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== dependencies: - has-symbols "^1.0.2" + has-symbols "^1.0.3" has-value@^0.3.1: version "0.3.1" @@ -2383,11 +2570,9 @@ has-values@^1.0.0: kind-of "^4.0.0" has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== hash-base@^3.0.0: version "3.1.0" @@ -2398,6 +2583,14 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" +hash-base@~3.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -2406,10 +2599,10 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" @@ -2532,21 +2725,12 @@ ini@2.0.0: resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== -internal-slot@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3" - integrity sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - side-channel "^1.0.4" - -internal-slot@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930" - integrity sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg== +internal-slot@^1.0.4, internal-slot@^1.0.5, internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== dependencies: - get-intrinsic "^1.2.2" + es-errors "^1.3.0" hasown "^2.0.0" side-channel "^1.0.4" @@ -2555,19 +2739,12 @@ interpret@^1.4.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== +is-accessor-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz#3223b10628354644b86260db29b3e693f5ceedd4" + integrity sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA== dependencies: - kind-of "^6.0.0" + hasown "^2.0.0" is-arguments@^1.1.1: version "1.1.1" @@ -2577,23 +2754,13 @@ is-arguments@^1.1.1: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-array-buffer@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a" - integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-typed-array "^1.1.10" - -is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2, is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" + get-intrinsic "^1.2.1" is-arrayish@^0.2.1: version "0.2.1" @@ -2648,26 +2815,19 @@ is-core-module@^2.13.0, is-core-module@^2.13.1: dependencies: hasown "^2.0.0" -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== +is-data-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz#2109164426166d32ea38c405c1e0945d9e6a4eeb" + integrity sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw== dependencies: - kind-of "^3.0.2" + hasown "^2.0.0" -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== dependencies: - kind-of "^6.0.0" + is-typed-array "^1.1.13" is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" @@ -2677,22 +2837,20 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: has-tostringtag "^1.0.0" is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + version "0.1.7" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.7.tgz#2727eb61fd789dcd5bdf0ed4569f551d2fe3be33" + integrity sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg== dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.3.tgz#92d27cb3cd311c4977a4db47df457234a13cb306" + integrity sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw== dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" is-directory@^0.3.1: version "0.3.1" @@ -2736,15 +2894,15 @@ is-installed-globally@~0.4.0: global-dirs "^3.0.0" is-path-inside "^3.0.2" -is-map@^2.0.1, is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-map@^2.0.2, is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.2, is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== is-number-object@^1.0.4: version "1.0.7" @@ -2795,17 +2953,17 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA== -is-set@^2.0.1, is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== +is-set@^2.0.2, is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" is-stream@^1.1.0: version "1.1.0" @@ -2831,23 +2989,12 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-typed-array@^1.1.12, is-typed-array@^1.1.9: - version "1.1.12" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" - integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== +is-typed-array@^1.1.12, is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== dependencies: - which-typed-array "^1.1.11" + which-typed-array "^1.1.14" is-typedarray@~1.0.0: version "1.0.0" @@ -2859,10 +3006,10 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-weakmap@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" - integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== +is-weakmap@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== is-weakref@^1.0.2: version "1.0.2" @@ -2871,13 +3018,13 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-weakset@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" - integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== +is-weakset@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" + integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" + call-bind "^1.0.7" + get-intrinsic "^1.2.4" is-windows@^1.0.2: version "1.0.2" @@ -2979,10 +3126,17 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== +json5@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + json5@^2.1.2: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonfile@^6.0.1: version "6.1.0" @@ -3003,7 +3157,7 @@ jsprim@^2.0.2: json-schema "0.4.0" verror "1.10.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0, kind-of@^4.0.0, kind-of@^5.0.0, kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0, kind-of@^4.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -3058,14 +3212,14 @@ loader-runner@^2.4.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-utils@^1.2.3, loader-utils@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" - integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== +loader-utils@^1.0.2, loader-utils@^1.4.1, loader-utils@^2.0.4: + version "1.4.2" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" + integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== dependencies: big.js "^5.2.2" emojis-list "^3.0.0" - json5 "^2.1.2" + json5 "^1.0.1" locate-path@^3.0.0: version "3.0.0" @@ -3133,9 +3287,9 @@ lru-cache@^6.0.0: yallist "^4.0.0" lz-string@^1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" - integrity sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ== + version "1.5.0" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" + integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== make-dir@^2.0.0: version "2.1.0" @@ -3262,9 +3416,9 @@ minimatch@^3.1.1: brace-expansion "^1.1.7" minimist@^1.2.0, minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mississippi@^3.0.0: version "3.0.0" @@ -3298,9 +3452,9 @@ mkdirp@^0.5.1, mkdirp@^0.5.3: minimist "^1.2.6" moment@^2.29.4: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== move-concurrently@^1.0.1: version "1.0.1" @@ -3330,9 +3484,9 @@ ms@^2.1.1: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== nan@^2.12.1: - version "2.17.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" - integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== + version "2.19.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.19.0.tgz#bb58122ad55a6c5bc973303908d5b16cfdd5a8c0" + integrity sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw== nanomatch@^1.2.9: version "1.2.13" @@ -3426,6 +3580,13 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -3445,18 +3606,13 @@ object-inspect@^1.13.1: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== -object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - object-is@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + version "1.1.6" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.6.tgz#1a6a53aed2dd8f7e6775ff870bea58545956ab07" + integrity sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" + call-bind "^1.0.7" + define-properties "^1.2.1" object-keys@^1.1.1: version "1.1.1" @@ -3470,13 +3626,13 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== +object.assign@^4.1.4, object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" + call-bind "^1.0.5" + define-properties "^1.2.1" has-symbols "^1.0.3" object-keys "^1.1.1" @@ -3576,15 +3732,16 @@ parent-module@^1.0.0: callsites "^3.0.0" parse-asn1@^5.0.0, parse-asn1@^5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + version "5.1.7" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.7.tgz#73cdaaa822125f9647165625eb45f8a051d2df06" + integrity sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg== dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" + asn1.js "^4.10.1" + browserify-aes "^1.2.0" + evp_bytestokey "^1.0.3" + hash-base "~3.0" + pbkdf2 "^3.1.2" + safe-buffer "^5.2.1" parse-json@^4.0.0: version "4.0.0" @@ -3649,7 +3806,7 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pbkdf2@^3.0.3: +pbkdf2@^3.0.3, pbkdf2@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -3711,6 +3868,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" @@ -3807,20 +3969,15 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== - -punycode@^1.2.4: +punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== punycode@^2.1.0, punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== qs@6.10.4: version "6.10.4" @@ -3829,16 +3986,18 @@ qs@6.10.4: dependencies: side-channel "^1.0.4" +qs@^6.11.2: + version "6.12.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.0.tgz#edd40c3b823995946a8a0b1f208669c7a200db77" + integrity sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg== + dependencies: + side-channel "^1.0.6" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== - querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -3887,9 +4046,9 @@ read-pkg@^5.2.0: type-fest "^0.6.0" "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -3899,16 +4058,7 @@ read-pkg@^5.2.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.6.2: +readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -3946,23 +4096,15 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== +regexp.prototype.flags@^1.4.3, regexp.prototype.flags@^1.5.1, regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexp.prototype.flags@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" - integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - set-function-name "^2.0.0" + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" remove-trailing-separator@^1.0.1: version "1.1.0" @@ -4017,11 +4159,11 @@ resolve-url@^0.2.1: integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== resolve@^1.10.0, resolve@^1.5.0, resolve@^1.7.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - is-core-module "^2.9.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -4048,9 +4190,9 @@ ret@~0.1.10: integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" @@ -4059,13 +4201,6 @@ rimraf@^2.5.4, rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -4087,19 +4222,19 @@ run-queue@^1.0.0, run-queue@^1.0.3: aproba "^1.1.1" rxjs@^7.5.1: - version "7.8.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" - integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" -safe-array-concat@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" - integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== +safe-array-concat@^1.0.1, safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + get-intrinsic "^1.2.4" has-symbols "^1.0.3" isarray "^2.0.5" @@ -4113,13 +4248,13 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== +safe-regex-test@^1.0.0, safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" + call-bind "^1.0.6" + es-errors "^1.3.0" is-regex "^1.1.4" safe-regex@^1.1.0: @@ -4149,9 +4284,9 @@ semver-compare@^1.0.0: integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== "semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0, semver@^5.7.2, semver@^6.0.0, semver@^7.3.2, semver@^7.5.3: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== dependencies: lru-cache "^6.0.0" @@ -4167,24 +4302,27 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -set-function-length@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed" - integrity sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ== +set-function-length@^1.1.1, set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== dependencies: - define-data-property "^1.1.1" - get-intrinsic "^1.2.1" + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" gopd "^1.0.1" - has-property-descriptors "^1.0.0" + has-property-descriptors "^1.0.2" -set-function-name@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" - integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== dependencies: - define-data-property "^1.0.1" + define-data-property "^1.1.4" + es-errors "^1.3.0" functions-have-names "^1.2.3" - has-property-descriptors "^1.0.0" + has-property-descriptors "^1.0.2" set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" @@ -4233,14 +4371,15 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== +side-channel@^1.0.4, side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.7" @@ -4340,17 +4479,17 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + version "2.5.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" + integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== spdx-expression-parse@^3.0.0: version "3.0.1" @@ -4361,9 +4500,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.12" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" - integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== + version "3.0.17" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c" + integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -4378,9 +4517,9 @@ sprintf-js@~1.0.2: integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== sshpk@^1.14.1: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== + version "1.18.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" + integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -4442,9 +4581,9 @@ stream-http@^2.7.2: xtend "^4.0.0" stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + version "1.0.3" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" + integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== string-argv@0.3.1: version "0.3.1" @@ -4460,32 +4599,33 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string.prototype.trim@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" - integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== +string.prototype.trim@^1.2.8, string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" -string.prototype.trimend@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" - integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== +string.prototype.trimend@^1.0.7, string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" string.prototype.trimstart@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" - integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" @@ -4589,9 +4729,9 @@ terser@^4.1.2, terser@^4.8.1: source-map-support "~0.5.12" throttleit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" - integrity sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g== + version "1.0.1" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.1.tgz#304ec51631c3b770c65c6c6f76938b384000f4d5" + integrity sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ== through2@^2.0.0: version "2.0.5" @@ -4614,11 +4754,9 @@ timers-browserify@^2.0.4: setimmediate "^1.0.4" tmp@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== to-arraybuffer@^1.0.0: version "1.0.1" @@ -4679,9 +4817,9 @@ ts-loader@^6.2.1: semver "^6.0.0" tslib@^2.1.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" - integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tty-browserify@0.0.0: version "0.0.0" @@ -4710,50 +4848,60 @@ 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== -typed-array-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" - integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== +typed-array-buffer@^1.0.0, typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - is-typed-array "^1.1.10" + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" -typed-array-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" - integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== +typed-array-byte-length@^1.0.0, typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" -typed-array-byte-offset@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" - integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== +typed-array-byte-offset@^1.0.0, typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== +typed-array-length@^1.0.4, typed-array-length@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" for-each "^0.3.3" - is-typed-array "^1.1.9" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== +typescript@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2" + integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -4799,9 +4947,9 @@ universalify@^0.2.0: integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== unset-value@^1.0.0: version "1.0.0" @@ -4842,12 +4990,12 @@ url-parse@^1.5.3: requires-port "^1.0.0" url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ== + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== dependencies: - punycode "1.3.2" - querystring "0.2.0" + punycode "^1.4.1" + qs "^6.11.2" use@^3.1.0: version "3.1.1" @@ -4968,42 +5116,30 @@ which-boxed-primitive@^1.0.2: is-symbol "^1.0.3" which-collection@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" - integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== dependencies: - is-map "^2.0.1" - is-set "^2.0.1" - is-weakmap "^2.0.1" - is-weakset "^2.0.1" + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== - -which-typed-array@^1.1.11, which-typed-array@^1.1.13: - version "1.1.13" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" - integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.4" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== -which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== +which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.9: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" + has-tostringtag "^1.0.2" which@^1.2.9: version "1.3.1" From bf5558d668ced3ff4df5746a691ed9854a74a3d2 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Tue, 26 Mar 2024 15:08:27 +0530 Subject: [PATCH 14/14] flaky test flush action aliases Signed-off-by: Ramakrishna Chilaka --- .../aliases.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js b/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js index 97e84cb6e..6f1ddbf63 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js @@ -146,10 +146,10 @@ describe("Aliases", () => { describe("can flush an alias", () => { it("successfully flush an index", () => { let sample_alias = `${SAMPLE_ALIAS_PREFIX}-${1}`; - // Sort all aliases in asc order to make it at first page - cy.contains("Alias name").click(); - // Confirm we have our initial alias - cy.contains(sample_alias); + cy.get('[placeholder="Search..."]').type(`${SAMPLE_ALIAS_PREFIX}-1{enter}`); + cy.contains(`${SAMPLE_ALIAS_PREFIX}-10`); + cy.contains(`${SAMPLE_ALIAS_PREFIX}-11`); + cy.contains(`${sample_alias}`); // index a test doc cy.request({ method: "POST", @@ -170,23 +170,23 @@ describe("Aliases", () => { expect(num).to.equal(1); }); - cy.get('[data-test-subj="moreAction"]').click(); // Flush btn should be disabled if no items selected - cy.get('[data-test-subj="Flush Action"]').should("have.class", "euiContextMenuItem-isDisabled"); + cy.get('[data-test-subj="moreAction"] button').click().get('[data-test-subj="Flush Action"]').should("be.disabled").end(); // Select an alias - cy.get(`[data-test-subj="checkboxSelectRow-${sample_alias}"]`).check({ - force: true, - }); - - cy.get('[data-test-subj="moreAction"]').click(); - // Flush btn should be enabled - cy.get('[data-test-subj="Flush Action"]').should("exist").should("not.have.class", "euiContextMenuItem-isDisabled").click(); + cy.get(`#_selection_column_${sample_alias}-checkbox`) + .click() + .get('[data-test-subj="moreAction"] button') + .click() + .get('[data-test-subj="Flush Action"]') + .should("not.be.disabled") + .click() + .end(); // Check for flush index modal cy.contains("Flush alias"); - cy.get('[data-test-subj="flushConfirmButton"]').click(); + cy.get('[data-test-subj="flushConfirmButton"]').should("not.be.disabled").click(); // Check for success toast cy.contains(`The alias ${sample_alias} has been successfully flushed.`);