Skip to content

Releases: carbonteq/hexapp

v0.20.2

17 Oct 12:51
81c6a9c

Choose a tag to compare

Patch Changes

  • 9c4d458: It adds GuardViolationError and GenericDomainError to the AppError class so that when using AppResult.fromResult, the exact error status is preserved, allowing users to map different status codes in their result interceptors and related logic.

v0.20.1

13 May 13:55
a6ae314

Choose a tag to compare

Patch Changes

v0.20.0

13 May 13:48
2a4dd7f

Choose a tag to compare

Minor Changes

  • 35e44d3: Update to NodeNext (esm+cjs) - use tsdown for build

v0.19.3

16 Nov 10:59
7ac8f2d

Choose a tag to compare

Patch Changes

v0.19.2

15 Nov 21:42
e24f9b5

Choose a tag to compare

Patch Changes

  • d47fa13: Add readme and make deno compatible

v0.19.0

15 Nov 14:34

Choose a tag to compare

Minor Changes

  • cbd1c1c: - Rename nominal types to refined types
    • Add extend util for adding custom method to an object or class while retaining type safety (an alternative is spread operator, but that approach removes the runtime private props)
    • Add DateTime refined type
    • Add an optionally implementable getParser method in BaseValueObject to allow sharing schematic (syntactic + semantic) validation logic with domain boundaries
    • Add a DateRange type to show case how to use refined types and the structure of a value object with schematic and domain validations
    • Update BaseEntity to utilize the new refined types for Id (UUID), createdAt (DateTime) and updatedAt (DateTime) fields
  • 9686ab1: - Add nominal/branded types (and a helper function to simplify their creation)
    • Remove ExternalServiceFailure error port
    • Add GuardViolationError and AppErrStatus
    • Simplify BaseRepository, only insert and update are mandatory to implement now
    • Remove UUID and Email value objects, shift to UUID and Email branded types
    • Simplify types in SerializedEntity interface (can reuse UUID in both IEntity and SerializedEntity)
    • Move Logger interface to shared
    • Move MockRepository to infra
    • Remove EMAIL and UUID schema types from ZodSchemas
    • Update tests to cater to above changes, add new tests for nominal types

Patch Changes

  • 1dfa48a: Add values getter to refined enums
  • 7482c4c: Simplify serialized entity

v0.18.3

22 Jul 12:26
9212ecb

Choose a tag to compare

Patch Changes

  • 669ff67: Add composition util methods and update AppResult methods for @carbonteq/fp v0.6.0

    • Add AppendToTuple, IsUnion and EnsureNotUnion type utils
    • Remove isPromise type guard. Already present in node:util/types
    • Add extractProp, extractProps, extractId, toSerialized and nestWithKey composition utilities
    • Rename RefinedType.$inferInner to RefinedType.$inferPrimitive and RefinedType.value to RefinedType.primitive

v0.18.2

17 Jul 23:16
f77f45a

Choose a tag to compare

Patch Changes

  • 261f5fd: Improve refined amd enum types

    • Add $infer and $inferInner for simpler type extraction
    • Add value method for getting the unbranded type easily
    • Add matchEnum for pattern matching enum type (with exhaustive checking and type safety)
    • Add eq 'static' method in enum types for simpler equality checks

v0.18.1

12 Jul 10:54
8a3f29d

Choose a tag to compare

Patch Changes

  • 759d906: Simplify app error messages

v0.18.0

12 Jul 08:09
88fc199

Choose a tag to compare

Minor Changes

  • cbd1c1c: - Rename nominal types to refined types
    • Add extend util for adding custom method to an object or class while retaining type safety (an alternative is spread operator, but that approach removes the runtime private props)
    • Add DateTime refined type
    • Add an optionally implementable getParser method in BaseValueObject to allow sharing schematic (syntactic + semantic) validation logic with domain boundaries
    • Add a DateRange type to show case how to use refined types and the structure of a value object with schematic and domain validations
    • Update BaseEntity to utilize the new refined types for Id (UUID), createdAt (DateTime) and updatedAt (DateTime) fields
  • 9686ab1: - Add nominal/branded types (and a helper function to simplify their creation)
    • Remove ExternalServiceFailure error port
    • Add GuardViolationError and AppErrStatus
    • Simplify BaseRepository, only insert and update are mandatory to implement now
    • Remove UUID and Email value objects, shift to UUID and Email branded types
    • Simplify types in SerializedEntity interface (can reuse UUID in both IEntity and SerializedEntity)
    • Move Logger interface to shared
    • Move MockRepository to infra
    • Remove EMAIL and UUID schema types from ZodSchemas
    • Update tests to cater to above changes, add new tests for nominal types

Patch Changes

  • 1dfa48a: Add values getter to refined enums
  • 7482c4c: Simplify serialized entity