Skip to content

Commit 1d3cbd2

Browse files
authored
Merge branch 'usebruno:main' into feat/digest-auth-updates
2 parents 907f6a1 + 42ada4a commit 1d3cbd2

File tree

25 files changed

+572
-380
lines changed

25 files changed

+572
-380
lines changed

.github/workflows/npm-bru-cli.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Bru CLI Tests (npm)
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
build:
7+
description: 'Test Bru CLI (npm)'
8+
required: true
9+
default: 'true'
510

611
# Assign permissions for unit tests to be reported.
712
# See https://github.com/dorny/test-reporter/issues/168

package-lock.json

Lines changed: 426 additions & 304 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/bruno-app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@
3535
"graphql": "^16.6.0",
3636
"graphql-request": "^3.7.0",
3737
"httpsnippet": "^3.0.6",
38-
"i18next": "^23.14.0",
38+
"i18next": "24.1.2",
3939
"idb": "^7.0.0",
4040
"immer": "^9.0.15",
4141
"jsesc": "^3.0.2",
4242
"jshint": "^2.13.6",
4343
"json5": "^2.2.3",
4444
"jsonc-parser": "^3.2.1",
45-
"jsonpath-plus": "10.1.0",
45+
"jsonpath-plus": "10.2.0",
4646
"know-your-http-well": "^0.5.0",
4747
"lodash": "^4.17.21",
4848
"markdown-it": "^13.0.2",
4949
"markdown-it-replace-link": "^1.2.0",
5050
"mousetrap": "^1.6.5",
51-
"nanoid": "3.3.4",
51+
"nanoid": "3.3.8",
5252
"path": "^0.12.7",
5353
"pdfjs-dist": "4.4.168",
5454
"platform": "^1.3.6",

