🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ora

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ora - npm Package Compare versions

Comparing version
9.4.0
to
9.4.1
+20
-6
index.d.ts

@@ -59,5 +59,7 @@ import {type SpinnerName} from 'cli-spinners';

Set to `false` to disable the color.
@default 'cyan'
*/
readonly color?: Color | boolean;
readonly color?: Color | false | undefined;

@@ -165,3 +167,3 @@ /**

*/
failText?: string | ((error: Error) => string) | undefined;
failText?: string | ((error: unknown) => string) | undefined;

@@ -213,3 +215,3 @@ /**

*/
prefixText: string;
prefixText: string | PrefixTextGenerator;

@@ -221,8 +223,10 @@ /**

*/
suffixText: string;
suffixText: string | SuffixTextGenerator;
/**
Change the spinner color.
Set to `false` to disable the color.
*/
color: Color | boolean;
color: Color | false | undefined;

@@ -250,2 +254,12 @@ /**

/**
A boolean indicating whether the spinner and log text are enabled.
*/
isEnabled: boolean;
/**
A boolean indicating whether all output is suppressed.
*/
isSilent: boolean;
/**
The interval between each frame.

@@ -328,3 +342,3 @@

@returns The spinner instance text.
@returns The rendered frame text.
*/

@@ -331,0 +345,0 @@ frame(): string;

@@ -511,3 +511,3 @@ import process from 'node:process';

start(text) {
if (text) {
if (text !== undefined) {
this.text = text;

@@ -622,3 +622,3 @@ }

const actionIsFunction = typeof action === 'function';
const actionIsPromise = typeof action.then === 'function';
const actionIsPromise = typeof action?.then === 'function';

@@ -634,3 +634,3 @@ if (!actionIsFunction && !actionIsPromise) {

failSymbol,
} = typeof options === 'object'
} = (typeof options === 'object' && options !== null)
? options

@@ -637,0 +637,0 @@ : {};

{
"name": "ora",
"version": "9.4.0",
"version": "9.4.1",
"description": "Elegant terminal spinner",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -79,5 +79,5 @@ # ora

Type: `string | boolean`\
Type: `string | false`\
Default: `'cyan'`\
Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | boolean`
Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | false`

@@ -178,2 +178,10 @@ The color of the spinner. Set to `false` to disable coloring.

#### .isEnabled <sup>get/set</sup>
A boolean indicating whether the spinner and log text are enabled.
#### .isSilent <sup>get/set</sup>
A boolean indicating whether all output is suppressed.
#### .interval <sup>get</sup>

@@ -272,3 +280,3 @@

Type: `Promise | ((spinner: ora.Ora) => Promise)`
Type: `Promise | ((spinner: Ora) => Promise)`

@@ -291,3 +299,3 @@ #### options

Type: `string | ((error: Error) => string) | undefined`
Type: `string | ((error: unknown) => string) | undefined`

@@ -294,0 +302,0 @@ The new text of the spinner when the promise is rejected.