From 57403d7b651c85494eb0b71ff8a9d4a16ffb8c88 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 15 Jun 2024 06:53:45 -0700 Subject: [PATCH] Update Prettier and add trailing comma (#2187) * chore: Update prettier-plugin-tailwindcss to version 0.6.4 * Add trailing comma --- src/frontend/package-lock.json | 114 +++++++++--------- src/frontend/package.json | 2 +- src/frontend/prettier.config.js | 2 +- src/frontend/src/App.tsx | 6 +- .../components/outputModal/index.tsx | 2 +- .../components/parameterComponent/index.tsx | 14 +-- .../tooltipRenderComponent/index.tsx | 2 +- .../src/CustomNodes/GenericNode/index.tsx | 41 +++---- .../helpers/get-class-from-build-status.ts | 2 +- .../hooks/use-check-code-validity.tsx | 2 +- .../hooks/use-fetch-data-on-mount.tsx | 2 +- .../hooks/use-handle-new-value.tsx | 2 +- .../hooks/use-handle-node-class.tsx | 2 +- .../src/CustomNodes/hooks/use-icon-render.tsx | 4 +- .../CustomNodes/hooks/use-icons-status.tsx | 2 +- .../hooks/use-update-node-code.tsx | 4 +- .../src/CustomNodes/utils/get-field-title.tsx | 2 +- .../components/singleAlertComponent/index.tsx | 2 +- .../src/alerts/alertDropDown/index.tsx | 8 +- src/frontend/src/alerts/notice/index.tsx | 2 +- .../src/components/ImageViewer/index.tsx | 32 ++--- .../folderAccordionComponent/index.tsx | 2 +- .../components/accordionComponent/index.tsx | 4 +- .../addNewVariableButton.tsx | 8 +- .../components/dragCardComponent/index.tsx | 4 +- .../src/components/cardComponent/index.tsx | 23 ++-- .../components/cardsWrapComponent/index.tsx | 2 +- .../src/components/chatComponent/index.tsx | 30 ++--- .../components/codeAreaComponent/index.tsx | 8 +- .../components/codeTabsComponent/index.tsx | 44 +++---- .../components/crashErrorComponent/index.tsx | 4 +- .../components/csvOutputComponent/index.tsx | 12 +- .../src/components/dictComponent/index.tsx | 2 +- .../dropdownButtonComponent/index.tsx | 2 +- .../components/dropdownComponent/index.tsx | 4 +- .../editFlowSettingsComponent/index.tsx | 4 +- .../src/components/exampleComponent/index.tsx | 4 +- .../components/genericIconComponent/index.tsx | 6 +- .../components/menuBar/index.tsx | 17 ++- .../src/components/headerComponent/index.tsx | 8 +- .../horizontalScrollFadeComponent/index.tsx | 4 +- .../components/popover/index.tsx | 20 +-- .../components/popoverObject/index.tsx | 24 ++-- .../src/components/inputComponent/index.tsx | 16 +-- .../components/inputFileComponent/index.tsx | 6 +- .../components/inputGlobalComponent/index.tsx | 8 +- .../components/inputListComponent/index.tsx | 2 +- .../components/keypairListComponent/index.tsx | 4 +- .../components/paginatorComponent/index.tsx | 6 +- .../src/components/pdfViewer/index.tsx | 2 +- .../src/components/promptComponent/index.tsx | 6 +- .../components/renderIconComponent/index.tsx | 2 +- .../components/sideBarButtons/index.tsx | 2 +- .../components/sideBarFolderButtons/index.tsx | 22 ++-- .../hooks/use-on-file-drop.tsx | 10 +- .../components/TableOptions/index.tsx | 6 +- .../components/loadingOverlay/index.tsx | 2 +- .../components/tableNodeCellRender/index.tsx | 6 +- .../tagsSelectorComponent/index.tsx | 4 +- .../components/textAreaComponent/index.tsx | 2 +- src/frontend/src/components/ui/alert.tsx | 2 +- src/frontend/src/components/ui/badge.tsx | 2 +- src/frontend/src/components/ui/button.tsx | 6 +- src/frontend/src/components/ui/card.tsx | 6 +- src/frontend/src/components/ui/checkbox.tsx | 4 +- src/frontend/src/components/ui/combobox.tsx | 2 +- src/frontend/src/components/ui/command.tsx | 10 +- .../src/components/ui/custom-accordion.tsx | 6 +- .../components/ui/dialog-with-no-close.tsx | 10 +- .../src/components/ui/dropdown-menu.tsx | 14 +-- src/frontend/src/components/ui/form.tsx | 8 +- src/frontend/src/components/ui/input.tsx | 4 +- src/frontend/src/components/ui/label.tsx | 2 +- src/frontend/src/components/ui/menubar.tsx | 24 ++-- src/frontend/src/components/ui/popover.tsx | 4 +- src/frontend/src/components/ui/progress.tsx | 2 +- .../src/components/ui/rename-label.tsx | 2 +- .../src/components/ui/select-custom.tsx | 6 +- src/frontend/src/components/ui/select.tsx | 8 +- src/frontend/src/components/ui/separator.tsx | 6 +- src/frontend/src/components/ui/switch.tsx | 4 +- src/frontend/src/components/ui/table.tsx | 4 +- src/frontend/src/components/ui/tabs.tsx | 6 +- src/frontend/src/components/ui/textarea.tsx | 4 +- src/frontend/src/components/ui/toggle.tsx | 2 +- src/frontend/src/components/ui/tooltip.tsx | 4 +- src/frontend/src/contexts/authContext.tsx | 6 +- src/frontend/src/controllers/API/api.tsx | 10 +- .../API/helpers/check-duplicate-requests.ts | 2 +- src/frontend/src/controllers/API/index.ts | 52 ++++---- src/frontend/src/icons/AWS/index.tsx | 2 +- src/frontend/src/icons/AzLogo/index.tsx | 2 +- src/frontend/src/icons/Azure/index.tsx | 2 +- src/frontend/src/icons/Bing/index.tsx | 2 +- .../src/icons/FacebookMessenger/index.tsx | 2 +- src/frontend/src/icons/Groq/index.tsx | 2 +- src/frontend/src/icons/IFixIt/index.tsx | 2 +- src/frontend/src/icons/Meta/index.tsx | 2 +- src/frontend/src/icons/Redis/index.tsx | 2 +- src/frontend/src/icons/Searx/index.tsx | 2 +- src/frontend/src/icons/Share/index.tsx | 2 +- src/frontend/src/icons/Slack/index.tsx | 2 +- src/frontend/src/icons/Streamlit/index.tsx | 2 +- src/frontend/src/icons/Word/index.tsx | 2 +- src/frontend/src/index.tsx | 4 +- .../BundleModal/hooks/submit-folder.tsx | 4 +- src/frontend/src/modals/BundleModal/index.tsx | 2 +- .../components/FileInput/index.tsx | 2 +- .../components/csvSelect/index.tsx | 2 +- .../IOModal/components/IOFieldView/index.tsx | 10 +- .../components/SessionView/hooks/index.tsx | 2 +- .../IOModal/components/SessionView/index.tsx | 2 +- .../components/buttonSendWrapper/index.tsx | 6 +- .../components/textAreaWrapper/index.tsx | 6 +- .../chatInput/hooks/use-drag-and-drop.tsx | 2 +- .../hooks/use-handle-file-change.tsx | 2 +- .../components/chatView/chatInput/index.tsx | 2 +- .../components/chatView/chatMessage/index.tsx | 23 ++-- .../downloadButton/downloadButton.tsx | 2 +- .../chatView/fileComponent/index.tsx | 4 +- .../fileComponent/utils/handle-download.tsx | 4 +- .../chatView/filePreviewChat/index.tsx | 10 +- .../utils/format-file-name.tsx | 2 +- .../IOModal/components/chatView/index.tsx | 2 +- src/frontend/src/modals/IOModal/index.tsx | 40 +++--- src/frontend/src/modals/apiModal/index.tsx | 18 +-- .../utils/check-can-build-tweak-object.ts | 2 +- .../apiModal/utils/get-changes-types.ts | 2 +- .../modals/apiModal/utils/get-curl-code.tsx | 6 +- .../utils/get-nodes-with-default-value.ts | 4 +- .../apiModal/utils/get-python-api-code.tsx | 2 +- .../modals/apiModal/utils/get-python-code.tsx | 2 +- .../src/modals/apiModal/utils/get-value.ts | 2 +- .../modals/apiModal/utils/get-widget-code.tsx | 2 +- .../src/modals/apiModal/utils/tabs-array.tsx | 2 +- .../src/modals/codeAreaModal/index.tsx | 2 +- .../src/modals/confirmationModal/index.tsx | 4 +- .../src/modals/dictAreaModal/index.tsx | 4 +- .../editNodeModal/hooks/use-column-defs.tsx | 4 +- src/frontend/src/modals/exportModal/index.tsx | 10 +- .../src/modals/flowLogsModal/index.tsx | 2 +- .../src/modals/flowSettingsModal/index.tsx | 2 +- .../foldersModal/hooks/submit-folder.tsx | 4 +- .../src/modals/foldersModal/index.tsx | 2 +- .../src/modals/genericModal/index.tsx | 6 +- .../src/modals/newFlowModal/index.tsx | 4 +- src/frontend/src/modals/shareModal/index.tsx | 12 +- .../modals/shareModal/utils/get-tags-ids.tsx | 2 +- src/frontend/src/pages/AdminPage/index.tsx | 14 +-- .../ConnectionLineComponent/index.tsx | 2 +- .../components/PageComponent/index.tsx | 5 +- .../PageComponent/utils/get-random-name.tsx | 2 +- .../ParentDisclosureComponent/index.tsx | 2 +- .../SelectionMenuComponent/index.tsx | 4 +- .../extraSidebarComponent/index.tsx | 32 ++--- .../sideBarDraggableComponent/index.tsx | 14 +-- .../components/nodeToolbarComponent/index.tsx | 40 +++--- .../toolbarSelectItem/index.tsx | 10 +- src/frontend/src/pages/FlowPage/index.tsx | 2 +- .../hooks/use-delete-multiple.tsx | 2 +- .../hooks/use-filtered-flows.tsx | 4 +- .../hooks/use-handle-duplicate.tsx | 8 +- .../hooks/use-handle-export.tsx | 4 +- .../hooks/use-handle-select-all.tsx | 2 +- .../hooks/use-select-options-change.tsx | 4 +- .../hooks/use-selected-flows.tsx | 2 +- .../components/componentsComponent/index.tsx | 22 ++-- .../components/emptyComponent/index.tsx | 2 +- .../components/headerComponent/index.tsx | 2 +- .../headerTabsSearchComponent/index.tsx | 2 +- .../components/inputSearchComponent/index.tsx | 4 +- .../components/tabsComponent/index.tsx | 4 +- .../pages/MainPage/pages/mainPage/index.tsx | 2 +- .../src/pages/MainPage/services/index.ts | 12 +- .../MainPage/utils/handle-download-folder.ts | 2 +- src/frontend/src/pages/Playground/index.tsx | 2 +- .../src/pages/ProfileSettingsPage/index.tsx | 4 +- src/frontend/src/pages/SettingsPage/index.tsx | 2 +- .../hooks/use-handle-delete-key.tsx | 2 +- .../SettingsPage/pages/ApiKeysPage/index.tsx | 4 +- .../components/PasswordForm/index.tsx | 2 +- .../hooks/use-preload-images.tsx | 10 +- .../profilePictureChooserComponent/index.tsx | 2 +- .../components/StoreApiKeyForm/index.tsx | 4 +- .../SettingsPage/pages/GeneralPage/index.tsx | 10 +- .../pages/GlobalVariablesPage/index.tsx | 6 +- .../EditShortcutButton/index.tsx | 12 +- .../pages/ShortcutsPage/index.tsx | 2 +- .../pages/hooks/use-patch-profile-picture.tsx | 2 +- .../SettingsPage/pages/hooks/use-save-key.tsx | 4 +- .../hooks/use-remove-messages.tsx | 2 +- .../SettingsPage/pages/messagesPage/index.tsx | 4 +- src/frontend/src/pages/StorePage/index.tsx | 18 +-- src/frontend/src/pages/ViewPage/index.tsx | 2 +- src/frontend/src/routes.tsx | 10 +- .../components/textOutputView/index.tsx | 2 +- src/frontend/src/stores/alertStore.ts | 6 +- src/frontend/src/stores/darkStore.ts | 2 +- src/frontend/src/stores/flowStore.ts | 50 ++++---- src/frontend/src/stores/flowsManagerStore.ts | 28 ++--- src/frontend/src/stores/foldersStore.tsx | 16 +-- .../globalVariablesStore/globalVariables.ts | 2 +- src/frontend/src/stores/messagesStore.ts | 6 +- src/frontend/src/types/components/index.ts | 8 +- src/frontend/src/types/store/index.ts | 2 +- src/frontend/src/types/tabs/index.ts | 8 +- src/frontend/src/types/zustand/flow/index.ts | 14 +-- .../src/types/zustand/flowsManager/index.ts | 8 +- .../src/types/zustand/folders/index.ts | 2 +- .../types/zustand/globalVariables/index.ts | 2 +- src/frontend/src/utils/buildUtils.ts | 18 +-- src/frontend/src/utils/parameterUtils.ts | 4 +- src/frontend/src/utils/reactflowUtils.ts | 104 ++++++++-------- src/frontend/src/utils/storeUtils.ts | 2 +- .../tests/end-to-end/chatInputOutput.spec.ts | 6 +- .../end-to-end/chatInputOutputUser.spec.ts | 8 +- .../end-to-end/curl_api_generation.spec.ts | 2 +- .../tests/end-to-end/dragAndDrop.spec.ts | 4 +- .../end-to-end/dropdownComponent.spec.ts | 28 ++--- .../end-to-end/fileUploadComponent.spec.ts | 4 +- .../tests/end-to-end/filterEdge.spec.ts | 28 ++--- .../tests/end-to-end/floatComponent.spec.ts | 20 +-- .../tests/end-to-end/flowSettings.spec.ts | 4 +- src/frontend/tests/end-to-end/folders.spec.ts | 4 +- .../tests/end-to-end/inputComponent.spec.ts | 28 ++--- .../end-to-end/inputListComponent.spec.ts | 18 +-- .../tests/end-to-end/intComponent.spec.ts | 32 ++--- .../end-to-end/keyPairListComponent.spec.ts | 4 +- .../end-to-end/langflowShortcuts.spec.ts | 4 +- .../tests/end-to-end/nestedComponent.spec.ts | 42 +++---- .../end-to-end/promptModalComponent.spec.ts | 4 +- .../end-to-end/python_api_generation.spec.ts | 2 +- .../tests/end-to-end/saveComponents.spec.ts | 4 +- src/frontend/tests/end-to-end/store.spec.ts | 2 +- .../end-to-end/textAreaModalComponent.spec.ts | 2 +- .../tests/end-to-end/textInputOutput.spec.ts | 8 +- .../tests/end-to-end/toggleComponent.spec.ts | 34 +++--- .../tests/end-to-end/tweaks_test.spec.ts | 4 +- 238 files changed, 975 insertions(+), 988 deletions(-) diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index 4e308c1b5..c2d3e3f03 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -103,7 +103,7 @@ "postcss": "^8.4.29", "prettier": "^3.3.2", "prettier-plugin-organize-imports": "^3.2.3", - "prettier-plugin-tailwindcss": "^0.3.0", + "prettier-plugin-tailwindcss": "^0.6.4", "simple-git-hooks": "^2.11.1", "tailwindcss": "^3.3.3", "tailwindcss-dotted-background": "^1.1.0", @@ -3299,9 +3299,9 @@ } }, "node_modules/@swc/core": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.5.29.tgz", - "integrity": "sha512-nvTtHJI43DUSOAf3h9XsqYg8YXKc0/N4il9y4j0xAkO0ekgDNo+3+jbw6MInawjKJF9uulyr+f5bAutTsOKVlw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.6.0.tgz", + "integrity": "sha512-Wynbo79uIVBgmq3TPcTMdtXUkqk69IPSVuzo7/Jl1OhR4msC7cUaoRB1216ZanWttrAZ4/g6u17w9XZG4fzp1A==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -3316,16 +3316,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.5.29", - "@swc/core-darwin-x64": "1.5.29", - "@swc/core-linux-arm-gnueabihf": "1.5.29", - "@swc/core-linux-arm64-gnu": "1.5.29", - "@swc/core-linux-arm64-musl": "1.5.29", - "@swc/core-linux-x64-gnu": "1.5.29", - "@swc/core-linux-x64-musl": "1.5.29", - "@swc/core-win32-arm64-msvc": "1.5.29", - "@swc/core-win32-ia32-msvc": "1.5.29", - "@swc/core-win32-x64-msvc": "1.5.29" + "@swc/core-darwin-arm64": "1.6.0", + "@swc/core-darwin-x64": "1.6.0", + "@swc/core-linux-arm-gnueabihf": "1.6.0", + "@swc/core-linux-arm64-gnu": "1.6.0", + "@swc/core-linux-arm64-musl": "1.6.0", + "@swc/core-linux-x64-gnu": "1.6.0", + "@swc/core-linux-x64-musl": "1.6.0", + "@swc/core-win32-arm64-msvc": "1.6.0", + "@swc/core-win32-ia32-msvc": "1.6.0", + "@swc/core-win32-x64-msvc": "1.6.0" }, "peerDependencies": { "@swc/helpers": "*" @@ -3337,9 +3337,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.29.tgz", - "integrity": "sha512-6F/sSxpHaq3nzg2ADv9FHLi4Fu2A8w8vP8Ich8gIl16D2htStlwnaPmCLjRswO+cFkzgVqy/l01gzNGWd4DFqA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.6.0.tgz", + "integrity": "sha512-W1Mwk0WRrJ5lAVkYRPxpxOmwu8p9ASXeOmiORhXvE7DYREyI30005xlqSOITU1pfSNKj7G9u3+9DjsOzPPPbBw==", "cpu": [ "arm64" ], @@ -3353,9 +3353,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.5.29.tgz", - "integrity": "sha512-rF/rXkvUOTdTIfoYbmszbSUGsCyvqACqy1VeP3nXONS+LxFl4bRmRcUTRrblL7IE5RTMCKUuPbqbQSE2hK7bqg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.6.0.tgz", + "integrity": "sha512-EzxLnpPC1zgLb2Y0iVUG6b+/GUv43k6uJUIs52UzxOnBElYP/WeItI3RJ+LUMFzCpZMk/IxB10wofEoeQ1H/Xg==", "cpu": [ "x64" ], @@ -3369,9 +3369,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.29.tgz", - "integrity": "sha512-2OAPL8iWBsmmwkjGXqvuUhbmmoLxS1xNXiMq87EsnCNMAKohGc7wJkdAOUL6J/YFpean/vwMWg64rJD4pycBeg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.6.0.tgz", + "integrity": "sha512-uP/STDjWZ5N6lc8mxJFsex4NXDaqhfzd8UOrI3LfdV97+4faE4/BC6bVqDNHFFzZi0PHuVBxD6md7IfPjugk6A==", "cpu": [ "arm" ], @@ -3385,9 +3385,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.29.tgz", - "integrity": "sha512-eH/Q9+8O5qhSxMestZnhuS1xqQMr6M7SolZYxiXJqxArXYILLCF+nq2R9SxuMl0CfjHSpb6+hHPk/HXy54eIRA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.6.0.tgz", + "integrity": "sha512-UgNz6anowcnYzJtZohzpii31FOgouBHJqluiq+p2geX/agbC+KfOKwVXdljn95+Qc4ygBuw/hjKjgF2msOLeVg==", "cpu": [ "arm64" ], @@ -3401,9 +3401,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.29.tgz", - "integrity": "sha512-TERh2OICAJz+SdDIK9+0GyTUwF6r4xDlFmpoiHKHrrD/Hh3u+6Zue0d7jQ/he/i80GDn4tJQkHlZys+RZL5UZg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.6.0.tgz", + "integrity": "sha512-xPV6qrnj4nFwXQbIv70C1Kn5z5Th53sirIY76aEonr78qeC6+ywaBZR4uLFNHsljVjyuvVQfTTcl2qraGhu6oQ==", "cpu": [ "arm64" ], @@ -3417,9 +3417,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.29.tgz", - "integrity": "sha512-WMDPqU7Ji9dJpA+Llek2p9t7pcy7Bob8ggPUvgsIlv3R/eesF9DIzSbrgl6j3EAEPB9LFdSafsgf6kT/qnvqFg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.6.0.tgz", + "integrity": "sha512-xTeWn4OT5uQ+DxT2cy94ngK8tF1U/5fMC49/V6FhCS2Wh+Xa/O+OWcOyKvYtk3b0eGYS4iNIRKgzog7fLSFtvQ==", "cpu": [ "x64" ], @@ -3433,9 +3433,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.29.tgz", - "integrity": "sha512-DO14glwpdKY4POSN0201OnGg1+ziaSVr6/RFzuSLggshwXeeyVORiHv3baj7NENhJhWhUy3NZlDsXLnRFkmhHQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.6.0.tgz", + "integrity": "sha512-3P01mYD5XbyaVLT0MGZmZE+ZdgmGSvuvIhSejRDBlEXqkFnH79nWds+KsE+91hzVU8XsgzX57Yzv4eO5dlIuPw==", "cpu": [ "x64" ], @@ -3449,9 +3449,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.29.tgz", - "integrity": "sha512-V3Y1+a1zG1zpYXUMqPIHEMEOd+rHoVnIpO/KTyFwAmKVu8v+/xPEVx/AGoYE67x4vDAAvPQrKI3Aokilqa5yVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.6.0.tgz", + "integrity": "sha512-xFuook1efU0ctzMAEeol4eI7J6+k/c/pMJpp/NP/4JJDnhlHwAi2iyiZcID8YZS+ePHgXMLndGdIMHVv/wIPkQ==", "cpu": [ "arm64" ], @@ -3465,9 +3465,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.29.tgz", - "integrity": "sha512-OrM6yfXw4wXhnVFosOJzarw0Fdz5Y0okgHfn9oFbTPJhoqxV5Rdmd6kXxWu2RiVKs6kGSJFZXHDeUq2w5rTIMg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.6.0.tgz", + "integrity": "sha512-VCJa5vTywxzASqvf9OEUM5SZBcNrWbuIkSGM5T9guuBzyrh/tSqVHjzOWL9qpP69uPVj5G/I5bJObLiUKErhvQ==", "cpu": [ "ia32" ], @@ -3481,9 +3481,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.29.tgz", - "integrity": "sha512-eD/gnxqKyZQQR0hR7TMkIlJ+nCF9dzYmVVNbYZWuA1Xy94aBPUsEk3Uw3oG7q6R3ErrEUPP0FNf2ztEnv+I+dw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.6.0.tgz", + "integrity": "sha512-L7i8WBSIJTQiMONJGHnznDydZmlJIqHjZ3VhBHeTTms8cEAuwkAVgzPwgr5cD9GhmcwdeBI9iYdOuKr1pUx19Q==", "cpu": [ "x64" ], @@ -10299,20 +10299,20 @@ } }, "node_modules/prettier-plugin-tailwindcss": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.3.0.tgz", - "integrity": "sha512-009/Xqdy7UmkcTBpwlq7jsViDqXAYSOMLDrHAdTMlVZOrKfM2o9Ci7EMWTMZ7SkKBFTG04UM9F9iM2+4i6boDA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.4.tgz", + "integrity": "sha512-3vhbIvlKyAWPaw9bUr2cw6M1BGx2Oy9CCLJyv+nxEiBGCTcL69WcAz2IFMGqx8IXSzQCInGSo2ujAByg9poHLQ==", "dev": true, "engines": { - "node": ">=12.17.0" + "node": ">=14.21.3" }, "peerDependencies": { "@ianvs/prettier-plugin-sort-imports": "*", "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", - "@shufo/prettier-plugin-blade": "*", "@trivago/prettier-plugin-sort-imports": "*", - "prettier": ">=2.2.0", + "@zackad/prettier-plugin-twig-melody": "*", + "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", "prettier-plugin-import-sort": "*", @@ -10320,9 +10320,9 @@ "prettier-plugin-marko": "*", "prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", "prettier-plugin-style-order": "*", - "prettier-plugin-svelte": "*", - "prettier-plugin-twig-melody": "*" + "prettier-plugin-svelte": "*" }, "peerDependenciesMeta": { "@ianvs/prettier-plugin-sort-imports": { @@ -10334,10 +10334,10 @@ "@shopify/prettier-plugin-liquid": { "optional": true }, - "@shufo/prettier-plugin-blade": { + "@trivago/prettier-plugin-sort-imports": { "optional": true }, - "@trivago/prettier-plugin-sort-imports": { + "@zackad/prettier-plugin-twig-melody": { "optional": true }, "prettier-plugin-astro": { @@ -10361,14 +10361,14 @@ "prettier-plugin-organize-imports": { "optional": true }, + "prettier-plugin-sort-imports": { + "optional": true + }, "prettier-plugin-style-order": { "optional": true }, "prettier-plugin-svelte": { "optional": true - }, - "prettier-plugin-twig-melody": { - "optional": true } } }, diff --git a/src/frontend/package.json b/src/frontend/package.json index f4c9bb795..f3eb36409 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -125,7 +125,7 @@ "postcss": "^8.4.29", "prettier": "^3.3.2", "prettier-plugin-organize-imports": "^3.2.3", - "prettier-plugin-tailwindcss": "^0.3.0", + "prettier-plugin-tailwindcss": "^0.6.4", "simple-git-hooks": "^2.11.1", "tailwindcss": "^3.3.3", "tailwindcss-dotted-background": "^1.1.0", diff --git a/src/frontend/prettier.config.js b/src/frontend/prettier.config.js index f01cc7a68..d57311886 100644 --- a/src/frontend/prettier.config.js +++ b/src/frontend/prettier.config.js @@ -1,3 +1,3 @@ module.exports = { - plugins: [require("prettier-plugin-tailwindcss")], + plugins: ["prettier-plugin-tailwindcss"], }; diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index b84c0d792..720ffb6b2 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -29,10 +29,10 @@ export default function App() { useTrackLastVisitedPath(); const removeFromTempNotificationList = useAlertStore( - (state) => state.removeFromTempNotificationList + (state) => state.removeFromTempNotificationList, ); const tempNotificationList = useAlertStore( - (state) => state.tempNotificationList + (state) => state.tempNotificationList, ); const [fetchError, setFetchError] = useState(false); const isLoading = useFlowsManagerStore((state) => state.isLoading); @@ -48,7 +48,7 @@ export default function App() { const refreshVersion = useDarkStore((state) => state.refreshVersion); const refreshStars = useDarkStore((state) => state.refreshStars); const setGlobalVariables = useGlobalVariablesStore( - (state) => state.setGlobalVariables + (state) => state.setGlobalVariables, ); const checkHasStore = useStoreStore((state) => state.checkHasStore); const navigate = useNavigate(); diff --git a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx index b3185acb1..f717099cb 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx @@ -14,7 +14,7 @@ export default function OutputModal({ open, setOpen, nodeId }): JSX.Element { -
+
diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index eab8a4246..68ee85816 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -238,7 +238,7 @@ export default function ParameterComponent({ isValidConnection(connection, nodes, edges) } className={classNames( - left ? "my-12 -ml-0.5 " : " my-12 -mr-0.5 ", + left ? "my-12 -ml-0.5" : "my-12 -mr-0.5", "h-3 w-3 rounded-full border-2 bg-background", !showNode ? "mt-0" : "", )} @@ -260,7 +260,7 @@ export default function ParameterComponent({ "relative mt-1 flex w-full flex-wrap items-center justify-between bg-muted px-5 py-2" + ((name === "code" && type === "code") || (name.includes("code") && proxy) - ? " hidden " + ? " hidden" : "") } > @@ -279,13 +279,13 @@ export default function ParameterComponent({ {proxy ? ( {proxy.id}}> - + {title} ) : (
- + {title} {!left && ( @@ -309,8 +309,8 @@ export default function ParameterComponent({ className={classNames( "h-5 w-5 rounded-md", displayOutputPreview && !unknownOutput - ? " hover:bg-secondary-foreground/5 hover:text-medium-indigo" - : " cursor-not-allowed text-muted-foreground", + ? "hover:bg-secondary-foreground/5 hover:text-medium-indigo" + : "cursor-not-allowed text-muted-foreground", )} name={"ScanEye"} /> @@ -401,7 +401,7 @@ export default function ParameterComponent({
-
+
{ 0 ? "mt-2 flex items-center" : "mt-3 flex items-center" + index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center", )} >
state.setErrorData); const isDark = useDarkStore((state) => state.dark); const buildStatus = useFlowStore( - (state) => state.flowBuildStatus[data.id]?.status + (state) => state.flowBuildStatus[data.id]?.status, ); const lastRunTime = useFlowStore( - (state) => state.flowBuildStatus[data.id]?.timestamp + (state) => state.flowBuildStatus[data.id]?.timestamp, ); const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot); @@ -72,7 +72,7 @@ export default function GenericNode({ const [nodeName, setNodeName] = useState(data.node!.display_name); const [inputDescription, setInputDescription] = useState(false); const [nodeDescription, setNodeDescription] = useState( - data.node?.description! + data.node?.description!, ); const [isOutdated, setIsOutdated] = useState(false); const [validationStatus, setValidationStatus] = @@ -90,7 +90,7 @@ export default function GenericNode({ data.node!, setNode, setIsOutdated, - updateNodeInternals + updateNodeInternals, ); const name = nodeIconsLucide[data.type] ? data.type : types[data.type]; @@ -117,12 +117,12 @@ export default function GenericNode({ selected: boolean, showNode: boolean, buildStatus: BuildStatus | undefined, - validationStatus: VertexBuildTypeAPI | null + validationStatus: VertexBuildTypeAPI | null, ) => { const specificClassFromBuildStatus = getSpecificClassFromBuildStatus( buildStatus, validationStatus, - isDark + isDark, ); const baseBorderClass = getBaseBorderClass(selected); @@ -131,7 +131,7 @@ export default function GenericNode({ baseBorderClass, nodeSizeClass, "generic-node-div group/node", - specificClassFromBuildStatus + specificClassFromBuildStatus, ); return names; }; @@ -176,7 +176,7 @@ export default function GenericNode({ showNode, isEmoji, nodeIconFragment, - checkNodeIconFragment + checkNodeIconFragment, ); function countHandles(): void { @@ -309,7 +309,7 @@ export default function GenericNode({ selected, showNode, buildStatus, - validationStatus + validationStatus, )} > {data.node?.beta && showNode && ( @@ -323,14 +323,14 @@ export default function GenericNode({ className={ "generic-node-div-title " + (!showNode - ? " relative h-24 w-24 rounded-full " - : " justify-between rounded-t-lg ") + ? " relative h-24 w-24 rounded-full" + : " justify-between rounded-t-lg") } >
@@ -457,7 +457,7 @@ export default function GenericNode({ } title={getFieldTitle( data.node?.template!, - templateField + templateField, )} info={data.node?.template[templateField].info} name={templateField} @@ -485,7 +485,7 @@ export default function GenericNode({ proxy={data.node?.template[templateField].proxy} showNode={showNode} /> - ) + ), )} { setInputDescription(true); @@ -654,10 +654,7 @@ export default function GenericNode({ nameEditable ? ( "Double Click to Edit Description" ) : ( - + {String(data.node?.description)} )} @@ -713,13 +710,13 @@ export default function GenericNode({ } title={getFieldTitle( data.node?.template!, - templateField + templateField, )} info={data.node?.template[templateField].info} name={templateField} tooltipTitle={ data.node?.template[templateField].input_types?.join( - "\n" + "\n", ) ?? data.node?.template[templateField].type } required={data.node!.template[templateField].required} @@ -746,7 +743,7 @@ export default function GenericNode({
{" "} diff --git a/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts b/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts index cf251c40c..710e91d15 100644 --- a/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts +++ b/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts @@ -4,7 +4,7 @@ import { VertexBuildTypeAPI } from "../../types/api"; export const getSpecificClassFromBuildStatus = ( buildStatus: BuildStatus | undefined, validationStatus: VertexBuildTypeAPI | null, - isDark: boolean + isDark: boolean, ) => { let isInvalid = validationStatus && !validationStatus.valid; diff --git a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx index 3a49ef62f..ec4d586f6 100644 --- a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx @@ -6,7 +6,7 @@ const useCheckCodeValidity = ( data: NodeDataType, templates: { [key: string]: any }, setIsOutdated: (value: boolean) => void, - types + types, ) => { useEffect(() => { // This one should run only once diff --git a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx index d8545d72a..f203a059a 100644 --- a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx @@ -13,7 +13,7 @@ const useFetchDataOnMount = ( handleUpdateValues, setNode, renderTooltips, - setIsLoading + setIsLoading, ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx index b41491f97..7be08491c 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx @@ -14,7 +14,7 @@ const useHandleOnNewValue = ( debouncedHandleUpdateValues, setNode, renderTooltips, - setIsLoading + setIsLoading, ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx index bdcf1f8cc..412658d77 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx @@ -6,7 +6,7 @@ const useHandleNodeClass = ( takeSnapshot, setNode, updateNodeInternals, - renderTooltips + renderTooltips, ) => { const handleNodeClass = (newNodeClass, code) => { if (!data.node) return; diff --git a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx index cc9e29c0e..181b4f515 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx @@ -12,8 +12,8 @@ const useIconNodeRender = ( checkNodeIconFragment: ( iconColor: string, iconName: string, - iconClassName: string - ) => JSX.Element + iconClassName: string, + ) => JSX.Element, ) => { const iconNodeRender = useCallback(() => { const iconElement = data?.node?.icon; diff --git a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx index 19c6112d5..bea5d3f1f 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -6,7 +6,7 @@ import { VertexBuildTypeAPI } from "../../types/api"; const useIconStatus = ( buildStatus: BuildStatus | undefined, - validationStatus: VertexBuildTypeAPI | null + validationStatus: VertexBuildTypeAPI | null, ) => { const conditionSuccess = validationStatus && validationStatus.valid; const conditionError = diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx index d919a4fa9..f1593597f 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx @@ -7,7 +7,7 @@ const useUpdateNodeCode = ( dataNode: APIClassType, // Define YourNodeType according to your data structure setNode: (id: string, callback: (oldNode) => any) => void, setIsOutdated: (value: boolean) => void, - updateNodeInternals: (id: string) => void + updateNodeInternals: (id: string) => void, ) => { const updateNodeCode = useCallback( (newNodeClass: APIClassType, code: string, name: string) => { @@ -30,7 +30,7 @@ const useUpdateNodeCode = ( updateNodeInternals(dataId); }, - [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals] + [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals], ); return updateNodeCode; diff --git a/src/frontend/src/CustomNodes/utils/get-field-title.tsx b/src/frontend/src/CustomNodes/utils/get-field-title.tsx index a00829a90..e448c4f01 100644 --- a/src/frontend/src/CustomNodes/utils/get-field-title.tsx +++ b/src/frontend/src/CustomNodes/utils/get-field-title.tsx @@ -2,7 +2,7 @@ import { APITemplateType } from "../../types/api"; export default function getFieldTitle( template: APITemplateType, - templateField: string + templateField: string, ): string { return template[templateField].display_name ? template[templateField].display_name! diff --git a/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx b/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx index 953305c84..e3e562174 100644 --- a/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx @@ -83,7 +83,7 @@ export default function SingleAlert({
diff --git a/src/frontend/src/alerts/alertDropDown/index.tsx b/src/frontend/src/alerts/alertDropDown/index.tsx index 6eff32fe2..48c51088d 100644 --- a/src/frontend/src/alerts/alertDropDown/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/index.tsx @@ -16,13 +16,13 @@ export default function AlertDropdown({ }: AlertDropdownType): JSX.Element { const notificationList = useAlertStore((state) => state.notificationList); const clearNotificationList = useAlertStore( - (state) => state.clearNotificationList + (state) => state.clearNotificationList, ); const removeFromNotificationList = useAlertStore( - (state) => state.removeFromNotificationList + (state) => state.removeFromNotificationList, ); const setNotificationCenter = useAlertStore( - (state) => state.setNotificationCenter + (state) => state.setNotificationCenter, ); const [open, setOpen] = useState(false); @@ -39,7 +39,7 @@ export default function AlertDropdown({
Notifications -
+
-
+
); } diff --git a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx index 212a03fa2..d4fb95b5c 100644 --- a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx @@ -15,7 +15,7 @@ export default function FolderAccordionComponent({ options, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion() + open.length === 0 ? "" : getOpenAccordion(), ); function getOpenAccordion(): string { diff --git a/src/frontend/src/components/accordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/index.tsx index 43a0aef79..c9c21b8b2 100644 --- a/src/frontend/src/components/accordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/index.tsx @@ -17,7 +17,7 @@ export default function AccordionComponent({ sideBar, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion() + open.length === 0 ? "" : getOpenAccordion(), ); function getOpenAccordion(): string { @@ -52,7 +52,7 @@ export default function AccordionComponent({ disabled={disabled} className={cn( sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3", - disabled ? "cursor-not-allowed" : "cursor-pointer" + disabled ? "cursor-not-allowed" : "cursor-pointer", )} > {trigger} diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index d75bf625c..415cd92d7 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -29,19 +29,19 @@ export default function AddNewVariableButton({ const setErrorData = useAlertStore((state) => state.setErrorData); const componentFields = useTypesStore((state) => state.ComponentFields); const unavaliableFields = new Set( - Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)) + Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)), ); const availableFields = () => { const fields = Array.from(componentFields).filter( - (field) => !unavaliableFields.has(field) + (field) => !unavaliableFields.has(field), ); return sortByName(fields); }; const addGlobalVariable = useGlobalVariablesStore( - (state) => state.addGlobalVariable + (state) => state.addGlobalVariable, ); function handleSaveVariable() { @@ -92,7 +92,7 @@ export default function AddNewVariableButton({ Create Variable