@tramvai/core 5.16.2 → 5.18.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.
@@ -71,7 +71,18 @@ class App {
71
71
  const log = logger?.('tramvai-core');
72
72
  const commandLineRunner = this.di.get({ token: COMMAND_LINE_RUNNER_TOKEN, optional: true });
73
73
  if (!commandLineRunner) {
74
- throw new Error('`COMMAND_LINE_RUNNER_TOKEN` is not defined, have you added `@tramvai/module-common` to your dependency list?');
74
+ const error = new Error('`COMMAND_LINE_RUNNER_TOKEN` is not defined, have you added `@tramvai/module-common` to your dependency list?');
75
+ if (process.env.NODE_ENV !== 'production') {
76
+ try {
77
+ this.di.get(COMMAND_LINE_RUNNER_TOKEN);
78
+ }
79
+ catch (e) {
80
+ if (e?.message) {
81
+ error.message += `\n\nProvider resolve error:\n${e.message}`;
82
+ }
83
+ }
84
+ }
85
+ throw error;
75
86
  }
76
87
  log?.warn({
77
88
  event: 'tramvai-app-init',
package/lib/createApp.js CHANGED
@@ -75,7 +75,18 @@ class App {
75
75
  const log = logger?.('tramvai-core');
76
76
  const commandLineRunner = this.di.get({ token: tokensCore.COMMAND_LINE_RUNNER_TOKEN, optional: true });
77
77
  if (!commandLineRunner) {
78
- throw new Error('`COMMAND_LINE_RUNNER_TOKEN` is not defined, have you added `@tramvai/module-common` to your dependency list?');
78
+ const error = new Error('`COMMAND_LINE_RUNNER_TOKEN` is not defined, have you added `@tramvai/module-common` to your dependency list?');
79
+ if (process.env.NODE_ENV !== 'production') {
80
+ try {
81
+ this.di.get(tokensCore.COMMAND_LINE_RUNNER_TOKEN);
82
+ }
83
+ catch (e) {
84
+ if (e?.message) {
85
+ error.message += `\n\nProvider resolve error:\n${e.message}`;
86
+ }
87
+ }
88
+ }
89
+ throw error;
79
90
  }
80
91
  log?.warn({
81
92
  event: 'tramvai-app-init',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/core",
3
- "version": "5.16.2",
3
+ "version": "5.18.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@tinkoff/utils": "^2.1.2",
22
- "@tramvai/tokens-common": "5.16.2",
23
- "@tramvai/tokens-core": "5.16.2",
24
- "@tramvai/types-actions-state-context": "5.16.2",
22
+ "@tramvai/tokens-common": "5.18.1",
23
+ "@tramvai/tokens-core": "5.18.1",
24
+ "@tramvai/types-actions-state-context": "5.18.1",
25
25
  "@tinkoff/dippy": "0.11.3",
26
26
  "tslib": "^2.4.0"
27
27
  },