mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
refactor: comment out unused APIs (#7323)
* refactor: comment out unused API hints in autocomplete.js * refactor: comment out unused API translations in postman and bruno translators Temporarily disable certain API translations due to UI update issues affecting their functionality. A note has been added to restore these translations once the UI fixes are implemented. * refactor: temporarily skip tests for collection variable translations due to UI update issues Commented out tests related to `setCollectionVar`, `deleteCollectionVar`, and related functionalities until the necessary UI updates are implemented. A note has been added to restore these tests once the fixes are live. * refactor: comment out variable deletion and retrieval methods due to UI sync issues * revert: ping.bru * refactor: update postman translation tests to enable previously skipped cases
This commit is contained in:
@@ -257,21 +257,25 @@ class Bru {
|
||||
this.globalEnvironmentVariables[key] = value;
|
||||
}
|
||||
|
||||
deleteGlobalEnvVar(key) {
|
||||
delete this.globalEnvironmentVariables[key];
|
||||
}
|
||||
// TODO: deleteGlobalEnvVar works in the request lifecycle but does not update the UI.
|
||||
// Re-enable once the UI sync issue is resolved.
|
||||
// deleteGlobalEnvVar(key) {
|
||||
// delete this.globalEnvironmentVariables[key];
|
||||
// }
|
||||
|
||||
getAllGlobalEnvVars() {
|
||||
return Object.assign({}, this.globalEnvironmentVariables);
|
||||
}
|
||||
|
||||
deleteAllGlobalEnvVars() {
|
||||
for (let key in this.globalEnvironmentVariables) {
|
||||
if (this.globalEnvironmentVariables.hasOwnProperty(key)) {
|
||||
delete this.globalEnvironmentVariables[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: deleteAllGlobalEnvVars works in the request lifecycle but does not update the UI.
|
||||
// Re-enable once the UI sync issue is resolved.
|
||||
// deleteAllGlobalEnvVars() {
|
||||
// for (let key in this.globalEnvironmentVariables) {
|
||||
// if (this.globalEnvironmentVariables.hasOwnProperty(key)) {
|
||||
// delete this.globalEnvironmentVariables[key];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
getOauth2CredentialVar(key) {
|
||||
return this.interpolate(this.oauth2CredentialVariables[key]);
|
||||
@@ -345,40 +349,48 @@ class Bru {
|
||||
return this.interpolate(this.collectionVariables[key]);
|
||||
}
|
||||
|
||||
setCollectionVar(key, value) {
|
||||
if (!key) {
|
||||
throw new Error('Creating a variable without specifying a name is not allowed.');
|
||||
}
|
||||
|
||||
if (variableNameRegex.test(key) === false) {
|
||||
throw new Error(
|
||||
`Variable name: "${key}" contains invalid characters!`
|
||||
+ ' Names must only contain alpha-numeric characters, "-", "_", "."'
|
||||
);
|
||||
}
|
||||
|
||||
this.collectionVariables[key] = value;
|
||||
}
|
||||
// TODO: setCollectionVar works in the request lifecycle but does not update the UI.
|
||||
// Re-enable once the UI sync issue is resolved.
|
||||
// setCollectionVar(key, value) {
|
||||
// if (!key) {
|
||||
// throw new Error('Creating a variable without specifying a name is not allowed.');
|
||||
// }
|
||||
//
|
||||
// if (variableNameRegex.test(key) === false) {
|
||||
// throw new Error(
|
||||
// `Variable name: "${key}" contains invalid characters!`
|
||||
// + ' Names must only contain alpha-numeric characters, "-", "_", "."'
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// this.collectionVariables[key] = value;
|
||||
// }
|
||||
|
||||
hasCollectionVar(key) {
|
||||
return Object.hasOwn(this.collectionVariables, key);
|
||||
}
|
||||
|
||||
deleteCollectionVar(key) {
|
||||
delete this.collectionVariables[key];
|
||||
}
|
||||
// TODO: deleteCollectionVar works in the request lifecycle but does not update the UI.
|
||||
// Re-enable once the UI sync issue is resolved.
|
||||
// deleteCollectionVar(key) {
|
||||
// delete this.collectionVariables[key];
|
||||
// }
|
||||
|
||||
deleteAllCollectionVars() {
|
||||
for (let key in this.collectionVariables) {
|
||||
if (this.collectionVariables.hasOwnProperty(key)) {
|
||||
delete this.collectionVariables[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: deleteAllCollectionVars works in the request lifecycle but does not update the UI.
|
||||
// Re-enable once the UI sync issue is resolved.
|
||||
// deleteAllCollectionVars() {
|
||||
// for (let key in this.collectionVariables) {
|
||||
// if (this.collectionVariables.hasOwnProperty(key)) {
|
||||
// delete this.collectionVariables[key];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
getAllCollectionVars() {
|
||||
return Object.assign({}, this.collectionVariables);
|
||||
}
|
||||
// TODO: getAllCollectionVars works in the request lifecycle but does not update the UI.
|
||||
// Re-enable once the UI sync issue is resolved.
|
||||
// getAllCollectionVars() {
|
||||
// return Object.assign({}, this.collectionVariables);
|
||||
// }
|
||||
|
||||
getFolderVar(key) {
|
||||
return this.interpolate(this.folderVariables[key]);
|
||||
|
||||
Reference in New Issue
Block a user