From d7f3fd3644fdd0f07683993958f42b5d0e46cc47 Mon Sep 17 00:00:00 2001 From: John Gozde Date: Mon, 30 Jan 2023 15:04:18 -0700 Subject: [PATCH 1/4] Bump zustand, licenses --- licenses.yaml | 12 +++++- licenses/bin/use-sync-external-store.MIT | 21 ++++++++++ web-console/package-lock.json | 39 +++++++++++++++---- web-console/package.json | 2 +- .../helper-query/helper-query.tsx | 17 +++++--- .../metadata-change-detector.tsx | 10 +++-- .../workbench-view/metadata-state-store.ts | 6 +-- .../workbench-view/query-tab/query-tab.tsx | 15 +++++-- .../recent-query-task-panel.tsx | 15 +++++-- .../views/workbench-view/work-state-store.ts | 6 +-- 10 files changed, 111 insertions(+), 32 deletions(-) create mode 100644 licenses/bin/use-sync-external-store.MIT diff --git a/licenses.yaml b/licenses.yaml index ba21f0b0456d..696478d8516d 100644 --- a/licenses.yaml +++ b/licenses.yaml @@ -6537,6 +6537,16 @@ license_file_path: licenses/bin/upper-case.MIT --- +name: "use-sync-external-store" +license_category: binary +module: web-console +license_name: MIT License +copyright: Facebook, Inc. and its affiliates. +version: 1.2.0 +license_file_path: licenses/bin/use-sync-external-store.MIT + +--- + name: "value-equal" license_category: binary module: web-console @@ -6572,6 +6582,6 @@ license_category: binary module: web-console license_name: MIT License copyright: Paul Henschel -version: 3.7.2 +version: 4.3.2 license_file_path: licenses/bin/zustand.MIT # Web console modules end diff --git a/licenses/bin/use-sync-external-store.MIT b/licenses/bin/use-sync-external-store.MIT new file mode 100644 index 000000000000..b96dcb0480a0 --- /dev/null +++ b/licenses/bin/use-sync-external-store.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/web-console/package-lock.json b/web-console/package-lock.json index 8776b62e3b55..4cf27e01f66b 100644 --- a/web-console/package-lock.json +++ b/web-console/package-lock.json @@ -44,7 +44,7 @@ "react-table": "~6.10.3", "regenerator-runtime": "^0.13.7", "tslib": "^2.3.1", - "zustand": "^3.6.5" + "zustand": "^4.3.2" }, "devDependencies": { "@awesome-code-style/eslint-config": "^4.0.0", @@ -25955,6 +25955,14 @@ "node": ">=0.10.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -27232,16 +27240,23 @@ } }, "node_modules/zustand": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz", - "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.3.2.tgz", + "integrity": "sha512-rd4haDmlwMTVWVqwvgy00ny8rtti/klRoZjFbL/MAcDnmD5qSw/RZc+Vddstdv90M5Lv6RPgWvm1Hivyn0QgJw==", + "dependencies": { + "use-sync-external-store": "1.2.0" + }, "engines": { "node": ">=12.7.0" }, "peerDependencies": { + "immer": ">=9.0", "react": ">=16.8" }, "peerDependenciesMeta": { + "immer": { + "optional": true + }, "react": { "optional": true } @@ -47632,6 +47647,12 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, + "use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "requires": {} + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -48610,10 +48631,12 @@ "dev": true }, "zustand": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz", - "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==", - "requires": {} + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.3.2.tgz", + "integrity": "sha512-rd4haDmlwMTVWVqwvgy00ny8rtti/klRoZjFbL/MAcDnmD5qSw/RZc+Vddstdv90M5Lv6RPgWvm1Hivyn0QgJw==", + "requires": { + "use-sync-external-store": "1.2.0" + } }, "zwitch": { "version": "1.0.5", diff --git a/web-console/package.json b/web-console/package.json index b8c33c6fdade..f0e16f720638 100644 --- a/web-console/package.json +++ b/web-console/package.json @@ -101,7 +101,7 @@ "react-table": "~6.10.3", "regenerator-runtime": "^0.13.7", "tslib": "^2.3.1", - "zustand": "^3.6.5" + "zustand": "^4.3.2" }, "devDependencies": { "@awesome-code-style/eslint-config": "^4.0.0", diff --git a/web-console/src/views/workbench-view/helper-query/helper-query.tsx b/web-console/src/views/workbench-view/helper-query/helper-query.tsx index 25bca62c4a22..f12f49597672 100644 --- a/web-console/src/views/workbench-view/helper-query/helper-query.tsx +++ b/web-console/src/views/workbench-view/helper-query/helper-query.tsx @@ -21,7 +21,8 @@ import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import axios from 'axios'; import { QueryResult, QueryRunner, SqlQuery } from 'druid-query-toolkit'; -import React, { useEffect, useRef, useState } from 'react'; +import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { useStore } from 'zustand'; import { Loader, QueryErrorPane } from '../../../components'; import { @@ -57,10 +58,10 @@ import { ExecutionSummaryPanel } from '../execution-summary-panel/execution-summ import { ExecutionTimerPanel } from '../execution-timer-panel/execution-timer-panel'; import { FlexibleQueryInput } from '../flexible-query-input/flexible-query-input'; import { IngestSuccessPane } from '../ingest-success-pane/ingest-success-pane'; -import { useMetadataStateStore } from '../metadata-state-store'; +import { metadataStateStore } from '../metadata-state-store'; import { ResultTablePane } from '../result-table-pane/result-table-pane'; import { RunPanel } from '../run-panel/run-panel'; -import { useWorkStateStore } from '../work-state-store'; +import { workStateStore } from '../work-state-store'; import './helper-query.scss'; @@ -223,7 +224,10 @@ export const HelperQuery = React.memo(function HelperQuery(props: HelperQueryPro // eslint-disable-next-line react-hooks/exhaustive-deps }, [executionState.data, executionState.error]); - const incrementWorkVersion = useWorkStateStore(state => state.increment); + const incrementWorkVersion = useStore( + workStateStore, + useCallback(state => state.increment, []), + ); useEffect(() => { incrementWorkVersion(); // eslint-disable-next-line react-hooks/exhaustive-deps @@ -231,7 +235,10 @@ export const HelperQuery = React.memo(function HelperQuery(props: HelperQueryPro const execution = executionState.data; - const incrementMetadataVersion = useMetadataStateStore(state => state.increment); + const incrementMetadataVersion = useStore( + metadataStateStore, + useCallback(state => state.increment, []), + ); useEffect(() => { if (execution?.isSuccessfulInsert()) { incrementMetadataVersion(); diff --git a/web-console/src/views/workbench-view/metadata-change-detector.tsx b/web-console/src/views/workbench-view/metadata-change-detector.tsx index 3dafa6c8ee3a..3f8e42f7b1e1 100644 --- a/web-console/src/views/workbench-view/metadata-change-detector.tsx +++ b/web-console/src/views/workbench-view/metadata-change-detector.tsx @@ -16,9 +16,10 @@ * limitations under the License. */ -import { useEffect } from 'react'; +import { useCallback, useEffect } from 'react'; +import { useStore } from 'zustand'; -import { useMetadataStateStore } from './metadata-state-store'; +import { metadataStateStore } from './metadata-state-store'; export interface MetadataChangeDetectorProps { onChange(): void; @@ -29,7 +30,10 @@ export const MetadataChangeDetector = function MetadataChangeDetector( ) { const { onChange } = props; - const metadataStateVersion = useMetadataStateStore(state => state.version); + const metadataStateVersion = useStore( + metadataStateStore, + useCallback(state => state.version, []), + ); useEffect(() => { onChange(); // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/web-console/src/views/workbench-view/metadata-state-store.ts b/web-console/src/views/workbench-view/metadata-state-store.ts index f36fd8e69434..7c7669e0db00 100644 --- a/web-console/src/views/workbench-view/metadata-state-store.ts +++ b/web-console/src/views/workbench-view/metadata-state-store.ts @@ -16,14 +16,14 @@ * limitations under the License. */ -import create, { State } from 'zustand'; +import { createStore } from 'zustand'; -interface MetadataState extends State { +interface MetadataState { version: number; increment(): void; } -export const useMetadataStateStore = create(set => ({ +export const metadataStateStore = createStore(set => ({ version: 0, increment: () => set(state => ({ version: state.version + 1 })), })); diff --git a/web-console/src/views/workbench-view/query-tab/query-tab.tsx b/web-console/src/views/workbench-view/query-tab/query-tab.tsx index a56e9189aafe..402cc4367ab6 100644 --- a/web-console/src/views/workbench-view/query-tab/query-tab.tsx +++ b/web-console/src/views/workbench-view/query-tab/query-tab.tsx @@ -24,6 +24,7 @@ import classNames from 'classnames'; import { QueryResult, QueryRunner, SqlQuery } from 'druid-query-toolkit'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import SplitterLayout from 'react-splitter-layout'; +import { useStore } from 'zustand'; import { Loader, QueryErrorPane } from '../../../components'; import { @@ -67,10 +68,10 @@ import { ExecutionTimerPanel } from '../execution-timer-panel/execution-timer-pa import { FlexibleQueryInput } from '../flexible-query-input/flexible-query-input'; import { HelperQuery } from '../helper-query/helper-query'; import { IngestSuccessPane } from '../ingest-success-pane/ingest-success-pane'; -import { useMetadataStateStore } from '../metadata-state-store'; +import { metadataStateStore } from '../metadata-state-store'; import { ResultTablePane } from '../result-table-pane/result-table-pane'; import { RunPanel } from '../run-panel/run-panel'; -import { useWorkStateStore } from '../work-state-store'; +import { workStateStore } from '../work-state-store'; import './query-tab.scss'; @@ -252,7 +253,10 @@ export const QueryTab = React.memo(function QueryTab(props: QueryTabProps) { // eslint-disable-next-line react-hooks/exhaustive-deps }, [executionState.data, executionState.error]); - const incrementWorkVersion = useWorkStateStore(state => state.increment); + const incrementWorkVersion = useStore( + workStateStore, + useCallback(state => state.increment, []), + ); useEffect(() => { incrementWorkVersion(); // eslint-disable-next-line react-hooks/exhaustive-deps @@ -260,7 +264,10 @@ export const QueryTab = React.memo(function QueryTab(props: QueryTabProps) { const execution = executionState.data; - const incrementMetadataVersion = useMetadataStateStore(state => state.increment); + const incrementMetadataVersion = useStore( + metadataStateStore, + useCallback(state => state.increment, []), + ); useEffect(() => { if (execution?.isSuccessfulInsert()) { incrementMetadataVersion(); diff --git a/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx b/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx index e6faced76653..69f6cc66df75 100644 --- a/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx +++ b/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx @@ -22,7 +22,8 @@ import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import copy from 'copy-to-clipboard'; import { T } from 'druid-query-toolkit'; -import React, { useState } from 'react'; +import React, { useCallback, useState } from 'react'; +import { useStore } from 'zustand'; import { Loader } from '../../../components'; import { Execution, WorkbenchQuery } from '../../../druid-models'; @@ -31,7 +32,7 @@ import { useClock, useInterval, useQueryManager } from '../../../hooks'; import { AppToaster } from '../../../singletons'; import { downloadQueryDetailArchive, formatDuration, queryDruidSql } from '../../../utils'; import { CancelQueryDialog } from '../cancel-query-dialog/cancel-query-dialog'; -import { useWorkStateStore } from '../work-state-store'; +import { workStateStore } from '../work-state-store'; import './recent-query-task-panel.scss'; @@ -89,7 +90,10 @@ export const RecentQueryTaskPanel = React.memo(function RecentQueryTaskPanel( const [confirmCancelId, setConfirmCancelId] = useState(); - const workStateVersion = useWorkStateStore(state => state.version); + const workStateVersion = useStore( + workStateStore, + useCallback(state => state.version, []), + ); const [queryTaskHistoryState, queryManager] = useQueryManager({ query: workStateVersion, @@ -116,7 +120,10 @@ LIMIT 100`, const now = useClock(); - const incrementWorkVersion = useWorkStateStore(state => state.increment); + const incrementWorkVersion = useStore( + workStateStore, + useCallback(state => state.increment, []), + ); const queryTaskHistory = queryTaskHistoryState.getSomeData(); return ( diff --git a/web-console/src/views/workbench-view/work-state-store.ts b/web-console/src/views/workbench-view/work-state-store.ts index 1c76cb7d7167..ee03a70c030d 100644 --- a/web-console/src/views/workbench-view/work-state-store.ts +++ b/web-console/src/views/workbench-view/work-state-store.ts @@ -16,14 +16,14 @@ * limitations under the License. */ -import create, { State } from 'zustand'; +import { createStore } from 'zustand'; -interface WorkState extends State { +interface WorkState { version: number; increment(): void; } -export const useWorkStateStore = create(set => ({ +export const workStateStore = createStore(set => ({ version: 0, increment: () => set(state => ({ version: state.version + 1 })), })); From 5d5f70e08f3d5b33e9c54f85629b7ce80cb35cf9 Mon Sep 17 00:00:00 2001 From: John Gozde Date: Tue, 31 Jan 2023 18:05:30 -0700 Subject: [PATCH 2/4] Bump TypeScript, Eslint, use type imports --- web-console/.eslintrc.js | 1 + web-console/e2e-tests/auto-compaction.spec.ts | 4 +- web-console/e2e-tests/cancel-query.spec.ts | 2 +- .../component/datasources/compaction.ts | 2 +- .../component/datasources/overview.ts | 2 +- .../e2e-tests/component/ingestion/overview.ts | 2 +- .../component/load-data/config/partition.ts | 2 +- .../data-connector/data-connector.ts | 2 +- .../load-data/data-connector/local-file.ts | 5 +- .../load-data/data-connector/reindex.ts | 5 +- .../component/load-data/data-loader.ts | 12 +- .../e2e-tests/component/query/overview.ts | 2 +- .../e2e-tests/component/workbench/overview.ts | 2 +- .../e2e-tests/multi-stage-query.spec.ts | 2 +- web-console/e2e-tests/reindexing.spec.ts | 2 +- web-console/e2e-tests/tutorial-batch.spec.ts | 2 +- web-console/e2e-tests/util/debug.ts | 2 +- web-console/e2e-tests/util/table.ts | 2 +- web-console/package-lock.json | 700 +++++++----------- web-console/package.json | 7 +- .../src/bootstrap/react-table-defaults.tsx | 3 +- .../components/action-cell/action-cell.tsx | 3 +- .../components/action-icon/action-icon.tsx | 3 +- .../components/array-input/array-input.tsx | 6 +- .../src/components/auto-form/auto-form.tsx | 2 +- .../cell-filter-menu/cell-filter-menu.tsx | 16 +- .../center-message/center-message.tsx | 3 +- .../date-range-selector.tsx | 3 +- .../external-link/external-link.tsx | 3 +- .../fancy-tab-pane/fancy-tab-pane.tsx | 6 +- .../formatted-input/formatted-input.tsx | 5 +- .../interval-input/interval-input.tsx | 6 +- .../src/components/json-input/json-input.tsx | 2 +- .../menu-checkbox/menu-checkbox.tsx | 3 +- .../menu-tristate/menu-tristate.tsx | 3 +- .../numeric-input-with-default.tsx | 3 +- .../query-error-pane/query-error-pane.tsx | 2 +- .../record-table-pane/record-table-pane.tsx | 7 +- .../refresh-button/refresh-button.tsx | 5 +- .../components/rule-editor/rule-editor.tsx | 3 +- .../components/segment-timeline/bar-group.tsx | 4 +- .../segment-timeline/segment-timeline.tsx | 17 +- .../segment-timeline/stacked-bar-chart.tsx | 3 +- .../components/show-history/show-history.tsx | 3 +- .../suggestible-input/suggestible-input.tsx | 6 +- .../table-clickable-cell.tsx | 6 +- .../table-filterable-cell.tsx | 8 +- .../components/timed-button/timed-button.tsx | 6 +- .../view-control-bar/view-control-bar.tsx | 3 +- .../warning-checklist/warning-checklist.tsx | 3 +- web-console/src/console-application.tsx | 8 +- .../async-action-dialog.tsx | 17 +- .../compaction-dialog/compaction-dialog.tsx | 9 +- .../coordinator-dynamic-config-dialog.tsx | 15 +- .../datasource-columns-table.spec.tsx | 3 +- .../datasource-columns-table.tsx | 3 +- .../datasource-preview-pane.tsx | 3 +- .../datasource-table-action-dialog.tsx | 5 +- .../src/dialogs/diff-dialog/diff-dialog.tsx | 3 +- .../dialogs/doctor-dialog/doctor-dialog.tsx | 2 +- .../edit-context-dialog.tsx | 2 +- .../index-spec-dialog/index-spec-dialog.tsx | 6 +- .../lookup-edit-dialog/lookup-edit-dialog.tsx | 6 +- .../lookup-table-action-dialog.tsx | 5 +- .../overlord-dynamic-config-dialog.tsx | 3 +- .../retention-dialog/retention-dialog.tsx | 7 +- .../segment-table-action-dialog.tsx | 5 +- .../segments-preview-pane.tsx | 3 +- .../dialogs/snitch-dialog/snitch-dialog.tsx | 4 +- .../src/dialogs/spec-dialog/spec-dialog.tsx | 4 +- .../dialogs/status-dialog/status-dialog.tsx | 3 +- .../supervisor-statistics-table.spec.tsx | 2 +- .../supervisor-statistics-table.tsx | 3 +- .../supervisor-table-action-dialog.tsx | 5 +- .../table-action-dialog.tsx | 9 +- .../task-table-action-dialog.tsx | 5 +- .../compaction-config/compaction-config.tsx | 2 +- .../compaction-status.spec.ts | 5 +- .../compaction-status/compaction-status.ts | 6 +- .../coordinator-dynamic-config.tsx | 2 +- .../dimension-spec/dimension-spec.ts | 4 +- .../src/druid-models/execution/execution.ts | 5 +- .../external-config/external-config.ts | 6 +- .../src/druid-models/filter/filter.tsx | 5 +- .../flatten-spec/flatten-spec.tsx | 3 +- .../druid-models/index-spec/index-spec.tsx | 2 +- .../ingest-query-pattern.ts | 2 +- .../ingestion-spec/ingestion-spec.spec.ts | 2 +- .../ingestion-spec/ingestion-spec.tsx | 26 +- .../input-format/input-format.tsx | 5 +- .../input-source/input-source.tsx | 3 +- .../druid-models/lookup-spec/lookup-spec.tsx | 3 +- .../druid-models/metric-spec/metric-spec.tsx | 5 +- .../overlord-dynamic-config.tsx | 2 +- web-console/src/druid-models/stages/stages.ts | 4 +- .../timestamp-spec/timestamp-spec.tsx | 7 +- .../transform-spec/transform-spec.tsx | 3 +- .../workbench-query/workbench-query-part.ts | 9 +- .../workbench-query/workbench-query.ts | 22 +- web-console/src/entry.ts | 5 +- web-console/src/helpers/capacity.ts | 2 +- web-console/src/helpers/execution/general.ts | 6 +- .../helpers/execution/sql-task-execution.ts | 5 +- web-console/src/helpers/spec-conversion.ts | 5 +- .../src/hooks/use-local-storage-state.ts | 6 +- web-console/src/hooks/use-query-manager.ts | 3 +- .../src/react-table/react-table-inputs.tsx | 2 +- .../src/react-table/react-table-utils.ts | 7 +- .../src/singletons/ace-editor-state-cache.ts | 2 +- web-console/src/singletons/api.ts | 3 +- .../src/singletons/execution-state-cache.ts | 4 +- .../singletons/workbench-running-promises.ts | 2 +- web-console/src/utils/basic-action.tsx | 3 +- web-console/src/utils/date.ts | 2 +- web-console/src/utils/download.ts | 2 +- web-console/src/utils/druid-query.ts | 5 +- web-console/src/utils/general.tsx | 5 +- .../utils/local-storage-backed-visibility.tsx | 3 +- web-console/src/utils/query-action.ts | 2 +- web-console/src/utils/query-cursor.ts | 3 +- web-console/src/utils/query-manager.tsx | 13 +- web-console/src/utils/sample-query.tsx | 5 +- web-console/src/utils/sampler.mock.ts | 2 +- web-console/src/utils/sampler.ts | 18 +- web-console/src/utils/table-helpers.ts | 2 +- web-console/src/utils/types.ts | 4 +- web-console/src/utils/utils.spec.ts | 2 +- .../datasources-view/datasources-view.tsx | 20 +- .../datasources-card/datasources-card.tsx | 2 +- .../home-view-card/home-view-card.tsx | 6 +- web-console/src/views/home-view/home-view.tsx | 2 +- .../home-view/lookups-card/lookups-card.tsx | 2 +- .../home-view/segments-card/segments-card.tsx | 2 +- .../home-view/services-card/services-card.tsx | 2 +- .../supervisors-card/supervisors-card.tsx | 2 +- .../views/home-view/tasks-card/tasks-card.tsx | 5 +- .../views/ingestion-view/ingestion-view.tsx | 9 +- .../example-picker/example-picker.tsx | 2 +- .../filter-table/filter-table.tsx | 8 +- .../form-editor/form-editor.tsx | 5 +- .../views/load-data-view/info-messages.tsx | 3 +- .../views/load-data-view/load-data-view.tsx | 44 +- .../parse-data-table/parse-data-table.tsx | 7 +- .../parse-time-table.spec.tsx | 3 +- .../parse-time-table/parse-time-table.tsx | 8 +- .../schema-table/schema-table.tsx | 10 +- .../transform-table/transform-table.tsx | 7 +- .../src/views/lookups-view/lookups-view.tsx | 12 +- .../src/views/segments-view/segments-view.tsx | 11 +- .../src/views/services-view/services-view.tsx | 11 +- .../column-actions/column-actions.tsx | 6 +- .../column-editor/column-editor.tsx | 3 +- .../destination-dialog/destination-dialog.tsx | 3 +- .../destination-form/destination-form.tsx | 2 +- .../ingestion-progress-dialog.tsx | 2 +- .../schema-step/column-list/column-list.tsx | 2 +- .../expression-entry/expression-entry.tsx | 3 +- .../preview-table/preview-table.tsx | 15 +- .../rollup-analysis-pane.tsx | 7 +- .../schema-step/schema-step.tsx | 13 +- .../sql-data-loader-view.tsx | 10 +- .../title-frame/title-frame.tsx | 3 +- .../capacity-alert/capacity-alert.tsx | 2 +- .../number-menu-items/number-menu-items.tsx | 3 +- .../string-menu-items/string-menu-items.tsx | 3 +- .../time-menu-items/time-menu-items.tsx | 3 +- .../column-tree/column-tree.spec.tsx | 2 +- .../column-tree/column-tree.tsx | 18 +- .../connect-external-data-dialog.tsx | 4 +- .../src/views/workbench-view/demo-queries.ts | 3 +- .../execution-details-dialog.tsx | 4 +- .../execution-details-pane-loader.tsx | 8 +- .../execution-details-pane.tsx | 2 +- .../execution-error-pane.tsx | 2 +- .../execution-progress-pane.tsx | 2 +- .../execution-stages-pane-loader.tsx | 2 +- .../execution-stages-pane.tsx | 11 +- .../execution-summary-panel.tsx | 2 +- .../execution-timer-panel.tsx | 2 +- .../execution-warnings-pane.tsx | 2 +- .../warning-callout.tsx | 2 +- .../explain-dialog/explain-dialog.spec.tsx | 3 +- .../explain-dialog/explain-dialog.tsx | 5 +- .../flexible-query-input.tsx | 5 +- .../helper-query/helper-query.tsx | 18 +- .../ingest-success-pane.tsx | 5 +- .../input-format-step/input-format-step.tsx | 15 +- .../input-source-step/example-inputs.ts | 2 +- .../input-source-step/input-source-info.tsx | 2 +- .../input-source-step/input-source-step.tsx | 10 +- .../max-tasks-button/max-tasks-button.tsx | 5 +- .../workbench-view/query-tab/query-tab.tsx | 24 +- .../recent-query-task-panel.tsx | 10 +- .../result-table-pane/result-table-pane.tsx | 20 +- .../workbench-view/run-panel/run-panel.tsx | 15 +- .../time-floor-menu-item.tsx | 3 +- .../workbench-history-dialog.tsx | 8 +- .../views/workbench-view/workbench-view.tsx | 25 +- 198 files changed, 833 insertions(+), 973 deletions(-) diff --git a/web-console/.eslintrc.js b/web-console/.eslintrc.js index f52c50e2daa9..52ed448e7eb8 100644 --- a/web-console/.eslintrc.js +++ b/web-console/.eslintrc.js @@ -30,6 +30,7 @@ module.exports = { }, }, rules: { + '@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports' }], 'header/header': [ 2, 'block', diff --git a/web-console/e2e-tests/auto-compaction.spec.ts b/web-console/e2e-tests/auto-compaction.spec.ts index 54b6184d286b..58aa047d03dd 100644 --- a/web-console/e2e-tests/auto-compaction.spec.ts +++ b/web-console/e2e-tests/auto-compaction.spec.ts @@ -17,10 +17,10 @@ */ import path from 'path'; -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { CompactionConfig } from './component/datasources/compaction'; -import { Datasource } from './component/datasources/datasource'; +import type { Datasource } from './component/datasources/datasource'; import { DatasourcesOverview } from './component/datasources/overview'; import { HashedPartitionsSpec } from './component/load-data/config/partition'; import { saveScreenshotIfError } from './util/debug'; diff --git a/web-console/e2e-tests/cancel-query.spec.ts b/web-console/e2e-tests/cancel-query.spec.ts index fc6822e46a1c..e17ab36fc79d 100644 --- a/web-console/e2e-tests/cancel-query.spec.ts +++ b/web-console/e2e-tests/cancel-query.spec.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { QueryOverview } from './component/query/overview'; import { saveScreenshotIfError } from './util/debug'; diff --git a/web-console/e2e-tests/component/datasources/compaction.ts b/web-console/e2e-tests/component/datasources/compaction.ts index 946362069016..175050406f6f 100644 --- a/web-console/e2e-tests/component/datasources/compaction.ts +++ b/web-console/e2e-tests/component/datasources/compaction.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { PartitionsSpec } from '../load-data/config/partition'; +import type { PartitionsSpec } from '../load-data/config/partition'; /** * Datasource compaction configuration diff --git a/web-console/e2e-tests/component/datasources/overview.ts b/web-console/e2e-tests/component/datasources/overview.ts index 1fa83c3672f7..95d6d630c9f6 100644 --- a/web-console/e2e-tests/component/datasources/overview.ts +++ b/web-console/e2e-tests/component/datasources/overview.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { clickButton, getLabeledInput, setLabeledInput } from '../../util/playwright'; import { extractTable } from '../../util/table'; diff --git a/web-console/e2e-tests/component/ingestion/overview.ts b/web-console/e2e-tests/component/ingestion/overview.ts index 3d1a7f2997b0..4b160d374c72 100644 --- a/web-console/e2e-tests/component/ingestion/overview.ts +++ b/web-console/e2e-tests/component/ingestion/overview.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { extractTable } from '../../util/table'; diff --git a/web-console/e2e-tests/component/load-data/config/partition.ts b/web-console/e2e-tests/component/load-data/config/partition.ts index 320f6fce274f..8c45e923c8da 100644 --- a/web-console/e2e-tests/component/load-data/config/partition.ts +++ b/web-console/e2e-tests/component/load-data/config/partition.ts @@ -18,7 +18,7 @@ /* eslint-disable max-classes-per-file */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { getLabeledInput, diff --git a/web-console/e2e-tests/component/load-data/data-connector/data-connector.ts b/web-console/e2e-tests/component/load-data/data-connector/data-connector.ts index bb7c55fad5ca..c0da3f9ae957 100644 --- a/web-console/e2e-tests/component/load-data/data-connector/data-connector.ts +++ b/web-console/e2e-tests/component/load-data/data-connector/data-connector.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { clickButton } from '../../../util/playwright'; diff --git a/web-console/e2e-tests/component/load-data/data-connector/local-file.ts b/web-console/e2e-tests/component/load-data/data-connector/local-file.ts index 2e89a33c15c6..cd33b7766e15 100644 --- a/web-console/e2e-tests/component/load-data/data-connector/local-file.ts +++ b/web-console/e2e-tests/component/load-data/data-connector/local-file.ts @@ -16,11 +16,12 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { setLabeledInput } from '../../../util/playwright'; -import { clickApplyButton, DataConnector } from './data-connector'; +import type { DataConnector } from './data-connector'; +import { clickApplyButton } from './data-connector'; /** * Local file connector for data loader input data. diff --git a/web-console/e2e-tests/component/load-data/data-connector/reindex.ts b/web-console/e2e-tests/component/load-data/data-connector/reindex.ts index 98d8ba1879ec..35f1dc3d9b92 100644 --- a/web-console/e2e-tests/component/load-data/data-connector/reindex.ts +++ b/web-console/e2e-tests/component/load-data/data-connector/reindex.ts @@ -16,11 +16,12 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { setLabeledInput } from '../../../util/playwright'; -import { clickApplyButton, DataConnector } from './data-connector'; +import type { DataConnector } from './data-connector'; +import { clickApplyButton } from './data-connector'; /** * Reindexing connector for data loader input data. diff --git a/web-console/e2e-tests/component/load-data/data-loader.ts b/web-console/e2e-tests/component/load-data/data-loader.ts index 37586a22bb7f..71601467f562 100644 --- a/web-console/e2e-tests/component/load-data/data-loader.ts +++ b/web-console/e2e-tests/component/load-data/data-loader.ts @@ -16,15 +16,15 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { clickButton, setLabeledInput, setLabeledTextarea } from '../../util/playwright'; -import { ConfigureSchemaConfig } from './config/configure-schema'; -import { ConfigureTimestampConfig } from './config/configure-timestamp'; -import { PartitionConfig } from './config/partition'; -import { PublishConfig } from './config/publish'; -import { DataConnector } from './data-connector/data-connector'; +import type { ConfigureSchemaConfig } from './config/configure-schema'; +import type { ConfigureTimestampConfig } from './config/configure-timestamp'; +import type { PartitionConfig } from './config/partition'; +import type { PublishConfig } from './config/publish'; +import type { DataConnector } from './data-connector/data-connector'; /** * Represents load data tab. diff --git a/web-console/e2e-tests/component/query/overview.ts b/web-console/e2e-tests/component/query/overview.ts index 9ae4badcf1c0..82d3e8a630cb 100644 --- a/web-console/e2e-tests/component/query/overview.ts +++ b/web-console/e2e-tests/component/query/overview.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { clickButton, clickText } from '../../util/playwright'; import { extractTable } from '../../util/table'; diff --git a/web-console/e2e-tests/component/workbench/overview.ts b/web-console/e2e-tests/component/workbench/overview.ts index e0f3c7debd76..9660cd354dcd 100644 --- a/web-console/e2e-tests/component/workbench/overview.ts +++ b/web-console/e2e-tests/component/workbench/overview.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { clickButton } from '../../util/playwright'; import { extractTable } from '../../util/table'; diff --git a/web-console/e2e-tests/multi-stage-query.spec.ts b/web-console/e2e-tests/multi-stage-query.spec.ts index 2766c5c8ffe2..8c0678ce3f3f 100644 --- a/web-console/e2e-tests/multi-stage-query.spec.ts +++ b/web-console/e2e-tests/multi-stage-query.spec.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { WorkbenchOverview } from './component/workbench/overview'; import { saveScreenshotIfError } from './util/debug'; diff --git a/web-console/e2e-tests/reindexing.spec.ts b/web-console/e2e-tests/reindexing.spec.ts index d49bb5774394..ebf75c0e78fa 100644 --- a/web-console/e2e-tests/reindexing.spec.ts +++ b/web-console/e2e-tests/reindexing.spec.ts @@ -17,7 +17,7 @@ */ import path from 'path'; -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { DatasourcesOverview } from './component/datasources/overview'; import { IngestionOverview } from './component/ingestion/overview'; diff --git a/web-console/e2e-tests/tutorial-batch.spec.ts b/web-console/e2e-tests/tutorial-batch.spec.ts index 914850a96aa5..5c9e437dad8f 100644 --- a/web-console/e2e-tests/tutorial-batch.spec.ts +++ b/web-console/e2e-tests/tutorial-batch.spec.ts @@ -17,7 +17,7 @@ */ import { T } from 'druid-query-toolkit'; -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; import { DatasourcesOverview } from './component/datasources/overview'; import { IngestionOverview } from './component/ingestion/overview'; diff --git a/web-console/e2e-tests/util/debug.ts b/web-console/e2e-tests/util/debug.ts index 9ea97a1be5f3..fee93a39a727 100644 --- a/web-console/e2e-tests/util/debug.ts +++ b/web-console/e2e-tests/util/debug.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; export async function saveScreenshotIfError( filenamePrefix: string, diff --git a/web-console/e2e-tests/util/table.ts b/web-console/e2e-tests/util/table.ts index ab115b6f3699..e40148f42a85 100644 --- a/web-console/e2e-tests/util/table.ts +++ b/web-console/e2e-tests/util/table.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import * as playwright from 'playwright-chromium'; +import type * as playwright from 'playwright-chromium'; /** * Extracts an HTML table into a text representation. diff --git a/web-console/package-lock.json b/web-console/package-lock.json index 4cf27e01f66b..6bfdf8b18a33 100644 --- a/web-console/package-lock.json +++ b/web-console/package-lock.json @@ -47,7 +47,7 @@ "zustand": "^4.3.2" }, "devDependencies": { - "@awesome-code-style/eslint-config": "^4.0.0", + "@awesome-code-style/eslint-config": "^4.1.0", "@awesome-code-style/prettier-config": "^4.0.0", "@awesome-code-style/stylelint-config": "^4.0.0", "@babel/core": "^7.14.3", @@ -74,7 +74,8 @@ "@types/react-splitter-layout": "^3.0.0", "@types/react-table": "6.8.5", "@types/uuid": "^7.0.2", - "@typescript-eslint/eslint-plugin": "^5.11.0", + "@typescript-eslint/eslint-plugin": "^5.51.0", + "@typescript-eslint/parser": "^5.51.0", "autoprefixer": "^10.2.6", "babel-loader": "^8.2.2", "browserslist": "^4.16.6", @@ -111,7 +112,7 @@ "ts-jest": "^27.1.3", "ts-loader": "^8.1.0", "ts-node": "^10.9.1", - "typescript": "^4.5.5", + "typescript": "^4.9.5", "uuid": "^7.0.2", "webpack": "^5.33.2", "webpack-bundle-analyzer": "^4.4.1", @@ -123,9 +124,9 @@ } }, "node_modules/@awesome-code-style/eslint-config": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@awesome-code-style/eslint-config/-/eslint-config-4.0.0.tgz", - "integrity": "sha512-hLtTlWXXNU/56e1hYCNsP6ptJco7G84kzKx13u1sXb7ORihfjGWV0NEMAG2dlRbBQlo63Oxefr5A5D0tHnBWXg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@awesome-code-style/eslint-config/-/eslint-config-4.1.0.tgz", + "integrity": "sha512-exq+8wS8mTM+2M6w7KR1ajVvYTH1jgR5nHR8XYa+qD2YoFSpE4bGgVugIm1+GlVFl8jkhy2erCiHyc97l8NOzA==", "dev": true, "dependencies": { "@typescript-eslint/parser": "^5.3.0" @@ -137,8 +138,7 @@ "eslint-plugin-import": "^2.25.2", "eslint-plugin-react": "^7.26.1", "eslint-plugin-react-hooks": "^4.2.0", - "eslint-plugin-simple-import-sort": "^7.0.0", - "eslint-plugin-unicorn": "^38.0.0", + "eslint-plugin-simple-import-sort": "^7.0.0 || ^8.0.0", "eslint-plugin-unused-imports": "^2.0.0" }, "peerDependenciesMeta": { @@ -4799,9 +4799,9 @@ "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "node_modules/@types/json5": { @@ -4961,6 +4961,12 @@ "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -4995,19 +5001,20 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz", - "integrity": "sha512-HJh33bgzXe6jGRocOj4FmefD7hRY4itgjzOrSs3JPrTNXsX7j5+nQPciAUj/1nZtwo2kAc3C75jZO+T23gzSGw==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.51.0.tgz", + "integrity": "sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/type-utils": "5.11.0", - "@typescript-eslint/utils": "5.11.0", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/type-utils": "5.51.0", + "@typescript-eslint/utils": "5.51.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { @@ -5028,9 +5035,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5051,9 +5058,9 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5066,15 +5073,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.11.0.tgz", - "integrity": "sha512-x0DCjetHZYBRovJdr3U0zG9OOdNXUaFLJ82ehr1AlkArljJuwEsgnud+Q7umlGDFLFrs8tU8ybQDFocp/eX8mQ==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.51.0.tgz", + "integrity": "sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/typescript-estree": "5.11.0", - "debug": "^4.3.2" + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", + "debug": "^4.3.4" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5093,9 +5100,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5116,13 +5123,13 @@ "dev": true }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz", - "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.51.0.tgz", + "integrity": "sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0" + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5133,13 +5140,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.11.0.tgz", - "integrity": "sha512-wDqdsYO6ofLaD4DsGZ0jGwxp4HrzD2YKulpEZXmgN3xo4BHJwf7kq49JTRpV0Gx6bxkSUmc9s0EIK1xPbFFpIA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.51.0.tgz", + "integrity": "sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.11.0", - "debug": "^4.3.2", + "@typescript-eslint/typescript-estree": "5.51.0", + "@typescript-eslint/utils": "5.51.0", + "debug": "^4.3.4", "tsutils": "^3.21.0" }, "engines": { @@ -5159,9 +5167,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5182,9 +5190,9 @@ "dev": true }, "node_modules/@typescript-eslint/types": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz", - "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.51.0.tgz", + "integrity": "sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5195,17 +5203,17 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz", - "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.51.0.tgz", + "integrity": "sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0", - "debug": "^4.3.2", - "globby": "^11.0.4", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0", + "debug": "^4.3.4", + "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { @@ -5230,22 +5238,10 @@ "node": ">=8" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5259,46 +5255,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -5319,49 +5275,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -5369,9 +5282,9 @@ "dev": true }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5383,30 +5296,20 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/@typescript-eslint/utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz", - "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.51.0.tgz", + "integrity": "sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/typescript-estree": "5.11.0", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5419,20 +5322,29 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz", - "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.51.0.tgz", + "integrity": "sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.11.0", - "eslint-visitor-keys": "^3.0.0" + "@typescript-eslint/types": "5.51.0", + "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -9724,18 +9636,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-plugin-import/node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-import/node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -10262,9 +10162,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -10411,18 +10311,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/glob-parent/node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint/node_modules/globals": { "version": "13.12.1", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", @@ -10447,15 +10335,6 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -11085,20 +10964,19 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", - "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-glob/node_modules/braces": { @@ -11933,6 +11811,12 @@ "integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/gud": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", @@ -12480,9 +12364,9 @@ } }, "node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" @@ -12921,9 +12805,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" @@ -18423,6 +18307,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/nearley": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.18.0.tgz", @@ -25646,9 +25536,9 @@ } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -27275,9 +27165,9 @@ }, "dependencies": { "@awesome-code-style/eslint-config": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@awesome-code-style/eslint-config/-/eslint-config-4.0.0.tgz", - "integrity": "sha512-hLtTlWXXNU/56e1hYCNsP6ptJco7G84kzKx13u1sXb7ORihfjGWV0NEMAG2dlRbBQlo63Oxefr5A5D0tHnBWXg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@awesome-code-style/eslint-config/-/eslint-config-4.1.0.tgz", + "integrity": "sha512-exq+8wS8mTM+2M6w7KR1ajVvYTH1jgR5nHR8XYa+qD2YoFSpE4bGgVugIm1+GlVFl8jkhy2erCiHyc97l8NOzA==", "dev": true, "requires": { "@typescript-eslint/parser": "^5.3.0" @@ -31312,9 +31202,9 @@ } }, "@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "@types/json5": { @@ -31474,6 +31364,12 @@ "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==", "dev": true }, + "@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -31508,26 +31404,27 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz", - "integrity": "sha512-HJh33bgzXe6jGRocOj4FmefD7hRY4itgjzOrSs3JPrTNXsX7j5+nQPciAUj/1nZtwo2kAc3C75jZO+T23gzSGw==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.51.0.tgz", + "integrity": "sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/type-utils": "5.11.0", - "@typescript-eslint/utils": "5.11.0", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/type-utils": "5.51.0", + "@typescript-eslint/utils": "5.51.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "dependencies": { "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -31540,9 +31437,9 @@ "dev": true }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -31551,21 +31448,21 @@ } }, "@typescript-eslint/parser": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.11.0.tgz", - "integrity": "sha512-x0DCjetHZYBRovJdr3U0zG9OOdNXUaFLJ82ehr1AlkArljJuwEsgnud+Q7umlGDFLFrs8tU8ybQDFocp/eX8mQ==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.51.0.tgz", + "integrity": "sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/typescript-estree": "5.11.0", - "debug": "^4.3.2" + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", + "debug": "^4.3.4" }, "dependencies": { "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -31580,30 +31477,31 @@ } }, "@typescript-eslint/scope-manager": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz", - "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.51.0.tgz", + "integrity": "sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0" + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0" } }, "@typescript-eslint/type-utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.11.0.tgz", - "integrity": "sha512-wDqdsYO6ofLaD4DsGZ0jGwxp4HrzD2YKulpEZXmgN3xo4BHJwf7kq49JTRpV0Gx6bxkSUmc9s0EIK1xPbFFpIA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.51.0.tgz", + "integrity": "sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.11.0", - "debug": "^4.3.2", + "@typescript-eslint/typescript-estree": "5.51.0", + "@typescript-eslint/utils": "5.51.0", + "debug": "^4.3.4", "tsutils": "^3.21.0" }, "dependencies": { "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -31618,23 +31516,23 @@ } }, "@typescript-eslint/types": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz", - "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.51.0.tgz", + "integrity": "sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz", - "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.51.0.tgz", + "integrity": "sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0", - "debug": "^4.3.2", - "globby": "^11.0.4", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0", + "debug": "^4.3.4", + "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "dependencies": { @@ -31644,55 +31542,15 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, - "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, "globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -31707,37 +31565,6 @@ "slash": "^3.0.0" } }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -31745,55 +31572,51 @@ "dev": true }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, "@typescript-eslint/utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz", - "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.51.0.tgz", + "integrity": "sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/typescript-estree": "5.11.0", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" }, "dependencies": { - "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } } } }, "@typescript-eslint/visitor-keys": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz", - "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.51.0.tgz", + "integrity": "sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.11.0", - "eslint-visitor-keys": "^3.0.0" + "@typescript-eslint/types": "5.51.0", + "eslint-visitor-keys": "^3.3.0" } }, "@webassemblyjs/ast": { @@ -35078,17 +34901,6 @@ "dev": true, "requires": { "is-glob": "^4.0.3" - }, - "dependencies": { - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - } } }, "globals": { @@ -35106,12 +34918,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -35406,15 +35212,6 @@ "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -35779,9 +35576,9 @@ } }, "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { @@ -36213,17 +36010,16 @@ "dev": true }, "fast-glob": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", - "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" }, "dependencies": { "braces": { @@ -36866,6 +36662,12 @@ "integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "gud": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", @@ -37311,9 +37113,9 @@ } }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "ignore-walk": { @@ -37633,9 +37435,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -41907,6 +41709,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "nearley": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.18.0.tgz", @@ -47403,9 +47211,9 @@ } }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "unbox-primitive": { diff --git a/web-console/package.json b/web-console/package.json index f0e16f720638..d5c6ba582767 100644 --- a/web-console/package.json +++ b/web-console/package.json @@ -104,7 +104,7 @@ "zustand": "^4.3.2" }, "devDependencies": { - "@awesome-code-style/eslint-config": "^4.0.0", + "@awesome-code-style/eslint-config": "^4.1.0", "@awesome-code-style/prettier-config": "^4.0.0", "@awesome-code-style/stylelint-config": "^4.0.0", "@babel/core": "^7.14.3", @@ -131,7 +131,8 @@ "@types/react-splitter-layout": "^3.0.0", "@types/react-table": "6.8.5", "@types/uuid": "^7.0.2", - "@typescript-eslint/eslint-plugin": "^5.11.0", + "@typescript-eslint/eslint-plugin": "^5.51.0", + "@typescript-eslint/parser": "^5.51.0", "autoprefixer": "^10.2.6", "babel-loader": "^8.2.2", "browserslist": "^4.16.6", @@ -168,7 +169,7 @@ "ts-jest": "^27.1.3", "ts-loader": "^8.1.0", "ts-node": "^10.9.1", - "typescript": "^4.5.5", + "typescript": "^4.9.5", "uuid": "^7.0.2", "webpack": "^5.33.2", "webpack-bundle-analyzer": "^4.4.1", diff --git a/web-console/src/bootstrap/react-table-defaults.tsx b/web-console/src/bootstrap/react-table-defaults.tsx index 89370866b212..42039b36da8b 100644 --- a/web-console/src/bootstrap/react-table-defaults.tsx +++ b/web-console/src/bootstrap/react-table-defaults.tsx @@ -17,7 +17,8 @@ */ import React from 'react'; -import { Filter, ReactTableDefaults } from 'react-table'; +import type { Filter } from 'react-table'; +import { ReactTableDefaults } from 'react-table'; import { Loader } from '../components'; import { diff --git a/web-console/src/components/action-cell/action-cell.tsx b/web-console/src/components/action-cell/action-cell.tsx index 0433eca2b08c..f241d2bf6e3c 100644 --- a/web-console/src/components/action-cell/action-cell.tsx +++ b/web-console/src/components/action-cell/action-cell.tsx @@ -21,7 +21,8 @@ import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; -import { BasicAction, basicActionsToMenu } from '../../utils/basic-action'; +import type { BasicAction } from '../../utils/basic-action'; +import { basicActionsToMenu } from '../../utils/basic-action'; import { ActionIcon } from '../action-icon/action-icon'; import './action-cell.scss'; diff --git a/web-console/src/components/action-icon/action-icon.tsx b/web-console/src/components/action-icon/action-icon.tsx index 6e16883a8989..023d89862278 100644 --- a/web-console/src/components/action-icon/action-icon.tsx +++ b/web-console/src/components/action-icon/action-icon.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Icon, IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Icon } from '@blueprintjs/core'; import classNames from 'classnames'; import React from 'react'; diff --git a/web-console/src/components/array-input/array-input.tsx b/web-console/src/components/array-input/array-input.tsx index b5b40c175495..c5a0ee1245dd 100644 --- a/web-console/src/components/array-input/array-input.tsx +++ b/web-console/src/components/array-input/array-input.tsx @@ -16,14 +16,16 @@ * limitations under the License. */ -import { Button, Intent, Position, TextArea } from '@blueprintjs/core'; +import type { Intent } from '@blueprintjs/core'; +import { Button, Position, TextArea } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import React, { useState } from 'react'; import { compact } from '../../utils'; -import { Suggestion, SuggestionMenu } from '../suggestion-menu/suggestion-menu'; +import type { Suggestion } from '../suggestion-menu/suggestion-menu'; +import { SuggestionMenu } from '../suggestion-menu/suggestion-menu'; import './array-input.scss'; diff --git a/web-console/src/components/auto-form/auto-form.tsx b/web-console/src/components/auto-form/auto-form.tsx index 146de61b6272..5c2a229a4f00 100644 --- a/web-console/src/components/auto-form/auto-form.tsx +++ b/web-console/src/components/auto-form/auto-form.tsx @@ -35,7 +35,7 @@ import { JsonInput } from '../json-input/json-input'; import { NumericInputWithDefault } from '../numeric-input-with-default/numeric-input-with-default'; import { PopoverText } from '../popover-text/popover-text'; import { SuggestibleInput } from '../suggestible-input/suggestible-input'; -import { Suggestion } from '../suggestion-menu/suggestion-menu'; +import type { Suggestion } from '../suggestion-menu/suggestion-menu'; import './auto-form.scss'; diff --git a/web-console/src/components/cell-filter-menu/cell-filter-menu.tsx b/web-console/src/components/cell-filter-menu/cell-filter-menu.tsx index 20d200b6f9f3..181c83e39c5d 100644 --- a/web-console/src/components/cell-filter-menu/cell-filter-menu.tsx +++ b/web-console/src/components/cell-filter-menu/cell-filter-menu.tsx @@ -18,20 +18,12 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { - C, - Column, - L, - SqlComparison, - SqlExpression, - SqlLiteral, - SqlQuery, - SqlRecord, - trimString, -} from 'druid-query-toolkit'; +import type { Column, SqlExpression, SqlQuery } from 'druid-query-toolkit'; +import { C, L, SqlComparison, SqlLiteral, SqlRecord, trimString } from 'druid-query-toolkit'; import React from 'react'; -import { copyAndAlert, prettyPrintSql, QueryAction, stringifyValue } from '../../utils'; +import type { QueryAction } from '../../utils'; +import { copyAndAlert, prettyPrintSql, stringifyValue } from '../../utils'; function sqlLiteralForColumnValue(column: Column, value: unknown): SqlLiteral | undefined { if (column.sqlType === 'TIMESTAMP') { diff --git a/web-console/src/components/center-message/center-message.tsx b/web-console/src/components/center-message/center-message.tsx index bc622769ae03..eeee622b31bc 100644 --- a/web-console/src/components/center-message/center-message.tsx +++ b/web-console/src/components/center-message/center-message.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import './center-message.scss'; diff --git a/web-console/src/components/date-range-selector/date-range-selector.tsx b/web-console/src/components/date-range-selector/date-range-selector.tsx index b58daecb3075..26da957114f3 100644 --- a/web-console/src/components/date-range-selector/date-range-selector.tsx +++ b/web-console/src/components/date-range-selector/date-range-selector.tsx @@ -17,7 +17,8 @@ */ import { Button, InputGroup, Popover, Position } from '@blueprintjs/core'; -import { DateRange, DateRangePicker } from '@blueprintjs/datetime'; +import type { DateRange } from '@blueprintjs/datetime'; +import { DateRangePicker } from '@blueprintjs/datetime'; import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; diff --git a/web-console/src/components/external-link/external-link.tsx b/web-console/src/components/external-link/external-link.tsx index f79d7507efe4..8ddd5a5630d3 100644 --- a/web-console/src/components/external-link/external-link.tsx +++ b/web-console/src/components/external-link/external-link.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; export interface ExternalLinkProps { href: string; diff --git a/web-console/src/components/fancy-tab-pane/fancy-tab-pane.tsx b/web-console/src/components/fancy-tab-pane/fancy-tab-pane.tsx index 500c0f24dc74..19576a22241e 100644 --- a/web-console/src/components/fancy-tab-pane/fancy-tab-pane.tsx +++ b/web-console/src/components/fancy-tab-pane/fancy-tab-pane.tsx @@ -34,9 +34,11 @@ * limitations under the License. */ -import { Button, Icon, IconName, Intent } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Button, Icon, Intent } from '@blueprintjs/core'; import classNames from 'classnames'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { filterMap } from '../../utils'; diff --git a/web-console/src/components/formatted-input/formatted-input.tsx b/web-console/src/components/formatted-input/formatted-input.tsx index aee9ddcea3a4..a8620e11c56f 100644 --- a/web-console/src/components/formatted-input/formatted-input.tsx +++ b/web-console/src/components/formatted-input/formatted-input.tsx @@ -16,12 +16,13 @@ * limitations under the License. */ -import { InputGroup, InputGroupProps2, Intent, TextArea } from '@blueprintjs/core'; +import type { InputGroupProps2 } from '@blueprintjs/core'; +import { InputGroup, Intent, TextArea } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import React, { useState } from 'react'; -import { Formatter } from '../../utils'; +import type { Formatter } from '../../utils'; import './formatted-input.scss'; diff --git a/web-console/src/components/interval-input/interval-input.tsx b/web-console/src/components/interval-input/interval-input.tsx index ccbe212dcc76..7cc441335641 100644 --- a/web-console/src/components/interval-input/interval-input.tsx +++ b/web-console/src/components/interval-input/interval-input.tsx @@ -16,8 +16,10 @@ * limitations under the License. */ -import { Button, InputGroup, Intent, Position } from '@blueprintjs/core'; -import { DateRange, DateRangePicker, TimePrecision } from '@blueprintjs/datetime'; +import type { Intent } from '@blueprintjs/core'; +import { Button, InputGroup, Position } from '@blueprintjs/core'; +import type { DateRange } from '@blueprintjs/datetime'; +import { DateRangePicker, TimePrecision } from '@blueprintjs/datetime'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; diff --git a/web-console/src/components/json-input/json-input.tsx b/web-console/src/components/json-input/json-input.tsx index 9539c718779a..e3467303e364 100644 --- a/web-console/src/components/json-input/json-input.tsx +++ b/web-console/src/components/json-input/json-input.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Ace } from 'ace-builds'; +import type { Ace } from 'ace-builds'; import classNames from 'classnames'; import Hjson from 'hjson'; import * as JSONBig from 'json-bigint-native'; diff --git a/web-console/src/components/menu-checkbox/menu-checkbox.tsx b/web-console/src/components/menu-checkbox/menu-checkbox.tsx index 33aa72b7d55b..d305249bdb16 100644 --- a/web-console/src/components/menu-checkbox/menu-checkbox.tsx +++ b/web-console/src/components/menu-checkbox/menu-checkbox.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { MenuItem, MenuItemProps } from '@blueprintjs/core'; +import type { MenuItemProps } from '@blueprintjs/core'; +import { MenuItem } from '@blueprintjs/core'; import classNames from 'classnames'; import React from 'react'; diff --git a/web-console/src/components/menu-tristate/menu-tristate.tsx b/web-console/src/components/menu-tristate/menu-tristate.tsx index 7f54d1a31949..783cdc7e8e3f 100644 --- a/web-console/src/components/menu-tristate/menu-tristate.tsx +++ b/web-console/src/components/menu-tristate/menu-tristate.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { MenuItem, MenuItemProps } from '@blueprintjs/core'; +import type { MenuItemProps } from '@blueprintjs/core'; +import { MenuItem } from '@blueprintjs/core'; import classNames from 'classnames'; import React from 'react'; diff --git a/web-console/src/components/numeric-input-with-default/numeric-input-with-default.tsx b/web-console/src/components/numeric-input-with-default/numeric-input-with-default.tsx index 7574f1d45ccf..d995384d5602 100644 --- a/web-console/src/components/numeric-input-with-default/numeric-input-with-default.tsx +++ b/web-console/src/components/numeric-input-with-default/numeric-input-with-default.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { HTMLInputProps, NumericInput, NumericInputProps } from '@blueprintjs/core'; +import type { HTMLInputProps, NumericInputProps } from '@blueprintjs/core'; +import { NumericInput } from '@blueprintjs/core'; import React, { useState } from 'react'; export type NumericInputWithDefaultProps = HTMLInputProps & NumericInputProps; diff --git a/web-console/src/components/query-error-pane/query-error-pane.tsx b/web-console/src/components/query-error-pane/query-error-pane.tsx index f2e23172dd94..3ddb722c34a9 100644 --- a/web-console/src/components/query-error-pane/query-error-pane.tsx +++ b/web-console/src/components/query-error-pane/query-error-pane.tsx @@ -18,7 +18,7 @@ import React, { useState } from 'react'; -import { DruidError, RowColumn } from '../../utils'; +import type { DruidError, RowColumn } from '../../utils'; import { HighlightText } from '../highlight-text/highlight-text'; import './query-error-pane.scss'; diff --git a/web-console/src/components/record-table-pane/record-table-pane.tsx b/web-console/src/components/record-table-pane/record-table-pane.tsx index e3f26ad18d53..b8629eb736cf 100644 --- a/web-console/src/components/record-table-pane/record-table-pane.tsx +++ b/web-console/src/components/record-table-pane/record-table-pane.tsx @@ -20,19 +20,20 @@ import { Button, Icon } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; -import { Column, QueryResult } from 'druid-query-toolkit'; +import type { Column, QueryResult } from 'druid-query-toolkit'; import React, { useEffect, useState } from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { ShowValueDialog } from '../../dialogs/show-value-dialog/show-value-dialog'; import { SMALL_TABLE_PAGE_SIZE, SMALL_TABLE_PAGE_SIZE_OPTIONS } from '../../react-table'; +import type { Pagination } from '../../utils'; import { columnToIcon, columnToWidth, filterMap, formatNumber, getNumericColumnBraces, - Pagination, } from '../../utils'; import { BracedText } from '../braced-text/braced-text'; import { CellFilterMenu } from '../cell-filter-menu/cell-filter-menu'; @@ -149,7 +150,7 @@ export const RecordTablePane = React.memo(function RecordTablePane(props: Record }, headerClassName: getHeaderClassName(h), accessor: String(i), - Cell(row) { + Cell(row: RowRenderProps) { const value = row.value; return (
diff --git a/web-console/src/components/refresh-button/refresh-button.tsx b/web-console/src/components/refresh-button/refresh-button.tsx index a21fe0b15020..d2c38ac506e0 100644 --- a/web-console/src/components/refresh-button/refresh-button.tsx +++ b/web-console/src/components/refresh-button/refresh-button.tsx @@ -19,8 +19,9 @@ import { IconNames } from '@blueprintjs/icons'; import React from 'react'; -import { LocalStorageKeys } from '../../utils'; -import { DelayLabel, TimedButton } from '../timed-button/timed-button'; +import type { LocalStorageKeys } from '../../utils'; +import type { DelayLabel } from '../timed-button/timed-button'; +import { TimedButton } from '../timed-button/timed-button'; const DELAYS: DelayLabel[] = [ { label: '5 seconds', delay: 5000 }, diff --git a/web-console/src/components/rule-editor/rule-editor.tsx b/web-console/src/components/rule-editor/rule-editor.tsx index 2556c891f532..7704adfe8b36 100644 --- a/web-console/src/components/rule-editor/rule-editor.tsx +++ b/web-console/src/components/rule-editor/rule-editor.tsx @@ -31,7 +31,8 @@ import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; import { durationSanitizer } from '../../utils'; -import { Rule, RuleUtil } from '../../utils/load-rule'; +import type { Rule } from '../../utils/load-rule'; +import { RuleUtil } from '../../utils/load-rule'; import { SuggestibleInput } from '../suggestible-input/suggestible-input'; import './rule-editor.scss'; diff --git a/web-console/src/components/segment-timeline/bar-group.tsx b/web-console/src/components/segment-timeline/bar-group.tsx index 442df4ba73c6..6c335d5c2892 100644 --- a/web-console/src/components/segment-timeline/bar-group.tsx +++ b/web-console/src/components/segment-timeline/bar-group.tsx @@ -16,11 +16,11 @@ * limitations under the License. */ -import { AxisScale } from 'd3-axis'; +import type { AxisScale } from 'd3-axis'; import React from 'react'; import { BarUnit } from './bar-unit'; -import { BarUnitData, HoveredBarInfo } from './stacked-bar-chart'; +import type { BarUnitData, HoveredBarInfo } from './stacked-bar-chart'; interface BarGroupProps { dataToRender: BarUnitData[]; diff --git a/web-console/src/components/segment-timeline/segment-timeline.tsx b/web-console/src/components/segment-timeline/segment-timeline.tsx index 006b84e66054..27fb9b9bfd65 100644 --- a/web-console/src/components/segment-timeline/segment-timeline.tsx +++ b/web-console/src/components/segment-timeline/segment-timeline.tsx @@ -16,19 +16,13 @@ * limitations under the License. */ -import { - FormGroup, - HTMLSelect, - IResizeEntry, - Radio, - RadioGroup, - ResizeSensor, -} from '@blueprintjs/core'; -import { AxisScale } from 'd3-axis'; +import type { IResizeEntry } from '@blueprintjs/core'; +import { FormGroup, HTMLSelect, Radio, RadioGroup, ResizeSensor } from '@blueprintjs/core'; +import type { AxisScale } from 'd3-axis'; import { scaleLinear, scaleUtc } from 'd3-scale'; import React from 'react'; -import { Capabilities } from '../../helpers'; +import type { Capabilities } from '../../helpers'; import { Api } from '../../singletons'; import { ceilToUtcDay, @@ -41,7 +35,8 @@ import { import { DateRangeSelector } from '../date-range-selector/date-range-selector'; import { Loader } from '../loader/loader'; -import { BarUnitData, StackedBarChart } from './stacked-bar-chart'; +import type { BarUnitData } from './stacked-bar-chart'; +import { StackedBarChart } from './stacked-bar-chart'; import './segment-timeline.scss'; diff --git a/web-console/src/components/segment-timeline/stacked-bar-chart.tsx b/web-console/src/components/segment-timeline/stacked-bar-chart.tsx index 8bac38b5c88d..4a0d1f4a5a7c 100644 --- a/web-console/src/components/segment-timeline/stacked-bar-chart.tsx +++ b/web-console/src/components/segment-timeline/stacked-bar-chart.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { axisBottom, axisLeft, AxisScale } from 'd3-axis'; +import type { AxisScale } from 'd3-axis'; +import { axisBottom, axisLeft } from 'd3-axis'; import React, { useState } from 'react'; import { BarGroup } from './bar-group'; diff --git a/web-console/src/components/show-history/show-history.tsx b/web-console/src/components/show-history/show-history.tsx index 303b37373434..72ae421d3377 100644 --- a/web-console/src/components/show-history/show-history.tsx +++ b/web-console/src/components/show-history/show-history.tsx @@ -21,7 +21,8 @@ import * as JSONBig from 'json-bigint-native'; import React, { useState } from 'react'; import { DiffDialog } from '../../dialogs'; -import { cleanSpec, IngestionSpec } from '../../druid-models'; +import type { IngestionSpec } from '../../druid-models'; +import { cleanSpec } from '../../druid-models'; import { useQueryManager } from '../../hooks'; import { Api } from '../../singletons'; import { deepSet } from '../../utils'; diff --git a/web-console/src/components/suggestible-input/suggestible-input.tsx b/web-console/src/components/suggestible-input/suggestible-input.tsx index 10c7d9118614..3eac810730fe 100644 --- a/web-console/src/components/suggestible-input/suggestible-input.tsx +++ b/web-console/src/components/suggestible-input/suggestible-input.tsx @@ -23,8 +23,10 @@ import classNames from 'classnames'; import React, { useRef } from 'react'; import { JSON_STRING_FORMATTER } from '../../utils'; -import { FormattedInput, FormattedInputProps } from '../formatted-input/formatted-input'; -import { Suggestion, SuggestionMenu } from '../suggestion-menu/suggestion-menu'; +import type { FormattedInputProps } from '../formatted-input/formatted-input'; +import { FormattedInput } from '../formatted-input/formatted-input'; +import type { Suggestion } from '../suggestion-menu/suggestion-menu'; +import { SuggestionMenu } from '../suggestion-menu/suggestion-menu'; export interface SuggestibleInputProps extends Omit { onFinalize?: () => void; diff --git a/web-console/src/components/table-clickable-cell/table-clickable-cell.tsx b/web-console/src/components/table-clickable-cell/table-clickable-cell.tsx index 7e4c66fdd5e5..fa3d56982a9d 100644 --- a/web-console/src/components/table-clickable-cell/table-clickable-cell.tsx +++ b/web-console/src/components/table-clickable-cell/table-clickable-cell.tsx @@ -16,9 +16,11 @@ * limitations under the License. */ -import { Icon, IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Icon } from '@blueprintjs/core'; import classNames from 'classnames'; -import React, { MouseEventHandler, ReactNode } from 'react'; +import type { MouseEventHandler, ReactNode } from 'react'; +import React from 'react'; import './table-clickable-cell.scss'; diff --git a/web-console/src/components/table-filterable-cell/table-filterable-cell.tsx b/web-console/src/components/table-filterable-cell/table-filterable-cell.tsx index 14f568013f09..f29cc42a49a3 100644 --- a/web-console/src/components/table-filterable-cell/table-filterable-cell.tsx +++ b/web-console/src/components/table-filterable-cell/table-filterable-cell.tsx @@ -18,10 +18,12 @@ import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; -import React, { ReactNode } from 'react'; -import { Filter } from 'react-table'; +import type { ReactNode } from 'react'; +import React from 'react'; +import type { Filter } from 'react-table'; -import { addFilter, FilterMode, filterModeToIcon } from '../../react-table'; +import type { FilterMode } from '../../react-table'; +import { addFilter, filterModeToIcon } from '../../react-table'; import { Deferred } from '../deferred/deferred'; import './table-filterable-cell.scss'; diff --git a/web-console/src/components/timed-button/timed-button.tsx b/web-console/src/components/timed-button/timed-button.tsx index 49ac9063dbed..0b339a8d0e55 100644 --- a/web-console/src/components/timed-button/timed-button.tsx +++ b/web-console/src/components/timed-button/timed-button.tsx @@ -16,14 +16,16 @@ * limitations under the License. */ -import { Button, ButtonGroup, ButtonProps, Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; +import type { ButtonProps } from '@blueprintjs/core'; +import { Button, ButtonGroup, Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import React, { useState } from 'react'; import { useInterval } from '../../hooks'; -import { isInBackground, localStorageGet, LocalStorageKeys, localStorageSet } from '../../utils'; +import type { LocalStorageKeys } from '../../utils'; +import { isInBackground, localStorageGet, localStorageSet } from '../../utils'; export interface DelayLabel { label: string; diff --git a/web-console/src/components/view-control-bar/view-control-bar.tsx b/web-console/src/components/view-control-bar/view-control-bar.tsx index 435ecf8f5cf0..c83867f27c6a 100644 --- a/web-console/src/components/view-control-bar/view-control-bar.tsx +++ b/web-console/src/components/view-control-bar/view-control-bar.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import './view-control-bar.scss'; diff --git a/web-console/src/components/warning-checklist/warning-checklist.tsx b/web-console/src/components/warning-checklist/warning-checklist.tsx index 5c74cbdb08a0..351203fe7272 100644 --- a/web-console/src/components/warning-checklist/warning-checklist.tsx +++ b/web-console/src/components/warning-checklist/warning-checklist.tsx @@ -17,7 +17,8 @@ */ import { Switch } from '@blueprintjs/core'; -import React, { ReactNode, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { useState } from 'react'; export interface WarningChecklistProps { checks: ReactNode[]; diff --git a/web-console/src/console-application.tsx b/web-console/src/console-application.tsx index 24947636d6f1..1ddd3676b4cd 100644 --- a/web-console/src/console-application.tsx +++ b/web-console/src/console-application.tsx @@ -20,11 +20,13 @@ import { HotkeysProvider, Intent } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import classNames from 'classnames'; import React from 'react'; -import { Redirect, RouteComponentProps } from 'react-router'; +import type { RouteComponentProps } from 'react-router'; +import { Redirect } from 'react-router'; import { HashRouter, Route, Switch } from 'react-router-dom'; -import { HeaderActiveTab, HeaderBar, Loader } from './components'; -import { DruidEngine, QueryWithContext } from './druid-models'; +import type { HeaderActiveTab } from './components'; +import { HeaderBar, Loader } from './components'; +import type { DruidEngine, QueryWithContext } from './druid-models'; import { Capabilities } from './helpers'; import { AppToaster } from './singletons'; import { localStorageGetJson, LocalStorageKeys, QueryManager } from './utils'; diff --git a/web-console/src/dialogs/async-action-dialog/async-action-dialog.tsx b/web-console/src/dialogs/async-action-dialog/async-action-dialog.tsx index 0d8cf385a5b6..e36ae5112713 100644 --- a/web-console/src/dialogs/async-action-dialog/async-action-dialog.tsx +++ b/web-console/src/dialogs/async-action-dialog/async-action-dialog.tsx @@ -16,19 +16,12 @@ * limitations under the License. */ -import { - Button, - Classes, - Dialog, - FormGroup, - Icon, - IconName, - Intent, - ProgressBar, -} from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Button, Classes, Dialog, FormGroup, Icon, Intent, ProgressBar } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import classNames from 'classnames'; -import React, { ReactNode, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { useState } from 'react'; import { WarningChecklist } from '../../components'; import { AppToaster } from '../../singletons'; @@ -132,7 +125,7 @@ export const AsyncActionDialog = React.memo(function AsyncActionDialog(
diff --git a/web-console/src/dialogs/coordinator-dynamic-config-dialog/coordinator-dynamic-config-dialog.tsx b/web-console/src/dialogs/coordinator-dynamic-config-dialog/coordinator-dynamic-config-dialog.tsx index 7fa8925220f2..118f53aef541 100644 --- a/web-console/src/dialogs/coordinator-dynamic-config-dialog/coordinator-dynamic-config-dialog.tsx +++ b/web-console/src/dialogs/coordinator-dynamic-config-dialog/coordinator-dynamic-config-dialog.tsx @@ -20,15 +20,10 @@ import { Intent } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; -import { - AutoForm, - ExternalLink, - FormJsonSelector, - FormJsonTabs, - JsonInput, - Loader, -} from '../../components'; -import { COORDINATOR_DYNAMIC_CONFIG_FIELDS, CoordinatorDynamicConfig } from '../../druid-models'; +import type { FormJsonTabs } from '../../components'; +import { AutoForm, ExternalLink, FormJsonSelector, JsonInput, Loader } from '../../components'; +import type { CoordinatorDynamicConfig } from '../../druid-models'; +import { COORDINATOR_DYNAMIC_CONFIG_FIELDS } from '../../druid-models'; import { useQueryManager } from '../../hooks'; import { getLink } from '../../links'; import { Api, AppToaster } from '../../singletons'; @@ -102,7 +97,7 @@ export const CoordinatorDynamicConfigDialog = React.memo(function CoordinatorDyn void saveConfig(comment)} onClose={onClose} title="Coordinator dynamic config" historyRecords={historyRecordsState.data} diff --git a/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.spec.tsx b/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.spec.tsx index 795b274d5948..baf74e752843 100644 --- a/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.spec.tsx +++ b/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.spec.tsx @@ -21,7 +21,8 @@ import React from 'react'; import { QueryState } from '../../../utils'; -import { DatasourceColumnsTable, DatasourceColumnsTableRow } from './datasource-columns-table'; +import type { DatasourceColumnsTableRow } from './datasource-columns-table'; +import { DatasourceColumnsTable } from './datasource-columns-table'; let columnsState: QueryState = QueryState.INIT; jest.mock('../../../hooks', () => { diff --git a/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.tsx b/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.tsx index 242ca1937831..e9b4f7a6aeeb 100644 --- a/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.tsx +++ b/web-console/src/dialogs/datasource-table-action-dialog/datasource-columns-table/datasource-columns-table.tsx @@ -23,7 +23,8 @@ import ReactTable from 'react-table'; import { Loader } from '../../../components'; import { useQueryManager } from '../../../hooks'; import { SMALL_TABLE_PAGE_SIZE, SMALL_TABLE_PAGE_SIZE_OPTIONS } from '../../../react-table'; -import { ColumnMetadata, queryDruidSql } from '../../../utils'; +import type { ColumnMetadata } from '../../../utils'; +import { queryDruidSql } from '../../../utils'; import './datasource-columns-table.scss'; diff --git a/web-console/src/dialogs/datasource-table-action-dialog/datasource-preview-pane/datasource-preview-pane.tsx b/web-console/src/dialogs/datasource-table-action-dialog/datasource-preview-pane/datasource-preview-pane.tsx index 8f3d664e93ca..c48cbfa51989 100644 --- a/web-console/src/dialogs/datasource-table-action-dialog/datasource-preview-pane/datasource-preview-pane.tsx +++ b/web-console/src/dialogs/datasource-table-action-dialog/datasource-preview-pane/datasource-preview-pane.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { QueryResult, QueryRunner, T } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; +import { QueryRunner, T } from 'druid-query-toolkit'; import React from 'react'; import { Loader, RecordTablePane } from '../../../components'; diff --git a/web-console/src/dialogs/datasource-table-action-dialog/datasource-table-action-dialog.tsx b/web-console/src/dialogs/datasource-table-action-dialog/datasource-table-action-dialog.tsx index ae1698514b54..b18d0dafe63e 100644 --- a/web-console/src/dialogs/datasource-table-action-dialog/datasource-table-action-dialog.tsx +++ b/web-console/src/dialogs/datasource-table-action-dialog/datasource-table-action-dialog.tsx @@ -19,8 +19,9 @@ import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; -import { BasicAction } from '../../utils/basic-action'; -import { SideButtonMetaData, TableActionDialog } from '../table-action-dialog/table-action-dialog'; +import type { BasicAction } from '../../utils/basic-action'; +import type { SideButtonMetaData } from '../table-action-dialog/table-action-dialog'; +import { TableActionDialog } from '../table-action-dialog/table-action-dialog'; import { DatasourceColumnsTable } from './datasource-columns-table/datasource-columns-table'; import { DatasourcePreviewPane } from './datasource-preview-pane/datasource-preview-pane'; diff --git a/web-console/src/dialogs/diff-dialog/diff-dialog.tsx b/web-console/src/dialogs/diff-dialog/diff-dialog.tsx index 702c62b671ba..bb42f1db8471 100644 --- a/web-console/src/dialogs/diff-dialog/diff-dialog.tsx +++ b/web-console/src/dialogs/diff-dialog/diff-dialog.tsx @@ -19,7 +19,8 @@ import { Button, Classes, Dialog, HTMLSelect } from '@blueprintjs/core'; import * as JSONBig from 'json-bigint-native'; import React, { useState } from 'react'; -import ReactDiffViewer, { ReactDiffViewerStylesOverride } from 'react-diff-viewer'; +import type { ReactDiffViewerStylesOverride } from 'react-diff-viewer'; +import ReactDiffViewer from 'react-diff-viewer'; import './diff-dialog.scss'; diff --git a/web-console/src/dialogs/doctor-dialog/doctor-dialog.tsx b/web-console/src/dialogs/doctor-dialog/doctor-dialog.tsx index 3b262976382c..47070bb7bd21 100644 --- a/web-console/src/dialogs/doctor-dialog/doctor-dialog.tsx +++ b/web-console/src/dialogs/doctor-dialog/doctor-dialog.tsx @@ -168,7 +168,7 @@ export class DoctorDialog extends React.PureComponent this.doChecks()} + onClick={() => void this.doChecks()} /> ); diff --git a/web-console/src/dialogs/edit-context-dialog/edit-context-dialog.tsx b/web-console/src/dialogs/edit-context-dialog/edit-context-dialog.tsx index 5eb85d560823..3632606508e6 100644 --- a/web-console/src/dialogs/edit-context-dialog/edit-context-dialog.tsx +++ b/web-console/src/dialogs/edit-context-dialog/edit-context-dialog.tsx @@ -21,7 +21,7 @@ import Hjson from 'hjson'; import * as JSONBig from 'json-bigint-native'; import React, { useState } from 'react'; -import { QueryContext } from '../../druid-models'; +import type { QueryContext } from '../../druid-models'; import './edit-context-dialog.scss'; diff --git a/web-console/src/dialogs/index-spec-dialog/index-spec-dialog.tsx b/web-console/src/dialogs/index-spec-dialog/index-spec-dialog.tsx index 4c870df45af2..daa9e0606997 100644 --- a/web-console/src/dialogs/index-spec-dialog/index-spec-dialog.tsx +++ b/web-console/src/dialogs/index-spec-dialog/index-spec-dialog.tsx @@ -19,8 +19,10 @@ import { Button, Classes, Dialog, Intent } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { AutoForm, FormJsonSelector, FormJsonTabs, JsonInput } from '../../components'; -import { INDEX_SPEC_FIELDS, IndexSpec } from '../../druid-models'; +import type { FormJsonTabs } from '../../components'; +import { AutoForm, FormJsonSelector, JsonInput } from '../../components'; +import type { IndexSpec } from '../../druid-models'; +import { INDEX_SPEC_FIELDS } from '../../druid-models'; import './index-spec-dialog.scss'; diff --git a/web-console/src/dialogs/lookup-edit-dialog/lookup-edit-dialog.tsx b/web-console/src/dialogs/lookup-edit-dialog/lookup-edit-dialog.tsx index fb70c6c72a42..0903ede6f968 100644 --- a/web-console/src/dialogs/lookup-edit-dialog/lookup-edit-dialog.tsx +++ b/web-console/src/dialogs/lookup-edit-dialog/lookup-edit-dialog.tsx @@ -27,8 +27,10 @@ import { } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { AutoForm, FormJsonSelector, FormJsonTabs, JsonInput } from '../../components'; -import { isLookupInvalid, LOOKUP_FIELDS, LookupSpec } from '../../druid-models'; +import type { FormJsonTabs } from '../../components'; +import { AutoForm, FormJsonSelector, JsonInput } from '../../components'; +import type { LookupSpec } from '../../druid-models'; +import { isLookupInvalid, LOOKUP_FIELDS } from '../../druid-models'; import './lookup-edit-dialog.scss'; diff --git a/web-console/src/dialogs/lookup-table-action-dialog/lookup-table-action-dialog.tsx b/web-console/src/dialogs/lookup-table-action-dialog/lookup-table-action-dialog.tsx index e896d31f7ff7..9b655bac6453 100644 --- a/web-console/src/dialogs/lookup-table-action-dialog/lookup-table-action-dialog.tsx +++ b/web-console/src/dialogs/lookup-table-action-dialog/lookup-table-action-dialog.tsx @@ -18,8 +18,9 @@ import React, { useState } from 'react'; -import { BasicAction } from '../../utils/basic-action'; -import { SideButtonMetaData, TableActionDialog } from '../table-action-dialog/table-action-dialog'; +import type { BasicAction } from '../../utils/basic-action'; +import type { SideButtonMetaData } from '../table-action-dialog/table-action-dialog'; +import { TableActionDialog } from '../table-action-dialog/table-action-dialog'; import { LookupValuesTable } from './lookup-values-table/lookup-values-table'; diff --git a/web-console/src/dialogs/overlord-dynamic-config-dialog/overlord-dynamic-config-dialog.tsx b/web-console/src/dialogs/overlord-dynamic-config-dialog/overlord-dynamic-config-dialog.tsx index 76b280845022..65b32d3b430f 100644 --- a/web-console/src/dialogs/overlord-dynamic-config-dialog/overlord-dynamic-config-dialog.tsx +++ b/web-console/src/dialogs/overlord-dynamic-config-dialog/overlord-dynamic-config-dialog.tsx @@ -21,7 +21,8 @@ import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; import { AutoForm, ExternalLink, Loader } from '../../components'; -import { OVERLORD_DYNAMIC_CONFIG_FIELDS, OverlordDynamicConfig } from '../../druid-models'; +import type { OverlordDynamicConfig } from '../../druid-models'; +import { OVERLORD_DYNAMIC_CONFIG_FIELDS } from '../../druid-models'; import { useQueryManager } from '../../hooks'; import { getLink } from '../../links'; import { Api, AppToaster } from '../../singletons'; diff --git a/web-console/src/dialogs/retention-dialog/retention-dialog.tsx b/web-console/src/dialogs/retention-dialog/retention-dialog.tsx index a09816955e29..723bf23b9be0 100644 --- a/web-console/src/dialogs/retention-dialog/retention-dialog.tsx +++ b/web-console/src/dialogs/retention-dialog/retention-dialog.tsx @@ -25,7 +25,8 @@ import { useQueryManager } from '../../hooks'; import { getLink } from '../../links'; import { Api } from '../../singletons'; import { swapElements } from '../../utils'; -import { Rule, RuleUtil } from '../../utils/load-rule'; +import type { Rule } from '../../utils/load-rule'; +import { RuleUtil } from '../../utils/load-rule'; import { SnitchDialog } from '..'; import './retention-dialog.scss'; @@ -37,7 +38,7 @@ export interface RetentionDialogProps { tiers: string[]; onEditDefaults: () => void; onCancel: () => void; - onSave: (datasource: string, newRules: Rule[], comment: string) => void; + onSave: (datasource: string, newRules: Rule[], comment: string) => void | Promise; } export const RetentionDialog = React.memo(function RetentionDialog(props: RetentionDialogProps) { @@ -58,7 +59,7 @@ export const RetentionDialog = React.memo(function RetentionDialog(props: Retent function saveHandler(comment: string) { const { datasource, onSave } = props; - onSave(datasource, currentRules, comment); + void onSave(datasource, currentRules, comment); } function addRule() { diff --git a/web-console/src/dialogs/segments-table-action-dialog/segment-table-action-dialog.tsx b/web-console/src/dialogs/segments-table-action-dialog/segment-table-action-dialog.tsx index cd031f3881a6..ac64decd5d7c 100644 --- a/web-console/src/dialogs/segments-table-action-dialog/segment-table-action-dialog.tsx +++ b/web-console/src/dialogs/segments-table-action-dialog/segment-table-action-dialog.tsx @@ -21,8 +21,9 @@ import React, { useState } from 'react'; import { ShowJson } from '../../components'; import { Api } from '../../singletons'; -import { BasicAction } from '../../utils/basic-action'; -import { SideButtonMetaData, TableActionDialog } from '../table-action-dialog/table-action-dialog'; +import type { BasicAction } from '../../utils/basic-action'; +import type { SideButtonMetaData } from '../table-action-dialog/table-action-dialog'; +import { TableActionDialog } from '../table-action-dialog/table-action-dialog'; import { SegmentsPreviewPane } from './segments-preview-pane/segments-preview-pane'; diff --git a/web-console/src/dialogs/segments-table-action-dialog/segments-preview-pane/segments-preview-pane.tsx b/web-console/src/dialogs/segments-table-action-dialog/segments-preview-pane/segments-preview-pane.tsx index 6c5ace1c5fa4..2925482d9901 100644 --- a/web-console/src/dialogs/segments-table-action-dialog/segments-preview-pane/segments-preview-pane.tsx +++ b/web-console/src/dialogs/segments-table-action-dialog/segments-preview-pane/segments-preview-pane.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { QueryResult, QueryRunner } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; +import { QueryRunner } from 'druid-query-toolkit'; import React from 'react'; import { Loader, RecordTablePane } from '../../../components'; diff --git a/web-console/src/dialogs/snitch-dialog/snitch-dialog.tsx b/web-console/src/dialogs/snitch-dialog/snitch-dialog.tsx index 2d2e4756ad83..3eb8e89d5540 100644 --- a/web-console/src/dialogs/snitch-dialog/snitch-dialog.tsx +++ b/web-console/src/dialogs/snitch-dialog/snitch-dialog.tsx @@ -28,7 +28,7 @@ import './snitch-dialog.scss'; export interface SnitchDialogProps { title: string; className?: string; - onSave: (comment: string) => void; + onSave: (comment: string) => void | Promise; saveDisabled?: boolean; onReset?: () => void; onClose: () => void; @@ -56,7 +56,7 @@ export class SnitchDialog extends React.PureComponent void; + onSubmit: (spec: JSON) => void | Promise; onClose: () => void; title: string; initSpec?: any; @@ -40,7 +40,7 @@ export const SpecDialog = React.memo(function SpecDialog(props: SpecDialogProps) function postSpec(): void { if (!validJson(spec)) return; - onSubmit(JSON.parse(spec)); + void onSubmit(JSON.parse(spec)); onClose(); } diff --git a/web-console/src/dialogs/status-dialog/status-dialog.tsx b/web-console/src/dialogs/status-dialog/status-dialog.tsx index c7da95e424f6..e59af0d9f143 100644 --- a/web-console/src/dialogs/status-dialog/status-dialog.tsx +++ b/web-console/src/dialogs/status-dialog/status-dialog.tsx @@ -18,7 +18,8 @@ import { Button, Classes, Dialog, Intent } from '@blueprintjs/core'; import React, { useState } from 'react'; -import ReactTable, { Filter } from 'react-table'; +import type { Filter } from 'react-table'; +import ReactTable from 'react-table'; import { Loader, TableFilterableCell } from '../../components'; import { useQueryManager } from '../../hooks'; diff --git a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.spec.tsx b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.spec.tsx index ac71cd5a2c7f..19b36361f04b 100644 --- a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.spec.tsx +++ b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.spec.tsx @@ -21,10 +21,10 @@ import React from 'react'; import { QueryState } from '../../../utils'; +import type { SupervisorStatisticsTableRow } from './supervisor-statistics-table'; import { normalizeSupervisorStatisticsResults, SupervisorStatisticsTable, - SupervisorStatisticsTableRow, } from './supervisor-statistics-table'; let supervisorStatisticsState: QueryState = QueryState.INIT; diff --git a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx index 48c2f3f88a99..09749f852531 100644 --- a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx +++ b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx @@ -18,7 +18,8 @@ import { Button, ButtonGroup } from '@blueprintjs/core'; import React from 'react'; -import ReactTable, { CellInfo, Column } from 'react-table'; +import type { CellInfo, Column } from 'react-table'; +import ReactTable from 'react-table'; import { Loader } from '../../../components/loader/loader'; import { useQueryManager } from '../../../hooks'; diff --git a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-table-action-dialog.tsx b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-table-action-dialog.tsx index fba476fdced9..2262859664f7 100644 --- a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-table-action-dialog.tsx +++ b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-table-action-dialog.tsx @@ -23,8 +23,9 @@ import { ShowHistory } from '../../components/show-history/show-history'; import { cleanSpec } from '../../druid-models'; import { Api } from '../../singletons'; import { deepGet } from '../../utils'; -import { BasicAction } from '../../utils/basic-action'; -import { SideButtonMetaData, TableActionDialog } from '../table-action-dialog/table-action-dialog'; +import type { BasicAction } from '../../utils/basic-action'; +import type { SideButtonMetaData } from '../table-action-dialog/table-action-dialog'; +import { TableActionDialog } from '../table-action-dialog/table-action-dialog'; import { SupervisorStatisticsTable } from './supervisor-statistics-table/supervisor-statistics-table'; diff --git a/web-console/src/dialogs/table-action-dialog/table-action-dialog.tsx b/web-console/src/dialogs/table-action-dialog/table-action-dialog.tsx index d66b747afb4a..500bbb0f3a56 100644 --- a/web-console/src/dialogs/table-action-dialog/table-action-dialog.tsx +++ b/web-console/src/dialogs/table-action-dialog/table-action-dialog.tsx @@ -16,12 +16,15 @@ * limitations under the License. */ -import { Button, Classes, Dialog, Icon, IconName, Intent } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Button, Classes, Dialog, Icon, Intent } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; -import { BasicAction, basicActionsToMenu } from '../../utils/basic-action'; +import type { BasicAction } from '../../utils/basic-action'; +import { basicActionsToMenu } from '../../utils/basic-action'; import './table-action-dialog.scss'; diff --git a/web-console/src/dialogs/task-table-action-dialog/task-table-action-dialog.tsx b/web-console/src/dialogs/task-table-action-dialog/task-table-action-dialog.tsx index 40b84a379330..a0a5dbbf13fd 100644 --- a/web-console/src/dialogs/task-table-action-dialog/task-table-action-dialog.tsx +++ b/web-console/src/dialogs/task-table-action-dialog/task-table-action-dialog.tsx @@ -21,8 +21,9 @@ import React, { useState } from 'react'; import { ShowJson, ShowLog } from '../../components'; import { Api } from '../../singletons'; import { deepGet } from '../../utils'; -import { BasicAction } from '../../utils/basic-action'; -import { SideButtonMetaData, TableActionDialog } from '../table-action-dialog/table-action-dialog'; +import type { BasicAction } from '../../utils/basic-action'; +import type { SideButtonMetaData } from '../table-action-dialog/table-action-dialog'; +import { TableActionDialog } from '../table-action-dialog/table-action-dialog'; interface TaskTableActionDialogProps { taskId: string; diff --git a/web-console/src/druid-models/compaction-config/compaction-config.tsx b/web-console/src/druid-models/compaction-config/compaction-config.tsx index b03b66ea0ead..f3c151e5ca93 100644 --- a/web-console/src/druid-models/compaction-config/compaction-config.tsx +++ b/web-console/src/druid-models/compaction-config/compaction-config.tsx @@ -19,7 +19,7 @@ import { Code } from '@blueprintjs/core'; import React from 'react'; -import { Field } from '../../components'; +import type { Field } from '../../components'; import { deepGet, deepSet, oneOf } from '../../utils'; export interface CompactionConfig { diff --git a/web-console/src/druid-models/compaction-status/compaction-status.spec.ts b/web-console/src/druid-models/compaction-status/compaction-status.spec.ts index abe660e5c26d..84b1c5f501a6 100644 --- a/web-console/src/druid-models/compaction-status/compaction-status.spec.ts +++ b/web-console/src/druid-models/compaction-status/compaction-status.spec.ts @@ -16,9 +16,10 @@ * limitations under the License. */ -import { CompactionConfig } from '../compaction-config/compaction-config'; +import type { CompactionConfig } from '../compaction-config/compaction-config'; -import { CompactionStatus, formatCompactionInfo, zeroCompactionStatus } from './compaction-status'; +import type { CompactionStatus } from './compaction-status'; +import { formatCompactionInfo, zeroCompactionStatus } from './compaction-status'; describe('compaction status', () => { const BASIC_CONFIG: CompactionConfig = { diff --git a/web-console/src/druid-models/compaction-status/compaction-status.ts b/web-console/src/druid-models/compaction-status/compaction-status.ts index c19cb26b6c2a..494918182d46 100644 --- a/web-console/src/druid-models/compaction-status/compaction-status.ts +++ b/web-console/src/druid-models/compaction-status/compaction-status.ts @@ -17,10 +17,8 @@ */ import { formatBytesCompact, pluralIfNeeded } from '../../utils'; -import { - CompactionConfig, - compactionConfigHasLegacyInputSegmentSizeBytesSet, -} from '../compaction-config/compaction-config'; +import type { CompactionConfig } from '../compaction-config/compaction-config'; +import { compactionConfigHasLegacyInputSegmentSizeBytesSet } from '../compaction-config/compaction-config'; function capitalizeFirst(str: string): string { return str.slice(0, 1).toUpperCase() + str.slice(1).toLowerCase(); diff --git a/web-console/src/druid-models/coordinator-dynamic-config/coordinator-dynamic-config.tsx b/web-console/src/druid-models/coordinator-dynamic-config/coordinator-dynamic-config.tsx index ca957309ff83..1d1ad2c30bae 100644 --- a/web-console/src/druid-models/coordinator-dynamic-config/coordinator-dynamic-config.tsx +++ b/web-console/src/druid-models/coordinator-dynamic-config/coordinator-dynamic-config.tsx @@ -19,7 +19,7 @@ import { Code } from '@blueprintjs/core'; import React from 'react'; -import { Field } from '../../components'; +import type { Field } from '../../components'; export interface CoordinatorDynamicConfig { maxSegmentsToMove?: number; diff --git a/web-console/src/druid-models/dimension-spec/dimension-spec.ts b/web-console/src/druid-models/dimension-spec/dimension-spec.ts index 04144d545de2..d679dc91d3ea 100644 --- a/web-console/src/druid-models/dimension-spec/dimension-spec.ts +++ b/web-console/src/druid-models/dimension-spec/dimension-spec.ts @@ -16,9 +16,9 @@ * limitations under the License. */ -import { Field } from '../../components'; +import type { Field } from '../../components'; import { filterMap, typeIs } from '../../utils'; -import { SampleHeaderAndRows } from '../../utils/sampler'; +import type { SampleHeaderAndRows } from '../../utils/sampler'; import { guessColumnTypeFromHeaderAndRows } from '../ingestion-spec/ingestion-spec'; export interface DimensionsSpec { diff --git a/web-console/src/druid-models/execution/execution.ts b/web-console/src/druid-models/execution/execution.ts index 32c8e62056ef..9388d492834c 100644 --- a/web-console/src/druid-models/execution/execution.ts +++ b/web-console/src/druid-models/execution/execution.ts @@ -26,8 +26,9 @@ import { oneOf, pluralIfNeeded, } from '../../utils'; -import { DruidEngine, validDruidEngine } from '../druid-engine/druid-engine'; -import { QueryContext } from '../query-context/query-context'; +import type { DruidEngine } from '../druid-engine/druid-engine'; +import { validDruidEngine } from '../druid-engine/druid-engine'; +import type { QueryContext } from '../query-context/query-context'; import { Stages } from '../stages/stages'; const IGNORE_CONTEXT_KEYS = [ diff --git a/web-console/src/druid-models/external-config/external-config.ts b/web-console/src/druid-models/external-config/external-config.ts index 900551741ca6..012c7eef4791 100644 --- a/web-console/src/druid-models/external-config/external-config.ts +++ b/web-console/src/druid-models/external-config/external-config.ts @@ -16,6 +16,7 @@ * limitations under the License. */ +import type { SqlQuery } from 'druid-query-toolkit'; import { C, F, @@ -24,14 +25,13 @@ import { SqlExpression, SqlFunction, SqlLiteral, - SqlQuery, SqlStar, } from 'druid-query-toolkit'; import * as JSONBig from 'json-bigint-native'; import { nonEmptyArray } from '../../utils'; -import { InputFormat } from '../input-format/input-format'; -import { InputSource } from '../input-source/input-source'; +import type { InputFormat } from '../input-format/input-format'; +import type { InputSource } from '../input-source/input-source'; export const MULTI_STAGE_QUERY_MAX_COLUMNS = 2000; const MAX_LINES = 10; diff --git a/web-console/src/druid-models/filter/filter.tsx b/web-console/src/druid-models/filter/filter.tsx index 35b09a68c42a..e577687ec2f2 100644 --- a/web-console/src/druid-models/filter/filter.tsx +++ b/web-console/src/druid-models/filter/filter.tsx @@ -18,10 +18,11 @@ import React from 'react'; -import { ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { ExternalLink } from '../../components'; import { getLink } from '../../links'; import { deepGet, EMPTY_ARRAY, oneOf, typeIs } from '../../utils'; -import { IngestionSpec } from '../ingestion-spec/ingestion-spec'; +import type { IngestionSpec } from '../ingestion-spec/ingestion-spec'; export interface DruidFilter { readonly type: string; diff --git a/web-console/src/druid-models/flatten-spec/flatten-spec.tsx b/web-console/src/druid-models/flatten-spec/flatten-spec.tsx index 5cf1d7c06c61..878f77331d36 100644 --- a/web-console/src/druid-models/flatten-spec/flatten-spec.tsx +++ b/web-console/src/druid-models/flatten-spec/flatten-spec.tsx @@ -18,7 +18,8 @@ import React from 'react'; -import { ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { ExternalLink } from '../../components'; import { getLink } from '../../links'; import { typeIs } from '../../utils'; diff --git a/web-console/src/druid-models/index-spec/index-spec.tsx b/web-console/src/druid-models/index-spec/index-spec.tsx index 1a4246299661..b725948ad4a0 100644 --- a/web-console/src/druid-models/index-spec/index-spec.tsx +++ b/web-console/src/druid-models/index-spec/index-spec.tsx @@ -19,7 +19,7 @@ import { Code } from '@blueprintjs/core'; import React from 'react'; -import { Field } from '../../components'; +import type { Field } from '../../components'; import { deepGet } from '../../utils'; export interface IndexSpec { diff --git a/web-console/src/druid-models/ingest-query-pattern/ingest-query-pattern.ts b/web-console/src/druid-models/ingest-query-pattern/ingest-query-pattern.ts index 7bdcaae50ab2..9cb7d06725b0 100644 --- a/web-console/src/druid-models/ingest-query-pattern/ingest-query-pattern.ts +++ b/web-console/src/druid-models/ingest-query-pattern/ingest-query-pattern.ts @@ -28,8 +28,8 @@ import { } from 'druid-query-toolkit'; import { filterMap, oneOf } from '../../utils'; +import type { ExternalConfig } from '../external-config/external-config'; import { - ExternalConfig, externalConfigToInitDimensions, externalConfigToTableExpression, fitExternalConfigPattern, diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts b/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts index 3f4be422c79f..91bf75f35b57 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts @@ -18,13 +18,13 @@ import { CSV_SAMPLE } from '../../utils/sampler.mock'; +import type { IngestionSpec } from './ingestion-spec'; import { adjustId, cleanSpec, guessColumnTypeFromHeaderAndRows, guessColumnTypeFromInput, guessInputFormat, - IngestionSpec, updateSchemaWithSample, upgradeSpec, } from './ingestion-spec'; diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx index b2bd24219be9..9f3eb072b3cd 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx @@ -20,7 +20,8 @@ import { Code } from '@blueprintjs/core'; import { range } from 'd3-array'; import React from 'react'; -import { AutoForm, ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { AutoForm, ExternalLink } from '../../components'; import { IndexSpecDialog } from '../../dialogs/index-spec-dialog/index-spec-dialog'; import { getLink } from '../../links'; import { @@ -38,28 +39,27 @@ import { parseCsvLine, typeIs, } from '../../utils'; -import { SampleHeaderAndRows } from '../../utils/sampler'; +import type { SampleHeaderAndRows } from '../../utils/sampler'; +import type { DimensionsSpec } from '../dimension-spec/dimension-spec'; import { - DimensionsSpec, getDimensionSpecName, getDimensionSpecs, getDimensionSpecType, } from '../dimension-spec/dimension-spec'; -import { IndexSpec, summarizeIndexSpec } from '../index-spec/index-spec'; -import { InputFormat, issueWithInputFormat } from '../input-format/input-format'; -import { - FILTER_SUGGESTIONS, - InputSource, - issueWithInputSource, -} from '../input-source/input-source'; +import type { IndexSpec } from '../index-spec/index-spec'; +import { summarizeIndexSpec } from '../index-spec/index-spec'; +import type { InputFormat } from '../input-format/input-format'; +import { issueWithInputFormat } from '../input-format/input-format'; +import type { InputSource } from '../input-source/input-source'; +import { FILTER_SUGGESTIONS, issueWithInputSource } from '../input-source/input-source'; +import type { MetricSpec } from '../metric-spec/metric-spec'; import { getMetricSpecOutputType, getMetricSpecs, getMetricSpecSingleFieldName, - MetricSpec, } from '../metric-spec/metric-spec'; -import { TimestampSpec } from '../timestamp-spec/timestamp-spec'; -import { TransformSpec } from '../transform-spec/transform-spec'; +import type { TimestampSpec } from '../timestamp-spec/timestamp-spec'; +import type { TransformSpec } from '../transform-spec/transform-spec'; export const MAX_INLINE_DATA_LENGTH = 65536; diff --git a/web-console/src/druid-models/input-format/input-format.tsx b/web-console/src/druid-models/input-format/input-format.tsx index 417b3c3fd8fa..679f3bafb0e4 100644 --- a/web-console/src/druid-models/input-format/input-format.tsx +++ b/web-console/src/druid-models/input-format/input-format.tsx @@ -19,10 +19,11 @@ import { Code } from '@blueprintjs/core'; import React from 'react'; -import { AutoForm, ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { AutoForm, ExternalLink } from '../../components'; import { getLink } from '../../links'; import { compact, oneOf, typeIs } from '../../utils'; -import { FlattenSpec } from '../flatten-spec/flatten-spec'; +import type { FlattenSpec } from '../flatten-spec/flatten-spec'; export interface InputFormat { readonly type: string; diff --git a/web-console/src/druid-models/input-source/input-source.tsx b/web-console/src/druid-models/input-source/input-source.tsx index 7f5ba6379332..344510300a9e 100644 --- a/web-console/src/druid-models/input-source/input-source.tsx +++ b/web-console/src/druid-models/input-source/input-source.tsx @@ -18,7 +18,8 @@ import React from 'react'; -import { ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { ExternalLink } from '../../components'; import { getLink } from '../../links'; import { deepGet, deepSet, nonEmptyArray, typeIs } from '../../utils'; diff --git a/web-console/src/druid-models/lookup-spec/lookup-spec.tsx b/web-console/src/druid-models/lookup-spec/lookup-spec.tsx index 3e9649495388..fb8ddb9c06c9 100644 --- a/web-console/src/druid-models/lookup-spec/lookup-spec.tsx +++ b/web-console/src/druid-models/lookup-spec/lookup-spec.tsx @@ -19,7 +19,8 @@ import { Code } from '@blueprintjs/core'; import React from 'react'; -import { AutoForm, Field } from '../../components'; +import type { Field } from '../../components'; +import { AutoForm } from '../../components'; import { deepGet, deepSet, oneOf, pluralIfNeeded, typeIs } from '../../utils'; export interface ExtractionNamespaceSpec { diff --git a/web-console/src/druid-models/metric-spec/metric-spec.tsx b/web-console/src/druid-models/metric-spec/metric-spec.tsx index 4295310486c5..3eb0a24d780c 100644 --- a/web-console/src/druid-models/metric-spec/metric-spec.tsx +++ b/web-console/src/druid-models/metric-spec/metric-spec.tsx @@ -19,10 +19,11 @@ import { Code } from '@blueprintjs/core'; import React from 'react'; -import { ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { ExternalLink } from '../../components'; import { getLink } from '../../links'; import { filterMap, typeIs } from '../../utils'; -import { SampleHeaderAndRows } from '../../utils/sampler'; +import type { SampleHeaderAndRows } from '../../utils/sampler'; import { guessColumnTypeFromHeaderAndRows } from '../ingestion-spec/ingestion-spec'; export interface MetricSpec { diff --git a/web-console/src/druid-models/overlord-dynamic-config/overlord-dynamic-config.tsx b/web-console/src/druid-models/overlord-dynamic-config/overlord-dynamic-config.tsx index 2b090acd9d72..52132528fb39 100644 --- a/web-console/src/druid-models/overlord-dynamic-config/overlord-dynamic-config.tsx +++ b/web-console/src/druid-models/overlord-dynamic-config/overlord-dynamic-config.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Field } from '../../components'; +import type { Field } from '../../components'; export interface OverlordDynamicConfig { selectStrategy?: Record; diff --git a/web-console/src/druid-models/stages/stages.ts b/web-console/src/druid-models/stages/stages.ts index 0304a93c9185..7b3f719dbe1d 100644 --- a/web-console/src/druid-models/stages/stages.ts +++ b/web-console/src/druid-models/stages/stages.ts @@ -20,8 +20,8 @@ import { max, sum } from 'd3-array'; import hasOwnProp from 'has-own-prop'; import { deleteKeys, filterMap, oneOf, zeroDivide } from '../../utils'; -import { InputFormat } from '../input-format/input-format'; -import { InputSource } from '../input-source/input-source'; +import type { InputFormat } from '../input-format/input-format'; +import type { InputSource } from '../input-source/input-source'; const SORT_WEIGHT = 0.5; const READING_INPUT_WITH_SORT_WEIGHT = 1 - SORT_WEIGHT; diff --git a/web-console/src/druid-models/timestamp-spec/timestamp-spec.tsx b/web-console/src/druid-models/timestamp-spec/timestamp-spec.tsx index cc2a8eae4490..fb133e58b424 100644 --- a/web-console/src/druid-models/timestamp-spec/timestamp-spec.tsx +++ b/web-console/src/druid-models/timestamp-spec/timestamp-spec.tsx @@ -18,16 +18,17 @@ import React from 'react'; -import { ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { ExternalLink } from '../../components'; import { deepGet, EMPTY_ARRAY, EMPTY_OBJECT } from '../../utils'; -import { IngestionSpec } from '../ingestion-spec/ingestion-spec'; +import type { IngestionSpec } from '../ingestion-spec/ingestion-spec'; import { BASIC_TIME_FORMATS, DATE_ONLY_TIME_FORMATS, DATETIME_TIME_FORMATS, OTHER_TIME_FORMATS, } from '../time/time'; -import { Transform } from '../transform-spec/transform-spec'; +import type { Transform } from '../transform-spec/transform-spec'; const NO_SUCH_COLUMN = '!!!_no_such_column_!!!'; diff --git a/web-console/src/druid-models/transform-spec/transform-spec.tsx b/web-console/src/druid-models/transform-spec/transform-spec.tsx index 9b6f8952e620..ffb90d2226ee 100644 --- a/web-console/src/druid-models/transform-spec/transform-spec.tsx +++ b/web-console/src/druid-models/transform-spec/transform-spec.tsx @@ -19,7 +19,8 @@ import { Code } from '@blueprintjs/core'; import React from 'react'; -import { ExternalLink, Field } from '../../components'; +import type { Field } from '../../components'; +import { ExternalLink } from '../../components'; import { getLink } from '../../links'; import { TIME_COLUMN } from '../timestamp-spec/timestamp-spec'; diff --git a/web-console/src/druid-models/workbench-query/workbench-query-part.ts b/web-console/src/druid-models/workbench-query/workbench-query-part.ts index 8c5d2c9446a1..83a39a04c515 100644 --- a/web-console/src/druid-models/workbench-query/workbench-query-part.ts +++ b/web-console/src/druid-models/workbench-query/workbench-query-part.ts @@ -16,12 +16,15 @@ * limitations under the License. */ -import { SqlExpression, SqlQuery, SqlValues, SqlWithQuery, T } from 'druid-query-toolkit'; +import type { SqlValues, SqlWithQuery } from 'druid-query-toolkit'; +import { SqlExpression, SqlQuery, T } from 'druid-query-toolkit'; import Hjson from 'hjson'; import * as JSONBig from 'json-bigint-native'; -import { ColumnMetadata, compact, filterMap, generate8HexId, sqlTypeFromDruid } from '../../utils'; -import { LastExecution, validateLastExecution } from '../execution/execution'; +import type { ColumnMetadata } from '../../utils'; +import { compact, filterMap, generate8HexId, sqlTypeFromDruid } from '../../utils'; +import type { LastExecution } from '../execution/execution'; +import { validateLastExecution } from '../execution/execution'; import { fitExternalConfigPattern } from '../external-config/external-config'; // ----------------------------- diff --git a/web-console/src/druid-models/workbench-query/workbench-query.ts b/web-console/src/druid-models/workbench-query/workbench-query.ts index 32ef417c5963..63e0aa0314d3 100644 --- a/web-console/src/druid-models/workbench-query/workbench-query.ts +++ b/web-console/src/druid-models/workbench-query/workbench-query.ts @@ -16,31 +16,35 @@ * limitations under the License. */ +import type { + SqlClusteredByClause, + SqlExpression, + SqlPartitionedByClause, + SqlQuery, +} from 'druid-query-toolkit'; import { C, F, - SqlClusteredByClause, - SqlExpression, SqlLiteral, SqlOrderByClause, SqlOrderByExpression, - SqlPartitionedByClause, - SqlQuery, SqlTable, } from 'druid-query-toolkit'; import Hjson from 'hjson'; import * as JSONBig from 'json-bigint-native'; import { v4 as uuidv4 } from 'uuid'; -import { ColumnMetadata, deleteKeys, generate8HexId } from '../../utils'; -import { DruidEngine, validDruidEngine } from '../druid-engine/druid-engine'; -import { LastExecution } from '../execution/execution'; -import { ExternalConfig } from '../external-config/external-config'; +import type { ColumnMetadata } from '../../utils'; +import { deleteKeys, generate8HexId } from '../../utils'; +import type { DruidEngine } from '../druid-engine/druid-engine'; +import { validDruidEngine } from '../druid-engine/druid-engine'; +import type { LastExecution } from '../execution/execution'; +import type { ExternalConfig } from '../external-config/external-config'; import { externalConfigToIngestQueryPattern, ingestQueryPatternToQuery, } from '../ingest-query-pattern/ingest-query-pattern'; -import { QueryContext } from '../query-context/query-context'; +import type { QueryContext } from '../query-context/query-context'; import { WorkbenchQueryPart } from './workbench-query-part'; diff --git a/web-console/src/entry.ts b/web-console/src/entry.ts index 39e695d43536..da267c172c13 100644 --- a/web-console/src/entry.ts +++ b/web-console/src/entry.ts @@ -27,7 +27,8 @@ import ReactDOM from 'react-dom'; import { bootstrapJsonParse } from './bootstrap/json-parser'; import { bootstrapReactTable } from './bootstrap/react-table-defaults'; import { ConsoleApplication } from './console-application'; -import { Links, setLinkOverrides } from './links'; +import type { Links } from './links'; +import { setLinkOverrides } from './links'; import { Api, UrlBaser } from './singletons'; import { setLocalStorageNamespace } from './utils'; @@ -84,7 +85,7 @@ if (consoleConfig.customHeaderName && consoleConfig.customHeaderValue) { apiConfig.headers![consoleConfig.customHeaderName] = consoleConfig.customHeaderValue; } if (consoleConfig.customHeaders) { - Object.assign(apiConfig.headers, consoleConfig.customHeaders); + Object.assign(apiConfig.headers!, consoleConfig.customHeaders); } Api.initialize(apiConfig); diff --git a/web-console/src/helpers/capacity.ts b/web-console/src/helpers/capacity.ts index 8a6a0fffa4c7..62fe306645fd 100644 --- a/web-console/src/helpers/capacity.ts +++ b/web-console/src/helpers/capacity.ts @@ -18,7 +18,7 @@ import { sum } from 'd3-array'; -import { CapacityInfo } from '../druid-models'; +import type { CapacityInfo } from '../druid-models'; import { Api } from '../singletons'; export async function getClusterCapacity(): Promise { diff --git a/web-console/src/helpers/execution/general.ts b/web-console/src/helpers/execution/general.ts index adf015883ef9..bbb2eead6f02 100644 --- a/web-console/src/helpers/execution/general.ts +++ b/web-console/src/helpers/execution/general.ts @@ -16,10 +16,10 @@ * limitations under the License. */ -import { CancelToken } from 'axios'; -import { QueryResult } from 'druid-query-toolkit'; +import type { CancelToken } from 'axios'; +import type { QueryResult } from 'druid-query-toolkit'; -import { Execution } from '../../druid-models'; +import type { Execution } from '../../druid-models'; import { IntermediateQueryState } from '../../utils'; import { diff --git a/web-console/src/helpers/execution/sql-task-execution.ts b/web-console/src/helpers/execution/sql-task-execution.ts index 358eee25c56e..af5e40f315f5 100644 --- a/web-console/src/helpers/execution/sql-task-execution.ts +++ b/web-console/src/helpers/execution/sql-task-execution.ts @@ -16,10 +16,11 @@ * limitations under the License. */ -import { AxiosResponse, CancelToken } from 'axios'; +import type { AxiosResponse, CancelToken } from 'axios'; import { L } from 'druid-query-toolkit'; -import { Execution, QueryContext } from '../../druid-models'; +import type { QueryContext } from '../../druid-models'; +import { Execution } from '../../druid-models'; import { Api } from '../../singletons'; import { deepGet, diff --git a/web-console/src/helpers/spec-conversion.ts b/web-console/src/helpers/spec-conversion.ts index 9b76e787dd61..c610866e29aa 100644 --- a/web-console/src/helpers/spec-conversion.ts +++ b/web-console/src/helpers/spec-conversion.ts @@ -19,16 +19,15 @@ import { C, L, RefName, SqlExpression, T } from 'druid-query-toolkit'; import * as JSONBig from 'json-bigint-native'; -import { +import type { DimensionSpec, - inflateDimensionSpec, IngestionSpec, MetricSpec, QueryWithContext, TimestampSpec, Transform, - upgradeSpec, } from '../druid-models'; +import { inflateDimensionSpec, upgradeSpec } from '../druid-models'; import { deepGet, filterMap, oneOf } from '../utils'; export function getSpecDatasourceName(spec: IngestionSpec): string { diff --git a/web-console/src/hooks/use-local-storage-state.ts b/web-console/src/hooks/use-local-storage-state.ts index b9f40855ab37..e3b408802bc1 100644 --- a/web-console/src/hooks/use-local-storage-state.ts +++ b/web-console/src/hooks/use-local-storage-state.ts @@ -16,9 +16,11 @@ * limitations under the License. */ -import { Dispatch, SetStateAction, useState } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; +import { useState } from 'react'; -import { localStorageGetJson, LocalStorageKeys, localStorageSetJson } from '../utils'; +import type { LocalStorageKeys } from '../utils'; +import { localStorageGetJson, localStorageSetJson } from '../utils'; export function useLocalStorageState( key: LocalStorageKeys, diff --git a/web-console/src/hooks/use-query-manager.ts b/web-console/src/hooks/use-query-manager.ts index 3704b188415f..a21d7b64691a 100644 --- a/web-console/src/hooks/use-query-manager.ts +++ b/web-console/src/hooks/use-query-manager.ts @@ -18,7 +18,8 @@ import { useEffect, useState } from 'react'; -import { QueryManager, QueryManagerOptions, QueryState } from '../utils'; +import type { QueryManagerOptions } from '../utils'; +import { QueryManager, QueryState } from '../utils'; import { usePermanentCallback } from './use-permanent-callback'; diff --git a/web-console/src/react-table/react-table-inputs.tsx b/web-console/src/react-table/react-table-inputs.tsx index 7dbb69b18f3e..59587ce8cc7f 100644 --- a/web-console/src/react-table/react-table-inputs.tsx +++ b/web-console/src/react-table/react-table-inputs.tsx @@ -21,7 +21,7 @@ import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import React, { useState } from 'react'; -import { Column, ReactTableFunction } from 'react-table'; +import type { Column, ReactTableFunction } from 'react-table'; import { combineModeAndNeedle, diff --git a/web-console/src/react-table/react-table-utils.ts b/web-console/src/react-table/react-table-utils.ts index a87a7330464a..d83fb0cd5e6f 100644 --- a/web-console/src/react-table/react-table-utils.ts +++ b/web-console/src/react-table/react-table-utils.ts @@ -16,10 +16,11 @@ * limitations under the License. */ -import { IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { C, F, SqlExpression } from 'druid-query-toolkit'; -import { Filter } from 'react-table'; +import type { SqlExpression } from 'druid-query-toolkit'; +import { C, F } from 'druid-query-toolkit'; +import type { Filter } from 'react-table'; import { addOrUpdate, caseInsensitiveContains } from '../utils'; diff --git a/web-console/src/singletons/ace-editor-state-cache.ts b/web-console/src/singletons/ace-editor-state-cache.ts index 667afbde849a..0a81173a1976 100644 --- a/web-console/src/singletons/ace-editor-state-cache.ts +++ b/web-console/src/singletons/ace-editor-state-cache.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Ace } from 'ace-builds'; +import type { Ace } from 'ace-builds'; interface EditorState { undoManager: Ace.UndoManager; diff --git a/web-console/src/singletons/api.ts b/web-console/src/singletons/api.ts index b7340ec07353..6b49ac95a3d0 100644 --- a/web-console/src/singletons/api.ts +++ b/web-console/src/singletons/api.ts @@ -16,7 +16,8 @@ * limitations under the License. */ -import axios, { AxiosError, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosError, AxiosInstance, AxiosRequestConfig } from 'axios'; +import axios from 'axios'; import * as JSONBig from 'json-bigint-native'; import { nonEmptyString } from '../utils'; diff --git a/web-console/src/singletons/execution-state-cache.ts b/web-console/src/singletons/execution-state-cache.ts index 0011a53e5ac8..233ed23f7b0a 100644 --- a/web-console/src/singletons/execution-state-cache.ts +++ b/web-console/src/singletons/execution-state-cache.ts @@ -16,8 +16,8 @@ * limitations under the License. */ -import { Execution } from '../druid-models'; -import { DruidError, QueryState } from '../utils'; +import type { Execution } from '../druid-models'; +import type { DruidError, QueryState } from '../utils'; export class ExecutionStateCache { private static readonly cache: Record> = {}; diff --git a/web-console/src/singletons/workbench-running-promises.ts b/web-console/src/singletons/workbench-running-promises.ts index 46592907de85..b5d99ae5d8bd 100644 --- a/web-console/src/singletons/workbench-running-promises.ts +++ b/web-console/src/singletons/workbench-running-promises.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { QueryResult } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; export interface WorkbenchRunningPromise { promise: Promise; diff --git a/web-console/src/utils/basic-action.tsx b/web-console/src/utils/basic-action.tsx index 2d0e4f808914..75461cc74538 100644 --- a/web-console/src/utils/basic-action.tsx +++ b/web-console/src/utils/basic-action.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { IconName, Intent, Menu, MenuItem } from '@blueprintjs/core'; +import type { IconName, Intent } from '@blueprintjs/core'; +import { Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; export interface BasicAction { diff --git a/web-console/src/utils/date.ts b/web-console/src/utils/date.ts index be548f7d6560..3b4ec6fc7e6d 100644 --- a/web-console/src/utils/date.ts +++ b/web-console/src/utils/date.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { DateRange } from '@blueprintjs/datetime'; +import type { DateRange } from '@blueprintjs/datetime'; const CURRENT_YEAR = new Date().getUTCFullYear(); diff --git a/web-console/src/utils/download.ts b/web-console/src/utils/download.ts index ad5dbd27507a..95ca19806626 100644 --- a/web-console/src/utils/download.ts +++ b/web-console/src/utils/download.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { QueryResult } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; import FileSaver from 'file-saver'; import * as JSONBig from 'json-bigint-native'; diff --git a/web-console/src/utils/druid-query.ts b/web-console/src/utils/druid-query.ts index 668d4703cf9c..e558931a3c67 100644 --- a/web-console/src/utils/druid-query.ts +++ b/web-console/src/utils/druid-query.ts @@ -16,13 +16,14 @@ * limitations under the License. */ -import axios, { AxiosResponse } from 'axios'; +import type { AxiosResponse } from 'axios'; +import axios from 'axios'; import { C } from 'druid-query-toolkit'; import { Api } from '../singletons'; import { assemble } from './general'; -import { RowColumn } from './query-cursor'; +import type { RowColumn } from './query-cursor'; const CANCELED_MESSAGE = 'Query canceled by user.'; diff --git a/web-console/src/utils/general.tsx b/web-console/src/utils/general.tsx index 6e4ddcf6a1c8..65d912b6348b 100644 --- a/web-console/src/utils/general.tsx +++ b/web-console/src/utils/general.tsx @@ -17,7 +17,8 @@ */ import { Intent } from '@blueprintjs/core'; -import { IconName, IconNames } from '@blueprintjs/icons'; +import type { IconName } from '@blueprintjs/icons'; +import { IconNames } from '@blueprintjs/icons'; import copy from 'copy-to-clipboard'; import hasOwnProp from 'has-own-prop'; import * as JSONBig from 'json-bigint-native'; @@ -30,7 +31,7 @@ import { AppToaster } from '../singletons'; export const EMPTY_OBJECT: any = {}; export const EMPTY_ARRAY: any[] = []; -export type NumberLike = number | BigInt; +export type NumberLike = number | bigint; export function isNumberLikeNaN(x: NumberLike): boolean { return isNaN(Number(x)); diff --git a/web-console/src/utils/local-storage-backed-visibility.tsx b/web-console/src/utils/local-storage-backed-visibility.tsx index 61b2d0381e30..df4dc10e70bd 100644 --- a/web-console/src/utils/local-storage-backed-visibility.tsx +++ b/web-console/src/utils/local-storage-backed-visibility.tsx @@ -18,7 +18,8 @@ import hasOwnProp from 'has-own-prop'; -import { localStorageGetJson, LocalStorageKeys, localStorageSetJson } from './local-storage-keys'; +import type { LocalStorageKeys } from './local-storage-keys'; +import { localStorageGetJson, localStorageSetJson } from './local-storage-keys'; type Visibility = Record; diff --git a/web-console/src/utils/query-action.ts b/web-console/src/utils/query-action.ts index 40ba46e08873..3f17f22b67d2 100644 --- a/web-console/src/utils/query-action.ts +++ b/web-console/src/utils/query-action.ts @@ -16,6 +16,6 @@ * limitations under the License. */ -import { SqlQuery } from 'druid-query-toolkit'; +import type { SqlQuery } from 'druid-query-toolkit'; export type QueryAction = (query: SqlQuery) => SqlQuery; diff --git a/web-console/src/utils/query-cursor.ts b/web-console/src/utils/query-cursor.ts index a881b515c4ca..909b0dea50c6 100644 --- a/web-console/src/utils/query-cursor.ts +++ b/web-console/src/utils/query-cursor.ts @@ -16,7 +16,8 @@ * limitations under the License. */ -import { L, SqlBase, SqlQuery } from 'druid-query-toolkit'; +import type { SqlBase, SqlQuery } from 'druid-query-toolkit'; +import { L } from 'druid-query-toolkit'; export const EMPTY_LITERAL = L(''); diff --git a/web-console/src/utils/query-manager.tsx b/web-console/src/utils/query-manager.tsx index 71fc0a49a5d8..2cc9188eba9d 100644 --- a/web-console/src/utils/query-manager.tsx +++ b/web-console/src/utils/query-manager.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import axios, { Canceler, CancelToken } from 'axios'; +import type { Canceler, CancelToken } from 'axios'; +import axios from 'axios'; import debounce from 'lodash.debounce'; import { wait } from './general'; @@ -71,8 +72,8 @@ export class QueryManager { private state: QueryState; private currentQueryId = 0; - private readonly runWhenIdle: () => void; - private readonly runWhenLoading: () => void; + private readonly runWhenIdle: () => void | Promise; + private readonly runWhenLoading: () => void | Promise; constructor(options: QueryManagerOptions) { this.processQuery = options.processQuery; @@ -197,7 +198,7 @@ export class QueryManager { private trigger() { if (this.currentRunCancelFn) { // Currently loading - this.runWhenLoading(); + void this.runWhenLoading(); } else { this.setState( new QueryState({ @@ -206,7 +207,7 @@ export class QueryManager { }), ); - this.runWhenIdle(); + void this.runWhenIdle(); } } @@ -220,7 +221,7 @@ export class QueryManager { if (this.terminated) return; this.nextQuery = this.lastQuery; if (runInBackground) { - this.runWhenIdle(); + void this.runWhenIdle(); } else { this.trigger(); } diff --git a/web-console/src/utils/sample-query.tsx b/web-console/src/utils/sample-query.tsx index 25765435e0d8..6ef9ddff9081 100644 --- a/web-console/src/utils/sample-query.tsx +++ b/web-console/src/utils/sample-query.tsx @@ -16,17 +16,14 @@ * limitations under the License. */ +import type { Column, LiteralValue, QueryResult, SqlExpression } from 'druid-query-toolkit'; import { C, - Column, F, L, - LiteralValue, - QueryResult, RefName, SqlAlias, SqlColumnList, - SqlExpression, SqlQuery, SqlRecord, SqlValues, diff --git a/web-console/src/utils/sampler.mock.ts b/web-console/src/utils/sampler.mock.ts index 284b4a4e88cb..a95b73a9457c 100644 --- a/web-console/src/utils/sampler.mock.ts +++ b/web-console/src/utils/sampler.mock.ts @@ -17,7 +17,7 @@ */ // Just to make sure we are in a test context. This line will cause trouble if this file is ever compiled into the main build -import { SampleHeaderAndRows } from './sampler'; +import type { SampleHeaderAndRows } from './sampler'; expect(1).toEqual(1); diff --git a/web-console/src/utils/sampler.ts b/web-console/src/utils/sampler.ts index 56d6cceacec3..46f456d0f0dc 100644 --- a/web-console/src/utils/sampler.ts +++ b/web-console/src/utils/sampler.ts @@ -18,23 +18,25 @@ import * as JSONBig from 'json-bigint-native'; -import { +import type { DimensionsSpec, - getDimensionNamesFromTransforms, - getSpecType, - getTimestampSchema, IngestionSpec, IngestionType, InputFormat, IoConfig, - isDruidSource, MetricSpec, - PLACEHOLDER_TIMESTAMP_SPEC, - REINDEX_TIMESTAMP_SPEC, - TIME_COLUMN, TimestampSpec, Transform, TransformSpec, +} from '../druid-models'; +import { + getDimensionNamesFromTransforms, + getSpecType, + getTimestampSchema, + isDruidSource, + PLACEHOLDER_TIMESTAMP_SPEC, + REINDEX_TIMESTAMP_SPEC, + TIME_COLUMN, upgradeSpec, } from '../druid-models'; import { Api } from '../singletons'; diff --git a/web-console/src/utils/table-helpers.ts b/web-console/src/utils/table-helpers.ts index e9718551cc86..ad1dea94626e 100644 --- a/web-console/src/utils/table-helpers.ts +++ b/web-console/src/utils/table-helpers.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { QueryResult } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; import { filterMap, formatNumber, oneOf } from './general'; import { deepSet } from './object-change'; diff --git a/web-console/src/utils/types.ts b/web-console/src/utils/types.ts index a762fc080349..d2c08525dca9 100644 --- a/web-console/src/utils/types.ts +++ b/web-console/src/utils/types.ts @@ -16,9 +16,9 @@ * limitations under the License. */ -import { IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { Column } from 'druid-query-toolkit'; +import type { Column } from 'druid-query-toolkit'; function getEffectiveColumnType(column: Column): string | undefined { if (column.sqlType === 'TIMESTAMP') return column.sqlType; diff --git a/web-console/src/utils/utils.spec.ts b/web-console/src/utils/utils.spec.ts index a66e8bf6e5e9..2d5c1909dc3f 100644 --- a/web-console/src/utils/utils.spec.ts +++ b/web-console/src/utils/utils.spec.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { IngestionSpec } from '../druid-models'; +import type { IngestionSpec } from '../druid-models'; import { applyCache, headerFromSampleResponse } from './sampler'; diff --git a/web-console/src/views/datasources-view/datasources-view.tsx b/web-console/src/views/datasources-view/datasources-view.tsx index ce3332d389d1..e109b02ac270 100644 --- a/web-console/src/views/datasources-view/datasources-view.tsx +++ b/web-console/src/views/datasources-view/datasources-view.tsx @@ -21,7 +21,8 @@ import { IconNames } from '@blueprintjs/icons'; import classNames from 'classnames'; import { SqlQuery, T } from 'druid-query-toolkit'; import React from 'react'; -import ReactTable, { Filter } from 'react-table'; +import type { Filter } from 'react-table'; +import ReactTable from 'react-table'; import { ACTION_COLUMN_ID, @@ -43,17 +44,17 @@ import { RetentionDialog, } from '../../dialogs'; import { DatasourceTableActionDialog } from '../../dialogs/datasource-table-action-dialog/datasource-table-action-dialog'; -import { +import type { CompactionConfig, CompactionInfo, CompactionStatus, - formatCompactionInfo, QueryWithContext, - zeroCompactionStatus, } from '../../druid-models'; -import { Capabilities, CapabilitiesMode } from '../../helpers'; +import { formatCompactionInfo, zeroCompactionStatus } from '../../druid-models'; +import type { Capabilities, CapabilitiesMode } from '../../helpers'; import { STANDARD_TABLE_PAGE_SIZE, STANDARD_TABLE_PAGE_SIZE_OPTIONS } from '../../react-table'; import { Api, AppToaster } from '../../singletons'; +import type { NumberLike } from '../../utils'; import { compact, countBy, @@ -68,15 +69,15 @@ import { LocalStorageBackedVisibility, LocalStorageKeys, lookupBy, - NumberLike, pluralIfNeeded, queryDruidSql, QueryManager, QueryState, twoLines, } from '../../utils'; -import { BasicAction } from '../../utils/basic-action'; -import { Rule, RuleUtil } from '../../utils/load-rule'; +import type { BasicAction } from '../../utils/basic-action'; +import type { Rule } from '../../utils/load-rule'; +import { RuleUtil } from '../../utils/load-rule'; import './datasources-view.scss'; @@ -377,7 +378,7 @@ ORDER BY 1`; actions: [], }; - this.datasourceQueryManager = new QueryManager({ + this.datasourceQueryManager = new QueryManager({ processQuery: async ( { capabilities, visibleColumns, showUnused }, _cancelToken, @@ -817,6 +818,7 @@ ORDER BY 1`; intent: Intent.DANGER, action: { text: 'Confirm', + // eslint-disable-next-line @typescript-eslint/no-misused-promises onClick: async () => { try { await Api.instance.delete( diff --git a/web-console/src/views/home-view/datasources-card/datasources-card.tsx b/web-console/src/views/home-view/datasources-card/datasources-card.tsx index 15f5616e36f5..3f64e0476e19 100644 --- a/web-console/src/views/home-view/datasources-card/datasources-card.tsx +++ b/web-console/src/views/home-view/datasources-card/datasources-card.tsx @@ -19,7 +19,7 @@ import { IconNames } from '@blueprintjs/icons'; import React from 'react'; -import { Capabilities } from '../../../helpers'; +import type { Capabilities } from '../../../helpers'; import { useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; import { pluralIfNeeded, queryDruidSql } from '../../../utils'; diff --git a/web-console/src/views/home-view/home-view-card/home-view-card.tsx b/web-console/src/views/home-view/home-view-card/home-view-card.tsx index c23f73fe8e2a..474041347118 100644 --- a/web-console/src/views/home-view/home-view-card/home-view-card.tsx +++ b/web-console/src/views/home-view/home-view-card/home-view-card.tsx @@ -16,9 +16,11 @@ * limitations under the License. */ -import { Card, H5, Icon, IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Card, H5, Icon } from '@blueprintjs/core'; import classNames from 'classnames'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import './home-view-card.scss'; diff --git a/web-console/src/views/home-view/home-view.tsx b/web-console/src/views/home-view/home-view.tsx index 08ef69b2f43d..4a9158b9d4c9 100644 --- a/web-console/src/views/home-view/home-view.tsx +++ b/web-console/src/views/home-view/home-view.tsx @@ -18,7 +18,7 @@ import React from 'react'; -import { Capabilities } from '../../helpers'; +import type { Capabilities } from '../../helpers'; import { DatasourcesCard } from './datasources-card/datasources-card'; import { LookupsCard } from './lookups-card/lookups-card'; diff --git a/web-console/src/views/home-view/lookups-card/lookups-card.tsx b/web-console/src/views/home-view/lookups-card/lookups-card.tsx index e4f5f98b28f7..e99ef2ab67a4 100644 --- a/web-console/src/views/home-view/lookups-card/lookups-card.tsx +++ b/web-console/src/views/home-view/lookups-card/lookups-card.tsx @@ -20,7 +20,7 @@ import { IconNames } from '@blueprintjs/icons'; import { sum } from 'd3-array'; import React from 'react'; -import { Capabilities } from '../../../helpers'; +import type { Capabilities } from '../../../helpers'; import { useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; import { isLookupsUninitialized, pluralIfNeeded } from '../../../utils'; diff --git a/web-console/src/views/home-view/segments-card/segments-card.tsx b/web-console/src/views/home-view/segments-card/segments-card.tsx index 56c022fc0158..331aab7f3457 100644 --- a/web-console/src/views/home-view/segments-card/segments-card.tsx +++ b/web-console/src/views/home-view/segments-card/segments-card.tsx @@ -20,7 +20,7 @@ import { IconNames } from '@blueprintjs/icons'; import { sum } from 'd3-array'; import React from 'react'; -import { Capabilities } from '../../../helpers'; +import type { Capabilities } from '../../../helpers'; import { useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; import { deepGet, pluralIfNeeded, queryDruidSql } from '../../../utils'; diff --git a/web-console/src/views/home-view/services-card/services-card.tsx b/web-console/src/views/home-view/services-card/services-card.tsx index 88594bb69c1c..6018b5e91a52 100644 --- a/web-console/src/views/home-view/services-card/services-card.tsx +++ b/web-console/src/views/home-view/services-card/services-card.tsx @@ -20,7 +20,7 @@ import { IconNames } from '@blueprintjs/icons'; import React from 'react'; import { PluralPairIfNeeded } from '../../../components'; -import { Capabilities } from '../../../helpers'; +import type { Capabilities } from '../../../helpers'; import { useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; import { lookupBy, queryDruidSql } from '../../../utils'; diff --git a/web-console/src/views/home-view/supervisors-card/supervisors-card.tsx b/web-console/src/views/home-view/supervisors-card/supervisors-card.tsx index a04d7b5929b7..f6d1ba623f11 100644 --- a/web-console/src/views/home-view/supervisors-card/supervisors-card.tsx +++ b/web-console/src/views/home-view/supervisors-card/supervisors-card.tsx @@ -19,7 +19,7 @@ import { IconNames } from '@blueprintjs/icons'; import React from 'react'; -import { Capabilities } from '../../../helpers'; +import type { Capabilities } from '../../../helpers'; import { useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; import { pluralIfNeeded, queryDruidSql } from '../../../utils'; diff --git a/web-console/src/views/home-view/tasks-card/tasks-card.tsx b/web-console/src/views/home-view/tasks-card/tasks-card.tsx index b5cb5bfc0c70..e684d5c02d32 100644 --- a/web-console/src/views/home-view/tasks-card/tasks-card.tsx +++ b/web-console/src/views/home-view/tasks-card/tasks-card.tsx @@ -20,8 +20,9 @@ import { IconNames } from '@blueprintjs/icons'; import React from 'react'; import { PluralPairIfNeeded } from '../../../components'; -import { CapacityInfo } from '../../../druid-models'; -import { Capabilities, getClusterCapacity } from '../../../helpers'; +import type { CapacityInfo } from '../../../druid-models'; +import type { Capabilities } from '../../../helpers'; +import { getClusterCapacity } from '../../../helpers'; import { useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; import { lookupBy, pluralIfNeeded, queryDruidSql } from '../../../utils'; diff --git a/web-console/src/views/ingestion-view/ingestion-view.tsx b/web-console/src/views/ingestion-view/ingestion-view.tsx index f00c2bd479b8..05d1eeca7e6a 100644 --- a/web-console/src/views/ingestion-view/ingestion-view.tsx +++ b/web-console/src/views/ingestion-view/ingestion-view.tsx @@ -20,7 +20,8 @@ import { Alert, Button, ButtonGroup, Intent, Label, MenuItem } from '@blueprintj import { IconNames } from '@blueprintjs/icons'; import React from 'react'; import SplitterLayout from 'react-splitter-layout'; -import ReactTable, { Filter } from 'react-table'; +import type { Filter } from 'react-table'; +import ReactTable from 'react-table'; import { ACTION_COLUMN_ID, @@ -40,8 +41,8 @@ import { SupervisorTableActionDialog, TaskTableActionDialog, } from '../../dialogs'; -import { QueryWithContext } from '../../druid-models'; -import { Capabilities } from '../../helpers'; +import type { QueryWithContext } from '../../druid-models'; +import type { Capabilities } from '../../helpers'; import { SMALL_TABLE_PAGE_SIZE, SMALL_TABLE_PAGE_SIZE_OPTIONS, @@ -62,7 +63,7 @@ import { QueryManager, QueryState, } from '../../utils'; -import { BasicAction } from '../../utils/basic-action'; +import type { BasicAction } from '../../utils/basic-action'; import './ingestion-view.scss'; diff --git a/web-console/src/views/load-data-view/example-picker/example-picker.tsx b/web-console/src/views/load-data-view/example-picker/example-picker.tsx index fa67b6b9c5c3..cf5c9bbe2605 100644 --- a/web-console/src/views/load-data-view/example-picker/example-picker.tsx +++ b/web-console/src/views/load-data-view/example-picker/example-picker.tsx @@ -20,7 +20,7 @@ import { Button, Callout, FormGroup, HTMLSelect, Intent } from '@blueprintjs/cor import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; -import { ExampleManifest } from '../../../utils/sampler'; +import type { ExampleManifest } from '../../../utils/sampler'; export interface ExamplePickerProps { exampleManifests: ExampleManifest[]; diff --git a/web-console/src/views/load-data-view/filter-table/filter-table.tsx b/web-console/src/views/load-data-view/filter-table/filter-table.tsx index 4e82a482a944..86d10250e2cd 100644 --- a/web-console/src/views/load-data-view/filter-table/filter-table.tsx +++ b/web-console/src/views/load-data-view/filter-table/filter-table.tsx @@ -18,17 +18,19 @@ import classNames from 'classnames'; import React from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { TableCell } from '../../../components'; -import { DruidFilter, getFilterDimension } from '../../../druid-models'; +import type { DruidFilter } from '../../../druid-models'; +import { getFilterDimension } from '../../../druid-models'; import { DEFAULT_TABLE_CLASS_NAME, STANDARD_TABLE_PAGE_SIZE, STANDARD_TABLE_PAGE_SIZE_OPTIONS, } from '../../../react-table'; import { caseInsensitiveContains, filterMap } from '../../../utils'; -import { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; +import type { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; import './filter-table.scss'; @@ -97,7 +99,7 @@ export const FilterTable = React.memo(function FilterTable(props: FilterTablePro id: String(i), accessor: (row: SampleEntry) => (row.parsed ? row.parsed[columnName] : null), width: 140, - Cell: function FilterTableCell(row) { + Cell: function FilterTableCell(row: RowRenderProps) { return ; }, }; diff --git a/web-console/src/views/load-data-view/form-editor/form-editor.tsx b/web-console/src/views/load-data-view/form-editor/form-editor.tsx index 51d0c5e95d22..28e4e6c84889 100644 --- a/web-console/src/views/load-data-view/form-editor/form-editor.tsx +++ b/web-console/src/views/load-data-view/form-editor/form-editor.tsx @@ -20,7 +20,8 @@ import { Button, Intent } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; -import { AutoForm, Field } from '../../../components'; +import type { Field } from '../../../components'; +import { AutoForm } from '../../../components'; import './form-editor.scss'; @@ -37,7 +38,7 @@ export interface FormEditorProps { children?: any; } -export function FormEditor(props: FormEditorProps) { +export function FormEditor>(props: FormEditorProps) { const { fields, initValue, diff --git a/web-console/src/views/load-data-view/info-messages.tsx b/web-console/src/views/load-data-view/info-messages.tsx index 733ad34dbb39..dbd08eb89c11 100644 --- a/web-console/src/views/load-data-view/info-messages.tsx +++ b/web-console/src/views/load-data-view/info-messages.tsx @@ -20,7 +20,8 @@ import { Button, Callout, Code, FormGroup, Intent } from '@blueprintjs/core'; import React from 'react'; import { ExternalLink, LearnMore } from '../../components'; -import { DimensionMode, getIngestionDocLink, IngestionSpec } from '../../druid-models'; +import type { DimensionMode, IngestionSpec } from '../../druid-models'; +import { getIngestionDocLink } from '../../druid-models'; import { getLink } from '../../links'; import { deepGet, deepSet } from '../../utils'; diff --git a/web-console/src/views/load-data-view/load-data-view.tsx b/web-console/src/views/load-data-view/load-data-view.tsx index eb2a77233944..d3d4a109a43b 100644 --- a/web-console/src/views/load-data-view/load-data-view.tsx +++ b/web-console/src/views/load-data-view/load-data-view.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import type { IconName } from '@blueprintjs/core'; import { Alert, AnchorButton, @@ -27,7 +28,6 @@ import { FormGroup, H5, Icon, - IconName, InputGroup, Intent, Menu, @@ -55,6 +55,20 @@ import { PopoverText, } from '../../components'; import { AsyncActionDialog } from '../../dialogs'; +import type { + DimensionMode, + DimensionSpec, + DruidFilter, + FlattenField, + IngestionComboTypeWithExtra, + IngestionSpec, + InputFormat, + IoConfig, + MetricSpec, + TimestampSpec, + Transform, + TuningConfig, +} from '../../druid-models'; import { addTimestampTransform, adjustForceGuaranteedRollup, @@ -64,15 +78,11 @@ import { CONSTANT_TIMESTAMP_SPEC, CONSTANT_TIMESTAMP_SPEC_FIELDS, DIMENSION_SPEC_FIELDS, - DimensionMode, - DimensionSpec, - DruidFilter, fillDataSourceNameIfNeeded, fillInputFormatIfNeeded, FILTER_FIELDS, FILTERS_FIELDS, FLATTEN_FIELD_FIELDS, - FlattenField, getDimensionMode, getDimensionSpecName, getIngestionComboType, @@ -88,14 +98,10 @@ import { getTimestampExpressionFields, getTimestampSchema, getTuningFormFields, - IngestionComboTypeWithExtra, - IngestionSpec, INPUT_FORMAT_FIELDS, - InputFormat, inputFormatCanProduceNestedData, invalidIoConfig, invalidPartitionConfig, - IoConfig, isDruidSource, isEmptyIngestionSpec, isStreamingSpec, @@ -105,7 +111,6 @@ import { KNOWN_FILTER_TYPES, MAX_INLINE_DATA_LENGTH, METRIC_SPEC_FIELDS, - MetricSpec, normalizeSpec, NUMERIC_TIME_FORMATS, possibleDruidFormatForValues, @@ -115,10 +120,7 @@ import { STREAMING_INPUT_FORMAT_FIELDS, TIME_COLUMN, TIMESTAMP_SPEC_FIELDS, - TimestampSpec, - Transform, TRANSFORM_FIELDS, - TuningConfig, updateIngestionType, updateSchemaWithSample, upgradeSpec, @@ -143,13 +145,19 @@ import { pluralIfNeeded, QueryState, } from '../../utils'; -import { +import type { CacheRows, ExampleManifest, + SampleEntry, + SampleHeaderAndRows, + SampleResponse, + SampleResponseWithExtraInfo, + SampleStrategy, +} from '../../utils/sampler'; +import { getCacheRowsFromSampleResponse, getProxyOverlordModules, headerAndRowsFromSampleResponse, - SampleEntry, sampleForConnect, sampleForExampleManifests, sampleForFilter, @@ -157,10 +165,6 @@ import { sampleForSchema, sampleForTimestamp, sampleForTransform, - SampleHeaderAndRows, - SampleResponse, - SampleResponseWithExtraInfo, - SampleStrategy, } from '../../utils/sampler'; import { ExamplePicker } from './example-picker/example-picker'; @@ -3253,7 +3257,7 @@ export class LoadDataView extends React.PureComponent void this.handleSubmit()} /> diff --git a/web-console/src/views/load-data-view/parse-data-table/parse-data-table.tsx b/web-console/src/views/load-data-view/parse-data-table/parse-data-table.tsx index af2c2e2c5fb2..d494791dc4e5 100644 --- a/web-console/src/views/load-data-view/parse-data-table/parse-data-table.tsx +++ b/web-console/src/views/load-data-view/parse-data-table/parse-data-table.tsx @@ -19,17 +19,18 @@ import classNames from 'classnames'; import * as JSONBig from 'json-bigint-native'; import React from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { TableCell, TableCellUnparseable } from '../../../components'; -import { FlattenField } from '../../../druid-models'; +import type { FlattenField } from '../../../druid-models'; import { DEFAULT_TABLE_CLASS_NAME, STANDARD_TABLE_PAGE_SIZE, STANDARD_TABLE_PAGE_SIZE_OPTIONS, } from '../../../react-table'; import { caseInsensitiveContains, filterMap } from '../../../utils'; -import { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; +import type { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; import './parse-data-table.scss'; @@ -86,7 +87,7 @@ export const ParseDataTable = React.memo(function ParseDataTable(props: ParseDat id: String(i), accessor: (row: SampleEntry) => (row[key] ? row[key]![columnName] : null), width: 140, - Cell: function ParseDataTableCell(row) { + Cell: function ParseDataTableCell(row: RowRenderProps) { if (row.original.unparseable) { return ; } diff --git a/web-console/src/views/load-data-view/parse-time-table/parse-time-table.spec.tsx b/web-console/src/views/load-data-view/parse-time-table/parse-time-table.spec.tsx index 0c20f70145a0..f2354445fb67 100644 --- a/web-console/src/views/load-data-view/parse-time-table/parse-time-table.spec.tsx +++ b/web-console/src/views/load-data-view/parse-time-table/parse-time-table.spec.tsx @@ -19,7 +19,8 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { IngestionSpec, PLACEHOLDER_TIMESTAMP_SPEC } from '../../../druid-models'; +import type { IngestionSpec } from '../../../druid-models'; +import { PLACEHOLDER_TIMESTAMP_SPEC } from '../../../druid-models'; import { deepSet } from '../../../utils'; import { ParseTimeTable } from './parse-time-table'; diff --git a/web-console/src/views/load-data-view/parse-time-table/parse-time-table.tsx b/web-console/src/views/load-data-view/parse-time-table/parse-time-table.tsx index 7e1396b4de1c..36b07766414e 100644 --- a/web-console/src/views/load-data-view/parse-time-table/parse-time-table.tsx +++ b/web-console/src/views/load-data-view/parse-time-table/parse-time-table.tsx @@ -18,15 +18,15 @@ import classNames from 'classnames'; import React from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { TableCell, TableCellUnparseable } from '../../../components'; +import type { IngestionSpec, TimestampSpec } from '../../../druid-models'; import { getTimestampDetailFromSpec, getTimestampSpecColumnFromSpec, - IngestionSpec, possibleDruidFormatForValues, - TimestampSpec, } from '../../../druid-models'; import { DEFAULT_TABLE_CLASS_NAME, @@ -34,7 +34,7 @@ import { STANDARD_TABLE_PAGE_SIZE_OPTIONS, } from '../../../react-table'; import { caseInsensitiveContains, filterMap } from '../../../utils'; -import { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; +import type { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; import './parse-time-table.scss'; @@ -123,7 +123,7 @@ export const ParseTimeTable = React.memo(function ParseTimeTable(props: ParseTim className: columnClassName, id: String(i), accessor: (row: SampleEntry) => (row.parsed ? row.parsed[columnName] : null), - Cell: function ParseTimeTableCell(row) { + Cell: function ParseTimeTableCell(row: RowRenderProps) { if (columnName === '__error__') { return ; } diff --git a/web-console/src/views/load-data-view/schema-table/schema-table.tsx b/web-console/src/views/load-data-view/schema-table/schema-table.tsx index fcdf574c0b2e..caad1162e196 100644 --- a/web-console/src/views/load-data-view/schema-table/schema-table.tsx +++ b/web-console/src/views/load-data-view/schema-table/schema-table.tsx @@ -18,16 +18,16 @@ import classNames from 'classnames'; import React from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { TableCell } from '../../../components'; +import type { DimensionSpec, MetricSpec } from '../../../druid-models'; import { - DimensionSpec, getDimensionSpecName, getDimensionSpecType, getMetricSpecName, inflateDimensionSpec, - MetricSpec, } from '../../../druid-models'; import { DEFAULT_TABLE_CLASS_NAME, @@ -35,7 +35,7 @@ import { STANDARD_TABLE_PAGE_SIZE_OPTIONS, } from '../../../react-table'; import { caseInsensitiveContains, filterMap } from '../../../utils'; -import { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; +import type { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; import './schema-table.scss'; @@ -102,7 +102,7 @@ export const SchemaTable = React.memo(function SchemaTable(props: SchemaTablePro id: String(i), accessor: (row: SampleEntry) => (row.parsed ? row.parsed[columnName] : null), width: 120, - Cell: function SchemaTableCell({ value }) { + Cell: function SchemaTableCell({ value }: RowRenderProps) { return ; }, }; @@ -148,7 +148,7 @@ export const SchemaTable = React.memo(function SchemaTable(props: SchemaTablePro id: String(i), width: isTimestamp ? 200 : 140, accessor: (row: SampleEntry) => (row.parsed ? row.parsed[columnName] : null), - Cell: function SchemaTableCell(row) { + Cell: function SchemaTableCell(row: RowRenderProps) { return ; }, }; diff --git a/web-console/src/views/load-data-view/transform-table/transform-table.tsx b/web-console/src/views/load-data-view/transform-table/transform-table.tsx index fc85899c7184..5244a7e42ae0 100644 --- a/web-console/src/views/load-data-view/transform-table/transform-table.tsx +++ b/web-console/src/views/load-data-view/transform-table/transform-table.tsx @@ -18,10 +18,11 @@ import classNames from 'classnames'; import React from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { TableCell } from '../../../components'; -import { Transform } from '../../../druid-models'; +import type { Transform } from '../../../druid-models'; import { DEFAULT_TABLE_CLASS_NAME, STANDARD_TABLE_PAGE_SIZE, @@ -29,7 +30,7 @@ import { } from '../../../react-table'; import { caseInsensitiveContains, filterMap } from '../../../utils'; import { escapeColumnName } from '../../../utils/druid-expression'; -import { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; +import type { SampleEntry, SampleHeaderAndRows } from '../../../utils/sampler'; import './transform-table.scss'; @@ -111,7 +112,7 @@ export const TransformTable = React.memo(function TransformTable(props: Transfor id: String(i), accessor: (row: SampleEntry) => (row.parsed ? row.parsed[columnName] : null), width: 140, - Cell: function TransformTableCell(row) { + Cell: function TransformTableCell(row: RowRenderProps) { return ; }, }; diff --git a/web-console/src/views/lookups-view/lookups-view.tsx b/web-console/src/views/lookups-view/lookups-view.tsx index 8599f6d10f1e..70d0c3f6b1ff 100644 --- a/web-console/src/views/lookups-view/lookups-view.tsx +++ b/web-console/src/views/lookups-view/lookups-view.tsx @@ -19,7 +19,8 @@ import { Button, Icon, Intent } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import React from 'react'; -import ReactTable, { Filter } from 'react-table'; +import type { Filter } from 'react-table'; +import ReactTable from 'react-table'; import { ACTION_COLUMN_ID, @@ -34,7 +35,8 @@ import { } from '../../components'; import { AsyncActionDialog, LookupEditDialog } from '../../dialogs/'; import { LookupTableActionDialog } from '../../dialogs/lookup-table-action-dialog/lookup-table-action-dialog'; -import { LookupSpec, lookupSpecSummary } from '../../druid-models'; +import type { LookupSpec } from '../../druid-models'; +import { lookupSpecSummary } from '../../druid-models'; import { STANDARD_TABLE_PAGE_SIZE, STANDARD_TABLE_PAGE_SIZE_OPTIONS } from '../../react-table'; import { Api, AppToaster } from '../../singletons'; import { @@ -47,7 +49,7 @@ import { QueryManager, QueryState, } from '../../utils'; -import { BasicAction } from '../../utils/basic-action'; +import type { BasicAction } from '../../utils/basic-action'; import './lookups-view.scss'; @@ -343,7 +345,7 @@ export class LookupsView extends React.PureComponent this.initializeLookup()} + onClick={() => void this.initializeLookup()} /> ); @@ -478,7 +480,7 @@ export class LookupsView extends React.PureComponent this.setState({ lookupEdit: undefined })} - onSubmit={updateLookupVersion => this.submitLookupEdit(updateLookupVersion)} + onSubmit={updateLookupVersion => void this.submitLookupEdit(updateLookupVersion)} onChange={this.handleChangeLookup} lookupId={lookupEdit.id} lookupTier={lookupEdit.tier} diff --git a/web-console/src/views/segments-view/segments-view.tsx b/web-console/src/views/segments-view/segments-view.tsx index 4f437a4004e4..415630bab5ab 100644 --- a/web-console/src/views/segments-view/segments-view.tsx +++ b/web-console/src/views/segments-view/segments-view.tsx @@ -22,7 +22,8 @@ import classNames from 'classnames'; import { C, L, SqlComparison, SqlExpression } from 'druid-query-toolkit'; import * as JSONBig from 'json-bigint-native'; import React from 'react'; -import ReactTable, { Filter } from 'react-table'; +import type { Filter } from 'react-table'; +import ReactTable from 'react-table'; import { ACTION_COLUMN_ID, @@ -41,8 +42,8 @@ import { import { AsyncActionDialog } from '../../dialogs'; import { SegmentTableActionDialog } from '../../dialogs/segments-table-action-dialog/segment-table-action-dialog'; import { ShowValueDialog } from '../../dialogs/show-value-dialog/show-value-dialog'; -import { QueryWithContext } from '../../druid-models'; -import { Capabilities, CapabilitiesMode } from '../../helpers'; +import type { QueryWithContext } from '../../druid-models'; +import type { Capabilities, CapabilitiesMode } from '../../helpers'; import { booleanCustomTableFilter, BooleanFilterInput, @@ -52,6 +53,7 @@ import { STANDARD_TABLE_PAGE_SIZE_OPTIONS, } from '../../react-table'; import { Api } from '../../singletons'; +import type { NumberLike } from '../../utils'; import { compact, deepGet, @@ -62,13 +64,12 @@ import { isNumberLikeNaN, LocalStorageBackedVisibility, LocalStorageKeys, - NumberLike, queryDruidSql, QueryManager, QueryState, twoLines, } from '../../utils'; -import { BasicAction } from '../../utils/basic-action'; +import type { BasicAction } from '../../utils/basic-action'; import './segments-view.scss'; diff --git a/web-console/src/views/services-view/services-view.tsx b/web-console/src/views/services-view/services-view.tsx index d3e4ce9d4301..636232cf7d7b 100644 --- a/web-console/src/views/services-view/services-view.tsx +++ b/web-console/src/views/services-view/services-view.tsx @@ -20,7 +20,8 @@ import { Button, ButtonGroup, Intent, Label, MenuItem } from '@blueprintjs/core' import { IconNames } from '@blueprintjs/icons'; import { sum } from 'd3-array'; import React from 'react'; -import ReactTable, { Filter } from 'react-table'; +import type { Filter } from 'react-table'; +import ReactTable from 'react-table'; import { ACTION_COLUMN_ID, @@ -34,10 +35,11 @@ import { ViewControlBar, } from '../../components'; import { AsyncActionDialog } from '../../dialogs'; -import { QueryWithContext } from '../../druid-models'; -import { Capabilities, CapabilitiesMode } from '../../helpers'; +import type { QueryWithContext } from '../../druid-models'; +import type { Capabilities, CapabilitiesMode } from '../../helpers'; import { STANDARD_TABLE_PAGE_SIZE, STANDARD_TABLE_PAGE_SIZE_OPTIONS } from '../../react-table'; import { Api, AppToaster } from '../../singletons'; +import type { NumberLike } from '../../utils'; import { deepGet, filterMap, @@ -47,14 +49,13 @@ import { LocalStorageBackedVisibility, LocalStorageKeys, lookupBy, - NumberLike, oneOf, pluralIfNeeded, queryDruidSql, QueryManager, QueryState, } from '../../utils'; -import { BasicAction } from '../../utils/basic-action'; +import type { BasicAction } from '../../utils/basic-action'; import './services-view.scss'; diff --git a/web-console/src/views/sql-data-loader-view/column-actions/column-actions.tsx b/web-console/src/views/sql-data-loader-view/column-actions/column-actions.tsx index 363a6e290b3a..e6f62706d36d 100644 --- a/web-console/src/views/sql-data-loader-view/column-actions/column-actions.tsx +++ b/web-console/src/views/sql-data-loader-view/column-actions/column-actions.tsx @@ -19,11 +19,13 @@ import { Button, FormGroup, Menu, MenuItem } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; -import { F, QueryResult, SqlExpression } from 'druid-query-toolkit'; +import type { QueryResult, SqlExpression } from 'druid-query-toolkit'; +import { F } from 'druid-query-toolkit'; import React from 'react'; import { possibleDruidFormatForValues, TIME_COLUMN } from '../../../druid-models'; -import { convertToGroupByExpression, oneOf, QueryAction, timeFormatToSql } from '../../../utils'; +import type { QueryAction } from '../../../utils'; +import { convertToGroupByExpression, oneOf, timeFormatToSql } from '../../../utils'; import { TimeFloorMenuItem } from '../../workbench-view/time-floor-menu-item/time-floor-menu-item'; import './column-actions.scss'; diff --git a/web-console/src/views/sql-data-loader-view/column-editor/column-editor.tsx b/web-console/src/views/sql-data-loader-view/column-editor/column-editor.tsx index 9fe9f073b204..e431e447e500 100644 --- a/web-console/src/views/sql-data-loader-view/column-editor/column-editor.tsx +++ b/web-console/src/views/sql-data-loader-view/column-editor/column-editor.tsx @@ -19,7 +19,8 @@ import { Button, FormGroup, InputGroup, Intent, Menu, MenuItem, Position } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; -import { QueryResult, SqlExpression, SqlFunction } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; +import { SqlExpression, SqlFunction } from 'druid-query-toolkit'; import React, { useState } from 'react'; import { AppToaster } from '../../../singletons'; diff --git a/web-console/src/views/sql-data-loader-view/destination-dialog/destination-dialog.tsx b/web-console/src/views/sql-data-loader-view/destination-dialog/destination-dialog.tsx index 3ab3ed126b1f..b098a959ef03 100644 --- a/web-console/src/views/sql-data-loader-view/destination-dialog/destination-dialog.tsx +++ b/web-console/src/views/sql-data-loader-view/destination-dialog/destination-dialog.tsx @@ -19,7 +19,8 @@ import { Button, Classes, Dialog, Intent } from '@blueprintjs/core'; import React, { useEffect, useState } from 'react'; -import { DestinationInfo, getDestinationInfo, IngestQueryPattern } from '../../../druid-models'; +import type { DestinationInfo, IngestQueryPattern } from '../../../druid-models'; +import { getDestinationInfo } from '../../../druid-models'; import { DestinationForm } from '../destination-form/destination-form'; import './destination-dialog.scss'; diff --git a/web-console/src/views/sql-data-loader-view/destination-form/destination-form.tsx b/web-console/src/views/sql-data-loader-view/destination-form/destination-form.tsx index e0762b477ce8..64712105da4e 100644 --- a/web-console/src/views/sql-data-loader-view/destination-form/destination-form.tsx +++ b/web-console/src/views/sql-data-loader-view/destination-form/destination-form.tsx @@ -30,7 +30,7 @@ import { Tooltip2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import React, { useState } from 'react'; -import { DestinationInfo, DestinationMode } from '../../../druid-models'; +import type { DestinationInfo, DestinationMode } from '../../../druid-models'; import './destination-form.scss'; diff --git a/web-console/src/views/sql-data-loader-view/ingestion-progress-dialog/ingestion-progress-dialog.tsx b/web-console/src/views/sql-data-loader-view/ingestion-progress-dialog/ingestion-progress-dialog.tsx index b7c8480e77be..da9e084a2655 100644 --- a/web-console/src/views/sql-data-loader-view/ingestion-progress-dialog/ingestion-progress-dialog.tsx +++ b/web-console/src/views/sql-data-loader-view/ingestion-progress-dialog/ingestion-progress-dialog.tsx @@ -22,7 +22,7 @@ import classNames from 'classnames'; import { T } from 'druid-query-toolkit'; import React, { useState } from 'react'; -import { Execution, QueryWithContext } from '../../../druid-models'; +import type { Execution, QueryWithContext } from '../../../druid-models'; import { executionBackgroundStatusCheck, reattachTaskExecution } from '../../../helpers'; import { useQueryManager } from '../../../hooks'; import { ExecutionProgressBarPane } from '../../workbench-view/execution-progress-bar-pane/execution-progress-bar-pane'; diff --git a/web-console/src/views/sql-data-loader-view/schema-step/column-list/column-list.tsx b/web-console/src/views/sql-data-loader-view/schema-step/column-list/column-list.tsx index a09376aae5b4..0e28bb85f336 100644 --- a/web-console/src/views/sql-data-loader-view/schema-step/column-list/column-list.tsx +++ b/web-console/src/views/sql-data-loader-view/schema-step/column-list/column-list.tsx @@ -19,7 +19,7 @@ import { Icon } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; -import { QueryResult, SqlExpression } from 'druid-query-toolkit'; +import type { QueryResult, SqlExpression } from 'druid-query-toolkit'; import React, { useMemo } from 'react'; import { LearnMore, PopoverText } from '../../../../components'; diff --git a/web-console/src/views/sql-data-loader-view/schema-step/column-list/expression-entry/expression-entry.tsx b/web-console/src/views/sql-data-loader-view/schema-step/column-list/expression-entry/expression-entry.tsx index 3a50976cc501..e345cfab628c 100644 --- a/web-console/src/views/sql-data-loader-view/schema-step/column-list/expression-entry/expression-entry.tsx +++ b/web-console/src/views/sql-data-loader-view/schema-step/column-list/expression-entry/expression-entry.tsx @@ -18,7 +18,8 @@ import { Icon } from '@blueprintjs/core'; import classNames from 'classnames'; -import { Column, QueryResult, SqlColumn } from 'druid-query-toolkit'; +import type { Column, QueryResult } from 'druid-query-toolkit'; +import { SqlColumn } from 'druid-query-toolkit'; import React from 'react'; import { columnToIcon } from '../../../../../utils'; diff --git a/web-console/src/views/sql-data-loader-view/schema-step/preview-table/preview-table.tsx b/web-console/src/views/sql-data-loader-view/schema-step/preview-table/preview-table.tsx index aab5d9e4c9cf..810bc3bd743e 100644 --- a/web-console/src/views/sql-data-loader-view/schema-step/preview-table/preview-table.tsx +++ b/web-console/src/views/sql-data-loader-view/schema-step/preview-table/preview-table.tsx @@ -20,20 +20,17 @@ import { Icon } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; -import { Column, QueryResult, SqlAlias, SqlQuery, SqlStar } from 'druid-query-toolkit'; +import type { Column, QueryResult, SqlQuery } from 'druid-query-toolkit'; +import { SqlAlias, SqlStar } from 'druid-query-toolkit'; import React, { useState } from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { BracedText, Deferred, TableCell } from '../../../../components'; import { CellFilterMenu } from '../../../../components/cell-filter-menu/cell-filter-menu'; import { ShowValueDialog } from '../../../../dialogs/show-value-dialog/show-value-dialog'; -import { - columnToIcon, - columnToWidth, - filterMap, - getNumericColumnBraces, - QueryAction, -} from '../../../../utils'; +import type { QueryAction } from '../../../../utils'; +import { columnToIcon, columnToWidth, filterMap, getNumericColumnBraces } from '../../../../utils'; import './preview-table.scss'; @@ -142,7 +139,7 @@ export const PreviewTable = React.memo(function PreviewTable(props: PreviewTable className: columnClassName, width: columnToWidth(column), accessor: String(i), - Cell(row) { + Cell(row: RowRenderProps) { const value = row.value; return (
diff --git a/web-console/src/views/sql-data-loader-view/schema-step/rollup-analysis-pane/rollup-analysis-pane.tsx b/web-console/src/views/sql-data-loader-view/schema-step/rollup-analysis-pane/rollup-analysis-pane.tsx index f6112b26b892..e11dfb57fe5f 100644 --- a/web-console/src/views/sql-data-loader-view/schema-step/rollup-analysis-pane/rollup-analysis-pane.tsx +++ b/web-console/src/views/sql-data-loader-view/schema-step/rollup-analysis-pane/rollup-analysis-pane.tsx @@ -18,11 +18,12 @@ import { Button, Callout, Intent, Tag } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { CancelToken } from 'axios'; -import { F, QueryResult, SqlExpression, SqlFunction, SqlQuery } from 'druid-query-toolkit'; +import type { CancelToken } from 'axios'; +import type { QueryResult, SqlQuery } from 'druid-query-toolkit'; +import { F, SqlExpression, SqlFunction } from 'druid-query-toolkit'; import React, { useEffect } from 'react'; -import { Execution } from '../../../../druid-models'; +import type { Execution } from '../../../../druid-models'; import { executionBackgroundStatusCheck, submitTaskQuery } from '../../../../helpers'; import { useQueryManager } from '../../../../hooks'; import { filterMap, formatPercentClapped, IntermediateQueryState } from '../../../../utils'; diff --git a/web-console/src/views/sql-data-loader-view/schema-step/schema-step.tsx b/web-console/src/views/sql-data-loader-view/schema-step/schema-step.tsx index d58e892cb040..0c9de245d503 100644 --- a/web-console/src/views/sql-data-loader-view/schema-step/schema-step.tsx +++ b/web-console/src/views/sql-data-loader-view/schema-step/schema-step.tsx @@ -32,20 +32,20 @@ import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import { select, selectAll } from 'd3-selection'; -import { C, F, QueryResult, QueryRunner, SqlExpression, SqlQuery } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; +import { C, F, QueryRunner, SqlExpression, SqlQuery } from 'druid-query-toolkit'; import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; import { ClearableInput, LearnMore, Loader } from '../../../components'; import { AsyncActionDialog } from '../../../dialogs'; +import type { Execution, IngestQueryPattern } from '../../../druid-models'; import { changeQueryPatternExpression, - Execution, externalConfigToTableExpression, fitIngestQueryPattern, getDestinationMode, getQueryPatternExpression, getQueryPatternExpressionType, - IngestQueryPattern, ingestQueryPatternToQuery, possibleDruidFormatForValues, TIME_COLUMN, @@ -59,6 +59,7 @@ import { import { useLastDefined, usePermanentCallback, useQueryManager } from '../../../hooks'; import { getLink } from '../../../links'; import { AppToaster } from '../../../singletons'; +import type { QueryAction } from '../../../utils'; import { caseInsensitiveContains, change, @@ -66,7 +67,6 @@ import { DruidError, filterMap, oneOf, - QueryAction, queryDruidSql, sampleDataToQuery, tickIcon, @@ -239,7 +239,7 @@ export interface SchemaStepProps { enableAnalyze: boolean; goToQuery: () => void; onBack(): void; - onDone(): void; + onDone(): void | Promise; extraCallout?: JSX.Element; } @@ -447,6 +447,7 @@ export const SchemaStep = function SchemaStep(props: SchemaStepProps) { useEffect(() => { if (!previewResultState.data) return; lastWorkingQueryPattern.current = ingestQueryPattern; + // eslint-disable-next-line react-hooks/exhaustive-deps -- excluding 'ingestQueryPattern' }, [previewResultState]); const unusedColumns = ingestQueryPattern @@ -896,7 +897,7 @@ export const SchemaStep = function SchemaStep(props: SchemaStepProps) { icon={IconNames.CLOUD_UPLOAD} text="Start loading data" intent={Intent.PRIMARY} - onClick={onDone} + onClick={() => void onDone()} />
diff --git a/web-console/src/views/sql-data-loader-view/sql-data-loader-view.tsx b/web-console/src/views/sql-data-loader-view/sql-data-loader-view.tsx index e2216719dd31..743fc429f1e9 100644 --- a/web-console/src/views/sql-data-loader-view/sql-data-loader-view.tsx +++ b/web-console/src/views/sql-data-loader-view/sql-data-loader-view.tsx @@ -16,20 +16,20 @@ * limitations under the License. */ -import { Card, Icon, IconName, Intent } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Card, Icon, Intent } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { SqlQuery } from 'druid-query-toolkit'; import React, { useState } from 'react'; +import type { ExternalConfig, QueryContext, QueryWithContext } from '../../druid-models'; import { Execution, - ExternalConfig, externalConfigToIngestQueryPattern, ingestQueryPatternToQuery, - QueryContext, - QueryWithContext, } from '../../druid-models'; -import { Capabilities, maybeGetClusterCapacity, submitTaskQuery } from '../../helpers'; +import type { Capabilities } from '../../helpers'; +import { maybeGetClusterCapacity, submitTaskQuery } from '../../helpers'; import { useLocalStorageState } from '../../hooks'; import { AppToaster } from '../../singletons'; import { deepDelete, LocalStorageKeys } from '../../utils'; diff --git a/web-console/src/views/sql-data-loader-view/title-frame/title-frame.tsx b/web-console/src/views/sql-data-loader-view/title-frame/title-frame.tsx index c037d4e8907a..7ef6a163f9e7 100644 --- a/web-console/src/views/sql-data-loader-view/title-frame/title-frame.tsx +++ b/web-console/src/views/sql-data-loader-view/title-frame/title-frame.tsx @@ -17,7 +17,8 @@ */ import classNames from 'classnames'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import './title-frame.scss'; diff --git a/web-console/src/views/workbench-view/capacity-alert/capacity-alert.tsx b/web-console/src/views/workbench-view/capacity-alert/capacity-alert.tsx index ae786b71ae20..054e54f3ea96 100644 --- a/web-console/src/views/workbench-view/capacity-alert/capacity-alert.tsx +++ b/web-console/src/views/workbench-view/capacity-alert/capacity-alert.tsx @@ -20,7 +20,7 @@ import { Alert, Code, Intent } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import React from 'react'; -import { CapacityInfo } from '../../../druid-models'; +import type { CapacityInfo } from '../../../druid-models'; import { formatInteger } from '../../../utils'; export interface CapacityAlertProps { diff --git a/web-console/src/views/workbench-view/column-tree/column-tree-menu/number-menu-items/number-menu-items.tsx b/web-console/src/views/workbench-view/column-tree/column-tree-menu/number-menu-items/number-menu-items.tsx index 3be716457074..07970fa6b677 100644 --- a/web-console/src/views/workbench-view/column-tree/column-tree-menu/number-menu-items/number-menu-items.tsx +++ b/web-console/src/views/workbench-view/column-tree/column-tree-menu/number-menu-items/number-menu-items.tsx @@ -18,7 +18,8 @@ import { MenuItem } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { C, F, L, SqlExpression, SqlQuery } from 'druid-query-toolkit'; +import type { SqlExpression, SqlQuery } from 'druid-query-toolkit'; +import { C, F, L } from 'druid-query-toolkit'; import React from 'react'; import { prettyPrintSql } from '../../../../../utils'; diff --git a/web-console/src/views/workbench-view/column-tree/column-tree-menu/string-menu-items/string-menu-items.tsx b/web-console/src/views/workbench-view/column-tree/column-tree-menu/string-menu-items/string-menu-items.tsx index 04cc2fe7fd32..04382efb1587 100644 --- a/web-console/src/views/workbench-view/column-tree/column-tree-menu/string-menu-items/string-menu-items.tsx +++ b/web-console/src/views/workbench-view/column-tree/column-tree-menu/string-menu-items/string-menu-items.tsx @@ -18,7 +18,8 @@ import { MenuItem } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { C, F, N, SqlExpression, SqlJoinPart, SqlQuery, T } from 'druid-query-toolkit'; +import type { SqlExpression, SqlQuery } from 'druid-query-toolkit'; +import { C, F, N, SqlJoinPart, T } from 'druid-query-toolkit'; import React from 'react'; import { EMPTY_LITERAL, prettyPrintSql } from '../../../../../utils'; diff --git a/web-console/src/views/workbench-view/column-tree/column-tree-menu/time-menu-items/time-menu-items.tsx b/web-console/src/views/workbench-view/column-tree/column-tree-menu/time-menu-items/time-menu-items.tsx index e9517c00979d..c6919afc3390 100644 --- a/web-console/src/views/workbench-view/column-tree/column-tree-menu/time-menu-items/time-menu-items.tsx +++ b/web-console/src/views/workbench-view/column-tree/column-tree-menu/time-menu-items/time-menu-items.tsx @@ -18,7 +18,8 @@ import { MenuDivider, MenuItem } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { C, F, SqlExpression, SqlQuery } from 'druid-query-toolkit'; +import type { SqlQuery } from 'druid-query-toolkit'; +import { C, F, SqlExpression } from 'druid-query-toolkit'; import React from 'react'; import { prettyPrintSql } from '../../../../../utils'; diff --git a/web-console/src/views/workbench-view/column-tree/column-tree.spec.tsx b/web-console/src/views/workbench-view/column-tree/column-tree.spec.tsx index f06e02a98bfd..059397bd4c71 100644 --- a/web-console/src/views/workbench-view/column-tree/column-tree.spec.tsx +++ b/web-console/src/views/workbench-view/column-tree/column-tree.spec.tsx @@ -20,7 +20,7 @@ import { SqlQuery } from 'druid-query-toolkit'; import { shallow } from 'enzyme'; import React from 'react'; -import { ColumnMetadata } from '../../../utils'; +import type { ColumnMetadata } from '../../../utils'; import { ColumnTree } from './column-tree'; diff --git a/web-console/src/views/workbench-view/column-tree/column-tree.tsx b/web-console/src/views/workbench-view/column-tree/column-tree.tsx index d72f53d1b7a6..11ce577c20be 100644 --- a/web-console/src/views/workbench-view/column-tree/column-tree.tsx +++ b/web-console/src/views/workbench-view/column-tree/column-tree.tsx @@ -16,32 +16,28 @@ * limitations under the License. */ -import { HTMLSelect, Menu, MenuItem, Position, Tree, TreeNodeInfo } from '@blueprintjs/core'; +import type { TreeNodeInfo } from '@blueprintjs/core'; +import { HTMLSelect, Menu, MenuItem, Position, Tree } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; +import type { SqlExpression } from 'druid-query-toolkit'; import { C, F, N, SqlColumn, SqlComparison, - SqlExpression, SqlJoinPart, SqlQuery, SqlTable, T, } from 'druid-query-toolkit'; -import React, { ChangeEvent } from 'react'; +import type { ChangeEvent } from 'react'; +import React from 'react'; import { Deferred, Loader } from '../../../components'; -import { - ColumnMetadata, - copyAndAlert, - dataTypeToIcon, - groupBy, - oneOf, - prettyPrintSql, -} from '../../../utils'; +import type { ColumnMetadata } from '../../../utils'; +import { copyAndAlert, dataTypeToIcon, groupBy, oneOf, prettyPrintSql } from '../../../utils'; import { NumberMenuItems, StringMenuItems, TimeMenuItems } from './column-tree-menu'; diff --git a/web-console/src/views/workbench-view/connect-external-data-dialog/connect-external-data-dialog.tsx b/web-console/src/views/workbench-view/connect-external-data-dialog/connect-external-data-dialog.tsx index e043cf134045..278743da5467 100644 --- a/web-console/src/views/workbench-view/connect-external-data-dialog/connect-external-data-dialog.tsx +++ b/web-console/src/views/workbench-view/connect-external-data-dialog/connect-external-data-dialog.tsx @@ -17,10 +17,10 @@ */ import { Classes, Dialog } from '@blueprintjs/core'; -import { SqlExpression } from 'druid-query-toolkit'; +import type { SqlExpression } from 'druid-query-toolkit'; import React, { useState } from 'react'; -import { ExternalConfig, InputFormat, InputSource } from '../../../druid-models'; +import type { ExternalConfig, InputFormat, InputSource } from '../../../druid-models'; import { InputFormatStep } from '../input-format-step/input-format-step'; import { InputSourceStep } from '../input-source-step/input-source-step'; diff --git a/web-console/src/views/workbench-view/demo-queries.ts b/web-console/src/views/workbench-view/demo-queries.ts index 7345290938ac..6d36b7261d69 100644 --- a/web-console/src/views/workbench-view/demo-queries.ts +++ b/web-console/src/views/workbench-view/demo-queries.ts @@ -16,7 +16,8 @@ * limitations under the License. */ -import { TabEntry, WorkbenchQuery } from '../../druid-models'; +import type { TabEntry } from '../../druid-models'; +import { WorkbenchQuery } from '../../druid-models'; const BASE_QUERY = WorkbenchQuery.blank(); diff --git a/web-console/src/views/workbench-view/execution-details-dialog/execution-details-dialog.tsx b/web-console/src/views/workbench-view/execution-details-dialog/execution-details-dialog.tsx index 61abc6ea7a23..1a255fccc794 100644 --- a/web-console/src/views/workbench-view/execution-details-dialog/execution-details-dialog.tsx +++ b/web-console/src/views/workbench-view/execution-details-dialog/execution-details-dialog.tsx @@ -19,8 +19,8 @@ import { Button, Classes, Dialog } from '@blueprintjs/core'; import React from 'react'; -import { Execution } from '../../../druid-models'; -import { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; +import type { Execution } from '../../../druid-models'; +import type { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; import { ExecutionDetailsPaneLoader } from '../execution-details-pane-loader/execution-details-pane-loader'; import './execution-details-dialog.scss'; diff --git a/web-console/src/views/workbench-view/execution-details-pane-loader/execution-details-pane-loader.tsx b/web-console/src/views/workbench-view/execution-details-pane-loader/execution-details-pane-loader.tsx index 5f6cba93f976..573c79795739 100644 --- a/web-console/src/views/workbench-view/execution-details-pane-loader/execution-details-pane-loader.tsx +++ b/web-console/src/views/workbench-view/execution-details-pane-loader/execution-details-pane-loader.tsx @@ -19,14 +19,12 @@ import React from 'react'; import { Loader } from '../../../components'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { getTaskExecution } from '../../../helpers'; import { useInterval, useQueryManager } from '../../../hooks'; import { QueryState } from '../../../utils'; -import { - ExecutionDetailsPane, - ExecutionDetailsTab, -} from '../execution-details-pane/execution-details-pane'; +import type { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; +import { ExecutionDetailsPane } from '../execution-details-pane/execution-details-pane'; export interface ExecutionDetailsPaneLoaderProps { id: string; diff --git a/web-console/src/views/workbench-view/execution-details-pane/execution-details-pane.tsx b/web-console/src/views/workbench-view/execution-details-pane/execution-details-pane.tsx index a19f901e733e..a0729ec0fe40 100644 --- a/web-console/src/views/workbench-view/execution-details-pane/execution-details-pane.tsx +++ b/web-console/src/views/workbench-view/execution-details-pane/execution-details-pane.tsx @@ -21,7 +21,7 @@ import * as JSONBig from 'json-bigint-native'; import React, { useState } from 'react'; import { FancyTabPane } from '../../../components'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { ExecutionErrorPane } from '../execution-error-pane/execution-error-pane'; import { ExecutionStagesPane } from '../execution-stages-pane/execution-stages-pane'; import { ExecutionWarningsPane } from '../execution-warnings-pane/execution-warnings-pane'; diff --git a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx index 967cea3b0ef3..f91d7bf9d54e 100644 --- a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx +++ b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx @@ -22,7 +22,7 @@ import React, { useState } from 'react'; import { ClickToCopy, ExternalLink } from '../../../components'; import { ShowValueDialog } from '../../../dialogs/show-value-dialog/show-value-dialog'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { getLink } from '../../../links'; import { downloadQueryDetailArchive } from '../../../utils'; diff --git a/web-console/src/views/workbench-view/execution-progress-pane/execution-progress-pane.tsx b/web-console/src/views/workbench-view/execution-progress-pane/execution-progress-pane.tsx index 42ed0ab2a002..2cc86f831071 100644 --- a/web-console/src/views/workbench-view/execution-progress-pane/execution-progress-pane.tsx +++ b/web-console/src/views/workbench-view/execution-progress-pane/execution-progress-pane.tsx @@ -19,7 +19,7 @@ import classNames from 'classnames'; import React, { useState } from 'react'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { ExecutionProgressBarPane } from '../execution-progress-bar-pane/execution-progress-bar-pane'; import { ExecutionStagesPane } from '../execution-stages-pane/execution-stages-pane'; diff --git a/web-console/src/views/workbench-view/execution-stages-pane-loader/execution-stages-pane-loader.tsx b/web-console/src/views/workbench-view/execution-stages-pane-loader/execution-stages-pane-loader.tsx index eb700fe6ae84..7529ba9b4525 100644 --- a/web-console/src/views/workbench-view/execution-stages-pane-loader/execution-stages-pane-loader.tsx +++ b/web-console/src/views/workbench-view/execution-stages-pane-loader/execution-stages-pane-loader.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { Loader } from '../../../components'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { getTaskExecution } from '../../../helpers'; import { useInterval, useQueryManager } from '../../../hooks'; import { ExecutionStagesPane } from '../execution-stages-pane/execution-stages-pane'; diff --git a/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.tsx b/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.tsx index 7c5a593424c3..9464de13ea71 100644 --- a/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.tsx +++ b/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.tsx @@ -21,22 +21,22 @@ import { IconNames } from '@blueprintjs/icons'; import { Tooltip2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import React from 'react'; -import ReactTable, { Column } from 'react-table'; +import type { Column } from 'react-table'; +import ReactTable from 'react-table'; import { BracedText, TableClickableCell } from '../../../components'; -import { +import type { ChannelCounterName, ChannelFields, ClusterBy, CounterName, Execution, - formatClusterBy, SimpleWideCounter, StageDefinition, - Stages, - summarizeInputSource, } from '../../../druid-models'; +import { formatClusterBy, Stages, summarizeInputSource } from '../../../druid-models'; import { DEFAULT_TABLE_CLASS_NAME } from '../../../react-table'; +import type { NumberLike } from '../../../utils'; import { capitalizeFirst, clamp, @@ -47,7 +47,6 @@ import { formatDurationWithMs, formatInteger, formatPercent, - NumberLike, oneOf, twoLines, } from '../../../utils'; diff --git a/web-console/src/views/workbench-view/execution-summary-panel/execution-summary-panel.tsx b/web-console/src/views/workbench-view/execution-summary-panel/execution-summary-panel.tsx index d268861685c4..80066c0c1075 100644 --- a/web-console/src/views/workbench-view/execution-summary-panel/execution-summary-panel.tsx +++ b/web-console/src/views/workbench-view/execution-summary-panel/execution-summary-panel.tsx @@ -21,7 +21,7 @@ import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { downloadQueryResults, formatDurationHybrid, pluralIfNeeded } from '../../../utils'; import './execution-summary-panel.scss'; diff --git a/web-console/src/views/workbench-view/execution-timer-panel/execution-timer-panel.tsx b/web-console/src/views/workbench-view/execution-timer-panel/execution-timer-panel.tsx index bc539559ec58..3202240ee2af 100644 --- a/web-console/src/views/workbench-view/execution-timer-panel/execution-timer-panel.tsx +++ b/web-console/src/views/workbench-view/execution-timer-panel/execution-timer-panel.tsx @@ -20,7 +20,7 @@ import { Button, ButtonGroup } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { useInterval } from '../../../hooks'; import { formatDurationHybrid } from '../../../utils'; import { CancelQueryDialog } from '../cancel-query-dialog/cancel-query-dialog'; diff --git a/web-console/src/views/workbench-view/execution-warnings-pane/execution-warnings-pane.tsx b/web-console/src/views/workbench-view/execution-warnings-pane/execution-warnings-pane.tsx index ddd87afee05d..baf93811d679 100644 --- a/web-console/src/views/workbench-view/execution-warnings-pane/execution-warnings-pane.tsx +++ b/web-console/src/views/workbench-view/execution-warnings-pane/execution-warnings-pane.tsx @@ -18,7 +18,7 @@ import React from 'react'; -import { Execution } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; import { WarningCallout } from './warning-callout'; diff --git a/web-console/src/views/workbench-view/execution-warnings-pane/warning-callout.tsx b/web-console/src/views/workbench-view/execution-warnings-pane/warning-callout.tsx index 1c2103c97150..cc60375651ec 100644 --- a/web-console/src/views/workbench-view/execution-warnings-pane/warning-callout.tsx +++ b/web-console/src/views/workbench-view/execution-warnings-pane/warning-callout.tsx @@ -20,7 +20,7 @@ import { Button, Callout, Collapse } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import React, { useState } from 'react'; -import { ExecutionError } from '../../../druid-models'; +import type { ExecutionError } from '../../../druid-models'; import './warning-callout.scss'; diff --git a/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx b/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx index f64f35781243..62d4c5ffd53d 100644 --- a/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx +++ b/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx @@ -19,7 +19,8 @@ import { shallow } from 'enzyme'; import React from 'react'; -import { QueryExplanation, QueryState } from '../../../utils'; +import type { QueryExplanation } from '../../../utils'; +import { QueryState } from '../../../utils'; import { ExplainDialog } from './explain-dialog'; diff --git a/web-console/src/views/workbench-view/explain-dialog/explain-dialog.tsx b/web-console/src/views/workbench-view/explain-dialog/explain-dialog.tsx index a60567c994d9..9104b55941c2 100644 --- a/web-console/src/views/workbench-view/explain-dialog/explain-dialog.tsx +++ b/web-console/src/views/workbench-view/explain-dialog/explain-dialog.tsx @@ -32,16 +32,17 @@ import React from 'react'; import AceEditor from 'react-ace'; import { Loader } from '../../../components'; -import { DruidEngine, isEmptyContext, QueryContext, QueryWithContext } from '../../../druid-models'; +import type { DruidEngine, QueryContext, QueryWithContext } from '../../../druid-models'; +import { isEmptyContext } from '../../../druid-models'; import { useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; +import type { QueryExplanation } from '../../../utils'; import { deepGet, formatSignature, getDruidErrorMessage, nonEmptyArray, queryDruidSql, - QueryExplanation, } from '../../../utils'; import './explain-dialog.scss'; diff --git a/web-console/src/views/workbench-view/flexible-query-input/flexible-query-input.tsx b/web-console/src/views/workbench-view/flexible-query-input/flexible-query-input.tsx index 7e73f4012d26..8691a622da97 100644 --- a/web-console/src/views/workbench-view/flexible-query-input/flexible-query-input.tsx +++ b/web-console/src/views/workbench-view/flexible-query-input/flexible-query-input.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { ResizeEntry } from '@blueprintjs/core'; +import type { ResizeEntry } from '@blueprintjs/core'; import { ResizeSensor2 } from '@blueprintjs/popover2'; import type { Ace } from 'ace-builds'; import ace from 'ace-builds'; @@ -34,7 +34,8 @@ import { } from '../../../../lib/keywords'; import { SQL_DATA_TYPES, SQL_FUNCTIONS } from '../../../../lib/sql-docs'; import { AceEditorStateCache } from '../../../singletons/ace-editor-state-cache'; -import { ColumnMetadata, RowColumn, uniq } from '../../../utils'; +import type { ColumnMetadata, RowColumn } from '../../../utils'; +import { uniq } from '../../../utils'; import './flexible-query-input.scss'; diff --git a/web-console/src/views/workbench-view/helper-query/helper-query.tsx b/web-console/src/views/workbench-view/helper-query/helper-query.tsx index f12f49597672..cc7f638c2535 100644 --- a/web-console/src/views/workbench-view/helper-query/helper-query.tsx +++ b/web-console/src/views/workbench-view/helper-query/helper-query.tsx @@ -20,17 +20,16 @@ import { Button, ButtonGroup, InputGroup, Menu, MenuItem } from '@blueprintjs/co import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import axios from 'axios'; -import { QueryResult, QueryRunner, SqlQuery } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; +import { QueryRunner, SqlQuery } from 'druid-query-toolkit'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { useStore } from 'zustand'; import { Loader, QueryErrorPane } from '../../../components'; +import type { DruidEngine, LastExecution, QueryContext } from '../../../druid-models'; import { - DruidEngine, Execution, fitExternalConfigPattern, - LastExecution, - QueryContext, summarizeExternalConfig, WorkbenchQuery, } from '../../../druid-models'; @@ -44,13 +43,12 @@ import { usePermanentCallback, useQueryManager } from '../../../hooks'; import { Api } from '../../../singletons'; import { ExecutionStateCache } from '../../../singletons/execution-state-cache'; import { WorkbenchHistory } from '../../../singletons/workbench-history'; -import { - WorkbenchRunningPromise, - WorkbenchRunningPromises, -} from '../../../singletons/workbench-running-promises'; -import { ColumnMetadata, DruidError, QueryAction, QueryManager, RowColumn } from '../../../utils'; +import type { WorkbenchRunningPromise } from '../../../singletons/workbench-running-promises'; +import { WorkbenchRunningPromises } from '../../../singletons/workbench-running-promises'; +import type { ColumnMetadata, QueryAction, RowColumn } from '../../../utils'; +import { DruidError, QueryManager } from '../../../utils'; import { CapacityAlert } from '../capacity-alert/capacity-alert'; -import { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; +import type { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; import { ExecutionErrorPane } from '../execution-error-pane/execution-error-pane'; import { ExecutionProgressPane } from '../execution-progress-pane/execution-progress-pane'; import { ExecutionStagesPane } from '../execution-stages-pane/execution-stages-pane'; diff --git a/web-console/src/views/workbench-view/ingest-success-pane/ingest-success-pane.tsx b/web-console/src/views/workbench-view/ingest-success-pane/ingest-success-pane.tsx index 11c0d958b997..37639ae0535c 100644 --- a/web-console/src/views/workbench-view/ingest-success-pane/ingest-success-pane.tsx +++ b/web-console/src/views/workbench-view/ingest-success-pane/ingest-success-pane.tsx @@ -19,9 +19,10 @@ import { T } from 'druid-query-toolkit'; import React from 'react'; -import { Execution, WorkbenchQuery } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; +import { WorkbenchQuery } from '../../../druid-models'; import { formatDuration, pluralIfNeeded } from '../../../utils'; -import { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; +import type { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; import './ingest-success-pane.scss'; diff --git a/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx b/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx index c6fce295dd61..750b44215ec1 100644 --- a/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx +++ b/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx @@ -18,20 +18,19 @@ import { Button, Callout, FormGroup, Icon, Intent, Tag } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { C, SqlExpression } from 'druid-query-toolkit'; +import type { SqlExpression } from 'druid-query-toolkit'; +import { C } from 'druid-query-toolkit'; import React, { useState } from 'react'; import { AutoForm, CenterMessage, LearnMore, Loader } from '../../../components'; +import type { InputFormat, InputSource, SignatureColumn } from '../../../druid-models'; import { guessColumnTypeFromHeaderAndRows, guessIsArrayFromHeaderAndRows, INPUT_FORMAT_FIELDS, - InputFormat, inputFormatOutputsNumericStrings, - InputSource, PLACEHOLDER_TIMESTAMP_SPEC, possibleDruidFormatForValues, - SignatureColumn, } from '../../../druid-models'; import { useQueryManager } from '../../../hooks'; import { getLink } from '../../../links'; @@ -42,12 +41,8 @@ import { filterMap, timeFormatToSql, } from '../../../utils'; -import { - headerAndRowsFromSampleResponse, - postToSampler, - SampleHeaderAndRows, - SampleSpec, -} from '../../../utils/sampler'; +import type { SampleHeaderAndRows, SampleSpec } from '../../../utils/sampler'; +import { headerAndRowsFromSampleResponse, postToSampler } from '../../../utils/sampler'; import { ParseDataTable } from '../../load-data-view/parse-data-table/parse-data-table'; import './input-format-step.scss'; diff --git a/web-console/src/views/workbench-view/input-source-step/example-inputs.ts b/web-console/src/views/workbench-view/input-source-step/example-inputs.ts index a6ad104c7f49..efade906ebce 100644 --- a/web-console/src/views/workbench-view/input-source-step/example-inputs.ts +++ b/web-console/src/views/workbench-view/input-source-step/example-inputs.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { InputFormat, InputSource } from '../../../druid-models'; +import type { InputFormat, InputSource } from '../../../druid-models'; export interface ExampleInput { name: string; diff --git a/web-console/src/views/workbench-view/input-source-step/input-source-info.tsx b/web-console/src/views/workbench-view/input-source-step/input-source-info.tsx index dbcbf7702d6c..2a7e2361d5ea 100644 --- a/web-console/src/views/workbench-view/input-source-step/input-source-info.tsx +++ b/web-console/src/views/workbench-view/input-source-step/input-source-info.tsx @@ -18,7 +18,7 @@ import React from 'react'; -import { InputSource } from '../../../druid-models'; +import type { InputSource } from '../../../druid-models'; export interface InputSourceInfoProps { inputSource: Partial; diff --git a/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx b/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx index 9ea55fd0d17c..c4eaf8d0afa7 100644 --- a/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx +++ b/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx @@ -28,21 +28,18 @@ import { } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import classNames from 'classnames'; -import { QueryResult } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; import React, { useEffect, useState } from 'react'; import { AutoForm, ExternalLink } from '../../../components'; import { ShowValueDialog } from '../../../dialogs/show-value-dialog/show-value-dialog'; +import type { Execution, ExecutionError, InputFormat, InputSource } from '../../../druid-models'; import { - Execution, - ExecutionError, externalConfigToTableExpression, getIngestionImage, getIngestionTitle, guessInputFormat, INPUT_SOURCE_FIELDS, - InputFormat, - InputSource, PLACEHOLDER_TIMESTAMP_SPEC, } from '../../../druid-models'; import { @@ -53,7 +50,8 @@ import { import { useQueryManager } from '../../../hooks'; import { UrlBaser } from '../../../singletons'; import { filterMap, IntermediateQueryState } from '../../../utils'; -import { postToSampler, SampleSpec } from '../../../utils/sampler'; +import type { SampleSpec } from '../../../utils/sampler'; +import { postToSampler } from '../../../utils/sampler'; import { EXAMPLE_INPUTS } from './example-inputs'; import { InputSourceInfo } from './input-source-info'; diff --git a/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx b/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx index 04c01645d5f9..0500dca3bae1 100644 --- a/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx +++ b/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx @@ -16,18 +16,19 @@ * limitations under the License. */ -import { Button, ButtonProps, Menu, MenuDivider, MenuItem, Position } from '@blueprintjs/core'; +import type { ButtonProps } from '@blueprintjs/core'; +import { Button, Menu, MenuDivider, MenuItem, Position } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; import { NumericInputDialog } from '../../../dialogs'; +import type { QueryContext } from '../../../druid-models'; import { changeMaxNumTasks, changeTaskAssigment, getMaxNumTasks, getTaskAssigment, - QueryContext, } from '../../../druid-models'; import { formatInteger, tickIcon } from '../../../utils'; diff --git a/web-console/src/views/workbench-view/query-tab/query-tab.tsx b/web-console/src/views/workbench-view/query-tab/query-tab.tsx index 402cc4367ab6..3fe362ab4867 100644 --- a/web-console/src/views/workbench-view/query-tab/query-tab.tsx +++ b/web-console/src/views/workbench-view/query-tab/query-tab.tsx @@ -21,19 +21,15 @@ import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import axios from 'axios'; import classNames from 'classnames'; -import { QueryResult, QueryRunner, SqlQuery } from 'druid-query-toolkit'; +import type { QueryResult } from 'druid-query-toolkit'; +import { QueryRunner, SqlQuery } from 'druid-query-toolkit'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import SplitterLayout from 'react-splitter-layout'; import { useStore } from 'zustand'; import { Loader, QueryErrorPane } from '../../../components'; -import { - DruidEngine, - Execution, - LastExecution, - QueryContext, - WorkbenchQuery, -} from '../../../druid-models'; +import type { DruidEngine, LastExecution, QueryContext } from '../../../druid-models'; +import { Execution, WorkbenchQuery } from '../../../druid-models'; import { executionBackgroundStatusCheck, maybeGetClusterCapacity, @@ -44,22 +40,18 @@ import { usePermanentCallback, useQueryManager } from '../../../hooks'; import { Api, AppToaster } from '../../../singletons'; import { ExecutionStateCache } from '../../../singletons/execution-state-cache'; import { WorkbenchHistory } from '../../../singletons/workbench-history'; +import type { WorkbenchRunningPromise } from '../../../singletons/workbench-running-promises'; +import { WorkbenchRunningPromises } from '../../../singletons/workbench-running-promises'; +import type { ColumnMetadata, QueryAction, RowColumn } from '../../../utils'; import { - WorkbenchRunningPromise, - WorkbenchRunningPromises, -} from '../../../singletons/workbench-running-promises'; -import { - ColumnMetadata, DruidError, localStorageGet, LocalStorageKeys, localStorageSet, - QueryAction, QueryManager, - RowColumn, } from '../../../utils'; import { CapacityAlert } from '../capacity-alert/capacity-alert'; -import { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; +import type { ExecutionDetailsTab } from '../execution-details-pane/execution-details-pane'; import { ExecutionErrorPane } from '../execution-error-pane/execution-error-pane'; import { ExecutionProgressPane } from '../execution-progress-pane/execution-progress-pane'; import { ExecutionStagesPane } from '../execution-stages-pane/execution-stages-pane'; diff --git a/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx b/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx index 69f6cc66df75..d57557e96c36 100644 --- a/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx +++ b/web-console/src/views/workbench-view/recent-query-task-panel/recent-query-task-panel.tsx @@ -17,7 +17,8 @@ */ import { Button, Icon, Intent, Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; -import { IconName, IconNames } from '@blueprintjs/icons'; +import type { IconName } from '@blueprintjs/icons'; +import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; import copy from 'copy-to-clipboard'; @@ -26,7 +27,8 @@ import React, { useCallback, useState } from 'react'; import { useStore } from 'zustand'; import { Loader } from '../../../components'; -import { Execution, WorkbenchQuery } from '../../../druid-models'; +import type { Execution } from '../../../druid-models'; +import { WorkbenchQuery } from '../../../druid-models'; import { cancelTaskExecution, getTaskExecution } from '../../../helpers'; import { useClock, useInterval, useQueryManager } from '../../../hooks'; import { AppToaster } from '../../../singletons'; @@ -147,6 +149,7 @@ LIMIT 100`, { let execution: Execution; try { @@ -198,7 +201,7 @@ LIMIT 100`, downloadQueryDetailArchive(w.taskId)} + onClick={() => void downloadQueryDetailArchive(w.taskId)} /> {w.taskStatus === 'RUNNING' && ( <> @@ -263,6 +266,7 @@ LIMIT 100`, ) : undefined} {confirmCancelId && ( { if (!confirmCancelId) return; try { diff --git a/web-console/src/views/workbench-view/result-table-pane/result-table-pane.tsx b/web-console/src/views/workbench-view/result-table-pane/result-table-pane.tsx index c2b25b40d47f..a5cd837f87f4 100644 --- a/web-console/src/views/workbench-view/result-table-pane/result-table-pane.tsx +++ b/web-console/src/views/workbench-view/result-table-pane/result-table-pane.tsx @@ -20,20 +20,11 @@ import { Button, Icon, Intent, Menu, MenuItem } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { Popover2 } from '@blueprintjs/popover2'; import classNames from 'classnames'; -import { - C, - Column, - F, - QueryResult, - SqlAlias, - SqlExpression, - SqlFunction, - SqlLiteral, - SqlQuery, - SqlStar, -} from 'druid-query-toolkit'; +import type { Column, QueryResult, SqlExpression, SqlQuery } from 'druid-query-toolkit'; +import { C, F, SqlAlias, SqlFunction, SqlLiteral, SqlStar } from 'druid-query-toolkit'; import * as JSONBig from 'json-bigint-native'; import React, { useEffect, useState } from 'react'; +import type { RowRenderProps } from 'react-table'; import ReactTable from 'react-table'; import { BracedText, Deferred, TableCell } from '../../../components'; @@ -45,6 +36,7 @@ import { TIME_COLUMN, } from '../../../druid-models'; import { SMALL_TABLE_PAGE_SIZE, SMALL_TABLE_PAGE_SIZE_OPTIONS } from '../../../react-table'; +import type { Pagination, QueryAction } from '../../../utils'; import { columnToIcon, columnToWidth, @@ -54,9 +46,7 @@ import { formatNumber, getNumericColumnBraces, oneOf, - Pagination, prettyPrintSql, - QueryAction, timeFormatToSql, } from '../../../utils'; import { ExpressionEditorDialog } from '../../sql-data-loader-view/expression-editor-dialog/expression-editor-dialog'; @@ -616,7 +606,7 @@ export const ResultTablePane = React.memo(function ResultTablePane(props: Result }, headerClassName: getHeaderClassName(h), accessor: String(i), - Cell(row) { + Cell(row: RowRenderProps) { const value = row.value; return (
diff --git a/web-console/src/views/workbench-view/run-panel/run-panel.tsx b/web-console/src/views/workbench-view/run-panel/run-panel.tsx index 1f375a3dc2b1..ceee42896093 100644 --- a/web-console/src/views/workbench-view/run-panel/run-panel.tsx +++ b/web-console/src/views/workbench-view/run-panel/run-panel.tsx @@ -34,6 +34,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { MenuCheckbox, MenuTristate } from '../../../components'; import { EditContextDialog, StringInputDialog } from '../../../dialogs'; import { IndexSpecDialog } from '../../../dialogs/index-spec-dialog/index-spec-dialog'; +import type { DruidEngine, IndexSpec, QueryContext, WorkbenchQuery } from '../../../druid-models'; import { changeDurableShuffleStorage, changeFinalizeAggregations, @@ -43,7 +44,6 @@ import { changeUseApproximateCountDistinct, changeUseApproximateTopN, changeUseCache, - DruidEngine, getDurableShuffleStorage, getFinalizeAggregations, getGroupByEnableMultiValueUnnesting, @@ -52,10 +52,7 @@ import { getUseApproximateCountDistinct, getUseApproximateTopN, getUseCache, - IndexSpec, - QueryContext, summarizeIndexSpec, - WorkbenchQuery, } from '../../../druid-models'; import { deepGet, pluralIfNeeded, tickIcon } from '../../../utils'; import { MaxTasksButton } from '../max-tasks-button/max-tasks-button'; @@ -89,7 +86,7 @@ export interface RunPanelProps { onQueryChange(query: WorkbenchQuery): void; loading: boolean; small?: boolean; - onRun(preview: boolean): void; + onRun(preview: boolean): void | Promise; queryEngines: DruidEngine[]; clusterCapacity: number | undefined; moreMenu?: JSX.Element; @@ -119,12 +116,12 @@ export const RunPanel = React.memo(function RunPanel(props: RunPanelProps) { const handleRun = useCallback(() => { if (!onRun) return; - onRun(false); + void onRun(false); }, [onRun]); const handlePreview = useCallback(() => { if (!onRun) return; - onRun(true); + void onRun(true); }, [onRun]); const hotkeys = useMemo(() => { @@ -197,7 +194,7 @@ export const RunPanel = React.memo(function RunPanel(props: RunPanelProps) { className={effectiveEngine === 'native' ? 'rune-button' : undefined} disabled={loading} icon={IconNames.CARET_RIGHT} - onClick={() => onRun(false)} + onClick={() => void onRun(false)} text="Run" intent={!emptyQuery && !small ? Intent.PRIMARY : undefined} small={small} @@ -207,7 +204,7 @@ export const RunPanel = React.memo(function RunPanel(props: RunPanelProps) {
`; diff --git a/web-console/src/views/home-view/home-view.spec.tsx b/web-console/src/views/home-view/home-view.spec.tsx index 81f46cc29619..0abf64eaa7e9 100644 --- a/web-console/src/views/home-view/home-view.spec.tsx +++ b/web-console/src/views/home-view/home-view.spec.tsx @@ -16,10 +16,10 @@ * limitations under the License. */ -import { shallow } from 'enzyme'; import React from 'react'; import { Capabilities } from '../../helpers'; +import { shallow } from '../../utils/shallow-renderer'; import { HomeView } from './home-view'; diff --git a/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap b/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap index 028af2d9e1e2..961ec6179290 100644 --- a/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap +++ b/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`IngestionView matches snapshot 1`] = ` - + - - - - - - - + + + + + + + + + - + Group by - +

- + `; diff --git a/web-console/src/views/ingestion-view/ingestion-view.spec.tsx b/web-console/src/views/ingestion-view/ingestion-view.spec.tsx index 7c00f7c47b9e..9d53c2aec222 100644 --- a/web-console/src/views/ingestion-view/ingestion-view.spec.tsx +++ b/web-console/src/views/ingestion-view/ingestion-view.spec.tsx @@ -16,10 +16,10 @@ * limitations under the License. */ -import { shallow } from 'enzyme'; import React from 'react'; import { Capabilities } from '../../helpers'; +import { shallow } from '../../utils/shallow-renderer'; import { IngestionView } from './ingestion-view'; diff --git a/web-console/src/views/load-data-view/__snapshots__/load-data-view.spec.tsx.snap b/web-console/src/views/load-data-view/__snapshots__/load-data-view.spec.tsx.snap index f6289c9d57f1..9cf8d12a9d82 100644 --- a/web-console/src/views/load-data-view/__snapshots__/load-data-view.spec.tsx.snap +++ b/web-console/src/views/load-data-view/__snapshots__/load-data-view.spec.tsx.snap @@ -12,7 +12,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` >

@@ -36,7 +34,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` className="connect" disabled={true} icon={false} - key="connect" onClick={[Function]} text="Connect" /> @@ -45,7 +42,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` className="parser" disabled={true} icon={false} - key="parser" onClick={[Function]} text="Parse data" /> @@ -53,7 +49,6 @@ exports[`LoadDataView matches snapshot batch 1`] = `
@@ -77,7 +71,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` className="transform" disabled={true} icon={false} - key="transform" onClick={[Function]} text="Transform" /> @@ -86,7 +79,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` className="filter" disabled={true} icon={false} - key="filter" onClick={[Function]} text="Filter" /> @@ -95,7 +87,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` className="schema" disabled={true} icon={false} - key="schema" onClick={[Function]} text="Configure schema" /> @@ -103,7 +94,6 @@ exports[`LoadDataView matches snapshot batch 1`] = `
@@ -127,7 +116,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` className="tuning" disabled={true} icon={false} - key="tuning" onClick={[Function]} text="Tune" /> @@ -136,7 +124,6 @@ exports[`LoadDataView matches snapshot batch 1`] = ` className="publish" disabled={true} icon={false} - key="publish" onClick={[Function]} text="Publish" /> @@ -144,7 +131,6 @@ exports[`LoadDataView matches snapshot batch 1`] = `
@@ -167,24 +152,28 @@ exports[`LoadDataView matches snapshot batch 1`] = `
-
+
-
-
- - -

- Please specify where your raw data is located. -

-
-
-
+ className="main" + > +
+ +
+
+
+ + +

+ Please specify where your raw data is located. +

+
+
+
+
`; @@ -200,7 +189,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` >
@@ -224,7 +211,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` className="connect" disabled={true} icon={false} - key="connect" onClick={[Function]} text="Connect" /> @@ -233,7 +219,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` className="parser" disabled={true} icon={false} - key="parser" onClick={[Function]} text="Parse data" /> @@ -241,7 +226,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = `
@@ -265,7 +248,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` className="transform" disabled={true} icon={false} - key="transform" onClick={[Function]} text="Transform" /> @@ -274,7 +256,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` className="filter" disabled={true} icon={false} - key="filter" onClick={[Function]} text="Filter" /> @@ -283,7 +264,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` className="schema" disabled={true} icon={false} - key="schema" onClick={[Function]} text="Configure schema" /> @@ -291,7 +271,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = `
@@ -315,7 +293,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` className="tuning" disabled={true} icon={false} - key="tuning" onClick={[Function]} text="Tune" /> @@ -324,7 +301,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = ` className="publish" disabled={true} icon={false} - key="publish" onClick={[Function]} text="Publish" /> @@ -332,7 +308,6 @@ exports[`LoadDataView matches snapshot streaming 1`] = `
@@ -355,23 +329,27 @@ exports[`LoadDataView matches snapshot streaming 1`] = `
-
+
-
-
- - -

- Please specify where your raw data is located. -

-
-
-
+ className="main" + > +
+ +
+
+
+ + +

+ Please specify where your raw data is located. +

+
+
+
+
`; diff --git a/web-console/src/views/load-data-view/load-data-view.spec.tsx b/web-console/src/views/load-data-view/load-data-view.spec.tsx index ad6e48440bde..e486e2aed1a3 100644 --- a/web-console/src/views/load-data-view/load-data-view.spec.tsx +++ b/web-console/src/views/load-data-view/load-data-view.spec.tsx @@ -16,9 +16,10 @@ * limitations under the License. */ -import { shallow } from 'enzyme'; import React from 'react'; +import { shallow } from '../../utils/shallow-renderer'; + import { LoadDataView } from './load-data-view'; describe('LoadDataView', () => { diff --git a/web-console/src/views/lookups-view/lookups-view.spec.tsx b/web-console/src/views/lookups-view/lookups-view.spec.tsx index 0daa0eab1539..bbbb7397bf46 100644 --- a/web-console/src/views/lookups-view/lookups-view.spec.tsx +++ b/web-console/src/views/lookups-view/lookups-view.spec.tsx @@ -16,9 +16,10 @@ * limitations under the License. */ -import { shallow } from 'enzyme'; import React from 'react'; +import { shallow } from '../../utils/shallow-renderer'; + import { LookupsView } from './lookups-view'; describe('LookupsView', () => { diff --git a/web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap b/web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap index 5cb412b11cd9..e54a5dc7ba98 100755 --- a/web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap +++ b/web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SegmentsView matches snapshot 1`] = ` - +
@@ -12,9 +12,9 @@ exports[`SegmentsView matches snapshot 1`] = ` localStorageKey="segments-refresh-rate" onRefresh={[Function]} /> - + Group by - +
-
+ `; diff --git a/web-console/src/views/segments-view/segments-view.spec.tsx b/web-console/src/views/segments-view/segments-view.spec.tsx index 5f19af25848b..0191d05d0f11 100644 --- a/web-console/src/views/segments-view/segments-view.spec.tsx +++ b/web-console/src/views/segments-view/segments-view.spec.tsx @@ -16,10 +16,10 @@ * limitations under the License. */ -import { shallow } from 'enzyme'; import React from 'react'; import { Capabilities } from '../../helpers'; +import { shallow } from '../../utils/shallow-renderer'; import { SegmentsView } from '../segments-view/segments-view'; describe('SegmentsView', () => { diff --git a/web-console/src/views/services-view/__snapshots__/services-view.spec.tsx.snap b/web-console/src/views/services-view/__snapshots__/services-view.spec.tsx.snap index 19121a8a13bc..bfec768131e1 100644 --- a/web-console/src/views/services-view/__snapshots__/services-view.spec.tsx.snap +++ b/web-console/src/views/services-view/__snapshots__/services-view.spec.tsx.snap @@ -7,9 +7,9 @@ exports[`ServicesView renders data 1`] = ` - + Group by - +