@oclif/core 1.20.0 → 1.20.1

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.
@@ -22,7 +22,7 @@ export declare class ActionBase {
22
22
  get running(): boolean;
23
23
  get status(): string | undefined;
24
24
  set status(status: string | undefined);
25
- pauseAsync(fn: () => Promise<any>, icon?: string): Promise<any>;
25
+ pauseAsync<T extends any>(fn: () => Promise<T>, icon?: string): Promise<T>;
26
26
  pause(fn: () => any, icon?: string): any;
27
27
  protected _start(): void;
28
28
  protected _stop(_: string): void;
@@ -12,9 +12,9 @@ export interface IPromptOptions {
12
12
  * prompt for input
13
13
  * @param name - prompt text
14
14
  * @param options - @see IPromptOptions
15
- * @returns void
15
+ * @returns Promise<string>
16
16
  */
17
- export declare function prompt(name: string, options?: IPromptOptions): Promise<any>;
17
+ export declare function prompt(name: string, options?: IPromptOptions): Promise<string>;
18
18
  /**
19
19
  * confirmation prompt (yes/no)
20
20
  * @param message - confirmation text
@@ -24,6 +24,6 @@ export declare function confirm(message: string): Promise<boolean>;
24
24
  /**
25
25
  * "press anykey to continue"
26
26
  * @param message - optional message to display to user
27
- * @returns Promise<void>
27
+ * @returns Promise<string>
28
28
  */
29
- export declare function anykey(message?: string): Promise<void>;
29
+ export declare function anykey(message?: string): Promise<string>;
@@ -98,7 +98,7 @@ function _prompt(name, inputOptions = {}) {
98
98
  * prompt for input
99
99
  * @param name - prompt text
100
100
  * @param options - @see IPromptOptions
101
- * @returns void
101
+ * @returns Promise<string>
102
102
  */
103
103
  function prompt(name, options = {}) {
104
104
  return config_1.default.action.pauseAsync(() => {
@@ -128,7 +128,7 @@ exports.confirm = confirm;
128
128
  /**
129
129
  * "press anykey to continue"
130
130
  * @param message - optional message to display to user
131
- * @returns Promise<void>
131
+ * @returns Promise<string>
132
132
  */
133
133
  async function anykey(message) {
134
134
  const tty = Boolean(process.stdin.setRawMode);
@@ -178,7 +178,7 @@ class Parser {
178
178
  const flag = this.input.flags[k];
179
179
  if (flags[k])
180
180
  continue;
181
- if (flag.env) {
181
+ if (flag.env && Object.prototype.hasOwnProperty.call(process.env, flag.env)) {
182
182
  const input = process.env[flag.env];
183
183
  if (flag.type === 'option') {
184
184
  if (input) {
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": "1.20.0",
4
+ "version": "1.20.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -38,7 +38,7 @@
38
38
  "@commitlint/config-conventional": "^12.1.4",
39
39
  "@oclif/plugin-help": "^5.1.11",
40
40
  "@oclif/plugin-plugins": "^2.1.0",
41
- "@oclif/test": "^2.1.0",
41
+ "@oclif/test": "^2.2.8",
42
42
  "@types/ansi-styles": "^3.2.1",
43
43
  "@types/chai": "^4.3.0",
44
44
  "@types/chai-as-promised": "^7.1.5",