mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-27 18:33:07 +01:00
Revert "fix: BigInters are now correctly shown in the response (#2736)"
This reverts commit 3e2a3b65a4
.
This commit is contained in:
parent
92073e7573
commit
7cb6c81566
@ -1,6 +1,5 @@
|
|||||||
import { customAlphabet } from 'nanoid';
|
import { customAlphabet } from 'nanoid';
|
||||||
import xmlFormat from 'xml-formatter';
|
import xmlFormat from 'xml-formatter';
|
||||||
import { stringify } from 'lossless-json';
|
|
||||||
|
|
||||||
// a customized version of nanoid without using _ and -
|
// a customized version of nanoid without using _ and -
|
||||||
export const uuid = () => {
|
export const uuid = () => {
|
||||||
@ -44,9 +43,9 @@ export const safeStringifyJSON = (obj, indent = false) => {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (indent) {
|
if (indent) {
|
||||||
return stringify(obj, null, 2);
|
return JSON.stringify(obj, null, 2);
|
||||||
}
|
}
|
||||||
return stringify(obj);
|
return JSON.stringify(obj);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"json-bigint": "^1.0.0",
|
"json-bigint": "^1.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"lossless-json": "^4.0.1",
|
|
||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
"mustache": "^4.2.0",
|
"mustache": "^4.2.0",
|
||||||
"nanoid": "3.3.4",
|
"nanoid": "3.3.4",
|
||||||
|
@ -38,7 +38,6 @@ const {
|
|||||||
} = require('./oauth2-helper');
|
} = require('./oauth2-helper');
|
||||||
const Oauth2Store = require('../../store/oauth2');
|
const Oauth2Store = require('../../store/oauth2');
|
||||||
const iconv = require('iconv-lite');
|
const iconv = require('iconv-lite');
|
||||||
const { parse, LosslessNumber } = require('lossless-json');
|
|
||||||
|
|
||||||
// override the default escape function to prevent escaping
|
// override the default escape function to prevent escaping
|
||||||
Mustache.escape = function (value) {
|
Mustache.escape = function (value) {
|
||||||
@ -286,11 +285,7 @@ const parseDataFromResponse = (response) => {
|
|||||||
// Filter out ZWNBSP character
|
// Filter out ZWNBSP character
|
||||||
// https://gist.github.com/antic183/619f42b559b78028d1fe9e7ae8a1352d
|
// https://gist.github.com/antic183/619f42b559b78028d1fe9e7ae8a1352d
|
||||||
data = data.replace(/^\uFEFF/, '');
|
data = data.replace(/^\uFEFF/, '');
|
||||||
data = parse(data, null, (value) => {
|
data = JSON.parse(data);
|
||||||
// By default, this will return the LosslessNumber object, but because it's passed into ipc we
|
|
||||||
// need to convert it into a number because LosslessNumber is converted into an object
|
|
||||||
return new LosslessNumber(value).valueOf();
|
|
||||||
});
|
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
return { data, dataBuffer };
|
return { data, dataBuffer };
|
||||||
|
Loading…
Reference in New Issue
Block a user