@clerc/plugin-not-found 0.16.0 → 0.17.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.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { definePlugin, NoSuchCommandError } from '@clerc/core';
|
|
1
|
+
import { definePlugin, NoSuchCommandError, NoCommandGivenError } from '@clerc/core';
|
|
2
2
|
import { semanticArray } from '@clerc/utils';
|
|
3
3
|
import didyoumean from 'didyoumean2';
|
|
4
4
|
import pc from 'picocolors';
|
|
@@ -13,7 +13,7 @@ const notFoundPlugin = () => definePlugin({
|
|
|
13
13
|
try {
|
|
14
14
|
next();
|
|
15
15
|
} catch (e) {
|
|
16
|
-
if (!(e instanceof NoSuchCommandError)) {
|
|
16
|
+
if (!(e instanceof NoSuchCommandError || e instanceof NoCommandGivenError)) {
|
|
17
17
|
throw e;
|
|
18
18
|
}
|
|
19
19
|
if (ctx.raw._.length === 0) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { definePlugin, NoSuchCommandError } from '@clerc/core';
|
|
1
|
+
import { definePlugin, NoSuchCommandError, NoCommandGivenError } from '@clerc/core';
|
|
2
2
|
import { semanticArray } from '@clerc/utils';
|
|
3
3
|
import didyoumean from 'didyoumean2';
|
|
4
4
|
import pc from 'picocolors';
|
|
@@ -13,7 +13,7 @@ const notFoundPlugin = () => definePlugin({
|
|
|
13
13
|
try {
|
|
14
14
|
next();
|
|
15
15
|
} catch (e) {
|
|
16
|
-
if (!(e instanceof NoSuchCommandError)) {
|
|
16
|
+
if (!(e instanceof NoSuchCommandError || e instanceof NoCommandGivenError)) {
|
|
17
17
|
throw e;
|
|
18
18
|
}
|
|
19
19
|
if (ctx.raw._.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerc/plugin-not-found",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"author": "Ray <nn_201312@163.com> (https://github.com/so1ve)",
|
|
5
5
|
"description": "Clerc plugin not found (did you mean)",
|
|
6
6
|
"keywords": [
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"didyoumean2": "^5.0.0",
|
|
55
55
|
"picocolors": "^1.0.0",
|
|
56
|
-
"@clerc/utils": "0.
|
|
56
|
+
"@clerc/utils": "0.17.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@clerc/core": "0.
|
|
59
|
+
"@clerc/core": "0.17.1"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "puild",
|