UNPKG

@bitloops/bl-boilerplate-core

Version:

TypeScript boilerplate code for Bitloops Language generated projects

113 lines (112 loc) 4.66 kB
/* eslint-disable @typescript-eslint/no-namespace */ import 'reflect-metadata'; import { AppError } from './application/AppError'; import { OrchestratorHandler as OrchestratorHandlerImport, } from './application/UseCase'; import { AggregateRoot } from './domain/AggregateRoot'; import { applyRules as applyRulesImport } from './domain/applyRule'; import { DomainError } from './domain/DomainError'; import { Entity as EntityImport } from './domain/Entity'; import { IntegrationEvent as IntegrationEventImport, } from './domain/events/IIntegrationEvent'; import { ReadModel as ReadModelImport } from './domain/ReadModel'; import { UUIDv4 as UUIDv4Import } from './domain/UUIDv4'; import { ValueObject as ValueObjectImport } from './domain/ValueObject'; import { fail, ok } from './Either'; import { Command as CommandImport, } from './domain/commands/Command'; import { DomainEvent as DomainEventImport, } from './domain/events/IDomainEvent'; import { Query as QueryImport, } from './domain/queries/IQuery'; import { NotFoundError } from './errors/repository/NotFoundError'; import { ConcurrencyError } from './errors/repository/ConcurrencyError'; import { CurrencyVO as CurrencyVOImport, } from './domain/standard-values'; import { ConflictError } from './errors/repository/ConflictError'; import { UnexpectedError } from './errors/repository/UnexpectedError'; import { ReturnUnexpectedError as ReturnUnexpectedErrorImport } from './errors/repository/unexpected-error.decorator'; import { asyncLocalStorage } from './helpers/asyncLocalStorage'; import { ConcurrencyOrNotFoundError } from './errors/repository/ConcurrencyOrNotFoundError'; import { SystemEvent as SystemEventImport } from './domain/messages/SystemEvent'; var Domain; (function (Domain) { class Error extends DomainError { } Domain.Error = Error; class Aggregate extends AggregateRoot { } Domain.Aggregate = Aggregate; class Entity extends EntityImport { } Domain.Entity = Entity; class ValueObject extends ValueObjectImport { } Domain.ValueObject = ValueObject; class ReadModel extends ReadModelImport { } Domain.ReadModel = ReadModel; class UUIDv4 extends UUIDv4Import { } Domain.UUIDv4 = UUIDv4; Domain.applyRules = applyRulesImport; class DomainEvent extends DomainEventImport { } Domain.DomainEvent = DomainEvent; let StandardVO; (function (StandardVO) { let Currency; (function (Currency) { class Value extends CurrencyVOImport { } Currency.Value = Value; })(Currency = StandardVO.Currency || (StandardVO.Currency = {})); })(StandardVO = Domain.StandardVO || (Domain.StandardVO = {})); })(Domain || (Domain = {})); var Application; (function (Application) { class Error extends AppError { } Application.Error = Error; class OrchestratorHandler extends OrchestratorHandlerImport { } Application.OrchestratorHandler = OrchestratorHandler; class Command extends CommandImport { } Application.Command = Command; class Query extends QueryImport { } Application.Query = Query; let Repo; (function (Repo) { let Errors; (function (Errors) { class NotFound extends NotFoundError { } Errors.NotFound = NotFound; class Concurrency extends ConcurrencyError { } Errors.Concurrency = Concurrency; class Conflict extends ConflictError { } Errors.Conflict = Conflict; class Unexpected extends UnexpectedError { } Errors.Unexpected = Unexpected; class ConcurrencyOrNotFound extends ConcurrencyOrNotFoundError { } Errors.ConcurrencyOrNotFound = ConcurrencyOrNotFound; })(Errors = Repo.Errors || (Repo.Errors = {})); let Decorators; (function (Decorators) { Decorators.ReturnUnexpectedError = ReturnUnexpectedErrorImport; })(Decorators = Repo.Decorators || (Repo.Decorators = {})); })(Repo = Application.Repo || (Application.Repo = {})); })(Application || (Application = {})); var Infra; (function (Infra) { let EventBus; (function (EventBus) { class IntegrationEvent extends IntegrationEventImport { } EventBus.IntegrationEvent = IntegrationEvent; class SystemEvent extends SystemEventImport { } EventBus.SystemEvent = SystemEvent; })(EventBus = Infra.EventBus || (Infra.EventBus = {})); })(Infra || (Infra = {})); export { Application, Domain, Infra, fail, ok, asyncLocalStorage };