@tramvai/test-integration 5.9.2 → 5.14.9

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.
@@ -5,7 +5,6 @@ import { build } from '@tramvai/cli';
5
5
 
6
6
  const ciInfo = envCi();
7
7
  const buildCli = async (targetOrConfig, { env, logger = console, ...cliOptions } = {}) => {
8
- var _a;
9
8
  const stdout = new Writable({
10
9
  write(chunk, encoding, callback) {
11
10
  logger.log(`[@tramvai/cli] log:`, chunk.toString());
@@ -25,7 +24,7 @@ const buildCli = async (targetOrConfig, { env, logger = console, ...cliOptions }
25
24
  // and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
26
25
  fileCache: !ciInfo.isCi,
27
26
  // faster builds with debug flag, sm still will be disabled by default
28
- sourceMap: (_a = cliOptions.sourceMap) !== null && _a !== void 0 ? _a : false,
27
+ sourceMap: cliOptions.sourceMap ?? false,
29
28
  ...(typeof targetOrConfig === 'string'
30
29
  ? { target: targetOrConfig }
31
30
  : {
@@ -14,7 +14,6 @@ var envCi__default = /*#__PURE__*/_interopDefaultLegacy(envCi);
14
14
 
15
15
  const ciInfo = envCi__default["default"]();
16
16
  const buildCli = async (targetOrConfig, { env, logger = console, ...cliOptions } = {}) => {
17
- var _a;
18
17
  const stdout = new stream.Writable({
19
18
  write(chunk, encoding, callback) {
20
19
  logger.log(`[@tramvai/cli] log:`, chunk.toString());
@@ -34,7 +33,7 @@ const buildCli = async (targetOrConfig, { env, logger = console, ...cliOptions }
34
33
  // and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
35
34
  fileCache: !ciInfo.isCi,
36
35
  // faster builds with debug flag, sm still will be disabled by default
37
- sourceMap: (_a = cliOptions.sourceMap) !== null && _a !== void 0 ? _a : false,
36
+ sourceMap: cliOptions.sourceMap ?? false,
38
37
  ...(typeof targetOrConfig === 'string'
39
38
  ? { target: targetOrConfig }
40
39
  : {
@@ -15,7 +15,6 @@ if (typeof setDefaultResultOrder === 'function') {
15
15
  }
16
16
  const ciInfo = envCi();
17
17
  const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = console, ...cliOptions } = {}) => {
18
- var _a;
19
18
  const stdout = new Writable({
20
19
  write(chunk, encoding, callback) {
21
20
  logger.log(`[@tramvai/cli] log:`, chunk.toString());
@@ -37,7 +36,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
37
36
  // and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
38
37
  fileCache: !ciInfo.isCi,
39
38
  // faster builds with debug flag, sm still will be disabled by default
40
- sourceMap: (_a = cliOptions.sourceMap) !== null && _a !== void 0 ? _a : false,
39
+ sourceMap: cliOptions.sourceMap ?? false,
41
40
  ...(typeof targetOrConfig === 'string'
42
41
  ? { target: targetOrConfig }
43
42
  : {
@@ -24,7 +24,6 @@ if (typeof dns.setDefaultResultOrder === 'function') {
24
24
  }
25
25
  const ciInfo = envCi__default["default"]();
26
26
  const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = console, ...cliOptions } = {}) => {
27
- var _a;
28
27
  const stdout = new stream.Writable({
29
28
  write(chunk, encoding, callback) {
30
29
  logger.log(`[@tramvai/cli] log:`, chunk.toString());
@@ -46,7 +45,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
46
45
  // and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
47
46
  fileCache: !ciInfo.isCi,
48
47
  // faster builds with debug flag, sm still will be disabled by default
49
- sourceMap: (_a = cliOptions.sourceMap) !== null && _a !== void 0 ? _a : false,
48
+ sourceMap: cliOptions.sourceMap ?? false,
50
49
  ...(typeof targetOrConfig === 'string'
51
50
  ? { target: targetOrConfig }
52
51
  : {
@@ -6,20 +6,20 @@ const extractHttpProtocolFromServerInstance = (server) => {
6
6
  return 'http';
7
7
  };
8
8
  const getServerUrl = ({ server }) => {
9
- const { port } = server === null || server === void 0 ? void 0 : server.address();
9
+ const { port } = server?.address();
10
10
  return `${extractHttpProtocolFromServerInstance(server)}://localhost:${port}`;
11
11
  };
12
12
  const getServerDomain = ({ server }) => {
13
- const { port } = server === null || server === void 0 ? void 0 : server.address();
13
+ const { port } = server?.address();
14
14
  return `localhost:${port}`;
15
15
  };
16
16
  const getStaticUrl = ({ staticServer }) => {
17
- const { port } = staticServer === null || staticServer === void 0 ? void 0 : staticServer.address();
17
+ const { port } = staticServer?.address();
18
18
  return `${extractHttpProtocolFromServerInstance(staticServer)}://localhost:${port}`;
19
19
  };
20
20
  const getUtilityServerUrl = (env, { server }) => {
21
- const { port } = server === null || server === void 0 ? void 0 : server.address();
22
- return `${extractHttpProtocolFromServerInstance(server)}://localhost:${(env === null || env === void 0 ? void 0 : env.UTILITY_SERVER_PORT) || port}`;
21
+ const { port } = server?.address();
22
+ return `${extractHttpProtocolFromServerInstance(server)}://localhost:${env?.UTILITY_SERVER_PORT || port}`;
23
23
  };
24
24
 
25
25
  export { getServerDomain, getServerUrl, getStaticUrl, getUtilityServerUrl };
package/lib/app/utils.js CHANGED
@@ -10,20 +10,20 @@ const extractHttpProtocolFromServerInstance = (server) => {
10
10
  return 'http';
11
11
  };
12
12
  const getServerUrl = ({ server }) => {
13
- const { port } = server === null || server === void 0 ? void 0 : server.address();
13
+ const { port } = server?.address();
14
14
  return `${extractHttpProtocolFromServerInstance(server)}://localhost:${port}`;
15
15
  };
16
16
  const getServerDomain = ({ server }) => {
17
- const { port } = server === null || server === void 0 ? void 0 : server.address();
17
+ const { port } = server?.address();
18
18
  return `localhost:${port}`;
19
19
  };
20
20
  const getStaticUrl = ({ staticServer }) => {
21
- const { port } = staticServer === null || staticServer === void 0 ? void 0 : staticServer.address();
21
+ const { port } = staticServer?.address();
22
22
  return `${extractHttpProtocolFromServerInstance(staticServer)}://localhost:${port}`;
23
23
  };
24
24
  const getUtilityServerUrl = (env, { server }) => {
25
- const { port } = server === null || server === void 0 ? void 0 : server.address();
26
- return `${extractHttpProtocolFromServerInstance(server)}://localhost:${(env === null || env === void 0 ? void 0 : env.UTILITY_SERVER_PORT) || port}`;
25
+ const { port } = server?.address();
26
+ return `${extractHttpProtocolFromServerInstance(server)}://localhost:${env?.UTILITY_SERVER_PORT || port}`;
27
27
  };
28
28
 
29
29
  exports.getServerDomain = getServerDomain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-integration",
3
- "version": "5.9.2",
3
+ "version": "5.14.9",
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": "5.0.3",
24
- "@tramvai/test-helpers": "5.9.2",
24
+ "@tramvai/test-helpers": "5.14.9",
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": "5.9.2",
31
+ "@tramvai/cli": "5.14.9",
32
32
  "tslib": "^2.4.0"
33
33
  },
34
34
  "license": "Apache-2.0",