@gatling.io/core 0.1.1 → 3.11.2

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.
Files changed (69) hide show
  1. package/package.json +3 -3
  2. package/target/assertions.d.ts +1 -1
  3. package/target/checks/multipleFind.d.ts +1 -1
  4. package/target/closedInjection.d.ts +94 -1
  5. package/target/closedInjection.js +21 -1
  6. package/target/feeders.d.ts +0 -11
  7. package/target/index.d.ts +17 -2
  8. package/target/index.js +16 -4
  9. package/target/openInjection.d.ts +140 -2
  10. package/target/openInjection.js +46 -1
  11. package/target/population.d.ts +3 -4
  12. package/target/population.js +2 -3
  13. package/target/protocol.d.ts +1 -2
  14. package/target/protocol.js +0 -1
  15. package/target/scenario.d.ts +12 -2
  16. package/target/scenario.js +7 -2
  17. package/target/session.d.ts +89 -0
  18. package/target/session.js +2 -1
  19. package/target/structure/asLongAs.d.ts +1 -2
  20. package/target/structure/asLongAs.js +1 -2
  21. package/target/structure/asLongAsDuring.d.ts +1 -2
  22. package/target/structure/asLongAsDuring.js +1 -2
  23. package/target/structure/choices.d.ts +2 -3
  24. package/target/structure/choices.js +0 -1
  25. package/target/structure/doIf.d.ts +2 -3
  26. package/target/structure/doIf.js +1 -2
  27. package/target/structure/doIfOrElse.d.ts +2 -3
  28. package/target/structure/doIfOrElse.js +1 -2
  29. package/target/structure/doSwitch.d.ts +1 -2
  30. package/target/structure/doSwitch.js +1 -2
  31. package/target/structure/doSwitchOrElse.d.ts +1 -2
  32. package/target/structure/doSwitchOrElse.js +1 -2
  33. package/target/structure/doWhile.d.ts +1 -2
  34. package/target/structure/doWhile.js +1 -2
  35. package/target/structure/doWhileDuring.d.ts +1 -2
  36. package/target/structure/doWhileDuring.js +1 -2
  37. package/target/structure/during.d.ts +1 -2
  38. package/target/structure/during.js +1 -2
  39. package/target/structure/errors.d.ts +1 -2
  40. package/target/structure/errors.js +1 -2
  41. package/target/structure/execs.d.ts +2 -3
  42. package/target/structure/execs.js +0 -1
  43. package/target/structure/feeds.d.ts +1 -2
  44. package/target/structure/feeds.js +1 -2
  45. package/target/structure/forEach.d.ts +1 -2
  46. package/target/structure/forEach.js +1 -2
  47. package/target/structure/forever.d.ts +0 -1
  48. package/target/structure/forever.js +0 -1
  49. package/target/structure/groups.d.ts +0 -1
  50. package/target/structure/groups.js +1 -2
  51. package/target/structure/index.d.ts +0 -1
  52. package/target/structure/index.js +0 -1
  53. package/target/structure/jvmStructureBuilder.d.ts +0 -1
  54. package/target/structure/jvmStructureBuilder.js +0 -1
  55. package/target/structure/paces.d.ts +1 -2
  56. package/target/structure/paces.js +1 -2
  57. package/target/structure/randomSwitch.d.ts +1 -2
  58. package/target/structure/randomSwitch.js +0 -1
  59. package/target/structure/randomSwitchOrElse.d.ts +1 -2
  60. package/target/structure/randomSwitchOrElse.js +0 -1
  61. package/target/structure/rendezVous.d.ts +0 -1
  62. package/target/structure/rendezVous.js +0 -1
  63. package/target/structure/repeat.d.ts +1 -2
  64. package/target/structure/repeat.js +1 -2
  65. package/target/structure/roundRobinSwitch.d.ts +1 -2
  66. package/target/structure/roundRobinSwitch.js +0 -1
  67. package/target/structure/uniformRandomSwitch.d.ts +1 -2
  68. package/target/structure/uniformRandomSwitch.js +0 -1
  69. package/target/throttling.d.ts +5 -3
