Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

listr2

Package Overview
Dependencies
Maintainers
1
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

listr2 - npm Package Compare versions

Comparing version 5.0.7 to 5.0.8

58

dist/index.d.ts

@@ -81,3 +81,3 @@ import Enquirer from 'enquirer';

/** Returns all the prompt options depending on the type selected. */
declare type PromptOptions<T extends boolean = false> = Unionize<{
type PromptOptions<T extends boolean = false> = Unionize<{
[K in PromptTypes]-?: T extends true ? {

@@ -95,7 +95,7 @@ type: K;

} : PromptOptionsType<string>);
declare type Unionize<T extends Record<PropertyKey, unknown>> = {
type Unionize<T extends Record<PropertyKey, unknown>> = {
[P in keyof T]: T[P];
}[keyof T];
declare type PromptTypes = 'AutoComplete' | 'BasicAuth' | 'Confirm' | 'Editable' | 'Form' | 'Input' | 'Invisible' | 'List' | 'MultiSelect' | 'Numeral' | 'Password' | 'Quiz' | 'Scale' | 'Select' | 'Snippet' | 'Sort' | 'Survey' | 'Text' | 'Toggle';
declare type PromptOptionsType<T> = T extends keyof PromptOptionsMap ? PromptOptionsMap[T] : T extends string ? BasePromptOptions & Record<PropertyKey, unknown> : any;
type PromptTypes = 'AutoComplete' | 'BasicAuth' | 'Confirm' | 'Editable' | 'Form' | 'Input' | 'Invisible' | 'List' | 'MultiSelect' | 'Numeral' | 'Password' | 'Quiz' | 'Scale' | 'Select' | 'Snippet' | 'Sort' | 'Survey' | 'Text' | 'Toggle';
type PromptOptionsType<T> = T extends keyof PromptOptionsMap ? PromptOptionsMap[T] : T extends string ? BasePromptOptions & Record<PropertyKey, unknown> : any;
declare class PromptOptionsMap implements Record<PromptTypes, Record<PropertyKey, any>> {

@@ -283,3 +283,3 @@ AutoComplete: ArrayPromptOptions;

tasks: Task<any, typeof DefaultRenderer>[];
options: typeof DefaultRenderer['rendererOptions'];
options: (typeof DefaultRenderer)['rendererOptions'];
renderHook$?: Task<any, any>['renderHook$'];

@@ -416,8 +416,8 @@ /** designates whether this renderer can output to a non-tty console */

private spinnerPosition;
constructor(tasks: Task<any, typeof DefaultRenderer>[], options: typeof DefaultRenderer['rendererOptions'], renderHook$?: Task<any, any>['renderHook$']);
getTaskOptions(task: Task<any, typeof DefaultRenderer>): typeof DefaultRenderer['rendererTaskOptions'];
constructor(tasks: Task<any, typeof DefaultRenderer>[], options: (typeof DefaultRenderer)['rendererOptions'], renderHook$?: Task<any, any>['renderHook$']);
getTaskOptions(task: Task<any, typeof DefaultRenderer>): (typeof DefaultRenderer)['rendererTaskOptions'];
isBottomBar(task: Task<any, typeof DefaultRenderer>): boolean;
hasPersistentOutput(task: Task<any, typeof DefaultRenderer>): boolean;
hasTimer(task: Task<any, typeof DefaultRenderer>): boolean;
getSelfOrParentOption<T extends keyof typeof DefaultRenderer['rendererOptions']>(task: Task<any, typeof DefaultRenderer>, key: T): typeof DefaultRenderer['rendererOptions'][T];
getSelfOrParentOption<T extends keyof (typeof DefaultRenderer)['rendererOptions']>(task: Task<any, typeof DefaultRenderer>, key: T): (typeof DefaultRenderer)['rendererOptions'][T];
getTaskTime(task: Task<any, typeof DefaultRenderer>): string;

@@ -598,17 +598,17 @@ createRender(options?: {

/** The default renderer value used in Listr2 applications */
declare type ListrDefaultRendererValue = 'default';
type ListrDefaultRendererValue = 'default';
/** Type of default renderer */
declare type ListrDefaultRenderer = typeof DefaultRenderer;
type ListrDefaultRenderer = typeof DefaultRenderer;
/** Name of default fallback renderer */
declare type ListrFallbackRendererValue = 'verbose';
type ListrFallbackRendererValue = 'verbose';
/** Type of default fallback renderer */
declare type ListrFallbackRenderer = typeof VerboseRenderer;
type ListrFallbackRenderer = typeof VerboseRenderer;
/** Silent rendere for internal usage */
declare type ListrSilentRendererValue = 'silent';
type ListrSilentRendererValue = 'silent';
/** Typeof silent renderer */
declare type ListrSilentRenderer = typeof SilentRenderer;
type ListrSilentRenderer = typeof SilentRenderer;
/** Simple renderer that simplifies things */
declare type ListrSimpleRendererValue = 'simple';
type ListrSimpleRendererValue = 'simple';
/** Typeof simple renderer */
declare type ListrSimpleRenderer = typeof SimpleRenderer;
type ListrSimpleRenderer = typeof SimpleRenderer;
/**

@@ -618,19 +618,19 @@ * Listr2 can process either the integrated renderers as string aliases,

*/
declare type ListrRendererValue = ListrSilentRendererValue | ListrDefaultRendererValue | ListrSimpleRendererValue | ListrFallbackRendererValue | ListrRendererFactory;
type ListrRendererValue = ListrSilentRendererValue | ListrDefaultRendererValue | ListrSimpleRendererValue | ListrFallbackRendererValue | ListrRendererFactory;
/**
* Returns the class type from friendly names of the renderers.
*/
declare type ListrGetRendererClassFromValue<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer : T extends ListrSilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never;
type ListrGetRendererClassFromValue<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer : T extends ListrSilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never;
/**
* Returns the friendly names from the type of renderer classes.
*/
declare type ListrGetRendererValueFromClass<T extends ListrRendererFactory> = T extends DefaultRenderer ? ListrDefaultRendererValue : T extends SimpleRenderer ? ListrSimpleRendererValue : T extends VerboseRenderer ? ListrFallbackRendererValue : T extends SilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never;
type ListrGetRendererValueFromClass<T extends ListrRendererFactory> = T extends DefaultRenderer ? ListrDefaultRendererValue : T extends SimpleRenderer ? ListrSimpleRendererValue : T extends VerboseRenderer ? ListrFallbackRendererValue : T extends SilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never;
/**
* Returns renderer global options depending on the renderer type.
*/
declare type ListrGetRendererOptions<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer['rendererOptions'] : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererOptions'] : T extends ListrRendererFactory ? T['rendererOptions'] : never;
type ListrGetRendererOptions<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer['rendererOptions'] : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererOptions'] : T extends ListrRendererFactory ? T['rendererOptions'] : never;
/**
* Returns renderer per task options depending on the renderer type.
*/
declare type ListrGetRendererTaskOptions<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererTaskOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererTaskOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererTaskOptions'] : T extends ListrRendererFactory ? T['rendererTaskOptions'] : never;
type ListrGetRendererTaskOptions<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererTaskOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererTaskOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererTaskOptions'] : T extends ListrRendererFactory ? T['rendererTaskOptions'] : never;
/** Select renderer as default renderer */

@@ -651,3 +651,3 @@ interface ListrDefaultRendererOptions<T extends ListrRendererValue> {

/** Renderer options for the base class, including setup for selecting default and fallback renderers. */
declare type ListrRendererOptions<Renderer extends ListrRendererValue, FallbackRenderer extends ListrRendererValue> = ListrDefaultRendererOptions<Renderer> & ListrDefaultNonTTYRendererOptions<FallbackRenderer>;
type ListrRendererOptions<Renderer extends ListrRendererValue, FallbackRenderer extends ListrRendererValue> = ListrDefaultRendererOptions<Renderer> & ListrDefaultNonTTYRendererOptions<FallbackRenderer>;
/** The bones of a listr renderer. */

@@ -680,3 +680,3 @@ declare class ListrRenderer {

/** A renderer factory from the current type */
declare type ListrRendererFactory = typeof ListrRenderer;
type ListrRendererFactory = typeof ListrRenderer;
/** Supported type of renderers for each type in the listr. */

@@ -689,3 +689,3 @@ interface SupportedRenderer {

/** Listr Default Context */
declare type ListrContext = any | undefined;
type ListrContext = any | undefined;
/**

@@ -830,3 +830,3 @@ * ListrTask.

*/
declare type ListrTaskResult<Ctx> = string | Promise<any> | Listr<Ctx, ListrRendererValue, any> | Readable | NodeJS.ReadableStream | Observable<any>;
type ListrTaskResult<Ctx> = string | Promise<any> | Listr<Ctx, ListrRendererValue, any> | Readable | NodeJS.ReadableStream | Observable<any>;
/**

@@ -839,3 +839,3 @@ * Parent class options.

*/
declare type ListrBaseClassOptions<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue, FallbackRenderer extends ListrRendererValue = ListrFallbackRendererValue> = ListrOptions<Ctx> & ListrDefaultRendererOptions<Renderer> & ListrDefaultNonTTYRendererOptions<FallbackRenderer>;
type ListrBaseClassOptions<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue, FallbackRenderer extends ListrRendererValue = ListrFallbackRendererValue> = ListrOptions<Ctx> & ListrDefaultRendererOptions<Renderer> & ListrDefaultNonTTYRendererOptions<FallbackRenderer>;
/**

@@ -846,5 +846,5 @@ * Sub class options.

*/
declare type ListrSubClassOptions<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue> = ListrOptions<Ctx> & Omit<ListrDefaultRendererOptions<Renderer>, 'renderer'>;
type ListrSubClassOptions<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue> = ListrOptions<Ctx> & Omit<ListrDefaultRendererOptions<Renderer>, 'renderer'>;
/** The internal communication event. */
declare type ListrEvent = {
type ListrEvent = {
type: Exclude<ListrEventType, 'MESSAGE' | 'DATA'>;

@@ -862,3 +862,3 @@ data?: string | boolean;

*/
declare type ListrEventFromType<T extends ListrEventType, E = ListrEvent> = E extends {
type ListrEventFromType<T extends ListrEventType, E = ListrEvent> = E extends {
type: infer U;

@@ -865,0 +865,0 @@ } ? T extends U ? E : never : never;

@@ -298,3 +298,3 @@ // src/listr.ts

const subtaskRender = this.multiLineRenderer(task.subtasks, subtaskLevel);
if ((subtaskRender == null ? void 0 : subtaskRender.trim()) !== "" && !task.subtasks.every((subtask) => !subtask.hasTitle())) {
if ((subtaskRender == null ? void 0 : subtaskRender.trim()) !== "") {
output = [...output, subtaskRender];

@@ -301,0 +301,0 @@ }

{
"name": "listr2",
"version": "5.0.7",
"version": "5.0.8",
"description": "Terminal task list reborn! Create beautiful CLI interfaces via easy and logical to implement task lists that feel alive and interactive.",

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc