@yeoman/types
Advanced tools
Comparing version 0.1.4 to 0.2.0
{ | ||
"name": "@yeoman/types", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"private": false, | ||
@@ -58,3 +58,3 @@ "description": "Common API for yeoman's generator/environment stack", | ||
}, | ||
"gitHead": "97588cdda4231d1e760707bca22f4bec65785cd3" | ||
"gitHead": "1982816cfe6af4e92f999e344cf9b8539ff308eb" | ||
} |
@@ -39,12 +39,10 @@ import type { DistinctQuestion, Answers as InquirerAnswers } from 'inquirer'; | ||
close(): void; | ||
}; | ||
/** | ||
* Shows a color-based diff of two strings. | ||
* | ||
* @param actual The actual text. | ||
* @param expected The expected text. | ||
* @param changes The changes returned by `diff`. | ||
* @returns The formatted message. | ||
*/ | ||
diff(actual: string, expected: string, changes: unknown[]): string; | ||
type Task<TaskResultType> = | ||
| ((adapter: InputOutputAdapter) => PromiseLike<TaskResultType>) | ||
| ((adapter: InputOutputAdapter) => TaskResultType); | ||
export type QueuedAdapter = InputOutputAdapter & { | ||
queue<TaskResultType>(fn: Task<TaskResultType>): Promise<void | TaskResultType>; | ||
}; |
@@ -118,3 +118,3 @@ import type { Transform } from 'node:stream'; | ||
*/ | ||
queueTask(priority: string, task: (...args: any[]) => void | Promise<void>, options?: { once?: string, startQueue?: boolean }): void; | ||
queueTask(priority: string, task: (...args: any[]) => void | Promise<void>, options?: { once?: string; startQueue?: boolean }): void; | ||
@@ -121,0 +121,0 @@ /** |
@@ -6,4 +6,15 @@ import type { format } from 'node:util'; | ||
*/ | ||
export type DefaultLoggerCategories = 'skip' | 'force' | 'create' | 'invoke' | 'conflict' | 'identical' | 'info'; | ||
export type DefaultLoggerCategories = 'skip' | 'force' | 'create' | 'invoke' | 'conflict' | 'identical' | 'info' | 'added' | 'removed'; | ||
export type ColoredMessage<Color extends string | number | symbol = DefaultLoggerCategories> = { | ||
/** | ||
* Text content. | ||
*/ | ||
message: string; | ||
/** | ||
* Color to apply. | ||
*/ | ||
color?: Color; | ||
}; | ||
/** | ||
@@ -54,2 +65,8 @@ * Provides the functionality to log messages. | ||
error(...args: Parameters<typeof format>): Logger<LoggerCategories>; | ||
/** | ||
* @since `yeoman-environment` version 3.17.0 | ||
* Shows a colored message. | ||
*/ | ||
colored(coloredMessage: Array<ColoredMessage<LoggerCategories>>): Logger<LoggerCategories>; | ||
}; |
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
12711
293