Skip to content

Commit 381d7aa

Browse files
committed
fix: update @Shared/index to proper imports to remove cyclic dependency
1 parent 4a28b9c commit 381d7aa

File tree

18 files changed

+38
-33
lines changed

18 files changed

+38
-33
lines changed

src/Common/API/CoreAPI.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
import { INVALID_LICENSE_KEY, ResponseHeaders } from '@Shared/index'
1+
import { API_STATUS_CODES, FALLBACK_REQUEST_TIMEOUT, Host } from '@Common/Constants'
2+
import { noop } from '@Common/Helper'
3+
import { ServerErrors } from '@Common/ServerError'
4+
import { APIOptions, ResponseType } from '@Common/Types'
5+
import { INVALID_LICENSE_KEY } from '@Shared/constants'
6+
import { ResponseHeaders } from '@Shared/types'
27

3-
import { API_STATUS_CODES, APIOptions, FALLBACK_REQUEST_TIMEOUT, Host, noop, ResponseType, ServerErrors } from '..'
48
import { CoreAPIConstructorParamsType, FetchAPIParamsType, FetchInTimeParamsType } from './types'
59
import { handleServerError } from './utils'
610

src/Common/DeleteCINodeButton/DeleteCINodeButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { useState } from 'react'
1919
import { ERROR_STATUS_CODE } from '@Common/Constants'
2020
import { Button, ButtonStyleType, ButtonVariantType, DeleteConfirmationModal, Icon } from '@Shared/Components'
2121
import { ComponentSizeType, DeleteComponentsName } from '@Shared/constants'
22-
import { ToastManager, ToastVariantType } from '@Shared/index'
22+
import { ToastManager, ToastVariantType } from '@Shared/Services'
2323

2424
import { preventDefault, showError, stopPropagation } from '..'
2525
import { DeleteCINodeButtonProps } from './types'

src/Pages/Applications/DevtronApps/Details/AppConfigurations/ConfigMapSecret/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { CMSecretExternalType } from '@Shared/index'
17+
import { CMSecretExternalType } from '@Shared/Services'
1818

1919
export const hasHashiOrAWS = (externalType: CMSecretExternalType): boolean =>
2020
externalType === CMSecretExternalType.AWSSecretsManager ||

src/Pages/GlobalConfigurations/BuildInfra/UseBuildInfraForm.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@
1717
import { FormEvent, useEffect, useState } from 'react'
1818

1919
import { logExceptionToSentry, showError, useAsync } from '@Common/Helper'
20-
import {
21-
CM_SECRET_STATE,
22-
getConfigMapSecretFormInitialValues,
23-
getUniqueId,
24-
ToastManager,
25-
ToastVariantType,
26-
} from '@Shared/index'
20+
import { getConfigMapSecretFormInitialValues } from '@Shared/Components'
21+
import { getUniqueId } from '@Shared/Helpers'
22+
import { CM_SECRET_STATE, ToastManager, ToastVariantType } from '@Shared/Services'
2723
import {
2824
validateDescription,
2925
validateLabelKey,

src/Pages/GlobalConfigurations/BuildInfra/constants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { ReactComponent as ICSprayCan } from '@Icons/ic-spray-can.svg'
2020
import { ReactComponent as ICTag } from '@Icons/ic-tag.svg'
2121
import { ReactComponent as ICTimer } from '@Icons/ic-timer.svg'
2222
import { UseBreadcrumbProps } from '@Common/BreadCrumb/Types'
23-
import { CMSecretComponentType } from '@Shared/index'
23+
import { CMSecretComponentType } from '@Shared/Services'
2424

2525
import {
2626
BuildInfraAPIVersionType,

src/Shared/Components/BulkOperations/BulkOperations.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ import { showError } from '@Common/Helper'
2323
import { ServerErrors } from '@Common/ServerError'
2424
import { ApiQueuingWithBatch } from '@Shared/API'
2525
import { usePrompt } from '@Shared/Hooks'
26-
import { ConfirmationModal, ToastManager, ToastVariantType } from '@Shared/index'
26+
import { ToastManager, ToastVariantType } from '@Shared/Services'
2727

28+
import { ConfirmationModal } from '../ConfirmationModal'
2829
import BulkOperationsResultModal from './BulkOperationsResultModal'
2930
import { OperationResultStore } from './OperationResultStore'
3031
import { BulkOperationModalProps, OperationResultStoreType } from './types'

src/Shared/Components/CountrySelect/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CountryISO2Type } from '@Shared/index'
1+
import { CountryISO2Type } from '@Shared/types'
22

33
import { SelectPickerProps } from '../SelectPicker'
44

src/Shared/Components/DevtronLicenseCard/DevtronLicenseCard.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ import { animate, motion, useMotionTemplate, useMotionValue, useTransform } from
44
import { ReactComponent as ICChatSupport } from '@IconsV2/ic-chat-circle-dots.svg'
55
import { ReactComponent as TexturedBG } from '@Images/licenseCardBG.svg'
66
import { ClipboardButton, getTTLInHumanReadableFormat } from '@Common/index'
7-
import {
8-
AppThemeType,
9-
CONTACT_SUPPORT_LINK,
10-
DevtronLicenseCardProps,
11-
ENTERPRISE_SUPPORT_LINK,
12-
getHandleOpenURL,
13-
LicenseStatus,
14-
} from '@Shared/index'
7+
import { CONTACT_SUPPORT_LINK, ENTERPRISE_SUPPORT_LINK } from '@Shared/constants'
8+
import { getHandleOpenURL } from '@Shared/Helpers'
9+
import { AppThemeType } from '@Shared/Providers'
1510
import { getThemeOppositeThemeClass } from '@Shared/Providers/ThemeProvider/utils'
1611

1712
import { Button, ButtonVariantType } from '../Button'
1813
import { Icon } from '../Icon'
14+
import { DevtronLicenseCardProps, LicenseStatus } from './types'
1915
import { getLicenseColorsAccordingToStatus } from './utils'
2016

2117
import './licenseCard.scss'

src/Shared/Components/DevtronLicenseCard/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { AppThemeType, DevtronLicenseBaseDTO, DevtronLicenseDTO } from '@Shared/index'
1+
import { AppThemeType } from '@Shared/Providers'
2+
import { DevtronLicenseBaseDTO, DevtronLicenseDTO } from '@Shared/types'
23

34
export enum LicenseStatus {
45
ACTIVE = 'ACTIVE',

src/Shared/Components/DevtronLicenseCard/utils.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import moment from 'moment'
22

33
import { DATE_TIME_FORMATS } from '@Common/Constants'
4-
import { DevtronLicenseCardProps, DevtronLicenseDTO, LicenseStatus } from '@Shared/index'
4+
import { DevtronLicenseDTO } from '@Shared/types'
5+
6+
import { DevtronLicenseCardProps, LicenseStatus } from './types'
57

68
export const getLicenseColorsAccordingToStatus = (
79
licenseStatus: LicenseStatus,

0 commit comments

Comments
 (0)