UNPKG

@salesforce/plugin-info

Version:

Plugin for accessing cli info from the command line

49 lines (48 loc) 1.6 kB
import { Interfaces } from '@oclif/core'; import { SfDoctor } from './doctor.js'; export type DiagnosticStatus = { testName: string; status: 'pass' | 'fail' | 'warn' | 'unknown'; }; /** * Diagnostics are all the tests that ensure a known, clean CLI configuration * and a way to run them asynchronously. Typically this is used only by the * Doctor class. * * Create a new diagnostic test by adding a method to the `Diagnostics` class, * appending "Check" to the name. Emit a "Doctor:diagnostic" event with a * `DiagnosticStatus` payload so the CLI can report on the diagnostic result. */ export declare class Diagnostics { private readonly doctor; private config; private diagnosis; constructor(doctor: SfDoctor, config: Interfaces.Config); /** * Run all diagnostics using the data gathered by the doctor and add * suggestions to the diagnosis. */ run(): Array<Promise<void>>; /** * Checks to see if the running version of the CLI is the latest. */ outdatedCliVersionCheck(): Promise<void>; /** * Checks to see if the cli is outdated and deprecated (sfdx7 sf1) */ deprecatedCliCheck(): Promise<void>; /** * Checks if the salesforcedx plugin is installed and suggests * to uninstall it if there. */ salesforceDxPluginCheck(): Promise<void>; networkCheck(): Promise<void>; /** * Checks and warns if any plugins are linked. */ linkedPluginCheck(): Promise<void>; /** * Checks and warns if proxy env vars conflict. */ proxyEnvVarsCheck(): Promise<void>; }