@tramvai/module-common 4.32.6 → 4.33.1
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.
|
@@ -24,6 +24,15 @@ AsyncLocalStorageModule = __decorate([
|
|
|
24
24
|
app.addHook('onRequest', (req, reply, done) => {
|
|
25
25
|
storage.run({}, done);
|
|
26
26
|
});
|
|
27
|
+
// prevent memory leaks
|
|
28
|
+
app.addHook('onResponse', () => {
|
|
29
|
+
const store = storage.getStore();
|
|
30
|
+
if (store) {
|
|
31
|
+
for (const key in store) {
|
|
32
|
+
delete store[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
27
36
|
};
|
|
28
37
|
},
|
|
29
38
|
deps: {
|
|
@@ -28,6 +28,15 @@ exports.AsyncLocalStorageModule = tslib.__decorate([
|
|
|
28
28
|
app.addHook('onRequest', (req, reply, done) => {
|
|
29
29
|
storage.run({}, done);
|
|
30
30
|
});
|
|
31
|
+
// prevent memory leaks
|
|
32
|
+
app.addHook('onResponse', () => {
|
|
33
|
+
const store = storage.getStore();
|
|
34
|
+
if (store) {
|
|
35
|
+
for (const key in store) {
|
|
36
|
+
delete store[key];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
31
40
|
};
|
|
32
41
|
},
|
|
33
42
|
deps: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-common",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.33.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -37,29 +37,29 @@
|
|
|
37
37
|
"@tinkoff/pubsub": "0.7.1",
|
|
38
38
|
"@tinkoff/url": "0.10.1",
|
|
39
39
|
"@tramvai/safe-strings": "0.7.2",
|
|
40
|
-
"@tramvai/experiments": "4.
|
|
41
|
-
"@tramvai/module-cookie": "4.
|
|
42
|
-
"@tramvai/module-environment": "4.
|
|
43
|
-
"@tramvai/module-log": "4.
|
|
44
|
-
"@tramvai/tokens-child-app": "4.
|
|
45
|
-
"@tramvai/tokens-core-private": "4.
|
|
46
|
-
"@tramvai/tokens-common": "4.
|
|
47
|
-
"@tramvai/tokens-render": "4.
|
|
48
|
-
"@tramvai/tokens-router": "4.
|
|
49
|
-
"@tramvai/tokens-server-private": "4.
|
|
50
|
-
"@tramvai/types-actions-state-context": "4.
|
|
40
|
+
"@tramvai/experiments": "4.33.1",
|
|
41
|
+
"@tramvai/module-cookie": "4.33.1",
|
|
42
|
+
"@tramvai/module-environment": "4.33.1",
|
|
43
|
+
"@tramvai/module-log": "4.33.1",
|
|
44
|
+
"@tramvai/tokens-child-app": "4.33.1",
|
|
45
|
+
"@tramvai/tokens-core-private": "4.33.1",
|
|
46
|
+
"@tramvai/tokens-common": "4.33.1",
|
|
47
|
+
"@tramvai/tokens-render": "4.33.1",
|
|
48
|
+
"@tramvai/tokens-router": "4.33.1",
|
|
49
|
+
"@tramvai/tokens-server-private": "4.33.1",
|
|
50
|
+
"@tramvai/types-actions-state-context": "4.33.1",
|
|
51
51
|
"hoist-non-react-statics": "^3.3.1",
|
|
52
52
|
"node-abort-controller": "^3.0.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@tinkoff/dippy": "0.10.8",
|
|
56
56
|
"@tinkoff/utils": "^2.1.2",
|
|
57
|
-
"@tramvai/cli": "4.
|
|
58
|
-
"@tramvai/core": "4.
|
|
59
|
-
"@tramvai/papi": "4.
|
|
60
|
-
"@tramvai/react": "4.
|
|
61
|
-
"@tramvai/state": "4.
|
|
62
|
-
"@tramvai/tokens-server": "4.
|
|
57
|
+
"@tramvai/cli": "4.33.1",
|
|
58
|
+
"@tramvai/core": "4.33.1",
|
|
59
|
+
"@tramvai/papi": "4.33.1",
|
|
60
|
+
"@tramvai/react": "4.33.1",
|
|
61
|
+
"@tramvai/state": "4.33.1",
|
|
62
|
+
"@tramvai/tokens-server": "4.33.1",
|
|
63
63
|
"react": ">=16.14.0",
|
|
64
64
|
"tslib": "^2.4.0"
|
|
65
65
|
},
|