@trayio/cdk-runtime 0.0.8 → 0.0.10
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/connector/operation/CompositeOperationExecution.d.ts +1 -0
- package/dist/connector/operation/CompositeOperationExecution.d.ts.map +1 -1
- package/dist/connector/operation/CompositeOperationExecution.js +21 -1
- package/dist/connector/operation/OperationExecutionFactory.d.ts +2 -0
- package/dist/connector/operation/OperationExecutionFactory.d.ts.map +1 -1
- package/dist/connector/operation/OperationExecutionFactory.js +8 -2
- package/dist/connector/operation/OperationExecutionGateway.test.d.ts.map +1 -1
- package/dist/connector/operation/OperationExecutionGateway.test.js +15 -7
- package/dist/connector/operation/OperationExecutionValidation.d.ts +10 -0
- package/dist/connector/operation/OperationExecutionValidation.d.ts.map +1 -0
- package/dist/connector/operation/OperationExecutionValidation.js +47 -0
- package/dist/connector/operation/OperationExecutionValidationFactory.d.ts +7 -0
- package/dist/connector/operation/OperationExecutionValidationFactory.d.ts.map +1 -0
- package/dist/connector/operation/OperationExecutionValidationFactory.js +35 -0
- package/package.json +2 -2
|
@@ -7,5 +7,6 @@ export declare class CompositeOperationExecution<AUTH, IN, OUT> implements Opera
|
|
|
7
7
|
private handler;
|
|
8
8
|
constructor(handlerInvocationFactory: OperationHandlerInvocationFactory, handler: CompositeOperationHandler<AUTH, IN, OUT>);
|
|
9
9
|
execute(auth: AUTH, input: IN): Promise<OperationHandlerResult<OUT>>;
|
|
10
|
+
private isError;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=CompositeOperationExecution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeOperationExecution.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/CompositeOperationExecution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,qBAAa,2BAA2B,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CACrD,YAAW,kBAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;IAE5C,OAAO,CAAC,wBAAwB,CAAoC;IACpE,OAAO,CAAC,OAAO,CAA2C;gBAGzD,wBAAwB,EAAE,iCAAiC,EAC3D,OAAO,EAAE,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;IAM5C,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"CompositeOperationExecution.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/CompositeOperationExecution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,qBAAa,2BAA2B,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CACrD,YAAW,kBAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;IAE5C,OAAO,CAAC,wBAAwB,CAAoC;IACpE,OAAO,CAAC,OAAO,CAA2C;gBAGzD,wBAAwB,EAAE,iCAAiC,EAC3D,OAAO,EAAE,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;IAM5C,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAuB1E,OAAO,CAAC,OAAO;CAQf"}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CompositeOperationExecution = void 0;
|
|
13
|
+
const OperationHandlerResult_1 = require("@trayio/cdk-dsl/connector/operation/OperationHandlerResult");
|
|
13
14
|
class CompositeOperationExecution {
|
|
14
15
|
constructor(handlerInvocationFactory, handler) {
|
|
15
16
|
this.handlerInvocationFactory = handlerInvocationFactory;
|
|
@@ -18,8 +19,27 @@ class CompositeOperationExecution {
|
|
|
18
19
|
execute(auth, input) {
|
|
19
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
21
|
const handlerInvocation = this.handlerInvocationFactory(auth);
|
|
21
|
-
|
|
22
|
+
try {
|
|
23
|
+
const result = yield this.handler.handlerFunction(auth, input, handlerInvocation);
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (this.isError(error)) {
|
|
28
|
+
return OperationHandlerResult_1.OperationHandlerResult.failure(error.message);
|
|
29
|
+
}
|
|
30
|
+
if (typeof error === 'string') {
|
|
31
|
+
return OperationHandlerResult_1.OperationHandlerResult.failure(error);
|
|
32
|
+
}
|
|
33
|
+
return OperationHandlerResult_1.OperationHandlerResult.failure('Operation failed with unknown error');
|
|
34
|
+
}
|
|
22
35
|
});
|
|
23
36
|
}
|
|
37
|
+
// TODO: Move to tray-typescript-modules
|
|
38
|
+
isError(error) {
|
|
39
|
+
return (typeof error === 'object' &&
|
|
40
|
+
!Array.isArray(error) &&
|
|
41
|
+
error !== null &&
|
|
42
|
+
error.message !== undefined);
|
|
43
|
+
}
|
|
24
44
|
}
|
|
25
45
|
exports.CompositeOperationExecution = CompositeOperationExecution;
|
|
@@ -3,9 +3,11 @@ import { HttpClient } from '@trayio/tray-commons/http/HttpClient';
|
|
|
3
3
|
import { OperationExecution } from './OperationExecution';
|
|
4
4
|
import { OperationHandlerInvocationFactory } from './OperationHandlerInvocationFactory';
|
|
5
5
|
export declare class OperationExecutionFactory {
|
|
6
|
+
private operationExecutionValidationFactory;
|
|
6
7
|
private httpOperationExecutionFactory;
|
|
7
8
|
private compositeOperationExecutionFactory;
|
|
8
9
|
constructor(httpClient: HttpClient, operationHandlerInvocationFactory: OperationHandlerInvocationFactory);
|
|
9
10
|
executionFrom<AUTH, IN, OUT>(handler: OperationHandler<AUTH, IN, OUT>): OperationExecution<AUTH, IN, OUT>;
|
|
11
|
+
private executionFromImplementation;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=OperationExecutionFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationExecutionFactory.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/OperationExecutionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"OperationExecutionFactory.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/OperationExecutionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAEhB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAGxF,qBAAa,yBAAyB;IACrC,OAAO,CAAC,mCAAmC,CAAsC;IACjF,OAAO,CAAC,6BAA6B,CAAgC;IACrE,OAAO,CAAC,kCAAkC,CAAqC;gBAG9E,UAAU,EAAE,UAAU,EACtB,iCAAiC,EAAE,iCAAiC;IAWrE,aAAa,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAC1B,OAAO,EAAE,gBAAgB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,GACtC,kBAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;IAYpC,OAAO,CAAC,2BAA2B;CAgBnC"}
|
|
@@ -3,15 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OperationExecutionFactory = void 0;
|
|
4
4
|
const HttpOperationExecutionFactory_1 = require("./HttpOperationExecutionFactory");
|
|
5
5
|
const CompositeOperationExecutionFactory_1 = require("./CompositeOperationExecutionFactory");
|
|
6
|
+
const OperationExecutionValidationFactory_1 = require("./OperationExecutionValidationFactory");
|
|
6
7
|
class OperationExecutionFactory {
|
|
7
8
|
constructor(httpClient, operationHandlerInvocationFactory) {
|
|
9
|
+
this.operationExecutionValidationFactory =
|
|
10
|
+
new OperationExecutionValidationFactory_1.OperationExecutionValidationFactory();
|
|
8
11
|
this.httpOperationExecutionFactory = new HttpOperationExecutionFactory_1.HttpOperationExecutionFactory(httpClient);
|
|
9
12
|
this.compositeOperationExecutionFactory =
|
|
10
13
|
new CompositeOperationExecutionFactory_1.CompositeOperationExecutionFactory(operationHandlerInvocationFactory);
|
|
11
14
|
}
|
|
12
15
|
executionFrom(handler) {
|
|
13
|
-
|
|
14
|
-
const
|
|
16
|
+
const executionFromImplementation = this.executionFromImplementation(handler.implementation);
|
|
17
|
+
const execution = this.operationExecutionValidationFactory.decorateExecution(executionFromImplementation, handler.validation);
|
|
18
|
+
return execution;
|
|
19
|
+
}
|
|
20
|
+
executionFromImplementation(implementation) {
|
|
15
21
|
switch (implementation._tag) {
|
|
16
22
|
case 'HttpOperationHandler':
|
|
17
23
|
return this.httpOperationExecutionFactory.executionFrom(implementation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationExecutionGateway.test.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/OperationExecutionGateway.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationExecutionGateway.test.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/OperationExecutionGateway.test.ts"],"names":[],"mappings":"AAGA,OAAO,8BAA8B,CAAC"}
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const OperationHandler_1 = require("@trayio/cdk-dsl/connector/operation/OperationHandler");
|
|
4
4
|
const OperationHandlerTest_1 = require("@trayio/cdk-dsl/connector/operation/OperationHandlerTest");
|
|
5
|
+
const OperationHandlerResult_1 = require("@trayio/cdk-dsl/connector/operation/OperationHandlerResult");
|
|
5
6
|
require("./OperationHandlerTestRunner");
|
|
6
|
-
const getProductOperation = OperationHandler_1.OperationHandlerSetup.configureHandler('get-product', (handler) => handler
|
|
7
|
+
const getProductOperation = OperationHandler_1.OperationHandlerSetup.configureHandler('get-product', (handler) => handler
|
|
8
|
+
.addInputValidation((inputValidation) => inputValidation
|
|
9
|
+
.condition((auth, input) => input.id > 0)
|
|
10
|
+
.errorMessage(() => 'id must be bigger than zero'))
|
|
11
|
+
.usingHttp((http) => http
|
|
7
12
|
.get('https://fakestoreapi.com/products/:id')
|
|
8
13
|
.handleRequest((auth, input, request) => request.addPathParameter('id', input.id.toString()))
|
|
9
14
|
.handleResponse((response) => response.withBodyAsJson())));
|
|
@@ -14,12 +19,15 @@ OperationHandlerTest_1.OperationHandlerTestSetup.configureHandlerTest(getProduct
|
|
|
14
19
|
.givenNoContext()
|
|
15
20
|
.when(() => ({ id: 2 }))
|
|
16
21
|
.then(({ output }) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const outputValue = OperationHandlerResult_1.OperationHandlerResult.getSuccessfulValueOrFail(output);
|
|
23
|
+
expect(outputValue.id).toEqual(2);
|
|
24
|
+
})
|
|
25
|
+
.finallyDoNothing())
|
|
26
|
+
.testCase('should validate id', (testCase) => testCase
|
|
27
|
+
.givenNoContext()
|
|
28
|
+
.when(() => ({ id: -1 }))
|
|
29
|
+
.then(({ output }) => {
|
|
30
|
+
expect(output.isFailure).toBe(true);
|
|
23
31
|
})
|
|
24
32
|
.finallyDoNothing())
|
|
25
33
|
.nothingAfterAll());
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OperationHandlerResult } from '@trayio/cdk-dsl/connector/operation/OperationHandlerResult';
|
|
2
|
+
import { OperationHandlerValidation } from '@trayio/cdk-dsl/connector/operation/OperationHandlerValidation';
|
|
3
|
+
import { OperationExecution } from './OperationExecution';
|
|
4
|
+
export declare class OperationExecutionValidation<AUTH, IN, OUT> implements OperationExecution<AUTH, IN, OUT> {
|
|
5
|
+
private handlerValidation;
|
|
6
|
+
private execution;
|
|
7
|
+
constructor(handlerValidation: OperationHandlerValidation<AUTH, IN, OUT>, execution: OperationExecution<AUTH, IN, OUT>);
|
|
8
|
+
execute(auth: AUTH, input: IN): Promise<OperationHandlerResult<OUT>>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=OperationExecutionValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationExecutionValidation.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/OperationExecutionValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,4BAA4B,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CACtD,YAAW,kBAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;IAE5C,OAAO,CAAC,iBAAiB,CAA4C;IACrE,OAAO,CAAC,SAAS,CAAoC;gBAGpD,iBAAiB,EAAE,0BAA0B,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,EAC5D,SAAS,EAAE,kBAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;IAMvC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;CAsC1E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OperationExecutionValidation = void 0;
|
|
13
|
+
const OperationHandlerResult_1 = require("@trayio/cdk-dsl/connector/operation/OperationHandlerResult");
|
|
14
|
+
class OperationExecutionValidation {
|
|
15
|
+
constructor(handlerValidation, execution) {
|
|
16
|
+
this.handlerValidation = handlerValidation;
|
|
17
|
+
this.execution = execution;
|
|
18
|
+
}
|
|
19
|
+
execute(auth, input) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
// TODO Add input schema validation
|
|
22
|
+
const { inputValidation } = this.handlerValidation;
|
|
23
|
+
const inputValidationResult = inputValidation
|
|
24
|
+
.filter((validation) => !validation.condition(auth, input))
|
|
25
|
+
.map((validation) => validation.errorMessage(auth, input));
|
|
26
|
+
if (inputValidationResult.length > 0) {
|
|
27
|
+
return OperationHandlerResult_1.OperationHandlerResult.failure(inputValidationResult.join(', '));
|
|
28
|
+
}
|
|
29
|
+
const result = yield this.execution.execute(auth, input);
|
|
30
|
+
switch (result.isFailure) {
|
|
31
|
+
case true:
|
|
32
|
+
return result;
|
|
33
|
+
case false:
|
|
34
|
+
// TODO Add output schema validation
|
|
35
|
+
const { outputValidation } = this.handlerValidation;
|
|
36
|
+
const outputValidationResult = outputValidation
|
|
37
|
+
.filter((validation) => !validation.condition(auth, input, result.value))
|
|
38
|
+
.map((validation) => validation.errorMessage(auth, input, result.value));
|
|
39
|
+
if (outputValidationResult.length > 0) {
|
|
40
|
+
return OperationHandlerResult_1.OperationHandlerResult.failure(outputValidationResult.join(', '));
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.OperationExecutionValidation = OperationExecutionValidation;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as O from 'fp-ts/Option';
|
|
2
|
+
import { OperationHandlerValidation } from '@trayio/cdk-dsl/connector/operation/OperationHandlerValidation';
|
|
3
|
+
import { OperationExecution } from './OperationExecution';
|
|
4
|
+
export declare class OperationExecutionValidationFactory {
|
|
5
|
+
decorateExecution<AUTH, IN, OUT>(execution: OperationExecution<AUTH, IN, OUT>, handlerValidationOpt: O.Option<OperationHandlerValidation<AUTH, IN, OUT>>): OperationExecution<AUTH, IN, OUT>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=OperationExecutionValidationFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationExecutionValidationFactory.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/OperationExecutionValidationFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,qBAAa,mCAAmC;IAC/C,iBAAiB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAC9B,SAAS,EAAE,kBAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,EAC5C,oBAAoB,EAAE,CAAC,CAAC,MAAM,CAAC,0BAA0B,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,GACvE,kBAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC;CAUpC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.OperationExecutionValidationFactory = void 0;
|
|
27
|
+
const O = __importStar(require("fp-ts/Option"));
|
|
28
|
+
const function_1 = require("fp-ts/function");
|
|
29
|
+
const OperationExecutionValidation_1 = require("./OperationExecutionValidation");
|
|
30
|
+
class OperationExecutionValidationFactory {
|
|
31
|
+
decorateExecution(execution, handlerValidationOpt) {
|
|
32
|
+
return (0, function_1.pipe)(handlerValidationOpt, O.map((handlerValidation) => new OperationExecutionValidation_1.OperationExecutionValidation(handlerValidation, execution)), O.getOrElse(() => execution));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.OperationExecutionValidationFactory = OperationExecutionValidationFactory;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trayio/cdk-runtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "CDK Runtime",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./*": "./dist/*.js"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"author": "Tray.io",
|
|
9
9
|
"license": "Proprietary",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@trayio/cdk-dsl": "0.0.
|
|
11
|
+
"@trayio/cdk-dsl": "0.0.10",
|
|
12
12
|
"@trayio/tray-axios": "*"
|
|
13
13
|
},
|
|
14
14
|
"typesVersions": {
|