UNPKG

@bitloops/bl-boilerplate-core

Version:

TypeScript boilerplate code for Bitloops Language generated projects

121 lines (120 loc) 5.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.asyncLocalStorage = exports.ok = exports.fail = exports.Infra = exports.Domain = exports.Application = void 0; /* eslint-disable @typescript-eslint/no-namespace */ require("reflect-metadata"); const AppError_1 = require("./application/AppError"); const UseCase_1 = require("./application/UseCase"); const AggregateRoot_1 = require("./domain/AggregateRoot"); const applyRule_1 = require("./domain/applyRule"); const DomainError_1 = require("./domain/DomainError"); const Entity_1 = require("./domain/Entity"); const IIntegrationEvent_1 = require("./domain/events/IIntegrationEvent"); const ReadModel_1 = require("./domain/ReadModel"); const UUIDv4_1 = require("./domain/UUIDv4"); const ValueObject_1 = require("./domain/ValueObject"); const Either_1 = require("./Either"); Object.defineProperty(exports, "fail", { enumerable: true, get: function () { return Either_1.fail; } }); Object.defineProperty(exports, "ok", { enumerable: true, get: function () { return Either_1.ok; } }); const Command_1 = require("./domain/commands/Command"); const IDomainEvent_1 = require("./domain/events/IDomainEvent"); const IQuery_1 = require("./domain/queries/IQuery"); const NotFoundError_1 = require("./errors/repository/NotFoundError"); const ConcurrencyError_1 = require("./errors/repository/ConcurrencyError"); const standard_values_1 = require("./domain/standard-values"); const ConflictError_1 = require("./errors/repository/ConflictError"); const UnexpectedError_1 = require("./errors/repository/UnexpectedError"); const unexpected_error_decorator_1 = require("./errors/repository/unexpected-error.decorator"); const asyncLocalStorage_1 = require("./helpers/asyncLocalStorage"); Object.defineProperty(exports, "asyncLocalStorage", { enumerable: true, get: function () { return asyncLocalStorage_1.asyncLocalStorage; } }); const ConcurrencyOrNotFoundError_1 = require("./errors/repository/ConcurrencyOrNotFoundError"); const SystemEvent_1 = require("./domain/messages/SystemEvent"); var Domain; (function (Domain) { class Error extends DomainError_1.DomainError { } Domain.Error = Error; class Aggregate extends AggregateRoot_1.AggregateRoot { } Domain.Aggregate = Aggregate; class Entity extends Entity_1.Entity { } Domain.Entity = Entity; class ValueObject extends ValueObject_1.ValueObject { } Domain.ValueObject = ValueObject; class ReadModel extends ReadModel_1.ReadModel { } Domain.ReadModel = ReadModel; class UUIDv4 extends UUIDv4_1.UUIDv4 { } Domain.UUIDv4 = UUIDv4; Domain.applyRules = applyRule_1.applyRules; class DomainEvent extends IDomainEvent_1.DomainEvent { } Domain.DomainEvent = DomainEvent; let StandardVO; (function (StandardVO) { let Currency; (function (Currency) { class Value extends standard_values_1.CurrencyVO { } Currency.Value = Value; })(Currency = StandardVO.Currency || (StandardVO.Currency = {})); })(StandardVO = Domain.StandardVO || (Domain.StandardVO = {})); })(Domain || (Domain = {})); exports.Domain = Domain; var Application; (function (Application) { class Error extends AppError_1.AppError { } Application.Error = Error; class OrchestratorHandler extends UseCase_1.OrchestratorHandler { } Application.OrchestratorHandler = OrchestratorHandler; class Command extends Command_1.Command { } Application.Command = Command; class Query extends IQuery_1.Query { } Application.Query = Query; let Repo; (function (Repo) { let Errors; (function (Errors) { class NotFound extends NotFoundError_1.NotFoundError { } Errors.NotFound = NotFound; class Concurrency extends ConcurrencyError_1.ConcurrencyError { } Errors.Concurrency = Concurrency; class Conflict extends ConflictError_1.ConflictError { } Errors.Conflict = Conflict; class Unexpected extends UnexpectedError_1.UnexpectedError { } Errors.Unexpected = Unexpected; class ConcurrencyOrNotFound extends ConcurrencyOrNotFoundError_1.ConcurrencyOrNotFoundError { } Errors.ConcurrencyOrNotFound = ConcurrencyOrNotFound; })(Errors = Repo.Errors || (Repo.Errors = {})); let Decorators; (function (Decorators) { Decorators.ReturnUnexpectedError = unexpected_error_decorator_1.ReturnUnexpectedError; })(Decorators = Repo.Decorators || (Repo.Decorators = {})); })(Repo = Application.Repo || (Application.Repo = {})); })(Application || (Application = {})); exports.Application = Application; var Infra; (function (Infra) { let EventBus; (function (EventBus) { class IntegrationEvent extends IIntegrationEvent_1.IntegrationEvent { } EventBus.IntegrationEvent = IntegrationEvent; class SystemEvent extends SystemEvent_1.SystemEvent { } EventBus.SystemEvent = SystemEvent; })(EventBus = Infra.EventBus || (Infra.EventBus = {})); })(Infra || (Infra = {})); exports.Infra = Infra;