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