@gatling.io/core 3.11.5 → 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 CHANGED
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "name": "@gatling.io/core",
3
- "version": "3.11.5",
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.5"
8
+ "@gatling.io/jvm-types": "3.11.7"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@types/jest": "29.5.12",
12
12
  "jest": "29.7.0",
13
- "prettier": "3.3.2",
14
- "rimraf": "5.0.7",
15
- "ts-jest": "29.1.5",
13
+ "prettier": "3.3.3",
14
+ "rimraf": "6.0.1",
15
+ "ts-jest": "29.2.3",
16
16
  "ts-node": "10.9.2",
17
- "typescript": "5.4.5"
17
+ "typescript": "5.5.4"
18
18
  },
19
19
  "scripts": {
20
20
  "clean": "rimraf target",
21
21
  "format": "prettier --write '**/*.ts'",
22
+ "format-check": "prettier --check '**/*.ts'",
22
23
  "test": "jest",
23
24
  "build": "tsc -p ."
24
25
  }
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);
@@ -3,14 +3,19 @@ export interface GetWithDefault {
3
3
  (name: string, defaultValue: string): string;
4
4
  }
5
5
  /**
6
- * Gets the option indicated by the specified name.
6
+ * Gets the parameter indicated by the specified name.
7
7
  *
8
- * Options can be specified in the `gatling run` command by passing arguments with the format `key=value`, e.g.
9
- * `gatling run option1=foo option2=bar`.
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 option.
12
+ * @param key - the key of the parameter.
12
13
  * @param defaultValue - a default value
13
- * @returns the string value of the option if it is defined, or else `defaultValue` if provided, or else `undefined`.
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
  /**
@@ -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 option indicated by the specified name.
6
+ * Gets the parameter indicated by the specified name.
7
7
  *
8
- * Options can be specified in the `gatling run` command by passing arguments with the format `key=value`, e.g.
9
- * `gatling run option1=foo option2=bar`.
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 option.
12
+ * @param key - the key of the parameter.
12
13
  * @param defaultValue - a default value
13
- * @returns the string value of the option if it is defined, or else `defaultValue` if provided, or else `undefined`.
14
+ * @returns the string value of the parameter if it is defined, or else `defaultValue` if provided, or else `undefined`.
14
15
  */
15
- const getOption = (key, defaultValue) => getOrElse(jvm_types_1.System.getProperty(key), defaultValue);
16
- exports.getOption = getOption;
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
  *