@vnejs/compatibility.scenario.point_and_click-with-vars.counters 0.2.1 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ type PointAndClickExecHandler = (payload: {
4
4
  line?: string;
5
5
  keywords?: string[];
6
6
  }) => unknown;
7
- export declare class CompatibilityPointAndClickCounters extends ModuleCore<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
7
+ export declare class CompatibilityScenarioPointAndClickWithVarsCounters extends ModuleCore<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
8
8
  name: string;
9
9
  init: () => Promise<unknown[]> | undefined;
10
10
  onPointAndClickExec: ({ line, keywords }?: Parameters<PointAndClickExecHandler>[0]) => Promise<unknown> | undefined;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ModuleCore } from "@vnejs/module.core";
2
2
  import { regModule } from "@vnejs/shared";
3
- export class CompatibilityPointAndClickCounters extends ModuleCore {
3
+ export class CompatibilityScenarioPointAndClickWithVarsCounters extends ModuleCore {
4
4
  name = "compatibility.scenario.point_and_click-with-vars.counters";
5
5
  init = () => this.emit(this.EVENTS.POINT_AND_CLICK.EXEC_REG, {
6
6
  module: this.CONST.VARS_COUNTERS.EXEC_NAME,
@@ -8,4 +8,4 @@ export class CompatibilityPointAndClickCounters extends ModuleCore {
8
8
  });
9
9
  onPointAndClickExec = ({ line = "", keywords = [] } = {}) => this.emitOne(this.EVENTS.VARS_COUNTERS.EXEC_CHECK, { line, keywords });
10
10
  }
11
- regModule(CompatibilityPointAndClickCounters);
11
+ regModule(CompatibilityScenarioPointAndClickWithVarsCounters);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/compatibility.scenario.point_and_click-with-vars.counters",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -10,7 +10,7 @@ type PointAndClickExecRegPayload = {
10
10
  handler?: PointAndClickExecHandler;
11
11
  };
12
12
 
13
- export class CompatibilityPointAndClickCounters extends ModuleCore<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
13
+ export class CompatibilityScenarioPointAndClickWithVarsCounters extends ModuleCore<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
14
14
  name = "compatibility.scenario.point_and_click-with-vars.counters";
15
15
 
16
16
  init = () =>
@@ -23,4 +23,4 @@ export class CompatibilityPointAndClickCounters extends ModuleCore<PluginEvents,
23
23
  this.emitOne(this.EVENTS.VARS_COUNTERS.EXEC_CHECK, { line, keywords });
24
24
  }
25
25
 
26
- regModule(CompatibilityPointAndClickCounters);
26
+ regModule(CompatibilityScenarioPointAndClickWithVarsCounters);
@@ -2,28 +2,28 @@ import { beforeEach, describe, expect, it } from "vitest";
2
2
 
3
3
  import { spyEvent } from "@vnejs/test-utils";
4
4
 
5
- import { CompatibilityPointAndClickCounters } from "../index.js";
5
+ import { CompatibilityScenarioPointAndClickWithVarsCounters } from "../index.js";
6
6
  import { createCompatibilityTestModule, VARS_COUNTERS_CONST, VARS_COUNTERS_EVENTS, PAC_EVENTS, registerCompatibilityVne } from "./setup.js";
7
7
 
8
- describe("CompatibilityPointAndClickCounters", () => {
8
+ describe("CompatibilityScenarioPointAndClickWithVarsCounters", () => {
9
9
  beforeEach(() => registerCompatibilityVne());
10
10
 
11
11
  it("init registers point and click exec handler", async () => {
12
- const { module, observer } = createCompatibilityTestModule(CompatibilityPointAndClickCounters, { subscribe: false });
12
+ const { module, observer } = createCompatibilityTestModule(CompatibilityScenarioPointAndClickWithVarsCounters, { subscribe: false });
13
13
  const execReg = spyEvent(observer, PAC_EVENTS.EXEC_REG);
14
14
 
15
- await (module as CompatibilityPointAndClickCounters).init();
15
+ await (module as CompatibilityScenarioPointAndClickWithVarsCounters).init();
16
16
 
17
17
  expect(execReg).toHaveBeenCalledOnce();
18
18
  expect(execReg.mock.calls[0]?.[0]).toMatchObject({ module: VARS_COUNTERS_CONST.EXEC_NAME });
19
19
  });
20
20
 
21
21
  it("registered handler emits EXEC_CHECK", async () => {
22
- const { module, observer } = createCompatibilityTestModule(CompatibilityPointAndClickCounters, { subscribe: false });
22
+ const { module, observer } = createCompatibilityTestModule(CompatibilityScenarioPointAndClickWithVarsCounters, { subscribe: false });
23
23
  const execReg = spyEvent(observer, PAC_EVENTS.EXEC_REG);
24
24
  const execCheck = spyEvent(observer, VARS_COUNTERS_EVENTS.EXEC_CHECK);
25
25
 
26
- await (module as CompatibilityPointAndClickCounters).init();
26
+ await (module as CompatibilityScenarioPointAndClickWithVarsCounters).init();
27
27
 
28
28
  const handler = execReg.mock.calls[0]?.[0]?.handler as (payload: { line?: string; keywords?: string[] }) => unknown;
29
29
  await handler({ line: "line", keywords: ["a"] });