Skip to content

Commit

Permalink
Merge branch 'main' into add/draft-for-collection-and-folder-2
Browse files Browse the repository at this point in the history
  • Loading branch information
pooja-bruno authored Jan 20, 2025
2 parents 94f155a + fee631d commit 57ae4ee
Show file tree
Hide file tree
Showing 65 changed files with 1,332 additions and 388 deletions.
137 changes: 133 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions packages/bruno-app/rsbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,16 @@ export default defineConfig({
html: {
title: 'Bruno'
},
tools: {
rspack: {
module: {
parser: {
javascript: {
// This loads the JavaScript contents from a library along with the main JavaScript bundle.
dynamicImportMode: "eager",
},
},
},
},
}
});
6 changes: 3 additions & 3 deletions packages/bruno-app/src/components/CodeEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

import React from 'react';
import { isEqual, escapeRegExp } from 'lodash';
import { getEnvironmentVariables } from 'utils/collections';
import { defineCodeMirrorBrunoVariablesMode } from 'utils/common/codemirror';
import StyledWrapper from './StyledWrapper';
import * as jsonlint from '@prantlf/jsonlint';
import { JSHINT } from 'jshint';
import stripJsonComments from 'strip-json-comments';
import { getAllVariables } from 'utils/collections';

let CodeMirror;
const SERVER_RENDERED = typeof window === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true;
Expand Down Expand Up @@ -293,7 +293,7 @@ export default class CodeEditor extends React.Component {
}

if (this.editor) {
let variables = getEnvironmentVariables(this.props.collection);
let variables = getAllVariables(this.props.collection, this.props.item);
if (!isEqual(variables, this.variables)) {
this.addOverlay();
}
Expand Down Expand Up @@ -333,7 +333,7 @@ export default class CodeEditor extends React.Component {

addOverlay = () => {
const mode = this.props.mode || 'application/ld+json';
let variables = getEnvironmentVariables(this.props.collection);
let variables = getAllVariables(this.props.collection, this.props.item);
this.variables = variables;

defineCodeMirrorBrunoVariablesMode(variables, mode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ const AuthMode = ({ collection }) => {
>
Digest Auth
</div>
<div
className="dropdown-item"
onClick={() => {
dropdownTippyRef.current.hide();
onModeChange('ntlm');
}}
>
NTLM Auth
</div>
<div
className="dropdown-item"
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import styled from 'styled-components';

const Wrapper = styled.div`
label {
font-size: 0.8125rem;
}
.single-line-editor-wrapper {
max-width: 400px;
padding: 0.15rem 0.4rem;
border-radius: 3px;
border: solid 1px ${(props) => props.theme.input.border};
background-color: ${(props) => props.theme.input.bg};
}
`;

export default Wrapper;
Loading

0 comments on commit 57ae4ee

Please sign in to comment.