@hahnpro/flow-sdk 8.0.5 → 8.0.7

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,6 @@
1
1
  import 'reflect-metadata';
2
2
  import { API, HttpClient, MockAPI } from '@hahnpro/hpc-api';
3
+ import { NatsConnection, ConnectionOptions as NatsConnectionOptions } from '@nats-io/nats-core';
3
4
  import { ConsumeMessage } from 'amqplib';
4
5
  import { AmqpConnectionManager } from 'amqp-connection-manager';
5
6
  import { PartialObserver } from 'rxjs';
@@ -8,7 +9,6 @@ import { ClassType, Flow, FlowElementContext } from './flow.interface';
8
9
  import { FlowEvent } from './FlowEvent';
9
10
  import { Logger } from './FlowLogger';
10
11
  import { RpcClient } from './RpcClient';
11
- import { NatsConnection, ConnectionOptions as NatsConnectionOptions } from 'nats';
12
12
  import { ContextManager } from './ContextManager';
13
13
  interface FlowAppConfig {
14
14
  logger?: Logger;
@@ -6,11 +6,11 @@ require("reflect-metadata");
6
6
  const hpc_api_1 = require("@hahnpro/hpc-api");
7
7
  const cloudevents_1 = require("cloudevents");
8
8
  const crypto_1 = require("crypto");
9
+ const lodash_1 = require("lodash");
9
10
  const object_sizeof_1 = tslib_1.__importDefault(require("object-sizeof"));
10
11
  const perf_hooks_1 = require("perf_hooks");
11
12
  const rxjs_1 = require("rxjs");
12
13
  const operators_1 = require("rxjs/operators");
13
- const lodash_1 = require("lodash");
14
14
  const amqp_1 = require("./amqp");
15
15
  const flow_interface_1 = require("./flow.interface");
16
16
  const FlowLogger_1 = require("./FlowLogger");
@@ -27,7 +27,7 @@ export declare abstract class FlowElement<T = any> {
27
27
  */
28
28
  getPropertiesWithPlaceholders(): T;
29
29
  get flowProperties(): Record<string, any>;
30
- get natsConnection(): import("nats").NatsConnection;
30
+ get natsConnection(): import("@nats-io/nats-core").NatsConnection;
31
31
  onDestroy?: () => void;
32
32
  onMessage?: (message: DeploymentMessage) => void;
33
33
  /**
package/dist/nats.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { ConnectionOptions, NatsConnection } from 'nats';
1
+ import { ConnectionOptions, NatsConnection } from '@nats-io/nats-core';
2
2
  export declare function createNatsConnection(config: ConnectionOptions): Promise<NatsConnection>;
package/dist/nats.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNatsConnection = createNatsConnection;
4
- const nats_1 = require("nats");
4
+ const transport_node_1 = require("@nats-io/transport-node");
5
5
  async function createNatsConnection(config) {
6
6
  const servers = config?.servers ?? process.env.NATS_SERVERS?.split(',') ?? [];
7
7
  const reconnect = config?.reconnect ?? (process.env.NATS_RECONNECT ?? 'true') === 'true';
@@ -26,5 +26,5 @@ async function createNatsConnection(config) {
26
26
  user: config?.user ?? process.env.NATS_USER,
27
27
  pass: config.pass ?? process.env.NATS_PASSWORD,
28
28
  };
29
- return (0, nats_1.connect)(options);
29
+ return (0, transport_node_1.connect)(options);
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/flow-sdk",
3
- "version": "8.0.5",
3
+ "version": "8.0.7",
4
4
  "description": "SDK for building Flow Modules",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -24,28 +24,29 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
+ "@nats-io/nats-core": "3.0.0-48",
28
+ "@nats-io/transport-node": "3.0.0-33",
27
29
  "amqp-connection-manager": "4.1.14",
28
30
  "amqplib": "0.10.5",
29
31
  "class-transformer": "0.5.1",
30
32
  "class-validator": "~0.14.1",
31
33
  "cloudevents": "8.0.2",
32
34
  "lodash": "4.17.21",
33
- "nats": "2.28.2",
34
35
  "object-sizeof": "~2.6.5",
35
36
  "python-shell": "5.0.0",
36
37
  "reflect-metadata": "0.2.2",
37
38
  "rxjs": "7.8.1",
38
39
  "string-interp": "0.3.6",
39
- "@hahnpro/hpc-api": "5.3.3"
40
+ "@hahnpro/hpc-api": "5.3.4"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@types/amqplib": "0.10.6",
43
44
  "@types/jest": "29.5.14",
44
- "@types/lodash": "4.17.13",
45
- "@types/node": "22.10.3",
45
+ "@types/lodash": "4.17.14",
46
+ "@types/node": "22.10.6",
46
47
  "class-validator-jsonschema": "5.0.1",
47
48
  "jest": "29.7.0",
48
- "typescript": "5.7.2"
49
+ "typescript": "5.7.3"
49
50
  },
50
51
  "peerDependencies": {
51
52
  "axios": "1.7.9",