@camcima/finita 1.0.0 → 2.1.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.
Files changed (298) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -3
  3. package/dist/index.cjs +1422 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +525 -0
  6. package/dist/index.d.ts +525 -22
  7. package/dist/index.js +1356 -26
  8. package/dist/index.js.map +1 -1
  9. package/package.json +22 -5
  10. package/dist/Dispatcher.d.ts +0 -11
  11. package/dist/Dispatcher.d.ts.map +0 -1
  12. package/dist/Dispatcher.js +0 -30
  13. package/dist/Dispatcher.js.map +0 -1
  14. package/dist/Event.d.ts +0 -22
  15. package/dist/Event.d.ts.map +0 -1
  16. package/dist/Event.js +0 -54
  17. package/dist/Event.js.map +0 -1
  18. package/dist/MaybePromise.d.ts +0 -2
  19. package/dist/MaybePromise.d.ts.map +0 -1
  20. package/dist/MaybePromise.js +0 -2
  21. package/dist/MaybePromise.js.map +0 -1
  22. package/dist/Process.d.ts +0 -15
  23. package/dist/Process.d.ts.map +0 -1
  24. package/dist/Process.js +0 -43
  25. package/dist/Process.js.map +0 -1
  26. package/dist/State.d.ts +0 -22
  27. package/dist/State.d.ts.map +0 -1
  28. package/dist/State.js +0 -65
  29. package/dist/State.js.map +0 -1
  30. package/dist/StateCollection.d.ts +0 -14
  31. package/dist/StateCollection.d.ts.map +0 -1
  32. package/dist/StateCollection.js +0 -37
  33. package/dist/StateCollection.js.map +0 -1
  34. package/dist/Statemachine.d.ts +0 -45
  35. package/dist/Statemachine.d.ts.map +0 -1
  36. package/dist/Statemachine.js +0 -206
  37. package/dist/Statemachine.js.map +0 -1
  38. package/dist/Transition.d.ts +0 -19
  39. package/dist/Transition.d.ts.map +0 -1
  40. package/dist/Transition.js +0 -46
  41. package/dist/Transition.js.map +0 -1
  42. package/dist/condition/AndComposite.d.ts +0 -9
  43. package/dist/condition/AndComposite.d.ts.map +0 -1
  44. package/dist/condition/AndComposite.js +0 -23
  45. package/dist/condition/AndComposite.js.map +0 -1
  46. package/dist/condition/CallbackCondition.d.ts +0 -11
  47. package/dist/condition/CallbackCondition.d.ts.map +0 -1
  48. package/dist/condition/CallbackCondition.js +0 -15
  49. package/dist/condition/CallbackCondition.js.map +0 -1
  50. package/dist/condition/Contradiction.d.ts +0 -8
  51. package/dist/condition/Contradiction.d.ts.map +0 -1
  52. package/dist/condition/Contradiction.js +0 -13
  53. package/dist/condition/Contradiction.js.map +0 -1
  54. package/dist/condition/Not.d.ts +0 -8
  55. package/dist/condition/Not.d.ts.map +0 -1
  56. package/dist/condition/Not.js +0 -13
  57. package/dist/condition/Not.js.map +0 -1
  58. package/dist/condition/OrComposite.d.ts +0 -9
  59. package/dist/condition/OrComposite.d.ts.map +0 -1
  60. package/dist/condition/OrComposite.js +0 -23
  61. package/dist/condition/OrComposite.js.map +0 -1
  62. package/dist/condition/Tautology.d.ts +0 -8
  63. package/dist/condition/Tautology.d.ts.map +0 -1
  64. package/dist/condition/Tautology.js +0 -13
  65. package/dist/condition/Tautology.js.map +0 -1
  66. package/dist/condition/Timeout.d.ts +0 -10
  67. package/dist/condition/Timeout.d.ts.map +0 -1
  68. package/dist/condition/Timeout.js +0 -30
  69. package/dist/condition/Timeout.js.map +0 -1
  70. package/dist/condition/index.d.ts +0 -9
  71. package/dist/condition/index.d.ts.map +0 -1
  72. package/dist/condition/index.js +0 -8
  73. package/dist/condition/index.js.map +0 -1
  74. package/dist/error/DuplicateStateError.d.ts +0 -5
  75. package/dist/error/DuplicateStateError.d.ts.map +0 -1
  76. package/dist/error/DuplicateStateError.js +0 -9
  77. package/dist/error/DuplicateStateError.js.map +0 -1
  78. package/dist/error/LockCanNotBeAcquiredError.d.ts +0 -4
  79. package/dist/error/LockCanNotBeAcquiredError.d.ts.map +0 -1
  80. package/dist/error/LockCanNotBeAcquiredError.js +0 -7
  81. package/dist/error/LockCanNotBeAcquiredError.js.map +0 -1
  82. package/dist/error/WrongEventForStateError.d.ts +0 -6
  83. package/dist/error/WrongEventForStateError.d.ts.map +0 -1
  84. package/dist/error/WrongEventForStateError.js +0 -11
  85. package/dist/error/WrongEventForStateError.js.map +0 -1
  86. package/dist/error/index.d.ts +0 -4
  87. package/dist/error/index.d.ts.map +0 -1
  88. package/dist/error/index.js +0 -4
  89. package/dist/error/index.js.map +0 -1
  90. package/dist/factory/AbstractNamedProcessDetector.d.ts +0 -10
  91. package/dist/factory/AbstractNamedProcessDetector.d.ts.map +0 -1
  92. package/dist/factory/AbstractNamedProcessDetector.js +0 -18
  93. package/dist/factory/AbstractNamedProcessDetector.js.map +0 -1
  94. package/dist/factory/Factory.d.ts +0 -22
  95. package/dist/factory/Factory.d.ts.map +0 -1
  96. package/dist/factory/Factory.js +0 -42
  97. package/dist/factory/Factory.js.map +0 -1
  98. package/dist/factory/SingleProcessDetector.d.ts +0 -8
  99. package/dist/factory/SingleProcessDetector.d.ts.map +0 -1
  100. package/dist/factory/SingleProcessDetector.js +0 -10
  101. package/dist/factory/SingleProcessDetector.js.map +0 -1
  102. package/dist/factory/StatefulStateNameDetector.d.ts +0 -5
  103. package/dist/factory/StatefulStateNameDetector.d.ts.map +0 -1
  104. package/dist/factory/StatefulStateNameDetector.js +0 -15
  105. package/dist/factory/StatefulStateNameDetector.js.map +0 -1
  106. package/dist/factory/index.d.ts +0 -5
  107. package/dist/factory/index.d.ts.map +0 -1
  108. package/dist/factory/index.js +0 -5
  109. package/dist/factory/index.js.map +0 -1
  110. package/dist/filter/ActiveTransitionFilter.d.ts +0 -6
  111. package/dist/filter/ActiveTransitionFilter.d.ts.map +0 -1
  112. package/dist/filter/ActiveTransitionFilter.js +0 -12
  113. package/dist/filter/ActiveTransitionFilter.js.map +0 -1
  114. package/dist/filter/FilterStateByEvent.d.ts +0 -5
  115. package/dist/filter/FilterStateByEvent.d.ts.map +0 -1
  116. package/dist/filter/FilterStateByEvent.js +0 -10
  117. package/dist/filter/FilterStateByEvent.js.map +0 -1
  118. package/dist/filter/FilterStateByFinalState.d.ts +0 -5
  119. package/dist/filter/FilterStateByFinalState.d.ts.map +0 -1
  120. package/dist/filter/FilterStateByFinalState.js +0 -15
  121. package/dist/filter/FilterStateByFinalState.js.map +0 -1
  122. package/dist/filter/FilterStateByTransition.d.ts +0 -8
  123. package/dist/filter/FilterStateByTransition.d.ts.map +0 -1
  124. package/dist/filter/FilterStateByTransition.js +0 -16
  125. package/dist/filter/FilterStateByTransition.js.map +0 -1
  126. package/dist/filter/FilterTransitionByEvent.d.ts +0 -5
  127. package/dist/filter/FilterTransitionByEvent.d.ts.map +0 -1
  128. package/dist/filter/FilterTransitionByEvent.js +0 -10
  129. package/dist/filter/FilterTransitionByEvent.js.map +0 -1
  130. package/dist/filter/index.d.ts +0 -6
  131. package/dist/filter/index.d.ts.map +0 -1
  132. package/dist/filter/index.js +0 -6
  133. package/dist/filter/index.js.map +0 -1
  134. package/dist/graph/GraphBuilder.d.ts +0 -37
  135. package/dist/graph/GraphBuilder.d.ts.map +0 -1
  136. package/dist/graph/GraphBuilder.js +0 -132
  137. package/dist/graph/GraphBuilder.js.map +0 -1
  138. package/dist/graph/index.d.ts +0 -3
  139. package/dist/graph/index.d.ts.map +0 -1
  140. package/dist/graph/index.js +0 -2
  141. package/dist/graph/index.js.map +0 -1
  142. package/dist/index.d.ts.map +0 -1
  143. package/dist/interfaces/ConditionInterface.d.ts +0 -6
  144. package/dist/interfaces/ConditionInterface.d.ts.map +0 -1
  145. package/dist/interfaces/ConditionInterface.js +0 -2
  146. package/dist/interfaces/ConditionInterface.js.map +0 -1
  147. package/dist/interfaces/DispatcherInterface.d.ts +0 -11
  148. package/dist/interfaces/DispatcherInterface.d.ts.map +0 -1
  149. package/dist/interfaces/DispatcherInterface.js +0 -2
  150. package/dist/interfaces/DispatcherInterface.js.map +0 -1
  151. package/dist/interfaces/EventInterface.d.ts +0 -12
  152. package/dist/interfaces/EventInterface.d.ts.map +0 -1
  153. package/dist/interfaces/EventInterface.js +0 -2
  154. package/dist/interfaces/EventInterface.js.map +0 -1
  155. package/dist/interfaces/FactoryInterface.d.ts +0 -13
  156. package/dist/interfaces/FactoryInterface.d.ts.map +0 -1
  157. package/dist/interfaces/FactoryInterface.js +0 -2
  158. package/dist/interfaces/FactoryInterface.js.map +0 -1
  159. package/dist/interfaces/LastStateHasChangedDateInterface.d.ts +0 -4
  160. package/dist/interfaces/LastStateHasChangedDateInterface.d.ts.map +0 -1
  161. package/dist/interfaces/LastStateHasChangedDateInterface.js +0 -2
  162. package/dist/interfaces/LastStateHasChangedDateInterface.js.map +0 -1
  163. package/dist/interfaces/LockAdapterInterface.d.ts +0 -7
  164. package/dist/interfaces/LockAdapterInterface.d.ts.map +0 -1
  165. package/dist/interfaces/LockAdapterInterface.js +0 -2
  166. package/dist/interfaces/LockAdapterInterface.js.map +0 -1
  167. package/dist/interfaces/LoggerInterface.d.ts +0 -4
  168. package/dist/interfaces/LoggerInterface.d.ts.map +0 -1
  169. package/dist/interfaces/LoggerInterface.js +0 -2
  170. package/dist/interfaces/LoggerInterface.js.map +0 -1
  171. package/dist/interfaces/Metadata.d.ts +0 -4
  172. package/dist/interfaces/Metadata.d.ts.map +0 -1
  173. package/dist/interfaces/Metadata.js +0 -2
  174. package/dist/interfaces/Metadata.js.map +0 -1
  175. package/dist/interfaces/MutexFactoryInterface.d.ts +0 -6
  176. package/dist/interfaces/MutexFactoryInterface.d.ts.map +0 -1
  177. package/dist/interfaces/MutexFactoryInterface.js +0 -2
  178. package/dist/interfaces/MutexFactoryInterface.js.map +0 -1
  179. package/dist/interfaces/MutexInterface.d.ts +0 -8
  180. package/dist/interfaces/MutexInterface.d.ts.map +0 -1
  181. package/dist/interfaces/MutexInterface.js +0 -2
  182. package/dist/interfaces/MutexInterface.js.map +0 -1
  183. package/dist/interfaces/Named.d.ts +0 -4
  184. package/dist/interfaces/Named.d.ts.map +0 -1
  185. package/dist/interfaces/Named.js +0 -2
  186. package/dist/interfaces/Named.js.map +0 -1
  187. package/dist/interfaces/Observer.d.ts +0 -11
  188. package/dist/interfaces/Observer.d.ts.map +0 -1
  189. package/dist/interfaces/Observer.js +0 -2
  190. package/dist/interfaces/Observer.js.map +0 -1
  191. package/dist/interfaces/ProcessDetectorInterface.d.ts +0 -5
  192. package/dist/interfaces/ProcessDetectorInterface.d.ts.map +0 -1
  193. package/dist/interfaces/ProcessDetectorInterface.js +0 -2
  194. package/dist/interfaces/ProcessDetectorInterface.js.map +0 -1
  195. package/dist/interfaces/ProcessInterface.d.ts +0 -7
  196. package/dist/interfaces/ProcessInterface.d.ts.map +0 -1
  197. package/dist/interfaces/ProcessInterface.js +0 -2
  198. package/dist/interfaces/ProcessInterface.js.map +0 -1
  199. package/dist/interfaces/StateCollectionInterface.d.ts +0 -7
  200. package/dist/interfaces/StateCollectionInterface.d.ts.map +0 -1
  201. package/dist/interfaces/StateCollectionInterface.js +0 -2
  202. package/dist/interfaces/StateCollectionInterface.js.map +0 -1
  203. package/dist/interfaces/StateInterface.d.ts +0 -16
  204. package/dist/interfaces/StateInterface.d.ts.map +0 -1
  205. package/dist/interfaces/StateInterface.js +0 -2
  206. package/dist/interfaces/StateInterface.js.map +0 -1
  207. package/dist/interfaces/StateNameDetectorInterface.d.ts +0 -4
  208. package/dist/interfaces/StateNameDetectorInterface.d.ts.map +0 -1
  209. package/dist/interfaces/StateNameDetectorInterface.js +0 -2
  210. package/dist/interfaces/StateNameDetectorInterface.js.map +0 -1
  211. package/dist/interfaces/StatefulInterface.d.ts +0 -5
  212. package/dist/interfaces/StatefulInterface.d.ts.map +0 -1
  213. package/dist/interfaces/StatefulInterface.js +0 -2
  214. package/dist/interfaces/StatefulInterface.js.map +0 -1
  215. package/dist/interfaces/StatemachineInterface.d.ts +0 -20
  216. package/dist/interfaces/StatemachineInterface.d.ts.map +0 -1
  217. package/dist/interfaces/StatemachineInterface.js +0 -2
  218. package/dist/interfaces/StatemachineInterface.js.map +0 -1
  219. package/dist/interfaces/TransitionInterface.d.ts +0 -12
  220. package/dist/interfaces/TransitionInterface.d.ts.map +0 -1
  221. package/dist/interfaces/TransitionInterface.js +0 -2
  222. package/dist/interfaces/TransitionInterface.js.map +0 -1
  223. package/dist/interfaces/TransitionSelectorInterface.d.ts +0 -5
  224. package/dist/interfaces/TransitionSelectorInterface.d.ts.map +0 -1
  225. package/dist/interfaces/TransitionSelectorInterface.js +0 -2
  226. package/dist/interfaces/TransitionSelectorInterface.js.map +0 -1
  227. package/dist/interfaces/Weighted.d.ts +0 -4
  228. package/dist/interfaces/Weighted.d.ts.map +0 -1
  229. package/dist/interfaces/Weighted.js +0 -2
  230. package/dist/interfaces/Weighted.js.map +0 -1
  231. package/dist/interfaces/index.d.ts +0 -24
  232. package/dist/interfaces/index.d.ts.map +0 -1
  233. package/dist/interfaces/index.js +0 -2
  234. package/dist/interfaces/index.js.map +0 -1
  235. package/dist/mutex/LockAdapterMutex.d.ts +0 -13
  236. package/dist/mutex/LockAdapterMutex.d.ts.map +0 -1
  237. package/dist/mutex/LockAdapterMutex.js +0 -32
  238. package/dist/mutex/LockAdapterMutex.js.map +0 -1
  239. package/dist/mutex/MutexFactory.d.ts +0 -11
  240. package/dist/mutex/MutexFactory.d.ts.map +0 -1
  241. package/dist/mutex/MutexFactory.js +0 -13
  242. package/dist/mutex/MutexFactory.js.map +0 -1
  243. package/dist/mutex/NullMutex.d.ts +0 -9
  244. package/dist/mutex/NullMutex.d.ts.map +0 -1
  245. package/dist/mutex/NullMutex.js +0 -18
  246. package/dist/mutex/NullMutex.js.map +0 -1
  247. package/dist/mutex/index.d.ts +0 -5
  248. package/dist/mutex/index.d.ts.map +0 -1
  249. package/dist/mutex/index.js +0 -4
  250. package/dist/mutex/index.js.map +0 -1
  251. package/dist/observer/CallbackObserver.d.ts +0 -8
  252. package/dist/observer/CallbackObserver.d.ts.map +0 -1
  253. package/dist/observer/CallbackObserver.js +0 -14
  254. package/dist/observer/CallbackObserver.js.map +0 -1
  255. package/dist/observer/OnEnterObserver.d.ts +0 -8
  256. package/dist/observer/OnEnterObserver.d.ts.map +0 -1
  257. package/dist/observer/OnEnterObserver.js +0 -28
  258. package/dist/observer/OnEnterObserver.js.map +0 -1
  259. package/dist/observer/StatefulStatusChanger.d.ts +0 -5
  260. package/dist/observer/StatefulStatusChanger.d.ts.map +0 -1
  261. package/dist/observer/StatefulStatusChanger.js +0 -24
  262. package/dist/observer/StatefulStatusChanger.js.map +0 -1
  263. package/dist/observer/TransitionLogger.d.ts +0 -9
  264. package/dist/observer/TransitionLogger.d.ts.map +0 -1
  265. package/dist/observer/TransitionLogger.js +0 -62
  266. package/dist/observer/TransitionLogger.js.map +0 -1
  267. package/dist/observer/index.d.ts +0 -5
  268. package/dist/observer/index.d.ts.map +0 -1
  269. package/dist/observer/index.js +0 -5
  270. package/dist/observer/index.js.map +0 -1
  271. package/dist/selector/OneOrNoneActiveTransition.d.ts +0 -6
  272. package/dist/selector/OneOrNoneActiveTransition.d.ts.map +0 -1
  273. package/dist/selector/OneOrNoneActiveTransition.js +0 -14
  274. package/dist/selector/OneOrNoneActiveTransition.js.map +0 -1
  275. package/dist/selector/ScoreTransition.d.ts +0 -9
  276. package/dist/selector/ScoreTransition.d.ts.map +0 -1
  277. package/dist/selector/ScoreTransition.js +0 -33
  278. package/dist/selector/ScoreTransition.js.map +0 -1
  279. package/dist/selector/WeightTransition.d.ts +0 -9
  280. package/dist/selector/WeightTransition.d.ts.map +0 -1
  281. package/dist/selector/WeightTransition.js +0 -26
  282. package/dist/selector/WeightTransition.js.map +0 -1
  283. package/dist/selector/index.d.ts +0 -4
  284. package/dist/selector/index.d.ts.map +0 -1
  285. package/dist/selector/index.js +0 -4
  286. package/dist/selector/index.js.map +0 -1
  287. package/dist/util/SetupHelper.d.ts +0 -17
  288. package/dist/util/SetupHelper.d.ts.map +0 -1
  289. package/dist/util/SetupHelper.js +0 -48
  290. package/dist/util/SetupHelper.js.map +0 -1
  291. package/dist/util/StateCollectionMerger.d.ts +0 -23
  292. package/dist/util/StateCollectionMerger.d.ts.map +0 -1
  293. package/dist/util/StateCollectionMerger.js +0 -83
  294. package/dist/util/StateCollectionMerger.js.map +0 -1
  295. package/dist/util/index.d.ts +0 -3
  296. package/dist/util/index.d.ts.map +0 -1
  297. package/dist/util/index.js +0 -3
  298. package/dist/util/index.js.map +0 -1
