@tramvai/module-child-app 4.41.46 → 4.41.48
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/lib/shared/child/singletonProviders.browser.js +14 -3
- package/lib/shared/child/singletonProviders.es.js +14 -3
- package/lib/shared/child/singletonProviders.js +14 -3
- package/lib/shared/command.browser.js +34 -3
- package/lib/shared/command.d.ts +5 -2
- package/lib/shared/command.es.js +34 -3
- package/lib/shared/command.js +33 -2
- package/lib/shared/providers.browser.js +2 -1
- package/lib/shared/providers.es.js +2 -1
- package/lib/shared/providers.js +1 -0
- package/package.json +12 -11
|
@@ -71,9 +71,20 @@ const getChildProviders = (appDi, loadableStats) => {
|
|
|
71
71
|
provide: DISPATCHER_CONTEXT_TOKEN,
|
|
72
72
|
scope: Scope.REQUEST,
|
|
73
73
|
useFactory: ({ dispatcher, middlewares, initialState, parentAllowedStores }) => {
|
|
74
|
-
var _a, _b, _c
|
|
75
|
-
const parentDispatcherContext =
|
|
76
|
-
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
const parentDispatcherContext = typeof window !== 'undefined'
|
|
76
|
+
? // ALS is not existing on the client,
|
|
77
|
+
// also if we resolve `DISPATCHER_CONTEXT_TOKEN` from Root DI in the server-side,
|
|
78
|
+
// it will lead to memory leak (with circular dependency) because of reducers event handlers:
|
|
79
|
+
// RootDi.recordValues -> DispatcherContext.storeInstances -> ReducerStore.listeners -> listener.this -> ChildDispatcherContext.parentDispatcherContext -> DispatcherContext
|
|
80
|
+
appDi.get(DISPATCHER_CONTEXT_TOKEN)
|
|
81
|
+
: (_c = (_b = (_a = appDi
|
|
82
|
+
.get(optional(ASYNC_LOCAL_STORAGE_TOKEN))) === null || _a === void 0 ? void 0 : _a.getStore()) === null || _b === void 0 ? void 0 : _b.tramvaiRequestDi) === null || _c === void 0 ? void 0 : _c.get(DISPATCHER_CONTEXT_TOKEN);
|
|
83
|
+
if (!parentDispatcherContext) {
|
|
84
|
+
// this should not happen because we add subscribtion to root execution context abortSignal
|
|
85
|
+
// for Child Apps command line runner, and this token will not be resolved
|
|
86
|
+
throw Error('Cannot find DispatcherContext for current request, unexpected critical error');
|
|
87
|
+
}
|
|
77
88
|
return new ChildDispatcherContext({
|
|
78
89
|
dispatcher,
|
|
79
90
|
// context will be set later by the CONTEXT_TOKEN
|
|
@@ -71,9 +71,20 @@ const getChildProviders = (appDi, loadableStats) => {
|
|
|
71
71
|
provide: DISPATCHER_CONTEXT_TOKEN,
|
|
72
72
|
scope: Scope.REQUEST,
|
|
73
73
|
useFactory: ({ dispatcher, middlewares, initialState, parentAllowedStores }) => {
|
|
74
|
-
var _a, _b, _c
|
|
75
|
-
const parentDispatcherContext =
|
|
76
|
-
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
const parentDispatcherContext = typeof window !== 'undefined'
|
|
76
|
+
? // ALS is not existing on the client,
|
|
77
|
+
// also if we resolve `DISPATCHER_CONTEXT_TOKEN` from Root DI in the server-side,
|
|
78
|
+
// it will lead to memory leak (with circular dependency) because of reducers event handlers:
|
|
79
|
+
// RootDi.recordValues -> DispatcherContext.storeInstances -> ReducerStore.listeners -> listener.this -> ChildDispatcherContext.parentDispatcherContext -> DispatcherContext
|
|
80
|
+
appDi.get(DISPATCHER_CONTEXT_TOKEN)
|
|
81
|
+
: (_c = (_b = (_a = appDi
|
|
82
|
+
.get(optional(ASYNC_LOCAL_STORAGE_TOKEN))) === null || _a === void 0 ? void 0 : _a.getStore()) === null || _b === void 0 ? void 0 : _b.tramvaiRequestDi) === null || _c === void 0 ? void 0 : _c.get(DISPATCHER_CONTEXT_TOKEN);
|
|
83
|
+
if (!parentDispatcherContext) {
|
|
84
|
+
// this should not happen because we add subscribtion to root execution context abortSignal
|
|
85
|
+
// for Child Apps command line runner, and this token will not be resolved
|
|
86
|
+
throw Error('Cannot find DispatcherContext for current request, unexpected critical error');
|
|
87
|
+
}
|
|
77
88
|
return new ChildDispatcherContext({
|
|
78
89
|
dispatcher,
|
|
79
90
|
// context will be set later by the CONTEXT_TOKEN
|
|
@@ -79,9 +79,20 @@ const getChildProviders = (appDi, loadableStats) => {
|
|
|
79
79
|
provide: tokensCommon.DISPATCHER_CONTEXT_TOKEN,
|
|
80
80
|
scope: core.Scope.REQUEST,
|
|
81
81
|
useFactory: ({ dispatcher, middlewares, initialState, parentAllowedStores }) => {
|
|
82
|
-
var _a, _b, _c
|
|
83
|
-
const parentDispatcherContext =
|
|
84
|
-
|
|
82
|
+
var _a, _b, _c;
|
|
83
|
+
const parentDispatcherContext = typeof window !== 'undefined'
|
|
84
|
+
? // ALS is not existing on the client,
|
|
85
|
+
// also if we resolve `DISPATCHER_CONTEXT_TOKEN` from Root DI in the server-side,
|
|
86
|
+
// it will lead to memory leak (with circular dependency) because of reducers event handlers:
|
|
87
|
+
// RootDi.recordValues -> DispatcherContext.storeInstances -> ReducerStore.listeners -> listener.this -> ChildDispatcherContext.parentDispatcherContext -> DispatcherContext
|
|
88
|
+
appDi.get(tokensCommon.DISPATCHER_CONTEXT_TOKEN)
|
|
89
|
+
: (_c = (_b = (_a = appDi
|
|
90
|
+
.get(core.optional(tokensCommon.ASYNC_LOCAL_STORAGE_TOKEN))) === null || _a === void 0 ? void 0 : _a.getStore()) === null || _b === void 0 ? void 0 : _b.tramvaiRequestDi) === null || _c === void 0 ? void 0 : _c.get(tokensCommon.DISPATCHER_CONTEXT_TOKEN);
|
|
91
|
+
if (!parentDispatcherContext) {
|
|
92
|
+
// this should not happen because we add subscribtion to root execution context abortSignal
|
|
93
|
+
// for Child Apps command line runner, and this token will not be resolved
|
|
94
|
+
throw Error('Cannot find DispatcherContext for current request, unexpected critical error');
|
|
95
|
+
}
|
|
85
96
|
return new state.ChildDispatcherContext({
|
|
86
97
|
dispatcher,
|
|
87
98
|
// context will be set later by the CONTEXT_TOKEN
|
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isSilentError } from '@tinkoff/errors';
|
|
2
|
+
import { COMMAND_LINE_RUNNER_TOKEN, provide } from '@tramvai/core';
|
|
3
|
+
import { ROOT_EXECUTION_CONTEXT_TOKEN } from '@tramvai/tokens-common';
|
|
2
4
|
|
|
3
5
|
class CommandLineRunner {
|
|
4
|
-
constructor({ logger, rootCommandLineRunner, diManager, }) {
|
|
6
|
+
constructor({ logger, rootCommandLineRunner, diManager, commandLineExecutionContext, }) {
|
|
5
7
|
this.log = logger('child-app:command-line-runner');
|
|
6
8
|
this.rootCommandLineRunner = rootCommandLineRunner;
|
|
7
9
|
this.diManager = diManager;
|
|
10
|
+
this.commandLineExecutionContext = commandLineExecutionContext;
|
|
8
11
|
}
|
|
9
12
|
async run(type, status, config) {
|
|
13
|
+
var _a, _b;
|
|
10
14
|
const di = this.diManager.getChildDi(config);
|
|
15
|
+
const executionContext = this.commandLineExecutionContext();
|
|
11
16
|
if (!di) {
|
|
12
17
|
return;
|
|
13
18
|
}
|
|
19
|
+
// Root App command line can be aborted before Child App command line run,
|
|
20
|
+
// for example in case of sync `RedirectFoundError` in page action (`resolvePageDeps` command),
|
|
21
|
+
// we need to prevent Child Apps preloading (also on `resolvePageDeps` command)
|
|
22
|
+
if (((_a = executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) ||
|
|
23
|
+
(typeof window === 'undefined' && !executionContext)) {
|
|
24
|
+
this.log.error({
|
|
25
|
+
event: 'host-exection-context-aborted',
|
|
26
|
+
message: `Child App command line run was prevented from executing because ${((_b = executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal) === null || _b === void 0 ? void 0 : _b.aborted)
|
|
27
|
+
? 'host command line was aborted'
|
|
28
|
+
: 'execution context is already destroyed'}`,
|
|
29
|
+
reason: executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal.reason,
|
|
30
|
+
type,
|
|
31
|
+
status,
|
|
32
|
+
childApp: { name: config.name, version: config.version, tag: config.tag },
|
|
33
|
+
});
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
14
36
|
try {
|
|
15
37
|
const commandLineRunner = di.get({ token: COMMAND_LINE_RUNNER_TOKEN, optional: true });
|
|
16
38
|
if (commandLineRunner && commandLineRunner !== this.rootCommandLineRunner) {
|
|
@@ -18,12 +40,21 @@ class CommandLineRunner {
|
|
|
18
40
|
// for now just reuse metrics implementation from root as otherwise it fails after attempt to create metrics instance with the same name
|
|
19
41
|
// @ts-ignore
|
|
20
42
|
commandLineRunner.metricsInstance = this.rootCommandLineRunner.metricsInstance;
|
|
43
|
+
// provide current Root App execution context as Child App root execution context
|
|
44
|
+
if (executionContext) {
|
|
45
|
+
di.register(provide({
|
|
46
|
+
provide: ROOT_EXECUTION_CONTEXT_TOKEN,
|
|
47
|
+
useValue: executionContext,
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
21
50
|
await commandLineRunner.run(type, status, [], di);
|
|
22
51
|
}
|
|
23
52
|
}
|
|
24
53
|
catch (error) {
|
|
25
54
|
if (error.code !== 'E_STUB') {
|
|
26
|
-
this.log
|
|
55
|
+
this.log[
|
|
56
|
+
// for example, we don't need to log Child App run as failed in case of RedirectFoundError
|
|
57
|
+
isSilentError(error) || (error.reason && isSilentError(error.reason)) ? 'debug' : 'error']({
|
|
27
58
|
event: 'run-failed',
|
|
28
59
|
error,
|
|
29
60
|
type,
|
package/lib/shared/command.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import type { CommandLineDescription, CommandLines } from '@tramvai/core';
|
|
2
2
|
import { COMMAND_LINE_RUNNER_TOKEN } from '@tramvai/core';
|
|
3
3
|
import type { ChildAppCommandLineRunner, ChildAppDiManager, ChildAppFinalConfig } from '@tramvai/tokens-child-app';
|
|
4
|
-
import type {
|
|
4
|
+
import type { COMMAND_LINE_EXECUTION_CONTEXT_TOKEN } from '@tramvai/tokens-common';
|
|
5
|
+
import { type LOGGER_TOKEN } from '@tramvai/tokens-common';
|
|
5
6
|
export declare class CommandLineRunner implements ChildAppCommandLineRunner {
|
|
6
7
|
private readonly log;
|
|
7
8
|
private readonly rootCommandLineRunner;
|
|
8
9
|
private readonly diManager;
|
|
9
|
-
|
|
10
|
+
private readonly commandLineExecutionContext;
|
|
11
|
+
constructor({ logger, rootCommandLineRunner, diManager, commandLineExecutionContext, }: {
|
|
10
12
|
logger: typeof LOGGER_TOKEN;
|
|
11
13
|
rootCommandLineRunner: typeof COMMAND_LINE_RUNNER_TOKEN;
|
|
12
14
|
diManager: ChildAppDiManager;
|
|
15
|
+
commandLineExecutionContext: typeof COMMAND_LINE_EXECUTION_CONTEXT_TOKEN;
|
|
13
16
|
});
|
|
14
17
|
run(type: keyof CommandLines, status: keyof CommandLineDescription, config: ChildAppFinalConfig): Promise<void>;
|
|
15
18
|
}
|
package/lib/shared/command.es.js
CHANGED
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isSilentError } from '@tinkoff/errors';
|
|
2
|
+
import { COMMAND_LINE_RUNNER_TOKEN, provide } from '@tramvai/core';
|
|
3
|
+
import { ROOT_EXECUTION_CONTEXT_TOKEN } from '@tramvai/tokens-common';
|
|
2
4
|
|
|
3
5
|
class CommandLineRunner {
|
|
4
|
-
constructor({ logger, rootCommandLineRunner, diManager, }) {
|
|
6
|
+
constructor({ logger, rootCommandLineRunner, diManager, commandLineExecutionContext, }) {
|
|
5
7
|
this.log = logger('child-app:command-line-runner');
|
|
6
8
|
this.rootCommandLineRunner = rootCommandLineRunner;
|
|
7
9
|
this.diManager = diManager;
|
|
10
|
+
this.commandLineExecutionContext = commandLineExecutionContext;
|
|
8
11
|
}
|
|
9
12
|
async run(type, status, config) {
|
|
13
|
+
var _a, _b;
|
|
10
14
|
const di = this.diManager.getChildDi(config);
|
|
15
|
+
const executionContext = this.commandLineExecutionContext();
|
|
11
16
|
if (!di) {
|
|
12
17
|
return;
|
|
13
18
|
}
|
|
19
|
+
// Root App command line can be aborted before Child App command line run,
|
|
20
|
+
// for example in case of sync `RedirectFoundError` in page action (`resolvePageDeps` command),
|
|
21
|
+
// we need to prevent Child Apps preloading (also on `resolvePageDeps` command)
|
|
22
|
+
if (((_a = executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) ||
|
|
23
|
+
(typeof window === 'undefined' && !executionContext)) {
|
|
24
|
+
this.log.error({
|
|
25
|
+
event: 'host-exection-context-aborted',
|
|
26
|
+
message: `Child App command line run was prevented from executing because ${((_b = executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal) === null || _b === void 0 ? void 0 : _b.aborted)
|
|
27
|
+
? 'host command line was aborted'
|
|
28
|
+
: 'execution context is already destroyed'}`,
|
|
29
|
+
reason: executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal.reason,
|
|
30
|
+
type,
|
|
31
|
+
status,
|
|
32
|
+
childApp: { name: config.name, version: config.version, tag: config.tag },
|
|
33
|
+
});
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
14
36
|
try {
|
|
15
37
|
const commandLineRunner = di.get({ token: COMMAND_LINE_RUNNER_TOKEN, optional: true });
|
|
16
38
|
if (commandLineRunner && commandLineRunner !== this.rootCommandLineRunner) {
|
|
@@ -18,12 +40,21 @@ class CommandLineRunner {
|
|
|
18
40
|
// for now just reuse metrics implementation from root as otherwise it fails after attempt to create metrics instance with the same name
|
|
19
41
|
// @ts-ignore
|
|
20
42
|
commandLineRunner.metricsInstance = this.rootCommandLineRunner.metricsInstance;
|
|
43
|
+
// provide current Root App execution context as Child App root execution context
|
|
44
|
+
if (executionContext) {
|
|
45
|
+
di.register(provide({
|
|
46
|
+
provide: ROOT_EXECUTION_CONTEXT_TOKEN,
|
|
47
|
+
useValue: executionContext,
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
21
50
|
await commandLineRunner.run(type, status, [], di);
|
|
22
51
|
}
|
|
23
52
|
}
|
|
24
53
|
catch (error) {
|
|
25
54
|
if (error.code !== 'E_STUB') {
|
|
26
|
-
this.log
|
|
55
|
+
this.log[
|
|
56
|
+
// for example, we don't need to log Child App run as failed in case of RedirectFoundError
|
|
57
|
+
isSilentError(error) || (error.reason && isSilentError(error.reason)) ? 'debug' : 'error']({
|
|
27
58
|
event: 'run-failed',
|
|
28
59
|
error,
|
|
29
60
|
type,
|
package/lib/shared/command.js
CHANGED
|
@@ -2,19 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var errors = require('@tinkoff/errors');
|
|
5
6
|
var core = require('@tramvai/core');
|
|
7
|
+
var tokensCommon = require('@tramvai/tokens-common');
|
|
6
8
|
|
|
7
9
|
class CommandLineRunner {
|
|
8
|
-
constructor({ logger, rootCommandLineRunner, diManager, }) {
|
|
10
|
+
constructor({ logger, rootCommandLineRunner, diManager, commandLineExecutionContext, }) {
|
|
9
11
|
this.log = logger('child-app:command-line-runner');
|
|
10
12
|
this.rootCommandLineRunner = rootCommandLineRunner;
|
|
11
13
|
this.diManager = diManager;
|
|
14
|
+
this.commandLineExecutionContext = commandLineExecutionContext;
|
|
12
15
|
}
|
|
13
16
|
async run(type, status, config) {
|
|
17
|
+
var _a, _b;
|
|
14
18
|
const di = this.diManager.getChildDi(config);
|
|
19
|
+
const executionContext = this.commandLineExecutionContext();
|
|
15
20
|
if (!di) {
|
|
16
21
|
return;
|
|
17
22
|
}
|
|
23
|
+
// Root App command line can be aborted before Child App command line run,
|
|
24
|
+
// for example in case of sync `RedirectFoundError` in page action (`resolvePageDeps` command),
|
|
25
|
+
// we need to prevent Child Apps preloading (also on `resolvePageDeps` command)
|
|
26
|
+
if (((_a = executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) ||
|
|
27
|
+
(typeof window === 'undefined' && !executionContext)) {
|
|
28
|
+
this.log.error({
|
|
29
|
+
event: 'host-exection-context-aborted',
|
|
30
|
+
message: `Child App command line run was prevented from executing because ${((_b = executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal) === null || _b === void 0 ? void 0 : _b.aborted)
|
|
31
|
+
? 'host command line was aborted'
|
|
32
|
+
: 'execution context is already destroyed'}`,
|
|
33
|
+
reason: executionContext === null || executionContext === void 0 ? void 0 : executionContext.abortSignal.reason,
|
|
34
|
+
type,
|
|
35
|
+
status,
|
|
36
|
+
childApp: { name: config.name, version: config.version, tag: config.tag },
|
|
37
|
+
});
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
18
40
|
try {
|
|
19
41
|
const commandLineRunner = di.get({ token: core.COMMAND_LINE_RUNNER_TOKEN, optional: true });
|
|
20
42
|
if (commandLineRunner && commandLineRunner !== this.rootCommandLineRunner) {
|
|
@@ -22,12 +44,21 @@ class CommandLineRunner {
|
|
|
22
44
|
// for now just reuse metrics implementation from root as otherwise it fails after attempt to create metrics instance with the same name
|
|
23
45
|
// @ts-ignore
|
|
24
46
|
commandLineRunner.metricsInstance = this.rootCommandLineRunner.metricsInstance;
|
|
47
|
+
// provide current Root App execution context as Child App root execution context
|
|
48
|
+
if (executionContext) {
|
|
49
|
+
di.register(core.provide({
|
|
50
|
+
provide: tokensCommon.ROOT_EXECUTION_CONTEXT_TOKEN,
|
|
51
|
+
useValue: executionContext,
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
25
54
|
await commandLineRunner.run(type, status, [], di);
|
|
26
55
|
}
|
|
27
56
|
}
|
|
28
57
|
catch (error) {
|
|
29
58
|
if (error.code !== 'E_STUB') {
|
|
30
|
-
this.log
|
|
59
|
+
this.log[
|
|
60
|
+
// for example, we don't need to log Child App run as failed in case of RedirectFoundError
|
|
61
|
+
errors.isSilentError(error) || (error.reason && errors.isSilentError(error.reason)) ? 'debug' : 'error']({
|
|
31
62
|
event: 'run-failed',
|
|
32
63
|
error,
|
|
33
64
|
type,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Scope, DI_TOKEN, optional } from '@tinkoff/dippy';
|
|
2
2
|
import { provide, commandLineListTokens, COMMAND_LINE_RUNNER_TOKEN } from '@tramvai/core';
|
|
3
3
|
import { CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN, CHILD_APP_RESOLUTION_CONFIGS_TOKEN, CHILD_APP_RESOLVE_CONFIG_TOKEN, CHILD_APP_RESOLVE_BASE_URL_TOKEN, CHILD_APP_SINGLETON_DI_MANAGER_TOKEN, CHILD_APP_LOADER_TOKEN, CHILD_APP_ROOT_DI_ACCESS_MODE_TOKEN, CHILD_APP_CONTRACT_MANAGER, CHILD_APP_DI_MANAGER_TOKEN, CHILD_APP_COMMAND_LINE_RUNNER_TOKEN, CHILD_APP_PRELOAD_MANAGER_TOKEN, CHILD_APP_RENDER_MANAGER_TOKEN, HOST_PROVIDED_CONTRACTS, CHILD_APP_ERROR_BOUNDARY_TOKEN } from '@tramvai/tokens-child-app';
|
|
4
|
-
import { COMBINE_REDUCERS, LOGGER_TOKEN, ENV_MANAGER_TOKEN, REGISTER_CLEAR_CACHE_TOKEN, CLEAR_CACHE_TOKEN, ENV_USED_TOKEN, COMPONENT_REGISTRY_TOKEN, LIMIT_ACTION_GLOBAL_TIME_RUN, ACTION_CONDITIONALS } from '@tramvai/tokens-common';
|
|
4
|
+
import { COMBINE_REDUCERS, LOGGER_TOKEN, ENV_MANAGER_TOKEN, COMMAND_LINE_EXECUTION_CONTEXT_TOKEN, REGISTER_CLEAR_CACHE_TOKEN, CLEAR_CACHE_TOKEN, ENV_USED_TOKEN, COMPONENT_REGISTRY_TOKEN, LIMIT_ACTION_GLOBAL_TIME_RUN, ACTION_CONDITIONALS } from '@tramvai/tokens-common';
|
|
5
5
|
import { EXTEND_RENDER } from '@tramvai/tokens-render';
|
|
6
6
|
import { ROUTER_TOKEN, PAGE_SERVICE_TOKEN, LINK_PREFETCH_MANAGER_TOKEN, ROUTER_SPA_ACTIONS_RUN_MODE_TOKEN } from '@tramvai/tokens-router';
|
|
7
7
|
import { SingletonDiManager } from './singletonDi.browser.js';
|
|
@@ -140,6 +140,7 @@ const sharedProviders = [
|
|
|
140
140
|
logger: LOGGER_TOKEN,
|
|
141
141
|
rootCommandLineRunner: COMMAND_LINE_RUNNER_TOKEN,
|
|
142
142
|
diManager: CHILD_APP_DI_MANAGER_TOKEN,
|
|
143
|
+
commandLineExecutionContext: COMMAND_LINE_EXECUTION_CONTEXT_TOKEN,
|
|
143
144
|
},
|
|
144
145
|
}),
|
|
145
146
|
provide({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Scope, DI_TOKEN, optional } from '@tinkoff/dippy';
|
|
2
2
|
import { provide, commandLineListTokens, COMMAND_LINE_RUNNER_TOKEN } from '@tramvai/core';
|
|
3
3
|
import { CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN, CHILD_APP_RESOLUTION_CONFIGS_TOKEN, CHILD_APP_RESOLVE_CONFIG_TOKEN, CHILD_APP_RESOLVE_BASE_URL_TOKEN, CHILD_APP_SINGLETON_DI_MANAGER_TOKEN, CHILD_APP_LOADER_TOKEN, CHILD_APP_ROOT_DI_ACCESS_MODE_TOKEN, CHILD_APP_CONTRACT_MANAGER, CHILD_APP_DI_MANAGER_TOKEN, CHILD_APP_COMMAND_LINE_RUNNER_TOKEN, CHILD_APP_PRELOAD_MANAGER_TOKEN, CHILD_APP_RENDER_MANAGER_TOKEN, HOST_PROVIDED_CONTRACTS, CHILD_APP_ERROR_BOUNDARY_TOKEN } from '@tramvai/tokens-child-app';
|
|
4
|
-
import { COMBINE_REDUCERS, LOGGER_TOKEN, ENV_MANAGER_TOKEN, REGISTER_CLEAR_CACHE_TOKEN, CLEAR_CACHE_TOKEN, ENV_USED_TOKEN, COMPONENT_REGISTRY_TOKEN, LIMIT_ACTION_GLOBAL_TIME_RUN, ACTION_CONDITIONALS } from '@tramvai/tokens-common';
|
|
4
|
+
import { COMBINE_REDUCERS, LOGGER_TOKEN, ENV_MANAGER_TOKEN, COMMAND_LINE_EXECUTION_CONTEXT_TOKEN, REGISTER_CLEAR_CACHE_TOKEN, CLEAR_CACHE_TOKEN, ENV_USED_TOKEN, COMPONENT_REGISTRY_TOKEN, LIMIT_ACTION_GLOBAL_TIME_RUN, ACTION_CONDITIONALS } from '@tramvai/tokens-common';
|
|
5
5
|
import { EXTEND_RENDER } from '@tramvai/tokens-render';
|
|
6
6
|
import { ROUTER_TOKEN, PAGE_SERVICE_TOKEN, LINK_PREFETCH_MANAGER_TOKEN, ROUTER_SPA_ACTIONS_RUN_MODE_TOKEN } from '@tramvai/tokens-router';
|
|
7
7
|
import { SingletonDiManager } from './singletonDi.es.js';
|
|
@@ -140,6 +140,7 @@ const sharedProviders = [
|
|
|
140
140
|
logger: LOGGER_TOKEN,
|
|
141
141
|
rootCommandLineRunner: COMMAND_LINE_RUNNER_TOKEN,
|
|
142
142
|
diManager: CHILD_APP_DI_MANAGER_TOKEN,
|
|
143
|
+
commandLineExecutionContext: COMMAND_LINE_EXECUTION_CONTEXT_TOKEN,
|
|
143
144
|
},
|
|
144
145
|
}),
|
|
145
146
|
provide({
|
package/lib/shared/providers.js
CHANGED
|
@@ -144,6 +144,7 @@ const sharedProviders = [
|
|
|
144
144
|
logger: tokensCommon.LOGGER_TOKEN,
|
|
145
145
|
rootCommandLineRunner: core.COMMAND_LINE_RUNNER_TOKEN,
|
|
146
146
|
diManager: tokensChildApp.CHILD_APP_DI_MANAGER_TOKEN,
|
|
147
|
+
commandLineExecutionContext: tokensCommon.COMMAND_LINE_EXECUTION_CONTEXT_TOKEN,
|
|
147
148
|
},
|
|
148
149
|
}),
|
|
149
150
|
core.provide({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-child-app",
|
|
3
|
-
"version": "4.41.
|
|
3
|
+
"version": "4.41.48",
|
|
4
4
|
"description": "Module for child apps",
|
|
5
5
|
"browser": {
|
|
6
6
|
"./lib/server.js": "./lib/browser.js",
|
|
@@ -33,23 +33,24 @@
|
|
|
33
33
|
"@tinkoff/env-validators": "0.3.3",
|
|
34
34
|
"@tinkoff/module-loader-client": "0.6.6",
|
|
35
35
|
"@tinkoff/module-loader-server": "0.7.6",
|
|
36
|
-
"@tramvai/module-common": "4.41.
|
|
36
|
+
"@tramvai/module-common": "4.41.48",
|
|
37
37
|
"@tinkoff/url": "0.10.3",
|
|
38
|
-
"@
|
|
38
|
+
"@tinkoff/errors": "0.5.3",
|
|
39
|
+
"@tramvai/child-app-core": "4.41.48",
|
|
39
40
|
"@tramvai/safe-strings": "0.7.9",
|
|
40
|
-
"@tramvai/tokens-child-app": "4.41.
|
|
41
|
+
"@tramvai/tokens-child-app": "4.41.48"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {},
|
|
43
44
|
"peerDependencies": {
|
|
44
45
|
"@tinkoff/dippy": "0.10.11",
|
|
45
|
-
"@tinkoff/router": "0.4.
|
|
46
|
+
"@tinkoff/router": "0.4.183",
|
|
46
47
|
"@tinkoff/utils": "^2.1.2",
|
|
47
|
-
"@tramvai/core": "4.41.
|
|
48
|
-
"@tramvai/state": "4.41.
|
|
49
|
-
"@tramvai/react": "4.41.
|
|
50
|
-
"@tramvai/tokens-common": "4.41.
|
|
51
|
-
"@tramvai/tokens-render": "4.41.
|
|
52
|
-
"@tramvai/tokens-router": "4.41.
|
|
48
|
+
"@tramvai/core": "4.41.48",
|
|
49
|
+
"@tramvai/state": "4.41.48",
|
|
50
|
+
"@tramvai/react": "4.41.48",
|
|
51
|
+
"@tramvai/tokens-common": "4.41.48",
|
|
52
|
+
"@tramvai/tokens-render": "4.41.48",
|
|
53
|
+
"@tramvai/tokens-router": "4.41.48",
|
|
53
54
|
"react": ">=16.14.0",
|
|
54
55
|
"react-dom": ">=16.14.0",
|
|
55
56
|
"object-assign": "^4.1.1",
|