@event-driven-io/emmett 0.20.1-alpha.5 → 0.20.2-alpha.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.
@@ -1,5 +1,3 @@
1
- import { Command } from 'commander';
2
-
3
1
  type ErrorConstructor<ErrorType extends Error> = new (...args: any[]) => ErrorType;
4
2
  declare const isErrorConstructor: <ErrorType extends Error>(expect: Function) => expect is ErrorConstructor<ErrorType>;
5
3
  declare class EmmettError extends Error {
@@ -38,10 +36,13 @@ type EmmettCliPluginRegistration = {
38
36
  path?: string;
39
37
  };
40
38
  type EmmettPluginRegistration = EmmettCliPluginRegistration;
39
+ type EmmettCliCommand = {
40
+ addCommand<CliCommand>(command: CliCommand): CliCommand;
41
+ };
41
42
  type EmmettCliPlugin = {
42
43
  pluginType: 'cli';
43
44
  name: string;
44
- registerCommands: (program: Command) => Promise<void> | void;
45
+ registerCommands: (program: EmmettCliCommand) => Promise<void> | void;
45
46
  };
46
47
  type EmmettPlugin = EmmettCliPlugin;
47
48
  declare const isPluginConfig: (plugin: Partial<EmmettPluginConfig> | string | undefined) => plugin is EmmettPluginConfig;
@@ -50,4 +51,4 @@ type EmmettPluginsConfig = {
50
51
  plugins: EmmettPluginConfig[];
51
52
  };
52
53
 
53
- export { ConcurrencyError as C, type ErrorConstructor as E, IllegalStateError as I, NotFoundError as N, ValidationError as V, type EmmettPluginsConfig as a, type EmmettPluginConfig as b, type EmmettPluginType as c, type EmmettCliPluginRegistration as d, type EmmettPluginRegistration as e, type EmmettCliPlugin as f, type EmmettPlugin as g, isErrorConstructor as h, isPluginConfig as i, EmmettError as j };
54
+ export { ConcurrencyError as C, type ErrorConstructor as E, IllegalStateError as I, NotFoundError as N, ValidationError as V, type EmmettPluginsConfig as a, type EmmettPluginConfig as b, type EmmettPluginType as c, type EmmettCliPluginRegistration as d, type EmmettPluginRegistration as e, type EmmettCliCommand as f, type EmmettCliPlugin as g, type EmmettPlugin as h, isPluginConfig as i, isErrorConstructor as j, EmmettError as k };
@@ -1,5 +1,3 @@
1
- import { Command } from 'commander';
2
-
3
1
  type ErrorConstructor<ErrorType extends Error> = new (...args: any[]) => ErrorType;
4
2
  declare const isErrorConstructor: <ErrorType extends Error>(expect: Function) => expect is ErrorConstructor<ErrorType>;
5
3
  declare class EmmettError extends Error {
@@ -38,10 +36,13 @@ type EmmettCliPluginRegistration = {
38
36
  path?: string;
39
37
  };
40
38
  type EmmettPluginRegistration = EmmettCliPluginRegistration;
39
+ type EmmettCliCommand = {
40
+ addCommand<CliCommand>(command: CliCommand): CliCommand;
41
+ };
41
42
  type EmmettCliPlugin = {
42
43
  pluginType: 'cli';
43
44
  name: string;
44
- registerCommands: (program: Command) => Promise<void> | void;
45
+ registerCommands: (program: EmmettCliCommand) => Promise<void> | void;
45
46
  };
46
47
  type EmmettPlugin = EmmettCliPlugin;
47
48
  declare const isPluginConfig: (plugin: Partial<EmmettPluginConfig> | string | undefined) => plugin is EmmettPluginConfig;
@@ -50,4 +51,4 @@ type EmmettPluginsConfig = {
50
51
  plugins: EmmettPluginConfig[];
51
52
  };
52
53
 
53
- export { ConcurrencyError as C, type ErrorConstructor as E, IllegalStateError as I, NotFoundError as N, ValidationError as V, type EmmettPluginsConfig as a, type EmmettPluginConfig as b, type EmmettPluginType as c, type EmmettCliPluginRegistration as d, type EmmettPluginRegistration as e, type EmmettCliPlugin as f, type EmmettPlugin as g, isErrorConstructor as h, isPluginConfig as i, EmmettError as j };
54
+ export { ConcurrencyError as C, type ErrorConstructor as E, IllegalStateError as I, NotFoundError as N, ValidationError as V, type EmmettPluginsConfig as a, type EmmettPluginConfig as b, type EmmettPluginType as c, type EmmettCliPluginRegistration as d, type EmmettPluginRegistration as e, type EmmettCliCommand as f, type EmmettCliPlugin as g, type EmmettPlugin as h, isPluginConfig as i, isErrorConstructor as j, EmmettError as k };
package/dist/index.cjs CHANGED
@@ -715,7 +715,6 @@ var DeciderCommandHandler = (options) => async (eventStore, id, command2, handle
715
715
  };
716
716
 
717
717
  // src/config/plugins/index.ts
718
- var import_commander = require("commander");
719
718
  var isPluginConfig = (plugin) => plugin !== void 0 && (typeof plugin === "string" || "name" in plugin && plugin.name !== void 0 && typeof plugin.name === "string");
720
719
 
721
720
  // src/messageBus/index.ts