clerc 1.0.0-beta.13 → 1.0.0-beta.14

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +5 -1
  2. package/package.json +8 -8
package/dist/index.d.ts CHANGED
@@ -36,6 +36,9 @@ declare const friendlyErrorPlugin: ({
36
36
  }?: FriendlyErrorPluginOptions) => Plugin;
37
37
  //#endregion
38
38
  //#region ../parser/src/types.d.ts
39
+ type FlagDefaultValue<T = unknown> = T | ((() => T) & {
40
+ display?: string;
41
+ });
39
42
  /**
40
43
  * Defines how a string input is converted to the target type T.
41
44
  *
@@ -46,13 +49,14 @@ type FlagTypeFunction<T = unknown> = ((value: string) => T) & {
46
49
  * Optional display name for the type, useful in help output.
47
50
  * If provided, this will be shown instead of the function name.
48
51
  */
49
- displayName?: string;
52
+ display?: string;
50
53
  };
51
54
  type FlagType<T = unknown> = FlagTypeFunction<T> | readonly [FlagTypeFunction<T>];
52
55
  //#endregion
53
56
  //#region ../plugin-help/src/types.d.ts
54
57
  interface Formatters {
55
58
  formatFlagType: (type: FlagType) => string;
59
+ formatFlagDefault: <T>(value: FlagDefaultValue<T>) => string;
56
60
  }
57
61
  /**
58
62
  * A group definition as a tuple of [key, displayName].
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clerc",
3
- "version": "1.0.0-beta.13",
3
+ "version": "1.0.0-beta.14",
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,12 +44,12 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@clerc/core": "1.0.0-beta.13",
48
- "@clerc/plugin-friendly-error": "1.0.0-beta.13",
49
- "@clerc/plugin-not-found": "1.0.0-beta.13",
50
- "@clerc/plugin-strict-flags": "1.0.0-beta.13",
51
- "@clerc/plugin-help": "1.0.0-beta.13",
52
- "@clerc/plugin-completions": "1.0.0-beta.13",
53
- "@clerc/plugin-version": "1.0.0-beta.13"
47
+ "@clerc/core": "1.0.0-beta.14",
48
+ "@clerc/plugin-friendly-error": "1.0.0-beta.14",
49
+ "@clerc/plugin-completions": "1.0.0-beta.14",
50
+ "@clerc/plugin-help": "1.0.0-beta.14",
51
+ "@clerc/plugin-strict-flags": "1.0.0-beta.14",
52
+ "@clerc/plugin-not-found": "1.0.0-beta.14",
53
+ "@clerc/plugin-version": "1.0.0-beta.14"
54
54
  }
55
55
  }