@wooksjs/event-cli 0.4.0 → 0.4.2

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.cjs CHANGED
@@ -106,7 +106,7 @@ class WooksCli extends wooks.WooksAdapterBase {
106
106
  const targetPath = makePath(path);
107
107
  const routed = this.on('CLI', targetPath, handler);
108
108
  if (options.onRegister) {
109
- options.onRegister(targetPath, 0);
109
+ options.onRegister(targetPath, 0, routed);
110
110
  }
111
111
  // register direct aliases
112
112
  for (const alias of options.aliases || []) {
@@ -114,7 +114,7 @@ class WooksCli extends wooks.WooksAdapterBase {
114
114
  const targetPath = makePath(alias) + (vars ? '/' + vars : '');
115
115
  this.on('CLI', targetPath, handler);
116
116
  if (options.onRegister) {
117
- options.onRegister(targetPath, 1);
117
+ options.onRegister(targetPath, 1, routed);
118
118
  }
119
119
  }
120
120
  // register helpCli entry
package/dist/index.d.ts CHANGED
@@ -70,7 +70,7 @@ export declare type TCliHelpCustom = {
70
70
  * @param path registered path
71
71
  * @param aliasType 0 - direct command, 1 - direct alias, 2 - computed alias
72
72
  */
73
- cb?: (path: string, aliasType: number) => void;
73
+ cb?: <T>(path: string, aliasType: number, route?: TProstoRouterPathHandle<T>) => void;
74
74
  };
75
75
 
76
76
  export declare type TCliHelpRenderer = CliHelpRenderer<TCliHelpCustom>;
package/dist/index.mjs CHANGED
@@ -104,7 +104,7 @@ class WooksCli extends WooksAdapterBase {
104
104
  const targetPath = makePath(path);
105
105
  const routed = this.on('CLI', targetPath, handler);
106
106
  if (options.onRegister) {
107
- options.onRegister(targetPath, 0);
107
+ options.onRegister(targetPath, 0, routed);
108
108
  }
109
109
  // register direct aliases
110
110
  for (const alias of options.aliases || []) {
@@ -112,7 +112,7 @@ class WooksCli extends WooksAdapterBase {
112
112
  const targetPath = makePath(alias) + (vars ? '/' + vars : '');
113
113
  this.on('CLI', targetPath, handler);
114
114
  if (options.onRegister) {
115
- options.onRegister(targetPath, 1);
115
+ options.onRegister(targetPath, 1, routed);
116
116
  }
117
117
  }
118
118
  // register helpCli entry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wooksjs/event-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "@wooksjs/event-cli",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -31,12 +31,13 @@
31
31
  "url": "https://github.com/wooksjs/wooksjs/issues"
32
32
  },
33
33
  "peerDependencies": {
34
- "wooks": "0.4.0",
35
- "@wooksjs/event-core": "0.4.0"
34
+ "wooks": "0.4.2",
35
+ "@wooksjs/event-core": "0.4.2"
36
36
  },
37
37
  "dependencies": {
38
38
  "minimist": "^1.2.6",
39
39
  "@prostojs/cli-help": "^0.0.10",
40
+ "@prostojs/router": "^0.2.1",
40
41
  "@prostojs/logger": "^0.3.6"
41
42
  },
42
43
  "homepage": "https://github.com/wooksjs/wooksjs/tree/main/packages/event-cli#readme"