@mongosh/history
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -7,5 +7,6 @@ "use strict"; | ||
var mongodb_redact_1 = __importDefault(require("mongodb-redact")); | ||
var redact_pwd_1 = __importDefault(require("./redact-pwd")); | ||
function changeHistory(history, redact) { | ||
if (redact === void 0) { redact = false; } | ||
var hiddenCommands = RegExp('createUser|auth|updateUser|changeUserPassword', 'g'); | ||
var hiddenCommands = RegExp('createUser|auth|updateUser|changeUserPassword|connect', 'g'); | ||
if (hiddenCommands.test(history[0])) { | ||
@@ -15,2 +16,6 @@ history.shift(); | ||
} | ||
if (/Mongo\(([^+)]+)\)/g.test(history[0])) { | ||
history[0] = history[0].replace(/Mongo\(([^+)]+)\)/g, function (substr) { return redact_pwd_1.default(substr); }); | ||
return; | ||
} | ||
if (redact) | ||
@@ -17,0 +22,0 @@ history[0] = mongodb_redact_1.default(history[0]); |
export * from './history'; | ||
import retractPassword from './redact-pwd'; | ||
export { retractPassword }; |
@@ -5,4 +5,9 @@ "use strict"; | ||
} | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./history")); | ||
var redact_pwd_1 = __importDefault(require("./redact-pwd")); | ||
exports.retractPassword = redact_pwd_1.default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@mongosh/history", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "MongoDB Shell History Package", | ||
@@ -31,3 +31,3 @@ "main": "./lib/index.js", | ||
}, | ||
"gitHead": "7a6a8f99826094d2e449d6b8273f07a41b501db2" | ||
"gitHead": "169e0d00bc4153b5687551e44cdd259afded699b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15465
14
46