From 9755faba87e7cdd5c536bedfaa6b66eed9774a2c Mon Sep 17 00:00:00 2001 From: Greg Shear Date: Wed, 1 Jul 2026 11:12:05 -0400 Subject: [PATCH] Un-export symbols that are only used privately --- src/api/directives.ts | 2 +- src/api/drafts.ts | 2 +- src/api/gql/inviteLinks.ts | 2 +- src/api/liveSpecsExt.ts | 14 +++++++------- src/api/stats.ts | 7 ++----- src/components/collection/Selector/types.ts | 12 ++++++------ .../collection/schema/Editor/index.tsx | 2 +- src/components/editor/DraftSpec.tsx | 2 +- src/components/editor/EditorWithFileSelector.tsx | 2 +- src/components/editor/ListAndDetails.tsx | 2 +- src/components/editor/Store/hooks.ts | 4 ++-- src/components/editor/Store/types.ts | 2 +- src/components/fieldSelection/RefreshButton.tsx | 2 +- src/components/fieldSelection/types.ts | 2 +- src/components/home/hero/DemoButton.tsx | 2 +- src/components/home/hero/Step.tsx | 2 +- src/components/home/hero/Steps/Base.tsx | 2 +- src/components/home/hero/hooks.ts | 2 +- src/components/login/Notifications.tsx | 5 +---- src/components/login/Providers/types.ts | 2 +- .../materialization/TrialOnlyPrefixAlert.tsx | 2 +- .../materialization/targetNaming/Dialog.tsx | 2 +- .../materialization/targetNaming/shared.ts | 10 +++++----- src/components/navigation/ListItemLink.tsx | 2 +- .../shared/AutoComplete/DefaultProps.tsx | 2 +- .../AutoComplete/VirtualizedList/index.tsx | 2 +- src/components/shared/Dialog/TitleWithClose.tsx | 2 +- src/components/shared/Entity/CatalogEditor.tsx | 2 +- .../shared/Entity/Details/Alerts/types.ts | 2 +- .../Logs/Status/Overview/DetailWrapper.tsx | 2 +- .../shared/Entity/EndpointConfig/Form.tsx | 2 +- src/components/shared/Entity/HeaderSummary.tsx | 2 +- .../Entity/IncompatibleCollections/types.ts | 4 ++-- .../Entity/Shard/StatusIndicatorAndLabel.tsx | 7 +------ .../ValidationErrorSummary/SectionError.tsx | 2 +- src/components/shared/RHFFields/types.ts | 4 ++-- .../shared/pickers/DateTimePickerCTA.tsx | 2 +- src/components/shared/pickers/TimePickerCTA.tsx | 2 +- src/components/tables/BillLineItems/index.tsx | 2 +- src/components/tables/Billing/index.tsx | 2 +- src/components/tables/Captures/Rows.tsx | 2 +- .../tables/ControllerStatusHistory/index.tsx | 2 +- src/components/tables/DataPlanes/types.ts | 2 +- src/components/tables/EntityTable/types.ts | 4 +--- .../tables/RowActions/Shared/Button.tsx | 2 +- .../RowActions/Shared/ConfirmationAlert.tsx | 2 +- .../tables/RowActions/Shared/GroupedButton.tsx | 2 +- .../tables/RowActions/Shared/UpdateEntity.tsx | 2 +- src/components/tables/RowActions/Shared/types.ts | 2 +- .../cells/fieldSelection/FieldActionButton.tsx | 2 +- .../transformation/create/Schema/Editor.tsx | 2 +- src/components/transformation/create/types.ts | 4 +--- src/context/LocalZustand.tsx | 2 +- src/context/Theme.tsx | 16 ++++++++-------- src/context/User/types.ts | 2 +- src/context/Zustand/provider.tsx | 2 +- src/context/fetcher/TenantBillingDetails.tsx | 2 +- src/directives/Onboard/Store/types.ts | 2 +- src/directives/types.ts | 10 +++++----- .../material/complex/CombinatorProperties.tsx | 4 ++-- .../MaterialOneOfRenderer_Discriminator.tsx | 2 +- .../material/controls/MaterialDateControl.tsx | 2 +- .../controls/MaterialDateTimeControl.tsx | 2 +- .../material/controls/MaterialTimeControl.tsx | 2 +- .../react-use-oauth2/components/use-oauth2.ts | 4 ++-- src/hooks/journals/shared.ts | 4 ++-- src/hooks/searchParams/types.ts | 2 +- src/hooks/useJobStatusPoller.ts | 2 +- src/hooks/useLiveSpecs.ts | 2 +- src/hooks/useMarketplaceVerify.ts | 2 +- src/hooks/usePublications.ts | 2 +- src/services/ajv.ts | 6 +++--- src/services/jsonforms/JsonFormsContext.tsx | 4 ++-- src/services/jsonforms/index.ts | 8 ++++---- src/services/jsonforms/shared.ts | 2 +- src/services/supabase.ts | 13 ++++++------- src/stores/Binding/Hydrator.tsx | 2 +- src/stores/Binding/shared.ts | 8 ++++---- src/stores/DetailsForm/Store.ts | 2 +- src/stores/DetailsForm/types.ts | 2 +- src/stores/Entities/hooks.ts | 2 +- src/stores/JournalData/Logs/Hydrator.tsx | 2 +- src/stores/JournalData/Store.ts | 2 +- src/stores/NotificationStore.ts | 2 +- src/stores/ShardDetail/types.ts | 2 +- src/stores/Tables/Hydrator.tsx | 2 +- src/stores/Tables/Store.ts | 8 ++++---- src/stores/Workflow/slices/Collections.ts | 2 +- src/stores/names.ts | 2 +- src/test/test-utils.tsx | 8 +++----- src/types/controlPlane.ts | 7 +++---- src/types/gql.ts | 12 ++++++------ src/types/index.ts | 8 ++++---- src/types/schemaModels.ts | 4 ++-- src/types/wasm.ts | 4 ++-- src/utils/connector-utils.ts | 2 +- src/utils/dataPlane-utils.ts | 4 ++-- src/utils/entity-utils.ts | 4 ++-- src/utils/entityStatus-utils.ts | 2 +- src/utils/workflow-utils.ts | 4 ++-- src/validation/index.ts | 4 ++-- 101 files changed, 169 insertions(+), 188 deletions(-) diff --git a/src/api/directives.ts b/src/api/directives.ts index 6a00f8c143..9de03a7fb9 100644 --- a/src/api/directives.ts +++ b/src/api/directives.ts @@ -17,7 +17,7 @@ import { updateSupabase, } from 'src/services/supabase'; -export interface ExchangeResponse { +interface ExchangeResponse { directive: Directive | null; // Only null so we can "fake" this response below applied_directive: AppliedDirective; } diff --git a/src/api/drafts.ts b/src/api/drafts.ts index a9370544e8..ba87581a25 100644 --- a/src/api/drafts.ts +++ b/src/api/drafts.ts @@ -13,7 +13,7 @@ const createEntityDraft = (entityName: string) => { }); }; -export interface DraftsQuery_ByCatalogName { +interface DraftsQuery_ByCatalogName { id: string; detail: string; updated_at: string; diff --git a/src/api/gql/inviteLinks.ts b/src/api/gql/inviteLinks.ts index e28da64052..b4df51840d 100644 --- a/src/api/gql/inviteLinks.ts +++ b/src/api/gql/inviteLinks.ts @@ -6,7 +6,7 @@ import { graphql } from 'src/gql-types'; const DEFAULT_LINKS: any[] = []; -export const INVITE_LINKS_PAGE_SIZE = 10; +const INVITE_LINKS_PAGE_SIZE = 10; const INVITE_LINKS_QUERY = graphql(` query InviteLinks($first: Int, $after: String) { diff --git a/src/api/liveSpecsExt.ts b/src/api/liveSpecsExt.ts index 35657c895f..4fcec86764 100644 --- a/src/api/liveSpecsExt.ts +++ b/src/api/liveSpecsExt.ts @@ -52,22 +52,22 @@ const commonColumns = baseColumns.concat([ export interface CaptureQuery extends LiveSpecsExtBaseQuery { writes_to: string[]; } -export interface CaptureQueryWithSpec extends CaptureQuery { +interface CaptureQueryWithSpec extends CaptureQuery { spec: any; } export interface CaptureQueryWithStats extends CaptureQuery { stats?: CatalogStats; } -export interface MaterializationQuery extends LiveSpecsExtBaseQuery { +interface MaterializationQuery extends LiveSpecsExtBaseQuery { reads_from: string[]; } -export interface MaterializationQueryWithSpec extends MaterializationQuery { +interface MaterializationQueryWithSpec extends MaterializationQuery { spec: any; } export interface MaterializationQueryWithStats extends MaterializationQuery { stats?: CatalogStats; } -export type CollectionQuery = LiveSpecsExtBaseQuery; +type CollectionQuery = LiveSpecsExtBaseQuery; export interface CollectionQueryWithStats extends CollectionQuery { stats?: CatalogStats; } @@ -211,7 +211,7 @@ const getLiveSpecs_existingTasks = ( }; // Hydration-specific queries -export interface LiveSpecsExtQuery_DetailsForm { +interface LiveSpecsExtQuery_DetailsForm { catalog_name: string; id: string; spec_type: Entity; @@ -252,7 +252,7 @@ const getLiveSpecs_detailsForm = async (liveSpecId: string) => { return data; }; -export interface LiveSpecsExtQuery_DataPlaneAuthReq { +interface LiveSpecsExtQuery_DataPlaneAuthReq { shard_labels: ProtocolLabel[]; } @@ -449,7 +449,7 @@ const getLiveSpecSpec = (liveSpecId: string) => { .single(); }; -export interface LiveSpecsExtQuery_Latest { +interface LiveSpecsExtQuery_Latest { spec: any; id: string; last_pub_id: string; diff --git a/src/api/stats.ts b/src/api/stats.ts index d58d4d3f3a..0c62567191 100644 --- a/src/api/stats.ts +++ b/src/api/stats.ts @@ -82,17 +82,14 @@ const MATERIALIZATION_QUERY = ` const hourlyGrain = 'hourly'; const dailyGrain = 'daily'; const monthlyGrain = 'monthly'; -export type Grains = - | typeof hourlyGrain - | typeof dailyGrain - | typeof monthlyGrain; +type Grains = typeof hourlyGrain | typeof dailyGrain | typeof monthlyGrain; type AllowedDates = Date | string | number; // Make sure that this matched the derivation closely // Function : grainsFromTS // Source : https://github.com/estuary/flow/blob/master/ops-catalog/catalog-stats.ts // TODO (typing) -export const convertToUTC = ( +const convertToUTC = ( date: AllowedDates, grain: Grains, skipConversion?: boolean diff --git a/src/components/collection/Selector/types.ts b/src/components/collection/Selector/types.ts index c3cc8c8551..286f0e45b4 100644 --- a/src/components/collection/Selector/types.ts +++ b/src/components/collection/Selector/types.ts @@ -12,24 +12,24 @@ import type { AddDialogProps } from 'src/components/shared/Entity/AddDialog/type import type { ColumnProps } from 'src/components/tables/EntityTable/types'; import type { BindingMetadata, BindingState } from 'src/stores/Binding/types'; -export type CollectionSelectorCellRenderer = ( +type CollectionSelectorCellRenderer = ( params: any, filterValue?: string ) => ReactNode; -export type CollectionNameKey = +type CollectionNameKey = | typeof COLLECTION_SELECTOR_NAME_COL | typeof COLLECTION_SELECTOR_STRIPPED_PATH_NAME; -export type CollectionSelectorStringKey = +type CollectionSelectorStringKey = | CollectionNameKey | typeof COLLECTION_SELECTOR_UUID_COL; -export type CollectionSelectorBooleanKey = +type CollectionSelectorBooleanKey = | CollectionNameKey | typeof COLLECTION_SELECTOR_TOGGLE_COL; -export type CollectionSelectorChunkKey = +type CollectionSelectorChunkKey = | CollectionNameKey | typeof COLLECTION_SELECTOR_HIGHLIGHT_CHUNKS; @@ -71,7 +71,7 @@ export interface CollectionSelectorProps { RediscoverButton?: ReactNode; } -export interface CollectionSelectorCell { +interface CollectionSelectorCell { handler?: (rows: T, newVal?: any) => Promise; cellRenderer: CollectionSelectorCellRenderer; } diff --git a/src/components/collection/schema/Editor/index.tsx b/src/components/collection/schema/Editor/index.tsx index c23f658d2b..63fcfb093e 100644 --- a/src/components/collection/schema/Editor/index.tsx +++ b/src/components/collection/schema/Editor/index.tsx @@ -30,7 +30,7 @@ import useDraftSpecEditor from 'src/hooks/useDraftSpecEditor'; import { useFormStateStore_isActive } from 'src/stores/FormState/hooks'; import { getProperSchemaScope } from 'src/utils/schema-utils'; -export interface Props { +interface Props { entityName?: string; localZustandScope?: boolean; } diff --git a/src/components/editor/DraftSpec.tsx b/src/components/editor/DraftSpec.tsx index 7cf1108fd1..9489b31370 100644 --- a/src/components/editor/DraftSpec.tsx +++ b/src/components/editor/DraftSpec.tsx @@ -2,7 +2,7 @@ import MonacoEditor from 'src/components/editor/MonacoEditor'; import { MonacoEditorSkeleton } from 'src/components/editor/MonacoEditor/EditorSkeletons'; import useDraftSpecEditor from 'src/hooks/useDraftSpecEditor'; -export interface Props { +interface Props { disabled?: boolean; localZustandScope?: boolean; editorHeight?: number; diff --git a/src/components/editor/EditorWithFileSelector.tsx b/src/components/editor/EditorWithFileSelector.tsx index 3f436cdca8..26ec2ce4f5 100644 --- a/src/components/editor/EditorWithFileSelector.tsx +++ b/src/components/editor/EditorWithFileSelector.tsx @@ -2,7 +2,7 @@ import type { MonacoEditorProps } from 'src/components/editor/MonacoEditor/types import MonacoEditor from 'src/components/editor/MonacoEditor'; -export interface Props extends MonacoEditorProps { +interface Props extends MonacoEditorProps { height?: number; } diff --git a/src/components/editor/ListAndDetails.tsx b/src/components/editor/ListAndDetails.tsx index bcc7efc5c2..42dcd250ab 100644 --- a/src/components/editor/ListAndDetails.tsx +++ b/src/components/editor/ListAndDetails.tsx @@ -9,7 +9,7 @@ import { ReflexContainer, ReflexElement, ReflexSplitter } from 'react-reflex'; import { defaultOutline, reflexSplitterBackground } from 'src/context/Theme'; import { getEditorTotalHeight } from 'src/utils/editor-utils'; -export interface Props { +interface Props { list: ReactNode; details: ReactNode; height?: number; diff --git a/src/components/editor/Store/hooks.ts b/src/components/editor/Store/hooks.ts index c3141cd36a..52924c8107 100644 --- a/src/components/editor/Store/hooks.ts +++ b/src/components/editor/Store/hooks.ts @@ -24,7 +24,7 @@ interface SelectorParams { localScope?: boolean; } -export const useStoreName = ( +const useStoreName = ( entityType: Entity, localScope?: boolean ): EditorStoreNames => { @@ -472,7 +472,7 @@ export const useEditorStore_queryResponse = ( >(useStoreName(entityType, localScope), (state) => state.queryResponse); }; -export const useEditorStore_setQueryResponse = ( +const useEditorStore_setQueryResponse = ( params?: SelectorParams | undefined ) => { const localScope = params?.localScope; diff --git a/src/components/editor/Store/types.ts b/src/components/editor/Store/types.ts index a35c374ca9..a25198dd1c 100644 --- a/src/components/editor/Store/types.ts +++ b/src/components/editor/Store/types.ts @@ -4,7 +4,7 @@ import type { DraftSpec, DraftSpecQuery } from 'src/hooks/useDraftSpecs'; import type { BaseComponentProps, Schema } from 'src/types'; import type { KeyedMutator } from 'swr'; -export interface DraftSpecResponse { +interface DraftSpecResponse { draftSpecs: DraftSpecQuery[]; isValidating: boolean; mutate: KeyedMutator> | null; diff --git a/src/components/fieldSelection/RefreshButton.tsx b/src/components/fieldSelection/RefreshButton.tsx index a679777b37..95a268cb6e 100644 --- a/src/components/fieldSelection/RefreshButton.tsx +++ b/src/components/fieldSelection/RefreshButton.tsx @@ -16,7 +16,7 @@ interface Props { refresh: Function; } -export function RefreshButton({ buttonLabel, refresh }: Props) { +function RefreshButton({ buttonLabel, refresh }: Props) { const selectionsHydrating = useBindingStore((state) => Object.values(state.selections).some(({ hydrating }) => hydrating) ); diff --git a/src/components/fieldSelection/types.ts b/src/components/fieldSelection/types.ts index 671c63b00d..ded7bbf7ac 100644 --- a/src/components/fieldSelection/types.ts +++ b/src/components/fieldSelection/types.ts @@ -16,7 +16,7 @@ export interface BaseButtonProps extends BindingUUIDProp { selections: FieldSelection[] | null | undefined; } -export interface BaseMenuProps { +interface BaseMenuProps { handleClick: (recommended: boolean | number) => void; disabled: boolean; } diff --git a/src/components/home/hero/DemoButton.tsx b/src/components/home/hero/DemoButton.tsx index 700be9ecb1..87ad54fa7c 100644 --- a/src/components/home/hero/DemoButton.tsx +++ b/src/components/home/hero/DemoButton.tsx @@ -17,7 +17,7 @@ import { hasLength, } from 'src/utils/misc-utils'; -export const FILTER_TABLE_PROPS = { +const FILTER_TABLE_PROPS = { captures: { [`${TablePrefixes.captures}-${TableFilterKeys.searchQuery}`]: `${DEMO_TENANT}wikipedia/recent-changes`, }, diff --git a/src/components/home/hero/Step.tsx b/src/components/home/hero/Step.tsx index 99d648416d..42fca2b946 100644 --- a/src/components/home/hero/Step.tsx +++ b/src/components/home/hero/Step.tsx @@ -9,7 +9,7 @@ interface Props extends BaseComponentProps { title: string; } -export function HeroStep({ children, stepNumber, title }: Props) { +function HeroStep({ children, stepNumber, title }: Props) { return ( <> [] = [ +const TABS: MuiTabProps[] = [ { label: 'home.hero.tab.companyOverview', value: 'overview', diff --git a/src/components/login/Notifications.tsx b/src/components/login/Notifications.tsx index 62457db37b..4d54bbb73f 100644 --- a/src/components/login/Notifications.tsx +++ b/src/components/login/Notifications.tsx @@ -9,10 +9,7 @@ interface Props { notificationTitle?: string; } -export function LoginNotifications({ - notificationMessage, - notificationTitle, -}: Props) { +function LoginNotifications({ notificationMessage, notificationTitle }: Props) { if (notificationMessage) { return ( & { message: string }) { diff --git a/src/components/materialization/targetNaming/Dialog.tsx b/src/components/materialization/targetNaming/Dialog.tsx index c3d48187e4..9f7da5e950 100644 --- a/src/components/materialization/targetNaming/Dialog.tsx +++ b/src/components/materialization/targetNaming/Dialog.tsx @@ -26,7 +26,7 @@ interface Props { alertMessage?: string; } -export function TargetNamingDialog({ +function TargetNamingDialog({ open, initialStrategy, onCancel, diff --git a/src/components/materialization/targetNaming/shared.ts b/src/components/materialization/targetNaming/shared.ts index a27aa1ea00..db1b82e8cb 100644 --- a/src/components/materialization/targetNaming/shared.ts +++ b/src/components/materialization/targetNaming/shared.ts @@ -9,10 +9,10 @@ export const SCHEMA_TEMPLATE_STRING = '{{schema}}'; export const TABLE_TEMPLATE_STRING = '{{table}}'; // Match i18n keys defaults.schema / defaults.table in CommonMessages.ts -export const EXAMPLE_SCHEMA_DEFAULT = 'anvils'; -export const EXAMPLE_TABLE_DEFAULT = 'orders'; +const EXAMPLE_SCHEMA_DEFAULT = 'anvils'; +const EXAMPLE_TABLE_DEFAULT = 'orders'; -export const VALID_STRATEGY_KEYS: StrategyKey[] = [ +const VALID_STRATEGY_KEYS: StrategyKey[] = [ 'matchSourceStructure', 'singleSchema', 'prefixTableNames', @@ -48,7 +48,7 @@ export function hasSchemaTemplate( ); } -export function hasValidSchemaTemplate( +function hasValidSchemaTemplate( s: TargetNamingStrategy | null | undefined ): s is Extract & { schemaTemplate: string; @@ -71,7 +71,7 @@ export function hasTableTemplate( ); } -export function hasValidTableTemplate( +function hasValidTableTemplate( s: TargetNamingStrategy | null | undefined ): s is TargetNamingStrategy & { tableTemplate: string } { return ( diff --git a/src/components/navigation/ListItemLink.tsx b/src/components/navigation/ListItemLink.tsx index c55533c5db..cb97f7905c 100644 --- a/src/components/navigation/ListItemLink.tsx +++ b/src/components/navigation/ListItemLink.tsx @@ -16,7 +16,7 @@ interface Props { link: string; } -export const ListItemLink = ({ icon, title, link }: Props) => { +const ListItemLink = ({ icon, title, link }: Props) => { const resolved = useResolvedPath(link); const selected = Boolean( useMatch({ diff --git a/src/components/shared/AutoComplete/DefaultProps.tsx b/src/components/shared/AutoComplete/DefaultProps.tsx index 8fc9c897ee..e267ef88af 100644 --- a/src/components/shared/AutoComplete/DefaultProps.tsx +++ b/src/components/shared/AutoComplete/DefaultProps.tsx @@ -25,7 +25,7 @@ const autoCompleteDefaults: AutocompleteProps = { size: 'small', }; -export const autoCompleteDefaults_Virtual: AutocompleteProps< +const autoCompleteDefaults_Virtual: AutocompleteProps< any, any, false, diff --git a/src/components/shared/AutoComplete/VirtualizedList/index.tsx b/src/components/shared/AutoComplete/VirtualizedList/index.tsx index 3ad7077393..f2214c91fa 100644 --- a/src/components/shared/AutoComplete/VirtualizedList/index.tsx +++ b/src/components/shared/AutoComplete/VirtualizedList/index.tsx @@ -12,7 +12,7 @@ import { import Row from 'src/components/shared/AutoComplete/VirtualizedList/Row'; import { autoCompleteListPadding } from 'src/context/Theme'; -export const itemSize = 40; +const itemSize = 40; const groupSize = 55; const getChildSize = (child: ReactChild) => { diff --git a/src/components/shared/Dialog/TitleWithClose.tsx b/src/components/shared/Dialog/TitleWithClose.tsx index ea48af42a1..f03197622c 100644 --- a/src/components/shared/Dialog/TitleWithClose.tsx +++ b/src/components/shared/Dialog/TitleWithClose.tsx @@ -6,7 +6,7 @@ import { DialogTitle, IconButton } from '@mui/material'; import { Xmark } from 'iconoir-react'; import { useIntl } from 'react-intl'; -export interface DialogTitleProps extends BaseComponentProps { +interface DialogTitleProps extends BaseComponentProps { id: string; onClose: () => void; disabled?: boolean; diff --git a/src/components/shared/Entity/CatalogEditor.tsx b/src/components/shared/Entity/CatalogEditor.tsx index ba5e8d4e08..c4284b88f3 100644 --- a/src/components/shared/Entity/CatalogEditor.tsx +++ b/src/components/shared/Entity/CatalogEditor.tsx @@ -19,7 +19,7 @@ interface Props { message: string; } -export function CatalogEditor({ message }: Props) { +function CatalogEditor({ message }: Props) { const draftId = useEditorStore_id(); const formStatus = useFormStateStore_status(); diff --git a/src/components/shared/Entity/Details/Alerts/types.ts b/src/components/shared/Entity/Details/Alerts/types.ts index 33eb7a783f..ee300e2f8f 100644 --- a/src/components/shared/Entity/Details/Alerts/types.ts +++ b/src/components/shared/Entity/Details/Alerts/types.ts @@ -22,7 +22,7 @@ export interface AlertDetailsWrapperProps { short?: boolean; } -export interface AlertDetailsProps extends AlertDetailsWrapperProps { +interface AlertDetailsProps extends AlertDetailsWrapperProps { detail: AlertDetail; } diff --git a/src/components/shared/Entity/Details/Logs/Status/Overview/DetailWrapper.tsx b/src/components/shared/Entity/Details/Logs/Status/Overview/DetailWrapper.tsx index cc5a8812ee..ee9d153dc1 100644 --- a/src/components/shared/Entity/Details/Logs/Status/Overview/DetailWrapper.tsx +++ b/src/components/shared/Entity/Details/Logs/Status/Overview/DetailWrapper.tsx @@ -6,7 +6,7 @@ import { useIntl } from 'react-intl'; import { diminishedTextColor } from 'src/context/Theme'; -export function DetailWrapper({ +function DetailWrapper({ children, header, Hydrating, diff --git a/src/components/shared/Entity/EndpointConfig/Form.tsx b/src/components/shared/Entity/EndpointConfig/Form.tsx index 157014901d..5f6b10d222 100644 --- a/src/components/shared/Entity/EndpointConfig/Form.tsx +++ b/src/components/shared/Entity/EndpointConfig/Form.tsx @@ -20,7 +20,7 @@ import { } from 'src/stores/EndpointConfig/hooks'; import { useFormStateStore_isActive } from 'src/stores/FormState/hooks'; -export const CONFIG_EDITOR_ID = 'endpointConfigEditor'; +const CONFIG_EDITOR_ID = 'endpointConfigEditor'; interface Props { readOnly: boolean; diff --git a/src/components/shared/Entity/HeaderSummary.tsx b/src/components/shared/Entity/HeaderSummary.tsx index 42ab0866e7..e67b5187f1 100644 --- a/src/components/shared/Entity/HeaderSummary.tsx +++ b/src/components/shared/Entity/HeaderSummary.tsx @@ -12,7 +12,7 @@ interface Props extends BaseComponentProps { title: string; } -export function HeaderSummary({ severity, title, children }: Props) { +function HeaderSummary({ severity, title, children }: Props) { return ( ; -export type PartialRules< +type PartialRules< TFieldValues extends FieldValues = FieldValues, TName extends FieldPath = FieldPath, > = Pick, 'maxLength' | 'pattern' | 'validate'>; -export type FinalRules< +type FinalRules< TFieldValues extends FieldValues = FieldValues, TName extends FieldPath = FieldPath, > = Pick< diff --git a/src/components/shared/pickers/DateTimePickerCTA.tsx b/src/components/shared/pickers/DateTimePickerCTA.tsx index d2954e9a01..ca78178fe6 100644 --- a/src/components/shared/pickers/DateTimePickerCTA.tsx +++ b/src/components/shared/pickers/DateTimePickerCTA.tsx @@ -40,7 +40,7 @@ const formatDate = (formatValue: Date) => { } }; -export const CustomLayout = forwardRef>( +const CustomLayout = forwardRef>( function CustomLayout(props, ref) { const { tabs, content, ownerState } = usePickerLayout(props); diff --git a/src/components/shared/pickers/TimePickerCTA.tsx b/src/components/shared/pickers/TimePickerCTA.tsx index 971e71780d..2f7d742588 100644 --- a/src/components/shared/pickers/TimePickerCTA.tsx +++ b/src/components/shared/pickers/TimePickerCTA.tsx @@ -22,7 +22,7 @@ import { Patterns } from 'src/types/jsonforms'; const INVALID_TIME = 'Invalid Time'; -export const CustomLayout = forwardRef>( +const CustomLayout = forwardRef>( function CustomLayout(props, ref) { const { actionBar, content, ownerState } = usePickerLayout(props); diff --git a/src/components/tables/BillLineItems/index.tsx b/src/components/tables/BillLineItems/index.tsx index 5c1dcbce40..7da2dca064 100644 --- a/src/components/tables/BillLineItems/index.tsx +++ b/src/components/tables/BillLineItems/index.tsx @@ -29,7 +29,7 @@ import { import { useTenantStore } from 'src/stores/Tenant'; import { TableStatuses } from 'src/types'; -export const columns: TableColumns[] = [ +const columns: TableColumns[] = [ { field: 'description', headerIntlKey: 'admin.billing.table.line_items.label.description', diff --git a/src/components/tables/Billing/index.tsx b/src/components/tables/Billing/index.tsx index 1f7b69a9fd..30161e4bf8 100644 --- a/src/components/tables/Billing/index.tsx +++ b/src/components/tables/Billing/index.tsx @@ -17,7 +17,7 @@ import { import { TableStatuses } from 'src/types'; import { invoiceId } from 'src/utils/billing-utils'; -export const columns: TableColumns[] = [ +const columns: TableColumns[] = [ { field: 'date_start', headerIntlKey: 'admin.billing.table.history.label.date_start', diff --git a/src/components/tables/Captures/Rows.tsx b/src/components/tables/Captures/Rows.tsx index 35c89363de..be2b78a5f1 100644 --- a/src/components/tables/Captures/Rows.tsx +++ b/src/components/tables/Captures/Rows.tsx @@ -26,7 +26,7 @@ interface RowsProps { showEntityStatus: boolean; } -export interface RowProps { +interface RowProps { stats?: StatsResponse; statsFailed?: boolean; row: CaptureQueryWithStats; diff --git a/src/components/tables/ControllerStatusHistory/index.tsx b/src/components/tables/ControllerStatusHistory/index.tsx index 3d7d6964f1..040c2f37ba 100644 --- a/src/components/tables/ControllerStatusHistory/index.tsx +++ b/src/components/tables/ControllerStatusHistory/index.tsx @@ -17,7 +17,7 @@ import { useEntityStatusStore_recentHistory } from 'src/stores/EntityStatus/hook import { useEntityStatusStore } from 'src/stores/EntityStatus/Store'; import { TableStatuses } from 'src/types'; -export const columns: TableColumns[] = [ +const columns: TableColumns[] = [ { field: null, headerIntlKey: 'data.event', diff --git a/src/components/tables/DataPlanes/types.ts b/src/components/tables/DataPlanes/types.ts index c1c0afe76d..5ee4974cd4 100644 --- a/src/components/tables/DataPlanes/types.ts +++ b/src/components/tables/DataPlanes/types.ts @@ -21,7 +21,7 @@ export interface DataPlaneDialogFieldProps { showCopyButton?: boolean; } -export interface ToggleOption { +interface ToggleOption { key: string; label: string; value: string | null; diff --git a/src/components/tables/EntityTable/types.ts b/src/components/tables/EntityTable/types.ts index cc7b3a957a..90633435b6 100644 --- a/src/components/tables/EntityTable/types.ts +++ b/src/components/tables/EntityTable/types.ts @@ -14,9 +14,7 @@ import type { // These are settings that were added just for Collection Selector but might be useful elsewhere in the future (Q2 2025) -export interface ColumnPropsBase - extends TableColumns, - CollectionSelectorColumnProps {} +interface ColumnPropsBase extends TableColumns, CollectionSelectorColumnProps {} export type ColumnProps = | (ColumnPropsBase & { diff --git a/src/components/tables/RowActions/Shared/Button.tsx b/src/components/tables/RowActions/Shared/Button.tsx index 1d22588894..49a14038b8 100644 --- a/src/components/tables/RowActions/Shared/Button.tsx +++ b/src/components/tables/RowActions/Shared/Button.tsx @@ -13,7 +13,7 @@ import { useConfirmationModalContext } from 'src/context/Confirmation'; import { useZustandStore } from 'src/context/Zustand/provider'; import { selectableTableStoreSelectors } from 'src/stores/Tables/Store'; -export function RowActionButton({ +function RowActionButton({ message, renderConfirmationMessage, renderProgress, diff --git a/src/components/tables/RowActions/Shared/ConfirmationAlert.tsx b/src/components/tables/RowActions/Shared/ConfirmationAlert.tsx index 480d2b5947..39b74d333e 100644 --- a/src/components/tables/RowActions/Shared/ConfirmationAlert.tsx +++ b/src/components/tables/RowActions/Shared/ConfirmationAlert.tsx @@ -4,7 +4,7 @@ import { Typography } from '@mui/material'; import { useIntl } from 'react-intl'; -export function ConfirmationAlert({ +function ConfirmationAlert({ message, }: Omit & { message: string }) { return {message}; diff --git a/src/components/tables/RowActions/Shared/GroupedButton.tsx b/src/components/tables/RowActions/Shared/GroupedButton.tsx index a877538e57..4e64bbf3f4 100644 --- a/src/components/tables/RowActions/Shared/GroupedButton.tsx +++ b/src/components/tables/RowActions/Shared/GroupedButton.tsx @@ -13,7 +13,7 @@ import { useConfirmationModalContext } from 'src/context/Confirmation'; import { useZustandStore } from 'src/context/Zustand/provider'; import { selectableTableStoreSelectors } from 'src/stores/Tables/Store'; -export function GroupedRowActionButton({ +function GroupedRowActionButton({ message, renderConfirmationMessage, renderProgress, diff --git a/src/components/tables/RowActions/Shared/UpdateEntity.tsx b/src/components/tables/RowActions/Shared/UpdateEntity.tsx index efa58f2790..e97a86b78e 100644 --- a/src/components/tables/RowActions/Shared/UpdateEntity.tsx +++ b/src/components/tables/RowActions/Shared/UpdateEntity.tsx @@ -22,7 +22,7 @@ import { jobSucceeded } from 'src/services/supabase'; import { SelectTableStoreNames } from 'src/stores/names'; import { selectableTableStoreSelectors } from 'src/stores/Tables/Store'; -export interface UpdateEntityProps { +interface UpdateEntityProps { entity: CaptureQuery; onFinish: (response: any) => void; generateNewSpec: ( diff --git a/src/components/tables/RowActions/Shared/types.ts b/src/components/tables/RowActions/Shared/types.ts index 2bc2e55058..7e677611cd 100644 --- a/src/components/tables/RowActions/Shared/types.ts +++ b/src/components/tables/RowActions/Shared/types.ts @@ -22,7 +22,7 @@ export enum ProgressStates { FAILED = 100, } -export interface BaseProgressProps { +interface BaseProgressProps { error: any | null; state: ProgressStates; runningIntlKey: string; diff --git a/src/components/tables/cells/fieldSelection/FieldActionButton.tsx b/src/components/tables/cells/fieldSelection/FieldActionButton.tsx index bbe719be5b..9c8c5f2b69 100644 --- a/src/components/tables/cells/fieldSelection/FieldActionButton.tsx +++ b/src/components/tables/cells/fieldSelection/FieldActionButton.tsx @@ -12,7 +12,7 @@ import { import useOnFieldActionClick from 'src/hooks/fieldSelection/useOnFieldActionClick'; import { useFormStateStore_isIdle } from 'src/stores/FormState/hooks'; -export function FieldActionButton({ +function FieldActionButton({ bindingUUID, disabled, field, diff --git a/src/components/transformation/create/Schema/Editor.tsx b/src/components/transformation/create/Schema/Editor.tsx index 12c51e82d2..9f672a07e3 100644 --- a/src/components/transformation/create/Schema/Editor.tsx +++ b/src/components/transformation/create/Schema/Editor.tsx @@ -3,7 +3,7 @@ import { MonacoEditorSkeleton } from 'src/components/editor/MonacoEditor/EditorS import EmptySQLEditor from 'src/components/transformation/create/Config/SQLEditor/Empty'; import useDraftSpecEditor from 'src/hooks/useDraftSpecEditor'; -export interface Props { +interface Props { entityName: string; editorHeight?: number; } diff --git a/src/components/transformation/create/types.ts b/src/components/transformation/create/types.ts index 6e9d4d5c68..d899c2497e 100644 --- a/src/components/transformation/create/types.ts +++ b/src/components/transformation/create/types.ts @@ -1,8 +1,6 @@ import type { ButtonProps } from '@mui/material'; -export type DraftCreationCallback = ( - draftId: string | undefined | null -) => void; +type DraftCreationCallback = (draftId: string | undefined | null) => void; export interface TransformationCreateProps { draftCreationCallback: DraftCreationCallback; diff --git a/src/context/LocalZustand.tsx b/src/context/LocalZustand.tsx index 0921e44f53..e5ddc93da2 100644 --- a/src/context/LocalZustand.tsx +++ b/src/context/LocalZustand.tsx @@ -11,7 +11,7 @@ interface LocalZustandProviderProps { createStore: (key: StoreName) => unknown; } -export const LocalZustandContext = createReactContext(null); +const LocalZustandContext = createReactContext(null); export const LocalZustandProvider = ({ children, diff --git a/src/context/Theme.tsx b/src/context/Theme.tsx index 62174da645..84504827aa 100644 --- a/src/context/Theme.tsx +++ b/src/context/Theme.tsx @@ -99,7 +99,7 @@ export enum NavWidths { } // Colors -export const sample_blue = { +const sample_blue = { 100: '#DCE6FE', 200: '#BACDFD', 300: '#96B0F9', @@ -133,10 +133,10 @@ export type SemanticColor = | '#4FD6FF'; export const successMain: SemanticColor = '#40B763'; -export const successDark: SemanticColor = '#2A7942'; +const successDark: SemanticColor = '#2A7942'; export const warningMain: SemanticColor = '#F5D75E'; export const errorMain: SemanticColor = '#CA3B55'; -export const infoMain: SemanticColor = '#4FD6FF'; +const infoMain: SemanticColor = '#4FD6FF'; const rgbTranslations = { dark: { @@ -336,13 +336,13 @@ const buttonHoverIndex = zIndexIncrement * 4; const chipDeleteIndex = buttonHoverIndex + zIndexIncrement; // To make the sortable chip list work -export const chipDraggableIndex = buttonHoverIndex + zIndexIncrement; +const chipDraggableIndex = buttonHoverIndex + zIndexIncrement; // JSONForms accordion is hardcoded to 20 so making this "1 higher" const accordionButton = zIndexIncrement * 5; // Need to make the sticky header be on top -export const headerLinkIndex = zIndexIncrement * 30; +const headerLinkIndex = zIndexIncrement * 30; // Want to make sure it is near the top but right under the screen disable overlay export const toastIndex = zIndexIncrement * 35; @@ -559,7 +559,7 @@ export const alternativeReflexContainerBackground = { dark: 'rgba(247, 249, 252, 0.05)', }; -export const alternativeDataGridHeader = { +const alternativeDataGridHeader = { light: 'white', dark: 'transparent', }; @@ -719,7 +719,7 @@ export const linkButtonSx: SxProps = { }; // Light is an RGB translation of #E1E9F4; Light is an RGB translation of #F7F9FC. -export const connectorCardLogoBackground = { +const connectorCardLogoBackground = { light: 'rgba(225, 233, 244, 0.30)', dark: 'rgba(247, 249, 252, 0.08)', }; @@ -820,7 +820,7 @@ export const getStickyTableCell = (headerParent?: boolean): SxProps => { }; }; -export const wrappingTableCell = { +const wrappingTableCell = { wordWrap: 'break-word', // WARNING - the min width work as you might expect. The max width does NOT // It looks and feels good but the cell will for sure grow larger than just 300px diff --git a/src/context/User/types.ts b/src/context/User/types.ts index de2ebe73b8..4677ef741b 100644 --- a/src/context/User/types.ts +++ b/src/context/User/types.ts @@ -1,7 +1,7 @@ import type { Session, User } from '@supabase/supabase-js'; import type { UserDetails } from 'src/types'; -export interface AuthSession { +interface AuthSession { userDetails: UserDetails | null; initialized: boolean; user: User | null; diff --git a/src/context/Zustand/provider.tsx b/src/context/Zustand/provider.tsx index f8eb2a123e..823bd62183 100644 --- a/src/context/Zustand/provider.tsx +++ b/src/context/Zustand/provider.tsx @@ -8,7 +8,7 @@ import { useStore } from 'zustand'; import invariableStores from 'src/context/Zustand/invariableStores'; -export const ZustandContext = createReactContext(null); +const ZustandContext = createReactContext(null); export const ZustandProvider = ({ children }: ZustandProviderProps) => { return ( diff --git a/src/context/fetcher/TenantBillingDetails.tsx b/src/context/fetcher/TenantBillingDetails.tsx index f88e667128..b649f7acdd 100644 --- a/src/context/fetcher/TenantBillingDetails.tsx +++ b/src/context/fetcher/TenantBillingDetails.tsx @@ -10,7 +10,7 @@ import { useUserInfoSummaryStore } from 'src/context/UserInfoSummary/useUserInfo import { useTenantsDetailsForPayment } from 'src/hooks/useTenants'; import { useEntitiesStore_tenantsWithAdmin } from 'src/stores/Entities/hooks'; -export interface TenantContextData { +interface TenantContextData { tenantBillingDetails: TenantPaymentDetails[] | null; } const TenantContext = createContext({ diff --git a/src/directives/Onboard/Store/types.ts b/src/directives/Onboard/Store/types.ts index 7d1f764e66..024164f69a 100644 --- a/src/directives/Onboard/Store/types.ts +++ b/src/directives/Onboard/Store/types.ts @@ -1,4 +1,4 @@ -export interface SurveyResponse { +interface SurveyResponse { origin: string; details: string; } diff --git a/src/directives/types.ts b/src/directives/types.ts index b6db67f6d1..71c7b9be97 100644 --- a/src/directives/types.ts +++ b/src/directives/types.ts @@ -31,20 +31,20 @@ export type DirectiveStates = | 'outdated' | 'errored'; -export interface AcceptDemoTenantClaim { +interface AcceptDemoTenantClaim { tenant: string; } -export interface ClickToAcceptClaim { +interface ClickToAcceptClaim { version: string; } -export interface OnboardClaim { +interface OnboardClaim { requestedTenant: string; survey: any; } -export interface StorageMappingsClaim { +interface StorageMappingsClaim { addStore: object; catalogPrefix: string; } @@ -56,7 +56,7 @@ export type UserClaims = | StorageMappingsClaim; // TODO (V2 typing) - queryFilter should take in filter builder better -export interface DirectiveSettings { +interface DirectiveSettings { token: string; queryFilter: ( queryBuilder: any //PostgrestFilterBuilder diff --git a/src/forms/overrides/material/complex/CombinatorProperties.tsx b/src/forms/overrides/material/complex/CombinatorProperties.tsx index 4c569abc92..01d848efac 100644 --- a/src/forms/overrides/material/complex/CombinatorProperties.tsx +++ b/src/forms/overrides/material/complex/CombinatorProperties.tsx @@ -38,10 +38,10 @@ interface CombinatorPropertiesProps { path: string; } -export const isLayout = (uischema: UISchemaElement): uischema is Layout => +const isLayout = (uischema: UISchemaElement): uischema is Layout => Object.hasOwn(uischema, 'elements'); -export class CombinatorProperties extends React.Component< +class CombinatorProperties extends React.Component< CombinatorPropertiesProps, {} > { diff --git a/src/forms/overrides/material/complex/MaterialOneOfRenderer_Discriminator.tsx b/src/forms/overrides/material/complex/MaterialOneOfRenderer_Discriminator.tsx index 34a042753d..8ee7370c6a 100644 --- a/src/forms/overrides/material/complex/MaterialOneOfRenderer_Discriminator.tsx +++ b/src/forms/overrides/material/complex/MaterialOneOfRenderer_Discriminator.tsx @@ -113,7 +113,7 @@ function skipTabChangePrompt(data: any, prop: string): boolean { return true; } -export const Custom_MaterialOneOfRenderer_Discriminator = ({ +const Custom_MaterialOneOfRenderer_Discriminator = ({ handleChange, schema, path, diff --git a/src/forms/overrides/material/controls/MaterialDateControl.tsx b/src/forms/overrides/material/controls/MaterialDateControl.tsx index c8ca263945..dbd04e836d 100644 --- a/src/forms/overrides/material/controls/MaterialDateControl.tsx +++ b/src/forms/overrides/material/controls/MaterialDateControl.tsx @@ -38,7 +38,7 @@ import { CustomMuiInputText } from 'src/forms/overrides/material/controls/MuiInp // This is pretty customized // Look at MaterialDateTimeControl for extra notes // as this is based on that but made to support Date Picker -export const CustomMaterialDateControl = (props: ControlProps) => { +const CustomMaterialDateControl = (props: ControlProps) => { const { data, id, visible, enabled, path, handleChange, label } = props; const { state, buttonRef, events } = useDatePickerState( diff --git a/src/forms/overrides/material/controls/MaterialDateTimeControl.tsx b/src/forms/overrides/material/controls/MaterialDateTimeControl.tsx index 69daa64e27..d17400288f 100644 --- a/src/forms/overrides/material/controls/MaterialDateTimeControl.tsx +++ b/src/forms/overrides/material/controls/MaterialDateTimeControl.tsx @@ -56,7 +56,7 @@ import { CustomMuiInputText } from 'src/forms/overrides/material/controls/MuiInp // This requires that we remove the "Z" (that we inject) before opening the picker // otherwise the picker will try to adjust the timezone again. -export const CustomMaterialDateTimeControl = (props: ControlProps) => { +const CustomMaterialDateTimeControl = (props: ControlProps) => { const { data, id, visible, enabled, path, handleChange, label } = props; const { state, buttonRef, events } = useDatePickerState( `date-time-picker-${id}` diff --git a/src/forms/overrides/material/controls/MaterialTimeControl.tsx b/src/forms/overrides/material/controls/MaterialTimeControl.tsx index b210920db9..891f59315c 100644 --- a/src/forms/overrides/material/controls/MaterialTimeControl.tsx +++ b/src/forms/overrides/material/controls/MaterialTimeControl.tsx @@ -41,7 +41,7 @@ import { hasLength } from 'src/utils/misc-utils'; // This is pretty customized // Look at MaterialDateTimeControl for extra notes // as this is based on that but made to support Date Picker -export const CustomMaterialTimeControl = (props: ControlProps) => { +const CustomMaterialTimeControl = (props: ControlProps) => { const { data, id, visible, enabled, path, handleChange, label } = props; const { state, buttonRef, events } = useDatePickerState( diff --git a/src/hooks/forks/react-use-oauth2/components/use-oauth2.ts b/src/hooks/forks/react-use-oauth2/components/use-oauth2.ts index cb2a597cf7..eb2c38ed92 100644 --- a/src/hooks/forks/react-use-oauth2/components/use-oauth2.ts +++ b/src/hooks/forks/react-use-oauth2/components/use-oauth2.ts @@ -10,7 +10,7 @@ import { POPUP_WIDTH, } from 'src/hooks/forks/react-use-oauth2/components/constants'; -export type AuthTokenPayload = { +type AuthTokenPayload = { token_type: string; expires_in: number; access_token: string; @@ -18,7 +18,7 @@ export type AuthTokenPayload = { refresh_token: string; }; -export type Oauth2Props = { +type Oauth2Props = { onError: (error: string) => void | Promise | PromiseLike; onSuccess: ( payload: TData, diff --git a/src/hooks/journals/shared.ts b/src/hooks/journals/shared.ts index 6703e3dd62..3741d24906 100644 --- a/src/hooks/journals/shared.ts +++ b/src/hooks/journals/shared.ts @@ -22,7 +22,7 @@ function isJournalRecord(val: any): val is JournalRecord { return val?._meta?.uuid; } -export async function* streamAsyncIterator(stream: ReadableStream) { +async function* streamAsyncIterator(stream: ReadableStream) { // Get a lock on the stream const reader = stream.getReader(); @@ -43,7 +43,7 @@ export async function* streamAsyncIterator(stream: ReadableStream) { } } -export async function readAllDocuments(stream: ReadableStream) { +async function readAllDocuments(stream: ReadableStream) { const accum: T[] = []; for await (const item of streamAsyncIterator(stream)) { diff --git a/src/hooks/searchParams/types.ts b/src/hooks/searchParams/types.ts index 1b3432e3ac..e422453522 100644 --- a/src/hooks/searchParams/types.ts +++ b/src/hooks/searchParams/types.ts @@ -7,7 +7,7 @@ import type { usePublicationSpecsExt_History, } from 'src/hooks/usePublicationSpecsExt'; -export type UseHistoryDiffFindFunction = ( +type UseHistoryDiffFindFunction = ( publication: PublicationSpecsExt_Spec | PublicationSpecsExt_PubIds ) => boolean; diff --git a/src/hooks/useJobStatusPoller.ts b/src/hooks/useJobStatusPoller.ts index 0d470b0d68..ad3a3a1f31 100644 --- a/src/hooks/useJobStatusPoller.ts +++ b/src/hooks/useJobStatusPoller.ts @@ -21,7 +21,7 @@ import { } from 'src/utils/misc-utils'; import { checkIfPublishIsDone } from 'src/utils/publication-utils'; -export function useQueryPoller( +function useQueryPoller( key: string, checkIfDone: (response: any, attempts: number) => [boolean | null, any] ) { diff --git a/src/hooks/useLiveSpecs.ts b/src/hooks/useLiveSpecs.ts index c59a2be129..d4b661edc0 100644 --- a/src/hooks/useLiveSpecs.ts +++ b/src/hooks/useLiveSpecs.ts @@ -7,7 +7,7 @@ import { useQuery } from '@supabase-cache-helpers/postgrest-swr'; import { supabaseClient } from 'src/context/GlobalProviders'; import { TABLES } from 'src/services/supabase'; -export interface LiveSpecsQuery extends Schema { +interface LiveSpecsQuery extends Schema { catalog_name: string; spec_type: string; // Filtering only diff --git a/src/hooks/useMarketplaceVerify.ts b/src/hooks/useMarketplaceVerify.ts index 66010207f0..62502ddcfa 100644 --- a/src/hooks/useMarketplaceVerify.ts +++ b/src/hooks/useMarketplaceVerify.ts @@ -14,7 +14,7 @@ import { getMarketplaceSettings } from 'src/utils/env-utils'; const { verifyURL } = getMarketplaceSettings(); -export const fetcher = (tenant: string, session: Session | null) => { +const fetcher = (tenant: string, session: Session | null) => { return client( verifyURL, { data: { tenant, token: session?.provider_token } }, diff --git a/src/hooks/usePublications.ts b/src/hooks/usePublications.ts index c3964b6185..2ba0fc5179 100644 --- a/src/hooks/usePublications.ts +++ b/src/hooks/usePublications.ts @@ -6,7 +6,7 @@ import { supabaseClient } from 'src/context/GlobalProviders'; import { DEFAULT_POLLING } from 'src/context/SWR'; import { TABLES } from 'src/services/supabase'; -export interface Publications { +interface Publications { id: string; job_status: JobStatus; logs_token: string; diff --git a/src/services/ajv.ts b/src/services/ajv.ts index d846ccce5b..2a6cfb1079 100644 --- a/src/services/ajv.ts +++ b/src/services/ajv.ts @@ -19,7 +19,7 @@ import { stripPathing } from 'src/utils/misc-utils'; type Ajv = ReturnType; // TODO (typing) Need to get this typed as the AJV Options type -export const defaultAjvSettings: any = { +const defaultAjvSettings: any = { // Causes it to mutate its input to set default values. useDefaults: 'empty', // Don't barf when things aren't quite aligned with the JSON schema spec. Log it instead. @@ -39,7 +39,7 @@ export const defaultAjvSettings: any = { addUsedSchema: false, }; -export const addKeywords = (ajv: Ajv) => { +const addKeywords = (ajv: Ajv) => { // Flow allows some extra annotations, some of which are used to control how forms are rendered // in the UI. The full list of allowed annotations is defined in: // https://github.com/estuary/flow/blob/master/crates/doc/src/annotation.rs @@ -138,7 +138,7 @@ export interface ResourceConfigPointers { ['x_delta_updates']: string | undefined; } -export const prepareSourceCaptureForServer = (arg: SourceCaptureDef) => { +const prepareSourceCaptureForServer = (arg: SourceCaptureDef) => { const response = { ...arg, }; diff --git a/src/services/jsonforms/JsonFormsContext.tsx b/src/services/jsonforms/JsonFormsContext.tsx index 7d5402ff7b..e5d9278b4c 100644 --- a/src/services/jsonforms/JsonFormsContext.tsx +++ b/src/services/jsonforms/JsonFormsContext.tsx @@ -56,7 +56,7 @@ import { // All these functions are customized just so we can end up with the custom function // mapCustomStateToCombinatorRendererProps calling into out own getDiscriminatorIndex // based on : packages/core/src/util/renderer.ts @ mapStateToCombinatorRendererProps -export const mapCustomStateToCombinatorRendererProps = ( +const mapCustomStateToCombinatorRendererProps = ( state: any, // JsonFormsState, ownProps: OwnPropsOfControl, keyword: CombinatorKeyword @@ -114,7 +114,7 @@ export const withCustomJsonFormsOneOfDiscriminatorProps = ( // Custom Layout for CollapsibleGroup // Used to allow groups that are optional to remove all of their own properties via // a passed in `handleChange` -export interface CustomLayoutProps extends LayoutProps { +interface CustomLayoutProps extends LayoutProps { childrenHaveValue?: boolean; clearSettings: (path: string, value: any) => void; } diff --git a/src/services/jsonforms/index.ts b/src/services/jsonforms/index.ts index 846f8c2cd0..c07abaddd5 100644 --- a/src/services/jsonforms/index.ts +++ b/src/services/jsonforms/index.ts @@ -221,7 +221,7 @@ const copyAdvancedOption = (elem: Layout, schema: JsonSchema) => { } }; -export const isRequiredField = (propName: string, rootSchema?: JsonSchema) => { +const isRequiredField = (propName: string, rootSchema?: JsonSchema) => { const requiredFields = rootSchema?.required; return includes(requiredFields, propName); @@ -326,7 +326,7 @@ interface CategoryUiSchema { type: string; elements: CategoryUiSchema_Elements[]; } -export const generateCategoryUiSchema = (uiSchema: any) => { +const generateCategoryUiSchema = (uiSchema: any) => { const basicElements: CategoryUiSchema_Elements[] = []; const advancedElements: CategoryUiSchema_Elements[] = []; @@ -412,7 +412,7 @@ const createLayout = (layoutType: string): Layout => ({ /** * Creates a IControlObject with the given label referencing the given ref */ -export const createControlElement = (ref: string): ControlElement => ({ +const createControlElement = (ref: string): ControlElement => ({ type: 'Control', scope: ref, }); @@ -811,7 +811,7 @@ export const getDereffedSchema = async (val: any) => { return response; }; -export const derefSchema = async (schema: any) => { +const derefSchema = async (schema: any) => { try { // Removing for now as oneOf with discriminators will mess up when the // oneOf options use $ref diff --git a/src/services/jsonforms/shared.ts b/src/services/jsonforms/shared.ts index 67e13fc0fc..1208466ed6 100644 --- a/src/services/jsonforms/shared.ts +++ b/src/services/jsonforms/shared.ts @@ -27,5 +27,5 @@ export const allowedNullableTypes = [ 'number', 'string', ] as const; -export type AllowedNullables = typeof allowedNullableTypes; +type AllowedNullables = typeof allowedNullableTypes; export type AllowedNullable = AllowedNullables[number]; diff --git a/src/services/supabase.ts b/src/services/supabase.ts index 0dd508aa0e..cbb118f521 100644 --- a/src/services/supabase.ts +++ b/src/services/supabase.ts @@ -23,14 +23,14 @@ export const SHARDS_DISABLE = `spec->shards->disable`; export const SHARD_LABELS = `shard_labels:built_spec->shardTemplate->labels->labels`; -export const ERROR_MESSAGES = { +const ERROR_MESSAGES = { jwtExpired: 'JWT expired', jwtInvalid: 'invalid JWT', jwsInvalid: 'JWSError JWSInvalidSignature', refreshInvalid: 'Refresh Token Not Found', }; -export const tokenHasIssues = (errorMessage?: string) => { +const tokenHasIssues = (errorMessage?: string) => { return ( errorMessage && (errorMessage === ERROR_MESSAGES.jwtExpired || @@ -396,9 +396,8 @@ export const pagedFetchAll = async ( // START: Poller export type PollerTimeout = number | undefined; export const JOB_STATUS_POLLER_ERROR = 'supabase.poller.failed'; -export const DEFAULT_POLLER_ERROR_TITLE_KEY = 'supabase.poller.failed.title'; -export const DEFAULT_POLLER_ERROR_MESSAGE_KEY = - 'supabase.poller.failed.message'; +const DEFAULT_POLLER_ERROR_TITLE_KEY = 'supabase.poller.failed.title'; +const DEFAULT_POLLER_ERROR_MESSAGE_KEY = 'supabase.poller.failed.message'; export const DEFAULT_POLLER_ERROR = { title: DEFAULT_POLLER_ERROR_TITLE_KEY, error: { @@ -406,9 +405,9 @@ export const DEFAULT_POLLER_ERROR = { }, }; -export const JOB_TYPE_EMPTY = 'emptyDraft'; +const JOB_TYPE_EMPTY = 'emptyDraft'; export const JOB_TYPE_FAILURE = 'buildFailed'; -export const JOB_TYPE_SUCCESS = 'success'; +const JOB_TYPE_SUCCESS = 'success'; // These columns are not always what you want... but okay for a "default" constant export const JOB_STATUS_SUCCESS = [JOB_TYPE_EMPTY, JOB_TYPE_SUCCESS]; diff --git a/src/stores/Binding/Hydrator.tsx b/src/stores/Binding/Hydrator.tsx index 7786a16bda..e247c3ac06 100644 --- a/src/stores/Binding/Hydrator.tsx +++ b/src/stores/Binding/Hydrator.tsx @@ -20,7 +20,7 @@ import { } from 'src/stores/Binding/hooks'; import { PrefillSourceCaptureGate } from 'src/stores/Binding/PrefillSourceCaptureGate'; -export const BindingHydrator = ({ children }: BaseComponentProps) => { +const BindingHydrator = ({ children }: BaseComponentProps) => { // We want to manually control this in a REF to not fire extra effect calls const rehydrating = useRef(false); diff --git a/src/stores/Binding/shared.ts b/src/stores/Binding/shared.ts index bea7d874ad..431155b074 100644 --- a/src/stores/Binding/shared.ts +++ b/src/stores/Binding/shared.ts @@ -86,7 +86,7 @@ export const populateResourceConfigErrors = ( state.resourceConfigErrorsExist = hasErrors; }; -export const sortByDisableStatus = ( +const sortByDisableStatus = ( disabledA: boolean, disabledB: boolean, collectionA: string, @@ -205,7 +205,7 @@ const getResourceConfig = ( }; }; -export const initializeResourceConfig = ( +const initializeResourceConfig = ( state: BindingState, binding: any, bindingUUID: string, @@ -425,7 +425,7 @@ export const hydrateSpecificationDependentState = async ( return { bindingChanges, error: null }; }; -export const getInitialBindingData = (): Pick< +const getInitialBindingData = (): Pick< BindingState, 'bindingErrorsExist' | 'bindings' | 'currentBinding' > => ({ @@ -434,7 +434,7 @@ export const getInitialBindingData = (): Pick< currentBinding: null, }); -export const getInitialMiscData = (): Pick< +const getInitialMiscData = (): Pick< BindingState, | 'captureInterval' | 'collectionMetadata' diff --git a/src/stores/DetailsForm/Store.ts b/src/stores/DetailsForm/Store.ts index 5a660589e8..38e5f9bfe3 100644 --- a/src/stores/DetailsForm/Store.ts +++ b/src/stores/DetailsForm/Store.ts @@ -51,7 +51,7 @@ const getInitialStateData = (): Pick< previousDetails: initialDetails, }); -export const getInitialState = ( +const getInitialState = ( set: NamedSet, get: StoreApi['getState'] ): DetailsFormState => ({ diff --git a/src/stores/DetailsForm/types.ts b/src/stores/DetailsForm/types.ts index 2908f08775..605a296d24 100644 --- a/src/stores/DetailsForm/types.ts +++ b/src/stores/DetailsForm/types.ts @@ -22,7 +22,7 @@ export interface DataPlaneOption { cidrBlocks?: string[] | null; } -export interface ConnectorMetadata { +interface ConnectorMetadata { connectorId: string; iconPath: string; id: string; diff --git a/src/stores/Entities/hooks.ts b/src/stores/Entities/hooks.ts index 75999be185..eee38beb44 100644 --- a/src/stores/Entities/hooks.ts +++ b/src/stores/Entities/hooks.ts @@ -98,7 +98,7 @@ export const useEntitiesStore_tenantsWithAdmin = () => { ); }; -export const useEntitiesStore_populateState = () => { +const useEntitiesStore_populateState = () => { const [setCapabilities, setHydrated, setHydrationErrors, setMutate] = useEntitiesStore( useShallow((state) => [ diff --git a/src/stores/JournalData/Logs/Hydrator.tsx b/src/stores/JournalData/Logs/Hydrator.tsx index 6840d46217..7585519b7d 100644 --- a/src/stores/JournalData/Logs/Hydrator.tsx +++ b/src/stores/JournalData/Logs/Hydrator.tsx @@ -7,7 +7,7 @@ import { useShallow } from 'zustand/react/shallow'; import useOpsLogs from 'src/hooks/journals/useOpsLogs'; import { useJournalDataLogsStore } from 'src/stores/JournalData/Logs/Store'; -export const JournalDataLogsHydrator = ({ children }: BaseComponentProps) => { +const JournalDataLogsHydrator = ({ children }: BaseComponentProps) => { const [resetState, setActive, hydrate] = useJournalDataLogsStore( useShallow((state) => [ state.resetState, diff --git a/src/stores/JournalData/Store.ts b/src/stores/JournalData/Store.ts index 4e77276642..ccfeba795e 100644 --- a/src/stores/JournalData/Store.ts +++ b/src/stores/JournalData/Store.ts @@ -8,7 +8,7 @@ import { devtoolsOptions } from 'src/utils/store-utils'; // TODO: Remove the action, getAuthToken, from the store. Store actions // should be limited to simple functions that set or manipulate state. -export interface JournalState { +interface JournalState { collectionBrokerAddress: string; collectionBrokerToken: string; getAuthToken: ( diff --git a/src/stores/NotificationStore.ts b/src/stores/NotificationStore.ts index 81c8d62227..8d4b1b78f5 100644 --- a/src/stores/NotificationStore.ts +++ b/src/stores/NotificationStore.ts @@ -23,7 +23,7 @@ export interface NotificationState { clearNotificationHistory: () => void; } -export const useNotificationStore = create()( +const useNotificationStore = create()( devtools( (set) => ({ clearNotificationHistory: () => diff --git a/src/stores/ShardDetail/types.ts b/src/stores/ShardDetail/types.ts index 7fe251b158..09160a9f48 100644 --- a/src/stores/ShardDetail/types.ts +++ b/src/stores/ShardDetail/types.ts @@ -74,7 +74,7 @@ export interface ShardDictionary { } // TODO: Determine a way to access an interface property with a function type. -export type SetShards = (shards: Shard[]) => void; +type SetShards = (shards: Shard[]) => void; // Represents an endpoint that is exposed by a connector. Connectors may expose 0 or more // endpoints, and each one will have a unique hostname that is a subdomain of the data-plane. diff --git a/src/stores/Tables/Hydrator.tsx b/src/stores/Tables/Hydrator.tsx index 859bc45ec8..2e67bab596 100644 --- a/src/stores/Tables/Hydrator.tsx +++ b/src/stores/Tables/Hydrator.tsx @@ -18,7 +18,7 @@ interface TableHydratorProps extends BaseComponentProps { disableQueryParamHack?: boolean; } -export const TableHydrator = ({ +const TableHydrator = ({ children, disableMultiSelect, query, diff --git a/src/stores/Tables/Store.ts b/src/stores/Tables/Store.ts index 2d897e5785..0b26906b58 100644 --- a/src/stores/Tables/Store.ts +++ b/src/stores/Tables/Store.ts @@ -28,7 +28,7 @@ import { } from 'src/stores/extensions/Hydration'; import { devtoolsOptions } from 'src/utils/store-utils'; -export interface StatsSchema { +interface StatsSchema { [k: string]: | { bytes_written_by_me?: number; @@ -100,7 +100,7 @@ export interface SelectableTableStore extends StoreWithHydration { resetActionSettings: () => void; } -export const initialCreateStates = { +const initialCreateStates = { rows: () => { return new Map(); }, @@ -110,7 +110,7 @@ export const initialCreateStates = { successfulTransformations: 0, }; -export const getInitialStateData = (): Pick< +const getInitialStateData = (): Pick< SelectableTableStore, | 'actionSettings' | 'disabledRows' @@ -138,7 +138,7 @@ export const getInitialStateData = (): Pick< }; }; -export const getInitialState = ( +const getInitialState = ( set: NamedSet, get: StoreApi['getState'] ): SelectableTableStore => { diff --git a/src/stores/Workflow/slices/Collections.ts b/src/stores/Workflow/slices/Collections.ts index 00384ec562..38f5e52b78 100644 --- a/src/stores/Workflow/slices/Collections.ts +++ b/src/stores/Workflow/slices/Collections.ts @@ -62,7 +62,7 @@ export interface StoreWithCollections { // removeCollections: (collection: string) => void; } -export const getInitialCollectionData = (): Pick< +const getInitialCollectionData = (): Pick< StoreWithCollections, 'collections' | 'collectionsError' | 'collectionsInited' > => ({ diff --git a/src/stores/names.ts b/src/stores/names.ts index adfda46973..663c6ff907 100644 --- a/src/stores/names.ts +++ b/src/stores/names.ts @@ -14,7 +14,7 @@ export enum EditorStoreNames { MATERIALIZATION = 'materialization_editor_store', } -export enum EndpointConfigStoreNames { +enum EndpointConfigStoreNames { GENERAL = 'general-endpoint-config', } diff --git a/src/test/test-utils.tsx b/src/test/test-utils.tsx index 3d0eaf6c22..554b92760f 100644 --- a/src/test/test-utils.tsx +++ b/src/test/test-utils.tsx @@ -13,9 +13,7 @@ import { mockDeep } from 'vitest-mock-extended'; import AppProviders from 'src/context'; import ThemeProvider from 'src/context/Theme'; -export const generateMockUserMetadata = ( - username: string -): User['user_metadata'] => { +const generateMockUserMetadata = (username: string): User['user_metadata'] => { return mockDeep({ avatar_url: `https://example.org/avatar/${username}`, email: `${username}@example.org`, @@ -31,7 +29,7 @@ export const generateMockUserMetadata = ( }); }; -export const generateMockUser = (username: string): User => { +const generateMockUser = (username: string): User => { return mockDeep({ email: `${username}@example.org`, user_metadata: generateMockUserMetadata(username), @@ -96,7 +94,7 @@ export const generateMockBinding = ( }); }; -export interface AllTheProvidersProps { +interface AllTheProvidersProps { children: ReactElement; } export const AllTheProviders = ({ children }: AllTheProvidersProps) => { diff --git a/src/types/controlPlane.ts b/src/types/controlPlane.ts index a49de6cc3c..dcb3e78055 100644 --- a/src/types/controlPlane.ts +++ b/src/types/controlPlane.ts @@ -43,7 +43,7 @@ export interface CaptureControllerStatus extends EntityControllerStatus { auto_discover?: AutoDiscoverStatus | null; } -export interface CollectionControllerStatus extends EntityControllerStatus { +interface CollectionControllerStatus extends EntityControllerStatus { inferred_schema?: InferredSchemaStatus | null; } @@ -60,7 +60,7 @@ interface DiscoverChange { target: string; } -export type Entity = 'capture' | 'materialization' | 'collection'; +type Entity = 'capture' | 'materialization' | 'collection'; export interface EntityControllerStatus extends PublicationControllerStatus { activation?: ActivationStatus; @@ -119,8 +119,7 @@ export interface JobStatus { type: string; } -export interface MaterializationControllerStatus - extends EntityControllerStatus { +interface MaterializationControllerStatus extends EntityControllerStatus { source_capture?: SourceCaptureStatus | null; } diff --git a/src/types/gql.ts b/src/types/gql.ts index 0626a32e28..84099535ae 100644 --- a/src/types/gql.ts +++ b/src/types/gql.ts @@ -1,7 +1,7 @@ import type { AlertType, AlertTypeInfo } from 'src/gql-types/graphql'; import type { ShardEntityTypes } from 'src/stores/ShardDetail/types'; -export interface AlertDetailsRecipients { +interface AlertDetailsRecipients { email: string; full_name?: string; } @@ -26,7 +26,7 @@ export interface AlertNodeEdge { node: AlertNode; } -export interface LiveSpecNode { +interface LiveSpecNode { activeAlerts?: AlertNode[]; alertHistory?: { edges: AlertNodeEdge[]; @@ -36,14 +36,14 @@ export interface LiveSpecNode { // PAGINATION -export interface PageInfo { +interface PageInfo { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string; endCursor: string; } -export type PageInfoReverse = Pick< +type PageInfoReverse = Pick< PageInfo, 'hasNextPage' | 'hasPreviousPage' | 'startCursor' | 'endCursor' >; @@ -72,7 +72,7 @@ export type WithPagination = T & PaginationVariables; // QUERY RESPONSES -export type DefaultAlertingQueryResponse = { +type DefaultAlertingQueryResponse = { alerts: { edges: { node: AlertNode; @@ -104,7 +104,7 @@ export interface AlertHistoryQueryResponse { }; } -export interface AuthRolesNode { +interface AuthRolesNode { prefix: string; userCapability: string; } diff --git a/src/types/index.ts b/src/types/index.ts index b125e16d52..05e3132a5f 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -79,7 +79,7 @@ export interface StorageMappingDictionary { [prefix: string]: StorageMapping; } -export interface StorageMappingStore { +interface StorageMappingStore { provider: string; bucket: string; prefix: string; @@ -95,7 +95,7 @@ export interface StorageMappingsQuery { } // TODO (marketplace) we may expand these in the future -export type TenantPaymentProviders = 'external' | 'stripe'; +type TenantPaymentProviders = 'external' | 'stripe'; export interface TenantPaymentDetails { gcm_account_id: string | null; @@ -187,7 +187,7 @@ export interface Grant_UserExt extends BaseGrant { user_id: string; } -export interface LiveSpecsExtBareMinimum { +interface LiveSpecsExtBareMinimum { catalog_name: string; id: string; spec_type: Entity; @@ -307,7 +307,7 @@ export interface OpsLogFlowDocument { fields?: Schema; } -export interface Meta { +interface Meta { uuid: string; } diff --git a/src/types/schemaModels.ts b/src/types/schemaModels.ts index f3c7fe5622..b6316e0863 100644 --- a/src/types/schemaModels.ts +++ b/src/types/schemaModels.ts @@ -48,7 +48,7 @@ export interface CollectionSchemaAnnotations extends Schema { redact?: RedactDef; } -export interface CollectionSchemaProperties { +interface CollectionSchemaProperties { [key: string]: CollectionSchemaAnnotations; } @@ -110,7 +110,7 @@ export interface Projections { [field: string]: string | ProjectionDef; } -export interface RedactDef { +interface RedactDef { strategy: RedactionStrategy_Schema; } diff --git a/src/types/wasm.ts b/src/types/wasm.ts index 965f1ff82e..d295190984 100644 --- a/src/types/wasm.ts +++ b/src/types/wasm.ts @@ -86,11 +86,11 @@ interface SelectOutputReason { } // Skim Projections (Will probably pull these into a "flow" type file eventually) -export interface BasicSchemaModel { +interface BasicSchemaModel { schema: any; } -export interface SplitSchemaModel { +interface SplitSchemaModel { writeSchema: any; readSchema: any; } diff --git a/src/utils/connector-utils.ts b/src/utils/connector-utils.ts index 47bccc17c4..867cc68e3b 100644 --- a/src/utils/connector-utils.ts +++ b/src/utils/connector-utils.ts @@ -10,7 +10,7 @@ import type { DekafConfig } from 'src/types'; import { FULL_IMAGE_NAME_RE } from 'src/validation'; -export const DEKAF_IMAGE_PREFIX = 'ghcr.io/estuary/dekaf-'; +const DEKAF_IMAGE_PREFIX = 'ghcr.io/estuary/dekaf-'; export const buildConnectorImagePath = ( imageName: string, diff --git a/src/utils/dataPlane-utils.ts b/src/utils/dataPlane-utils.ts index a86d25a621..c20bf565d7 100644 --- a/src/utils/dataPlane-utils.ts +++ b/src/utils/dataPlane-utils.ts @@ -35,7 +35,7 @@ export enum SHARD_LABELS { TASK_TYPE = 'estuary.dev/task-type', } -export enum ErrorFlags { +enum ErrorFlags { // DEBUGGING = 'parsing jwt:', // useful for testing just add it to the onError OPERATION_INVALID = 'Unauthorized', TOKEN_EXPIRED = 'token is expired', @@ -70,7 +70,7 @@ export const shouldRefreshToken = (errorMessage?: string | null) => { // what would balance wiggle room needed and not making the page unusable const TIMEOUT_MS = 3000; const LIST_TIMEOUT_ERROR_MESSAGE = 'Request timed out'; -export async function dataPlaneFetcher_list( +async function dataPlaneFetcher_list( shardClient: ShardClient, selector: ShardSelector, key: 'ShardsList' diff --git a/src/utils/entity-utils.ts b/src/utils/entity-utils.ts index 67040cdcd3..52c6312273 100644 --- a/src/utils/entity-utils.ts +++ b/src/utils/entity-utils.ts @@ -13,7 +13,7 @@ import { // in the event additional resources are not available initially. export const MAX_FIELD_SELECTION_VALIDATION_ATTEMPTS = 1; -export const updateShardDisabled = (draftSpec: any, enabling: boolean) => { +const updateShardDisabled = (draftSpec: any, enabling: boolean) => { draftSpec.shards ??= {}; draftSpec.shards.disable = !enabling; }; @@ -56,7 +56,7 @@ export const getSourceCapturePropKey = (draftSpec: any) => { return 'source'; }; -export const getSourceCapture = ( +const getSourceCapture = ( sourceCapture: SourceCaptureDef | string | null | undefined ): SourceCaptureDef | null => { if (!sourceCapture) { diff --git a/src/utils/entityStatus-utils.ts b/src/utils/entityStatus-utils.ts index d5f6bacd3e..64f63651ed 100644 --- a/src/utils/entityStatus-utils.ts +++ b/src/utils/entityStatus-utils.ts @@ -27,7 +27,7 @@ type MuiColorId = | 'warning'; // The hex string additions correspond to sample_grey[500] | sample_grey[300]. -export type StatusColorHex = SemanticColor | '#C4D3E9' | '#E1E9F4'; +type StatusColorHex = SemanticColor | '#C4D3E9' | '#E1E9F4'; export interface StatusColor { hex: StatusColorHex; diff --git a/src/utils/workflow-utils.ts b/src/utils/workflow-utils.ts index 859d2c5f2e..99d1d1a214 100644 --- a/src/utils/workflow-utils.ts +++ b/src/utils/workflow-utils.ts @@ -54,7 +54,7 @@ export const getCollectionNameProp = (entityType: Entity) => { return entityType === 'materialization' ? 'source' : 'target'; }; -export const getCollectionNameDirectly = (binding: any) => { +const getCollectionNameDirectly = (binding: any) => { // Check if we're dealing with a FullSource or just a string return Object.hasOwn(binding ?? {}, 'name') ? binding.name : binding; }; @@ -67,7 +67,7 @@ export const getCollectionName = (binding: any) => { return getCollectionNameDirectly(scopedBinding); }; -export const isValidIndex = (index: number) => index > -1; +const isValidIndex = (index: number) => index > -1; export const getBindingIndex = ( existingBindings: any[], diff --git a/src/validation/index.ts b/src/validation/index.ts index d5beecb14c..b2ce1ff46a 100644 --- a/src/validation/index.ts +++ b/src/validation/index.ts @@ -3,7 +3,7 @@ import type { PrefixedName_Errors } from 'src/components/inputs/PrefixedName/typ // Based on pattern taken from // https://github.com/estuary/animated-carnival/blob/main/supabase/migrations/03_catalog-types.sql export const PREFIX_NAME_PATTERN = `[a-zA-Z0-9-_.]+`; -export const CATALOG_NAME_PATTERN = `^(${PREFIX_NAME_PATTERN}/)+${PREFIX_NAME_PATTERN}$`; +const CATALOG_NAME_PATTERN = `^(${PREFIX_NAME_PATTERN}/)+${PREFIX_NAME_PATTERN}$`; export const NAME_RE = new RegExp(CATALOG_NAME_PATTERN); export const NUMERIC_RE = RegExp(`^[0-9]+$`); @@ -14,7 +14,7 @@ export const CAPTURE_INTERVAL_RE = new RegExp( export const ISO_8601_DURATION_RE = new RegExp( /^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/ ); -export const ISO_8601_DURATION_RE_STRING = ISO_8601_DURATION_RE.toString(); +const ISO_8601_DURATION_RE_STRING = ISO_8601_DURATION_RE.toString(); // Need the pattern with the slashes removed for JSON Forms. Passing a pattern string in was not working as // the escaped characters kept getting removed export const ISO_8601_DURATION_PATTERN = ISO_8601_DURATION_RE_STRING.substring(