Skip to content

Commit

Permalink
Prefer relative imports for subpaths, alias for parents.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jul 25, 2024
1 parent e18ba47 commit 76a1f52
Show file tree
Hide file tree
Showing 199 changed files with 351 additions and 338 deletions.
2 changes: 1 addition & 1 deletion client/src/api/configTemplates.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components } from "@/api/schema/schema";
import { type components } from "./schema/schema";

export type Instance =
| components["schemas"]["UserFileSourceModel"]
Expand Down
4 changes: 2 additions & 2 deletions client/src/api/datasetCollections.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type CollectionEntry, type DCESummary, type HDCADetailed, type HDCASummary, isHDCA } from "@/api";
import { fetcher } from "@/api/schema";
import { type CollectionEntry, type DCESummary, type HDCADetailed, type HDCASummary, isHDCA } from "./";
import { fetcher } from "./schema";

const DEFAULT_LIMIT = 50;

Expand Down
5 changes: 3 additions & 2 deletions client/src/api/datasets.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import axios from "axios";
import { type FetchArgType } from "openapi-typescript-fetch";

import { type HDADetailed } from "@/api";
import { type components, fetcher } from "@/api/schema";
import { withPrefix } from "@/utils/redirect";

import { type HDADetailed } from "./";
import { type components, fetcher } from "./schema";

export const datasetsFetcher = fetcher.path("/api/datasets").method("get").create();

type GetDatasetsApiOptions = FetchArgType<typeof datasetsFetcher>;
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/datatypes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

export const datatypesFetcher = fetcher.path("/api/datatypes").method("get").create();

Expand Down
2 changes: 1 addition & 1 deletion client/src/api/dbKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
* but now it is used to get the list of more generic "dbkeys".
*/

import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

export const dbKeysFetcher = fetcher.path("/api/genomes").method("get").create();
2 changes: 1 addition & 1 deletion client/src/api/fileSources.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components } from "@/api/schema";
import { type components } from "./schema";

export type FileSourceTemplateSummary = components["schemas"]["FileSourceTemplateSummary"];
export type FileSourceTemplateSummaries = FileSourceTemplateSummary[];
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/forms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

export const deleteForm = fetcher.path("/api/forms/{id}").method("delete").create();
export const undeleteForm = fetcher.path("/api/forms/{id}/undelete").method("post").create();
2 changes: 1 addition & 1 deletion client/src/api/groups.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";

import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

type GroupModel = components["schemas"]["GroupModel"];
export async function getAllGroups(): Promise<GroupModel[]> {
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/histories.archived.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type FetchArgType } from "openapi-typescript-fetch";

import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

export type ArchivedHistorySummary = components["schemas"]["ArchivedHistorySummary"];
export type ArchivedHistoryDetailed = components["schemas"]["ArchivedHistoryDetailed"];
Expand Down
3 changes: 2 additions & 1 deletion client/src/api/histories.export.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { type components, fetcher } from "@/api/schema";
import {
type ExportRecord,
ExportRecordModel,
type ObjectExportTaskResponse,
} from "@/components/Common/models/exportRecordModel";
import { DEFAULT_EXPORT_PARAMS } from "@/composables/shortTermStorage";

import { type components, fetcher } from "./schema";

type ModelStoreFormat = components["schemas"]["ModelStoreFormat"];

const _getExportRecords = fetcher.path("/api/histories/{history_id}/exports").method("get").create();
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/histories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

export const historiesFetcher = fetcher.path("/api/histories").method("get").create();
export const archivedHistoriesFetcher = fetcher.path("/api/histories/archived").method("get").create();
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** Contains type alias and definitions related to Galaxy API models. */

import { type components } from "@/api/schema";
import { type components } from "./schema";

