@tramvai/module-common 5.15.3 → 5.16.2

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.
@@ -30,7 +30,7 @@ class ActionPageRunner {
30
30
  You can find more detailed information from "action-execution-error" logs, and find relative logs by using the same "x-request-id" header`,
31
31
  unfinishedActions,
32
32
  });
33
- abortController.abort();
33
+ abortController.abort('Page actions were aborted because of timeout');
34
34
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
35
35
  endChecker();
36
36
  }, this.deps.limitTime);
@@ -89,6 +89,7 @@ You can find more detailed information from "action-execution-error" logs, and f
89
89
  error: new ExecutionAbortError({
90
90
  message: `Execution aborted in context "${contextName}"`,
91
91
  contextName,
92
+ reason: executionContext.abortSignal.reason,
92
93
  }),
93
94
  event: `action-execution-error`,
94
95
  message: `${actionName} has exceeded timeout of ${this.deps.limitTime}ms, execution results will be ignored.
@@ -34,7 +34,7 @@ class ActionPageRunner {
34
34
  You can find more detailed information from "action-execution-error" logs, and find relative logs by using the same "x-request-id" header`,
35
35
  unfinishedActions,
36
36
  });
37
- abortController.abort();
37
+ abortController.abort('Page actions were aborted because of timeout');
38
38
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
39
39
  endChecker();
40
40
  }, this.deps.limitTime);
@@ -93,6 +93,7 @@ You can find more detailed information from "action-execution-error" logs, and f
93
93
  error: new errors.ExecutionAbortError({
94
94
  message: `Execution aborted in context "${contextName}"`,
95
95
  contextName,
96
+ reason: executionContext.abortSignal.reason,
96
97
  }),
97
98
  event: `action-execution-error`,
98
99
  message: `${actionName} has exceeded timeout of ${this.deps.limitTime}ms, execution results will be ignored.
@@ -128,7 +128,7 @@ class CommandLineRunner {
128
128
  command: name,
129
129
  });
130
130
  // in case if any error happens during line execution results from other line handlers will not be used anyway
131
- this.abortControllerByDi.get(di)?.abort();
131
+ this.abortControllerByDi.get(di)?.abort(err);
132
132
  this.throwError(err, di);
133
133
  });
134
134
  }
@@ -128,7 +128,7 @@ class CommandLineRunner {
128
128
  command: name,
129
129
  });
130
130
  // in case if any error happens during line execution results from other line handlers will not be used anyway
131
- this.abortControllerByDi.get(di)?.abort();
131
+ this.abortControllerByDi.get(di)?.abort(err);
132
132
  this.throwError(err, di);
133
133
  });
134
134
  }
@@ -132,7 +132,7 @@ class CommandLineRunner {
132
132
  command: name,
133
133
  });
134
134
  // in case if any error happens during line execution results from other line handlers will not be used anyway
135
- this.abortControllerByDi.get(di)?.abort();
135
+ this.abortControllerByDi.get(di)?.abort(err);
136
136
  this.throwError(err, di);
137
137
  });
138
138
  }
@@ -1,5 +1,4 @@
1
1
  import { ExecutionAbortError } from '@tinkoff/errors';
2
- import { AbortController } from 'node-abort-controller';
3
2
 
4
3
  const EMPTY_VALUES = {};
5
4
  const normalizeOptions = (nameOrOptions) => {
@@ -1,5 +1,4 @@
1
1
  import { ExecutionAbortError } from '@tinkoff/errors';
2
- import { AbortController } from 'node-abort-controller';
3
2
 
4
3
  const EMPTY_VALUES = {};
5
4
  const normalizeOptions = (nameOrOptions) => {
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var errors = require('@tinkoff/errors');
6
- var nodeAbortController = require('node-abort-controller');
7
6
 
8
7
  const EMPTY_VALUES = {};
9
8
  const normalizeOptions = (nameOrOptions) => {
@@ -21,7 +20,7 @@ class ExecutionContextManager {
21
20
  contextName,
22
21
  });
23
22
  }
24
- const abortController = new nodeAbortController.AbortController();
23
+ const abortController = new AbortController();
25
24
  let abortListener;
26
25
  let values = selfValues;
27
26
  if (parentContext) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-common",
3
- "version": "5.15.3",
3
+ "version": "5.16.2",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -36,31 +36,30 @@
36
36
  "@tinkoff/lru-cache-nano": "^7.9.0",
37
37
  "@tinkoff/pubsub": "0.8.2",
38
38
  "@tinkoff/url": "0.11.2",
39
- "@tramvai/experiments": "5.15.3",
40
- "@tramvai/module-cookie": "5.15.3",
41
- "@tramvai/module-environment": "5.15.3",
42
- "@tramvai/module-log": "5.15.3",
39
+ "@tramvai/experiments": "5.16.2",
40
+ "@tramvai/module-cookie": "5.16.2",
41
+ "@tramvai/module-environment": "5.16.2",
42
+ "@tramvai/module-log": "5.16.2",
43
43
  "@tramvai/safe-strings": "0.8.4",
44
- "@tramvai/tokens-child-app": "5.15.3",
45
- "@tramvai/tokens-common": "5.15.3",
46
- "@tramvai/tokens-core-private": "5.15.3",
47
- "@tramvai/tokens-metrics": "5.15.3",
48
- "@tramvai/tokens-render": "5.15.3",
49
- "@tramvai/tokens-router": "5.15.3",
50
- "@tramvai/tokens-server-private": "5.15.3",
51
- "@tramvai/types-actions-state-context": "5.15.3",
52
- "hoist-non-react-statics": "^3.3.1",
53
- "node-abort-controller": "^3.0.1"
44
+ "@tramvai/tokens-child-app": "5.16.2",
45
+ "@tramvai/tokens-common": "5.16.2",
46
+ "@tramvai/tokens-core-private": "5.16.2",
47
+ "@tramvai/tokens-metrics": "5.16.2",
48
+ "@tramvai/tokens-render": "5.16.2",
49
+ "@tramvai/tokens-router": "5.16.2",
50
+ "@tramvai/tokens-server-private": "5.16.2",
51
+ "@tramvai/types-actions-state-context": "5.16.2",
52
+ "hoist-non-react-statics": "^3.3.1"
54
53
  },
55
54
  "peerDependencies": {
56
55
  "@tinkoff/dippy": "0.11.3",
57
56
  "@tinkoff/utils": "^2.1.2",
58
- "@tramvai/cli": "5.15.3",
59
- "@tramvai/core": "5.15.3",
60
- "@tramvai/papi": "5.15.3",
61
- "@tramvai/react": "5.15.3",
62
- "@tramvai/state": "5.15.3",
63
- "@tramvai/tokens-server": "5.15.3",
57
+ "@tramvai/cli": "5.16.2",
58
+ "@tramvai/core": "5.16.2",
59
+ "@tramvai/papi": "5.16.2",
60
+ "@tramvai/react": "5.16.2",
61
+ "@tramvai/state": "5.16.2",
62
+ "@tramvai/tokens-server": "5.16.2",
64
63
  "react": ">=16.14.0",
65
64
  "tslib": "^2.4.0"
66
65
  },