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

botframework-webchat-core

Package Overview
Dependencies
Maintainers
1
Versions
370
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botframework-webchat-core - npm Package Compare versions

Comparing version 4.2.1-master.b34fa87 to 4.2.1-master.bd3c22c

lib/actions/setSendTypingIndicator.js

4

lib/actions/setSendTyping.js

@@ -8,2 +8,3 @@ "use strict";

exports.SET_SEND_TYPING = void 0;
// TODO: [P3] Take this deprecation code out when releasing on or after 2020 January 13
var SET_SEND_TYPING = 'WEB_CHAT/SET_SEND_TYPING';

@@ -13,2 +14,3 @@ exports.SET_SEND_TYPING = SET_SEND_TYPING;

function _default(value) {
// Deprecation notes added to reducer
return {

@@ -21,2 +23,2 @@ type: SET_SEND_TYPING,

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NldFNlbmRUeXBpbmcuanMiXSwibmFtZXMiOlsiU0VUX1NFTkRfVFlQSU5HIiwidmFsdWUiLCJ0eXBlIiwicGF5bG9hZCIsInNlbmRUeXBpbmciXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSxJQUFNQSxlQUFlLEdBQUcsMEJBQXhCOzs7QUFFZSxrQkFBVUMsS0FBVixFQUFpQjtBQUM5QixTQUFPO0FBQ0xDLElBQUFBLElBQUksRUFBRUYsZUFERDtBQUVMRyxJQUFBQSxPQUFPLEVBQUU7QUFBRUMsTUFBQUEsVUFBVSxFQUFFLENBQUMsQ0FBQ0g7QUFBaEI7QUFGSixHQUFQO0FBSUQiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBTRVRfU0VORF9UWVBJTkcgPSAnV0VCX0NIQVQvU0VUX1NFTkRfVFlQSU5HJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gKHZhbHVlKSB7XG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blxuZXhwb3J0IHsgU0VUX1NFTkRfVFlQSU5HIH1cbiJdfQ==

@@ -106,2 +106,8 @@ "use strict";

});
Object.defineProperty(exports, "setSendTypingIndicator", {
enumerable: true,
get: function get() {
return _setSendTypingIndicator.default;
}
});
Object.defineProperty(exports, "startDictate", {

@@ -171,2 +177,4 @@ enumerable: true,

var _setSendTypingIndicator = _interopRequireDefault(require("./actions/setSendTypingIndicator"));
var _startDictate = _interopRequireDefault(require("./actions/startDictate"));

@@ -191,4 +199,4 @@

exports.Constants = Constants;
var version = "4.2.1-master.b34fa87";
var version = "4.2.1-master.bd3c22c";
exports.version = version;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJDb25zdGFudHMiLCJBY3Rpdml0eUNsaWVudFN0YXRlIiwiRGljdGF0ZVN0YXRlIiwidmVyc2lvbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFFQTs7QUFDQTs7QUFFQSxJQUFNQSxTQUFTLEdBQUc7QUFBRUMsRUFBQUEsbUJBQW1CLEVBQW5CQSxtQkFBRjtBQUF1QkMsRUFBQUEsWUFBWSxFQU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FnZUJhY2ssXG4gIHNlbmRQb3N0QmFjayxcbiAgc2V0RGljdGF0ZUludGVyaW1zLFxuICBzZXREaWN0YXRlU3RhdGUsXG4gIHNldExhbmd1YWdlLFxuICBzZXRTZW5kQm94LFxuICBzZXRTZW5kVGltZW91dCxcbiAgc2V0U2VuZFR5cGluZ0luZGljYXRvcixcbiAgc3RhcnREaWN0YXRlLFxuICBzdGFydFNwZWFraW5nQWN0aXZpdHksXG4gIHN0b3BEaWN0YXRlLFxuICBzdG9wU3BlYWtpbmdBY3Rpdml0eSxcbiAgc3VibWl0U2VuZEJveCxcbiAgdmVyc2lvbixcblxuICAvLyBUT0RPOiBbUDNdIFRha2UgdGhpcyBkZXByZWNhdGlvbiBjb2RlIG91dCB3aGVuIHJlbGVhc2luZyBvbiBvciBhZnRlciBKYW51YXJ5IDEzIDIwMjAgXG4gIHNldFNlbmRUeXBpbmdcbn1cbiJdfQ==

@@ -10,5 +10,6 @@ declare const _default: import("redux").Reducer<{

sendTimeout: {};
sendTypingIndicator: {};
suggestedActions: {};
sendTyping: {};
suggestedActions: {};
}, import("redux").AnyAction>;
export default _default;

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

var _sendTyping = _interopRequireDefault(require("./reducers/sendTyping"));
var _sendTypingIndicator = _interopRequireDefault(require("./reducers/sendTypingIndicator"));

@@ -42,7 +42,9 @@ var _suggestedActions = _interopRequireDefault(require("./reducers/suggestedActions"));

sendTimeout: _sendTimeout.default,
sendTyping: _sendTyping.default,
suggestedActions: _suggestedActions.default
sendTypingIndicator: _sendTypingIndicator.default,
suggestedActions: _suggestedActions.default,
// TODO: [P3] Take this deprecation code out when releasing on or after January 13 2020
sendTyping: _sendTypingIndicator.default
});
exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9yZWR1Y2VyLnRzIl0sIm5hbWVzIjpbImFjdGl2aXRpZXMiLCJkaWN0YXRlSW50ZXJpbXMi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3VhZ2UnO1xuaW1wb3J0IHJlYWR5U3RhdGUgZnJvbSAnLi9yZWR1Y2Vycy9yZWFkeVN0YXRlJztcbmltcG9ydCByZWZlcmVuY2VHcmFtbWFySUQgZnJvbSAnLi9yZWR1Y2Vycy9yZWZlcmVuY2VHcmFtbWFySUQnO1xuaW1wb3J0IHNlbmRCb3hWYWx1ZSBmcm9tICcuL3JlZHVjZXJzL3NlbmRCb3hWYWx1ZSc7XG5pbXBvcnQgc2VuZFRpbWVvdXQgZnJvbSAnLi9yZWR1Y2Vycy9zZW5kVGltZW91dCc7XG5pbXBvcnQgc2VuZFR5cGluZ0luZGljYXRvciBmcm9tICcuL3JlZHVjZXJzL3NlbmRUeXBpbmdJbmRpY2F0b3InO1xuaW1wb3J0IHN1Z2dlc3RlZEFjdGlvbnMgZnJvbSAnLi9yZWR1Y2Vycy9zdWdnZXN0ZWRBY3Rpb25zJztcblxuZXhwb3J0IGRlZmF1bHQgY29tYmluZVJlZHVjZXJzKHtcbiAgYWN0aXZpdGllcyxcbiAgZGljdGF0ZUludGVyaW1zLFxuICBkaWN0YXRlU3RhdGUsXG4gIGxhbmd1YWdlLFxuICByZWFkeVN0YXRlLFxuICByZWZlcmVuY2VHcmFtbWFySUQsXG4gIHNlbmRCb3hWYWx1ZSxcbiAgc2VuZFRpbWVvdXQsXG4gIHNlbmRUeXBpbmdJbmRpY2F0b3IsXG4gIHN1Z2dlc3RlZEFjdGlvbnMsXG5cbiAgLy8gVE9ETzogW1AzXSBUYWtlIHRoaXMgZGVwcmVjYXRpb24gY29kZSBvdXQgd2hlbiByZWxlYXNpbmcgb24gb3IgYWZ0ZXIgSmFudWFyeSAxMyAyMDIwXG4gIHNlbmRUeXBpbmc6IHNlbmRUeXBpbmdJbmRpY2F0b3Jcbn0pXG4iXX0=

