From 62cf4139d7597cd9efc246aa2e86156649b65caa Mon Sep 17 00:00:00 2001 From: Bijin A B Date: Wed, 3 Dec 2025 09:44:50 +0530 Subject: [PATCH] chore: repo wide lint fixes --- eslint.config.js | 194 ++--- packages/bruno-app/babel.config.js | 2 +- packages/bruno-app/jest.config.js | 8 +- packages/bruno-app/public/theme/dark.js | 4 +- packages/bruno-app/public/theme/light.js | 4 +- .../src/components/BrunoSupport/index.js | 2 +- .../src/components/CodeEditor/index.js | 8 +- .../src/components/CodeEditor/index.spec.js | 14 +- .../Auth/ApiKeyAuth/index.js | 20 +- .../CollectionSettings/Auth/AuthMode/index.js | 2 +- .../CollectionSettings/Auth/NTLMAuth/index.js | 12 +- .../CollectionSettings/Auth/OAuth2/index.js | 2 +- .../CollectionSettings/Auth/index.js | 3 +- .../ClientCertSettings/index.js | 30 +- .../CollectionSettings/Docs/index.js | 24 +- .../CollectionSettings/Headers/index.js | 6 +- .../CollectionSettings/Overview/Info/index.js | 16 +- .../Overview/RequestsNotLoaded/index.js | 12 +- .../CollectionSettings/Overview/index.js | 12 +- .../CollectionSettings/ProxySettings/index.js | 8 +- .../Vars/VarsTable/index.js | 3 +- .../Cookies/ModifyCookieModal/index.js | 6 +- .../bruno-app/src/components/Cookies/index.js | 2 +- .../Console/DebugTab/StyledWrapper.js | 2 +- .../Devtools/Console/DebugTab/index.js | 22 +- .../ErrorDetailsPanel/StyledWrapper.js | 2 +- .../Console/ErrorDetailsPanel/index.js | 48 +- .../Console/NetworkTab/StyledWrapper.js | 2 +- .../Devtools/Console/NetworkTab/index.js | 78 +- .../RequestDetailsPanel/StyledWrapper.js | 2 +- .../Console/RequestDetailsPanel/index.js | 26 +- .../Devtools/Console/StyledWrapper.js | 2 +- .../src/components/Devtools/Console/index.js | 104 ++- .../src/components/Devtools/index.js | 10 +- .../Environments/EnvironmentSelector/index.js | 8 +- .../CopyEnvironment/index.js | 4 +- .../CreateEnvironment/index.js | 12 +- .../DeleteEnvironment/index.js | 2 +- .../EnvironmentVariables/index.js | 8 +- .../EnvironmentList/index.js | 10 +- .../RenameEnvironment/index.js | 6 +- .../src/components/ErrorCapture/index.js | 14 +- .../src/components/FilePickerEditor/index.js | 4 +- .../FolderSettings/Auth/StyledWrapper.js | 2 +- .../components/FolderSettings/Auth/index.js | 9 +- .../FolderSettings/AuthMode/StyledWrapper.js | 2 +- .../FolderSettings/AuthMode/index.js | 2 +- .../FolderSettings/Headers/index.js | 6 +- .../FolderSettings/Vars/VarsTable/index.js | 3 +- .../src/components/FolderSettings/index.js | 2 +- .../CopyEnvironment/index.js | 4 +- .../CreateEnvironment/index.js | 6 +- .../DeleteEnvironment/index.js | 2 +- .../EnvironmentVariables/index.js | 2 +- .../EnvironmentList/index.js | 11 +- .../RenameEnvironment/index.js | 6 +- .../GlobalSearchModal/StyledWrapper.js | 2 +- .../src/components/GlobalSearchModal/index.js | 77 +- .../GlobalSearchModal/utils/searchUtils.js | 28 +- .../src/components/Help/StyledWrapper.js | 6 +- .../bruno-app/src/components/Help/index.js | 6 +- .../src/components/Icons/Dot/index.js | 19 +- .../src/components/Icons/Grpc/index.js | 64 +- .../src/components/Icons/Help/index.js | 6 +- .../Icons/IconSidebarToggle/index.js | 2 +- .../src/components/Icons/OpenAPILogo/index.js | 138 ++-- .../src/components/MultiLineEditor/index.js | 8 +- .../src/components/Notifications/index.js | 151 ++-- .../components/PathDisplay/StyledWrapper.js | 2 +- .../src/components/PathDisplay/index.js | 8 +- .../Preferences/Display/Font/index.js | 4 +- .../components/Preferences/Display/index.js | 22 +- .../Preferences/ProxySettings/index.js | 6 +- .../Assertions/AssertionRow/index.js | 8 +- .../RequestPane/Assertions/index.js | 52 +- .../RequestPane/Auth/ApiKeyAuth/index.js | 24 +- .../RequestPane/Auth/AwsV4Auth/index.js | 2 +- .../RequestPane/Auth/BasicAuth/index.js | 2 +- .../RequestPane/Auth/BearerAuth/index.js | 2 +- .../RequestPane/Auth/DigestAuth/index.js | 2 +- .../RequestPane/Auth/NTLMAuth/index.js | 4 +- .../OAuth2/AdditionalParams/StyledWrapper.js | 4 +- .../Auth/OAuth2/AdditionalParams/index.js | 127 ++-- .../Auth/OAuth2/AuthorizationCode/index.js | 73 +- .../Auth/OAuth2/ClientCredentials/index.js | 94 +-- .../Auth/OAuth2/GrantTypeSelector/index.js | 46 +- .../Auth/OAuth2/Implicit/StyledWrapper.js | 2 +- .../RequestPane/Auth/OAuth2/Implicit/index.js | 12 +- .../Auth/OAuth2/Implicit/inputsConfig.js | 2 +- .../Auth/OAuth2/Oauth2ActionButtons/index.js | 86 +-- .../Auth/OAuth2/Oauth2TokenViewer/index.js | 65 +- .../Auth/OAuth2/PasswordCredentials/index.js | 99 +-- .../RequestPane/Auth/OAuth2/index.js | 1 - .../RequestPane/Auth/WsseAuth/index.js | 2 +- .../src/components/RequestPane/Auth/index.js | 6 +- .../components/RequestPane/FileBody/index.js | 14 +- .../RequestPane/FormUrlEncodedParams/index.js | 101 ++- .../RequestPane/GraphQLVariables/index.js | 2 +- .../RequestPane/GrpcBody/StyledWrapper.js | 2 +- .../components/RequestPane/GrpcBody/index.js | 8 +- .../GrpcQueryUrl/MethodDropdown/index.js | 1 - .../RequestPane/GrpcQueryUrl/index.js | 4 +- .../GrpcAuth/GrpcAuthMode/index.js | 4 +- .../GrpcRequestPane/GrpcAuth/index.js | 6 +- .../RequestPane/GrpcRequestPane/index.js | 2 +- .../RequestPane/HttpRequestPane/index.js | 12 +- .../RequestPane/MultipartFormParams/index.js | 151 ++-- .../QueryEditor/onHasCompletion.js | 8 +- .../RequestPane/QueryParams/index.js | 7 +- .../QueryUrl/HttpMethodSelector/index.js | 10 +- .../QueryUrl/HttpMethodSelector/index.spec.js | 92 +-- .../RequestBody/RequestBodyMode/index.js | 144 ++-- .../RequestPane/RequestBody/index.js | 2 +- .../RequestPane/RequestHeaders/index.js | 28 +- .../RequestPane/Settings/Tags/index.js | 10 +- .../Settings/ToggleSelector/index.js | 14 +- .../components/RequestPane/Settings/index.js | 2 +- .../RequestPane/Vars/VarsTable/index.js | 21 +- .../RequestTabPanel/FolderNotFound/index.js | 2 +- .../RequestTabPanel/RequestIsLoading/index.js | 74 +- .../RequestTabPanel/RequestNotLoaded/index.js | 94 +-- .../CollectionToolBar/StyledWrapper.js | 2 +- .../RequestTabs/CollectionToolBar/index.js | 2 +- .../RequestTabs/RequestTab/CloseTabIcon.js | 3 +- .../RequestTabs/RequestTab/SpecialTab.js | 2 +- .../RequestTabs/RequestTab/index.js | 5 +- .../src/components/RequestTabs/index.js | 2 +- .../ResponsePane/ClearTimeline/index.js | 2 +- .../GrpcStatusCode/StyledWrapper.js | 2 +- .../get-grpc-status-code-phrase.js | 2 +- .../GrpcResponsePane/GrpcStatusCode/index.js | 4 +- .../LargeResponseWarning/index.js | 4 +- .../QueryResult/QueryResultFilter/index.js | 6 +- .../ResponsePane/QueryResult/index.js | 6 +- .../ResponseLayoutToggle/StyledWrapper.js | 2 +- .../ResponseLayoutToggle/index.js | 8 +- .../ResponseLayoutToggle/index.spec.js | 14 +- .../ResponseSize/ResponseSize.spec.js | 4 +- .../ResponsePane/ResponseSize/index.js | 1 - .../ResponsePane/RunnerTimeline/index.js | 4 +- .../ResponsePane/ScriptError/StyledWrapper.js | 2 +- .../ResponsePane/ScriptError/index.js | 19 +- .../ResponsePane/ScriptErrorIcon/index.js | 6 +- .../SkippedRequest/StyledWrapper.js | 2 +- .../ResponsePane/SkippedRequest/index.js | 2 +- .../StatusCode/get-status-code-phrase.js | 2 +- .../ResponsePane/TestResults/index.js | 12 +- .../Timeline/GrpcTimelineItem/index.js | 112 ++- .../TimelineItem/Common/Body/index.js | 58 +- .../TimelineItem/Common/Headers/index.js | 14 +- .../TimelineItem/Common/Method/index.js | 8 +- .../TimelineItem/Common/Status/index.js | 6 +- .../TimelineItem/Common/Time/index.js | 48 +- .../Timeline/TimelineItem/Network/index.js | 17 +- .../Timeline/TimelineItem/Request/index.js | 17 +- .../Timeline/TimelineItem/Response/index.js | 32 +- .../Timeline/TimelineItem/index.js | 20 +- .../components/ResponsePane/Timeline/index.js | 23 +- .../src/components/ResponsePane/index.js | 26 +- .../RunnerResults/ResponsePane/index.js | 16 +- .../RunConfigurationPanel/StyledWrapper.jsx | 54 +- .../RunConfigurationPanel/index.jsx | 62 +- .../RunnerResults/RunnerTags/index.jsx | 20 +- .../src/components/RunnerResults/index.jsx | 151 ++-- .../SecuritySettings/JsSandboxMode/index.js | 2 +- .../JsSandboxModeModal/index.js | 6 +- .../src/components/SecuritySettings/index.js | 6 +- .../SensitiveFieldWarning/StyledWrapper.js | 2 +- .../components/SensitiveFieldWarning/index.js | 4 +- .../Collection/CloneCollection/index.js | 29 +- .../CloneCollectionItem/StyledWrapper.js | 2 +- .../CloneCollectionItem/index.js | 52 +- .../CollectionItemDragPreview/index.js | 10 +- .../CollectionItemIcon/index.js | 6 +- .../CollectionItemInfo/index.js | 64 +- .../DeleteCollectionItem/index.js | 2 +- .../CodeView/StyledWrapper.js | 10 +- .../CodeViewToolbar/StyledWrapper.js | 42 +- .../GenerateCodeItem/CodeViewToolbar/index.js | 2 +- .../GenerateCodeItem/StyledWrapper.js | 6 +- .../CollectionItem/GenerateCodeItem/index.js | 4 +- .../GenerateCodeItem/utils/interpolation.js | 2 +- .../utils/interpolation.spec.js | 2 +- .../utils/snippet-generator.js | 2 +- .../utils/snippet-generator.spec.js | 3 +- .../RenameCollectionItem/StyledWrapper.js | 2 +- .../RenameCollectionItem/index.js | 44 +- .../CollectionItem/RunCollectionItem/index.js | 53 +- .../Collection/CollectionItem/index.js | 36 +- .../Collection/RemoveCollection/index.js | 2 +- .../Collection/RenameCollection/index.js | 4 +- .../Sidebar/Collections/Collection/index.js | 43 +- .../Sidebar/CreateCollection/index.js | 4 +- .../components/Sidebar/GoldenEdition/index.js | 9 +- .../Sidebar/NewFolder/StyledWrapper.js | 2 +- .../src/components/Sidebar/NewFolder/index.js | 50 +- .../Sidebar/NewRequest/StyledWrapper.js | 2 +- .../components/Sidebar/NewRequest/index.js | 5 +- .../src/components/Sidebar/TitleBar/index.js | 4 +- .../src/components/SingleLineEditor/index.js | 4 +- .../src/components/StatusBar/StyledWrapper.js | 2 +- .../src/components/StatusBar/index.js | 16 +- .../src/components/StatusDot/index.js | 3 +- .../src/components/StopWatch/index.js | 12 +- .../bruno-app/src/components/Tab/index.js | 10 +- .../bruno-app/src/components/Table/index.js | 3 +- .../src/components/TagList/StyledWrapper.js | 2 +- .../bruno-app/src/components/TagList/index.js | 2 +- .../components/ToggleSwitch/StyledWrapper.js | 10 +- .../bruno-app/src/hooks/useFocusTrap/index.js | 9 +- .../bruno-app/src/hooks/usePrevious/index.js | 6 +- packages/bruno-app/src/i18n/index.js | 4 +- packages/bruno-app/src/pages/Bruno/index.js | 38 +- .../src/pages/ErrorBoundary/index.js | 2 + packages/bruno-app/src/providers/App/index.js | 2 +- .../bruno-app/src/providers/Hotkeys/index.js | 9 +- .../middlewares/draft/middleware.js | 2 +- .../ReduxStore/middlewares/draft/utils.js | 6 +- .../ReduxStore/slices/collections/actions.js | 608 ++++++++-------- .../ReduxStore/slices/collections/index.js | 166 +++-- .../ReduxStore/slices/global-environments.js | 25 +- .../src/providers/ReduxStore/slices/logs.js | 26 +- .../ReduxStore/slices/notifications.js | 8 +- .../ReduxStore/slices/notifications.spec.js | 22 +- .../src/providers/ReduxStore/slices/tabs.js | 14 +- packages/bruno-app/src/selectors/tab.js | 6 +- .../bruno-app/src/utils/codegenerator/auth.js | 1 - .../bruno-app/src/utils/codegenerator/har.js | 16 +- .../src/utils/codegenerator/targets.js | 28 +- .../src/utils/codemirror/autocomplete.js | 154 ++-- .../src/utils/codemirror/autocomplete.spec.js | 80 +-- .../src/utils/codemirror/brunoVarInfo.js | 9 +- .../src/utils/codemirror/javascript-lint.js | 28 +- .../src/utils/codemirror/mock-data-hints.js | 8 +- .../bruno-app/src/utils/collections/index.js | 74 +- .../bruno-app/src/utils/common/codemirror.js | 2 +- .../common/folders-requests-sorting.spec.js | 4 +- packages/bruno-app/src/utils/common/index.js | 24 +- packages/bruno-app/src/utils/common/ipc.js | 2 +- packages/bruno-app/src/utils/common/path.js | 6 +- .../bruno-app/src/utils/common/platform.js | 1 - packages/bruno-app/src/utils/common/regex.js | 72 +- .../bruno-app/src/utils/common/regex.spec.js | 13 +- .../src/utils/common/setupPolyfills.js | 28 +- .../bruno-app/src/utils/curl/curl-to-json.js | 4 +- .../src/utils/curl/curl-to-json.spec.js | 16 +- packages/bruno-app/src/utils/curl/index.js | 6 +- .../bruno-app/src/utils/curl/parse-curl.js | 3 +- .../src/utils/curl/parse-curl.spec.js | 18 +- .../src/utils/exporters/postman-collection.js | 1 - .../src/utils/importers/bruno-collection.js | 1 - .../utils/importers/insomnia-collection.js | 1 - .../src/utils/importers/postman-collection.js | 4 +- .../src/utils/network/grpc-event-listeners.js | 26 +- packages/bruno-app/src/utils/network/index.js | 62 +- packages/bruno-app/src/utils/tabs/index.js | 2 +- .../collections/grpc-export-import.spec.js | 2 +- .../collections/items-sequencing.spec.js | 23 +- .../bruno-app/src/utils/url/index.spec.js | 4 +- packages/bruno-cli/src/commands/import.js | 32 +- packages/bruno-cli/src/commands/run.js | 40 +- packages/bruno-cli/src/index.js | 2 +- packages/bruno-cli/src/reporters/html.js | 2 +- packages/bruno-cli/src/reporters/junit.js | 63 +- .../bruno-cli/src/runner/interpolate-vars.js | 8 +- .../bruno-cli/src/runner/prepare-request.js | 10 +- .../src/runner/run-single-request.js | 53 +- .../bruno-cli/src/utils/axios-instance.js | 15 +- packages/bruno-cli/src/utils/bru.js | 10 +- packages/bruno-cli/src/utils/collection.js | 43 +- packages/bruno-cli/src/utils/filesystem.js | 28 +- packages/bruno-cli/src/utils/form-data.js | 2 +- packages/bruno-cli/src/utils/proxy-util.js | 5 +- packages/bruno-cli/src/utils/request.js | 23 +- .../collection-json-from-pathname.spec.js | 14 +- .../tests/runner/prepare-request.spec.js | 54 +- .../tests/runner/report-metadata.spec.js | 2 +- packages/bruno-cli/tests/utils/common.spec.js | 2 +- .../src/interpolate/index.spec.ts | 68 +- .../bruno-common/src/interpolate/index.ts | 4 +- packages/bruno-common/src/runner/index.ts | 6 +- .../runner/reports/html/generate-report.ts | 12 +- .../src/runner/reports/html/template.ts | 2 +- .../bruno-common/src/runner/runner-summary.ts | 16 +- .../bruno-common/src/runner/types/index.ts | 16 +- .../bruno-common/src/runner/utils/index.ts | 14 +- .../src/utils/faker-functions.spec.ts | 14 +- packages/bruno-common/src/utils/index.ts | 2 +- .../bruno-common/src/utils/url/index.spec.ts | 2 +- packages/bruno-common/src/utils/url/index.ts | 4 +- packages/bruno-converters/babel.config.js | 2 +- packages/bruno-converters/jest.config.js | 2 +- packages/bruno-converters/jest.setup.js | 4 +- packages/bruno-converters/src/common/index.js | 5 +- .../bruno-converters/src/constants/regex.js | 2 +- packages/bruno-converters/src/index.js | 2 +- .../src/insomnia/insomnia-to-bruno.js | 22 +- .../src/openapi/openapi-to-bruno.js | 306 ++++---- .../src/postman/bruno-to-postman.js | 4 +- .../src/postman/postman-env-to-bruno-env.js | 4 +- .../src/postman/postman-to-bruno.js | 34 +- .../src/postman/postman-translations.js | 10 +- .../src/utils/jscode-shift-translator.js | 266 ++++--- .../src/utils/send-request-transformer.js | 91 ++- .../src/workers/postman-translator-worker.js | 82 ++- .../scripts/translate-postman-scripts.js | 21 +- .../insomnia/insomnia-collection-v5.spec.js | 132 ++-- .../insomnia/insomnia-collection.spec.js | 304 ++++---- .../openapi-to-bruno/openapi-auth.spec.js | 4 +- .../openapi-circular-references.spec.js | 330 ++++----- .../openapi-to-bruno/openapi-to-bruno.spec.js | 94 +-- .../tests/postman/bruno-to-postman.spec.js | 6 +- .../postman/postman-env-to-bruno-env.spec.js | 94 +-- .../postman-to-bruno/postman-to-bruno.spec.js | 536 +++++++------- .../postman-request.spec.js | 4 +- .../postman-response.spec.js | 2 +- .../postman-to-bruno/process-auth.spec.js | 7 +- .../postman-to-bruno/request-auth.spec.js | 3 - .../postman-comments.spec.js | 14 +- .../postman-cookie-conversions.spec.js | 60 +- .../postman-edge-cases.spec.js | 4 +- .../postman-test-commands.spec.js | 4 +- .../postman-variables.spec.js | 4 +- .../transpiler-tests/combined.test.js | 352 +++++---- .../transpiler-tests/environment.test.js | 246 +++---- .../transpiler-tests/exec-flow.test.js | 80 +-- .../legacy-global-apis.test.js | 73 +- .../legacy-tests-syntax.test.js | 290 ++++---- .../transpiler-tests/multiline-syntax.test.js | 20 +- .../postman-references.test.js | 14 +- .../transpiler-tests/request.test.js | 116 +-- .../transpiler-tests/response.test.js | 675 +++++++++--------- .../transpiler-tests/scoped-variables.test.js | 16 +- .../testing-framework.test.js | 380 +++++----- .../transformers/send-request.test.js | 2 +- .../variable-chaining.test.js | 28 +- .../transpiler-tests/variables.test.js | 238 +++--- .../utils/getMemberExpressionString.test.js | 8 +- packages/bruno-electron/notarize.js | 12 +- .../bruno-electron/src/app/about-bruno.js | 4 +- .../src/app/collection-watcher.js | 31 +- .../bruno-electron/src/app/menu-template.js | 6 +- packages/bruno-electron/src/index.js | 57 +- packages/bruno-electron/src/ipc/collection.js | 27 +- packages/bruno-electron/src/ipc/filesystem.js | 1 - .../src/ipc/global-environments.js | 5 +- .../ipc/network/authorize-user-in-window.js | 10 +- .../src/ipc/network/axios-instance.js | 125 ++-- .../src/ipc/network/cert-utils.js | 18 +- .../src/ipc/network/grpc-event-handlers.js | 77 +- .../bruno-electron/src/ipc/network/index.js | 120 ++-- .../src/ipc/network/interpolate-vars.js | 16 +- .../prepare-gql-introspection-request.js | 2 +- .../src/ipc/network/prepare-request.js | 15 +- .../bruno-electron/src/ipc/preferences.js | 7 +- packages/bruno-electron/src/store/cookies.js | 11 +- .../src/store/global-environments.js | 45 +- .../src/store/last-opened-collections.js | 2 +- packages/bruno-electron/src/store/oauth2.js | 6 +- .../src/store/ui-state-snapshot.js | 6 +- .../src/utils/collection-import.js | 4 +- .../bruno-electron/src/utils/collection.js | 28 +- packages/bruno-electron/src/utils/common.js | 4 +- .../bruno-electron/src/utils/encryption.js | 1 - .../bruno-electron/src/utils/filesystem.js | 56 +- packages/bruno-electron/src/utils/oauth2.js | 126 ++-- packages/bruno-electron/src/utils/parse.js | 2 +- .../bruno-electron/src/utils/proxy-util.js | 53 +- .../src/utils/tests/collection-utils.spec.js | 5 +- .../src/utils/tests/filesystem/index.spec.js | 16 +- .../filesystem/copypath-removepath.js | 182 ++--- packages/bruno-electron/src/utils/window.js | 8 +- .../execute-request-error-handler.spec.js | 24 +- .../network/fetch-gql-schema-handler.spec.js | 4 +- .../tests/network/index.spec.js | 4 +- .../tests/network/interpolate-vars.spec.js | 30 +- .../tests/network/prepare-request.spec.js | 2 +- .../tests/prepare-request.test.js | 46 +- .../tests/store/global-environments.test.js | 14 +- .../tests/utils/collection.spec.js | 4 +- .../bruno-electron/tests/utils/common.spec.js | 48 +- .../bru/utils/oauth2-additional-params.ts | 35 +- .../request-parse-and-redact-body-data.ts | 26 +- packages/bruno-filestore/src/index.ts | 3 +- packages/bruno-filestore/src/types.ts | 2 +- .../bruno-filestore/src/types/bruno-lang.d.ts | 2 +- .../src/workers/WorkerQueue/index.ts | 20 +- packages/bruno-filestore/src/workers/index.ts | 26 +- .../src/workers/worker-script.ts | 2 +- packages/bruno-js/src/bru.js | 10 +- packages/bruno-js/src/bruno-request.js | 14 +- packages/bruno-js/src/bruno-response.js | 3 +- packages/bruno-js/src/runtime/test-runtime.js | 2 +- .../bruno-js/src/sandbox/node-vm/index.js | 1 - .../bruno-js/src/sandbox/quickjs/index.js | 4 +- .../bruno-js/src/sandbox/quickjs/shims/bru.js | 6 +- .../sandbox/quickjs/shims/lib/crypto-utils.js | 16 +- .../quickjs/shims/lib/crypto-utils.spec.js | 12 +- .../src/sandbox/quickjs/shims/lib/utils.js | 2 +- packages/bruno-js/src/utils.js | 8 +- packages/bruno-js/src/utils/results.js | 8 +- packages/bruno-js/tests/runtime.spec.js | 20 +- packages/bruno-js/tests/utils.spec.js | 4 +- .../bruno-lang/v1/tests/bru-to-json.spec.js | 4 +- .../bruno-lang/v1/tests/json-to-bru.spec.js | 4 +- packages/bruno-lang/v2/src/bruToJson.js | 123 ++-- .../bruno-lang/v2/src/collectionBruToJson.js | 104 +-- packages/bruno-lang/v2/src/jsonToBru.js | 87 ++- .../bruno-lang/v2/src/jsonToCollectionBru.js | 52 +- packages/bruno-lang/v2/src/utils.js | 1 - packages/bruno-lang/v2/tests/list.spec.js | 87 ++- .../v2/tests/oauth2-additional-params.spec.js | 34 +- packages/bruno-lang/v2/tests/script.spec.js | 2 +- packages/bruno-lang/v2/tests/utils.spec.js | 2 +- packages/bruno-requests/babel.config.js | 6 +- packages/bruno-requests/jest.config.js | 4 +- packages/bruno-requests/rollup.config.js | 5 +- .../src/auth/digestauth-helper.js | 14 +- .../src/auth/digestauth-helper.spec.js | 2 +- packages/bruno-requests/src/auth/index.ts | 2 +- .../bruno-requests/src/auth/oauth2-helper.ts | 2 +- .../bruno-requests/src/cookies/index.spec.ts | 52 +- packages/bruno-requests/src/cookies/index.ts | 19 +- .../bruno-requests/src/grpc/grpc-client.js | 25 +- .../src/grpc/grpcMessageGenerator.js | 27 +- packages/bruno-requests/src/grpc/index.ts | 2 +- packages/bruno-requests/src/index.ts | 2 +- .../src/network/axios-instance.ts | 14 +- packages/bruno-requests/src/network/index.ts | 2 +- .../bruno-requests/src/scripting/index.ts | 2 +- .../src/scripting/send-request.ts | 9 +- packages/bruno-requests/src/utils/ca-cert.ts | 21 +- .../src/utils/url-validation.spec.ts | 2 +- .../src/utils/url-validation.ts | 2 +- .../bruno-tests/collection/lib/constants.js | 2 +- .../scripting/inbuilt modules/utils.js | 18 +- packages/bruno-tests/src/echo/index.js | 2 +- packages/bruno-tests/src/redirect/index.js | 14 +- packages/bruno-tests/src/utils/xmlParser.js | 4 +- playwright/electron.ts | 2 +- .../create/create-collection.spec.ts | 2 +- .../moving-requests/tag-persistence.spec.ts | 10 +- tests/cookies/corrupted-passkey.spec.ts | 2 +- .../write-multiline-variable.spec.ts | 4 +- .../notifications/notifications.spec.js | 12 +- .../sidebar-toggle/sidebar-toggle.spec.js | 12 +- tests/onboarding/sample-collection.spec.ts | 36 +- tests/preferences/support-links.spec.js | 32 +- tests/runner/collection-run.ts | 2 +- .../basic-ssl-success.spec.ts | 2 +- .../self-signed-rejected.spec.ts | 2 +- ...d-success-with-validation-disabled.spec.ts | 2 +- .../custom-ca-certs/server/helpers/certs.js | 47 +- .../server/helpers/platform.js | 16 +- tests/ssl/custom-ca-certs/server/index.js | 13 +- .../server/scripts/generate-certs.js | 2 +- ...id-ca-cert-in-config-with-defaults.spec.ts | 2 +- .../custom-invalid-ca-cert-in-config.spec.ts | 2 +- ...id-ca-cert-in-config-with-defaults.spec.ts | 2 +- .../custom-valid-ca-cert-in-config.spec.ts | 2 +- 460 files changed, 6921 insertions(+), 7052 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 523623f28..c577cdc67 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,6 @@ // eslint.config.js -const { defineConfig } = require("eslint/config"); -const globals = require("globals"); +const { defineConfig } = require('eslint/config'); +const globals = require('globals'); const { fixupPluginRules } = require('@eslint/compat'); const eslintPluginDiff = require('eslint-plugin-diff'); @@ -11,6 +11,15 @@ const runESMImports = async () => { }; module.exports = runESMImports().then(() => defineConfig([ + // Global ignores - must be a standalone object with ONLY ignores + { + ignores: [ + '**/node_modules/**/*', + '**/dist/**/*', + '**/*.bru', + 'packages/bruno-js/src/sandbox/bundle-browser-rollup.js' + ] + }, { plugins: { 'diff': fixupPluginRules(eslintPluginDiff), @@ -56,7 +65,7 @@ module.exports = runESMImports().then(() => defineConfig([ minElements: 2, consistent: true }], - '@stylistic/function-paren-newline': ['error', 'never'], + '@stylistic/function-paren-newline': ['off'], '@stylistic/array-bracket-spacing': ['error', 'never'], '@stylistic/arrow-spacing': ['error', { before: true, after: true }], '@stylistic/function-call-spacing': ['error', 'never'], @@ -64,12 +73,15 @@ module.exports = runESMImports().then(() => defineConfig([ '@stylistic/padding-line-between-statements': ['off'], '@stylistic/semi-style': ['error', 'last'], '@stylistic/max-len': ['off'], - '@stylistic/jsx-one-expression-per-line': ['off'] + '@stylistic/jsx-one-expression-per-line': ['off'], + // temp + '@stylistic/max-statements-per-line': ['off'], + '@stylistic/no-mixed-operators': ['off'] } }, { - files: ["packages/bruno-app/**/*.{js,jsx,ts}"], - ignores: ["**/*.config.js", "**/public/**/*"], + files: ['packages/bruno-app/**/*.{js,jsx,ts}'], + ignores: ['**/*.config.js', '**/public/**/*'], languageOptions: { globals: { ...globals.browser, @@ -82,114 +94,114 @@ module.exports = runESMImports().then(() => defineConfig([ }, parserOptions: { ecmaFeatures: { - jsx: true, - }, - }, + jsx: true + } + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { // It prevents lint errors when using CommonJS exports (module.exports) in Jest mocks. - files: ["packages/bruno-app/src/test-utils/mocks/codemirror.js"], + files: ['packages/bruno-app/src/test-utils/mocks/codemirror.js'], languageOptions: { globals: { ...globals.node, - ...globals.jest, - }, + ...globals.jest + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-cli/**/*.js"], - ignores: ["**/*.config.js"], + files: ['packages/bruno-cli/**/*.js'], + ignores: ['**/*.config.js'], languageOptions: { globals: { ...globals.node, - ...globals.jest, + ...globals.jest }, parserOptions: { - ecmaVersion: "latest" - }, + ecmaVersion: 'latest' + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-common/**/*.ts"], - ignores: ["**/*.config.js", "**/dist/**/*"], + files: ['packages/bruno-common/**/*.ts'], + ignores: ['**/*.config.js', '**/dist/**/*'], languageOptions: { globals: { ...globals.node, - ...globals.jest, + ...globals.jest }, - parser: require("@typescript-eslint/parser"), + parser: require('@typescript-eslint/parser'), parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - project: "./packages/bruno-common/tsconfig.json", - }, + ecmaVersion: 'latest', + sourceType: 'module', + project: './packages/bruno-common/tsconfig.json' + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-converters/**/*.js"], - ignores: ["**/*.config.js", "**/dist/**/*"], + files: ['packages/bruno-converters/**/*.js'], + ignores: ['**/*.config.js', '**/dist/**/*'], languageOptions: { globals: { ...globals.node, - ...globals.jest, + ...globals.jest }, parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - }, + ecmaVersion: 'latest', + sourceType: 'module' + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-electron/**/*.js"], - ignores: ["**/*.config.js", "**/web/**/*"], + files: ['packages/bruno-electron/**/*.js'], + ignores: ['**/*.config.js', '**/web/**/*'], languageOptions: { globals: { ...globals.node, - ...globals.jest, - }, + ...globals.jest + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-filestore/**/*.ts"], - ignores: ["**/*.config.js", "**/dist/**/*"], + files: ['packages/bruno-filestore/**/*.ts'], + ignores: ['**/*.config.js', '**/dist/**/*'], languageOptions: { globals: { ...globals.node, - ...globals.jest, + ...globals.jest }, - parser: require("@typescript-eslint/parser"), + parser: require('@typescript-eslint/parser'), parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - project: "./packages/bruno-filestore/tsconfig.json", - }, + ecmaVersion: 'latest', + sourceType: 'module', + project: './packages/bruno-filestore/tsconfig.json' + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-js/**/*.js"], - ignores: ["**/*.config.js", "**/dist/**/*"], + files: ['packages/bruno-js/**/*.js'], + ignores: ['**/*.config.js', '**/dist/**/*'], languageOptions: { globals: { ...globals.node, @@ -200,65 +212,65 @@ module.exports = runESMImports().then(() => defineConfig([ typeDetectGlobalObject: false }, parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - }, + ecmaVersion: 'latest', + sourceType: 'module' + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-lang/**/*.js"], - ignores: ["**/*.config.js", "**/dist/**/*"], + files: ['packages/bruno-lang/**/*.js'], + ignores: ['**/*.config.js', '**/dist/**/*'], languageOptions: { globals: { ...globals.node, - ...globals.jest, + ...globals.jest }, parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - }, + ecmaVersion: 'latest', + sourceType: 'module' + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-requests/**/*.ts"], - ignores: ["**/*.config.js", "**/dist/**/*"], + files: ['packages/bruno-requests/**/*.ts'], + ignores: ['**/*.config.js', '**/dist/**/*'], languageOptions: { globals: { ...globals.node, - ...globals.jest, + ...globals.jest }, - parser: require("@typescript-eslint/parser"), + parser: require('@typescript-eslint/parser'), parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - project: "./packages/bruno-requests/tsconfig.json", - }, + ecmaVersion: 'latest', + sourceType: 'module', + project: './packages/bruno-requests/tsconfig.json' + } }, rules: { - "no-undef": "error", - }, + 'no-undef': 'error' + } }, { - files: ["packages/bruno-requests/**/*.js"], - ignores: ["**/*.config.js", "**/dist/**/*"], + files: ['packages/bruno-requests/**/*.js'], + ignores: ['**/*.config.js', '**/dist/**/*'], languageOptions: { globals: { ...globals.node, - ...globals.jest, + ...globals.jest }, parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - }, + ecmaVersion: 'latest', + sourceType: 'module' + } }, rules: { - "no-undef": "error", - }, - }, + 'no-undef': 'error' + } + } ])); diff --git a/packages/bruno-app/babel.config.js b/packages/bruno-app/babel.config.js index e04b84e5e..a3be21ad1 100644 --- a/packages/bruno-app/babel.config.js +++ b/packages/bruno-app/babel.config.js @@ -6,4 +6,4 @@ module.exports = { }] ], plugins: ['babel-plugin-styled-components'] -}; \ No newline at end of file +}; diff --git a/packages/bruno-app/jest.config.js b/packages/bruno-app/jest.config.js index fdab3f936..31cac61da 100644 --- a/packages/bruno-app/jest.config.js +++ b/packages/bruno-app/jest.config.js @@ -1,10 +1,10 @@ module.exports = { rootDir: '.', transform: { - '^.+\\.[jt]sx?$': 'babel-jest', + '^.+\\.[jt]sx?$': 'babel-jest' }, transformIgnorePatterns: [ - "/node_modules/(?!strip-json-comments|nanoid|xml-formatter)/", + '/node_modules/(?!strip-json-comments|nanoid|xml-formatter)/' ], moduleNameMapper: { '^assets/(.*)$': '/src/assets/$1', @@ -22,9 +22,9 @@ module.exports = { testEnvironment: 'jsdom', setupFilesAfterEnv: ['@testing-library/jest-dom'], setupFiles: [ - '/jest.setup.js', + '/jest.setup.js' ], testMatch: [ '/src/**/*.spec.[jt]s?(x)' ] -}; \ No newline at end of file +}; diff --git a/packages/bruno-app/public/theme/dark.js b/packages/bruno-app/public/theme/dark.js index b34340c81..417e6714a 100644 --- a/packages/bruno-app/public/theme/dark.js +++ b/packages/bruno-app/public/theme/dark.js @@ -1,6 +1,6 @@ const darkTheme = { - brand: '#546de5', - text: 'rgb(52 52 52)', + 'brand': '#546de5', + 'text': 'rgb(52 52 52)', 'primary-text': '#ffffff', 'primary-theme': '#1e1e1e', 'secondary-text': '#929292', diff --git a/packages/bruno-app/public/theme/light.js b/packages/bruno-app/public/theme/light.js index 6ba048f6a..ea37ebdae 100644 --- a/packages/bruno-app/public/theme/light.js +++ b/packages/bruno-app/public/theme/light.js @@ -1,6 +1,6 @@ const lightTheme = { - brand: '#546de5', - text: 'rgb(52 52 52)', + 'brand': '#546de5', + 'text': 'rgb(52 52 52)', 'primary-text': 'rgb(52 52 52)', 'primary-theme': '#ffffff', 'secondary-text': '#929292', diff --git a/packages/bruno-app/src/components/BrunoSupport/index.js b/packages/bruno-app/src/components/BrunoSupport/index.js index 190ef6ef4..545e1c56a 100644 --- a/packages/bruno-app/src/components/BrunoSupport/index.js +++ b/packages/bruno-app/src/components/BrunoSupport/index.js @@ -6,7 +6,7 @@ import StyledWrapper from './StyledWrapper'; const BrunoSupport = ({ onClose }) => { return ( - +
diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index 9157fb00a..d139d1ec0 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -105,7 +105,7 @@ export default class CodeEditor extends React.Component { }, 'Cmd-H': 'replace', 'Ctrl-H': 'replace', - Tab: function (cm) { + 'Tab': function (cm) { cm.getSelection().includes('\n') || editor.getLine(cm.getCursor().line) == cm.getSelection() ? cm.execCommand('indentMore') : cm.replaceSelection(' ', 'end'); @@ -151,7 +151,7 @@ export default class CodeEditor extends React.Component { } else if (this.props.mode == 'application/xml') { var doc = new DOMParser(); try { - //add header element and remove prefix namespaces for DOMParser + // add header element and remove prefix namespaces for DOMParser var dcm = doc.parseFromString( ' ' + internal.replace(/(?<=\<|<\/)\w+:/g, '') + '', 'application/xml' @@ -188,7 +188,7 @@ export default class CodeEditor extends React.Component { } return found; }); - + if (editor) { editor.setOption('lint', this.props.mode && editor.getValue().trim().length > 0 ? this.lintOptions : false); editor.on('change', this._onEdit); @@ -197,7 +197,7 @@ export default class CodeEditor extends React.Component { this.addOverlay(); const getAllVariablesHandler = () => getAllVariables(this.props.collection, this.props.item); - + // Setup AutoComplete Helper for all modes const autoCompleteOptions = { showHintsFor: this.props.showHintsFor, diff --git a/packages/bruno-app/src/components/CodeEditor/index.spec.js b/packages/bruno-app/src/components/CodeEditor/index.spec.js index 973a8d3a9..b745890c0 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.spec.js +++ b/packages/bruno-app/src/components/CodeEditor/index.spec.js @@ -10,10 +10,10 @@ jest.mock('codemirror', () => { const MOCK_THEME = { codemirror: { - bg: "#1e1e1e", - border: "#333", + bg: '#1e1e1e', + border: '#333' }, - textLink: "#007acc", + textLink: '#007acc' }; const setupEditorState = (editor, { value, cursorPosition }) => { @@ -27,8 +27,8 @@ const setupEditorState = (editor, { value, cursorPosition }) => { }); editor.state = { - completionActive: null, - } + completionActive: null + }; }; const setupEditorWithRef = () => { @@ -47,5 +47,5 @@ describe('CodeEditor', () => { jest.resetModules(); }); - it("add CodeEditor related tests here", () => {}); -}); \ No newline at end of file + it('add CodeEditor related tests here', () => {}); +}); diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/index.js index 2de1495c8..b2f70923f 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/index.js @@ -43,16 +43,16 @@ const ApiKeyAuth = ({ collection }) => { }; useEffect(() => { - !apikeyAuth?.placement && - dispatch( - updateCollectionAuth({ - mode: 'apikey', - collectionUid: collection.uid, - content: { - placement: 'header' - } - }) - ); + !apikeyAuth?.placement + && dispatch( + updateCollectionAuth({ + mode: 'apikey', + collectionUid: collection.uid, + content: { + placement: 'header' + } + }) + ); }, [apikeyAuth]); return ( diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js index f7bd8f0b1..781e9f477 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js @@ -87,7 +87,7 @@ const AuthMode = ({ collection }) => { }} > NTLM Auth -
+
{ diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/NTLMAuth/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/NTLMAuth/index.js index 50e1bbbc6..a967ccb48 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Auth/NTLMAuth/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/NTLMAuth/index.js @@ -9,13 +9,7 @@ import { updateCollectionAuth } from 'providers/ReduxStore/slices/collections'; import { saveCollectionSettings } from 'providers/ReduxStore/slices/collections/actions'; import StyledWrapper from './StyledWrapper'; - - - - const NTLMAuth = ({ collection }) => { - - const dispatch = useDispatch(); const { storedTheme } = useTheme(); @@ -25,7 +19,6 @@ const NTLMAuth = ({ collection }) => { const handleSave = () => dispatch(saveCollectionSettings(collection.uid)); - const handleUsernameChange = (username) => { dispatch( updateCollectionAuth({ @@ -67,10 +60,7 @@ const NTLMAuth = ({ collection }) => { } }) ); - }; - - - + }; return ( diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/OAuth2/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/OAuth2/index.js index 2dfe54c44..da0f8a38d 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Auth/OAuth2/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/OAuth2/index.js @@ -10,7 +10,7 @@ import OAuth2ClientCredentials from 'components/RequestPane/Auth/OAuth2/ClientCr import OAuth2Implicit from 'components/RequestPane/Auth/OAuth2/Implicit/index'; import GrantTypeSelector from 'components/RequestPane/Auth/OAuth2/GrantTypeSelector/index'; -const GrantTypeComponentMap = ({collection }) => { +const GrantTypeComponentMap = ({ collection }) => { const dispatch = useDispatch(); const save = () => { diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/index.js index af457e6f4..0e643c4e7 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Auth/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/index.js @@ -13,7 +13,6 @@ import StyledWrapper from './StyledWrapper'; import OAuth2 from './OAuth2'; import NTLMAuth from './NTLMAuth'; - const Auth = ({ collection }) => { const authMode = collection.draft?.root ? get(collection, 'draft.root.request.auth.mode') : get(collection, 'root.request.auth.mode'); const dispatch = useDispatch(); @@ -36,7 +35,7 @@ const Auth = ({ collection }) => { } case 'ntlm': { return ; - } + } case 'oauth2': { return ; } diff --git a/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js b/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js index c1707801c..b871be3e3 100644 --- a/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js @@ -39,7 +39,7 @@ const ClientCertSettings = ({ collection }) => { domain: Yup.string() .required() .trim() - .test('not-empty-after-trim', 'Domain is required', value => value && value.trim().length > 0), + .test('not-empty-after-trim', 'Domain is required', (value) => value && value.trim().length > 0), type: Yup.string().required().oneOf(['cert', 'pfx']), certFilePath: Yup.string().when('type', { is: (type) => type == 'cert', @@ -151,22 +151,22 @@ const ClientCertSettings = ({ collection }) => { {!clientCertConfig.length ? 'No client certificates added' : clientCertConfig.map((clientCert, index) => ( -
  • -
    -
    - - {clientCert.domain} -
    -
    - - {clientCert.type === 'cert' ? clientCert.certFilePath : clientCert.pfxFilePath} -
    +
  • +
    +
    + + {clientCert.domain} +
    +
    + + {clientCert.type === 'cert' ? clientCert.certFilePath : clientCert.pfxFilePath} +
    -
    -
  • - ))} +
    + + ))}

    Add Client Certificate

    diff --git a/packages/bruno-app/src/components/CollectionSettings/Docs/index.js b/packages/bruno-app/src/components/CollectionSettings/Docs/index.js index 38d314de5..00e2271b0 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Docs/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Docs/index.js @@ -38,21 +38,21 @@ const Docs = ({ collection }) => { })) ); toggleViewMode(); - } + }; const onSave = () => { dispatch(saveCollectionSettings(collection.uid)); toggleViewMode(); - } + }; return ( -
    -
    +
    +
    Documentation
    -
    +
    {isEditing ? ( <>
    @@ -81,14 +81,13 @@ const Docs = ({ collection }) => { fontSize={get(preferences, 'font.codeFontSize')} /> ) : ( -
    -
    +
    +
    { - docs?.length > 0 ? - - : - - } + docs?.length > 0 + ? + : + }
    )} @@ -98,7 +97,6 @@ const Docs = ({ collection }) => { export default Docs; - const documentationPlaceholder = ` Welcome to your collection documentation! This space is designed to help you document your API collection effectively. diff --git a/packages/bruno-app/src/components/CollectionSettings/Headers/index.js b/packages/bruno-app/src/components/CollectionSettings/Headers/index.js index a03c93506..e0846dff5 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Headers/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Headers/index.js @@ -123,8 +123,7 @@ const Headers = ({ collection }) => { }, header, 'name' - ) - } + )} autocomplete={headerAutoCompleteList} collection={collection} /> @@ -143,8 +142,7 @@ const Headers = ({ collection }) => { }, header, 'value' - ) - } + )} collection={collection} autocomplete={MimeTypes} /> diff --git a/packages/bruno-app/src/components/CollectionSettings/Overview/Info/index.js b/packages/bruno-app/src/components/CollectionSettings/Overview/Info/index.js index 2a09512de..be15d598d 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Overview/Info/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Overview/Info/index.js @@ -1,9 +1,9 @@ -import React from "react"; +import React from 'react'; import { getTotalRequestCountInCollection } from 'utils/collections/'; import { IconBox, IconFolder, IconWorld, IconApi, IconShare } from '@tabler/icons'; -import { areItemsLoading, getItemsLoadStats } from "utils/collections/index"; -import { useState } from "react"; -import ShareCollection from "components/ShareCollection/index"; +import { areItemsLoading, getItemsLoadStats } from 'utils/collections/index'; +import { useState } from 'react'; +import ShareCollection from 'components/ShareCollection/index'; const Info = ({ collection }) => { const totalRequestsInCollection = getTotalRequestCountInCollection(collection); @@ -11,10 +11,10 @@ const Info = ({ collection }) => { const isCollectionLoading = areItemsLoading(collection); const { loading: itemsLoadingCount, total: totalItems } = getItemsLoadStats(collection); const [showShareCollectionModal, toggleShowShareCollectionModal] = useState(false); - + const handleToggleShowShareCollectionModal = (value) => (e) => { toggleShowShareCollectionModal(value); - } + }; return (
    @@ -55,7 +55,7 @@ const Info = ({ collection }) => {
    Requests
    { - isCollectionLoading? `${totalItems - itemsLoadingCount} out of ${totalItems} requests in the collection loaded` : `${totalRequestsInCollection} request${totalRequestsInCollection !== 1 ? 's' : ''} in collection` + isCollectionLoading ? `${totalItems - itemsLoadingCount} out of ${totalItems} requests in the collection loaded` : `${totalRequestsInCollection} request${totalRequestsInCollection !== 1 ? 's' : ''} in collection` }
    @@ -79,4 +79,4 @@ const Info = ({ collection }) => { ); }; -export default Info; \ No newline at end of file +export default Info; diff --git a/packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js b/packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js index 4c7406580..d498ca451 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js @@ -1,7 +1,7 @@ import React from 'react'; -import { flattenItems } from "utils/collections"; +import { flattenItems } from 'utils/collections'; import { IconAlertTriangle } from '@tabler/icons'; -import StyledWrapper from "./StyledWrapper"; +import StyledWrapper from './StyledWrapper'; import { useDispatch, useSelector } from 'react-redux'; import { isItemARequest, itemIsOpenedInTabs } from 'utils/tabs/index'; import { getDefaultRequestPaneTab } from 'utils/collections/index'; @@ -12,13 +12,13 @@ const RequestsNotLoaded = ({ collection }) => { const dispatch = useDispatch(); const tabs = useSelector((state) => state.tabs.tabs); const flattenedItems = flattenItems(collection.items); - const itemsFailedLoading = flattenedItems?.filter(item => item?.partial && !item?.loading); + const itemsFailedLoading = flattenedItems?.filter((item) => item?.partial && !item?.loading); if (!itemsFailedLoading?.length) { return null; } - const handleRequestClick = (item) => e => { + const handleRequestClick = (item) => (e) => { e.preventDefault(); if (isItemARequest(item)) { dispatch(hideHomePage()); @@ -39,7 +39,7 @@ const RequestsNotLoaded = ({ collection }) => { ); return; } - } + }; return ( @@ -61,7 +61,7 @@ const RequestsNotLoaded = ({ collection }) => { {flattenedItems?.map((item, index) => ( item?.partial && !item?.loading ? ( - + {item?.pathname?.split(`${collection?.pathname}/`)?.[1]} diff --git a/packages/bruno-app/src/components/CollectionSettings/Overview/index.js b/packages/bruno-app/src/components/CollectionSettings/Overview/index.js index 9792c224c..806ac2a53 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Overview/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Overview/index.js @@ -1,8 +1,8 @@ -import StyledWrapper from "./StyledWrapper"; -import Docs from "../Docs"; -import Info from "./Info"; +import StyledWrapper from './StyledWrapper'; +import Docs from '../Docs'; +import Info from './Info'; import { IconBox } from '@tabler/icons'; -import RequestsNotLoaded from "./RequestsNotLoaded"; +import RequestsNotLoaded from './RequestsNotLoaded'; const Overview = ({ collection }) => { return ( @@ -22,6 +22,6 @@ const Overview = ({ collection }) => {
    ); -} +}; -export default Overview; \ No newline at end of file +export default Overview; diff --git a/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js b/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js index 039b2eab8..9b7f07073 100644 --- a/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js @@ -156,9 +156,9 @@ const ProxySettings = ({ collection }) => {
      -
    • global - use global proxy config
    • -
    • enabled - use collection proxy config
    • -
    • disable - disable proxy
    • +
    • global - use global proxy config
    • +
    • enabled - use collection proxy config
    • +
    • disable - disable proxy
    @@ -367,4 +367,4 @@ const ProxySettings = ({ collection }) => { ); }; -export default ProxySettings; \ No newline at end of file +export default ProxySettings; diff --git a/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/index.js b/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/index.js index e84ddc081..25136bfa3 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/index.js @@ -127,8 +127,7 @@ const VarsTable = ({ collection, vars, varType }) => { }, _var, 'value' - ) - } + )} collection={collection} /> diff --git a/packages/bruno-app/src/components/Cookies/ModifyCookieModal/index.js b/packages/bruno-app/src/components/Cookies/ModifyCookieModal/index.js index b35c360ee..a59e5ed9f 100644 --- a/packages/bruno-app/src/components/Cookies/ModifyCookieModal/index.js +++ b/packages/bruno-app/src/components/Cookies/ModifyCookieModal/index.js @@ -125,7 +125,7 @@ const ModifyCookieModal = ({ onClose, domain, cookie }) => { ); if (!isEmpty(validationErrors)) { - toast.error(Object.values(validationErrors).join("\n")); + toast.error(Object.values(validationErrors).join('\n')); return; } @@ -208,7 +208,7 @@ const ModifyCookieModal = ({ onClose, domain, cookie }) => { onClose={onClose} handleCancel={onClose} handleConfirm={onSubmit} - customHeader={ + customHeader={(

    {title}

    @@ -223,7 +223,7 @@ const ModifyCookieModal = ({ onClose, domain, cookie }) => {
    - } + )} >
    e.preventDefault()} className="px-2"> {isRawMode ? ( diff --git a/packages/bruno-app/src/components/Cookies/index.js b/packages/bruno-app/src/components/Cookies/index.js index b00bd5a48..c5138bcbb 100644 --- a/packages/bruno-app/src/components/Cookies/index.js +++ b/packages/bruno-app/src/components/Cookies/index.js @@ -72,7 +72,7 @@ const CollectionProperties = ({ onClose }) => { const [searchText, setSearchText] = useState(null); const handleAddCookie = (domain) => { - if(domain) setCurrentDomain(domain); + if (domain) setCurrentDomain(domain); setIsModifyCookieModalOpen(true); }; diff --git a/packages/bruno-app/src/components/Devtools/Console/DebugTab/StyledWrapper.js b/packages/bruno-app/src/components/Devtools/Console/DebugTab/StyledWrapper.js index e8e95b070..1180739fd 100644 --- a/packages/bruno-app/src/components/Devtools/Console/DebugTab/StyledWrapper.js +++ b/packages/bruno-app/src/components/Devtools/Console/DebugTab/StyledWrapper.js @@ -160,4 +160,4 @@ const StyledWrapper = styled.div` } `; -export default StyledWrapper; \ No newline at end of file +export default StyledWrapper; diff --git a/packages/bruno-app/src/components/Devtools/Console/DebugTab/index.js b/packages/bruno-app/src/components/Devtools/Console/DebugTab/index.js index 1faa14ec7..a5810e3bc 100644 --- a/packages/bruno-app/src/components/Devtools/Console/DebugTab/index.js +++ b/packages/bruno-app/src/components/Devtools/Console/DebugTab/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { IconBug } from '@tabler/icons'; -import { +import { setSelectedError, clearDebugErrors } from 'providers/ReduxStore/slices/logs'; @@ -10,10 +10,10 @@ import StyledWrapper from './StyledWrapper'; const ErrorRow = ({ error, isSelected, onClick }) => { const formatTime = (timestamp) => { const date = new Date(timestamp); - return date.toLocaleTimeString('en-US', { - hour12: false, - hour: '2-digit', - minute: '2-digit', + return date.toLocaleTimeString('en-US', { + hour12: false, + hour: '2-digit', + minute: '2-digit', second: '2-digit', fractionalSecondDigits: 3 }); @@ -38,18 +38,18 @@ const ErrorRow = ({ error, isSelected, onClick }) => { }; return ( -
    {getShortMessage(error.message)}
    - +
    {getLocation(error)}
    - +
    {formatTime(error.timestamp)}
    @@ -59,7 +59,7 @@ const ErrorRow = ({ error, isSelected, onClick }) => { const DebugTab = () => { const dispatch = useDispatch(); - const { debugErrors, selectedError } = useSelector(state => state.logs); + const { debugErrors, selectedError } = useSelector((state) => state.logs); const handleErrorClick = (error) => { dispatch(setSelectedError(error)); @@ -85,7 +85,7 @@ const DebugTab = () => {
    Location
    Time
    - +
    {debugErrors.map((error, index) => ( { ); }; -export default DebugTab; \ No newline at end of file +export default DebugTab; diff --git a/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/StyledWrapper.js b/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/StyledWrapper.js index c7d4360ac..09299b0df 100644 --- a/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/StyledWrapper.js +++ b/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/StyledWrapper.js @@ -225,4 +225,4 @@ const StyledWrapper = styled.div` } `; -export default StyledWrapper; \ No newline at end of file +export default StyledWrapper; diff --git a/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/index.js b/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/index.js index 91499b4a3..e4017f10d 100644 --- a/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/index.js +++ b/packages/bruno-app/src/components/Devtools/Console/ErrorDetailsPanel/index.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import { +import { IconX, IconBug, IconFileText, @@ -15,7 +15,7 @@ import StyledWrapper from './StyledWrapper'; const ErrorInfoTab = ({ error }) => { const { version } = useApp(); - + const formatTimestamp = (timestamp) => { const date = new Date(timestamp); return date.toLocaleString(); @@ -23,7 +23,7 @@ const ErrorInfoTab = ({ error }) => { const generateGitHubIssueUrl = () => { const title = `Bug: ${error.message.substring(0, 50)}${error.message.length > 50 ? '...' : ''}`; - + const body = `## Bug Report ### Error Details @@ -66,7 +66,7 @@ ${error.args ? error.args.map((arg, index) => { const encodedTitle = encodeURIComponent(title); const encodedBody = encodeURIComponent(body); - + return `https://github.com/usebruno/bruno/issues/new?template=BLANK_ISSUE&title=${encodedTitle}&body=${encodedBody}`; }; @@ -84,33 +84,33 @@ ${error.args ? error.args.map((arg, index) => { {error.message || 'No message available'}
    - + {error.filename && (
    {error.filename}
    )} - + {error.lineno && (
    {error.lineno}{error.colno ? `:${error.colno}` : ''}
    )} - +
    {formatTimestamp(error.timestamp)}
    - +

    Report Issue

    Found a bug? Help us improve Bruno by reporting this error on GitHub.

    -
    - -
    - - - - - - + {isOpen && ( -
    +
    Filter by Method -
    - +
    - {Object.keys(filters).map(method => ( + {Object.keys(filters).map((method) => (