/** Type. Alias to any, mainly so the intent is obvious when this is used. */ declare type DebugFunc = any; /** * @class SfdxFalconDebug * @summary Provides custom "debugging" services (ie. debug-style info to console.log()). * @description Provides custom "debugging" services (ie. debug-style info to console.log()). * @public */ export declare class SfdxFalconDebug { static lineBreaks: number; static debugDepth: number; static readonly enabledDebugNamespaceCount: number; /** * @method checkEnabled * @param {string} namespace Required. The "namespace" of a debug object. * @returns {boolean} Returns TRUE if the namespace has been enabled. * @description Given a "namespace", check the internal map of "enabled" * namespaces and return true if a match is found. * @public @static */ static checkEnabled(namespace: string): boolean; /** * @method enableDebuggers * @param {Array} namespaces Required. An array of strings, * each representing a namespace that should be enabled. * @param {number} [debugDepth] Optional. The number of levels "deep" * that the nested contents of an Object will be rendered during * certain display operations. * @returns {void} * @description Given an Array of strings, add an entry in the Enabled Debuggers * map. This means that when debug code is reached during execution * any enabled debug messages will be displayed to the user. * @public @static */ static enableDebuggers(namespaces: string[], debugDepth?: number): void; /** * @method debugMessage * @param {string} namespace Required. * @param {string} message Required. * @returns {void} * @description Given a debug namespace and a string containing a message, * outputs that message to the console. * @public @static */ static debugMessage(namespace: string, message: string): void; /** * @method debugObject * @param {string} namespace Required. * @param {object} objToDebug Required. * @param {string} [strLead] Optional * @param {string} [strTail] Optional * @returns {void} * @description Given a debug namespace, an object to debug, and optionally * leading and trailing strings to included in the output, sends * the debug output to the console. * @public @static */ static debugObject(namespace: string, objToDebug: object, strLead?: string, strTail?: string): void; /** * @method debugString * @param {string} namespace Required. * @param {string} strToDebug Required. * @param {string} [strLead] Optional * @param {string} [strTail] Optional * @returns {void} * @description Given a debug namespace, a string to debug, and optionally * leading and trailing strings to included in the output, sends * the debug output to the console. * @public @static */ static debugString(namespace: string, strToDebug: string, strLead?: string, strTail?: string): void; /** * @method disableDebuggers * @param {string[]} namespaces Required. * @returns {void} * @description Given an array of debug namespaces, iterates over each and * sets them to FALSE in the Enabled Debugger Namespace map. * @public @static */ static disableDebuggers(namespaces: string[]): void; /** * @method getDebugger * @param {string} namespace Required * @returns {DebugFunc} Returns the debugger with the appropriate namespace. * @description Given a debug namespace (eg. "UTILITY:sfdx:executeCommand:"), * attempts to find a match for an existing Debugger object. If * one can't be found, creates a new Debugger, enables it, then * returns it to the caller. * @public @static */ static getDebugger(namespace: string): DebugFunc; /** * @method msg * @param {string} namespace Required. * @param {string} message Required. * @returns {void} * @description Given a debug namespace and a string containing a message, * outputs that message to the console but ONLY if the specified * namespace was enabled by the user via the --falcondebug flag. * @public @static */ static msg(namespace: string, message: string): void; /** * @method obj * @param {string} namespace Required. * @param {object} objToDebug Required. * @param {string} [strLead] Optional * @param {string} [strTail] Optional * @returns {void} * @description Given a debug namespace, an object to debug, and optionally * leading and trailing strings to included in the output, sends * the debug output to the console but ONLY if the specified * namespace was enabled by the user via the --falcondebug flag. * @public @static */ static obj(namespace: string, objToDebug: object, strLead?: string, strTail?: string): void; /** * @method str * @param {string} namespace Required. * @param {string} strToDebug Required. * @param {string} [strLead] Optional * @param {string} [strTail] Optional * @returns {void} * @description Given a debug namespace, a string to debug, and optionally * leading and trailing strings to included in the output, sends * the debug output to the console but ONLY if the specified * namespace was enabled by the user via the --falcondebug flag. * @public @static */ static str(namespace: string, strToDebug: string, strLead?: string, strTail?: string): void; /** * @method toConsole * @param {string} message Required. Message to send to console.log(). * @param {number} [lineBreaks] Optional. The number of line breaks * to insert before and after the message. * @description Sends a message to console.log that's pre and post-pended * with newline breaks to help the output be easy to see. * @public @static */ static toConsole(message: string, lineBreaks?: number): void; private static debuggers; private static enabledDebugNamespaces; /** * @method printLineBreaks * @param {string} breakPattern Required. The string that will be used * to create the line breaks. This must contain a `/n` (newline) * character or no line breaks will occur. * @param {number} [lineBreaks] Optional. The number of line breaks * to insert. If not provided, the Global Static value will be * used. * @description Returns a string containing the number of newline chars as * specified in the lineBreaks public static member variable. * @private @static */ private static printLineBreaks; } export {};