@@ -1,21 +1,110 @@
1
1
  import { Duration } from "./utils/duration";
2
2
  import { Wrapper } from "./common";
3
3
  import JvmSession = io.gatling.javaapi.core.Session;
4
+ /**
5
+ * The state of a given virtual user.
6
+ *
7
+ * <p>Immutable, so all methods return a new occurrence and leave the original unmodified.
8
+ */
4
9
  export interface Session extends Wrapper<JvmSession> {
10
+ /**
11
+ * Get a stored value by its key
12
+ *
13
+ * @param key - the storage key
14
+ * @typeParam T - the type of the desired value
15
+ * @returns the value if it exists, null otherwise
16
+ */
5
17
  get<T>(key: string): T;
18
+ /**
19
+ * Create a new instance updated with a given attribute, possibly overriding an existing one
20
+ *
21
+ * @param key - the attribute key
22
+ * @param value - the attribute value
23
+ * @returns a new instance with the new stored attribute
24
+ */
6
25
  set(key: string, value: any): Session;
26
+ /**
27
+ * Create a new instance updated with a given byte array (number[]), possibly overriding an existing one
28
+ *
29
+ * @param key - the attribute key
30
+ * @param value - the attribute value
31
+ * @returns a new instance with the new stored attribute
32
+ */
7
33
  setByteArray(key: string, value: number[]): Session;
34
+ /**
35
+ * Create a new instance updated with multiple attributes, possibly overriding existing ones
36
+ *
37
+ * @param newAttributes - the new attributes
38
+ * @returns a new instance with the new stored attributes
39
+ */
8
40
  setAll(newAttributes: Record<string, any>): Session;
41
+ /**
42
+ * Create a new instance updated with an attribute removed
43
+ *
44
+ * @param key - the key of the attribute to remove
45
+ * @returns a new instance with the attribute removed
46
+ */
9
47
  remove(key: string): Session;
48
+ /**
49
+ * Create a new instance updated with all attributes removed except Gatling internal ones
50
+ *
51
+ * @returns a new instance with a reset user state
52
+ */
10
53
  reset(): Session;
54
+ /**
55
+ * Create a new instance updated with multiple attributes removed
56
+ *
57
+ * @param keys - the keys of the attributes to remove
58
+ * @returns a new instance with the attributes removed
59
+ */
11
60
  removeAll(...keys: string[]): Session;
61
+ /**
62
+ * Check if the Session contains a given attribute key
63
+ *
64
+ * @param key - the attribute key
65
+ * @returns true is the key is defined
66
+ */
12
67
  contains(key: string): boolean;
68
+ /**
69
+ * @returns if the Session's status is failure
70
+ */
13
71
  isFailed(): boolean;
72
+ /**
73
+ * Create a new instance with the status forced to "succeeded"
74
+ *
75
+ * @returns a new instance with the new status
76
+ */
14
77
  markAsSucceeded(): Session;
78
+ /**
79
+ * Create a new instance with the status forced to "failed"
80
+ *
81
+ * @returns a new instance with the new status
82
+ */
15
83
  markAsFailed(): Session;
84
+ /**
85
+ * Provide the name of the scenario of the virtual user
86
+ *
87
+ * @returns the virtual user's scenario name
88
+ */
16
89
  scenario(): string;
90
+ /**
91
+ * Provide the list of groups at the current position for the virtual user
92
+ *
93
+ * @returns the list of groups, from shallowest to deepest
94
+ */
17
95
  groups(): string[];
96
+ /**
97
+ * Provide the unique (for this injector) id of the virtual user
98
+ *
99
+ * @returns the virtual user's id
100
+ */
18
101
  userId(): number;
102
+ /**
103
+ * Provide a representation of the Session content
104
+ *
105
+ * @returns the Session content as a pretty printed string
106
+ */
107
+ toString(): string;
19
108
  }
20
109
  export declare const wrapSession: (_underlying: JvmSession) => Session;
21
110
  export type Expression<T> = T | ((session: Session) => T);
