Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botbuilder

Package Overview
Dependencies
Maintainers
1
Versions
631
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botbuilder - npm Package Compare versions

Comparing version 3.5.2 to 3.5.3

66

lib/botbuilder.js
"use strict";
var Session = require('./Session');
var Message = require('./Message');
var Dialog = require('./dialogs/Dialog');
var DialogAction = require('./dialogs/DialogAction');
var Prompts = require('./dialogs/Prompts');
var SimpleDialog = require('./dialogs/SimpleDialog');
var EntityRecognizer = require('./dialogs/EntityRecognizer');
var Library = require('./bots/Library');
var UniversalBot = require('./bots/UniversalBot');
var ChatConnector = require('./bots/ChatConnector');
var ConsoleConnector = require('./bots/ConsoleConnector');
var BotStorage = require('./storage/BotStorage');
var CardAction = require('./cards/CardAction');
var HeroCard = require('./cards/HeroCard');
var CardImage = require('./cards/CardImage');
var ReceiptCard = require('./cards/ReceiptCard');
var SigninCard = require('./cards/SigninCard');
var ThumbnailCard = require('./cards/ThumbnailCard');
var VideoCard = require('./cards/VideoCard');
var AudioCard = require('./cards/AudioCard');
var AnimationCard = require('./cards/AnimationCard');
var MediaCard = require('./cards/MediaCard');
var CardMedia = require('./cards/CardMedia');
var Keyboard = require('./cards/Keyboard');
var Middleware = require('./middleware/Middleware');
var IntentRecognizerSet = require('./dialogs/IntentRecognizerSet');
var RegExpRecognizer = require('./dialogs/RegExpRecognizer');
var LuisRecognizer = require('./dialogs/LuisRecognizer');
var IntentDialog = require('./dialogs/IntentDialog');
var Session = require("./Session");
var Message = require("./Message");
var Dialog = require("./dialogs/Dialog");
var DialogAction = require("./dialogs/DialogAction");
var Prompts = require("./dialogs/Prompts");
var SimpleDialog = require("./dialogs/SimpleDialog");
var EntityRecognizer = require("./dialogs/EntityRecognizer");
var Library = require("./bots/Library");
var UniversalBot = require("./bots/UniversalBot");
var ChatConnector = require("./bots/ChatConnector");
var ConsoleConnector = require("./bots/ConsoleConnector");
var BotStorage = require("./storage/BotStorage");
var CardAction = require("./cards/CardAction");
var HeroCard = require("./cards/HeroCard");
var CardImage = require("./cards/CardImage");
var ReceiptCard = require("./cards/ReceiptCard");
var SigninCard = require("./cards/SigninCard");
var ThumbnailCard = require("./cards/ThumbnailCard");
var VideoCard = require("./cards/VideoCard");
var AudioCard = require("./cards/AudioCard");
var AnimationCard = require("./cards/AnimationCard");
var MediaCard = require("./cards/MediaCard");
var CardMedia = require("./cards/CardMedia");
var Keyboard = require("./cards/Keyboard");
var Middleware = require("./middleware/Middleware");
var IntentRecognizerSet = require("./dialogs/IntentRecognizerSet");
var RegExpRecognizer = require("./dialogs/RegExpRecognizer");
var LuisRecognizer = require("./dialogs/LuisRecognizer");
var IntentDialog = require("./dialogs/IntentDialog");
exports.Session = Session.Session;

@@ -70,6 +70,6 @@ exports.Message = Message.Message;

exports.Middleware = Middleware.Middleware;
var deprecatedBCB = require('./deprecated/BotConnectorBot');
var deprecatedLD = require('./deprecated/LuisDialog');
var deprecatedCD = require('./deprecated/CommandDialog');
var deprecatedTB = require('./deprecated/TextBot');
var deprecatedBCB = require("./deprecated/BotConnectorBot");
var deprecatedLD = require("./deprecated/LuisDialog");
var deprecatedCD = require("./deprecated/CommandDialog");
var deprecatedTB = require("./deprecated/TextBot");
exports.BotConnectorBot = deprecatedBCB.BotConnectorBot;

