@hahnpro/flow-sdk 4.22.9 → 4.22.11

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.
@@ -10,16 +10,6 @@ exports.defaultLogger = {
10
10
  verbose: (msg, metadata) => console.log(msg, metadata),
11
11
  };
12
12
  class FlowLogger {
13
- constructor(metadata, logger = exports.defaultLogger, publishEvent) {
14
- this.metadata = metadata;
15
- this.logger = logger;
16
- this.publishEvent = publishEvent;
17
- this.debug = (message, options) => this.publish(message, 'debug', options);
18
- this.error = (message, options) => this.publish(message, 'error', options);
19
- this.log = (message, options) => this.publish(message, 'info', options);
20
- this.warn = (message, options) => this.publish(message, 'warn', options);
21
- this.verbose = (message, options) => this.publish(message, 'verbose', options);
22
- }
23
13
  static getStackTrace() {
24
14
  let stack;
25
15
  try {
@@ -34,6 +24,16 @@ class FlowLogger {
34
24
  .filter((value) => !value.includes('Logger'));
35
25
  return stack.splice(1).join('\n');
36
26
  }
27
+ constructor(metadata, logger = exports.defaultLogger, publishEvent) {
28
+ this.metadata = metadata;
29
+ this.logger = logger;
30
+ this.publishEvent = publishEvent;
31
+ this.debug = (message, options) => this.publish(message, 'debug', options);
32
+ this.error = (message, options) => this.publish(message, 'error', options);
33
+ this.log = (message, options) => this.publish(message, 'info', options);
34
+ this.warn = (message, options) => this.publish(message, 'warn', options);
35
+ this.verbose = (message, options) => this.publish(message, 'verbose', options);
36
+ }
37
37
  publish(message, level, options) {
38
38
  if (this.publishEvent) {
39
39
  const event = new FlowEvent_1.FlowEvent(this.metadata, message, `flow.log.${level}`);
@@ -3,5 +3,5 @@ export declare function FlowModule(metadata: {
3
3
  name: string;
4
4
  declarations: Array<ClassType<FlowElement>>;
5
5
  }): ClassDecorator;
6
- declare type ClassType<T> = new (...args: any[]) => T;
6
+ type ClassType<T> = new (...args: any[]) => T;
7
7
  export {};
@@ -37,7 +37,7 @@ export interface Flow {
37
37
  export interface StreamOptions {
38
38
  concurrent?: number;
39
39
  }
40
- export declare type ClassType<T> = new (...args: any[]) => T;
40
+ export type ClassType<T> = new (...args: any[]) => T;
41
41
  export declare enum LifecycleEvent {
42
42
  ACTIVATED = "com.hahnpro.flow_function.activated",
43
43
  COMPLETED = "com.hahnpro.flow_function.completed",
package/dist/units.d.ts CHANGED
@@ -16,10 +16,10 @@ export declare const dimensionToUnitMap: {
16
16
  f: string;
17
17
  };
18
18
  export declare const units: UnitDefinitions;
19
- export declare type UnitDefinitions = {
19
+ export type UnitDefinitions = {
20
20
  [key: string]: UnitDefinition;
21
21
  };
22
- export declare type UnitDefinition = {
22
+ export type UnitDefinition = {
23
23
  units: {
24
24
  unit: string;
25
25
  conversionFactor: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/flow-sdk",
3
- "version": "4.22.9",
3
+ "version": "4.22.11",
4
4
  "description": "SDK for building Flow Modules",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -24,30 +24,30 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@hahnpro/hpc-api": "3.6.1",
27
+ "@hahnpro/hpc-api": "3.6.3",
28
28
  "amqp-connection-manager": "^3.9.0",
29
- "amqplib": "^0.10.2",
29
+ "amqplib": "^0.10.3",
30
30
  "class-transformer": "0.5.1",
31
31
  "class-validator": "~0.13.2",
32
- "cloudevents": "^6.0.2",
32
+ "cloudevents": "^6.0.3",
33
33
  "lodash": "^4.17.21",
34
34
  "object-sizeof": "^1.6.3",
35
35
  "python-shell": "^3.0.1",
36
36
  "reflect-metadata": "^0.1.13",
37
- "rxjs": "^7.5.6",
37
+ "rxjs": "^7.5.7",
38
38
  "string-interp": "^0.3.6"
39
39
  },
40
40
  "devDependencies": {
41
- "@golevelup/nestjs-rabbitmq": "^3.2.0",
42
- "@nestjs/common": "^9.0.11",
41
+ "@golevelup/nestjs-rabbitmq": "^3.4.0",
42
+ "@nestjs/common": "^9.2.0",
43
43
  "@types/amqp-connection-manager": "^2.0.12",
44
- "@types/amqplib": "^0.8.2",
45
- "@types/jest": "^29.0.0",
46
- "@types/lodash": "^4.14.184",
47
- "@types/node": "^16.11.56",
44
+ "@types/amqplib": "^0.10.0",
45
+ "@types/jest": "^29.2.3",
46
+ "@types/lodash": "^4.14.189",
47
+ "@types/node": "^18.11.9",
48
48
  "class-validator-jsonschema": "^3.1.1",
49
- "jest": "^29.0.1",
50
- "typescript": "^4.8.2"
49
+ "jest": "^29.3.1",
50
+ "typescript": "^4.9.3"
51
51
  },
52
52
  "engines": {
53
53
  "node": "^14.13.1 || >=16.0.0"