@@ -30,2 +30,4 @@ "use strict";

var _sendConversationUpdateOnConnectSaga = _interopRequireDefault(require("./sagas/sendConversationUpdateOnConnectSaga"));
var _sendEventToPostActivitySaga = _interopRequireDefault(require("./sagas/sendEventToPostActivitySaga"));

@@ -41,3 +43,3 @@

var _sendTypingOnSetSendBoxSaga = _interopRequireDefault(require("./sagas/sendTypingOnSetSendBoxSaga"));
var _sendTypingIndicatorOnSetSendBoxSaga = _interopRequireDefault(require("./sagas/sendTypingIndicatorOnSetSendBoxSaga"));

@@ -96,45 +98,49 @@ var _startDictateAfterSpeakActivitySaga = _interopRequireDefault(require("./sagas/startDictateAfterSpeakActivitySaga"));

_context.next = 18;
return (0, _effects.fork)(_sendEventToPostActivitySaga.default);
return (0, _effects.fork)(_sendConversationUpdateOnConnectSaga.default);
case 18:
_context.next = 20;
return (0, _effects.fork)(_sendFilesToPostActivitySaga.default);
return (0, _effects.fork)(_sendEventToPostActivitySaga.default);
case 20:
_context.next = 22;
return (0, _effects.fork)(_sendMessageToPostActivitySaga.default);
return (0, _effects.fork)(_sendFilesToPostActivitySaga.default);
case 22:
_context.next = 24;
return (0, _effects.fork)(_sendMessageBackToPostActivitySaga.default);
return (0, _effects.fork)(_sendMessageToPostActivitySaga.default);
case 24:
_context.next = 26;
return (0, _effects.fork)(_sendPostBackToPostActivitySaga.default);
return (0, _effects.fork)(_sendMessageBackToPostActivitySaga.default);
case 26:
_context.next = 28;
return (0, _effects.fork)(_sendTypingOnSetSendBoxSaga.default);
return (0, _effects.fork)(_sendPostBackToPostActivitySaga.default);
case 28:
_context.next = 30;
return (0, _effects.fork)(_startDictateAfterSpeakActivitySaga.default);
return (0, _effects.fork)(_sendTypingIndicatorOnSetSendBoxSaga.default);
case 30:
_context.next = 32;
return (0, _effects.fork)(_startSpeakActivityOnPostActivitySaga.default);
return (0, _effects.fork)(_startDictateAfterSpeakActivitySaga.default);
case 32:
_context.next = 34;
return (0, _effects.fork)(_stopDictateOnCardActionSaga.default);
return (0, _effects.fork)(_startSpeakActivityOnPostActivitySaga.default);
case 34:
_context.next = 36;
return (0, _effects.fork)(_stopSpeakingActivityOnInputSaga.default);
return (0, _effects.fork)(_stopDictateOnCardActionSaga.default);
case 36:
_context.next = 38;
return (0, _effects.fork)(_stopSpeakingActivityOnInputSaga.default);
case 38:
_context.next = 40;
return (0, _effects.fork)(_submitSendBoxSaga.default);
case 38:
case 40:
case "end":

