diff --git a/contributing.md b/contributing.md index 3835c2cb6..dbfb9b5eb 100644 --- a/contributing.md +++ b/contributing.md @@ -15,6 +15,7 @@ | [正體中文](docs/contributing/contributing_zhtw.md) | [日本語](docs/contributing/contributing_ja.md) | [हिंदी](docs/contributing/contributing_hi.md) +| [Nederlands](docs/contributing/contributing_nl.md) ## Let's make Bruno better, together!! @@ -47,7 +48,7 @@ Bruno is being developed as a desktop app. You need to load the app by running t ### Local Development ```bash -# use nodejs 18 version +# use nodejs 20 version nvm use # install deps diff --git a/docs/contributing/contributing_bn.md b/docs/contributing/contributing_bn.md index 9348919fb..a5d765a1e 100644 --- a/docs/contributing/contributing_bn.md +++ b/docs/contributing/contributing_bn.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| **বাংলা** -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## আসুন ব্রুনোকে আরও ভালো করি, একসাথে!! diff --git a/docs/contributing/contributing_cn.md b/docs/contributing/contributing_cn.md index f20d0ce75..f355feba6 100644 --- a/docs/contributing/contributing_cn.md +++ b/docs/contributing/contributing_cn.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| **简体中文** -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## 让我们一起改进 Bruno! diff --git a/docs/contributing/contributing_de.md b/docs/contributing/contributing_de.md index 2e11bdc77..2983e8d26 100644 --- a/docs/contributing/contributing_de.md +++ b/docs/contributing/contributing_de.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| **Deutsch** -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Lass uns Bruno noch besser machen, gemeinsam!! diff --git a/docs/contributing/contributing_es.md b/docs/contributing/contributing_es.md index d94cee032..f84090a10 100644 --- a/docs/contributing/contributing_es.md +++ b/docs/contributing/contributing_es.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| **Español** -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## ¡Juntos, hagamos a Bruno mejor! diff --git a/docs/contributing/contributing_fr.md b/docs/contributing/contributing_fr.md index 4016ab3d6..9b0eacda1 100644 --- a/docs/contributing/contributing_fr.md +++ b/docs/contributing/contributing_fr.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| **Français** -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Ensemble, améliorons Bruno ! diff --git a/docs/contributing/contributing_hi.md b/docs/contributing/contributing_hi.md index 71f0f503c..38f39c5ec 100644 --- a/docs/contributing/contributing_hi.md +++ b/docs/contributing/contributing_hi.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| **हिंदी** ## आइए मिलकर Bruno को बेहतर बनाएं !! diff --git a/docs/contributing/contributing_it.md b/docs/contributing/contributing_it.md index 93dce3e39..18b7518f1 100644 --- a/docs/contributing/contributing_it.md +++ b/docs/contributing/contributing_it.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| **Italiano** -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Insieme, miglioriamo Bruno! diff --git a/docs/contributing/contributing_ja.md b/docs/contributing/contributing_ja.md index 604c59571..da2197883 100644 --- a/docs/contributing/contributing_ja.md +++ b/docs/contributing/contributing_ja.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| **日本語** -| [हिंदी](./contributing_hi.md) ## 一緒に Bruno をよりよいものにしていきましょう!! diff --git a/docs/contributing/contributing_kr.md b/docs/contributing/contributing_kr.md index d1c008305..70e5a12f2 100644 --- a/docs/contributing/contributing_kr.md +++ b/docs/contributing/contributing_kr.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| **한국어** -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## 함께 Bruno를 더 좋게 만들어요!! diff --git a/docs/contributing/contributing_nl.md b/docs/contributing/contributing_nl.md new file mode 100644 index 000000000..8c8d9402e --- /dev/null +++ b/docs/contributing/contributing_nl.md @@ -0,0 +1,82 @@ +[English](../../contributing.md) + +## Laten we Bruno samen beter maken !! + +We zijn blij dat je Bruno wilt verbeteren. Hieronder staan de richtlijnen om Bruno op je computer op te zetten. + +### Technologiestack + +Bruno is gebouwd met Next.js en React. We gebruiken ook Electron om een desktopversie te leveren (die lokale collecties ondersteunt). + +Bibliotheken die we gebruiken: + +- CSS - Tailwind +- Code Editors - Codemirror +- State Management - Redux +- Iconen - Tabler Icons +- Formulieren - formik +- Schema Validatie - Yup +- Request Client - axios +- Bestandsysteem Watcher - chokidar + +### Afhankelijkheden + +Je hebt [Node v18.x of de nieuwste LTS-versie](https://nodejs.org/en/) en npm 8.x nodig. We gebruiken npm workspaces in het project. + +## Ontwikkeling + +Bruno wordt ontwikkeld als een desktop-app. Je moet de app laden door de Next.js app in één terminal te draaien en daarna de Electron app in een andere terminal te draaien. + +### Lokale Ontwikkeling + +```bash +# gebruik voorgeschreven node versie +nvm use + +# installeer afhankelijkheden +npm i --legacy-peer-deps + +# build pakketten +npm run build:graphql-docs +npm run build:bruno-query +npm run build:bruno-common + +# draai next app (terminal 1) +npm run dev:web + +# draai electron app (terminal 2) +npm run dev:electron +``` + +### Problemen oplossen + +Je kunt een `Unsupported platform`-fout tegenkomen wanneer je `npm install` uitvoert. Om dit te verhelpen, moet je `node_modules` en `package-lock.json` verwijderen en `npm install` uitvoeren. Dit zou alle benodigde afhankelijkheden moeten installeren om de app te draaien. + +```shell +# Verwijder node_modules in subdirectories +find ./ -type d -name "node_modules" -print0 | while read -d $'\0' dir; do + rm -rf "$dir" +done + +# Verwijder package-lock in subdirectories +find . -type f -name "package-lock.json" -delete +``` + +### Testen + +```bash +# bruno-schema +npm test --workspace=packages/bruno-schema + +# bruno-lang +npm test --workspace=packages/bruno-lang +``` + +### Pull Requests indienen + +- Houd de PR's klein en gefocust op één ding +- Volg het formaat voor het aanmaken van branches + - feature/[feature naam]: Deze branch moet wijzigingen voor een specifieke functie bevatten + - Voorbeeld: feature/dark-mode + - bugfix/[bug naam]: Deze branch moet alleen bugfixes voor een specifieke bug bevatten + - Voorbeeld: bugfix/bug-1 \ No newline at end of file diff --git a/docs/contributing/contributing_pl.md b/docs/contributing/contributing_pl.md index 6cc7a7f55..085407db5 100644 --- a/docs/contributing/contributing_pl.md +++ b/docs/contributing/contributing_pl.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| **Polski** -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Wspólnie uczynijmy Bruno lepszym !! diff --git a/docs/contributing/contributing_pt_br.md b/docs/contributing/contributing_pt_br.md index 52bdecafc..513dfcc3c 100644 --- a/docs/contributing/contributing_pt_br.md +++ b/docs/contributing/contributing_pt_br.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| **Português (BR)** -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Vamos tornar o Bruno melhor, juntos!! diff --git a/docs/contributing/contributing_ro.md b/docs/contributing/contributing_ro.md index 5a7e23f96..ee2102615 100644 --- a/docs/contributing/contributing_ro.md +++ b/docs/contributing/contributing_ro.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| **Română** -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Haideţi să îmbunătățim Bruno, împreună!! diff --git a/docs/contributing/contributing_ru.md b/docs/contributing/contributing_ru.md index ce4cf16d3..ab9679534 100644 --- a/docs/contributing/contributing_ru.md +++ b/docs/contributing/contributing_ru.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| **Русский** -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Давайте вместе сделаем Бруно лучше!!! diff --git a/docs/contributing/contributing_tr.md b/docs/contributing/contributing_tr.md index 2789b3a58..26531cabd 100644 --- a/docs/contributing/contributing_tr.md +++ b/docs/contributing/contributing_tr.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| **Türkçe** -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Bruno'yu birlikte daha iyi hale getirelim!!! diff --git a/docs/contributing/contributing_ua.md b/docs/contributing/contributing_ua.md index aeace2550..88f9ab595 100644 --- a/docs/contributing/contributing_ua.md +++ b/docs/contributing/contributing_ua.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| **Українська** -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| [正體中文](./contributing_zhtw.md) -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## Давайте зробимо Bruno краще, разом !! diff --git a/docs/contributing/contributing_zhtw.md b/docs/contributing/contributing_zhtw.md index 48ec8248a..f061adb4a 100644 --- a/docs/contributing/contributing_zhtw.md +++ b/docs/contributing/contributing_zhtw.md @@ -1,20 +1,4 @@ [English](../../contributing.md) -| [Українська](./contributing_ua.md) -| [Русский](./contributing_ru.md) -| [Türkçe](./contributing_tr.md) -| [Deutsch](./contributing_de.md) -| [Français](./contributing_fr.md) -| [Português (BR)](./contributing_pt_br.md) -| [한국어](./contributing_kr.md) -| [বাংলা](./contributing_bn.md) -| [Español](./contributing_es.md) -| [Italiano](./contributing_it.md) -| [Română](./contributing_ro.md) -| [Polski](./contributing_pl.md) -| [简体中文](./contributing_cn.md) -| **正體中文** -| [日本語](./contributing_ja.md) -| [हिंदी](./contributing_hi.md) ## 讓我們一起來讓 Bruno 變得更好! diff --git a/docs/publishing/publishin_nl.md b/docs/publishing/publishin_nl.md new file mode 100644 index 000000000..a6c742797 --- /dev/null +++ b/docs/publishing/publishin_nl.md @@ -0,0 +1,7 @@ +[English](../../publishing.md) + +### Bruno publiceren naar een nieuwe pakketbeheerder + +Hoewel onze code open source is en beschikbaar voor iedereen, verzoeken we je vriendelijk om contact met ons op te nemen voordat je publicatie overweegt op nieuwe pakketbeheerders. Als de maker van Bruno houd ik het handelsmerk `Bruno` voor dit project en wil ik het distributieproces beheren. Als je Bruno op een nieuwe pakketbeheerder wilt zien, dien dan een GitHub-issue in. + +Hoewel de meerderheid van onze functies gratis en open source zijn (die REST en GraphQL API's dekken), streven we ernaar een harmonieuze balans te vinden tussen open-source principes en duurzaamheid - https://github.com/usebruno/bruno/discussions/269 \ No newline at end of file diff --git a/docs/publishing/publishing_bn.md b/docs/publishing/publishing_bn.md index 44cc55aef..bca792f7e 100644 --- a/docs/publishing/publishing_bn.md +++ b/docs/publishing/publishing_bn.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| **বাংলা** -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### ব্রুনোকে নতুন প্যাকেজ ম্যানেজারে প্রকাশ করা diff --git a/docs/publishing/publishing_cn.md b/docs/publishing/publishing_cn.md index 04bd23c81..08835547d 100644 --- a/docs/publishing/publishing_cn.md +++ b/docs/publishing/publishing_cn.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| **简体中文** -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### 将 Bruno 发布到新的包管理器 diff --git a/docs/publishing/publishing_de.md b/docs/publishing/publishing_de.md index 01f866c06..e8388bc53 100644 --- a/docs/publishing/publishing_de.md +++ b/docs/publishing/publishing_de.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| **Deutsch** -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### Veröffentlichung von Bruno über neue Paket-Manager diff --git a/docs/publishing/publishing_fr.md b/docs/publishing/publishing_fr.md index fd88a8dc8..856665e2c 100644 --- a/docs/publishing/publishing_fr.md +++ b/docs/publishing/publishing_fr.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| **Français** -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### Publier Bruno dans un nouveau gestionnaire de paquets diff --git a/docs/publishing/publishing_ja.md b/docs/publishing/publishing_ja.md index adb3f120d..be45b6470 100644 --- a/docs/publishing/publishing_ja.md +++ b/docs/publishing/publishing_ja.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| **日本語** ### Bruno を新しいパッケージマネージャに公開する場合の注意 diff --git a/docs/publishing/publishing_pl.md b/docs/publishing/publishing_pl.md index 37127c237..5fd8b0ace 100644 --- a/docs/publishing/publishing_pl.md +++ b/docs/publishing/publishing_pl.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| **Polski** -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### Publikowanie Bruno w nowym menedżerze pakietów diff --git a/docs/publishing/publishing_pt_br.md b/docs/publishing/publishing_pt_br.md index 3cb43cf53..7d49aca53 100644 --- a/docs/publishing/publishing_pt_br.md +++ b/docs/publishing/publishing_pt_br.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| **Português (BR)** -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### Publicando Bruno em um novo gerenciador de pacotes diff --git a/docs/publishing/publishing_ro.md b/docs/publishing/publishing_ro.md index 44fcca7cc..0c3177b0c 100644 --- a/docs/publishing/publishing_ro.md +++ b/docs/publishing/publishing_ro.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| **Română** -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### Publicarea lui Bruno la un gestionar de pachete nou diff --git a/docs/publishing/publishing_tr.md b/docs/publishing/publishing_tr.md index 5dfb87637..314471f67 100644 --- a/docs/publishing/publishing_tr.md +++ b/docs/publishing/publishing_tr.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| **Türkçe** -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| [正體中文](./publishing_zhtw.md) -| [日本語](./publishing_ja.md) ### Bruno'yu yeni bir paket yöneticisine yayınlama diff --git a/docs/publishing/publishing_zhtw.md b/docs/publishing/publishing_zhtw.md index 87548c21e..294f468c1 100644 --- a/docs/publishing/publishing_zhtw.md +++ b/docs/publishing/publishing_zhtw.md @@ -1,14 +1,4 @@ [English](../../publishing.md) -| [Türkçe](./publishing_tr.md) -| [Deutsch](./publishing_de.md) -| [Français](./publishing_fr.md) -| [Português (BR)](./publishing_pt_br.md) -| [বাংলা](./publishing_bn.md) -| [Română](./publishing_ro.md) -| [Polski](./publishing_pl.md) -| [简体中文](./publishing_cn.md) -| **正體中文** -| [日本語](./publishing_ja.md) ### 將 Bruno 發佈到新的套件管理器 diff --git a/docs/readme/readme_nl.md b/docs/readme/readme_nl.md new file mode 100644 index 000000000..809de08ee --- /dev/null +++ b/docs/readme/readme_nl.md @@ -0,0 +1,157 @@ +
+ + +### Bruno - Open source IDE voor het verkennen en testen van API's. + +[![GitHub version](https://badge.fury.io/gh/usebruno%2Fbruno.svg)](https://badge.fury.io/gh/usebruno%bruno) +[![CI](https://github.com/usebruno/bruno/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/usebruno/bruno/actions/workflows/tests.yml) +[![Commit Activity](https://img.shields.io/github/commit-activity/m/usebruno/bruno)](https://github.com/usebruno/bruno/pulse) +[![X](https://img.shields.io/twitter/follow/use_bruno?style=social&logo=x)](https://twitter.com/use_bruno) +[![Website](https://img.shields.io/badge/Website-Visit-blue)](https://www.usebruno.com) +[![Download](https://img.shields.io/badge/Download-Latest-brightgreen)](https://www.usebruno.com/downloads) + +[English](../../readme.md) | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | ** Nederlands ** | [Français](docs/readme/readme_fr.md) | [Português (BR)](docs/readme/readme_pt_br.md) | [한국어](docs/readme/readme_kr.md) | [বাংলা](docs/readme/readme_bn.md) | [Español](docs/readme/readme_es.md) | [Italiano](docs/readme/readme_it.md) | [Română](docs/readme/readme_ro.md) | [Polski](docs/readme/readme_pl.md) | [简体中文](docs/readme/readme_cn.md) | [正體中文](docs/readme/readme_zhtw.md) | [العربية](docs/readme/readme_ar.md) | [日本語](docs/readme/readme_ja.md) + +Bruno is een nieuwe en innovatieve API-client, gericht op het revolutioneren van de status quo die wordt vertegenwoordigd door Postman en vergelijkbare tools. + +Bruno slaat je collecties direct op in een map op je bestandssysteem. We gebruiken een platte tekst opmaaktaal, Bru, om informatie over API-verzoeken op te slaan. + +Je kunt Git of elke versiebeheertool naar keuze gebruiken om samen te werken aan je API-collecties. + +Bruno is uitsluitend offline. Er zijn geen plannen om ooit cloud-synchronisatie aan Bruno toe te voegen. We waarderen je gegevensprivacy en geloven dat deze op je apparaat moet blijven. Lees onze langetermijnvisie [hier](https://github.com/usebruno/bruno/discussions/269) + +[Download Bruno](https://www.usebruno.com/downloads) + +📢 Bekijk onze recente presentatie op de India FOSS 3.0 Conference [hier](https://www.youtube.com/watch?v=7bSMFpbcPiY) + +![bruno](/assets/images/landing-2.png)

