Skip to content

Commit

Permalink
Fix logger usage an export (#29)
Browse files Browse the repository at this point in the history
Fix security alerts
  • Loading branch information
Vinceveve authored Sep 14, 2020
1 parent f1f2b20 commit 7b8681b
Show file tree
Hide file tree
Showing 9 changed files with 1,460 additions and 9,215 deletions.
7,773 changes: 0 additions & 7,773 deletions examples/package-lock.json

This file was deleted.

2 changes: 2 additions & 0 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"rxjs": "^6.4.0"
},
"devDependencies": {
"dot-prop": ">=4.2.1",
"serialize-javascript": ">=3.1.0",
"@compodoc/compodoc": "^1.1.11",
"@types/express": "^4.16.1",
"@types/node": "^11.9.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import { HeroFoundItemEvent } from '../impl/hero-found-item.event';
export class HeroFoundItemHandler implements IEventHandler<HeroFoundItemEvent> {
handle(event: HeroFoundItemEvent) {
console.log(clc.yellowBright('Async HeroFoundItemEventHandler...'));
throw new Error(`Error handling ${event.constructor.name}`);
//throw new Error(`Error handling ${event.constructor.name}`);
}
}
595 changes: 342 additions & 253 deletions examples/yarn.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nestjs-geteventstore",
"version": "1.3.2",
"version": "1.3.4",
"description": "Event Store connector for Nest js",
"author": "Taimoor Alam <[email protected]>",
"contributors": [
Expand Down Expand Up @@ -64,7 +64,7 @@
"@types/jest": "^25.2.1",
"@types/node": "^12.12.0",
"@types/supertest": "^2.0.8",
"jest": "^25.5.3",
"jest": "^26.0.0",
"prettier": "^1.18.2",
"supertest": "4.0.2",
"ts-jest": "^25.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/cqrs/event-store-cqrs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export class EventStoreCqrsModule extends CqrsModule {
imports: [
CqrsModule,
EventBus,
Logger,
EventStoreModule.register(eventStoreConfig),
],
providers: [
Logger,
CommandBus,
QueryBus,
EventStorePublisher,
Expand Down Expand Up @@ -60,10 +60,10 @@ export class EventStoreCqrsModule extends CqrsModule {
imports: [
CqrsModule,
EventBus,
Logger,
EventStoreModule.registerAsync(eventStoreConfigFactory),
],
providers: [
Logger,
CommandBus,
QueryBus,
EventStorePublisher,
Expand Down
5 changes: 2 additions & 3 deletions src/event-store.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ export class EventStoreModule {
static register(config: IEventStoreConfig) {
return {
module: EventStoreModule,
imports: [],
imports: [Logger],
providers: [
Logger,
{
provide: EventStore,
useFactory: logger => {
Expand Down Expand Up @@ -52,8 +51,8 @@ export class EventStoreModule {
static registerAsync(options: EventStoreModuleAsyncOptions): DynamicModule {
return {
module: EventStoreModule,
imports: [Logger],
providers: [
Logger,
{
provide: EventStore,
useFactory: async (configService, logger) => {
Expand Down
1 change: 0 additions & 1 deletion src/interfaces/event-store-config.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ConnectionSettings, TcpEndPoint } from 'node-eventstore-client';
import { EventStore } from '../event-store.class';
import { UserCredentials } from 'geteventstore-promise';
import { ModuleMetadata } from '@nestjs/common/interfaces';
import { IEventStoreBusConfig } from './event-store-bus-config.interface';

export interface IHttpEndpoint extends TcpEndPoint {}

Expand Down
Loading

0 comments on commit 7b8681b

Please sign in to comment.