@types/k6 0.34.3 → 0.36.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.
- k6/README.md +1 -1
- k6/execution.d.ts +21 -0
- k6/index.d.ts +1 -1
- k6/net/grpc.d.ts +6 -4
- k6/package.json +3 -3
- k6/ws.d.ts +14 -0
k6/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for k6 (https://k6.io/docs/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 24 Jan 2022 13:31:30 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
k6/execution.d.ts
CHANGED
|
@@ -59,6 +59,22 @@ declare namespace execution {
|
|
|
59
59
|
currentTestRunDuration: number;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Control the test execution.
|
|
64
|
+
*/
|
|
65
|
+
const test: {
|
|
66
|
+
/**
|
|
67
|
+
* Aborts the test run with the exit code 108.
|
|
68
|
+
* https://k6.io/docs/javascript-api/k6-execution/#test
|
|
69
|
+
* @param input - Aborted message.
|
|
70
|
+
* @example
|
|
71
|
+
* import exec from "k6/execution";
|
|
72
|
+
* exec.test.abort();
|
|
73
|
+
* exec.test.abort('this is the reason');
|
|
74
|
+
*/
|
|
75
|
+
abort(input?: string): void;
|
|
76
|
+
};
|
|
77
|
+
|
|
62
78
|
/**
|
|
63
79
|
* Information about the current virtual user.
|
|
64
80
|
*/
|
|
@@ -79,6 +95,11 @@ declare namespace execution {
|
|
|
79
95
|
* The globally unique (across the whole test run) identifier of the VU.
|
|
80
96
|
*/
|
|
81
97
|
idInTest: number;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Hash to set or get VU tags.
|
|
101
|
+
*/
|
|
102
|
+
tags: Record<string, number | string | boolean>;
|
|
82
103
|
};
|
|
83
104
|
}
|
|
84
105
|
|
k6/index.d.ts
CHANGED
k6/net/grpc.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export interface Response {
|
|
8
8
|
status: number;
|
|
9
9
|
|
|
10
|
-
message:
|
|
10
|
+
message: object;
|
|
11
11
|
|
|
12
12
|
headers: object;
|
|
13
13
|
|
|
@@ -19,7 +19,9 @@ export interface Response {
|
|
|
19
19
|
export interface ConnectParams {
|
|
20
20
|
plaintext?: boolean;
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
reflect?: boolean;
|
|
23
|
+
|
|
24
|
+
timeout?: string | number;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export interface Params {
|
|
@@ -27,7 +29,7 @@ export interface Params {
|
|
|
27
29
|
|
|
28
30
|
tags?: object;
|
|
29
31
|
|
|
30
|
-
timeout?: string;
|
|
32
|
+
timeout?: string | number;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
/**
|
|
@@ -48,7 +50,7 @@ declare namespace grpc {
|
|
|
48
50
|
connect(address: string, params?: ConnectParams): void;
|
|
49
51
|
|
|
50
52
|
/** Loads and parses the protocol buffer descriptors. */
|
|
51
|
-
load(importPaths: string[], protoFiles: string): void;
|
|
53
|
+
load(importPaths: string[], ...protoFiles: string[]): void;
|
|
52
54
|
|
|
53
55
|
/** Invokes an unary RPC request. */
|
|
54
56
|
invoke(url: string, request: object, params?: Params): Response;
|
k6/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/k6",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "TypeScript definitions for k6",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
},
|
|
51
51
|
"scripts": {},
|
|
52
52
|
"dependencies": {},
|
|
53
|
-
"typesPublisherContentHash": "
|
|
54
|
-
"typeScriptVersion": "3.
|
|
53
|
+
"typesPublisherContentHash": "010e15b4ef6fd0057dab81bd5cefb66c8fb4febb9183a0a6fa44c6842e878eb1",
|
|
54
|
+
"typeScriptVersion": "3.8"
|
|
55
55
|
}
|
k6/ws.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CookieJar } from './http';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Open WebSocket connection.
|
|
3
5
|
* https://k6.io/docs/javascript-api/k6-ws/connect-url-params-callback/
|
|
@@ -41,8 +43,20 @@ export interface Params {
|
|
|
41
43
|
/** Request headers. */
|
|
42
44
|
headers?: { [name: string]: string };
|
|
43
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Compression algorithm. The only supported algorithm is `deflate`.
|
|
48
|
+
* If the option is left unset or empty, it defaults to no compression.
|
|
49
|
+
*/
|
|
50
|
+
compression?: string;
|
|
51
|
+
|
|
44
52
|
/** Response time metric tags. */
|
|
45
53
|
tags?: { [name: string]: string };
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The cookie jar that will be used when making the initial HTTP request to establish the WebSocket connection.
|
|
57
|
+
* If empty, the default VU cookie jar will be used.
|
|
58
|
+
*/
|
|
59
|
+
jar?: CookieJar;
|
|
46
60
|
}
|
|
47
61
|
|
|
48
62
|
/**
|