+ +### Golden Edition ✨ + +De meeste van onze functies zijn gratis en open source. +We streven naar een harmonieuze balans tussen [open-source principes en duurzaamheid](https://github.com/usebruno/bruno/discussions/269). + +Je kunt de [Golden Edition](https://www.usebruno.com/pricing) kopen voor een eenmalige betaling van **$19**!
+ +### Installatie + +Bruno is beschikbaar als binaire download [op onze website](https://www.usebruno.com/downloads) voor Mac, Windows en Linux. + +Je kunt Bruno ook installeren via pakketbeheerders zoals Homebrew, Chocolatey, Scoop, Snap, Flatpak en Apt. + +```sh +# Op Mac via Homebrew +brew install bruno + +# Op Windows via Chocolatey +choco install bruno + +# Op Windows via Scoop +scoop bucket add extras +scoop install bruno + +# Op Windows via winget +winget install Bruno.Bruno + +# Op Linux via Snap +snap install bruno + +# Op Linux via Flatpak +flatpak install com.usebruno.Bruno + +# Op Linux via Apt +sudo mkdir -p /etc/apt/keyrings +sudo gpg --no-default-keyring --keyring /etc/apt/keyrings/bruno.gpg --keyserver keyserver.ubuntu.com --recv-keys 9FA6017ECABE0266 + +echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/bruno.gpg] http://debian.usebruno.com/ bruno stable" | sudo tee /etc/apt/sources.list.d/bruno.list + +sudo apt update +sudo apt install bruno +``` + +### Draai op meerdere platformen 🖥️ + +![bruno](/assets/images/run-anywhere.png)

