Socket
Socket
Sign inDemoInstall

@salutejs/scenario

Package Overview
Dependencies
Maintainers
3
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salutejs/scenario - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

9

dist/lib/createSaluteResponse.js

@@ -121,6 +121,13 @@ "use strict";

},
setPronounceText: function (text) {
setPronounceText: function (text, options) {
if (options === void 0) { options = { ssml: false }; }
if (message.messageName !== 'ANSWER_TO_USER') {
throw new Error('Wrong message type');
}
if (options.ssml) {
if (!/^<speak>.*<\/speak>$/gi.test(text)) {
text = '<speak>' + text + '</speak>';
}
message.payload.pronounceTextType = 'application/ssml';
}
message.payload.pronounceText = text;

@@ -127,0 +134,0 @@ },

@@ -68,2 +68,9 @@ "use strict";

req.variant.slots.forEach(function (slot) {
if (slot.array) {
if (typeof req.variables[slot.name] === 'undefined') {
req.setVariable(slot.name, []);
}
req.variables[slot.name].push(slot.value);
return;
}
req.setVariable(slot.name, slot.value);

@@ -70,0 +77,0 @@ });

4

dist/lib/createUserScenario.d.ts
import { SaluteRequest, ScenarioSchema } from '@salutejs/types';
export declare function createUserScenario<R extends SaluteRequest = SaluteRequest>(scenarioSchema: ScenarioSchema): {
getByPath: (path: string[]) => {
match: (req: SaluteRequest<Record<string, unknown>, import("@salutejs/types").AppState, {
match: (req: SaluteRequest<Record<string, string>, import("@salutejs/types").AppState, {
payload: unknown;

@@ -9,3 +9,3 @@ type: string;

schema?: string | undefined;
handle: import("@salutejs/types").SaluteHandler<SaluteRequest<Record<string, unknown>, import("@salutejs/types").AppState, {
handle: import("@salutejs/types").SaluteHandler<SaluteRequest<Record<string, string>, import("@salutejs/types").AppState, {
payload: unknown;

@@ -12,0 +12,0 @@ type: string;

@@ -59,3 +59,3 @@ "use strict";

var _a;
var result = re.exec((_a = req.message) === null || _a === void 0 ? void 0 : _a.original_text);
var result = re.exec((_a = req.message) === null || _a === void 0 ? void 0 : _a.human_normalized_text);
if (result === null) {

@@ -62,0 +62,0 @@ return false;

{
"name": "@salutejs/scenario",
"version": "0.6.0",
"version": "0.7.0",
"description": "Tiny helpers to make scenario for Salute family",

@@ -35,6 +35,6 @@ "author": "SberDevices Frontend Team <sberdevices.frontend@gmail.com>",

"dependencies": {
"@salutejs/types": "0.6.0",
"@salutejs/types": "0.7.0",
"node-fetch": "2.6.1"
},
"gitHead": "6967e37ba23ba2afdc6333afa3bf0b27e8383b59"
"gitHead": "825720db74b088d4f7e1123b0f34febb1afbfa82"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc