@gatling.io/core 3.11.6 → 3.11.7
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/package.json +3 -3
- package/target/index.d.ts +1 -1
- package/target/index.js +2 -1
- package/target/parameters.d.ts +10 -5
- package/target/parameters.js +13 -8
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gatling.io/core",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "target/index.js",
|
|
6
6
|
"types": "target/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@gatling.io/jvm-types": "3.11.
|
|
8
|
+
"@gatling.io/jvm-types": "3.11.7"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@types/jest": "29.5.12",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"rimraf": "6.0.1",
|
|
15
15
|
"ts-jest": "29.2.3",
|
|
16
16
|
"ts-node": "10.9.2",
|
|
17
|
-
"typescript": "5.5.
|
|
17
|
+
"typescript": "5.5.4"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"clean": "rimraf target",
|
package/target/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export * from "./filters";
|
|
|
19
19
|
export { GlobalStore } from "./globalStore";
|
|
20
20
|
export * from "./openInjection";
|
|
21
21
|
export * from "./population";
|
|
22
|
-
export { getOption, getEnvironmentVariable, GetWithDefault } from "./parameters";
|
|
22
|
+
export { getParameter, getOption, getEnvironmentVariable, GetWithDefault } from "./parameters";
|
|
23
23
|
export * from "./protocol";
|
|
24
24
|
export * from "./scenario";
|
|
25
25
|
export * from "./session";
|
package/target/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.simulation = exports.getEnvironmentVariable = exports.getOption = exports.GlobalStore = exports.asByteArrayFunction = exports.asByteArray = void 0;
|
|
17
|
+
exports.simulation = exports.getEnvironmentVariable = exports.getOption = exports.getParameter = exports.GlobalStore = exports.asByteArrayFunction = exports.asByteArray = void 0;
|
|
18
18
|
require("@gatling.io/jvm-types");
|
|
19
19
|
const pauses_1 = require("./structure/pauses");
|
|
20
20
|
const duration_1 = require("./utils/duration");
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "GlobalStore", { enumerable: true, get: function
|
|
|
36
36
|
__exportStar(require("./openInjection"), exports);
|
|
37
37
|
__exportStar(require("./population"), exports);
|
|
38
38
|
var parameters_1 = require("./parameters");
|
|
39
|
+
Object.defineProperty(exports, "getParameter", { enumerable: true, get: function () { return parameters_1.getParameter; } });
|
|
39
40
|
Object.defineProperty(exports, "getOption", { enumerable: true, get: function () { return parameters_1.getOption; } });
|
|
40
41
|
Object.defineProperty(exports, "getEnvironmentVariable", { enumerable: true, get: function () { return parameters_1.getEnvironmentVariable; } });
|
|
41
42
|
__exportStar(require("./protocol"), exports);
|
package/target/parameters.d.ts
CHANGED
|
@@ -3,14 +3,19 @@ export interface GetWithDefault {
|
|
|
3
3
|
(name: string, defaultValue: string): string;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* Gets the
|
|
6
|
+
* Gets the parameter indicated by the specified name.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* `gatling run
|
|
8
|
+
* Parameters can be specified in the `gatling run` command by passing arguments with the format `key=value`, e.g.
|
|
9
|
+
* `gatling run parameter1=foo parameter2=bar`. You would then retrieve them in your simulation by calling
|
|
10
|
+
* `getParameter("parameter1")` and `getParameter("parameter2")`.
|
|
10
11
|
*
|
|
11
|
-
* @param key - the key of the
|
|
12
|
+
* @param key - the key of the parameter.
|
|
12
13
|
* @param defaultValue - a default value
|
|
13
|
-
* @returns the string value of the
|
|
14
|
+
* @returns the string value of the parameter if it is defined, or else `defaultValue` if provided, or else `undefined`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getParameter: GetWithDefault;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use {@link getParameter} instead.
|
|
14
19
|
*/
|
|
15
20
|
export declare const getOption: GetWithDefault;
|
|
16
21
|
/**
|
package/target/parameters.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEnvironmentVariable = exports.getOption = void 0;
|
|
3
|
+
exports.getEnvironmentVariable = exports.getOption = exports.getParameter = void 0;
|
|
4
4
|
const jvm_types_1 = require("@gatling.io/jvm-types");
|
|
5
5
|
/**
|
|
6
|
-
* Gets the
|
|
6
|
+
* Gets the parameter indicated by the specified name.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* `gatling run
|
|
8
|
+
* Parameters can be specified in the `gatling run` command by passing arguments with the format `key=value`, e.g.
|
|
9
|
+
* `gatling run parameter1=foo parameter2=bar`. You would then retrieve them in your simulation by calling
|
|
10
|
+
* `getParameter("parameter1")` and `getParameter("parameter2")`.
|
|
10
11
|
*
|
|
11
|
-
* @param key - the key of the
|
|
12
|
+
* @param key - the key of the parameter.
|
|
12
13
|
* @param defaultValue - a default value
|
|
13
|
-
* @returns the string value of the
|
|
14
|
+
* @returns the string value of the parameter if it is defined, or else `defaultValue` if provided, or else `undefined`.
|
|
14
15
|
*/
|
|
15
|
-
const
|
|
16
|
-
exports.
|
|
16
|
+
const getParameter = (key, defaultValue) => getOrElse(jvm_types_1.System.getProperty(key), defaultValue);
|
|
17
|
+
exports.getParameter = getParameter;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use {@link getParameter} instead.
|
|
20
|
+
*/
|
|
21
|
+
exports.getOption = exports.getParameter;
|
|
17
22
|
/**
|
|
18
23
|
* Gets the environment variable indicated by the specified name.
|
|
19
24
|
*
|