nestjs-serverless-workflow 0.0.1
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/LICENSE +22 -0
- package/README.md +396 -0
- package/dist/adapter/index.d.ts +2 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter/index.js +2 -0
- package/dist/adapter/index.js.map +1 -0
- package/dist/adapter/lambda.adapater.d.ts +4 -0
- package/dist/adapter/lambda.adapater.d.ts.map +1 -0
- package/dist/adapter/lambda.adapater.js +63 -0
- package/dist/adapter/lambda.adapater.js.map +1 -0
- package/dist/event-bus/index.d.ts +3 -0
- package/dist/event-bus/index.d.ts.map +1 -0
- package/dist/event-bus/index.js +3 -0
- package/dist/event-bus/index.js.map +1 -0
- package/dist/event-bus/sqs/sqs.emitter.d.ts +6 -0
- package/dist/event-bus/sqs/sqs.emitter.d.ts.map +1 -0
- package/dist/event-bus/sqs/sqs.emitter.js +4 -0
- package/dist/event-bus/sqs/sqs.emitter.js.map +1 -0
- package/dist/event-bus/types/broker-publisher.interface.d.ts +5 -0
- package/dist/event-bus/types/broker-publisher.interface.d.ts.map +1 -0
- package/dist/event-bus/types/broker-publisher.interface.js +2 -0
- package/dist/event-bus/types/broker-publisher.interface.js.map +1 -0
- package/dist/event-bus/types/index.d.ts +3 -0
- package/dist/event-bus/types/index.d.ts.map +1 -0
- package/dist/event-bus/types/index.js +3 -0
- package/dist/event-bus/types/index.js.map +1 -0
- package/dist/event-bus/types/workflow-event.interface.d.ts +7 -0
- package/dist/event-bus/types/workflow-event.interface.d.ts.map +1 -0
- package/dist/event-bus/types/workflow-event.interface.js +2 -0
- package/dist/event-bus/types/workflow-event.interface.js.map +1 -0
- package/dist/exception/index.d.ts +2 -0
- package/dist/exception/index.d.ts.map +1 -0
- package/dist/exception/index.js +2 -0
- package/dist/exception/index.js.map +1 -0
- package/dist/exception/unretriable.exception.d.ts +4 -0
- package/dist/exception/unretriable.exception.d.ts.map +1 -0
- package/dist/exception/unretriable.exception.js +7 -0
- package/dist/exception/unretriable.exception.js.map +1 -0
- package/dist/workflow/decorators/default.decorator.d.ts +3 -0
- package/dist/workflow/decorators/default.decorator.d.ts.map +1 -0
- package/dist/workflow/decorators/default.decorator.js +9 -0
- package/dist/workflow/decorators/default.decorator.js.map +1 -0
- package/dist/workflow/decorators/event.decorator.d.ts +5 -0
- package/dist/workflow/decorators/event.decorator.d.ts.map +1 -0
- package/dist/workflow/decorators/event.decorator.js +20 -0
- package/dist/workflow/decorators/event.decorator.js.map +1 -0
- package/dist/workflow/decorators/index.d.ts +6 -0
- package/dist/workflow/decorators/index.d.ts.map +1 -0
- package/dist/workflow/decorators/index.js +6 -0
- package/dist/workflow/decorators/index.js.map +1 -0
- package/dist/workflow/decorators/params.decorator.d.ts +3 -0
- package/dist/workflow/decorators/params.decorator.d.ts.map +1 -0
- package/dist/workflow/decorators/params.decorator.js +19 -0
- package/dist/workflow/decorators/params.decorator.js.map +1 -0
- package/dist/workflow/decorators/with-retry.decorator.d.ts +4 -0
- package/dist/workflow/decorators/with-retry.decorator.d.ts.map +1 -0
- package/dist/workflow/decorators/with-retry.decorator.js +9 -0
- package/dist/workflow/decorators/with-retry.decorator.js.map +1 -0
- package/dist/workflow/decorators/workflow.decorator.d.ts +6 -0
- package/dist/workflow/decorators/workflow.decorator.d.ts.map +1 -0
- package/dist/workflow/decorators/workflow.decorator.js +8 -0
- package/dist/workflow/decorators/workflow.decorator.js.map +1 -0
- package/dist/workflow/index.d.ts +7 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +7 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/providers/index.d.ts +4 -0
- package/dist/workflow/providers/index.d.ts.map +1 -0
- package/dist/workflow/providers/index.js +4 -0
- package/dist/workflow/providers/index.js.map +1 -0
- package/dist/workflow/providers/ochestrator.service.d.ts +32 -0
- package/dist/workflow/providers/ochestrator.service.d.ts.map +1 -0
- package/dist/workflow/providers/ochestrator.service.js +183 -0
- package/dist/workflow/providers/ochestrator.service.js.map +1 -0
- package/dist/workflow/providers/router.factory.d.ts +7 -0
- package/dist/workflow/providers/router.factory.d.ts.map +1 -0
- package/dist/workflow/providers/router.factory.js +18 -0
- package/dist/workflow/providers/router.factory.js.map +1 -0
- package/dist/workflow/providers/router.service.d.ts +16 -0
- package/dist/workflow/providers/router.service.d.ts.map +1 -0
- package/dist/workflow/providers/router.service.js +79 -0
- package/dist/workflow/providers/router.service.js.map +1 -0
- package/dist/workflow/providers/saga.service.d.ts +34 -0
- package/dist/workflow/providers/saga.service.d.ts.map +1 -0
- package/dist/workflow/providers/saga.service.js +159 -0
- package/dist/workflow/providers/saga.service.js.map +1 -0
- package/dist/workflow/types/entity.interface.d.ts +33 -0
- package/dist/workflow/types/entity.interface.d.ts.map +1 -0
- package/dist/workflow/types/entity.interface.js +2 -0
- package/dist/workflow/types/entity.interface.js.map +1 -0
- package/dist/workflow/types/index.d.ts +7 -0
- package/dist/workflow/types/index.d.ts.map +1 -0
- package/dist/workflow/types/index.js +9 -0
- package/dist/workflow/types/index.js.map +1 -0
- package/dist/workflow/types/retry.interface.d.ts +24 -0
- package/dist/workflow/types/retry.interface.d.ts.map +1 -0
- package/dist/workflow/types/retry.interface.js +10 -0
- package/dist/workflow/types/retry.interface.js.map +1 -0
- package/dist/workflow/types/saga.interface.d.ts +144 -0
- package/dist/workflow/types/saga.interface.d.ts.map +1 -0
- package/dist/workflow/types/saga.interface.js +24 -0
- package/dist/workflow/types/saga.interface.js.map +1 -0
- package/dist/workflow/types/shared.type.d.ts +5 -0
- package/dist/workflow/types/shared.type.d.ts.map +1 -0
- package/dist/workflow/types/shared.type.js +2 -0
- package/dist/workflow/types/shared.type.js.map +1 -0
- package/dist/workflow/types/transition-event.interface.d.ts +16 -0
- package/dist/workflow/types/transition-event.interface.d.ts.map +1 -0
- package/dist/workflow/types/transition-event.interface.js +2 -0
- package/dist/workflow/types/transition-event.interface.js.map +1 -0
- package/dist/workflow/types/workflow-definition.interface.d.ts +60 -0
- package/dist/workflow/types/workflow-definition.interface.d.ts.map +1 -0
- package/dist/workflow/types/workflow-definition.interface.js +2 -0
- package/dist/workflow/types/workflow-definition.interface.js.map +1 -0
- package/dist/workflow/utils/index.d.ts +2 -0
- package/dist/workflow/utils/index.d.ts.map +1 -0
- package/dist/workflow/utils/index.js +2 -0
- package/dist/workflow/utils/index.js.map +1 -0
- package/dist/workflow/utils/retry-backoff.d.ts +35 -0
- package/dist/workflow/utils/retry-backoff.d.ts.map +1 -0
- package/dist/workflow/utils/retry-backoff.js +68 -0
- package/dist/workflow/utils/retry-backoff.js.map +1 -0
- package/dist/workflow/workflow.module.d.ts +13 -0
- package/dist/workflow/workflow.module.d.ts.map +1 -0
- package/dist/workflow/workflow.module.js +27 -0
- package/dist/workflow/workflow.module.js.map +1 -0
- package/package.json +154 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type IBackoffRetryConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate delay for retry attempt using exponential backoff with optional jitter
|
|
4
|
+
*/
|
|
5
|
+
export declare class RetryBackoff {
|
|
6
|
+
/**
|
|
7
|
+
* Calculate delay based on retry strategy
|
|
8
|
+
* @param attempt Current attempt number (0-indexed)
|
|
9
|
+
* @param config Retry configuration
|
|
10
|
+
* @returns Delay in milliseconds
|
|
11
|
+
*/
|
|
12
|
+
static calculateDelay(attempt: number, config: IBackoffRetryConfig): number;
|
|
13
|
+
/**
|
|
14
|
+
* Fixed delay - always returns the same delay
|
|
15
|
+
*/
|
|
16
|
+
private static fixedDelay;
|
|
17
|
+
/**
|
|
18
|
+
* Exponential backoff without jitter
|
|
19
|
+
* delay = min(initialDelay * (backoffMultiplier ^ attempt), maxDelay)
|
|
20
|
+
*/
|
|
21
|
+
private static exponentialBackoff;
|
|
22
|
+
/**
|
|
23
|
+
* Exponential backoff with jitter (AWS recommended approach)
|
|
24
|
+
* Uses "Full Jitter" strategy: delay = random(0, min(maxDelay, baseDelay * 2^attempt))
|
|
25
|
+
*
|
|
26
|
+
* Or partial jitter: delay = baseDelay + random(0, jitterAmount)
|
|
27
|
+
*/
|
|
28
|
+
private static exponentialBackoffWithJitter;
|
|
29
|
+
/**
|
|
30
|
+
* Alternative: Decorrelated jitter (more aggressive)
|
|
31
|
+
* delay = random(initialDelay, previousDelay * 3)
|
|
32
|
+
*/
|
|
33
|
+
static decorrelatedJitter(previousDelay: number, initialDelay: number, maxDelay: number): number;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=retry-backoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry-backoff.d.ts","sourceRoot":"","sources":["../../../src/workflow/utils/retry-backoff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,qBAAa,YAAY;IACvB;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,MAAM;IAwB3E;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAIzB;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAqB3C;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAKjG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { RetryStrategy } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate delay for retry attempt using exponential backoff with optional jitter
|
|
4
|
+
*/
|
|
5
|
+
export class RetryBackoff {
|
|
6
|
+
/**
|
|
7
|
+
* Calculate delay based on retry strategy
|
|
8
|
+
* @param attempt Current attempt number (0-indexed)
|
|
9
|
+
* @param config Retry configuration
|
|
10
|
+
* @returns Delay in milliseconds
|
|
11
|
+
*/
|
|
12
|
+
static calculateDelay(attempt, config) {
|
|
13
|
+
const { strategy = RetryStrategy.EXPONENTIAL_JITTER, initialDelay = 1000, backoffMultiplier = 2, maxDelay = 60000, jitter = true, } = config;
|
|
14
|
+
switch (strategy) {
|
|
15
|
+
case RetryStrategy.FIXED:
|
|
16
|
+
return this.fixedDelay(initialDelay);
|
|
17
|
+
case RetryStrategy.EXPONENTIAL:
|
|
18
|
+
return this.exponentialBackoff(attempt, initialDelay, backoffMultiplier, maxDelay);
|
|
19
|
+
case RetryStrategy.EXPONENTIAL_JITTER:
|
|
20
|
+
return this.exponentialBackoffWithJitter(attempt, initialDelay, backoffMultiplier, maxDelay, jitter);
|
|
21
|
+
default:
|
|
22
|
+
return this.exponentialBackoffWithJitter(attempt, initialDelay, backoffMultiplier, maxDelay, jitter);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Fixed delay - always returns the same delay
|
|
27
|
+
*/
|
|
28
|
+
static fixedDelay(delay) {
|
|
29
|
+
return delay;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Exponential backoff without jitter
|
|
33
|
+
* delay = min(initialDelay * (backoffMultiplier ^ attempt), maxDelay)
|
|
34
|
+
*/
|
|
35
|
+
static exponentialBackoff(attempt, initialDelay, backoffMultiplier, maxDelay) {
|
|
36
|
+
const delay = initialDelay * Math.pow(backoffMultiplier, attempt);
|
|
37
|
+
return Math.min(delay, maxDelay);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Exponential backoff with jitter (AWS recommended approach)
|
|
41
|
+
* Uses "Full Jitter" strategy: delay = random(0, min(maxDelay, baseDelay * 2^attempt))
|
|
42
|
+
*
|
|
43
|
+
* Or partial jitter: delay = baseDelay + random(0, jitterAmount)
|
|
44
|
+
*/
|
|
45
|
+
static exponentialBackoffWithJitter(attempt, initialDelay, backoffMultiplier, maxDelay, jitter) {
|
|
46
|
+
const baseDelay = this.exponentialBackoff(attempt, initialDelay, backoffMultiplier, maxDelay);
|
|
47
|
+
if (jitter === true) {
|
|
48
|
+
// Full jitter: random between 0 and baseDelay
|
|
49
|
+
return Math.random() * baseDelay;
|
|
50
|
+
}
|
|
51
|
+
else if (typeof jitter === 'number') {
|
|
52
|
+
// Partial jitter: baseDelay ± (jitter percentage)
|
|
53
|
+
const jitterAmount = baseDelay * jitter;
|
|
54
|
+
return baseDelay - jitterAmount + Math.random() * jitterAmount * 2;
|
|
55
|
+
}
|
|
56
|
+
return baseDelay;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Alternative: Decorrelated jitter (more aggressive)
|
|
60
|
+
* delay = random(initialDelay, previousDelay * 3)
|
|
61
|
+
*/
|
|
62
|
+
static decorrelatedJitter(previousDelay, initialDelay, maxDelay) {
|
|
63
|
+
const min = initialDelay;
|
|
64
|
+
const max = Math.min(previousDelay * 3, maxDelay);
|
|
65
|
+
return min + Math.random() * (max - min);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=retry-backoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry-backoff.js","sourceRoot":"","sources":["../../../src/workflow/utils/retry-backoff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA4B,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAO,YAAY;IACvB;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,OAAe,EAAE,MAA2B;QAChE,MAAM,EACJ,QAAQ,GAAG,aAAa,CAAC,kBAAkB,EAC3C,YAAY,GAAG,IAAI,EACnB,iBAAiB,GAAG,CAAC,EACrB,QAAQ,GAAG,KAAK,EAChB,MAAM,GAAG,IAAI,GACd,GAAG,MAAM,CAAC;QAEX,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,aAAa,CAAC,KAAK;gBACtB,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YAEvC,KAAK,aAAa,CAAC,WAAW;gBAC5B,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;YAErF,KAAK,aAAa,CAAC,kBAAkB;gBACnC,OAAO,IAAI,CAAC,4BAA4B,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;YAEvG;gBACE,OAAO,IAAI,CAAC,4BAA4B,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QACzG,CAAC;IACH,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,UAAU,CAAC,KAAa;QACrC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,kBAAkB,CAC/B,OAAe,EACf,YAAoB,EACpB,iBAAyB,EACzB,QAAgB;QAEhB,MAAM,KAAK,GAAG,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAC,4BAA4B,CACzC,OAAe,EACf,YAAoB,EACpB,iBAAyB,EACzB,QAAgB,EAChB,MAAwB;QAExB,MAAM,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAE9F,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YACpB,8CAA8C;YAC9C,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC;QACnC,CAAC;aAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACtC,kDAAkD;YAClD,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;YACxC,OAAO,SAAS,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,YAAY,GAAG,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,aAAqB,EAAE,YAAoB,EAAE,QAAgB;QACrF,MAAM,GAAG,GAAG,YAAY,CAAC;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC;QAClD,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IBrokerPublisher } from '@/event-bus';
|
|
2
|
+
import { type DynamicModule, type Provider } from '@nestjs/common';
|
|
3
|
+
import type { IWorkflowEntity } from './types';
|
|
4
|
+
export declare class WorkflowModule {
|
|
5
|
+
static register(options: {
|
|
6
|
+
imports?: any[];
|
|
7
|
+
entities: Provider<IWorkflowEntity>[];
|
|
8
|
+
workflows: Provider[];
|
|
9
|
+
brokers: Provider<IBrokerPublisher>[];
|
|
10
|
+
providers?: Provider[];
|
|
11
|
+
}): DynamicModule;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=workflow.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.module.d.ts","sourceRoot":"","sources":["../../src/workflow/workflow.module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAAE,KAAK,aAAa,EAAU,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,qBACa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE;QACvB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;QAChB,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACtC,SAAS,EAAE,QAAQ,EAAE,CAAC;QACtB,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACtC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;KACxB,GAAG,aAAa;CAYlB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var WorkflowModule_1;
|
|
8
|
+
import { OrchestratorService, StateRouterHelperFactory } from '@/workflow';
|
|
9
|
+
import { Module } from '@nestjs/common';
|
|
10
|
+
import { DiscoveryModule } from '@nestjs/core';
|
|
11
|
+
let WorkflowModule = WorkflowModule_1 = class WorkflowModule {
|
|
12
|
+
static register(options) {
|
|
13
|
+
const { imports, entities, workflows, brokers } = options;
|
|
14
|
+
const providers = [...entities, ...workflows, ...brokers, StateRouterHelperFactory, OrchestratorService];
|
|
15
|
+
return {
|
|
16
|
+
module: WorkflowModule_1,
|
|
17
|
+
imports: [DiscoveryModule, ...(imports ?? [])],
|
|
18
|
+
providers: providers,
|
|
19
|
+
exports: providers,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
WorkflowModule = WorkflowModule_1 = __decorate([
|
|
24
|
+
Module({})
|
|
25
|
+
], WorkflowModule);
|
|
26
|
+
export { WorkflowModule };
|
|
27
|
+
//# sourceMappingURL=workflow.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.module.js","sourceRoot":"","sources":["../../src/workflow/workflow.module.ts"],"names":[],"mappings":";;;;;;;AACA,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAsB,MAAM,EAAiB,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAIxC,IAAM,cAAc,sBAApB,MAAM,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,OAMf;QACC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAE1D,MAAM,SAAS,GAAG,CAAC,GAAG,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,CAAC,CAAC;QAEzG,OAAO;YACL,MAAM,EAAE,gBAAc;YACtB,OAAO,EAAE,CAAC,eAAe,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YAC9C,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,SAAS;SACnB,CAAC;IACJ,CAAC;CACF,CAAA;AAnBY,cAAc;IAD1B,MAAM,CAAC,EAAE,CAAC;GACE,cAAc,CAmB1B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nestjs-serverless-workflow",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Workflow and State Machines for NestJS",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Thomas Do (tung-dnt)",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"main": "./dist/workflow/index.js",
|
|
11
|
+
"types": "./dist/workflow/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
"./workflow": {
|
|
14
|
+
"types": "./dist/workflow/index.d.ts",
|
|
15
|
+
"import": "./dist/workflow/index.js",
|
|
16
|
+
"default": "./dist/workflow/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./event-bus": {
|
|
19
|
+
"types": "./dist/event-bus/index.d.ts",
|
|
20
|
+
"import": "./dist/event-bus/index.js",
|
|
21
|
+
"default": "./dist/event-bus/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./exception": {
|
|
24
|
+
"types": "./dist/exception/index.d.ts",
|
|
25
|
+
"import": "./dist/exception/index.js",
|
|
26
|
+
"default": "./dist/exception/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./adapter": {
|
|
29
|
+
"types": "./dist/adapter/index.d.ts",
|
|
30
|
+
"import": "./dist/adapter/index.js",
|
|
31
|
+
"default": "./dist/adapter/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./package.json": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "NODE_ENV=production bun run scripts/build.ts",
|
|
42
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
43
|
+
"start": "NODE_ENV=development tsgo && bun src/main.ts",
|
|
44
|
+
"start:dev": "NODE_ENV=development bun --watch src/main.ts",
|
|
45
|
+
"start:debug": "NODE_ENV=development bun --watch --inspect src/main.ts",
|
|
46
|
+
"start:prod": "NODE_ENV=production bun dist/main.js",
|
|
47
|
+
"test": "bun test",
|
|
48
|
+
"test:watch": "bun test --watch",
|
|
49
|
+
"test:cov": "bun test --coverage",
|
|
50
|
+
"test:debug": "bun --inspect-brk --runInBand",
|
|
51
|
+
"test:e2e": "bun test ./tests/app.e2e-spec.ts",
|
|
52
|
+
"typecheck": "tsgo --noEmit",
|
|
53
|
+
"prepublishOnly": "bun run build"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"class-transformer": "^0.5.1",
|
|
57
|
+
"class-validator": "^0.14.2"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@nestjs/common": "^11.0.0",
|
|
61
|
+
"@nestjs/core": "^11.0.0",
|
|
62
|
+
"reflect-metadata": "^0.2.0",
|
|
63
|
+
"rxjs": "^7.8.0"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"@aws-sdk/client-sqs": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"@aws-sdk/client-dynamodb": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"@aws-sdk/lib-dynamodb": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"@types/aws-lambda": {
|
|
76
|
+
"optional": true
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@aws-sdk/client-dynamodb": "^3.896.0",
|
|
81
|
+
"@aws-sdk/client-sqs": "^3.893.0",
|
|
82
|
+
"@aws-sdk/lib-dynamodb": "^3.896.0",
|
|
83
|
+
"@nestjs/cli": "^11.0.10",
|
|
84
|
+
"@nestjs/common": "^11.1.3",
|
|
85
|
+
"@nestjs/core": "^11.1.3",
|
|
86
|
+
"@nestjs/event-emitter": "^3.0.1",
|
|
87
|
+
"@nestjs/platform-express": "^11.0.1",
|
|
88
|
+
"@nestjs/swagger": "^11.0.2",
|
|
89
|
+
"@nestjs/testing": "^11.1.3",
|
|
90
|
+
"@types/aws-lambda": "8.10.152",
|
|
91
|
+
"@types/bun": "^1.3.4",
|
|
92
|
+
"@typescript/native-preview": "^7.0.0-dev.20251213.1",
|
|
93
|
+
"del-cli": "^6.0.0",
|
|
94
|
+
"dynamodb-toolbox": "^2.7.1",
|
|
95
|
+
"prettier": "^3.6.2",
|
|
96
|
+
"reflect-metadata": "^0.2.2",
|
|
97
|
+
"rxjs": "^7.8.2",
|
|
98
|
+
"serverless-plugin-include-dependencies": "^6.1.1",
|
|
99
|
+
"source-map-support": "^0.5.21",
|
|
100
|
+
"supertest": "^7.1.1",
|
|
101
|
+
"typescript": "^5.8.3",
|
|
102
|
+
"uuidv7": "^1.0.2"
|
|
103
|
+
},
|
|
104
|
+
"typesVersions": {
|
|
105
|
+
"*": {
|
|
106
|
+
"workflow": [
|
|
107
|
+
"./dist/workflow/index.d.ts"
|
|
108
|
+
],
|
|
109
|
+
"event-bus": [
|
|
110
|
+
"./dist/event-bus/index.d.ts"
|
|
111
|
+
],
|
|
112
|
+
"exception": [
|
|
113
|
+
"./dist/exception/index.d.ts"
|
|
114
|
+
],
|
|
115
|
+
"adapter": [
|
|
116
|
+
"./dist/adapter/index.d.ts"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"_moduleAliases": {
|
|
121
|
+
"@/*": "*"
|
|
122
|
+
},
|
|
123
|
+
"engines": {
|
|
124
|
+
"bun": ">=1.3.4",
|
|
125
|
+
"node": ">=18.0.0"
|
|
126
|
+
},
|
|
127
|
+
"keywords": [
|
|
128
|
+
"nestjs",
|
|
129
|
+
"workflow",
|
|
130
|
+
"state-machine",
|
|
131
|
+
"fsm",
|
|
132
|
+
"finite-state-machine",
|
|
133
|
+
"typescript",
|
|
134
|
+
"event-driven",
|
|
135
|
+
"process-automation",
|
|
136
|
+
"business-process",
|
|
137
|
+
"workflow-engine",
|
|
138
|
+
"state-management",
|
|
139
|
+
"transition",
|
|
140
|
+
"nodejs",
|
|
141
|
+
"serverless",
|
|
142
|
+
"orchestration",
|
|
143
|
+
"lambda",
|
|
144
|
+
"tree-shakable"
|
|
145
|
+
],
|
|
146
|
+
"repository": {
|
|
147
|
+
"type": "git",
|
|
148
|
+
"url": "https://github.com/@nestjs-serverless-workflow.git"
|
|
149
|
+
},
|
|
150
|
+
"bugs": {
|
|
151
|
+
"url": "https://github.com/@nestjs-serverless-workflow/issues"
|
|
152
|
+
},
|
|
153
|
+
"homepage": "https://github.com/@nestjs-serverless-workflow#readme"
|
|
154
|
+
}
|