diff --git a/contributing.md b/contributing.md index 2e91f5220..f8e0909e2 100644 --- a/contributing.md +++ b/contributing.md @@ -15,15 +15,15 @@ | [正體中文](docs/contributing/contributing_zhtw.md) | [日本語](docs/contributing/contributing_ja.md) | [हिंदी](docs/contributing/contributing_hi.md) -| [Nederlands](docs/contributing/contributing_nl.md) +| [Dutch](docs/contributing/contributing_nl.md) ## Let's make Bruno better, together!! -We are happy that you are looking to improve Bruno. Below are the guidelines to get started bringing up Bruno on your computer. +We are happy that you are looking to improve Bruno. Below are the guidelines to run Bruno on your computer. ### Technology Stack -Bruno is built using Next.js and React. We also use electron to ship a desktop version (that supports local collections) +Bruno is built using React and Electron. Libraries we use @@ -42,8 +42,9 @@ Libraries we use ## Development -Bruno is being developed as a desktop app. You need to load the app by running the Next.js app in one terminal and then run the electron app in another terminal. +Bruno is a desktop app. Below are the instructions to run Bruno. +> Note: We use React for the frontend and rsbuild for build and dev server. ## Install Dependencies @@ -55,9 +56,13 @@ nvm use npm i --legacy-peer-deps ``` -### Local Development (Option 1) +### Local Development -```bash +#### Build packages + +##### Option 1 + +```bash # build packages npm run build:graphql-docs npm run build:bruno-query @@ -67,7 +72,19 @@ npm run build:bruno-requests # bundle js sandbox libraries npm run sandbox:bundle-libraries --workspace=packages/bruno-js +``` +##### Option 2 +```bash +# install dependencies and setup +npm run setup +``` + +#### Run the app + +##### Option 1 + +```bash # run react app (terminal 1) npm run dev:web @@ -75,12 +92,8 @@ npm run dev:web npm run dev:electron ``` -### Local Development (Option 2) - +##### Option 2 ```bash -# install dependencies and setup -npm run setup - # run electron and react app concurrently npm run dev ``` @@ -103,7 +116,28 @@ find . -type f -name "package-lock.json" -delete ```bash # run bruno-schema tests -npm test --workspace=packages/bruno-schema +npm run test --workspace=packages/bruno-schema + +# run bruno-query tests +npm run test --workspace=packages/bruno-query + +# run bruno-common tests +npm run test --workspace=packages/bruno-common + +# run bruno-converters tests +npm run test --workspace=packages/bruno-converters + +# run bruno-app tests +npm run test --workspace=packages/bruno-app + +# run bruno-electron tests +npm run test --workspace=packages/bruno-electron + +# run bruno-lang tests +npm run test --workspace=packages/bruno-lang + +# run bruno-toml tests +npm run test --workspace=packages/bruno-toml # run tests over all workspaces npm test --workspaces --if-present diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js index 8aaaa749c..f56d408b0 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js @@ -13,6 +13,7 @@ const RunCollectionItem = ({ collectionUid, item, onClose }) => { const dispatch = useDispatch(); const collection = useSelector(state => state.collections.collections?.find(c => c.uid === collectionUid)); + const isCollectionRunInProgress = collection?.runnerResult?.info?.status && (collection?.runnerResult?.info?.status !== 'ended'); const onSubmit = (recursive) => { dispatch( @@ -22,10 +23,24 @@ const RunCollectionItem = ({ collectionUid, item, onClose }) => { type: 'collection-runner' }) ); - dispatch(runCollectionFolder(collection.uid, item ? item.uid : null, recursive)); + if (!isCollectionRunInProgress) { + dispatch(runCollectionFolder(collection.uid, item ? item.uid : null, recursive)); + } onClose(); }; + const handleViewRunner = (e) => { + e.preventDefault(); + dispatch( + addTab({ + uid: uuid(), + collectionUid: collection.uid, + type: 'collection-runner' + }) + ); + onClose(); + } + const getRequestsCount = (items) => { const requestTypes = ['http-request', 'graphql-request'] return items.filter(req => requestTypes.includes(req.type)).length; @@ -55,22 +70,34 @@ const RunCollectionItem = ({ collectionUid, item, onClose }) => {