chore(#673): remove obsolete mustache.js library (#674)

Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
This commit is contained in:
Jonathan Gruber 2024-09-04 20:54:09 +02:00 committed by GitHub
parent a10e6ee858
commit bcc8811f65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 19 deletions

4
package-lock.json generated
View File

@ -18567,7 +18567,6 @@
"inquirer": "^9.1.4",
"json-bigint": "^1.0.0",
"lodash": "^4.17.21",
"mustache": "^4.2.0",
"qs": "^6.11.0",
"socks-proxy-agent": "^8.0.2",
"vm2": "^3.9.13",
@ -18622,7 +18621,7 @@
},
"packages/bruno-electron": {
"name": "bruno",
"version": "v1.27.0",
"version": "v1.28.0",
"dependencies": {
"@aws-sdk/credential-providers": "3.525.0",
"@usebruno/common": "0.1.0",
@ -18653,7 +18652,6 @@
"json-bigint": "^1.0.0",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"mustache": "^4.2.0",
"nanoid": "3.3.4",
"qs": "^6.11.0",
"socks-proxy-agent": "^8.0.2",

View File

@ -40,7 +40,6 @@
"inquirer": "^9.1.4",
"json-bigint": "^1.0.0",
"lodash": "^4.17.21",
"mustache": "^4.2.0",
"qs": "^6.11.0",
"socks-proxy-agent": "^8.0.2",
"vm2": "^3.9.13",

View File

@ -1,12 +1,6 @@
const _ = require('lodash');
const Mustache = require('mustache');
const { bruToEnvJsonV2, bruToJsonV2, collectionBruToJson: _collectionBruToJson } = require('@usebruno/lang');
// override the default escape function to prevent escaping
Mustache.escape = function (value) {
return value;
};
const collectionBruToJson = (bru) => {
try {
const json = _collectionBruToJson(bru);
@ -95,7 +89,7 @@ const getEnvVars = (environment = {}) => {
const envVars = {};
_.each(variables, (variable) => {
if (variable.enabled) {
envVars[variable.name] = Mustache.escape(variable.value);
envVars[variable.name] = variable.value;
}
});

View File

@ -51,7 +51,6 @@
"json-bigint": "^1.0.0",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"mustache": "^4.2.0",
"nanoid": "3.3.4",
"qs": "^6.11.0",
"socks-proxy-agent": "^8.0.2",

View File

@ -6,7 +6,6 @@ const tls = require('tls');
const axios = require('axios');
const path = require('path');
const decomment = require('decomment');
const Mustache = require('mustache');
const contentDispositionParser = require('content-disposition');
const mime = require('mime-types');
const { ipcMain } = require('electron');
@ -39,11 +38,6 @@ const {
const Oauth2Store = require('../../store/oauth2');
const iconv = require('iconv-lite');
// override the default escape function to prevent escaping
Mustache.escape = function (value) {
return value;
};
const safeStringifyJSON = (data) => {
try {
return JSON.stringify(data);
@ -71,7 +65,7 @@ const getEnvVars = (environment = {}) => {
const envVars = {};
each(variables, (variable) => {
if (variable.enabled) {
envVars[variable.name] = Mustache.escape(variable.value);
envVars[variable.name] = variable.value;
}
});