@tramvai/test-integration 2.145.1 → 2.146.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.
- package/lib/app/startCli.es.js +13 -1
- package/lib/app/startCli.js +13 -1
- package/package.json +3 -3
package/lib/app/startCli.es.js
CHANGED
|
@@ -11,6 +11,7 @@ import { wrapMocker } from './mocker.es.js';
|
|
|
11
11
|
|
|
12
12
|
const ciInfo = envCi();
|
|
13
13
|
const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = console, ...cliOptions } = {}) => {
|
|
14
|
+
var _a;
|
|
14
15
|
const stdout = new Writable({
|
|
15
16
|
write(chunk, encoding, callback) {
|
|
16
17
|
logger.log(`[@tramvai/cli] log:`, chunk.toString());
|
|
@@ -31,12 +32,22 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
31
32
|
// build cache made tests unstable in CI, because of cache writing process are async,
|
|
32
33
|
// and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
|
|
33
34
|
fileCache: !ciInfo.isCi,
|
|
35
|
+
// faster builds with debug flag, sm still will be disabled by default
|
|
36
|
+
sourceMap: (_a = cliOptions.sourceMap) !== null && _a !== void 0 ? _a : false,
|
|
34
37
|
...(typeof targetOrConfig === 'string'
|
|
35
38
|
? { target: targetOrConfig }
|
|
36
39
|
: {
|
|
37
40
|
config: mergeDeep({
|
|
38
41
|
// disable hot-refresh that may break checks for full page load because of never-ending request
|
|
39
42
|
hotRefresh: { enabled: false },
|
|
43
|
+
// faster builds
|
|
44
|
+
sourceMap: false,
|
|
45
|
+
// faster builds
|
|
46
|
+
experiments: {
|
|
47
|
+
transpilation: {
|
|
48
|
+
loader: 'swc',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
40
51
|
}, targetOrConfig),
|
|
41
52
|
}),
|
|
42
53
|
env: {
|
|
@@ -56,6 +67,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
56
67
|
try {
|
|
57
68
|
await waitOn({
|
|
58
69
|
resources: [`${utilityServerUrl}/readyz`],
|
|
70
|
+
timeout: 2 * 60 * 1000,
|
|
59
71
|
});
|
|
60
72
|
}
|
|
61
73
|
catch (e) {
|
|
@@ -70,7 +82,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
70
82
|
// eslint-disable-next-line no-template-curly-in-string
|
|
71
83
|
[staticUrl]: '${STATIC_URL}',
|
|
72
84
|
// for server error stacktraces
|
|
73
|
-
'
|
|
85
|
+
'/([a-zA-Z0-9_.-]+?)(?:\\.es)?.((?:js|ts)x?)\\??:\\d+:\\d+': '/$1.$2?:[LINE]:[SYMBOL]',
|
|
74
86
|
},
|
|
75
87
|
});
|
|
76
88
|
const papi = wrapPapi({
|
package/lib/app/startCli.js
CHANGED
|
@@ -20,6 +20,7 @@ var waitOn__default = /*#__PURE__*/_interopDefaultLegacy(waitOn);
|
|
|
20
20
|
|
|
21
21
|
const ciInfo = envCi__default["default"]();
|
|
22
22
|
const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = console, ...cliOptions } = {}) => {
|
|
23
|
+
var _a;
|
|
23
24
|
const stdout = new stream.Writable({
|
|
24
25
|
write(chunk, encoding, callback) {
|
|
25
26
|
logger.log(`[@tramvai/cli] log:`, chunk.toString());
|
|
@@ -40,12 +41,22 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
40
41
|
// build cache made tests unstable in CI, because of cache writing process are async,
|
|
41
42
|
// and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
|
|
42
43
|
fileCache: !ciInfo.isCi,
|
|
44
|
+
// faster builds with debug flag, sm still will be disabled by default
|
|
45
|
+
sourceMap: (_a = cliOptions.sourceMap) !== null && _a !== void 0 ? _a : false,
|
|
43
46
|
...(typeof targetOrConfig === 'string'
|
|
44
47
|
? { target: targetOrConfig }
|
|
45
48
|
: {
|
|
46
49
|
config: mergeDeep__default["default"]({
|
|
47
50
|
// disable hot-refresh that may break checks for full page load because of never-ending request
|
|
48
51
|
hotRefresh: { enabled: false },
|
|
52
|
+
// faster builds
|
|
53
|
+
sourceMap: false,
|
|
54
|
+
// faster builds
|
|
55
|
+
experiments: {
|
|
56
|
+
transpilation: {
|
|
57
|
+
loader: 'swc',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
49
60
|
}, targetOrConfig),
|
|
50
61
|
}),
|
|
51
62
|
env: {
|
|
@@ -65,6 +76,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
65
76
|
try {
|
|
66
77
|
await waitOn__default["default"]({
|
|
67
78
|
resources: [`${utilityServerUrl}/readyz`],
|
|
79
|
+
timeout: 2 * 60 * 1000,
|
|
68
80
|
});
|
|
69
81
|
}
|
|
70
82
|
catch (e) {
|
|
@@ -79,7 +91,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
79
91
|
// eslint-disable-next-line no-template-curly-in-string
|
|
80
92
|
[staticUrl]: '${STATIC_URL}',
|
|
81
93
|
// for server error stacktraces
|
|
82
|
-
'
|
|
94
|
+
'/([a-zA-Z0-9_.-]+?)(?:\\.es)?.((?:js|ts)x?)\\??:\\d+:\\d+': '/$1.$2?:[LINE]:[SYMBOL]',
|
|
83
95
|
},
|
|
84
96
|
});
|
|
85
97
|
const papi$1 = papi.wrapPapi({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-integration",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.146.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@tinkoff/mocker": "2.1.6",
|
|
24
|
-
"@tramvai/test-helpers": "2.
|
|
24
|
+
"@tramvai/test-helpers": "2.146.1",
|
|
25
25
|
"env-ci": "^5.0.2",
|
|
26
26
|
"utility-types": "^3.10.0",
|
|
27
27
|
"wait-on": "^5.3.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@tinkoff/utils": "^2.1.2",
|
|
31
|
-
"@tramvai/cli": "2.
|
|
31
|
+
"@tramvai/cli": "2.146.1",
|
|
32
32
|
"tslib": "^2.4.0"
|
|
33
33
|
},
|
|
34
34
|
"license": "Apache-2.0",
|