@vnejs/plugins.platform.metric 0.0.9 → 0.1.1
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/yandex.d.ts +2 -2
- package/dist/modules/yandex.js +2 -2
- package/dist/types.d.ts +5 -6
- package/package.json +4 -4
- package/src/modules/yandex.ts +2 -2
- package/src/types.ts +5 -8
package/dist/modules/yandex.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import type { StackEmitPayload } from "@vnejs/plugins.core.stack.contract";
|
|
3
3
|
import type { MetricPluginConstants, MetricPluginEvents, MetricPluginParams, MetricPluginSettings } from "../types.js";
|
|
4
|
-
export declare class YaMetrika extends
|
|
4
|
+
export declare class YaMetrika extends ModuleCore<MetricPluginEvents, MetricPluginConstants, MetricPluginSettings, MetricPluginParams> {
|
|
5
5
|
name: string;
|
|
6
6
|
subscribe: () => void;
|
|
7
7
|
init: () => void;
|
package/dist/modules/yandex.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import { initYandexMetrika } from "../utils/metric.js";
|
|
3
|
-
export class YaMetrika extends
|
|
3
|
+
export class YaMetrika extends ModuleCore {
|
|
4
4
|
name = "ya-metrika";
|
|
5
5
|
subscribe = () => {
|
|
6
6
|
if (!this.PARAMS.METRIC.YA_COUNTER_ID)
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { PluginName as StackPluginName, SubscribeEvents as StackSubscribeEvents } from "@vnejs/plugins.core.stack.contract";
|
|
1
|
+
import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
|
|
3
2
|
import type { PluginName, Params, SubscribeEvents } from "@vnejs/plugins.platform.metric.contract";
|
|
4
|
-
export type MetricPluginEvents =
|
|
5
|
-
export type MetricPluginConstants =
|
|
6
|
-
export type MetricPluginSettings =
|
|
7
|
-
export type MetricPluginParams =
|
|
3
|
+
export type MetricPluginEvents = ModuleCoreEvents & Record<PluginName, SubscribeEvents>;
|
|
4
|
+
export type MetricPluginConstants = ModuleCoreConstants;
|
|
5
|
+
export type MetricPluginSettings = ModuleCoreSettings;
|
|
6
|
+
export type MetricPluginParams = ModuleCoreParams & Record<PluginName, Params>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.platform.metric",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "ISC",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@vnejs/plugins.platform.metric.contract": "~0.0
|
|
33
|
+
"@vnejs/plugins.platform.metric.contract": "~0.1.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@vnejs/module": "~0.1.0",
|
|
37
|
-
"@vnejs/plugins.core.stack.contract": "~0.0
|
|
36
|
+
"@vnejs/module.core": "~0.1.0",
|
|
37
|
+
"@vnejs/plugins.core.stack.contract": "~0.1.0",
|
|
38
38
|
"@vnejs/shared": "~0.1.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
package/src/modules/yandex.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import type { StackEmitPayload } from "@vnejs/plugins.core.stack.contract";
|
|
3
3
|
|
|
4
4
|
import type { MetricPluginConstants, MetricPluginEvents, MetricPluginParams, MetricPluginSettings } from "../types.js";
|
|
5
5
|
import { initYandexMetrika } from "../utils/metric.js";
|
|
6
6
|
|
|
7
|
-
export class YaMetrika extends
|
|
7
|
+
export class YaMetrika extends ModuleCore<MetricPluginEvents, MetricPluginConstants, MetricPluginSettings, MetricPluginParams> {
|
|
8
8
|
name = "ya-metrika";
|
|
9
9
|
|
|
10
10
|
subscribe = () => {
|
package/src/types.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { PluginName as StackPluginName, SubscribeEvents as StackSubscribeEvents } from "@vnejs/plugins.core.stack.contract";
|
|
1
|
+
import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
|
|
3
2
|
import type { PluginName, Params, SubscribeEvents } from "@vnejs/plugins.platform.metric.contract";
|
|
4
3
|
|
|
5
|
-
export type MetricPluginEvents =
|
|
6
|
-
Record<PluginName, SubscribeEvents> &
|
|
7
|
-
Record<StackPluginName, StackSubscribeEvents>;
|
|
4
|
+
export type MetricPluginEvents = ModuleCoreEvents & Record<PluginName, SubscribeEvents>;
|
|
8
5
|
|
|
9
|
-
export type MetricPluginConstants =
|
|
6
|
+
export type MetricPluginConstants = ModuleCoreConstants;
|
|
10
7
|
|
|
11
|
-
export type MetricPluginSettings =
|
|
8
|
+
export type MetricPluginSettings = ModuleCoreSettings;
|
|
12
9
|
|
|
13
|
-
export type MetricPluginParams =
|
|
10
|
+
export type MetricPluginParams = ModuleCoreParams & Record<PluginName, Params>;
|