@vnejs/compatibility.text-with-audio.voice 0.2.0 → 0.2.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/index.js CHANGED
@@ -53,7 +53,7 @@ export class CompatibilityTextVoice extends ModuleCore {
53
53
  };
54
54
  getDefaultState = () => ({ currentName: "" });
55
55
  getVoiceFromPayload = ({ args = {}, isExtend = false, texts = [] } = {}) => {
56
- const lineArgs = isExtend && texts.length ? texts[texts.length - 1]?.args ?? {} : args;
56
+ const lineArgs = isExtend && texts.length ? (texts[texts.length - 1]?.args ?? {}) : args;
57
57
  return this.getVoiceArg(lineArgs);
58
58
  };
59
59
  getVoiceArg = (args = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/compatibility.text-with-audio.voice",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -82,7 +82,7 @@ export class CompatibilityTextVoice extends ModuleCore<PluginEvents, PluginConst
82
82
  getDefaultState = (): CompatState => ({ currentName: "" });
83
83
 
84
84
  getVoiceFromPayload = ({ args = {}, isExtend = false, texts = [] }: TextEmitPayload = {}) => {
85
- const lineArgs = isExtend && texts.length ? texts[texts.length - 1]?.args ?? {} : args;
85
+ const lineArgs = isExtend && texts.length ? (texts[texts.length - 1]?.args ?? {}) : args;
86
86
 
87
87
  return this.getVoiceArg(lineArgs);
88
88
  };
@@ -1,6 +1,12 @@
1
1
  import { SUBSCRIBE_EVENTS as AUDIO_EVENTS, PLUGIN_NAME as AUDIO } from "@vnejs/contracts.audio";
2
2
  import { CONSTANTS as VOICE_CONST, PARAMS as VOICE_PARAMS, PLUGIN_NAME as VOICE, SETTINGS_KEYS as VOICE_SETTINGS } from "@vnejs/contracts.audio.voice";
3
- import { CONSTANTS as TEXT_CONST, PARAMS as TEXT_PARAMS, PLUGIN_NAME as TEXT, SETTINGS_KEYS as TEXT_SETTINGS, SUBSCRIBE_EVENTS as TEXT_EVENTS } from "@vnejs/contracts.text";
3
+ import {
4
+ CONSTANTS as TEXT_CONST,
5
+ PARAMS as TEXT_PARAMS,
6
+ PLUGIN_NAME as TEXT,
7
+ SETTINGS_KEYS as TEXT_SETTINGS,
8
+ SUBSCRIBE_EVENTS as TEXT_EVENTS,
9
+ } from "@vnejs/contracts.text";
4
10
  import { createTestModule as baseCreateTestModule, registerCoreVne, registerVnePlugin } from "@vnejs/test-utils";
5
11
  import { SourcesSet } from "@vnejs/sources-set";
6
12
 
package/src/types.ts CHANGED
@@ -3,9 +3,7 @@ import type { Constants as AudioConstants, PluginName as AudioPluginName, Subscr
3
3
  import type { Constants as VoiceConstants, PluginName as VoicePluginName } from "@vnejs/contracts.audio.voice";
4
4
  import type { Constants as TextConstants, PluginName as TextPluginName, SubscribeEvents as TextSubscribeEvents } from "@vnejs/contracts.text";
5
5
 
6
- export type PluginEvents = ModuleCoreEvents &
7
- Record<TextPluginName, TextSubscribeEvents> &
8
- Record<AudioPluginName, AudioSubscribeEvents>;
6
+ export type PluginEvents = ModuleCoreEvents & Record<TextPluginName, TextSubscribeEvents> & Record<AudioPluginName, AudioSubscribeEvents>;
9
7
 
10
8
  export type PluginConstants = ModuleCoreConstants &
11
9
  Record<TextPluginName, TextConstants> &
package/tsconfig.json CHANGED
@@ -4,12 +4,6 @@
4
4
  "rootDir": "src",
5
5
  "outDir": "dist"
6
6
  },
7
- "include": [
8
- "src/**/*.ts"
9
- ],
10
- "exclude": [
11
- "dist",
12
- "node_modules",
13
- "src/tests"
14
- ]
7
+ "include": ["src/**/*.ts"],
8
+ "exclude": ["dist", "node_modules", "src/tests"]
15
9
  }