@tramvai/test-mocks 2.6.2 → 2.10.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.
- package/lib/index.es.js +7 -2
- package/lib/index.js +5 -0
- package/package.json +7 -7
package/lib/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { STORE_TOKEN, ACTION_EXECUTION_TOKEN, ACTION_CONDITIONALS, CONTEXT_TOKEN } from '@tramvai/tokens-common';
|
|
2
|
-
import { alwaysCondition, onlyServer, onlyBrowser, pageServer, pageBrowser, ActionExecution, createConsumerContext } from '@tramvai/module-common';
|
|
1
|
+
import { STORE_TOKEN, ACTION_EXECUTION_TOKEN, ACTION_CONDITIONALS, EXECUTION_CONTEXT_MANAGER_TOKEN, CONTEXT_TOKEN } from '@tramvai/tokens-common';
|
|
2
|
+
import { alwaysCondition, onlyServer, onlyBrowser, pageServer, pageBrowser, ExecutionContextManager, ActionExecution, createConsumerContext } from '@tramvai/module-common';
|
|
3
3
|
import { PubSub } from '@tinkoff/pubsub';
|
|
4
4
|
import { createContainer, DI_TOKEN } from '@tinkoff/dippy';
|
|
5
5
|
import keys from '@tinkoff/utils/object/keys';
|
|
@@ -83,6 +83,10 @@ const createMockContext = ({ stores, initialState, store = createMockStore({ sto
|
|
|
83
83
|
useValue: [alwaysCondition, onlyServer, onlyBrowser, pageServer, pageBrowser],
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
+
di.register({
|
|
87
|
+
provide: EXECUTION_CONTEXT_MANAGER_TOKEN,
|
|
88
|
+
useClass: ExecutionContextManager,
|
|
89
|
+
});
|
|
86
90
|
di.register({
|
|
87
91
|
provide: ACTION_EXECUTION_TOKEN,
|
|
88
92
|
useClass: ActionExecution,
|
|
@@ -95,6 +99,7 @@ const createMockContext = ({ stores, initialState, store = createMockStore({ sto
|
|
|
95
99
|
token: 'actionTransformAction',
|
|
96
100
|
optional: true,
|
|
97
101
|
},
|
|
102
|
+
executionContextManager: EXECUTION_CONTEXT_MANAGER_TOKEN,
|
|
98
103
|
},
|
|
99
104
|
});
|
|
100
105
|
}
|
package/lib/index.js
CHANGED
|
@@ -93,6 +93,10 @@ const createMockContext = ({ stores, initialState, store = createMockStore({ sto
|
|
|
93
93
|
useValue: [moduleCommon.alwaysCondition, moduleCommon.onlyServer, moduleCommon.onlyBrowser, moduleCommon.pageServer, moduleCommon.pageBrowser],
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
+
di.register({
|
|
97
|
+
provide: tokensCommon.EXECUTION_CONTEXT_MANAGER_TOKEN,
|
|
98
|
+
useClass: moduleCommon.ExecutionContextManager,
|
|
99
|
+
});
|
|
96
100
|
di.register({
|
|
97
101
|
provide: tokensCommon.ACTION_EXECUTION_TOKEN,
|
|
98
102
|
useClass: moduleCommon.ActionExecution,
|
|
@@ -105,6 +109,7 @@ const createMockContext = ({ stores, initialState, store = createMockStore({ sto
|
|
|
105
109
|
token: 'actionTransformAction',
|
|
106
110
|
optional: true,
|
|
107
111
|
},
|
|
112
|
+
executionContextManager: tokensCommon.EXECUTION_CONTEXT_MANAGER_TOKEN,
|
|
108
113
|
},
|
|
109
114
|
});
|
|
110
115
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-mocks",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"build-for-publish": "true"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tramvai/core": "2.
|
|
21
|
+
"@tramvai/core": "2.10.2",
|
|
22
22
|
"@tinkoff/pubsub": "0.4.25",
|
|
23
23
|
"@tinkoff/router": "0.2.0",
|
|
24
24
|
"@tinkoff/url": "0.7.39",
|
|
25
|
-
"@tramvai/module-cookie": "2.
|
|
26
|
-
"@tramvai/module-common": "2.
|
|
27
|
-
"@tramvai/state": "2.
|
|
28
|
-
"@tramvai/tokens-common": "2.
|
|
25
|
+
"@tramvai/module-cookie": "2.10.2",
|
|
26
|
+
"@tramvai/module-common": "2.10.2",
|
|
27
|
+
"@tramvai/state": "2.10.2",
|
|
28
|
+
"@tramvai/tokens-common": "2.10.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@tinkoff/dippy": "0.7.
|
|
31
|
+
"@tinkoff/dippy": "0.7.45",
|
|
32
32
|
"@tinkoff/utils": "^2.1.2",
|
|
33
33
|
"tslib": "^2.0.3"
|
|
34
34
|
},
|