@initx-plugin/core
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -6,7 +6,27 @@ type MaybeArray<T> = T | T[]; | ||
type Matchers = BaseMatchers | TypeMatchers; | ||
interface InitxOptions { | ||
/** | ||
* Matching string | ||
* | ||
* The key that was used to match the handler | ||
*/ | ||
key: string; | ||
/** | ||
* CLI options | ||
* | ||
* cac package parsed options | ||
*/ | ||
cliOptions: Record<string, any>; | ||
/** | ||
* Options list | ||
* | ||
* cli options list, like | ||
* @example ['--global'] | ||
*/ | ||
optionsList: string[]; | ||
} | ||
declare abstract class InitxHandler { | ||
abstract matchers: Matchers; | ||
abstract handle(value: string, ...others: string[]): MaybePromise<void>; | ||
abstract handle<T>(value: string, type: T, ...others: string[]): MaybePromise<void>; | ||
run(value: string, ...others: string[]): Promise<void>; | ||
abstract handle(options: InitxOptions, ...others: string[]): MaybePromise<void>; | ||
run(options: InitxOptions, ...others: string[]): Promise<void>; | ||
private isObject; | ||
@@ -16,2 +36,2 @@ private isPassed; | ||
export { InitxHandler }; | ||
export { InitxHandler, type InitxOptions }; |
{ | ||
"name": "@initx-plugin/core", | ||
"type": "module", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "core module for initx plugins", | ||
@@ -6,0 +6,0 @@ "author": "imba97", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4772
68