* Loads the JSON file containing secure values replacement rules. * This might be necessary to hide sensitive values that may possibly * appear in Appium logs. * Each call to this method replaces the previously loaded rules if any existed. * * @param {string|string[]|LogFiltersConfig}
(
rulesJsonPath: string | string[] | LogFiltersConfig,
)
| 260 | * @returns {Promise<PreprocessingRulesLoadResult>} |
| 261 | */ |
| 262 | async loadSecureValuesPreprocessingRules( |
| 263 | rulesJsonPath: string | string[] | LogFiltersConfig, |
| 264 | ): Promise<PreprocessingRulesLoadResult> { |
| 265 | const issues = await this._secureValuesPreprocessor.loadRules(rulesJsonPath); |
| 266 | return { |
| 267 | issues, |
| 268 | rules: structuredClone(this._secureValuesPreprocessor.rules), |
| 269 | }; |
| 270 | } |
| 271 | |
| 272 | private useColor(stream: Writable | null): boolean { |
| 273 | // by default, decide based on tty-ness. |