fix(package): rename package metadata from logcontext to smartcontext and tighten TypeScript build configuration
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartcontext',
|
||||
version: '2.3.0',
|
||||
version: '2.3.1',
|
||||
description: 'A module providing advanced asynchronous context management to enrich logs with context and manage scope effectively in Node.js applications.'
|
||||
}
|
||||
|
||||
@@ -116,10 +116,10 @@ export class AsyncStore {
|
||||
* does NOT include keys that are "deleted" in the child.
|
||||
* Child store should override parent if the same key exists in both.
|
||||
*/
|
||||
public getAll() {
|
||||
public getAll(): Record<string, any> {
|
||||
this.cleanUp();
|
||||
// first, get parent's data as a shallow copy
|
||||
const parentData = { ...(this.parentStore?.getAll() || {}) };
|
||||
const parentData: Record<string, any> = { ...(this.parentStore?.getAll() || {}) };
|
||||
|
||||
// remove keys from parent data that this child has deleted
|
||||
for (const key of this.deletedKeys) {
|
||||
@@ -132,4 +132,4 @@ export class AsyncStore {
|
||||
...this.dataObject
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user