@@ -146,2 +152,2 @@ return _context.stop();

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zYWdhcy5qcyJdLCJuYW1lcyI6WyJjbGVhclN1Z2dlc3RlZEFjdGlvbnNPblBvc3RBY3Rpdml0eVNhZ2EiLCJjb25uZWN0aW9uU3RhdHVzVXBkYXRlU2FnYSIsImNvbm5lY3RTYWdhIiwiaW5jb21pbmdBY3Rpdml0eVNhZ2EiLCJtYXJrQWN0aXZpdHlGb3JTcGVha09uSW5jb21pbmdBY3Rpdml0eUZyb21PdGhlcnNTYWdhIiwibWFya0FsbEFzU3Bva2VuT25TdG9wU3BlYWtBY3Rpdml0eVNhZ2EiLCJwb3N0QWN0aXZpdHlTYWdhIiwicmVtb3ZlSW5jb21pbmdUeXBpbmdBZnRlckludGVydmFsU2FnYSIsInNlbmRFdmVudFRvUG9zdEFjdGl2aXR5U2FnYSIsInNlbmRGaWxlc1RvUG9zdEFjdGl2aXR5U2FnYSIsInNlbmRNZXNzYWdlVG9Qb3N0QWN0aXZpdHlTYWdhIiwic2VuZE1lc3NhZ2VCYWNrVG9Qb3N0QWN0aXZpdHlTYWdhIiwic2VuZFBvc3RCYWNrVG9Qb3N0QWN0aXZpdHlTYWdhIiwic2VuZFR5cGluZ09uU2V0U2VuZEJveFNhZ2EiLCJzdGFydERpY3RhdGVBZnRlclNwZWFrQWN0aXZpdHlTYWdhIiwic3RhcnRTcGVha0FjdGl2aXR5T25Qb3N0QWN0aXZpdHlTYWdhIiwic3RvcERpY3RhdGVPbkNhcmRBY3Rpb25TYWdhIiwic3RvcFNwZWFraW5nQWN0aXZpdHlPbklucHV0U2FnYSIsInN1Ym1pdFNlbmRCb3hTYWdh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0luZGljYXRvck9uU2V0U2VuZEJveFNhZ2EpO1xuICB5aWVsZCBmb3JrKHN0YXJ0RGljdGF0ZUFmdGVyU3BlYWtBY3Rpdml0eVNhZ2EpO1xuICB5aWVsZCBmb3JrKHN0YXJ0U3BlYWtBY3Rpdml0eU9uUG9zdEFjdGl2aXR5U2FnYSk7XG4gIHlpZWxkIGZvcmsoc3RvcERpY3RhdGVPbkNhcmRBY3Rpb25TYWdhKTtcbiAgeWllbGQgZm9yayhzdG9wU3BlYWtpbmdBY3Rpdml0eU9uSW5wdXRTYWdhKTtcbiAgeWllbGQgZm9yayhzdWJtaXRTZW5kQm94U2FnYSk7XG59XG4iXX0=
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -18,8 +20,8 @@

var _callUntil = _interopRequireDefault(require("./effects/callUntil"));
var _updateConnectionStatus = _interopRequireWildcard(require("../actions/updateConnectionStatus"));
var _forever = _interopRequireDefault(require("./effects/forever"));
var _createPromiseQueue = _interopRequireDefault(require("../createPromiseQueue"));
var _botframeworkDirectlinejs = require("botframework-directlinejs");
var _connect = require("../actions/connect");

@@ -31,3 +33,3 @@

/*#__PURE__*/
_regenerator.default.mark(_callee),
_regenerator.default.mark(observeAndPutConnectionStatusUpdate),
_marked2 =

@@ -38,11 +40,10 @@ /*#__PURE__*/