@@ -1,132 +0,0 @@
1
- function isNamed(obj) {
2
- return (typeof obj === "object" &&
3
- obj !== null &&
4
- "getName" in obj &&
5
- typeof obj.getName === "function");
6
- }
7
- function escapeDoubleQuotes(str) {
8
- return str.replace(/"/g, '\\"');
9
- }
10
- function toMermaidId(name) {
11
- return ("s_" +
12
- name.replace(/[^a-zA-Z0-9]/g, (ch) => `_${ch.charCodeAt(0).toString(16).padStart(4, "0")}`));
13
- }
14
- function escapeMermaidLabel(str) {
15
- return str.replace(/"/g, "#quot;");
16
- }
17
- function convertToString(obj) {
18
- if (isNamed(obj)) {
19
- return obj.getName();
20
- }
21
- return String(obj);
22
- }
23
- export class GraphBuilder {
24
- nodes = new Map();
25
- edges = [];
26
- getOrCreateNode(state) {
27
- const name = state.getName();
28
- let node = this.nodes.get(name);
29
- if (!node) {
30
- node = { id: name, label: name, metadata: state.getMetadata() };
31
- this.nodes.set(name, node);
32
- }
33
- return node;
34
- }
35
- getTransitionLabel(state, transition) {
36
- const parts = [];
37
- const eventName = transition.getEventName();
38
- if (eventName) {
39
- parts.push(`E: ${eventName}`);
40
- const event = state.getEvent(eventName);
41
- const observerNames = [];
42
- for (const observer of event.getObservers()) {
43
- observerNames.push(convertToString(observer));
44
- }
45
- if (observerNames.length > 0) {
46
- parts.push(`C: ${observerNames.join(", ")}`);
47
- }
48
- }
49
- const conditionName = transition.getConditionName();
50
- if (conditionName) {
51
- parts.push(`IF: ${conditionName}`);
52
- }
53
- parts.push(`W: ${transition.getWeight()}`);
54
- return parts.join("\n");
55
- }
56
- addState(state) {
57
- this.getOrCreateNode(state);
58
- for (const transition of state.getTransitions()) {
59
- const sourceNode = this.getOrCreateNode(state);
60
- const targetNode = this.getOrCreateNode(transition.getTargetState());
61
- const label = this.getTransitionLabel(state, transition);
62
- const metadata = {};
63
- const eventName = transition.getEventName();
64
- if (eventName && state.hasEvent(eventName)) {
65
- Object.assign(metadata, state.getEvent(eventName).getMetadata());
66
- }
67
- this.edges.push({
68
- source: sourceNode.id,
69
- target: targetNode.id,
70
- label,
71
- metadata,
72
- });
73
- }
74
- }
75
- addStates(states) {
76
- for (const state of states) {
77
- this.addState(state);
78
- }
79
- }
80
- addStateCollection(stateCollection) {
81
- this.addStates(stateCollection.getStates());
82
- }
83
- getGraph() {
84
- return {
85
- nodes: Array.from(this.nodes.values()),
86
- edges: [...this.edges],
87
- };
88
- }
89
- toDot(options) {
90
- const graph = this.getGraph();
91
- const rankdir = options?.rankdir ?? "LR";
92
- const lines = [];
93
- lines.push("digraph {");
94
- lines.push(` rankdir=${rankdir};`);
95
- for (const node of graph.nodes) {
96
- const label = escapeDoubleQuotes(node.label);
97
- lines.push(` "${label}" [label="${label}"];`);
98
- }
99
- for (const edge of graph.edges) {
100
- const source = escapeDoubleQuotes(edge.source);
101
- const target = escapeDoubleQuotes(edge.target);
102
- const label = escapeDoubleQuotes(edge.label);
103
- lines.push(` "${source}" -> "${target}" [label="${label}"];`);
104
- }
105
- lines.push("}");
106
- return lines.join("\n");
107
- }
108
- toMermaid(options) {
109
- const graph = this.getGraph();
110
- const direction = options?.direction ?? "LR";
111
- const lines = [];
112
- lines.push(`stateDiagram-v2`);
113
- lines.push(` direction ${direction}`);
114
- const declared = new Set();
115
- for (const node of graph.nodes) {
116
- const id = toMermaidId(node.id);
117
- if (!declared.has(id)) {
118
- declared.add(id);
119
- const label = escapeMermaidLabel(node.label);
120
- lines.push(` ${id} : "${label}"`);
121
- }
122
- }
123
- for (const edge of graph.edges) {
124
- const source = toMermaidId(edge.source);
125
- const target = toMermaidId(edge.target);
126
- const label = escapeMermaidLabel(edge.label.replace(/\n/g, " / "));
127
- lines.push(` ${source} --> ${target} : ${label}`);
128
- }
129
- return lines.join("\n");
130
- }
131
- }
132
- //# sourceMappingURL=GraphBuilder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphBuilder.js","sourceRoot":"","sources":["../../src/graph/GraphBuilder.ts"],"names":[],"mappings":"AAuBA,SAAS,OAAO,CAAC,GAAY;IAC3B,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,SAAS,IAAI,GAAG;QAChB,OAAQ,GAAa,CAAC,OAAO,KAAK,UAAU,CAC7C,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,CACL,IAAI;QACJ,IAAI,CAAC,OAAO,CACV,eAAe,EACf,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAC7D,CACF,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,eAAe,CAAC,GAAY;IACnC,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACjB,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAUD,MAAM,OAAO,YAAY;IACN,KAAK,GAA2B,IAAI,GAAG,EAAE,CAAC;IAC1C,KAAK,GAAgB,EAAE,CAAC;IAEjC,eAAe,CAAC,KAAqB;QAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;QAC7B,IAAI,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C;QAC7C,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,eAAe,SAAS,EAAE,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC/B,MAAM,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACjB,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC7C,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACxC,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACxC,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;YACnE,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,QAAQ,MAAM,MAAM,KAAK,EAAE,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -1,3 +0,0 @@
1
- export { GraphBuilder } from "./GraphBuilder.js";
2
- export type { Graph, GraphNode, GraphEdge, DotOptions, MermaidOptions, } from "./GraphBuilder.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export { GraphBuilder } from "./GraphBuilder.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ConditionInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConditionInterface.js","sourceRoot":"","sources":["../../src/interfaces/ConditionInterface.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=DispatcherInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DispatcherInterface.js","sourceRoot":"","sources":["../../src/interfaces/DispatcherInterface.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=EventInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventInterface.js","sourceRoot":"","sources":["../../src/interfaces/EventInterface.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=FactoryInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FactoryInterface.js","sourceRoot":"","sources":["../../src/interfaces/FactoryInterface.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export interface LastStateHasChangedDateInterface {
2
- getLastStateHasChangedDate(): Date;
3
- }
4
- //# sourceMappingURL=LastStateHasChangedDateInterface.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=LastStateHasChangedDateInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LastStateHasChangedDateInterface.js","sourceRoot":"","sources":["../../src/interfaces/LastStateHasChangedDateInterface.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=LockAdapterInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LockAdapterInterface.js","sourceRoot":"","sources":["../../src/interfaces/LockAdapterInterface.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export interface LoggerInterface {
2
- log(level: string, message: string, context?: Record<string, unknown>): void;
3
- }
4
- //# sourceMappingURL=LoggerInterface.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=LoggerInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoggerInterface.js","sourceRoot":"","sources":["../../src/interfaces/LoggerInterface.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export interface Metadata {
2
- getMetadata(): Record<string, unknown>;
3
- }
4
- //# sourceMappingURL=Metadata.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Metadata.js","sourceRoot":"","sources":["../../src/interfaces/Metadata.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=MutexFactoryInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MutexFactoryInterface.js","sourceRoot":"","sources":["../../src/interfaces/MutexFactoryInterface.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=MutexInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MutexInterface.js","sourceRoot":"","sources":["../../src/interfaces/MutexInterface.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export interface Named {
2
- getName(): string;
3
- }
4
- //# sourceMappingURL=Named.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Named.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Named.js","sourceRoot":"","sources":["../../src/interfaces/Named.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Observer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Observer.js","sourceRoot":"","sources":["../../src/interfaces/Observer.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import type { ProcessInterface } from "./ProcessInterface.js";
2
- export interface ProcessDetectorInterface {
3
- detectProcess(subject: unknown): ProcessInterface;
4
- }
5
- //# sourceMappingURL=ProcessDetectorInterface.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ProcessDetectorInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProcessDetectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/ProcessDetectorInterface.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ProcessInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProcessInterface.js","sourceRoot":"","sources":["../../src/interfaces/ProcessInterface.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=StateCollectionInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StateCollectionInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateCollectionInterface.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=StateInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StateInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateInterface.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export interface StateNameDetectorInterface {
2
- detectCurrentStateName(subject: unknown): string | null;
3
- }
4
- //# sourceMappingURL=StateNameDetectorInterface.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=StateNameDetectorInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StateNameDetectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateNameDetectorInterface.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- export interface StatefulInterface {
2
- getCurrentStateName(): string;
3
- setCurrentStateName(stateName: string): void;
4
- }
5
- //# sourceMappingURL=StatefulInterface.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=StatefulInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StatefulInterface.js","sourceRoot":"","sources":["../../src/interfaces/StatefulInterface.ts"],"names":[],"mappings":""}
@@ -1,20 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=StatemachineInterface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StatemachineInterface.js","sourceRoot":"","sources":["../../src/interfaces/StatemachineInterface.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
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