@clerc/plugin-not-found 0.17.3 → 0.19.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 CHANGED
@@ -17,19 +17,19 @@ const notFoundPlugin = () => definePlugin({
17
17
  throw e;
18
18
  }
19
19
  if (ctx.raw._.length === 0) {
20
- console.log("No command given.");
20
+ console.error("No command given.");
21
21
  if (hasCommands) {
22
- console.log(`Possible commands: ${pc.bold(semanticArray(commandKeys))}.`);
22
+ console.error(`Possible commands: ${pc.bold(semanticArray(commandKeys))}.`);
23
23
  }
24
24
  return;
25
25
  }
26
26
  const calledCommandName = e.message.replace("No such command: ", "");
27
27
  const closestCommandName = didyoumean(calledCommandName, commandKeys);
28
- console.log(`Command "${pc.strikethrough(calledCommandName)}" not found.`);
28
+ console.error(`Command "${pc.strikethrough(calledCommandName)}" not found.`);
29
29
  if (hasCommands && closestCommandName) {
30
- console.log(`Did you mean "${pc.bold(closestCommandName)}"?`);
30
+ console.error(`Did you mean "${pc.bold(closestCommandName)}"?`);
31
31
  } else if (!hasCommands) {
32
- console.log("NOTE: You haven't register any command yet.");
32
+ console.error("NOTE: You haven't register any command yet.");
33
33
  }
34
34
  }
35
35
  }
package/dist/index.mjs CHANGED
@@ -17,19 +17,19 @@ const notFoundPlugin = () => definePlugin({
17
17
  throw e;
18
18
  }
19
19
  if (ctx.raw._.length === 0) {
20
- console.log("No command given.");
20
+ console.error("No command given.");
21
21
  if (hasCommands) {
22
- console.log(`Possible commands: ${pc.bold(semanticArray(commandKeys))}.`);
22
+ console.error(`Possible commands: ${pc.bold(semanticArray(commandKeys))}.`);
23
23
  }
24
24
  return;
25
25
  }
26
26
  const calledCommandName = e.message.replace("No such command: ", "");
27
27
  const closestCommandName = didyoumean(calledCommandName, commandKeys);
28
- console.log(`Command "${pc.strikethrough(calledCommandName)}" not found.`);
28
+ console.error(`Command "${pc.strikethrough(calledCommandName)}" not found.`);
29
29
  if (hasCommands && closestCommandName) {
30
- console.log(`Did you mean "${pc.bold(closestCommandName)}"?`);
30
+ console.error(`Did you mean "${pc.bold(closestCommandName)}"?`);
31
31
  } else if (!hasCommands) {
32
- console.log("NOTE: You haven't register any command yet.");
32
+ console.error("NOTE: You haven't register any command yet.");
33
33
  }
34
34
  }
35
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/plugin-not-found",
3
- "version": "0.17.3",
3
+ "version": "0.19.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.17.3"
56
+ "@clerc/utils": "0.19.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@clerc/core": "0.17.3"
59
+ "@clerc/core": "0.19.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "puild",