@zowe/imperative
Version:
framework for building configurable CLIs
84 lines • 2.84 kB
JavaScript
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoggerUtils = void 0;
const Censor_1 = require("../../censor/src/Censor");
/**
* @deprecated Use Censor
* Logging utilities
*/
class LoggerUtils {
/**
* Copy and censor any sensitive CLI arguments before logging/printing
* @param {string[]} args
* @returns {string[]}
* @deprecated Use Censor.censorCLIArgs
*/
static censorCLIArgs(args) {
return Censor_1.Censor.censorCLIArgs(args);
}
/**
* Copy and censor a yargs argument object before logging
* @param {yargs.Arguments} args the args to censor
* @returns {yargs.Arguments} a censored copy of the arguments
* @deprecated Use Censor.censorYargsArguments
*/
static censorYargsArguments(args) {
return Censor_1.Censor.censorYargsArguments(args);
}
/**
* @deprecated use Censor.profileSchemas
*/
static get profileSchemas() {
return Censor_1.Censor.profileSchemas;
}
/**
* @deprecated use Censor.setProfileSchemas
*/
static setProfileSchemas(_schemas) {
Censor_1.Censor.setProfileSchemas(_schemas);
}
/**
* Copy and censor any sensitive CLI arguments before logging/printing
* @param {string} data
* @returns {string}
* @deprecated Use Censor.censorRawData
*/
static censorRawData(data, category = "") {
return Censor_1.Censor.censorRawData(data, category);
}
}
exports.LoggerUtils = LoggerUtils;
/**
* @deprecated Use Censor.CENSOR_RESPONSE
*/
LoggerUtils.CENSOR_RESPONSE = Censor_1.Censor.CENSOR_RESPONSE;
/**
* @deprecated Use Censor.CENSORED_OPTIONS
*/
LoggerUtils.CENSORED_OPTIONS = Censor_1.Censor.CENSORED_OPTIONS;
/**
* @deprecated Use Censor.SECURE_PROMPT_OPTIONS
*/
LoggerUtils.SECURE_PROMPT_OPTIONS = Censor_1.Censor.SECURE_PROMPT_OPTIONS;
/**
* Specifies whether a given property path (e.g. "profiles.lpar1.properties.host") is a special value or not.
* Special value: Refers to any value defined as secure in the schema definition.
* These values should be already masked by the application (and/or plugin) developer.
* @param prop Property path to determine if it is a special value
* @returns True - if the given property is to be treated as a special value; False - otherwise
* @deprecated Use Censor.isSpecialValue
*/
LoggerUtils.isSpecialValue = (prop) => {
return Censor_1.Censor.isSpecialValue(prop);
};
//# sourceMappingURL=LoggerUtils.js.map
;