/*#__PURE__*/
_regenerator.default.mark(disconnectSaga);
_regenerator.default.mark(_callee);
// const UNINITIALIZED = 0;
// const CONNECTING = 1;
var ONLINE = 2; // const EXPIRED_TOKEN = 3;
// const FAILED_TO_CONNECT = 4;
var CONNECTING = _botframeworkDirectlinejs.ConnectionStatus.Connecting,
ONLINE = _botframeworkDirectlinejs.ConnectionStatus.Online,
EXPIRED_TOKEN = _botframeworkDirectlinejs.ConnectionStatus.ExpiredToken,
FAILED_TO_CONNECT = _botframeworkDirectlinejs.ConnectionStatus.FailedToConnect,
ENDED = _botframeworkDirectlinejs.ConnectionStatus.Ended;
var ENDED = 5;
function randomUserID() {

@@ -52,56 +53,33 @@ return "r_".concat((0, _mathRandom.default)().toString(36).substr(2, 10));

function _callee() {
var _ref, _ref$payload, directLine, userID, token, _ref2, userIDFromToken, connectTask;
return _regenerator.default.wrap(function _callee$(_context) {
function observeAndPutConnectionStatusUpdate(directLine) {
var connectionStatusQueue, connectionStatusSubscription, connectionStatus;
return _regenerator.default.wrap(function observeAndPutConnectionStatusUpdate$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.take)(_connect.CONNECT);
connectionStatusQueue = (0, _createPromiseQueue.default)();
connectionStatusSubscription = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
});
_context.prev = 2;
case 2:
_ref = _context.sent;
_ref$payload = _ref.payload;
directLine = _ref$payload.directLine;
userID = _ref$payload.userID;
token = directLine.token;
_ref2 = (0, _jsonwebtoken.decode)(token) || {}, userIDFromToken = _ref2.user;
case 3:
_context.next = 5;
return (0, _effects.call)(connectionStatusQueue.shift);
if (userIDFromToken) {
if (userID && userID !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
case 5:
connectionStatus = _context.sent;
_context.next = 8;
return (0, _effects.put)((0, _updateConnectionStatus.default)(connectionStatus));
userID = userIDFromToken;
} else if (userID) {
if (typeof userID !== 'string') {
console.warn('Web Chat: user ID must be a string.');
userID = randomUserID();
} else if (/^dl_/.test(userID)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
userID = randomUserID();
}
} else {
// Only specify "default-user" if not found from token and not passed in
userID = randomUserID();
}
case 8:
_context.next = 3;
break;
_context.next = 11;
return (0, _effects.fork)(connectSaga, directLine, userID);
case 10:
_context.prev = 10;
connectionStatusSubscription.unsubscribe();
return _context.finish(10);
case 11:
connectTask = _context.sent;
_context.next = 14;
return (0, _effects.take)(_disconnect.DISCONNECT);
case 14:
_context.next = 16;
return (0, _effects.call)(disconnectSaga, connectTask, directLine);
case 16:
_context.next = 0;
break;
case 18:
case 13:
case "end":

@@ -111,7 +89,45 @@ return _context.stop();

}
}, _marked, this);
}, _marked, this, [[2,, 10, 13]]);
}
function connectSaga(directLine, userID) {
var meta, connectionStatusQueue, connectionStatusSubscription, activitySubscription;
function negativeUpdateConnectionStatusAction(_ref) {
var payload = _ref.payload,
type = _ref.type;
if (type === _updateConnectionStatus.UPDATE_CONNECTION_STATUS) {
var connectionStatus = payload.connectionStatus;
return connectionStatus !== CONNECTING && connectionStatus !== ONLINE;
}
}
function rectifyUserID(directLine, userIDFromAction) {
var token = directLine.token;
var _ref2 = (0, _jsonwebtoken.decode)(token) || {},
userIDFromToken = _ref2.user;
if (userIDFromToken) {
if (userIDFromAction && userIDFromAction !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
return userIDFromToken;
} else if (userIDFromAction) {
if (typeof userIDFromAction !== 'string') {
console.warn('Web Chat: user ID must be a string.');
return randomUserID();
} else if (/^dl_/.test(userIDFromAction)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
return randomUserID();
}
} else {
return randomUserID();
}
return userIDFromAction;
}
function connectSaga(directLine) {
var activitySubscription, _ref3, connectionStatus;
return _regenerator.default.wrap(function connectSaga$(_context2) {

@@ -121,17 +137,3 @@ while (1) {

case 0:
meta = {
userID: userID
};
_context2.next = 3;
return (0, _effects.put)({
type: _connect.CONNECT_PENDING,
meta: meta
});
case 3:
connectionStatusQueue = (0, _createPromiseQueue.default)();
connectionStatusSubscription = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
}); // DirectLineJS start the connection only after the first subscriber for activity$, but not connectionStatus$
// DirectLineJS start the connection only after the first subscriber for activity$, but not connectionStatus$
activitySubscription = directLine.activity$.subscribe({

@@ -142,81 +144,52 @@ next: function next() {

});
_context2.prev = 6;
_context2.prev = 7;
_context2.next = 10;
return (0, _callUntil.default)(connectionStatusQueue.shift, [], function (connectionStatus) {
return connectionStatus === ONLINE;
_context2.prev = 1;
case 2:
_context2.next = 4;
return (0, _effects.take)(_updateConnectionStatus.UPDATE_CONNECTION_STATUS);
case 4:
_ref3 = _context2.sent;
connectionStatus = _ref3.payload.connectionStatus;
if (!(connectionStatus === ONLINE)) {
_context2.next = 10;
break;
}
return _context2.abrupt("return", function () {
activitySubscription.unsubscribe();
directLine.end();
});
case 10:
_context2.next = 12;
return (0, _effects.put)({
type: _connect.CONNECT_FULFILLING,
meta: meta,
payload: {
directLine: directLine
}
});
if (!(connectionStatus === ENDED || connectionStatus === EXPIRED_TOKEN || connectionStatus === FAILED_TO_CONNECT)) {
_context2.next = 12;
break;
}
throw new Error('Failed to connect');
case 12:
_context2.next = 14;
return (0, _effects.put)({
type: _connect.CONNECT_FULFILLED,
meta: meta,
payload: {
directLine: directLine
}
});
_context2.next = 2;
break;
case 14:
_context2.next = 20;
break;
case 16:
_context2.prev = 16;
_context2.t0 = _context2["catch"](7);
_context2.next = 20;
return (0, _effects.put)({
type: _connect.CONNECT_REJECTED,
error: true,
meta: meta,
payload: _context2.t0
});
case 20:
_context2.prev = 20;
_context2.next = 23;
_context2.prev = 14;
_context2.next = 17;
return (0, _effects.cancelled)();
case 23:
case 17:
if (!_context2.sent) {
_context2.next = 26;
_context2.next = 20;
break;
}
_context2.next = 26;
return (0, _effects.put)({
type: _connect.CONNECT_REJECTED,
error: true,
meta: meta,
payload: new Error('cancelled')
});
activitySubscription.unsubscribe();
throw new Error('Cancelled');
case 26:
return _context2.finish(20);
case 20:
return _context2.finish(14);
case 27:
_context2.next = 29;
return (0, _forever.default)();
case 29:
_context2.prev = 29;
// TODO: [P2] DirectLineJS should kill the connection when we unsubscribe
// But currently in v3, DirectLineJS does not have this functionality
// Thus, we need to call "end()" explicitly
directLine.end();
activitySubscription.unsubscribe();
connectionStatusSubscription.unsubscribe();
return _context2.finish(29);
case 34:
case 21:
case "end":

@@ -226,8 +199,9 @@ return _context2.stop();

}
}, _marked2, this, [[6,, 29, 34], [7, 16, 20, 27]]);
}, _marked2, this, [[1,, 14, 21]]);
}
function disconnectSaga(connectTask, directLine) {
var connectionStatusQueue, unsubscribe;
return _regenerator.default.wrap(function disconnectSaga$(_context3) {
function _callee() {
var _ref4, _ref4$payload, directLine, userIDFromAction, updateConnectionStatusTask, meta, endDirectLine, terminateAction;
return _regenerator.default.wrap(function _callee$(_context3) {
while (1) {

@@ -237,66 +211,116 @@ switch (_context3.prev = _context3.next) {

_context3.next = 2;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_PENDING
});
return (0, _effects.take)(_connect.CONNECT);
case 2:
connectionStatusQueue = (0, _createPromiseQueue.default)();
unsubscribe = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
}); // DirectLineJS should cancel underlying REST/WS when we cancel
// the connect task, which subsequently unsubscribe connectionStatus$
_ref4 = _context3.sent;
_ref4$payload = _ref4.payload;
directLine = _ref4$payload.directLine;
userIDFromAction = _ref4$payload.userID;
_context3.next = 8;
return (0, _effects.fork)(observeAndPutConnectionStatusUpdate, directLine);
_context3.next = 6;
return (0, _effects.cancel)(connectTask);
case 6:
_context3.prev = 6;
_context3.next = 9;
return (0, _callUntil.default)(connectionStatusQueue.shift, [], function (connectionStatus) {
return connectionStatus === ENDED;
});
case 9:
_context3.next = 11;
case 8:
updateConnectionStatusTask = _context3.sent;
_context3.prev = 9;
meta = {
userID: rectifyUserID(directLine, userIDFromAction)
};
endDirectLine = void 0;
_context3.next = 14;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_FULFILLED
type: _connect.CONNECT_PENDING,
meta: meta
});
case 11:
case 14:
_context3.prev = 14;
_context3.next = 17;
return (0, _effects.call)(connectSaga, directLine);
case 17:
endDirectLine = _context3.sent;
_context3.next = 25;
break;
case 13:
_context3.prev = 13;
_context3.t0 = _context3["catch"](6);
_context3.next = 17;
case 20:
_context3.prev = 20;
_context3.t0 = _context3["catch"](14);
_context3.next = 24;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_REJECTED,
type: _connect.CONNECT_REJECTED,
error: true,
meta: meta,
payload: _context3.t0
});
case 17:
_context3.prev = 17;
_context3.next = 20;
return (0, _effects.cancelled)();
case 24:
return _context3.abrupt("continue", 48);
case 20:
if (!_context3.sent) {
_context3.next = 23;
case 25:
_context3.prev = 25;
_context3.next = 28;
return (0, _effects.put)({
type: _connect.CONNECT_FULFILLING,
meta: meta,
payload: {
directLine: directLine
}
});
case 28:
_context3.next = 30;
return (0, _effects.put)({
type: _connect.CONNECT_FULFILLED,
meta: meta,
payload: {
directLine: directLine
}
});
case 30:
_context3.next = 32;
return (0, _effects.take)([_disconnect.DISCONNECT, negativeUpdateConnectionStatusAction]);
case 32:
terminateAction = _context3.sent;
_context3.next = 35;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_PENDING
});
case 35:
endDirectLine();
if (!(terminateAction.type === _disconnect.DISCONNECT)) {
_context3.next = 39;
break;
}
_context3.next = 23;
_context3.next = 39;
return (0, _effects.take)(negativeUpdateConnectionStatusAction);
case 39:
_context3.prev = 39;
_context3.next = 42;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_REJECTED,
error: true,
payload: new Error('cancelled')
type: _disconnect.DISCONNECT_FULFILLED
});
case 23:
unsubscribe();
return _context3.finish(17);
case 42:
endDirectLine();
return _context3.finish(39);
case 25:
case 44:
_context3.prev = 44;
_context3.next = 47;
return (0, _effects.cancel)(updateConnectionStatusTask);
case 47:
return _context3.finish(44);
case 48:
_context3.next = 0;
break;
case 50:
case "end":