packages/bruno-app/src/components/Environments/EnvironmentSelector/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const EnvironmentSelector = ({ collection }) => {
1919
const Icon = forwardRef((props, ref) => {
2020
return (
2121
<div ref={ref} className="current-environment flex items-center justify-center pl-3 pr-2 py-1 select-none">
22-
{activeEnvironment ? activeEnvironment.name : 'No Environment'}
22+
<p className="text-nowrap truncate max-w-32">{activeEnvironment ? activeEnvironment.name : 'No Environment'}</p>
2323
<IconCaretDown className="caret" size={14} strokeWidth={2} />
2424
</div>
2525
);

packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/StyledWrapper.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ const StyledWrapper = styled.div`
2323
padding: 8px 10px;
2424
border-left: solid 2px transparent;
2525
text-decoration: none;
26+
max-width: 200px;
27+
overflow: hidden;
28+
text-overflow: ellipsis;
29+
white-space: nowrap;
2630
2731
&:hover {
2832
text-decoration: none;

packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import ImportEnvironment from '../ImportEnvironment';
88
import ManageSecrets from '../ManageSecrets';
99
import StyledWrapper from './StyledWrapper';
1010
import ConfirmSwitchEnv from './ConfirmSwitchEnv';
11+
import ToolHint from 'components/ToolHint';
1112

1213
const EnvironmentList = ({ selectedEnvironment, setSelectedEnvironment, collection, isModified, setIsModified }) => {
1314
const { environments } = collection;
@@ -103,13 +104,15 @@ const EnvironmentList = ({ selectedEnvironment, setSelectedEnvironment, collecti
103104
{environments &&
104105
environments.length &&
105106
environments.map((env) => (
106-
<div
107-
key={env.uid}
108-
className={selectedEnvironment.uid === env.uid ? 'environment-item active' : 'environment-item'}
109-
onClick={() => handleEnvironmentClick(env)} // Use handleEnvironmentClick to handle clicks
110-
>
111-
<span className="break-all">{env.name}</span>
112-
</div>
107+
<ToolHint key={env.uid} text={env.name} toolhintId={env.uid} place="right">
108+
<div
109+
id={env.uid}
110+
className={selectedEnvironment.uid === env.uid ? 'environment-item active' : 'environment-item'}
111+
onClick={() => handleEnvironmentClick(env)} // Use handleEnvironmentClick to handle clicks
112+
>
113+
<span className="break-all">{env.name}</span>
114+
</div>
115+
</ToolHint>
113116
))}
114117
<div className="btn-create-environment" onClick={() => handleCreateEnvClick()}>
115118
+ <span>Create</span>

packages/bruno-app/src/components/RequestPane/Assertions/AssertionRow/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const parseAssertionOperator = (str = '') => {
9090
'isArray'
9191
];
9292

93-
const [operator, ...rest] = str.trim().split(' ');
93+
const [operator, ...rest] = str.split(' ');
9494
const value = rest.join(' ');
9595

9696
if (unaryOperators.includes(operator)) {
@@ -166,7 +166,7 @@ const AssertionRow = ({
166166
handleAssertionChange(
167167
{
168168
target: {
169-
value: `${op} ${value}`
169+
value: isUnaryOperator(op) ? op : `${op} ${value}`
170170
}
171171
},
172172
assertion,
@@ -182,7 +182,7 @@ const AssertionRow = ({
182182
theme={storedTheme}
183183
readOnly={true}
184184
onSave={onSave}
185-
onChange={(newValue) =>
185+
onChange={(newValue) => {
186186
handleAssertionChange(
187187
{
188188
target: {
@@ -192,6 +192,7 @@ const AssertionRow = ({
192192
assertion,
193193
'value'
194194
)
195+
}
195196
}
196197
onRun={handleRun}
197198
collection={collection}

packages/bruno-app/src/components/RequestPane/QueryParams/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ const QueryParams = ({ item, collection }) => {
117117
<StyledWrapper className="w-full flex flex-col absolute">
118118
<div className="flex-1 mt-2">
119119
<div className="mb-1 title text-xs">Query</div>
120-
121120
<Table
122121
headers={[
123122
{ name: 'Name', accessor: 'name', width: '31%' },
@@ -153,7 +152,7 @@ const QueryParams = ({ item, collection }) => {
153152
/>
154153
</td>
155154
<td>
156-
<div className="flex items-center">
155+
<div className="flex items-center justify-center">
157156
<input
158157
type="checkbox"
159158
checked={param.enabled}
@@ -188,7 +187,7 @@ const QueryParams = ({ item, collection }) => {
188187
</code>
189188
</div>
190189
`}
191-
infotipId="path-param-InfoTip"
190+
infotipId="path-param-InfoTip"
192191
/>
193192
</div>
194193
<table>
@@ -241,11 +240,7 @@ const QueryParams = ({ item, collection }) => {
241240
: null}
242241
</tbody>
243242
</table>
244-
{!(pathParams && pathParams.length) ?
245-
<div className="title pr-2 py-3 mt-2 text-xs">
246-
247-
</div>
248-
: null}
243+
{!(pathParams && pathParams.length) ? <div className="title pr-2 py-3 mt-2 text-xs"></div> : null}
249244
</div>
250245
</StyledWrapper>
251246
);

packages/bruno-app/src/components/RequestTabPanel/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@ const RequestTabPanel = () => {
3939
const _collections = useSelector((state) => state.collections.collections);
4040

4141
// merge `globalEnvironmentVariables` into the active collection and rebuild `collections` immer proxy object
42-
let collections = produce(_collections, draft => {
42+
let collections = produce(_collections, (draft) => {
4343
let collection = find(draft, (c) => c.uid === focusedTab?.collectionUid);
4444

4545
if (collection) {
4646
// add selected global env variables to the collection object
47-
const globalEnvironmentVariables = getGlobalEnvironmentVariables({ globalEnvironments, activeGlobalEnvironmentUid });
47+
const globalEnvironmentVariables = getGlobalEnvironmentVariables({
48+
globalEnvironments,
49+
activeGlobalEnvironmentUid
50+
});
4851
const globalEnvSecrets = getGlobalEnvironmentVariablesMasked({ globalEnvironments, activeGlobalEnvironmentUid });
4952
collection.globalEnvironmentVariables = globalEnvironmentVariables;
5053
collection.globalEnvSecrets = globalEnvSecrets;

packages/bruno-app/src/components/ResponsePane/QueryResult/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ const formatResponse = (data, mode, filter) => {
2020
}
2121

2222
if (data === null) {
23-
return data;
23+
return 'null';
2424
}
2525

2626
if (mode.includes('json')) {
2727
let isValidJSON = false;
2828

2929
try {
30-
isValidJSON = typeof JSON.parse(JSON.stringify(data)) === 'object';
30+
isValidJSON = typeof JSON.parse(JSON.stringify(data)) === 'object'
3131
} catch (error) {
3232
console.log('Error parsing JSON: ', error.message);
3333
}

0 commit comments

Comments
 (0)