@salesforce/cli 1.49.0 → 1.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -10,8 +10,10 @@ exports.create = exports.configureAutoUpdate = exports.configureUpdateSites = ex
10
10
  const os = require("os");
11
11
  const path = require("path");
12
12
  const core_1 = require("@oclif/core");
13
+ const plugin_version_1 = require("@oclif/plugin-version");
13
14
  const kit_1 = require("@salesforce/kit");
14
15
  const ts_types_1 = require("@salesforce/ts-types");
16
+ const info_1 = require("@sf/info");
15
17
  const Debug = require("debug");
16
18
  const env_1 = require("./util/env");
17
19
  const debug = Debug('sf');
@@ -109,6 +111,12 @@ function create(version, channel, run, env = env_1.default) {
109
111
  configureUpdateSites(config, env);
110
112
  configureAutoUpdate(env);
111
113
  debugCliInfo(version, channel, env, config);
114
+ if (args[0] === 'doctor') {
115
+ // The doctor command requires CLI version details obtained from the CLI's oclif config.
116
+ const versionCmd = new plugin_version_1.VersionCommand(['--verbose', '--json'], config);
117
+ const versionDetail = await versionCmd.run();
118
+ info_1.Doctor.init(config, versionDetail);
119
+ }
112
120
  // Example of how run is used in a test https://github.com/salesforcecli/cli/pull/171/files#diff-1deee0a575599b2df117c280da319f7938aaf6fdb0c04bcdbde769dbf464be69R46
113
121
  return run ? run(args, config) : await (0, core_1.run)(args, config);
114
122
  },