+ +### Samenwerken via Git 👩‍💻🧑‍💻 + +Of elk versiebeheersysteem naar keuze + +![bruno](/assets/images/version-control.png)

+ +### Sponsors + +#### Gouden Sponsors + + + +#### Zilveren Sponsors + + + +#### Bronzen Sponsors + + + + + +### Belangrijke Links 📌 + +- [Onze Langetermijnvisie](https://github.com/usebruno/bruno/discussions/269) +- [Roadmap](https://github.com/usebruno/bruno/discussions/384) +- [Documentatie](https://docs.usebruno.com) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/bruno) +- [Website](https://www.usebruno.com) +- [Prijzen](https://www.usebruno.com/pricing) +- [Download](https://www.usebruno.com/downloads) +- [GitHub Sponsors](https://github.com/sponsors/helloanoop) + +### Showcase 🎥 + +- [Getuigenissen](https://github.com/usebruno/bruno/discussions/343) +- [Kenniscentrum](https://github.com/usebruno/bruno/discussions/386) +- [Scriptmania](https://github.com/usebruno/bruno/discussions/385) + +### Ondersteuning ❤️ + +Als je Bruno leuk vindt en ons open-source werk wilt ondersteunen, overweeg dan om ons te sponsoren via [GitHub Sponsors](https://github.com/sponsors/helloanoop). + +### Deel Getuigenissen 📣 + +Als Bruno je heeft geholpen op je werk en in je teams, deel dan je [getuigenissen op onze GitHub-discussie](https://github.com/usebruno/bruno/discussions/343). + + +### Blijf in contact 🌐 + +[𝕏 (Twitter)](https://twitter.com/use_bruno)
+[Website](https://www.usebruno.com)
+[Discord](https://discord.com/invite/KgcZUncpjq)
+[LinkedIn](https://www.linkedin.com/company/usebruno) + +### Handelsmerk + +**Naam** + +`Bruno` is een handelsmerk in bezit van [Anoop M D](https://www.helloanoop.com/). + +**Logo** + +Het logo is afkomstig van [OpenMoji](https://openmoji.org/library/emoji-1F436/). Licentie: CC [BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) + +### Bijdragen 👩‍💻🧑‍💻 + +Ik ben blij dat je Bruno wilt verbeteren. Bekijk de [bijdragegids](contributing.md). + +Zelfs als je geen bijdragen via code kunt leveren, aarzel dan niet om bugs en functieverzoeken in te dienen die moeten worden geïmplementeerd om jouw gebruiksscenario op te lossen. + +### Auteurs + +
+ + + +
+ +### Licentie 📄 + +[MIT](../../license.md) \ No newline at end of file diff --git a/package.json b/package.json index 8351e6288..ebe1af53f 100644 --- a/package.json +++ b/package.json @@ -51,10 +51,6 @@ "prepare": "husky install" }, "overrides": { - "rollup":"3.29.4" - }, - "dependencies": { - "json-bigint": "^1.0.0", - "lossless-json": "^4.0.1" + "rollup":"3.29.5" } } diff --git a/packages/bruno-app/next.config.js b/packages/bruno-app/next.config.js index ce46558be..209858093 100644 --- a/packages/bruno-app/next.config.js +++ b/packages/bruno-app/next.config.js @@ -1,4 +1,5 @@ module.exports = { + output: 'export', reactStrictMode: false, publicRuntimeConfig: { CI: process.env.CI, @@ -10,6 +11,12 @@ module.exports = { if (!isServer) { config.resolve.fallback.fs = false; } + Object.defineProperty(config, 'devtool', { + get() { + return 'source-map'; + }, + set() {}, + }); return config; }, }; diff --git a/packages/bruno-app/package.json b/packages/bruno-app/package.json index 7f1dfe7c5..f4d5fd0f8 100644 --- a/packages/bruno-app/package.json +++ b/packages/bruno-app/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "cross-env ENV=dev next dev -p 3000", - "build": "next build && next export", + "build": "next build", "start": "next start", "lint": "next lint", "test": "jest", @@ -13,27 +13,25 @@ }, "dependencies": { "@fontsource/inter": "^5.0.15", - "@fortawesome/fontawesome-svg-core": "^1.2.36", - "@fortawesome/free-solid-svg-icons": "^5.15.4", - "@fortawesome/react-fontawesome": "^0.1.16", + "@prantlf/jsonlint": "^16.0.0", "@reduxjs/toolkit": "^1.8.0", "@tabler/icons": "^1.46.0", "@tippyjs/react": "^4.2.6", "@usebruno/common": "0.1.0", "@usebruno/graphql-docs": "0.1.0", "@usebruno/schema": "0.7.0", - "axios": "^1.5.1", + "axios": "1.7.5", "classnames": "^2.3.1", "codemirror": "5.65.2", - "codemirror-graphql": "1.2.5", - "cookie": "^0.6.0", + "codemirror-graphql": "2.1.1", + "cookie": "0.7.1", "escape-html": "^1.0.3", "file": "^0.2.2", "file-dialog": "^0.0.8", "file-saver": "^2.0.5", "formik": "^2.2.9", "github-markdown-css": "^5.2.0", - "graphiql": "^1.5.9", + "graphiql": "3.7.1", "graphql": "^16.6.0", "graphql-request": "^3.7.0", "httpsnippet": "^3.0.6", @@ -44,19 +42,18 @@ "jshint": "^2.13.6", "json5": "^2.2.3", "jsonc-parser": "^3.2.1", - "jsonlint": "^1.6.3", - "jsonpath-plus": "^7.2.0", + "jsonpath-plus": "10.1.0", "know-your-http-well": "^0.5.0", "lodash": "^4.17.21", "markdown-it": "^13.0.2", "markdown-it-replace-link": "^1.2.0", "mousetrap": "^1.6.5", "nanoid": "3.3.4", - "next": "12.3.3", + "next": "14.2.16", "path": "^0.12.7", - "pdfjs-dist": "^3.11.174", + "pdfjs-dist": "4.4.168", "platform": "^1.3.6", - "posthog-node": "^2.1.0", + "posthog-node": "4.2.1", "prettier": "^2.7.1", "qs": "^6.11.0", "query-string": "^7.0.1", @@ -65,11 +62,10 @@ "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", "react-dom": "18.2.0", - "react-github-btn": "^1.4.0", "react-hot-toast": "^2.4.0", "react-i18next": "^15.0.1", "react-inspector": "^6.0.2", - "react-pdf": "^7.5.1", + "react-pdf": "9.1.1", "react-redux": "^7.2.6", "react-tooltip": "^5.5.2", "sass": "^1.46.0", @@ -87,15 +83,15 @@ "@babel/preset-env": "^7.16.4", "@babel/preset-react": "^7.16.0", "@babel/runtime": "^7.16.3", - "autoprefixer": "^10.4.17", + "autoprefixer": "10.4.20", "babel-loader": "^8.2.3", "cross-env": "^7.0.3", - "css-loader": "^6.5.1", + "css-loader": "7.1.2", "file-loader": "^6.2.0", "html-loader": "^3.0.1", "html-webpack-plugin": "^5.5.0", "mini-css-extract-plugin": "^2.4.5", - "postcss": "^8.4.35", + "postcss": "8.4.47", "style-loader": "^3.3.1", "tailwindcss": "^3.4.1", "webpack": "^5.64.4", diff --git a/packages/bruno-app/src/components/CodeEditor/StyledWrapper.js b/packages/bruno-app/src/components/CodeEditor/StyledWrapper.js index c77749cb8..7eba2bc1f 100644 --- a/packages/bruno-app/src/components/CodeEditor/StyledWrapper.js +++ b/packages/bruno-app/src/components/CodeEditor/StyledWrapper.js @@ -10,6 +10,15 @@ const StyledWrapper = styled.div` flex: 1 1 0; } + /* Removes the glow outline around the folded json */ + .CodeMirror-foldmarker { + text-shadow: none; + color: ${(props) => props.theme.textLink}; + background: none; + padding: 0; + margin: 0; + } + .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { background: #d2d7db; @@ -69,6 +78,10 @@ const StyledWrapper = styled.div` .cm-variable-invalid { color: red; } + + .CodeMirror-search-hint { + display: inline; + } `; export default StyledWrapper; diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index 01c6fab57..91a5df398 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -6,11 +6,11 @@ */ import React from 'react'; -import isEqual from 'lodash/isEqual'; +import { isEqual, escapeRegExp } from 'lodash'; import { getEnvironmentVariables } from 'utils/collections'; import { defineCodeMirrorBrunoVariablesMode } from 'utils/common/codemirror'; import StyledWrapper from './StyledWrapper'; -import jsonlint from 'jsonlint'; +import * as jsonlint from '@prantlf/jsonlint'; import { JSHINT } from 'jshint'; import stripJsonComments from 'strip-json-comments'; @@ -57,21 +57,27 @@ if (!SERVER_RENDERED) { 'req.setMaxRedirects(maxRedirects)', 'req.getTimeout()', 'req.setTimeout(timeout)', + 'req.getExecutionMode()', 'bru', 'bru.cwd()', 'bru.getEnvName(key)', 'bru.getProcessEnv(key)', 'bru.hasEnvVar(key)', 'bru.getEnvVar(key)', + 'bru.getFolderVar(key)', + 'bru.getCollectionVar(key)', 'bru.setEnvVar(key,value)', 'bru.hasVar(key)', 'bru.getVar(key)', 'bru.setVar(key,value)', 'bru.deleteVar(key)', + 'bru.deleteAllVars()', 'bru.setNextRequest(requestName)', 'req.disableParsingResponseJson()', 'bru.getRequestVar(key)', - 'bru.sleep(ms)' + 'bru.sleep(ms)', + 'bru.getGlobalEnvVar(key)', + 'bru.setGlobalEnvVar(key, value)' ]; CodeMirror.registerHelper('hint', 'brunoJS', (editor, options) => { const cursor = editor.getCursor(); @@ -247,17 +253,20 @@ export default class CodeEditor extends React.Component { return found; } let jsonlint = window.jsonlint.parser || window.jsonlint; - jsonlint.parseError = function (str, hash) { - let loc = hash.loc; - found.push({ - from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), - to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), - message: str - }); - }; try { jsonlint.parse(stripJsonComments(text.replace(/(? 0) { - const text = new RegExp(searchInput.value, 'gi'); + // Escape special characters in search input to prevent RegExp crashes. Fixes #3051 + const text = new RegExp(escapeRegExp(searchInput.value), 'gi'); const matches = this.editor.getValue().match(text); count = matches ? matches.length : 0; } diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/StyledWrapper.js b/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/StyledWrapper.js new file mode 100644 index 000000000..aaa30d7f8 --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/StyledWrapper.js @@ -0,0 +1,56 @@ +import styled from 'styled-components'; + +const Wrapper = styled.div` + label { + font-size: 0.8125rem; + } + + .single-line-editor-wrapper { + padding: 0.15rem 0.4rem; + border-radius: 3px; + border: solid 1px ${(props) => props.theme.input.border}; + background-color: ${(props) => props.theme.input.bg}; + } + + .auth-placement-selector { + padding: 0.5rem 0px; + border-radius: 3px; + border: solid 1px ${(props) => props.theme.input.border}; + background-color: ${(props) => props.theme.input.bg}; + + .dropdown { + width: fit-content; + + div[data-tippy-root] { + width: fit-content; + } + .tippy-box { + width: fit-content; + max-width: none !important; + + .tippy-content: { + width: fit-content; + max-width: none !important; + } + } + } + + .auth-type-label { + width: fit-content; + color: ${(props) => props.theme.colors.text.yellow}; + justify-content: space-between; + padding: 0 0.5rem; + } + + .dropdown-item { + padding: 0.2rem 0.6rem !important; + } + } + + .caret { + color: rgb(140, 140, 140); + fill: rgb(140 140 140); + } +`; + +export default Wrapper; diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/index.js new file mode 100644 index 000000000..74d348c64 --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/ApiKeyAuth/index.js @@ -0,0 +1,109 @@ +import React, { useRef, forwardRef, useEffect } from 'react'; +import { useDispatch } from 'react-redux'; +import get from 'lodash/get'; +import { IconCaretDown } from '@tabler/icons'; +import Dropdown from 'components/Dropdown'; +import { useTheme } from 'providers/Theme'; +import SingleLineEditor from 'components/SingleLineEditor'; +import { updateCollectionAuth } from 'providers/ReduxStore/slices/collections'; +import { saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions'; +import StyledWrapper from './StyledWrapper'; +import { humanizeRequestAPIKeyPlacement } from 'utils/collections'; + +const ApiKeyAuth = ({ collection }) => { + const dispatch = useDispatch(); + const { storedTheme } = useTheme(); + const dropdownTippyRef = useRef(); + const onDropdownCreate = (ref) => (dropdownTippyRef.current = ref); + + const apikeyAuth = get(collection, 'root.request.auth.apikey', {}); + + const handleSave = () => dispatch(saveCollectionRoot(collection.uid)); + + const Icon = forwardRef((props, ref) => { + return ( +
+ {humanizeRequestAPIKeyPlacement(apikeyAuth?.placement)} + +
+ ); + }); + + const handleAuthChange = (property, value) => { + dispatch( + updateCollectionAuth({ + mode: 'apikey', + collectionUid: collection.uid, + content: { + ...apikeyAuth, + [property]: value + } + }) + ); + }; + + useEffect(() => { + !apikeyAuth?.placement && + dispatch( + updateCollectionAuth({ + mode: 'apikey', + collectionUid: collection.uid, + content: { + placement: 'header' + } + }) + ); + }, [apikeyAuth]); + + return ( + + +
+ handleAuthChange('key', val)} + collection={collection} + /> +
+ + +
+ handleAuthChange('value', val)} + collection={collection} + /> +
+ + +
+ } placement="bottom-end"> +
{ + dropdownTippyRef.current.hide(); + handleAuthChange('placement', 'header'); + }} + > + Header +
+
{ + dropdownTippyRef.current.hide(); + handleAuthChange('placement', 'queryparams'); + }} + > + Query Params +
+
+
+
+ ); +}; + +export default ApiKeyAuth; 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 7280e6729..7dabb4c71 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js @@ -52,6 +52,15 @@ const AuthMode = ({ collection }) => { > Basic Auth +
{ + dropdownTippyRef.current.hide(); + onModeChange('wsse'); + }} + > + WSSE Auth +
{ @@ -79,6 +88,15 @@ const AuthMode = ({ collection }) => { > Oauth2
+
{ + dropdownTippyRef.current.hide(); + onModeChange('apikey'); + }} + > + API Key +
{ diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/WsseAuth/StyledWrapper.js b/packages/bruno-app/src/components/CollectionSettings/Auth/WsseAuth/StyledWrapper.js new file mode 100644 index 000000000..c2bb5d207 --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/WsseAuth/StyledWrapper.js @@ -0,0 +1,16 @@ +import styled from 'styled-components'; + +const Wrapper = styled.div` + label { + font-size: 0.8125rem; + } + + .single-line-editor-wrapper { + padding: 0.15rem 0.4rem; + border-radius: 3px; + border: solid 1px ${(props) => props.theme.input.border}; + background-color: ${(props) => props.theme.input.bg}; + } +`; + +export default Wrapper; diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/WsseAuth/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/WsseAuth/index.js new file mode 100644 index 000000000..45efc7b1e --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/WsseAuth/index.js @@ -0,0 +1,71 @@ +import React from 'react'; +import get from 'lodash/get'; +import { useTheme } from 'providers/Theme'; +import { useDispatch } from 'react-redux'; +import SingleLineEditor from 'components/SingleLineEditor'; +import { updateCollectionAuth } from 'providers/ReduxStore/slices/collections'; +import { saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions'; +import StyledWrapper from './StyledWrapper'; + +const WsseAuth = ({ collection }) => { + const dispatch = useDispatch(); + const { storedTheme } = useTheme(); + + const wsseAuth = get(collection, 'root.request.auth.wsse', {}); + + const handleSave = () => dispatch(saveCollectionRoot(collection.uid)); + + const handleUserChange = (username) => { + dispatch( + updateCollectionAuth({ + mode: 'wsse', + collectionUid: collection.uid, + content: { + username, + password: wsseAuth.password + } + }) + ); + }; + + const handlePasswordChange = (password) => { + dispatch( + updateCollectionAuth({ + mode: 'wsse', + collectionUid: collection.uid, + content: { + username: wsseAuth.username, + password + } + }) + ); + }; + + return ( + + +
+ handleUserChange(val)} + collection={collection} + /> +
+ + +
+ handlePasswordChange(val)} + collection={collection} + /> +
+
+ ); +}; + +export default WsseAuth; diff --git a/packages/bruno-app/src/components/CollectionSettings/Auth/index.js b/packages/bruno-app/src/components/CollectionSettings/Auth/index.js index 38a958e93..05efc17b2 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Auth/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Auth/index.js @@ -6,6 +6,8 @@ import AwsV4Auth from './AwsV4Auth'; import BearerAuth from './BearerAuth'; import BasicAuth from './BasicAuth'; import DigestAuth from './DigestAuth'; +import WsseAuth from './WsseAuth'; +import ApiKeyAuth from './ApiKeyAuth/'; import { saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions'; import StyledWrapper from './StyledWrapper'; import OAuth2 from './OAuth2'; @@ -33,6 +35,12 @@ const Auth = ({ collection }) => { case 'oauth2': { return ; } + case 'wsse': { + return ; + } + case 'apikey': { + return ; + } } }; diff --git a/packages/bruno-app/src/components/CollectionSettings/Vars/StyledWrapper.js b/packages/bruno-app/src/components/CollectionSettings/Vars/StyledWrapper.js new file mode 100644 index 000000000..44b01b464 --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Vars/StyledWrapper.js @@ -0,0 +1,9 @@ +import styled from 'styled-components'; + +const StyledWrapper = styled.div` + div.title { + color: var(--color-tab-inactive); + } +`; + +export default StyledWrapper; diff --git a/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/StyledWrapper.js b/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/StyledWrapper.js new file mode 100644 index 000000000..efacc8288 --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/StyledWrapper.js @@ -0,0 +1,56 @@ +import styled from 'styled-components'; + +const Wrapper = styled.div` + table { + width: 100%; + border-collapse: collapse; + font-weight: 600; + table-layout: fixed; + + thead, + td { + border: 1px solid ${(props) => props.theme.table.border}; + } + + thead { + color: ${(props) => props.theme.table.thead.color}; + font-size: 0.8125rem; + user-select: none; + } + td { + padding: 6px 10px; + + &:nth-child(1) { + width: 30%; + } + + &:nth-child(3) { + width: 70px; + } + } + } + + .btn-add-var { + font-size: 0.8125rem; + } + + input[type='text'] { + width: 100%; + border: solid 1px transparent; + outline: none !important; + background-color: inherit; + + &:focus { + outline: none !important; + border: solid 1px transparent; + } + } + + input[type='checkbox'] { + cursor: pointer; + position: relative; + top: 1px; + } +`; + +export default Wrapper; diff --git a/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/index.js b/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/index.js new file mode 100644 index 000000000..ebc6a2fe7 --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Vars/VarsTable/index.js @@ -0,0 +1,161 @@ +import React from 'react'; +import cloneDeep from 'lodash/cloneDeep'; +import { IconTrash } from '@tabler/icons'; +import { useDispatch } from 'react-redux'; +import { useTheme } from 'providers/Theme'; +import { saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions'; +import SingleLineEditor from 'components/SingleLineEditor'; +import InfoTip from 'components/InfoTip'; +import StyledWrapper from './StyledWrapper'; +import toast from 'react-hot-toast'; +import { variableNameRegex } from 'utils/common/regex'; +import { + addCollectionVar, + deleteCollectionVar, + updateCollectionVar +} from 'providers/ReduxStore/slices/collections/index'; + +const VarsTable = ({ collection, vars, varType }) => { + const dispatch = useDispatch(); + const { storedTheme } = useTheme(); + + const addVar = () => { + dispatch( + addCollectionVar({ + collectionUid: collection.uid, + type: varType + }) + ); + }; + + const onSave = () => dispatch(saveCollectionRoot(collection.uid)); + const handleVarChange = (e, v, type) => { + const _var = cloneDeep(v); + switch (type) { + case 'name': { + const value = e.target.value; + + if (variableNameRegex.test(value) === false) { + toast.error( + 'Variable contains invalid characters! Variables must only contain alpha-numeric characters, "-", "_", "."' + ); + return; + } + + _var.name = value; + break; + } + case 'value': { + _var.value = e.target.value; + break; + } + case 'enabled': { + _var.enabled = e.target.checked; + break; + } + } + dispatch( + updateCollectionVar({ + type: varType, + var: _var, + collectionUid: collection.uid + }) + ); + }; + + const handleRemoveVar = (_var) => { + dispatch( + deleteCollectionVar({ + type: varType, + varUid: _var.uid, + collectionUid: collection.uid + }) + ); + }; + + return ( + + + + + + {varType === 'request' ? ( + + ) : ( + + )} + + + + + {vars && vars.length + ? vars.map((_var) => { + return ( + + + + + + ); + }) + : null} + +
Name +
+ Value +
+
+
+ Expr + +
+
+ handleVarChange(e, _var, 'name')} + /> + + + handleVarChange( + { + target: { + value: newValue + } + }, + _var, + 'value' + ) + } + collection={collection} + /> + +
+ handleVarChange(e, _var, 'enabled')} + /> + +
+
+ +
+ ); +}; +export default VarsTable; diff --git a/packages/bruno-app/src/components/CollectionSettings/Vars/index.js b/packages/bruno-app/src/components/CollectionSettings/Vars/index.js new file mode 100644 index 000000000..fae3ed613 --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Vars/index.js @@ -0,0 +1,32 @@ +import React from 'react'; +import get from 'lodash/get'; +import VarsTable from './VarsTable'; +import StyledWrapper from './StyledWrapper'; +import { saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions'; +import { useDispatch } from 'react-redux'; + +const Vars = ({ collection }) => { + const dispatch = useDispatch(); + const requestVars = get(collection, 'root.request.vars.req', []); + const responseVars = get(collection, 'root.request.vars.res', []); + const handleSave = () => dispatch(saveCollectionRoot(collection.uid)); + return ( + +
+
Pre Request
+ +
+
+
Post Response
+ +
+
+ +
+
+ ); +}; + +export default Vars; diff --git a/packages/bruno-app/src/components/CollectionSettings/index.js b/packages/bruno-app/src/components/CollectionSettings/index.js index ebf86f724..b849d6b18 100644 --- a/packages/bruno-app/src/components/CollectionSettings/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/index.js @@ -16,6 +16,16 @@ import Docs from './Docs'; import Presets from './Presets'; import Info from './Info'; import StyledWrapper from './StyledWrapper'; +import Vars from './Vars/index'; +import DotIcon from 'components/Icons/Dot'; + +const ContentIndicator = () => { + return ( + + + + ); +}; const CollectionSettings = ({ collection }) => { const dispatch = useDispatch(); @@ -29,10 +39,23 @@ const CollectionSettings = ({ collection }) => { ); }; - const proxyConfig = get(collection, 'brunoConfig.proxy', {}); + const root = collection?.root; + const hasScripts = root?.request?.script?.res || root?.request?.script?.req; + const hasTests = root?.request?.tests; + const hasDocs = root?.docs; + const headers = get(collection, 'root.request.headers', []); + const activeHeadersCount = headers.filter((header) => header.enabled).length; + + const requestVars = get(collection, 'root.request.vars.req', []); + const responseVars = get(collection, 'root.request.vars.res', []); + const activeVarsCount = requestVars.filter((v) => v.enabled).length + responseVars.filter((v) => v.enabled).length; + const auth = get(collection, 'root.request.auth', {}).mode; + + const proxyConfig = get(collection, 'brunoConfig.proxy', {}); const clientCertConfig = get(collection, 'brunoConfig.clientCertificates.certs', []); + const onProxySettingsUpdate = (config) => { const brunoConfig = cloneDeep(collection.brunoConfig); brunoConfig.proxy = config; @@ -77,6 +100,9 @@ const CollectionSettings = ({ collection }) => { case 'headers': { return ; } + case 'vars': { + return ; + } case 'auth': { return ; } @@ -122,27 +148,38 @@ const CollectionSettings = ({ collection }) => {
setTab('headers')}> Headers + {activeHeadersCount > 0 && {activeHeadersCount}} +
+
setTab('vars')}> + Vars + {activeVarsCount > 0 && {activeVarsCount}}
setTab('auth')}> Auth + {auth !== 'none' && }
setTab('script')}> Script + {hasScripts && }
setTab('tests')}> Tests + {hasTests && }
setTab('presets')}> Presets
setTab('proxy')}> Proxy + {Object.keys(proxyConfig).length > 0 && }
setTab('clientCert')}> Client Certificates + {clientCertConfig.length > 0 && }
setTab('docs')}> Docs + {hasDocs && }
setTab('info')}> Info diff --git a/packages/bruno-app/src/components/Dropdown/StyledWrapper.js b/packages/bruno-app/src/components/Dropdown/StyledWrapper.js index 7af8b9081..f784cf527 100644 --- a/packages/bruno-app/src/components/Dropdown/StyledWrapper.js +++ b/packages/bruno-app/src/components/Dropdown/StyledWrapper.js @@ -36,6 +36,13 @@ const Wrapper = styled.div` padding: 0.35rem 0.6rem; cursor: pointer; + &.active { + color: ${(props) => props.theme.colors.text.yellow} !important; + .icon { + color: ${(props) => props.theme.colors.text.yellow} !important; + } + } + .icon { color: ${(props) => props.theme.dropdown.iconColor}; } diff --git a/packages/bruno-app/src/components/Dropdown/index.js b/packages/bruno-app/src/components/Dropdown/index.js index e4f48724c..3deb0e849 100644 --- a/packages/bruno-app/src/components/Dropdown/index.js +++ b/packages/bruno-app/src/components/Dropdown/index.js @@ -2,9 +2,9 @@ import React from 'react'; import Tippy from '@tippyjs/react'; import StyledWrapper from './StyledWrapper'; -const Dropdown = ({ icon, children, onCreate, placement }) => { +const Dropdown = ({ icon, children, onCreate, placement, transparent }) => { return ( - + {
} placement="bottom-end"> +
Collection Environments
{environments && environments.length ? environments.map((e) => (
{ onSelect(e); diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/CopyEnvironment/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/CopyEnvironment/index.js index a9fdf3b4a..586f874bb 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/CopyEnvironment/index.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/CopyEnvironment/index.js @@ -44,7 +44,7 @@ const CopyEnvironment = ({ collection, environment, onClose }) => { return ( -
+ e.preventDefault()}>