@@ -76,0 +76,0 @@ exports.LuisDialog = deprecatedLD.LuisDialog;

"use strict";
var OpenIdMetadata_1 = require('./OpenIdMetadata');
var utils = require('../utils');
var logger = require('../logger');
var consts = require('../consts');
var request = require('request');
var async = require('async');
var url = require('url');
var jwt = require('jsonwebtoken');
var zlib = require('zlib');
var OpenIdMetadata_1 = require("./OpenIdMetadata");
var utils = require("../utils");
var logger = require("../logger");
var consts = require("../consts");
var request = require("request");
var async = require("async");
var url = require("url");
var jwt = require("jsonwebtoken");
var zlib = require("zlib");
var urlJoin = require("url-join");
var pjson = require('../../package.json');
var MAX_DATA_LENGTH = 65000;
var USER_AGENT = "Microsoft-BotFramework/3.0 (BotBuilder Node.js/" + pjson.version + ")";
var USER_AGENT = "Microsoft-BotFramework/3.1 (BotBuilder Node.js/" + pjson.version + ")";
var ChatConnector = (function () {

@@ -158,3 +159,3 @@ function ChatConnector(settings) {

method: 'POST',
url: url.resolve(address.serviceUrl, '/v3/conversations'),
url: urlJoin(address.serviceUrl, '/v3/conversations'),
body: {

@@ -391,3 +392,3 @@ bot: address.bot,

method: 'POST',
url: url.resolve(address.serviceUrl, path),
url: urlJoin(address.serviceUrl, path),
body: msg,

@@ -394,0 +395,0 @@ json: true

"use strict";
var Message_1 = require('../Message');
var utils = require('../utils');
var readline = require('readline');
var Message_1 = require("../Message");
var utils = require("../utils");
var readline = require("readline");
var ConsoleConnector = (function () {

@@ -6,0 +6,0 @@ function ConsoleConnector() {

@@ -7,22 +7,23 @@ "use strict";

};
var SimpleDialog_1 = require('../dialogs/SimpleDialog');
var ActionSet_1 = require('../dialogs/ActionSet');
var IntentRecognizerSet_1 = require('../dialogs/IntentRecognizerSet');
var Session_1 = require('../Session');
var consts = require('../consts');
var utils = require('../utils');
var logger = require('../logger');
var events_1 = require('events');
var path = require('path');
var async = require('async');
var SimpleDialog_1 = require("../dialogs/SimpleDialog");
var ActionSet_1 = require("../dialogs/ActionSet");
var IntentRecognizerSet_1 = require("../dialogs/IntentRecognizerSet");
var Session_1 = require("../Session");
var consts = require("../consts");
var utils = require("../utils");
var logger = require("../logger");
var events_1 = require("events");
var path = require("path");
var async = require("async");
var Library = (function (_super) {
__extends(Library, _super);
function Library(name) {
_super.call(this);
this.name = name;
this.dialogs = {};
this.libraries = {};
this.actions = new ActionSet_1.ActionSet();
this.recognizers = new IntentRecognizerSet_1.IntentRecognizerSet();
this.triggersAdded = false;
var _this = _super.call(this) || this;
_this.name = name;
_this.dialogs = {};
_this.libraries = {};
_this.actions = new ActionSet_1.ActionSet();
_this.recognizers = new IntentRecognizerSet_1.IntentRecognizerSet();
_this.triggersAdded = false;
return _this;
}

@@ -440,11 +441,11 @@ Library.prototype.clone = function (copyTo, newName) {

};
Library.RouteTypes = {
GlobalAction: 'GlobalAction',
StackAction: 'StackAction',
ActiveDialog: 'ActiveDialog'
};
return Library;
}(events_1.EventEmitter));
Library.RouteTypes = {
GlobalAction: 'GlobalAction',
StackAction: 'StackAction',
ActiveDialog: 'ActiveDialog'
};
exports.Library = Library;
exports.systemLib = new Library(consts.Library.system);
exports.systemLib.localePath(path.join(__dirname, '../locale/'));
"use strict";
var logger = require('../logger');
var request = require('request');
var logger = require("../logger");
var request = require("request");
var getPem = require('rsa-pem-from-mod-exp');

@@ -5,0 +5,0 @@ var base64url = require('base64url');

@@ -7,14 +7,14 @@ "use strict";

};
var Library_1 = require('./Library');
var Session_1 = require('../Session');
var DefaultLocalizer_1 = require('../DefaultLocalizer');
var BotStorage_1 = require('../storage/BotStorage');
var consts = require('../consts');
var utils = require('../utils');
var async = require('async');
var Library_1 = require("./Library");
var Session_1 = require("../Session");
var DefaultLocalizer_1 = require("../DefaultLocalizer");
var BotStorage_1 = require("../storage/BotStorage");
var consts = require("../consts");
var utils = require("../utils");
var async = require("async");
var UniversalBot = (function (_super) {
__extends(UniversalBot, _super);
function UniversalBot(connector, defaultDialog, libraryName) {
_super.call(this, libraryName || consts.Library.default);
this.settings = {
var _this = _super.call(this, libraryName || consts.Library.default) || this;
_this.settings = {
processLimit: 4,

@@ -24,11 +24,11 @@ persistUserData: true,

};
this.connectors = {};
this.mwReceive = [];
this.mwSend = [];
this.mwSession = [];
this.localePath('./locale/');
this.library(Library_1.systemLib);
_this.connectors = {};
_this.mwReceive = [];
_this.mwSend = [];
_this.mwSession = [];
_this.localePath('./locale/');
_this.library(Library_1.systemLib);
if (defaultDialog) {
if (typeof defaultDialog === 'function' || Array.isArray(defaultDialog)) {
this.dialog('/', defaultDialog);
_this.dialog('/', defaultDialog);
}

@@ -39,3 +39,3 @@ else {

if (settings.hasOwnProperty(name)) {
this.set(name, settings[name]);
_this.set(name, settings[name]);
}

@@ -46,4 +46,5 @@ }

if (connector) {
this.connector(consts.defaultConnector, connector);
_this.connector(consts.defaultConnector, connector);
}
return _this;
}

@@ -103,3 +104,3 @@ UniversalBot.prototype.clone = function (copyTo, newName) {

for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
args[_i] = arguments[_i];
}

@@ -333,6 +334,6 @@ args.forEach(function (mw) {

var i = -1;
var _this = this;
var _that = this;
function next() {
if (++i < middleware.length) {
_this.tryCatch(function () {
_that.tryCatch(function () {
middleware[i](event, next);

@@ -342,3 +343,3 @@ }, function () { return next(); });

else {
_this.tryCatch(function () { return done(); }, error);
_that.tryCatch(function () { return done(); }, error);
}

@@ -345,0 +346,0 @@ }

@@ -7,8 +7,9 @@ "use strict";

};
var MediaCard_1 = require('./MediaCard');
var MediaCard_1 = require("./MediaCard");
var AnimationCard = (function (_super) {
__extends(AnimationCard, _super);
function AnimationCard(session) {
_super.call(this, session);
this.data.contentType = 'application/vnd.microsoft.card.animation';
var _this = _super.call(this, session) || this;
_this.data.contentType = 'application/vnd.microsoft.card.animation';
return _this;
}

@@ -15,0 +16,0 @@ return AnimationCard;

@@ -7,8 +7,9 @@ "use strict";

};
var MediaCard_1 = require('./MediaCard');
var MediaCard_1 = require("./MediaCard");
var AudioCard = (function (_super) {
__extends(AudioCard, _super);
function AudioCard(session) {
_super.call(this, session);
this.data.contentType = 'application/vnd.microsoft.card.audio';
var _this = _super.call(this, session) || this;
_this.data.contentType = 'application/vnd.microsoft.card.audio';
return _this;
}

@@ -15,0 +16,0 @@ return AudioCard;

"use strict";
var Message_1 = require('../Message');
var Message_1 = require("../Message");
var CardAction = (function () {

@@ -4,0 +4,0 @@ function CardAction(session) {

"use strict";
var Message_1 = require('../Message');
var Message_1 = require("../Message");
var CardImage = (function () {

@@ -4,0 +4,0 @@ function CardImage(session) {

@@ -7,8 +7,9 @@ "use strict";

};
var ThumbnailCard_1 = require('./ThumbnailCard');
var ThumbnailCard_1 = require("./ThumbnailCard");
var HeroCard = (function (_super) {
__extends(HeroCard, _super);
function HeroCard(session) {
_super.call(this, session);
this.data.contentType = 'application/vnd.microsoft.card.hero';
var _this = _super.call(this, session) || this;
_this.data.contentType = 'application/vnd.microsoft.card.hero';
return _this;
}

@@ -15,0 +16,0 @@ return HeroCard;

@@ -7,8 +7,8 @@ "use strict";

};
var Message_1 = require('../Message');
var Keyboard_1 = require('./Keyboard');
var Message_1 = require("../Message");
var Keyboard_1 = require("./Keyboard");
var MediaCard = (function (_super) {
__extends(MediaCard, _super);
function MediaCard(session) {
_super.call(this, session);
return _super.call(this, session) || this;
}

@@ -15,0 +15,0 @@ MediaCard.prototype.title = function (text) {

"use strict";
var Message_1 = require('../Message');
var Message_1 = require("../Message");
var ReceiptCard = (function () {

@@ -4,0 +4,0 @@ function ReceiptCard(session) {

"use strict";
var Message_1 = require('../Message');
var Message_1 = require("../Message");
var SigninCard = (function () {

@@ -4,0 +4,0 @@ function SigninCard(session) {

@@ -7,9 +7,10 @@ "use strict";

};
var Message_1 = require('../Message');
var Keyboard_1 = require('./Keyboard');
var Message_1 = require("../Message");
var Keyboard_1 = require("./Keyboard");
var ThumbnailCard = (function (_super) {
__extends(ThumbnailCard, _super);
function ThumbnailCard(session) {
_super.call(this, session);
this.data.contentType = 'application/vnd.microsoft.card.thumbnail';
var _this = _super.call(this, session) || this;
_this.data.contentType = 'application/vnd.microsoft.card.thumbnail';
return _this;
}

@@ -16,0 +17,0 @@ ThumbnailCard.prototype.title = function (text) {

@@ -7,9 +7,10 @@ "use strict";

};
var Message_1 = require('../Message');
var MediaCard_1 = require('./MediaCard');
var Message_1 = require("../Message");
var MediaCard_1 = require("./MediaCard");
var VideoCard = (function (_super) {
__extends(VideoCard, _super);
function VideoCard(session) {
_super.call(this, session);
this.data.contentType = 'application/vnd.microsoft.card.video';
var _this = _super.call(this, session) || this;
_this.data.contentType = 'application/vnd.microsoft.card.video';
return _this;
}

@@ -16,0 +17,0 @@ VideoCard.prototype.aspect = function (text) {

"use strict";
var logger = require('./logger');
var consts = require('./consts');
var fs = require('fs');
var async = require('async');
var Promise = require('promise');
var path = require('path');
var logger = require("./logger");
var consts = require("./consts");
var fs = require("fs");
var async = require("async");
var Promise = require("promise");
var path = require("path");
var DefaultLocalizer = (function () {

@@ -9,0 +9,0 @@ function DefaultLocalizer(root, defaultLocale) {

"use strict";
var UniversalBot_1 = require('../bots/UniversalBot');
var ChatConnector_1 = require('../bots/ChatConnector');
var UniversalBot_1 = require("../bots/UniversalBot");
var ChatConnector_1 = require("../bots/ChatConnector");
var BotConnectorBot = (function () {

@@ -5,0 +5,0 @@ function BotConnectorBot(options) {

@@ -7,10 +7,11 @@ "use strict";

};
var Dialog_1 = require('../dialogs/Dialog');
var IntentDialog_1 = require('../dialogs/IntentDialog');
var Dialog_1 = require("../dialogs/Dialog");
var IntentDialog_1 = require("../dialogs/IntentDialog");
var CommandDialog = (function (_super) {
__extends(CommandDialog, _super);
function CommandDialog(serviceUri) {
_super.call(this);
var _this = _super.call(this) || this;
console.warn('CommandDialog class is deprecated. Use IntentDialog class instead.');
this.dialog = new IntentDialog_1.IntentDialog();
_this.dialog = new IntentDialog_1.IntentDialog();
return _this;
}

@@ -17,0 +18,0 @@ CommandDialog.prototype.begin = function (session, args) {

@@ -7,12 +7,13 @@ "use strict";

};
var Dialog_1 = require('../dialogs/Dialog');
var IntentDialog_1 = require('../dialogs/IntentDialog');
var LuisRecognizer_1 = require('../dialogs/LuisRecognizer');
var Dialog_1 = require("../dialogs/Dialog");
var IntentDialog_1 = require("../dialogs/IntentDialog");
var LuisRecognizer_1 = require("../dialogs/LuisRecognizer");
var LuisDialog = (function (_super) {
__extends(LuisDialog, _super);
function LuisDialog(serviceUri) {
_super.call(this);
var _this = _super.call(this) || this;
console.warn('LuisDialog class is deprecated. Use IntentDialog with a LuisRecognizer instead.');
var recognizer = new LuisRecognizer_1.LuisRecognizer(serviceUri);
this.dialog = new IntentDialog_1.IntentDialog({ recognizers: [recognizer] });
_this.dialog = new IntentDialog_1.IntentDialog({ recognizers: [recognizer] });
return _this;
}

@@ -19,0 +20,0 @@ LuisDialog.prototype.begin = function (session, args) {

"use strict";
var UniversalBot_1 = require('../bots/UniversalBot');
var ConsoleConnector_1 = require('../bots/ConsoleConnector');
var UniversalBot_1 = require("../bots/UniversalBot");
var ConsoleConnector_1 = require("../bots/ConsoleConnector");
var TextBot = (function () {

@@ -5,0 +5,0 @@ function TextBot(options) {

"use strict";
var consts = require('../consts');
var utils = require('../utils');
var async = require('async');
var consts = require("../consts");
var utils = require("../utils");
var async = require("async");
var ActionSet = (function () {

@@ -6,0 +6,0 @@ function ActionSet() {

@@ -7,3 +7,4 @@ "use strict";

};
var ActionSet_1 = require('./ActionSet');
var ActionSet_1 = require("./ActionSet");
var ResumeReason;
(function (ResumeReason) {

@@ -16,8 +17,7 @@ ResumeReason[ResumeReason["completed"] = 0] = "completed";

ResumeReason[ResumeReason["reprompt"] = 5] = "reprompt";
})(exports.ResumeReason || (exports.ResumeReason = {}));
var ResumeReason = exports.ResumeReason;
})(ResumeReason = exports.ResumeReason || (exports.ResumeReason = {}));
var Dialog = (function (_super) {
__extends(Dialog, _super);
function Dialog() {
_super.apply(this, arguments);
return _super.apply(this, arguments) || this;
}

@@ -24,0 +24,0 @@ Dialog.prototype.begin = function (session, args) {

"use strict";
var Session_1 = require('../Session');
var Dialog_1 = require('./Dialog');
var SimpleDialog_1 = require('./SimpleDialog');
var consts = require('../consts');
var utils = require('../utils');
var Session_1 = require("../Session");
var Dialog_1 = require("./Dialog");
var SimpleDialog_1 = require("./SimpleDialog");
var consts = require("../consts");
var utils = require("../utils");
var DialogAction = (function () {

@@ -8,0 +8,0 @@ function DialogAction() {

"use strict";
var utils = require('../utils');
var chrono = require('chrono-node');
var utils = require("../utils");
var chrono = require("chrono-node");
var EntityRecognizer = (function () {

@@ -201,9 +201,9 @@ function EntityRecognizer() {

};
EntityRecognizer.dateExp = /^\d{4}-\d{2}-\d{2}/i;
EntityRecognizer.yesExp = /^(1|y|yes|yep|sure|ok|true)(\W|$)/i;
EntityRecognizer.noExp = /^(2|n|no|nope|not|false)(\W|$)/i;
EntityRecognizer.numberExp = /[+-]?(?:\d+\.?\d*|\d*\.?\d+)/;
EntityRecognizer.ordinalWords = 'first|second|third|fourth|fifth|sixth|seventh|eigth|ninth|tenth';
return EntityRecognizer;
}());
EntityRecognizer.dateExp = /^\d{4}-\d{2}-\d{2}/i;
EntityRecognizer.yesExp = /^(1|y|yes|yep|sure|ok|true)(\W|$)/i;
EntityRecognizer.noExp = /^(2|n|no|nope|not|false)(\W|$)/i;
EntityRecognizer.numberExp = /[+-]?(?:\d+\.?\d*|\d*\.?\d+)/;
EntityRecognizer.ordinalWords = 'first|second|third|fourth|fifth|sixth|seventh|eigth|ninth|tenth';
exports.EntityRecognizer = EntityRecognizer;

@@ -7,9 +7,10 @@ "use strict";

};
var SimpleDialog_1 = require('./SimpleDialog');
var DialogAction_1 = require('./DialogAction');
var Dialog_1 = require('./Dialog');
var IntentRecognizerSet_1 = require('./IntentRecognizerSet');
var RegExpRecognizer_1 = require('./RegExpRecognizer');
var consts = require('../consts');
var logger = require('../logger');
var SimpleDialog_1 = require("./SimpleDialog");
var DialogAction_1 = require("./DialogAction");
var Dialog_1 = require("./Dialog");
var IntentRecognizerSet_1 = require("./IntentRecognizerSet");
var RegExpRecognizer_1 = require("./RegExpRecognizer");
var consts = require("../consts");
var logger = require("../logger");
var RecognizeMode;
(function (RecognizeMode) {

@@ -19,4 +20,3 @@ RecognizeMode[RecognizeMode["onBegin"] = 0] = "onBegin";

RecognizeMode[RecognizeMode["onReply"] = 2] = "onReply";
})(exports.RecognizeMode || (exports.RecognizeMode = {}));
var RecognizeMode = exports.RecognizeMode;
})(RecognizeMode = exports.RecognizeMode || (exports.RecognizeMode = {}));
var IntentDialog = (function (_super) {

@@ -26,11 +26,12 @@ __extends(IntentDialog, _super);

if (options === void 0) { options = {}; }
_super.call(this);
this.handlers = {};
this.recognizers = new IntentRecognizerSet_1.IntentRecognizerSet(options);
var _this = _super.call(this) || this;
_this.handlers = {};
_this.recognizers = new IntentRecognizerSet_1.IntentRecognizerSet(options);
if (typeof options.recognizeMode !== "undefined") {
this.recognizeMode = options.recognizeMode;
_this.recognizeMode = options.recognizeMode;
}
else {
this.recognizeMode = RecognizeMode.onBeginIfRoot;
_this.recognizeMode = RecognizeMode.onBeginIfRoot;
}
return _this;
}

@@ -37,0 +38,0 @@ IntentDialog.prototype.begin = function (session, args) {

"use strict";
var utils = require('../utils');
var async = require('async');
var utils = require("../utils");
var async = require("async");
var RecognizeOrder;
(function (RecognizeOrder) {
RecognizeOrder[RecognizeOrder["parallel"] = 0] = "parallel";
RecognizeOrder[RecognizeOrder["series"] = 1] = "series";
})(exports.RecognizeOrder || (exports.RecognizeOrder = {}));
var RecognizeOrder = exports.RecognizeOrder;
})(RecognizeOrder = exports.RecognizeOrder || (exports.RecognizeOrder = {}));
var IntentRecognizerSet = (function () {

@@ -10,0 +10,0 @@ function IntentRecognizerSet(options) {

"use strict";
var request = require('request');
var request = require("request");
var LuisRecognizer = (function () {

@@ -4,0 +4,0 @@ function LuisRecognizer(models) {

@@ -7,12 +7,13 @@ "use strict";

};
var Dialog_1 = require('./Dialog');
var Session_1 = require('../Session');
var EntityRecognizer_1 = require('./EntityRecognizer');
var Message_1 = require('../Message');
var Library_1 = require('../bots/Library');
var Keyboard_1 = require('../cards/Keyboard');
var CardAction_1 = require('../cards/CardAction');
var Channel = require('../Channel');
var consts = require('../consts');
var logger = require('../logger');
var Dialog_1 = require("./Dialog");
var Session_1 = require("../Session");
var EntityRecognizer_1 = require("./EntityRecognizer");
var Message_1 = require("../Message");
var Library_1 = require("../bots/Library");
var Keyboard_1 = require("../cards/Keyboard");
var CardAction_1 = require("../cards/CardAction");
var Channel = require("../Channel");
var consts = require("../consts");
var logger = require("../logger");
var PromptType;
(function (PromptType) {

@@ -25,4 +26,4 @@ PromptType[PromptType["text"] = 0] = "text";

PromptType[PromptType["attachment"] = 5] = "attachment";
})(exports.PromptType || (exports.PromptType = {}));
var PromptType = exports.PromptType;
})(PromptType = exports.PromptType || (exports.PromptType = {}));
var ListStyle;
(function (ListStyle) {

@@ -34,4 +35,3 @@ ListStyle[ListStyle["none"] = 0] = "none";

ListStyle[ListStyle["auto"] = 4] = "auto";
})(exports.ListStyle || (exports.ListStyle = {}));
var ListStyle = exports.ListStyle;
})(ListStyle = exports.ListStyle || (exports.ListStyle = {}));
var SimplePromptRecognizer = (function () {

@@ -114,3 +114,3 @@ function SimplePromptRecognizer() {

function Prompts() {
_super.apply(this, arguments);
return _super.apply(this, arguments) || this;
}

@@ -325,16 +325,16 @@ Prompts.prototype.begin = function (session, args) {

};
Prompts.options = {
recognizer: new SimplePromptRecognizer(),
promptAfterAction: true
};
Prompts.defaultRetryPrompt = {
text: "default_text",
number: "default_number",
confirm: "default_confirm",
choice: "default_choice",
time: "default_time",
attachment: "default_file"
};
return Prompts;
}(Dialog_1.Dialog));
Prompts.options = {
recognizer: new SimplePromptRecognizer(),
promptAfterAction: true
};
Prompts.defaultRetryPrompt = {
text: "default_text",
number: "default_number",
confirm: "default_confirm",
choice: "default_choice",
time: "default_time",
attachment: "default_file"
};
exports.Prompts = Prompts;

@@ -341,0 +341,0 @@ Library_1.systemLib.dialog(consts.DialogId.Prompts, new Prompts());

@@ -7,10 +7,11 @@ "use strict";

};
var Dialog_1 = require('./Dialog');
var consts = require('../consts');
var logger = require('../logger');
var Dialog_1 = require("./Dialog");
var consts = require("../consts");
var logger = require("../logger");
var SimpleDialog = (function (_super) {
__extends(SimpleDialog, _super);
function SimpleDialog(fn) {
_super.call(this);
this.fn = fn;
var _this = _super.call(this) || this;
_this.fn = fn;
return _this;
}

@@ -17,0 +18,0 @@ SimpleDialog.prototype.begin = function (session, args) {

"use strict";
var Prompts_1 = require('./dialogs/Prompts');
var Channel = require('./Channel');
var consts = require('./consts');
var sprintf = require('sprintf-js');
var Prompts_1 = require("./dialogs/Prompts");
var Channel = require("./Channel");
var consts = require("./consts");
var sprintf = require("sprintf-js");
var debugLoggingEnabled = new RegExp('\\bbotbuilder\\b', 'i').test(process.env.NODE_DEBUG || '');

@@ -7,0 +7,0 @@ function error(fmt) {

"use strict";
var HeroCard_1 = require('./cards/HeroCard');
var CardImage_1 = require('./cards/CardImage');
var CardAction_1 = require('./cards/CardAction');
var utils = require('./utils');
var consts = require('./consts');
var sprintf = require('sprintf-js');
var HeroCard_1 = require("./cards/HeroCard");
var CardImage_1 = require("./cards/CardImage");
var CardAction_1 = require("./cards/CardAction");
var utils = require("./utils");
var consts = require("./consts");
var sprintf = require("sprintf-js");
exports.TextFormat = {

@@ -9,0 +9,0 @@ plain: 'plain',

"use strict";
var Dialog_1 = require('../dialogs/Dialog');
var Library_1 = require('../bots/Library');
var SimpleDialog_1 = require('../dialogs/SimpleDialog');
var consts = require('../consts');
var Dialog_1 = require("../dialogs/Dialog");
var Library_1 = require("../bots/Library");
var SimpleDialog_1 = require("../dialogs/SimpleDialog");
var consts = require("../consts");
var Middleware = (function () {

@@ -7,0 +7,0 @@ function Middleware() {

@@ -7,27 +7,28 @@ "use strict";

};
var Dialog_1 = require('./dialogs/Dialog');
var Message_1 = require('./Message');
var consts = require('./consts');
var logger = require('./logger');
var sprintf = require('sprintf-js');
var events = require('events');
var Dialog_1 = require("./dialogs/Dialog");
var Message_1 = require("./Message");
var consts = require("./consts");
var logger = require("./logger");
var sprintf = require("sprintf-js");
var events = require("events");
var Session = (function (_super) {
__extends(Session, _super);
function Session(options) {
_super.call(this);
this.options = options;
this.msgSent = false;
this._isReset = false;
this.lastSendTime = new Date().getTime();
this.batch = [];
this.batchStarted = false;
this.sendingBatch = false;
this.inMiddleware = false;
this._locale = null;
this.localizer = null;
this.library = options.library;
this.localizer = options.localizer;
if (typeof this.options.autoBatchDelay !== 'number') {
this.options.autoBatchDelay = 250;
var _this = _super.call(this) || this;
_this.options = options;
_this.msgSent = false;
_this._isReset = false;
_this.lastSendTime = new Date().getTime();
_this.batch = [];
_this.batchStarted = false;
_this.sendingBatch = false;
_this.inMiddleware = false;
_this._locale = null;
_this.localizer = null;
_this.library = options.library;
_this.localizer = options.localizer;
if (typeof _this.options.autoBatchDelay !== 'number') {
_this.options.autoBatchDelay = 250;
}
return _this;
}

@@ -47,3 +48,3 @@ Session.prototype.toRecognizeContext = function () {

for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
args[_i] = arguments[_i];
}

@@ -55,3 +56,3 @@ return Session.prototype.gettext.call(_this, args);

for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
args[_i] = arguments[_i];
}

@@ -58,0 +59,0 @@ return Session.prototype.ngettext.call(_this, args);

"use strict";
var sprintf = require('sprintf-js');
var sprintf = require("sprintf-js");
function clone(obj) {

@@ -4,0 +4,0 @@ var cpy = {};

@@ -5,3 +5,3 @@ {

"description": "Bot Builder is a dialog system for building rich bots on virtually any platform.",
"version": "3.5.2",
"version": "3.5.3",
"license": "MIT",

@@ -8,0 +8,0 @@ "keywords": [

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