@mondart/nestjs-common-module-saga 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constant/index.d.ts +2 -0
- package/dist/constant/index.d.ts.map +1 -0
- package/dist/constant/index.js +18 -0
- package/dist/constant/index.js.map +1 -0
- package/dist/constant/saga-handler.const.d.ts +2 -0
- package/dist/constant/saga-handler.const.d.ts.map +1 -0
- package/dist/constant/saga-handler.const.js +5 -0
- package/dist/constant/saga-handler.const.js.map +1 -0
- package/dist/decorators/index.d.ts +2 -0
- package/dist/decorators/index.d.ts.map +1 -0
- package/dist/decorators/index.js +18 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/saga.decorator.d.ts +5 -0
- package/dist/decorators/saga.decorator.d.ts.map +1 -0
- package/dist/decorators/saga.decorator.js +16 -0
- package/dist/decorators/saga.decorator.js.map +1 -0
- package/dist/enums/index.d.ts +2 -0
- package/dist/enums/index.d.ts.map +1 -0
- package/dist/enums/index.js +18 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/enums/saga-status.enum.d.ts +9 -0
- package/dist/enums/saga-status.enum.d.ts.map +1 -0
- package/dist/enums/saga-status.enum.js +13 -0
- package/dist/enums/saga-status.enum.js.map +1 -0
- package/dist/exceptions/index.d.ts +3 -0
- package/dist/exceptions/index.d.ts.map +1 -0
- package/dist/exceptions/index.js +19 -0
- package/dist/exceptions/index.js.map +1 -0
- package/dist/exceptions/saga-compensation.exception.d.ts +6 -0
- package/dist/exceptions/saga-compensation.exception.d.ts.map +1 -0
- package/dist/exceptions/saga-compensation.exception.js +14 -0
- package/dist/exceptions/saga-compensation.exception.js.map +1 -0
- package/dist/exceptions/saga-invocation.exception.d.ts +6 -0
- package/dist/exceptions/saga-invocation.exception.d.ts.map +1 -0
- package/dist/exceptions/saga-invocation.exception.js +14 -0
- package/dist/exceptions/saga-invocation.exception.js.map +1 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +19 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/saga-exception-converter.helper.d.ts +4 -0
- package/dist/helpers/saga-exception-converter.helper.d.ts.map +1 -0
- package/dist/helpers/saga-exception-converter.helper.js +48 -0
- package/dist/helpers/saga-exception-converter.helper.js.map +1 -0
- package/dist/helpers/wrap-if-not-error.helper.d.ts +2 -0
- package/dist/helpers/wrap-if-not-error.helper.d.ts.map +1 -0
- package/dist/helpers/wrap-if-not-error.helper.js +10 -0
- package/dist/helpers/wrap-if-not-error.helper.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/index.d.ts +2 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +18 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/saga-module-register.interface.d.ts +7 -0
- package/dist/interfaces/saga-module-register.interface.d.ts.map +1 -0
- package/dist/interfaces/saga-module-register.interface.js +4 -0
- package/dist/interfaces/saga-module-register.interface.js.map +1 -0
- package/dist/saga.module.d.ts +9 -0
- package/dist/saga.module.d.ts.map +1 -0
- package/dist/saga.module.js +79 -0
- package/dist/saga.module.js.map +1 -0
- package/dist/services/index.d.ts +5 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +21 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/saga-builder.service.d.ts +9 -0
- package/dist/services/saga-builder.service.d.ts.map +1 -0
- package/dist/services/saga-builder.service.js +41 -0
- package/dist/services/saga-builder.service.js.map +1 -0
- package/dist/services/saga-flow.service.d.ts +15 -0
- package/dist/services/saga-flow.service.d.ts.map +1 -0
- package/dist/services/saga-flow.service.js +40 -0
- package/dist/services/saga-flow.service.js.map +1 -0
- package/dist/services/saga-step.service.d.ts +17 -0
- package/dist/services/saga-step.service.d.ts.map +1 -0
- package/dist/services/saga-step.service.js +38 -0
- package/dist/services/saga-step.service.js.map +1 -0
- package/dist/services/saga.service.d.ts +12 -0
- package/dist/services/saga.service.d.ts.map +1 -0
- package/dist/services/saga.service.js +45 -0
- package/dist/services/saga.service.js.map +1 -0
- package/dist/types/builder-method-return-result.type.d.ts +5 -0
- package/dist/types/builder-method-return-result.type.d.ts.map +1 -0
- package/dist/types/builder-method-return-result.type.js +3 -0
- package/dist/types/builder-method-return-result.type.js.map +1 -0
- package/dist/types/builder-method-step-result.type.d.ts +8 -0
- package/dist/types/builder-method-step-result.type.d.ts.map +1 -0
- package/dist/types/builder-method-step-result.type.js +3 -0
- package/dist/types/builder-method-step-result.type.js.map +1 -0
- package/dist/types/condition.type.d.ts +2 -0
- package/dist/types/condition.type.d.ts.map +1 -0
- package/dist/types/condition.type.js +3 -0
- package/dist/types/condition.type.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +24 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/next-options.type.d.ts +13 -0
- package/dist/types/next-options.type.d.ts.map +1 -0
- package/dist/types/next-options.type.js +3 -0
- package/dist/types/next-options.type.js.map +1 -0
- package/dist/types/saga-fn.type.d.ts +2 -0
- package/dist/types/saga-fn.type.d.ts.map +1 -0
- package/dist/types/saga-fn.type.js +3 -0
- package/dist/types/saga-fn.type.js.map +1 -0
- package/dist/types/saga-step-class.type.d.ts +5 -0
- package/dist/types/saga-step-class.type.d.ts.map +1 -0
- package/dist/types/saga-step-class.type.js +9 -0
- package/dist/types/saga-step-class.type.js.map +1 -0
- package/dist/types/saga.type.d.ts +5 -0
- package/dist/types/saga.type.d.ts.map +1 -0
- package/dist/types/saga.type.js +3 -0
- package/dist/types/saga.type.js.map +1 -0
- package/package.json +32 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./saga-builder.service"), exports);
|
|
18
|
+
__exportStar(require("./saga-flow.service"), exports);
|
|
19
|
+
__exportStar(require("./saga-step.service"), exports);
|
|
20
|
+
__exportStar(require("./saga.service"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,sDAAoC;AACpC,sDAAoC;AACpC,iDAA+B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BuilderMethodStepResult } from '../types';
|
|
2
|
+
export declare class SagaBuilder<T, R = void> {
|
|
3
|
+
private steps;
|
|
4
|
+
private returnFn;
|
|
5
|
+
step(name?: string): BuilderMethodStepResult<T, R>;
|
|
6
|
+
private return;
|
|
7
|
+
private build;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=saga-builder.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-builder.service.d.ts","sourceRoot":"","sources":["../../src/services/saga-builder.service.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,uBAAuB,EAGxB,MAAM,UAAU,CAAC;AAIlB,qBAAa,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI;IAClC,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,QAAQ,CAAmD;IAEnE,IAAI,CAAC,IAAI,SAAK,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC;IA6B9C,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,KAAK;CAGd"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SagaBuilder = void 0;
|
|
4
|
+
const saga_step_service_1 = require("./saga-step.service");
|
|
5
|
+
const saga_service_1 = require("./saga.service");
|
|
6
|
+
const saga_flow_service_1 = require("./saga-flow.service");
|
|
7
|
+
class SagaBuilder {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.steps = [];
|
|
10
|
+
this.returnFn = (() => void 0);
|
|
11
|
+
}
|
|
12
|
+
step(name = '') {
|
|
13
|
+
return {
|
|
14
|
+
invoke: (method) => {
|
|
15
|
+
const step = new saga_step_service_1.Step(name, this.steps.length, method);
|
|
16
|
+
this.steps.push(step);
|
|
17
|
+
const nextOptions = {
|
|
18
|
+
step: (name = '') => this.step(name),
|
|
19
|
+
return: (method) => this.return(method),
|
|
20
|
+
build: () => this.build(),
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
...nextOptions,
|
|
24
|
+
withCompensation: (method) => {
|
|
25
|
+
step.setCompensation(method);
|
|
26
|
+
return nextOptions;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return(method) {
|
|
33
|
+
this.returnFn = method;
|
|
34
|
+
return { build: () => this.build() };
|
|
35
|
+
}
|
|
36
|
+
build() {
|
|
37
|
+
return new saga_service_1.SagaCore(new saga_flow_service_1.SagaFlow(this.steps, this.returnFn));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.SagaBuilder = SagaBuilder;
|
|
41
|
+
//# sourceMappingURL=saga-builder.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-builder.service.js","sourceRoot":"","sources":["../../src/services/saga-builder.service.ts"],"names":[],"mappings":";;;AAAA,2DAA2C;AAO3C,iDAA0C;AAC1C,2DAA+C;AAE/C,MAAa,WAAW;IAAxB;QACU,UAAK,GAAc,EAAE,CAAC;QACtB,aAAQ,GAAa,CAAC,GAAG,EAAE,CAAC,KAAK,CAAY,CAAa,CAAC;IAuCrE,CAAC;IArCC,IAAI,CAAC,IAAI,GAAG,EAAE;QACZ,OAAO;YACL,MAAM,EAAE,CACN,MAAa,EAGb,EAAE;gBACF,MAAM,IAAI,GAAG,IAAI,wBAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBACvD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAEtB,MAAM,WAAW,GAAG;oBAClB,IAAI,EAAE,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;oBACpC,MAAM,EAAE,CAAC,MAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;oBACjD,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE;iBACL,CAAC;gBAEvB,OAAO;oBACL,GAAG,WAAW;oBACd,gBAAgB,EAAE,CAAC,MAAa,EAAE,EAAE;wBAClC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;wBAC7B,OAAO,WAAW,CAAC;oBACrB,CAAC;iBAGF,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,MAAgB;QAC7B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;QACvB,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;IACvC,CAAC;IAEO,KAAK;QACX,OAAO,IAAI,uBAAQ,CAAO,IAAI,4BAAQ,CAAO,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3E,CAAC;CACF;AAzCD,kCAyCC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Step } from './saga-step.service';
|
|
2
|
+
import { Fn } from '../types';
|
|
3
|
+
export declare class SagaFlow<T, R> {
|
|
4
|
+
private readonly steps;
|
|
5
|
+
private returnFn;
|
|
6
|
+
private readonly compensationSteps;
|
|
7
|
+
private __current;
|
|
8
|
+
private __returnFnName;
|
|
9
|
+
constructor(steps: Step<T>[], returnFn: Fn<T, R>);
|
|
10
|
+
get current(): Step<T>;
|
|
11
|
+
invoke(params: T): Promise<R>;
|
|
12
|
+
compensate(params: T): Promise<void>;
|
|
13
|
+
bind(ctx: unknown): this;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=saga-flow.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-flow.service.d.ts","sourceRoot":"","sources":["../../src/services/saga-flow.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IAMtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ;IANlB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAiB;IACnD,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,cAAc,CAAS;gBAGZ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EACzB,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAK5B,IAAI,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAErB;IAEK,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAgB7B,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1C,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;CAKzB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SagaFlow = void 0;
|
|
4
|
+
const saga_step_service_1 = require("./saga-step.service");
|
|
5
|
+
class SagaFlow {
|
|
6
|
+
constructor(steps, returnFn) {
|
|
7
|
+
this.steps = steps;
|
|
8
|
+
this.returnFn = returnFn;
|
|
9
|
+
this.compensationSteps = [];
|
|
10
|
+
this.__returnFnName = returnFn.name || 'return';
|
|
11
|
+
}
|
|
12
|
+
get current() {
|
|
13
|
+
return this.__current;
|
|
14
|
+
}
|
|
15
|
+
async invoke(params) {
|
|
16
|
+
for (const step of this.steps) {
|
|
17
|
+
this.__current = step;
|
|
18
|
+
await step.invoke(params);
|
|
19
|
+
this.compensationSteps.push(step);
|
|
20
|
+
}
|
|
21
|
+
const step = new saga_step_service_1.Step(this.__returnFnName, this.steps.length, this.returnFn);
|
|
22
|
+
this.__current = step;
|
|
23
|
+
return step.invoke(params);
|
|
24
|
+
}
|
|
25
|
+
async compensate(params) {
|
|
26
|
+
for (const step of this.compensationSteps.reverse()) {
|
|
27
|
+
if (!step.hasCompensation)
|
|
28
|
+
continue;
|
|
29
|
+
this.__current = step;
|
|
30
|
+
await step.compensate(params);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
bind(ctx) {
|
|
34
|
+
this.steps.forEach((step) => step.bind(ctx));
|
|
35
|
+
this.returnFn = this.returnFn.bind(ctx);
|
|
36
|
+
return this;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SagaFlow = SagaFlow;
|
|
40
|
+
//# sourceMappingURL=saga-flow.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-flow.service.js","sourceRoot":"","sources":["../../src/services/saga-flow.service.ts"],"names":[],"mappings":";;;AAAA,2DAA2C;AAG3C,MAAa,QAAQ;IAKnB,YACmB,KAAgB,EACzB,QAAkB;QADT,UAAK,GAAL,KAAK,CAAW;QACzB,aAAQ,GAAR,QAAQ,CAAU;QANX,sBAAiB,GAAc,EAAE,CAAC;QAQjD,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC;IAClD,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAS;QACpB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC1B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,wBAAI,CACnB,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,KAAK,CAAC,MAAM,EACjB,IAAI,CAAC,QAAQ,CACd,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG,IAAW,CAAC;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAS;QACxB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IAAI,CAAC,IAAI,CAAC,eAAe;gBAAE,SAAS;YACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED,IAAI,CAAC,GAAY;QACf,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA7CD,4BA6CC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Fn } from '../types';
|
|
2
|
+
export declare class Step<T, R = void> {
|
|
3
|
+
private stepName;
|
|
4
|
+
private index;
|
|
5
|
+
invocation: Fn<T, R>;
|
|
6
|
+
private __compensate?;
|
|
7
|
+
private compensationName;
|
|
8
|
+
private finalName;
|
|
9
|
+
constructor(stepName: string, index: number, invocation: Fn<T, R>);
|
|
10
|
+
get name(): string;
|
|
11
|
+
get hasCompensation(): boolean;
|
|
12
|
+
invoke(params: T): Promise<R>;
|
|
13
|
+
compensate(i: T): Promise<R> | R;
|
|
14
|
+
setCompensation(value: Fn<T, R>): void;
|
|
15
|
+
bind(ctx: unknown): this;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=saga-step.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-step.service.d.ts","sourceRoot":"","sources":["../../src/services/saga-step.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,qBAAa,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI;IAMzB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,KAAK;IACN,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAP7B,OAAO,CAAC,YAAY,CAAC,CAAuB;IAC5C,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,SAAS,CAAM;gBAGb,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACd,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAK7B,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,eAAe,IAAI,OAAO,CAE7B;IAEK,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAInC,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAOhC,eAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAK/B,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;CAKzB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Step = void 0;
|
|
4
|
+
class Step {
|
|
5
|
+
constructor(stepName, index, invocation) {
|
|
6
|
+
this.stepName = stepName;
|
|
7
|
+
this.index = index;
|
|
8
|
+
this.invocation = invocation;
|
|
9
|
+
this.compensationName = '';
|
|
10
|
+
this.finalName = '';
|
|
11
|
+
this.finalName = this.stepName || invocation.name || `step${index}`;
|
|
12
|
+
}
|
|
13
|
+
get name() {
|
|
14
|
+
return this.finalName;
|
|
15
|
+
}
|
|
16
|
+
get hasCompensation() {
|
|
17
|
+
return !!this.__compensate;
|
|
18
|
+
}
|
|
19
|
+
async invoke(params) {
|
|
20
|
+
return this.invocation(params);
|
|
21
|
+
}
|
|
22
|
+
compensate(i) {
|
|
23
|
+
this.finalName = this.compensationName;
|
|
24
|
+
return this.__compensate(i);
|
|
25
|
+
}
|
|
26
|
+
setCompensation(value) {
|
|
27
|
+
this.compensationName = this.stepName || value.name || `step${this.index}`;
|
|
28
|
+
this.__compensate = value;
|
|
29
|
+
}
|
|
30
|
+
bind(ctx) {
|
|
31
|
+
this.invocation = this.invocation.bind(ctx);
|
|
32
|
+
if (this.__compensate)
|
|
33
|
+
this.__compensate = this.__compensate.bind(ctx);
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.Step = Step;
|
|
38
|
+
//# sourceMappingURL=saga-step.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-step.service.js","sourceRoot":"","sources":["../../src/services/saga-step.service.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAKf,YACU,QAAgB,EAChB,KAAa,EACd,UAAoB;QAFnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,UAAK,GAAL,KAAK,CAAQ;QACd,eAAU,GAAV,UAAU,CAAU;QANrB,qBAAgB,GAAG,EAAE,CAAC;QACtB,cAAS,GAAG,EAAE,CAAC;QAOrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAI,IAAI,OAAO,KAAK,EAAE,CAAC;IACtE,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAS;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,UAAU,CAAC,CAAI;QACb,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAGvC,OAAO,IAAI,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,eAAe,CAAC,KAAe;QAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;QAC3E,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,CAAC,GAAY;QACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,IAAI,CAAC,YAAY;YAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA1CD,oBA0CC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SagaStatus } from '../enums';
|
|
2
|
+
import { SagaFlow } from './saga-flow.service';
|
|
3
|
+
export declare class SagaCore<T, R> {
|
|
4
|
+
private sagaFlow;
|
|
5
|
+
private __status;
|
|
6
|
+
constructor(sagaFlow: SagaFlow<T, R>);
|
|
7
|
+
get status(): SagaStatus;
|
|
8
|
+
execute(params: T): Promise<R>;
|
|
9
|
+
bind(ctx: unknown): this;
|
|
10
|
+
private runCompensationFlow;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=saga.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga.service.d.ts","sourceRoot":"","sources":["../../src/services/saga.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAO/C,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IAGZ,OAAO,CAAC,QAAQ;IAF5B,OAAO,CAAC,QAAQ,CAAkB;gBAEd,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAE5C,IAAI,MAAM,IAAI,UAAU,CAEvB;IAEK,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAcpC,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;YAKV,mBAAmB;CAYlC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SagaCore = void 0;
|
|
4
|
+
const enums_1 = require("../enums");
|
|
5
|
+
const exceptions_1 = require("../exceptions");
|
|
6
|
+
const helpers_1 = require("../helpers");
|
|
7
|
+
class SagaCore {
|
|
8
|
+
constructor(sagaFlow) {
|
|
9
|
+
this.sagaFlow = sagaFlow;
|
|
10
|
+
this.__status = enums_1.SagaStatus.New;
|
|
11
|
+
}
|
|
12
|
+
get status() {
|
|
13
|
+
return this.__status;
|
|
14
|
+
}
|
|
15
|
+
async execute(params) {
|
|
16
|
+
this.__status = enums_1.SagaStatus.InProgress;
|
|
17
|
+
try {
|
|
18
|
+
const result = await this.sagaFlow.invoke(params);
|
|
19
|
+
this.__status = enums_1.SagaStatus.Complete;
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
const invokeErrStepName = this.sagaFlow.current.name;
|
|
24
|
+
this.__status = enums_1.SagaStatus.InCompensation;
|
|
25
|
+
await this.runCompensationFlow(params);
|
|
26
|
+
throw new exceptions_1.SagaInvocationException((0, helpers_1.wrapIfNotError)(e), invokeErrStepName);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
bind(ctx) {
|
|
30
|
+
this.sagaFlow.bind(ctx);
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
async runCompensationFlow(params) {
|
|
34
|
+
try {
|
|
35
|
+
await this.sagaFlow.compensate(params);
|
|
36
|
+
this.__status = enums_1.SagaStatus.CompensationComplete;
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
this.__status = enums_1.SagaStatus.CompensationError;
|
|
40
|
+
throw new exceptions_1.SagaCompensationException((0, helpers_1.wrapIfNotError)(e), this.sagaFlow.current.name);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.SagaCore = SagaCore;
|
|
45
|
+
//# sourceMappingURL=saga.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga.service.js","sourceRoot":"","sources":["../../src/services/saga.service.ts"],"names":[],"mappings":";;;AAAA,oCAAsC;AAEtC,8CAGuB;AACvB,wCAA4C;AAE5C,MAAa,QAAQ;IAGnB,YAAoB,QAAwB;QAAxB,aAAQ,GAAR,QAAQ,CAAgB;QAFpC,aAAQ,GAAG,kBAAU,CAAC,GAAG,CAAC;IAEa,CAAC;IAEhD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAS;QACrB,IAAI,CAAC,QAAQ,GAAG,kBAAU,CAAC,UAAU,CAAC;QACtC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAClD,IAAI,CAAC,QAAQ,GAAG,kBAAU,CAAC,QAAQ,CAAC;YACpC,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;YACrD,IAAI,CAAC,QAAQ,GAAG,kBAAU,CAAC,cAAc,CAAC;YAC1C,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;YACvC,MAAM,IAAI,oCAAuB,CAAC,IAAA,wBAAc,EAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IAED,IAAI,CAAC,GAAY;QACf,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,MAAS;QACzC,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACvC,IAAI,CAAC,QAAQ,GAAG,kBAAU,CAAC,oBAAoB,CAAC;QAClD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,QAAQ,GAAG,kBAAU,CAAC,iBAAiB,CAAC;YAC7C,MAAM,IAAI,sCAAyB,CACjC,IAAA,wBAAc,EAAC,CAAC,CAAC,EACjB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAC3B,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAxCD,4BAwCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-method-return-result.type.d.ts","sourceRoot":"","sources":["../../src/types/builder-method-return-result.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,MAAM,yBAAyB,CAAC,CAAC,EAAE,CAAC,IAAI;IAAE,KAAK,EAAE,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-method-return-result.type.js","sourceRoot":"","sources":["../../src/types/builder-method-return-result.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NextOptions } from './next-options.type';
|
|
2
|
+
import { Fn } from './saga-fn.type';
|
|
3
|
+
export type BuilderMethodStepResult<T, R> = {
|
|
4
|
+
invoke: (method: Fn<T>) => NextOptions<T, R> & {
|
|
5
|
+
withCompensation: (method: Fn<T>) => NextOptions<T, R>;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=builder-method-step-result.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-method-step-result.type.d.ts","sourceRoot":"","sources":["../../src/types/builder-method-step-result.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,MAAM,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI;IAC1C,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAC7C,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACxD,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-method-step-result.type.js","sourceRoot":"","sources":["../../src/types/builder-method-step-result.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition.type.d.ts","sourceRoot":"","sources":["../../src/types/condition.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE,SAAS,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition.type.js","sourceRoot":"","sources":["../../src/types/condition.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './saga.type';
|
|
2
|
+
export * from './saga-fn.type';
|
|
3
|
+
export * from './next-options.type';
|
|
4
|
+
export * from './condition.type';
|
|
5
|
+
export * from './builder-method-return-result.type';
|
|
6
|
+
export * from './builder-method-step-result.type';
|
|
7
|
+
export * from './saga-step-class.type';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./saga.type"), exports);
|
|
18
|
+
__exportStar(require("./saga-fn.type"), exports);
|
|
19
|
+
__exportStar(require("./next-options.type"), exports);
|
|
20
|
+
__exportStar(require("./condition.type"), exports);
|
|
21
|
+
__exportStar(require("./builder-method-return-result.type"), exports);
|
|
22
|
+
__exportStar(require("./builder-method-step-result.type"), exports);
|
|
23
|
+
__exportStar(require("./saga-step-class.type"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,mDAAiC;AACjC,sEAAoD;AACpD,oEAAkD;AAClD,yDAAuC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Condition } from './condition.type';
|
|
2
|
+
import { SagaCore } from '../services';
|
|
3
|
+
import { Fn } from './saga-fn.type';
|
|
4
|
+
import { BuilderMethodStepResult } from './builder-method-step-result.type';
|
|
5
|
+
import { BuilderMethodReturnResult } from './builder-method-return-result.type';
|
|
6
|
+
export type NextOptions<T, R> = {
|
|
7
|
+
step: (name?: string) => BuilderMethodStepResult<T, R>;
|
|
8
|
+
} & Condition<R, {
|
|
9
|
+
return: (method: Fn<T, R>) => BuilderMethodReturnResult<T, R>;
|
|
10
|
+
}, {
|
|
11
|
+
build: () => SagaCore<T, R>;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=next-options.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-options.type.d.ts","sourceRoot":"","sources":["../../src/types/next-options.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI;IAC9B,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACxD,GAAG,SAAS,CACX,CAAC,EACD;IAAE,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,yBAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,EACjE;IAAE,KAAK,EAAE,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-options.type.js","sourceRoot":"","sources":["../../src/types/next-options.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-fn.type.d.ts","sourceRoot":"","sources":["../../src/types/saga-fn.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-fn.type.js","sourceRoot":"","sources":["../../src/types/saga-fn.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-step-class.type.d.ts","sourceRoot":"","sources":["../../src/types/saga-step-class.type.ts"],"names":[],"mappings":"AAAA,8BAAsB,QAAQ;IACtB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAC/B,gBAAgB,CAAC,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CACjD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SagaStep = void 0;
|
|
4
|
+
class SagaStep {
|
|
5
|
+
async invoke(cmd) { }
|
|
6
|
+
async withCompensation(cmd) { }
|
|
7
|
+
}
|
|
8
|
+
exports.SagaStep = SagaStep;
|
|
9
|
+
//# sourceMappingURL=saga-step-class.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga-step-class.type.js","sourceRoot":"","sources":["../../src/types/saga-step-class.type.ts"],"names":[],"mappings":";;;AAAA,MAAsB,QAAQ;IAC5B,KAAK,CAAC,MAAM,CAAC,GAAQ,IAAkB,CAAC;IACxC,KAAK,CAAC,gBAAgB,CAAE,GAAQ,IAAkB,CAAC;CACpD;AAHD,4BAGC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga.type.d.ts","sourceRoot":"","sources":["../../src/types/saga.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI;IAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga.type.js","sourceRoot":"","sources":["../../src/types/saga.type.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mondart/nestjs-common-module-saga",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Saga module and flow builder utilities for NestJS.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Mondart"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"type": "commonjs",
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc -p tsconfig.json"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@mondart/nestjs-common-module-core": "^3.0.0"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@nestjs/common": "^11.1.10",
|
|
24
|
+
"@nestjs/core": "^11.1.10",
|
|
25
|
+
"@nestjs/cqrs": "^11.0.1",
|
|
26
|
+
"reflect-metadata": "^0.2.0",
|
|
27
|
+
"rxjs": "^7.8.2"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
32
|
+
}
|