@tramvai/test-integration 5.49.1 → 6.59.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/app/papi.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ export declare const wrapPapi: ({ serverUrl, appName }: Options) => {
|
|
|
8
8
|
body?: Record<string, any> | undefined;
|
|
9
9
|
contentType?: "json" | "form" | undefined;
|
|
10
10
|
headers?: Record<string, string> | undefined;
|
|
11
|
-
} | undefined) =>
|
|
11
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
12
12
|
privatePapi: (path: string, { method, body, contentType, headers, }?: {
|
|
13
13
|
method?: "get" | "post" | "put" | "delete" | undefined;
|
|
14
14
|
body?: Record<string, any> | undefined;
|
|
15
15
|
contentType?: "json" | "form" | undefined;
|
|
16
16
|
headers?: Record<string, string> | undefined;
|
|
17
|
-
} | undefined) =>
|
|
18
|
-
clearCache: () =>
|
|
19
|
-
bundleInfo: () =>
|
|
20
|
-
apiList: () =>
|
|
17
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
18
|
+
clearCache: () => any;
|
|
19
|
+
bundleInfo: () => any;
|
|
20
|
+
apiList: () => any;
|
|
21
21
|
};
|
|
22
22
|
export {};
|
|
23
23
|
//# sourceMappingURL=papi.d.ts.map
|
package/lib/app/startCli.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface StartCliOptions extends Omit<StartOptions, 'config' | 'target'>
|
|
|
11
11
|
export declare const startCli: (targetOrConfig: StartOptions['target'] | StartOptions['config'], { enableRebuild, env, logger, ...cliOptions }?: StartCliOptions) => Promise<{
|
|
12
12
|
serverUrl: string;
|
|
13
13
|
staticUrl: string;
|
|
14
|
+
utilityUrl: string;
|
|
14
15
|
domain: string;
|
|
15
16
|
stdout: Writable;
|
|
16
17
|
stderr: Writable;
|
|
@@ -19,7 +20,7 @@ export declare const startCli: (targetOrConfig: StartOptions['target'] | StartOp
|
|
|
19
20
|
body?: Record<string, any> | undefined;
|
|
20
21
|
contentType?: "json" | "form" | undefined;
|
|
21
22
|
headers?: Record<string, string> | undefined;
|
|
22
|
-
} | undefined) =>
|
|
23
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
23
24
|
render: (path: string, { method, headers, parserOptions, }?: {
|
|
24
25
|
method?: "get" | "post" | "put" | undefined;
|
|
25
26
|
headers?: Record<string, string> | undefined;
|
|
@@ -37,16 +38,16 @@ export declare const startCli: (targetOrConfig: StartOptions['target'] | StartOp
|
|
|
37
38
|
body?: Record<string, any> | undefined;
|
|
38
39
|
contentType?: "json" | "form" | undefined;
|
|
39
40
|
headers?: Record<string, string> | undefined;
|
|
40
|
-
} | undefined) =>
|
|
41
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
41
42
|
privatePapi: (path: string, { method, body, contentType, headers, }?: {
|
|
42
43
|
method?: "get" | "post" | "put" | "delete" | undefined;
|
|
43
44
|
body?: Record<string, any> | undefined;
|
|
44
45
|
contentType?: "json" | "form" | undefined;
|
|
45
46
|
headers?: Record<string, string> | undefined;
|
|
46
|
-
} | undefined) =>
|
|
47
|
-
clearCache: () =>
|
|
48
|
-
bundleInfo: () =>
|
|
49
|
-
apiList: () =>
|
|
47
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
48
|
+
clearCache: () => any;
|
|
49
|
+
bundleInfo: () => any;
|
|
50
|
+
apiList: () => any;
|
|
50
51
|
};
|
|
51
52
|
mocker: {
|
|
52
53
|
addMocks(api: string, mocks: Record<string, import("@tinkoff/mocker").MockConfig>): Promise<any>;
|
package/lib/app/startCli.es.js
CHANGED
|
@@ -69,11 +69,11 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
69
69
|
const domain = getServerDomain(cliResult);
|
|
70
70
|
// @FIXME: the utility port might be defined on the provider level and we don't have access to it
|
|
71
71
|
// in this case. So the value might be inconsistent with actual utility server (actually, already inconsistent for tincoin)
|
|
72
|
-
const
|
|
72
|
+
const utilityUrl = getUtilityServerUrl(env, cliResult);
|
|
73
73
|
const appName = typeof targetOrConfig === 'string' ? targetOrConfig : targetOrConfig.name;
|
|
74
74
|
try {
|
|
75
75
|
await waitOn({
|
|
76
|
-
resources: [`${
|
|
76
|
+
resources: [`${utilityUrl}/readyz`],
|
|
77
77
|
timeout: 2 * 60 * 1000,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
@@ -101,6 +101,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
101
101
|
...cliResult,
|
|
102
102
|
serverUrl,
|
|
103
103
|
staticUrl,
|
|
104
|
+
utilityUrl,
|
|
104
105
|
domain,
|
|
105
106
|
stdout,
|
|
106
107
|
stderr,
|
package/lib/app/startCli.js
CHANGED
|
@@ -78,11 +78,11 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
78
78
|
const domain = utils.getServerDomain(cliResult);
|
|
79
79
|
// @FIXME: the utility port might be defined on the provider level and we don't have access to it
|
|
80
80
|
// in this case. So the value might be inconsistent with actual utility server (actually, already inconsistent for tincoin)
|
|
81
|
-
const
|
|
81
|
+
const utilityUrl = utils.getUtilityServerUrl(env, cliResult);
|
|
82
82
|
const appName = typeof targetOrConfig === 'string' ? targetOrConfig : targetOrConfig.name;
|
|
83
83
|
try {
|
|
84
84
|
await waitOn__default["default"]({
|
|
85
|
-
resources: [`${
|
|
85
|
+
resources: [`${utilityUrl}/readyz`],
|
|
86
86
|
timeout: 2 * 60 * 1000,
|
|
87
87
|
});
|
|
88
88
|
}
|
|
@@ -110,6 +110,7 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
|
|
|
110
110
|
...cliResult,
|
|
111
111
|
serverUrl,
|
|
112
112
|
staticUrl,
|
|
113
|
+
utilityUrl,
|
|
113
114
|
domain,
|
|
114
115
|
stdout,
|
|
115
116
|
stderr,
|
|
@@ -5,6 +5,7 @@ import type { StartCliOptions } from './startCli';
|
|
|
5
5
|
export declare const runFakeApp: (config: Partial<StartOptions['config']>, options?: StartCliOptions) => Promise<{
|
|
6
6
|
serverUrl: string;
|
|
7
7
|
staticUrl: string;
|
|
8
|
+
utilityUrl: string;
|
|
8
9
|
domain: string;
|
|
9
10
|
stdout: import("stream").Writable;
|
|
10
11
|
stderr: import("stream").Writable;
|
|
@@ -13,7 +14,7 @@ export declare const runFakeApp: (config: Partial<StartOptions['config']>, optio
|
|
|
13
14
|
body?: Record<string, any> | undefined;
|
|
14
15
|
contentType?: "json" | "form" | undefined;
|
|
15
16
|
headers?: Record<string, string> | undefined;
|
|
16
|
-
} | undefined) =>
|
|
17
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
17
18
|
render: (path: string, { method, headers, parserOptions, }?: {
|
|
18
19
|
method?: "get" | "post" | "put" | undefined;
|
|
19
20
|
headers?: Record<string, string> | undefined;
|
|
@@ -31,16 +32,16 @@ export declare const runFakeApp: (config: Partial<StartOptions['config']>, optio
|
|
|
31
32
|
body?: Record<string, any> | undefined;
|
|
32
33
|
contentType?: "json" | "form" | undefined;
|
|
33
34
|
headers?: Record<string, string> | undefined;
|
|
34
|
-
} | undefined) =>
|
|
35
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
35
36
|
privatePapi: (path: string, { method, body, contentType, headers, }?: {
|
|
36
37
|
method?: "get" | "post" | "put" | "delete" | undefined;
|
|
37
38
|
body?: Record<string, any> | undefined;
|
|
38
39
|
contentType?: "json" | "form" | undefined;
|
|
39
40
|
headers?: Record<string, string> | undefined;
|
|
40
|
-
} | undefined) =>
|
|
41
|
-
clearCache: () =>
|
|
42
|
-
bundleInfo: () =>
|
|
43
|
-
apiList: () =>
|
|
41
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
42
|
+
clearCache: () => any;
|
|
43
|
+
bundleInfo: () => any;
|
|
44
|
+
apiList: () => any;
|
|
44
45
|
};
|
|
45
46
|
mocker: {
|
|
46
47
|
addMocks(api: string, mocks: Record<string, import("@tinkoff/mocker").MockConfig>): Promise<any>;
|
|
@@ -4,6 +4,7 @@ import type { StartCliOptions } from './startCli';
|
|
|
4
4
|
export declare const runRealApp: (tramvaiConfigRoot: string, appName: string, options: StartCliOptions) => Promise<{
|
|
5
5
|
serverUrl: string;
|
|
6
6
|
staticUrl: string;
|
|
7
|
+
utilityUrl: string;
|
|
7
8
|
domain: string;
|
|
8
9
|
stdout: import("stream").Writable;
|
|
9
10
|
stderr: import("stream").Writable;
|
|
@@ -12,7 +13,7 @@ export declare const runRealApp: (tramvaiConfigRoot: string, appName: string, op
|
|
|
12
13
|
body?: Record<string, any> | undefined;
|
|
13
14
|
contentType?: "json" | "form" | undefined;
|
|
14
15
|
headers?: Record<string, string> | undefined;
|
|
15
|
-
} | undefined) =>
|
|
16
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
16
17
|
render: (path: string, { method, headers, parserOptions, }?: {
|
|
17
18
|
method?: "get" | "post" | "put" | undefined;
|
|
18
19
|
headers?: Record<string, string> | undefined;
|
|
@@ -30,16 +31,16 @@ export declare const runRealApp: (tramvaiConfigRoot: string, appName: string, op
|
|
|
30
31
|
body?: Record<string, any> | undefined;
|
|
31
32
|
contentType?: "json" | "form" | undefined;
|
|
32
33
|
headers?: Record<string, string> | undefined;
|
|
33
|
-
} | undefined) =>
|
|
34
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
34
35
|
privatePapi: (path: string, { method, body, contentType, headers, }?: {
|
|
35
36
|
method?: "get" | "post" | "put" | "delete" | undefined;
|
|
36
37
|
body?: Record<string, any> | undefined;
|
|
37
38
|
contentType?: "json" | "form" | undefined;
|
|
38
39
|
headers?: Record<string, string> | undefined;
|
|
39
|
-
} | undefined) =>
|
|
40
|
-
clearCache: () =>
|
|
41
|
-
bundleInfo: () =>
|
|
42
|
-
apiList: () =>
|
|
40
|
+
} | undefined) => supertest.SuperTestStatic.Test;
|
|
41
|
+
clearCache: () => any;
|
|
42
|
+
bundleInfo: () => any;
|
|
43
|
+
apiList: () => any;
|
|
43
44
|
};
|
|
44
45
|
mocker: {
|
|
45
46
|
addMocks(api: string, mocks: Record<string, import("@tinkoff/mocker").MockConfig>): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-integration",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.59.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"@types/wait-on": "^5.2.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tinkoff/mocker": "
|
|
24
|
-
"@tramvai/test-helpers": "
|
|
23
|
+
"@tinkoff/mocker": "6.0.1",
|
|
24
|
+
"@tramvai/test-helpers": "6.59.0",
|
|
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": "
|
|
31
|
+
"@tramvai/cli": "6.59.0",
|
|
32
32
|
"tslib": "^2.4.0"
|
|
33
33
|
},
|
|
34
34
|
"license": "Apache-2.0",
|