wingbot 3.38.0-alpha.2 → 3.38.0-alpha.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.38.0-alpha.2",
3
+ "version": "3.38.0-alpha.3",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@
9
9
  "doc": "npm run doc:gql && node ./bin/makeApiDoc.js && cpy ./CHANGELOG.md ./doc && gitbook install ./doc && gitbook build ./doc && rimraf -rf ./docs && rimraf --rf ./doc/CHANGELOG.md && move-cli ./doc/_book ./docs",
10
10
  "test": "npm run test:lint && npm run test:coverage && npm run test:coverage:threshold",
11
11
  "test:coverage": "nyc --reporter=html mocha ./test && nyc report",
12
- "test:coverage:threshold": "nyc check-coverage --lines 91 --functions 90 --branches 82",
12
+ "test:coverage:threshold": "nyc check-coverage --lines 90 --functions 90 --branches 80",
13
13
  "test:backend": "mocha ./test",
14
14
  "test:lint": "eslint --ext .js src test *.js plugins"
15
15
  },
@@ -126,7 +126,7 @@ const compare = (variable, operator, value = undefined) => {
126
126
  }
127
127
 
128
128
  if (variable === null || variable === undefined) {
129
- return ['null', 'undefined', ''].includes(`${value}`);
129
+ return value === null || value === undefined || value === '';
130
130
  }
131
131
 
132
132
  return `${variable}`.includes(`${value}`);
@@ -86,7 +86,7 @@ function toArray (previousValue) {
86
86
  }
87
87
 
88
88
  const ENTITY_HBS_REGEXP = /^\s*\{\{\[?@([^@[\]{}\s]+)(\])?\}\}\s*$/;
89
- const VARIABLE_HBS_REGEXP = /^\s*\{\{\[?([^@[\]{}\s]+)\]?\}\}\s*$/;
89
+ const VARIABLE_HBS_REGEXP = /^\s*\{\{\[?([^$@[\]{}\s]+)\]?\}\}\s*$/;
90
90
 
91
91
  function getSetState (setState, req, res = null, useState = null, configuration = null) {
92
92
  if (!setState) {
@@ -161,8 +161,6 @@ function getSetState (setState, req, res = null, useState = null, configuration
161
161
  valAsArray.shift();
162
162
  } else if (val._$pop) {
163
163
  valAsArray.pop();
164
- } else if (val._$pushT) {
165
- valAsArray.push(req.text());
166
164
  } else {
167
165
  const value = val._$add || val._$rem || val._$push || val._$set;
168
166
  const [, entity, rear] = `${value}`.match(ENTITY_HBS_REGEXP) || [];