@oclif/core
Advanced tools
Comparing version 4.0.0-beta.12 to 4.0.0-beta.13
@@ -58,3 +58,3 @@ import { error } from '../errors/error'; | ||
*/ | ||
stderr: (str: string | string[] | undefined, ...args: string[]) => void; | ||
stderr: (str?: string | string[] | undefined, ...args: string[]) => void; | ||
/** | ||
@@ -65,3 +65,3 @@ * Log a formatted string to stdout. | ||
*/ | ||
stdout: (str: string | string[] | undefined, ...args: string[]) => void; | ||
stdout: (str?: string | string[] | undefined, ...args: string[]) => void; | ||
/** | ||
@@ -68,0 +68,0 @@ * Prints a pretty warning message to stderr. |
@@ -1,2 +0,2 @@ | ||
export declare const stdout: (str: string | string[] | undefined, ...args: string[]) => void; | ||
export declare const stderr: (str: string | string[] | undefined, ...args: string[]) => void; | ||
export declare const stdout: (str?: string | string[] | undefined, ...args: string[]) => void; | ||
export declare const stderr: (str?: string | string[] | undefined, ...args: string[]) => void; |
@@ -6,5 +6,11 @@ "use strict"; | ||
const stdout = (str, ...args) => { | ||
if (typeof str === 'string' || !str) { | ||
process.stdout.write((0, node_util_1.format)(str, ...args) + '\n'); | ||
if (!str && args) { | ||
process.stdout.write((0, node_util_1.format)(...args) + '\n'); | ||
} | ||
else if (!str) { | ||
process.stdout.write('\n'); | ||
} | ||
else if (typeof str === 'string') { | ||
process.stdout.write((str && (0, node_util_1.format)(str, ...args)) + '\n'); | ||
} | ||
else { | ||
@@ -16,5 +22,11 @@ process.stdout.write((0, node_util_1.format)(...str, ...args) + '\n'); | ||
const stderr = (str, ...args) => { | ||
if (typeof str === 'string' || !str) { | ||
process.stderr.write((0, node_util_1.format)(str, ...args) + '\n'); | ||
if (!str && args) { | ||
process.stderr.write((0, node_util_1.format)(...args) + '\n'); | ||
} | ||
else if (!str) { | ||
process.stderr.write('\n'); | ||
} | ||
else if (typeof str === 'string') { | ||
process.stderr.write((str && (0, node_util_1.format)(str, ...args)) + '\n'); | ||
} | ||
else { | ||
@@ -21,0 +33,0 @@ process.stderr.write((0, node_util_1.format)(...str, ...args) + '\n'); |
{ | ||
"name": "@oclif/core", | ||
"description": "base library for oclif CLIs", | ||
"version": "4.0.0-beta.12", | ||
"version": "4.0.0-beta.13", | ||
"author": "Salesforce", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/core/issues", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
397165
10006