@emmvish/stable-request 2.2.0 → 2.3.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 +267 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/core/stable-api-gateway.js +17 -1
- package/dist/core/stable-api-gateway.js.map +1 -1
- package/dist/core/stable-function.d.ts +9 -1
- package/dist/core/stable-function.d.ts.map +1 -1
- package/dist/core/stable-function.js +185 -169
- package/dist/core/stable-function.js.map +1 -1
- package/dist/core/stable-request.js.map +1 -1
- package/dist/core/stable-workflow-graph.d.ts +1 -1
- package/dist/core/stable-workflow-graph.d.ts.map +1 -1
- package/dist/core/stable-workflow.d.ts +1 -1
- package/dist/core/stable-workflow.d.ts.map +1 -1
- package/dist/core/stable-workflow.js +20 -3
- package/dist/core/stable-workflow.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +153 -146
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utilities/execute-branch-workflow.d.ts +1 -1
- package/dist/utilities/execute-branch-workflow.d.ts.map +1 -1
- package/dist/utilities/execute-branch-workflow.js +138 -3
- package/dist/utilities/execute-branch-workflow.js.map +1 -1
- package/dist/utilities/execute-concurrently.d.ts +1 -1
- package/dist/utilities/execute-concurrently.d.ts.map +1 -1
- package/dist/utilities/execute-concurrently.js +128 -6
- package/dist/utilities/execute-concurrently.js.map +1 -1
- package/dist/utilities/execute-gateway-item.d.ts +3 -3
- package/dist/utilities/execute-gateway-item.d.ts.map +1 -1
- package/dist/utilities/execute-gateway-item.js.map +1 -1
- package/dist/utilities/execute-non-linear-workflow.d.ts +1 -1
- package/dist/utilities/execute-non-linear-workflow.d.ts.map +1 -1
- package/dist/utilities/execute-non-linear-workflow.js +14 -4
- package/dist/utilities/execute-non-linear-workflow.js.map +1 -1
- package/dist/utilities/execute-phase.d.ts +1 -1
- package/dist/utilities/execute-phase.d.ts.map +1 -1
- package/dist/utilities/execute-phase.js +17 -0
- package/dist/utilities/execute-phase.js.map +1 -1
- package/dist/utilities/execute-sequentially.d.ts +1 -1
- package/dist/utilities/execute-sequentially.d.ts.map +1 -1
- package/dist/utilities/execute-sequentially.js +4 -7
- package/dist/utilities/execute-sequentially.js.map +1 -1
- package/dist/utilities/execute-with-timeout.d.ts +6 -0
- package/dist/utilities/execute-with-timeout.d.ts.map +1 -0
- package/dist/utilities/execute-with-timeout.js +28 -0
- package/dist/utilities/execute-with-timeout.js.map +1 -0
- package/dist/utilities/execute-workflow-graph.d.ts +1 -1
- package/dist/utilities/execute-workflow-graph.d.ts.map +1 -1
- package/dist/utilities/execute-workflow-graph.js +96 -2
- package/dist/utilities/execute-workflow-graph.js.map +1 -1
- package/dist/utilities/extract-common-request-config-options.d.ts +1 -1
- package/dist/utilities/extract-common-request-config-options.d.ts.map +1 -1
- package/dist/utilities/extract-common-request-config-options.js +3 -2
- package/dist/utilities/extract-common-request-config-options.js.map +1 -1
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +1 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/metrics-aggregator.d.ts +5 -41
- package/dist/utilities/metrics-aggregator.d.ts.map +1 -1
- package/dist/utilities/metrics-aggregator.js +1 -42
- package/dist/utilities/metrics-aggregator.js.map +1 -1
- package/dist/utilities/prepare-api-function-options.d.ts +1 -1
- package/dist/utilities/prepare-api-function-options.d.ts.map +1 -1
- package/dist/utilities/prepare-api-function-options.js +1 -0
- package/dist/utilities/prepare-api-function-options.js.map +1 -1
- package/dist/utilities/prepare-api-request-data.d.ts +1 -1
- package/dist/utilities/prepare-api-request-data.d.ts.map +1 -1
- package/dist/utilities/prepare-api-request-data.js.map +1 -1
- package/dist/utilities/prepare-api-request-options.d.ts +1 -1
- package/dist/utilities/prepare-api-request-options.d.ts.map +1 -1
- package/dist/utilities/prepare-api-request-options.js +9 -6
- package/dist/utilities/prepare-api-request-options.js.map +1 -1
- package/dist/utilities/validate-workflow-graph.d.ts +5 -5
- package/dist/utilities/validate-workflow-graph.d.ts.map +1 -1
- package/dist/utilities/validate-workflow-graph.js.map +1 -1
- package/dist/utilities/workflow-graph-builder.d.ts +8 -8
- package/dist/utilities/workflow-graph-builder.d.ts.map +1 -1
- package/dist/utilities/workflow-graph-builder.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ A production-grade TypeScript library for resilient API integrations, batch proc
|
|
|
27
27
|
- [Parallel Phase Execution](#parallel-phase-execution)
|
|
28
28
|
- [Merge Points](#merge-points)
|
|
29
29
|
- [Linear Helper](#linear-helper)
|
|
30
|
+
- [Branch Racing in Graphs](#branch-racing-in-graphs)
|
|
30
31
|
- [Configuration & State](#configuration--state)
|
|
31
32
|
- [Config Cascading](#config-cascading)
|
|
32
33
|
- [Shared & State Buffers](#shared--state-buffers)
|
|
@@ -274,6 +275,21 @@ console.log(`Throughput: ${responses.metrics.throughput.toFixed(2)} req/s`);
|
|
|
274
275
|
console.log(`Average duration: ${responses.metrics.averageRequestDuration.toFixed(2)}ms`);
|
|
275
276
|
```
|
|
276
277
|
|
|
278
|
+
#### Request/Function Racing
|
|
279
|
+
|
|
280
|
+
Enable racing to accept the first successful request or function and cancel others, useful for redundant API calls or failover scenarios.
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
const responses = await stableApiGateway(items, {
|
|
284
|
+
concurrentExecution: true,
|
|
285
|
+
enableRacing: true, // First successful item wins, others cancelled
|
|
286
|
+
maxConcurrentRequests: 10
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
// responses contains only the winning result
|
|
290
|
+
// Losing items marked as cancelled with appropriate error
|
|
291
|
+
```
|
|
292
|
+
|
|
277
293
|
**Key responsibilities:**
|
|
278
294
|
- Execute a batch of requests and functions concurrently or sequentially
|
|
279
295
|
- Apply global, group-level, and item-level config overrides
|
|
@@ -470,6 +486,198 @@ console.log(`Graph workflow success: ${result.success}`);
|
|
|
470
486
|
|
|
471
487
|
## Resilience Mechanisms
|
|
472
488
|
|
|
489
|
+
### Execution Timeouts
|
|
490
|
+
|
|
491
|
+
Set maximum execution time for functions to prevent indefinite hangs. Timeouts are enforced at multiple levels with proper inheritance.
|
|
492
|
+
|
|
493
|
+
You can also set a **workflow/gateway-level `maxTimeout`** to cap total execution time (applies to `stableWorkflow`, `stableWorkflowGraph`, and `stableApiGateway`).
|
|
494
|
+
|
|
495
|
+
#### Function-Level Timeout
|
|
496
|
+
|
|
497
|
+
Set timeout directly on a function:
|
|
498
|
+
|
|
499
|
+
```typescript
|
|
500
|
+
import { stableFunction } from '@emmvish/stable-request';
|
|
501
|
+
|
|
502
|
+
const result = await stableFunction({
|
|
503
|
+
fn: async () => {
|
|
504
|
+
// Long-running operation
|
|
505
|
+
await processLargeDataset();
|
|
506
|
+
return 'success';
|
|
507
|
+
},
|
|
508
|
+
args: [],
|
|
509
|
+
returnResult: true,
|
|
510
|
+
executionTimeout: 5000, // 5 seconds max
|
|
511
|
+
attempts: 3,
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
if (!result.success && result.error?.includes('timeout')) {
|
|
515
|
+
console.log('Function timed out');
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
#### Gateway-Level Timeout
|
|
520
|
+
|
|
521
|
+
Apply timeout to all functions in a gateway:
|
|
522
|
+
|
|
523
|
+
```typescript
|
|
524
|
+
import { stableApiGateway, RequestOrFunction } from '@emmvish/stable-request';
|
|
525
|
+
|
|
526
|
+
const results = await stableApiGateway(
|
|
527
|
+
[
|
|
528
|
+
{
|
|
529
|
+
type: RequestOrFunction.FUNCTION,
|
|
530
|
+
function: {
|
|
531
|
+
id: 'task1',
|
|
532
|
+
functionOptions: {
|
|
533
|
+
fn: async () => await task1(),
|
|
534
|
+
args: [],
|
|
535
|
+
// No timeout specified - inherits from gateway
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
type: RequestOrFunction.FUNCTION,
|
|
541
|
+
function: {
|
|
542
|
+
id: 'task2',
|
|
543
|
+
functionOptions: {
|
|
544
|
+
fn: async () => await task2(),
|
|
545
|
+
args: [],
|
|
546
|
+
executionTimeout: 10000, // Override gateway timeout
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
],
|
|
551
|
+
{
|
|
552
|
+
commonExecutionTimeout: 3000, // Default 3s for all functions
|
|
553
|
+
}
|
|
554
|
+
);
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
#### Request Group Timeout
|
|
558
|
+
|
|
559
|
+
Different timeouts for different groups:
|
|
560
|
+
|
|
561
|
+
```typescript
|
|
562
|
+
const results = await stableApiGateway(
|
|
563
|
+
[
|
|
564
|
+
{
|
|
565
|
+
type: RequestOrFunction.FUNCTION,
|
|
566
|
+
function: {
|
|
567
|
+
id: 'critical',
|
|
568
|
+
groupId: 'criticalOps',
|
|
569
|
+
functionOptions: { fn: criticalOp, args: [] },
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
type: RequestOrFunction.FUNCTION,
|
|
574
|
+
function: {
|
|
575
|
+
id: 'background',
|
|
576
|
+
groupId: 'backgroundOps',
|
|
577
|
+
functionOptions: { fn: backgroundOp, args: [] },
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
],
|
|
581
|
+
{
|
|
582
|
+
requestGroups: [
|
|
583
|
+
{
|
|
584
|
+
id: 'criticalOps',
|
|
585
|
+
commonConfig: {
|
|
586
|
+
commonExecutionTimeout: 1000, // Strict 1s timeout
|
|
587
|
+
},
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
id: 'backgroundOps',
|
|
591
|
+
commonConfig: {
|
|
592
|
+
commonExecutionTimeout: 30000, // Lenient 30s timeout
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
],
|
|
596
|
+
}
|
|
597
|
+
);
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
#### Workflow Phase Timeout
|
|
601
|
+
|
|
602
|
+
Apply timeout at phase level in workflows:
|
|
603
|
+
|
|
604
|
+
```typescript
|
|
605
|
+
import { stableWorkflow } from '@emmvish/stable-request';
|
|
606
|
+
|
|
607
|
+
const result = await stableWorkflow(
|
|
608
|
+
[
|
|
609
|
+
{
|
|
610
|
+
id: 'initialization',
|
|
611
|
+
functions: [
|
|
612
|
+
{
|
|
613
|
+
id: 'init',
|
|
614
|
+
functionOptions: {
|
|
615
|
+
fn: initializeSystem,
|
|
616
|
+
args: [],
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
],
|
|
620
|
+
commonConfig: {
|
|
621
|
+
commonExecutionTimeout: 5000, // 5s for initialization
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
id: 'processing',
|
|
626
|
+
functions: [
|
|
627
|
+
{
|
|
628
|
+
id: 'process',
|
|
629
|
+
functionOptions: {
|
|
630
|
+
fn: processData,
|
|
631
|
+
args: [],
|
|
632
|
+
},
|
|
633
|
+
},
|
|
634
|
+
],
|
|
635
|
+
commonConfig: {
|
|
636
|
+
commonExecutionTimeout: 30000, // 30s for processing
|
|
637
|
+
},
|
|
638
|
+
},
|
|
639
|
+
],
|
|
640
|
+
{
|
|
641
|
+
commonExecutionTimeout: 10000, // Default for phases without specific timeout
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
#### Timeout Precedence
|
|
647
|
+
|
|
648
|
+
Timeouts follow the configuration cascade pattern:
|
|
649
|
+
|
|
650
|
+
**Function > Group > Phase/Branch > Gateway**
|
|
651
|
+
|
|
652
|
+
- Function-level `executionTimeout` always wins
|
|
653
|
+
- If not set, inherits from request group's `commonExecutionTimeout`
|
|
654
|
+
- If not set, inherits from phase/branch's `commonExecutionTimeout`
|
|
655
|
+
- If not set, inherits from gateway's `commonExecutionTimeout`
|
|
656
|
+
- If not set, no timeout is applied
|
|
657
|
+
|
|
658
|
+
#### Timeout Behavior
|
|
659
|
+
|
|
660
|
+
- Timeout applies to **entire function execution** including all retry attempts
|
|
661
|
+
- When timeout is exceeded, function returns failed result with timeout error
|
|
662
|
+
- Timeout does NOT stop execution mid-flight (no AbortController)
|
|
663
|
+
- Metrics are still collected even when timeout occurs
|
|
664
|
+
- Use with retries: timeout encompasses all attempts, not per-attempt
|
|
665
|
+
|
|
666
|
+
```typescript
|
|
667
|
+
const result = await stableFunction({
|
|
668
|
+
fn: slowFunction,
|
|
669
|
+
args: [],
|
|
670
|
+
attempts: 5,
|
|
671
|
+
wait: 1000,
|
|
672
|
+
executionTimeout: 3000, // Total time for all 5 attempts
|
|
673
|
+
});
|
|
674
|
+
|
|
675
|
+
// If each attempt takes 800ms:
|
|
676
|
+
// - Attempt 1: 800ms
|
|
677
|
+
// - Attempt 2: starts at 1800ms (after 1s wait)
|
|
678
|
+
// - Attempt 3: would start at 3600ms → TIMEOUT at 3000ms
|
|
679
|
+
```
|
|
680
|
+
|
|
473
681
|
### Retry Strategies
|
|
474
682
|
|
|
475
683
|
When a request or function fails and is retryable, retry with configurable backoff.
|
|
@@ -1024,6 +1232,32 @@ const result = await stableWorkflow([], {
|
|
|
1024
1232
|
// Both branches access/modify sharedBuffer
|
|
1025
1233
|
```
|
|
1026
1234
|
|
|
1235
|
+
#### Branch Racing
|
|
1236
|
+
|
|
1237
|
+
When multiple branches execute concurrently, enable racing to accept the first successful branch and cancel others.
|
|
1238
|
+
|
|
1239
|
+
```typescript
|
|
1240
|
+
const result = await stableWorkflow([], {
|
|
1241
|
+
workflowId: 'payment-racing',
|
|
1242
|
+
enableBranchExecution: true,
|
|
1243
|
+
enableBranchRacing: true, // First successful branch wins
|
|
1244
|
+
branches: [
|
|
1245
|
+
{
|
|
1246
|
+
id: 'payment-provider-a',
|
|
1247
|
+
phases: [/* ... */]
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
id: 'payment-provider-b',
|
|
1251
|
+
phases: [/* ... */]
|
|
1252
|
+
}
|
|
1253
|
+
],
|
|
1254
|
+
markConcurrentBranch: true
|
|
1255
|
+
});
|
|
1256
|
+
|
|
1257
|
+
// Only winning branch's execution history recorded
|
|
1258
|
+
// Losing branches marked as cancelled
|
|
1259
|
+
```
|
|
1260
|
+
|
|
1027
1261
|
## Graph-based Workflow Patterns
|
|
1028
1262
|
|
|
1029
1263
|
**Key responsibilities:**
|
|
@@ -1227,6 +1461,39 @@ const result = await stableWorkflowGraph(graph, {
|
|
|
1227
1461
|
});
|
|
1228
1462
|
```
|
|
1229
1463
|
|
|
1464
|
+
### Branch Racing in Graphs
|
|
1465
|
+
|
|
1466
|
+
Enable branch racing in workflow graphs to accept the first successful branch node when multiple branches are executed in parallel.
|
|
1467
|
+
|
|
1468
|
+
```typescript
|
|
1469
|
+
import { stableWorkflowGraph, WorkflowGraphBuilder } from '@emmvish/stable-request';
|
|
1470
|
+
|
|
1471
|
+
const branch1 = {
|
|
1472
|
+
id: 'provider-a',
|
|
1473
|
+
phases: [{ /* ... */ }]
|
|
1474
|
+
};
|
|
1475
|
+
|
|
1476
|
+
const branch2 = {
|
|
1477
|
+
id: 'provider-b',
|
|
1478
|
+
phases: [{ /* ... */ }]
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1481
|
+
const graph = new WorkflowGraphBuilder()
|
|
1482
|
+
.addBranch('provider-a', branch1)
|
|
1483
|
+
.addBranch('provider-b', branch2)
|
|
1484
|
+
.addParallelGroup('race', ['provider-a', 'provider-b'])
|
|
1485
|
+
.setEntryPoint('race')
|
|
1486
|
+
.build();
|
|
1487
|
+
|
|
1488
|
+
const result = await stableWorkflowGraph(graph, {
|
|
1489
|
+
workflowId: 'provider-racing',
|
|
1490
|
+
enableBranchRacing: true // First successful branch wins
|
|
1491
|
+
});
|
|
1492
|
+
|
|
1493
|
+
// Only winning branch's results recorded
|
|
1494
|
+
// Losing branch marked as cancelled
|
|
1495
|
+
```
|
|
1496
|
+
|
|
1230
1497
|
---
|
|
1231
1498
|
|
|
1232
1499
|
## Configuration & State
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElF,eAAO,MAAM,wBAAwB,EAAE,CAAC,MAAM,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElF,eAAO,MAAM,wBAAwB,EAAE,CAAC,MAAM,mBAAmB,CAAC,EAsBxD,CAAC;AAEX,eAAO,MAAM,+BAA+B,EAAE,wBAAwB,EAqB5D,CAAC;AAEX,eAAO,MAAM,gCAAgC,gHAMnC,CAAC;AAEX,eAAO,MAAM,oCAAoC,2JASvC,CAAC;AAEX,eAAO,MAAM,iCAAiC,qPAapC,CAAC;AAEX,eAAO,MAAM,wCAAwC,6DAI3C,CAAC;AAEX,eAAO,MAAM,8BAA8B,2EAKjC,CAAC;AAEX,eAAO,MAAM,qCAAqC,2FAKxC,CAAC;AAEX,eAAO,MAAM,4CAA4C,2EAI/C,CAAC;AAEX,eAAO,MAAM,8BAA8B,iIAOjC,CAAC;AAEX,eAAO,MAAM,+BAA+B,oLAUlC,CAAC"}
|
package/dist/constants/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export const extractCommonOptionsKeys = [
|
|
|
19
19
|
'commonTrialMode',
|
|
20
20
|
'commonCache',
|
|
21
21
|
'commonStatePersistence',
|
|
22
|
+
'commonExecutionTimeout',
|
|
22
23
|
];
|
|
23
24
|
export const PrepareApiRequestOptionsMapping = [
|
|
24
25
|
{ localKey: 'preExecution', commonKey: 'commonPreExecution', groupCommonKey: 'commonPreExecution', targetKey: 'preExecution' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAkC;IACnE,oBAAoB;IACpB,kBAAkB;IAClB,sBAAsB;IACtB,mBAAmB;IACnB,wBAAwB;IACxB,oBAAoB;IACpB,mCAAmC;IACnC,0BAA0B;IAC1B,cAAc;IACd,gBAAgB;IAChB,0BAA0B;IAC1B,YAAY;IACZ,qBAAqB;IACrB,cAAc;IACd,oBAAoB;IACpB,gCAAgC;IAChC,4BAA4B;IAC5B,iBAAiB;IACjB,aAAa;IACb,wBAAwB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAkC;IACnE,oBAAoB;IACpB,kBAAkB;IAClB,sBAAsB;IACtB,mBAAmB;IACnB,wBAAwB;IACxB,oBAAoB;IACpB,mCAAmC;IACnC,0BAA0B;IAC1B,cAAc;IACd,gBAAgB;IAChB,0BAA0B;IAC1B,YAAY;IACZ,qBAAqB;IACrB,cAAc;IACd,oBAAoB;IACpB,gCAAgC;IAChC,4BAA4B;IAC5B,iBAAiB;IACjB,aAAa;IACb,wBAAwB;IACxB,wBAAwB;CAClB,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAA+B;IACvE,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,oBAAoB,EAAE,cAAc,EAAE,oBAAoB,EAAE,SAAS,EAAE,cAAc,EAAE;IAC9H,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE;IACtH,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS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AoB;IACpB,eAAe;IACf,2BAA2B;IAC3B,YAAY;IACZ,qBAAqB;CACf,CAAC;AAEX,MAAM,CAAC,MAAM,wCAAwC,GAAG;IACpD,aAAa;IACb,eAAe;IACf,gBAAgB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC1C,SAAS;IACT,UAAU;IACV,uBAAuB;IACvB,cAAc;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACjD,cAAc;IACd,aAAa;IACb,uBAAuB;IACvB,sBAAsB;CAChB,CAAC;AAEX,MAAM,CAAC,MAAM,4CAA4C,GAAG;IACxD,uBAAuB;IACvB,aAAa;IACb,sBAAsB;CAChB,CAAC;AAEX,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,eAAe;IACf,oBAAoB;IACpB,gBAAgB;IAChB,oBAAoB;IACpB,oBAAoB;IACpB,eAAe;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,aAAa;IACb,iBAAiB;IACjB,cAAc;IACd,qBAAqB;IACrB,eAAe;IACf,oBAAoB;IACpB,gBAAgB;IAChB,oBAAoB;IACpB,eAAe;CACP,CAAC"}
|
|
@@ -11,7 +11,22 @@ export async function stableApiGateway(requests = [], functionsOrOptions, option
|
|
|
11
11
|
else {
|
|
12
12
|
finalOptions = functionsOrOptions || {};
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
if (finalOptions.maxTimeout) {
|
|
15
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
const contextStr = finalOptions.executionContext
|
|
18
|
+
? ` [${Object.entries(finalOptions.executionContext).map(([k, v]) => `${k}=${v}`).join(', ')}]`
|
|
19
|
+
: '';
|
|
20
|
+
reject(new Error(`stable-request: Gateway execution exceeded maxTimeout of ${finalOptions.maxTimeout}ms${contextStr}`));
|
|
21
|
+
}, finalOptions.maxTimeout);
|
|
22
|
+
});
|
|
23
|
+
const executionPromise = executeGateway(requests, functions, finalOptions, startTime);
|
|
24
|
+
return Promise.race([executionPromise, timeoutPromise]);
|
|
25
|
+
}
|
|
26
|
+
return executeGateway(requests, functions, finalOptions, startTime);
|
|
27
|
+
}
|
|
28
|
+
async function executeGateway(requests, functions, finalOptions, startTime) {
|
|
29
|
+
const { concurrentExecution = true, stopOnFirstError = false, requestGroups = [], maxConcurrentRequests, rateLimit, circuitBreaker, enableRacing = false, } = finalOptions;
|
|
15
30
|
let items = [];
|
|
16
31
|
if (requests.length > 0 && 'type' in requests[0]) {
|
|
17
32
|
items = requests;
|
|
@@ -49,6 +64,7 @@ export async function stableApiGateway(requests = [], functionsOrOptions, option
|
|
|
49
64
|
...(maxConcurrentRequests !== undefined && { maxConcurrentRequests }),
|
|
50
65
|
...(rateLimit !== undefined && { rateLimit }),
|
|
51
66
|
...(circuitBreaker !== undefined && { circuitBreaker }),
|
|
67
|
+
...(enableRacing !== undefined && { enableRacing }),
|
|
52
68
|
...extractCommonOptions(finalOptions),
|
|
53
69
|
executionContext: finalOptions.executionContext
|
|
54
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stable-api-gateway.js","sourceRoot":"","sources":["../../src/core/stable-api-gateway.ts"],"names":[],"mappings":"AAcA,OAAO,EACH,mBAAmB,EACnB,mBAAmB,EACnB,iCAAiC,IAAI,oBAAoB,EACzD,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAatD,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAClC,WAAmK,EAAE,EACrK,kBAAgL,EAChL,OAAsG;IAEtG,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,SAAS,GAAiE,EAAE,CAAC;IACjF,IAAI,YAAY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,MAAM,CAAC,OAAO,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACjE,CAAC;IAED,IAAI,YAAY,CAAC,iBAAiB,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,gBAAgB,CAAC,yBAAyB,CACzD,MAAM,CAAC,OAAO,EACd,YAAY,CAAC,iBAAiB,CACjC,CAAC;QAEF,IAAI,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;YACvC,MAAM,eAAe,GAAG,gBAAgB,CAAC,6BAA6B,CAClE,MAAM,CAAC,OAAO,CAAC,qBAAqB,EACpC,YAAY,CAAC,iBAAiB,CACjC,CAAC;YAEF,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;YACxD,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC;QACvE,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IAC3C,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { STABLE_FUNCTION, STABLE_FUNCTION_RESULT } from '../types/index.js';
|
|
2
|
-
export declare function stableFunction<TArgs extends any[] = any[], TReturn = any>(options: STABLE_FUNCTION<TArgs, TReturn>
|
|
2
|
+
export declare function stableFunction<TArgs extends any[] = any[], TReturn = any>(options: STABLE_FUNCTION<TArgs, TReturn> & {
|
|
3
|
+
returnResult: true;
|
|
4
|
+
}): Promise<STABLE_FUNCTION_RESULT<TReturn, true>>;
|
|
5
|
+
export declare function stableFunction<TArgs extends any[] = any[], TReturn = any>(options: STABLE_FUNCTION<TArgs, TReturn> & {
|
|
6
|
+
returnResult?: false | undefined;
|
|
7
|
+
}): Promise<STABLE_FUNCTION_RESULT<TReturn, false>>;
|
|
8
|
+
export declare function stableFunction<TArgs extends any[] = any[], TReturn = any>(options: STABLE_FUNCTION<TArgs, TReturn> & {
|
|
9
|
+
returnResult?: boolean;
|
|
10
|
+
}): Promise<STABLE_FUNCTION_RESULT<TReturn>>;
|
|
3
11
|
//# sourceMappingURL=stable-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stable-function.d.ts","sourceRoot":"","sources":["../../src/core/stable-function.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,eAAe,EACf,sBAAsB,EAEvB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"stable-function.d.ts","sourceRoot":"","sources":["../../src/core/stable-function.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,eAAe,EACf,sBAAsB,EAEvB,MAAM,mBAAmB,CAAC;AAqB3B,wBAAsB,cAAc,CAAC,KAAK,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,EAAE,OAAO,GAAG,GAAG,EAC7E,OAAO,EAAE,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IAAE,YAAY,EAAE,IAAI,CAAA;CAAE,GAChE,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAClD,wBAAsB,cAAc,CAAC,KAAK,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,EAAE,OAAO,GAAG,GAAG,EAC7E,OAAO,EAAE,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;CAAE,GAC9E,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACnD,wBAAsB,cAAc,CAAC,KAAK,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,EAAE,OAAO,GAAG,GAAG,EAC7E,OAAO,EAAE,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACpE,OAAO,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC"}
|