@vnejs/plugins.vars.counters 0.1.17 → 0.1.19
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.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/modules/exec.js +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/utils/counters.d.ts +1 -1
- package/package.json +3 -3
- package/src/index.ts +2 -2
- package/src/modules/exec.ts +2 -2
- package/src/types.ts +2 -2
- package/src/utils/counters.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "@vnejs/
|
|
1
|
+
import "@vnejs/contracts.vars.counters";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "@vnejs/
|
|
1
|
+
import "@vnejs/contracts.vars.counters";
|
|
2
2
|
import { regPlugin } from "@vnejs/shared";
|
|
3
|
-
import { CONSTANTS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/
|
|
3
|
+
import { CONSTANTS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.vars.counters";
|
|
4
4
|
import { Counters } from "./modules/counters.js";
|
|
5
5
|
import { CountersExec } from "./modules/exec.js";
|
|
6
6
|
regPlugin(PLUGIN_NAME, { constants: CONSTANTS, events: SUBSCRIBE_EVENTS }, [Counters, CountersExec]);
|
package/dist/modules/exec.js
CHANGED
|
@@ -10,12 +10,12 @@ export class CountersExec extends ModuleCore {
|
|
|
10
10
|
const { name = "", action = "", execValue = 0, value = 0, isGlobal = false } = execInfo;
|
|
11
11
|
const newValue = Number(await this.emitOne(this.EVENTS.VARS_COUNTERS.CHANGE, { value, execValue, action }));
|
|
12
12
|
await this.emit(this.EVENTS.VARS_COUNTERS.SET, { name, isGlobal, value: newValue });
|
|
13
|
-
this.
|
|
13
|
+
this.emitNext();
|
|
14
14
|
};
|
|
15
15
|
onLineExecBlock = async ({ line = "", keywords = [] } = {}) => {
|
|
16
16
|
const { action = "", execValue = 0, value = 0 } = (await this.emitOne(this.EVENTS.VARS_COUNTERS.EXEC_INFO, { line, keywords }));
|
|
17
17
|
const shouldGoInside = Boolean(await this.emitOne(this.EVENTS.VARS_COUNTERS.COMPARE, { value, execValue, action }));
|
|
18
18
|
await this.emit(this.EVENTS.VARS.SCENARIO, { shouldGoInside });
|
|
19
|
-
this.
|
|
19
|
+
this.emitNext();
|
|
20
20
|
};
|
|
21
21
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
|
|
2
|
-
import type { PluginName as VarsPluginName, SubscribeEvents as VarsSubscribeEvents } from "@vnejs/
|
|
3
|
-
import type { Constants, PluginName, SubscribeEvents } from "@vnejs/
|
|
2
|
+
import type { PluginName as VarsPluginName, SubscribeEvents as VarsSubscribeEvents } from "@vnejs/contracts.vars";
|
|
3
|
+
import type { Constants, PluginName, SubscribeEvents } from "@vnejs/contracts.vars.counters";
|
|
4
4
|
export type CountersPluginEvents = ModuleCoreEvents & Record<PluginName, SubscribeEvents> & Record<VarsPluginName, VarsSubscribeEvents>;
|
|
5
5
|
export type CountersPluginConstants = ModuleCoreConstants & Record<PluginName, Constants>;
|
|
6
6
|
export type CountersPluginSettings = ModuleCoreSettings;
|
package/dist/utils/counters.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ModuleGlobalStateRegistry } from "@vnejs/module.core";
|
|
2
|
-
import type { VarValue, VarsGetPayload } from "@vnejs/
|
|
2
|
+
import type { VarValue, VarsGetPayload } from "@vnejs/contracts.vars";
|
|
3
3
|
export type CountersSetPayload = {
|
|
4
4
|
name?: string;
|
|
5
5
|
isGlobal?: boolean;
|
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.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "ISC",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@vnejs/
|
|
33
|
+
"@vnejs/contracts.vars.counters": "~0.1.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@vnejs/helpers": "~0.1.0",
|
|
37
37
|
"@vnejs/module.core": "~0.1.0",
|
|
38
|
-
"@vnejs/
|
|
38
|
+
"@vnejs/contracts.vars": "~0.1.0",
|
|
39
39
|
"@vnejs/shared": "~0.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "@vnejs/
|
|
1
|
+
import "@vnejs/contracts.vars.counters";
|
|
2
2
|
|
|
3
3
|
import { regPlugin } from "@vnejs/shared";
|
|
4
|
-
import { CONSTANTS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/
|
|
4
|
+
import { CONSTANTS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.vars.counters";
|
|
5
5
|
|
|
6
6
|
import { Counters } from "./modules/counters.js";
|
|
7
7
|
import { CountersExec } from "./modules/exec.js";
|
package/src/modules/exec.ts
CHANGED
|
@@ -22,7 +22,7 @@ export class CountersExec extends ModuleCore<CountersPluginEvents, CountersPlugi
|
|
|
22
22
|
|
|
23
23
|
await this.emit(this.EVENTS.VARS_COUNTERS.SET, { name, isGlobal, value: newValue } satisfies CountersSetPayload);
|
|
24
24
|
|
|
25
|
-
this.
|
|
25
|
+
this.emitNext();
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
onLineExecBlock = async ({ line = "", keywords = [] }: LineExecHandlerArg = {}) => {
|
|
@@ -32,6 +32,6 @@ export class CountersExec extends ModuleCore<CountersPluginEvents, CountersPlugi
|
|
|
32
32
|
|
|
33
33
|
await this.emit(this.EVENTS.VARS.SCENARIO, { shouldGoInside });
|
|
34
34
|
|
|
35
|
-
this.
|
|
35
|
+
this.emitNext();
|
|
36
36
|
};
|
|
37
37
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
|
|
2
|
-
import type { PluginName as VarsPluginName, SubscribeEvents as VarsSubscribeEvents } from "@vnejs/
|
|
3
|
-
import type { Constants, PluginName, SubscribeEvents } from "@vnejs/
|
|
2
|
+
import type { PluginName as VarsPluginName, SubscribeEvents as VarsSubscribeEvents } from "@vnejs/contracts.vars";
|
|
3
|
+
import type { Constants, PluginName, SubscribeEvents } from "@vnejs/contracts.vars.counters";
|
|
4
4
|
|
|
5
5
|
export type CountersPluginEvents = ModuleCoreEvents & Record<PluginName, SubscribeEvents> & Record<VarsPluginName, VarsSubscribeEvents>;
|
|
6
6
|
|
package/src/utils/counters.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ModuleGlobalStateRegistry } from "@vnejs/module.core";
|
|
2
|
-
import type { VarValue, VarsGetPayload } from "@vnejs/
|
|
2
|
+
import type { VarValue, VarsGetPayload } from "@vnejs/contracts.vars";
|
|
3
3
|
|
|
4
4
|
export type CountersSetPayload = {
|
|
5
5
|
name?: string;
|