clerc 0.44.0 → 1.0.0-beta.1

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 CHANGED
@@ -1,7 +1,75 @@
1
- export * from '@clerc/core';
2
- export * from '@clerc/plugin-completions';
3
- export * from '@clerc/plugin-friendly-error';
4
- export * from '@clerc/plugin-help';
5
- export * from '@clerc/plugin-not-found';
6
- export * from '@clerc/plugin-strict-flags';
7
- export * from '@clerc/plugin-version';
1
+ import { Plugin } from "@clerc/core";
2
+ export * from "@clerc/core";
3
+
4
+ //#region ../plugin-completions/src/index.d.ts
5
+ interface CompletionsPluginOptions {
6
+ /**
7
+ * Whether to register the `install-completions` and `uninstall-completions` commands.
8
+ * @default true
9
+ */
10
+ managementCommands?: boolean;
11
+ }
12
+ declare const completionsPlugin: (options?: CompletionsPluginOptions) => Plugin;
13
+ //#endregion
14
+ //#region ../plugin-friendly-error/src/index.d.ts
15
+ interface FriendlyErrorPluginOptions {
16
+ target?: (str: string) => void;
17
+ }
18
+ declare const friendlyErrorPlugin: ({
19
+ target
20
+ }?: FriendlyErrorPluginOptions) => Plugin;
21
+ //#endregion
22
+ //#region ../plugin-help/src/index.d.ts
23
+ declare module "@clerc/core" {
24
+ interface CommandCustomOptions {
25
+ help?: {
26
+ showInHelp?: boolean;
27
+ notes?: string[];
28
+ examples?: [string, string][];
29
+ };
30
+ }
31
+ }
32
+ interface HelpPluginOptions {
33
+ command?: boolean;
34
+ flag?: boolean;
35
+ showHelpWhenNoCommandSpecified?: boolean;
36
+ notes?: string[];
37
+ examples?: [string, string][];
38
+ banner?: string;
39
+ }
40
+ declare const helpPlugin: ({
41
+ command,
42
+ flag,
43
+ showHelpWhenNoCommandSpecified,
44
+ notes,
45
+ examples,
46
+ banner
47
+ }?: HelpPluginOptions) => Plugin;
48
+ //#endregion
49
+ //#region ../plugin-not-found/src/index.d.ts
50
+ declare const notFoundPlugin: () => Plugin;
51
+ //#endregion
52
+ //#region ../plugin-strict-flags/src/index.d.ts
53
+ declare const strictFlagsPlugin: () => Plugin;
54
+ //#endregion
55
+ //#region ../plugin-version/src/index.d.ts
56
+ interface VersionPluginOptions {
57
+ /**
58
+ * Whether to register the version command.
59
+ *
60
+ * @default true
61
+ */
62
+ command?: boolean;
63
+ /**
64
+ * Whether to register the global version flag.
65
+ *
66
+ * @default true
67
+ */
68
+ flag?: boolean;
69
+ }
70
+ declare const versionPlugin: ({
71
+ command,
72
+ flag
73
+ }?: VersionPluginOptions) => Plugin;
74
+ //#endregion
75
+ export { CompletionsPluginOptions, FriendlyErrorPluginOptions, HelpPluginOptions, completionsPlugin, friendlyErrorPlugin, helpPlugin, notFoundPlugin, strictFlagsPlugin, versionPlugin };
package/dist/index.js CHANGED
@@ -1,7 +1,15 @@
1
- export * from '@clerc/core';
2
- export * from '@clerc/plugin-completions';
3
- export * from '@clerc/plugin-friendly-error';
4
- export * from '@clerc/plugin-help';
5
- export * from '@clerc/plugin-not-found';
6
- export * from '@clerc/plugin-strict-flags';
7
- export * from '@clerc/plugin-version';
1
+ export * from "@clerc/core"
2
+
3
+ export * from "@clerc/plugin-completions"
4
+
5
+ export * from "@clerc/plugin-friendly-error"
6
+
7
+ export * from "@clerc/plugin-help"
8
+
9
+ export * from "@clerc/plugin-not-found"
10
+
11
+ export * from "@clerc/plugin-strict-flags"
12
+
13
+ export * from "@clerc/plugin-version"
14
+
15
+ export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clerc",
3
- "version": "0.44.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve)",
5
5
  "type": "module",
6
6
  "description": "Clerc: The full-featured cli library.",
@@ -24,13 +24,10 @@
24
24
  "license": "MIT",
25
25
  "sideEffects": false,
26
26
  "exports": {
27
- ".": {
28
- "types": "./dist/index.d.ts",
29
- "import": "./dist/index.js"
30
- }
27
+ ".": "./dist/index.js"
31
28
  },
32
- "main": "dist/index.js",
33
- "module": "dist/index.js",
29
+ "main": "./dist/index.js",
30
+ "module": "./dist/index.js",
34
31
  "types": "dist/index.d.ts",
35
32
  "typesVersions": {
36
33
  "*": {
@@ -47,16 +44,16 @@
47
44
  "access": "public"
48
45
  },
49
46
  "dependencies": {
50
- "@clerc/core": "0.44.0",
51
- "@clerc/plugin-not-found": "0.44.0",
52
- "@clerc/plugin-friendly-error": "0.44.0",
53
- "@clerc/plugin-version": "0.44.0",
54
- "@clerc/plugin-strict-flags": "0.44.0",
55
- "@clerc/plugin-help": "0.44.0",
56
- "@clerc/plugin-completions": "0.44.0"
47
+ "@clerc/core": "1.0.0-beta.1",
48
+ "@clerc/plugin-version": "1.0.0-beta.1",
49
+ "@clerc/plugin-strict-flags": "1.0.0-beta.1",
50
+ "@clerc/plugin-not-found": "1.0.0-beta.1",
51
+ "@clerc/plugin-completions": "1.0.0-beta.1",
52
+ "@clerc/plugin-friendly-error": "1.0.0-beta.1",
53
+ "@clerc/plugin-help": "1.0.0-beta.1"
57
54
  },
58
55
  "scripts": {
59
- "build": "pkgroll",
60
- "watch": "pkgroll --watch"
56
+ "build": "tsdown",
57
+ "watch": "tsdown --watch"
61
58
  }
62
59
  }