@hahnpro/flow-sdk 4.20.0 → 4.20.4

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.
@@ -26,7 +26,7 @@ export declare class FlowApplication {
26
26
  emit: (event: FlowEvent) => void;
27
27
  emitPartial: (completeEvent: FlowEvent, partialEvent: FlowEvent) => void;
28
28
  getProperties(): Record<string, any>;
29
- onMessage: (event: CloudEvent) => Promise<Nack | undefined>;
29
+ onMessage: (event: CloudEvent<any>) => Promise<Nack | undefined>;
30
30
  /**
31
31
  * Publish a flow event to the amqp flowlogs exchange.
32
32
  * If the the event size exceeds the limit it will be truncated
@@ -29,6 +29,12 @@ try:
29
29
  except:
30
30
  port = "5672"
31
31
 
32
+ vhost = ""
33
+ try:
34
+ vhost = os.environ["RABBIT_VHOST"]
35
+ except:
36
+ vhost = ""
37
+
32
38
  routingKey = ""
33
39
  try:
34
40
  routingKey = os.environ["RPC_ROUTING_KEY"]
@@ -92,7 +98,7 @@ async def sendReply(exchange: Exchange, reply, originalMessage: Message):
92
98
 
93
99
 
94
100
  async def main(loop, routing_key):
95
- url = "amqp://%s:%s@%s:%s/" % (user, password, host, port)
101
+ url = "amqp://%s:%s@%s:%s/%s" % (user, password, host, port, vhost)
96
102
  connection = await connect_robust(
97
103
  url, loop=loop
98
104
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/flow-sdk",
3
- "version": "4.20.0",
3
+ "version": "4.20.4",
4
4
  "description": "SDK for building Flow Modules",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -24,30 +24,31 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@hahnpro/hpc-api": "1.1.0",
28
- "amqp-connection-manager": "^3.7.0",
27
+ "@hahnpro/hpc-api": "2.1.0",
28
+ "amqp-connection-manager": "^3.9.0",
29
29
  "amqplib": "^0.8.0",
30
30
  "class-transformer": "0.5.1",
31
31
  "class-validator": "~0.13.2",
32
- "class-validator-jsonschema": "^3.1.0",
33
- "cloudevents": "^5.2.0",
32
+ "cloudevents": "^5.3.0",
34
33
  "lodash": "^4.17.21",
35
34
  "object-sizeof": "^1.6.1",
36
35
  "python-shell": "^3.0.1",
37
36
  "reflect-metadata": "^0.1.13",
38
- "rxjs": "^7.4.0",
37
+ "rxjs": "^7.5.2",
39
38
  "string-interp": "^0.3.6",
40
39
  "uuid": "^8.3.2"
41
40
  },
42
41
  "devDependencies": {
43
- "@golevelup/nestjs-rabbitmq": "^1.18.1",
42
+ "@golevelup/nestjs-rabbitmq": "^2.0.0",
43
+ "@nestjs/common": "^8.2.6",
44
44
  "@types/amqp-connection-manager": "^2.0.12",
45
45
  "@types/amqplib": "^0.8.2",
46
- "@types/jest": "^27.0.3",
46
+ "@types/jest": "^27.4.0",
47
47
  "@types/lodash": "^4.14.178",
48
- "@types/node": "^16.11.12",
49
- "jest": "^27.4.4",
50
- "typescript": "^4.5.3"
48
+ "@types/node": "^16.11.21",
49
+ "class-validator-jsonschema": "^3.1.0",
50
+ "jest": "^27.4.7",
51
+ "typescript": "^4.5.5"
51
52
  },
52
53
  "engines": {
53
54
  "node": "^14.13.1 || >=16.0.0"
@@ -56,5 +57,6 @@
56
57
  "build": "../../node_modules/.bin/tsc -p tsconfig.lib.json",
57
58
  "build:nocomments": "../../node_modules/.bin/tsc -p tsconfig.nocomments.json",
58
59
  "postbuild": "../../node_modules/.bin/copyfiles -u 1 lib/*.py dist"
59
- }
60
+ },
61
+ "readme": "# `@hahnpro/flow-sdk`\n\nhttps://github.com/hahnprojects/flow\n"
60
62
  }