archstone 1.4.3 → 1.4.5
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.
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/domain/application/index.d.ts +1 -1
- package/dist/domain/enterprise/index.d.ts +1 -1
- package/dist/domain/enterprise/index.js +1 -1
- package/dist/domain/index.d.ts +1 -1
- package/dist/domain/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/shared/{chunk-0s74as1n.js → chunk-k3cvt8vw.js} +1 -1
- package/dist/shared/{chunk-92bcnec4.d.ts → chunk-mdknefhm.d.ts} +2 -2
- package/dist/shared/{chunk-2zkxpq9t.js → chunk-n7wnnxsz.js} +1 -1
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { right, nothing, maybe, left, just, from, attempt, WatchedList, ValueObject, UniqueEntityId, Right, Optional, Maybe, Left, EventHandler, Either, DomainEvents, DomainEvent
|
|
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";
|
|
2
|
+
export { right, nothing, maybe, left, just, from, attempt, WatchedList, ValueObject, UniqueEntityId, Right, Optional, Nothing, Maybe, Left, Just, EventHandler, Either, DomainEvents, DomainEvent };
|
package/dist/core/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k}from"../shared/chunk-
|
|
2
|
+
import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k}from"../shared/chunk-n7wnnxsz.js";export{k as right,j as nothing,i as maybe,h as left,g as just,f as from,e as attempt,d as WatchedList,c as ValueObject,b as UniqueEntityId,a as DomainEvents};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Creatable, Deletable, Findable, Repository, Saveable, UseCase, UseCaseError } from "../../shared/chunk-
|
|
1
|
+
import { Creatable, Deletable, Findable, Repository, Saveable, UseCase, UseCaseError } from "../../shared/chunk-mdknefhm.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-
|
|
1
|
+
import { AggregateRoot, DomainEvent, DomainEvents, Entity, EventHandler } from "../../shared/chunk-mdknefhm.js";
|
|
2
2
|
export { EventHandler, Entity, DomainEvents, DomainEvent, AggregateRoot };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as b,b as c}from"../../shared/chunk-
|
|
2
|
+
import{a as b,b as c}from"../../shared/chunk-k3cvt8vw.js";import{c as a}from"../../shared/chunk-n7wnnxsz.js";export{b as Entity,a as DomainEvents,c as AggregateRoot};
|
package/dist/domain/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Entity, EventHandler, Findable, Repository, Saveable, UseCase, UseCaseError } from "../shared/chunk-
|
|
1
|
+
import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Entity, EventHandler, Findable, Repository, Saveable, UseCase, UseCaseError } from "../shared/chunk-mdknefhm.js";
|
|
2
2
|
export { UseCaseError, UseCase, Saveable, Repository, Findable, EventHandler, Entity, DomainEvents, DomainEvent, Deletable, Creatable, AggregateRoot };
|
package/dist/domain/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../shared/chunk-x296z7h1.js";import"../shared/chunk-wsjyhnpq.js";import{a as b,b as c}from"../shared/chunk-
|
|
2
|
+
import"../shared/chunk-x296z7h1.js";import"../shared/chunk-wsjyhnpq.js";import{a as b,b as c}from"../shared/chunk-k3cvt8vw.js";import{c as a}from"../shared/chunk-n7wnnxsz.js";export{b as Entity,a as DomainEvents,c as AggregateRoot};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AggregateRoot,
|
|
2
|
-
export { right, nothing, maybe, left, just, from, attempt, WatchedList, ValueObject, UseCaseError, UseCase, UniqueEntityId, Saveable, Right, Repository, Optional, Maybe, Left, Findable, Entity, Either, DomainEvents, DomainEvent, Deletable, Creatable,
|
|
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";
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./shared/chunk-x296z7h1.js";import"./shared/chunk-wsjyhnpq.js";import{a as i,b as j}from"./shared/chunk-
|
|
2
|
+
import"./shared/chunk-x296z7h1.js";import"./shared/chunk-wsjyhnpq.js";import{a as i,b as j}from"./shared/chunk-k3cvt8vw.js";import{c as f,d as m,e as p,f as t,g as x,h as a,i as b,j as c,k as d,l as g,m as h}from"./shared/chunk-n7wnnxsz.js";export{h as right,g as nothing,d as maybe,c as left,b as just,a as from,x as attempt,t as WatchedList,p as ValueObject,m as UniqueEntityId,i as Entity,f as DomainEvents,j as AggregateRoot};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{c as j,d as k}from"./chunk-
|
|
2
|
+
import{c as j,d as k}from"./chunk-n7wnnxsz.js";class R{_id;props;get id(){return this._id}constructor(A,B){this._id=B??new k,this.props=A}equals(A){if(A===this)return!0;return A.id.equals(this._id)}}class z extends R{_domainEvents=new Set;get domainEvents(){return Array.from(this._domainEvents)}addDomainEvent(A){this._domainEvents.add(A),j.markAggregateForDispatch(this)}clearEvents(){this._domainEvents.clear()}}export{R as a,z as b};
|
|
@@ -76,7 +76,7 @@ interface Saveable<T> {
|
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
78
|
interface Repository<T> extends Findable<T>, Saveable<T>, Creatable<T>, Deletable<T> {}
|
|
79
|
-
import {
|
|
79
|
+
import { attempt, Either, from, Just, just, Left, left, Maybe, maybe, Nothing, nothing, Right, right } from "failcraft";
|
|
80
80
|
/**
|
|
81
81
|
* Base contract for all domain events.
|
|
82
82
|
*
|
|
@@ -591,4 +591,4 @@ interface UseCase<
|
|
|
591
591
|
> {
|
|
592
592
|
execute(input: Input): Promise<Output>;
|
|
593
593
|
}
|
|
594
|
-
export { DomainEvent, Creatable, Deletable, Findable, Saveable, Repository, UseCaseError, UseCase, Entity, AggregateRoot, EventHandler, DomainEvents, EventHandler2 as EventHandler1, Optional, UniqueEntityId, ValueObject, WatchedList,
|
|
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 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{attempt as Q,from as R,just as X,left as Y,maybe as Z,nothing as _,right as $}from"failcraft";class E{handlersMap=new Map;markedAggregates=new Set;shouldRun=!0;markAggregateForDispatch(x){if(!this.findMarkedAggregateByID(x.id))this.markedAggregates.add(x)}dispatchEventsForAggregate(x){let y=this.findMarkedAggregateByID(x);if(y)this.dispatchAggregateEvents(y),y.clearEvents(),this.removeAggregateFromMarkedDispatchList(y)}register(x,y){if(!this.handlersMap.has(y))this.handlersMap.set(y,[]);this.handlersMap.get(y)?.push(x)}clearHandlers(){this.handlersMap.clear()}clearMarkedAggregates(){this.markedAggregates.clear()}dispatchAggregateEvents(x){for(let y of x.domainEvents)this.dispatch(y)}removeAggregateFromMarkedDispatchList(x){this.markedAggregates.delete(x)}findMarkedAggregateByID(x){return[...this.markedAggregates].find((y)=>y.id.equals(x))}dispatch(x){if(!this.shouldRun)return;let y=this.handlersMap.get(x.constructor.name)??[];for(let f of y)f(x)}}var
|
|
2
|
+
import{attempt as Q,from as R,just as X,left as Y,maybe as Z,nothing as _,right as $}from"failcraft";class E{handlersMap=new Map;markedAggregates=new Set;shouldRun=!0;markAggregateForDispatch(x){if(!this.findMarkedAggregateByID(x.id))this.markedAggregates.add(x)}dispatchEventsForAggregate(x){let y=this.findMarkedAggregateByID(x);if(y)this.dispatchAggregateEvents(y),y.clearEvents(),this.removeAggregateFromMarkedDispatchList(y)}register(x,y){if(!this.handlersMap.has(y))this.handlersMap.set(y,[]);this.handlersMap.get(y)?.push(x)}clearHandlers(){this.handlersMap.clear()}clearMarkedAggregates(){this.markedAggregates.clear()}dispatchAggregateEvents(x){for(let y of x.domainEvents)this.dispatch(y)}removeAggregateFromMarkedDispatchList(x){this.markedAggregates.delete(x)}findMarkedAggregateByID(x){return[...this.markedAggregates].find((y)=>y.id.equals(x))}dispatch(x){if(!this.shouldRun)return;let y=this.handlersMap.get(x.constructor.name)??[];for(let f of y)f(x)}}var J=new E;var{randomUUIDv7:M}=globalThis.Bun;class L{value;constructor(x){this.value=x??M()}toValue(){return this.value}toString(){return this.value}equals(x){return x.toValue()===this.value}}class O{props;constructor(x){this.props=x}equals(x){return JSON.stringify(this.props)===JSON.stringify(x.props)}}class H{currentItems;initial;new;removed;constructor(x){this.currentItems=x??[],this.initial=x??[],this.new=[],this.removed=[]}getItems(){return this.currentItems}getNewItems(){return this.new}getRemovedItems(){return this.removed}exists(x){return this.isCurrentItem(x)}add(x){if(this.isRemovedItem(x))this.removeFromRemoved(x);if(!(this.isNewItem(x)||this.wasAddedInitially(x)))this.new.push(x);if(!this.isCurrentItem(x))this.currentItems.push(x)}remove(x){if(this.removeFromCurrent(x),this.isNewItem(x)){this.removeFromNew(x);return}if(!this.isRemovedItem(x))this.removed.push(x)}update(x){this.new=x.filter((y)=>!this.getItems().some((f)=>this.compareItems(y,f))),this.removed=this.getItems().filter((y)=>!x.some((f)=>this.compareItems(y,f))),this.currentItems=x}isCurrentItem(x){return this.currentItems.some((y)=>this.compareItems(x,y))}isNewItem(x){return this.new.some((y)=>this.compareItems(x,y))}isRemovedItem(x){return this.removed.some((y)=>this.compareItems(x,y))}removeFromNew(x){this.new=this.new.filter((y)=>!this.compareItems(y,x))}removeFromCurrent(x){this.currentItems=this.currentItems.filter((y)=>!this.compareItems(x,y))}removeFromRemoved(x){this.removed=this.removed.filter((y)=>!this.compareItems(x,y))}wasAddedInitially(x){return this.initial.some((y)=>this.compareItems(x,y))}}export{J as c,L as d,O as e,H as f,Q as g,R as h,X as i,Y as j,Z as k,_ as l,$ as m};
|