@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 +13 -0
- package/dist/deprecated/adapter/index.js +3 -3
- package/dist/logger/logger.js +3 -1
- package/package.json +1 -1
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;
|
package/dist/logger/logger.js
CHANGED
|
@@ -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
|