package/target/session.js CHANGED
@@ -27,7 +27,8 @@ const wrapSession = (_underlying) => ({
27
27
  markAsFailed: () => (0, exports.wrapSession)(_underlying.markAsFailed()),
28
28
  scenario: () => _underlying.scenario(),
29
29
  groups: () => _underlying.groups(),
30
- userId: () => _underlying.userId()
30
+ userId: () => _underlying.userId(),
31
+ toString: () => _underlying.toString()
31
32
  });
32
33
  exports.wrapSession = wrapSession;
33
34
  const underlyingSessionTransform = (f) => (jvmSession) => f((0, exports.wrapSession)(jvmSession))._underlying;
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmAsLongAs = io.gatling.javaapi.core.loop.AsLongAs;
3
1
  import { SessionTo } from "../session";
4
2
  import { On } from "./on";
3
+ import JvmAsLongAs = io.gatling.javaapi.core.loop.AsLongAs;
5
4
  export interface AsLongAsFunction<T extends AsLongAs<T>> {
6
5
  /**
7
6
  * Define a loop that will iterate as long as the condition holds true
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.asLongAsImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const on_1 = require("./on");
8
7
  const asLongAsImpl = (jvmAsLongAs, wrap) => (condition, arg1, arg2) => {
9
8
  if (arg2 !== undefined && typeof arg1 === "string") {
@@ -1,8 +1,7 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmAsLongAsDuring = io.gatling.javaapi.core.loop.AsLongAsDuring;
3
1
  import { Duration } from "../utils/duration";
4
2
  import { SessionTo } from "../session";
5
3
  import { On } from "./on";
4
+ import JvmAsLongAsDuring = io.gatling.javaapi.core.loop.AsLongAsDuring;
6
5
  export interface AsLongAsDuringFunction<T extends AsLongAsDuring<T>> {
7
6
  /**
8
7
  * Define a loop that will iterate as long as the condition holds true and a maximum duration
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.asLongAsDuringImpl = void 0;
4
- require("@gatling.io/jvm-types");
4
+ const callbacks_1 = require("../gatlingJvm/callbacks");
5
5
  const duration_1 = require("../utils/duration");
6
6
  const session_1 = require("../session");
7
- const callbacks_1 = require("../gatlingJvm/callbacks");
8
7
  const on_1 = require("./on");
9
8
  const asLongAsDuringImpl = (jvmAsLongAsDuring, wrap) => (condition, duration, arg2, arg3) => {
10
9
  if (arg3 !== undefined && typeof arg2 === "string") {
@@ -1,8 +1,7 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmChoiceWithKey = io.gatling.javaapi.core.Choice$WithKey;
3
- import JvmChoiceWithWeight = io.gatling.javaapi.core.Choice$WithWeight;
4
1
  import { Wrapper } from "../common";
5
2
  import { Executable } from "./execs";
3
+ import JvmChoiceWithKey = io.gatling.javaapi.core.Choice$WithKey;
4
+ import JvmChoiceWithWeight = io.gatling.javaapi.core.Choice$WithWeight;
6
5
  export interface ChoiceWithKey extends Wrapper<JvmChoiceWithKey> {
7
6
  }
8
7
  interface ChoiceWithKeyThen {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.percent = exports.onCase = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const jvm_types_1 = require("@gatling.io/jvm-types");
6
5
  const wrapChoiceWithKey = (_underlying) => ({
7
6
  _underlying
@@ -1,8 +1,7 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmDoIf = io.gatling.javaapi.core.condition.DoIf;
3
- import JvmDoIfEquals = io.gatling.javaapi.core.condition.DoIfEquals;
4
1
  import { SessionTo } from "../session";
5
2
  import { Executable } from "./execs";
3
+ import JvmDoIf = io.gatling.javaapi.core.condition.DoIf;
4
+ import JvmDoIfEquals = io.gatling.javaapi.core.condition.DoIfEquals;
6
5
  export interface Then<T> {
7
6
  then(executable: Executable<any>, ...executables: Executable<any>[]): T;
8
7
  }
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.doIfEqualsImpl = exports.doIfImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const wrapThen = (jvmThen, wrap) => ({
8
7
  then: (executable, ...executables) => wrap(jvmThen.then(executable._underlying, ...executables.map((e) => e._underlying)))
9
8
  });
@@ -1,8 +1,7 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmDoIfOrElse = io.gatling.javaapi.core.condition.DoIfOrElse;
3
- import JvmDoIfEqualsOrElse = io.gatling.javaapi.core.condition.DoIfEqualsOrElse;
4
1
  import { SessionTo } from "../session";
5
2
  import { Executable } from "./execs";
3
+ import JvmDoIfOrElse = io.gatling.javaapi.core.condition.DoIfOrElse;
4
+ import JvmDoIfEqualsOrElse = io.gatling.javaapi.core.condition.DoIfEqualsOrElse;
6
5
  export interface Then<T> {
7
6
  then(executable: Executable<any>, ...executables: Executable<any>[]): OrElse<T>;
8
7
  }
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.doIfEqualsOrElseImpl = exports.doIfOrElseImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const wrapThen = (jvmThen, wrap) => ({
8
7
  then: (executable, ...executables) => wrapOrElse(jvmThen.then(executable._underlying, ...executables.map((e) => e._underlying)), wrap)
9
8
  });
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmDoSwitch = io.gatling.javaapi.core.condition.DoSwitch;
3
1
  import { SessionTo } from "../session";
4
2
  import { ChoiceWithKey } from "./choices";
3
+ import JvmDoSwitch = io.gatling.javaapi.core.condition.DoSwitch;
5
4
  export interface On<T> {
6
5
  on(...choices: ChoiceWithKey[]): T;
7
6
  }
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.doSwitchImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const wrapOn = (jvmOn, wrap) => ({
8
7
  on: (...choices) => wrap(jvmOn.on(choices.map((c) => c._underlying)))
9
8
  });
@@ -1,8 +1,7 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmDoSwitchOrElse = io.gatling.javaapi.core.condition.DoSwitchOrElse;
3
1
  import { SessionTo } from "../session";
4
2
  import { ChoiceWithKey } from "./choices";
5
3
  import { Executable } from "./execs";
4
+ import JvmDoSwitchOrElse = io.gatling.javaapi.core.condition.DoSwitchOrElse;
6
5
  export interface On<T> {
7
6
  on(...choices: ChoiceWithKey[]): OrElse<T>;
8
7
  }
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.doSwitchOrElseImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const wrapOn = (jvmOn, wrap) => ({
8
7
  on: (...choices) => wrapOrElse(jvmOn.on(choices.map((c) => c._underlying)), wrap)
9
8
  });
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmDoWhile = io.gatling.javaapi.core.loop.DoWhile;
3
1
  import { SessionTo } from "../session";
4
2
  import { On } from "./on";
3
+ import JvmDoWhile = io.gatling.javaapi.core.loop.DoWhile;
5
4
  export interface DoWhileFunction<T extends DoWhile<T>> {
6
5
  /**
7
6
  * Define a loop that will iterate as long as the condition holds true. The condition is evaluated
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.doWhileImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const on_1 = require("./on");
8
7
  const doWhileImpl = (jvmDoWhile, wrap) => (condition, counterName) => {
9
8
  if (counterName !== undefined) {
@@ -1,8 +1,7 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmDoWhileDuring = io.gatling.javaapi.core.loop.DoWhileDuring;
3
1
  import { Duration } from "../utils/duration";
4
2
  import { SessionTo } from "../session";
5
3
  import { On } from "./on";
4
+ import JvmDoWhileDuring = io.gatling.javaapi.core.loop.DoWhileDuring;
6
5
  export interface DoWhileDuringFunction<T extends DoWhileDuring<T>> {
7
6
  /**
8
7
  * Define a loop that will iterate as long as the condition holds true and a maximum duration
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.doWhileDuringImpl = void 0;
4
- require("@gatling.io/jvm-types");
4
+ const callbacks_1 = require("../gatlingJvm/callbacks");
5
5
  const duration_1 = require("../utils/duration");
6
6
  const session_1 = require("../session");
7
- const callbacks_1 = require("../gatlingJvm/callbacks");
8
7
  const on_1 = require("./on");
9
8
  const doWhileDuringImpl = (jvmDoWhileDuring, wrap) => (condition, duration, arg2, arg3) => {
10
9
  if (arg3 !== undefined && typeof arg2 === "string") {
@@ -1,8 +1,7 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmDuring = io.gatling.javaapi.core.loop.During;
3
1
  import { Duration } from "../utils/duration";
4
2
  import { SessionTo } from "../session";
5
3
  import { On } from "./on";
4
+ import JvmDuring = io.gatling.javaapi.core.loop.During;
6
5
  export interface DuringFunction<T extends During<T>> {
7
6
  /**
8
7
  * Define a loop that will iterate for a given duration. The condition is evaluated at the end of
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.duringImpl = void 0;
4
- require("@gatling.io/jvm-types");
4
+ const callbacks_1 = require("../gatlingJvm/callbacks");
5
5
  const duration_1 = require("../utils/duration");
6
6
  const session_1 = require("../session");
7
- const callbacks_1 = require("../gatlingJvm/callbacks");
8
7
  const on_1 = require("./on");
9
8
  const duringImpl = (jvmDuring, wrap) => (duration, arg1, arg2) => {
10
9
  if (arg2 !== undefined && typeof arg1 === "string") {
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmErrors = io.gatling.javaapi.core.error.Errors;
3
1
  import { SessionTo } from "../session";
4
2
  import { On } from "./on";
3
+ import JvmErrors = io.gatling.javaapi.core.error.Errors;
5
4
  export interface ExitBlockOnFailFunction<T extends Errors<T>> {
6
5
  /**
7
6
  * Define a block that is interrupted for a given virtual user if it experiences a failure.
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.errorsImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const on_1 = require("./on");
8
7
  const errorsImpl = (jvmErrors, wrap) => ({
9
8
  exitBlockOnFail: () => (0, on_1.wrapOn)(jvmErrors.exitBlockOnFail(), wrap),
@@ -1,9 +1,8 @@
1
- import "@gatling.io/jvm-types";
1
+ import { Wrapper } from "../common";
2
+ import { SessionTransform } from "../session";
2
3
  import JvmActionBuilder = io.gatling.javaapi.core.ActionBuilder;
3
4
  import JvmExecs = io.gatling.javaapi.core.exec.Execs;
4
5
  import JvmExecutable = io.gatling.javaapi.core.exec.Executable;
5
- import { Wrapper } from "../common";
6
- import { SessionTransform } from "../session";
7
6
  export interface Executable<T extends JvmExecutable> extends Wrapper<T> {
8
7
  }
9
8
  export interface ActionBuilder extends Executable<JvmActionBuilder> {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.execImpl = exports.wrapActionBuilder = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const session_1 = require("../session");
6
5
  const callbacks_1 = require("../gatlingJvm/callbacks");
7
6
  const wrapActionBuilder = (_underlying) => ({
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmFeeds = io.gatling.javaapi.core.feed.Feeds;
3
1
  import { FeederBuilder } from "../feeders";
4
2
  import { SessionTo } from "../session";
3
+ import JvmFeeds = io.gatling.javaapi.core.feed.Feeds;
5
4
  export interface FeedFunction<T extends Feeds<T>> {
6
5
  /**
7
6
  * Attach a feed action.
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.feedImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const feedImpl = (jvmFeeds, wrap) => (feederBuilder, numberOfRecords) => {
8
7
  if (typeof numberOfRecords === "number") {
9
8
  return wrap(jvmFeeds.feed(feederBuilder._underlying, numberOfRecords));
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmForEach = io.gatling.javaapi.core.loop.ForEach;
3
1
  import { SessionTo } from "../session";
4
2
  import { On } from "./on";
3
+ import JvmForEach = io.gatling.javaapi.core.loop.ForEach;
5
4
  export interface ForEachFunction<T extends ForEach<T>> {
6
5
  /**
7
6
  * Define a loop that will iterate over a list of values.
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.foreachImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const on_1 = require("./on");
8
7
  const foreachImpl = (jvmForEach, wrap) => (seq, attributeName, counterName) => {
9
8
  if (typeof seq === "function") {
@@ -1,4 +1,3 @@
1
- import "@gatling.io/jvm-types";
2
1
  import JvmForever = io.gatling.javaapi.core.loop.Forever;
3
2
  import { On } from "./on";
4
3
  export interface ForeverFunction<T extends Forever<T>> {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.foreverImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const on_1 = require("./on");
6
5
  const foreverImpl = (jvmForever, wrap) => (counterName) => (0, on_1.wrapOn)(counterName !== undefined ? jvmForever.forever(counterName) : jvmForever.forever(), wrap);
7
6
  exports.foreverImpl = foreverImpl;
@@ -1,4 +1,3 @@
1
- import "@gatling.io/jvm-types";
2
1
  import JvmGroups = io.gatling.javaapi.core.group.Groups;
3
2
  import { SessionTo } from "../session";
4
3
  import { On } from "./on";
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.groupImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const on_1 = require("./on");
8
7
  const groupImpl = (jvmGroups, wrap) => (group) => (0, on_1.wrapOn)(typeof group === "function" ? jvmGroups.group((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(group))) : jvmGroups.group(group), wrap);
9
8
  exports.groupImpl = groupImpl;
@@ -1,4 +1,3 @@
1
- import "@gatling.io/jvm-types";
2
1
  import JvmChainBuilder = io.gatling.javaapi.core.ChainBuilder;
3
2
  import { JvmStructureBuilderLike } from "./jvmStructureBuilder";
4
3
  import { ExecFunction, Execs, Executable } from "./execs";
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.stopInjectorIf = exports.stopInjector = exports.exitHereIfFailed = exports.exitHere = exports.exitHereIf = exports.tryMax = exports.exitBlockOnFail = exports.roundRobinSwitch = exports.uniformRandomSwitch = exports.randomSwitchOrElse = exports.randomSwitch = exports.doSwitchOrElse = exports.doSwitch = exports.doIfEqualsOrElse = exports.doIfEquals = exports.doIfOrElse = exports.doIf = exports.doWhileDuring = exports.asLongAsDuring = exports.doWhile = exports.asLongAs = exports.forever = exports.during = exports.foreach = exports.repeat = exports.rendezVous = exports.pace = exports.pause = exports.feed = exports.group = exports.exec = exports.percent = exports.onCase = exports.wrapActionBuilder = exports.structureBuilderImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const jvm_types_1 = require("@gatling.io/jvm-types");
6
5
  const execs_1 = require("./execs");
7
6
  const groups_1 = require("./groups");
@@ -1,4 +1,3 @@
1
- import "@gatling.io/jvm-types";
2
1
  import JvmExecs = io.gatling.javaapi.core.exec.Execs;
3
2
  import JvmGroups = io.gatling.javaapi.core.group.Groups;
4
3
  import JvmFeeds = io.gatling.javaapi.core.feed.Feeds;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- require("@gatling.io/jvm-types");
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmPaces = io.gatling.javaapi.core.pause.Paces;
3
1
  import { Duration } from "../utils/duration";
4
2
  import { SessionTo } from "../session";
3
+ import JvmPaces = io.gatling.javaapi.core.pause.Paces;
5
4
  export interface PaceFunction<T extends Paces<T>> {
6
5
  /**
7
6
  * Attach a pace action
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paceImpl = void 0;
4
- require("@gatling.io/jvm-types");
4
+ const callbacks_1 = require("../gatlingJvm/callbacks");
5
5
  const duration_1 = require("../utils/duration");
6
6
  const session_1 = require("../session");
7
- const callbacks_1 = require("../gatlingJvm/callbacks");
8
7
  const paceImpl = (jvmGroups, wrap) => (arg0, arg1, arg2) => {
9
8
  if (arg2 !== undefined) {
10
9
  // pace(min, max, counterName)
@@ -1,6 +1,5 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmRandomSwitch = io.gatling.javaapi.core.condition.RandomSwitch;
3
1
  import { ChoiceWithWeight } from "./choices";
2
+ import JvmRandomSwitch = io.gatling.javaapi.core.condition.RandomSwitch;
4
3
  export interface On<T> {
5
4
  on(...choices: ChoiceWithWeight[]): T;
6
5
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.randomSwitchImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const wrapOn = (jvmOn, wrap) => ({
6
5
  on: (...choices) => wrap(jvmOn.on(choices.map((c) => c._underlying)))
7
6
  });
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmRandomSwitchOrElse = io.gatling.javaapi.core.condition.RandomSwitchOrElse;
3
1
  import { ChoiceWithWeight } from "./choices";
4
2
  import { Executable } from "./execs";
3
+ import JvmRandomSwitchOrElse = io.gatling.javaapi.core.condition.RandomSwitchOrElse;
5
4
  export interface On<T> {
6
5
  on(...choices: ChoiceWithWeight[]): OrElse<T>;
7
6
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.randomSwitchOrElseImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const wrapOn = (jvmOn, wrap) => ({
6
5
  on: (...choices) => wrapOrElse(jvmOn.on(choices.map((c) => c._underlying)), wrap)
7
6
  });
@@ -1,4 +1,3 @@
1
- import "@gatling.io/jvm-types";
2
1
  import JvmRendezVous = io.gatling.javaapi.core.pause.RendezVous;
3
2
  export interface RendezVousFunction<T extends RendezVous<T>> {
4
3
  /**
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rendezVousImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const rendezVousImpl = (jvmRendezVous, wrap) => (users) => wrap(jvmRendezVous.rendezVous(users));
6
5
  exports.rendezVousImpl = rendezVousImpl;
@@ -1,7 +1,6 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmRepeat = io.gatling.javaapi.core.loop.Repeat;
3
1
  import { SessionTo } from "../session";
4
2
  import { On } from "./on";
3
+ import JvmRepeat = io.gatling.javaapi.core.loop.Repeat;
5
4
  export interface RepeatFunction<T extends Repeat<T>> {
6
5
  /**
7
6
  * Define a loop that will iterate for a given number of times.
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.repeatImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
- const session_1 = require("../session");
6
4
  const callbacks_1 = require("../gatlingJvm/callbacks");
5
+ const session_1 = require("../session");
7
6
  const on_1 = require("./on");
8
7
  const repeatImpl = (jvmRepeat, wrap) => (times, counterName) => {
9
8
  if (counterName !== undefined) {
@@ -1,6 +1,5 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmRoundRobinSwitch = io.gatling.javaapi.core.condition.RoundRobinSwitch;
3
1
  import { Executable } from "./execs";
2
+ import JvmRoundRobinSwitch = io.gatling.javaapi.core.condition.RoundRobinSwitch;
4
3
  export interface On<T> {
5
4
  on(executable: Executable<any>, ...executables: Executable<any>[]): T;
6
5
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.roundRobinSwitchImpl = void 0;
4
- require("@gatling.io/jvm-types");
5
4
  const wrapOn = (jvmOn, wrap) => ({
6
5
  on: (executable, ...executables) => wrap(jvmOn.on(executable._underlying, ...executables.map((e) => e._underlying)))
7
6
  });
@@ -1,6 +1,5 @@
1
- import "@gatling.io/jvm-types";
2
- import JvmUniformRandomSwitch = io.gatling.javaapi.core.condition.UniformRandomSwitch;
3
1
  import { Executable } from "./execs";
2
+ import JvmUniformRandomSwitch = io.gatling.javaapi.core.condition.UniformRandomSwitch;
4
3
  export interface On<T> {
5
4
  on(executable: Executable<any>, ...executables: Executable<any>[]): T;
6
5
  }