@tramvai/test-integration 2.48.0 → 2.49.0
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 +9 -1
- package/lib/index.js +10 -1
- package/package.json +3 -5
package/lib/index.es.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import mergeDeep from '@tinkoff/utils/object/mergeDeep';
|
|
1
2
|
import { Writable } from 'stream';
|
|
2
3
|
import { start } from '@tramvai/cli';
|
|
3
4
|
import waitOn from 'wait-on';
|
|
@@ -79,7 +80,12 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
79
80
|
noServerRebuild: !enableRebuild,
|
|
80
81
|
...(typeof targetOrConfig === 'string'
|
|
81
82
|
? { target: targetOrConfig }
|
|
82
|
-
: {
|
|
83
|
+
: {
|
|
84
|
+
config: mergeDeep({
|
|
85
|
+
// disable hot-refresh that may break checks for full page load because of never-ending request
|
|
86
|
+
commands: { serve: { configurations: { hotRefresh: false } } },
|
|
87
|
+
}, targetOrConfig),
|
|
88
|
+
}),
|
|
83
89
|
env: {
|
|
84
90
|
...env,
|
|
85
91
|
MOCKER_ENABLED: 'true',
|
|
@@ -90,6 +96,8 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
90
96
|
});
|
|
91
97
|
const serverUrl = getServerUrl(cliResult);
|
|
92
98
|
const staticUrl = getStaticUrl(cliResult);
|
|
99
|
+
// @FIXME: the utility port might be defined on the provider level and we don't have access to it
|
|
100
|
+
// in this case. So the value might be inconsistent with actual utility server (actually, already inconsistent for tincoin)
|
|
93
101
|
const utilityServerUrl = getUtilityServerUrl(env, cliResult);
|
|
94
102
|
const appName = typeof targetOrConfig === 'string' ? targetOrConfig : targetOrConfig.name;
|
|
95
103
|
try {
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var mergeDeep = require('@tinkoff/utils/object/mergeDeep');
|
|
5
6
|
var stream = require('stream');
|
|
6
7
|
var cli = require('@tramvai/cli');
|
|
7
8
|
var waitOn = require('wait-on');
|
|
@@ -9,6 +10,7 @@ var testHelpers = require('@tramvai/test-helpers');
|
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
12
|
|
|
13
|
+
var mergeDeep__default = /*#__PURE__*/_interopDefaultLegacy(mergeDeep);
|
|
12
14
|
var waitOn__default = /*#__PURE__*/_interopDefaultLegacy(waitOn);
|
|
13
15
|
|
|
14
16
|
const getServerUrl = ({ server }) => {
|
|
@@ -87,7 +89,12 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
87
89
|
noServerRebuild: !enableRebuild,
|
|
88
90
|
...(typeof targetOrConfig === 'string'
|
|
89
91
|
? { target: targetOrConfig }
|
|
90
|
-
: {
|
|
92
|
+
: {
|
|
93
|
+
config: mergeDeep__default["default"]({
|
|
94
|
+
// disable hot-refresh that may break checks for full page load because of never-ending request
|
|
95
|
+
commands: { serve: { configurations: { hotRefresh: false } } },
|
|
96
|
+
}, targetOrConfig),
|
|
97
|
+
}),
|
|
91
98
|
env: {
|
|
92
99
|
...env,
|
|
93
100
|
MOCKER_ENABLED: 'true',
|
|
@@ -98,6 +105,8 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
98
105
|
});
|
|
99
106
|
const serverUrl = getServerUrl(cliResult);
|
|
100
107
|
const staticUrl = getStaticUrl(cliResult);
|
|
108
|
+
// @FIXME: the utility port might be defined on the provider level and we don't have access to it
|
|
109
|
+
// in this case. So the value might be inconsistent with actual utility server (actually, already inconsistent for tincoin)
|
|
101
110
|
const utilityServerUrl = getUtilityServerUrl(env, cliResult);
|
|
102
111
|
const appName = typeof targetOrConfig === 'string' ? targetOrConfig : targetOrConfig.name;
|
|
103
112
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-integration",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.49.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -22,15 +22,13 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@tinkoff/mocker": "2.1.2",
|
|
25
|
-
"@tramvai/test-helpers": "2.
|
|
26
|
-
"@types/supertest": "^2.0.11",
|
|
27
|
-
"supertest": "^6.1.3",
|
|
25
|
+
"@tramvai/test-helpers": "2.49.0",
|
|
28
26
|
"utility-types": "^3.10.0",
|
|
29
27
|
"wait-on": "^5.3.0"
|
|
30
28
|
},
|
|
31
29
|
"peerDependencies": {
|
|
32
30
|
"@tinkoff/utils": "^2.1.2",
|
|
33
|
-
"@tramvai/cli": "2.
|
|
31
|
+
"@tramvai/cli": "2.49.0",
|
|
34
32
|
"tslib": "^2.4.0"
|
|
35
33
|
},
|
|
36
34
|
"license": "Apache-2.0",
|