@camcima/finita 1.0.0
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/README.md +176 -0
- package/dist/Dispatcher.d.ts +11 -0
- package/dist/Dispatcher.d.ts.map +1 -0
- package/dist/Dispatcher.js +30 -0
- package/dist/Dispatcher.js.map +1 -0
- package/dist/Event.d.ts +22 -0
- package/dist/Event.d.ts.map +1 -0
- package/dist/Event.js +54 -0
- package/dist/Event.js.map +1 -0
- package/dist/MaybePromise.d.ts +2 -0
- package/dist/MaybePromise.d.ts.map +1 -0
- package/dist/MaybePromise.js +2 -0
- package/dist/MaybePromise.js.map +1 -0
- package/dist/Process.d.ts +15 -0
- package/dist/Process.d.ts.map +1 -0
- package/dist/Process.js +43 -0
- package/dist/Process.js.map +1 -0
- package/dist/State.d.ts +22 -0
- package/dist/State.d.ts.map +1 -0
- package/dist/State.js +65 -0
- package/dist/State.js.map +1 -0
- package/dist/StateCollection.d.ts +14 -0
- package/dist/StateCollection.d.ts.map +1 -0
- package/dist/StateCollection.js +37 -0
- package/dist/StateCollection.js.map +1 -0
- package/dist/Statemachine.d.ts +45 -0
- package/dist/Statemachine.d.ts.map +1 -0
- package/dist/Statemachine.js +206 -0
- package/dist/Statemachine.js.map +1 -0
- package/dist/Transition.d.ts +19 -0
- package/dist/Transition.d.ts.map +1 -0
- package/dist/Transition.js +46 -0
- package/dist/Transition.js.map +1 -0
- package/dist/condition/AndComposite.d.ts +9 -0
- package/dist/condition/AndComposite.d.ts.map +1 -0
- package/dist/condition/AndComposite.js +23 -0
- package/dist/condition/AndComposite.js.map +1 -0
- package/dist/condition/CallbackCondition.d.ts +11 -0
- package/dist/condition/CallbackCondition.d.ts.map +1 -0
- package/dist/condition/CallbackCondition.js +15 -0
- package/dist/condition/CallbackCondition.js.map +1 -0
- package/dist/condition/Contradiction.d.ts +8 -0
- package/dist/condition/Contradiction.d.ts.map +1 -0
- package/dist/condition/Contradiction.js +13 -0
- package/dist/condition/Contradiction.js.map +1 -0
- package/dist/condition/Not.d.ts +8 -0
- package/dist/condition/Not.d.ts.map +1 -0
- package/dist/condition/Not.js +13 -0
- package/dist/condition/Not.js.map +1 -0
- package/dist/condition/OrComposite.d.ts +9 -0
- package/dist/condition/OrComposite.d.ts.map +1 -0
- package/dist/condition/OrComposite.js +23 -0
- package/dist/condition/OrComposite.js.map +1 -0
- package/dist/condition/Tautology.d.ts +8 -0
- package/dist/condition/Tautology.d.ts.map +1 -0
- package/dist/condition/Tautology.js +13 -0
- package/dist/condition/Tautology.js.map +1 -0
- package/dist/condition/Timeout.d.ts +10 -0
- package/dist/condition/Timeout.d.ts.map +1 -0
- package/dist/condition/Timeout.js +30 -0
- package/dist/condition/Timeout.js.map +1 -0
- package/dist/condition/index.d.ts +9 -0
- package/dist/condition/index.d.ts.map +1 -0
- package/dist/condition/index.js +8 -0
- package/dist/condition/index.js.map +1 -0
- package/dist/error/DuplicateStateError.d.ts +5 -0
- package/dist/error/DuplicateStateError.d.ts.map +1 -0
- package/dist/error/DuplicateStateError.js +9 -0
- package/dist/error/DuplicateStateError.js.map +1 -0
- package/dist/error/LockCanNotBeAcquiredError.d.ts +4 -0
- package/dist/error/LockCanNotBeAcquiredError.d.ts.map +1 -0
- package/dist/error/LockCanNotBeAcquiredError.js +7 -0
- package/dist/error/LockCanNotBeAcquiredError.js.map +1 -0
- package/dist/error/WrongEventForStateError.d.ts +6 -0
- package/dist/error/WrongEventForStateError.d.ts.map +1 -0
- package/dist/error/WrongEventForStateError.js +11 -0
- package/dist/error/WrongEventForStateError.js.map +1 -0
- package/dist/error/index.d.ts +4 -0
- package/dist/error/index.d.ts.map +1 -0
- package/dist/error/index.js +4 -0
- package/dist/error/index.js.map +1 -0
- package/dist/factory/AbstractNamedProcessDetector.d.ts +10 -0
- package/dist/factory/AbstractNamedProcessDetector.d.ts.map +1 -0
- package/dist/factory/AbstractNamedProcessDetector.js +18 -0
- package/dist/factory/AbstractNamedProcessDetector.js.map +1 -0
- package/dist/factory/Factory.d.ts +22 -0
- package/dist/factory/Factory.d.ts.map +1 -0
- package/dist/factory/Factory.js +42 -0
- package/dist/factory/Factory.js.map +1 -0
- package/dist/factory/SingleProcessDetector.d.ts +8 -0
- package/dist/factory/SingleProcessDetector.d.ts.map +1 -0
- package/dist/factory/SingleProcessDetector.js +10 -0
- package/dist/factory/SingleProcessDetector.js.map +1 -0
- package/dist/factory/StatefulStateNameDetector.d.ts +5 -0
- package/dist/factory/StatefulStateNameDetector.d.ts.map +1 -0
- package/dist/factory/StatefulStateNameDetector.js +15 -0
- package/dist/factory/StatefulStateNameDetector.js.map +1 -0
- package/dist/factory/index.d.ts +5 -0
- package/dist/factory/index.d.ts.map +1 -0
- package/dist/factory/index.js +5 -0
- package/dist/factory/index.js.map +1 -0
- package/dist/filter/ActiveTransitionFilter.d.ts +6 -0
- package/dist/filter/ActiveTransitionFilter.d.ts.map +1 -0
- package/dist/filter/ActiveTransitionFilter.js +12 -0
- package/dist/filter/ActiveTransitionFilter.js.map +1 -0
- package/dist/filter/FilterStateByEvent.d.ts +5 -0
- package/dist/filter/FilterStateByEvent.d.ts.map +1 -0
- package/dist/filter/FilterStateByEvent.js +10 -0
- package/dist/filter/FilterStateByEvent.js.map +1 -0
- package/dist/filter/FilterStateByFinalState.d.ts +5 -0
- package/dist/filter/FilterStateByFinalState.d.ts.map +1 -0
- package/dist/filter/FilterStateByFinalState.js +15 -0
- package/dist/filter/FilterStateByFinalState.js.map +1 -0
- package/dist/filter/FilterStateByTransition.d.ts +8 -0
- package/dist/filter/FilterStateByTransition.d.ts.map +1 -0
- package/dist/filter/FilterStateByTransition.js +16 -0
- package/dist/filter/FilterStateByTransition.js.map +1 -0
- package/dist/filter/FilterTransitionByEvent.d.ts +5 -0
- package/dist/filter/FilterTransitionByEvent.d.ts.map +1 -0
- package/dist/filter/FilterTransitionByEvent.js +10 -0
- package/dist/filter/FilterTransitionByEvent.js.map +1 -0
- package/dist/filter/index.d.ts +6 -0
- package/dist/filter/index.d.ts.map +1 -0
- package/dist/filter/index.js +6 -0
- package/dist/filter/index.js.map +1 -0
- package/dist/graph/GraphBuilder.d.ts +37 -0
- package/dist/graph/GraphBuilder.d.ts.map +1 -0
- package/dist/graph/GraphBuilder.js +132 -0
- package/dist/graph/GraphBuilder.js.map +1 -0
- package/dist/graph/index.d.ts +3 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +2 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/ConditionInterface.d.ts +6 -0
- package/dist/interfaces/ConditionInterface.d.ts.map +1 -0
- package/dist/interfaces/ConditionInterface.js +2 -0
- package/dist/interfaces/ConditionInterface.js.map +1 -0
- package/dist/interfaces/DispatcherInterface.d.ts +11 -0
- package/dist/interfaces/DispatcherInterface.d.ts.map +1 -0
- package/dist/interfaces/DispatcherInterface.js +2 -0
- package/dist/interfaces/DispatcherInterface.js.map +1 -0
- package/dist/interfaces/EventInterface.d.ts +12 -0
- package/dist/interfaces/EventInterface.d.ts.map +1 -0
- package/dist/interfaces/EventInterface.js +2 -0
- package/dist/interfaces/EventInterface.js.map +1 -0
- package/dist/interfaces/FactoryInterface.d.ts +13 -0
- package/dist/interfaces/FactoryInterface.d.ts.map +1 -0
- package/dist/interfaces/FactoryInterface.js +2 -0
- package/dist/interfaces/FactoryInterface.js.map +1 -0
- package/dist/interfaces/LastStateHasChangedDateInterface.d.ts +4 -0
- package/dist/interfaces/LastStateHasChangedDateInterface.d.ts.map +1 -0
- package/dist/interfaces/LastStateHasChangedDateInterface.js +2 -0
- package/dist/interfaces/LastStateHasChangedDateInterface.js.map +1 -0
- package/dist/interfaces/LockAdapterInterface.d.ts +7 -0
- package/dist/interfaces/LockAdapterInterface.d.ts.map +1 -0
- package/dist/interfaces/LockAdapterInterface.js +2 -0
- package/dist/interfaces/LockAdapterInterface.js.map +1 -0
- package/dist/interfaces/LoggerInterface.d.ts +4 -0
- package/dist/interfaces/LoggerInterface.d.ts.map +1 -0
- package/dist/interfaces/LoggerInterface.js +2 -0
- package/dist/interfaces/LoggerInterface.js.map +1 -0
- package/dist/interfaces/Metadata.d.ts +4 -0
- package/dist/interfaces/Metadata.d.ts.map +1 -0
- package/dist/interfaces/Metadata.js +2 -0
- package/dist/interfaces/Metadata.js.map +1 -0
- package/dist/interfaces/MutexFactoryInterface.d.ts +6 -0
- package/dist/interfaces/MutexFactoryInterface.d.ts.map +1 -0
- package/dist/interfaces/MutexFactoryInterface.js +2 -0
- package/dist/interfaces/MutexFactoryInterface.js.map +1 -0
- package/dist/interfaces/MutexInterface.d.ts +8 -0
- package/dist/interfaces/MutexInterface.d.ts.map +1 -0
- package/dist/interfaces/MutexInterface.js +2 -0
- package/dist/interfaces/MutexInterface.js.map +1 -0
- package/dist/interfaces/Named.d.ts +4 -0
- package/dist/interfaces/Named.d.ts.map +1 -0
- package/dist/interfaces/Named.js +2 -0
- package/dist/interfaces/Named.js.map +1 -0
- package/dist/interfaces/Observer.d.ts +11 -0
- package/dist/interfaces/Observer.d.ts.map +1 -0
- package/dist/interfaces/Observer.js +2 -0
- package/dist/interfaces/Observer.js.map +1 -0
- package/dist/interfaces/ProcessDetectorInterface.d.ts +5 -0
- package/dist/interfaces/ProcessDetectorInterface.d.ts.map +1 -0
- package/dist/interfaces/ProcessDetectorInterface.js +2 -0
- package/dist/interfaces/ProcessDetectorInterface.js.map +1 -0
- package/dist/interfaces/ProcessInterface.d.ts +7 -0
- package/dist/interfaces/ProcessInterface.d.ts.map +1 -0
- package/dist/interfaces/ProcessInterface.js +2 -0
- package/dist/interfaces/ProcessInterface.js.map +1 -0
- package/dist/interfaces/StateCollectionInterface.d.ts +7 -0
- package/dist/interfaces/StateCollectionInterface.d.ts.map +1 -0
- package/dist/interfaces/StateCollectionInterface.js +2 -0
- package/dist/interfaces/StateCollectionInterface.js.map +1 -0
- package/dist/interfaces/StateInterface.d.ts +16 -0
- package/dist/interfaces/StateInterface.d.ts.map +1 -0
- package/dist/interfaces/StateInterface.js +2 -0
- package/dist/interfaces/StateInterface.js.map +1 -0
- package/dist/interfaces/StateNameDetectorInterface.d.ts +4 -0
- package/dist/interfaces/StateNameDetectorInterface.d.ts.map +1 -0
- package/dist/interfaces/StateNameDetectorInterface.js +2 -0
- package/dist/interfaces/StateNameDetectorInterface.js.map +1 -0
- package/dist/interfaces/StatefulInterface.d.ts +5 -0
- package/dist/interfaces/StatefulInterface.d.ts.map +1 -0
- package/dist/interfaces/StatefulInterface.js +2 -0
- package/dist/interfaces/StatefulInterface.js.map +1 -0
- package/dist/interfaces/StatemachineInterface.d.ts +20 -0
- package/dist/interfaces/StatemachineInterface.d.ts.map +1 -0
- package/dist/interfaces/StatemachineInterface.js +2 -0
- package/dist/interfaces/StatemachineInterface.js.map +1 -0
- package/dist/interfaces/TransitionInterface.d.ts +12 -0
- package/dist/interfaces/TransitionInterface.d.ts.map +1 -0
- package/dist/interfaces/TransitionInterface.js +2 -0
- package/dist/interfaces/TransitionInterface.js.map +1 -0
- package/dist/interfaces/TransitionSelectorInterface.d.ts +5 -0
- package/dist/interfaces/TransitionSelectorInterface.d.ts.map +1 -0
- package/dist/interfaces/TransitionSelectorInterface.js +2 -0
- package/dist/interfaces/TransitionSelectorInterface.js.map +1 -0
- package/dist/interfaces/Weighted.d.ts +4 -0
- package/dist/interfaces/Weighted.d.ts.map +1 -0
- package/dist/interfaces/Weighted.js +2 -0
- package/dist/interfaces/Weighted.js.map +1 -0
- package/dist/interfaces/index.d.ts +24 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +2 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/mutex/LockAdapterMutex.d.ts +13 -0
- package/dist/mutex/LockAdapterMutex.d.ts.map +1 -0
- package/dist/mutex/LockAdapterMutex.js +32 -0
- package/dist/mutex/LockAdapterMutex.js.map +1 -0
- package/dist/mutex/MutexFactory.d.ts +11 -0
- package/dist/mutex/MutexFactory.d.ts.map +1 -0
- package/dist/mutex/MutexFactory.js +13 -0
- package/dist/mutex/MutexFactory.js.map +1 -0
- package/dist/mutex/NullMutex.d.ts +9 -0
- package/dist/mutex/NullMutex.d.ts.map +1 -0
- package/dist/mutex/NullMutex.js +18 -0
- package/dist/mutex/NullMutex.js.map +1 -0
- package/dist/mutex/index.d.ts +5 -0
- package/dist/mutex/index.d.ts.map +1 -0
- package/dist/mutex/index.js +4 -0
- package/dist/mutex/index.js.map +1 -0
- package/dist/observer/CallbackObserver.d.ts +8 -0
- package/dist/observer/CallbackObserver.d.ts.map +1 -0
- package/dist/observer/CallbackObserver.js +14 -0
- package/dist/observer/CallbackObserver.js.map +1 -0
- package/dist/observer/OnEnterObserver.d.ts +8 -0
- package/dist/observer/OnEnterObserver.d.ts.map +1 -0
- package/dist/observer/OnEnterObserver.js +28 -0
- package/dist/observer/OnEnterObserver.js.map +1 -0
- package/dist/observer/StatefulStatusChanger.d.ts +5 -0
- package/dist/observer/StatefulStatusChanger.d.ts.map +1 -0
- package/dist/observer/StatefulStatusChanger.js +24 -0
- package/dist/observer/StatefulStatusChanger.js.map +1 -0
- package/dist/observer/TransitionLogger.d.ts +9 -0
- package/dist/observer/TransitionLogger.d.ts.map +1 -0
- package/dist/observer/TransitionLogger.js +62 -0
- package/dist/observer/TransitionLogger.js.map +1 -0
- package/dist/observer/index.d.ts +5 -0
- package/dist/observer/index.d.ts.map +1 -0
- package/dist/observer/index.js +5 -0
- package/dist/observer/index.js.map +1 -0
- package/dist/selector/OneOrNoneActiveTransition.d.ts +6 -0
- package/dist/selector/OneOrNoneActiveTransition.d.ts.map +1 -0
- package/dist/selector/OneOrNoneActiveTransition.js +14 -0
- package/dist/selector/OneOrNoneActiveTransition.js.map +1 -0
- package/dist/selector/ScoreTransition.d.ts +9 -0
- package/dist/selector/ScoreTransition.d.ts.map +1 -0
- package/dist/selector/ScoreTransition.js +33 -0
- package/dist/selector/ScoreTransition.js.map +1 -0
- package/dist/selector/WeightTransition.d.ts +9 -0
- package/dist/selector/WeightTransition.d.ts.map +1 -0
- package/dist/selector/WeightTransition.js +26 -0
- package/dist/selector/WeightTransition.js.map +1 -0
- package/dist/selector/index.d.ts +4 -0
- package/dist/selector/index.d.ts.map +1 -0
- package/dist/selector/index.js +4 -0
- package/dist/selector/index.js.map +1 -0
- package/dist/util/SetupHelper.d.ts +17 -0
- package/dist/util/SetupHelper.d.ts.map +1 -0
- package/dist/util/SetupHelper.js +48 -0
- package/dist/util/SetupHelper.js.map +1 -0
- package/dist/util/StateCollectionMerger.d.ts +23 -0
- package/dist/util/StateCollectionMerger.d.ts.map +1 -0
- package/dist/util/StateCollectionMerger.js +83 -0
- package/dist/util/StateCollectionMerger.js.map +1 -0
- package/dist/util/index.d.ts +3 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +3 -0
- package/dist/util/index.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACV,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type { MaybePromise } from "./MaybePromise.js";
|
|
2
|
+
export { Event } from "./Event.js";
|
|
3
|
+
export { State } from "./State.js";
|
|
4
|
+
export { Transition } from "./Transition.js";
|
|
5
|
+
export { StateCollection } from "./StateCollection.js";
|
|
6
|
+
export { Process } from "./Process.js";
|
|
7
|
+
export { Statemachine } from "./Statemachine.js";
|
|
8
|
+
export { Dispatcher } from "./Dispatcher.js";
|
|
9
|
+
export type { Named, Metadata, Weighted, Observer, ObservableSubject, ConditionInterface, EventInterface, TransitionInterface, StateInterface, StateCollectionInterface, ProcessInterface, StatemachineInterface, MutexInterface, MutexFactoryInterface, LockAdapterInterface, TransitionSelectorInterface, ProcessDetectorInterface, StateNameDetectorInterface, FactoryInterface, StatefulInterface, LastStateHasChangedDateInterface, DispatcherInterface, CallbackInterface, LoggerInterface, } from "./interfaces/index.js";
|
|
10
|
+
export { Tautology, Contradiction, CallbackCondition, Timeout, AndComposite, OrComposite, Not, } from "./condition/index.js";
|
|
11
|
+
export type { ConditionCallbackFn } from "./condition/index.js";
|
|
12
|
+
export { CallbackObserver, StatefulStatusChanger, OnEnterObserver, TransitionLogger, } from "./observer/index.js";
|
|
13
|
+
export { ActiveTransitionFilter, FilterStateByEvent, FilterStateByTransition, FilterStateByFinalState, FilterTransitionByEvent, } from "./filter/index.js";
|
|
14
|
+
export { OneOrNoneActiveTransition, ScoreTransition, WeightTransition, } from "./selector/index.js";
|
|
15
|
+
export { NullMutex, LockAdapterMutex, MutexFactory } from "./mutex/index.js";
|
|
16
|
+
export type { StringConverter } from "./mutex/index.js";
|
|
17
|
+
export { Factory, SingleProcessDetector, AbstractNamedProcessDetector, StatefulStateNameDetector, } from "./factory/index.js";
|
|
18
|
+
export { SetupHelper, StateCollectionMerger } from "./util/index.js";
|
|
19
|
+
export { GraphBuilder } from "./graph/index.js";
|
|
20
|
+
export type { Graph, GraphNode, GraphEdge, DotOptions, MermaidOptions, } from "./graph/index.js";
|
|
21
|
+
export { WrongEventForStateError, LockCanNotBeAcquiredError, DuplicateStateError, } from "./error/index.js";
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,YAAY,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EACjB,gCAAgC,EAChC,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGrE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EACV,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Core classes
|
|
2
|
+
export { Event } from "./Event.js";
|
|
3
|
+
export { State } from "./State.js";
|
|
4
|
+
export { Transition } from "./Transition.js";
|
|
5
|
+
export { StateCollection } from "./StateCollection.js";
|
|
6
|
+
export { Process } from "./Process.js";
|
|
7
|
+
export { Statemachine } from "./Statemachine.js";
|
|
8
|
+
export { Dispatcher } from "./Dispatcher.js";
|
|
9
|
+
// Conditions
|
|
10
|
+
export { Tautology, Contradiction, CallbackCondition, Timeout, AndComposite, OrComposite, Not, } from "./condition/index.js";
|
|
11
|
+
// Observers
|
|
12
|
+
export { CallbackObserver, StatefulStatusChanger, OnEnterObserver, TransitionLogger, } from "./observer/index.js";
|
|
13
|
+
// Filters
|
|
14
|
+
export { ActiveTransitionFilter, FilterStateByEvent, FilterStateByTransition, FilterStateByFinalState, FilterTransitionByEvent, } from "./filter/index.js";
|
|
15
|
+
// Selectors
|
|
16
|
+
export { OneOrNoneActiveTransition, ScoreTransition, WeightTransition, } from "./selector/index.js";
|
|
17
|
+
// Mutex
|
|
18
|
+
export { NullMutex, LockAdapterMutex, MutexFactory } from "./mutex/index.js";
|
|
19
|
+
// Factory
|
|
20
|
+
export { Factory, SingleProcessDetector, AbstractNamedProcessDetector, StatefulStateNameDetector, } from "./factory/index.js";
|
|
21
|
+
// Utils
|
|
22
|
+
export { SetupHelper, StateCollectionMerger } from "./util/index.js";
|
|
23
|
+
// Graph
|
|
24
|
+
export { GraphBuilder } from "./graph/index.js";
|
|
25
|
+
// Errors
|
|
26
|
+
export { WrongEventForStateError, LockCanNotBeAcquiredError, DuplicateStateError, } from "./error/index.js";
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAe;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA8B7C,aAAa;AACb,OAAO,EACL,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAG9B,YAAY;AACZ,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,UAAU;AACV,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAE3B,YAAY;AACZ,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,QAAQ;AACR,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAG7E,UAAU;AACV,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,QAAQ;AACR,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAErE,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAShD,SAAS;AACT,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Named } from "./Named.js";
|
|
2
|
+
import type { MaybePromise } from "../MaybePromise.js";
|
|
3
|
+
export interface ConditionInterface extends Named {
|
|
4
|
+
checkCondition(subject: unknown, context: Map<string, unknown>): MaybePromise<boolean>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=ConditionInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/ConditionInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,kBAAmB,SAAQ,KAAK;IAC/C,cAAc,CACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,YAAY,CAAC,OAAO,CAAC,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionInterface.js","sourceRoot":"","sources":["../../src/interfaces/ConditionInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EventInterface } from "./EventInterface.js";
|
|
2
|
+
import type { MaybePromise } from "../MaybePromise.js";
|
|
3
|
+
export interface CallbackInterface {
|
|
4
|
+
invoke(): MaybePromise<void>;
|
|
5
|
+
}
|
|
6
|
+
export interface DispatcherInterface extends CallbackInterface {
|
|
7
|
+
dispatch(event: EventInterface, args?: unknown[], onReadyCallback?: CallbackInterface): void;
|
|
8
|
+
isReady(): boolean;
|
|
9
|
+
invoke(): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=DispatcherInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DispatcherInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/DispatcherInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,QAAQ,CACN,KAAK,EAAE,cAAc,EACrB,IAAI,CAAC,EAAE,OAAO,EAAE,EAChB,eAAe,CAAC,EAAE,iBAAiB,GAClC,IAAI,CAAC;IACR,OAAO,IAAI,OAAO,CAAC;IACnB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DispatcherInterface.js","sourceRoot":"","sources":["../../src/interfaces/DispatcherInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Named } from "./Named.js";
|
|
2
|
+
import type { Metadata } from "./Metadata.js";
|
|
3
|
+
import type { ObservableSubject } from "./Observer.js";
|
|
4
|
+
export interface EventInterface extends Named, Metadata, ObservableSubject {
|
|
5
|
+
getInvokeArgs(): unknown[];
|
|
6
|
+
invoke(...args: unknown[]): Promise<void>;
|
|
7
|
+
getMetadataValue(key: string): unknown;
|
|
8
|
+
setMetadataValue(key: string, value: unknown): void;
|
|
9
|
+
hasMetadataValue(key: string): boolean;
|
|
10
|
+
deleteMetadataValue(key: string): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=EventInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/EventInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,cAAe,SAAQ,KAAK,EAAE,QAAQ,EAAE,iBAAiB;IACxE,aAAa,IAAI,OAAO,EAAE,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACpD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventInterface.js","sourceRoot":"","sources":["../../src/interfaces/EventInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Observer } from "./Observer.js";
|
|
2
|
+
import type { StatemachineInterface } from "./StatemachineInterface.js";
|
|
3
|
+
import type { MutexFactoryInterface } from "./MutexFactoryInterface.js";
|
|
4
|
+
import type { TransitionSelectorInterface } from "./TransitionSelectorInterface.js";
|
|
5
|
+
export interface FactoryInterface {
|
|
6
|
+
createStatemachine(subject: unknown): Promise<StatemachineInterface>;
|
|
7
|
+
setMutexFactory(factory: MutexFactoryInterface | null): void;
|
|
8
|
+
setTransitionSelector(selector: TransitionSelectorInterface): void;
|
|
9
|
+
attachStatemachineObserver(observer: Observer): void;
|
|
10
|
+
detachStatemachineObserver(observer: Observer): void;
|
|
11
|
+
getStatemachineObservers(): Iterable<Observer>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=FactoryInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FactoryInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/FactoryInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAEpF,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrE,eAAe,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7D,qBAAqB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACnE,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrD,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrD,wBAAwB,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FactoryInterface.js","sourceRoot":"","sources":["../../src/interfaces/FactoryInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LastStateHasChangedDateInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/LastStateHasChangedDateInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gCAAgC;IAC/C,0BAA0B,IAAI,IAAI,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LastStateHasChangedDateInterface.js","sourceRoot":"","sources":["../../src/interfaces/LastStateHasChangedDateInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MaybePromise } from "../MaybePromise.js";
|
|
2
|
+
export interface LockAdapterInterface {
|
|
3
|
+
acquireLock(resourceName: string): MaybePromise<boolean>;
|
|
4
|
+
releaseLock(resourceName: string): MaybePromise<boolean>;
|
|
5
|
+
isLocked(resourceName: string): MaybePromise<boolean>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=LockAdapterInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockAdapterInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/LockAdapterInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACzD,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACzD,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;CACvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockAdapterInterface.js","sourceRoot":"","sources":["../../src/interfaces/LockAdapterInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggerInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/LoggerInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggerInterface.js","sourceRoot":"","sources":["../../src/interfaces/LoggerInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Metadata.d.ts","sourceRoot":"","sources":["../../src/interfaces/Metadata.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Metadata.js","sourceRoot":"","sources":["../../src/interfaces/Metadata.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MutexInterface } from "./MutexInterface.js";
|
|
2
|
+
import type { MaybePromise } from "../MaybePromise.js";
|
|
3
|
+
export interface MutexFactoryInterface {
|
|
4
|
+
createMutex(subject: unknown): MaybePromise<MutexInterface>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=MutexFactoryInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MutexFactoryInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/MutexFactoryInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;CAC7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MutexFactoryInterface.js","sourceRoot":"","sources":["../../src/interfaces/MutexFactoryInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MaybePromise } from "../MaybePromise.js";
|
|
2
|
+
export interface MutexInterface {
|
|
3
|
+
acquireLock(): MaybePromise<boolean>;
|
|
4
|
+
releaseLock(): MaybePromise<boolean>;
|
|
5
|
+
isAcquired(): boolean;
|
|
6
|
+
isLocked(): MaybePromise<boolean>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=MutexInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MutexInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/MutexInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,WAAW,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,UAAU,IAAI,OAAO,CAAC;IACtB,QAAQ,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MutexInterface.js","sourceRoot":"","sources":["../../src/interfaces/MutexInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Named.d.ts","sourceRoot":"","sources":["../../src/interfaces/Named.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,OAAO,IAAI,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Named.js","sourceRoot":"","sources":["../../src/interfaces/Named.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MaybePromise } from "../MaybePromise.js";
|
|
2
|
+
export interface Observer {
|
|
3
|
+
update(subject: ObservableSubject): MaybePromise<void>;
|
|
4
|
+
}
|
|
5
|
+
export interface ObservableSubject {
|
|
6
|
+
attach(observer: Observer): void;
|
|
7
|
+
detach(observer: Observer): void;
|
|
8
|
+
notify(): Promise<void>;
|
|
9
|
+
getObservers(): Iterable<Observer>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Observer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Observer.d.ts","sourceRoot":"","sources":["../../src/interfaces/Observer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,YAAY,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Observer.js","sourceRoot":"","sources":["../../src/interfaces/Observer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcessDetectorInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/ProcessDetectorInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAAC;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcessDetectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/ProcessDetectorInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Named } from "./Named.js";
|
|
2
|
+
import type { StateCollectionInterface } from "./StateCollectionInterface.js";
|
|
3
|
+
import type { StateInterface } from "./StateInterface.js";
|
|
4
|
+
export interface ProcessInterface extends Named, StateCollectionInterface {
|
|
5
|
+
getInitialState(): StateInterface;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ProcessInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcessInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/ProcessInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,gBAAiB,SAAQ,KAAK,EAAE,wBAAwB;IACvE,eAAe,IAAI,cAAc,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcessInterface.js","sourceRoot":"","sources":["../../src/interfaces/ProcessInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StateInterface } from "./StateInterface.js";
|
|
2
|
+
export interface StateCollectionInterface {
|
|
3
|
+
getStates(): Iterable<StateInterface>;
|
|
4
|
+
getState(name: string): StateInterface;
|
|
5
|
+
hasState(name: string): boolean;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=StateCollectionInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateCollectionInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StateCollectionInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACvC,SAAS,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateCollectionInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateCollectionInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Named } from "./Named.js";
|
|
2
|
+
import type { Metadata } from "./Metadata.js";
|
|
3
|
+
import type { TransitionInterface } from "./TransitionInterface.js";
|
|
4
|
+
import type { EventInterface } from "./EventInterface.js";
|
|
5
|
+
export interface StateInterface extends Named, Metadata {
|
|
6
|
+
getTransitions(): Iterable<TransitionInterface>;
|
|
7
|
+
addTransition(transition: TransitionInterface): void;
|
|
8
|
+
getEventNames(): string[];
|
|
9
|
+
hasEvent(name: string): boolean;
|
|
10
|
+
getEvent(name: string): EventInterface;
|
|
11
|
+
getMetadataValue(key: string): unknown;
|
|
12
|
+
setMetadataValue(key: string, value: unknown): void;
|
|
13
|
+
hasMetadataValue(key: string): boolean;
|
|
14
|
+
deleteMetadataValue(key: string): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=StateInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StateInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,cAAe,SAAQ,KAAK,EAAE,QAAQ;IACrD,cAAc,IAAI,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAChD,aAAa,CAAC,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACrD,aAAa,IAAI,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC;IACvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACpD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateNameDetectorInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StateNameDetectorInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateNameDetectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateNameDetectorInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatefulInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StatefulInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,IAAI,MAAM,CAAC;IAC9B,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatefulInterface.js","sourceRoot":"","sources":["../../src/interfaces/StatefulInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ObservableSubject } from "./Observer.js";
|
|
2
|
+
import type { StateInterface } from "./StateInterface.js";
|
|
3
|
+
import type { ProcessInterface } from "./ProcessInterface.js";
|
|
4
|
+
import type { TransitionInterface } from "./TransitionInterface.js";
|
|
5
|
+
export interface StatemachineInterface extends ObservableSubject {
|
|
6
|
+
getCurrentState(): StateInterface;
|
|
7
|
+
getSubject(): unknown;
|
|
8
|
+
getProcess(): ProcessInterface;
|
|
9
|
+
triggerEvent(name: string, context?: Map<string, unknown>): Promise<void>;
|
|
10
|
+
checkTransitions(context?: Map<string, unknown>): Promise<void>;
|
|
11
|
+
getSelectedTransition(): TransitionInterface | null;
|
|
12
|
+
getLastState(): StateInterface | null;
|
|
13
|
+
getCurrentContext(): Map<string, unknown> | null;
|
|
14
|
+
acquireLock(): Promise<boolean>;
|
|
15
|
+
releaseLock(): Promise<void>;
|
|
16
|
+
isLockAcquired(): boolean;
|
|
17
|
+
isAutoreleaseLock(): boolean;
|
|
18
|
+
setAutoreleaseLock(autorelease: boolean): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=StatemachineInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatemachineInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StatemachineInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,eAAe,IAAI,cAAc,CAAC;IAClC,UAAU,IAAI,OAAO,CAAC;IACtB,UAAU,IAAI,gBAAgB,CAAC;IAC/B,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,gBAAgB,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,qBAAqB,IAAI,mBAAmB,GAAG,IAAI,CAAC;IACpD,YAAY,IAAI,cAAc,GAAG,IAAI,CAAC;IACtC,iBAAiB,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,cAAc,IAAI,OAAO,CAAC;IAC1B,iBAAiB,IAAI,OAAO,CAAC;IAC7B,kBAAkB,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatemachineInterface.js","sourceRoot":"","sources":["../../src/interfaces/StatemachineInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Weighted } from "./Weighted.js";
|
|
2
|
+
import type { StateInterface } from "./StateInterface.js";
|
|
3
|
+
import type { EventInterface } from "./EventInterface.js";
|
|
4
|
+
import type { ConditionInterface } from "./ConditionInterface.js";
|
|
5
|
+
export interface TransitionInterface extends Weighted {
|
|
6
|
+
getTargetState(): StateInterface;
|
|
7
|
+
getEventName(): string | null;
|
|
8
|
+
getConditionName(): string | null;
|
|
9
|
+
getCondition(): ConditionInterface | null;
|
|
10
|
+
isActive(subject: unknown, context: Map<string, unknown>, event?: EventInterface): Promise<boolean>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=TransitionInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/TransitionInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACnD,cAAc,IAAI,cAAc,CAAC;IACjC,YAAY,IAAI,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,kBAAkB,GAAG,IAAI,CAAC;IAC1C,QAAQ,CACN,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,CAAC,EAAE,cAAc,GACrB,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionInterface.js","sourceRoot":"","sources":["../../src/interfaces/TransitionInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TransitionInterface } from "./TransitionInterface.js";
|
|
2
|
+
export interface TransitionSelectorInterface {
|
|
3
|
+
selectTransition(transitions: Iterable<TransitionInterface>): TransitionInterface | null;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=TransitionSelectorInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionSelectorInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/TransitionSelectorInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,CACd,WAAW,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GACzC,mBAAmB,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionSelectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/TransitionSelectorInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Weighted.d.ts","sourceRoot":"","sources":["../../src/interfaces/Weighted.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,SAAS,IAAI,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Weighted.js","sourceRoot":"","sources":["../../src/interfaces/Weighted.ts"],"names":[],"mappings":""}
|