mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
Import WSDL to collection (#5015)
* Import WSDL to bruno collection * feat(wsdl-import): remove unused code and minor refactor --------- Co-authored-by: Bijin Bruno <bijin@usebruno.com>
This commit is contained in:
@@ -54,7 +54,7 @@ export const safeStringifyJSON = (obj, indent = false) => {
|
||||
|
||||
export const prettifyJSON = (obj, spaces = 2) => {
|
||||
try {
|
||||
const text = obj.replace(/\\"/g, '"').replace(/\\'/g, "'");
|
||||
const text = obj.replace(/\\"/g, '"').replace(/\\'/g, '\'');
|
||||
|
||||
const placeholders = [];
|
||||
const modifiedJson = text.replace(/"[^"]*?"|{{[^{}]+}}/g, (match) => {
|
||||
|
||||
@@ -102,7 +102,6 @@ export class MaskedEditor {
|
||||
|
||||
// Restore cursor state
|
||||
this.restoreCursorState();
|
||||
|
||||
} finally {
|
||||
this.isProcessing = false;
|
||||
}
|
||||
@@ -135,7 +134,6 @@ export class MaskedEditor {
|
||||
|
||||
// Restore cursor state
|
||||
this.restoreCursorState();
|
||||
|
||||
} finally {
|
||||
this.isProcessing = false;
|
||||
}
|
||||
@@ -331,15 +329,13 @@ export class MaskedEditor {
|
||||
const maskedNode = document.createTextNode(this.maskChar.repeat(lineLength));
|
||||
|
||||
// Create mark with proper bounds checking
|
||||
const mark = this.editor.markText(
|
||||
{ line, ch: 0 },
|
||||
const mark = this.editor.markText({ line, ch: 0 },
|
||||
{ line, ch: lineLength },
|
||||
{
|
||||
replacedWith: maskedNode,
|
||||
handleMouseEvents: false,
|
||||
className: 'masked-line'
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
// Store mark for cleanup
|
||||
this.marks.add(mark);
|
||||
@@ -355,7 +351,7 @@ export class MaskedEditor {
|
||||
* Clear all marks with proper cleanup
|
||||
*/
|
||||
clearAllMarks() {
|
||||
this.marks.forEach(mark => {
|
||||
this.marks.forEach((mark) => {
|
||||
try {
|
||||
mark.clear();
|
||||
} catch (e) {
|
||||
@@ -365,7 +361,7 @@ export class MaskedEditor {
|
||||
this.marks.clear();
|
||||
|
||||
// Also clear any marks that might have been created outside our control
|
||||
this.editor.getAllMarks().forEach(mark => {
|
||||
this.editor.getAllMarks().forEach((mark) => {
|
||||
try {
|
||||
mark.clear();
|
||||
} catch (e) {
|
||||
@@ -437,8 +433,8 @@ export function createMaskedEditor(editor, maskChar = '*') {
|
||||
* Utility function to check if an editor supports masking
|
||||
*/
|
||||
export function supportsMasking(editor) {
|
||||
return editor &&
|
||||
typeof editor.getValue === 'function' &&
|
||||
typeof editor.markText === 'function' &&
|
||||
typeof editor.operation === 'function';
|
||||
}
|
||||
return editor
|
||||
&& typeof editor.getValue === 'function'
|
||||
&& typeof editor.markText === 'function'
|
||||
&& typeof editor.operation === 'function';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user