@vnejs/plugins.scenario.random 0.2.7 → 0.2.9
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/dist/index.js +1 -1
- package/dist/modules/random.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -1
- package/src/modules/random.ts +2 -1
- package/src/tests/random.test.ts +3 -1
- package/src/tests/setup.ts +2 -1
- package/src/types.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@vnejs/contracts.scenario.random";
|
|
2
|
-
import { regPlugin } from "@vnejs/
|
|
2
|
+
import { regPlugin } from "@vnejs/registry";
|
|
3
3
|
import { CONSTANTS, PLUGIN_NAME } from "@vnejs/contracts.scenario.random";
|
|
4
4
|
import { Random } from "./modules/random.js";
|
|
5
5
|
regPlugin(PLUGIN_NAME, { constants: CONSTANTS }, [Random]);
|
package/dist/modules/random.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getBlockOptions, getOptionExecShift } from "@vnejs/helpers";
|
|
2
1
|
import { ModuleCore } from "@vnejs/module.core";
|
|
2
|
+
import { getBlockOptions, getOptionExecShift } from "@vnejs/helpers";
|
|
3
3
|
export class Random extends ModuleCore {
|
|
4
4
|
name = "random";
|
|
5
5
|
optionPrefix = `% ${this.name}.option`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.scenario.random",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@vnejs/helpers": "~0.2.0",
|
|
38
38
|
"@vnejs/module.core": "~0.2.0",
|
|
39
|
-
"@vnejs/
|
|
39
|
+
"@vnejs/registry": "~0.2.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@vnejs/configs.ts-common": "~0.2.0",
|
package/src/index.ts
CHANGED
package/src/modules/random.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { getBlockOptions, getOptionExecShift } from "@vnejs/helpers";
|
|
2
1
|
import { ModuleCore } from "@vnejs/module.core";
|
|
3
2
|
|
|
3
|
+
import { getBlockOptions, getOptionExecShift } from "@vnejs/helpers";
|
|
4
|
+
|
|
4
5
|
import type { RandomPluginConstants, RandomPluginEvents, RandomPluginParams, RandomPluginSettings } from "../types.js";
|
|
5
6
|
|
|
6
7
|
export class Random extends ModuleCore<RandomPluginEvents, RandomPluginConstants, RandomPluginSettings, RandomPluginParams> {
|
package/src/tests/random.test.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
2
|
|
|
3
|
-
import { SUBSCRIBE_EVENTS as SCENARIO_EVENTS } from "@vnejs/contracts.core.scenario";
|
|
4
3
|
import { spyEvent, stubEvent } from "@vnejs/test-utils";
|
|
5
4
|
|
|
5
|
+
import { SUBSCRIBE_EVENTS as SCENARIO_EVENTS } from "@vnejs/contracts.core.scenario";
|
|
6
|
+
|
|
6
7
|
import { Random } from "../modules/random.js";
|
|
8
|
+
|
|
7
9
|
import { createRandomTestModule, registerRandomPluginVne } from "./setup.js";
|
|
8
10
|
|
|
9
11
|
describe("Random", () => {
|
package/src/tests/setup.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CONSTANTS, PLUGIN_NAME } from "@vnejs/contracts.scenario.random";
|
|
2
1
|
import { createCoreGlobalState, createTestModule, registerCoreVne, registerVnePlugin } from "@vnejs/test-utils";
|
|
3
2
|
|
|
3
|
+
import { CONSTANTS, PLUGIN_NAME } from "@vnejs/contracts.scenario.random";
|
|
4
|
+
|
|
4
5
|
export const registerRandomPluginVne = () => {
|
|
5
6
|
registerCoreVne();
|
|
6
7
|
registerVnePlugin(PLUGIN_NAME, { constants: CONSTANTS });
|
package/src/types.ts
CHANGED