@hahnpro/flow-sdk 4.26.1 → 4.27.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.
@@ -1,5 +1,5 @@
1
1
  import 'reflect-metadata';
2
- import { API, MockAPI } from '@hahnpro/hpc-api';
2
+ import { API, HttpClient, MockAPI } from '@hahnpro/hpc-api';
3
3
  import { ConsumeMessage } from 'amqplib';
4
4
  import { AmqpConnectionManager } from 'amqp-connection-manager';
5
5
  import { PartialObserver } from 'rxjs';
@@ -12,6 +12,7 @@ interface FlowAppConfig {
12
12
  logger?: Logger;
13
13
  amqpConfig?: AmqpConnectionConfig;
14
14
  amqpConnection?: AmqpConnectionManager;
15
+ apiClient?: HttpClient;
15
16
  skipApi?: boolean;
16
17
  explicitInit?: boolean;
17
18
  mockApi?: MockAPI;
@@ -34,6 +35,7 @@ export declare class FlowApplication {
34
35
  private performanceMap;
35
36
  private properties;
36
37
  private readonly skipApi;
38
+ private readonly apiClient?;
37
39
  constructor(modules: ClassType<any>[], flow: Flow, config?: FlowAppConfig);
38
40
  constructor(modules: ClassType<any>[], flow: Flow, baseLogger?: Logger, amqpConnection?: AmqpConnection, skipApi?: boolean, explicitInit?: boolean);
39
41
  get rpcClient(): RpcClient;
@@ -208,6 +208,7 @@ class FlowApplication {
208
208
  this.skipApi = config.skipApi || false;
209
209
  explicitInit = config.explicitInit || false;
210
210
  this._api = config.mockApi || null;
211
+ this.apiClient = config.apiClient;
211
212
  }
212
213
  else {
213
214
  this.baseLogger = baseLoggerOrConfig;
@@ -251,7 +252,7 @@ class FlowApplication {
251
252
  this.properties = this.flow.properties || {};
252
253
  try {
253
254
  if (!this.skipApi && !(this._api instanceof hpc_api_1.MockAPI)) {
254
- this._api = new hpc_api_1.API();
255
+ this._api = new hpc_api_1.API(this.apiClient);
255
256
  }
256
257
  }
257
258
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/flow-sdk",
3
- "version": "4.26.1",
3
+ "version": "4.27.0",
4
4
  "description": "SDK for building Flow Modules",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -24,24 +24,24 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "amqp-connection-manager": "^4.1.12",
27
+ "amqp-connection-manager": "^4.1.13",
28
28
  "amqplib": "^0.10.3",
29
29
  "class-transformer": "0.5.1",
30
30
  "class-validator": "~0.14.0",
31
- "cloudevents": "^6.0.4",
31
+ "cloudevents": "^7.0.0",
32
32
  "lodash": "^4.17.21",
33
33
  "object-sizeof": "~2.4.2",
34
34
  "python-shell": "^3.0.1",
35
35
  "reflect-metadata": "^0.1.13",
36
- "rxjs": "^7.8.0",
36
+ "rxjs": "^7.8.1",
37
37
  "string-interp": "^0.3.6",
38
- "@hahnpro/hpc-api": "3.8.1"
38
+ "@hahnpro/hpc-api": "4.0.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/amqplib": "^0.10.1",
42
42
  "@types/jest": "^29.5.1",
43
43
  "@types/lodash": "^4.14.194",
44
- "@types/node": "^18.16.1",
44
+ "@types/node": "^18.16.12",
45
45
  "class-validator-jsonschema": "^5.0.0",
46
46
  "jest": "^29.5.0",
47
47
  "typescript": "^5.0.4"