clerc 1.0.0-beta.1 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +22 -3
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from "@clerc/core";
|
|
|
4
4
|
//#region ../plugin-completions/src/index.d.ts
|
|
5
5
|
interface CompletionsPluginOptions {
|
|
6
6
|
/**
|
|
7
|
-
* Whether to register the `install
|
|
7
|
+
* Whether to register the `completions install` and `completions uninstall` commands.
|
|
8
8
|
* @default true
|
|
9
9
|
*/
|
|
10
10
|
managementCommands?: boolean;
|
|
@@ -19,6 +19,23 @@ declare const friendlyErrorPlugin: ({
|
|
|
19
19
|
target
|
|
20
20
|
}?: FriendlyErrorPluginOptions) => Plugin;
|
|
21
21
|
//#endregion
|
|
22
|
+
//#region ../parser/src/types.d.ts
|
|
23
|
+
/**
|
|
24
|
+
* Defines how a string input is converted to the target type T.
|
|
25
|
+
*
|
|
26
|
+
* @template T The target type.
|
|
27
|
+
*/
|
|
28
|
+
type FlagTypeFunction<T = unknown> = (value: string) => T;
|
|
29
|
+
type FlagType<T = unknown> = FlagTypeFunction<T> | readonly [FlagTypeFunction<T>];
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../plugin-help/src/types.d.ts
|
|
32
|
+
interface Formatters {
|
|
33
|
+
formatFlagType: (type: FlagType) => string;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region ../plugin-help/src/formatters.d.ts
|
|
37
|
+
declare const defaultFormatters: Formatters;
|
|
38
|
+
//#endregion
|
|
22
39
|
//#region ../plugin-help/src/index.d.ts
|
|
23
40
|
declare module "@clerc/core" {
|
|
24
41
|
interface CommandCustomOptions {
|
|
@@ -36,6 +53,7 @@ interface HelpPluginOptions {
|
|
|
36
53
|
notes?: string[];
|
|
37
54
|
examples?: [string, string][];
|
|
38
55
|
banner?: string;
|
|
56
|
+
formatters?: Partial<Formatters>;
|
|
39
57
|
}
|
|
40
58
|
declare const helpPlugin: ({
|
|
41
59
|
command,
|
|
@@ -43,7 +61,8 @@ declare const helpPlugin: ({
|
|
|
43
61
|
showHelpWhenNoCommandSpecified,
|
|
44
62
|
notes,
|
|
45
63
|
examples,
|
|
46
|
-
banner
|
|
64
|
+
banner,
|
|
65
|
+
formatters
|
|
47
66
|
}?: HelpPluginOptions) => Plugin;
|
|
48
67
|
//#endregion
|
|
49
68
|
//#region ../plugin-not-found/src/index.d.ts
|
|
@@ -72,4 +91,4 @@ declare const versionPlugin: ({
|
|
|
72
91
|
flag
|
|
73
92
|
}?: VersionPluginOptions) => Plugin;
|
|
74
93
|
//#endregion
|
|
75
|
-
export { CompletionsPluginOptions, FriendlyErrorPluginOptions, HelpPluginOptions, completionsPlugin, friendlyErrorPlugin, helpPlugin, notFoundPlugin, strictFlagsPlugin, versionPlugin };
|
|
94
|
+
export { CompletionsPluginOptions, FriendlyErrorPluginOptions, HelpPluginOptions, completionsPlugin, defaultFormatters, friendlyErrorPlugin, helpPlugin, notFoundPlugin, strictFlagsPlugin, versionPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clerc",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Clerc: The full-featured cli library.",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@clerc/core": "1.0.0-beta.
|
|
48
|
-
"@clerc/plugin-
|
|
49
|
-
"@clerc/plugin-
|
|
50
|
-
"@clerc/plugin-not-found": "1.0.0-beta.
|
|
51
|
-
"@clerc/plugin-
|
|
52
|
-
"@clerc/plugin-
|
|
53
|
-
"@clerc/plugin-
|
|
47
|
+
"@clerc/core": "1.0.0-beta.2",
|
|
48
|
+
"@clerc/plugin-help": "1.0.0-beta.2",
|
|
49
|
+
"@clerc/plugin-completions": "1.0.0-beta.2",
|
|
50
|
+
"@clerc/plugin-not-found": "1.0.0-beta.2",
|
|
51
|
+
"@clerc/plugin-friendly-error": "1.0.0-beta.2",
|
|
52
|
+
"@clerc/plugin-strict-flags": "1.0.0-beta.2",
|
|
53
|
+
"@clerc/plugin-version": "1.0.0-beta.2"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsdown",
|