botium-core 1.15.8 → 1.15.9
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/botium-cjs.js
CHANGED
|
@@ -77,7 +77,7 @@ var express__default = /*#__PURE__*/_interopDefaultLegacy(express);
|
|
|
77
77
|
var bodyParser__default = /*#__PURE__*/_interopDefaultLegacy(bodyParser);
|
|
78
78
|
|
|
79
79
|
var name = "botium-core";
|
|
80
|
-
var version$1 = "1.15.
|
|
80
|
+
var version$1 = "1.15.9";
|
|
81
81
|
var description = "The Selenium for Chatbots";
|
|
82
82
|
var main = "index.js";
|
|
83
83
|
var module$1 = "dist/botium-es.js";
|
|
@@ -6097,12 +6097,18 @@ var ScriptingProvider_1 = class ScriptingProvider {
|
|
|
6097
6097
|
if (hookType !== 'onMeStart' && hookType !== 'onMePrepare' && hookType !== 'onMeEnd' && hookType !== 'onBotStart' && hookType !== 'onBotPrepare' && hookType !== 'onBotEnd' && hookType !== 'onConvoBegin' && hookType !== 'onConvoEnd') {
|
|
6098
6098
|
throw Error(`Unknown hookType ${hookType}`);
|
|
6099
6099
|
}
|
|
6100
|
-
|
|
6100
|
+
let localHooks = (logicHooks || []).filter(l => this.logicHooks[l.name][hookType]);
|
|
6101
|
+
// Scripting memory file are injected via SET_SCRIPTING_MEMORY in the BEGIN step
|
|
6102
|
+
// But there might be other logic hooks that need the scripting memory variables
|
|
6103
|
+
// Order is important (SET_SCRIPTING_MEMORY in begin can be because the user added it,
|
|
6104
|
+
// or because the scripting memory file added it. User one has to be the last one.
|
|
6105
|
+
localHooks = [...localHooks.filter(l => l.name === 'SET_SCRIPTING_MEMORY'), ...localHooks.filter(l => l.name !== 'SET_SCRIPTING_MEMORY')];
|
|
6101
6106
|
const convoStepPromises = localHooks.map(l => p(this.retryHelperLogicHook, () => this.logicHooks[l.name][hookType]({
|
|
6102
6107
|
convo,
|
|
6103
6108
|
convoStep,
|
|
6104
6109
|
scriptingMemory,
|
|
6105
6110
|
container,
|
|
6111
|
+
// Do this more sensitve for SET_SCRIPTING_MEMORY? It can have scripting variables in the args
|
|
6106
6112
|
args: ScriptingMemory.applyToArgs(l.args, scriptingMemory, container.caps, rest.botMsg),
|
|
6107
6113
|
isGlobal: false,
|
|
6108
6114
|
...rest
|
|
@@ -9571,8 +9577,8 @@ var BotDriver_1 = class BotDriver {
|
|
|
9571
9577
|
if (lodash__default["default"].isString(newCaps[capKey])) {
|
|
9572
9578
|
try {
|
|
9573
9579
|
caps[capKey] = JSON.parse(newCaps[capKey]);
|
|
9574
|
-
if (lodash__default["default"].isFinite(
|
|
9575
|
-
caps[capKey] =
|
|
9580
|
+
if (lodash__default["default"].isFinite(Number(newCaps[capKey]))) {
|
|
9581
|
+
caps[capKey] = newCaps[capKey].toString();
|
|
9576
9582
|
}
|
|
9577
9583
|
} catch (err) {
|
|
9578
9584
|
caps[capKey] = newCaps[capKey];
|