Skip to content

Commit

Permalink
refacto(./src/class/eventManagement/externals): prop as public (#59)
Browse files Browse the repository at this point in the history
* refacto(./src/class/eventManagement/externals): prop as public for testing purpose (sending event from the available incomer for ex)

* refacto(externals): myu custom validation fn
  • Loading branch information
Rossb0b authored Jul 19, 2023
1 parent a04cb59 commit c428dcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/class/eventManagement/externals.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import {
} from "../../types";
import {
AVAILABLE_EVENTS,
eventsValidationFn
eventsValidationFn,
validate
} from "../../index";

export class Externals<T extends GenericEvent = GenericEvent> {
private incomer: Incomer<T>;
private dispatcher: Dispatcher<T>;
public incomer: Incomer<T>;
public dispatcher: Dispatcher<T>;

constructor(options: IncomerOptions<T>) {
this.incomer = new Incomer({
Expand All @@ -30,7 +31,8 @@ export class Externals<T extends GenericEvent = GenericEvent> {
checkTransactionInterval: Number(process.env.MYUNISOFT_DISPATCHER_TRANSACTION_CHECK) || undefined,
idleTime: Number(process.env.MYUNISOFT_IDLE_TIME) || undefined,
eventsValidation: {
eventsValidationFn
eventsValidationFn,
validationCbFn: validate as any
}
});
}
Expand Down
1 change: 0 additions & 1 deletion src/class/eventManagement/incomer.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
EventMessage,
GenericEvent
} from "../../types/eventManagement/index";
import { EventOptions, Events, EventsOptions } from "../../types";
import { StandardLog, defaultStandardLog } from "../../utils/index";
import { Externals } from "./externals.class";

Expand Down

0 comments on commit c428dcf

Please sign in to comment.