@vnejs/plugins.vars.counters 0.1.16 → 0.1.17
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/modules/counters.d.ts +2 -2
- package/dist/modules/counters.js +2 -2
- package/dist/modules/exec.d.ts +3 -3
- package/dist/modules/exec.js +2 -2
- package/dist/types.d.ts +5 -6
- package/dist/utils/counters.d.ts +1 -1
- package/package.json +2 -3
- package/src/modules/counters.ts +2 -2
- package/src/modules/exec.ts +3 -3
- package/src/types.ts +5 -12
- package/src/utils/counters.ts +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import type { CountersPluginConstants, CountersPluginEvents, CountersPluginParams, CountersPluginSettings } from "../types.js";
|
|
3
3
|
import type { CountersChangePayload, CountersComparePayload, CountersExecCheckPayload, CountersExecInfoPayload, CountersExecInfoResult, CountersGetPayload, CountersSetPayload } from "../utils/counters.js";
|
|
4
4
|
type ChangeHandler = (oldValue?: number, value?: number) => number;
|
|
5
5
|
type CompareHandler = (oldValue?: number, value?: number) => boolean;
|
|
6
|
-
export declare class Counters extends
|
|
6
|
+
export declare class Counters extends ModuleCore<CountersPluginEvents, CountersPluginConstants, CountersPluginSettings, CountersPluginParams> {
|
|
7
7
|
name: string;
|
|
8
8
|
varsChangeHandlers: Record<string, ChangeHandler>;
|
|
9
9
|
varsCompareHandlers: Record<string, CompareHandler>;
|
package/dist/modules/counters.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import { tokenizeExecLine } from "@vnejs/helpers";
|
|
3
|
-
export class Counters extends
|
|
3
|
+
export class Counters extends ModuleCore {
|
|
4
4
|
name = "vars.counters";
|
|
5
5
|
varsChangeHandlers = {
|
|
6
6
|
[this.CONST.VARS_COUNTERS.CHANGE_ACTIONS.SET]: (oldValue = 0, value = 0) => value,
|
package/dist/modules/exec.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { LineExecHandlerArg } from "@vnejs/
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
|
+
import type { LineExecHandlerArg } from "@vnejs/module.core";
|
|
3
3
|
import type { CountersPluginConstants, CountersPluginEvents, CountersPluginParams, CountersPluginSettings } from "../types.js";
|
|
4
|
-
export declare class CountersExec extends
|
|
4
|
+
export declare class CountersExec extends ModuleCore<CountersPluginEvents, CountersPluginConstants, CountersPluginSettings, CountersPluginParams> {
|
|
5
5
|
name: string;
|
|
6
6
|
init: () => Promise<[unknown[] | undefined, unknown[] | undefined]>;
|
|
7
7
|
onLineExecModule: ({ line, keywords }?: LineExecHandlerArg) => Promise<void>;
|
package/dist/modules/exec.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export class CountersExec extends
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
|
+
export class CountersExec extends ModuleCore {
|
|
3
3
|
name = "vars.counters.exec";
|
|
4
4
|
init = () => Promise.all([
|
|
5
5
|
this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { block: this.CONST.VARS_COUNTERS.EXEC_NAME, handler: this.onLineExecBlock }),
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Constants as ScenarioConstants, PluginName as ScenarioPluginName, SubscribeEvents as ScenarioSubscribeEvents } from "@vnejs/plugins.core.scenario.contract";
|
|
1
|
+
import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
|
|
3
2
|
import type { PluginName as VarsPluginName, SubscribeEvents as VarsSubscribeEvents } from "@vnejs/plugins.vars.contract";
|
|
4
3
|
import type { Constants, PluginName, SubscribeEvents } from "@vnejs/plugins.vars.counters.contract";
|
|
5
|
-
export type CountersPluginEvents =
|
|
6
|
-
export type CountersPluginConstants =
|
|
7
|
-
export type CountersPluginSettings =
|
|
8
|
-
export type CountersPluginParams =
|
|
4
|
+
export type CountersPluginEvents = ModuleCoreEvents & Record<PluginName, SubscribeEvents> & Record<VarsPluginName, VarsSubscribeEvents>;
|
|
5
|
+
export type CountersPluginConstants = ModuleCoreConstants & Record<PluginName, Constants>;
|
|
6
|
+
export type CountersPluginSettings = ModuleCoreSettings;
|
|
7
|
+
export type CountersPluginParams = ModuleCoreParams;
|
package/dist/utils/counters.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.vars.counters",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@vnejs/helpers": "~0.1.0",
|
|
37
|
-
"@vnejs/module": "~0.1.0",
|
|
38
|
-
"@vnejs/plugins.core.scenario.contract": "~0.1.0",
|
|
37
|
+
"@vnejs/module.core": "~0.1.0",
|
|
39
38
|
"@vnejs/plugins.vars.contract": "~0.1.0",
|
|
40
39
|
"@vnejs/shared": "~0.1.0"
|
|
41
40
|
},
|
package/src/modules/counters.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import { tokenizeExecLine } from "@vnejs/helpers";
|
|
3
3
|
|
|
4
4
|
import type { CountersPluginConstants, CountersPluginEvents, CountersPluginParams, CountersPluginSettings } from "../types.js";
|
|
@@ -16,7 +16,7 @@ import type {
|
|
|
16
16
|
type ChangeHandler = (oldValue?: number, value?: number) => number;
|
|
17
17
|
type CompareHandler = (oldValue?: number, value?: number) => boolean;
|
|
18
18
|
|
|
19
|
-
export class Counters extends
|
|
19
|
+
export class Counters extends ModuleCore<CountersPluginEvents, CountersPluginConstants, CountersPluginSettings, CountersPluginParams> {
|
|
20
20
|
name = "vars.counters";
|
|
21
21
|
|
|
22
22
|
varsChangeHandlers: Record<string, ChangeHandler> = {
|
package/src/modules/exec.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
|
|
3
|
-
import type { LineExecHandlerArg } from "@vnejs/
|
|
3
|
+
import type { LineExecHandlerArg } from "@vnejs/module.core";
|
|
4
4
|
|
|
5
5
|
import type { CountersPluginConstants, CountersPluginEvents, CountersPluginParams, CountersPluginSettings } from "../types.js";
|
|
6
6
|
import type { CountersExecInfoResult, CountersSetPayload } from "../utils/counters.js";
|
|
7
7
|
|
|
8
|
-
export class CountersExec extends
|
|
8
|
+
export class CountersExec extends ModuleCore<CountersPluginEvents, CountersPluginConstants, CountersPluginSettings, CountersPluginParams> {
|
|
9
9
|
name = "vars.counters.exec";
|
|
10
10
|
|
|
11
11
|
init = () =>
|
package/src/types.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Constants as ScenarioConstants, PluginName as ScenarioPluginName, SubscribeEvents as ScenarioSubscribeEvents } from "@vnejs/plugins.core.scenario.contract";
|
|
1
|
+
import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
|
|
3
2
|
import type { PluginName as VarsPluginName, SubscribeEvents as VarsSubscribeEvents } from "@vnejs/plugins.vars.contract";
|
|
4
3
|
import type { Constants, PluginName, SubscribeEvents } from "@vnejs/plugins.vars.counters.contract";
|
|
5
4
|
|
|
6
|
-
export type CountersPluginEvents =
|
|
7
|
-
Record<PluginName, SubscribeEvents> &
|
|
8
|
-
Record<VarsPluginName, VarsSubscribeEvents> &
|
|
9
|
-
Record<ScenarioPluginName, ScenarioSubscribeEvents>;
|
|
5
|
+
export type CountersPluginEvents = ModuleCoreEvents & Record<PluginName, SubscribeEvents> & Record<VarsPluginName, VarsSubscribeEvents>;
|
|
10
6
|
|
|
11
|
-
export type CountersPluginConstants =
|
|
12
|
-
Record<PluginName, Constants> &
|
|
13
|
-
Record<ScenarioPluginName, ScenarioConstants> &
|
|
14
|
-
Record<VarsPluginName, VnePluginConstantsMapRegistry[VarsPluginName]>;
|
|
7
|
+
export type CountersPluginConstants = ModuleCoreConstants & Record<PluginName, Constants>;
|
|
15
8
|
|
|
16
|
-
export type CountersPluginSettings =
|
|
9
|
+
export type CountersPluginSettings = ModuleCoreSettings;
|
|
17
10
|
|
|
18
|
-
export type CountersPluginParams =
|
|
11
|
+
export type CountersPluginParams = ModuleCoreParams;
|
package/src/utils/counters.ts
CHANGED