From 36d6d115d4bcc699275d61f82ee8007bb59db7df Mon Sep 17 00:00:00 2001 From: Amr osama Date: Sat, 21 Oct 2023 20:51:13 +0300 Subject: [PATCH 01/45] Added properties to collections --- .../CollectionProperties/StyledWrapper.js | 40 +++++ .../Collection/CollectionProperties/index.js | 138 +++++++++++++++--- .../components/Sidebar/NewRequest/index.js | 7 +- .../src/providers/App/useIpcEvents.js | 6 + .../ReduxStore/slices/collections/actions.js | 16 ++ .../ReduxStore/slices/collections/index.js | 9 ++ packages/bruno-electron/src/ipc/collection.js | 22 +++ 7 files changed, 214 insertions(+), 24 deletions(-) create mode 100644 packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/StyledWrapper.js diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/StyledWrapper.js new file mode 100644 index 00000000..72d1d8a9 --- /dev/null +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/StyledWrapper.js @@ -0,0 +1,40 @@ +import styled from 'styled-components'; + +const StyledWrapper = styled.div` + div.method-selector-container { + border: solid 1px ${(props) => props.theme.modal.input.border}; + border-right: none; + background-color: ${(props) => props.theme.modal.input.bg}; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + + .method-selector { + min-width: 80px; + } + } + + div.method-selector-container, + div.input-container { + background-color: ${(props) => props.theme.modal.input.bg}; + height: 2.3rem; + } + + div.input-container { + border: solid 1px ${(props) => props.theme.modal.input.border}; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + + input { + background-color: ${(props) => props.theme.modal.input.bg}; + outline: none; + box-shadow: none; + + &:focus { + outline: none !important; + box-shadow: none !important; + } + } + } +`; + +export default StyledWrapper; diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js index 376a88db..0a72eb49 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js @@ -1,5 +1,12 @@ import React from 'react'; import Modal from 'components/Modal'; +import { useState } from 'react'; +import { useFormik } from 'formik'; +import * as Yup from 'yup'; +import StyledWrapper from './StyledWrapper'; +import { useDispatch } from 'react-redux'; +import toast from 'react-hot-toast'; +import { updateCollectionProperties } from 'providers/ReduxStore/slices/collections/actions'; function countRequests(items) { let count = 0; @@ -21,29 +28,116 @@ function countRequests(items) { } const CollectionProperties = ({ collection, onClose }) => { + const dispatch = useDispatch(); + const { + brunoConfig: { properties: defaultProperties = {} } + } = collection; + const formik = useFormik({ + enableReinitialize: true, + initialValues: { + defaultType: defaultProperties.defaultType || 'http-request', + defaultUrl: defaultProperties.defaultUrl || '' + }, + onSubmit: (newProperties) => { + dispatch(updateCollectionProperties(newProperties, collection.uid)); + toast.success('Collection properties updated'); + onClose(); + } + }); + + const onSubmit = () => formik.handleSubmit(); + return ( - - - - - - - - - - - - - - - - - - - - -
Name :{collection.name}
Location :{collection.pathname}
Environments :{collection.environments?.length || 0}
Requests :{countRequests(collection.items)}
-
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name :{collection.name}
Location :{collection.pathname}
Environments :{collection.environments?.length || 0}
Requests :{countRequests(collection.items)}
Default Request Type : +
+ + + + + +
+
Default Base URL : +
+
+ +
+
+
+
+ {formik.touched.defaultUrl && formik.errors.defaultUrl ? ( +
{formik.errors.defaultUrl}
+ ) : null} +
+
+
+
); }; diff --git a/packages/bruno-app/src/components/Sidebar/NewRequest/index.js b/packages/bruno-app/src/components/Sidebar/NewRequest/index.js index 2e54b56a..99a7fe3b 100644 --- a/packages/bruno-app/src/components/Sidebar/NewRequest/index.js +++ b/packages/bruno-app/src/components/Sidebar/NewRequest/index.js @@ -15,12 +15,15 @@ import StyledWrapper from './StyledWrapper'; const NewRequest = ({ collection, item, isEphemeral, onClose }) => { const dispatch = useDispatch(); const inputRef = useRef(); + const { + brunoConfig: { properties: collectionProperties = {} } + } = collection; const formik = useFormik({ enableReinitialize: true, initialValues: { requestName: '', - requestType: 'http-request', - requestUrl: '', + requestType: collectionProperties.defaultType || 'http-request', + requestUrl: collectionProperties.defaultUrl || '', requestMethod: 'GET' }, validationSchema: Yup.object({ diff --git a/packages/bruno-app/src/providers/App/useIpcEvents.js b/packages/bruno-app/src/providers/App/useIpcEvents.js index 8e87b1cf..1c878748 100644 --- a/packages/bruno-app/src/providers/App/useIpcEvents.js +++ b/packages/bruno-app/src/providers/App/useIpcEvents.js @@ -18,6 +18,7 @@ import { updatePreferences } from 'providers/ReduxStore/slices/app'; import toast from 'react-hot-toast'; import { openCollectionEvent, collectionAddEnvFileEvent } from 'providers/ReduxStore/slices/collections/actions'; import { isElectron } from 'utils/common/platform'; +import { collectionPropertiesUpdatedEvent } from 'providers/ReduxStore/slices/collections/index'; const useIpcEvents = () => { const dispatch = useDispatch(); @@ -107,6 +108,10 @@ const useIpcEvents = () => { dispatch(collectionRenamedEvent(val)); }); + const removeCollectionPropertiesUpdatedListener = ipcRenderer.on('main:collection-properties-updated', (val) => { + dispatch(collectionPropertiesUpdatedEvent(val)); + }); + const removeRunFolderEventListener = ipcRenderer.on('main:run-folder-event', (val) => { dispatch(runFolderEvent(val)); }); @@ -138,6 +143,7 @@ const useIpcEvents = () => { removeDisplayErrorListener(); removeScriptEnvUpdateListener(); removeCollectionRenamedListener(); + removeCollectionPropertiesUpdatedListener(); removeRunFolderEventListener(); removeRunRequestEventListener(); removeProcessEnvUpdatesListener(); diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js index ce129d80..62839b9c 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js @@ -47,6 +47,22 @@ import { resolveRequestFilename } from 'utils/common/platform'; import { parseQueryParams, splitOnFirst } from 'utils/url/index'; import { each } from 'lodash'; +export const updateCollectionProperties = (newProperties, collectionUid) => (dispatch, getState) => { + const state = getState(); + const collection = findCollectionByUid(state.collections.collections, collectionUid); + + return new Promise((resolve, reject) => { + if (!collection) { + return reject(new Error('Collection not found')); + } + + ipcRenderer + .invoke('renderer:update-collection-properties', newProperties, collection.pathname) + .then(resolve) + .catch(reject); + }); +}; + export const renameCollection = (newName, collectionUid) => (dispatch, getState) => { const state = getState(); const collection = findCollectionByUid(state.collections.collections, collectionUid); diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js index 4ad30d20..aef4d179 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js @@ -1224,6 +1224,14 @@ export const collectionsSlice = createSlice({ collection.name = newName; } }, + collectionPropertiesUpdatedEvent: (state, action) => { + const { collectionPathname, newProperties } = action.payload; + const collection = findCollectionByPathname(state.collections, collectionPathname); + + if (collection) { + collection.properties = newProperties; + } + }, resetRunResults: (state, action) => { const { collectionUid } = action.payload; const collection = findCollectionByUid(state.collections, collectionUid); @@ -1427,6 +1435,7 @@ export const { collectionUnlinkDirectoryEvent, collectionAddEnvFileEvent, collectionRenamedEvent, + collectionPropertiesUpdatedEvent, resetRunResults, runRequestEvent, runFolderEvent, diff --git a/packages/bruno-electron/src/ipc/collection.js b/packages/bruno-electron/src/ipc/collection.js index ab92d50b..c0a2e004 100644 --- a/packages/bruno-electron/src/ipc/collection.js +++ b/packages/bruno-electron/src/ipc/collection.js @@ -94,6 +94,28 @@ const registerRendererEventHandlers = (mainWindow, watcher, lastOpenedCollection } }); + // update collection properties + ipcMain.handle('renderer:update-collection-properties', async (event, newProperties, collectionPathname) => { + try { + const brunoJsonFilePath = path.join(collectionPathname, 'bruno.json'); + const content = fs.readFileSync(brunoJsonFilePath, 'utf8'); + const json = JSON.parse(content); + + json.properties = newProperties; + + const newContent = await stringifyJson(json); + await writeFile(brunoJsonFilePath, newContent); + + // fire an event in renderer to change the collection properties + mainWindow.webContents.send('main:collection-properties-updated', { + collectionPathname, + newProperties + }); + } catch (error) { + return Promise.reject(error); + } + }); + ipcMain.handle('renderer:save-collection-root', async (event, collectionPathname, collectionRoot) => { try { const collectionBruFilePath = path.join(collectionPathname, 'collection.bru'); From cbfd7fa5f4c6dfa023c4f4fe7c0a929f77218c08 Mon Sep 17 00:00:00 2001 From: Amr osama Date: Sun, 22 Oct 2023 15:32:27 +0300 Subject: [PATCH 02/45] Added presets to collection settings --- .../Presets/StyledWrapper.js | 27 ++++ .../CollectionSettings/Presets/index.js | 93 ++++++++++++ .../components/CollectionSettings/index.js | 7 + .../Collection/CollectionProperties/index.js | 138 +++--------------- .../components/Sidebar/NewRequest/index.js | 6 +- .../src/providers/App/useIpcEvents.js | 10 +- .../ReduxStore/slices/collections/actions.js | 4 +- .../ReduxStore/slices/collections/index.js | 10 +- packages/bruno-electron/src/ipc/collection.js | 8 +- 9 files changed, 168 insertions(+), 135 deletions(-) create mode 100644 packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js create mode 100644 packages/bruno-app/src/components/CollectionSettings/Presets/index.js diff --git a/packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js b/packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js new file mode 100644 index 00000000..c8f1241c --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js @@ -0,0 +1,27 @@ +import styled from 'styled-components'; + +const StyledWrapper = styled.div` + .settings-label { + width: 80px; + } + + .textbox { + border: 1px solid #ccc; + padding: 0.15rem 0.45rem; + box-shadow: none; + border-radius: 0px; + outline: none; + box-shadow: none; + transition: border-color ease-in-out 0.1s; + border-radius: 3px; + background-color: ${(props) => props.theme.modal.input.bg}; + border: 1px solid ${(props) => props.theme.modal.input.border}; + + &:focus { + border: solid 1px ${(props) => props.theme.modal.input.focusBorder} !important; + outline: none !important; + } + } +`; + +export default StyledWrapper; diff --git a/packages/bruno-app/src/components/CollectionSettings/Presets/index.js b/packages/bruno-app/src/components/CollectionSettings/Presets/index.js new file mode 100644 index 00000000..e6b4bcec --- /dev/null +++ b/packages/bruno-app/src/components/CollectionSettings/Presets/index.js @@ -0,0 +1,93 @@ +import React, { useEffect } from 'react'; +import { useFormik } from 'formik'; +import { useDispatch } from 'react-redux'; +import StyledWrapper from './StyledWrapper'; +import toast from 'react-hot-toast'; +import { updateCollectionPresets } from 'providers/ReduxStore/slices/collections/actions'; + +const PresetsSettings = ({ collection }) => { + const dispatch = useDispatch(); + const { + brunoConfig: { presets: defaultPresets = {} } + } = collection; + + const formik = useFormik({ + enableReinitialize: true, + initialValues: { + defaultType: defaultPresets.defaultType || 'http-request', + defaultRequestUrl: defaultPresets.defaultRequestUrl || '' + }, + onSubmit: (newPresets) => { + dispatch(updateCollectionPresets(newPresets, collection.uid)); + toast.success('Collection presets updated'); + } + }); + + return ( + +

Collection Presets

+
+
+ +
+ + + + + +
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+ ); +}; + +export default PresetsSettings; diff --git a/packages/bruno-app/src/components/CollectionSettings/index.js b/packages/bruno-app/src/components/CollectionSettings/index.js index 62d774e2..46c4b2e9 100644 --- a/packages/bruno-app/src/components/CollectionSettings/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/index.js @@ -13,6 +13,7 @@ import Auth from './Auth'; import Script from './Script'; import Test from './Tests'; import Docs from './Docs'; +import Presets from './Presets'; import StyledWrapper from './StyledWrapper'; const CollectionSettings = ({ collection }) => { @@ -75,6 +76,9 @@ const CollectionSettings = ({ collection }) => { case 'headers': { return ; } + case 'presets': { + return ; + } case 'auth': { return ; } @@ -114,6 +118,9 @@ const CollectionSettings = ({ collection }) => {
setTab('headers')}> Headers
+
setTab('presets')}> + Presets +
setTab('auth')}> Auth
diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js index 0a72eb49..376a88db 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/index.js @@ -1,12 +1,5 @@ import React from 'react'; import Modal from 'components/Modal'; -import { useState } from 'react'; -import { useFormik } from 'formik'; -import * as Yup from 'yup'; -import StyledWrapper from './StyledWrapper'; -import { useDispatch } from 'react-redux'; -import toast from 'react-hot-toast'; -import { updateCollectionProperties } from 'providers/ReduxStore/slices/collections/actions'; function countRequests(items) { let count = 0; @@ -28,116 +21,29 @@ function countRequests(items) { } const CollectionProperties = ({ collection, onClose }) => { - const dispatch = useDispatch(); - const { - brunoConfig: { properties: defaultProperties = {} } - } = collection; - const formik = useFormik({ - enableReinitialize: true, - initialValues: { - defaultType: defaultProperties.defaultType || 'http-request', - defaultUrl: defaultProperties.defaultUrl || '' - }, - onSubmit: (newProperties) => { - dispatch(updateCollectionProperties(newProperties, collection.uid)); - toast.success('Collection properties updated'); - onClose(); - } - }); - - const onSubmit = () => formik.handleSubmit(); - return ( - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name :{collection.name}
Location :{collection.pathname}
Environments :{collection.environments?.length || 0}
Requests :{countRequests(collection.items)}
Default Request Type : -
- - - - - -
-
Default Base URL : -
-
- -
-
-
-
- {formik.touched.defaultUrl && formik.errors.defaultUrl ? ( -
{formik.errors.defaultUrl}
- ) : null} -
-
-
-
+ + + + + + + + + + + + + + + + + + + + +
Name :{collection.name}
Location :{collection.pathname}
Environments :{collection.environments?.length || 0}
Requests :{countRequests(collection.items)}
+
); }; diff --git a/packages/bruno-app/src/components/Sidebar/NewRequest/index.js b/packages/bruno-app/src/components/Sidebar/NewRequest/index.js index 99a7fe3b..0389e574 100644 --- a/packages/bruno-app/src/components/Sidebar/NewRequest/index.js +++ b/packages/bruno-app/src/components/Sidebar/NewRequest/index.js @@ -16,14 +16,14 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => { const dispatch = useDispatch(); const inputRef = useRef(); const { - brunoConfig: { properties: collectionProperties = {} } + brunoConfig: { presets: collectionPresets = {} } } = collection; const formik = useFormik({ enableReinitialize: true, initialValues: { requestName: '', - requestType: collectionProperties.defaultType || 'http-request', - requestUrl: collectionProperties.defaultUrl || '', + requestType: collectionPresets.defaultType || 'http-request', + requestUrl: collectionPresets.defaultRequestUrl || '', requestMethod: 'GET' }, validationSchema: Yup.object({ diff --git a/packages/bruno-app/src/providers/App/useIpcEvents.js b/packages/bruno-app/src/providers/App/useIpcEvents.js index 1c878748..6cef0bfa 100644 --- a/packages/bruno-app/src/providers/App/useIpcEvents.js +++ b/packages/bruno-app/src/providers/App/useIpcEvents.js @@ -12,13 +12,13 @@ import { collectionRenamedEvent, runRequestEvent, runFolderEvent, - brunoConfigUpdateEvent + brunoConfigUpdateEvent, + collectionPresetsUpdatedEvent } from 'providers/ReduxStore/slices/collections'; import { updatePreferences } from 'providers/ReduxStore/slices/app'; import toast from 'react-hot-toast'; import { openCollectionEvent, collectionAddEnvFileEvent } from 'providers/ReduxStore/slices/collections/actions'; import { isElectron } from 'utils/common/platform'; -import { collectionPropertiesUpdatedEvent } from 'providers/ReduxStore/slices/collections/index'; const useIpcEvents = () => { const dispatch = useDispatch(); @@ -108,8 +108,8 @@ const useIpcEvents = () => { dispatch(collectionRenamedEvent(val)); }); - const removeCollectionPropertiesUpdatedListener = ipcRenderer.on('main:collection-properties-updated', (val) => { - dispatch(collectionPropertiesUpdatedEvent(val)); + const removeCollectionPresetsUpdatedListener = ipcRenderer.on('main:collection-presets-updated', (val) => { + dispatch(collectionPresetsUpdatedEvent(val)); }); const removeRunFolderEventListener = ipcRenderer.on('main:run-folder-event', (val) => { @@ -143,7 +143,7 @@ const useIpcEvents = () => { removeDisplayErrorListener(); removeScriptEnvUpdateListener(); removeCollectionRenamedListener(); - removeCollectionPropertiesUpdatedListener(); + removeCollectionPresetsUpdatedListener(); removeRunFolderEventListener(); removeRunRequestEventListener(); removeProcessEnvUpdatesListener(); diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js index 62839b9c..0d6167d8 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js @@ -47,7 +47,7 @@ import { resolveRequestFilename } from 'utils/common/platform'; import { parseQueryParams, splitOnFirst } from 'utils/url/index'; import { each } from 'lodash'; -export const updateCollectionProperties = (newProperties, collectionUid) => (dispatch, getState) => { +export const updateCollectionPresets = (newPresets, collectionUid) => (dispatch, getState) => { const state = getState(); const collection = findCollectionByUid(state.collections.collections, collectionUid); @@ -57,7 +57,7 @@ export const updateCollectionProperties = (newProperties, collectionUid) => (dis } ipcRenderer - .invoke('renderer:update-collection-properties', newProperties, collection.pathname) + .invoke('renderer:update-collection-presets', newPresets, collection.pathname) .then(resolve) .catch(reject); }); diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js index aef4d179..eb3b620a 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js @@ -1224,12 +1224,12 @@ export const collectionsSlice = createSlice({ collection.name = newName; } }, - collectionPropertiesUpdatedEvent: (state, action) => { - const { collectionPathname, newProperties } = action.payload; + collectionPresetsUpdatedEvent: (state, action) => { + const { collectionPathname, newPresets } = action.payload; const collection = findCollectionByPathname(state.collections, collectionPathname); - if (collection) { - collection.properties = newProperties; + if (collection.brunoConfig) { + collection.brunoConfig.presets = newPresets; } }, resetRunResults: (state, action) => { @@ -1435,7 +1435,7 @@ export const { collectionUnlinkDirectoryEvent, collectionAddEnvFileEvent, collectionRenamedEvent, - collectionPropertiesUpdatedEvent, + collectionPresetsUpdatedEvent, resetRunResults, runRequestEvent, runFolderEvent, diff --git a/packages/bruno-electron/src/ipc/collection.js b/packages/bruno-electron/src/ipc/collection.js index c0a2e004..f5d5357a 100644 --- a/packages/bruno-electron/src/ipc/collection.js +++ b/packages/bruno-electron/src/ipc/collection.js @@ -95,21 +95,21 @@ const registerRendererEventHandlers = (mainWindow, watcher, lastOpenedCollection }); // update collection properties - ipcMain.handle('renderer:update-collection-properties', async (event, newProperties, collectionPathname) => { + ipcMain.handle('renderer:update-collection-presets', async (event, newPresets, collectionPathname) => { try { const brunoJsonFilePath = path.join(collectionPathname, 'bruno.json'); const content = fs.readFileSync(brunoJsonFilePath, 'utf8'); const json = JSON.parse(content); - json.properties = newProperties; + json.presets = newPresets; const newContent = await stringifyJson(json); await writeFile(brunoJsonFilePath, newContent); // fire an event in renderer to change the collection properties - mainWindow.webContents.send('main:collection-properties-updated', { + mainWindow.webContents.send('main:collection-presets-updated', { collectionPathname, - newProperties + newPresets }); } catch (error) { return Promise.reject(error); From e658629482a87bdb0a7dff565c2e351173d59846 Mon Sep 17 00:00:00 2001 From: Amr osama Date: Mon, 23 Oct 2023 11:11:31 +0300 Subject: [PATCH 03/45] removed custom ipc event --- .../CollectionSettings/Presets/index.js | 7 ++++-- .../src/providers/App/useIpcEvents.js | 8 +------ packages/bruno-electron/src/ipc/collection.js | 22 ------------------- 3 files changed, 6 insertions(+), 31 deletions(-) diff --git a/packages/bruno-app/src/components/CollectionSettings/Presets/index.js b/packages/bruno-app/src/components/CollectionSettings/Presets/index.js index e6b4bcec..70fb8e98 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Presets/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Presets/index.js @@ -3,7 +3,8 @@ import { useFormik } from 'formik'; import { useDispatch } from 'react-redux'; import StyledWrapper from './StyledWrapper'; import toast from 'react-hot-toast'; -import { updateCollectionPresets } from 'providers/ReduxStore/slices/collections/actions'; +import { updateBrunoConfig } from 'providers/ReduxStore/slices/collections/actions'; +import cloneDeep from 'lodash/cloneDeep'; const PresetsSettings = ({ collection }) => { const dispatch = useDispatch(); @@ -18,7 +19,9 @@ const PresetsSettings = ({ collection }) => { defaultRequestUrl: defaultPresets.defaultRequestUrl || '' }, onSubmit: (newPresets) => { - dispatch(updateCollectionPresets(newPresets, collection.uid)); + const brunoConfig = cloneDeep(collection.brunoConfig); + brunoConfig.presets = newPresets; + dispatch(updateBrunoConfig(brunoConfig, collection.uid)); toast.success('Collection presets updated'); } }); diff --git a/packages/bruno-app/src/providers/App/useIpcEvents.js b/packages/bruno-app/src/providers/App/useIpcEvents.js index 6cef0bfa..8e87b1cf 100644 --- a/packages/bruno-app/src/providers/App/useIpcEvents.js +++ b/packages/bruno-app/src/providers/App/useIpcEvents.js @@ -12,8 +12,7 @@ import { collectionRenamedEvent, runRequestEvent, runFolderEvent, - brunoConfigUpdateEvent, - collectionPresetsUpdatedEvent + brunoConfigUpdateEvent } from 'providers/ReduxStore/slices/collections'; import { updatePreferences } from 'providers/ReduxStore/slices/app'; import toast from 'react-hot-toast'; @@ -108,10 +107,6 @@ const useIpcEvents = () => { dispatch(collectionRenamedEvent(val)); }); - const removeCollectionPresetsUpdatedListener = ipcRenderer.on('main:collection-presets-updated', (val) => { - dispatch(collectionPresetsUpdatedEvent(val)); - }); - const removeRunFolderEventListener = ipcRenderer.on('main:run-folder-event', (val) => { dispatch(runFolderEvent(val)); }); @@ -143,7 +138,6 @@ const useIpcEvents = () => { removeDisplayErrorListener(); removeScriptEnvUpdateListener(); removeCollectionRenamedListener(); - removeCollectionPresetsUpdatedListener(); removeRunFolderEventListener(); removeRunRequestEventListener(); removeProcessEnvUpdatesListener(); diff --git a/packages/bruno-electron/src/ipc/collection.js b/packages/bruno-electron/src/ipc/collection.js index f5d5357a..ab92d50b 100644 --- a/packages/bruno-electron/src/ipc/collection.js +++ b/packages/bruno-electron/src/ipc/collection.js @@ -94,28 +94,6 @@ const registerRendererEventHandlers = (mainWindow, watcher, lastOpenedCollection } }); - // update collection properties - ipcMain.handle('renderer:update-collection-presets', async (event, newPresets, collectionPathname) => { - try { - const brunoJsonFilePath = path.join(collectionPathname, 'bruno.json'); - const content = fs.readFileSync(brunoJsonFilePath, 'utf8'); - const json = JSON.parse(content); - - json.presets = newPresets; - - const newContent = await stringifyJson(json); - await writeFile(brunoJsonFilePath, newContent); - - // fire an event in renderer to change the collection properties - mainWindow.webContents.send('main:collection-presets-updated', { - collectionPathname, - newPresets - }); - } catch (error) { - return Promise.reject(error); - } - }); - ipcMain.handle('renderer:save-collection-root', async (event, collectionPathname, collectionRoot) => { try { const collectionBruFilePath = path.join(collectionPathname, 'collection.bru'); From 03460c592a222944ba0a5197b36b7dde2721c24c Mon Sep 17 00:00:00 2001 From: Amr osama Date: Mon, 23 Oct 2023 11:13:27 +0300 Subject: [PATCH 04/45] Changed Presets Tab positioning --- .../src/components/CollectionSettings/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/bruno-app/src/components/CollectionSettings/index.js b/packages/bruno-app/src/components/CollectionSettings/index.js index 46c4b2e9..f55f312a 100644 --- a/packages/bruno-app/src/components/CollectionSettings/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/index.js @@ -76,9 +76,6 @@ const CollectionSettings = ({ collection }) => { case 'headers': { return ; } - case 'presets': { - return ; - } case 'auth': { return ; } @@ -88,6 +85,9 @@ const CollectionSettings = ({ collection }) => { case 'tests': { return ; } + case 'presets': { + return ; + } case 'proxy': { return ; } @@ -118,9 +118,6 @@ const CollectionSettings = ({ collection }) => {
setTab('headers')}> Headers
-
setTab('presets')}> - Presets -
setTab('auth')}> Auth
@@ -130,6 +127,9 @@ const CollectionSettings = ({ collection }) => {
setTab('tests')}> Tests
+
setTab('presets')}> + Presets +
setTab('proxy')}> Proxy
From 36d0db43b2573101fd9487fcbfdf6b200f51255a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Mon, 23 Oct 2023 08:16:38 -0500 Subject: [PATCH 05/45] docs(i18n): Translate readme file to Spanish --- readme_es.md | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 readme_es.md diff --git a/readme_es.md b/readme_es.md new file mode 100644 index 00000000..c46244dd --- /dev/null +++ b/readme_es.md @@ -0,0 +1,95 @@ +
+ + +### Bruno - IDE de código abierto para explorar y probar APIs. + +[![Versión en Github](https://badge.fury.io/gh/usebruno%2Fbruno.svg)](https://badge.fury.io/gh/usebruno%bruno) +[![CI](https://github.com/usebruno/bruno/actions/workflows/unit-tests.yml/badge.svg?branch=main)](https://github.com/usebruno/bruno/workflows/unit-tests.yml) +[![Actividad de Commits](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) +[![Sitio Web](https://img.shields.io/badge/Website-Visit-blue)](https://www.usebruno.com) +[![Descargas](https://img.shields.io/badge/Download-Latest-brightgreen)](https://www.usebruno.com/downloads) + +[English](/readme.md) | [Українська](/readme_ua.md) | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) | **Español** + +Bruno un cliente de APIs nuevo e innovador, creado con el objetivo de revolucionar el panorama actual representado por Postman y otras herramientas similares. + +Bruno almacena tus colecciones directamente en una carpeta de tu sistema de archivos. Usamos un lenguaje de marcado de texto plano, llamado Bru, para guardar información sobre las peticiones a tus APIs. + +Puedes usar git o cualquier otro sistema de control de versiones que prefieras para colaborar en tus colecciones. + +Bruno funciona sin conexión a internet. No tenemos intenciones de añadir sincronización en la nube a Bruno, en ningún momento. Valoramos tu privacidad y creemos que tus datos deben permanecer en tu dispositivo. Puedes leer nuestra visión a largo plazo [aquí](https://github.com/usebruno/bruno/discussions/269) + +![bruno](assets/images/landing-2.png)

+ +### Ejecútalo en múltiples plataformas 🖥️ + +![bruno](assets/images/run-anywhere.png)

+ +### Colabora vía Git 👩‍💻🧑‍💻 + +O cualquier otro sistema de control de versiones que prefieras + +![bruno](assets/images/version-control.png)

+ +### Enlaces importantes 📌 + +- [Nuestra Visión a Largo Plazo](https://github.com/usebruno/bruno/discussions/269) +- [Hoja de Ruta](https://github.com/usebruno/bruno/discussions/384) +- [Documentación](https://docs.usebruno.com) +- [Sitio Web](https://www.usebruno.com) +- [Precios](https://www.usebruno.com/pricing) +- [Descargas](https://www.usebruno.com/downloads) + +### Casos de uso 🎥 + +- [Testimonios](https://github.com/usebruno/bruno/discussions/343) +- [Centro de Conocimiento](https://github.com/usebruno/bruno/discussions/386) +- [Scripts de la Comunidad](https://github.com/usebruno/bruno/discussions/385) + +### Apoya el proyecto ❤️ + +¡Guau! Si te gusta el proyecto, ¡dale al botón de ⭐! + +### Comparte tus testimonios 📣 + +Si Bruno te ha ayudado en tu trabajo y con tus equipos, por favor, no olvides compartir tus testimonios en [nuestras discusiones de GitHub](https://github.com/usebruno/bruno/discussions/343) + +### Publicar en nuevos gestores de paquetes + +Por favor, consulta [aquí](publishing.md) para más información. + +### Contribuye 👩‍💻🧑‍💻 + +Estamos encantados de que quieras ayudar a mejorar Bruno. Por favor, consulta la [guía de contribución](contributing.md) + +Incluso si no puedes contribuir con código, no dudes en reportar errores y solicitar nuevas funcionalidades que necesites para resolver tu caso de uso. + +### Colaboradores + + + +### Mantente en contacto 🌐 + +[X](https://twitter.com/use_bruno)
+[Sitio Web](https://www.usebruno.com)
+[Discord](https://discord.com/invite/KgcZUncpjq)
+[LinkedIn](https://www.linkedin.com/company/usebruno) + +### Marca + +**Nombre** + +`Bruno` es una marca propiedad de [Anoop M D](https://www.helloanoop.com/). + +**Logo** + +El logo fue obtenido de [OpenMoji](https://openmoji.org/library/emoji-1F436/). Licencia: CC [BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) + +### Licencia 📄 + +[MIT](license.md) From 5e5b00e487c508089ed8c8e80242b61af9a40c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Mon, 23 Oct 2023 08:17:15 -0500 Subject: [PATCH 06/45] docs(i18n): Add link to Spanish translation in readme files --- readme.md | 2 +- readme_ru.md | 2 +- readme_tr.md | 2 +- readme_ua.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index e07fd060..a625809a 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ [![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_ua.md) | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) +**English** | [Українська](/readme_ua.md) | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) | [Español](/readme_es.md) Bruno is a new and innovative API client, aimed at revolutionizing the status quo represented by Postman and similar tools out there. diff --git a/readme_ru.md b/readme_ru.md index 207c399b..74e224ec 100644 --- a/readme_ru.md +++ b/readme_ru.md @@ -10,7 +10,7 @@ [![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) | [Українська](/readme_ua.md) | **Русский** | [Türkçe](/readme_tr.md) +[English](/readme.md) | [Українська](/readme_ua.md) | **Русский** | [Türkçe](/readme_tr.md) | [Español](/readme_es.md) Bruno - новый и инновационный клиент API, направленный на революцию в установившейся ситуации, представленной Postman и подобными инструментами. diff --git a/readme_tr.md b/readme_tr.md index 7e1a046f..e8e6f880 100644 --- a/readme_tr.md +++ b/readme_tr.md @@ -10,7 +10,7 @@ [![Web Sitesi](https://img.shields.io/badge/Website-Visit-blue)](https://www.usebruno.com) [![İndir](https://img.shields.io/badge/Download-Latest-brightgreen)](https://www.usebruno.com/downloads) -[English](/readme.md) | [Українська](/readme_ua.md) | [Русский](/readme_ru.md) | **Türkçe** +[English](/readme.md) | [Українська](/readme_ua.md) | [Русский](/readme_ru.md) | **Türkçe** | [Español](/readme_es.md) Bruno, Postman ve benzeri araçlar tarafından temsil edilen statükoda devrim yaratmayı amaçlayan yeni ve yenilikçi bir API istemcisidir. diff --git a/readme_ua.md b/readme_ua.md index 05bfba4f..00aa41e6 100644 --- a/readme_ua.md +++ b/readme_ua.md @@ -10,7 +10,7 @@ [![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) | **Українська** | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) +[English](/readme.md) | **Українська** | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) | [Español](/readme_es.md) Bruno це новий та іноваційний API клієнт, націлений на революційну зміну статус кво, запровадженого інструментами на кшталт Postman. From 62295e7a23f53ee0c6d3ce3d5e67a5626472420e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Mon, 23 Oct 2023 08:31:26 -0500 Subject: [PATCH 07/45] docs(i18n): Translate contributing file to Spanish --- contributing_es.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 contributing_es.md diff --git a/contributing_es.md b/contributing_es.md new file mode 100644 index 00000000..14fe870b --- /dev/null +++ b/contributing_es.md @@ -0,0 +1,37 @@ +[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | **Español** + +## ¡Juntos, hagamos a Bruno mejor! + +Estamos encantados de que quieras ayudar a mejorar Bruno. A continuación encontrarás las instrucciones para empezar a trabajar con Bruno en tu computadora. + +### Tecnologías utilizadas + +Bruno está construido con NextJs y React. También usamos electron para distribuir una versión de escritorio (que soporta colecciones locales). + +Librerías que utilizamos: + +- CSS - Tailwind +- Editores de código - Codemirror +- Manejo del estado - Redux +- Íconos - Tabler Icons +- Formularios - formik +- Validación de esquemas - Yup +- Cliente de peticiones - axios +- Monitor del sistema de archivos - chokidar + +### Dependencias + +Necesitarás [Node v18.x o la última versión LTS](https://nodejs.org/es) y npm 8.x. Ten en cuenta que utilizamos espacios de trabajo de npm en el proyecto. + +### Comienza a programar + +Por favor, consulta [development.md](docs/development_es.md) para obtener instrucciones sobre cómo ejecutar el entorno de desarrollo local. + +### Crea un Pull Request + +- Por favor, mantén los Pull Request pequeños y enfocados en una sola cosa. +- Por favor, sigue el siguiente formato para la creación de ramas: + - feature/[nombre de la funcionalidad]: Esta rama debe contener los cambios para una funcionalidad específica. + - Ejemplo: feature/dark-mode + - bugfix/[nombre del error]: Esta rama debe contener solo correcciones de errores para un error específico. + - Ejemplo: bugfix/bug-1 From fcaf3a8e85846e09c45fef52062ada48d8491a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Mon, 23 Oct 2023 08:32:27 -0500 Subject: [PATCH 08/45] docs(i18n): Add link to Spanish translation in contributing files --- contributing.md | 2 +- contributing_ru.md | 2 +- contributing_tr.md | 2 +- contributing_ua.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contributing.md b/contributing.md index 1490ba4f..a474f320 100644 --- a/contributing.md +++ b/contributing.md @@ -1,4 +1,4 @@ -**English** | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) +**English** | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Español](/contributing_es.md) ## Lets make bruno better, together !! diff --git a/contributing_ru.md b/contributing_ru.md index fd310a24..0fabe7fe 100644 --- a/contributing_ru.md +++ b/contributing_ru.md @@ -1,4 +1,4 @@ -[English](/contributing.md) | [Українська](/contributing_ua.md) | **Русский** | [Türkçe](/contributing_tr.md) +[English](/contributing.md) | [Українська](/contributing_ua.md) | **Русский** | [Türkçe](/contributing_tr.md) | [Español](/contributing_es.md) ## Давайте вместе сделаем Бруно лучше!!! diff --git a/contributing_tr.md b/contributing_tr.md index f67e1a27..5237a084 100644 --- a/contributing_tr.md +++ b/contributing_tr.md @@ -1,4 +1,4 @@ -[English](/readme.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | **Türkçe** +[English](/readme.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | **Türkçe** | [Español](/contributing_es.md) ## Bruno'yu birlikte daha iyi hale getirelim !! diff --git a/contributing_ua.md b/contributing_ua.md index a7fff3cf..5335f9f5 100644 --- a/contributing_ua.md +++ b/contributing_ua.md @@ -1,4 +1,4 @@ -[English](/contributing.md) | **Українська** | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) +[English](/contributing.md) | **Українська** | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Español](/contributing_es.md) ## Давайте зробимо Bruno краще, разом !! From d4b8caeedc49f3a6688f9e0207af48435cb3534f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Mon, 23 Oct 2023 08:42:48 -0500 Subject: [PATCH 09/45] docs(i18n): Translate development file to Spanish --- docs/development_es.md | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/development_es.md diff --git a/docs/development_es.md b/docs/development_es.md new file mode 100644 index 00000000..942e83fc --- /dev/null +++ b/docs/development_es.md @@ -0,0 +1,55 @@ +[English](/docs/development.md) | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | **Español** + +## Desarrollo + +Bruno está siendo desarrollado como una aplicación de escritorio. Para ejecutarlo, primero debes ejecutar la aplicación de nextjs en una terminal y luego ejecutar la aplicación de electron en otra terminal. + +### Dependencias + +- NodeJS v18 + +### Desarrollo local + +```bash +# Utiliza la versión 18 de nodejs +nvm use + +# Instala las dependencias +npm i --legacy-peer-deps + +# Construye la documentación de graphql +npm run build:graphql-docs + +# Construye bruno-query +npm run build:bruno-query + +# Ejecuta la aplicación de nextjs (terminal 1) +npm run dev:web + +# Ejecuta la aplicación de electron (terminal 2) +npm run dev:electron +``` + +### Solución de problemas + +Es posible que encuentres un error de `Unsupported platform` cuando ejecutes `npm install`. Para solucionarlo, debes eliminar la carpeta `node_modules` y el archivo `package-lock.json`, luego, ejecuta `npm install`. Lo anterior debería instalar todos los paquetes necesarios para ejecutar la aplicación. + +```shell +# Elimina la carpeta node_modules en los subdirectorios +find ./ -type d -name "node_modules" -print0 | while read -d $'\0' dir; do + rm -rf "$dir" +done + +# Elimina el archivo package-lock en los subdirectorios +find . -type f -name "package-lock.json" -delete +``` + +### Pruebas + +```bash +# bruno-schema +npm test --workspace=packages/bruno-schema + +# bruno-lang +npm test --workspace=packages/bruno-lang +``` From 3bfc966e109afabd2e3005818d71b03ae1313dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Mon, 23 Oct 2023 08:43:05 -0500 Subject: [PATCH 10/45] docs(i18n): Add link to Spanish translation in readme files --- docs/development.md | 2 +- docs/development_ru.md | 2 +- docs/development_ua.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/development.md b/docs/development.md index d56d3e6c..b358a218 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,4 +1,4 @@ -**English** | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) +**English** | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | [Español](/docs/development_es.md) ## Development diff --git a/docs/development_ru.md b/docs/development_ru.md index 3816066e..a8d7024a 100644 --- a/docs/development_ru.md +++ b/docs/development_ru.md @@ -1,4 +1,4 @@ -[English](/docs/development.md) | [Українська](/docs/development_ua.md) | **Русский** +[English](/docs/development.md) | [Українська](/docs/development_ua.md) | **Русский** | [Español](/docs/development_es.md) ## Разработка diff --git a/docs/development_ua.md b/docs/development_ua.md index d6d5bcdf..286a8539 100644 --- a/docs/development_ua.md +++ b/docs/development_ua.md @@ -1,4 +1,4 @@ -[English](/docs/development.md) | **Українська** | [Русский](/docs/development_ru.md) +[English](/docs/development.md) | **Українська** | [Русский](/docs/development_ru.md) | [Español](/docs/development_es.md) ## Розробка From 9602f42a71f0f11c8993be55c56901e87cd2f749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Mon, 23 Oct 2023 08:45:07 -0500 Subject: [PATCH 11/45] docs(i18n): Update link to Spanish translation of contributing file --- readme_es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme_es.md b/readme_es.md index c46244dd..c75d40a8 100644 --- a/readme_es.md +++ b/readme_es.md @@ -61,7 +61,7 @@ Por favor, consulta [aquí](publishing.md) para más información. ### Contribuye 👩‍💻🧑‍💻 -Estamos encantados de que quieras ayudar a mejorar Bruno. Por favor, consulta la [guía de contribución](contributing.md) +Estamos encantados de que quieras ayudar a mejorar Bruno. Por favor, consulta la [guía de contribución](contributing_es.md) para más información. Incluso si no puedes contribuir con código, no dudes en reportar errores y solicitar nuevas funcionalidades que necesites para resolver tu caso de uso. From 915b227ede9c31267267400b5e6076f655f76a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= Date: Sat, 28 Oct 2023 10:26:10 -0500 Subject: [PATCH 12/45] docs: Fix broken images in Spanish readme --- docs/readme/readme_es.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/readme/readme_es.md b/docs/readme/readme_es.md index 0370ae4a..3e1a4dc6 100644 --- a/docs/readme/readme_es.md +++ b/docs/readme/readme_es.md @@ -1,5 +1,5 @@
- + ### Bruno - IDE de código abierto para explorar y probar APIs. @@ -18,17 +18,17 @@ Puedes usar git o cualquier otro sistema de control de versiones que prefieras p Bruno funciona sin conexión a internet. No tenemos intenciones de añadir sincronización en la nube a Bruno, en ningún momento. Valoramos tu privacidad y creemos que tus datos deben permanecer en tu dispositivo. Puedes leer nuestra visión a largo plazo [aquí](https://github.com/usebruno/bruno/discussions/269) -![bruno](assets/images/landing-2.png)

+![bruno](/assets/images/landing-2.png)

### Ejecútalo en múltiples plataformas 🖥️ -![bruno](assets/images/run-anywhere.png)

+![bruno](/assets/images/run-anywhere.png)

### Colabora vía Git 👩‍💻🧑‍💻 O cualquier otro sistema de control de versiones que prefieras -![bruno](assets/images/version-control.png)

+![bruno](/assets/images/version-control.png)

### Enlaces importantes 📌 From 741718ede61bb45f8e4783ac57489500bbea7980 Mon Sep 17 00:00:00 2001 From: szto Date: Fri, 3 Nov 2023 00:37:08 +0900 Subject: [PATCH 13/45] feat: korean transation --- docs/readme/readme_kr.md | 121 +++++++++++++++++++++++++++++++++++++++ readme.md | 2 +- 2 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 docs/readme/readme_kr.md diff --git a/docs/readme/readme_kr.md b/docs/readme/readme_kr.md new file mode 100644 index 00000000..070fd086 --- /dev/null +++ b/docs/readme/readme_kr.md @@ -0,0 +1,121 @@ +
+ + +### Bruno - API 탐색 및 테스트를 위한 오픈소스 IDE. + +[![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/unit-tests.yml/badge.svg?branch=main)](https://github.com/usebruno/bruno/workflows/unit-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) + +Bruno는 새롭고 혁신적인 API 클라이언트로, Postman과 유사한 툴들을 혁신하는 것을 목표로 합니다. + +Bruno는 사용자의 컬렉션을 파일 시스템의 폴더에 직접 저장합니다. 일반 텍스트 마크업 언어인 Bru를 사용해 API 요청에 대한 정보를 저장합니다. + +Git 또는 원하는 버전 관리 도구를 사용하여 API 컬렉션을 연동할 수 있습니다. + +브루는 오프라인 전용입니다. 브루노에 클라우드 동기화 기능을 추가할 계획은 없습니다. 저희는 사용자의 데이터 프라이버시를 소중히 여기며, 데이터는 사용자의 기기에 남아 있어야 한다고 믿습니다. 장기 비전 읽기 [링크](https://github.com/usebruno/bruno/discussions/269) + +📢 Watch our recent talk at India FOSS 3.0 Conference [here](https://www.youtube.com/watch?v=7bSMFpbcPiY) + +![bruno](/assets/images/landing-2.png)

+ +### 설치 + +Bruno 는 여기에서 다운로드 받을 수 있습니다.[링크](https://www.usebruno.com/downloads) (맥, 윈도우, 리눅스) + +Homebrew, Chocolatey, Snap, Apt 같은 패키지 관리자를 통해서도 Bruno를 설치할 수 있습니다. + +```sh +# On Mac via Homebrew +brew install bruno + +# On Windows via Chocolatey +choco install bruno + +# On Linux via Snap +snap install bruno + +# On 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 [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 +``` + +### 여러 플랫폼에서 실행하세요. 🖥️ + +![bruno](assets/images/run-anywhere.png)

+ +### Git과 연동하세요. 👩‍💻🧑‍💻 + +또는 원하는 버전 관리 시스템을 선택하세요. + +![bruno](assets/images/version-control.png)

+ +### 중요 링크 📌 + +- [Our Long Term Vision](https://github.com/usebruno/bruno/discussions/269) +- [Roadmap](https://github.com/usebruno/bruno/discussions/384) +- [Documentation](https://docs.usebruno.com) +- [Website](https://www.usebruno.com) +- [Pricing](https://www.usebruno.com/pricing) +- [Download](https://www.usebruno.com/downloads) + +### 쇼케이스 🎥 + +- [Testimonials](https://github.com/usebruno/bruno/discussions/343) +- [Knowledge Hub](https://github.com/usebruno/bruno/discussions/386) +- [Scriptmania](https://github.com/usebruno/bruno/discussions/385) + +### 지원 ❤️ + +프로젝트가 마음에 들면 ⭐ 버튼을 눌러 주세요. + +### 후기 공유 📣 + +Bruno가 여러분과 여러분의 팀에 도움이 되었다면, 잊지 말고 공유해 주세요. [Github discussion 공유 링크](https://github.com/usebruno/bruno/discussions/343) + +### 새 패키지 관리자에게 게시 + +더 많은 정보를 확인하시려명 링크를 클릭해 주세요.[배포 가이드](publishing.md) + +### 컨트리뷰트 👩‍💻🧑‍💻 + +컨트리뷰트에 관심이 있으시면 링크를 참고해 주세요. [컨트리뷰트 가이드](contributing.md) + +코드를 통해 기여할 수 없더라도 사용 사례를 해결하기 위해 구현이 필요한 버그나 기능 요청을 주저하지 마시고 제출해 주세요. + +### Authors + + + +### Stay in touch 🌐 + +[𝕏 (Twitter)](https://twitter.com/use_bruno)
+[Website](https://www.usebruno.com)
+[Discord](https://discord.com/invite/KgcZUncpjq)
+[LinkedIn](https://www.linkedin.com/company/usebruno) + +### Trademark + +**Name** + +`Bruno` is a trademark held by [Anoop M D](https://www.helloanoop.com/) + +**Logo** + +The logo is sourced from [OpenMoji](https://openmoji.org/library/emoji-1F436/). License: CC [BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) + +### License 📄 + +[MIT](license.md) diff --git a/readme.md b/readme.md index 96a9d7c8..51bd7db9 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ [![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** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) +**English** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) | [한국어](docs/readme/readme_kr.md) Bruno is a new and innovative API client, aimed at revolutionizing the status quo represented by Postman and similar tools out there. From 3ed86acb46e007002c57d42546375bed3c6d6e29 Mon Sep 17 00:00:00 2001 From: Tathagata Chakraborty Date: Fri, 3 Nov 2023 22:30:00 +0530 Subject: [PATCH 14/45] #876 fix- Bengali translation required --- contributing.md | 2 +- docs/contributing/contributing_bn.md | 87 +++++++++++++++++++ docs/contributing/contributing_de.md | 2 + docs/contributing/contributing_fr.md | 2 + docs/contributing/contributing_ru.md | 2 + docs/contributing/contributing_tr.md | 2 + docs/contributing/contributing_ua.md | 2 + docs/readme/readme_bn.md | 123 +++++++++++++++++++++++++++ docs/readme/readme_de.md | 2 + docs/readme/readme_fr.md | 3 + docs/readme/readme_ru.md | 3 + docs/readme/readme_tr.md | 2 + docs/readme/readme_ua.md | 2 + readme.md | 2 +- 14 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 docs/contributing/contributing_bn.md create mode 100644 docs/readme/readme_bn.md diff --git a/contributing.md b/contributing.md index 0d6efdff..904fdb16 100644 --- a/contributing.md +++ b/contributing.md @@ -1,4 +1,4 @@ -**English** | [Українська](docs/contributing/contributing_ua.md) | [Русский](docs/contributing/contributing_ru.md) | [Türkçe](docs/contributing/contributing_tr.md) | [Deutsch](docs/contributing/contributing_de.md) | [Français](docs/contributing/contributing_fr.md) +**English** | [Українська](docs/contributing/contributing_ua.md) | [Русский](docs/contributing/contributing_ru.md) | [Türkçe](docs/contributing/contributing_tr.md) | [Deutsch](docs/contributing/contributing_de.md) | [Français](docs/contributing/contributing_fr.md) | [বাংলা](docs/contributing/contributing_bn.md) ## Let's make bruno better, together !! diff --git a/docs/contributing/contributing_bn.md b/docs/contributing/contributing_bn.md new file mode 100644 index 00000000..e30ecc33 --- /dev/null +++ b/docs/contributing/contributing_bn.md @@ -0,0 +1,87 @@ +[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](docs/contributing/contributing_de.md) | [Français](/contributing_fr.md) | **বাংলা** + +## আসুন ব্রুনোকে আরও ভালো করি, একসাথে!! + +আমরা খুশি যে আপনি ব্রুনোর উন্নতি করতে চাইছেন। নীচে আপনার কম্পিউটারে ব্রুনো ইনষ্টল করার নির্দেশিকা রয়েছে৷। + +### Technology Stack (প্রযুক্তি স্ট্যাক) + +ব্রুনো Next.js এবং React ব্যবহার করে নির্মিত। এছাড়াও আমরা একটি ডেস্কটপ সংস্করণ পাঠাতে ইলেক্ট্রন ব্যবহার করি (যা স্থানীয় সংগ্রহ সমর্থন করে) + +নিম্ন লিখিত লাইব্রেরি আমরা ব্যবহার করি - + +- CSS - Tailwind +- Code Editors - Codemirror +- State Management - Redux +- Icons - Tabler Icons +- Forms - formik +- Schema Validation - Yup +- Request Client - axios +- Filesystem Watcher - chokidar + +### Dependencies (নির্ভরতা) + +আপনার প্রয়োজন হবে [নোড v18.x বা সর্বশেষ LTS সংস্করণ](https://nodejs.org/en/) এবং npm 8.x। আমরা প্রকল্পে npm ওয়ার্কস্পেস ব্যবহার করি । + +## Development + +ব্রুনো একটি ডেস্কটপ অ্যাপ হিসেবে তৈরি করা হচ্ছে। আপনাকে একটি টার্মিনালে Next.js অ্যাপটি চালিয়ে অ্যাপটি লোড করতে হবে এবং তারপরে অন্য টার্মিনালে ইলেক্ট্রন অ্যাপটি চালাতে হবে। + +### Dependencies (নির্ভরতা) + +- NodeJS v18 + +### Local Development + +```bash +# nodejs 18 সংস্করণ ব্যবহার করুন +nvm use + +# নির্ভরতা ইনস্টল করুন +npm i --legacy-peer-deps + +# গ্রাফকিউএল ডক্স তৈরি করুন +npm run build:graphql-docs + +# ব্রুনো কোয়েরি তৈরি করুন +npm run build:bruno-query + +# NextJs অ্যাপ চালান (টার্মিনাল 1) +npm run dev:web + +# ইলেক্ট্রন অ্যাপ চালান (টার্মিনাল 2) +npm run dev:electron +``` + +### Troubleshooting (সমস্যা সমাধান) + +আপনি যখন 'npm install' চালান তখন আপনি একটি 'অসমর্থিত প্ল্যাটফর্ম' ত্রুটির সম্মুখীন হতে পারেন৷ এটি ঠিক করতে, আপনাকে `node_modules` এবং `package-lock.json` মুছে ফেলতে হবে এবং `npm install` চালাতে হবে। এটি অ্যাপটি চালানোর জন্য প্রয়োজনীয় সমস্ত প্যাকেজ ইনস্টল করবে যাতে এই ত্রুটি ঠিক হয়ে যেতে পারে । + +```shell +# সাব-ডিরেক্টরিতে নোড_মডিউল মুছুন +find ./ -type d -name "node_modules" -print0 | while read -d $'\0' dir; do + rm -rf "$dir" +done + +# সাব-ডিরেক্টরিতে প্যাকেজ-লক মুছুন +find . -type f -name "package-lock.json" -delete +``` + +### Testing (পরীক্ষা) + +```bash +# bruno-schema +npm test --workspace=packages/bruno-schema + +# bruno-lang +npm test --workspace=packages/bruno-lang +``` + +### Raising Pull Request (পুল অনুরোধ উত্থাপন) + +- অনুগ্রহ করে PR এর আকার ছোট রাখুন এবং একটি বিষয়ে ফোকাস করুন। +- অনুগ্রহ করে শাখা তৈরির বিন্যাস অনুসরণ করুন। + - বৈশিষ্ট্য/[ফিচারের নাম]: এই শাখায় একটি নির্দিষ্ট বৈশিষ্ট্যের জন্য পরিবর্তন থাকতে হবে। + - উদাহরণ: বৈশিষ্ট্য/ডার্ক-মোড। + - বাগফিক্স/[বাগ নাম]: এই শাখায় একটি নির্দিষ্ট বাগ-এর জন্য শুধুমাত্র বাগ ফিক্স থাকা উচিত। + - উদাহরণ বাগফিক্স/বাগ-1। diff --git a/docs/contributing/contributing_de.md b/docs/contributing/contributing_de.md index b0b1b694..be3126c0 100644 --- a/docs/contributing/contributing_de.md +++ b/docs/contributing/contributing_de.md @@ -1,3 +1,5 @@ +[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | **Deutsch** | [Français](/contributing_fr.md) | [বাংলা](docs/contributing/contributing_bn.md) + ## Lass uns Bruno noch besser machen, gemeinsam !! Ich freue mich, dass Du Bruno verbessern möchtest. Hier findest Du eine Anleitung, mit der Du Bruno auf Deinem Computer einrichten kannst. diff --git a/docs/contributing/contributing_fr.md b/docs/contributing/contributing_fr.md index b69260e4..006972e9 100644 --- a/docs/contributing/contributing_fr.md +++ b/docs/contributing/contributing_fr.md @@ -1,3 +1,5 @@ +[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | **Français** | [বাংলা](docs/contributing/contributing_bn.md) + ## Ensemble, améliorons Bruno ! Je suis content de voir que vous envisagez améliorer Bruno. Ci-dessous, vous trouverez les règles et guides pour récupérer Bruno sur votre ordinateur. diff --git a/docs/contributing/contributing_ru.md b/docs/contributing/contributing_ru.md index 6202c8f3..5f3c270b 100644 --- a/docs/contributing/contributing_ru.md +++ b/docs/contributing/contributing_ru.md @@ -1,3 +1,5 @@ +[English](/contributing.md) | [Українська](/contributing_ua.md) | **Русский** | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | [বাংলা](docs/contributing/contributing_bn.md) + ## Давайте вместе сделаем Бруно лучше!!! Я рад, что Вы хотите усовершенствовать bruno. Ниже приведены рекомендации по запуску bruno на вашем компьютере. diff --git a/docs/contributing/contributing_tr.md b/docs/contributing/contributing_tr.md index 25ff880c..4d63bd41 100644 --- a/docs/contributing/contributing_tr.md +++ b/docs/contributing/contributing_tr.md @@ -1,3 +1,5 @@ +[English](/readme.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | **Türkçe** | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | [বাংলা](docs/contributing/contributing_bn.md) + ## Bruno'yu birlikte daha iyi hale getirelim !! Bruno'yu geliştirmek istemenizden mutluluk duyuyorum. Aşağıda, bruno'yu bilgisayarınıza getirmeye başlamak için yönergeler bulunmaktadır. diff --git a/docs/contributing/contributing_ua.md b/docs/contributing/contributing_ua.md index 329077cd..723aa770 100644 --- a/docs/contributing/contributing_ua.md +++ b/docs/contributing/contributing_ua.md @@ -1,3 +1,5 @@ +[English](/contributing.md) | **Українська** | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | [বাংলা](docs/contributing/contributing_bn.md) + ## Давайте зробимо Bruno краще, разом !! Я дуже радий що Ви бажаєте покращити Bruno. Нижче наведені вказівки як розпочати розробку Bruno на Вашому комп'ютері. diff --git a/docs/readme/readme_bn.md b/docs/readme/readme_bn.md new file mode 100644 index 00000000..bcf313d6 --- /dev/null +++ b/docs/readme/readme_bn.md @@ -0,0 +1,123 @@ +
+ + +### ব্রুনো - API অন্বেষণ এবং পরীক্ষা করার জন্য ওপেনসোর্স IDE। + +[![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/unit-tests.yml/badge.svg?branch=main)](https://github.com/usebruno/bruno/workflows/unit-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) | [Français](docs/readme/readme_fr.md) | **বাংলা** + +ব্রুনো হল একটি নতুন এবং উদ্ভাবনী API ক্লায়েন্ট, যার লক্ষ্য পোস্টম্যান এবং অনুরূপ সরঞ্জাম দ্বারা প্রতিনিধিত্ব করা স্থিতাবস্থায় বিপ্লব ঘটানো। + +ব্রুনো আপনার সংগ্রহগুলি সরাসরি আপনার ফাইল সিস্টেমের একটি ফোল্ডারে সঞ্চয় করে। আমরা API অনুরোধ সম্পর্কে তথ্য সংরক্ষণ করতে একটি প্লেইন টেক্সট মার্কআপ ভাষা, ব্রু ব্যবহার করি। + +আপনি আপনার API সংগ্রহে সহযোগিতা করতে গিট বা আপনার পছন্দের যেকোনো সংস্করণ নিয়ন্ত্রণ ব্যবহার করতে পারেন। + +ব্রুনো শুধুমাত্র অফলাইন। ব্রুনোতে ক্লাউড-সিঙ্ক যোগ করার কোন পরিকল্পনা নেই, কখনও। আমরা আপনার ডেটা গোপনীয়তার মূল্য দিই এবং বিশ্বাস করি এটি আপনার ডিভাইসে থাকা উচিত। আমাদের দীর্ঘমেয়াদী দৃষ্টি পড়ুন। [এখানে ](https://github.com/usebruno/bruno/discussions/269) + +📢 ইন্ডিয়া FOSS 3.0 সম্মেলনে আমাদের সাম্প্রতিক আলোচনা দেখুন [এখানে](https://www.youtube.com/watch?v=7bSMFpbcPiY) + +![bruno](/assets/images/landing-2.png)

+ +### স্থাপন + +ব্রুনো বাইনারি ডাউনলোড হিসাবে উপলব্ধ [আমাদের ওয়েবসাইটে](https://www.usebruno.com/downloads) ম্যাক, উইন্ডোজ এবং লিনাক্সের জন্য। + +আপনি Homebrew, Chocolatey, Snap এবং Apt এর মত প্যাকেজ ম্যানেজারদের মাধ্যমে ব্রুনো ইনস্টল করতে পারেন। + +```sh +# Homebrew এর মাধ্যমে Mac-এ +brew install bruno + +# চকোলেটির মাধ্যমে উইন্ডোজে +choco install bruno + +# স্ন্যাপ এর মাধ্যমে লিনাক্সে +snap install bruno + +# 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 [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 +``` + +### একাধিক প্ল্যাটফর্মে চালান 🖥️ + +![bruno](/assets/images/run-anywhere.png)

+ +### Git এর মাধ্যমে সহযোগিতা করুন 👩‍💻🧑‍💻 + +অথবা আপনার পছন্দের যেকোনো সংস্করণ নিয়ন্ত্রণ ব্যবস্থা + +![bruno](/assets/images/version-control.png)

+ +### গুরুত্বপূর্ণ লিংক 📌 + +- [আমাদের দীর্ঘমেয়াদী দৃষ্টি](https://github.com/usebruno/bruno/discussions/269) +- [রোডম্যাপ](https://github.com/usebruno/bruno/discussions/384) +- [ডকুমেন্টেশন](https://docs.usebruno.com) +- [ওয়েবসাইট](https://www.usebruno.com) +- [মূল্য](https://www.usebruno.com/pricing) +- [ডাউনলোড করুন](https://www.usebruno.com/downloads) + +### শোকেস 🎥 + +- [প্রশংসাপত্র](https://github.com/usebruno/bruno/discussions/343) +- [নলেজ হাব](https://github.com/usebruno/bruno/discussions/386) +- [স্ক্রিপ্টম্যানিয়া](https://github.com/usebruno/bruno/discussions/385) + +### সমর্থন ❤️ + +উফ ! আপনি যদি প্রকল্পটি পছন্দ করেন তবে ⭐ বোতামটি টিপুন !! + +### প্রশংসাপত্র শেয়ার করুন 📣 + +যদি ব্রুনো আপনাকে কর্মক্ষেত্রে এবং আপনার দলগুলিতে সাহায্য করে থাকে, অনুগ্রহ করে আপনার [আমাদের গিটহাব আলোচনায় প্রশংসাপত্রগুলি](https://github.com/usebruno/bruno/discussions/343) শেয়ার করতে ভুলবেন না + +### নতুন প্যাকেজ পরিচালকদের কাছে প্রকাশ করা হচ্ছে + +আরও তথ্যের জন্য অনুগ্রহ করে [এখানে](publishing.md) দেখুন। + +### অবদান 👩‍💻🧑‍💻 + +আমি খুশি যে আপনি ব্রুনোর উন্নতি করতে চাইছেন। অনুগ্রহ করে [অবদানকারী নির্দেশিকা](contributing.md) দেখুন + +আপনি কোডের মাধ্যমে অবদান রাখতে না পারলেও, অনুগ্রহ করে বাগ এবং বৈশিষ্ট্যের অনুরোধ ফাইল করতে দ্বিধা করবেন না যা আপনার ব্যবহারের ক্ষেত্রে সমাধান করার জন্য প্রয়োগ করা প্রয়োজন। + +### লেখক + + + +### সাথে থাকুন 🌐 + +[𝕏 (টুইটার)](https://twitter.com/use_bruno)
+[ওয়েবসাইট](https://www.usebruno.com)
+[ডিসকর্ড](https://discord.com/invite/KgcZUncpjq)
+[লিঙ্কডইন](https://www.linkedin.com/company/usebruno) + +### ট্রেডমার্ক + +**নাম** + +`Bruno` হল একটি ট্রেডমার্ক [Anoop M D](https://www.helloanoop.com/) + +**লোগো** + +লোগোটি [OpenMoji](https://openmoji.org/library/emoji-1F436/) থেকে নেওয়া হয়েছে। লাইসেন্স: CC [BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) + +### লাইসেন্স 📄 + +[MIT](license.md) diff --git a/docs/readme/readme_de.md b/docs/readme/readme_de.md index 371672b4..111bb04c 100644 --- a/docs/readme/readme_de.md +++ b/docs/readme/readme_de.md @@ -10,6 +10,8 @@ [![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) | [Українська](/readme_ua.md) | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) | **Deutsch** | [Français](/readme_fr.md) | [বাংলা](docs/readme/readme_bn.md) + Bruno ist ein neuer und innovativer API-Client, der den Status Quo von Postman und ähnlichen Tools revolutionieren soll. Bruno speichert Deine Sammlungen direkt in einem Ordner in Deinem Dateisystem. Wir verwenden eine einfache Textauszeichnungssprache - Bru - um Informationen über API-Anfragen zu speichern. diff --git a/docs/readme/readme_fr.md b/docs/readme/readme_fr.md index 9c3fdd6c..f350080a 100644 --- a/docs/readme/readme_fr.md +++ b/docs/readme/readme_fr.md @@ -10,6 +10,9 @@ [![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) | [Українська](/readme_ua.md) | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) | [Deutsch](/readme_de.md) | **Français** | [বাংলা](docs/readme/readme_bn.md) + Bruno est un nouveau client API, innovant, qui a pour but de révolutionner le _status quo_ que représente Postman et les autres outils. Bruno sauvegarde vos collections directement sur votre système de fichiers. Nous utilisons un langage de balise de type texte pour décrire les requêtes API. diff --git a/docs/readme/readme_ru.md b/docs/readme/readme_ru.md index ddbe8135..0779bd5a 100644 --- a/docs/readme/readme_ru.md +++ b/docs/readme/readme_ru.md @@ -10,6 +10,9 @@ [![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) | [Українська](/readme_ua.md) | **Русский** | [Türkçe](/readme_tr.md) | [Deutsch](/readme_de.md) | [Français](/readme_fr.md) | [বাংলা](docs/readme/readme_bn.md) + Bruno - новый и инновационный клиент API, направленный на революцию в установившейся ситуации, представленной Postman и подобными инструментами. Bruno хранит ваши коллекции непосредственно в папке в вашей файловой системе. Для сохранения информации об API-запросах мы используем язык Bru. diff --git a/docs/readme/readme_tr.md b/docs/readme/readme_tr.md index b0473850..9e67a980 100644 --- a/docs/readme/readme_tr.md +++ b/docs/readme/readme_tr.md @@ -10,6 +10,8 @@ [![Web Sitesi](https://img.shields.io/badge/Website-Visit-blue)](https://www.usebruno.com) [![İndir](https://img.shields.io/badge/Download-Latest-brightgreen)](https://www.usebruno.com/downloads) +[English](/readme.md) | [Українська](/readme_ua.md) | [Русский](/readme_ru.md) | **Türkçe** | [Deutsch](/readme_de.md) | [Français](/readme_fr.md) | [বাংলা](docs/readme/readme_bn.md) + Bruno, Postman ve benzeri araçlar tarafından temsil edilen statükoda devrim yaratmayı amaçlayan yeni ve yenilikçi bir API istemcisidir. Bruno koleksiyonlarınızı doğrudan dosya sisteminizdeki bir klasörde saklar. API istekleri hakkındaki bilgileri kaydetmek için düz bir metin biçimlendirme dili olan Bru kullanıyoruz. diff --git a/docs/readme/readme_ua.md b/docs/readme/readme_ua.md index cb0ccb9e..cd58ed56 100644 --- a/docs/readme/readme_ua.md +++ b/docs/readme/readme_ua.md @@ -10,6 +10,8 @@ [![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) | **Українська** | [Русский](/readme_ru.md) | [Türkçe](/readme_tr.md) | [Deutsch](/readme_de.md) | [Français](/readme_fr.md) | [বাংলা](docs/readme/readme_bn.md) + Bruno це новий та іноваційний API клієнт, націлений на революційну зміну статус кво, запровадженого інструментами на кшталт Postman. Bruno зберігає ваші колекції напряму у теці на вашому диску. Він використовує текстову мову розмітки Bru для збереження інформації про ваші API запити. diff --git a/readme.md b/readme.md index 96a9d7c8..d5306e6d 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ [![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** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) +**English** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) | [বাংলা](docs/readme/readme_bn.md) Bruno is a new and innovative API client, aimed at revolutionizing the status quo represented by Postman and similar tools out there. From b8f4236c1a7322ab9962d622b6ba7257e099d349 Mon Sep 17 00:00:00 2001 From: Riccardo Consolandi Date: Tue, 7 Nov 2023 22:51:46 +0100 Subject: [PATCH 15/45] feat: add italian readME translation, link and contributing --- docs/contributing/contributing_it.md | 89 ++++++++++++++++++++ docs/readme/readme_it.md | 121 +++++++++++++++++++++++++++ readme.md | 2 +- 3 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 docs/contributing/contributing_it.md create mode 100644 docs/readme/readme_it.md diff --git a/docs/contributing/contributing_it.md b/docs/contributing/contributing_it.md new file mode 100644 index 00000000..53bf61e7 --- /dev/null +++ b/docs/contributing/contributing_it.md @@ -0,0 +1,89 @@ +## Insieme, miglioriamo Bruno! + +Sono felice di vedere che hai intenzione di migliorare Bruno. Di seguito, troverai le regole e le guide per ripristinare Bruno sul tuo computer. + +### Tecnologie utilizzate + +Bruno è costruito utilizzando Next.js e React. Utilizziamo anche Electron per incorporare la versione desktop (che consente raccolte locali). + +Le librerie che utilizziamo sono: + +- CSS - Tailwind +- Code Editors - Codemirror +- State Management - Redux +- Icons - Tabler Icons +- Forms - formik +- Schema Validation - Yup +- Request Client - axios +- Filesystem Watcher - chokidar + +### Dependences + +Hai bisogno di [Node v18.x o dell'ultima versione LTS](https://nodejs.org/en/) di npm 8.x. Utilizziamo gli spazi di lavoro npm (_npm workspaces_) in questo progetto. + +### Iniziamo a codificare + +Si prega di fare riferimento alla [documentazione di sviluppo](docs/development_it.md) per le istruzioni su come avviare l'ambiente di sviluppo locale. + +### Aprire una richiesta di pull (Pull Request) + +- Si prega di mantenere le Pull Request (PR) brevi e concentrate su un singolo obiettivo. +- Si prega di seguire il formato di denominazione dei rami. + - feature/[feature name]: Questo ramo dovrebbe contenere una specifica funzionalità. + - Esempio: feature/dark-mode + - bugfix/[bug name]: Questo ramo dovrebbe contenere solo una soluzione per un bug specifico. + - Esempio: bugfix/bug-1 + +## Sviluppo + +Bruno è sviluppato come un'applicazione "heavy". È necessario caricare l'applicazione avviando Next.js in una finestra del terminale e quindi avviare l'applicazione Electron in un altro terminale. + +### Sviluppo + +- NodeJS v18 + +### Sviluppo locale + +```bash +# use nodejs 18 version +nvm use + +# install deps +npm i --legacy-peer-deps + +# build graphql docs +npm run build:graphql-docs + +# build bruno query +npm run build:bruno-query + +# run next app (terminal 1) +npm run dev:web + +# run electron app (terminal 2) +npm run dev:electron +``` + +### Risoluzione dei problemi + +Potresti trovare un errore `Unsupported platform` durante l'esecuzione di `npm install`. Per risolvere questo problema, ti preghiamo di eliminare la cartella `node_modules`, il file `package-lock.json` e di seguito nuovamente `npm install`. Qeusto dovrebbe installare tutti i pacchetti necessari per avviare l'applicazione. + +```shell +# delete node_modules in sub-directories +find ./ -type d -name "node_modules" -print0 | while read -d $'\0' dir; do + rm -rf "$dir" +done + +# delete package-lock in sub-directories +find . -type f -name "package-lock.json" -delete +``` + +### Tests + +```bash +# bruno-schema +npm test --workspace=packages/bruno-schema + +# bruno-lang +npm test --workspace=packages/bruno-lang +``` diff --git a/docs/readme/readme_it.md b/docs/readme/readme_it.md new file mode 100644 index 00000000..671d5199 --- /dev/null +++ b/docs/readme/readme_it.md @@ -0,0 +1,121 @@ +
+ + +### Bruno - Opensource IDE per esplorare e testare gli APIs. + +[![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/unit-tests.yml/badge.svg?branch=main)](https://github.com/usebruno/bruno/workflows/unit-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) + +Bruno è un nuovo ed innovativo API client, mirato a rivoluzionare lo status quo rappresentato da Postman e strumenti simili disponibili. + +Bruno memorizza le tue raccolte direttamente in una cartella del tuo filesystem. Utilizziamo un linguaggio di markup in testo semplice chiamato Bru per salvare informazioni sulle richeste API. + +Puoi utilizzare Git o qualsiasi sistema di controllo che preferisci per collaborare sulle tue raccolte di API. + +Bruno funziona solo in modalità offline. Non ci sono piani per aggiungere la sincronizzazione su cloud a Bruno in futuro. Valorizziamo la privacy dei tuoi dati e crediamo che dovrebbero rimanere sul tuo dispositivo. Puoi leggere la nostra visione a lungo termine [qui (in inglese)](https://github.com/usebruno/bruno/discussions/269) + +📢 Guarda la nostra presentazione più recente alla conferenza India FOSS 3.0 [qui](https://www.youtube.com/watch?v=7bSMFpbcPiY) + +![bruno](/assets/images/landing-2.png)

+ +### Installazione + +Bruno è disponisible come download binario [sul nostro sito](https://www.usebruno.com/downloads) per Mac, Windows e Linux. + +Puoi installare Bruno anche tramite package manger come Homebrew, Chocolatey, Snap e Apt. + +```sh +# Su Mac come Homebrew +brew install bruno + +# Su Windows come Chocolatey +choco install bruno + +# Su Linux tramite Snap +snap install bruno + +# Su Linux tramite 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 [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 +``` + +### Funziona su diverse piattaforme 🖥️ + +![bruno](/assets/images/run-anywhere.png)

+ +### Collabora tramite Git 👩‍💻🧑‍💻 + +O con qualsiasi sistema di controllo di versioni a tua scelta + +![bruno](/assets/images/version-control.png)

+ +### Collegamenti importanti 📌 + +- [La nostra visione a lungo termine](https://github.com/usebruno/bruno/discussions/269) +- [Roadmap](https://github.com/usebruno/bruno/discussions/384) +- [Documentazione](https://docs.usebruno.com) +- [Sito internet](https://www.usebruno.com) +- [Prezzo](https://www.usebruno.com/pricing) +- [Download](https://www.usebruno.com/downloads) + +### Showcase 🎥 + +- [Testimonianze](https://github.com/usebruno/bruno/discussions/343) +- [Centro di conoscenza](https://github.com/usebruno/bruno/discussions/386) +- [Scriptmania](https://github.com/usebruno/bruno/discussions/385) + +### Supporto ❤️ + +Woof! se ti piace il progetto, premi quel ⭐ pulsante !! + +### Testimonianze condivise 📣 + +Se Bruno ti ha aiutato con il tuo lavoro ed il tuo team, per favore non dimenticare di condividere le tue [testimonianze nella nostra discussione su GitHub](https://github.com/usebruno/bruno/discussions/343) + +### Pubblica Bruno su un nuovo gestore di pacchetti + +Per favore vedi [qui](publishing.md) per accedere a più informazioni. + +### Contribuire 👩‍💻🧑‍💻 + +Sono felice che vuoi migliorare Bruno. Per favore controlla la [guida per la partecipazione](contributing.md) + +Anche se non sei in grado di contribuire tramite il codice, non esitare a segnalare bug e richieste di funzionalità che devono essere implementati per risolvere il tuo caso d'uso. + +### Autori + + + +### Resta in contatto 🌐 + +[𝕏 (Twitter)](https://twitter.com/use_bruno)
+[Sito internet](https://www.usebruno.com)
+[Discord](https://discord.com/invite/KgcZUncpjq)
+[LinkedIn](https://www.linkedin.com/company/usebruno) + +### Marchio + +**Nome** + +`Bruno` è un marchio registrato appartenente a [Anoop M D](https://www.helloanoop.com/) + +**Logo** + +Il logo è stato creato da [OpenMoji](https://openmoji.org/library/emoji-1F436/). Licenza: CC [BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) + +### Licenza 📄 + +[MIT](license.md) diff --git a/readme.md b/readme.md index 96a9d7c8..9e6734fc 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ [![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** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) +**English** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) | [Italiano](docs/readme/readme_it.md) Bruno is a new and innovative API client, aimed at revolutionizing the status quo represented by Postman and similar tools out there. From 435847081dfe310a11ae537b67bec7fbe60980ce Mon Sep 17 00:00:00 2001 From: Adarsh Lilha Date: Wed, 8 Nov 2023 15:47:46 +0530 Subject: [PATCH 16/45] make value field nullable --- .../EnvironmentDetails/EnvironmentVariables/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js index 9a8be422..ba6b0e9e 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js @@ -32,7 +32,7 @@ const EnvironmentVariables = ({ environment, collection }) => { secret: Yup.boolean(), type: Yup.string(), uid: Yup.string(), - value: Yup.string().trim() + value: Yup.string().trim().nullable() }) ), onSubmit: (values) => { @@ -114,7 +114,7 @@ const EnvironmentVariables = ({ environment, collection }) => { className="mousetrap" id={`${index}.name`} name={`${index}.name`} - value={formik.values[index].name} + value={variable.name} onChange={formik.handleChange} /> From af0d4d26bba1292bdf187679b01691680400518a Mon Sep 17 00:00:00 2001 From: n00o Date: Wed, 8 Nov 2023 08:49:03 -0500 Subject: [PATCH 17/45] Add Autocomplete + JSON/JavaScript Linting Add JavaScript Autocomplete with all built-in Bruno functions. Add code linting markers for JSON and JavaScript CodeMirror sections. Add a few hotkeys to improve code editing. --- package-lock.json | 459 +++++++++++++++++- packages/bruno-app/package.json | 4 + .../src/components/CodeEditor/index.js | 102 +++- packages/bruno-app/src/pages/Bruno/index.js | 3 + 4 files changed, 559 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1e84508..cf7f115a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6459,6 +6459,18 @@ "node": ">= 10.0" } }, + "node_modules/cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", + "dependencies": { + "exit": "0.1.2", + "glob": "^7.1.1" + }, + "engines": { + "node": ">=0.2.5" + } + }, "node_modules/cli-boxes": { "version": "2.2.1", "dev": true, @@ -6834,6 +6846,14 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", + "dependencies": { + "date-now": "^0.1.4" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "license": "MIT", @@ -7211,6 +7231,11 @@ "node": ">=0.10" } }, + "node_modules/date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==" + }, "node_modules/debounce-fn": { "version": "4.0.0", "license": "MIT", @@ -8175,7 +8200,6 @@ }, "node_modules/exit": { "version": "0.1.2", - "dev": true, "engines": { "node": ">= 0.8.0" } @@ -8424,6 +8448,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/file": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/file/-/file-0.2.2.tgz", + "integrity": "sha512-gwabMtChzdnpDJdPEpz8Vr/PX0pU85KailuPV71Zw/un5yJVKvzukhB3qf6O3lnTwIe5CxlMYLh3jOK3w5xrLA==" + }, "node_modules/file-dialog": { "version": "0.0.8", "license": "MIT" @@ -9190,6 +9219,14 @@ "node": ">=0.10.0" } }, + "node_modules/has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha512-kaNz5OTAYYmt646Hkqw50/qyxP2vFnTVu5AQ1Zmk22Kk5+4Qx6BpO8+u7IKsML5fOsFk0ZT0AcCJNYwcvaLBvw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "license": "MIT", @@ -9513,8 +9550,9 @@ }, "node_modules/husky": { "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true, - "license": "MIT", "bin": { "husky": "lib/bin.js" }, @@ -10899,6 +10937,133 @@ "node": ">=4" } }, + "node_modules/jshint": { + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", + "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", + "dependencies": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.21", + "minimatch": "~3.0.2", + "strip-json-comments": "1.0.x" + }, + "bin": { + "jshint": "bin/jshint" + } + }, + "node_modules/jshint/node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/jshint/node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/jshint/node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/jshint/node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "node_modules/jshint/node_modules/domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/jshint/node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/jshint/node_modules/entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==" + }, + "node_modules/jshint/node_modules/htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", + "dependencies": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "node_modules/jshint/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/jshint/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jshint/node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/jshint/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "node_modules/jshint/node_modules/strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", + "bin": { + "strip-json-comments": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/json-buffer": { "version": "3.0.0", "dev": true, @@ -10950,6 +11115,21 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonlint": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/jsonlint/-/jsonlint-1.6.3.tgz", + "integrity": "sha512-jMVTMzP+7gU/IyC6hvKyWpUU8tmTkK5b3BPNuMI9U8Sit+YAWLlZwB6Y6YrdCxfg2kNz05p3XY3Bmm4m26Nv3A==", + "dependencies": { + "JSV": "^4.0.x", + "nomnom": "^1.5.x" + }, + "bin": { + "jsonlint": "lib/cli.js" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/jsprim": { "version": "1.4.2", "dev": true, @@ -10982,6 +11162,14 @@ "extsprintf": "^1.2.0" } }, + "node_modules/JSV": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz", + "integrity": "sha512-ZJ6wx9xaKJ3yFUhq5/sk82PJMuUyLk277I8mQeyDgCTjGdjWJIvPfaU5LIXaMuaN2UO1X3kZH4+lgphublZUHw==", + "engines": { + "node": "*" + } + }, "node_modules/kew": { "version": "0.7.0", "dev": true, @@ -11874,6 +12062,48 @@ "node": ">= 16.0.0" } }, + "node_modules/nomnom": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", + "integrity": "sha512-5s0JxqhDx9/rksG2BTMVN1enjWSvPidpoSgViZU4ZXULyTe+7jxcCRLB6f42Z0l1xYJpleCBtSyY6Lwg3uu5CQ==", + "deprecated": "Package no longer supported. Contact support@npmjs.com for more info.", + "dependencies": { + "chalk": "~0.4.0", + "underscore": "~1.6.0" + } + }, + "node_modules/nomnom/node_modules/ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha512-3iF4FIKdxaVYT3JqQuY3Wat/T2t7TRbbQ94Fu50ZUCbLy4TFbTzr90NOHQodQkNqmeEGCw8WbeP78WNi6SKYUA==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/nomnom/node_modules/chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha512-sQfYDlfv2DGVtjdoQqxS0cEZDroyG8h6TamA6rvxwlrU5BaSLDx9xhatBYl2pxZ7gmpNaPFVwBtdGdu5rQ+tYQ==", + "dependencies": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/nomnom/node_modules/strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha512-behete+3uqxecWlDAm5lmskaSaISA+ThQ4oNNBDTBJt0x2ppR6IPqfZNuj6BLaLJ/Sji4TPZlcRyOis8wXQTLg==", + "bin": { + "strip-ansi": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/normalize-package-data": { "version": "2.5.0", "dev": true, @@ -15370,6 +15600,14 @@ "node": ">= 10" } }, + "node_modules/system": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/system/-/system-2.0.1.tgz", + "integrity": "sha512-BwSUSa8LMHZouGadZ34ck3TsrH5s3oMmTKPK+xHdbBnTCZOZMJ38fHGKLAHkBl0PXru1Z4BsymQU4qqvTxWzdQ==", + "bin": { + "jscat": "bundle.js" + } + }, "node_modules/tailwindcss": { "version": "2.2.19", "license": "MIT", @@ -15927,6 +16165,11 @@ "node": ">=0.8.0" } }, + "node_modules/underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha512-z4o1fvKUojIWh9XuaVLUDdf86RQiq13AC1dmHbTpoyuu+bquHms76v16CjycCbec87J7z0k//SiQVk0sMdFmpQ==" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "dev": true, @@ -16729,6 +16972,7 @@ "codemirror-graphql": "^1.2.5", "cookie": "^0.6.0", "escape-html": "^1.0.3", + "file": "^0.2.2", "file-dialog": "^0.0.8", "file-saver": "^2.0.5", "formik": "^2.2.9", @@ -16741,6 +16985,8 @@ "idb": "^7.0.0", "immer": "^9.0.15", "jsesc": "^3.0.2", + "jshint": "^2.13.6", + "jsonlint": "^1.6.3", "know-your-http-well": "^0.5.0", "lodash": "^4.17.21", "markdown-it": "^13.0.2", @@ -16763,6 +17009,7 @@ "react-tooltip": "^5.5.2", "sass": "^1.46.0", "styled-components": "^5.3.3", + "system": "^2.0.1", "tailwindcss": "^2.2.19", "url": "^0.11.3", "xml-formatter": "^3.5.0", @@ -20917,6 +21164,7 @@ "cross-env": "^7.0.3", "css-loader": "^6.5.1", "escape-html": "^1.0.3", + "file": "^0.2.2", "file-dialog": "^0.0.8", "file-loader": "^6.2.0", "file-saver": "^2.0.5", @@ -20932,6 +21180,8 @@ "idb": "^7.0.0", "immer": "^9.0.15", "jsesc": "^3.0.2", + "jshint": "^2.13.6", + "jsonlint": "^1.6.3", "know-your-http-well": "^0.5.0", "lodash": "^4.17.21", "markdown-it": "^13.0.2", @@ -20957,12 +21207,13 @@ "sass": "^1.46.0", "style-loader": "^3.3.1", "styled-components": "^5.3.3", + "system": "^2.0.1", "tailwindcss": "^2.2.19", "url": "^0.11.3", "webpack": "^5.64.4", "webpack-cli": "^4.9.1", "xml-formatter": "^3.5.0", - "yargs-parser": "*", + "yargs-parser": "^21.1.1", "yup": "^0.32.11" }, "dependencies": { @@ -22393,6 +22644,15 @@ "source-map": "~0.6.0" } }, + "cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", + "requires": { + "exit": "0.1.2", + "glob": "^7.1.1" + } + }, "cli-boxes": { "version": "2.2.1", "dev": true @@ -22634,6 +22894,14 @@ } } }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", + "requires": { + "date-now": "^0.1.4" + } + }, "content-disposition": { "version": "0.5.4", "requires": { @@ -22869,6 +23137,11 @@ "assert-plus": "^1.0.0" } }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==" + }, "debounce-fn": { "version": "4.0.0", "requires": { @@ -23505,8 +23778,7 @@ "dev": true }, "exit": { - "version": "0.1.2", - "dev": true + "version": "0.1.2" }, "expect": { "version": "29.3.1", @@ -23680,6 +23952,11 @@ } } }, + "file": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/file/-/file-0.2.2.tgz", + "integrity": "sha512-gwabMtChzdnpDJdPEpz8Vr/PX0pU85KailuPV71Zw/un5yJVKvzukhB3qf6O3lnTwIe5CxlMYLh3jOK3w5xrLA==" + }, "file-dialog": { "version": "0.0.8" }, @@ -24172,6 +24449,11 @@ } } }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha512-kaNz5OTAYYmt646Hkqw50/qyxP2vFnTVu5AQ1Zmk22Kk5+4Qx6BpO8+u7IKsML5fOsFk0ZT0AcCJNYwcvaLBvw==" + }, "has-flag": { "version": "4.0.0" }, @@ -24371,6 +24653,8 @@ }, "husky": { "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true }, "icon-gen": { @@ -25235,6 +25519,116 @@ "jsesc": { "version": "2.5.2" }, + "jshint": { + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", + "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", + "requires": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.21", + "minimatch": "~3.0.2", + "strip-json-comments": "1.0.x" + }, + "dependencies": { + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==" + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", + "requires": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==" + } + } + }, "json-buffer": { "version": "3.0.0", "dev": true @@ -25267,6 +25661,15 @@ "universalify": "^2.0.0" } }, + "jsonlint": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/jsonlint/-/jsonlint-1.6.3.tgz", + "integrity": "sha512-jMVTMzP+7gU/IyC6hvKyWpUU8tmTkK5b3BPNuMI9U8Sit+YAWLlZwB6Y6YrdCxfg2kNz05p3XY3Bmm4m26Nv3A==", + "requires": { + "JSV": "^4.0.x", + "nomnom": "^1.5.x" + } + }, "jsprim": { "version": "1.4.2", "dev": true, @@ -25292,6 +25695,11 @@ } } }, + "JSV": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz", + "integrity": "sha512-ZJ6wx9xaKJ3yFUhq5/sk82PJMuUyLk277I8mQeyDgCTjGdjWJIvPfaU5LIXaMuaN2UO1X3kZH4+lgphublZUHw==" + }, "kew": { "version": "0.7.0", "dev": true @@ -25854,6 +26262,37 @@ "tv4": "^1.3.0" } }, + "nomnom": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", + "integrity": "sha512-5s0JxqhDx9/rksG2BTMVN1enjWSvPidpoSgViZU4ZXULyTe+7jxcCRLB6f42Z0l1xYJpleCBtSyY6Lwg3uu5CQ==", + "requires": { + "chalk": "~0.4.0", + "underscore": "~1.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha512-3iF4FIKdxaVYT3JqQuY3Wat/T2t7TRbbQ94Fu50ZUCbLy4TFbTzr90NOHQodQkNqmeEGCw8WbeP78WNi6SKYUA==" + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha512-sQfYDlfv2DGVtjdoQqxS0cEZDroyG8h6TamA6rvxwlrU5BaSLDx9xhatBYl2pxZ7gmpNaPFVwBtdGdu5rQ+tYQ==", + "requires": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha512-behete+3uqxecWlDAm5lmskaSaISA+ThQ4oNNBDTBJt0x2ppR6IPqfZNuj6BLaLJ/Sji4TPZlcRyOis8wXQTLg==" + } + } + }, "normalize-package-data": { "version": "2.5.0", "dev": true, @@ -28056,6 +28495,11 @@ } } }, + "system": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/system/-/system-2.0.1.tgz", + "integrity": "sha512-BwSUSa8LMHZouGadZ34ck3TsrH5s3oMmTKPK+xHdbBnTCZOZMJ38fHGKLAHkBl0PXru1Z4BsymQU4qqvTxWzdQ==" + }, "tailwindcss": { "version": "2.2.19", "requires": { @@ -28406,6 +28850,11 @@ "version": "3.17.4", "optional": true }, + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha512-z4o1fvKUojIWh9XuaVLUDdf86RQiq13AC1dmHbTpoyuu+bquHms76v16CjycCbec87J7z0k//SiQVk0sMdFmpQ==" + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "dev": true diff --git a/packages/bruno-app/package.json b/packages/bruno-app/package.json index d5ba0b1a..eef5e518 100644 --- a/packages/bruno-app/package.json +++ b/packages/bruno-app/package.json @@ -26,6 +26,7 @@ "codemirror-graphql": "^1.2.5", "cookie": "^0.6.0", "escape-html": "^1.0.3", + "file": "^0.2.2", "file-dialog": "^0.0.8", "file-saver": "^2.0.5", "formik": "^2.2.9", @@ -38,6 +39,8 @@ "idb": "^7.0.0", "immer": "^9.0.15", "jsesc": "^3.0.2", + "jshint": "^2.13.6", + "jsonlint": "^1.6.3", "know-your-http-well": "^0.5.0", "lodash": "^4.17.21", "markdown-it": "^13.0.2", @@ -60,6 +63,7 @@ "react-tooltip": "^5.5.2", "sass": "^1.46.0", "styled-components": "^5.3.3", + "system": "^2.0.1", "tailwindcss": "^2.2.19", "url": "^0.11.3", "xml-formatter": "^3.5.0", diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index 0bfd6fdd..29f3dbc1 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -10,12 +10,83 @@ import isEqual from 'lodash/isEqual'; import { getEnvironmentVariables } from 'utils/collections'; import { defineCodeMirrorBrunoVariablesMode } from 'utils/common/codemirror'; import StyledWrapper from './StyledWrapper'; +import jsonlint from 'jsonlint'; +import { JSHINT } from 'jshint'; let CodeMirror; const SERVER_RENDERED = typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true; if (!SERVER_RENDERED) { CodeMirror = require('codemirror'); + window.jsonlint = jsonlint; + window.JSHINT = JSHINT; + //This should be done dynamically if possible + const hintWords = [ + 'res', + 'res.status', + 'res.statusText', + 'res.headers', + 'res.body', + 'res.getStatus()', + 'res.getHeader(name)', + 'res.getHeaders()', + 'res.getBody()', + 'req', + 'req.url', + 'req.method', + 'req.headers', + 'req.body', + 'req.timeout', + 'req.getUrl()', + 'req.setUrl(url)', + 'req.getMethod()', + 'req.setMethod(method)', + 'req.getHeader(name)', + 'req.getHeaders()', + 'req.setHeader(name, value)', + 'req.setHeaders(data)', + 'req.getBody()', + 'req.setBody(data)', + 'req.setMaxRedirects(maxRedirects)', + 'req.getTimeout()', + 'req.setTimeout(timeout)', + 'bru', + 'bru.cwd()', + 'bru.getEnvName(key)', + 'bru.getProcessEnv(key)', + 'bru.getEnvVar(key)', + 'bru.setEnvVar(key,value)', + 'bru.getVar(key)', + 'bru.setVar(key,value)' + ]; + CodeMirror.registerHelper('hint', 'brunoJS', (editor, options) => { + const cursor = editor.getCursor(); + const currentLine = editor.getLine(cursor.line); + let startBru = cursor.ch; + let endBru = startBru; + while (endBru < currentLine.length && /[\w.]/.test(currentLine.charAt(endBru))) ++endBru; + while (startBru && /[\w.]/.test(currentLine.charAt(startBru - 1))) --startBru; + let curWordBru = startBru != endBru && currentLine.slice(startBru, endBru); + + let start = cursor.ch; + let end = start; + while (end < currentLine.length && /[\w]/.test(currentLine.charAt(end))) ++end; + while (start && /[\w]/.test(currentLine.charAt(start - 1))) --start; + const jsHinter = CodeMirror.hint.javascript; + let result = jsHinter(editor) || { list: [] }; + result.to = CodeMirror.Pos(cursor.line, end); + result.from = CodeMirror.Pos(cursor.line, start); + hintWords.forEach((h) => { + if (h.includes('.') == curWordBru.includes('.') && h.startsWith(curWordBru)) { + result.list.push(curWordBru.includes('.') ? h.split('.')[1] : h); + } + }); + result.list = result.list?.sort(); + return result; + }); + CodeMirror.commands.autocomplete = (cm, hint, options) => { + cm.showHint({ hint, ...options }); + }; } export default class CodeEditor extends React.Component { @@ -41,7 +112,10 @@ export default class CodeEditor extends React.Component { matchBrackets: true, showCursorWhenSelecting: true, foldGutter: true, - gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'], + gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'CodeMirror-lint-markers'], + lint: { + esversion: 11 + }, readOnly: this.props.readOnly, scrollbarStyle: 'overlay', theme: this.props.theme === 'dark' ? 'monokai' : 'default', @@ -68,9 +142,10 @@ export default class CodeEditor extends React.Component { }, 'Cmd-F': 'findPersistent', 'Ctrl-F': 'findPersistent', - Tab: function (cm) { - cm.replaceSelection(' ', 'end'); - }, + 'Cmd-H': 'replace', + 'Ctrl-H': 'replace', + Tab: 'indentMore', + 'Shift-Tab': 'indentLess', 'Ctrl-Y': 'foldAll', 'Cmd-Y': 'foldAll', 'Ctrl-I': 'unfoldAll', @@ -106,6 +181,25 @@ export default class CodeEditor extends React.Component { editor.on('change', this._onEdit); this.addOverlay(); } + if (this.props.mode == 'javascript') { + editor.on('keyup', function (cm, event) { + const cursor = editor.getCursor(); + const currentLine = editor.getLine(cursor.line); + let start = cursor.ch; + let end = start; + while (end < currentLine.length && /[\w\."'\/`]/.test(currentLine.charAt(end))) ++end; + while (start && /[\w\."'\/`]/.test(currentLine.charAt(start - 1))) --start; + let curWord = start != end && currentLine.slice(start, end); + //Qualify if autocomplete will be shown + if ( + /^(?!Shift|Tab|Enter|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|\s)\w*/.test(event.key) && + curWord.length > 1 && + /^(?!"'\d`)[a-zA-Z\.]/.test(curWord) + ) { + CodeMirror.commands.autocomplete(cm, CodeMirror.hint.brunoJS, { completeSingle: false }); + } + }); + } } componentDidUpdate(prevProps) { diff --git a/packages/bruno-app/src/pages/Bruno/index.js b/packages/bruno-app/src/pages/Bruno/index.js index f899933b..75b07f0f 100644 --- a/packages/bruno-app/src/pages/Bruno/index.js +++ b/packages/bruno-app/src/pages/Bruno/index.js @@ -22,8 +22,11 @@ if (!SERVER_RENDERED) { require('codemirror/addon/fold/brace-fold'); require('codemirror/addon/fold/foldgutter'); require('codemirror/addon/fold/xml-fold'); + require('codemirror/addon/hint/javascript-hint'); require('codemirror/addon/hint/show-hint'); require('codemirror/addon/lint/lint'); + require('codemirror/addon/lint/javascript-lint'); + require('codemirror/addon/lint/json-lint'); require('codemirror/addon/mode/overlay'); require('codemirror/addon/scroll/simplescrollbars'); require('codemirror/addon/search/jump-to-line'); From 50d8577298760b28e1f866164970ed85ae1a4aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAnior=20Sbrissa?= Date: Wed, 8 Nov 2023 14:23:19 -0300 Subject: [PATCH 18/45] docs: add readme pt br translation --- docs/readme/readme_pt_br.md | 121 ++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 docs/readme/readme_pt_br.md diff --git a/docs/readme/readme_pt_br.md b/docs/readme/readme_pt_br.md new file mode 100644 index 00000000..edc47d5e --- /dev/null +++ b/docs/readme/readme_pt_br.md @@ -0,0 +1,121 @@ +
+ + +### Bruno - IDE de código aberto para explorar e testar APIs. + +[![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/unit-tests.yml/badge.svg?branch=main)](https://github.com/usebruno/bruno/workflows/unit-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) + +Bruno é um novo e inovador cliente de API, com o objetivo de revolucionar o status quo representado por ferramentas como o Postman e outras semelhantes. + +Bruno armazena suas coleções diretamente em uma pasta no seu sistema de arquivos. Utilizamos uma linguagem de marcação de texto simples, chamada Bru, para salvar informações sobre requisições de API. + +Você pode usar o Git ou qualquer sistema de controle de versão de sua escolha para colaborar em suas coleções de API. + +Bruno é totalmente offline. Não há planos de adicionar sincronização em nuvem ao Bruno, nunca. Valorizamos a privacidade de seus dados e acreditamos que eles devem permanecer em seu dispositivo. Saiba mais sobre nossa visão a longo prazo [aqui](https://github.com/usebruno/bruno/discussions/269). + +📢 Assista à nossa palestra recente na India FOSS 3.0 Conference [aqui](https://www.youtube.com/watch?v=7bSMFpbcPiY). + +![bruno](../../assets/images/landing-2.png)

+ +### Instalação + +Bruno está disponível para download como binário [em nosso site](https://www.usebruno.com/downloads) para Mac, Windows e Linux. + +Você também pode instalar o Bruno via gerenciadores de pacotes como Homebrew, Chocolatey, Snap e Apt. + +```sh +# Mac via Homebrew +brew install bruno + +# Windows via Chocolatey +choco install bruno + +# Linux via Snap +snap install bruno + +# 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 [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 +``` + +### Execute em várias plataformas 🖥️ + +![bruno](../../assets/images/run-anywhere.png)

+ +### Colaboração via Git 👩‍💻🧑‍💻 + +Ou qualquer sistema de controle de versão de sua escolha. + +![bruno](../../assets/images/version-control.png)

+ +### Links Importantes 📌 + +- [Nossa Visão de Longo Prazo](https://github.com/usebruno/bruno/discussions/269) +- [Roadmap](https://github.com/usebruno/bruno/discussions/384) +- [Documentação](https://docs.usebruno.com) +- [Website](https://www.usebruno.com) +- [Preços](https://www.usebruno.com/pricing) +- [Download](https://www.usebruno.com/downloads) + +### Showcase 🎥 + +- [Depoimentos](https://github.com/usebruno/bruno/discussions/343) +- [Hub de Conhecimento](https://github.com/usebruno/bruno/discussions/386) +- [Scriptmania](https://github.com/usebruno/bruno/discussions/385) + +### Apoie ❤️ + +Au-au! Se você gosta do projeto, clique no botão ⭐!! + +### Compartilhe sua experiência 📣 + +Se o Bruno ajudou no seu trabalho e/ou no trabalho de sua equipe, por favor, não se esqueça de compartilhar seu [depoimento em nossas discussões no GitHub](https://github.com/usebruno/bruno/discussions/343). + +### Publicando em Novos Gerenciadores de Pacotes + +Por favor, verifique [aqui](../publishing/publishing_pt_br.md) mais informações. + +### Colabore 👩‍💻🧑‍💻 + +Fico feliz que você queira melhorar o Bruno. Por favor, confira o [guia de colaboração](../contributing/contributing_pt_br.md). + +Mesmo que você não possa contribuir codificando, não deixe de relatar problemas e solicitar recursos que precisam ser implementados para atender ao contexto de seu dia a dia. + +### Authors + + + +### Mantenha Contato 🌐 + +[𝕏 (Twitter)](https://twitter.com/use_bruno)
+[Website](https://www.usebruno.com)
+[Discord](https://discord.com/invite/KgcZUncpjq)
+[LinkedIn](https://www.linkedin.com/company/usebruno) + +### Trademark + +**Nome** + +`Bruno` é uma marca registrada de [Anoop M D](https://www.helloanoop.com/). + +**Logo** + +A logo é original do [OpenMoji](https://openmoji.org/library/emoji-1F436/). Licença: CC [BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). + +### Licença 📄 + +[MIT](license.md) From 159f39dd18637bb697f9dee949537f4007073785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAnior=20Sbrissa?= Date: Wed, 8 Nov 2023 17:22:26 -0300 Subject: [PATCH 19/45] docs: add contributing pt br translation --- docs/contributing/contributing_pt_br.md | 87 +++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 docs/contributing/contributing_pt_br.md diff --git a/docs/contributing/contributing_pt_br.md b/docs/contributing/contributing_pt_br.md new file mode 100644 index 00000000..46d20f18 --- /dev/null +++ b/docs/contributing/contributing_pt_br.md @@ -0,0 +1,87 @@ +## Vamos tornar o Bruno melhor, juntos!! + +Estamos felizes que você queira ajudar a melhorar o Bruno. Abaixo estão as diretrizes e orientações para começar a executar o Bruno no seu computador. + +### Stack de Tecnologias + +O Bruno é construído usando Next.js e React. Também usamos o Electron para disponibilizar uma versão para desktop (que suporta coleções locais). + +Bibliotecas que utilizamos: + +Libraries we use + +- CSS - Tailwind +- Editor de Código - Codemirror +- Gerenciador de Estado - Redux +- Ícones - Tabler Icons +- Formulários - formik +- Validador de Schema - Yup +- Cliente de Requisições - axios +- Monitor de Arquivos - chokidar + +### Dependências + +Você precisará do [Node v18.x (ou da versão LTS mais recente)](https://nodejs.org/en/) e do npm na versão 8.x. Nós utilizamos npm workspaces no projeto. + +## Desenvolvimento + +Bruno está sendo desenvolvido como um aplicativo de desktop. Você precisa carregar o aplicativo executando o aplicativo Next.js em um terminal e, em seguida, executar o aplicativo Electron em outro terminal. + +### Dependências + +- NodeJS v18 + +### Desenvolvimento Local + +```bash +# use nodejs 18 version +nvm use + +# install deps +npm i --legacy-peer-deps + +# build graphql docs +npm run build:graphql-docs + +# build bruno query +npm run build:bruno-query + +# run next app (terminal 1) +npm run dev:web + +# run electron app (terminal 2) +npm run dev:electron +``` + +### Troubleshooting + +Você pode se deparar com o erro `Unsupported platform` ao executar o comando `npm install`. Para corrigir isso, você precisará excluir a pasta `node_modules` e o arquivo `package-lock.json` e, em seguida, executar o comando `npm install` novamente. Isso deve instalar todos os pacotes necessários para executar o aplicativo. + +```shell +# delete node_modules in sub-directories +find ./ -type d -name "node_modules" -print0 | while read -d $'\0' dir; do + rm -rf "$dir" +done + +# delete package-lock in sub-directories +find . -type f -name "package-lock.json" -delete +``` + +### Testando + +```bash +# bruno-schema +npm test --workspace=packages/bruno-schema + +# bruno-lang +npm test --workspace=packages/bruno-lang +``` + +### Envio de Pull Request + +- Por favor, mantenha os PRs pequenos e focados em uma única coisa. +- Siga o formato de criação de branches. + - feature/[nome da funcionalidade]: Esta branch deve conter alterações para uma funcionalidade específica. + - Exemplo: feature/dark-mode + - bugfix/[nome do bug]: Esta branch deve conter apenas correções para um bug específico. + - Exemplo: bugfix/bug-1 From 35a4d46dc51031f5c250279f5a4cc6be786e2668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAnior=20Sbrissa?= Date: Wed, 8 Nov 2023 17:35:49 -0300 Subject: [PATCH 20/45] docs: add publishing pt br translation --- docs/publishing/publishing_pt_br.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/publishing/publishing_pt_br.md diff --git a/docs/publishing/publishing_pt_br.md b/docs/publishing/publishing_pt_br.md new file mode 100644 index 00000000..13d414a4 --- /dev/null +++ b/docs/publishing/publishing_pt_br.md @@ -0,0 +1,5 @@ +### Publicando Bruno em um novo gerenciador de pacotes + +Embora nosso código seja de código aberto e esteja disponível para todos usarem, pedimos gentilmente que entre em contato conosco antes de considerar a publicação em novos gerenciadores de pacotes. Como o criador da ferramenta, mantenho a marca registrada `Bruno` para este projeto e gostaria de gerenciar sua distribuição. Se deseja ver o Bruno em um novo gerenciador de pacotes, por favor, crie uma solicitação através de uma issue no GitHub. + +Embora a maioria de nossas funcionalidades seja gratuita e de código aberto (o que abrange API's REST e GraphQL), buscamos alcançar um equilíbrio harmonioso entre os princípios de código aberto e sustentabilidade. - https://github.com/usebruno/bruno/discussions/269 From 86553464cc6bf2a39a234eaaa695c5c2de698e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Sch=C3=B6nefeldt?= Date: Wed, 8 Nov 2023 22:19:09 +0100 Subject: [PATCH 21/45] https://github.com/usebruno/bruno/discussions/865: Added ahint to the stackoverflow tag to teh readme --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 96a9d7c8..d6c4db46 100644 --- a/readme.md +++ b/readme.md @@ -65,6 +65,7 @@ Or any version control system of your choice - [Our Long Term Vision](https://github.com/usebruno/bruno/discussions/269) - [Roadmap](https://github.com/usebruno/bruno/discussions/384) - [Documentation](https://docs.usebruno.com) +- [stackoverflow](https://stackoverflow.com/questions/tagged/bruno) - [Website](https://www.usebruno.com) - [Pricing](https://www.usebruno.com/pricing) - [Download](https://www.usebruno.com/downloads) From 07a9d4645f6b18a6b13717296b032c0c1f967299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAnior=20Sbrissa?= Date: Wed, 8 Nov 2023 21:57:43 -0300 Subject: [PATCH 22/45] docs: review pt br translation and add reference links --- contributing.md | 2 +- docs/contributing/contributing_pt_br.md | 4 +--- docs/publishing/publishing_pt_br.md | 2 +- publishing.md | 2 ++ readme.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contributing.md b/contributing.md index 0d6efdff..5c0b8bb2 100644 --- a/contributing.md +++ b/contributing.md @@ -1,4 +1,4 @@ -**English** | [Українська](docs/contributing/contributing_ua.md) | [Русский](docs/contributing/contributing_ru.md) | [Türkçe](docs/contributing/contributing_tr.md) | [Deutsch](docs/contributing/contributing_de.md) | [Français](docs/contributing/contributing_fr.md) +**English** | [Українська](docs/contributing/contributing_ua.md) | [Русский](docs/contributing/contributing_ru.md) | [Türkçe](docs/contributing/contributing_tr.md) | [Deutsch](docs/contributing/contributing_de.md) | [Français](docs/contributing/contributing_fr.md) | [Português (BR)](docs/contributing/contributing_pt_br.md) ## Let's make bruno better, together !! diff --git a/docs/contributing/contributing_pt_br.md b/docs/contributing/contributing_pt_br.md index 46d20f18..7f7baabb 100644 --- a/docs/contributing/contributing_pt_br.md +++ b/docs/contributing/contributing_pt_br.md @@ -8,8 +8,6 @@ O Bruno é construído usando Next.js e React. Também usamos o Electron para di Bibliotecas que utilizamos: -Libraries we use - - CSS - Tailwind - Editor de Código - Codemirror - Gerenciador de Estado - Redux @@ -25,7 +23,7 @@ Você precisará do [Node v18.x (ou da versão LTS mais recente)](https://nodejs ## Desenvolvimento -Bruno está sendo desenvolvido como um aplicativo de desktop. Você precisa carregar o aplicativo executando o aplicativo Next.js em um terminal e, em seguida, executar o aplicativo Electron em outro terminal. +Bruno está sendo desenvolvido como um aplicativo de desktop. Você precisa carregar o programa executando o aplicativo Next.js em um terminal e, em seguida, executar o aplicativo Electron em outro terminal. ### Dependências diff --git a/docs/publishing/publishing_pt_br.md b/docs/publishing/publishing_pt_br.md index 13d414a4..b3d580ee 100644 --- a/docs/publishing/publishing_pt_br.md +++ b/docs/publishing/publishing_pt_br.md @@ -1,5 +1,5 @@ ### Publicando Bruno em um novo gerenciador de pacotes -Embora nosso código seja de código aberto e esteja disponível para todos usarem, pedimos gentilmente que entre em contato conosco antes de considerar a publicação em novos gerenciadores de pacotes. Como o criador da ferramenta, mantenho a marca registrada `Bruno` para este projeto e gostaria de gerenciar sua distribuição. Se deseja ver o Bruno em um novo gerenciador de pacotes, por favor, crie uma solicitação através de uma issue no GitHub. +Embora nosso código seja de código aberto e esteja disponível para todos usarem, pedimos gentilmente que entre em contato conosco antes de considerar a publicação em novos gerenciadores de pacotes. Como o criador da ferramenta, mantenho a marca registrada `Bruno` para este projeto e gostaria de gerenciar sua distribuição. Se deseja ver o Bruno em um novo gerenciador de pacotes, por favor, solicite através de uma issue no GitHub. Embora a maioria de nossas funcionalidades seja gratuita e de código aberto (o que abrange API's REST e GraphQL), buscamos alcançar um equilíbrio harmonioso entre os princípios de código aberto e sustentabilidade. - https://github.com/usebruno/bruno/discussions/269 diff --git a/publishing.md b/publishing.md index 430baa94..0d23e1f3 100644 --- a/publishing.md +++ b/publishing.md @@ -1,3 +1,5 @@ +**English** | [Português (BR)](docs/publishing/publishing_pt_br.md) + ### Publishing Bruno to a new package manager While our code is open source and available for everyone to use, we kindly request that you reach out to us before considering publication on new package managers. As the creator of Bruno, I hold the trademark `Bruno` for this project and would like to manage its distribution. If you'd like to see Bruno on a new package manager, please raise a GitHub issue. diff --git a/readme.md b/readme.md index 96a9d7c8..0e3a13bd 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ [![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** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) +**English** | [Українська](docs/readme/readme_ua.md) | [Русский](docs/readme/readme_ru.md) | [Türkçe](docs/readme/readme_tr.md) | [Deutsch](docs/readme/readme_de.md) | [Français](docs/readme/readme_fr.md) | [Português (BR)](docs/readme/readme_pt_br.md) Bruno is a new and innovative API client, aimed at revolutionizing the status quo represented by Postman and similar tools out there. From aab591cb126e8bdaabab3216149da1e9d7eae664 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Thu, 9 Nov 2023 13:20:07 +0530 Subject: [PATCH 23/45] feat(#338): switch to curl mode if a curl cmd is pasted in new request modal --- .../Sidebar/NewRequest/StyledWrapper.js | 4 +++ .../components/Sidebar/NewRequest/index.js | 27 ++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js index 72d1d8a9..9845bd2e 100644 --- a/packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js @@ -35,6 +35,10 @@ const StyledWrapper = styled.div` } } } + + textarea.curl-command { + min-height: 150px; + } `; export default StyledWrapper; diff --git a/packages/bruno-app/src/components/Sidebar/NewRequest/index.js b/packages/bruno-app/src/components/Sidebar/NewRequest/index.js index 43d91430..377e6bb7 100644 --- a/packages/bruno-app/src/components/Sidebar/NewRequest/index.js +++ b/packages/bruno-app/src/components/Sidebar/NewRequest/index.js @@ -1,4 +1,4 @@ -import React, { useRef, useEffect } from 'react'; +import React, { useRef, useEffect, useCallback } from 'react'; import { useFormik } from 'formik'; import * as Yup from 'yup'; import toast from 'react-hot-toast'; @@ -115,6 +115,25 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => { const onSubmit = () => formik.handleSubmit(); + const handlePaste = useCallback( + (event) => { + const clipboardData = event.clipboardData || window.clipboardData; + const pastedData = clipboardData.getData('Text'); + + // Check if pasted data looks like a cURL command + const curlCommandRegex = /^\s*curl\s/i; + if (curlCommandRegex.test(pastedData)) { + // Switch to the 'from-curl' request type + formik.setFieldValue('requestType', 'from-curl'); + formik.setFieldValue('curlCommand', pastedData); + + // Prevent the default paste behavior to avoid pasting into the textarea + event.preventDefault(); + } + }, + [formik] + ); + return ( @@ -174,7 +193,7 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => { Name { spellCheck="false" onChange={formik.handleChange} value={formik.values.requestUrl || ''} + onPaste={handlePaste} /> @@ -232,8 +252,7 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => { From a0196a01b3b04041befc41d277b7e65710b66b8b Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Thu, 9 Nov 2023 13:39:24 +0530 Subject: [PATCH 24/45] chore: bumped release version --- packages/bruno-app/src/components/Sidebar/index.js | 2 +- packages/bruno-electron/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/Sidebar/index.js b/packages/bruno-app/src/components/Sidebar/index.js index 0e6153f9..670d28d2 100644 --- a/packages/bruno-app/src/components/Sidebar/index.js +++ b/packages/bruno-app/src/components/Sidebar/index.js @@ -105,7 +105,7 @@ const Sidebar = () => { Star -
v1.1.0
+
v1.1.1
diff --git a/packages/bruno-electron/package.json b/packages/bruno-electron/package.json index 57dff832..d0c562a7 100644 --- a/packages/bruno-electron/package.json +++ b/packages/bruno-electron/package.json @@ -1,5 +1,5 @@ { - "version": "v1.1.0", + "version": "v1.1.1", "name": "bruno", "description": "Opensource API Client for Exploring and Testing APIs", "homepage": "https://www.usebruno.com", From 3e137ac6b4fe59b1b85f6a85a55b226a9e879c02 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Thu, 9 Nov 2023 13:47:33 +0530 Subject: [PATCH 25/45] fix: fixed failing test --- packages/bruno-app/src/utils/curl/curl-to-json.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/utils/curl/curl-to-json.spec.js b/packages/bruno-app/src/utils/curl/curl-to-json.spec.js index bf7d836d..c8f7d1c0 100644 --- a/packages/bruno-app/src/utils/curl/curl-to-json.spec.js +++ b/packages/bruno-app/src/utils/curl/curl-to-json.spec.js @@ -46,8 +46,8 @@ describe('curlToJson', () => { const result = curlToJson(curlCommand); expect(result).toEqual({ - url: '%27https://www.usebruno.com%27', - raw_url: "'https://www.usebruno.com'", + url: 'https://www.usebruno.com', + raw_url: 'https://www.usebruno.com', method: 'post', headers: { Accept: 'application/json, text/plain, */*', From ba761098be216e802399e8888974377fbe6bbe4b Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Thu, 9 Nov 2023 16:12:33 +0530 Subject: [PATCH 26/45] chore(#827): bumped bruno cli version to 1.1.0 --- packages/bruno-cli/changelog.md | 4 ++++ packages/bruno-cli/package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/bruno-cli/changelog.md b/packages/bruno-cli/changelog.md index adfa14c1..1d672930 100644 --- a/packages/bruno-cli/changelog.md +++ b/packages/bruno-cli/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 1.1.0 + +- Upgraded axios to 1.5.1 + ## 1.0.0 - Announcing Stable Release diff --git a/packages/bruno-cli/package.json b/packages/bruno-cli/package.json index 88c6eb91..d2aa710f 100644 --- a/packages/bruno-cli/package.json +++ b/packages/bruno-cli/package.json @@ -1,6 +1,6 @@ { "name": "@usebruno/cli", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "main": "src/index.js", "bin": { From 043b80171ef088959f041433c9783abcd192b738 Mon Sep 17 00:00:00 2001 From: Adarsh Lilha Date: Fri, 10 Nov 2023 03:27:17 +0530 Subject: [PATCH 27/45] fix headers in code generator --- .../GenerateCodeItem/CodeView/index.js | 3 ++- .../bruno-app/src/utils/codegenerator/har.js | 26 +++++++------------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js index 64c229ae..18734b28 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js @@ -9,10 +9,11 @@ const CodeView = ({ language, item }) => { const { storedTheme } = useTheme(); const preferences = useSelector((state) => state.app.preferences); const { target, client, language: lang } = language; + const headers = item.draft ? get(item, 'draft.request.headers') : get(item, 'request.headers'); let snippet = ''; try { - snippet = new HTTPSnippet(buildHarRequest(item.request)).convert(target, client); + snippet = new HTTPSnippet(buildHarRequest({ request: item.request, headers })).convert(target, client); } catch (e) { console.error(e); snippet = 'Error generating code snippet'; diff --git a/packages/bruno-app/src/utils/codegenerator/har.js b/packages/bruno-app/src/utils/codegenerator/har.js index b48fbc3c..e0e2b2a6 100644 --- a/packages/bruno-app/src/utils/codegenerator/har.js +++ b/packages/bruno-app/src/utils/codegenerator/har.js @@ -9,25 +9,17 @@ const createContentType = (mode) => { case 'multipartForm': return 'multipart/form-data'; default: - return 'application/json'; + return ''; } }; -const createHeaders = (headers, mode) => { - const contentType = createContentType(mode); - const headersArray = headers +const createHeaders = (headers) => { + return headers .filter((header) => header.enabled) - .map((header) => { - return { - name: header.name, - value: header.value - }; - }); - const headerNames = headersArray.map((header) => header.name); - if (!headerNames.includes('Content-Type')) { - return [...headersArray, { name: 'Content-Type', value: contentType }]; - } - return headersArray; + .map((header) => ({ + name: header.name, + value: header.value + })); }; const createQuery = (queryParams = []) => { @@ -56,13 +48,13 @@ const createPostData = (body) => { } }; -export const buildHarRequest = (request) => { +export const buildHarRequest = ({ request, headers }) => { return { method: request.method, url: request.url, httpVersion: 'HTTP/1.1', cookies: [], - headers: createHeaders(request.headers, request.body.mode), + headers: createHeaders(headers), queryString: createQuery(request.params), postData: createPostData(request.body), headersSize: 0, From 8ed88d42c0d1a9ddc7b59000893af315da9f0616 Mon Sep 17 00:00:00 2001 From: n00o Date: Fri, 10 Nov 2023 00:28:17 -0500 Subject: [PATCH 28/45] Fix Crashes and improve AutoComplete logic Fix crash when autocomplete pops up and then is deleted. Fix autocomplete from appearing inside interpolation or strings. Fix JSON linting when its empty and not lint when mode is undefined (Code Generation). Improve tab to indent on full line or multiple lines selected. --- .../src/components/CodeEditor/index.js | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index 29f3dbc1..565e3ec8 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -76,12 +76,14 @@ if (!SERVER_RENDERED) { let result = jsHinter(editor) || { list: [] }; result.to = CodeMirror.Pos(cursor.line, end); result.from = CodeMirror.Pos(cursor.line, start); - hintWords.forEach((h) => { - if (h.includes('.') == curWordBru.includes('.') && h.startsWith(curWordBru)) { - result.list.push(curWordBru.includes('.') ? h.split('.')[1] : h); - } - }); - result.list = result.list?.sort(); + if (curWordBru) { + hintWords.forEach((h) => { + if (h.includes('.') == curWordBru.includes('.') && h.startsWith(curWordBru)) { + result.list.push(curWordBru.includes('.') ? h.split('.')[1] : h); + } + }); + result.list?.sort(); + } return result; }); CodeMirror.commands.autocomplete = (cm, hint, options) => { @@ -113,9 +115,7 @@ export default class CodeEditor extends React.Component { showCursorWhenSelecting: true, foldGutter: true, gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'CodeMirror-lint-markers'], - lint: { - esversion: 11 - }, + lint: { esversion: 11 }, readOnly: this.props.readOnly, scrollbarStyle: 'overlay', theme: this.props.theme === 'dark' ? 'monokai' : 'default', @@ -144,8 +144,14 @@ export default class CodeEditor extends React.Component { 'Ctrl-F': 'findPersistent', 'Cmd-H': 'replace', 'Ctrl-H': 'replace', - Tab: 'indentMore', + Tab: function (cm) { + cm.getSelection().includes('\n') || editor.getLine(cm.getCursor().line) == cm.getSelection() + ? cm.execCommand('indentMore') + : cm.replaceSelection(' ', 'end'); + }, 'Shift-Tab': 'indentLess', + 'Ctrl-Space': 'autocomplete', + 'Cmd-Space': 'autocomplete', 'Ctrl-Y': 'foldAll', 'Cmd-Y': 'foldAll', 'Ctrl-I': 'unfoldAll', @@ -178,6 +184,7 @@ export default class CodeEditor extends React.Component { } })); if (editor) { + editor.setOption('lint', this.props.mode && editor.getValue().trim().length > 0 ? { esversion: 11 } : false); editor.on('change', this._onEdit); this.addOverlay(); } @@ -187,14 +194,15 @@ export default class CodeEditor extends React.Component { const currentLine = editor.getLine(cursor.line); let start = cursor.ch; let end = start; - while (end < currentLine.length && /[\w\."'\/`]/.test(currentLine.charAt(end))) ++end; - while (start && /[\w\."'\/`]/.test(currentLine.charAt(start - 1))) --start; + while (end < currentLine.length && /[^{}();\s\[\]\,]/.test(currentLine.charAt(end))) ++end; + while (start && /[^{}();\s\[\]\,]/.test(currentLine.charAt(start - 1))) --start; let curWord = start != end && currentLine.slice(start, end); //Qualify if autocomplete will be shown if ( /^(?!Shift|Tab|Enter|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|\s)\w*/.test(event.key) && - curWord.length > 1 && - /^(?!"'\d`)[a-zA-Z\.]/.test(curWord) + curWord.length > 0 && + !/\/\/|\/\*|.*{{|`[^$]*{|`[^{]*$/.test(currentLine.slice(0, end)) && + /(? { if (!this.ignoreChangeEvent && this.editor) { + this.editor.setOption('lint', this.editor.getValue().trim().length > 0 ? { esversion: 11 } : false); this.cachedValue = this.editor.getValue(); if (this.props.onEdit) { this.props.onEdit(this.cachedValue); From e1a74d0652ecb6b5828683f318f180ecebfb6ff1 Mon Sep 17 00:00:00 2001 From: Mirko Golze Date: Fri, 10 Nov 2023 21:20:30 +0100 Subject: [PATCH 29/45] #937, #921 improve evaluation of proxy configuration, allow empty proxy port --- .../CollectionSettings/ProxySettings/index.js | 14 ++++----- .../Preferences/ProxySettings/index.js | 10 +++---- .../src/runner/run-single-request.js | 7 +++-- .../bruno-electron/src/ipc/network/index.js | 30 +++++-------------- 4 files changed, 21 insertions(+), 40 deletions(-) diff --git a/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js b/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js index 2ed25b1e..c8ccb103 100644 --- a/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/ProxySettings/index.js @@ -11,22 +11,20 @@ const ProxySettings = ({ proxyConfig, onUpdate }) => { protocol: Yup.string().oneOf(['http', 'https', 'socks4', 'socks5']), hostname: Yup.string() .when('enabled', { - is: true, + is: 'true', then: (hostname) => hostname.required('Specify the hostname for your proxy.'), otherwise: (hostname) => hostname.nullable() }) .max(1024), port: Yup.number() - .when('enabled', { - is: true, - then: (port) => port.required('Specify port between 1 and 65535').typeError('Specify port between 1 and 65535'), - otherwise: (port) => port.nullable().transform((_, val) => (val ? Number(val) : null)) - }) .min(1) - .max(65535), + .max(65535) + .typeError('Specify port between 1 and 65535') + .nullable() + .transform((_, val) => (val ? Number(val) : null)), auth: Yup.object() .when('enabled', { - is: true, + is: 'true', then: Yup.object({ enabled: Yup.boolean(), username: Yup.string() diff --git a/packages/bruno-app/src/components/Preferences/ProxySettings/index.js b/packages/bruno-app/src/components/Preferences/ProxySettings/index.js index 6b3fb787..788f7927 100644 --- a/packages/bruno-app/src/components/Preferences/ProxySettings/index.js +++ b/packages/bruno-app/src/components/Preferences/ProxySettings/index.js @@ -22,13 +22,11 @@ const ProxySettings = ({ close }) => { }) .max(1024), port: Yup.number() - .when('enabled', { - is: true, - then: (port) => port.required('Specify port between 1 and 65535').typeError('Specify port between 1 and 65535'), - otherwise: (port) => port.nullable().transform((_, val) => (val ? Number(val) : null)) - }) .min(1) - .max(65535), + .max(65535) + .typeError('Specify port between 1 and 65535') + .nullable() + .transform((_, val) => (val ? Number(val) : null)), auth: Yup.object() .when('enabled', { is: true, diff --git a/packages/bruno-cli/src/runner/run-single-request.js b/packages/bruno-cli/src/runner/run-single-request.js index e047969f..32122f74 100644 --- a/packages/bruno-cli/src/runner/run-single-request.js +++ b/packages/bruno-cli/src/runner/run-single-request.js @@ -3,7 +3,7 @@ const qs = require('qs'); const chalk = require('chalk'); const decomment = require('decomment'); const fs = require('fs'); -const { forOwn, each, extend, get, compact } = require('lodash'); +const { forOwn, isUndefined, isNull, each, extend, get, compact } = require('lodash'); const FormData = require('form-data'); const prepareRequest = require('./prepare-request'); const interpolateVars = require('./interpolate-vars'); @@ -136,14 +136,15 @@ const runSingleRequest = async function ( const proxyAuthEnabled = get(brunoConfig, 'proxy.auth.enabled', false); const socksEnabled = proxyProtocol.includes('socks'); + let uriPort = isUndefined(proxyPort) || isNull(proxyPort) ? '' : `:${proxyPort}`; let proxyUri; if (proxyAuthEnabled) { const proxyAuthUsername = interpolateString(get(brunoConfig, 'proxy.auth.username'), interpolationOptions); const proxyAuthPassword = interpolateString(get(brunoConfig, 'proxy.auth.password'), interpolationOptions); - proxyUri = `${proxyProtocol}://${proxyAuthUsername}:${proxyAuthPassword}@${proxyHostname}:${proxyPort}`; + proxyUri = `${proxyProtocol}://${proxyAuthUsername}:${proxyAuthPassword}@${proxyHostname}${uriPort}`; } else { - proxyUri = `${proxyProtocol}://${proxyHostname}:${proxyPort}`; + proxyUri = `${proxyProtocol}://${proxyHostname}${uriPort}`; } if (socksEnabled) { diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index 7e4b7ee2..9419d455 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -6,11 +6,10 @@ const axios = require('axios'); const path = require('path'); const decomment = require('decomment'); const Mustache = require('mustache'); -const FormData = require('form-data'); const contentDispositionParser = require('content-disposition'); const mime = require('mime-types'); const { ipcMain } = require('electron'); -const { forOwn, extend, each, get, compact } = require('lodash'); +const { isEmpty, isUndefined, isNull, each, get, compact } = require('lodash'); const { VarsRuntime, AssertRuntime, ScriptRuntime, TestRuntime } = require('@usebruno/js'); const prepareRequest = require('./prepare-request'); const prepareGqlIntrospectionRequest = require('./prepare-gql-introspection-request'); @@ -72,22 +71,6 @@ const getEnvVars = (environment = {}) => { }; }; -const getSize = (data) => { - if (!data) { - return 0; - } - - if (typeof data === 'string') { - return Buffer.byteLength(data, 'utf8'); - } - - if (typeof data === 'object') { - return Buffer.byteLength(safeStringifyJSON(data), 'utf8'); - } - - return 0; -}; - const configureRequest = async ( collectionUid, request, @@ -143,7 +126,7 @@ const configureRequest = async ( // proxy configuration let proxyConfig = get(brunoConfig, 'proxy', {}); - let proxyEnabled = get(proxyConfig, 'enabled', false); + let proxyEnabled = isEmpty(proxyConfig) ? 'global' : get(proxyConfig, 'enabled', false); if (proxyEnabled === 'global') { proxyConfig = preferencesUtil.getGlobalProxyConfig(); proxyEnabled = get(proxyConfig, 'enabled', false); @@ -156,14 +139,15 @@ const configureRequest = async ( const proxyAuthEnabled = get(proxyConfig, 'auth.enabled', false); const socksEnabled = proxyProtocol.includes('socks'); + let uriPort = isUndefined(proxyPort) || isNull(proxyPort) ? '' : `:${proxyPort}`; let proxyUri; if (proxyAuthEnabled) { const proxyAuthUsername = interpolateString(get(proxyConfig, 'auth.username'), interpolationOptions); const proxyAuthPassword = interpolateString(get(proxyConfig, 'auth.password'), interpolationOptions); - proxyUri = `${proxyProtocol}://${proxyAuthUsername}:${proxyAuthPassword}@${proxyHostname}:${proxyPort}`; + proxyUri = `${proxyProtocol}://${proxyAuthUsername}:${proxyAuthPassword}@${proxyHostname}${uriPort}`; } else { - proxyUri = `${proxyProtocol}://${proxyHostname}:${proxyPort}`; + proxyUri = `${proxyProtocol}://${proxyHostname}${uriPort}`; } if (socksEnabled) { @@ -203,10 +187,10 @@ const configureRequest = async ( const parseDataFromResponse = (response) => { const dataBuffer = Buffer.from(response.data); // Parse the charset from content type: https://stackoverflow.com/a/33192813 - const charset = /charset=([^()<>@,;:\"/[\]?.=\s]*)/i.exec(response.headers['Content-Type'] || ''); + const charset = /charset=([^()<>@,;:"/[\]?.=\s]*)/i.exec(response.headers['Content-Type'] || ''); // Overwrite the original data for backwards compatability let data = dataBuffer.toString(charset || 'utf-8'); - // Try to parse response to JSON, this can quitly fail + // Try to parse response to JSON, this can quietly fail try { data = JSON.parse(response.data); } catch {} From a0b2f80508686a278689ddec271d896df4d5e6f8 Mon Sep 17 00:00:00 2001 From: MrLuje Date: Sat, 11 Nov 2023 14:59:57 +0000 Subject: [PATCH 30/45] fix(openapi-import): spec security should be optional --- .../bruno-app/src/utils/importers/openapi-collection.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/bruno-app/src/utils/importers/openapi-collection.js b/packages/bruno-app/src/utils/importers/openapi-collection.js index 20a915bd..d317fdfe 100644 --- a/packages/bruno-app/src/utils/importers/openapi-collection.js +++ b/packages/bruno-app/src/utils/importers/openapi-collection.js @@ -267,12 +267,7 @@ const getDefaultUrl = (serverObject) => { }; const getSecurity = (apiSpec) => { - let supportedSchemes = apiSpec.security || []; - if (supportedSchemes.length === 0) { - return { - supported: [] - }; - } + let defaultSchemes = apiSpec.security || []; let securitySchemes = get(apiSpec, 'components.securitySchemes', {}); if (Object.keys(securitySchemes) === 0) { @@ -282,7 +277,7 @@ const getSecurity = (apiSpec) => { } return { - supported: supportedSchemes.map((scheme) => { + supported: defaultSchemes.map((scheme) => { var schemeName = Object.keys(scheme)[0]; return securitySchemes[schemeName]; }), From a5ce7e9c9ccb2c7a208e8d6c6207193b8a61ac21 Mon Sep 17 00:00:00 2001 From: Mirko Golze Date: Sun, 12 Nov 2023 21:41:25 +0100 Subject: [PATCH 31/45] #937, #921 improve evaluation of proxy configuration, allow empty proxy port --- packages/bruno-electron/src/ipc/network/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index 9419d455..d6afbe6f 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -9,7 +9,7 @@ const Mustache = require('mustache'); const contentDispositionParser = require('content-disposition'); const mime = require('mime-types'); const { ipcMain } = require('electron'); -const { isEmpty, isUndefined, isNull, each, get, compact } = require('lodash'); +const { isUndefined, isNull, each, get, compact } = require('lodash'); const { VarsRuntime, AssertRuntime, ScriptRuntime, TestRuntime } = require('@usebruno/js'); const prepareRequest = require('./prepare-request'); const prepareGqlIntrospectionRequest = require('./prepare-gql-introspection-request'); @@ -126,7 +126,7 @@ const configureRequest = async ( // proxy configuration let proxyConfig = get(brunoConfig, 'proxy', {}); - let proxyEnabled = isEmpty(proxyConfig) ? 'global' : get(proxyConfig, 'enabled', false); + let proxyEnabled = get(proxyConfig, 'enabled', 'global'); if (proxyEnabled === 'global') { proxyConfig = preferencesUtil.getGlobalProxyConfig(); proxyEnabled = get(proxyConfig, 'enabled', false); From 500e3853a598fdcda47823428d08e68f5324551d Mon Sep 17 00:00:00 2001 From: Mika Andrianarijaona Date: Tue, 14 Nov 2023 16:33:27 +0100 Subject: [PATCH 32/45] Improve error message when an empty var is set Fixes #962 --- packages/bruno-js/src/bru.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-js/src/bru.js b/packages/bruno-js/src/bru.js index 078aacc7..884b05a5 100644 --- a/packages/bruno-js/src/bru.js +++ b/packages/bruno-js/src/bru.js @@ -58,7 +58,7 @@ class Bru { setVar(key, value) { if (!key) { - throw new Error('Key is required'); + throw new Error('A variable with an empty name has been created but name is required.'); } if (envVariableNameRegex.test(key) === false) { From f39d9858776c1ae1cef90f07c4500fcd47e7374b Mon Sep 17 00:00:00 2001 From: Art051 <91856576+Art051@users.noreply.github.com> Date: Tue, 14 Nov 2023 18:28:35 +0000 Subject: [PATCH 33/45] Problem: Issue relates to OpenAPI specs which have self referencing components, resulting in infinite loops being made within resolveRefs. Solution: Added basic use of Set to store already-traversed items within the OpenAPI spec. Linked to personal use having import problems as well as this issue raised: https://github.com/usebruno/bruno/issues/939#issue-1986513743 Tested against the API Spec mentioned in the issue both as JSON and YAML. --- .../src/utils/importers/openapi-collection.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/bruno-app/src/utils/importers/openapi-collection.js b/packages/bruno-app/src/utils/importers/openapi-collection.js index d317fdfe..febe7d61 100644 --- a/packages/bruno-app/src/utils/importers/openapi-collection.js +++ b/packages/bruno-app/src/utils/importers/openapi-collection.js @@ -187,18 +187,24 @@ const transformOpenapiRequestItem = (request) => { return brunoRequestItem; }; -const resolveRefs = (spec, components = spec.components) => { +const resolveRefs = (spec, components = spec.components, visitedItems = new Set()) => { if (!spec || typeof spec !== 'object') { return spec; } if (Array.isArray(spec)) { - return spec.map((item) => resolveRefs(item, components)); + return spec.map((item) => resolveRefs(item, components, visitedItems)); } if ('$ref' in spec) { const refPath = spec.$ref; + if (visitedItems.has(refPath)) { + return spec; + } else { + visitedItems.add(refPath); + } + if (refPath.startsWith('#/components/')) { // Local reference within components const refKeys = refPath.replace('#/components/', '').split('/'); @@ -213,7 +219,7 @@ const resolveRefs = (spec, components = spec.components) => { } } - return resolveRefs(ref, components); + return resolveRefs(ref, components, visitedItems); } else { // Handle external references (not implemented here) // You would need to fetch the external reference and resolve it. @@ -223,7 +229,7 @@ const resolveRefs = (spec, components = spec.components) => { // Recursively resolve references in nested objects for (const prop in spec) { - spec[prop] = resolveRefs(spec[prop], components); + spec[prop] = resolveRefs(spec[prop], components, visitedItems); } return spec; From d3c854a9da224fa992a152e4c2e2ba309685da48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Sch=C3=B6nefeldt?= <1157580+Andreas-Schoenefeldt@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:22:05 +0100 Subject: [PATCH 34/45] Update readme.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jérémy Benoist --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index d6c4db46..6485845e 100644 --- a/readme.md +++ b/readme.md @@ -65,7 +65,7 @@ Or any version control system of your choice - [Our Long Term Vision](https://github.com/usebruno/bruno/discussions/269) - [Roadmap](https://github.com/usebruno/bruno/discussions/384) - [Documentation](https://docs.usebruno.com) -- [stackoverflow](https://stackoverflow.com/questions/tagged/bruno) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/bruno) - [Website](https://www.usebruno.com) - [Pricing](https://www.usebruno.com/pricing) - [Download](https://www.usebruno.com/downloads) From fff687000267b8dc3e79398d59e27ac560fc539e Mon Sep 17 00:00:00 2001 From: Bennieboj <4215739+bennieboj@users.noreply.github.com> Date: Wed, 15 Nov 2023 19:42:53 +0100 Subject: [PATCH 35/45] fix #961 by using trim --- .../bruno-app/src/components/RequestPane/QueryUrl/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js index 0a45f1a7..f07bd545 100644 --- a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js +++ b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js @@ -34,7 +34,7 @@ const QueryUrl = ({ item, collection, handleRun }) => { requestUrlChanged({ itemUid: item.uid, collectionUid: collection.uid, - url: value + url: value.trim() }) ); }; @@ -80,7 +80,7 @@ const QueryUrl = ({ item, collection, handleRun }) => { }} > Date: Thu, 16 Nov 2023 13:43:01 -0500 Subject: [PATCH 36/45] feat(#970): Add PDF Preview Any PDF response can be now be previewed. There is no UI fancy UI interface for it for simplicity. This makes it look very similar to Postman. --- package-lock.json | 877 +++++++++++++++++- packages/bruno-app/package.json | 2 + .../QueryResult/QueryResultPreview/index.js | 23 + .../ResponsePane/QueryResult/StyledWrapper.js | 13 + .../ResponsePane/QueryResult/index.js | 2 + 5 files changed, 904 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1e84508..0f1c2a4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3491,6 +3491,74 @@ "node": ">=10" } }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "optional": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "optional": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + }, "node_modules/@n1ru4l/push-pull-async-iterable-iterator": { "version": "3.2.0", "license": "MIT", @@ -5068,6 +5136,12 @@ "dev": true, "license": "MIT" }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "optional": true + }, "node_modules/about-window": { "version": "1.15.2", "license": "MIT" @@ -5111,7 +5185,7 @@ }, "node_modules/agent-base": { "version": "6.0.2", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "debug": "4" @@ -5351,10 +5425,43 @@ "version": "1.0.0", "license": "MIT" }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "optional": true + }, "node_modules/arcsecond": { "version": "5.0.0", "license": "MIT" }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "optional": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "optional": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/arg": { "version": "5.0.2", "license": "MIT" @@ -6326,6 +6433,21 @@ } ] }, + "node_modules/canvas": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz", + "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.0", + "nan": "^2.17.0", + "simple-get": "^3.0.3" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/caseless": { "version": "0.12.0", "license": "Apache-2.0" @@ -6412,6 +6534,15 @@ "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "optional": true, + "engines": { + "node": ">=10" + } + }, "node_modules/chrome-trace-event": { "version": "1.0.3", "dev": true, @@ -6558,6 +6689,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/clsx": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", + "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "dev": true, @@ -6629,6 +6768,15 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "optional": true, + "bin": { + "color-support": "bin.js" + } + }, "node_modules/colord": { "version": "2.9.3", "dev": true, @@ -6834,6 +6982,12 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "optional": true + }, "node_modules/content-disposition": { "version": "0.5.4", "license": "MIT", @@ -7383,6 +7537,12 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "optional": true + }, "node_modules/depd": { "version": "2.0.0", "license": "MIT", @@ -7398,6 +7558,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "optional": true, + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "dev": true, @@ -8674,6 +8843,36 @@ "node": ">=14.14" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "optional": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "license": "ISC" @@ -8697,6 +8896,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "optional": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/generic-names": { "version": "4.0.0", "dev": true, @@ -9228,6 +9447,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "optional": true + }, "node_modules/has-yarn": { "version": "2.1.0", "dev": true, @@ -9475,7 +9700,7 @@ }, "node_modules/https-proxy-agent": { "version": "5.0.1", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "agent-base": "6", @@ -11303,9 +11528,17 @@ "node": ">=12" } }, + "node_modules/make-cancellable-promise": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.2.tgz", + "integrity": "sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww==", + "funding": { + "url": "https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1" + } + }, "node_modules/make-dir": { "version": "3.1.0", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "semver": "^6.0.0" @@ -11322,6 +11555,14 @@ "dev": true, "license": "ISC" }, + "node_modules/make-event-props": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/make-event-props/-/make-event-props-1.6.2.tgz", + "integrity": "sha512-iDwf7mA03WPiR8QxvcVHmVWEPfMY1RZXerDVNCRYW7dUr2ppH3J58Rwb39/WG39yTZdRSxr3x+2v22tvI0VEvA==", + "funding": { + "url": "https://github.com/wojtekmaj/make-event-props?sponsor=1" + } + }, "node_modules/makeerror": { "version": "1.0.12", "dev": true, @@ -11409,6 +11650,22 @@ "version": "1.0.1", "license": "MIT" }, + "node_modules/merge-refs": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.2.2.tgz", + "integrity": "sha512-RwcT7GsQR3KbuLw1rRuodq4Nt547BKEBkliZ0qqsrpyNne9bGTFtsFIsIpx82huWhcl3kOlOlH4H0xkPk/DqVw==", + "funding": { + "url": "https://github.com/wojtekmaj/merge-refs?sponsor=1" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/merge-stream": { "version": "2.0.0", "dev": true, @@ -11586,6 +11843,46 @@ "dev": true, "license": "MIT" }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "optional": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + }, "node_modules/mkdirp": { "version": "0.5.6", "license": "MIT", @@ -11691,6 +11988,12 @@ "version": "0.0.8", "license": "ISC" }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "optional": true + }, "node_modules/nanoclone": { "version": "0.2.1", "license": "MIT" @@ -11874,6 +12177,21 @@ "node": ">= 16.0.0" } }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "optional": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/normalize-package-data": { "version": "2.5.0", "dev": true, @@ -11940,6 +12258,18 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "optional": true, + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "node_modules/nth-check": { "version": "2.1.1", "dev": true, @@ -12371,6 +12701,15 @@ "node": ">=8" } }, + "node_modules/path2d-polyfill": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz", + "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA==", + "optional": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pathval": { "version": "1.1.1", "license": "MIT", @@ -12388,6 +12727,18 @@ "through": "~2.3" } }, + "node_modules/pdfjs-dist": { + "version": "3.11.174", + "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.11.174.tgz", + "integrity": "sha512-TdTZPf1trZ8/UFu5Cx/GXB7GZM30LT+wWUNfsi6Bq8ePLnb+woNKtDymI2mxZYBpMbonNFqKmiz684DIfnd8dA==", + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "canvas": "^2.11.2", + "path2d-polyfill": "^2.0.1" + } + }, "node_modules/pend": { "version": "1.2.0", "dev": true, @@ -13773,6 +14124,34 @@ "version": "18.2.0", "license": "MIT" }, + "node_modules/react-pdf": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.5.1.tgz", + "integrity": "sha512-NVno97L3wfX3RLGB3C+QtroOiQrgCKPHLMFKMSQaRqDlH3gkq2CB2NyXJ+IDQNLrT/gSMPPgtZQL8cOUySc/3w==", + "dependencies": { + "clsx": "^2.0.0", + "make-cancellable-promise": "^1.3.1", + "make-event-props": "^1.6.0", + "merge-refs": "^1.2.1", + "pdfjs-dist": "3.11.174", + "prop-types": "^15.6.2", + "tiny-invariant": "^1.0.0", + "tiny-warning": "^1.0.0" + }, + "funding": { + "url": "https://github.com/wojtekmaj/react-pdf?sponsor=1" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/react-redux": { "version": "7.2.9", "license": "MIT", @@ -14526,7 +14905,7 @@ }, "node_modules/semver": { "version": "6.3.0", - "dev": true, + "devOptional": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -14654,7 +15033,7 @@ }, "node_modules/set-blocking": { "version": "2.0.0", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/set-function-length": { @@ -14741,6 +15120,61 @@ "version": "3.0.7", "license": "ISC" }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "optional": true + }, + "node_modules/simple-get": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", + "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", + "optional": true, + "dependencies": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-get/node_modules/decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "optional": true, + "dependencies": { + "mimic-response": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/simple-get/node_modules/mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "optional": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/simple-swizzle": { "version": "0.2.2", "license": "MIT", @@ -15450,6 +15884,41 @@ "node": ">=6" } }, + "node_modules/tar": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "optional": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "optional": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + }, "node_modules/temp-file": { "version": "3.4.0", "dev": true, @@ -15635,6 +16104,11 @@ "dev": true, "license": "MIT" }, + "node_modules/tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + }, "node_modules/tiny-warning": { "version": "1.0.3", "license": "MIT" @@ -16507,6 +16981,15 @@ "dev": true, "license": "ISC" }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "optional": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/widest-line": { "version": "3.1.0", "dev": true, @@ -16748,6 +17231,7 @@ "nanoid": "3.3.4", "next": "12.3.3", "path": "^0.12.7", + "pdfjs-dist": "^3.11.174", "platform": "^1.3.6", "posthog-node": "^2.1.0", "qs": "^6.11.0", @@ -16759,6 +17243,7 @@ "react-github-btn": "^1.4.0", "react-hot-toast": "^2.4.0", "react-inspector": "^6.0.2", + "react-pdf": "^7.5.1", "react-redux": "^7.2.6", "react-tooltip": "^5.5.2", "sass": "^1.46.0", @@ -16888,7 +17373,7 @@ }, "packages/bruno-cli": { "name": "@usebruno/cli", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "dependencies": { "@usebruno/js": "0.9.1", @@ -16980,7 +17465,7 @@ }, "packages/bruno-electron": { "name": "bruno", - "version": "v1.1.0", + "version": "v1.1.1", "dependencies": { "@aws-sdk/credential-providers": "^3.425.0", "@usebruno/js": "0.9.1", @@ -19784,6 +20269,58 @@ } } }, + "@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "optional": true, + "requires": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "optional": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "optional": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + } + } + }, "@n1ru4l/push-pull-async-iterable-iterator": { "version": "3.2.0" }, @@ -20940,6 +21477,7 @@ "nanoid": "3.3.4", "next": "12.3.3", "path": "^0.12.7", + "pdfjs-dist": "3.11.174", "platform": "^1.3.6", "posthog-node": "^2.1.0", "prettier": "^2.7.1", @@ -20952,6 +21490,7 @@ "react-github-btn": "^1.4.0", "react-hot-toast": "^2.4.0", "react-inspector": "^6.0.2", + "react-pdf": "^7.5.1", "react-redux": "^7.2.6", "react-tooltip": "^5.5.2", "sass": "^1.46.0", @@ -20962,7 +21501,7 @@ "webpack": "^5.64.4", "webpack-cli": "^4.9.1", "xml-formatter": "^3.5.0", - "yargs-parser": "*", + "yargs-parser": "^21.1.1", "yup": "^0.32.11" }, "dependencies": { @@ -21377,6 +21916,12 @@ "version": "5.1.1", "dev": true }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "optional": true + }, "about-window": { "version": "1.15.2" }, @@ -21403,7 +21948,7 @@ }, "agent-base": { "version": "6.0.2", - "dev": true, + "devOptional": true, "requires": { "debug": "4" } @@ -21563,9 +22108,38 @@ "append-field": { "version": "1.0.0" }, + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "optional": true + }, "arcsecond": { "version": "5.0.0" }, + "are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "optional": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "arg": { "version": "5.0.2" }, @@ -22316,6 +22890,17 @@ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==" }, + "canvas": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz", + "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==", + "optional": true, + "requires": { + "@mapbox/node-pre-gyp": "^1.0.0", + "nan": "^2.17.0", + "simple-get": "^3.0.3" + } + }, "caseless": { "version": "0.12.0" }, @@ -22367,6 +22952,12 @@ "readdirp": "~3.6.0" } }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "optional": true + }, "chrome-trace-event": { "version": "1.0.3", "dev": true @@ -22444,6 +23035,11 @@ "mimic-response": "^1.0.0" } }, + "clsx": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", + "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==" + }, "co": { "version": "4.6.0", "dev": true @@ -22488,6 +23084,12 @@ "simple-swizzle": "^0.2.2" } }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "optional": true + }, "colord": { "version": "2.9.3", "dev": true @@ -22634,6 +23236,12 @@ } } }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "optional": true + }, "content-disposition": { "version": "0.5.4", "requires": { @@ -22971,12 +23579,24 @@ "delayed-stream": { "version": "1.0.0" }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "optional": true + }, "depd": { "version": "2.0.0" }, "destroy": { "version": "1.2.0" }, + "detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "optional": true + }, "detect-newline": { "version": "3.1.0", "dev": true @@ -23833,6 +24453,32 @@ "universalify": "^2.0.0" } }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "optional": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "optional": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + } + } + }, "fs.realpath": { "version": "1.0.0" }, @@ -23845,6 +24491,23 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, + "gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "optional": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + } + }, "generic-names": { "version": "4.0.0", "dev": true, @@ -24189,6 +24852,12 @@ "has-symbols": { "version": "1.0.3" }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "optional": true + }, "has-yarn": { "version": "2.1.0", "dev": true @@ -24348,7 +25017,7 @@ }, "https-proxy-agent": { "version": "5.0.1", - "dev": true, + "devOptional": true, "requires": { "agent-base": "6", "debug": "4" @@ -25513,9 +26182,14 @@ "@jridgewell/sourcemap-codec": "^1.4.13" } }, + "make-cancellable-promise": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.2.tgz", + "integrity": "sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww==" + }, "make-dir": { "version": "3.1.0", - "dev": true, + "devOptional": true, "requires": { "semver": "^6.0.0" } @@ -25524,6 +26198,11 @@ "version": "1.3.6", "dev": true }, + "make-event-props": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/make-event-props/-/make-event-props-1.6.2.tgz", + "integrity": "sha512-iDwf7mA03WPiR8QxvcVHmVWEPfMY1RZXerDVNCRYW7dUr2ppH3J58Rwb39/WG39yTZdRSxr3x+2v22tvI0VEvA==" + }, "makeerror": { "version": "1.0.12", "dev": true, @@ -25583,6 +26262,12 @@ "merge-descriptors": { "version": "1.0.1" }, + "merge-refs": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.2.2.tgz", + "integrity": "sha512-RwcT7GsQR3KbuLw1rRuodq4Nt547BKEBkliZ0qqsrpyNne9bGTFtsFIsIpx82huWhcl3kOlOlH4H0xkPk/DqVw==", + "requires": {} + }, "merge-stream": { "version": "2.0.0", "dev": true @@ -25681,6 +26366,39 @@ "version": "1.2.0", "dev": true }, + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "optional": true + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "optional": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "optional": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + } + } + }, "mkdirp": { "version": "0.5.6", "requires": { @@ -25747,6 +26465,12 @@ "mute-stream": { "version": "0.0.8" }, + "nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "optional": true + }, "nanoclone": { "version": "0.2.1" }, @@ -25854,6 +26578,15 @@ "tv4": "^1.3.0" } }, + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "optional": true, + "requires": { + "abbrev": "1" + } + }, "normalize-package-data": { "version": "2.5.0", "dev": true, @@ -25897,6 +26630,18 @@ "path-key": "^3.0.0" } }, + "npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "optional": true, + "requires": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "nth-check": { "version": "2.1.1", "dev": true, @@ -26161,6 +26906,12 @@ "path-type": { "version": "4.0.0" }, + "path2d-polyfill": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz", + "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA==", + "optional": true + }, "pathval": { "version": "1.1.1" }, @@ -26170,6 +26921,15 @@ "through": "~2.3" } }, + "pdfjs-dist": { + "version": "3.11.174", + "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.11.174.tgz", + "integrity": "sha512-TdTZPf1trZ8/UFu5Cx/GXB7GZM30LT+wWUNfsi6Bq8ePLnb+woNKtDymI2mxZYBpMbonNFqKmiz684DIfnd8dA==", + "requires": { + "canvas": "^2.11.2", + "path2d-polyfill": "^2.0.1" + } + }, "pend": { "version": "1.2.0", "dev": true @@ -26978,6 +27738,21 @@ "react-is": { "version": "18.2.0" }, + "react-pdf": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.5.1.tgz", + "integrity": "sha512-NVno97L3wfX3RLGB3C+QtroOiQrgCKPHLMFKMSQaRqDlH3gkq2CB2NyXJ+IDQNLrT/gSMPPgtZQL8cOUySc/3w==", + "requires": { + "clsx": "^2.0.0", + "make-cancellable-promise": "^1.3.1", + "make-event-props": "^1.6.0", + "merge-refs": "^1.2.1", + "pdfjs-dist": "3.11.174", + "prop-types": "^15.6.2", + "tiny-invariant": "^1.0.0", + "tiny-warning": "^1.0.0" + } + }, "react-redux": { "version": "7.2.9", "requires": { @@ -27488,7 +28263,7 @@ }, "semver": { "version": "6.3.0", - "dev": true + "devOptional": true }, "semver-compare": { "version": "1.0.0", @@ -27581,7 +28356,7 @@ }, "set-blocking": { "version": "2.0.0", - "dev": true + "devOptional": true }, "set-function-length": { "version": "1.1.1", @@ -27636,6 +28411,40 @@ "signal-exit": { "version": "3.0.7" }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "optional": true + }, + "simple-get": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", + "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", + "optional": true, + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + }, + "dependencies": { + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "optional": true, + "requires": { + "mimic-response": "^2.0.0" + } + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "optional": true + } + } + }, "simple-swizzle": { "version": "0.2.2", "requires": { @@ -28115,6 +28924,34 @@ "version": "2.2.1", "dev": true }, + "tar": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "optional": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "optional": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true + } + } + }, "temp-file": { "version": "3.4.0", "dev": true, @@ -28236,6 +29073,11 @@ "version": "1.7.1", "dev": true }, + "tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + }, "tiny-warning": { "version": "1.0.3" }, @@ -28777,6 +29619,15 @@ "version": "1.0.0", "dev": true }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "widest-line": { "version": "3.1.0", "dev": true, diff --git a/packages/bruno-app/package.json b/packages/bruno-app/package.json index d5ba0b1a..94e1db53 100644 --- a/packages/bruno-app/package.json +++ b/packages/bruno-app/package.json @@ -45,6 +45,7 @@ "nanoid": "3.3.4", "next": "12.3.3", "path": "^0.12.7", + "pdfjs-dist": "^3.11.174", "platform": "^1.3.6", "posthog-node": "^2.1.0", "qs": "^6.11.0", @@ -56,6 +57,7 @@ "react-github-btn": "^1.4.0", "react-hot-toast": "^2.4.0", "react-inspector": "^6.0.2", + "react-pdf": "^7.5.1", "react-redux": "^7.2.6", "react-tooltip": "^5.5.2", "sass": "^1.46.0", diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js index 5ed21ee9..157cfa0a 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js @@ -2,6 +2,11 @@ import CodeEditor from 'components/CodeEditor/index'; import { get } from 'lodash'; import { useDispatch, useSelector } from 'react-redux'; import { sendRequest } from 'providers/ReduxStore/slices/collections/actions'; +import { Document, Page } from "react-pdf"; +import { useState } from "react"; +import 'pdfjs-dist/build/pdf.worker'; +import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; +import 'react-pdf/dist/esm/Page/TextLayer.css'; const QueryResultPreview = ({ previewTab, @@ -19,6 +24,10 @@ const QueryResultPreview = ({ const preferences = useSelector((state) => state.app.preferences); const dispatch = useDispatch(); + const [numPages, setNumPages] = useState(null); + function onDocumentLoadSuccess({ numPages }) { + setNumPages(numPages); + } // Fail safe, so we don't render anything with an invalid tab if (!allowedPreviewModes.includes(previewTab)) { return null; @@ -45,6 +54,20 @@ const QueryResultPreview = ({ case 'preview-image': { return ; } + case 'preview-pdf': { + return( +
+ + {Array.from(new Array(numPages), (el, index) => ( + + ))} + +
+ ); + } default: case 'raw': { return ( diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js index 07f51b8b..9b797a63 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js @@ -18,6 +18,19 @@ const StyledWrapper = styled.div` width: 100%; } + .react-pdf__Page { + margin-top: 10px; + background-color:transparent !important; + } + .react-pdf__Page__textContent { + border: 1px solid darkgrey; + box-shadow: 5px 5px 5px 1px #ccc; + border-radius: 0px; + margin: 0 auto; + } + .react-pdf__Page__canvas { + margin: 0 auto; + } div[role='tablist'] { .active { color: ${(props) => props.theme.colors.text.yellow}; diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js index b5508ba1..f49c2491 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js @@ -49,6 +49,8 @@ const QueryResult = ({ item, collection, data, dataBuffer, width, disableRunEven allowedPreviewModes.unshift('preview-web'); } else if (mode.includes('image')) { allowedPreviewModes.unshift('preview-image'); + } else if (contentType.includes("pdf")) { + allowedPreviewModes.unshift('preview-pdf'); } return allowedPreviewModes; From 52baa69b70e0e1caf53f2ee5b656d552752eb92d Mon Sep 17 00:00:00 2001 From: n00o Date: Thu, 16 Nov 2023 18:55:43 -0500 Subject: [PATCH 37/45] Fix formatting Pass prettier tests --- .../QueryResult/QueryResultPreview/index.js | 21 ++++++++----------- .../ResponsePane/QueryResult/StyledWrapper.js | 2 +- .../ResponsePane/QueryResult/index.js | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js index 157cfa0a..af11ebc2 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/QueryResultPreview/index.js @@ -2,8 +2,8 @@ import CodeEditor from 'components/CodeEditor/index'; import { get } from 'lodash'; import { useDispatch, useSelector } from 'react-redux'; import { sendRequest } from 'providers/ReduxStore/slices/collections/actions'; -import { Document, Page } from "react-pdf"; -import { useState } from "react"; +import { Document, Page } from 'react-pdf'; +import { useState } from 'react'; import 'pdfjs-dist/build/pdf.worker'; import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; import 'react-pdf/dist/esm/Page/TextLayer.css'; @@ -55,16 +55,13 @@ const QueryResultPreview = ({ return ; } case 'preview-pdf': { - return( -
- - {Array.from(new Array(numPages), (el, index) => ( - - ))} - + return ( +
+ + {Array.from(new Array(numPages), (el, index) => ( + + ))} +
); } diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js index 9b797a63..64ab32f7 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js @@ -20,7 +20,7 @@ const StyledWrapper = styled.div` .react-pdf__Page { margin-top: 10px; - background-color:transparent !important; + background-color: transparent !important; } .react-pdf__Page__textContent { border: 1px solid darkgrey; diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js index f49c2491..a8f13505 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js @@ -49,7 +49,7 @@ const QueryResult = ({ item, collection, data, dataBuffer, width, disableRunEven allowedPreviewModes.unshift('preview-web'); } else if (mode.includes('image')) { allowedPreviewModes.unshift('preview-image'); - } else if (contentType.includes("pdf")) { + } else if (contentType.includes('pdf')) { allowedPreviewModes.unshift('preview-pdf'); } From 353386b4da8e2b440c4b44c8cb7266cba1a0bec7 Mon Sep 17 00:00:00 2001 From: n00o Date: Fri, 17 Nov 2023 09:18:14 -0500 Subject: [PATCH 38/45] Add dependencies --- package-lock.json | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62e35cd1..b615e95b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14352,6 +14352,7 @@ }, "node_modules/react-is": { "version": "18.2.0", + "dev": true, "license": "MIT" }, "node_modules/react-pdf": { @@ -21727,7 +21728,7 @@ "nanoid": "3.3.4", "next": "12.3.3", "path": "^0.12.7", - "pdfjs-dist": "3.11.174", + "pdfjs-dist": "^3.11.174", "platform": "^1.3.6", "posthog-node": "^2.1.0", "prettier": "^2.7.1", @@ -26986,6 +26987,46 @@ "tv4": "^1.3.0" } }, + "nomnom": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", + "integrity": "sha512-5s0JxqhDx9/rksG2BTMVN1enjWSvPidpoSgViZU4ZXULyTe+7jxcCRLB6f42Z0l1xYJpleCBtSyY6Lwg3uu5CQ==", + "requires": { + "chalk": "~0.4.0", + "underscore": "~1.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha512-3iF4FIKdxaVYT3JqQuY3Wat/T2t7TRbbQ94Fu50ZUCbLy4TFbTzr90NOHQodQkNqmeEGCw8WbeP78WNi6SKYUA==" + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha512-sQfYDlfv2DGVtjdoQqxS0cEZDroyG8h6TamA6rvxwlrU5BaSLDx9xhatBYl2pxZ7gmpNaPFVwBtdGdu5rQ+tYQ==", + "requires": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha512-behete+3uqxecWlDAm5lmskaSaISA+ThQ4oNNBDTBJt0x2ppR6IPqfZNuj6BLaLJ/Sji4TPZlcRyOis8wXQTLg==" + } + } + }, + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "optional": true, + "requires": { + "abbrev": "1" + } + }, "normalize-package-data": { "version": "2.5.0", "dev": true, @@ -28135,7 +28176,8 @@ "requires": {} }, "react-is": { - "version": "18.2.0" + "version": "18.2.0", + "dev": true }, "react-pdf": { "version": "7.5.1", From e96da632b2d6b1a1f8d310e0b09961fdba508069 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Sat, 18 Nov 2023 08:29:18 +0530 Subject: [PATCH 39/45] chore: version bump @usebruno/js @usebruno/cli --- packages/bruno-cli/package.json | 4 ++-- packages/bruno-js/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bruno-cli/package.json b/packages/bruno-cli/package.json index d2aa710f..37ea480a 100644 --- a/packages/bruno-cli/package.json +++ b/packages/bruno-cli/package.json @@ -1,6 +1,6 @@ { "name": "@usebruno/cli", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", "main": "src/index.js", "bin": { @@ -24,7 +24,7 @@ "package.json" ], "dependencies": { - "@usebruno/js": "0.9.1", + "@usebruno/js": "0.9.2", "@usebruno/lang": "0.9.0", "axios": "^1.5.1", "chai": "^4.3.7", diff --git a/packages/bruno-js/package.json b/packages/bruno-js/package.json index 1152beec..d751c032 100644 --- a/packages/bruno-js/package.json +++ b/packages/bruno-js/package.json @@ -1,6 +1,6 @@ { "name": "@usebruno/js", - "version": "0.9.1", + "version": "0.9.2", "license": "MIT", "main": "src/index.js", "files": [ From f8c23ed6da6becf694eb782d331a0f37fd5f2b98 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Sat, 18 Nov 2023 08:29:53 +0530 Subject: [PATCH 40/45] chore: save icon should use yellow color to indicate draft --- packages/bruno-app/src/components/RequestPane/QueryUrl/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js index f07bd545..3cc29706 100644 --- a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js +++ b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js @@ -80,7 +80,7 @@ const QueryUrl = ({ item, collection, handleRun }) => { }} > Date: Sat, 18 Nov 2023 09:18:40 +0530 Subject: [PATCH 41/45] fix(#962): improved error label when name is not defined while setting env var --- package-lock.json | 49 ++++++++++++++++++++++++---- packages/bruno-electron/package.json | 2 +- packages/bruno-js/src/bru.js | 4 +-- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f1c2a4c..33807da4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17373,10 +17373,10 @@ }, "packages/bruno-cli": { "name": "@usebruno/cli", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", "dependencies": { - "@usebruno/js": "0.9.1", + "@usebruno/js": "0.9.2", "@usebruno/lang": "0.9.0", "axios": "^1.5.1", "chai": "^4.3.7", @@ -17468,7 +17468,7 @@ "version": "v1.1.1", "dependencies": { "@aws-sdk/credential-providers": "^3.425.0", - "@usebruno/js": "0.9.1", + "@usebruno/js": "0.9.2", "@usebruno/lang": "0.9.0", "@usebruno/schema": "0.6.0", "about-window": "^1.15.2", @@ -17526,6 +17526,21 @@ "node": ">= 14" } }, + "packages/bruno-electron/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "packages/bruno-electron/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -17658,6 +17673,11 @@ "js-yaml": "bin/js-yaml.js" } }, + "packages/bruno-electron/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "packages/bruno-electron/node_modules/uuid": { "version": "9.0.0", "license": "MIT", @@ -17694,7 +17714,7 @@ }, "packages/bruno-js": { "name": "@usebruno/js", - "version": "0.9.1", + "version": "0.9.2", "license": "MIT", "dependencies": { "@usebruno/query": "0.1.0", @@ -21477,7 +21497,7 @@ "nanoid": "3.3.4", "next": "12.3.3", "path": "^0.12.7", - "pdfjs-dist": "3.11.174", + "pdfjs-dist": "^3.11.174", "platform": "^1.3.6", "posthog-node": "^2.1.0", "prettier": "^2.7.1", @@ -21579,7 +21599,7 @@ "@usebruno/cli": { "version": "file:packages/bruno-cli", "requires": { - "@usebruno/js": "0.9.1", + "@usebruno/js": "0.9.2", "@usebruno/lang": "0.9.0", "axios": "^1.5.1", "chai": "^4.3.7", @@ -22543,7 +22563,7 @@ "version": "file:packages/bruno-electron", "requires": { "@aws-sdk/credential-providers": "^3.425.0", - "@usebruno/js": "0.9.1", + "@usebruno/js": "0.9.2", "@usebruno/lang": "0.9.0", "@usebruno/schema": "0.6.0", "about-window": "^1.15.2", @@ -22592,6 +22612,16 @@ "debug": "^4.3.4" } }, + "ajv": { + "version": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -22675,6 +22705,11 @@ "argparse": "^2.0.1" } }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "uuid": { "version": "9.0.0" } diff --git a/packages/bruno-electron/package.json b/packages/bruno-electron/package.json index d0c562a7..7fa75c1b 100644 --- a/packages/bruno-electron/package.json +++ b/packages/bruno-electron/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@aws-sdk/credential-providers": "^3.425.0", - "@usebruno/js": "0.9.1", + "@usebruno/js": "0.9.2", "@usebruno/lang": "0.9.0", "@usebruno/schema": "0.6.0", "about-window": "^1.15.2", diff --git a/packages/bruno-js/src/bru.js b/packages/bruno-js/src/bru.js index 884b05a5..4813a73d 100644 --- a/packages/bruno-js/src/bru.js +++ b/packages/bruno-js/src/bru.js @@ -45,7 +45,7 @@ class Bru { setEnvVar(key, value) { if (!key) { - throw new Error('Key is required'); + throw new Error('Creating a env variable without specifying a name is not allowed.'); } // gracefully ignore if key is not present in environment @@ -58,7 +58,7 @@ class Bru { setVar(key, value) { if (!key) { - throw new Error('A variable with an empty name has been created but name is required.'); + throw new Error('Creating a variable without specifying a name is not allowed.'); } if (envVariableNameRegex.test(key) === false) { From 7a4d59d50cf32446f67da5a10a5ea087c9e8ab4b Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Sat, 18 Nov 2023 10:46:39 +0530 Subject: [PATCH 42/45] chore: updated package-lock --- package-lock.json | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44a906c0..25b94f4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14352,7 +14352,6 @@ }, "node_modules/react-is": { "version": "18.2.0", - "dev": true, "license": "MIT" }, "node_modules/react-pdf": { @@ -17774,21 +17773,6 @@ "node": ">= 14" } }, - "packages/bruno-electron/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "packages/bruno-electron/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -17921,11 +17905,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "packages/bruno-electron/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "packages/bruno-electron/node_modules/uuid": { "version": "9.0.0", "license": "MIT", @@ -22864,16 +22843,6 @@ "debug": "^4.3.4" } }, - "ajv": { - "version": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -22957,11 +22926,6 @@ "argparse": "^2.0.1" } }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "uuid": { "version": "9.0.0" } @@ -28211,8 +28175,7 @@ "requires": {} }, "react-is": { - "version": "18.2.0", - "dev": true + "version": "18.2.0" }, "react-pdf": { "version": "7.5.1", From 8f4ce9c13b19156ab2196a440983ef9a215875fc Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Sun, 19 Nov 2023 00:01:29 +0530 Subject: [PATCH 43/45] chore: added null check before trimming request url --- packages/bruno-app/src/components/RequestPane/QueryUrl/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js index 3cc29706..26a7e13d 100644 --- a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js +++ b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js @@ -34,7 +34,7 @@ const QueryUrl = ({ item, collection, handleRun }) => { requestUrlChanged({ itemUid: item.uid, collectionUid: collection.uid, - url: value.trim() + url: value && typeof value === 'string' ? value.trim() : value }) ); }; From bd71adebe0ed700cd4bb696fce8b64b7085c2275 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Sun, 19 Nov 2023 13:13:31 +0530 Subject: [PATCH 44/45] chore(#718): collcetion presets pr review --- .../Presets/StyledWrapper.js | 2 +- .../CollectionSettings/Presets/index.js | 40 +++++++++---------- .../CollectionProperties/StyledWrapper.js | 40 ------------------- .../components/Sidebar/NewRequest/index.js | 25 +++++++++++- .../ReduxStore/slices/collections/actions.js | 16 -------- .../ReduxStore/slices/collections/index.js | 9 ----- 6 files changed, 44 insertions(+), 88 deletions(-) delete mode 100644 packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionProperties/StyledWrapper.js diff --git a/packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js b/packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js index c8f1241c..602851ba 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js +++ b/packages/bruno-app/src/components/CollectionSettings/Presets/StyledWrapper.js @@ -2,7 +2,7 @@ import styled from 'styled-components'; const StyledWrapper = styled.div` .settings-label { - width: 80px; + width: 110px; } .textbox { diff --git a/packages/bruno-app/src/components/CollectionSettings/Presets/index.js b/packages/bruno-app/src/components/CollectionSettings/Presets/index.js index 70fb8e98..503090ab 100644 --- a/packages/bruno-app/src/components/CollectionSettings/Presets/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/Presets/index.js @@ -9,14 +9,14 @@ import cloneDeep from 'lodash/cloneDeep'; const PresetsSettings = ({ collection }) => { const dispatch = useDispatch(); const { - brunoConfig: { presets: defaultPresets = {} } + brunoConfig: { presets: presets = {} } } = collection; const formik = useFormik({ enableReinitialize: true, initialValues: { - defaultType: defaultPresets.defaultType || 'http-request', - defaultRequestUrl: defaultPresets.defaultRequestUrl || '' + requestType: presets.requestType || 'http', + requestUrl: presets.requestUrl || '' }, onSubmit: (newPresets) => { const brunoConfig = cloneDeep(collection.brunoConfig); @@ -32,53 +32,53 @@ const PresetsSettings = ({ collection }) => {
-
+
-
-