@wooksjs/event-cli 0.5.9 → 0.5.11

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
@@ -125,6 +125,7 @@ class WooksCli extends wooks.WooksAdapterBase {
125
125
  }
126
126
  else if (response instanceof Error) {
127
127
  this.onError(response);
128
+ return response;
128
129
  }
129
130
  else if (response) {
130
131
  console.log(JSON.stringify(response, null, ' '));
@@ -133,10 +134,12 @@ class WooksCli extends wooks.WooksAdapterBase {
133
134
  }
134
135
  catch (error) {
135
136
  this.onError(error);
137
+ return error;
136
138
  }
137
139
  }
138
140
  else {
139
141
  this.onUnknownCommand(pathParams);
142
+ return new Error('Unknown command');
140
143
  }
141
144
  });
142
145
  }
package/dist/index.d.ts CHANGED
@@ -102,7 +102,7 @@ declare class WooksCli extends WooksAdapterBase {
102
102
  *
103
103
  * @param _argv optionally overwrite `process.argv.slice(2)` with your `argv` array
104
104
  */
105
- run(_argv?: string[], _opts?: minimist.Opts): Promise<void>;
105
+ run(_argv?: string[], _opts?: minimist.Opts): Promise<unknown>;
106
106
  protected onError(e: Error): void;
107
107
  /**
108
108
  * Triggers `unknown command` processing and callbacks
package/dist/index.mjs CHANGED
@@ -123,6 +123,7 @@ class WooksCli extends WooksAdapterBase {
123
123
  }
124
124
  else if (response instanceof Error) {
125
125
  this.onError(response);
126
+ return response;
126
127
  }
127
128
  else if (response) {
128
129
  console.log(JSON.stringify(response, null, ' '));
@@ -131,10 +132,12 @@ class WooksCli extends WooksAdapterBase {
131
132
  }
132
133
  catch (error) {
133
134
  this.onError(error);
135
+ return error;
134
136
  }
135
137
  }
136
138
  else {
137
139
  this.onUnknownCommand(pathParams);
140
+ return new Error('Unknown command');
138
141
  }
139
142
  });
140
143
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wooksjs/event-cli",
3
- "version": "0.5.9",
3
+ "version": "0.5.11",
4
4
  "description": "@wooksjs/event-cli",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -39,8 +39,8 @@
39
39
  "url": "https://github.com/wooksjs/wooksjs/issues"
40
40
  },
41
41
  "peerDependencies": {
42
- "wooks": "0.5.9",
43
- "@wooksjs/event-core": "0.5.9"
42
+ "wooks": "0.5.11",
43
+ "@wooksjs/event-core": "0.5.11"
44
44
  },
45
45
  "dependencies": {
46
46
  "minimist": "^1.2.6",