@clerc/plugin-friendly-error 0.43.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,8 +1,11 @@
1
- import * as _clerc_core from '@clerc/core';
1
+ import { Plugin } from "@clerc/core";
2
2
 
3
+ //#region src/index.d.ts
3
4
  interface FriendlyErrorPluginOptions {
4
- target?: (str: string) => void;
5
+ target?: (str: string) => void;
5
6
  }
6
- declare const friendlyErrorPlugin: ({ target, }?: FriendlyErrorPluginOptions) => _clerc_core.Plugin<_clerc_core.Clerc<{}, {}>, _clerc_core.Clerc<{}, {}>>;
7
-
8
- export { FriendlyErrorPluginOptions, friendlyErrorPlugin };
7
+ declare const friendlyErrorPlugin: ({
8
+ target
9
+ }?: FriendlyErrorPluginOptions) => Plugin;
10
+ //#endregion
11
+ export { FriendlyErrorPluginOptions, friendlyErrorPlugin };
package/dist/index.js CHANGED
@@ -1,13 +1,11 @@
1
- import { definePlugin } from '@clerc/core';
2
- import * as kons from 'kons';
1
+ import { definePlugin } from "@clerc/core";
2
+ import * as kons from "kons";
3
3
 
4
- const friendlyErrorPlugin = ({
5
- target = kons.error
6
- } = {}) => definePlugin({
7
- setup: (cli) => cli.errorHandler((err) => {
8
- target(err.message);
9
- process.exit(1);
10
- })
11
- });
4
+ //#region src/index.ts
5
+ const friendlyErrorPlugin = ({ target = kons.error } = {}) => definePlugin({ setup: (cli) => cli.errorHandler((err) => {
6
+ target(err.message);
7
+ process.exit(1);
8
+ }) });
12
9
 
13
- export { friendlyErrorPlugin };
10
+ //#endregion
11
+ export { friendlyErrorPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/plugin-friendly-error",
3
- "version": "0.43.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 plugin friendly error",
@@ -25,14 +25,19 @@
25
25
  "license": "MIT",
26
26
  "sideEffects": false,
27
27
  "exports": {
28
- ".": {
29
- "types": "./dist/index.d.ts",
30
- "import": "./dist/index.js"
31
- }
28
+ ".": "./dist/index.js"
32
29
  },
33
- "main": "dist/index.js",
34
- "module": "dist/index.js",
30
+ "main": "./dist/index.js",
31
+ "module": "./dist/index.js",
35
32
  "types": "dist/index.d.ts",
33
+ "typesVersions": {
34
+ "*": {
35
+ "*": [
36
+ "./dist/*",
37
+ "./dist/index.d.ts"
38
+ ]
39
+ }
40
+ },
36
41
  "files": [
37
42
  "dist"
38
43
  ],
@@ -46,7 +51,7 @@
46
51
  "@clerc/core": "*"
47
52
  },
48
53
  "scripts": {
49
- "build": "pkgroll",
50
- "watch": "pkgroll --watch"
54
+ "build": "tsdown",
55
+ "watch": "tsdown --watch"
51
56
  }
52
57
  }