@trayio/cdk-runtime 3.9.1 → 3.10.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.
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const stream_1 = require("stream");
27
+ const O = __importStar(require("fp-ts/Option"));
27
28
  const T = __importStar(require("fp-ts/Task"));
28
29
  const TE = __importStar(require("fp-ts/TaskEither"));
29
30
  const querystring = __importStar(require("querystring"));
@@ -43,7 +44,7 @@ class TestControllerHttp {
43
44
  {
44
45
  path: `/posts/:id`,
45
46
  method: Http_1.HttpMethod.Get,
46
- execute: (request) => {
47
+ execute: () => (request) => {
47
48
  const { id } = request.pathParams;
48
49
  return T.of({
49
50
  body: stream_1.Readable.from(JSON.stringify({
@@ -58,7 +59,7 @@ class TestControllerHttp {
58
59
  {
59
60
  path: `/tokens`,
60
61
  method: Http_1.HttpMethod.Get,
61
- execute: (request) => {
62
+ execute: () => (request) => {
62
63
  const token = request.headers.authorization;
63
64
  if (token === 'Bearer valid') {
64
65
  return T.of({
@@ -75,7 +76,7 @@ class TestControllerHttp {
75
76
  {
76
77
  path: `/posts/create`,
77
78
  method: Http_1.HttpMethod.Post,
78
- execute: (request) => {
79
+ execute: () => (request) => {
79
80
  const { body } = request;
80
81
  return T.of({
81
82
  body: body,
@@ -87,7 +88,7 @@ class TestControllerHttp {
87
88
  {
88
89
  path: `/image-upload`,
89
90
  method: Http_1.HttpMethod.Post,
90
- execute: (request) => {
91
+ execute: () => (request) => {
91
92
  const { body } = request;
92
93
  return (0, function_1.pipe)(fileStorage.write({
93
94
  content: body,
@@ -113,7 +114,7 @@ class TestControllerHttp {
113
114
  {
114
115
  path: `/multipart-upload`,
115
116
  method: Http_1.HttpMethod.Post,
116
- execute: (request) => {
117
+ execute: () => (request) => {
117
118
  const { body } = request;
118
119
  expect(body).toEqual(expect.objectContaining({
119
120
  fields: expect.objectContaining({ test: 'Hello world!' }),
@@ -132,7 +133,7 @@ class TestControllerHttp {
132
133
  },
133
134
  ];
134
135
  }
135
- const testHttpController = new ExpressHttpController_1.ExpressHttpController(new TestControllerHttp(), '/tmp');
136
+ const testHttpController = new ExpressHttpController_1.ExpressHttpController(new TestControllerHttp(), '/tmp', O.none);
136
137
  describe('OperationExecutionGateway', () => {
137
138
  let server;
138
139
  beforeAll(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trayio/cdk-runtime",
3
- "version": "3.9.1",
3
+ "version": "3.10.0",
4
4
  "description": "A Runtime that executes connector operations defined using the CDK DSL",
5
5
  "exports": {
6
6
  "./*": "./dist/*.js"
@@ -14,10 +14,10 @@
14
14
  "node": ">=18.x"
15
15
  },
16
16
  "dependencies": {
17
- "@trayio/axios": "3.9.1",
18
- "@trayio/cdk-dsl": "3.9.1",
19
- "@trayio/express": "3.9.1",
20
- "@trayio/winston": "3.9.1",
17
+ "@trayio/axios": "3.10.0",
18
+ "@trayio/cdk-dsl": "3.10.0",
19
+ "@trayio/express": "3.10.0",
20
+ "@trayio/winston": "3.10.0",
21
21
  "mime": "3.0.0",
22
22
  "uuid": "9.0.0"
23
23
  },