/**
* Contains minimal information about a History.
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/jobs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

export type JobDestinationParams = components["schemas"]["JobDestinationParams"];

Expand Down
2 changes: 1 addition & 1 deletion client/src/api/notifications.broadcast.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

type BroadcastNotificationResponse = components["schemas"]["BroadcastNotificationResponse"];

Expand Down
2 changes: 1 addition & 1 deletion client/src/api/notifications.preferences.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

type UserNotificationPreferences = components["schemas"]["UserNotificationPreferences"];

Expand Down
2 changes: 1 addition & 1 deletion client/src/api/notifications.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

export type BaseUserNotification = components["schemas"]["UserNotificationResponse"];

Expand Down
4 changes: 2 additions & 2 deletions client/src/api/objectStores.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fetcher } from "@/api/schema";
import { type components } from "@/api/schema/schema";
import { fetcher } from "./schema";
import { type components } from "./schema/schema";

export type UserConcreteObjectStore = components["schemas"]["UserConcreteObjectStoreModel"];

Expand Down
2 changes: 1 addition & 1 deletion client/src/api/pages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

/** Page request helper **/
const deletePageById = fetcher.path("/api/pages/{id}").method("delete").create();
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/quotas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

export const deleteQuota = fetcher.path("/api/quotas/{id}").method("delete").create();
export const purgeQuota = fetcher.path("/api/quotas/{id}/purge").method("post").create();
Expand Down
4 changes: 2 additions & 2 deletions client/src/api/remoteFiles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type components } from "@/api/schema";
import { fetcher } from "@/api/schema/fetcher";
import { type components } from "./schema";
import { fetcher } from "./schema/fetcher";

