@devrev/ts-adaas 1.0.2 → 1.0.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.
package/README.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  ## Release Notes
4
4
 
5
+ #### v1.0.4
6
+
7
+ - Fix logging from worker threads.
8
+
9
+ #### v1.0.3
10
+
11
+ - Added Release notes.
12
+
13
+ #### v1.0.2
14
+
15
+ - Bug fixes and improvements in local development.
16
+ - Expose `formatAxiosError` function for error handling.
17
+
5
18
  #### v1.0.1
6
19
 
7
20
  - Bug fixes and improvements in logging.
@@ -43,12 +43,12 @@ async function createAdapter(event, initialState, isLocalDevelopment = false) {
43
43
  }
44
44
  class Adapter {
45
45
  constructor(event, adapterState, isLocalDevelopment = false) {
46
- // if (!isLocalDevelopment) {
47
- // Logger.init(event);
48
- // }
49
46
  this.exit = false;
50
47
  this.lambdaTimeout = 10 * 60 * 1000; // 10 minutes in milliseconds
51
48
  this.heartBeatInterval = 30 * 1000; // 30 seconds in milliseconds
49
+ if (!isLocalDevelopment) {
50
+ // Logger.init(event);
51
+ }
52
52
  this.adapterState = adapterState;
53
53
  this._artifacts = [];
54
54
  this.event = event;
@@ -35,7 +35,7 @@ class Logger extends node_console_1.Console {
35
35
  node_worker_threads_1.parentPort === null || node_worker_threads_1.parentPort === void 0 ? void 0 : node_worker_threads_1.parentPort.postMessage({
36
36
  subject: workers_1.WorkerMessageSubject.WorkerMessageLog,
37
37
  payload: {
38
- args,
38
+ args: JSON.parse(JSON.stringify(args)),
39
39
  level,
40
40
  },
41
41
  });
@@ -56,7 +56,9 @@ class Logger extends node_console_1.Console {
56
56
  }
57
57
  exports.Logger = Logger;
58
58
  // Helper function to process each value in the state
59
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
59
60
  function getPrintableState(state) {
61
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
62
  function processValue(value) {
61
63
  if (Array.isArray(value)) {
62
64
  // If the value is an array, summarize it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrev/ts-adaas",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Typescript library containing the ADaaS(AirDrop as a Service) control protocol.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",