@@ -306,4 +330,4 @@ return _context3.stop();

}
}, _marked3, this, [[6, 13, 17, 25]]);
}, _marked3, this, [[9,, 44, 48], [14, 20], [25,, 39, 44]]);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jb25uZWN0U2FnYS5qcyJdLCJ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3RMaW5lKCk7XG4gICAgICB9XG4gICAgfSBmaW5hbGx5IHtcbiAgICAgIHlpZWxkIGNhbmNlbCh1cGRhdGVDb25uZWN0aW9uU3RhdHVzVGFzayk7XG4gICAgfVxuICB9XG59XG4iXX0=

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

_context.next = 10;
return (0, _effects.take)(_disconnect.DISCONNECT_FULFILLED);
return (0, _effects.take)(_disconnect.DISCONNECT_PENDING);

@@ -60,2 +60,2 @@ case 10:

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zYWdhcy9lZmZlY3RzL3doaWxlQ29ubmVjdGVkLmpzIl0sIm5hbWVzIjpbImZuIiwiQ09OTkVDVF9GVUxGSUxMSU5HIiwidXNlcklEIiwibWV0YSIsImRpcmVjdExpbmUiLCJwYXlsb2FkIiwidGFzayIsIkRJU0NPTk5FQ1RfRlVMRklMTEVEIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQU9BOztBQUNBOztBQUVlLGtCQUFVQSxFQUFWLEVBQWM7QUFDM0IsU0FBTztBQUFBO0FBQUEsNEJBQUs7QUFBQTs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBRThDLG1CQUFNLG1CQUFLQywyQkFBTCxDQUFOOztBQUY5QztBQUFBO0FBRVFDLFlBQUFBLE1BRlIsUUFFQUMsSUFGQSxDQUVRRCxNQUZSO0FBRTZCRSxZQUFBQSxVQUY3QixRQUVrQkMsT0FGbEIsQ0FFNkJELFVBRjdCO0FBQUE7QUFHSyxtQkFBTSxtQkFBS0osRUFBTCxFQUFTSSxVQUFULEVBQXFCRixNQUFyQixDQUFOOztBQUhMO0FBR0ZJLFlBQUFBLElBSEU7QUFBQTtBQUtSLG1CQUFNLG1CQUFLQyxnQ0FBTCxDQUFOOztBQUxRO0FBQUE7QUFNUixtQkFBTSxxQkFBT0QsSUFBUCxDQUFOO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WV0YTogeyB1c2VySUQgfSwgcGF5bG9hZDogeyBkaXJlY3RMaW5lIH0gfSA9IHlpZWxkIHRha2UoQ09OTkVDVF9GVUxGSUxMSU5HKTtcbiAgICAgIGNvbnN0IHRhc2sgPSB5aWVsZCBmb3JrKGZuLCBkaXJlY3RMaW5lLCB1c2VySUQpO1xuXG4gICAgICAvLyBXaGVuIHdlIHJlY2VpdmUgRElTQ09OTkVDVF9QRU5ESU5HLCB0aGUgRGlyZWN0IExpbmUgY29ubmVjdGlvbiBpcyB0ZWFyaW5nIGRvd24gYW5kIHNob3VsZCBub3QgYmUgdXNlZC5cbiAgICAgIHlpZWxkIHRha2UoRElTQ09OTkVDVF9QRU5ESU5HKTtcbiAgICAgIHlpZWxkIGNhbmNlbCh0YXNrKTtcbiAgICB9XG4gIH0pO1xufVxuIl19
{
"name": "botframework-webchat-core",
"version": "4.2.1-master.b34fa87",
"version": "4.2.1-master.bd3c22c",
"description": "Core of botframework-webchat",

@@ -53,3 +53,3 @@ "main": "lib/index.js",

"babel-plugin-version-transform": "^1.0.0",
"botframework-directlinejs": "^0.10.2",
"botframework-directlinejs": "^0.11.1",
"concurrently": "^4.0.1",

@@ -56,0 +56,0 @@ "jest": "^23.6.0",

@@ -0,4 +1,6 @@

// TODO: [P3] Take this deprecation code out when releasing on or after 2020 January 13
const SET_SEND_TYPING = 'WEB_CHAT/SET_SEND_TYPING';
export default function (value) {
// Deprecation notes added to reducer
return {

@@ -5,0 +7,0 @@ type: SET_SEND_TYPING,

@@ -17,2 +17,3 @@ import connect from './actions/connect';

import setSendTyping from './actions/setSendTyping';
import setSendTypingIndicator from './actions/setSendTypingIndicator';
import startDictate from './actions/startDictate';

@@ -47,3 +48,3 @@ import startSpeakingActivity from './actions/startSpeakingActivity';

setSendTimeout,
setSendTyping,
setSendTypingIndicator,
startDictate,

@@ -54,3 +55,6 @@ startSpeakingActivity,

submitSendBox,
version
version,
// TODO: [P3] Take this deprecation code out when releasing on or after January 13 2020
setSendTyping
}

@@ -11,3 +11,3 @@ import { combineReducers } from 'redux';

import sendTimeout from './reducers/sendTimeout';
import sendTyping from './reducers/sendTyping';
import sendTypingIndicator from './reducers/sendTypingIndicator';
import suggestedActions from './reducers/suggestedActions';

@@ -24,4 +24,7 @@

sendTimeout,
sendTyping,
suggestedActions
sendTypingIndicator,
suggestedActions,
// TODO: [P3] Take this deprecation code out when releasing on or after January 13 2020
sendTyping: sendTypingIndicator
})

