-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from carbonteq/dev
Values getter for refined enums
- Loading branch information
Showing
9 changed files
with
189 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@carbonteq/hexapp": minor | ||
--- | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"@carbonteq/hexapp": minor | ||
--- | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@carbonteq/hexapp": patch | ||
--- | ||
|
||
Add values getter to refined enums |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@carbonteq/hexapp": patch | ||
--- | ||
|
||
Simplify serialized entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters