botium-core 1.13.10 → 1.13.11
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 +14 -10
- package/dist/botium-cjs.js.map +1 -1
- package/dist/botium-es.js +35 -31
- package/dist/botium-es.js.map +1 -1
- package/package.json +1 -1
- package/src/scripting/helper.js +6 -2
package/dist/botium-es.js
CHANGED
|
@@ -10,7 +10,7 @@ import randomatic from 'randomatic';
|
|
|
10
10
|
import lodash from 'lodash';
|
|
11
11
|
import boolean$1 from 'boolean';
|
|
12
12
|
import events from 'events';
|
|
13
|
-
import debug$
|
|
13
|
+
import debug$n from 'debug';
|
|
14
14
|
import vm2 from 'vm2';
|
|
15
15
|
import isClass from 'is-class';
|
|
16
16
|
import crypto from 'crypto';
|
|
@@ -37,7 +37,7 @@ import express from 'express';
|
|
|
37
37
|
import bodyParser from 'body-parser';
|
|
38
38
|
|
|
39
39
|
var name = "botium-core";
|
|
40
|
-
var version$1 = "1.13.
|
|
40
|
+
var version$1 = "1.13.11";
|
|
41
41
|
var description = "The Selenium for Chatbots";
|
|
42
42
|
var main = "index.js";
|
|
43
43
|
var module = "dist/botium-es.js";
|
|
@@ -1159,7 +1159,7 @@ LogicHookConsts.DEFAULT_USER_INPUTS;
|
|
|
1159
1159
|
const {
|
|
1160
1160
|
NodeVM: NodeVM$2
|
|
1161
1161
|
} = vm2;
|
|
1162
|
-
const debug$
|
|
1162
|
+
const debug$m = debug$n('botium-core-asserterUtils');
|
|
1163
1163
|
const {
|
|
1164
1164
|
BotiumError: BotiumError$6
|
|
1165
1165
|
} = BotiumError_1;
|
|
@@ -1214,7 +1214,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1214
1214
|
_fetchAsserters() {
|
|
1215
1215
|
this.caps[Capabilities.ASSERTERS].forEach(asserter => {
|
|
1216
1216
|
if (this.asserters[asserter.ref]) {
|
|
1217
|
-
debug$
|
|
1217
|
+
debug$m(`${asserter.ref} asserter already exists, overwriting.`);
|
|
1218
1218
|
}
|
|
1219
1219
|
this.asserters[asserter.ref] = this._loadClass(asserter, 'asserter');
|
|
1220
1220
|
if (asserter.global) {
|
|
@@ -1225,7 +1225,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1225
1225
|
_fetchLogicHooks() {
|
|
1226
1226
|
this.caps[Capabilities.LOGIC_HOOKS].forEach(logicHook => {
|
|
1227
1227
|
if (this.logicHooks[logicHook.ref]) {
|
|
1228
|
-
debug$
|
|
1228
|
+
debug$m(`${logicHook.ref} logic hook already exists, overwriting.`);
|
|
1229
1229
|
}
|
|
1230
1230
|
this.logicHooks[logicHook.ref] = this._loadClass(logicHook, 'logichook');
|
|
1231
1231
|
if (logicHook.global) {
|
|
@@ -1236,7 +1236,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1236
1236
|
_fetchUserInputs() {
|
|
1237
1237
|
this.caps[Capabilities.USER_INPUTS].forEach(userInput => {
|
|
1238
1238
|
if (this.userInputs[userInput.ref]) {
|
|
1239
|
-
debug$
|
|
1239
|
+
debug$m(`${userInput.ref} userinput already exists, overwriting.`);
|
|
1240
1240
|
}
|
|
1241
1241
|
this.userInputs[userInput.ref] = this._loadClass(userInput, 'userinput');
|
|
1242
1242
|
});
|
|
@@ -1441,7 +1441,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1441
1441
|
loadErr.push(`Failed to fetch ${ref} ${hookType} from ${src} - ${err.message} `);
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
loadErr.forEach(debug$
|
|
1444
|
+
loadErr.forEach(debug$m);
|
|
1445
1445
|
}
|
|
1446
1446
|
throw new Error(`Failed to fetch ${ref} ${hookType}, no idea how to load ...`);
|
|
1447
1447
|
}
|
|
@@ -1652,6 +1652,7 @@ var Enums = {
|
|
|
1652
1652
|
};
|
|
1653
1653
|
Enums.E_SCRIPTING_MEMORY_COLUMN_MODE;
|
|
1654
1654
|
|
|
1655
|
+
const debug$l = debug$n('botium-core-scripting-helper');
|
|
1655
1656
|
const {
|
|
1656
1657
|
E_SCRIPTING_MEMORY_COLUMN_MODE: E_SCRIPTING_MEMORY_COLUMN_MODE$1
|
|
1657
1658
|
} = Enums;
|
|
@@ -2202,7 +2203,7 @@ const calculateWer$1 = (str, pattern) => {
|
|
|
2202
2203
|
continue;
|
|
2203
2204
|
}
|
|
2204
2205
|
const wordCount = wildcardPart.split(' ').length;
|
|
2205
|
-
const subsetPhrases = _getSubsets(botMessageWords,
|
|
2206
|
+
const subsetPhrases = _getSubsets(botMessageWords, Math.min(wordCount, botMessageWords.length)).map(subset => subset.join(' '));
|
|
2206
2207
|
let subsetPhraseFound = null;
|
|
2207
2208
|
for (const subsetPhrase of subsetPhrases) {
|
|
2208
2209
|
const localWer = wordErrorRate.wordErrorRate(subsetPhrase, wildcardPart).toFixed(2);
|
|
@@ -2211,7 +2212,9 @@ const calculateWer$1 = (str, pattern) => {
|
|
|
2211
2212
|
wer = localWer;
|
|
2212
2213
|
}
|
|
2213
2214
|
}
|
|
2214
|
-
|
|
2215
|
+
if (lodash.isNil(subsetPhraseFound)) {
|
|
2216
|
+
throw new Error('Word Error Asserter: Something went wrong here, please try to modify your assertion!');
|
|
2217
|
+
}
|
|
2215
2218
|
errors.push(_getErrors(_getWords(wildcardPart), _getWords(subsetPhraseFound)));
|
|
2216
2219
|
}
|
|
2217
2220
|
let errCount = 0;
|
|
@@ -2220,6 +2223,7 @@ const calculateWer$1 = (str, pattern) => {
|
|
|
2220
2223
|
errCount += err.filter(err => err === true).length;
|
|
2221
2224
|
allCount += err.length;
|
|
2222
2225
|
}
|
|
2226
|
+
debug$l(`Word Error Rate Asserter - Compared Bot Message '${botMessage}' / '${utt}': ${(errCount / allCount).toFixed(2)}`);
|
|
2223
2227
|
return (errCount / allCount).toFixed(2);
|
|
2224
2228
|
};
|
|
2225
2229
|
var helper = {
|
|
@@ -2239,7 +2243,7 @@ var helper = {
|
|
|
2239
2243
|
calculateWer: calculateWer$1
|
|
2240
2244
|
};
|
|
2241
2245
|
|
|
2242
|
-
const debug$k = debug$
|
|
2246
|
+
const debug$k = debug$n('botium-core-ScriptingMemory');
|
|
2243
2247
|
const {
|
|
2244
2248
|
v1: uuidv1
|
|
2245
2249
|
} = uuid;
|
|
@@ -2576,7 +2580,7 @@ ScriptingMemory.extractVarNames;
|
|
|
2576
2580
|
ScriptingMemory.RESERVED_WORDS;
|
|
2577
2581
|
ScriptingMemory.SCRIPTING_FUNCTIONS;
|
|
2578
2582
|
|
|
2579
|
-
const debug$j = debug$
|
|
2583
|
+
const debug$j = debug$n('botium-core-RetryHelper');
|
|
2580
2584
|
var RetryHelper_1 = class RetryHelper {
|
|
2581
2585
|
constructor(caps, section, options = {}) {
|
|
2582
2586
|
this.retryErrorPatterns = [];
|
|
@@ -2614,7 +2618,7 @@ var RetryHelper_1 = class RetryHelper {
|
|
|
2614
2618
|
}
|
|
2615
2619
|
};
|
|
2616
2620
|
|
|
2617
|
-
const debug$i = debug$
|
|
2621
|
+
const debug$i = debug$n('botium-core-Convo');
|
|
2618
2622
|
const {
|
|
2619
2623
|
BotiumError: BotiumError$4,
|
|
2620
2624
|
botiumErrorFromErr: botiumErrorFromErr$1,
|
|
@@ -3718,7 +3722,7 @@ var JsonToJson = {
|
|
|
3718
3722
|
const {
|
|
3719
3723
|
NodeVM
|
|
3720
3724
|
} = vm2;
|
|
3721
|
-
const debug$h = debug$
|
|
3725
|
+
const debug$h = debug$n('botium-core-HookUtils');
|
|
3722
3726
|
const {
|
|
3723
3727
|
BotiumError: BotiumError$3
|
|
3724
3728
|
} = BotiumError_1;
|
|
@@ -3844,7 +3848,7 @@ var Script = {
|
|
|
3844
3848
|
precompile: precompile$1
|
|
3845
3849
|
};
|
|
3846
3850
|
|
|
3847
|
-
const debug$g = debug$
|
|
3851
|
+
const debug$g = debug$n('botium-core-PrecompilerMarkdownRasa');
|
|
3848
3852
|
const htmlCommentRegexp = /(<!--.*?-->)/g;
|
|
3849
3853
|
var precompile = (caps, scriptBuffer, options, filename) => {
|
|
3850
3854
|
if (!filename.endsWith('.md')) {
|
|
@@ -3945,7 +3949,7 @@ var MarkdownRasa = {
|
|
|
3945
3949
|
precompile: precompile
|
|
3946
3950
|
};
|
|
3947
3951
|
|
|
3948
|
-
const debug$f = debug$
|
|
3952
|
+
const debug$f = debug$n('botium-core-CapabilitiesUtils');
|
|
3949
3953
|
const {
|
|
3950
3954
|
toJsonWeak
|
|
3951
3955
|
} = Utils;
|
|
@@ -4036,7 +4040,7 @@ var CapabilitiesUtils = {
|
|
|
4036
4040
|
flatCababilities: flatCababilities$1
|
|
4037
4041
|
};
|
|
4038
4042
|
|
|
4039
|
-
const debug$e = debug$
|
|
4043
|
+
const debug$e = debug$n('botium-core-Precompilers');
|
|
4040
4044
|
const {
|
|
4041
4045
|
isJsonObject
|
|
4042
4046
|
} = Utils;
|
|
@@ -4163,7 +4167,7 @@ var Utterance_1 = class Utterance {
|
|
|
4163
4167
|
}
|
|
4164
4168
|
};
|
|
4165
4169
|
|
|
4166
|
-
const debug$d = debug$
|
|
4170
|
+
const debug$d = debug$n('botium-core-CompilerXlsx');
|
|
4167
4171
|
const {
|
|
4168
4172
|
E_SCRIPTING_MEMORY_COLUMN_MODE
|
|
4169
4173
|
} = Enums;
|
|
@@ -4826,7 +4830,7 @@ var CompilerTxt_1 = class CompilerTxt extends CompilerBase_1 {
|
|
|
4826
4830
|
const {
|
|
4827
4831
|
parse
|
|
4828
4832
|
} = sync;
|
|
4829
|
-
const debug$c = debug$
|
|
4833
|
+
const debug$c = debug$n('botium-core-CompilerCsv');
|
|
4830
4834
|
const {
|
|
4831
4835
|
Convo: Convo$3
|
|
4832
4836
|
} = Convo_1;
|
|
@@ -5037,7 +5041,7 @@ var CompilerCsv_1 = class CompilerCsv extends CompilerBase_1 {
|
|
|
5037
5041
|
}
|
|
5038
5042
|
};
|
|
5039
5043
|
|
|
5040
|
-
const debug$b = debug$
|
|
5044
|
+
const debug$b = debug$n('botium-core-CompilerObject');
|
|
5041
5045
|
const {
|
|
5042
5046
|
Convo: Convo$2
|
|
5043
5047
|
} = Convo_1;
|
|
@@ -5183,7 +5187,7 @@ var CompilerJson_1 = class CompilerJson extends CompilerObjectBase_1 {
|
|
|
5183
5187
|
}
|
|
5184
5188
|
};
|
|
5185
5189
|
|
|
5186
|
-
const debug$a = debug$
|
|
5190
|
+
const debug$a = debug$n('botium-core-CompilerMarkdown');
|
|
5187
5191
|
const md = new markdownIt();
|
|
5188
5192
|
const {
|
|
5189
5193
|
Convo: Convo$1
|
|
@@ -5294,7 +5298,7 @@ var CompilerMarkdown_1 = class CompilerMarkdown extends CompilerBase_1 {
|
|
|
5294
5298
|
};
|
|
5295
5299
|
|
|
5296
5300
|
promise.shim();
|
|
5297
|
-
const debug$9 = debug$
|
|
5301
|
+
const debug$9 = debug$n('botium-core-ScriptingProvider');
|
|
5298
5302
|
const {
|
|
5299
5303
|
Convo,
|
|
5300
5304
|
ConvoStep
|
|
@@ -6894,7 +6898,7 @@ var NoRepo_1 = class NoRepo extends BaseRepo_1 {
|
|
|
6894
6898
|
};
|
|
6895
6899
|
|
|
6896
6900
|
var ProcessUtils = createCommonjsModule(function (module) {
|
|
6897
|
-
const debug = debug$
|
|
6901
|
+
const debug = debug$n('botium-core-ProcessUtils');
|
|
6898
6902
|
module.exports = {
|
|
6899
6903
|
childCommandLineRun: (cmd, ignoreErrors = false, processOptions = {}) => {
|
|
6900
6904
|
const cmdOptions = cmd.split(' ');
|
|
@@ -6945,7 +6949,7 @@ var ProcessUtils = createCommonjsModule(function (module) {
|
|
|
6945
6949
|
ProcessUtils.childCommandLineRun;
|
|
6946
6950
|
ProcessUtils.childProcessRun;
|
|
6947
6951
|
|
|
6948
|
-
const debug$8 = debug$
|
|
6952
|
+
const debug$8 = debug$n('botium-core-GitRepo');
|
|
6949
6953
|
var GitRepo_1 = class GitRepo extends BaseRepo_1 {
|
|
6950
6954
|
Validate() {
|
|
6951
6955
|
return super.Validate().then(() => {
|
|
@@ -7094,7 +7098,7 @@ var Queue_1 = class Queue {
|
|
|
7094
7098
|
}
|
|
7095
7099
|
};
|
|
7096
7100
|
|
|
7097
|
-
const debug$7 = debug$
|
|
7101
|
+
const debug$7 = debug$n('botium-connector-BaseContainer');
|
|
7098
7102
|
const {
|
|
7099
7103
|
executeHook: executeHook$1,
|
|
7100
7104
|
getHook: getHook$1
|
|
@@ -7293,7 +7297,7 @@ var BaseContainer_1 = class BaseContainer {
|
|
|
7293
7297
|
}
|
|
7294
7298
|
};
|
|
7295
7299
|
|
|
7296
|
-
const debug$6 = debug$
|
|
7300
|
+
const debug$6 = debug$n('botium-connector-GridContainer');
|
|
7297
7301
|
var GridContainer_1 = class GridContainer extends BaseContainer_1 {
|
|
7298
7302
|
Validate() {
|
|
7299
7303
|
return super.Validate().then(() => {
|
|
@@ -7493,7 +7497,7 @@ var InProcessContainer_1 = class InProcessContainer extends BaseContainer_1 {
|
|
|
7493
7497
|
}
|
|
7494
7498
|
};
|
|
7495
7499
|
|
|
7496
|
-
const debug$5 = debug$
|
|
7500
|
+
const debug$5 = debug$n('botium-core-inbound-proxy');
|
|
7497
7501
|
const buildRedisHandler = (redisurl, topic) => {
|
|
7498
7502
|
const redis = new ioredis(redisurl);
|
|
7499
7503
|
redis.on('connect', () => {
|
|
@@ -7571,7 +7575,7 @@ proxy.startProxy;
|
|
|
7571
7575
|
const {
|
|
7572
7576
|
v4: uuidv4
|
|
7573
7577
|
} = uuid;
|
|
7574
|
-
const debug$4 = debug$
|
|
7578
|
+
const debug$4 = debug$n('botium-connector-simplerest');
|
|
7575
7579
|
const {
|
|
7576
7580
|
startProxy
|
|
7577
7581
|
} = proxy;
|
|
@@ -8444,7 +8448,7 @@ var SimpleRestContainer_1 = class SimpleRestContainer {
|
|
|
8444
8448
|
}
|
|
8445
8449
|
};
|
|
8446
8450
|
|
|
8447
|
-
const debug$3 = debug$
|
|
8451
|
+
const debug$3 = debug$n('botium-connector-PluginConnectorContainer-helper');
|
|
8448
8452
|
const {
|
|
8449
8453
|
BotiumError
|
|
8450
8454
|
} = BotiumError_1;
|
|
@@ -8586,7 +8590,7 @@ var plugins = {
|
|
|
8586
8590
|
tryLoadPlugin: tryLoadPlugin$1
|
|
8587
8591
|
};
|
|
8588
8592
|
|
|
8589
|
-
const debug$2 = debug$
|
|
8593
|
+
const debug$2 = debug$n('botium-connector-PluginConnectorContainer');
|
|
8590
8594
|
const {
|
|
8591
8595
|
tryLoadPlugin
|
|
8592
8596
|
} = plugins;
|
|
@@ -8731,7 +8735,7 @@ var require$$2 = getCjsExportFromNamespace(_package$1);
|
|
|
8731
8735
|
const {
|
|
8732
8736
|
boolean
|
|
8733
8737
|
} = boolean$1;
|
|
8734
|
-
const debug$1 = debug$
|
|
8738
|
+
const debug$1 = debug$n('botium-core-BotDriver');
|
|
8735
8739
|
const {
|
|
8736
8740
|
version
|
|
8737
8741
|
} = require$$2;
|
|
@@ -9036,7 +9040,7 @@ var BotDriver_1 = class BotDriver {
|
|
|
9036
9040
|
}
|
|
9037
9041
|
};
|
|
9038
9042
|
|
|
9039
|
-
const debug = debug$
|
|
9043
|
+
const debug = debug$n('botium-core-Plugins');
|
|
9040
9044
|
const PLUGIN_TYPE_CONNECTOR = 'PLUGIN_TYPE_CONNECTOR';
|
|
9041
9045
|
const PLUGIN_TYPE_ASSERTER = 'PLUGIN_TYPE_ASSERTER';
|
|
9042
9046
|
const PLUGIN_TYPE_LOGICHOOK = 'PLUGIN_TYPE_LOGICHOOK';
|