@vnejs/plugins.settings.volume 0.1.2 → 0.1.4

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.
@@ -0,0 +1 @@
1
+ import "@vnejs/plugins.settings.volume.contract";
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import "@vnejs/plugins.settings.volume.contract";
2
+ import { regPlugin } from "@vnejs/shared";
3
+ import { PLUGIN_NAME, SETTINGS_KEYS } from "@vnejs/plugins.settings.volume.contract";
4
+ import { Volume } from "./modules/volume.js";
5
+ regPlugin(PLUGIN_NAME, { settings: SETTINGS_KEYS }, [Volume]);
@@ -0,0 +1,6 @@
1
+ import { Module } from "@vnejs/module";
2
+ import type { VolumePluginConstants, VolumePluginEvents, VolumePluginParams, VolumePluginSettings } from "../types.js";
3
+ export declare class Volume extends Module<VolumePluginEvents, VolumePluginConstants, VolumePluginSettings, VolumePluginParams> {
4
+ name: string;
5
+ init: () => Promise<unknown[]> | undefined;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { Module } from "@vnejs/module";
2
+ export class Volume extends Module {
3
+ name = "volume";
4
+ init = () => this.emit(this.EVENTS.SETTINGS.INIT, { name: this.SETTINGS.VOLUME.VALUE, value: 100 });
5
+ }
@@ -0,0 +1,7 @@
1
+ import type { VnePluginConstantsMapRegistry, VnePluginEventsMapRegistry, VnePluginParamsMapRegistry, VnePluginSettingsMapRegistry } from "@vnejs/shared";
2
+ import type { PluginName as SettingsPluginName, SubscribeEvents as SettingsSubscribeEvents } from "@vnejs/plugins.core.settings.contract";
3
+ import type { PluginName, SettingsKeys } from "@vnejs/plugins.settings.volume.contract";
4
+ export type VolumePluginEvents = VnePluginEventsMapRegistry & Record<SettingsPluginName, SettingsSubscribeEvents>;
5
+ export type VolumePluginConstants = VnePluginConstantsMapRegistry;
6
+ export type VolumePluginSettings = VnePluginSettingsMapRegistry & Record<PluginName, SettingsKeys>;
7
+ export type VolumePluginParams = VnePluginParamsMapRegistry;
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,17 +1,43 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.settings.volume",
3
- "version": "0.1.2",
4
- "main": "index.js",
3
+ "version": "0.1.4",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "src",
18
+ "tsconfig.json"
19
+ ],
5
20
  "scripts": {
6
21
  "test": "echo \"Error: no test specified\" && exit 1",
22
+ "build": "npx @vnejs/monorepo package",
7
23
  "publish:major:plugin": "npm run publish:major",
8
24
  "publish:minor:plugin": "npm run publish:minor",
9
25
  "publish:patch:plugin": "npm run publish:patch",
10
- "publish:major": "npm version major && npm publish --access public",
11
- "publish:minor": "npm version minor && npm publish --access public",
12
- "publish:patch": "npm version patch && npm publish --access public"
26
+ "publish:major": "npx @vnejs/monorepo publish major --access public",
27
+ "publish:minor": "npx @vnejs/monorepo publish minor --access public",
28
+ "publish:patch": "npx @vnejs/monorepo publish patch --access public"
13
29
  },
14
30
  "author": "",
15
31
  "license": "ISC",
16
- "description": ""
32
+ "dependencies": {
33
+ "@vnejs/plugins.settings.volume.contract": "~0.0.1"
34
+ },
35
+ "peerDependencies": {
36
+ "@vnejs/module": "~0.0.1",
37
+ "@vnejs/plugins.core.settings.contract": "~0.0.1",
38
+ "@vnejs/shared": "~0.0.9"
39
+ },
40
+ "devDependencies": {
41
+ "@vnejs/configs.ts-common": "~0.0.1"
42
+ }
17
43
  }
package/src/index.ts ADDED
@@ -0,0 +1,8 @@
1
+ import "@vnejs/plugins.settings.volume.contract";
2
+
3
+ import { regPlugin } from "@vnejs/shared";
4
+ import { PLUGIN_NAME, SETTINGS_KEYS } from "@vnejs/plugins.settings.volume.contract";
5
+
6
+ import { Volume } from "./modules/volume.js";
7
+
8
+ regPlugin(PLUGIN_NAME, { settings: SETTINGS_KEYS }, [Volume]);
@@ -0,0 +1,9 @@
1
+ import { Module } from "@vnejs/module";
2
+
3
+ import type { VolumePluginConstants, VolumePluginEvents, VolumePluginParams, VolumePluginSettings } from "../types.js";
4
+
5
+ export class Volume extends Module<VolumePluginEvents, VolumePluginConstants, VolumePluginSettings, VolumePluginParams> {
6
+ name = "volume";
7
+
8
+ init = () => this.emit(this.EVENTS.SETTINGS.INIT, { name: this.SETTINGS.VOLUME.VALUE, value: 100 });
9
+ }
package/src/types.ts ADDED
@@ -0,0 +1,11 @@
1
+ import type { VnePluginConstantsMapRegistry, VnePluginEventsMapRegistry, VnePluginParamsMapRegistry, VnePluginSettingsMapRegistry } from "@vnejs/shared";
2
+ import type { PluginName as SettingsPluginName, SubscribeEvents as SettingsSubscribeEvents } from "@vnejs/plugins.core.settings.contract";
3
+ import type { PluginName, SettingsKeys } from "@vnejs/plugins.settings.volume.contract";
4
+
5
+ export type VolumePluginEvents = VnePluginEventsMapRegistry & Record<SettingsPluginName, SettingsSubscribeEvents>;
6
+
7
+ export type VolumePluginConstants = VnePluginConstantsMapRegistry;
8
+
9
+ export type VolumePluginSettings = VnePluginSettingsMapRegistry & Record<PluginName, SettingsKeys>;
10
+
11
+ export type VolumePluginParams = VnePluginParamsMapRegistry;
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@vnejs/configs.ts-common/tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist"
6
+ },
7
+ "include": ["src/**/*.ts"],
8
+ "exclude": ["dist", "node_modules"]
9
+ }
package/const/settings.js DELETED
@@ -1,3 +0,0 @@
1
- export const SETTINGS_KEYS = {
2
- VALUE: "vne:volume:value",
3
- };
package/index.js DELETED
@@ -1,7 +0,0 @@
1
- import { regPlugin } from "@vnejs/shared";
2
-
3
- import { SETTINGS_KEYS } from "./const/settings";
4
-
5
- import { Volume } from "./modules/volume";
6
-
7
- regPlugin("VOLUME", { settings: SETTINGS_KEYS }, [Volume]);
package/modules/volume.js DELETED
@@ -1,7 +0,0 @@
1
- import { Module } from "@vnejs/module";
2
-
3
- export class Volume extends Module {
4
- name = "volume";
5
-
6
- init = () => this.emit(this.EVENTS.SETTINGS.INIT, { name: this.SETTINGS.VOLUME.VALUE, value: 100 });
7
- }