Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
GoFightNguyen authored Nov 13, 2022
2 parents e97f19b + 18597dd commit 791e322
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-vault",
"version": "0.9.21",
"version": "0.9.22",
"description": "Javascript client for HashiCorp's Vault",
"main": "./src/index.js",
"scripts": {
Expand Down
20 changes: 10 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

let debug = require('debug')('node-vault');
let tv4 = require('tv4');
let commands = require('./commands.js');
let mustache = require('mustache');
let rp = require('request-promise-native');
const originalDebug = require('debug')('node-vault');
const originalTv4 = require('tv4');
const originalCommands = require('./commands.js');
const originalMustache = require('mustache');
const originalRp = require('request-promise-native');

class VaultError extends Error {}

Expand All @@ -20,10 +20,10 @@ class ApiResponseError extends VaultError {

module.exports = (config = {}) => {
// load conditional dependencies
debug = config.debug || debug;
tv4 = config.tv4 || tv4;
commands = config.commands || commands;
mustache = config.mustache || mustache;
const debug = config.debug || originalDebug;
const tv4 = config.tv4 || originalTv4;
const commands = config.commands || originalCommands;
const mustache = config.mustache || originalMustache;

const rpDefaults = {
json: true,
Expand All @@ -38,7 +38,7 @@ module.exports = (config = {}) => {
});
}

rp = (config['request-promise'] || rp).defaults(rpDefaults);
const rp = (config['request-promise'] || originalRp).defaults(rpDefaults);
const client = {};

function handleVaultResponse(response) {
Expand Down

0 comments on commit 791e322

Please sign in to comment.