@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 +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/tests/setup.ts +7 -1
- package/src/types.ts +1 -3
- package/tsconfig.json +2 -8
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
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
|
};
|
package/src/tests/setup.ts
CHANGED
|
@@ -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 {
|
|
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