@clerc/plugin-not-found 0.22.0 → 0.23.0
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 +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ const notFoundPlugin = () => definePlugin({
|
|
|
28
28
|
}
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
const calledCommandName = e.
|
|
31
|
+
const calledCommandName = e.commandName;
|
|
32
32
|
const closestCommandName = didyoumean(calledCommandName, commandKeys);
|
|
33
33
|
console.error(`Command "${pc.strikethrough(calledCommandName)}" not found.`);
|
|
34
34
|
if (hasCommands && closestCommandName) {
|
|
@@ -36,6 +36,8 @@ const notFoundPlugin = () => definePlugin({
|
|
|
36
36
|
} else if (!hasCommands) {
|
|
37
37
|
console.error("NOTE: You haven't register any command yet.");
|
|
38
38
|
}
|
|
39
|
+
process.stderr.write("\n");
|
|
40
|
+
process.exit(2);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -28,7 +28,7 @@ const notFoundPlugin = () => definePlugin({
|
|
|
28
28
|
}
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
const calledCommandName = e.
|
|
31
|
+
const calledCommandName = e.commandName;
|
|
32
32
|
const closestCommandName = didyoumean(calledCommandName, commandKeys);
|
|
33
33
|
console.error(`Command "${pc.strikethrough(calledCommandName)}" not found.`);
|
|
34
34
|
if (hasCommands && closestCommandName) {
|
|
@@ -36,6 +36,8 @@ const notFoundPlugin = () => definePlugin({
|
|
|
36
36
|
} else if (!hasCommands) {
|
|
37
37
|
console.error("NOTE: You haven't register any command yet.");
|
|
38
38
|
}
|
|
39
|
+
process.stderr.write("\n");
|
|
40
|
+
process.exit(2);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerc/plugin-not-found",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
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.23.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@clerc/core": "0.
|
|
59
|
+
"@clerc/core": "0.23.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "puild",
|