@@ -11,2 +11,3 @@ import { fork } from 'redux-saga/effects';

import removeIncomingTypingAfterIntervalSaga from './sagas/removeIncomingTypingAfterIntervalSaga';
import sendConversationUpdateOnConnectSaga from './sagas/sendConversationUpdateOnConnectSaga';
import sendEventToPostActivitySaga from './sagas/sendEventToPostActivitySaga';

@@ -17,3 +18,3 @@ import sendFilesToPostActivitySaga from './sagas/sendFilesToPostActivitySaga';

import sendPostBackToPostActivitySaga from './sagas/sendPostBackToPostActivitySaga';
import sendTypingOnSetSendBoxSaga from './sagas/sendTypingOnSetSendBoxSaga';
import sendTypingIndicatorOnSetSendBoxSaga from './sagas/sendTypingIndicatorOnSetSendBoxSaga';
import startDictateAfterSpeakActivitySaga from './sagas/startDictateAfterSpeakActivitySaga';

@@ -34,2 +35,3 @@ import startSpeakActivityOnPostActivitySaga from './sagas/startSpeakActivityOnPostActivitySaga';

yield fork(removeIncomingTypingAfterIntervalSaga);
yield fork(sendConversationUpdateOnConnectSaga);
yield fork(sendEventToPostActivitySaga);

