diff --git a/packages/bruno-api-docs/src/assets/icons/ExampleIcon.spec.tsx b/packages/bruno-api-docs/src/assets/icons/ExampleIcon.spec.tsx index 9989b40e..b2603194 100644 --- a/packages/bruno-api-docs/src/assets/icons/ExampleIcon.spec.tsx +++ b/packages/bruno-api-docs/src/assets/icons/ExampleIcon.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import { ExampleIcon } from './ExampleIcon'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; describe('ExampleIcon', () => { it('renders a decorative svg glyph', () => { diff --git a/packages/bruno-api-docs/src/components/AppShell/AppShell.tsx b/packages/bruno-api-docs/src/components/AppShell/AppShell.tsx index fa8e6824..b0db7094 100644 --- a/packages/bruno-api-docs/src/components/AppShell/AppShell.tsx +++ b/packages/bruno-api-docs/src/components/AppShell/AppShell.tsx @@ -6,18 +6,18 @@ import ShowVarsToggle from '../ShowVarsToggle/ShowVarsToggle'; import ThemeToggle from '../ThemeToggle/ThemeToggle'; import Sidebar from '../Docs/Sidebar/Sidebar'; import SidebarDrawer from '../SidebarDrawer/SidebarDrawer'; -import IconButton from '../../ui/IconButton/IconButton'; -import { ChevronLeftIcon, ChevronRightIcon } from '../../assets/icons'; +import IconButton from '@/ui/IconButton/IconButton'; +import { ChevronLeftIcon, ChevronRightIcon } from '@/assets/icons'; import PageRouter from '../PageRouter/PageRouter'; import Playground from '../Playground/Playground'; import SearchBar from '../Search/SearchBar/SearchBar'; -import { useSearchHotkey, usePlaygroundUrlState, useElementWidth, useResizableSidebar } from '../../hooks'; -import { useAppSelector } from '../../store/hooks'; -import { selectDocsCollection } from '../../store/slices/docs'; -import { selectGitCollectionUrl } from '../../store/slices/app'; -import { useActiveResolution } from '../../routing/hooks'; -import { layoutModeForWidth } from '../../hooks/useTopbarLayout'; -import { buildFetchInBrunoUrl } from '../../utils/buildFetchInBrunoUrl'; +import { useSearchHotkey, usePlaygroundUrlState, useElementWidth, useResizableSidebar } from '@/hooks'; +import { useAppSelector } from '@/store/hooks'; +import { selectDocsCollection } from '@/store/slices/docs'; +import { selectGitCollectionUrl } from '@/store/slices/app'; +import { useActiveResolution } from '@/routing/hooks'; +import { layoutModeForWidth } from '@/hooks/useTopbarLayout'; +import { buildFetchInBrunoUrl } from '@/utils/buildFetchInBrunoUrl'; import { StyledWrapper } from './StyledWrapper'; interface AppShellProps { diff --git a/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.spec.tsx b/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.spec.tsx index 04e605dc..1cd7f0a6 100644 --- a/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.spec.tsx +++ b/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.spec.tsx @@ -3,8 +3,8 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; import { AuthDetails } from './AuthDetails'; -import { AUTH_MODE_LABELS } from '../../constants'; -import { SECRET_MASK } from '../../constants'; +import { AUTH_MODE_LABELS } from '@/constants'; +import { SECRET_MASK } from '@/constants'; const renderAuth = (ui: React.ReactElement) => { const html = renderToStaticMarkup(ui); diff --git a/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.tsx b/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.tsx index f62d1477..f8355e71 100644 --- a/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.tsx +++ b/packages/bruno-api-docs/src/components/AuthDetails/AuthDetails.tsx @@ -9,7 +9,7 @@ import type { OAuth2AdditionalParameter } from '@opencollection/types/common/auth'; import { PropertyTable, type PropertyRow } from '../PropertyTable/PropertyTable'; -import { ADDITIONAL_PARAM_GROUPS, AUTH_TYPES } from '../../constants'; +import { ADDITIONAL_PARAM_GROUPS, AUTH_TYPES } from '@/constants'; interface AuthDetailsProps { auth?: Auth; diff --git a/packages/bruno-api-docs/src/components/Code/Code.tsx b/packages/bruno-api-docs/src/components/Code/Code.tsx index b0a5f4fc..a983aef1 100644 --- a/packages/bruno-api-docs/src/components/Code/Code.tsx +++ b/packages/bruno-api-docs/src/components/Code/Code.tsx @@ -1,10 +1,10 @@ import React, { Suspense, lazy, useEffect, useMemo, useRef } from 'react'; -import { CopyButton } from '../../ui/CopyButton/CopyButton'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; import { StyledWrapper } from './CodeViewer/StyledWrapper'; import { HighlightedCode } from './HighlightedCode'; -import Prism from '../../utils/prism'; +import Prism from '@/utils/prism'; -const LazyCodeEditor = lazy(() => import('../../ui/CodeEditor/CodeEditor')); +const LazyCodeEditor = lazy(() => import('@/ui/CodeEditor/CodeEditor')); interface CodeProps { code?: string; diff --git a/packages/bruno-api-docs/src/components/Code/CodeViewer/CodeViewer.tsx b/packages/bruno-api-docs/src/components/Code/CodeViewer/CodeViewer.tsx index 416f1140..0815be3e 100644 --- a/packages/bruno-api-docs/src/components/Code/CodeViewer/CodeViewer.tsx +++ b/packages/bruno-api-docs/src/components/Code/CodeViewer/CodeViewer.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useMemo, useRef } from 'react'; -import { CopyButton } from '../../../ui/CopyButton/CopyButton'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; import { StyledWrapper } from './StyledWrapper'; -import Prism from '../../../utils/prism'; +import Prism from '@/utils/prism'; export interface CodeViewerProps { code?: string; diff --git a/packages/bruno-api-docs/src/components/Code/HighlightedCode.spec.tsx b/packages/bruno-api-docs/src/components/Code/HighlightedCode.spec.tsx index c6a57923..7c5a7816 100644 --- a/packages/bruno-api-docs/src/components/Code/HighlightedCode.spec.tsx +++ b/packages/bruno-api-docs/src/components/Code/HighlightedCode.spec.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; import { HighlightedCode } from './HighlightedCode'; const vars = (root: ReturnType) => root.querySelectorAll('.var'); diff --git a/packages/bruno-api-docs/src/components/Code/HighlightedCode.tsx b/packages/bruno-api-docs/src/components/Code/HighlightedCode.tsx index fcf2480e..f4a7bdbd 100644 --- a/packages/bruno-api-docs/src/components/Code/HighlightedCode.tsx +++ b/packages/bruno-api-docs/src/components/Code/HighlightedCode.tsx @@ -5,8 +5,8 @@ import 'prismjs/components/prism-bash'; import 'prismjs/components/prism-python'; import 'prismjs/components/prism-json'; import 'prismjs/components/prism-xml-doc'; -import { isTemplateVariable, templateVariableSplitRegex } from '../../utils/common'; -import { TEMPLATE_VARIABLE_SOURCE_PATTERN } from '../../constants'; +import { isTemplateVariable, templateVariableSplitRegex } from '@/utils/common'; +import { TEMPLATE_VARIABLE_SOURCE_PATTERN } from '@/constants'; import { VariableToken } from '../VariableText/VariableToken/VariableToken'; type PrismNode = string | Prism.Token; diff --git a/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.spec.tsx b/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.spec.tsx index 325d365b..e8650782 100644 --- a/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.spec.tsx +++ b/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { getByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { getByTestId } from '@/test-utils/dom'; import { ContentTypeBadge } from './ContentTypeBadge'; describe('ContentTypeBadge', () => { diff --git a/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.tsx b/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.tsx index 8382b20c..de4e1f41 100644 --- a/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.tsx +++ b/packages/bruno-api-docs/src/components/ContentTypeBadge/ContentTypeBadge.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { cx } from '../../utils/cx'; +import { cx } from '@/utils/cx'; import { StyledWrapper } from './StyledWrapper'; interface ContentTypeBadgeProps { diff --git a/packages/bruno-api-docs/src/components/Description/Description.spec.tsx b/packages/bruno-api-docs/src/components/Description/Description.spec.tsx index 9128fc07..f63a1fc5 100644 --- a/packages/bruno-api-docs/src/components/Description/Description.spec.tsx +++ b/packages/bruno-api-docs/src/components/Description/Description.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import { Description } from './Description'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; describe('Description', () => { it('renders a truncatable, tooltip-anchored line with the text', () => { diff --git a/packages/bruno-api-docs/src/components/DisabledBadge/DisabledBadge.spec.tsx b/packages/bruno-api-docs/src/components/DisabledBadge/DisabledBadge.spec.tsx index d7975a91..9c431d7b 100644 --- a/packages/bruno-api-docs/src/components/DisabledBadge/DisabledBadge.spec.tsx +++ b/packages/bruno-api-docs/src/components/DisabledBadge/DisabledBadge.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import { DisabledBadge } from './DisabledBadge'; describe('DisabledBadge', () => { diff --git a/packages/bruno-api-docs/src/components/Docs/Method/Method.tsx b/packages/bruno-api-docs/src/components/Docs/Method/Method.tsx index dde52337..00d76b94 100644 --- a/packages/bruno-api-docs/src/components/Docs/Method/Method.tsx +++ b/packages/bruno-api-docs/src/components/Docs/Method/Method.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { getShortMethod } from '../../../utils/request'; +import { getShortMethod } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface MethodProps { diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.spec.tsx b/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.spec.tsx index cb393cbc..d5c79e60 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.spec.tsx +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.spec.tsx @@ -3,10 +3,10 @@ import { describe, it, expect } from 'vitest'; import { Provider } from 'react-redux'; import { MemoryRouter } from 'react-router-dom'; import Sidebar from './Sidebar'; -import { createOpenCollectionStore } from '../../../store/store'; -import { setDocsCollection } from '../../../store/slices/docs'; -import { useRenderToDom } from '../../../hooks/useRenderToDom'; -import { query } from '../../../test-utils/dom'; +import { createOpenCollectionStore } from '@/store/store'; +import { setDocsCollection } from '@/store/slices/docs'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; const collection = { info: { name: 'C' }, diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.tsx b/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.tsx index 926732d0..ccf09c94 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.tsx +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/Sidebar.tsx @@ -2,16 +2,16 @@ import React, { useEffect, useMemo, useRef } from 'react'; import { useLocation } from 'react-router-dom'; import SidebarNavLink from './SidebarNavLink/SidebarNavLink'; import SidebarTree from './SidebarTree/SidebarTree'; -import { CubeIcon, GlobeIcon } from '../../../assets/icons'; +import { CubeIcon, GlobeIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; import { computeAutoReveal } from './autoReveal'; -import { useAppDispatch, useAppSelector } from '../../../store/hooks'; -import { toggleItem, expandFolders, selectDocsCollection } from '../../../store/slices/docs'; -import { getItemUuid } from '../../../utils/itemUtils'; -import { useNavModel } from '../../../routing/hooks'; -import { normalizeSlug, resolveSlug } from '../../../routing/resolve'; -import { OVERVIEW_SLUG, ENVIRONMENTS_SLUG } from '../../../routing/navModel'; -import { useDocsNavigate, useAutoHideScrollbar, useIsMobileDevice } from '../../../hooks'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; +import { toggleItem, expandFolders, selectDocsCollection } from '@/store/slices/docs'; +import { getItemUuid } from '@/utils/itemUtils'; +import { useNavModel } from '@/routing/hooks'; +import { normalizeSlug, resolveSlug } from '@/routing/resolve'; +import { OVERVIEW_SLUG, ENVIRONMENTS_SLUG } from '@/routing/navModel'; +import { useDocsNavigate, useAutoHideScrollbar, useIsMobileDevice } from '@/hooks'; import { useActiveExample } from './hooks/useActiveExample'; interface SidebarProps { diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarNavLink/SidebarNavLink.tsx b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarNavLink/SidebarNavLink.tsx index 0ced0656..35c35098 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarNavLink/SidebarNavLink.tsx +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarNavLink/SidebarNavLink.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { getMethodColorVar } from '../../../../theme/methodColors'; -import { getShortMethod } from '../../../../utils/request'; +import { getMethodColorVar } from '@/theme/methodColors'; +import { getShortMethod } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface SidebarNavLinkProps { diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/ChevronButton/ChevronButton.tsx b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/ChevronButton/ChevronButton.tsx index 87bd7253..e531a4c1 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/ChevronButton/ChevronButton.tsx +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/ChevronButton/ChevronButton.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ChevronRightIcon } from '../../../../../assets/icons'; +import { ChevronRightIcon } from '@/assets/icons'; interface ChevronButtonProps { expanded: boolean; diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.spec.tsx b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.spec.tsx index 1247f64c..ef5a527e 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.spec.tsx +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.spec.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect, vi } from 'vitest'; import type { Item as OpenCollectionItem } from '@opencollection/types/collection/item'; import SidebarTree from './SidebarTree'; -import { useRenderToDom } from '../../../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; const req = (uuid: string, name: string, method: string): OpenCollectionItem => ({ type: 'http', uuid, name, method }) as unknown as OpenCollectionItem; diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.tsx b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.tsx index b2791f1d..ca16e396 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.tsx +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/SidebarTree/SidebarTree.tsx @@ -2,11 +2,11 @@ import React, { useState } from 'react'; import type { Item as OpenCollectionItem, Folder } from '@opencollection/types/collection/item'; import type { HttpRequest, HttpRequestExample } from '@opencollection/types/requests/http'; import SidebarNavLink from '../SidebarNavLink/SidebarNavLink'; -import { ExampleIcon } from '../../../../assets/icons'; +import { ExampleIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; -import { getItemName, isFolder, isScriptFile, getRequestBadgeLabel } from '../../../../utils/schemaHelpers'; -import { getItemUuid } from '../../../../utils/itemUtils'; -import { orderSiblings } from '../../../../routing/navModel'; +import { getItemName, isFolder, isScriptFile, getRequestBadgeLabel } from '@/utils/schemaHelpers'; +import { getItemUuid } from '@/utils/itemUtils'; +import { orderSiblings } from '@/routing/navModel'; import { ChevronButton } from './ChevronButton/ChevronButton'; // The example a user jumped to from the sidebar: which request, and which of its diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.spec.ts b/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.spec.ts index 178c9819..75fcfbdf 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.spec.ts +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; import { computeAutoReveal } from './autoReveal'; -import type { NavModel, NavEntry } from '../../../routing/types'; +import type { NavModel, NavEntry } from '@/routing/types'; import type { Item as OpenCollectionItem } from '@opencollection/types/collection/item'; const item = (uuid: string): OpenCollectionItem => ({ uuid } as unknown as OpenCollectionItem); diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.ts b/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.ts index 91974aa4..cd94f43f 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.ts +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/autoReveal.ts @@ -1,5 +1,5 @@ -import type { NavModel } from '../../../routing/types'; -import { getItemUuid } from '../../../utils/itemUtils'; +import type { NavModel } from '@/routing/types'; +import { getItemUuid } from '@/utils/itemUtils'; export interface AutoRevealResult { /** True once the slug can be resolved, telling the caller to remember it as diff --git a/packages/bruno-api-docs/src/components/Docs/Sidebar/hooks/useActiveExample.ts b/packages/bruno-api-docs/src/components/Docs/Sidebar/hooks/useActiveExample.ts index 903fafb4..99e16fc6 100644 --- a/packages/bruno-api-docs/src/components/Docs/Sidebar/hooks/useActiveExample.ts +++ b/packages/bruno-api-docs/src/components/Docs/Sidebar/hooks/useActiveExample.ts @@ -1,8 +1,8 @@ -import { getItemUuid } from '../../../../utils/itemUtils'; -import { useDocsNavigate } from '../../../../hooks'; -import { useActiveResolution } from '../../../../routing/hooks'; -import { exampleSlugForIndex } from '../../../../routing/slug'; -import type { NavModel } from '../../../../routing'; +import { getItemUuid } from '@/utils/itemUtils'; +import { useDocsNavigate } from '@/hooks'; +import { useActiveResolution } from '@/routing/hooks'; +import { exampleSlugForIndex } from '@/routing/slug'; +import type { NavModel } from '@/routing'; import type { HttpRequest } from '@opencollection/types/requests/http'; export function useActiveExample(model: NavModel, uuidToSlug: Map, onNavigate?: () => void) { diff --git a/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.spec.tsx b/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.spec.tsx index 5b12bd78..4a07b627 100644 --- a/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.spec.tsx +++ b/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.spec.tsx @@ -5,10 +5,10 @@ import { Provider } from 'react-redux'; import { describe, it, expect } from 'vitest'; import type { OpenCollection } from '@opencollection/types'; import type { Environment } from '@opencollection/types/config/environments'; -import { createOpenCollectionStore } from '../../store/store'; -import { setDocsCollection } from '../../store/slices/docs'; -import { setActiveEnv } from '../../store/slices/env'; -import { getByTestId } from '../../test-utils/dom'; +import { createOpenCollectionStore } from '@/store/store'; +import { setDocsCollection } from '@/store/slices/docs'; +import { setActiveEnv } from '@/store/slices/env'; +import { getByTestId } from '@/test-utils/dom'; import EnvSwitcher from './EnvSwitcher'; const collectionWith = (environments: Environment[]): OpenCollection => ({ config: { environments } }); diff --git a/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.tsx b/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.tsx index 49200c48..b783fe0d 100644 --- a/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.tsx +++ b/packages/bruno-api-docs/src/components/EnvSwitcher/EnvSwitcher.tsx @@ -1,11 +1,11 @@ import React, { useEffect, useMemo } from 'react'; import type { Environment } from '@opencollection/types/config/environments'; -import { useAppDispatch, useAppSelector } from '../../store/hooks'; -import { selectDocsCollection } from '../../store/slices/docs'; -import { selectActiveEnvName, setActiveEnv } from '../../store/slices/env'; -import { ChevronDownIcon } from '../../assets/icons'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; +import { selectDocsCollection } from '@/store/slices/docs'; +import { selectActiveEnvName, setActiveEnv } from '@/store/slices/env'; +import { ChevronDownIcon } from '@/assets/icons'; import { EnvironmentLabel } from '../EnvironmentLabel/EnvironmentLabel'; -import MenuDropdown, { type MenuDropdownItem } from '../../ui/MenuDropdown'; +import MenuDropdown, { type MenuDropdownItem } from '@/ui/MenuDropdown'; import { StyledWrapper } from './StyledWrapper'; export interface EnvSwitcherProps { diff --git a/packages/bruno-api-docs/src/components/EnvironmentLabel/EnvironmentLabel.spec.tsx b/packages/bruno-api-docs/src/components/EnvironmentLabel/EnvironmentLabel.spec.tsx index 8cd551c7..b8eb6f65 100644 --- a/packages/bruno-api-docs/src/components/EnvironmentLabel/EnvironmentLabel.spec.tsx +++ b/packages/bruno-api-docs/src/components/EnvironmentLabel/EnvironmentLabel.spec.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; import { EnvironmentLabel } from './EnvironmentLabel'; describe('EnvironmentLabel', () => { diff --git a/packages/bruno-api-docs/src/components/ErrorBoundary/ErrorBoundary.spec.tsx b/packages/bruno-api-docs/src/components/ErrorBoundary/ErrorBoundary.spec.tsx index eb45901f..cdc23bff 100644 --- a/packages/bruno-api-docs/src/components/ErrorBoundary/ErrorBoundary.spec.tsx +++ b/packages/bruno-api-docs/src/components/ErrorBoundary/ErrorBoundary.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import { ErrorBoundary } from './ErrorBoundary'; describe('ErrorBoundary', () => { diff --git a/packages/bruno-api-docs/src/components/Examples/ExampleCard/ExampleCard.tsx b/packages/bruno-api-docs/src/components/Examples/ExampleCard/ExampleCard.tsx index aa0e62f1..25c6c8ff 100644 --- a/packages/bruno-api-docs/src/components/Examples/ExampleCard/ExampleCard.tsx +++ b/packages/bruno-api-docs/src/components/Examples/ExampleCard/ExampleCard.tsx @@ -2,7 +2,7 @@ import React, { Fragment, useEffect, useId, useMemo, useRef, useState } from 're import type { HttpRequestExample } from '@opencollection/types/requests/http'; import { MethodBadge } from '../../MethodBadge/MethodBadge'; import { ChevronArrow } from '../../ChevronArrow/ChevronArrow'; -import { CopyButton } from '../../../ui/CopyButton/CopyButton'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; import { PropertyTable } from '../../PropertyTable/PropertyTable'; import { TruncatedText } from '../../TruncatedText/TruncatedText'; import { VariableText } from '../../VariableText/VariableText'; @@ -10,10 +10,10 @@ import { Description } from '../../Description/Description'; import { RequestParams } from '../../Request/RequestParams/RequestParams'; import { RequestBody } from '../../Request/RequestBody/RequestBody'; import { Code } from '../../Code/Code'; -import { resolvePathAndQueryParams } from '../../../utils/pathParams'; -import { getBodyView, getDescription, headerRows } from '../../../utils/request'; -import { computeBodySize, formatBytes, responseBodyLanguage, responseBodyContentType, statusCodePhrase } from '../../../utils/exampleResponse'; -import { statusToneColor } from '../../../utils/common'; +import { resolvePathAndQueryParams } from '@/utils/pathParams'; +import { getBodyView, getDescription, headerRows } from '@/utils/request'; +import { computeBodySize, formatBytes, responseBodyLanguage, responseBodyContentType, statusCodePhrase } from '@/utils/exampleResponse'; +import { statusToneColor } from '@/utils/common'; import { StyledWrapper } from './StyledWrapper'; import type { Auth } from '@opencollection/types/common/auth'; import { CodeSnippetTabs } from '../../CodeSnippetTabs/CodeSnippetTabs'; diff --git a/packages/bruno-api-docs/src/components/Examples/Examples.spec.tsx b/packages/bruno-api-docs/src/components/Examples/Examples.spec.tsx index 896cc9a9..6f7dc3dc 100644 --- a/packages/bruno-api-docs/src/components/Examples/Examples.spec.tsx +++ b/packages/bruno-api-docs/src/components/Examples/Examples.spec.tsx @@ -3,8 +3,8 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import { Examples } from './Examples'; import type { HttpRequestExample } from '@opencollection/types/requests/http'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; const examples: HttpRequestExample[] = [ { name: 'Happy path', response: { status: 200, body: { type: 'json', data: '{}' } } }, diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.spec.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.spec.tsx index 15287aa5..c50a3dbe 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.spec.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import { AssertList } from './AssertList'; -import { useRenderToDom } from '../../../hooks/useRenderToDom'; -import type { AssertionRow } from '../../../utils/assertions'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import type { AssertionRow } from '@/utils/assertions'; const binary: AssertionRow = { level: 'request', expression: 'res.status', operatorLabel: 'equals', value: '200', isUnary: false, description: 'Status must be OK' }; const unary: AssertionRow = { level: 'collection', expression: 'res.body.token', operatorLabel: 'is defined', isUnary: true }; diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.tsx index fd35ddc2..697e750b 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/AssertList/AssertList.tsx @@ -4,7 +4,7 @@ import { DisabledBadge } from '../../DisabledBadge/DisabledBadge'; import { VariableText } from '../../VariableText/VariableText'; import { TruncatedText } from '../../TruncatedText/TruncatedText'; import { Description } from '../../Description/Description'; -import type { AssertionRow } from '../../../utils/assertions'; +import type { AssertionRow } from '@/utils/assertions'; import { StyledWrapper } from './StyledWrapper'; interface AssertListProps { diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.spec.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.spec.tsx index 8a3f2059..f39abdd5 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.spec.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.spec.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import { ExecutionContext } from './ExecutionContext'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; -import type { ScriptChainStep } from '../../utils/request'; -import type { AssertionRow } from '../../utils/assertions'; -import type { TestRow, RawTestScript } from '../../utils/fileUtils'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; +import type { ScriptChainStep } from '@/utils/request'; +import type { AssertionRow } from '@/utils/assertions'; +import type { TestRow, RawTestScript } from '@/utils/fileUtils'; const scriptChain: ScriptChainStep[] = [ { level: 'collection', phase: 'before-request', label: 'Collection Pre-Request', sourceName: 'API', code: 'bru.setVar("x", 1)', order: 0 }, diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.tsx index 92cfbdf4..e1430cdc 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ExecutionContext.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Tabs, type Tab } from '../../ui/Tabs/Tabs'; +import { Tabs, type Tab } from '@/ui/Tabs/Tabs'; import { ScriptChain } from './ScriptChain/ScriptChain'; import { VariablesPanel } from './VariablesPanel/VariablesPanel'; import { AssertList } from './AssertList/AssertList'; @@ -15,9 +15,9 @@ import { type PostResponseVarRow, type InheritedPreRequestVarRow, type InheritedPostResponseVarRow -} from '../../utils/request'; -import type { AssertionRow } from '../../utils/assertions'; -import type { TestRow, RawTestScript } from '../../utils/fileUtils'; +} from '@/utils/request'; +import type { AssertionRow } from '@/utils/assertions'; +import type { TestRow, RawTestScript } from '@/utils/fileUtils'; interface ExecutionContextProps { scriptChain: ScriptChainStep[]; diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.spec.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.spec.tsx index 497e3ad8..fa167147 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.spec.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import { ScriptChain } from './ScriptChain'; -import type { ScriptChainStep } from '../../../utils/request'; +import type { ScriptChainStep } from '@/utils/request'; const postChain: ScriptChainStep[] = [ { level: 'collection', phase: 'after-response', label: 'Collection Post-Response', code: 'a', order: 0 }, diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.tsx index fd48536e..0eaebf67 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptChain/ScriptChain.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { VariableText } from '../../VariableText/VariableText'; import { ScriptStep } from '../ScriptStep/ScriptStep'; -import type { ScriptChainStep, ScriptFlow } from '../../../utils/request'; +import type { ScriptChainStep, ScriptFlow } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface ScriptChainProps { diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.spec.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.spec.tsx index ce6ea088..fdb13f6b 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.spec.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import { ScriptStep } from './ScriptStep'; -import type { ScriptChainStep } from '../../../utils/request'; +import type { ScriptChainStep } from '@/utils/request'; const step: ScriptChainStep = { level: 'request', diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.tsx index 21ddb9ba..32dc5f1a 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ScriptStep/ScriptStep.tsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { Code } from '../../Code/Code'; import { ChevronArrow } from '../../ChevronArrow/ChevronArrow'; -import { Collapse } from '../../../ui/Collapse/Collapse'; +import { Collapse } from '@/ui/Collapse/Collapse'; import { TruncatedText } from '../../TruncatedText/TruncatedText'; -import type { ScriptChainStep } from '../../../utils/request'; +import type { ScriptChainStep } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface ScriptStepProps { diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.spec.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.spec.tsx index d184d669..ba1abf3e 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.spec.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import { TestList } from './TestList'; -import type { TestRow } from '../../../utils/fileUtils'; +import type { TestRow } from '@/utils/fileUtils'; const tests: TestRow[] = [ { level: 'collection', name: 'is authenticated', sourceName: 'API', code: 'test(\'is authenticated\', () => { expect(ok).to.equal(true); })' }, diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.tsx index c214f449..488e0336 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/TestList/TestList.tsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { ScopeTag } from '../ScopeTag/ScopeTag'; import { Code } from '../../Code/Code'; -import { Collapse } from '../../../ui/Collapse/Collapse'; +import { Collapse } from '@/ui/Collapse/Collapse'; import { TruncatedText } from '../../TruncatedText/TruncatedText'; -import type { TestRow } from '../../../utils/fileUtils'; +import type { TestRow } from '@/utils/fileUtils'; import { StyledWrapper } from './StyledWrapper'; interface TestListProps { diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/VariablesPanel/VariablesPanel.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/VariablesPanel/VariablesPanel.tsx index 5bf98c06..c7f9cf94 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/VariablesPanel/VariablesPanel.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/VariablesPanel/VariablesPanel.tsx @@ -7,7 +7,7 @@ import type { PostResponseVarRow, InheritedPreRequestVarRow, InheritedPostResponseVarRow -} from '../../../utils/request'; +} from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface VariablesPanelProps { diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.spec.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.spec.tsx index 2a01ca15..3458c021 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.spec.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import { ViewAllTests } from './ViewAllTests'; -import type { RawTestScript } from '../../../utils/fileUtils'; +import type { RawTestScript } from '@/utils/fileUtils'; const withCode: RawTestScript[] = [{ level: 'request', code: 'const x = 1;\ntest(\'t1\', () => { runIt(); })' }]; const noCode: RawTestScript[] = [{ level: 'request', code: ' ' }]; diff --git a/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.tsx b/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.tsx index c9b0355d..6651866b 100644 --- a/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.tsx +++ b/packages/bruno-api-docs/src/components/ExecutionContext/ViewAllTests/ViewAllTests.tsx @@ -1,8 +1,8 @@ import React, { Fragment, useMemo, useState } from 'react'; import { Code } from '../../Code/Code'; -import { Modal } from '../../../ui/Modal/Modal'; +import { Modal } from '@/ui/Modal/Modal'; import { SectionLabel } from '../../SectionLabel/SectionLabel'; -import type { RawTestScript } from '../../../utils/fileUtils'; +import type { RawTestScript } from '@/utils/fileUtils'; import { StyledWrapper } from './StyledWrapper'; interface ViewAllTestsProps { diff --git a/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.spec.tsx b/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.spec.tsx index 2cbce8b8..1f8c28aa 100644 --- a/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.spec.tsx +++ b/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query, getByTestId, queryByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query, getByTestId, queryByTestId } from '@/test-utils/dom'; import { FolderConfiguration } from './FolderConfiguration'; -import type { FolderConfig } from '../../utils/folder'; +import type { FolderConfig } from '@/utils/folder'; const baseConfig: FolderConfig = { headers: [], diff --git a/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.tsx b/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.tsx index 04759607..b5ddbf8e 100644 --- a/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.tsx +++ b/packages/bruno-api-docs/src/components/FolderConfiguration/FolderConfiguration.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import type { FolderConfig } from '../../utils/folder'; -import { headerRows, inheritedCountLabel } from '../../utils/request'; +import type { FolderConfig } from '@/utils/folder'; +import { headerRows, inheritedCountLabel } from '@/utils/request'; import { Code } from '../Code/Code'; import { SectionLabel } from '../SectionLabel/SectionLabel'; import { PropertyTable, type PropertyRow } from '../PropertyTable/PropertyTable'; diff --git a/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.spec.tsx b/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.spec.tsx index cc366537..863e6a08 100644 --- a/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.spec.tsx +++ b/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import HighlightedInput from './HighlightedInput'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.tsx b/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.tsx index a2979d86..989ca1d0 100644 --- a/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.tsx +++ b/packages/bruno-api-docs/src/components/HighlightedInput/HighlightedInput.tsx @@ -1,17 +1,17 @@ import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'; -import { Portal } from '../../ui/Portal/Portal'; +import { Portal } from '@/ui/Portal/Portal'; import { VariableInfoCard } from '../VariableInfoCard/VariableInfoCard'; -import { isTemplateVariable, templateVariableSplitRegex } from '../../utils/common'; -import { classifyVariableToken } from '../../utils/variableHighlight'; +import { isTemplateVariable, templateVariableSplitRegex } from '@/utils/common'; +import { classifyVariableToken } from '@/utils/variableHighlight'; import { buildAnywordSuggestions, buildVariableSuggestions, getVariableContext, getWordContext, type AutocompleteContext -} from '../../utils/variableAutocomplete'; -import { HOVER_CLOSE_MS, HOVER_OPEN_MS } from '../../constants/ui'; -import { computeAnchoredPosition, type AnchoredPosition } from '../../utils/anchoredPosition'; +} from '@/utils/variableAutocomplete'; +import { HOVER_CLOSE_MS, HOVER_OPEN_MS } from '@/constants/ui'; +import { computeAnchoredPosition, type AnchoredPosition } from '@/utils/anchoredPosition'; import { StyledWrapper, HoverCard, Suggestions } from './StyledWrapper'; interface HighlightedInputProps { diff --git a/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.spec.tsx b/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.spec.tsx index 27fece13..87c8aef8 100644 --- a/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.spec.tsx +++ b/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.spec.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect, vi, beforeEach } from 'vitest'; -import type { MenuDropdownItem } from '../../ui/MenuDropdown'; +import type { MenuDropdownItem } from '@/ui/MenuDropdown'; // The real MenuDropdown (Tippy) only renders its rows while open, so the options // never reach the DOM in an SSR render, so intercepting the props is the only way // to observe which methods are offered and which one is marked selected. const capturedProps: { items: MenuDropdownItem[]; selectedItemId?: string | number | null }[] = []; -vi.mock('../../ui/MenuDropdown', () => ({ +vi.mock('@/ui/MenuDropdown', () => ({ default: ({ items, selectedItemId, diff --git a/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.tsx b/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.tsx index 7fcc0ce9..0ba48ec3 100644 --- a/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.tsx +++ b/packages/bruno-api-docs/src/components/HttpMethodSelector/HttpMethodSelector.tsx @@ -1,8 +1,8 @@ import React, { useCallback, useMemo, useRef, useState } from 'react'; -import MenuDropdown from '../../ui/MenuDropdown'; -import type { MenuDropdownItem } from '../../ui/MenuDropdown'; -import { STANDARD_HTTP_METHODS } from '../../constants/request'; -import { getMethodColorVar } from '../../theme/methodColors'; +import MenuDropdown from '@/ui/MenuDropdown'; +import type { MenuDropdownItem } from '@/ui/MenuDropdown'; +import { STANDARD_HTTP_METHODS } from '@/constants/request'; +import { getMethodColorVar } from '@/theme/methodColors'; import { MethodBadge } from '../MethodBadge/MethodBadge'; import { StyledWrapper } from './StyledWrapper'; diff --git a/packages/bruno-api-docs/src/components/InfoTip/InfoTip.spec.tsx b/packages/bruno-api-docs/src/components/InfoTip/InfoTip.spec.tsx index 7128efe0..b08217e1 100644 --- a/packages/bruno-api-docs/src/components/InfoTip/InfoTip.spec.tsx +++ b/packages/bruno-api-docs/src/components/InfoTip/InfoTip.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; -import { query } from '../../test-utils/dom'; +import { query } from '@/test-utils/dom'; import { InfoTip } from './InfoTip'; const render = (ui: React.ReactElement) => { diff --git a/packages/bruno-api-docs/src/components/InfoTip/InfoTip.tsx b/packages/bruno-api-docs/src/components/InfoTip/InfoTip.tsx index 7065011e..36ff604c 100644 --- a/packages/bruno-api-docs/src/components/InfoTip/InfoTip.tsx +++ b/packages/bruno-api-docs/src/components/InfoTip/InfoTip.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Tooltip } from '../../ui/Tooltip/Tooltip'; +import { Tooltip } from '@/ui/Tooltip/Tooltip'; import { StyledWrapper } from './StyledWrapper'; interface InfoTipProps { diff --git a/packages/bruno-api-docs/src/components/InheritedAuthBadge/InheritedAuthBadge.tsx b/packages/bruno-api-docs/src/components/InheritedAuthBadge/InheritedAuthBadge.tsx index d9007f21..48418687 100644 --- a/packages/bruno-api-docs/src/components/InheritedAuthBadge/InheritedAuthBadge.tsx +++ b/packages/bruno-api-docs/src/components/InheritedAuthBadge/InheritedAuthBadge.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { canNavigateToSource, inheritedSourceLabel, type InheritedSource } from '../../utils/request'; +import { canNavigateToSource, inheritedSourceLabel, type InheritedSource } from '@/utils/request'; import { ContentTypeBadge } from '../ContentTypeBadge/ContentTypeBadge'; interface InheritedAuthBadgeProps { diff --git a/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.spec.tsx b/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.spec.tsx index e9b6cf00..72a1b819 100644 --- a/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.spec.tsx +++ b/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { getByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { getByTestId } from '@/test-utils/dom'; import { InheritedSourceLink } from './InheritedSourceLink'; -import type { InheritedSource } from '../../utils/request'; +import type { InheritedSource } from '@/utils/request'; const folderSource: InheritedSource = { level: 'folder', name: 'Folder A', uuid: 'folder-uid' }; const collectionSource: InheritedSource = { level: 'collection', name: 'My Collection', uuid: '__collection_root__' }; diff --git a/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.tsx b/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.tsx index e9951685..0aa23800 100644 --- a/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.tsx +++ b/packages/bruno-api-docs/src/components/InheritedSourceLink/InheritedSourceLink.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { canNavigateToSource, inheritedSourceLabel, type InheritedSource } from '../../utils/request'; -import { Tooltip } from '../../ui/Tooltip/Tooltip'; -import { GoToIcon } from '../../assets/icons'; -import { cx } from '../../utils/cx'; +import { canNavigateToSource, inheritedSourceLabel, type InheritedSource } from '@/utils/request'; +import { Tooltip } from '@/ui/Tooltip/Tooltip'; +import { GoToIcon } from '@/assets/icons'; +import { cx } from '@/utils/cx'; import { StyledWrapper } from './StyledWrapper'; interface InheritedSourceLinkProps { diff --git a/packages/bruno-api-docs/src/components/InitialsAvatar/InitialsAvatar.tsx b/packages/bruno-api-docs/src/components/InitialsAvatar/InitialsAvatar.tsx index f89eb662..17ee3290 100644 --- a/packages/bruno-api-docs/src/components/InitialsAvatar/InitialsAvatar.tsx +++ b/packages/bruno-api-docs/src/components/InitialsAvatar/InitialsAvatar.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { getInitials } from '../../utils/common'; +import { getInitials } from '@/utils/common'; import { StyledWrapper } from './StyledWrapper'; export interface InitialsAvatarProps { diff --git a/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.spec.tsx b/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.spec.tsx index 739c377a..75698412 100644 --- a/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.spec.tsx +++ b/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import KeyValueTable, { type KeyValueRow } from './KeyValueTable'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.tsx b/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.tsx index 91779d4a..93742554 100644 --- a/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.tsx +++ b/packages/bruno-api-docs/src/components/KeyValueTable/KeyValueTable.tsx @@ -1,12 +1,12 @@ import React, { useEffect, useRef, useState } from 'react'; -import { useResolvedVariables } from '../../hooks/useVariableResolver'; -import { useEditableRows } from '../../hooks/useEditableRows'; -import { Tooltip } from '../../ui/Tooltip/Tooltip'; -import { WarningIcon } from '../../assets/icons'; +import { useResolvedVariables } from '@/hooks/useVariableResolver'; +import { useEditableRows } from '@/hooks/useEditableRows'; +import { Tooltip } from '@/ui/Tooltip/Tooltip'; +import { WarningIcon } from '@/assets/icons'; import HighlightedInput from '../HighlightedInput/HighlightedInput'; -import { SecretValue } from '../../ui/SecretValue/SecretValue'; +import { SecretValue } from '@/ui/SecretValue/SecretValue'; import './KeyValueTable.css'; -import Checkbox from '../../ui/Checkbox/Checkbox'; +import Checkbox from '@/ui/Checkbox/Checkbox'; // Smallest a column may be dragged to; the neighbour it trades width with is held to the same floor. const MIN_COLUMN_WIDTH = 60; diff --git a/packages/bruno-api-docs/src/components/OpenCollection/OpenCollection.tsx b/packages/bruno-api-docs/src/components/OpenCollection/OpenCollection.tsx index 913bfdd0..45ad4a46 100644 --- a/packages/bruno-api-docs/src/components/OpenCollection/OpenCollection.tsx +++ b/packages/bruno-api-docs/src/components/OpenCollection/OpenCollection.tsx @@ -4,18 +4,18 @@ import { Provider } from 'react-redux'; import type { OpenCollection as OpenCollectionCollection } from '@opencollection/types'; import type { OpenCollection as IOpenCollection } from '@opencollection/types'; import AppShell from '../AppShell/AppShell'; -import { parseYaml } from '../../utils/yamlUtils'; -import { hydrateWithUUIDs } from '../../utils/fileUtils'; -import { useAppDispatch, useAppSelector } from '../../store/hooks'; +import { parseYaml } from '@/utils/yamlUtils'; +import { hydrateWithUUIDs } from '@/utils/fileUtils'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; import { selectDocsCollection, setDocsCollection, clearDocsCollection -} from '@slices/docs'; +} from '@/store/slices/docs'; import { setPlaygroundCollection, clearPlaygroundCollection -} from '@slices/playground'; +} from '@/store/slices/playground'; import { selectCollectionStatus, selectCollectionError, @@ -24,10 +24,10 @@ import { setCollectionFailed, resetCollectionState, setGitCollectionUrl -} from '@slices/app'; -import { createOpenCollectionStore, type AppStore } from '../../store/store'; -import { VariableResolverProvider } from '../../hooks'; -import { applyTheme } from '../../theme/applyTheme'; +} from '@/store/slices/app'; +import { createOpenCollectionStore, type AppStore } from '@/store/store'; +import { VariableResolverProvider } from '@/hooks'; +import { applyTheme } from '@/theme/applyTheme'; // Set data-theme on the root element before the component first paints to avoid a flash. applyTheme(); diff --git a/packages/bruno-api-docs/src/components/OpenInBrunoButton/OpenInBrunoButton.tsx b/packages/bruno-api-docs/src/components/OpenInBrunoButton/OpenInBrunoButton.tsx index f89e2161..5e4ce846 100644 --- a/packages/bruno-api-docs/src/components/OpenInBrunoButton/OpenInBrunoButton.tsx +++ b/packages/bruno-api-docs/src/components/OpenInBrunoButton/OpenInBrunoButton.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { BrunoGlyph } from '../../assets/icons'; +import { BrunoGlyph } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; export interface OpenInBrunoButtonProps { diff --git a/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.spec.tsx b/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.spec.tsx index c5701ec3..06bb4382 100644 --- a/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.spec.tsx +++ b/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.spec.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import type { HttpRequestHeader } from '@opencollection/types/requests/http'; import { CollectionConfiguration } from './CollectionConfiguration'; -import { AUTH_MODE_LABELS } from '../../constants'; +import { AUTH_MODE_LABELS } from '@/constants'; describe('CollectionConfiguration', () => { it('renders nothing when there is no configuration', () => { diff --git a/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.tsx b/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.tsx index 5c7eb544..608e4571 100644 --- a/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.tsx +++ b/packages/bruno-api-docs/src/components/OverviewCollectionConfiguration/CollectionConfiguration.tsx @@ -6,8 +6,8 @@ import { SubHeading } from '../SubHeading/SubHeading'; import { PropertyTable, type PropertyRow } from '../PropertyTable/PropertyTable'; import { AuthDetails } from '../AuthDetails/AuthDetails'; import { VariablesPanel } from '../ExecutionContext/VariablesPanel/VariablesPanel'; -import { getDescription, type PreRequestVarRow, type PostResponseVarRow } from '../../utils/request'; -import { hasConfiguredAuth } from '../../utils/collectionOverview'; +import { getDescription, type PreRequestVarRow, type PostResponseVarRow } from '@/utils/request'; +import { hasConfiguredAuth } from '@/utils/collectionOverview'; import { StyledWrapper } from './StyledWrapper'; interface CollectionScripts { diff --git a/packages/bruno-api-docs/src/components/PageRouter/PageRouter.tsx b/packages/bruno-api-docs/src/components/PageRouter/PageRouter.tsx index 65cbda74..26a02127 100644 --- a/packages/bruno-api-docs/src/components/PageRouter/PageRouter.tsx +++ b/packages/bruno-api-docs/src/components/PageRouter/PageRouter.tsx @@ -2,13 +2,13 @@ import React, { useMemo, useRef } from 'react'; import { Navigate } from 'react-router-dom'; import type { GraphQLRequest } from '@opencollection/types/requests/graphql'; import type { ScriptFile, Folder as FolderItem } from '@opencollection/types/collection/item'; -import type { RequestItem } from '../../utils/schemaHelpers'; -import { useActiveResolution, useNavModel } from '../../routing/hooks'; -import { useAppSelector } from '../../store/hooks'; -import { selectDocsCollection } from '../../store/slices/docs'; -import { getItemUuid } from '../../utils/itemUtils'; -import { getAncestorsByUuid } from '../../utils/fileUtils'; -import { ItemVariableResolverProvider } from '../../hooks'; +import type { RequestItem } from '@/utils/schemaHelpers'; +import { useActiveResolution, useNavModel } from '@/routing/hooks'; +import { useAppSelector } from '@/store/hooks'; +import { selectDocsCollection } from '@/store/slices/docs'; +import { getItemUuid } from '@/utils/itemUtils'; +import { getAncestorsByUuid } from '@/utils/fileUtils'; +import { ItemVariableResolverProvider } from '@/hooks'; import type { Item } from '@opencollection/types/collection/item'; import PrevNext from '../PrevNext/PrevNext'; import SectionNav from '../SectionNav/SectionNav'; @@ -16,14 +16,14 @@ import PoweredByFooter from '../PoweredByFooter/PoweredByFooter'; import { PageWrapper } from '../PageWrapper/PageWrapper'; import { ErrorBoundary } from '../ErrorBoundary/ErrorBoundary'; import { StyledWrapper } from './StyledWrapper'; -import { Overview } from '../../pages/Overview/Overview'; -import Request from '../../pages/Request/Request'; +import { Overview } from '@/pages/Overview/Overview'; +import Request from '@/pages/Request/Request'; import GraphqlRequest from '@/pages/GraphqlRequest/GraphqlRequest'; -import Script from '../../pages/Script/Script'; -import Folder from '../../pages/Folder/Folder'; -import Environments from '../../pages/Environments/Environments'; -import type { PageProps, PageType } from '../../routing/types'; -import { useDocsNavigate } from '../../hooks'; +import Script from '@/pages/Script/Script'; +import Folder from '@/pages/Folder/Folder'; +import Environments from '@/pages/Environments/Environments'; +import type { PageProps, PageType } from '@/routing/types'; +import { useDocsNavigate } from '@/hooks'; interface PageRouterProps { onOpenPlayground?: () => void; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/CollectionSettingsView/CollectionSettingsView.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/CollectionSettingsView/CollectionSettingsView.tsx index 768dc9bf..69fa78a8 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/CollectionSettingsView/CollectionSettingsView.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/CollectionSettingsView/CollectionSettingsView.tsx @@ -1,20 +1,20 @@ import React, { useState } from 'react'; import type { OpenCollection } from '@opencollection/types'; -import Tabs from '../../../../../ui/Tabs/Tabs'; -import TitleLabel from '../../../../TitleLabel/TitleLabel'; -import { type KeyValueRow } from '../../../../../components/KeyValueTable/KeyValueTable'; +import Tabs from '@/ui/Tabs/Tabs'; +import TitleLabel from '@/components/TitleLabel/TitleLabel'; +import { type KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; import HeadersTab from '../Common/HeadersTab/HeadersTab'; import VariablesTab from '../Common/VariablesTab/VariablesTab'; import AuthTab from '../Common/AuthTab/AuthTab'; import ScriptsTab from '../Common/ScriptsTab/ScriptsTab'; import TestsTab from '../Common/TestsTab/TestsTab'; import OverviewTab from '../Common/OverviewTab/OverviewTab'; -import { useAppDispatch } from '../../../../../store/hooks'; -import { updateCollectionSettings } from '@slices/playground'; -import { countEnabled, getItemDocs, scriptsArrayToObject, scriptsObjectToArray } from '../../../../../utils/schemaHelpers'; -import { rowToVariable } from '../../../../../utils/variableDataType'; -import { keyValueRowToEntry } from '../../../../../utils/keyValueRow'; -import { actionsToPostResponseVars, postResponseVarsToActions } from '../../../../../utils/request'; +import { useAppDispatch } from '@/store/hooks'; +import { updateCollectionSettings } from '@/store/slices/playground'; +import { countEnabled, getItemDocs, scriptsArrayToObject, scriptsObjectToArray } from '@/utils/schemaHelpers'; +import { rowToVariable } from '@/utils/variableDataType'; +import { keyValueRowToEntry } from '@/utils/keyValueRow'; +import { actionsToPostResponseVars, postResponseVarsToActions } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface CollectionSettingsProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.spec.tsx index 09fb7129..cf3b558b 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.spec.tsx @@ -4,7 +4,7 @@ import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; import type { Assertion } from '@opencollection/types/common/assertions'; import { AssertsTab } from './AssertsTab'; -import { getByTestId } from '../../../../../../test-utils/dom'; +import { getByTestId } from '@/test-utils/dom'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.tsx index 03c52bd8..97b91158 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AssertsTab/AssertsTab.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { IconCaretDown } from '@tabler/icons'; import type { Assertion } from '@opencollection/types/common/assertions'; -import KeyValueTable, { type KeyValueRow } from '../../../../../../components/KeyValueTable/KeyValueTable'; -import MenuDropdown from '../../../../../../ui/MenuDropdown'; +import KeyValueTable, { type KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import MenuDropdown from '@/ui/MenuDropdown'; import { StyledWrapper } from './StyledWrapper'; /** diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.spec.tsx index 1da4e61f..d98c2be1 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.spec.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; -import { getByTestId, query } from '../../../../../../test-utils/dom'; -import { AUTH_DEFAULTS, AUTH_MODE_LABELS, PLACEMENT_OPTIONS } from '../../../../../../constants'; +import { getByTestId, query } from '@/test-utils/dom'; +import { AUTH_DEFAULTS, AUTH_MODE_LABELS, PLACEMENT_OPTIONS } from '@/constants'; import { AuthTab } from './AuthTab'; const render = (ui: React.ReactElement) => { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.tsx index b401394e..734b3052 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/AuthTab/AuthTab.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Field, type SelectOption } from '../../../../../../ui/Field'; -import { AUTH_DEFAULTS, AUTH_MODE_LABELS, PLACEMENT_OPTIONS } from '../../../../../../constants'; -import { REQUEST_PROTOCOL_KEYS } from '../../../../../../utils/schemaHelpers'; -import type { InheritedAuthSummary } from '../../../../../../utils/request'; +import { Field, type SelectOption } from '@/ui/Field'; +import { AUTH_DEFAULTS, AUTH_MODE_LABELS, PLACEMENT_OPTIONS } from '@/constants'; +import { REQUEST_PROTOCOL_KEYS } from '@/utils/schemaHelpers'; +import type { InheritedAuthSummary } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; -import NoContentText from '../../../../../../ui/NoContentText/NoContentText'; +import NoContentText from '@/ui/NoContentText/NoContentText'; interface AuthTabProps { auth: any; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.spec.tsx index 7591f942..cd064b23 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.spec.tsx @@ -4,8 +4,8 @@ import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; import type { HttpRequest } from '@opencollection/types/requests/http'; import { BodyModeSelector, resolveBodyMode } from './BodyModeSelector'; -import type { RequestBody } from '../../../../../../utils/schemaHelpers'; -import { getByTestId } from '../../../../../../test-utils/dom'; +import type { RequestBody } from '@/utils/schemaHelpers'; +import { getByTestId } from '@/test-utils/dom'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.tsx index bd84ab44..532176d0 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyModeSelector/BodyModeSelector.tsx @@ -10,9 +10,9 @@ import { IconFile, IconX } from '@tabler/icons'; -import MenuDropdown from '../../../../../../ui/MenuDropdown'; -import type { MenuDropdownGroup } from '../../../../../../ui/MenuDropdown'; -import type { RequestBody } from '../../../../../../utils/schemaHelpers'; +import MenuDropdown from '@/ui/MenuDropdown'; +import type { MenuDropdownGroup } from '@/ui/MenuDropdown'; +import type { RequestBody } from '@/utils/schemaHelpers'; import { TriggerButton } from './StyledWrapper'; interface BodyModeSelectorProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.spec.tsx index 7ffd7151..82763dde 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import type { HttpRequest } from '@opencollection/types/requests/http'; -import { useRenderToDom } from '../../../../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; import { BodyTab } from './BodyTab'; -import type { RequestBody } from '../../../../../utils/schemaHelpers'; +import type { RequestBody } from '@/utils/schemaHelpers'; const noop = () => {}; const item = { http: { method: 'POST', url: 'https://api.example.com' } } as HttpRequest; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.tsx index db608292..d8170270 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BodyTab.tsx @@ -1,11 +1,11 @@ import React from 'react'; import type { HttpRequest } from '@opencollection/types/requests/http'; -import CodeEditor from '../../../../../ui/CodeEditor/CodeEditor'; -import KeyValueTable, { type KeyValueRow } from '../../../../../components/KeyValueTable/KeyValueTable'; -import { VariableInfoCard } from '../../../../VariableInfoCard/VariableInfoCard'; -import { getDescription } from '../../../../../utils/request'; -import { keyValueRowToEntry } from '../../../../../utils/keyValueRow'; -import type { RequestBody } from '../../../../../utils/schemaHelpers'; +import CodeEditor from '@/ui/CodeEditor/CodeEditor'; +import KeyValueTable, { type KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { VariableInfoCard } from '@/components/VariableInfoCard/VariableInfoCard'; +import { getDescription } from '@/utils/request'; +import { keyValueRowToEntry } from '@/utils/keyValueRow'; +import type { RequestBody } from '@/utils/schemaHelpers'; interface BodyTabProps { body: RequestBody; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.spec.tsx index 8aeb6216..e46c984a 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { describe, it, expect, vi } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { query } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; -vi.mock('../../../../../../ui/CodeEditor/CodeEditor', () => ({ +vi.mock('@/ui/CodeEditor/CodeEditor', () => ({ default: ({ value }: { value: string }) =>
{value}
})); diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.tsx index 1664bef1..27389615 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/BulkEdit/BulkEdit.tsx @@ -1,7 +1,7 @@ import React, { useRef, useState } from 'react'; -import CodeEditor from '../../../../../../ui/CodeEditor/CodeEditor'; -import type { KeyValueRow } from '../../../../../../components/KeyValueTable/KeyValueTable'; -import { parseBulkKeyValue, preserveDescriptions, serializeBulkKeyValue } from '../../../../../../utils/bulkKeyValue'; +import CodeEditor from '@/ui/CodeEditor/CodeEditor'; +import type { KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { parseBulkKeyValue, preserveDescriptions, serializeBulkKeyValue } from '@/utils/bulkKeyValue'; import { StyledWrapper } from './StyledWrapper'; export interface BulkEditProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.spec.tsx index bd6d1cd4..5178de64 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { query } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import { HeadersTab } from './HeadersTab'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.tsx index 70917c86..2bb2a97c 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/HeadersTab/HeadersTab.tsx @@ -1,8 +1,8 @@ import React, { useCallback, useState } from 'react'; -import KeyValueTable, { type KeyValueRow } from '../../../../../../components/KeyValueTable/KeyValueTable'; -import { STANDARD_HTTP_HEADERS, MIME_TYPES } from '../../../../../../constants/httpHeaders'; -import { HEADER_NAME_REGEX, HEADER_VALUE_REGEX } from '../../../../../../constants/regex'; -import { getDescription } from '../../../../../../utils/request'; +import KeyValueTable, { type KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { STANDARD_HTTP_HEADERS, MIME_TYPES } from '@/constants/httpHeaders'; +import { HEADER_NAME_REGEX, HEADER_VALUE_REGEX } from '@/constants/regex'; +import { getDescription } from '@/utils/request'; import BulkEdit from '../BulkEdit/BulkEdit'; import { StyledWrapper } from './StyledWrapper'; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.spec.tsx index 6cdeedb7..144be87e 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { getByTestId, queryByTestId } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { getByTestId, queryByTestId } from '@/test-utils/dom'; import OverviewTab from './OverviewTab'; describe('OverviewTab', () => { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.tsx index 22c69229..9e65aa32 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/OverviewTab/OverviewTab.tsx @@ -1,9 +1,9 @@ -import { useMarkdownRenderer } from '../../../../../../hooks'; +import { useMarkdownRenderer } from '@/hooks'; import { useMemo } from 'react'; import { StyledWrapper } from './StyledWrapper'; -import { EmptyState } from '../../../../../../ui/EmptyState/EmptyState'; -import { BookIcon } from '../../../../../../assets/icons'; -import NoContentText from '../../../../../../ui/NoContentText/NoContentText'; +import { EmptyState } from '@/ui/EmptyState/EmptyState'; +import { BookIcon } from '@/assets/icons'; +import NoContentText from '@/ui/NoContentText/NoContentText'; interface OverviewTabProps { docs?: string; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.spec.tsx index 582e0e49..3ccfb1ef 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.spec.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; import { ParamsTab } from './ParamsTab'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.tsx index 6e76b4ef..ec76b8f1 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ParamsTab/ParamsTab.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useMemo } from 'react'; -import KeyValueTable, { type KeyValueRow } from '../../../../../KeyValueTable/KeyValueTable'; -import { getDescription } from '../../../../../../utils/request'; +import KeyValueTable, { type KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { getDescription } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface ParamsTabProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.spec.tsx index cc809e2e..1c55e9ab 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import ResponseBodyTab from './ResponseBodyTab'; -import { useRenderToDom } from '../../../../../hooks/useRenderToDom'; -import { getByTestId, queryByTestId } from '../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { getByTestId, queryByTestId } from '@/test-utils/dom'; describe('ResponseBodyTab', () => { it('renders the large-response warning instead of the body when over the threshold', () => { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.tsx index f6fb87e9..a543490c 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseBodyTab.tsx @@ -5,7 +5,7 @@ import { formatResponse } from '@/utils/dataFormatter'; import type { RunRequestResponse } from '@/runner'; import LargeResponseWarning from './LargeResponseWarning/LargeResponseWarning'; import useLargeResponse from '@/hooks/useLargeResponseWarning'; -import QueryResultPreview from '../../../QueryResultPreview/QueryResultPreview'; +import QueryResultPreview from '@/components/Playground/QueryResultPreview/QueryResultPreview'; const CodeEditor = React.lazy(() => import('@/ui/CodeEditor/CodeEditor')); diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseHeadersTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseHeadersTab.tsx index 27c5e025..ee8c9e73 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseHeadersTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ResponseHeadersTab.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import NoContentText from '../../../../../ui/NoContentText/NoContentText'; +import NoContentText from '@/ui/NoContentText/NoContentText'; interface ResponseHeadersTabProps { headers?: Record; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.spec.tsx index b4d86885..30125014 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { describe, it, expect, vi } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { query } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; -vi.mock('../../../../../../ui/CodeEditor/CodeEditor', () => ({ +vi.mock('@/ui/CodeEditor/CodeEditor', () => ({ default: ({ value }: { value: string }) =>
{value}
})); diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.tsx index f89af072..31ecb729 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/ScriptsTab/ScriptsTab.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import CodeEditor from '../../../../../../ui/CodeEditor/CodeEditor'; -import Tabs from '../../../../../../ui/Tabs/Tabs'; +import CodeEditor from '@/ui/CodeEditor/CodeEditor'; +import Tabs from '@/ui/Tabs/Tabs'; import { StyledWrapper } from './StyledWrapper'; type ScriptSubTab = 'pre-request' | 'post-response'; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestResultsTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestResultsTab.tsx index 96a87a69..2f41c781 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestResultsTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestResultsTab.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import type { TestResultsResponse, AssertionResultsResponse } from '../../../../../runner'; -import NoContentText from '../../../../../ui/NoContentText/NoContentText'; +import type { TestResultsResponse, AssertionResultsResponse } from '@/runner'; +import NoContentText from '@/ui/NoContentText/NoContentText'; interface TestResultsTabProps { testResults?: TestResultsResponse; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.spec.tsx index 41afb440..ed6a21aa 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { describe, it, expect, vi } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { query } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; -vi.mock('../../../../../../ui/CodeEditor/CodeEditor', () => ({ +vi.mock('@/ui/CodeEditor/CodeEditor', () => ({ default: ({ value }: { value: string }) =>
{value}
})); diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.tsx index c1e17838..dc3704ae 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/TestsTab/TestsTab.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import CodeEditor from '../../../../../../ui/CodeEditor/CodeEditor'; +import CodeEditor from '@/ui/CodeEditor/CodeEditor'; import { StyledWrapper } from './StyledWrapper'; interface TestsTabProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.spec.tsx index 13bdcac2..31edf06a 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.spec.tsx @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { query, queryByTestId } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query, queryByTestId } from '@/test-utils/dom'; import { VariableTypeControl } from './VariableTypeControl'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.tsx index f895be72..a6461ae6 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/VariableTypeControl.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { Tooltip } from '../../../../../../ui/Tooltip/Tooltip'; -import { CaretIcon, WarningIcon } from '../../../../../../assets/icons'; -import MenuDropdown from '../../../../../../ui/MenuDropdown'; +import { Tooltip } from '@/ui/Tooltip/Tooltip'; +import { CaretIcon, WarningIcon } from '@/assets/icons'; +import MenuDropdown from '@/ui/MenuDropdown'; import { VARIABLE_DATA_TYPES, parseValueByDataType, validateDataTypeValue, type VariableDataType -} from '../../../../../../utils/variableDataType'; +} from '@/utils/variableDataType'; import { StyledWrapper } from './StyledWrapper'; interface VariableTypeControlProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/variableTypeColumn.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/variableTypeColumn.tsx index b1da5f5b..f6d37edc 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/variableTypeColumn.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariableTypeControl/variableTypeColumn.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import type { AdditionalColumn } from '../../../../../../components/KeyValueTable/KeyValueTable'; -import { toDataType } from '../../../../../../utils/variableDataType'; +import type { AdditionalColumn } from '@/components/KeyValueTable/KeyValueTable'; +import { toDataType } from '@/utils/variableDataType'; import { VariableTypeControl } from './VariableTypeControl'; /** A `KeyValueTable` column that renders the editable type dropdown and writes the choice back to the row. */ diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.spec.tsx index 1bc69e41..d8939e42 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.spec.tsx @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { query, queryByTestId } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query, queryByTestId } from '@/test-utils/dom'; import { VariablesTab } from './VariablesTab'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.tsx index 2b6a8242..3df18001 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/Common/VariablesTab/VariablesTab.tsx @@ -1,12 +1,12 @@ import React, { useMemo } from 'react'; import type { Variable } from '@opencollection/types/common/variables'; -import KeyValueTable, { type KeyValueRow } from '../../../../../../components/KeyValueTable/KeyValueTable'; -import { InfoTip } from '../../../../../../components/InfoTip/InfoTip'; -import { unwrapVariableTyped } from '../../../../../../utils/variableResolution'; -import { toDataType } from '../../../../../../utils/variableDataType'; -import { VARIABLE_NAME_REGEX } from '../../../../../../constants/regex'; +import KeyValueTable, { type KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { InfoTip } from '@/components/InfoTip/InfoTip'; +import { unwrapVariableTyped } from '@/utils/variableResolution'; +import { toDataType } from '@/utils/variableDataType'; +import { VARIABLE_NAME_REGEX } from '@/constants/regex'; import { variableTypeColumn } from '../VariableTypeControl/variableTypeColumn'; -import { getDescription, type PostResponseVar } from '../../../../../../utils/request'; +import { getDescription, type PostResponseVar } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface VariablesTabProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.spec.tsx index 2198c97c..4a315559 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../../../../../hooks/useRenderToDom'; -import { query, getByTestId, queryByTestId } from '../../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query, getByTestId, queryByTestId } from '@/test-utils/dom'; import EnvVarCards from './EnvVarCards'; -import type { KeyValueRow } from '../../../../../../components/KeyValueTable/KeyValueTable'; +import type { KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; const rows: KeyValueRow[] = [ { id: '1', name: 'host', value: '', enabled: true }, diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.tsx index 40298a87..f2604024 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvVarCards/EnvVarCards.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import type { KeyValueRow } from '../../../../../../components/KeyValueTable/KeyValueTable'; -import { SecretValue } from '../../../../../../ui/SecretValue/SecretValue'; -import { TrashIcon } from '../../../../../../assets/icons'; -import { useEditableRows } from '../../../../../../hooks/useEditableRows'; -import { cx } from '../../../../../../utils/cx'; -import { toDataType } from '../../../../../../utils/variableDataType'; +import type { KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { SecretValue } from '@/ui/SecretValue/SecretValue'; +import { TrashIcon } from '@/assets/icons'; +import { useEditableRows } from '@/hooks/useEditableRows'; +import { cx } from '@/utils/cx'; +import { toDataType } from '@/utils/variableDataType'; import { VariableTypeControl } from '../../Common/VariableTypeControl/VariableTypeControl'; import { StyledWrapper } from './StyledWrapper'; -import Checkbox from '../../../../../../ui/Checkbox/Checkbox'; +import Checkbox from '@/ui/Checkbox/Checkbox'; interface EnvVarCardsProps { rows: KeyValueRow[]; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvironmentsView.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvironmentsView.tsx index 5d55a1d0..782ca45d 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvironmentsView.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/EnvironmentsView/EnvironmentsView.tsx @@ -2,21 +2,21 @@ import React, { useState, useEffect } from 'react'; import type { OpenCollection } from '@opencollection/types'; import type { Environment } from '@opencollection/types/config/environments'; import type { Variable, SecretProviderType } from '@opencollection/types/common/variables'; -import type { KeyValueRow } from '../../../../../components/KeyValueTable/KeyValueTable'; -import KeyValueTable from '../../../../../components/KeyValueTable/KeyValueTable'; -import Tabs from '../../../../../ui/Tabs/Tabs'; -import TitleLabel from '../../../../TitleLabel/TitleLabel'; -import { EmptyState } from '../../../../../ui/EmptyState/EmptyState'; +import type { KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import KeyValueTable from '@/components/KeyValueTable/KeyValueTable'; +import Tabs from '@/ui/Tabs/Tabs'; +import TitleLabel from '@/components/TitleLabel/TitleLabel'; +import { EmptyState } from '@/ui/EmptyState/EmptyState'; import { StyledWrapper } from './StyledWrapper'; -import { EnvironmentLabel } from '../../../../EnvironmentLabel/EnvironmentLabel'; +import { EnvironmentLabel } from '@/components/EnvironmentLabel/EnvironmentLabel'; import EnvVarCards from './EnvVarCards/EnvVarCards'; import { variableTypeColumn } from '../Common/VariableTypeControl/variableTypeColumn'; -import { GlobeIcon } from '../../../../../assets/icons'; -import { useAppDispatch } from '../../../../../store/hooks'; -import { cx } from '../../../../../utils/cx'; -import { envVariableToRow, envRowToVariable, mergeExternalSecretRows } from '../../../../../utils/environments'; -import { isSecretVariable, isExternalSecretActive, type ExternalSecretEntry } from '../../../../../utils/variableResolution'; -import { updateCollectionEnvironments } from '@slices/playground'; +import { GlobeIcon } from '@/assets/icons'; +import { useAppDispatch } from '@/store/hooks'; +import { cx } from '@/utils/cx'; +import { envVariableToRow, envRowToVariable, mergeExternalSecretRows } from '@/utils/environments'; +import { isSecretVariable, isExternalSecretActive, type ExternalSecretEntry } from '@/utils/variableResolution'; +import { updateCollectionEnvironments } from '@/store/slices/playground'; const ENV_TABS = [ { id: 'variables', label: 'Variables' }, diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.spec.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.spec.tsx index bb3c540f..fc74894b 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import { ExampleView } from './ExampleView'; -import { useRenderToDom } from '../../../../../hooks/useRenderToDom'; -import { query } from '../../../../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; const request = { type: 'http', method: 'POST', url: '{{baseUrl}}/api/v1/auth/login' } as any; const example = { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.tsx index b2a6b41c..8663406c 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/ExampleView/ExampleView.tsx @@ -1,18 +1,18 @@ import React, { useMemo } from 'react'; import type { HttpRequest, HttpRequestExample } from '@opencollection/types/requests/http'; -import { MethodBadge } from '../../../../MethodBadge/MethodBadge'; -import { CopyButton } from '../../../../../ui/CopyButton/CopyButton'; -import { PropertyTable } from '../../../../PropertyTable/PropertyTable'; -import { RequestParams } from '../../../../Request/RequestParams/RequestParams'; -import { RequestBody } from '../../../../Request/RequestBody/RequestBody'; -import { Code } from '../../../../Code/Code'; -import { SplitDivider } from '../../../../SplitDivider/SplitDivider'; -import { resolvePathAndQueryParams } from '../../../../../utils/pathParams'; -import { getBodyView, getDescription, headerRows } from '../../../../../utils/request'; -import { getHttpMethod, getRequestUrl } from '../../../../../utils/schemaHelpers'; -import { responseBodyLanguage, statusCodePhrase } from '../../../../../utils/exampleResponse'; -import { statusToneColor, statusToneBackground } from '../../../../../utils/common'; -import { useSplitPane, type SplitOrientation } from '../../../../../hooks/useSplitPane'; +import { MethodBadge } from '@/components/MethodBadge/MethodBadge'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; +import { PropertyTable } from '@/components/PropertyTable/PropertyTable'; +import { RequestParams } from '@/components/Request/RequestParams/RequestParams'; +import { RequestBody } from '@/components/Request/RequestBody/RequestBody'; +import { Code } from '@/components/Code/Code'; +import { SplitDivider } from '@/components/SplitDivider/SplitDivider'; +import { resolvePathAndQueryParams } from '@/utils/pathParams'; +import { getBodyView, getDescription, headerRows } from '@/utils/request'; +import { getHttpMethod, getRequestUrl } from '@/utils/schemaHelpers'; +import { responseBodyLanguage, statusCodePhrase } from '@/utils/exampleResponse'; +import { statusToneColor, statusToneBackground } from '@/utils/common'; +import { useSplitPane, type SplitOrientation } from '@/hooks/useSplitPane'; import { StyledWrapper } from './StyledWrapper'; interface ExampleViewProps { diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/FolderSettingsView/FolderSettingsView.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/FolderSettingsView/FolderSettingsView.tsx index 07a033ae..75d0cfb0 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/FolderSettingsView/FolderSettingsView.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/FolderSettingsView/FolderSettingsView.tsx @@ -1,27 +1,27 @@ import React, { useMemo, useState } from 'react'; import type { Folder } from '@opencollection/types/collection/item'; import type { OpenCollection } from '@opencollection/types'; -import Tabs from '../../../../../ui/Tabs/Tabs'; -import TitleLabel from '../../../../TitleLabel/TitleLabel'; -import { type KeyValueRow } from '../../../../../components/KeyValueTable/KeyValueTable'; -import { rowToVariable } from '../../../../../utils/variableDataType'; -import { keyValueRowToEntry } from '../../../../../utils/keyValueRow'; +import Tabs from '@/ui/Tabs/Tabs'; +import TitleLabel from '@/components/TitleLabel/TitleLabel'; +import { type KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { rowToVariable } from '@/utils/variableDataType'; +import { keyValueRowToEntry } from '@/utils/keyValueRow'; import HeadersTab from '../Common/HeadersTab/HeadersTab'; import VariablesTab from '../Common/VariablesTab/VariablesTab'; import AuthTab from '../Common/AuthTab/AuthTab'; import ScriptsTab from '../Common/ScriptsTab/ScriptsTab'; -import { useAppDispatch } from '../../../../../store/hooks'; -import { updateFolderInCollection } from '@slices/playground'; +import { useAppDispatch } from '@/store/hooks'; +import { updateFolderInCollection } from '@/store/slices/playground'; import { countEnabled, getItemDocs, getItemName, scriptsArrayToObject, scriptsObjectToArray -} from '../../../../../utils/schemaHelpers'; -import { getAncestorsByUuid } from '../../../../../utils/fileUtils'; -import { getItemUuid } from '../../../../../utils/itemUtils'; -import { getInheritedAuthSummary } from '../../../../../utils/request'; +} from '@/utils/schemaHelpers'; +import { getAncestorsByUuid } from '@/utils/fileUtils'; +import { getItemUuid } from '@/utils/itemUtils'; +import { getInheritedAuthSummary } from '@/utils/request'; import TestsTab from '../Common/TestsTab/TestsTab'; import OverviewTab from '../Common/OverviewTab/OverviewTab'; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/PlaygroundView.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/PlaygroundView.tsx index 3f27189b..c2d1bbce 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/PlaygroundView.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/PlaygroundView.tsx @@ -2,21 +2,21 @@ import { useState, useEffect, useMemo, useCallback, useRef } from 'react'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { OpenCollection as OpenCollectionCollection } from '@opencollection/types'; import type { Item } from '@opencollection/types/collection/item'; -import { requestRunner } from '../../../../../runner'; -import { getAncestorsByUuid } from '../../../../../utils/fileUtils'; -import { ItemVariableResolverProvider } from '../../../../../hooks'; -import TitleLabel from '../../../../TitleLabel/TitleLabel'; +import { requestRunner } from '@/runner'; +import { getAncestorsByUuid } from '@/utils/fileUtils'; +import { ItemVariableResolverProvider } from '@/hooks'; +import TitleLabel from '@/components/TitleLabel/TitleLabel'; import QueryBar from './QueryBar/QueryBar'; import RequestPane from './RequestPane/RequestPane'; import ResponsePane from './ResponsePane/ResponsePane'; -import { useAppDispatch, useAppSelector } from '../../../../../store/hooks'; -import { updatePlaygroundItem, setPlaygroundResponse, selectPlaygroundResponse } from '../../../../../store/slices/playground'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; +import { updatePlaygroundItem, setPlaygroundResponse, selectPlaygroundResponse } from '@/store/slices/playground'; import { getItemName, isPlaygroundUnsupported } from '@/utils/schemaHelpers'; -import { getInheritedAuthSummary } from '../../../../../utils/request'; -import UnsupportedRequest from '../../../../UnsupportedRequest/UnsupportedRequest'; -import { FileNotFoundIcon } from '../../../../../assets/icons'; -import { useSplitPane } from '../../../../../hooks/useSplitPane'; -import { SplitDivider } from '../../../../SplitDivider/SplitDivider'; +import { getInheritedAuthSummary } from '@/utils/request'; +import UnsupportedRequest from '@/components/UnsupportedRequest/UnsupportedRequest'; +import { FileNotFoundIcon } from '@/assets/icons'; +import { useSplitPane } from '@/hooks/useSplitPane'; +import { SplitDivider } from '@/components/SplitDivider/SplitDivider'; interface PlaygroundViewProps { item: HttpRequest; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/QueryBar/QueryBar.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/QueryBar/QueryBar.tsx index 4878f287..26defe8c 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/QueryBar/QueryBar.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/QueryBar/QueryBar.tsx @@ -1,13 +1,13 @@ import React, { useState, useEffect } from 'react'; import type { HttpRequest } from '@opencollection/types/requests/http'; import { StyledWrapper } from './StyledWrapper'; -import HighlightedInput from '../../../../../HighlightedInput/HighlightedInput'; -import { useResolvedVariables } from '../../../../../../hooks/useVariableResolver'; -import { getHttpMethod, getRequestUrl, getHttpParams } from '../../../../../../utils/schemaHelpers'; -import { syncPathParams, syncQueryParams } from '../../../../../../utils/pathParams'; -import { HttpMethodSelector } from '../../../../../HttpMethodSelector/HttpMethodSelector'; -import { CopyButton } from '../../../../../../ui/CopyButton/CopyButton'; -import { SendIcon } from '../../../../../../assets/icons'; +import HighlightedInput from '@/components/HighlightedInput/HighlightedInput'; +import { useResolvedVariables } from '@/hooks/useVariableResolver'; +import { getHttpMethod, getRequestUrl, getHttpParams } from '@/utils/schemaHelpers'; +import { syncPathParams, syncQueryParams } from '@/utils/pathParams'; +import { HttpMethodSelector } from '@/components/HttpMethodSelector/HttpMethodSelector'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; +import { SendIcon } from '@/assets/icons'; interface QueryBarProps { item: HttpRequest; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/RequestPane/RequestPane.tsx b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/RequestPane/RequestPane.tsx index 904b0cde..b7cd4cbb 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/RequestPane/RequestPane.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/RequestPane/RequestPane.tsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { Assertion } from '@opencollection/types/common/assertions'; -import Tabs from '../../../../../../ui/Tabs/Tabs'; -import type { KeyValueRow } from '../../../../../../components/KeyValueTable/KeyValueTable'; -import { rowToVariable } from '../../../../../../utils/variableDataType'; +import Tabs from '@/ui/Tabs/Tabs'; +import type { KeyValueRow } from '@/components/KeyValueTable/KeyValueTable'; +import { rowToVariable } from '@/utils/variableDataType'; import HeadersTab from '../../Common/HeadersTab/HeadersTab'; import ParamsTab from '../../Common/ParamsTab/ParamsTab'; import BodyTab from '../../Common/BodyTab'; @@ -27,10 +27,10 @@ import { scriptsObjectToArray, getRequestUrl, getItemDocs -} from '../../../../../../utils/schemaHelpers'; -import { setUrlQueryParams } from '../../../../../../utils/pathParams'; -import { actionsToPostResponseVars, postResponseVarsToActions, type InheritedAuthSummary } from '../../../../../../utils/request'; -import { keyValueRowToEntry } from '../../../../../../utils/keyValueRow'; +} from '@/utils/schemaHelpers'; +import { setUrlQueryParams } from '@/utils/pathParams'; +import { actionsToPostResponseVars, postResponseVarsToActions, type InheritedAuthSummary } from '@/utils/request'; +import { keyValueRowToEntry } from '@/utils/keyValueRow'; interface RequestPaneProps { item: HttpRequest; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useInitialResponseFormat.ts b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useInitialResponseFormat.ts index 852d5820..a746f2a4 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useInitialResponseFormat.ts +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useInitialResponseFormat.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react'; -import type { ResponseBodyFormatViewData } from '../../../../../../../../constants'; -import { detectContentTypeFromBase64, getDefaultResponseFormat, getContentType } from '../../../../../../../../utils/response'; -import type { RunRequestResponse } from '../../../../../../../../runner'; +import type { ResponseBodyFormatViewData } from '@/constants'; +import { detectContentTypeFromBase64, getDefaultResponseFormat, getContentType } from '@/utils/response'; +import type { RunRequestResponse } from '@/runner'; interface InitialResponseFormatData extends ResponseBodyFormatViewData { detectedContentType: string | null; diff --git a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useResponseFormatter.ts b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useResponseFormatter.ts index 2b0215b3..9d557148 100644 --- a/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useResponseFormatter.ts +++ b/packages/bruno-api-docs/src/components/Playground/Content/Views/PlaygroundView/ResponsePane/ResponseFormatter/hooks/useResponseFormatter.ts @@ -1,8 +1,8 @@ import { useCallback, useMemo } from 'react'; -import type { ResponseBodyFormat } from '../../../../../../../../constants'; +import type { ResponseBodyFormat } from '@/constants'; import { useInitialResponseFormat } from './useInitialResponseFormat'; -import type { RunRequestResponse } from '../../../../../../../../runner'; -import { getResponseFormatOptions } from '../../../../../../../../utils/response'; +import type { RunRequestResponse } from '@/runner'; +import { getResponseFormatOptions } from '@/utils/response'; import { useAppDispatch, useAppSelector } from '@/store/hooks'; import { selectResponseFormat, diff --git a/packages/bruno-api-docs/src/components/Playground/DockSwitcher/DockSwitcher.tsx b/packages/bruno-api-docs/src/components/Playground/DockSwitcher/DockSwitcher.tsx index abe04a98..505040c9 100644 --- a/packages/bruno-api-docs/src/components/Playground/DockSwitcher/DockSwitcher.tsx +++ b/packages/bruno-api-docs/src/components/Playground/DockSwitcher/DockSwitcher.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import IconButton from '../../../ui/IconButton/IconButton'; -import { DockInlineIcon, DockBottomIcon, DockModalIcon } from '../../../assets/icons'; -import type { DockMode } from '../../../utils/playgroundDock'; +import IconButton from '@/ui/IconButton/IconButton'; +import { DockInlineIcon, DockBottomIcon, DockModalIcon } from '@/assets/icons'; +import type { DockMode } from '@/utils/playgroundDock'; import { StyledWrapper } from './StyledWrapper'; const DOCKS: { mode: DockMode; label: string; Icon: React.FC }[] = [ diff --git a/packages/bruno-api-docs/src/components/Playground/Playground.tsx b/packages/bruno-api-docs/src/components/Playground/Playground.tsx index c3c56403..9f2fd9b8 100644 --- a/packages/bruno-api-docs/src/components/Playground/Playground.tsx +++ b/packages/bruno-api-docs/src/components/Playground/Playground.tsx @@ -1,7 +1,7 @@ import React, { Suspense, lazy, useEffect, useRef, useState } from 'react'; -import { usePlaygroundUrlState, useIsMobilePhone } from '../../hooks'; -import { useAppDispatch } from '../../store/hooks'; -import { resetPlaygroundEnvironments } from '@slices/playground'; +import { usePlaygroundUrlState, useIsMobilePhone } from '@/hooks'; +import { useAppDispatch } from '@/store/hooks'; +import { resetPlaygroundEnvironments } from '@/store/slices/playground'; import InlineDock from './docks/InlineDock/InlineDock'; import BottomSheetDock from './docks/BottomSheetDock/BottomSheetDock'; import ModalDock from './docks/ModalDock/ModalDock'; diff --git a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.spec.tsx b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.spec.tsx index d3505256..6b729d2d 100644 --- a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.spec.tsx @@ -3,15 +3,15 @@ import { describe, it, expect } from 'vitest'; import { Provider } from 'react-redux'; import { MemoryRouter } from 'react-router-dom'; import PlaygroundBody from './PlaygroundBody'; -import { createOpenCollectionStore } from '../../../store/store'; -import { useRenderToDom } from '../../../hooks/useRenderToDom'; +import { createOpenCollectionStore } from '@/store/store'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; import { setPlaygroundCollection, setSelectedItemId, setSelectedExampleIndex, setViewMode -} from '../../../store/slices/playground'; -import { getItemUuid } from '../../../utils/itemUtils'; +} from '@/store/slices/playground'; +import { getItemUuid } from '@/utils/itemUtils'; const collection = { info: { name: 'C' }, diff --git a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.tsx b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.tsx index 6e87c002..7a149ca6 100644 --- a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.tsx +++ b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/PlaygroundBody.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useMemo, useRef } from 'react'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { Folder } from '@opencollection/types/collection/item'; -import { useAppDispatch, useAppSelector } from '../../../store/hooks'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; import { selectHydratedCollection, selectViewMode, @@ -13,21 +13,21 @@ import { setSelectedExampleIndex, toggleFolderCollapse, expandFolders -} from '@slices/playground'; -import { selectActiveEnvName } from '../../../store/slices/env'; +} from '@/store/slices/playground'; +import { selectActiveEnvName } from '@/store/slices/env'; import type { ExampleHighlight } from '../../Docs/Sidebar/SidebarTree/SidebarTree'; -import { useNavModel } from '../../../routing/hooks'; -import { usePlaygroundUrlState, useElementWidth, useResizableSidebar, useClickOutside } from '../../../hooks'; -import { getItemUuid, findItemByUuid } from '../../../utils/itemUtils'; -import { isFolder } from '../../../utils/schemaHelpers'; -import { exampleIndexForSlug, exampleSlugForIndex } from '../../../routing/slug'; +import { useNavModel } from '@/routing/hooks'; +import { usePlaygroundUrlState, useElementWidth, useResizableSidebar, useClickOutside } from '@/hooks'; +import { getItemUuid, findItemByUuid } from '@/utils/itemUtils'; +import { isFolder } from '@/utils/schemaHelpers'; +import { exampleIndexForSlug, exampleSlugForIndex } from '@/routing/slug'; import PlaygroundView from '../Content/Views/PlaygroundView/PlaygroundView'; import FolderSettingsView from '../Content/Views/FolderSettingsView/FolderSettingsView'; import EnvironmentsView from '../Content/Views/EnvironmentsView/EnvironmentsView'; import CollectionSettingsView from '../Content/Views/CollectionSettingsView/CollectionSettingsView'; import ExampleView from '../Content/Views/ExampleView/ExampleView'; import PlaygroundSidebar from '../PlaygroundSidebar/PlaygroundSidebar'; -import type { DockMode } from '../../../utils/playgroundDock'; +import type { DockMode } from '@/utils/playgroundDock'; import { resolvePlaygroundTarget, PLAYGROUND_ENVIRONMENTS_SLUG, diff --git a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.spec.ts b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.spec.ts index 48307640..e62b7200 100644 --- a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.spec.ts +++ b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.spec.ts @@ -4,7 +4,7 @@ import { PLAYGROUND_ENVIRONMENTS_SLUG, PLAYGROUND_COLLECTION_SLUG } from './resolvePlaygroundTarget'; -import type { NavModel, NavEntry } from '../../../routing/types'; +import type { NavModel, NavEntry } from '@/routing/types'; import type { Item as OpenCollectionItem } from '@opencollection/types/collection/item'; const item = (uuid: string): OpenCollectionItem => ({ uuid } as unknown as OpenCollectionItem); diff --git a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.ts b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.ts index d4d8e424..114219d3 100644 --- a/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.ts +++ b/packages/bruno-api-docs/src/components/Playground/PlaygroundBody/resolvePlaygroundTarget.ts @@ -1,6 +1,6 @@ -import type { NavModel } from '../../../routing/types'; -import { ENVIRONMENTS_SLUG } from '../../../routing/navModel'; -import { getItemUuid } from '../../../utils/itemUtils'; +import type { NavModel } from '@/routing/types'; +import { ENVIRONMENTS_SLUG } from '@/routing/navModel'; +import { getItemUuid } from '@/utils/itemUtils'; /** * The URL slot (`pgReq`) usually holds an item's slug. These two reserved values diff --git a/packages/bruno-api-docs/src/components/Playground/PlaygroundHeader/PlaygroundHeader.tsx b/packages/bruno-api-docs/src/components/Playground/PlaygroundHeader/PlaygroundHeader.tsx index 83f2252a..5683f638 100644 --- a/packages/bruno-api-docs/src/components/Playground/PlaygroundHeader/PlaygroundHeader.tsx +++ b/packages/bruno-api-docs/src/components/Playground/PlaygroundHeader/PlaygroundHeader.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import IconButton from '../../../ui/IconButton/IconButton'; -import { BrunoGlyph, SidebarToggleIcon, CloseIcon, ChevronDownIcon } from '../../../assets/icons'; +import IconButton from '@/ui/IconButton/IconButton'; +import { BrunoGlyph, SidebarToggleIcon, CloseIcon, ChevronDownIcon } from '@/assets/icons'; import DockSwitcher from '../DockSwitcher/DockSwitcher'; -import type { DockMode } from '../../../utils/playgroundDock'; +import type { DockMode } from '@/utils/playgroundDock'; import { StyledWrapper } from './StyledWrapper'; interface PlaygroundHeaderProps { diff --git a/packages/bruno-api-docs/src/components/Playground/PlaygroundSidebar/PlaygroundSidebar.tsx b/packages/bruno-api-docs/src/components/Playground/PlaygroundSidebar/PlaygroundSidebar.tsx index e3c5f404..41782932 100644 --- a/packages/bruno-api-docs/src/components/Playground/PlaygroundSidebar/PlaygroundSidebar.tsx +++ b/packages/bruno-api-docs/src/components/Playground/PlaygroundSidebar/PlaygroundSidebar.tsx @@ -2,12 +2,12 @@ import React, { useRef, useState } from 'react'; import type { OpenCollection as OpenCollectionCollection } from '@opencollection/types'; import EnvSwitcher from '../../EnvSwitcher/EnvSwitcher'; import SidebarTree from '../../Docs/Sidebar/SidebarTree/SidebarTree'; -import IconButton from '../../../ui/IconButton/IconButton'; -import { SettingsIcon } from '../../../assets/icons'; -import { useAutoHideScrollbar, useIsMobileDevice } from '../../../hooks'; +import IconButton from '@/ui/IconButton/IconButton'; +import { SettingsIcon } from '@/assets/icons'; +import { useAutoHideScrollbar, useIsMobileDevice } from '@/hooks'; import type { ExampleHighlight } from '../../Docs/Sidebar/SidebarTree/SidebarTree'; import { StyledWrapper } from './StyledWrapper'; -import Tooltip from '../../../ui/Tooltip/Tooltip'; +import Tooltip from '@/ui/Tooltip/Tooltip'; interface PlaygroundSidebarProps { collection: OpenCollectionCollection | null; diff --git a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/JsonPreview/JsonPreview.tsx b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/JsonPreview/JsonPreview.tsx index ef346fda..ed142e1a 100644 --- a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/JsonPreview/JsonPreview.tsx +++ b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/JsonPreview/JsonPreview.tsx @@ -1,6 +1,6 @@ import React, { Suspense, lazy } from 'react'; -import ErrorBanner from '../../../../ui/ErrorBanner/ErrorBanner'; -import { useAppSelector } from '../../../../store/hooks'; +import ErrorBanner from '@/ui/ErrorBanner/ErrorBanner'; +import { useAppSelector } from '@/store/hooks'; import { StyledWrapper } from './StyledWrapper'; // react-json-view touches browser globals at module load, so a static import diff --git a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.spec.tsx b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.spec.tsx index 0e2a69c2..2a6b4142 100644 --- a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.spec.tsx +++ b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.spec.tsx @@ -2,9 +2,9 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import TextPreview from './TextPreview'; import HtmlPreview from './HtmlPreview/HtmlPreview'; -import { useRenderToDom } from '../../../hooks/useRenderToDom'; -import { query } from '../../../test-utils/dom'; -import { formatToPreviewMode } from '../../../constants'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; +import { formatToPreviewMode } from '@/constants'; describe('formatToPreviewMode', () => { it('maps formats to preview modes', () => { diff --git a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.tsx b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.tsx index 239bf51c..2281406e 100644 --- a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.tsx +++ b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/QueryResultPreview.tsx @@ -3,10 +3,10 @@ import HtmlPreview from './HtmlPreview/HtmlPreview'; import JsonPreview from './JsonPreview/JsonPreview'; import TextPreview from './TextPreview'; import XmlPreview from './XmlPreview/XmlPreview'; -import type { RunRequestResponse } from '../../../runner'; +import type { RunRequestResponse } from '@/runner'; import { StyledWrapper } from './StyledWrapper'; -import type { ResponseBodyFormat } from '../../../constants'; -import { formatToPreviewMode } from '../../../constants'; +import type { ResponseBodyFormat } from '@/constants'; +import { formatToPreviewMode } from '@/constants'; // react-pdf (pdfjs) and react-player are large and only needed for binary previews, // so load them on demand to keep them out of the initial bundle. diff --git a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/XmlPreview/XmlPreview.tsx b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/XmlPreview/XmlPreview.tsx index 2e33785d..1572bcec 100644 --- a/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/XmlPreview/XmlPreview.tsx +++ b/packages/bruno-api-docs/src/components/Playground/QueryResultPreview/XmlPreview/XmlPreview.tsx @@ -1,5 +1,5 @@ import React, { useState, useMemo } from 'react'; -import ErrorBanner from '../../../../ui/ErrorBanner/ErrorBanner'; +import ErrorBanner from '@/ui/ErrorBanner/ErrorBanner'; import { StyledWrapper } from './StyledWrapper'; /** Recursive shape produced by parsing an XML string into a JS object. */ diff --git a/packages/bruno-api-docs/src/components/Playground/docks/BottomSheetDock/BottomSheetDock.tsx b/packages/bruno-api-docs/src/components/Playground/docks/BottomSheetDock/BottomSheetDock.tsx index 6ea215db..da10549f 100644 --- a/packages/bruno-api-docs/src/components/Playground/docks/BottomSheetDock/BottomSheetDock.tsx +++ b/packages/bruno-api-docs/src/components/Playground/docks/BottomSheetDock/BottomSheetDock.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react'; import PlaygroundHeader from '../../PlaygroundHeader/PlaygroundHeader'; -import { useDockResize } from '../../../../hooks/useDockResize'; -import type { DockMode } from '../../../../utils/playgroundDock'; +import { useDockResize } from '@/hooks/useDockResize'; +import type { DockMode } from '@/utils/playgroundDock'; import { StyledWrapper } from './StyledWrapper'; const HEADER_HEIGHT = 52; diff --git a/packages/bruno-api-docs/src/components/Playground/docks/InlineDock/InlineDock.tsx b/packages/bruno-api-docs/src/components/Playground/docks/InlineDock/InlineDock.tsx index 7709de2b..f45ad8ec 100644 --- a/packages/bruno-api-docs/src/components/Playground/docks/InlineDock/InlineDock.tsx +++ b/packages/bruno-api-docs/src/components/Playground/docks/InlineDock/InlineDock.tsx @@ -1,7 +1,7 @@ import React from 'react'; import PlaygroundHeader from '../../PlaygroundHeader/PlaygroundHeader'; -import { useDockResize } from '../../../../hooks/useDockResize'; -import type { DockMode } from '../../../../utils/playgroundDock'; +import { useDockResize } from '@/hooks/useDockResize'; +import type { DockMode } from '@/utils/playgroundDock'; import { StyledWrapper } from './StyledWrapper'; interface InlineDockProps { diff --git a/packages/bruno-api-docs/src/components/Playground/docks/MobileDock/MobileDock.tsx b/packages/bruno-api-docs/src/components/Playground/docks/MobileDock/MobileDock.tsx index ade129de..dabcb415 100644 --- a/packages/bruno-api-docs/src/components/Playground/docks/MobileDock/MobileDock.tsx +++ b/packages/bruno-api-docs/src/components/Playground/docks/MobileDock/MobileDock.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import Portal from '../../../../ui/Portal/Portal'; +import Portal from '@/ui/Portal/Portal'; import PlaygroundHeader from '../../PlaygroundHeader/PlaygroundHeader'; -import { useLockBodyScroll } from '../../../../hooks'; -import type { DockMode } from '../../../../utils/playgroundDock'; +import { useLockBodyScroll } from '@/hooks'; +import type { DockMode } from '@/utils/playgroundDock'; import { StyledWrapper } from './StyledWrapper'; interface MobileDockProps { diff --git a/packages/bruno-api-docs/src/components/Playground/docks/ModalDock/ModalDock.tsx b/packages/bruno-api-docs/src/components/Playground/docks/ModalDock/ModalDock.tsx index 2a436a52..332748cc 100644 --- a/packages/bruno-api-docs/src/components/Playground/docks/ModalDock/ModalDock.tsx +++ b/packages/bruno-api-docs/src/components/Playground/docks/ModalDock/ModalDock.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import Portal from '../../../../ui/Portal/Portal'; +import Portal from '@/ui/Portal/Portal'; import PlaygroundHeader from '../../PlaygroundHeader/PlaygroundHeader'; -import { useEscapeKey, useLockBodyScroll } from '../../../../hooks'; -import type { DockMode } from '../../../../utils/playgroundDock'; +import { useEscapeKey, useLockBodyScroll } from '@/hooks'; +import type { DockMode } from '@/utils/playgroundDock'; import { StyledWrapper } from './StyledWrapper'; interface ModalDockProps { diff --git a/packages/bruno-api-docs/src/components/PrevNext/PrevNext.tsx b/packages/bruno-api-docs/src/components/PrevNext/PrevNext.tsx index 286d9778..b0bcf9f3 100644 --- a/packages/bruno-api-docs/src/components/PrevNext/PrevNext.tsx +++ b/packages/bruno-api-docs/src/components/PrevNext/PrevNext.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Link, useLocation } from 'react-router-dom'; -import type { PageType, SeqNeighbor } from '../../routing/types'; -import { getMethodColorVar } from '../../theme/methodColors'; -import { getShortMethod } from '../../utils/request'; -import { ChevronLeftIcon, ChevronRightIcon } from '../../assets/icons'; +import type { PageType, SeqNeighbor } from '@/routing/types'; +import { getMethodColorVar } from '@/theme/methodColors'; +import { getShortMethod } from '@/utils/request'; +import { ChevronLeftIcon, ChevronRightIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; const toPath = (slug: string) => `/${slug}`; diff --git a/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.spec.tsx b/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.spec.tsx index 38008f1b..7db29341 100644 --- a/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.spec.tsx +++ b/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import { PropertyTable } from './PropertyTable'; describe('PropertyTable', () => { diff --git a/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.tsx b/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.tsx index be37de0b..a3dfadb6 100644 --- a/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.tsx +++ b/packages/bruno-api-docs/src/components/PropertyTable/PropertyTable.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { SecretValue } from '../../ui/SecretValue/SecretValue'; +import { SecretValue } from '@/ui/SecretValue/SecretValue'; import { VariableText } from '../VariableText/VariableText'; import { TruncatedText } from '../TruncatedText/TruncatedText'; import { Description } from '../Description/Description'; import { DisabledBadge } from '../DisabledBadge/DisabledBadge'; import { InheritedSourceLink } from '../InheritedSourceLink/InheritedSourceLink'; -import type { InheritedSource } from '../../utils/request'; -import { cx } from '../../utils/cx'; +import type { InheritedSource } from '@/utils/request'; +import { cx } from '@/utils/cx'; import { StyledWrapper } from './StyledWrapper'; export interface PropertyRow { diff --git a/packages/bruno-api-docs/src/components/PropertyTable/inheritedRows.ts b/packages/bruno-api-docs/src/components/PropertyTable/inheritedRows.ts index 3fa0c262..7829bc78 100644 --- a/packages/bruno-api-docs/src/components/PropertyTable/inheritedRows.ts +++ b/packages/bruno-api-docs/src/components/PropertyTable/inheritedRows.ts @@ -5,7 +5,7 @@ import type { InheritedHeaderRow, InheritedPreRequestVarRow, InheritedPostResponseVarRow -} from '../../utils/request'; +} from '@/utils/request'; // Plain-data row builders (no React dependency): each inherited row carries its `inheritedSource`, // and PropertyTable renders the "go to source" link from it. Shared by the request page, the folder diff --git a/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.spec.tsx b/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.spec.tsx index 6fae39f6..e6e6b20d 100644 --- a/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.spec.tsx +++ b/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import { RequestBody } from './RequestBody'; -import { useRenderToDom } from '../../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; describe('RequestBody', () => { it('renders a JSON body as a labelled code block', () => { diff --git a/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.tsx b/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.tsx index cbcd96e5..0dcfad64 100644 --- a/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.tsx +++ b/packages/bruno-api-docs/src/components/Request/RequestBody/RequestBody.tsx @@ -4,7 +4,7 @@ import { Code } from '../../Code/Code'; import { ContentTypeBadge } from '../../ContentTypeBadge/ContentTypeBadge'; import { PropertyTable, type PropertyRow } from '../../PropertyTable/PropertyTable'; import { VariableText } from '../../VariableText/VariableText'; -import { getBodyView, type BodyTableRow } from '../../../utils/request'; +import { getBodyView, type BodyTableRow } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface RequestBodyProps { diff --git a/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.spec.tsx b/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.spec.tsx index ba49168e..e234c85c 100644 --- a/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.spec.tsx +++ b/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import { RequestParams } from './RequestParams'; -import { useRenderToDom } from '../../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; describe('RequestParams', () => { it('renders Path and Query groups for the params present', () => { diff --git a/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.tsx b/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.tsx index 064cbe00..1391bd30 100644 --- a/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.tsx +++ b/packages/bruno-api-docs/src/components/Request/RequestParams/RequestParams.tsx @@ -2,8 +2,8 @@ import React from 'react'; import type { HttpRequestParam } from '@opencollection/types/requests/http'; import { SubHeading } from '../../SubHeading/SubHeading'; import { PropertyTable, type PropertyRow } from '../../PropertyTable/PropertyTable'; -import { getDescription } from '../../../utils/request'; -import { cx } from '../../../utils/cx'; +import { getDescription } from '@/utils/request'; +import { cx } from '@/utils/cx'; import { StyledWrapper } from './StyledWrapper'; const toRows = (params: HttpRequestParam[]): PropertyRow[] => diff --git a/packages/bruno-api-docs/src/components/Request/RequestUrlBar/RequestUrlBar.tsx b/packages/bruno-api-docs/src/components/Request/RequestUrlBar/RequestUrlBar.tsx index c7aa2b6e..bf5bacc3 100644 --- a/packages/bruno-api-docs/src/components/Request/RequestUrlBar/RequestUrlBar.tsx +++ b/packages/bruno-api-docs/src/components/Request/RequestUrlBar/RequestUrlBar.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { MethodBadge } from '../../MethodBadge/MethodBadge'; import { VariableText } from '../../VariableText/VariableText'; -import { CopyButton } from '../../../ui/CopyButton/CopyButton'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; import { TruncatedText } from '../../TruncatedText/TruncatedText'; -import { SendIcon } from '../../../assets/icons'; +import { SendIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; interface RequestUrlBarProps { diff --git a/packages/bruno-api-docs/src/components/Request/RequestVars/RequestVars.tsx b/packages/bruno-api-docs/src/components/Request/RequestVars/RequestVars.tsx index 4e8945e0..da177858 100644 --- a/packages/bruno-api-docs/src/components/Request/RequestVars/RequestVars.tsx +++ b/packages/bruno-api-docs/src/components/Request/RequestVars/RequestVars.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { SubHeading } from '../../SubHeading/SubHeading'; import { PropertyTable } from '../../PropertyTable/PropertyTable'; -import type { PreRequestVarRow, PostResponseVarRow } from '../../../utils/request'; +import type { PreRequestVarRow, PostResponseVarRow } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface RequestVarsProps { diff --git a/packages/bruno-api-docs/src/components/Search/FolderFilter/FolderFilter.tsx b/packages/bruno-api-docs/src/components/Search/FolderFilter/FolderFilter.tsx index 57a2192d..4b34aeb6 100644 --- a/packages/bruno-api-docs/src/components/Search/FolderFilter/FolderFilter.tsx +++ b/packages/bruno-api-docs/src/components/Search/FolderFilter/FolderFilter.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { FolderIcon } from '../../../assets/icons'; -import Dropdown from '../../../ui/Dropdown/Dropdown'; +import { FolderIcon } from '@/assets/icons'; +import Dropdown from '@/ui/Dropdown/Dropdown'; import type { FolderOption } from '../searchIndex'; interface FolderFilterProps { diff --git a/packages/bruno-api-docs/src/components/Search/MethodChips/MethodChips.tsx b/packages/bruno-api-docs/src/components/Search/MethodChips/MethodChips.tsx index 5cd74f9b..3c473fd7 100644 --- a/packages/bruno-api-docs/src/components/Search/MethodChips/MethodChips.tsx +++ b/packages/bruno-api-docs/src/components/Search/MethodChips/MethodChips.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { getMethodColorVar } from '../../../theme/methodColors'; -import { getShortMethod } from '../../../utils/request'; +import { getMethodColorVar } from '@/theme/methodColors'; +import { getShortMethod } from '@/utils/request'; import { StyledWrapper } from './StyledWrapper'; interface MethodChipsProps { diff --git a/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.spec.tsx b/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.spec.tsx index 7b60ce46..fa99f35e 100644 --- a/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.spec.tsx +++ b/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.spec.tsx @@ -4,7 +4,7 @@ import { Provider } from 'react-redux'; import { MemoryRouter } from 'react-router-dom'; import { describe, it, expect } from 'vitest'; import { SearchBar } from './SearchBar'; -import { createOpenCollectionStore } from '../../../store/store'; +import { createOpenCollectionStore } from '@/store/store'; const renderBar = () => renderToStaticMarkup( diff --git a/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.tsx b/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.tsx index 70c818a1..808a1b7b 100644 --- a/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.tsx +++ b/packages/bruno-api-docs/src/components/Search/SearchBar/SearchBar.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { useNavModel } from '../../../routing/hooks'; -import { useClickOutside, useDocsNavigate } from '../../../hooks'; +import { useNavModel } from '@/routing/hooks'; +import { useClickOutside, useDocsNavigate } from '@/hooks'; import { buildSearchRecords, collectTopLevelFolders, @@ -11,7 +11,7 @@ import { type SearchHit, type SearchRecord } from '../searchIndex'; -import { SearchIcon, CloseIcon } from '../../../assets/icons'; +import { SearchIcon, CloseIcon } from '@/assets/icons'; import MethodChips from '../MethodChips/MethodChips'; import FolderFilter from '../FolderFilter/FolderFilter'; import SearchResultItem from '../SearchResultItem/SearchResultItem'; diff --git a/packages/bruno-api-docs/src/components/Search/SearchResultItem/SearchResultItem.tsx b/packages/bruno-api-docs/src/components/Search/SearchResultItem/SearchResultItem.tsx index 98970cf0..3c9376b5 100644 --- a/packages/bruno-api-docs/src/components/Search/SearchResultItem/SearchResultItem.tsx +++ b/packages/bruno-api-docs/src/components/Search/SearchResultItem/SearchResultItem.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { getMethodColorVar } from '../../../theme/methodColors'; -import { getShortMethod } from '../../../utils/request'; -import { FolderIcon } from '../../../assets/icons'; -import { Tooltip } from '../../../ui/Tooltip/Tooltip'; -import { requestCountLabel } from '../../../utils/folder'; +import { getMethodColorVar } from '@/theme/methodColors'; +import { getShortMethod } from '@/utils/request'; +import { FolderIcon } from '@/assets/icons'; +import { Tooltip } from '@/ui/Tooltip/Tooltip'; +import { requestCountLabel } from '@/utils/folder'; import { formatBreadcrumb, type SearchRecord, type FieldMatches } from '../searchIndex'; import { StyledWrapper } from './StyledWrapper'; diff --git a/packages/bruno-api-docs/src/components/Search/searchIndex.spec.ts b/packages/bruno-api-docs/src/components/Search/searchIndex.spec.ts index 25c256f4..0853bdf7 100644 --- a/packages/bruno-api-docs/src/components/Search/searchIndex.spec.ts +++ b/packages/bruno-api-docs/src/components/Search/searchIndex.spec.ts @@ -11,7 +11,7 @@ import { type RequestSearchRecord, type FolderSearchRecord } from './searchIndex'; -import type { NavEntry } from '../../routing/types'; +import type { NavEntry } from '@/routing/types'; const requestEntry = (over: Partial & { uuid: string }): NavEntry => { const { uuid, ...rest } = over; diff --git a/packages/bruno-api-docs/src/components/Search/searchIndex.ts b/packages/bruno-api-docs/src/components/Search/searchIndex.ts index 296ad886..6750eb60 100644 --- a/packages/bruno-api-docs/src/components/Search/searchIndex.ts +++ b/packages/bruno-api-docs/src/components/Search/searchIndex.ts @@ -14,10 +14,10 @@ import Fuse from 'fuse.js'; import type { IFuseOptions, FuseResultMatch } from 'fuse.js'; import type { Folder } from '@opencollection/types/collection/item'; -import type { NavEntry } from '../../routing/types'; -import { getRequestUrl } from '../../utils/schemaHelpers'; -import { getItemUuid } from '../../utils/itemUtils'; -import { countFolderRequests } from '../../utils/folder'; +import type { NavEntry } from '@/routing/types'; +import { getRequestUrl } from '@/utils/schemaHelpers'; +import { getItemUuid } from '@/utils/itemUtils'; +import { countFolderRequests } from '@/utils/folder'; interface SearchRecordBase { /** Item UUID (the sidebar key). */ diff --git a/packages/bruno-api-docs/src/components/Section/Section.tsx b/packages/bruno-api-docs/src/components/Section/Section.tsx index 4f5d6c9f..a6f36b36 100644 --- a/packages/bruno-api-docs/src/components/Section/Section.tsx +++ b/packages/bruno-api-docs/src/components/Section/Section.tsx @@ -1,9 +1,9 @@ import React, { useId } from 'react'; import { SectionLabel } from '../SectionLabel/SectionLabel'; import { ChevronArrow } from '../ChevronArrow/ChevronArrow'; -import { Collapse } from '../../ui/Collapse/Collapse'; -import { useSessionStorage } from '../../hooks'; -import { cx } from '../../utils/cx'; +import { Collapse } from '@/ui/Collapse/Collapse'; +import { useSessionStorage } from '@/hooks'; +import { cx } from '@/utils/cx'; import { StyledWrapper } from './StyledWrapper'; type HeadingLevel = 'h2' | 'h3' | 'h4'; diff --git a/packages/bruno-api-docs/src/components/SectionNav/SectionNav.tsx b/packages/bruno-api-docs/src/components/SectionNav/SectionNav.tsx index 429c3784..5b0a9e12 100644 --- a/packages/bruno-api-docs/src/components/SectionNav/SectionNav.tsx +++ b/packages/bruno-api-docs/src/components/SectionNav/SectionNav.tsx @@ -1,9 +1,9 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import type { RefObject } from 'react'; -import { Portal } from '../../ui/Portal/Portal'; -import { useEscapeKey } from '../../hooks'; -import { useDocSections, getScroller } from '../../hooks/useDocSections'; -import { scrollBehavior } from '../../utils/motion'; +import { Portal } from '@/ui/Portal/Portal'; +import { useEscapeKey } from '@/hooks'; +import { useDocSections, getScroller } from '@/hooks/useDocSections'; +import { scrollBehavior } from '@/utils/motion'; import { StyledWrapper } from './StyledWrapper'; interface SectionNavProps { diff --git a/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.spec.tsx b/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.spec.tsx index e52cd476..4bdb685e 100644 --- a/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.spec.tsx +++ b/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.spec.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { Provider } from 'react-redux'; import { describe, it, expect } from 'vitest'; -import { createOpenCollectionStore } from '../../store/store'; -import { setShowVars } from '../../store/slices/env'; +import { createOpenCollectionStore } from '@/store/store'; +import { setShowVars } from '@/store/slices/env'; import ShowVarsToggle from './ShowVarsToggle'; const render = (configure?: (s: ReturnType) => void): string => { diff --git a/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.tsx b/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.tsx index ba897d35..5d5d6f9a 100644 --- a/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.tsx +++ b/packages/bruno-api-docs/src/components/ShowVarsToggle/ShowVarsToggle.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useAppDispatch, useAppSelector } from '../../store/hooks'; -import { selectShowVars, toggleShowVars } from '../../store/slices/env'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; +import { selectShowVars, toggleShowVars } from '@/store/slices/env'; import { StyledWrapper } from './StyledWrapper'; export interface ShowVarsToggleProps { diff --git a/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.spec.tsx b/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.spec.tsx index de2c2906..64ce5f06 100644 --- a/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.spec.tsx +++ b/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.spec.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect, vi } from 'vitest'; import SidebarDrawer from './SidebarDrawer'; -vi.mock('../../ui/Portal/Portal', () => ({ +vi.mock('@/ui/Portal/Portal', () => ({ Portal: ({ children }: { children: React.ReactNode }) => children })); diff --git a/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.tsx b/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.tsx index 24faf51d..1e87ca9c 100644 --- a/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.tsx +++ b/packages/bruno-api-docs/src/components/SidebarDrawer/SidebarDrawer.tsx @@ -1,6 +1,6 @@ import React, { useCallback } from 'react'; -import { Portal } from '../../ui/Portal/Portal'; -import { useEscapeKey, useLockBodyScroll } from '../../hooks'; +import { Portal } from '@/ui/Portal/Portal'; +import { useEscapeKey, useLockBodyScroll } from '@/hooks'; import { StyledWrapper } from './StyledWrapper'; interface SidebarDrawerProps { diff --git a/packages/bruno-api-docs/src/components/SplitDivider/SplitDivider.tsx b/packages/bruno-api-docs/src/components/SplitDivider/SplitDivider.tsx index fde721fb..c8bdb323 100644 --- a/packages/bruno-api-docs/src/components/SplitDivider/SplitDivider.tsx +++ b/packages/bruno-api-docs/src/components/SplitDivider/SplitDivider.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import type { SplitOrientation } from '../../hooks/useSplitPane'; +import type { SplitOrientation } from '@/hooks/useSplitPane'; import { StyledWrapper } from './StyledWrapper'; interface SplitDividerProps { diff --git a/packages/bruno-api-docs/src/components/ThemeToggle/ThemeToggle.tsx b/packages/bruno-api-docs/src/components/ThemeToggle/ThemeToggle.tsx index b2a2313b..ffb2d780 100644 --- a/packages/bruno-api-docs/src/components/ThemeToggle/ThemeToggle.tsx +++ b/packages/bruno-api-docs/src/components/ThemeToggle/ThemeToggle.tsx @@ -1,7 +1,7 @@ import React from 'react'; import styled from '@emotion/styled'; -import { useAppDispatch, useAppSelector } from '../../store/hooks'; -import { toggleTheme } from '@slices/theme'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; +import { toggleTheme } from '@/store/slices/theme'; const Button = styled.button` display: inline-flex; diff --git a/packages/bruno-api-docs/src/components/Topbar/Topbar.spec.tsx b/packages/bruno-api-docs/src/components/Topbar/Topbar.spec.tsx index 8a201411..29a34bc8 100644 --- a/packages/bruno-api-docs/src/components/Topbar/Topbar.spec.tsx +++ b/packages/bruno-api-docs/src/components/Topbar/Topbar.spec.tsx @@ -8,8 +8,8 @@ import Topbar from './Topbar'; // doesn't have, so they'd come back false and hide the button. We force them to // "yes" here so the test can focus on the one thing it checks: the button shows // only when it's given a link. -vi.mock('../../hooks/useCanRunBrunoApp', () => ({ useCanRunBrunoApp: () => true })); -vi.mock('../../hooks/useTopbarLayout', () => ({ +vi.mock('@/hooks/useCanRunBrunoApp', () => ({ useCanRunBrunoApp: () => true })); +vi.mock('@/hooks/useTopbarLayout', () => ({ useTopbarLayout: () => 'desktop', showsHamburger: () => false })); diff --git a/packages/bruno-api-docs/src/components/Topbar/Topbar.tsx b/packages/bruno-api-docs/src/components/Topbar/Topbar.tsx index ed96b5aa..806c8c3c 100644 --- a/packages/bruno-api-docs/src/components/Topbar/Topbar.tsx +++ b/packages/bruno-api-docs/src/components/Topbar/Topbar.tsx @@ -2,10 +2,10 @@ import React, { useCallback, useEffect, useState } from 'react'; import { StyledWrapper } from './StyledWrapper'; import Brand from './Brand/Brand'; import OpenInBrunoButton from '../OpenInBrunoButton/OpenInBrunoButton'; -import IconButton from '../../ui/IconButton/IconButton'; -import { SearchIcon, HamburgerIcon } from '../../assets/icons'; -import { useTopbarLayout, showsHamburger, type TopbarLayoutMode } from '../../hooks/useTopbarLayout'; -import { useCanRunBrunoApp } from '../../hooks/useCanRunBrunoApp'; +import IconButton from '@/ui/IconButton/IconButton'; +import { SearchIcon, HamburgerIcon } from '@/assets/icons'; +import { useTopbarLayout, showsHamburger, type TopbarLayoutMode } from '@/hooks/useTopbarLayout'; +import { useCanRunBrunoApp } from '@/hooks/useCanRunBrunoApp'; export interface TopbarProps { collectionName: string; diff --git a/packages/bruno-api-docs/src/components/TruncatedText/TruncatedText.tsx b/packages/bruno-api-docs/src/components/TruncatedText/TruncatedText.tsx index 0e19e3bc..feeee030 100644 --- a/packages/bruno-api-docs/src/components/TruncatedText/TruncatedText.tsx +++ b/packages/bruno-api-docs/src/components/TruncatedText/TruncatedText.tsx @@ -1,5 +1,5 @@ import React, { type ReactNode } from 'react'; -import { Tooltip } from '../../ui/Tooltip/Tooltip'; +import { Tooltip } from '@/ui/Tooltip/Tooltip'; import { StyledWrapper } from './StyledWrapper'; export interface TruncatedTextProps { diff --git a/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.spec.tsx b/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.spec.tsx index f07a2cfe..3367113e 100644 --- a/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.spec.tsx +++ b/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.spec.tsx @@ -5,7 +5,7 @@ import { describe, it, expect } from 'vitest'; import type { OpenCollection } from '@opencollection/types'; import type { Item } from '@opencollection/types/collection/item'; import BreadcrumbWrapper from './BreadcrumbWrapper'; -import { getByTestId, queryByTestId } from '../../../test-utils/dom'; +import { getByTestId, queryByTestId } from '@/test-utils/dom'; const collection = { info: { name: 'My collection' } } as unknown as OpenCollection; diff --git a/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.tsx b/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.tsx index 5cf4d117..a45e987f 100644 --- a/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.tsx +++ b/packages/bruno-api-docs/src/components/UnsupportedRequest/BreadcrumbWrapper/BreadcrumbWrapper.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; -import { Breadcrumb, type BreadcrumbSegment } from '../../../ui/Breadcrumb/Breadcrumb'; +import { Breadcrumb, type BreadcrumbSegment } from '@/ui/Breadcrumb/Breadcrumb'; import type { Item } from '@opencollection/types/collection/item'; import type { OpenCollection } from '@opencollection/types'; -import { buildBreadcrumbSegments } from '../../../utils/common'; +import { buildBreadcrumbSegments } from '@/utils/common'; export interface BreadcrumbWrapperProps { showBreadcrumbs: boolean; diff --git a/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.spec.tsx b/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.spec.tsx index 95b1bf37..6e32cb7d 100644 --- a/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.spec.tsx +++ b/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.spec.tsx @@ -4,7 +4,7 @@ import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; import type { WebSocketRequest } from '@opencollection/types/requests/websocket'; import { UnsupportedRequest } from './UnsupportedRequest'; -import { getByTestId, queryByTestId } from '../../test-utils/dom'; +import { getByTestId, queryByTestId } from '@/test-utils/dom'; const websocketItem = { info: { name: 'WS', type: 'websocket' }, diff --git a/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.tsx b/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.tsx index 70ff36a9..9ccd5391 100644 --- a/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.tsx +++ b/packages/bruno-api-docs/src/components/UnsupportedRequest/UnsupportedRequest.tsx @@ -2,16 +2,16 @@ import React, { useMemo } from 'react'; import type { GraphQLRequest } from '@opencollection/types/requests/graphql'; import type { GrpcRequest } from '@opencollection/types/requests/grpc'; import type { WebSocketRequest } from '@opencollection/types/requests/websocket'; -import { getItemDocs, getItemName, getItemType, getRequestUrl } from '../../utils/schemaHelpers'; -import cx from '../../utils/cx'; +import { getItemDocs, getItemName, getItemType, getRequestUrl } from '@/utils/schemaHelpers'; +import cx from '@/utils/cx'; import { Heading } from '../Heading/Heading'; -import { EmptyState } from '../../ui/EmptyState/EmptyState'; +import { EmptyState } from '@/ui/EmptyState/EmptyState'; import RequestUrlBar from '../Request/RequestUrlBar/RequestUrlBar'; import BreadcrumbWrapper, { type BreadcrumbWrapperProps } from './BreadcrumbWrapper/BreadcrumbWrapper'; -import { REQUEST_TYPE_LABELS } from '../../constants'; +import { REQUEST_TYPE_LABELS } from '@/constants'; import ViewMore from '../ViewMore/ViewMore'; import { TitleLabel } from '../TitleLabel/TitleLabel'; -import { useMarkdownRenderer } from '../../hooks'; +import { useMarkdownRenderer } from '@/hooks'; function getRequestTypeLabel(label: string | undefined) { const fallback = { diff --git a/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.spec.tsx b/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.spec.tsx index 276df54f..746567d3 100644 --- a/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.spec.tsx +++ b/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.spec.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { Provider } from 'react-redux'; import { describe, it, expect } from 'vitest'; -import { createOpenCollectionStore } from '../../store/store'; -import { setDocsCollection } from '../../store/slices/docs'; -import { setActiveEnv } from '../../store/slices/env'; -import { VariableResolverProvider, ItemVariableResolverProvider } from '../../hooks'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { createOpenCollectionStore } from '@/store/store'; +import { setDocsCollection } from '@/store/slices/docs'; +import { setActiveEnv } from '@/store/slices/env'; +import { VariableResolverProvider, ItemVariableResolverProvider } from '@/hooks'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import { VariableInfoCard } from './VariableInfoCard'; const collection: any = { diff --git a/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.tsx b/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.tsx index 0f48053e..adb74426 100644 --- a/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.tsx +++ b/packages/bruno-api-docs/src/components/VariableInfoCard/VariableInfoCard.tsx @@ -1,9 +1,9 @@ import React, { useLayoutEffect, useRef, useState } from 'react'; -import { useResolvedVariables } from '../../hooks'; -import { CopyButton } from '../../ui/CopyButton/CopyButton'; -import { EyeIcon, EyeOffIcon } from '../../assets/icons'; -import { SCOPE_LABELS, INVALID_NAME_WARNING } from '../../constants'; -import type { VariableScope } from '../../utils/variableResolution'; +import { useResolvedVariables } from '@/hooks'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; +import { EyeIcon, EyeOffIcon } from '@/assets/icons'; +import { SCOPE_LABELS, INVALID_NAME_WARNING } from '@/constants'; +import type { VariableScope } from '@/utils/variableResolution'; import { StyledWrapper } from './StyledWrapper'; const EDITABLE_SCOPES = new Set(['environment', 'collection', 'folder', 'request', '$secrets']); diff --git a/packages/bruno-api-docs/src/components/VariableText/VariableText.spec.tsx b/packages/bruno-api-docs/src/components/VariableText/VariableText.spec.tsx index 099110e3..8c815ec5 100644 --- a/packages/bruno-api-docs/src/components/VariableText/VariableText.spec.tsx +++ b/packages/bruno-api-docs/src/components/VariableText/VariableText.spec.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { Provider } from 'react-redux'; import { describe, it, expect } from 'vitest'; -import { createOpenCollectionStore } from '../../store/store'; -import { setDocsCollection } from '../../store/slices/docs'; -import { setActiveEnv, setShowVars } from '../../store/slices/env'; -import { VariableResolverProvider } from '../../hooks'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; +import { createOpenCollectionStore } from '@/store/store'; +import { setDocsCollection } from '@/store/slices/docs'; +import { setActiveEnv, setShowVars } from '@/store/slices/env'; +import { VariableResolverProvider } from '@/hooks'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; import { VariableText } from './VariableText'; const collection: any = { diff --git a/packages/bruno-api-docs/src/components/VariableText/VariableText.tsx b/packages/bruno-api-docs/src/components/VariableText/VariableText.tsx index c56b5e47..7cd5b9e7 100644 --- a/packages/bruno-api-docs/src/components/VariableText/VariableText.tsx +++ b/packages/bruno-api-docs/src/components/VariableText/VariableText.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react'; -import { isTemplateVariable, templateVariableSplitRegex } from '../../utils/common'; +import { isTemplateVariable, templateVariableSplitRegex } from '@/utils/common'; import { VariableToken } from './VariableToken/VariableToken'; interface VariableTextProps { diff --git a/packages/bruno-api-docs/src/components/VariableText/VariableToken/VariableToken.tsx b/packages/bruno-api-docs/src/components/VariableText/VariableToken/VariableToken.tsx index bc0c9db6..6f00f41d 100644 --- a/packages/bruno-api-docs/src/components/VariableText/VariableToken/VariableToken.tsx +++ b/packages/bruno-api-docs/src/components/VariableText/VariableToken/VariableToken.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useResolvedVariables } from '../../../hooks'; -import { Popover } from '../../../ui/Popover/Popover'; +import { useResolvedVariables } from '@/hooks'; +import { Popover } from '@/ui/Popover/Popover'; import { VariableInfoCard } from '../../VariableInfoCard/VariableInfoCard'; import { StyledWrapper } from './StyledWrapper'; diff --git a/packages/bruno-api-docs/src/components/ViewMore/ViewMore.spec.tsx b/packages/bruno-api-docs/src/components/ViewMore/ViewMore.spec.tsx index 39ee8a7e..bc7f4201 100644 --- a/packages/bruno-api-docs/src/components/ViewMore/ViewMore.spec.tsx +++ b/packages/bruno-api-docs/src/components/ViewMore/ViewMore.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import { ViewMore } from './ViewMore'; describe('ViewMore', () => { diff --git a/packages/bruno-api-docs/src/components/ViewMore/ViewMore.tsx b/packages/bruno-api-docs/src/components/ViewMore/ViewMore.tsx index 6cdad932..031ef025 100644 --- a/packages/bruno-api-docs/src/components/ViewMore/ViewMore.tsx +++ b/packages/bruno-api-docs/src/components/ViewMore/ViewMore.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useId, useRef, useState } from 'react'; -import { prefersReducedMotion } from '../../utils/motion'; +import { prefersReducedMotion } from '@/utils/motion'; import { ExpandToggle } from '../ExpandToggle/ExpandToggle'; import { StyledWrapper } from './StyledWrapper'; diff --git a/packages/bruno-api-docs/src/constants/auth.ts b/packages/bruno-api-docs/src/constants/auth.ts index 0a0623fc..11a66701 100644 --- a/packages/bruno-api-docs/src/constants/auth.ts +++ b/packages/bruno-api-docs/src/constants/auth.ts @@ -1,4 +1,4 @@ -import type { SelectOption } from '../ui/Field'; +import type { SelectOption } from '@/ui/Field'; export const AUTH_TYPES = { BASIC: 'basic', diff --git a/packages/bruno-api-docs/src/constants/variable.ts b/packages/bruno-api-docs/src/constants/variable.ts index 8a6a3e0a..7cbdf1ad 100644 --- a/packages/bruno-api-docs/src/constants/variable.ts +++ b/packages/bruno-api-docs/src/constants/variable.ts @@ -1,4 +1,4 @@ -import type { VariableScope } from '../utils/variableResolution'; +import type { VariableScope } from '@/utils/variableResolution'; export const SCOPE_LABELS: Record = { 'collection': 'Collection', diff --git a/packages/bruno-api-docs/src/hooks/useLargeResponseWarning.ts b/packages/bruno-api-docs/src/hooks/useLargeResponseWarning.ts index 6406c671..a8d54bc9 100644 --- a/packages/bruno-api-docs/src/hooks/useLargeResponseWarning.ts +++ b/packages/bruno-api-docs/src/hooks/useLargeResponseWarning.ts @@ -1,6 +1,6 @@ import { useState, useRef, useMemo } from 'react'; -import type { RunRequestResponse } from '../runner'; -import { getResponseSize } from '../utils/response'; +import type { RunRequestResponse } from '@/runner'; +import { getResponseSize } from '@/utils/response'; const LARGE_RESPONSE_THRESHOLD = 10 * 1024 * 1024; // 10 MB diff --git a/packages/bruno-api-docs/src/hooks/useMarkdownRenderer.ts b/packages/bruno-api-docs/src/hooks/useMarkdownRenderer.ts index 7aee17e9..5f37bfa3 100644 --- a/packages/bruno-api-docs/src/hooks/useMarkdownRenderer.ts +++ b/packages/bruno-api-docs/src/hooks/useMarkdownRenderer.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; import MarkdownIt from 'markdown-it'; -import Prism from '../utils/prism'; +import Prism from '@/utils/prism'; let cachedRenderer: MarkdownIt | null = null; diff --git a/packages/bruno-api-docs/src/hooks/usePlaygroundUrlState.ts b/packages/bruno-api-docs/src/hooks/usePlaygroundUrlState.ts index 7a760811..9b8d0e8f 100644 --- a/packages/bruno-api-docs/src/hooks/usePlaygroundUrlState.ts +++ b/packages/bruno-api-docs/src/hooks/usePlaygroundUrlState.ts @@ -6,7 +6,7 @@ import { DEFAULT_DOCK, readPlaygroundParams, writePlaygroundParams -} from '../utils/playgroundDock'; +} from '@/utils/playgroundDock'; export interface PlaygroundUrlApi extends PlaygroundUrlState { openPlayground: (requestSlug?: string | null) => void; diff --git a/packages/bruno-api-docs/src/hooks/useSearchHotkey.ts b/packages/bruno-api-docs/src/hooks/useSearchHotkey.ts index 76095267..820af694 100644 --- a/packages/bruno-api-docs/src/hooks/useSearchHotkey.ts +++ b/packages/bruno-api-docs/src/hooks/useSearchHotkey.ts @@ -1,5 +1,5 @@ import { useEffect } from 'react'; -import { isMacPlatform } from '../utils/platform'; +import { isMacPlatform } from '@/utils/platform'; /** * Platform-aware search shortcut: ⌘K on macOS, Ctrl+K elsewhere. Never hardcodes diff --git a/packages/bruno-api-docs/src/hooks/useStorage.spec.ts b/packages/bruno-api-docs/src/hooks/useStorage.spec.ts index 7ebebd3c..18aae19a 100644 --- a/packages/bruno-api-docs/src/hooks/useStorage.spec.ts +++ b/packages/bruno-api-docs/src/hooks/useStorage.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; import { readStored, writeStored } from './useStorage'; -import { fakeStorage } from '../test-utils/storage'; +import { fakeStorage } from '@/test-utils/storage'; describe('readStored', () => { it('falls back to the default value when the key has never been written', () => { diff --git a/packages/bruno-api-docs/src/hooks/useVariableResolver.spec.tsx b/packages/bruno-api-docs/src/hooks/useVariableResolver.spec.tsx index 66ea76c1..22b79ac1 100644 --- a/packages/bruno-api-docs/src/hooks/useVariableResolver.spec.tsx +++ b/packages/bruno-api-docs/src/hooks/useVariableResolver.spec.tsx @@ -2,9 +2,9 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { Provider } from 'react-redux'; import { describe, it, expect } from 'vitest'; -import { createOpenCollectionStore } from '../store/store'; -import { setDocsCollection } from '../store/slices/docs'; -import { setActiveEnv, setShowVars } from '../store/slices/env'; +import { createOpenCollectionStore } from '@/store/store'; +import { setDocsCollection } from '@/store/slices/docs'; +import { setActiveEnv, setShowVars } from '@/store/slices/env'; import { useVariableResolver, useResolvedVariables, ItemVariableResolverProvider } from './useVariableResolver'; const collection: any = { diff --git a/packages/bruno-api-docs/src/hooks/useVariableResolver.tsx b/packages/bruno-api-docs/src/hooks/useVariableResolver.tsx index 816fab12..6852cd12 100644 --- a/packages/bruno-api-docs/src/hooks/useVariableResolver.tsx +++ b/packages/bruno-api-docs/src/hooks/useVariableResolver.tsx @@ -3,13 +3,13 @@ import type { OpenCollection } from '@opencollection/types'; import type { Environment } from '@opencollection/types/config/environments'; import type { Item } from '@opencollection/types/collection/item'; import type { Variable, SecretVariable } from '@opencollection/types/common/variables'; -import { useAppDispatch, useAppSelector } from '../store/hooks'; -import { selectDocsCollection } from '../store/slices/docs'; +import { useAppDispatch, useAppSelector } from '@/store/hooks'; +import { selectDocsCollection } from '@/store/slices/docs'; import { setPlaygroundVariable } from '@/store/slices/playground'; -import { selectActiveEnvName, selectShowVars } from '../store/slices/env'; -import { getRequestVariables, isFolder } from '../utils/schemaHelpers'; -import { getItemUuid } from '../utils/itemUtils'; -import { mockDataFunctions, timeBasedDynamicVars } from '../runner/utils/faker-functions'; +import { selectActiveEnvName, selectShowVars } from '@/store/slices/env'; +import { getRequestVariables, isFolder } from '@/utils/schemaHelpers'; +import { getItemUuid } from '@/utils/itemUtils'; +import { mockDataFunctions, timeBasedDynamicVars } from '@/runner/utils/faker-functions'; import { buildScopedVariableModel, resolveVariables, @@ -23,7 +23,7 @@ import { type ScopedVariableModel, type VariableScope, type VariableSource -} from '../utils/variableResolution'; +} from '@/utils/variableResolution'; export type DynamicVariableKind = 'random' | 'time' | 'unknown'; diff --git a/packages/bruno-api-docs/src/pages/Environments/Environments.spec.tsx b/packages/bruno-api-docs/src/pages/Environments/Environments.spec.tsx index fca05da9..6f3c8cdc 100644 --- a/packages/bruno-api-docs/src/pages/Environments/Environments.spec.tsx +++ b/packages/bruno-api-docs/src/pages/Environments/Environments.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import type { OpenCollection } from '@opencollection/types'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query } from '@/test-utils/dom'; import { Environments } from './Environments'; const groupLabels = (root: ReturnType) => diff --git a/packages/bruno-api-docs/src/pages/Environments/Environments.tsx b/packages/bruno-api-docs/src/pages/Environments/Environments.tsx index a27105ac..63cc85f4 100644 --- a/packages/bruno-api-docs/src/pages/Environments/Environments.tsx +++ b/packages/bruno-api-docs/src/pages/Environments/Environments.tsx @@ -1,19 +1,19 @@ import React, { useMemo, useRef, useState } from 'react'; import type { OpenCollection } from '@opencollection/types'; -import { getEnvironmentVariables } from '../../utils/environments'; -import { getDescription } from '../../utils/request'; -import { useMarkdownRenderer } from '../../hooks'; -import { Table, type TableColumn, type TableGroup } from '../../ui/Table/Table'; +import { getEnvironmentVariables } from '@/utils/environments'; +import { getDescription } from '@/utils/request'; +import { useMarkdownRenderer } from '@/hooks'; +import { Table, type TableColumn, type TableGroup } from '@/ui/Table/Table'; import { EnvironmentLabel } from '../../components/EnvironmentLabel/EnvironmentLabel'; import { VariableText } from '../../components/VariableText/VariableText'; import { TruncatedText } from '../../components/TruncatedText/TruncatedText'; import { Description } from '../../components/Description/Description'; import { DisabledBadge } from '../../components/DisabledBadge/DisabledBadge'; import { ViewMore } from '../../components/ViewMore/ViewMore'; -import { EmptyState } from '../../ui/EmptyState/EmptyState'; +import { EmptyState } from '@/ui/EmptyState/EmptyState'; import { PageWrapper } from '../../components/PageWrapper/PageWrapper'; import { Heading } from '../../components/Heading/Heading'; -import { GlobeIcon } from '../../assets/icons'; +import { GlobeIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; const COLUMNS: TableColumn[] = [ diff --git a/packages/bruno-api-docs/src/pages/Folder/Folder.spec.tsx b/packages/bruno-api-docs/src/pages/Folder/Folder.spec.tsx index a78558d7..e5492471 100644 --- a/packages/bruno-api-docs/src/pages/Folder/Folder.spec.tsx +++ b/packages/bruno-api-docs/src/pages/Folder/Folder.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import type { OpenCollection } from '@opencollection/types'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query, getByTestId, queryByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query, getByTestId, queryByTestId } from '@/test-utils/dom'; import { Folder } from './Folder'; const collection = { diff --git a/packages/bruno-api-docs/src/pages/Folder/Folder.tsx b/packages/bruno-api-docs/src/pages/Folder/Folder.tsx index 7a5c03a4..cf1f981c 100644 --- a/packages/bruno-api-docs/src/pages/Folder/Folder.tsx +++ b/packages/bruno-api-docs/src/pages/Folder/Folder.tsx @@ -1,19 +1,19 @@ import React, { useMemo } from 'react'; import type { OpenCollection } from '@opencollection/types'; import type { Item, Folder as FolderItem } from '@opencollection/types/collection/item'; -import { useMarkdownRenderer } from '../../hooks'; -import { AUTH_MODE_LABELS } from '../../constants'; -import { getItemName, getItemDocs, getItemDescription } from '../../utils/schemaHelpers'; -import { buildBreadcrumbSegments } from '../../utils/common'; -import { getFolderConfig, hasFolderConfig, countFolderRequests, requestCountLabel } from '../../utils/folder'; +import { useMarkdownRenderer } from '@/hooks'; +import { AUTH_MODE_LABELS } from '@/constants'; +import { getItemName, getItemDocs, getItemDescription } from '@/utils/schemaHelpers'; +import { buildBreadcrumbSegments } from '@/utils/common'; +import { getFolderConfig, hasFolderConfig, countFolderRequests, requestCountLabel } from '@/utils/folder'; import { PageWrapper } from '../../components/PageWrapper/PageWrapper'; import { Heading } from '../../components/Heading/Heading'; import { Section } from '../../components/Section/Section'; -import { Breadcrumb, type BreadcrumbSegment } from '../../ui/Breadcrumb/Breadcrumb'; +import { Breadcrumb, type BreadcrumbSegment } from '@/ui/Breadcrumb/Breadcrumb'; import { ViewMore } from '../../components/ViewMore/ViewMore'; -import { EmptyState } from '../../ui/EmptyState/EmptyState'; +import { EmptyState } from '@/ui/EmptyState/EmptyState'; import { FolderConfiguration } from '../../components/FolderConfiguration/FolderConfiguration'; -import { FolderIcon } from '../../assets/icons'; +import { FolderIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; interface FolderProps { diff --git a/packages/bruno-api-docs/src/pages/Overview/Overview.tsx b/packages/bruno-api-docs/src/pages/Overview/Overview.tsx index ea9cf8c4..2e78c4d3 100644 --- a/packages/bruno-api-docs/src/pages/Overview/Overview.tsx +++ b/packages/bruno-api-docs/src/pages/Overview/Overview.tsx @@ -1,19 +1,19 @@ import React, { useMemo } from 'react'; import type { OpenCollection } from '@opencollection/types'; import type { StructuredText } from '@opencollection/types/common/description'; -import { useMarkdownRenderer } from '../../hooks'; -import { getCollectionStats, hasCollectionConfiguration } from '../../utils/collectionOverview'; -import { scriptsArrayToObject } from '../../utils/schemaHelpers'; -import { getCollectionVariables } from '../../utils/request'; -import { AUTH_MODE_LABELS } from '../../constants'; +import { useMarkdownRenderer } from '@/hooks'; +import { getCollectionStats, hasCollectionConfiguration } from '@/utils/collectionOverview'; +import { scriptsArrayToObject } from '@/utils/schemaHelpers'; +import { getCollectionVariables } from '@/utils/request'; +import { AUTH_MODE_LABELS } from '@/constants'; import { CollectionStats } from '../../components/CollectionStats/CollectionStats'; import { CollectionConfiguration } from '../../components/OverviewCollectionConfiguration/CollectionConfiguration'; -import { EmptyState } from '../../ui/EmptyState/EmptyState'; +import { EmptyState } from '@/ui/EmptyState/EmptyState'; import { PageWrapper } from '../../components/PageWrapper/PageWrapper'; import { Heading } from '../../components/Heading/Heading'; import { Section } from '../../components/Section/Section'; import { ViewMore } from '../../components/ViewMore/ViewMore'; -import { BookIcon } from '../../assets/icons'; +import { BookIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; const getDocsContent = (docs: OpenCollection['docs']): string => { diff --git a/packages/bruno-api-docs/src/pages/Request/Request.tsx b/packages/bruno-api-docs/src/pages/Request/Request.tsx index fe87a88d..d2b79099 100644 --- a/packages/bruno-api-docs/src/pages/Request/Request.tsx +++ b/packages/bruno-api-docs/src/pages/Request/Request.tsx @@ -9,7 +9,7 @@ import { isWebSocketRequest, isGrpcRequest, type RequestItem -} from '../../utils/schemaHelpers'; +} from '@/utils/schemaHelpers'; import { getBodyView } from '@/utils/request'; import { EyeOffIcon } from '@/assets/icons'; import { Section } from '../../components/Section/Section'; @@ -20,7 +20,7 @@ import { PageWrapper } from '@/components/PageWrapper/PageWrapper'; import { UnsupportedRequest } from '../../components/UnsupportedRequest/UnsupportedRequest'; import { useRequestPageData } from '@/hooks/useRequestPageData'; import { RequestPageLayout, NAV_GROUP, NAV_LEVEL } from '@/components/RequestPageLayout/RequestPageLayout'; -import { GrpcRequest } from '../GrpcRequest/GrpcRequest'; +import { GrpcRequest } from '@/pages/GrpcRequest/GrpcRequest'; interface RequestProps { item: RequestItem; diff --git a/packages/bruno-api-docs/src/pages/Script/Script.tsx b/packages/bruno-api-docs/src/pages/Script/Script.tsx index 28fe4771..6909bdd3 100644 --- a/packages/bruno-api-docs/src/pages/Script/Script.tsx +++ b/packages/bruno-api-docs/src/pages/Script/Script.tsx @@ -1,11 +1,11 @@ import React, { useMemo } from 'react'; import type { OpenCollection } from '@opencollection/types'; import type { Item, ScriptFile } from '@opencollection/types/collection/item'; -import { getItemName } from '../../utils/schemaHelpers'; -import { buildBreadcrumbSegments } from '../../utils/common'; +import { getItemName } from '@/utils/schemaHelpers'; +import { buildBreadcrumbSegments } from '@/utils/common'; import { PageWrapper } from '../../components/PageWrapper/PageWrapper'; import { Heading } from '../../components/Heading/Heading'; -import { Breadcrumb, type BreadcrumbSegment } from '../../ui/Breadcrumb/Breadcrumb'; +import { Breadcrumb, type BreadcrumbSegment } from '@/ui/Breadcrumb/Breadcrumb'; import { Code } from '../../components/Code/Code'; import { StyledWrapper } from './StyledWrapper'; diff --git a/packages/bruno-api-docs/src/routing/hooks.ts b/packages/bruno-api-docs/src/routing/hooks.ts index 4bbae242..b4525218 100644 --- a/packages/bruno-api-docs/src/routing/hooks.ts +++ b/packages/bruno-api-docs/src/routing/hooks.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import { useLocation } from 'react-router-dom'; -import { useAppSelector } from '../store/hooks'; -import { selectDocsCollection } from '../store/slices/docs'; +import { useAppSelector } from '@/store/hooks'; +import { selectDocsCollection } from '@/store/slices/docs'; import { buildNavModel } from './navModel'; import { resolveSlug, type Resolution } from './resolve'; import type { NavModel } from './types'; diff --git a/packages/bruno-api-docs/src/runner/RequestExecutor.ts b/packages/bruno-api-docs/src/runner/RequestExecutor.ts index b1c92484..7d3bc722 100644 --- a/packages/bruno-api-docs/src/runner/RequestExecutor.ts +++ b/packages/bruno-api-docs/src/runner/RequestExecutor.ts @@ -1,11 +1,11 @@ import { Buffer } from 'buffer'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { RunRequestResponse } from './index'; -import { getHttpMethod, getRequestUrl, getHttpHeaders, getHttpBody, getRequestAuth, getHttpParams, type InternalHttpRequest } from '../utils/schemaHelpers'; -import { buildRequestUrl } from '../utils/pathParams'; +import { getHttpMethod, getRequestUrl, getHttpHeaders, getHttpBody, getRequestAuth, getHttpParams, type InternalHttpRequest } from '@/utils/schemaHelpers'; +import { buildRequestUrl } from '@/utils/pathParams'; import { classifyRequestError, DEFAULT_TIMEOUT_MS } from './classifyRequestError'; -import { detectContentTypeFromBytes, isByteFormatContentType } from '../utils/response'; -import { RESPONSE_LARGE_THRESHOLD } from '../constants'; +import { detectContentTypeFromBytes, isByteFormatContentType } from '@/utils/response'; +import { RESPONSE_LARGE_THRESHOLD } from '@/constants'; import stripJsonComments from 'strip-json-comments'; import { statusCodePhrase } from '@/utils/exampleResponse'; diff --git a/packages/bruno-api-docs/src/runner/index.spec.ts b/packages/bruno-api-docs/src/runner/index.spec.ts index c2683a80..8a30deef 100644 --- a/packages/bruno-api-docs/src/runner/index.spec.ts +++ b/packages/bruno-api-docs/src/runner/index.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { RequestRunner } from './index'; -import { parseYaml } from '../utils/yamlUtils'; +import { parseYaml } from '@/utils/yamlUtils'; // Minimal collection YAML with one POST request const collectionYaml = ` diff --git a/packages/bruno-api-docs/src/runner/index.ts b/packages/bruno-api-docs/src/runner/index.ts index f45c3165..67b3c1ea 100644 --- a/packages/bruno-api-docs/src/runner/index.ts +++ b/packages/bruno-api-docs/src/runner/index.ts @@ -2,20 +2,20 @@ import type { HttpRequest } from '@opencollection/types/requests/http'; import type { OpenCollection as OpenCollectionCollection } from '@opencollection/types'; import type { Environment } from '@opencollection/types/config/environments'; import { RequestExecutor } from './RequestExecutor'; -import ScriptRuntime from '../scripting/runtime/script-runtime'; -import type { RunRequestCallback } from '../scripting/utils/bru'; -import AssertRuntime, { type AssertionResult } from '../scripting/runtime/assert-runtime'; +import ScriptRuntime from '@/scripting/runtime/script-runtime'; +import type { RunRequestCallback } from '@/scripting/utils/bru'; +import AssertRuntime, { type AssertionResult } from '@/scripting/runtime/assert-runtime'; import { getTreePathFromCollectionToItem, mergeHeaders, mergeScripts, mergeAuth, interpolateVars, findItemByPath } from './utils'; import { getCollectionFolderRequestVariables } from './utils/variable-merger'; -import { coerceVariableValue, parseValueByDataType, type CoercedVariableValue } from '../utils/variableDataType'; -import { externalSecretValues, type ExternalSecretEntry } from '../utils/variableResolution'; +import { coerceVariableValue, parseValueByDataType, type CoercedVariableValue } from '@/utils/variableDataType'; +import { externalSecretValues, type ExternalSecretEntry } from '@/utils/variableResolution'; import type { Variables, JsonValue } from './utils/variable-interpolator'; import type { VariableValueOrVariants, VariableValueType } from '@opencollection/types/common/variables'; import { getRequestScripts, getRequestAssertions, scriptsArrayToObject, isHttpRequest, getItemType, getItemName, getHttpMethod, getRequestUrl, type InternalHttpRequest } from '@/utils/schemaHelpers'; -import { getItemUuid } from '../utils/itemUtils'; +import { getItemUuid } from '@/utils/itemUtils'; const MAX_RUN_REQUEST_DEPTH = 25; diff --git a/packages/bruno-api-docs/src/runner/req-mutations.spec.ts b/packages/bruno-api-docs/src/runner/req-mutations.spec.ts index 2d5ab241..a28a4074 100644 --- a/packages/bruno-api-docs/src/runner/req-mutations.spec.ts +++ b/packages/bruno-api-docs/src/runner/req-mutations.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi } from 'vitest'; import { RequestRunner } from './index'; -import { parseYaml } from '../utils/yamlUtils'; +import { parseYaml } from '@/utils/yamlUtils'; interface SentRequest { url?: string; diff --git a/packages/bruno-api-docs/src/runner/utils/request-merger.spec.ts b/packages/bruno-api-docs/src/runner/utils/request-merger.spec.ts index dfd0990f..9fe3f6a6 100644 --- a/packages/bruno-api-docs/src/runner/utils/request-merger.spec.ts +++ b/packages/bruno-api-docs/src/runner/utils/request-merger.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; import { mergeAuth } from './request-merger'; -import { getRequestAuth } from '../../utils/schemaHelpers'; +import { getRequestAuth } from '@/utils/schemaHelpers'; // A playground request keeps its auth on the http protocol block; folders/collection nest // it under `request.auth`. Auth is either a concrete object, the string 'inherit', or diff --git a/packages/bruno-api-docs/src/runner/utils/request-merger.ts b/packages/bruno-api-docs/src/runner/utils/request-merger.ts index 3f25ba33..372aef9c 100644 --- a/packages/bruno-api-docs/src/runner/utils/request-merger.ts +++ b/packages/bruno-api-docs/src/runner/utils/request-merger.ts @@ -12,8 +12,8 @@ import { scriptsArrayToObject, scriptsObjectToArray, type ScriptsObject -} from '../../utils/schemaHelpers'; -import { resolveInheritedAuth } from '../../utils/request'; +} from '@/utils/schemaHelpers'; +import { resolveInheritedAuth } from '@/utils/request'; /** * Merge headers from collection and folder hierarchy into the request diff --git a/packages/bruno-api-docs/src/runner/utils/tree-utils.spec.ts b/packages/bruno-api-docs/src/runner/utils/tree-utils.spec.ts index 06a97dc3..adacfc9a 100644 --- a/packages/bruno-api-docs/src/runner/utils/tree-utils.spec.ts +++ b/packages/bruno-api-docs/src/runner/utils/tree-utils.spec.ts @@ -3,7 +3,7 @@ import type { OpenCollection } from '@opencollection/types'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { Item } from '@opencollection/types/collection/item'; import { getTreePathFromCollectionToItem, findItemByPath } from './tree-utils'; -import { getItemName } from '../../utils/schemaHelpers'; +import { getItemName } from '@/utils/schemaHelpers'; // Two requests that are byte-identical in name+method+url but live in different folders. Only the // hydrated uuid tells them apart, so the ancestor walk must key on uuid — content matching would diff --git a/packages/bruno-api-docs/src/runner/utils/tree-utils.ts b/packages/bruno-api-docs/src/runner/utils/tree-utils.ts index 98ef8de0..d233e295 100644 --- a/packages/bruno-api-docs/src/runner/utils/tree-utils.ts +++ b/packages/bruno-api-docs/src/runner/utils/tree-utils.ts @@ -1,9 +1,9 @@ import type { OpenCollection } from '@opencollection/types'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { Item, Folder } from '@opencollection/types/collection/item'; -import { getItemName, getHttpMethod, getRequestUrl, isFolder, isHttpRequest } from '../../utils/schemaHelpers'; -import { getAncestorsByUuid } from '../../utils/fileUtils'; -import { getItemUuid } from '../../utils/itemUtils'; +import { getItemName, getHttpMethod, getRequestUrl, isFolder, isHttpRequest } from '@/utils/schemaHelpers'; +import { getAncestorsByUuid } from '@/utils/fileUtils'; +import { getItemUuid } from '@/utils/itemUtils'; /** * Find the folder ancestors from the collection root to a specific item (the item excluded). diff --git a/packages/bruno-api-docs/src/runner/utils/variable-interpolator.ts b/packages/bruno-api-docs/src/runner/utils/variable-interpolator.ts index ac354691..7b9caf58 100644 --- a/packages/bruno-api-docs/src/runner/utils/variable-interpolator.ts +++ b/packages/bruno-api-docs/src/runner/utils/variable-interpolator.ts @@ -1,7 +1,7 @@ import type { HttpRequest, HttpRequestHeader, HttpRequestParam } from '@opencollection/types/requests/http'; import { isPlainObject } from 'lodash-es'; -import { getRequestUrl, getHttpMethod, getHttpHeaders, getHttpBody, getHttpParams, getRequestAuth } from '../../utils/schemaHelpers'; -import { templateVariableGlobalRegex } from '../../utils/common'; +import { getRequestUrl, getHttpMethod, getHttpHeaders, getHttpBody, getHttpParams, getRequestAuth } from '@/utils/schemaHelpers'; +import { templateVariableGlobalRegex } from '@/utils/common'; import { mockDataFunctions } from './faker-functions'; export type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue }; diff --git a/packages/bruno-api-docs/src/runner/utils/variable-merger.ts b/packages/bruno-api-docs/src/runner/utils/variable-merger.ts index 7f3855c4..dbad126f 100644 --- a/packages/bruno-api-docs/src/runner/utils/variable-merger.ts +++ b/packages/bruno-api-docs/src/runner/utils/variable-merger.ts @@ -2,8 +2,8 @@ import type { OpenCollection } from '@opencollection/types'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { Variable } from '@opencollection/types/common/variables'; import { getTreePathFromCollectionToItem } from './tree-utils'; -import { isFolder, getRequestVariables } from '../../utils/schemaHelpers'; -import { coerceVariableValue } from '../../utils/variableDataType'; +import { isFolder, getRequestVariables } from '@/utils/schemaHelpers'; +import { coerceVariableValue } from '@/utils/variableDataType'; import type { Variables, JsonValue } from './variable-interpolator'; /** diff --git a/packages/bruno-api-docs/src/scripting/runtime/assert-runtime.ts b/packages/bruno-api-docs/src/scripting/runtime/assert-runtime.ts index 33dafcba..46c6e083 100644 --- a/packages/bruno-api-docs/src/scripting/runtime/assert-runtime.ts +++ b/packages/bruno-api-docs/src/scripting/runtime/assert-runtime.ts @@ -1,9 +1,9 @@ import * as chai from 'chai'; import type { Assertion } from '@opencollection/types/common/assertions'; -import Bru from '../utils/bru'; -import BrunoRequest from '../utils/bruno-request'; -import BrunoResponse from '../utils/bruno-response'; -import { executeQuickJsVm } from '../sandbox/quickjs'; +import Bru from '@/scripting/utils/bru'; +import BrunoRequest from '@/scripting/utils/bruno-request'; +import BrunoResponse from '@/scripting/utils/bruno-response'; +import { executeQuickJsVm } from '@/scripting/sandbox/quickjs'; const { expect } = chai; diff --git a/packages/bruno-api-docs/src/scripting/runtime/script-runtime.ts b/packages/bruno-api-docs/src/scripting/runtime/script-runtime.ts index 29f8432b..a605a664 100644 --- a/packages/bruno-api-docs/src/scripting/runtime/script-runtime.ts +++ b/packages/bruno-api-docs/src/scripting/runtime/script-runtime.ts @@ -1,10 +1,10 @@ import * as chai from 'chai'; -import Bru, { type RunRequestCallback } from '../utils/bru'; -import BrunoRequest from '../utils/bruno-request'; -import BrunoResponse from '../utils/bruno-response'; -import { executeQuickJsVmAsync } from '../sandbox/quickjs'; -import type { AssertionResult } from '../utils/test'; -import { createBruTestResultMethods, type BruTestResultMethods } from '../utils/test'; +import Bru, { type RunRequestCallback } from '@/scripting/utils/bru'; +import BrunoRequest from '@/scripting/utils/bruno-request'; +import BrunoResponse from '@/scripting/utils/bruno-response'; +import { executeQuickJsVmAsync } from '@/scripting/sandbox/quickjs'; +import type { AssertionResult } from '@/scripting/utils/test'; +import { createBruTestResultMethods, type BruTestResultMethods } from '@/scripting/utils/test'; interface RunScriptOptions { script: string; diff --git a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bru.ts b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bru.ts index b67f68d5..0d3bf012 100644 --- a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bru.ts +++ b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bru.ts @@ -1,8 +1,8 @@ import type { QuickJSContext } from 'quickjs-emscripten'; -import { cleanJson } from '../../../utils/common'; -import { marshallToVm } from '../utils'; +import { cleanJson } from '@/scripting/utils/common'; +import { marshallToVm } from '@/scripting/sandbox/quickjs/utils'; import { createShimHelpers } from './helpers'; -import type Bru from '../../../utils/bru'; +import type Bru from '@/scripting/utils/bru'; const messageOf = (err: unknown): string => (err instanceof Error ? err.message : String(err)); diff --git a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-request.ts b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-request.ts index ea0d04d8..54a3489e 100644 --- a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-request.ts +++ b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-request.ts @@ -1,5 +1,5 @@ import type { QuickJSContext } from 'quickjs-emscripten'; -import { marshallToVm } from '../utils'; +import { marshallToVm } from '@/scripting/sandbox/quickjs/utils'; import { createShimHelpers } from './helpers'; import type { HeaderEntry } from '@/scripting/utils/header-list'; import type BrunoRequest from '@/scripting/utils/bruno-request'; diff --git a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-response.ts b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-response.ts index c2d4c8db..e9e91160 100644 --- a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-response.ts +++ b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/bruno-response.ts @@ -1,5 +1,5 @@ import type { QuickJSContext, QuickJSHandle } from 'quickjs-emscripten'; -import { marshallToVm } from '../utils'; +import { marshallToVm } from '@/scripting/sandbox/quickjs/utils'; import { createShimHelpers } from './helpers'; import type { CallableResponse, QueryArg, JsonValue } from '@/scripting/utils/bruno-response'; import { READ_ONLY_METHODS, READ_ONLY_MESSAGE } from '@/scripting/utils/header-list'; diff --git a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/helpers.ts b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/helpers.ts index 6e871d82..4ca1f3e3 100644 --- a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/helpers.ts +++ b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/helpers.ts @@ -1,7 +1,7 @@ import type { QuickJSContext, QuickJSHandle } from 'quickjs-emscripten'; -import { marshallToVm } from '../utils'; -import type { HeaderEntry } from '../../../utils/header-list'; -import type { JsonValue } from '../../../utils/bruno-response'; +import { marshallToVm } from '@/scripting/sandbox/quickjs/utils'; +import type { HeaderEntry } from '@/scripting/utils/header-list'; +import type { JsonValue } from '@/scripting/utils/bruno-response'; export const createShimHelpers = (vm: QuickJSContext) => { const setValue = (target: QuickJSHandle, name: string, value: JsonValue) => { diff --git a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/test.ts b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/test.ts index 56b890c1..6847f59d 100644 --- a/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/test.ts +++ b/packages/bruno-api-docs/src/scripting/sandbox/quickjs/shims/test.ts @@ -1,4 +1,4 @@ -import { marshallToVm } from '../utils'; +import { marshallToVm } from '@/scripting/sandbox/quickjs/utils'; const addTestShimToContext = (vm: any, __brunoTestResults: any) => { const addResult = vm.newFunction('addResult', function (v: any) { diff --git a/packages/bruno-api-docs/src/scripting/utils/bru.ts b/packages/bruno-api-docs/src/scripting/utils/bru.ts index 572f50e2..891fa67f 100644 --- a/packages/bruno-api-docs/src/scripting/utils/bru.ts +++ b/packages/bruno-api-docs/src/scripting/utils/bru.ts @@ -1,6 +1,6 @@ import xmlFormat from 'xml-formatter'; -import { interpolate as interpolateString } from '../../runner/utils/variable-interpolator'; -import { VARIABLE_NAME_REGEX } from '../../constants/regex'; +import { interpolate as interpolateString } from '@/runner/utils/variable-interpolator'; +import { VARIABLE_NAME_REGEX } from '@/constants/regex'; import { addUnsupportedWarning } from './unsupported-warning'; import type { JsonValue } from './bruno-response'; diff --git a/packages/bruno-api-docs/src/scripting/utils/bruno-request.ts b/packages/bruno-api-docs/src/scripting/utils/bruno-request.ts index 8c54a9d2..c576014a 100644 --- a/packages/bruno-api-docs/src/scripting/utils/bruno-request.ts +++ b/packages/bruno-api-docs/src/scripting/utils/bruno-request.ts @@ -9,7 +9,7 @@ import { getRequestAuth, getItemName, type InternalHttpRequest -} from '../../utils/schemaHelpers'; +} from '@/utils/schemaHelpers'; import { createRequestHeaderList, type HeaderList } from './header-list'; import type { JsonValue } from './bruno-response'; import { addUnsupportedWarning } from './unsupported-warning'; diff --git a/packages/bruno-api-docs/src/scripting/utils/bruno-response.ts b/packages/bruno-api-docs/src/scripting/utils/bruno-response.ts index fe06d959..f80a11e7 100644 --- a/packages/bruno-api-docs/src/scripting/utils/bruno-response.ts +++ b/packages/bruno-api-docs/src/scripting/utils/bruno-response.ts @@ -2,7 +2,7 @@ import { Buffer } from 'buffer'; import { cloneDeep } from 'lodash-es'; import { get } from './query-get'; import { createResponseHeaderList, type HeaderList, type HeadersRecord } from './header-list'; -import type { RunRequestResponse } from '../../runner'; +import type { RunRequestResponse } from '@/runner'; export type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue }; diff --git a/packages/bruno-api-docs/src/store/slices/app.ts b/packages/bruno-api-docs/src/store/slices/app.ts index b84e158a..d09b6908 100644 --- a/packages/bruno-api-docs/src/store/slices/app.ts +++ b/packages/bruno-api-docs/src/store/slices/app.ts @@ -1,5 +1,5 @@ import { createSlice, type PayloadAction } from '@reduxjs/toolkit'; -import type { RootState } from '../store'; +import type { RootState } from '@/store/store'; export type CollectionStatus = 'idle' | 'loading' | 'succeeded' | 'failed'; diff --git a/packages/bruno-api-docs/src/store/slices/docs.ts b/packages/bruno-api-docs/src/store/slices/docs.ts index fbe72ece..5c0c2d55 100644 --- a/packages/bruno-api-docs/src/store/slices/docs.ts +++ b/packages/bruno-api-docs/src/store/slices/docs.ts @@ -1,9 +1,9 @@ import { createSlice, type PayloadAction } from '@reduxjs/toolkit'; import type { OpenCollection as OpenCollectionCollection } from '@opencollection/types'; import type { Item as OpenCollectionItem, Folder } from '@opencollection/types/collection/item'; -import type { RootState } from '../store'; -import { hydrateWithUUIDs, findAndUpdateItem } from '../../utils/fileUtils'; -import { isFolder } from '../../utils/schemaHelpers'; +import type { RootState } from '@/store/store'; +import { hydrateWithUUIDs, findAndUpdateItem } from '@/utils/fileUtils'; +import { isFolder } from '@/utils/schemaHelpers'; export interface DocsState { collection: OpenCollectionCollection | null; diff --git a/packages/bruno-api-docs/src/store/slices/env.ts b/packages/bruno-api-docs/src/store/slices/env.ts index 5600d39a..095bd789 100644 --- a/packages/bruno-api-docs/src/store/slices/env.ts +++ b/packages/bruno-api-docs/src/store/slices/env.ts @@ -1,5 +1,5 @@ import { createSlice, type PayloadAction } from '@reduxjs/toolkit'; -import type { RootState } from '../store'; +import type { RootState } from '@/store/store'; /** * Which environment the docs are viewing (`activeEnvName`) and whether resolved diff --git a/packages/bruno-api-docs/src/store/slices/playground.spec.ts b/packages/bruno-api-docs/src/store/slices/playground.spec.ts index 1f5f93ac..5538cb27 100644 --- a/packages/bruno-api-docs/src/store/slices/playground.spec.ts +++ b/packages/bruno-api-docs/src/store/slices/playground.spec.ts @@ -13,7 +13,7 @@ import reducer, { expandFolders, setPlaygroundVariable } from './playground'; -import { createOpenCollectionStore } from '../store'; +import { createOpenCollectionStore } from '@/store/store'; import type { OpenCollection as OpenCollectionCollection } from '@opencollection/types'; import type { HttpRequest } from '@opencollection/types/requests/http'; diff --git a/packages/bruno-api-docs/src/store/slices/playground.ts b/packages/bruno-api-docs/src/store/slices/playground.ts index 710ee035..8c62c83a 100644 --- a/packages/bruno-api-docs/src/store/slices/playground.ts +++ b/packages/bruno-api-docs/src/store/slices/playground.ts @@ -5,9 +5,9 @@ import type { Environment } from '@opencollection/types/config/environments'; import type { Item as OpenCollectionItem, Folder } from '@opencollection/types/collection/item'; import type { HttpRequest } from '@opencollection/types/requests/http'; import type { Variable, SecretVariable } from '@opencollection/types/common/variables'; -import type { RootState } from '../store'; -import { hydrateWithUUIDs, findAndUpdateItem } from '../../utils/fileUtils'; -import { isFolder, getRequestVariables } from '../../utils/schemaHelpers'; +import type { RootState } from '@/store/store'; +import { hydrateWithUUIDs, findAndUpdateItem } from '@/utils/fileUtils'; +import { isFolder, getRequestVariables } from '@/utils/schemaHelpers'; import type { ResponseBodyFormat } from '@/constants'; export type ViewMode = 'playground' | 'environments' | 'folder-settings' | 'collection-settings' | 'example'; diff --git a/packages/bruno-api-docs/src/store/slices/theme.ts b/packages/bruno-api-docs/src/store/slices/theme.ts index d2c94dec..9b675741 100644 --- a/packages/bruno-api-docs/src/store/slices/theme.ts +++ b/packages/bruno-api-docs/src/store/slices/theme.ts @@ -1,5 +1,5 @@ import { createSlice, type PayloadAction } from '@reduxjs/toolkit'; -import type { ThemeMode } from '../../theme/types'; +import type { ThemeMode } from '@/theme/types'; export const THEME_STORAGE_KEY = 'oc-docs.theme'; diff --git a/packages/bruno-api-docs/src/store/store.ts b/packages/bruno-api-docs/src/store/store.ts index a2787d00..8061c8cc 100644 --- a/packages/bruno-api-docs/src/store/store.ts +++ b/packages/bruno-api-docs/src/store/store.ts @@ -1,9 +1,9 @@ import { configureStore } from '@reduxjs/toolkit'; -import appReducer from '@slices/app'; -import docsReducer from '@slices/docs'; -import envReducer, { persistEnv } from '@slices/env'; -import playgroundReducer from '@slices/playground'; -import themeReducer, { persistThemeMode } from '@slices/theme'; +import appReducer from '@/store/slices/app'; +import docsReducer from '@/store/slices/docs'; +import envReducer, { persistEnv } from '@/store/slices/env'; +import playgroundReducer from '@/store/slices/playground'; +import themeReducer, { persistThemeMode } from '@/store/slices/theme'; export const createOpenCollectionStore = () => { const store = configureStore({ diff --git a/packages/bruno-api-docs/src/theme/applyTheme.ts b/packages/bruno-api-docs/src/theme/applyTheme.ts index 48f8588d..815940b9 100644 --- a/packages/bruno-api-docs/src/theme/applyTheme.ts +++ b/packages/bruno-api-docs/src/theme/applyTheme.ts @@ -1,4 +1,4 @@ -import { readPersistedMode } from '../store/slices/theme'; +import { readPersistedMode } from '@/store/slices/theme'; /** Set data-theme on the root element before first paint to avoid a flash. */ export function applyTheme(): void { diff --git a/packages/bruno-api-docs/src/theme/tokens/dark.ts b/packages/bruno-api-docs/src/theme/tokens/dark.ts index 56e07fc3..724e363c 100644 --- a/packages/bruno-api-docs/src/theme/tokens/dark.ts +++ b/packages/bruno-api-docs/src/theme/tokens/dark.ts @@ -1,4 +1,4 @@ -import type { Theme } from '../types'; +import type { Theme } from '@/theme/types'; interface Palette { primary: Record; diff --git a/packages/bruno-api-docs/src/theme/tokens/light.ts b/packages/bruno-api-docs/src/theme/tokens/light.ts index 79cf7ee2..07747c62 100644 --- a/packages/bruno-api-docs/src/theme/tokens/light.ts +++ b/packages/bruno-api-docs/src/theme/tokens/light.ts @@ -1,4 +1,4 @@ -import type { Theme } from '../types'; +import type { Theme } from '@/theme/types'; interface Palette { primary: Record; diff --git a/packages/bruno-api-docs/src/ui/Breadcrumb/Breadcrumb.tsx b/packages/bruno-api-docs/src/ui/Breadcrumb/Breadcrumb.tsx index 2b0bb1ce..cbc9c46b 100644 --- a/packages/bruno-api-docs/src/ui/Breadcrumb/Breadcrumb.tsx +++ b/packages/bruno-api-docs/src/ui/Breadcrumb/Breadcrumb.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Tooltip } from '../Tooltip/Tooltip'; +import { Tooltip } from '@/ui/Tooltip/Tooltip'; import { StyledWrapper } from './StyledWrapper'; export interface BreadcrumbSegment { diff --git a/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.spec.tsx b/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.spec.tsx index a0bdc29e..decb18af 100644 --- a/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.spec.tsx +++ b/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { getByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { getByTestId } from '@/test-utils/dom'; import Checkbox from './Checkbox'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.tsx b/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.tsx index e765bf4f..2d938a6c 100644 --- a/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.tsx +++ b/packages/bruno-api-docs/src/ui/Checkbox/Checkbox.tsx @@ -1,7 +1,7 @@ import type { ChangeEvent } from 'react'; import React from 'react'; import { StyledWrapper } from './StyledWrapper'; -import { CheckIcon } from '../../assets/icons'; +import { CheckIcon } from '@/assets/icons'; interface CheckboxProps { className?: string; diff --git a/packages/bruno-api-docs/src/ui/CodeEditor/CodeEditor.tsx b/packages/bruno-api-docs/src/ui/CodeEditor/CodeEditor.tsx index 17c023e2..6c377a15 100644 --- a/packages/bruno-api-docs/src/ui/CodeEditor/CodeEditor.tsx +++ b/packages/bruno-api-docs/src/ui/CodeEditor/CodeEditor.tsx @@ -1,13 +1,13 @@ import React, { useEffect, useRef, useState } from 'react'; import Editor, { type Monaco, type OnMount } from '@monaco-editor/react'; -import { useAppSelector } from '../../store/hooks'; -import { useResolvedVariables } from '../../hooks/useVariableResolver'; -import { CopyButton } from '../CopyButton/CopyButton'; -import { Portal } from '../Portal/Portal'; +import { useAppSelector } from '@/store/hooks'; +import { useResolvedVariables } from '@/hooks/useVariableResolver'; +import { CopyButton } from '@/ui/CopyButton/CopyButton'; +import { Portal } from '@/ui/Portal/Portal'; import { ensureScriptApiCompletions, setModelHints } from './scriptApiCompletions'; import { createVariableDecorator, type VariableDecorator } from './variableDecorations'; import { createVariableHover, type VariableHover } from './variableHoverWidget'; -import type { ScriptApiRoot } from '../../utils/scriptAutocomplete'; +import type { ScriptApiRoot } from '@/utils/scriptAutocomplete'; import { StyledWrapper } from './StyledWrapper'; type EditorInstance = Parameters[0]; diff --git a/packages/bruno-api-docs/src/ui/CodeEditor/scriptApiCompletions.ts b/packages/bruno-api-docs/src/ui/CodeEditor/scriptApiCompletions.ts index 301d967e..d5a0f472 100644 --- a/packages/bruno-api-docs/src/ui/CodeEditor/scriptApiCompletions.ts +++ b/packages/bruno-api-docs/src/ui/CodeEditor/scriptApiCompletions.ts @@ -1,6 +1,6 @@ import type { Monaco } from '@monaco-editor/react'; import type { editor, IDisposable, languages } from 'monaco-editor'; -import { getScriptApiCompletions, type ScriptApiRoot } from '../../utils/scriptAutocomplete'; +import { getScriptApiCompletions, type ScriptApiRoot } from '@/utils/scriptAutocomplete'; /** * Per-model API roots (`showHintsFor`). A Monaco completion provider is global diff --git a/packages/bruno-api-docs/src/ui/CodeEditor/variableDecorations.ts b/packages/bruno-api-docs/src/ui/CodeEditor/variableDecorations.ts index 60a2b1cf..699f9fa0 100644 --- a/packages/bruno-api-docs/src/ui/CodeEditor/variableDecorations.ts +++ b/packages/bruno-api-docs/src/ui/CodeEditor/variableDecorations.ts @@ -1,7 +1,7 @@ import type { Monaco } from '@monaco-editor/react'; import type { editor } from 'monaco-editor'; -import { classifyVariableToken } from '../../utils/variableHighlight'; -import { templateVariableGlobalRegex } from '../../utils/common'; +import { classifyVariableToken } from '@/utils/variableHighlight'; +import { templateVariableGlobalRegex } from '@/utils/common'; export interface VariableDecorator { refresh: () => void; diff --git a/packages/bruno-api-docs/src/ui/CodeEditor/variableHoverWidget.ts b/packages/bruno-api-docs/src/ui/CodeEditor/variableHoverWidget.ts index 49add2d7..333aa4ae 100644 --- a/packages/bruno-api-docs/src/ui/CodeEditor/variableHoverWidget.ts +++ b/packages/bruno-api-docs/src/ui/CodeEditor/variableHoverWidget.ts @@ -1,7 +1,7 @@ import type { Monaco } from '@monaco-editor/react'; import type { editor } from 'monaco-editor'; -import { HOVER_OPEN_MS, HOVER_CLOSE_MS } from '../../constants/ui'; -import { templateVariableGlobalRegex } from '../../utils/common'; +import { HOVER_OPEN_MS, HOVER_CLOSE_MS } from '@/constants/ui'; +import { templateVariableGlobalRegex } from '@/utils/common'; interface TokenHit { name: string; diff --git a/packages/bruno-api-docs/src/ui/CopyButton/CopyButton.spec.tsx b/packages/bruno-api-docs/src/ui/CopyButton/CopyButton.spec.tsx index 48f07f37..d0172073 100644 --- a/packages/bruno-api-docs/src/ui/CopyButton/CopyButton.spec.tsx +++ b/packages/bruno-api-docs/src/ui/CopyButton/CopyButton.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { getByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { getByTestId } from '@/test-utils/dom'; import { CopyButton } from './CopyButton'; describe('CopyButton', () => { diff --git a/packages/bruno-api-docs/src/ui/Dropdown/Dropdown.tsx b/packages/bruno-api-docs/src/ui/Dropdown/Dropdown.tsx index 21a1559f..af720fb7 100644 --- a/packages/bruno-api-docs/src/ui/Dropdown/Dropdown.tsx +++ b/packages/bruno-api-docs/src/ui/Dropdown/Dropdown.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useId, useRef, useState } from 'react'; -import { ChevronDownIcon } from '../../assets/icons'; -import { useClickOutside } from '../../hooks'; +import { ChevronDownIcon } from '@/assets/icons'; +import { useClickOutside } from '@/hooks'; import { StyledWrapper } from './StyledWrapper'; interface DropdownProps { diff --git a/packages/bruno-api-docs/src/ui/Field/Field.spec.tsx b/packages/bruno-api-docs/src/ui/Field/Field.spec.tsx index 97a29032..1ef7acde 100644 --- a/packages/bruno-api-docs/src/ui/Field/Field.spec.tsx +++ b/packages/bruno-api-docs/src/ui/Field/Field.spec.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; import { Field } from './Field'; -import { query, getByTestId } from '../../test-utils/dom'; +import { query, getByTestId } from '@/test-utils/dom'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/ui/Field/Input/Input.spec.tsx b/packages/bruno-api-docs/src/ui/Field/Input/Input.spec.tsx index c0d8cf14..9bcb8d90 100644 --- a/packages/bruno-api-docs/src/ui/Field/Input/Input.spec.tsx +++ b/packages/bruno-api-docs/src/ui/Field/Input/Input.spec.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; import { Input } from './Input'; -import { query } from '../../../test-utils/dom'; +import { query } from '@/test-utils/dom'; const noop = () => {}; diff --git a/packages/bruno-api-docs/src/ui/Field/Input/Input.tsx b/packages/bruno-api-docs/src/ui/Field/Input/Input.tsx index b88dd357..0cfbc141 100644 --- a/packages/bruno-api-docs/src/ui/Field/Input/Input.tsx +++ b/packages/bruno-api-docs/src/ui/Field/Input/Input.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { EyeIcon, EyeOffIcon } from '../../../assets/icons'; +import { EyeIcon, EyeOffIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; interface InputProps { diff --git a/packages/bruno-api-docs/src/ui/Field/Select/Select.spec.tsx b/packages/bruno-api-docs/src/ui/Field/Select/Select.spec.tsx index 17581fe2..26b406d4 100644 --- a/packages/bruno-api-docs/src/ui/Field/Select/Select.spec.tsx +++ b/packages/bruno-api-docs/src/ui/Field/Select/Select.spec.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { parse } from 'node-html-parser'; import { describe, it, expect } from 'vitest'; import { Select } from './Select'; -import { getByTestId } from '../../../test-utils/dom'; +import { getByTestId } from '@/test-utils/dom'; const OPTIONS = [ { value: 'a', label: 'Apple' }, diff --git a/packages/bruno-api-docs/src/ui/Field/Select/Select.tsx b/packages/bruno-api-docs/src/ui/Field/Select/Select.tsx index 586767cd..938b45a8 100644 --- a/packages/bruno-api-docs/src/ui/Field/Select/Select.tsx +++ b/packages/bruno-api-docs/src/ui/Field/Select/Select.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { CaretIcon } from '../../../assets/icons'; -import MenuDropdown from '../../MenuDropdown'; +import { CaretIcon } from '@/assets/icons'; +import MenuDropdown from '@/ui/MenuDropdown'; import { StyledWrapper } from './StyledWrapper'; export interface SelectOption { diff --git a/packages/bruno-api-docs/src/ui/IconButton/IconButton.tsx b/packages/bruno-api-docs/src/ui/IconButton/IconButton.tsx index 28294e1c..9eba9dad 100644 --- a/packages/bruno-api-docs/src/ui/IconButton/IconButton.tsx +++ b/packages/bruno-api-docs/src/ui/IconButton/IconButton.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { StyledWrapper } from './StyledWrapper'; -import Tooltip from '../Tooltip/Tooltip'; +import Tooltip from '@/ui/Tooltip/Tooltip'; export interface IconButtonProps extends React.ButtonHTMLAttributes { /** Accessible label — icon buttons have no visible text. */ diff --git a/packages/bruno-api-docs/src/ui/MenuDropdown/MenuDropdown.tsx b/packages/bruno-api-docs/src/ui/MenuDropdown/MenuDropdown.tsx index cf871d99..b6d84ca6 100644 --- a/packages/bruno-api-docs/src/ui/MenuDropdown/MenuDropdown.tsx +++ b/packages/bruno-api-docs/src/ui/MenuDropdown/MenuDropdown.tsx @@ -15,7 +15,7 @@ import type { MenuGroupStyle, MenuItemExtraProps } from './types'; -import cx from '../../utils/cx'; +import cx from '@/utils/cx'; const NAVIGATION_KEYS = ['ArrowDown', 'ArrowUp', 'Home', 'End', 'Escape']; const ACTION_KEYS = ['Enter', ' ']; diff --git a/packages/bruno-api-docs/src/ui/Modal/Modal.spec.tsx b/packages/bruno-api-docs/src/ui/Modal/Modal.spec.tsx index eb976daf..4537620e 100644 --- a/packages/bruno-api-docs/src/ui/Modal/Modal.spec.tsx +++ b/packages/bruno-api-docs/src/ui/Modal/Modal.spec.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect, vi } from 'vitest'; import { Modal } from './Modal'; -vi.mock('../Portal/Portal', () => ({ +vi.mock('@/ui/Portal/Portal', () => ({ Portal: ({ children }: { children: React.ReactNode }) => children })); diff --git a/packages/bruno-api-docs/src/ui/Modal/Modal.tsx b/packages/bruno-api-docs/src/ui/Modal/Modal.tsx index a17485e6..044badda 100644 --- a/packages/bruno-api-docs/src/ui/Modal/Modal.tsx +++ b/packages/bruno-api-docs/src/ui/Modal/Modal.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, type ReactNode } from 'react'; -import { Portal } from '../Portal/Portal'; -import { CloseIcon } from '../../assets/icons'; +import { Portal } from '@/ui/Portal/Portal'; +import { CloseIcon } from '@/assets/icons'; import { StyledWrapper } from './StyledWrapper'; interface ModalProps { diff --git a/packages/bruno-api-docs/src/ui/Popover/Popover.spec.tsx b/packages/bruno-api-docs/src/ui/Popover/Popover.spec.tsx index 9491975d..ae0775d5 100644 --- a/packages/bruno-api-docs/src/ui/Popover/Popover.spec.tsx +++ b/packages/bruno-api-docs/src/ui/Popover/Popover.spec.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; import { Popover } from './Popover'; describe('Popover', () => { diff --git a/packages/bruno-api-docs/src/ui/Popover/Popover.tsx b/packages/bruno-api-docs/src/ui/Popover/Popover.tsx index 7f889ea9..b66fea16 100644 --- a/packages/bruno-api-docs/src/ui/Popover/Popover.tsx +++ b/packages/bruno-api-docs/src/ui/Popover/Popover.tsx @@ -8,9 +8,9 @@ import React, { type ReactElement, type ReactNode } from 'react'; -import { Portal } from '../Portal/Portal'; -import { useEscapeKey } from '../../hooks/useEscapeKey'; -import { computeAnchoredPosition, type AnchoredPosition } from '../../utils/anchoredPosition'; +import { Portal } from '@/ui/Portal/Portal'; +import { useEscapeKey } from '@/hooks/useEscapeKey'; +import { computeAnchoredPosition, type AnchoredPosition } from '@/utils/anchoredPosition'; import { StyledWrapper } from './StyledWrapper'; interface PopoverProps { diff --git a/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.spec.tsx b/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.spec.tsx index dedda092..1532b63d 100644 --- a/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.spec.tsx +++ b/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { describe, it, expect } from 'vitest'; import { SecretValue } from './SecretValue'; -import { SECRET_MASK } from '../../constants'; +import { SECRET_MASK } from '@/constants'; describe('SecretValue', () => { it('masks the value by default and never renders the real value', () => { diff --git a/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.tsx b/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.tsx index b1b088ed..b0e3d099 100644 --- a/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.tsx +++ b/packages/bruno-api-docs/src/ui/SecretValue/SecretValue.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; -import { SECRET_MASK } from '../../constants'; -import { EyeIcon, EyeOffIcon } from '../../assets/icons'; -import { cx } from '../../utils/cx'; +import { SECRET_MASK } from '@/constants'; +import { EyeIcon, EyeOffIcon } from '@/assets/icons'; +import { cx } from '@/utils/cx'; import { StyledWrapper } from './StyledWrapper'; interface SecretValueProps { diff --git a/packages/bruno-api-docs/src/ui/Tabs/Tabs.spec.tsx b/packages/bruno-api-docs/src/ui/Tabs/Tabs.spec.tsx index d44188e9..968d366c 100644 --- a/packages/bruno-api-docs/src/ui/Tabs/Tabs.spec.tsx +++ b/packages/bruno-api-docs/src/ui/Tabs/Tabs.spec.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; import { Tabs, type Tab } from './Tabs'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { query, getByTestId, queryByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { query, getByTestId, queryByTestId } from '@/test-utils/dom'; const tabs: Tab[] = [ { id: 'a', label: 'Alpha', count: 2, content:

alpha content

}, diff --git a/packages/bruno-api-docs/src/ui/Tabs/Tabs.tsx b/packages/bruno-api-docs/src/ui/Tabs/Tabs.tsx index 80d3d775..18888c9d 100644 --- a/packages/bruno-api-docs/src/ui/Tabs/Tabs.tsx +++ b/packages/bruno-api-docs/src/ui/Tabs/Tabs.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useRef, useState, type ReactNode } from 'react'; -import MenuDropdown from '../MenuDropdown/MenuDropdown'; -import type { MenuDropdownHandle } from '../MenuDropdown/types'; -import { ChevronsRightIcon, DotIcon } from '../../assets/icons'; +import MenuDropdown from '@/ui/MenuDropdown/MenuDropdown'; +import type { MenuDropdownHandle } from '@/ui/MenuDropdown/types'; +import { ChevronsRightIcon, DotIcon } from '@/assets/icons'; import { useResponsiveTabs } from './useResponsiveTabs'; import { StyledWrapper } from './StyledWrapper'; import cx from '@/utils/cx'; diff --git a/packages/bruno-api-docs/src/ui/Tooltip/Tooltip.tsx b/packages/bruno-api-docs/src/ui/Tooltip/Tooltip.tsx index 9fc93b5c..377dcb04 100644 --- a/packages/bruno-api-docs/src/ui/Tooltip/Tooltip.tsx +++ b/packages/bruno-api-docs/src/ui/Tooltip/Tooltip.tsx @@ -8,8 +8,8 @@ import React, { type ReactElement, type ReactNode } from 'react'; -import { Portal } from '../Portal/Portal'; -import { GAP, VIEWPORT_MARGIN } from '../../constants/ui'; +import { Portal } from '@/ui/Portal/Portal'; +import { GAP, VIEWPORT_MARGIN } from '@/constants/ui'; import { StyledWrapper } from './StyledWrapper'; interface TooltipProps { diff --git a/packages/bruno-api-docs/src/ui/WarningBanner/WarningBanner.spec.tsx b/packages/bruno-api-docs/src/ui/WarningBanner/WarningBanner.spec.tsx index c9cffaa0..673c4dad 100644 --- a/packages/bruno-api-docs/src/ui/WarningBanner/WarningBanner.spec.tsx +++ b/packages/bruno-api-docs/src/ui/WarningBanner/WarningBanner.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { describe, it, expect } from 'vitest'; -import { useRenderToDom } from '../../hooks/useRenderToDom'; -import { getByTestId, queryByTestId } from '../../test-utils/dom'; +import { useRenderToDom } from '@/hooks/useRenderToDom'; +import { getByTestId, queryByTestId } from '@/test-utils/dom'; import WarningBanner from './WarningBanner'; const SET_MAX_REDIRECTS = 'req.setMaxRedirects is not currently supported in the Bruno playground. Please use the Bruno desktop app.'; diff --git a/packages/bruno-api-docs/src/utils/anchoredPosition.ts b/packages/bruno-api-docs/src/utils/anchoredPosition.ts index 581ced9d..9a03969f 100644 --- a/packages/bruno-api-docs/src/utils/anchoredPosition.ts +++ b/packages/bruno-api-docs/src/utils/anchoredPosition.ts @@ -1,4 +1,4 @@ -import { GAP, VIEWPORT_MARGIN } from '../constants/ui'; +import { GAP, VIEWPORT_MARGIN } from '@/constants/ui'; // Clamp `value` to [min, max]. The Math.max(min, max) guards an inverted range: when the panel is // larger than the space available (max < min), the result pins to `min` instead of flipping the bounds. diff --git a/packages/bruno-api-docs/src/utils/codeSnippets.ts b/packages/bruno-api-docs/src/utils/codeSnippets.ts index f98b097d..13b03f5b 100644 --- a/packages/bruno-api-docs/src/utils/codeSnippets.ts +++ b/packages/bruno-api-docs/src/utils/codeSnippets.ts @@ -2,7 +2,7 @@ import { HTTPSnippet, type HarRequest } from '@mintlify/httpsnippet'; import type { HttpRequestBody, HttpRequestBodyVariant } from '@opencollection/types/requests/http'; import type { Auth } from '@opencollection/types/common/auth'; import { selectBodyVariant } from './request'; -import { AUTH_TYPES, BODY_TYPES, CONTENT_TYPES } from '../constants'; +import { AUTH_TYPES, BODY_TYPES, CONTENT_TYPES } from '@/constants'; import { templateVariableGlobalRegex } from './common'; export interface SnippetHeader { diff --git a/packages/bruno-api-docs/src/utils/common.ts b/packages/bruno-api-docs/src/utils/common.ts index 377fcf55..13070e3c 100644 --- a/packages/bruno-api-docs/src/utils/common.ts +++ b/packages/bruno-api-docs/src/utils/common.ts @@ -1,9 +1,9 @@ import { customAlphabet } from 'nanoid'; import type { OpenCollection } from '@opencollection/types'; import type { Item } from '@opencollection/types/collection/item'; -import type { BreadcrumbSegment } from '../ui/Breadcrumb/Breadcrumb'; +import type { BreadcrumbSegment } from '@/ui/Breadcrumb/Breadcrumb'; import { getItemName } from './schemaHelpers'; -import { TEMPLATE_VARIABLE_BODY_PATTERN, TEMPLATE_VARIABLE_SOURCE_PATTERN } from '../constants'; +import { TEMPLATE_VARIABLE_BODY_PATTERN, TEMPLATE_VARIABLE_SOURCE_PATTERN } from '@/constants'; // a customized version of nanoid without using _ and - export const uuid = () => { diff --git a/packages/bruno-api-docs/src/utils/dataFormatter.ts b/packages/bruno-api-docs/src/utils/dataFormatter.ts index 323af5cd..d8a84aa3 100644 --- a/packages/bruno-api-docs/src/utils/dataFormatter.ts +++ b/packages/bruno-api-docs/src/utils/dataFormatter.ts @@ -5,7 +5,7 @@ import xmlFormat from 'xml-formatter'; import fastJsonFormat from 'fast-json-format'; import prettierFormat from 'prettier/standalone'; import parserBabel from 'prettier/parser-babel'; -import type { RunRequestResponse } from '../runner'; +import type { RunRequestResponse } from '@/runner'; import { getResponseSize } from './response'; const applyJSONPathFilter = (data: RunRequestResponse['data'], filter: string): unknown => { diff --git a/packages/bruno-api-docs/src/utils/environments.ts b/packages/bruno-api-docs/src/utils/environments.ts index d10a5f91..fbd735c0 100644 --- a/packages/bruno-api-docs/src/utils/environments.ts +++ b/packages/bruno-api-docs/src/utils/environments.ts @@ -1,6 +1,6 @@ import type { Environment } from '@opencollection/types/config/environments'; import type { Variable, VariableValueType } from '@opencollection/types/common/variables'; -import { MANAGER_LABELS } from '../constants'; +import { MANAGER_LABELS } from '@/constants'; import { getDescription, getVariableTypeLabel } from './request'; import { descriptionText, resolveDescription } from './description'; import { isSecretVariable, unwrapVariableValue, type ExternalSecretEntry } from './variableResolution'; diff --git a/packages/bruno-api-docs/src/utils/exampleResponse.ts b/packages/bruno-api-docs/src/utils/exampleResponse.ts index 9a1529f4..a317cd78 100644 --- a/packages/bruno-api-docs/src/utils/exampleResponse.ts +++ b/packages/bruno-api-docs/src/utils/exampleResponse.ts @@ -1,4 +1,4 @@ -import { RESPONSE_LANGUAGE, RESPONSE_CONTENT_TYPE, STATUS_CODE_PHRASES } from '../constants'; +import { RESPONSE_LANGUAGE, RESPONSE_CONTENT_TYPE, STATUS_CODE_PHRASES } from '@/constants'; /** Byte length of a response body (UTF-8 aware). */ export const computeBodySize = (data: string | undefined): number => { diff --git a/packages/bruno-api-docs/src/utils/request.spec.ts b/packages/bruno-api-docs/src/utils/request.spec.ts index 19152c0f..3049d59a 100644 --- a/packages/bruno-api-docs/src/utils/request.spec.ts +++ b/packages/bruno-api-docs/src/utils/request.spec.ts @@ -23,7 +23,7 @@ import { getShortMethod, getVariableType } from './request'; -import { AUTH_MODE_LABELS } from '../constants'; +import { AUTH_MODE_LABELS } from '@/constants'; import { COLLECTION_ROOT_CRUMB } from './common'; describe('requestAuth', () => { diff --git a/packages/bruno-api-docs/src/utils/request.ts b/packages/bruno-api-docs/src/utils/request.ts index f31e41aa..68989361 100644 --- a/packages/bruno-api-docs/src/utils/request.ts +++ b/packages/bruno-api-docs/src/utils/request.ts @@ -28,7 +28,7 @@ import { import { getItemUuid } from './itemUtils'; import { isSecretVariable, unwrapVariableValue } from './variableResolution'; import { COLLECTION_ROOT_CRUMB } from './common'; -import { AUTH_MODE_LABELS, BODY_CONTENT_TYPE, BODY_LANGUAGE } from '../constants'; +import { AUTH_MODE_LABELS, BODY_CONTENT_TYPE, BODY_LANGUAGE } from '@/constants'; import type { InheritedSource, ResolvedAuth, diff --git a/packages/bruno-api-docs/src/utils/response.ts b/packages/bruno-api-docs/src/utils/response.ts index 1f7e1478..fa8c57d2 100644 --- a/packages/bruno-api-docs/src/utils/response.ts +++ b/packages/bruno-api-docs/src/utils/response.ts @@ -1,5 +1,5 @@ import { Buffer } from 'buffer'; -import type { RunRequestResponse } from '../runner'; +import type { RunRequestResponse } from '@/runner'; import { type ResponseBodyFormat, type ResponseBodyFormatViewData, @@ -17,9 +17,9 @@ import { DATA_URL_PREFIX_PATTERN, NON_BASE64_CHARS_PATTERN, RESPONSE_FORMAT_RULES -} from '../constants'; +} from '@/constants'; -export type { ResponseBodyFormat } from '../constants'; +export type { ResponseBodyFormat } from '@/constants'; // Normalize a response's content-type header into a canonical MIME type, or '' when absent. export function getContentType(headers: RunRequestResponse['headers']): string { diff --git a/packages/bruno-api-docs/src/utils/schemaHelpers.ts b/packages/bruno-api-docs/src/utils/schemaHelpers.ts index 5764148c..806efca7 100644 --- a/packages/bruno-api-docs/src/utils/schemaHelpers.ts +++ b/packages/bruno-api-docs/src/utils/schemaHelpers.ts @@ -18,7 +18,7 @@ import type { GraphQLRequest } from '@opencollection/types/requests/graphql'; import type { GrpcRequest, GrpcRequestDetails, GrpcMetadata, GrpcMethodType } from '@opencollection/types/requests/grpc'; import type { WebSocketRequest } from '@opencollection/types/requests/websocket'; import type { Script, Scripts, ScriptType } from '@opencollection/types/common/scripts'; -import { PROTOCOL_BADGE_LABELS } from '../constants'; +import { PROTOCOL_BADGE_LABELS } from '@/constants'; export type SupportedRequestItem = HttpRequest | GraphQLRequest | GrpcRequest; diff --git a/packages/bruno-api-docs/src/utils/variableAutocomplete.ts b/packages/bruno-api-docs/src/utils/variableAutocomplete.ts index 1d3c4235..90e6499a 100644 --- a/packages/bruno-api-docs/src/utils/variableAutocomplete.ts +++ b/packages/bruno-api-docs/src/utils/variableAutocomplete.ts @@ -1,4 +1,4 @@ -import { mockDataFunctions } from '../runner/utils/faker-functions'; +import { mockDataFunctions } from '@/runner/utils/faker-functions'; /** The `$`-prefixed mock/dynamic function hints, e.g. `$randomUUID` (Bruno's MOCK_DATA_HINTS). */ const MOCK_HINTS = Object.keys(mockDataFunctions).map((key) => `$${key}`); diff --git a/packages/bruno-api-docs/src/utils/variableHighlight.ts b/packages/bruno-api-docs/src/utils/variableHighlight.ts index af10002e..f137b7da 100644 --- a/packages/bruno-api-docs/src/utils/variableHighlight.ts +++ b/packages/bruno-api-docs/src/utils/variableHighlight.ts @@ -1,4 +1,4 @@ -import { mockDataFunctions } from '../runner/utils/faker-functions'; +import { mockDataFunctions } from '@/runner/utils/faker-functions'; export type VariableTokenClass = 'variable-valid' | 'variable-invalid' | 'variable-prompt'; diff --git a/packages/bruno-api-docs/src/utils/variableResolution.ts b/packages/bruno-api-docs/src/utils/variableResolution.ts index eec06136..54eaaea6 100644 --- a/packages/bruno-api-docs/src/utils/variableResolution.ts +++ b/packages/bruno-api-docs/src/utils/variableResolution.ts @@ -6,7 +6,7 @@ import type { VariableValueType } from '@opencollection/types/common/variables'; import { isTemplateVariable, templateVariableGlobalRegex } from './common'; -import { VARIABLE_NAME_REGEX } from '../constants/regex'; +import { VARIABLE_NAME_REGEX } from '@/constants/regex'; /** * Pure, DOM-free variable resolution for read-only display. Kept separate from