@oclif/core 2.6.1 → 2.6.3

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.
@@ -15,6 +15,8 @@ const help_1 = require("../help");
15
15
  const stream_1 = require("../cli-ux/stream");
16
16
  const performance_1 = require("../performance");
17
17
  const settings_1 = require("../settings");
18
+ const node_os_1 = require("node:os");
19
+ const node_path_1 = require("node:path");
18
20
  // eslint-disable-next-line new-cap
19
21
  const debug = (0, util_2.Debug)();
20
22
  const _pjson = (0, util_3.requireJson)(__dirname, '..', '..', 'package.json');
@@ -464,7 +466,8 @@ class Config {
464
466
  }
465
467
  _shell() {
466
468
  let shellPath;
467
- const { SHELL, COMSPEC } = process.env;
469
+ const COMSPEC = process.env.COMSPEC;
470
+ const SHELL = process.env.SHELL ?? (0, node_os_1.userInfo)().shell?.split(node_path_1.sep)?.pop();
468
471
  if (SHELL) {
469
472
  shellPath = SHELL.split('/');
470
473
  }
@@ -6,15 +6,16 @@ import { Command } from '../command';
6
6
  export type LoadOptions = Options | string | Config | undefined;
7
7
  export type PlatformTypes = 'darwin' | 'linux' | 'win32' | 'aix' | 'freebsd' | 'openbsd' | 'sunos' | 'wsl';
8
8
  export type ArchTypes = 'arm' | 'arm64' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x32' | 'x64' | 'x86';
9
+ export type PluginVersionDetail = {
10
+ version: string;
11
+ type: string;
12
+ root: string;
13
+ };
9
14
  export type VersionDetails = {
10
15
  cliVersion: string;
11
16
  architecture: string;
12
17
  nodeVersion: string;
13
- pluginVersions?: Record<string, {
14
- version: string;
15
- type: string;
16
- root: string;
17
- }>;
18
+ pluginVersions?: Record<string, PluginVersionDetail>;
18
19
  osVersion?: string;
19
20
  shell?: string;
20
21
  rootPath?: string;
@@ -108,6 +109,7 @@ export interface Config {
108
109
  readonly commands: Command.Loadable[];
109
110
  readonly topics: Topic[];
110
111
  readonly commandIDs: string[];
112
+ readonly versionDetails: VersionDetails;
111
113
  runCommand<T = unknown>(id: string, argv?: string[], cachedCommand?: Command.Loadable): Promise<T>;
112
114
  runHook<T extends keyof Hooks>(event: T, opts: Hooks[T]['options'], timeout?: number, captureErrors?: boolean): Promise<Hook.Result<Hooks[T]['return']>>;
113
115
  getAllCommandIDs(): string[];
@@ -1,5 +1,5 @@
1
1
  export { AlphabetLowercase, AlphabetUppercase } from './alphabet';
2
- export { Config, ArchTypes, PlatformTypes, LoadOptions } from './config';
2
+ export { Config, ArchTypes, PlatformTypes, LoadOptions, VersionDetails, PluginVersionDetail } from './config';
3
3
  export { OclifError, PrettyPrintableError, CommandError } from './errors';
4
4
  export { HelpOptions } from './help';
5
5
  export { Hook, Hooks } from './hooks';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "2.6.1",
4
+ "version": "2.6.3",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -38,8 +38,8 @@
38
38
  "devDependencies": {
39
39
  "@commitlint/config-conventional": "^12.1.4",
40
40
  "@oclif/plugin-help": "^5.2.7",
41
- "@oclif/plugin-plugins": "^2.3.2",
42
- "@oclif/test": "^2.3.7",
41
+ "@oclif/plugin-plugins": "^2.4.1",
42
+ "@oclif/test": "^2.3.9",
43
43
  "@types/ansi-styles": "^3.2.1",
44
44
  "@types/chai": "^4.3.4",
45
45
  "@types/chai-as-promised": "^7.1.5",