archstone 1.5.1 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import { DomainEvent, DomainEvents, Either, EventHandler1 as EventHandler, Just, Left, Maybe, Nothing, Optional, Right, UniqueEntityId, ValueObject, WatchedList, attempt, from, just, left, maybe, nothing, right } from "../shared/chunk-mdknefhm.js";
1
+ import { DomainEvent, DomainEvents, Either, EventHandler1 as EventHandler, Just, Left, Maybe, Nothing, Optional, Right, UniqueEntityId, ValueObject, WatchedList, attempt, from, just, left, maybe, nothing, right } from "../shared/chunk-rdck3e6v.js";
2
2
  export { right, nothing, maybe, left, just, from, attempt, WatchedList, ValueObject, UniqueEntityId, Right, Optional, Nothing, Maybe, Left, Just, EventHandler, Either, DomainEvents, DomainEvent };
@@ -1,2 +1,2 @@
1
- import { Creatable, Deletable, Findable, Repository, Saveable, UseCase, UseCaseError } from "../../shared/chunk-mdknefhm.js";
1
+ import { Creatable, Deletable, Findable, Repository, Saveable, UseCase, UseCaseError } from "../../shared/chunk-rdck3e6v.js";
2
2
  export { UseCaseError, UseCase, Saveable, Repository, Findable, Deletable, Creatable };
@@ -1,2 +1,2 @@
1
- import { AggregateRoot, DomainEvent, DomainEvents, Entity, EventHandler } from "../../shared/chunk-mdknefhm.js";
1
+ import { AggregateRoot, DomainEvent, DomainEvents, Entity, EventHandler } from "../../shared/chunk-rdck3e6v.js";
2
2
  export { EventHandler, Entity, DomainEvents, DomainEvent, AggregateRoot };
@@ -1,2 +1,2 @@
1
- import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Entity, EventHandler, Findable, Repository, Saveable, UseCase, UseCaseError } from "../shared/chunk-mdknefhm.js";
1
+ import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Entity, EventHandler, Findable, Repository, Saveable, UseCase, UseCaseError } from "../shared/chunk-rdck3e6v.js";
2
2
  export { UseCaseError, UseCase, Saveable, Repository, Findable, EventHandler, Entity, DomainEvents, DomainEvent, Deletable, Creatable, AggregateRoot };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Either, Entity, Findable, Just, Left, Maybe, Nothing, Optional, Repository, Right, Saveable, UniqueEntityId, UseCase, UseCaseError, ValueObject, WatchedList, attempt, from, just, left, maybe, nothing, right } from "./shared/chunk-mdknefhm.js";
1
+ import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Either, Entity, Findable, Just, Left, Maybe, Nothing, Optional, Repository, Right, Saveable, UniqueEntityId, UseCase, UseCaseError, ValueObject, WatchedList, attempt, from, just, left, maybe, nothing, right } from "./shared/chunk-rdck3e6v.js";
2
2
  export { right, nothing, maybe, left, just, from, attempt, WatchedList, ValueObject, UseCaseError, UseCase, UniqueEntityId, Saveable, Right, Repository, Optional, Nothing, Maybe, Left, Just, Findable, Entity, Either, DomainEvents, DomainEvent, Deletable, Creatable, AggregateRoot };
@@ -24,6 +24,7 @@ interface Deletable<T> {
24
24
  */
25
25
  delete(entity: T): Promise<void>;
26
26
  }
27
+ import { Maybe } from "failcraft";
27
28
  /**
28
29
  * Contract for entities that can be retrieved by their unique identifier.
29
30
  *
@@ -34,9 +35,9 @@ interface Findable<T> {
34
35
  * Finds an entity by its unique identifier.
35
36
  *
36
37
  * @param id - The unique identifier of the entity
37
- * @returns The entity if found, `null` otherwise
38
+ * @returns The entity if found, `nothing()` if not found
38
39
  */
39
- findById(id: string): Promise<T | null>;
40
+ findById(id: string): Promise<Maybe<T>>;
40
41
  }
41
42
  /**
42
43
  * Contract for entities that can be persisted.
@@ -76,7 +77,7 @@ interface Saveable<T> {
76
77
  * ```
77
78
  */
78
79
  interface Repository<T> extends Findable<T>, Saveable<T>, Creatable<T>, Deletable<T> {}
79
- import { attempt, Either, from, Just, just, Left, left, Maybe, maybe, Nothing, nothing, Right, right } from "failcraft";
80
+ import { attempt, Either, from, Just, just, Left, left, Maybe as Maybe2, maybe, Nothing, nothing, Right, right } from "failcraft";
80
81
  /**
81
82
  * Base contract for all domain events.
82
83
  *
@@ -555,7 +556,7 @@ interface UseCaseError {
555
556
  * - `Maybe<T>`: returns an optional value when the error path is irrelevant
556
557
  * - `Nothing`: void result; covered since `Nothing extends Maybe<never>`
557
558
  */
558
- type UseCaseOutput = Either<UseCaseError | never, unknown> | Maybe<unknown>;
559
+ type UseCaseOutput = Either<UseCaseError | never, unknown> | Maybe2<unknown>;
559
560
  /**
560
561
  * Base contract for all application use cases.
561
562
  *
@@ -591,4 +592,4 @@ interface UseCase<
591
592
  > {
592
593
  execute(input: Input): Promise<Output>;
593
594
  }
594
- export { DomainEvent, Creatable, Deletable, Findable, Saveable, Repository, UseCaseError, UseCase, Entity, AggregateRoot, EventHandler, DomainEvents, EventHandler2 as EventHandler1, Optional, UniqueEntityId, ValueObject, WatchedList, attempt, Either, from, Just, just, Left, left, Maybe, maybe, Nothing, nothing, Right, right };
595
+ export { DomainEvent, Creatable, Deletable, Findable, Saveable, Repository, UseCaseError, UseCase, Entity, AggregateRoot, EventHandler, DomainEvents, EventHandler2 as EventHandler1, Optional, UniqueEntityId, ValueObject, WatchedList, attempt, Either, from, Just, just, Left, left, Maybe2 as Maybe, maybe, Nothing, nothing, Right, right };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archstone",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "author": {
5
5
  "name": "João Henrique Benatti Coimbra",
6
6
  "url": "https://github.com/joao-coimbra"
@@ -91,6 +91,6 @@
91
91
  "type": "module",
92
92
  "types": "./dist/index.d.ts",
93
93
  "dependencies": {
94
- "failcraft": "^1.4.1"
94
+ "failcraft": "^1.4.3"
95
95
  }
96
96
  }