@emmvish/stable-request 2.1.4 → 2.1.6
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 +18 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,11 @@ A production-grade TypeScript library for resilient API integrations, batch proc
|
|
|
22
22
|
- [Sequential & Concurrent Phases](#sequential--concurrent-phases)
|
|
23
23
|
- [Non-Linear Workflows](#non-linear-workflows)
|
|
24
24
|
- [Branched Workflows](#branched-workflows)
|
|
25
|
-
|
|
25
|
+
- [Graph-based Workflow Patterns](#graph-based-workflow-patterns)
|
|
26
|
+
- [Graph-Based Workflows with Mixed Items](#graph-based-workflows-with-mixed-items)
|
|
27
|
+
- [Parallel Phase Execution](#parallel-phase-execution)
|
|
28
|
+
- [Merge Points](#merge-points)
|
|
29
|
+
- [Linear Helper](#linear-helper)
|
|
26
30
|
- [Configuration & State](#configuration--state)
|
|
27
31
|
- [Config Cascading](#config-cascading)
|
|
28
32
|
- [Shared & State Buffers](#shared--state-buffers)
|
|
@@ -1011,6 +1015,16 @@ const result = await stableWorkflow([], {
|
|
|
1011
1015
|
// Both branches access/modify sharedBuffer
|
|
1012
1016
|
```
|
|
1013
1017
|
|
|
1018
|
+
## Graph-based Workflow Patterns
|
|
1019
|
+
|
|
1020
|
+
**Key responsibilities:**
|
|
1021
|
+
- Define phases as DAG nodes with explicit dependency edges
|
|
1022
|
+
- Execute independent phases in parallel automatically
|
|
1023
|
+
- Support parallel groups, merge points, and conditional routing
|
|
1024
|
+
- Validate graph structure (cycle detection, reachability, orphan detection)
|
|
1025
|
+
- Provide deterministic execution order
|
|
1026
|
+
- Offer higher parallelism than phased workflows for complex topologies
|
|
1027
|
+
|
|
1014
1028
|
### Graph-Based Workflows with Mixed Items
|
|
1015
1029
|
|
|
1016
1030
|
For complex topologies with explicit dependencies, use DAG execution mixing requests and functions.
|
|
@@ -1101,17 +1115,7 @@ const result = await stableWorkflowGraph(graph, {
|
|
|
1101
1115
|
console.log(`Graph workflow success: ${result.success}`);
|
|
1102
1116
|
```
|
|
1103
1117
|
|
|
1104
|
-
|
|
1105
|
-
- Define phases as DAG nodes with explicit dependency edges
|
|
1106
|
-
- Execute independent phases in parallel automatically
|
|
1107
|
-
- Support parallel groups, merge points, and conditional routing
|
|
1108
|
-
- Validate graph structure (cycle detection, reachability, orphan detection)
|
|
1109
|
-
- Provide deterministic execution order
|
|
1110
|
-
- Offer higher parallelism than phased workflows for complex topologies
|
|
1111
|
-
|
|
1112
|
-
---
|
|
1113
|
-
|
|
1114
|
-
## Workflow Patterns
|
|
1118
|
+
### Parallel Phase Execution
|
|
1115
1119
|
|
|
1116
1120
|
Execute multiple phases concurrently within a group.
|
|
1117
1121
|
|
|
@@ -1148,7 +1152,7 @@ const result = await stableWorkflowGraph(graph, {
|
|
|
1148
1152
|
// All 3 phases run concurrently
|
|
1149
1153
|
```
|
|
1150
1154
|
|
|
1151
|
-
|
|
1155
|
+
### Merge Points
|
|
1152
1156
|
|
|
1153
1157
|
Synchronize multiple predecessor phases.
|
|
1154
1158
|
|
|
@@ -1185,7 +1189,7 @@ const result = await stableWorkflowGraph(graph, {
|
|
|
1185
1189
|
// aggregate waits for both to complete
|
|
1186
1190
|
```
|
|
1187
1191
|
|
|
1188
|
-
|
|
1192
|
+
### Linear Helper
|
|
1189
1193
|
|
|
1190
1194
|
Convenience function for sequential phase chains.
|
|
1191
1195
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emmvish/stable-request",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "A production-grade Workflow Execution Engine for Node.js that transforms unreliable API calls into resilient, observable, and sophisticated multi-phase workflows with intelligent retry strategies, circuit breakers, and advanced execution patterns.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|