Remove app alias for imports (#8314)
This commit is contained in:
parent
d7e54999c9
commit
2649b4b63a
24 changed files with 34 additions and 36 deletions
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {DMS_CATEGORY} from '@app/constants/categories';
|
||||
import {setCurrentUserId} from '@app/queries/servers/system';
|
||||
import {DMS_CATEGORY} from '@constants/categories';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import {setCurrentUserId} from '@queries/servers/system';
|
||||
|
||||
import {
|
||||
deleteCategory,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import {
|
|||
updateDmGmDisplayName,
|
||||
} from './channel';
|
||||
|
||||
import type {ChannelModel, MyChannelModel, SystemModel} from '@app/database/models/server';
|
||||
import type {ChannelModel, MyChannelModel, SystemModel} from '@database/models/server';
|
||||
import type ServerDataOperator from '@database/operator/server_data_operator';
|
||||
import type {Database} from '@nozbe/watermelondb';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {ActionType, Post} from '@app/constants';
|
||||
import {COMBINED_USER_ACTIVITY} from '@app/utils/post_list';
|
||||
import {ActionType, Post} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import TestHelper from '@test/test_helper';
|
||||
import {COMBINED_USER_ACTIVITY} from '@utils/post_list';
|
||||
|
||||
import {
|
||||
sendAddToChannelEphemeralPost,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import * as logUtils from '@utils/log';
|
|||
|
||||
import {addRecentReaction} from './reactions';
|
||||
|
||||
import type ServerDataOperator from '@app/database/operator/server_data_operator';
|
||||
import type ServerDataOperator from '@database/operator/server_data_operator';
|
||||
|
||||
jest.mock('@database/manager');
|
||||
jest.mock('@queries/servers/system');
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
import Database from '@nozbe/watermelondb/Database';
|
||||
|
||||
import {ActionType} from '@app/constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@app/constants/database';
|
||||
import {ActionType} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import TestHelper from '@test/test_helper';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
import ServerDataOperator from '@app/database/operator/server_data_operator';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import ServerDataOperator from '@database/operator/server_data_operator';
|
||||
import {getMyTeamById, getTeamById, getTeamSearchHistoryById, prepareDeleteTeam, removeTeamFromTeamHistory} from '@queries/servers/team';
|
||||
import {logError} from '@utils/log';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {ActionType} from '@app/constants';
|
||||
import {ActionType} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import Preferences from '@constants/preferences';
|
||||
import DatabaseManager from '@database/manager';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {SYSTEM_IDENTIFIERS} from '@app/constants/database';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
/* eslint-disable max-lines */
|
||||
|
||||
import {ActionType, Post} from '@app/constants';
|
||||
import PostModel from '@app/database/models/server/post';
|
||||
import {ActionType, Post} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import PostModel from '@database/models/server/post';
|
||||
import NetworkManager from '@managers/network_manager';
|
||||
import TestHelper from '@test/test_helper';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/* eslint-disable max-lines */
|
||||
|
||||
import {Preferences} from '@app/constants';
|
||||
import {Preferences} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import NetworkManager from '@managers/network_manager';
|
||||
|
|
@ -22,7 +22,7 @@ import {
|
|||
savePreferredSkinTone,
|
||||
} from './preference';
|
||||
|
||||
import type {PreferenceModel} from '@app/database/models/server';
|
||||
import type {PreferenceModel} from '@database/models/server';
|
||||
import type ServerDataOperator from '@database/operator/server_data_operator';
|
||||
|
||||
const serverUrl = 'baseHandler.test.com';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/* eslint-disable max-lines */
|
||||
|
||||
import {ActionType} from '@app/constants';
|
||||
import {ActionType} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import NetworkManager from '@managers/network_manager';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// See LICENSE.txt for license information.
|
||||
|
||||
import {getPosts} from '@actions/local/post';
|
||||
import {General} from '@app/constants';
|
||||
import {General} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import NetworkManager from '@managers/network_manager';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/* eslint-disable max-lines */
|
||||
|
||||
import {ActionType} from '@app/constants';
|
||||
import {ActionType} from '@constants';
|
||||
import {SYSTEM_IDENTIFIERS} from '@constants/database';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import NetworkManager from '@managers/network_manager';
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import {Button} from '@rneui/base';
|
|||
import React, {useCallback, useRef, useState} from 'react';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
|
||||
import ProgressBar from '@app/components/progress_bar';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import Document, {type DocumentRef} from '@components/document';
|
||||
import ProgressBar from '@components/progress_bar';
|
||||
import {useTheme} from '@context/theme';
|
||||
|
||||
import BookmarkDetails from './bookmark_details';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import React from 'react';
|
||||
import {View} from 'react-native';
|
||||
|
||||
import FormattedText from '@app/components/formatted_text';
|
||||
import FormattedText from '@components/formatted_text';
|
||||
import FormattedTime from '@components/formatted_time';
|
||||
import PostPriorityLabel from '@components/post_priority/post_priority_label';
|
||||
import {CHANNEL, THREAD} from '@constants/screens';
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import {withObservables} from '@nozbe/watermelondb/react';
|
|||
import {of as of$} from 'rxjs';
|
||||
import {distinctUntilChanged, switchMap} from 'rxjs/operators';
|
||||
|
||||
import {observeAllActiveServers} from '@app/queries/app/servers';
|
||||
import {CallNotification} from '@calls/components/call_notification/call_notification';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import {observeAllActiveServers} from '@queries/app/servers';
|
||||
import {observeChannelMembers} from '@queries/servers/channel';
|
||||
import {observeCurrentUser, observeTeammateNameDisplay} from '@queries/servers/user';
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import {View, Text, Platform, type Insets} from 'react-native';
|
|||
import {Shadow} from 'react-native-shadow-2';
|
||||
|
||||
import {uploadFile} from '@actions/remote/file';
|
||||
import CompassIcon from '@app/components/compass_icon';
|
||||
import FileIcon from '@app/components/files/file_icon';
|
||||
import ProgressBar from '@app/components/progress_bar';
|
||||
import CompassIcon from '@components/compass_icon';
|
||||
import FileIcon from '@components/files/file_icon';
|
||||
import FormattedText from '@components/formatted_text';
|
||||
import ProgressBar from '@components/progress_bar';
|
||||
import TouchableWithFeedback from '@components/touchable_with_feedback';
|
||||
import {useServerUrl} from '@context/server';
|
||||
import {useTheme} from '@context/theme';
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import React, {useCallback, useMemo, useState} from 'react';
|
|||
import {useIntl} from 'react-intl';
|
||||
import {Platform, View} from 'react-native';
|
||||
|
||||
import {useIsTablet} from '@app/hooks/device';
|
||||
import FloatingTextInput from '@components/floating_text_input_label';
|
||||
import FormattedText from '@components/formatted_text';
|
||||
import Loading from '@components/loading';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {debounce} from '@helpers/api/general';
|
||||
import {useIsTablet} from '@hooks/device';
|
||||
import useDidUpdate from '@hooks/did_update';
|
||||
import {fetchOpenGraph} from '@utils/opengraph';
|
||||
import {changeOpacity, getKeyboardAppearanceFromTheme, makeStyleSheetFromTheme} from '@utils/theme';
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ import React, {useCallback, useEffect} from 'react';
|
|||
import {StyleSheet, type TextStyle} from 'react-native';
|
||||
import {SafeAreaView, type Edge} from 'react-native-safe-area-context';
|
||||
|
||||
import CompassIcon from '@app/components/compass_icon';
|
||||
import {SNACK_BAR_TYPE} from '@app/constants/snack_bar';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import useNavButtonPressed from '@app/hooks/navigation_button_pressed';
|
||||
import {showSnackBar} from '@app/utils/snack_bar';
|
||||
import CompassIcon from '@components/compass_icon';
|
||||
import SyntaxHiglight from '@components/syntax_highlight';
|
||||
import {SNACK_BAR_TYPE} from '@constants/snack_bar';
|
||||
import {useTheme} from '@context/theme';
|
||||
import useAndroidHardwareBackHandler from '@hooks/android_back_handler';
|
||||
import useNavButtonPressed from '@hooks/navigation_button_pressed';
|
||||
import {popTopScreen, setButtons} from '@screens/navigation';
|
||||
import {showSnackBar} from '@utils/snack_bar';
|
||||
|
||||
import type {AvailableScreens} from '@typings/screens/navigation';
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import {StyleSheet, View} from 'react-native';
|
|||
|
||||
import {buildAbsoluteUrl} from '@actions/remote/file';
|
||||
import {buildProfileImageUrlFromUser} from '@actions/remote/user';
|
||||
import {useServerUrl} from '@app/context/server';
|
||||
import CompassIcon from '@components/compass_icon';
|
||||
import {useServerUrl} from '@context/server';
|
||||
import {changeOpacity} from '@utils/theme';
|
||||
|
||||
import type UserModel from '@typings/database/models/servers/user';
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ import React, {useEffect, useState} from 'react';
|
|||
import {DeviceEventEmitter, Platform, StyleSheet, View} from 'react-native';
|
||||
import {Notifications} from 'react-native-notifications';
|
||||
|
||||
import useDidUpdate from '@app/hooks/did_update';
|
||||
import Badge from '@components/badge';
|
||||
import CompassIcon from '@components/compass_icon';
|
||||
import {BOTTOM_TAB_ICON_SIZE} from '@constants/view';
|
||||
import {subscribeAllServers} from '@database/subscription/servers';
|
||||
import {subscribeUnreadAndMentionsByServer, type UnreadObserverArgs} from '@database/subscription/unreads';
|
||||
import {useAppState} from '@hooks/device';
|
||||
import useDidUpdate from '@hooks/did_update';
|
||||
import {logDebug} from '@utils/log';
|
||||
import {changeOpacity} from '@utils/theme';
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import urlParse from 'url-parse';
|
|||
import {makeDirectChannel, switchToChannelByName} from '@actions/remote/channel';
|
||||
import {showPermalink} from '@actions/remote/permalink';
|
||||
import {fetchUsersByUsernames} from '@actions/remote/user';
|
||||
import DeepLinkType from '@app/constants/deep_linking';
|
||||
import {DeepLink, Launch, Screens} from '@constants';
|
||||
import DeepLinkType from '@constants/deep_linking';
|
||||
import {getDefaultThemeByAppearance} from '@context/theme';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import {DEFAULT_LOCALE, t} from '@i18n';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ module.exports = {
|
|||
root: ['.'],
|
||||
alias: {
|
||||
'@actions': './app/actions',
|
||||
'@app': './app/',
|
||||
'@assets': './dist/assets/',
|
||||
'@calls': './app/products/calls',
|
||||
'@client': './app/client',
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@actions/*": ["app/actions/*"],
|
||||
"@app/*": ["app/*"],
|
||||
"@assets/*": ["dist/assets/*"],
|
||||
"@calls/*": ["app/products/calls/*"],
|
||||
"@client/*": ["app/client/*"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue