Apply import type fixes

This commit is contained in:
Dannon Baker
2024-07-23 08:19:29 -04:00
parent 317085cc54
commit f87e605f86
172 changed files with 286 additions and 288 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema/schema";
import { type components } from "@/api/schema/schema";
export type Instance =
| components["schemas"]["UserFileSourceModel"]
+1 -1
View File
@@ -1,4 +1,4 @@
import { CollectionEntry, DCESummary, HDCADetailed, HDCASummary, isHDCA } from "@/api";
import { type CollectionEntry, type DCESummary, type HDCADetailed, type HDCASummary, isHDCA } from "@/api";
import { fetcher } from "@/api/schema";
const DEFAULT_LIMIT = 50;
+3 -3
View File
@@ -1,8 +1,8 @@
import axios from "axios";
import type { FetchArgType } from "openapi-typescript-fetch";
import { type FetchArgType } from "openapi-typescript-fetch";
import { HDADetailed } from "@/api";
import { components, fetcher } from "@/api/schema";
import { type HDADetailed } from "@/api";
import { type components, fetcher } from "@/api/schema";
import { withPrefix } from "@/utils/redirect";
export const datasetsFetcher = fetcher.path("/api/datasets").method("get").create();
+1 -1
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import { components, fetcher } from "@/api/schema";
import { type components, fetcher } from "@/api/schema";
type GroupModel = components["schemas"]["GroupModel"];
export async function getAllGroups(): Promise<GroupModel[]> {
+1 -1
View File
@@ -1,4 +1,4 @@
import type { FetchArgType } from "openapi-typescript-fetch";
import { type FetchArgType } from "openapi-typescript-fetch";
import { type components, fetcher } from "@/api/schema";
+1 -2
View File
@@ -1,5 +1,4 @@
import type { components } from "@/api/schema";
import { fetcher } from "@/api/schema";
import { type components, fetcher } from "@/api/schema";
import {
type ExportRecord,
ExportRecordModel,
+1 -1
View File
@@ -1,6 +1,6 @@
/** Contains type alias and definitions related to Galaxy API models. */
import { components } from "@/api/schema";
import { type components } from "@/api/schema";
/**
* Contains minimal information about a History.
+1 -1
View File
@@ -2,7 +2,7 @@ import axios from "axios";
import { getAppRoot } from "@/onload";
import { ApiResponse, components, fetcher } from "./schema";
import { type ApiResponse, type components, fetcher } from "./schema";
export type WorkflowInvocationElementView = components["schemas"]["WorkflowInvocationElementView"];
export type WorkflowInvocationCollectionView = components["schemas"]["WorkflowInvocationCollectionView"];
+1 -1
View File
@@ -1,4 +1,4 @@
import { components, fetcher } from "@/api/schema";
import { type components, fetcher } from "@/api/schema";
export type JobDestinationParams = components["schemas"]["JobDestinationParams"];
+1 -1
View File
@@ -1,5 +1,5 @@
import { fetcher } from "@/api/schema";
import type { components } from "@/api/schema/schema";
import { type components } from "@/api/schema/schema";
export type UserConcreteObjectStore = components["schemas"]["UserConcreteObjectStoreModel"];
+1 -1
View File
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
import { fetcher } from "@/api/schema/fetcher";
/** The browsing mode:
+1 -1
View File
@@ -1,4 +1,4 @@
import type { paths } from "@/api/schema";
import { type paths } from "@/api/schema";
jest.mock("@/api/schema", () => ({
fetcher: mockFetcher,
+2 -3
View File
@@ -1,10 +1,9 @@
import type { ApiResponse, Middleware } from "openapi-typescript-fetch";
import { Fetcher } from "openapi-typescript-fetch";
import { ApiResponse, Fetcher, type Middleware } from "openapi-typescript-fetch";
import { getAppRoot } from "@/onload/loadConfig";
import { rethrowSimple } from "@/utils/simple-error";
import type { paths } from "./schema";
import { type paths } from "./schema";
export { ApiResponse };
+1 -1
View File
@@ -1,4 +1,4 @@
import { components, fetcher } from "@/api/schema";
import { type components, fetcher } from "@/api/schema";
type TaggableItemClass = components["schemas"]["TaggableItemClass"];
+1 -1
View File
@@ -1,4 +1,4 @@
import { components, fetcher } from "@/api/schema";
import { type components, fetcher } from "@/api/schema";
export type StoredWorkflowDetailed = components["schemas"]["StoredWorkflowDetailed"];
@@ -1,8 +1,8 @@
import { getLocalVue } from "@tests/jest/helpers";
import { mount, Wrapper } from "@vue/test-utils";
import { mount, type Wrapper } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { type BrowsableFilesSourcePlugin, CreatedEntry } from "@/api/remoteFiles";
import { type BrowsableFilesSourcePlugin, type CreatedEntry } from "@/api/remoteFiles";
import { mockFetcher } from "@/api/schema/__mocks__";
import ExportRDMForm from "./ExportRDMForm.vue";
@@ -1,6 +1,6 @@
import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/jest/helpers";
import { mount, Wrapper } from "@vue/test-utils";
import { mount, type Wrapper } from "@vue/test-utils";
import { HistoryFilters } from "@/components/History/HistoryFilters";
import { WorkflowFilters } from "@/components/Workflow/List/WorkflowFilters";
@@ -1,10 +1,10 @@
import { shallowMount } from "@vue/test-utils";
import { type PropType, ref } from "vue";
import { TaskMonitor } from "@/composables/genericTaskMonitor";
import { type TaskMonitor } from "@/composables/genericTaskMonitor";
import {
type MonitoringData,
MonitoringRequest,
type MonitoringRequest,
usePersistentProgressTaskMonitor,
} from "@/composables/persistentProgressMonitor";
@@ -1,6 +1,6 @@
import { formatDistanceToNow, parseISO } from "date-fns";
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
type ExportObjectRequestMetadata = components["schemas"]["ExportObjectRequestMetadata"];
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
import { ExportRecordModel } from "@/components/Common/models/exportRecordModel";
type ObjectExportTaskResponse = components["schemas"]["ObjectExportTaskResponse"];
@@ -1,7 +1,7 @@
import { shallowMount } from "@vue/test-utils";
import { getLocalVue } from "tests/jest/helpers";
import { FormEntry } from "./formUtil";
import { type FormEntry } from "./formUtil";
import InstanceForm from "./InstanceForm.vue";
@@ -1,4 +1,4 @@
import { TemplateVariable } from "@/api/configTemplates";
import { type TemplateVariable } from "@/api/configTemplates";
import { createTemplateForm, templateVariableFormEntry, upgradeForm } from "./formUtil";
import {
@@ -1,12 +1,12 @@
import type {
Instance,
PluginStatus,
SecretData,
TemplateSecret,
TemplateSummary,
TemplateVariable,
VariableData,
VariableValueType,
import {
type Instance,
type PluginStatus,
type SecretData,
type TemplateSecret,
type TemplateSummary,
type TemplateVariable,
type VariableData,
type VariableValueType,
} from "@/api/configTemplates";
import { markup } from "@/components/ObjectStore/configurationMarkdown";
@@ -1,6 +1,6 @@
import type { FileSourceTemplateSummary } from "@/api/fileSources";
import type { UserConcreteObjectStore } from "@/components/ObjectStore/Instances/types";
import type { ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
import { type FileSourceTemplateSummary } from "@/api/fileSources";
import { type UserConcreteObjectStore } from "@/components/ObjectStore/Instances/types";
import { type ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
export const STANDARD_OBJECT_STORE_TEMPLATE: ObjectStoreTemplateSummary = {
type: "aws_s3",
@@ -1,5 +1,5 @@
import { getLocalVue } from "@tests/jest/helpers";
import { mount, Wrapper } from "@vue/test-utils";
import { mount, type Wrapper } from "@vue/test-utils";
import axios from "axios";
import MockAdapter from "axios-mock-adapter";
import { format, parseISO } from "date-fns";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
export type DatatypesCombinedMap = components["schemas"]["DatatypesCombinedMap"];
@@ -2,8 +2,7 @@
import DatatypesJson from "@tests/test-data/json/datatypes.json";
import DatatypesMappingJson from "@tests/test-data/json/datatypes.mapping.json";
import type { DatatypesCombinedMap } from "./model";
import { DatatypesMapperModel } from "./model";
import { type DatatypesCombinedMap, DatatypesMapperModel } from "./model";
export const typesAndMappingResponse: DatatypesCombinedMap = {
datatypes: DatatypesJson,
@@ -1,6 +1,6 @@
import { computed, type Ref } from "vue";
import type { FileSourceTemplateSummary, UserFileSourceModel } from "@/api/fileSources";
import { type FileSourceTemplateSummary, type UserFileSourceModel } from "@/api/fileSources";
import { useFileSourceInstancesStore } from "@/stores/fileSourceInstancesStore";
import { useFileSourceTemplatesStore } from "@/stores/fileSourceTemplatesStore";
@@ -1,4 +1,4 @@
import type { UserFileSourceModel } from "@/api/fileSources";
import { type UserFileSourceModel } from "@/api/fileSources";
import { fetcher } from "@/api/schema/fetcher";
export const create = fetcher.path("/api/file_source_instances").method("post").create();
@@ -1,11 +1,10 @@
import { createTestingPinia } from "@pinia/testing";
import { mount, Wrapper } from "@vue/test-utils";
import { mount, type Wrapper } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { getLocalVue } from "tests/jest/helpers";
import { mockFetcher } from "@/api/schema/__mocks__";
import type { SelectionItem } from "@/components/SelectionDialog/selectionTypes";
import { SELECTION_STATES } from "@/components/SelectionDialog/selectionTypes";
import { SELECTION_STATES, type SelectionItem } from "@/components/SelectionDialog/selectionTypes";
/**
* The following imports mock a remote file resource directory structure,
@@ -27,6 +26,7 @@ import { SELECTION_STATES } from "@/components/SelectionDialog/selectionTypes";
* |-- file1
* |-- file2
*/
import { type RemoteFilesList } from "./testingData";
import {
directory1RecursiveResponse,
directory1Response,
@@ -34,7 +34,6 @@ import {
directoryId,
ftpId,
pdbResponse,
RemoteFilesList,
rootId,
rootResponse,
someErrorText,
@@ -1,4 +1,4 @@
import { BrowsableFilesSourcePlugin } from "@/api/remoteFiles";
import { type BrowsableFilesSourcePlugin } from "@/api/remoteFiles";
export const ftpId = "_ftp";
export const rootId = "pdb-gzip";
@@ -1,6 +1,6 @@
import type { BrowsableFilesSourcePlugin } from "@/api/remoteFiles";
import { type BrowsableFilesSourcePlugin } from "@/api/remoteFiles";
import type { SelectionItem } from "../SelectionDialog/selectionTypes";
import { type SelectionItem } from "../SelectionDialog/selectionTypes";
export const isSubPath = (originPath: string, destinationPath: string) => {
return subPathCondition(ensureTrailingSlash(originPath), ensureTrailingSlash(destinationPath));
@@ -3,9 +3,9 @@ import "./worker/__mocks__/selectMany";
import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/jest/helpers";
import { mount } from "@vue/test-utils";
import { PropType } from "vue";
import { type PropType } from "vue";
import type { SelectOption } from "./worker/selectMany";
import { type SelectOption } from "./worker/selectMany";
import FormSelectMany from "./FormSelectMany.vue";
@@ -2,7 +2,7 @@ import { type Ref, ref, watch } from "vue";
import { assertDefined } from "@/utils/assertions";
import type { SelectOption } from "./worker/selectMany";
import { type SelectOption } from "./worker/selectMany";
/**
* Handles logic required for highlighting options
@@ -1,6 +1,6 @@
import { reactive, ref, watch } from "vue";
import type { SelectOption, useSelectMany as UseSelectMany } from "../selectMany";
import { type SelectOption, type useSelectMany as UseSelectMany } from "../selectMany";
import { main } from "../selectManyMain";
jest.mock("@/components/Form/Elements/FormSelectMany/worker/selectMany", () => ({
@@ -1,4 +1,4 @@
import { SelectOption } from "./selectMany";
import { type SelectOption } from "./selectMany";
export function filterOptions(options: SelectOption[], filter: string | RegExp, caseSensitive: boolean) {
let filteredSelectOptions;
@@ -1,4 +1,4 @@
import type { Ref } from "vue";
import { type Ref } from "vue";
export type SelectValue = Record<string, unknown> | string | number | null;
@@ -1,7 +1,7 @@
import type { UnwrapNestedRefs } from "vue";
import { type UnwrapNestedRefs } from "vue";
import { filterOptions } from "./filterOptions";
import type { SelectOption, SelectValue, UseSelectManyOptions, UseSelectManyReturn } from "./selectMany";
import { type SelectOption, type SelectValue, type UseSelectManyOptions, type UseSelectManyReturn } from "./selectMany";
export function main(options: UnwrapNestedRefs<UseSelectManyOptions>): UnwrapNestedRefs<UseSelectManyReturn> {
const unselectedOptionsFiltered: SelectOption[] = [];
@@ -8,7 +8,7 @@ import _l from "@/utils/localization";
import { withPrefix } from "@/utils/redirect";
import { errorMessageAsString } from "@/utils/simple-error";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -8,7 +8,7 @@ import _l from "@/utils/localization";
import { withPrefix } from "@/utils/redirect";
import { errorMessageAsString } from "@/utils/simple-error";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -8,7 +8,7 @@ import _l from "@/utils/localization";
import { withPrefix } from "@/utils/redirect";
import { errorMessageAsString } from "@/utils/simple-error";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -8,7 +8,7 @@ import _l from "@/utils/localization";
import { withPrefix } from "@/utils/redirect";
import { errorMessageAsString } from "@/utils/simple-error";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -15,13 +15,13 @@ import { useEventBus } from "@vueuse/core";
import axios from "axios";
import { createApiKey, deleteUser, recalculateDiskUsageByUserId, sendActivationEmail, undeleteUser } from "@/api/users";
import type { GalaxyConfiguration } from "@/stores/configurationStore";
import { type GalaxyConfiguration } from "@/stores/configurationStore";
import Filtering, { contains, equals, toBool, type ValidFilter } from "@/utils/filtering";
import _l from "@/utils/localization";
import { withPrefix } from "@/utils/redirect";
import { errorMessageAsString } from "@/utils/simple-error";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -17,7 +17,7 @@ import Filtering, { contains, equals, expandNameTag, toBool, type ValidFilter }
import _l from "@/utils/localization";
import { errorMessageAsString, rethrowSimple } from "@/utils/simple-error";
import type { ActionArray, BatchOperationArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type BatchOperationArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -5,7 +5,7 @@ import { historiesFetcher } from "@/api/histories";
import Filtering, { contains, expandNameTag, type ValidFilter } from "@/utils/filtering";
import _l from "@/utils/localization";
import type { FieldArray, GridConfig } from "./types";
import { type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -7,7 +7,7 @@ import Filtering, { contains, expandNameTag, type ValidFilter } from "@/utils/fi
import _l from "@/utils/localization";
import { rethrowSimple } from "@/utils/simple-error";
import type { FieldArray, GridConfig } from "./types";
import { type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -2,12 +2,12 @@ import { faPlay, faPlus } from "@fortawesome/free-solid-svg-icons";
import { useEventBus } from "@vueuse/core";
import { invocationsFetcher, type WorkflowInvocation } from "@/api/invocations";
import type { StoredWorkflowDetailed } from "@/api/workflows";
import { type StoredWorkflowDetailed } from "@/api/workflows";
import { useHistoryStore } from "@/stores/historyStore";
import { useWorkflowStore } from "@/stores/workflowStore";
import _l from "@/utils/localization";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -2,12 +2,12 @@ import { faArrowLeft, faPlay } from "@fortawesome/free-solid-svg-icons";
import { useEventBus } from "@vueuse/core";
import { invocationsFetcher, type WorkflowInvocation } from "@/api/invocations";
import type { StoredWorkflowDetailed } from "@/api/workflows";
import { type StoredWorkflowDetailed } from "@/api/workflows";
import { useUserStore } from "@/stores/userStore";
import { useWorkflowStore } from "@/stores/workflowStore";
import _l from "@/utils/localization";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -2,13 +2,13 @@ import { faArrowLeft, faEye, faPlay } from "@fortawesome/free-solid-svg-icons";
import { useEventBus } from "@vueuse/core";
import { invocationsFetcher, type WorkflowInvocation } from "@/api/invocations";
import type { StoredWorkflowDetailed } from "@/api/workflows";
import { type StoredWorkflowDetailed } from "@/api/workflows";
import { useHistoryStore } from "@/stores/historyStore";
import { useUserStore } from "@/stores/userStore";
import { useWorkflowStore } from "@/stores/workflowStore";
import _l from "@/utils/localization";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
+1 -1
View File
@@ -6,7 +6,7 @@ import Filtering, { contains, equals, toBool, type ValidFilter } from "@/utils/f
import _l from "@/utils/localization";
import { errorMessageAsString } from "@/utils/simple-error";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -4,7 +4,7 @@ import { useEventBus } from "@vueuse/core";
import { fetcher } from "@/api/schema";
import Filtering, { contains, type ValidFilter } from "@/utils/filtering";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
+3 -3
View File
@@ -1,7 +1,7 @@
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import { type IconDefinition } from "@fortawesome/fontawesome-svg-core";
import type { GalaxyConfiguration } from "@/stores/configurationStore";
import Filtering from "@/utils/filtering";
import { type GalaxyConfiguration } from "@/stores/configurationStore";
import type Filtering from "@/utils/filtering";
export interface Action {
title: string;
@@ -8,7 +8,7 @@ import Filtering, { contains, equals, expandNameTag, toBool, type ValidFilter }
import { withPrefix } from "@/utils/redirect";
import { errorMessageAsString, rethrowSimple } from "@/utils/simple-error";
import type { ActionArray, FieldArray, GridConfig } from "./types";
import { type ActionArray, type FieldArray, type GridConfig } from "./types";
const { emit } = useEventBus<string>("grid-router-push");
@@ -4,7 +4,7 @@ import { fetcher } from "@/api/schema";
import Filtering, { contains, expandNameTag, type ValidFilter } from "@/utils/filtering";
import { withPrefix } from "@/utils/redirect";
import type { FieldArray, GridConfig } from "./types";
import { type FieldArray, type GridConfig } from "./types";
/**
* Api endpoint handlers
@@ -5,7 +5,7 @@ import { BFormCheckbox } from "bootstrap-vue";
import flushPromises from "flush-promises";
import { getLocalVue } from "tests/jest/helpers";
import type { HistorySummary } from "@/api";
import { type HistorySummary } from "@/api";
import { mockFetcher } from "@/api/schema/__mocks__";
import {
FAILED_FILE_SOURCE_STORE_RESPONSE,
@@ -4,7 +4,7 @@ import flushPromises from "flush-promises";
import { setActivePinia } from "pinia";
import { getLocalVue } from "tests/jest/helpers";
import type { HistorySummary } from "@/api";
import { type HistorySummary } from "@/api";
import { mockFetcher } from "@/api/schema/__mocks__";
import { useHistoryStore } from "@/stores/historyStore";
@@ -1,6 +1,6 @@
import { getLocalVue } from "@tests/jest/helpers";
import { mount, Wrapper } from "@vue/test-utils";
import Vue from "vue";
import { mount, type Wrapper } from "@vue/test-utils";
import type Vue from "vue";
import DatasetDownload from "./DatasetDownload.vue";
@@ -1,4 +1,4 @@
import { STATES } from "./states";
import { type STATES } from "./states";
export type State = {
status: string;
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
type DatasetState = components["schemas"]["DatasetState"];
// The 'failed' state is for the collection job state summary, not a dataset state.
@@ -1,4 +1,4 @@
import { shallowMount, Wrapper } from "@vue/test-utils";
import { shallowMount, type Wrapper } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { getLocalVue } from "tests/jest/helpers";
@@ -6,9 +6,9 @@ import MockAdapter from "axios-mock-adapter";
import flushPromises from "flush-promises";
import { setActivePinia } from "pinia";
import type { HistorySummary } from "@/api";
import { type HistorySummary } from "@/api";
import { fetchHistoryExportRecords } from "@/api/histories.export";
import type { FilesSourcePlugin } from "@/api/remoteFiles";
import { type FilesSourcePlugin } from "@/api/remoteFiles";
import { mockFetcher } from "@/api/schema/__mocks__";
import {
EXPIRED_STS_DOWNLOAD_RECORD,
@@ -1,4 +1,4 @@
import { mount, Wrapper } from "@vue/test-utils";
import { mount, type Wrapper } from "@vue/test-utils";
import axios from "axios";
import MockAdapter from "axios-mock-adapter";
import flushPromises from "flush-promises";
@@ -1,7 +1,7 @@
<template>
<div>
<FolderTopBar
:canAddLibraryItem="canAddLibraryItem"
:can-add-library-item="canAddLibraryItem"
:folder-contents="folderContents"
:include-deleted.sync="includeDeleted"
:folder_id="currentFolderId"
@@ -1,4 +1,4 @@
import { mount, Wrapper } from "@vue/test-utils";
import { mount, type Wrapper } from "@vue/test-utils";
import axios from "axios";
import MockAdapter from "axios-mock-adapter";
import { getLocalVue } from "tests/jest/helpers";
@@ -1,5 +1,5 @@
import { getLocalVue } from "@tests/jest/helpers";
import { mount, Wrapper } from "@vue/test-utils";
import { mount, type Wrapper } from "@vue/test-utils";
import axios from "axios";
import MockAdapter from "axios-mock-adapter";
@@ -1,5 +1,5 @@
import { format, parseISO } from "date-fns";
import { computed, Ref, ref, watch } from "vue";
import { computed, type Ref, ref, watch } from "vue";
import { fetcher } from "@/api/schema";
@@ -3,9 +3,9 @@ import { getLocalVue } from "@tests/jest/helpers";
import { mount, type Wrapper } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { setActivePinia } from "pinia";
import Vue from "vue";
import type Vue from "vue";
import type { UserNotification } from "@/api/notifications";
import { type UserNotification } from "@/api/notifications";
import { generateMessageNotification, generateNewSharedItemNotification } from "@/components/Notifications/test-utils";
import { useNotificationsStore } from "@/stores/notificationsStore";
@@ -1,9 +1,9 @@
import type {
MessageNotification,
NewSharedItemNotificationContentItemType,
NotificationVariants,
SharedItemNotification,
UserNotification,
import {
type MessageNotification,
type NewSharedItemNotificationContentItemType,
type NotificationVariants,
type SharedItemNotification,
type UserNotification,
} from "@/api/notifications";
export function generateRandomItemType() {
@@ -2,9 +2,9 @@ import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { getLocalVue } from "tests/jest/helpers";
import { PluginStatus } from "@/api/configTemplates";
import { type PluginStatus } from "@/api/configTemplates";
import { mockFetcher } from "@/api/schema/__mocks__";
import type { ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
import { type ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
import CreateForm from "./CreateForm.vue";
@@ -3,9 +3,9 @@ import flushPromises from "flush-promises";
import { getLocalVue, injectTestRouter } from "tests/jest/helpers";
import { mockFetcher } from "@/api/schema/__mocks__";
import type { ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
import { type ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
import type { UserConcreteObjectStore } from "./types";
import { type UserConcreteObjectStore } from "./types";
import UpgradeForm from "./UpgradeForm.vue";
@@ -1,10 +1,10 @@
import { computed, type Ref } from "vue";
import type { ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
import { type ObjectStoreTemplateSummary } from "@/components/ObjectStore/Templates/types";
import { useObjectStoreInstancesStore } from "@/stores/objectStoreInstancesStore";
import { useObjectStoreTemplatesStore } from "@/stores/objectStoreTemplatesStore";
import type { UserConcreteObjectStore } from "./types";
import { type UserConcreteObjectStore } from "./types";
export function useInstanceAndTemplate(instanceIdRef: Ref<string>) {
const objectStoreTemplatesStore = useObjectStoreTemplatesStore();
@@ -1,6 +1,6 @@
import { fetcher } from "@/api/schema/fetcher";
import type { UserConcreteObjectStore } from "./types";
import { type UserConcreteObjectStore } from "./types";
export const create = fetcher.path("/api/object_store_instances").method("post").create();
export const test = fetcher.path("/api/object_store_instances/test").method("post").create();
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema/schema";
import { type components } from "@/api/schema/schema";
export type UserConcreteObjectStore = components["schemas"]["UserConcreteObjectStoreModel"];
export type CreateInstancePayload = components["schemas"]["CreateInstancePayload"];
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema/schema";
import { type components } from "@/api/schema/schema";
export type ObjectStoreTemplateSummary = components["schemas"]["ObjectStoreTemplateSummary"];
export type ObjectStoreTemplateSummaries = ObjectStoreTemplateSummary[];
+1 -1
View File
@@ -1,3 +1,3 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
export type ConcreteObjectStoreModel = components["schemas"]["ConcreteObjectStoreModel"];
@@ -1,4 +1,4 @@
import { computed, Ref, ref } from "vue";
import { computed, type Ref, ref } from "vue";
import { referencedObjects } from "@/components/Markdown/parse";
+1 -2
View File
@@ -1,6 +1,5 @@
import { createPopper } from "@popperjs/core";
import type { Ref } from "vue";
import { onMounted, onUnmounted, onUpdated, ref, unref, watch } from "vue";
import { onMounted, onUnmounted, onUpdated, type Ref, ref, unref, watch } from "vue";
export type MaybeRef<T> = T | Ref<T>;
+2 -2
View File
@@ -1,6 +1,6 @@
import { computed, Ref } from "vue";
import { computed, type Ref } from "vue";
import { components } from "@/api/schema";
import { type components } from "@/api/schema";
import { useConfigStore } from "@/stores/configurationStore";
export type HelpForumTopic = components["schemas"]["HelpForumTopic"];
@@ -7,7 +7,7 @@ import { mockFetcher } from "@/api/schema/__mocks__";
import { getCurrentUser } from "@/stores/users/queries";
import { useUserStore } from "@/stores/userStore";
import { UserQuotaUsageData } from "./Quota/model";
import { type UserQuotaUsageData } from "./Quota/model";
import DiskUsageSummary from "./DiskUsageSummary.vue";
@@ -12,7 +12,7 @@ import {
fetchDiscardedHistories,
fetchDiscardedHistoriesSummary,
} from "../services";
import type { CleanupCategory } from "./model";
import { type CleanupCategory } from "./model";
export function useCleanupCategories() {
const cleanupCategories = ref<CleanupCategory[]>([
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
import { bytesToString } from "@/utils/utils";
type CleanableItemsSummaryResponse = components["schemas"]["CleanableItemsSummary"];
@@ -1,4 +1,4 @@
import type { CleanupOperation } from ".";
import { type CleanupOperation } from ".";
/**
* Defines a new category to display in the Storage Management Dashboard to
@@ -1,7 +1,7 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
import type { CleanableSummary } from "./CleanableSummary";
import type { CleanupResult } from "./CleanupResult";
import { type CleanableSummary } from "./CleanableSummary";
import { type CleanupResult } from "./CleanupResult";
export type CleanableItem = components["schemas"]["StoredItem"];
export type SortableKey = "name" | "size" | "update_time";
@@ -1,7 +1,7 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
import { bytesToString } from "@/utils/utils";
import type { CleanableItem } from "./CleanupOperation";
import { type CleanableItem } from "./CleanupOperation";
export type StorageItemsCleanupResult = components["schemas"]["StorageItemsCleanupResult"];
@@ -1,4 +1,4 @@
import type { components } from "@/api/schema";
import { type components } from "@/api/schema";
import { bytesToString } from "@/utils/utils";
export const DEFAULT_QUOTA_SOURCE_LABEL = "Default";
@@ -1,6 +1,6 @@
import { fetchQuotaUsages } from "@/api/users";
import { QuotaUsage, UserQuotaUsageData } from "./model/index";
import { QuotaUsage, type UserQuotaUsageData } from "./model/index";
export async function fetch() {
const { data } = await fetchQuotaUsages({ user_id: "current" });
@@ -1,6 +1,6 @@
import { mount } from "@vue/test-utils";
import type { DataValuePoint } from ".";
import { type DataValuePoint } from ".";
import BarChart from "./BarChart.vue";
@@ -1,6 +1,6 @@
import { bytesToString } from "@/utils/utils";
import type { DataValuePoint } from ".";
import { type DataValuePoint } from ".";
export function bytesLabelFormatter(dataPoint?: DataValuePoint | null): string {
return dataPoint ? `${dataPoint.label}: ${bytesToString(dataPoint.value)}` : "No data";
@@ -6,7 +6,7 @@ import { useConfirmDialog } from "@/composables/confirmDialog";
import { useToast } from "@/composables/toast";
import localize from "@/utils/localization";
import type { DataValuePoint } from "./Charts";
import { type DataValuePoint } from "./Charts";
import { bytesLabelFormatter, bytesValueFormatter } from "./Charts/formatters";
import { type ItemSizeSummary, purgeDatasetById, undeleteDatasetById } from "./service";
@@ -1,6 +1,6 @@
import { createPinia, setActivePinia } from "pinia";
import { LazyUndoRedoAction, UndoRedoAction, useUndoRedoStore } from "@/stores/undoRedoStore";
import { LazyUndoRedoAction, type UndoRedoAction, useUndoRedoStore } from "@/stores/undoRedoStore";
import { useConnectionStore } from "@/stores/workflowConnectionStore";
import { useWorkflowCommentStore } from "@/stores/workflowEditorCommentStore";
import { useWorkflowStateStore } from "@/stores/workflowEditorStateStore";
@@ -1,4 +1,4 @@
import type { Step, WorkflowStepStore } from "@/stores/workflowStepStore";
import { type Step, type WorkflowStepStore } from "@/stores/workflowStepStore";
/**
* Copies a step and increments a trailing number in it's label,
@@ -1,9 +1,9 @@
import { LazyUndoRedoAction, UndoRedoAction } from "@/stores/undoRedoStore";
import type {
BaseWorkflowComment,
WorkflowComment,
WorkflowCommentColor,
WorkflowCommentStore,
import {
type BaseWorkflowComment,
type WorkflowComment,
type WorkflowCommentColor,
type WorkflowCommentStore,
} from "@/stores/workflowEditorCommentStore";
class CommentAction extends UndoRedoAction {
@@ -1,7 +1,7 @@
import { FreehandWorkflowComment, WorkflowComment } from "@/stores/workflowEditorCommentStore";
import type { Step } from "@/stores/workflowStepStore";
import { type FreehandWorkflowComment, type WorkflowComment } from "@/stores/workflowEditorCommentStore";
import { type Step } from "@/stores/workflowStepStore";
import type { Workflow } from "../modules/model";
import { type Workflow } from "../modules/model";
export function mockToolStep(id: number): Step {
return {
@@ -1,10 +1,10 @@
import { replaceLabel } from "@/components/Markdown/parse";
import { useToast } from "@/composables/toast";
import { useRefreshFromStore } from "@/stores/refreshFromStore";
import { LazyUndoRedoAction, UndoRedoAction, UndoRedoStore } from "@/stores/undoRedoStore";
import { Connection, WorkflowConnectionStore } from "@/stores/workflowConnectionStore";
import { WorkflowStateStore } from "@/stores/workflowEditorStateStore";
import type { NewStep, Step, WorkflowStepStore } from "@/stores/workflowStepStore";
import { LazyUndoRedoAction, UndoRedoAction, type UndoRedoStore } from "@/stores/undoRedoStore";
import { type Connection, type WorkflowConnectionStore } from "@/stores/workflowConnectionStore";
import { type WorkflowStateStore } from "@/stores/workflowEditorStateStore";
import { type NewStep, type Step, type WorkflowStepStore } from "@/stores/workflowStepStore";
import { assertDefined } from "@/utils/assertions";
import { cloneStepWithUniqueLabel, getLabelSet } from "./cloneStep";
@@ -1,4 +1,4 @@
import { LazyUndoRedoAction, UndoRedoAction, UndoRedoStore } from "@/stores/undoRedoStore";
import { LazyUndoRedoAction, UndoRedoAction, type UndoRedoStore } from "@/stores/undoRedoStore";
import { useConnectionStore } from "@/stores/workflowConnectionStore";
import {
useWorkflowCommentStore,
@@ -9,8 +9,8 @@ import { useWorkflowStateStore, type WorkflowStateStore } from "@/stores/workflo
import { type Step, useWorkflowStepStore, type WorkflowStepStore } from "@/stores/workflowStepStore";
import { ensureDefined } from "@/utils/assertions";
import { defaultPosition } from "../composables/useDefaultStepPosition";
import { fromSimple, Workflow } from "../modules/model";
import { type defaultPosition } from "../composables/useDefaultStepPosition";
import { fromSimple, type Workflow } from "../modules/model";
import { cloneStepWithUniqueLabel, getLabelSet } from "./cloneStep";
export class LazySetValueAction<T> extends LazyUndoRedoAction {
@@ -3,8 +3,8 @@ import { mount, shallowMount } from "@vue/test-utils";
import { setActivePinia } from "pinia";
import { nextTick } from "vue";
import type { LazyUndoRedoAction, UndoRedoAction } from "@/stores/undoRedoStore";
import type { TextWorkflowComment } from "@/stores/workflowEditorCommentStore";
import { type LazyUndoRedoAction, type UndoRedoAction } from "@/stores/undoRedoStore";
import { type TextWorkflowComment } from "@/stores/workflowEditorCommentStore";
import MarkdownComment from "./MarkdownComment.vue";
import TextComment from "./TextComment.vue";
@@ -4,7 +4,7 @@ import { getLocalVue } from "tests/jest/helpers";
import { nextTick, ref } from "vue";
import { testDatatypesMapper } from "@/components/Datatypes/test_fixtures";
import { UndoRedoStore, useUndoRedoStore } from "@/stores/undoRedoStore";
import { type UndoRedoStore, useUndoRedoStore } from "@/stores/undoRedoStore";
import { useConnectionStore } from "@/stores/workflowConnectionStore";
import { type Step, type Steps, useWorkflowStepStore } from "@/stores/workflowStepStore";
@@ -2,7 +2,7 @@ import simplify from "simplify-js";
import { ref, watch } from "vue";
import { useWorkflowStores } from "@/composables/workflowStores";
import type { BaseWorkflowComment } from "@/stores/workflowEditorCommentStore";
import { type BaseWorkflowComment } from "@/stores/workflowEditorCommentStore";
import { assertDefined } from "@/utils/assertions";
import { match } from "@/utils/utils";
@@ -1,10 +1,9 @@
import type { UseScrollReturn } from "@vueuse/core";
import { type UseScrollReturn } from "@vueuse/core";
import { select } from "d3-selection";
import { type D3ZoomEvent, zoom, zoomIdentity } from "d3-zoom";
import type { Ref } from "vue";
import { ref, watch } from "vue";
import { type Ref, ref, watch } from "vue";
import type { XYPosition } from "@/stores/workflowEditorStateStore";
import { type XYPosition } from "@/stores/workflowEditorStateStore";
// if element is draggable it may implement its own drag handler,
// but d3zoom would call preventDefault
@@ -1,7 +1,7 @@
import { computed, type Ref } from "vue";
import { useWorkflowStores } from "@/composables/workflowStores";
import type { Step } from "@/stores/workflowStepStore";
import { type Step } from "@/stores/workflowStepStore";
import { ensureDefined } from "@/utils/assertions";
import { ClearSelectionAction } from "../Actions/workflowActions";

Some files were not shown because too many files have changed in this diff Show More