/** The browsing mode:
* - `file` - allows to select files or directories contained in a source (default)
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/roles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

const getRoles = fetcher.path("/api/roles").method("get").create();
export async function getAllRoles() {
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/schema/__mocks__/fetcher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type paths } from "@/api/schema";
import { type paths } from "./..";

jest.mock("@/api/schema", () => ({
fetcher: mockFetcher,
Expand Down
3 changes: 1 addition & 2 deletions client/src/api/schema/mockFetcher.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { fetcher } from "@/api/schema";

import { fetcher } from "./";
import { mockFetcher } from "./__mocks__/fetcher";

jest.mock("@/api/schema");
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/tags.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

type TaggableItemClass = components["schemas"]["TaggableItemClass"];

Expand Down
2 changes: 1 addition & 1 deletion client/src/api/users.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetcher } from "@/api/schema";
import { fetcher } from "./schema";

export const createApiKey = fetcher.path("/api/users/{user_id}/api_key").method("post").create();
export const deleteUser = fetcher.path("/api/users/{user_id}").method("delete").create();
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/workflows.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type components, fetcher } from "@/api/schema";
import { type components, fetcher } from "./schema";

export type StoredWorkflowDetailed = components["schemas"]["StoredWorkflowDetailed"];

Expand Down
8 changes: 4 additions & 4 deletions client/src/components/AboutGalaxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { RouterLink } from "vue-router";
import { useConfig } from "@/composables/config";
import { getAppRoot } from "@/onload/loadConfig";
import Heading from "@/components/Common/Heading.vue";
import ExternalLink from "@/components/ExternalLink.vue";
import License from "@/components/License/License.vue";
import UtcDate from "@/components/UtcDate.vue";
import Heading from "./Common/Heading.vue";
import ExternalLink from "./ExternalLink.vue";
import License from "./License/License.vue";
import UtcDate from "./UtcDate.vue";
const { config, isConfigLoaded } = useConfig();
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/ActivityBar/ActivityBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ import { type Activity, useActivityStore } from "@/stores/activityStore";
import { useEventStore } from "@/stores/eventStore";
import { useUserStore } from "@/stores/userStore";
import InvocationsPanel from "../Panels/InvocationsPanel.vue";
import VisualizationPanel from "../Panels/VisualizationPanel.vue";
import ActivityItem from "./ActivityItem.vue";
import InteractiveItem from "./Items/InteractiveItem.vue";
import NotificationItem from "./Items/NotificationItem.vue";
import UploadItem from "./Items/UploadItem.vue";
import AdminPanel from "@/components/admin/AdminPanel.vue";
import FlexPanel from "@/components/Panels/FlexPanel.vue";
import InvocationsPanel from "@/components/Panels/InvocationsPanel.vue";
import MultiviewPanel from "@/components/Panels/MultiviewPanel.vue";
import NotificationsPanel from "@/components/Panels/NotificationsPanel.vue";
import SettingsPanel from "@/components/Panels/SettingsPanel.vue";
import ToolPanel from "@/components/Panels/ToolPanel.vue";
import VisualizationPanel from "@/components/Panels/VisualizationPanel.vue";
// require user to long click before dragging
const DRAG_DELAY = 50;
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Citation/CitationsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import { BButton, BCard, BCollapse, BNav, BNavItem } from "bootstrap-vue";
import { onMounted, onUpdated, ref } from "vue";
import { getCitations } from "@/components/Citation/services";
import { useConfig } from "@/composables/config";
import { type Citation } from ".";
import { getCitations } from "./services";
import CitationItem from "@/components/Citation/CitationItem.vue";
import CitationItem from "./CitationItem.vue";
const outputFormats = Object.freeze({
CITATION: "bibliography",
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ClientError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// (AdminRequired), but could be used for other client errors that need to be
// presented to the user interrupting the normal flow and context of the app.
import Alert from "@/components/Alert.vue";
import Alert from "./Alert.vue";
const props = defineProps<{
error: Error;
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Collections/ListCollectionCreator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import type { HDCADetailed, HistoryItemSummary } from "@/api";
import STATES from "@/mvc/dataset/states";
import localize from "@/utils/localization";
import CollectionCreator from "@/components/Collections/common/CollectionCreator.vue";
import DatasetCollectionElementView from "@/components/Collections/ListDatasetCollectionElementView.vue";
import CollectionCreator from "./common/CollectionCreator.vue";
import DatasetCollectionElementView from "./ListDatasetCollectionElementView.vue";
library.add(faSortAlphaDown, faUndo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { onMounted, ref, watch } from "vue";
import localize from "@/utils/localization";
import ClickToEdit from "@/components/Collections/common/ClickToEdit.vue";
import ClickToEdit from "./common/ClickToEdit.vue";
interface Props {
element: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { HDCADetailed, HistoryItemSummary } from "@/api";
import STATES from "@/mvc/dataset/states";
import localize from "@/utils/localization";
import CollectionCreator from "@/components/Collections/common/CollectionCreator.vue";
import CollectionCreator from "./common/CollectionCreator.vue";
interface Props {
initialElements: Array<any>;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Collections/PairedElementView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { onMounted, ref, watch } from "vue";
import localize from "@/utils/localization";
import ClickToEdit from "@/components/Collections/common/ClickToEdit.vue";
import ClickToEdit from "./common/ClickToEdit.vue";
library.add(faUnlink);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import { errorMessageAsString } from "@/utils/simple-error";
import { type HistoryContentBulkOperationPayload, updateHistoryItemsBulk } from "./services";
import ChangeDatatypeTab from "@/components/Collections/common/ChangeDatatypeTab.vue";
import DatabaseEditTab from "@/components/Collections/common/DatabaseEditTab.vue";
import SuitableConvertersTab from "@/components/Collections/common/SuitableConvertersTab.vue";
import ChangeDatatypeTab from "./ChangeDatatypeTab.vue";
import DatabaseEditTab from "./DatabaseEditTab.vue";
import SuitableConvertersTab from "./SuitableConvertersTab.vue";
import Heading from "@/components/Common/Heading.vue";
import FormDisplay from "@/components/Form/FormDisplay.vue";
import LoadingSpan from "@/components/LoadingSpan.vue";
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/Common/ExportRDMForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import {
createRemoteEntry,
type FilterFileSourcesOptions,
} from "@/api/remoteFiles";
import { fileSourcePluginToItem } from "@/components/FilesDialog/utilities";
import { useToast } from "@/composables/toast";
import localize from "@/utils/localization";
import { errorMessageAsString } from "@/utils/simple-error";
import { fileSourcePluginToItem } from "../FilesDialog/utilities";
import ExternalLink from "@/components/ExternalLink.vue";
import FilesInput from "@/components/FilesDialog/FilesInput.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/ExportRecordDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { computed } from "vue";
import type { ColorVariant } from ".";
import { type ExportRecord } from "./models/exportRecordModel";
import Heading from "@/components/Common/Heading.vue";
import Heading from "./Heading.vue";
import LoadingSpan from "@/components/LoadingSpan.vue";
library.add(faCheckCircle, faClock, faExclamationCircle, faExclamationTriangle, faLink);
Expand Down
14 changes: 7 additions & 7 deletions client/src/components/Common/FilterMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import { computed, ref, set } from "vue";
import type Filtering from "@/utils/filtering";
import { type Alias, type ErrorType, getOperatorForAlias, type ValidFilter } from "@/utils/filtering";
import DelayedInput from "@/components/Common/DelayedInput.vue";
import FilterMenuBoolean from "@/components/Common/FilterMenuBoolean.vue";
import FilterMenuDropdown from "@/components/Common/FilterMenuDropdown.vue";
import FilterMenuInput from "@/components/Common/FilterMenuInput.vue";
import FilterMenuMultiTags from "@/components/Common/FilterMenuMultiTags.vue";
import FilterMenuObjectStore from "@/components/Common/FilterMenuObjectStore.vue";
import FilterMenuRanged from "@/components/Common/FilterMenuRanged.vue";
import DelayedInput from "./DelayedInput.vue";
import FilterMenuBoolean from "./FilterMenuBoolean.vue";
import FilterMenuDropdown from "./FilterMenuDropdown.vue";
import FilterMenuInput from "./FilterMenuInput.vue";
import FilterMenuMultiTags from "./FilterMenuMultiTags.vue";
import FilterMenuObjectStore from "./FilterMenuObjectStore.vue";
import FilterMenuRanged from "./FilterMenuRanged.vue";
library.add(faAngleDoubleUp, faQuestion, faSearch);
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/Common/FilterMenuDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import { capitalize } from "lodash";
import { computed, onMounted, ref, type UnwrapRef, watch } from "vue";
import { type QuotaUsage } from "@/components/User/DiskUsage/Quota/model";
import { fetch } from "@/components/User/DiskUsage/Quota/services";
import { type FilterType, type ValidFilter } from "@/utils/filtering";
import { errorMessageAsString } from "@/utils/simple-error";
import { fetch } from "../User/DiskUsage/Quota/services";
import QuotaUsageBar from "@/components/User/DiskUsage/Quota/QuotaUsageBar.vue";
library.add(faQuestion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
usePersistentProgressTaskMonitor,
} from "@/composables/persistentProgressMonitor";

import PersistentTaskProgressMonitorAlert from "@/components/Common/PersistentTaskProgressMonitorAlert.vue";
import PersistentTaskProgressMonitorAlert from "./PersistentTaskProgressMonitorAlert.vue";

type ComponentUnderTestProps = Partial<PropType<typeof PersistentTaskProgressMonitorAlert>>;

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Dataset/DatasetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { copyDataset, getDatasets } from "@/api/datasets";
import { updateTags } from "@/api/tags";
import { useHistoryStore } from "@/stores/historyStore";
import DatasetName from "./DatasetName.vue";
import DelayedInput from "@/components/Common/DelayedInput.vue";
import DatasetName from "@/components/Dataset/DatasetName.vue";
import SwitchToHistoryLink from "@/components/History/SwitchToHistoryLink.vue";
import LoadingSpan from "@/components/LoadingSpan.vue";
import StatelessTags from "@/components/TagsMultiselect/StatelessTags.vue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import { BAlert, BButton, BTab, BTabs } from "bootstrap-vue";
import { onMounted, ref } from "vue";
import { fetchDatasetAttributes } from "@/api/datasets";
import { setAttributes } from "@/components/DatasetInformation/services";
import { useHistoryStore } from "@/stores/historyStore";
import localize from "@/utils/localization";
import Heading from "../Common/Heading.vue";
import { setAttributes } from "./services";
import Heading from "@/components/Common/Heading.vue";
import FormDisplay from "@/components/Form/FormDisplay.vue";
import LoadingSpan from "@/components/LoadingSpan.vue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { useConfig } from "@/composables/config";
import { useUserStore } from "@/stores/userStore";
import { stateIsTerminal } from "@/utils/utils";
import DatasetInformation from "./DatasetInformation.vue";
import DatasetStorage from "@/components/Dataset/DatasetStorage/DatasetStorage.vue";
import DatasetInformation from "@/components/DatasetInformation/DatasetInformation.vue";
import InheritanceChain from "@/components/InheritanceChain//InheritanceChain.vue";
import JobDependencies from "@/components/JobDependencies/JobDependencies.vue";
import JobDestinationParams from "@/components/JobDestinationParams/JobDestinationParams.vue";
Expand Down
Loading

0 comments on commit 76a1f52

Please sign in to comment.