@@ -40,3 +42,3 @@ yield fork(sendFilesToPostActivitySaga);

yield fork(sendPostBackToPostActivitySaga);
yield fork(sendTypingOnSetSendBoxSaga);
yield fork(sendTypingIndicatorOnSetSendBoxSaga);
yield fork(startDictateAfterSpeakActivitySaga);

@@ -43,0 +45,0 @@ yield fork(startSpeakActivityOnPostActivitySaga);

@@ -13,7 +13,8 @@ import {

import callUntil from './effects/callUntil';
import forever from './effects/forever';
import updateConnectionStatus, { UPDATE_CONNECTION_STATUS } from '../actions/updateConnectionStatus';
import createPromiseQueue from '../createPromiseQueue';
import { ConnectionStatus } from 'botframework-directlinejs';
import {

@@ -30,12 +31,12 @@ CONNECT,

DISCONNECT_PENDING,
DISCONNECT_REJECTED,
DISCONNECT_FULFILLED
} from '../actions/disconnect';
// const UNINITIALIZED = 0;
// const CONNECTING = 1;
const ONLINE = 2;
// const EXPIRED_TOKEN = 3;
// const FAILED_TO_CONNECT = 4;
const ENDED = 5;
const {
Connecting: CONNECTING,
Online: ONLINE,
ExpiredToken: EXPIRED_TOKEN,
FailedToConnect: FAILED_TO_CONNECT,
Ended: ENDED
} = ConnectionStatus;

@@ -46,42 +47,58 @@ function randomUserID() {

export default function* () {
for (;;) {
const { payload: { directLine, userID } } = yield take(CONNECT);
const { token } = directLine;
const { user: userIDFromToken } = decode(token) || {};
function* observeAndPutConnectionStatusUpdate(directLine) {
const connectionStatusQueue = createPromiseQueue();
const connectionStatusSubscription = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
});
if (userIDFromToken) {
if (userID && userID !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
try {
for (;;) {
const connectionStatus = yield call(connectionStatusQueue.shift);
userID = userIDFromToken;
} else if (userID) {
if (typeof userID !== 'string') {
console.warn('Web Chat: user ID must be a string.');
userID = randomUserID();
} else if (/^dl_/.test(userID)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
userID = randomUserID();
}
} else {
// Only specify "default-user" if not found from token and not passed in
userID = randomUserID();
yield put(updateConnectionStatus(connectionStatus));
}
} finally {
connectionStatusSubscription.unsubscribe();
}
}
const connectTask = yield fork(connectSaga, directLine, userID);
function negativeUpdateConnectionStatusAction({ payload, type }) {
if (type === UPDATE_CONNECTION_STATUS) {
const { connectionStatus } = payload;
yield take(DISCONNECT);
yield call(disconnectSaga, connectTask, directLine);
return (
connectionStatus !== CONNECTING
&& connectionStatus !== ONLINE
);
}
}
function* connectSaga(directLine, userID) {
const meta = { userID };
function rectifyUserID(directLine, userIDFromAction) {
const { token } = directLine;
const { user: userIDFromToken } = decode(token) || {};
yield put({ type: CONNECT_PENDING, meta });
if (userIDFromToken) {
if (userIDFromAction && userIDFromAction !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
const connectionStatusQueue = createPromiseQueue();
const connectionStatusSubscription = directLine.connectionStatus$.subscribe({ next: connectionStatusQueue.push });
return userIDFromToken;
} else if (userIDFromAction) {
if (typeof userIDFromAction !== 'string') {
console.warn('Web Chat: user ID must be a string.');
return randomUserID();
} else if (/^dl_/.test(userIDFromAction)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
return randomUserID();
}
} else {
return randomUserID();
}
return userIDFromAction;
}
function* connectSaga(directLine) {
// DirectLineJS start the connection only after the first subscriber for activity$, but not connectionStatus$

@@ -91,47 +108,82 @@ const activitySubscription = directLine.activity$.subscribe({ next: () => 0 });

try {
try {
yield callUntil(connectionStatusQueue.shift, [], connectionStatus => connectionStatus === ONLINE);
yield put({ type: CONNECT_FULFILLING, meta, payload: { directLine } });
yield put({ type: CONNECT_FULFILLED, meta, payload: { directLine } });
} catch (err) {
yield put({ type: CONNECT_REJECTED, error: true, meta, payload: err });
} finally {
if (yield cancelled()) {
yield put({ type: CONNECT_REJECTED, error: true, meta, payload: new Error('cancelled') });
for (;;) {
const { payload: { connectionStatus } } = yield take(UPDATE_CONNECTION_STATUS);
// We will ignore DISCONNECT actions until we connect
if (connectionStatus === ONLINE) {
// TODO: [P2] DirectLineJS should kill the connection when we unsubscribe
// But currently in v3, DirectLineJS does not have this functionality
// Thus, we need to call "end()" explicitly
return () => {
activitySubscription.unsubscribe();
directLine.end();
};
} else if (
connectionStatus === ENDED
|| connectionStatus === EXPIRED_TOKEN
|| connectionStatus === FAILED_TO_CONNECT
) {
// If we receive anything negative, we will assume the connection is errored out
throw new Error('Failed to connect');
}
}
} finally {
if (yield cancelled()) {
activitySubscription.unsubscribe();
yield forever();
} finally {
// TODO: [P2] DirectLineJS should kill the connection when we unsubscribe
// But currently in v3, DirectLineJS does not have this functionality
// Thus, we need to call "end()" explicitly
directLine.end();
activitySubscription.unsubscribe();
connectionStatusSubscription.unsubscribe();
throw new Error('Cancelled');
}
}
}
function* disconnectSaga(connectTask, directLine) {
yield put({ type: DISCONNECT_PENDING });
export default function* () {
for (;;) {
const { payload: { directLine, userID: userIDFromAction } } = yield take(CONNECT);
const updateConnectionStatusTask = yield fork(observeAndPutConnectionStatusUpdate, directLine);
const connectionStatusQueue = createPromiseQueue();
const unsubscribe = directLine.connectionStatus$.subscribe({ next: connectionStatusQueue.push });
try {
const meta = { userID: rectifyUserID(directLine, userIDFromAction) };
let endDirectLine;
// DirectLineJS should cancel underlying REST/WS when we cancel
// the connect task, which subsequently unsubscribe connectionStatus$
yield cancel(connectTask);
yield put({ type: CONNECT_PENDING, meta });
try {
yield callUntil(connectionStatusQueue.shift, [], connectionStatus => connectionStatus === ENDED);
yield put({ type: DISCONNECT_FULFILLED });
} catch (err) {
yield put({ type: DISCONNECT_REJECTED, error: true, payload: err });
} finally {
if (yield cancelled()) {
yield put({ type: DISCONNECT_REJECTED, error: true, payload: new Error('cancelled') });
try {
endDirectLine = yield call(connectSaga, directLine);
} catch (err) {
yield put({ type: CONNECT_REJECTED, error: true, meta, payload: err });
continue;
}
// At this point, we established connection to Direct Line.
// Any errors from this point, we need to make sure we call endDirectLine() to release resources.
try {
yield put({ type: CONNECT_FULFILLING, meta, payload: { directLine } });
yield put({ type: CONNECT_FULFILLED, meta, payload: { directLine } });
const terminateAction = yield take([DISCONNECT, negativeUpdateConnectionStatusAction]);
// Even if the connection is interrupted, we will still emitting DISCONNECT_PENDING.
// This will makes handling logic easier. If CONNECT_FULFILLED, we guarantee DISCONNECT_PENDING.
yield put({ type: DISCONNECT_PENDING });
endDirectLine();
if (terminateAction.type === DISCONNECT) {
// For graceful disconnect, we wait until Direct Line say it is ended
yield take(negativeUpdateConnectionStatusAction);
}
} finally {
// It is meaningless to continue to use the Direct Line object even disconnect failed.
// We will still unsubscribe to incoming activities and consider Direct Line object abandoned.
yield put({ type: DISCONNECT_FULFILLED });
endDirectLine();
}
} finally {
yield cancel(updateConnectionStatusTask);
}
unsubscribe();
}
}

@@ -9,3 +9,3 @@ import {

import { CONNECT_FULFILLING } from '../../actions/connect';
import { DISCONNECT_FULFILLED } from '../../actions/disconnect';
import { DISCONNECT_PENDING } from '../../actions/disconnect';

@@ -18,3 +18,4 @@ export default function (fn) {

yield take(DISCONNECT_FULFILLED);
// When we receive DISCONNECT_PENDING, the Direct Line connection is tearing down and should not be used.
yield take(DISCONNECT_PENDING);
yield cancel(task);

@@ -21,0 +22,0 @@ }

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