Merge pull request #238 from jsoref/spelling

Spelling
This commit is contained in:
Anoop M D 2023-09-29 00:25:43 +05:30 committed by GitHub
commit a6b19605b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 46 additions and 46 deletions

View File

@ -1,6 +1,6 @@
## Development ## Development
Bruno is deing developed as a desktop app. You need to load the app by running the nextjs app in one terminal and then run the electron app in another terminal. Bruno is being developed as a desktop app. You need to load the app by running the nextjs app in one terminal and then run the electron app in another terminal.
### Dependencies ### Dependencies
* NodeJS v18 * NodeJS v18

View File

@ -29,7 +29,7 @@ const BrunoSupport = ({ onClose }) => {
<div className="mt-2"> <div className="mt-2">
<a href="https://github.com/usebruno/bruno" target="_blank" className="flex items-end"> <a href="https://github.com/usebruno/bruno" target="_blank" className="flex items-end">
<IconBrandGithub size={18} strokeWidth={2} /> <IconBrandGithub size={18} strokeWidth={2} />
<span className="label ml-2">Github</span> <span className="label ml-2">GitHub</span>
</a> </a>
</div> </div>
<div className="mt-2"> <div className="mt-2">

View File

@ -80,7 +80,7 @@ export default class CodeEditor extends React.Component {
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
// Ensure the changes caused by this update are not interpretted as // Ensure the changes caused by this update are not interpreted as
// user-input changes which could otherwise result in an infinite // user-input changes which could otherwise result in an infinite
// event loop. // event loop.
this.ignoreChangeEvent = true; this.ignoreChangeEvent = true;

View File

@ -43,7 +43,7 @@ const Wrapper = styled.div`
} }
&.border-top { &.border-top {
border-top: solid 1px ${(props) => props.theme.dropdown.seperator}; border-top: solid 1px ${(props) => props.theme.dropdown.separator};
} }
} }
} }

View File

@ -27,7 +27,7 @@ const CreateEnvironment = ({ collection, onClose }) => {
toast.success('Environment created in collection'); toast.success('Environment created in collection');
onClose(); onClose();
}) })
.catch(() => toast.error('An error occured while created the environment')); .catch(() => toast.error('An error occurred while created the environment'));
} }
}); });

View File

@ -14,7 +14,7 @@ const DeleteEnvironment = ({ onClose, environment, collection }) => {
toast.success('Environment deleted successfully'); toast.success('Environment deleted successfully');
onClose(); onClose();
}) })
.catch(() => toast.error('An error occured while deleting the environment')); .catch(() => toast.error('An error occurred while deleting the environment'));
}; };
return ( return (

View File

@ -23,7 +23,7 @@ const EnvironmentVariables = ({ environment, collection }) => {
type: 'CHANGES_SAVED' type: 'CHANGES_SAVED'
}); });
}) })
.catch(() => toast.error('An error occured while saving the changes')); .catch(() => toast.error('An error occurred while saving the changes'));
}; };
const addVariable = () => { const addVariable = () => {

View File

@ -27,7 +27,7 @@ const RenameEnvironment = ({ onClose, environment, collection }) => {
toast.success('Environment renamed successfully'); toast.success('Environment renamed successfully');
onClose(); onClose();
}) })
.catch(() => toast.error('An error occured while renaming the environment')); .catch(() => toast.error('An error occurred while renaming the environment'));
} }
}); });

View File

@ -3,7 +3,7 @@ import StyledWrapper from './StyledWrapper';
const ModalHeader = ({ title, handleCancel }) => ( const ModalHeader = ({ title, handleCancel }) => (
<div className="bruno-modal-header"> <div className="bruno-modal-header">
{title ? <div className="bruno-modal-heade-title">{title}</div> : null} {title ? <div className="bruno-modal-header-title">{title}</div> : null}
{handleCancel ? ( {handleCancel ? (
<div className="close cursor-pointer" onClick={handleCancel ? () => handleCancel() : null}> <div className="close cursor-pointer" onClick={handleCancel ? () => handleCancel() : null}>
× ×

View File

@ -27,7 +27,7 @@ const Support = () => {
<div className="mt-2"> <div className="mt-2">
<a href="https://github.com/usebruno/bruno" target="_blank" className="flex items-end"> <a href="https://github.com/usebruno/bruno" target="_blank" className="flex items-end">
<IconBrandGithub size={18} strokeWidth={2} /> <IconBrandGithub size={18} strokeWidth={2} />
<span className="label ml-2">Github</span> <span className="label ml-2">GitHub</span>
</a> </a>
</div> </div>
<div className="mt-2"> <div className="mt-2">

View File

@ -114,7 +114,7 @@ const GraphQLRequestPane = ({ item, collection, leftPaneWidth, onSchemaLoad, tog
const focusedTab = find(tabs, (t) => t.uid === activeTabUid); const focusedTab = find(tabs, (t) => t.uid === activeTabUid);
if (!focusedTab || !focusedTab.uid || !focusedTab.requestPaneTab) { if (!focusedTab || !focusedTab.uid || !focusedTab.requestPaneTab) {
return <div className="pb-4 px-4">An error occured!</div>; return <div className="pb-4 px-4">An error occurred!</div>;
} }
const getTabClassname = (tabName) => { const getTabClassname = (tabName) => {

View File

@ -40,7 +40,7 @@ const useGraphqlSchema = (endpoint, environment) => {
.catch((err) => { .catch((err) => {
setIsLoading(false); setIsLoading(false);
setError(err); setError(err);
toast.error('Error occured while loading GraphQL Schema'); toast.error('Error occurred while loading GraphQL Schema');
}); });
}; };

View File

@ -62,7 +62,7 @@ const HttpRequestPane = ({ item, collection, leftPaneWidth }) => {
const focusedTab = find(tabs, (t) => t.uid === activeTabUid); const focusedTab = find(tabs, (t) => t.uid === activeTabUid);
if (!focusedTab || !focusedTab.uid || !focusedTab.requestPaneTab) { if (!focusedTab || !focusedTab.uid || !focusedTab.requestPaneTab) {
return <div className="pb-4 px-4">An error occured!</div>; return <div className="pb-4 px-4">An error occurred!</div>;
} }
const getTabClassname = (tabName) => { const getTabClassname = (tabName) => {

View File

@ -142,7 +142,7 @@ export default class QueryEditor extends React.Component {
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
// Ensure the changes caused by this update are not interpretted as // Ensure the changes caused by this update are not interpreted as
// user-input changes which could otherwise result in an infinite // user-input changes which could otherwise result in an infinite
// event loop. // event loop.
this.ignoreChangeEvent = true; this.ignoreChangeEvent = true;

View File

@ -112,7 +112,7 @@ const RequestTabPanel = () => {
} }
if (!focusedTab || !focusedTab.uid || !focusedTab.collectionUid) { if (!focusedTab || !focusedTab.uid || !focusedTab.collectionUid) {
return <div className="pb-4 px-4">An error occured!</div>; return <div className="pb-4 px-4">An error occurred!</div>;
} }
let collection = find(collections, (c) => c.uid === focusedTab.collectionUid); let collection = find(collections, (c) => c.uid === focusedTab.collectionUid);

View File

@ -1,7 +1,7 @@
import styled from 'styled-components'; import styled from 'styled-components';
const Wrapper = styled.div` const Wrapper = styled.div`
border-bottom: 1px solid ${(props) => props.theme.requestTabs.borromBorder}; border-bottom: 1px solid ${(props) => props.theme.requestTabs.bottomBorder};
ul { ul {
padding: 0; padding: 0;

View File

@ -76,7 +76,7 @@ const RequestTabs = () => {
}); });
}; };
// Todo: Must support ephermal requests // Todo: Must support ephemeral requests
return ( return (
<StyledWrapper className={getRootClassname()}> <StyledWrapper className={getRootClassname()}>
{newRequestModalOpen && ( {newRequestModalOpen && (

View File

@ -28,7 +28,7 @@ const CloneCollectionItem = ({ collection, item, onClose }) => {
onClose(); onClose();
}) })
.catch((err) => { .catch((err) => {
toast.error(err ? err.message : 'An error occured while cloning the request'); toast.error(err ? err.message : 'An error occurred while cloning the request');
}); });
} }
}); });

View File

@ -13,7 +13,7 @@ const RemoveCollection = ({ onClose, collection }) => {
toast.success('Collection removed'); toast.success('Collection removed');
onClose(); onClose();
}) })
.catch(() => toast.error('An error occured while removing the collection')); .catch(() => toast.error('An error occurred while removing the collection'));
}; };
return ( return (

View File

@ -19,7 +19,7 @@ const CreateOrOpenCollection = () => {
const handleOpenCollection = () => { const handleOpenCollection = () => {
dispatch(openCollection()).catch( dispatch(openCollection()).catch(
(err) => console.log(err) && toast.error('An error occured while opening the collection') (err) => console.log(err) && toast.error('An error occurred while opening the collection')
); );
}; };
const CreateLink = () => ( const CreateLink = () => (

View File

@ -36,7 +36,7 @@ const CreateCollection = ({ onClose }) => {
toast.success('Collection created'); toast.success('Collection created');
onClose(); onClose();
}) })
.catch(() => toast.error('An error occured while creating the collection')); .catch(() => toast.error('An error occurred while creating the collection'));
} }
}); });

View File

@ -32,7 +32,7 @@ const NewFolder = ({ collection, item, onClose }) => {
onSubmit: (values) => { onSubmit: (values) => {
dispatch(newFolder(values.folderName, collection.uid, item ? item.uid : null)) dispatch(newFolder(values.folderName, collection.uid, item ? item.uid : null))
.then(() => onClose()) .then(() => onClose())
.catch((err) => toast.error(err ? err.message : 'An error occured while adding the request')); .catch((err) => toast.error(err ? err.message : 'An error occurred while adding the request'));
} }
}); });

View File

@ -5,14 +5,14 @@ import toast from 'react-hot-toast';
import { uuid } from 'utils/common'; import { uuid } from 'utils/common';
import Modal from 'components/Modal'; import Modal from 'components/Modal';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { newEphermalHttpRequest } from 'providers/ReduxStore/slices/collections'; import { newEphemeralHttpRequest } from 'providers/ReduxStore/slices/collections';
import { newHttpRequest } from 'providers/ReduxStore/slices/collections/actions'; import { newHttpRequest } from 'providers/ReduxStore/slices/collections/actions';
import { addTab } from 'providers/ReduxStore/slices/tabs'; import { addTab } from 'providers/ReduxStore/slices/tabs';
import HttpMethodSelector from 'components/RequestPane/QueryUrl/HttpMethodSelector'; import HttpMethodSelector from 'components/RequestPane/QueryUrl/HttpMethodSelector';
import { getDefaultRequestPaneTab } from 'utils/collections'; import { getDefaultRequestPaneTab } from 'utils/collections';
import StyledWrapper from './StyledWrapper'; import StyledWrapper from './StyledWrapper';
const NewRequest = ({ collection, item, isEphermal, onClose }) => { const NewRequest = ({ collection, item, isEphemeral, onClose }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const inputRef = useRef(); const inputRef = useRef();
const formik = useFormik({ const formik = useFormik({
@ -34,10 +34,10 @@ const NewRequest = ({ collection, item, isEphermal, onClose }) => {
}) })
}), }),
onSubmit: (values) => { onSubmit: (values) => {
if (isEphermal) { if (isEphemeral) {
const uid = uuid(); const uid = uuid();
dispatch( dispatch(
newEphermalHttpRequest({ newEphemeralHttpRequest({
uid: uid, uid: uid,
requestName: values.requestName, requestName: values.requestName,
requestType: values.requestType, requestType: values.requestType,
@ -56,7 +56,7 @@ const NewRequest = ({ collection, item, isEphermal, onClose }) => {
); );
onClose(); onClose();
}) })
.catch((err) => toast.error(err ? err.message : 'An error occured while adding the request')); .catch((err) => toast.error(err ? err.message : 'An error occurred while adding the request'));
} else { } else {
dispatch( dispatch(
newHttpRequest({ newHttpRequest({
@ -69,7 +69,7 @@ const NewRequest = ({ collection, item, isEphermal, onClose }) => {
}) })
) )
.then(() => onClose()) .then(() => onClose())
.catch((err) => toast.error(err ? err.message : 'An error occured while adding the request')); .catch((err) => toast.error(err ? err.message : 'An error occurred while adding the request'));
} }
} }
}); });

View File

@ -46,7 +46,7 @@ const TitleBar = () => {
const handleOpenCollection = () => { const handleOpenCollection = () => {
dispatch(openCollection()).catch( dispatch(openCollection()).catch(
(err) => console.log(err) && toast.error('An error occured while opening the collection') (err) => console.log(err) && toast.error('An error occurred while opening the collection')
); );
}; };

View File

@ -88,7 +88,7 @@ class SingleLineEditor extends Component {
}; };
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
// Ensure the changes caused by this update are not interpretted as // Ensure the changes caused by this update are not interpreted as
// user-input changes which could otherwise result in an infinite // user-input changes which could otherwise result in an infinite
// event loop. // event loop.
this.ignoreChangeEvent = true; this.ignoreChangeEvent = true;

View File

@ -19,7 +19,7 @@ const Welcome = () => {
const handleOpenCollection = () => { const handleOpenCollection = () => {
dispatch(openCollection()).catch( dispatch(openCollection()).catch(
(err) => console.log(err) && toast.error('An error occured while opening the collection') (err) => console.log(err) && toast.error('An error occurred while opening the collection')
); );
}; };
@ -93,7 +93,7 @@ const Welcome = () => {
<div className="mt-2"> <div className="mt-2">
<a href="https://github.com/usebruno/bruno" target="_blank" className="flex items-center"> <a href="https://github.com/usebruno/bruno" target="_blank" className="flex items-center">
<IconBrandGithub size={18} strokeWidth={2} /> <IconBrandGithub size={18} strokeWidth={2} />
<span className="label ml-2">Github</span> <span className="label ml-2">GitHub</span>
</a> </a>
</div> </div>
</div> </div>

View File

@ -93,7 +93,7 @@ export const HotkeysProvider = (props) => {
}; };
}, [activeTabUid, tabs, saveRequest, collections]); }, [activeTabUid, tabs, saveRequest, collections]);
// edit environmentss (ctrl/cmd + e) // edit environments (ctrl/cmd + e)
useEffect(() => { useEffect(() => {
Mousetrap.bind(['command+e', 'ctrl+e'], (e) => { Mousetrap.bind(['command+e', 'ctrl+e'], (e) => {
const activeTab = find(tabs, (t) => t.uid === activeTabUid); const activeTab = find(tabs, (t) => t.uid === activeTabUid);

View File

@ -229,7 +229,7 @@ export const collectionsSlice = createSlice({
} }
} }
}, },
newEphermalHttpRequest: (state, action) => { newEphemeralHttpRequest: (state, action) => {
const collection = findCollectionByUid(state.collections, action.payload.collectionUid); const collection = findCollectionByUid(state.collections, action.payload.collectionUid);
if (collection && collection.items && collection.items.length) { if (collection && collection.items && collection.items.length) {
@ -1154,7 +1154,7 @@ export const {
requestCancelled, requestCancelled,
responseReceived, responseReceived,
saveRequest, saveRequest,
newEphermalHttpRequest, newEphemeralHttpRequest,
collectionClicked, collectionClicked,
collectionFolderClicked, collectionFolderClicked,
requestUrlChanged, requestUrlChanged,

View File

@ -70,7 +70,7 @@ const darkTheme = {
bg: 'rgb(48, 48, 49)', bg: 'rgb(48, 48, 49)',
hoverBg: '#185387', hoverBg: '#185387',
shadow: 'rgb(0 0 0 / 36%) 0px 2px 8px', shadow: 'rgb(0 0 0 / 36%) 0px 2px 8px',
seperator: '#444', separator: '#444',
labelBg: '#4a4949' labelBg: '#4a4949'
}, },
@ -174,7 +174,7 @@ const darkTheme = {
requestTabs: { requestTabs: {
color: '#ccc', color: '#ccc',
bg: '#2A2D2F', bg: '#2A2D2F',
borromBorder: '#444', bottomBorder: '#444',
icon: { icon: {
color: '#9f9f9f', color: '#9f9f9f',
hoverColor: 'rgb(204, 204, 204)', hoverColor: 'rgb(204, 204, 204)',

View File

@ -70,7 +70,7 @@ const lightTheme = {
bg: '#fff', bg: '#fff',
hoverBg: '#e9e9e9', hoverBg: '#e9e9e9',
shadow: 'rgb(50 50 93 / 25%) 0px 6px 12px -2px, rgb(0 0 0 / 30%) 0px 3px 7px -3px', shadow: 'rgb(50 50 93 / 25%) 0px 6px 12px -2px, rgb(0 0 0 / 30%) 0px 3px 7px -3px',
seperator: '#e7e7e7', separator: '#e7e7e7',
labelBg: '#f3f3f3' labelBg: '#f3f3f3'
}, },
@ -178,7 +178,7 @@ const lightTheme = {
requestTabs: { requestTabs: {
color: 'rgb(52, 52, 52)', color: 'rgb(52, 52, 52)',
bg: '#f7f7f7', bg: '#f7f7f7',
borromBorder: '#efefef', bottomBorder: '#efefef',
icon: { icon: {
color: '#9f9f9f', color: '#9f9f9f',
hoverColor: 'rgb(76 76 76)', hoverColor: 'rgb(76 76 76)',

View File

@ -67,7 +67,7 @@ const openCollection = async (win, watcher, collectionPath, options = {}) => {
} catch (err) { } catch (err) {
if (!options.dontSendDisplayErrors) { if (!options.dontSendDisplayErrors) {
win.webContents.send('main:display-error', { win.webContents.send('main:display-error', {
error: err.message || 'An error occured while opening the local collection' error: err.message || 'An error occurred while opening the local collection'
}); });
} }
} }

View File

@ -7,7 +7,7 @@ const bruToEnvJson = (bru) => {
const json = bruToEnvJsonV2(bru); const json = bruToEnvJsonV2(bru);
// the app env format requires each variable to have a type // the app env format requires each variable to have a type
// this need to be evaulated and safely removed // this need to be evaluated and safely removed
// i don't see it being used in schema validation // i don't see it being used in schema validation
if (json && json.variables && json.variables.length) { if (json && json.variables && json.variables.length) {
each(json.variables, (v) => (v.type = 'text')); each(json.variables, (v) => (v.type = 'text'));

View File

@ -11,7 +11,7 @@ const JS_KEYWORDS = `
.filter((word) => word.length > 0); .filter((word) => word.length > 0);
/** /**
* Creates a function from a Javascript expression * Creates a function from a JavaScript expression
* *
* When the function is called, the variables used in this expression are picked up from the context * When the function is called, the variables used in this expression are picked up from the context
* *
@ -119,7 +119,7 @@ const createResponseParser = (response = {}) => {
}; };
/** /**
* Objects that are created inside vm2 execution context result in an serilaization error when sent to the renderer process * Objects that are created inside vm2 execution context result in an serialization error when sent to the renderer process
* Error sending from webFrameMain: Error: Failed to serialize arguments * Error sending from webFrameMain: Error: Failed to serialize arguments
* at s.send (node:electron/js2c/browser_init:169:631) * at s.send (node:electron/js2c/browser_init:169:631)
* at g.send (node:electron/js2c/browser_init:165:2156) * at g.send (node:electron/js2c/browser_init:165:2156)

View File

@ -66,7 +66,7 @@ const bodyXmlTag = between(bodyXmlBegin)(bodyEnd)(everyCharUntil(bodyEnd)).map((
* We have deprecated form-url-encoded type in body tag, it was a misspelling on my part * We have deprecated form-url-encoded type in body tag, it was a misspelling on my part
* The new type is form-urlencoded * The new type is form-urlencoded
* *
* Very few peope would have used this. I launched this to the public on 22 Jan 2023 * Very few people would have used this. I launched this to the public on 22 Jan 2023
* And I am making the change on 23 Jan 2023 * And I am making the change on 23 Jan 2023
* *
* This deprecated tag can be removed on 1 April 2023 * This deprecated tag can be removed on 1 April 2023

View File

@ -10,7 +10,7 @@ exports.HomePage = class HomePage {
// sample collection // sample collection
this.loadSampleCollectionSuccessToast = page.getByText('Sample Collection loaded successfully'); this.loadSampleCollectionSuccessToast = page.getByText('Sample Collection loaded successfully');
this.sampeCollectionSelector = page.locator('#sidebar-collection-name'); this.sampleCollectionSelector = page.locator('#sidebar-collection-name');
this.getUsersSelector = page.getByText('Users'); this.getUsersSelector = page.getByText('Users');
this.getSingleUserSelector = page.getByText('Single User'); this.getSingleUserSelector = page.getByText('Single User');
this.getUserNotFoundSelector = page.getByText('User Not Found'); this.getUserNotFoundSelector = page.getByText('User Not Found');
@ -43,7 +43,7 @@ exports.HomePage = class HomePage {
} }
async getUsers() { async getUsers() {
await this.sampeCollectionSelector.click(); await this.sampleCollectionSelector.click();
await this.getUsersSelector.click(); await this.getUsersSelector.click();
await this.sendRequestButton.click(); await this.sendRequestButton.click();
} }