@vnejs/plugins.scenario.random 0.2.4 → 0.2.5

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.
@@ -14,12 +14,12 @@ export class Random extends ModuleCore {
14
14
  const index = Math.floor(Math.random() * options.length);
15
15
  this.emitLog({ type: "option", index, curLine: options[index] + 1 });
16
16
  this.globalState.scenario.curLine = options[index] + 1;
17
- this.emitNext();
17
+ this.emit(this.EVENTS.SCENARIO.NEXT);
18
18
  };
19
19
  onOptionLineExec = async () => {
20
20
  const { label, curLine } = this.globalState.scenario;
21
21
  const lines = (await this.emitOne(this.EVENTS.SCENARIO.LINES_GET, { label })) ?? [];
22
22
  this.globalState.scenario.curLine = curLine + getOptionExecShift(lines, curLine);
23
- this.emitNext();
23
+ this.emit(this.EVENTS.SCENARIO.NEXT);
24
24
  };
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.scenario.random",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@ export class Random extends ModuleCore<RandomPluginEvents, RandomPluginConstants
24
24
 
25
25
  this.globalState.scenario.curLine = options[index] + 1;
26
26
 
27
- this.emitNext();
27
+ this.emit(this.EVENTS.SCENARIO.NEXT);
28
28
  };
29
29
 
30
30
  onOptionLineExec = async () => {
@@ -33,6 +33,6 @@ export class Random extends ModuleCore<RandomPluginEvents, RandomPluginConstants
33
33
 
34
34
  this.globalState.scenario.curLine = curLine + getOptionExecShift(lines, curLine);
35
35
 
36
- this.emitNext();
36
+ this.emit(this.EVENTS.SCENARIO.NEXT);
37
37
  };
38
38
  }