From 43d84f873cfb133b78947c3421bedf7b5f58518b Mon Sep 17 00:00:00 2001 From: ftreml Date: Fri, 23 Feb 2018 11:06:03 +0000 Subject: [PATCH] botkit fix --- index.js | 4 +- package-lock.json | 8 +- package.json | 4 +- samples/botkit/jasmine/package-lock.json | 740 +++++++++-------------- src/globals.js | 9 +- src/helpers/botkit.js | 190 +++--- src/helpers/jasmine.js | 8 +- src/readconfig.js | 7 +- src/testmybot.js | 14 + 9 files changed, 416 insertions(+), 568 deletions(-) diff --git a/index.js b/index.js index a04a2ba..6d1f567 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,6 @@ module.exports.helper = { botkit: () => require('./src/helpers/botkit') }; module.exports.emulator = { - console: require('./src/emulator/console/index'), - browser: require('./src/emulator/browser/index') + console: () => require('./src/emulator/console/index'), + browser: () => require('./src/emulator/browser/index') }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e570c4d..149ec3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "testmybot", - "version": "1.2.3", + "version": "1.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -521,9 +521,9 @@ } }, "botium-core": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/botium-core/-/botium-core-1.1.12.tgz", - "integrity": "sha1-YWOJwh7Iju04+YAOlyAtAm1ewc8=", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/botium-core/-/botium-core-1.1.13.tgz", + "integrity": "sha1-/MPUAOLKLNv0jzPQStlypfq2/EQ=", "requires": { "async": "2.6.0", "body-parser": "1.18.2", diff --git a/package.json b/package.json index babdea3..e292eb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "testmybot", - "version": "1.2.3", + "version": "1.2.4", "engines": { "node": ">=6.0" }, @@ -32,7 +32,7 @@ "dependencies": { "async": "^2.1.5", "body-parser": "^1.18.2", - "botium-core": "1.1.12", + "botium-core": "1.1.13", "chai": "^4.1.2", "chalk": "^2.3.0", "clear": "0.0.1", diff --git a/samples/botkit/jasmine/package-lock.json b/samples/botkit/jasmine/package-lock.json index 649c23b..6362a1a 100644 --- a/samples/botkit/jasmine/package-lock.json +++ b/samples/botkit/jasmine/package-lock.json @@ -5,157 +5,150 @@ "requires": true, "dependencies": { "@ciscospark/common": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/common/-/common-1.27.1.tgz", - "integrity": "sha1-AvQU9LJPFl50aKPf3PW43DBgXVE=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/common/-/common-1.28.5.tgz", + "integrity": "sha1-AYVJ3l0kUPWVr/K0/iL7ZsD0MOg=", "requires": { "babel-runtime": "6.26.0", "backoff": "2.5.0", - "core-decorators": "0.14.0", - "envify": "3.4.1", + "core-decorators": "0.20.0", + "envify": "4.1.0", "lodash": "4.17.5", "urlsafe-base64": "1.0.0" } }, "@ciscospark/common-evented": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/common-evented/-/common-evented-1.27.1.tgz", - "integrity": "sha1-24fRT1MZaZY5cUtbyegmqcAkXco=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/common-evented/-/common-evented-1.28.5.tgz", + "integrity": "sha1-JDRfTN3oiuVVSGrTcEWPbx0ZWHw=", "requires": { - "@ciscospark/common": "1.27.1", + "@ciscospark/common": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1" + "envify": "4.1.0" } }, "@ciscospark/common-timers": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/common-timers/-/common-timers-1.27.1.tgz", - "integrity": "sha1-W2l+XvuOYdbi+G6Zvf/vgYmTH0o=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/common-timers/-/common-timers-1.28.5.tgz", + "integrity": "sha1-e076dnmXOQyn0TYFQqethRGWly4=", "requires": { - "envify": "3.4.1" + "envify": "4.1.0" } }, "@ciscospark/http-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/http-core/-/http-core-1.27.1.tgz", - "integrity": "sha1-UCVKKDMYlokLb/9M3KC16d35Z0Y=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/http-core/-/http-core-1.28.5.tgz", + "integrity": "sha1-IfpQceFiZ0bobg2Pto/AyuRDZ4U=", "requires": { - "@ciscospark/common": "1.27.1", + "@ciscospark/common": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "file-type": "3.9.0", "global": "4.3.2", "is-function": "1.0.1", "lodash": "4.17.5", "parse-headers": "2.0.1", - "qs": "5.2.1", + "qs": "6.5.1", "request": "2.83.0", "xtend": "4.0.1" - }, - "dependencies": { - "qs": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.1.tgz", - "integrity": "sha1-gB/uAw4LlFDWOFrcSKTMVbRK7fw=" - } } }, "@ciscospark/internal-plugin-feature": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-feature/-/internal-plugin-feature-1.27.1.tgz", - "integrity": "sha1-71hsxhqTNVObn4pCy63O9rVkZr8=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-feature/-/internal-plugin-feature-1.28.5.tgz", + "integrity": "sha1-5vsasAjpotgQS+d+MQxeD1r9n1Q=", "requires": { - "@ciscospark/internal-plugin-wdm": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/internal-plugin-wdm": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5" } }, "@ciscospark/internal-plugin-locus": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-locus/-/internal-plugin-locus-1.27.1.tgz", - "integrity": "sha1-HYUjLDuORd/giL8oGoPlG6oDpLo=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-locus/-/internal-plugin-locus-1.28.5.tgz", + "integrity": "sha1-FFwDgasKgBd12rbAQ8Bv2P65Lvw=", "requires": { - "@ciscospark/internal-plugin-mercury": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/internal-plugin-mercury": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5", "uuid": "3.2.1" } }, "@ciscospark/internal-plugin-mercury": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-mercury/-/internal-plugin-mercury-1.27.1.tgz", - "integrity": "sha1-19LCAF1GrPXL8jvWLkdJXCGqayY=", - "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/common-timers": "1.27.1", - "@ciscospark/internal-plugin-feature": "1.27.1", - "@ciscospark/internal-plugin-metrics": "1.27.1", - "@ciscospark/internal-plugin-wdm": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-mercury/-/internal-plugin-mercury-1.28.5.tgz", + "integrity": "sha1-/UMIxT3K6y/H/A+zal+4kyvOMog=", + "requires": { + "@ciscospark/common": "1.28.5", + "@ciscospark/common-timers": "1.28.5", + "@ciscospark/internal-plugin-feature": "1.28.5", + "@ciscospark/internal-plugin-metrics": "1.28.5", + "@ciscospark/internal-plugin-wdm": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", "backoff": "2.5.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5", "string": "3.3.3", "uuid": "3.2.1", - "ws": "1.1.5" + "ws": "4.1.0" }, "dependencies": { "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz", + "integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==", "requires": { - "options": "0.0.6", - "ultron": "1.0.2" + "async-limiter": "1.0.0", + "safe-buffer": "5.1.1" } } } }, "@ciscospark/internal-plugin-metrics": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-metrics/-/internal-plugin-metrics-1.27.1.tgz", - "integrity": "sha1-uKQaH2PqjNdzjNk491jWf6KnJTs=", - "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/common-timers": "1.27.1", - "@ciscospark/internal-plugin-wdm": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-metrics/-/internal-plugin-metrics-1.28.5.tgz", + "integrity": "sha1-vLjYXRQS3UtelbCSVyHk3FJ/dRU=", + "requires": { + "@ciscospark/common": "1.28.5", + "@ciscospark/common-timers": "1.28.5", + "@ciscospark/internal-plugin-wdm": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1" + "envify": "4.1.0" } }, "@ciscospark/internal-plugin-wdm": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-wdm/-/internal-plugin-wdm-1.27.1.tgz", - "integrity": "sha1-6mMntsz9MG/AirA7pR5yYzyPYPA=", - "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/common-timers": "1.27.1", - "@ciscospark/http-core": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/internal-plugin-wdm/-/internal-plugin-wdm-1.28.5.tgz", + "integrity": "sha1-Oz8FbbvY95tOeK4VMR4Cbaq9Mns=", + "requires": { + "@ciscospark/common": "1.28.5", + "@ciscospark/common-timers": "1.28.5", + "@ciscospark/http-core": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "ampersand-collection": "2.0.2", "ampersand-state": "5.0.3", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5" } }, "@ciscospark/media-engine-webrtc": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/media-engine-webrtc/-/media-engine-webrtc-1.27.1.tgz", - "integrity": "sha1-r5fUN4w74WzxoJIa1LhPfbCiNE4=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/media-engine-webrtc/-/media-engine-webrtc-1.28.5.tgz", + "integrity": "sha1-TXzQ+GVNtGkSWSPOD3cE2gGMY68=", "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/common-evented": "1.27.1", + "@ciscospark/common": "1.28.5", + "@ciscospark/common-evented": "1.28.5", "ampersand-events": "2.0.2", "babel-runtime": "6.26.0", - "core-decorators": "0.14.0", - "envify": "3.4.1", + "core-decorators": "0.20.0", + "envify": "4.1.0", "lodash": "4.17.5", "lodash-decorators": "4.5.0", "sdp-transform": "2.4.0", @@ -163,102 +156,102 @@ } }, "@ciscospark/plugin-authorization": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-authorization/-/plugin-authorization-1.27.1.tgz", - "integrity": "sha1-L0IMcBax29gNUm2gVCCDjVT4d1g=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-authorization/-/plugin-authorization-1.28.5.tgz", + "integrity": "sha1-+MYH5M8VExmyEC98JYl1iLBYtBA=", "requires": { - "@ciscospark/plugin-authorization-browser": "1.27.1", - "@ciscospark/plugin-authorization-node": "1.27.1", - "envify": "3.4.1" + "@ciscospark/plugin-authorization-browser": "1.28.5", + "@ciscospark/plugin-authorization-node": "1.28.5", + "envify": "4.1.0" } }, "@ciscospark/plugin-authorization-browser": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-authorization-browser/-/plugin-authorization-browser-1.27.1.tgz", - "integrity": "sha1-KiftvtGJzgtRPexFBEfM0dm9VMc=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-authorization-browser/-/plugin-authorization-browser-1.28.5.tgz", + "integrity": "sha1-SRgOm0PGDm7w1SSwZkkJfeiBbV4=", "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/internal-plugin-wdm": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/common": "1.28.5", + "@ciscospark/internal-plugin-wdm": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5", "uuid": "3.2.1" } }, "@ciscospark/plugin-authorization-node": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-authorization-node/-/plugin-authorization-node-1.27.1.tgz", - "integrity": "sha1-cl/fa1PbKURt4rxxkM0nZ79Dm40=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-authorization-node/-/plugin-authorization-node-1.28.5.tgz", + "integrity": "sha1-CYGO4JQBxh8n9JMoAP/Yf/2m1EQ=", "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/internal-plugin-wdm": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/common": "1.28.5", + "@ciscospark/internal-plugin-wdm": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1" + "envify": "4.1.0" } }, "@ciscospark/plugin-logger": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-logger/-/plugin-logger-1.27.1.tgz", - "integrity": "sha1-yeU+CAs+cLMtPr9z76tUNDgFPAE=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-logger/-/plugin-logger-1.28.5.tgz", + "integrity": "sha1-gllr8d3VGPT6rKR+Ned/02eZX7Q=", "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/common": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5" } }, "@ciscospark/plugin-memberships": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-memberships/-/plugin-memberships-1.27.1.tgz", - "integrity": "sha1-5McHHpKr4ysaID6aB3v5HXWDF3k=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-memberships/-/plugin-memberships-1.28.5.tgz", + "integrity": "sha1-wNAHRJ+ti+RyVHJsuVOrA6whlsw=", "requires": { - "@ciscospark/spark-core": "1.27.1", - "envify": "3.4.1" + "@ciscospark/spark-core": "1.28.5", + "envify": "4.1.0" } }, "@ciscospark/plugin-messages": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-messages/-/plugin-messages-1.27.1.tgz", - "integrity": "sha1-x8FEsneLB+rko+sEH5aYuchB0J0=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-messages/-/plugin-messages-1.28.5.tgz", + "integrity": "sha1-NQdn+cgGrnzPODe9DdHbN5tzhsg=", "requires": { - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5" } }, "@ciscospark/plugin-people": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-people/-/plugin-people-1.27.1.tgz", - "integrity": "sha1-ejxqJGsIt2WIyY8bZuQojYJnSdw=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-people/-/plugin-people-1.28.5.tgz", + "integrity": "sha1-TM8ku2yrXaTtkl1+pXO2WIFHmNo=", "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/common": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1" + "envify": "4.1.0" } }, "@ciscospark/plugin-phone": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-phone/-/plugin-phone-1.27.1.tgz", - "integrity": "sha1-mA28QFZ9oI2bCtWCTW3dhUIw5TM=", - "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/common-timers": "1.27.1", - "@ciscospark/internal-plugin-locus": "1.27.1", - "@ciscospark/internal-plugin-metrics": "1.27.1", - "@ciscospark/media-engine-webrtc": "1.27.1", - "@ciscospark/plugin-people": "1.27.1", - "@ciscospark/spark-core": "1.27.1", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-phone/-/plugin-phone-1.28.5.tgz", + "integrity": "sha1-o02m2mWA/sDxaWq29b6nHYTQPfU=", + "requires": { + "@ciscospark/common": "1.28.5", + "@ciscospark/common-timers": "1.28.5", + "@ciscospark/internal-plugin-locus": "1.28.5", + "@ciscospark/internal-plugin-metrics": "1.28.5", + "@ciscospark/media-engine-webrtc": "1.28.5", + "@ciscospark/plugin-people": "1.28.5", + "@ciscospark/spark-core": "1.28.5", "ampersand-collection": "2.0.2", "ampersand-collection-lodash-mixin": "4.0.0", "ampersand-state": "5.0.3", "babel-runtime": "6.26.0", "detectrtc": "1.3.5", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5", "lodash-decorators": "4.5.0", "sdp-transform": "2.4.0", @@ -266,66 +259,66 @@ } }, "@ciscospark/plugin-rooms": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-rooms/-/plugin-rooms-1.27.1.tgz", - "integrity": "sha1-BlSA3yncJ7Rov5N0cqK7hPJFWLo=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-rooms/-/plugin-rooms-1.28.5.tgz", + "integrity": "sha1-XU09U43xERjdh1q7EOZo7Af0Z/M=", "requires": { - "@ciscospark/spark-core": "1.27.1", - "envify": "3.4.1" + "@ciscospark/spark-core": "1.28.5", + "envify": "4.1.0" } }, "@ciscospark/plugin-team-memberships": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-team-memberships/-/plugin-team-memberships-1.27.1.tgz", - "integrity": "sha1-Lo27s+aXndsGQ50CnVYJ+IisrmE=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-team-memberships/-/plugin-team-memberships-1.28.5.tgz", + "integrity": "sha1-z+t6+juoPe+KGH+3m8TkFwdJev8=", "requires": { - "@ciscospark/spark-core": "1.27.1", - "envify": "3.4.1" + "@ciscospark/spark-core": "1.28.5", + "envify": "4.1.0" } }, "@ciscospark/plugin-teams": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-teams/-/plugin-teams-1.27.1.tgz", - "integrity": "sha1-MXPlp6ljma/xShk1yw3GNdYXSuI=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-teams/-/plugin-teams-1.28.5.tgz", + "integrity": "sha1-kyh60hfJpdqhpYmICFA4X0jfuOI=", "requires": { - "@ciscospark/spark-core": "1.27.1", - "envify": "3.4.1" + "@ciscospark/spark-core": "1.28.5", + "envify": "4.1.0" } }, "@ciscospark/plugin-webhooks": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/plugin-webhooks/-/plugin-webhooks-1.27.1.tgz", - "integrity": "sha1-SBIh/GPwUoCKeFCAOEzAIny7ub4=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/plugin-webhooks/-/plugin-webhooks-1.28.5.tgz", + "integrity": "sha1-HcGIU/ICgIxu93aB2bjWmohUQg4=", "requires": { - "@ciscospark/spark-core": "1.27.1", - "envify": "3.4.1" + "@ciscospark/spark-core": "1.28.5", + "envify": "4.1.0" } }, "@ciscospark/spark-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/spark-core/-/spark-core-1.27.1.tgz", - "integrity": "sha1-MC1wMegUikywSssFW5gzrfz8weo=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/spark-core/-/spark-core-1.28.5.tgz", + "integrity": "sha1-u5ihfMmVyIgniQWDFSnDysb4ddQ=", "requires": { - "@ciscospark/common": "1.27.1", - "@ciscospark/common-timers": "1.27.1", - "@ciscospark/http-core": "1.27.1", + "@ciscospark/common": "1.28.5", + "@ciscospark/common-timers": "1.28.5", + "@ciscospark/http-core": "1.28.5", "ampersand-collection": "2.0.2", "ampersand-events": "2.0.2", "ampersand-state": "5.0.3", "babel-runtime": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5", "uuid": "3.2.1" } }, "@ciscospark/storage-adapter-local-storage": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@ciscospark/storage-adapter-local-storage/-/storage-adapter-local-storage-1.27.1.tgz", - "integrity": "sha1-EJtkWkCCJZz1iKtgQ3yc6MgzQBQ=", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/@ciscospark/storage-adapter-local-storage/-/storage-adapter-local-storage-1.28.5.tgz", + "integrity": "sha1-ufNYGkgMpnuP/v0p7XzL0LBlt90=", "requires": { - "@ciscospark/spark-core": "1.27.1", + "@ciscospark/spark-core": "1.28.5", "babel-runtime": "6.26.0", - "envify": "3.4.1" + "envify": "4.1.0" } }, "@xmpp/jid": { @@ -381,11 +374,6 @@ "negotiator": "0.6.1" } }, - "acorn": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==" - }, "agent-base": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", @@ -405,11 +393,6 @@ "json-schema-traverse": "0.3.1" } }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, "ampersand-class-extend": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ampersand-class-extend/-/ampersand-class-extend-2.0.0.tgz", @@ -516,11 +499,6 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, - "ast-types": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", - "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=" - }, "async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", @@ -594,12 +572,8 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base62": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/base62/-/base62-1.2.7.tgz", - "integrity": "sha512-ck0nDbXLEq2nD5jIcEzdpk07sYQ5P6z4NMTIgeQCFr5CCRZzmgUPlOes4o0k5pvEUQJnKO/D079ybzjpjIKf2Q==" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base64url": { "version": "2.0.0", @@ -698,7 +672,7 @@ "body-parser": "1.18.2", "botbuilder": "3.14.0", "botkit-studio-sdk": "1.0.8", - "ciscospark": "1.27.1", + "ciscospark": "1.28.5", "clone": "2.1.1", "command-line-args": "4.0.7", "debug": "2.6.9", @@ -743,6 +717,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "1.0.0", "concat-map": "0.0.1" @@ -799,25 +774,25 @@ } }, "ciscospark": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/ciscospark/-/ciscospark-1.27.1.tgz", - "integrity": "sha1-SHQne9pfbqFCEFn1lL6lOBTFvi8=", - "requires": { - "@ciscospark/internal-plugin-wdm": "1.27.1", - "@ciscospark/plugin-authorization": "1.27.1", - "@ciscospark/plugin-logger": "1.27.1", - "@ciscospark/plugin-memberships": "1.27.1", - "@ciscospark/plugin-messages": "1.27.1", - "@ciscospark/plugin-people": "1.27.1", - "@ciscospark/plugin-phone": "1.27.1", - "@ciscospark/plugin-rooms": "1.27.1", - "@ciscospark/plugin-team-memberships": "1.27.1", - "@ciscospark/plugin-teams": "1.27.1", - "@ciscospark/plugin-webhooks": "1.27.1", - "@ciscospark/spark-core": "1.27.1", - "@ciscospark/storage-adapter-local-storage": "1.27.1", + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/ciscospark/-/ciscospark-1.28.5.tgz", + "integrity": "sha1-SWfw5Ylh1QwvSF3Ru/NkmN40fMs=", + "requires": { + "@ciscospark/internal-plugin-wdm": "1.28.5", + "@ciscospark/plugin-authorization": "1.28.5", + "@ciscospark/plugin-logger": "1.28.5", + "@ciscospark/plugin-memberships": "1.28.5", + "@ciscospark/plugin-messages": "1.28.5", + "@ciscospark/plugin-people": "1.28.5", + "@ciscospark/plugin-phone": "1.28.5", + "@ciscospark/plugin-rooms": "1.28.5", + "@ciscospark/plugin-team-memberships": "1.28.5", + "@ciscospark/plugin-teams": "1.28.5", + "@ciscospark/plugin-webhooks": "1.28.5", + "@ciscospark/spark-core": "1.28.5", + "@ciscospark/storage-adapter-local-storage": "1.28.5", "babel-polyfill": "6.26.0", - "envify": "3.4.1", + "envify": "4.1.0", "lodash": "4.17.5" } }, @@ -882,26 +857,11 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" }, - "commoner": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", - "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", - "requires": { - "commander": "2.14.1", - "detective": "4.7.1", - "glob": "5.0.15", - "graceful-fs": "4.1.11", - "iconv-lite": "0.4.19", - "mkdirp": "0.5.1", - "private": "0.1.8", - "q": "1.5.1", - "recast": "0.11.23" - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "1.6.0", @@ -963,9 +923,9 @@ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "core-decorators": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/core-decorators/-/core-decorators-0.14.0.tgz", - "integrity": "sha1-E6FHGFGKX8fMYjs/D0r4ee7X8c8=" + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/core-decorators/-/core-decorators-0.20.0.tgz", + "integrity": "sha1-YFiWYkBTr4wo775zXCWjAaYcZcU=" }, "core-js": { "version": "2.5.3", @@ -1026,11 +986,6 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1051,15 +1006,6 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, - "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "requires": { - "acorn": "5.4.1", - "defined": "1.0.0" - } - }, "detectrtc": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/detectrtc/-/detectrtc-1.3.5.tgz", @@ -1104,11 +1050,11 @@ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, "envify": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", - "integrity": "sha1-1xIjKejfFoi6dxsSUBkXyc5cvOg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/envify/-/envify-4.1.0.tgz", + "integrity": "sha512-IKRVVoAYr4pIx4yIWNsz9mOsboxlNXiu7TNBnem/K/uTHdkyzXWDzHCK7UTolqBbgaBz0tQHsD3YNls0uIIjiw==", "requires": { - "jstransform": "11.0.3", + "esprima": "4.0.0", "through": "2.3.8" } }, @@ -1135,10 +1081,10 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, - "esprima-fb": { - "version": "15001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", - "integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=" + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" }, "etag": { "version": "1.8.1", @@ -1180,7 +1126,7 @@ "on-finished": "2.3.0", "parseurl": "1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.2", + "proxy-addr": "2.0.3", "qs": "6.5.1", "range-parser": "1.2.0", "safe-buffer": "5.1.1", @@ -1232,13 +1178,6 @@ "requires": { "escape-string-regexp": "1.0.5", "object-assign": "4.1.1" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - } } }, "file-type": { @@ -1357,10 +1296,12 @@ } }, "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, "requires": { + "fs.realpath": "1.0.0", "inflight": "1.0.6", "inherits": "2.0.3", "minimatch": "3.0.4", @@ -1377,11 +1318,6 @@ "process": "0.5.2" } }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -1511,6 +1447,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -1553,9 +1490,9 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, "ipaddr.js": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz", - "integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" }, "is-buffer": { "version": "1.1.6", @@ -1631,22 +1568,6 @@ "exit": "0.1.2", "glob": "7.1.2", "jasmine-core": "2.99.1" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - } } }, "jasmine-core": { @@ -1774,18 +1695,6 @@ "verror": "1.10.0" } }, - "jstransform": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", - "integrity": "sha1-CaeJk+CuTU70SH9hVakfYZDLQiM=", - "requires": { - "base62": "1.2.7", - "commoner": "0.10.8", - "esprima-fb": "15001.1.0-dev-harmony-fb", - "object-assign": "2.1.1", - "source-map": "0.4.4" - } - }, "jwa": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", @@ -2110,6 +2019,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "1.1.11" } @@ -2148,9 +2058,9 @@ "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=" }, "nan": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz", + "integrity": "sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw==" }, "negotiator": { "version": "0.6.1", @@ -2315,7 +2225,7 @@ "integrity": "sha512-e3HyQI0lk5CXyYQ4RsDYGiWdY5LJxNMlNCzo4/gwqY8lhYIeTf5VwGirGDa1EPrcZROmOR37wHuFVnoHmOWnOw==", "requires": { "bindings": "1.3.0", - "nan": "2.8.0" + "nan": "2.9.2" } }, "node-localstorage": { @@ -2392,9 +2302,9 @@ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, "object-assign": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "on-finished": { "version": "2.3.0", @@ -2457,7 +2367,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-to-regexp": { "version": "0.1.7", @@ -2492,11 +2403,6 @@ "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=" }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" - }, "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", @@ -2516,12 +2422,12 @@ } }, "proxy-addr": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz", - "integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", "requires": { "forwarded": "0.1.2", - "ipaddr.js": "1.5.2" + "ipaddr.js": "1.6.0" } }, "punycode": { @@ -2530,9 +2436,14 @@ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/q/-/q-2.0.3.tgz", + "integrity": "sha1-dbjbAlWhpa+C9Yw/Oqoe/sfQ0TQ=", + "requires": { + "asap": "2.0.6", + "pop-iterate": "1.0.1", + "weak-map": "1.0.5" + } }, "qbox": { "version": "0.1.7", @@ -2581,29 +2492,6 @@ "mute-stream": "0.0.5" } }, - "recast": { - "version": "0.11.23", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", - "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", - "requires": { - "ast-types": "0.9.6", - "esprima": "3.1.3", - "private": "0.1.8", - "source-map": "0.5.7" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } - } - }, "reconnect-core": { "version": "https://github.com/dodo/reconnect-core/tarball/merged", "integrity": "sha1-udryrcRbGabMX9LwSPjZQGzs5Jg=", @@ -2827,14 +2715,6 @@ } } }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } - }, "sprintf-js": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", @@ -2945,8 +2825,6 @@ "lodash": "4.17.4", "mkdirp": "0.5.1", "mocha": "5.0.1", - "mockery": "2.1.0", - "n-readlines": "0.2.8", "opn": "5.1.0", "readline": "1.3.0", "slug": "0.9.1", @@ -3464,35 +3342,22 @@ "xlsx": "0.11.18" }, "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "2.0.4" - } - }, "is-number": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", "dev": true }, "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, - "object.omit": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "1.0.1" - } - }, "opn": { "version": "5.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/opn/-/opn-5.2.0.tgz", + "integrity": "sha512-Jd/GpzPyHF4P2/aNOVmS3lfMSWV9J7cOhCG1s08XCEAsPkB7lp6ddiU0J7XzyQRDUh8BqJ7PchfINjR8jyofRQ==", "dev": true, "requires": { "is-wsl": "1.1.0" @@ -3500,38 +3365,13 @@ }, "randomatic": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-2.0.0.tgz", + "integrity": "sha512-IRvNtlVqDeoh6O86Z6MpuKwHwVy3vxBel3zKvhMzIVOS7cviLyLBQRzsuBij9PIqmdGYL/WWZReJpSLHH7Jcog==", "dev": true, "requires": { "is-number": "4.0.0", "kind-of": "6.0.2" } - }, - "watson-developer-cloud": { - "version": "3.0.6", - "bundled": true, - "dev": true, - "requires": { - "@types/csv-stringify": "1.4.1", - "@types/extend": "3.0.0", - "@types/file-type": "5.2.1", - "@types/is-stream": "1.1.0", - "@types/node": "9.3.0", - "@types/request": "2.47.0", - "async": "2.6.0", - "buffer-from": "0.1.1", - "cookie": "0.3.1", - "csv-stringify": "1.0.4", - "extend": "3.0.1", - "file-type": "7.4.0", - "isstream": "0.1.2", - "mime-types": "2.1.17", - "object.omit": "3.0.0", - "object.pick": "1.3.0", - "request": "2.83.0", - "vcap_services": "0.3.4", - "websocket": "1.0.25" - } } } }, @@ -4240,15 +4080,21 @@ } }, "engine.io-client": { + "version": "3.1.5", "bundled": true, - "dependencies": { - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - } + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "3.1.0", + "engine.io-parser": "2.1.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "3.3.3", + "xmlhttprequest-ssl": "1.5.5", + "yeast": "0.1.2" } }, "engine.io-parser": { @@ -6195,6 +6041,7 @@ } }, "inherits": { + "version": "", "bundled": true }, "inquirer": { @@ -6393,13 +6240,15 @@ "is-plain-object": { "version": "2.0.4", "bundled": true, + "dev": true, "requires": { "isobject": "3.0.1" }, "dependencies": { "isobject": { "version": "3.0.1", - "bundled": true + "bundled": true, + "dev": true } } }, @@ -6887,11 +6736,6 @@ } } }, - "mockery": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, "moment": { "version": "2.20.1", "bundled": true, @@ -6948,11 +6792,6 @@ "version": "0.0.7", "bundled": true }, - "n-readlines": { - "version": "0.2.8", - "bundled": true, - "dev": true - }, "nan": { "version": "2.8.0", "bundled": true, @@ -8228,34 +8067,6 @@ "ms": "2.0.0" } }, - "engine.io-client": { - "version": "3.1.5", - "bundled": true, - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "3.1.0", - "engine.io-parser": "2.1.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "3.3.3", - "xmlhttprequest-ssl": "1.5.5", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, "isarray": { "version": "2.0.1", "bundled": true, @@ -8275,11 +8086,15 @@ } }, "socket.io-parser": { + "version": "", "bundled": true, "dependencies": { - "isarray": { - "version": "2.0.1", - "bundled": true + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } } } }, @@ -8854,11 +8669,35 @@ "dev": true }, "watson-developer-cloud": { + "version": "3.0.6", "bundled": true, + "dev": true, + "requires": { + "@types/csv-stringify": "1.4.1", + "@types/extend": "3.0.0", + "@types/file-type": "5.2.1", + "@types/is-stream": "1.1.0", + "@types/node": "9.3.0", + "@types/request": "2.47.0", + "async": "2.6.0", + "buffer-from": "0.1.1", + "cookie": "0.3.1", + "csv-stringify": "1.0.4", + "extend": "3.0.1", + "file-type": "7.4.0", + "isstream": "0.1.2", + "mime-types": "2.1.17", + "object.omit": "3.0.0", + "object.pick": "1.3.0", + "request": "2.83.0", + "vcap_services": "0.3.4", + "websocket": "1.0.25" + }, "dependencies": { "is-extendable": { "version": "1.0.1", "bundled": true, + "dev": true, "requires": { "is-plain-object": "2.0.4" } @@ -8866,6 +8705,7 @@ "object.omit": { "version": "3.0.0", "bundled": true, + "dev": true, "requires": { "is-extendable": "1.0.1" } @@ -9182,16 +9022,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "q": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/q/-/q-2.0.3.tgz", - "integrity": "sha1-dbjbAlWhpa+C9Yw/Oqoe/sfQ0TQ=", - "requires": { - "asap": "2.0.6", - "pop-iterate": "1.0.1", - "weak-map": "1.0.5" - } } } }, diff --git a/src/globals.js b/src/globals.js index 0fd562f..71eb92c 100644 --- a/src/globals.js +++ b/src/globals.js @@ -1,6 +1,13 @@ const settings = { convodir: './spec/convo/', - configfile: 'testmybot.json' + configfile: 'testmybot.json', + configToSet: null, + hooks: { + beforeAllPre: null, + beforeEachPre: null, + afterEachPre: null, + afterAllPre: null + } } function get () { diff --git a/src/helpers/botkit.js b/src/helpers/botkit.js index 6daf099..40bd7b1 100644 --- a/src/helpers/botkit.js +++ b/src/helpers/botkit.js @@ -1,98 +1,92 @@ -const _ = require('lodash') - -const TestMyBot = require('../testmybot') -const Queue = require('botium-core/src/helpers/Queue') - -let controller = null -let msgqueue = null -let bot = null -let timeoutMillisDefault = 5000 - -/** - * Setup TestMyBot and wire it with Botkit - */ -TestMyBot.prototype.beforeAll = () => Promise.resolve() -TestMyBot.prototype.afterEach = () => Promise.resolve() -TestMyBot.prototype.afterAll = () => Promise.resolve() -TestMyBot.prototype.hears = (arg) => { - let message = null - let postback = null - - if (_.isString(arg)) { - message = { - text: arg, - seq: 1, - is_echo: false, - mid: 1 - } - } else if (arg.messageText) { - message = { - text: arg.messageText, - seq: 1, - is_echo: false, - mid: 1 - } - } else if (arg.sourceData && arg.sourceData.postback) { - postback = arg.sourceData.postback - } else if (arg.sourceData) { - message = { - text: arg.sourceData, - seq: 1, - is_echo: false, - mid: 1 - } - } else { - return Promise.resolve() - } - - controller.handleWebhookPayload( - { - body: { - entry: [ - { - messaging: [ - { - sender: { id: arg.sender }, - recipient: { id: 1 }, - timestamp: 1, - message: message, - postback: postback - } - ] - } - ] - } - }, null, bot) - return Promise.resolve() -} -TestMyBot.prototype.says = (channel, timeoutMillis) => { - return msgqueue.pop(timeoutMillis || timeoutMillisDefault) -} - -module.exports.wireWithBotkit = (beforeEachCallback, _timeoutMillisDefault) => { - TestMyBot.prototype.beforeEach = () => { - msgqueue = new Queue() - if (_timeoutMillisDefault) { - timeoutMillisDefault = _timeoutMillisDefault - } - - controller = beforeEachCallback() - controller.startTicking() - - controller.on('spawned', (worker) => { - worker.send = (message, cb) => { - if (message.message && message.message.text) { - msgqueue.push({ messageText: message.message.text }) - } else { - msgqueue.push({ sourceData: message }) - } - if (cb) { - cb() - } - } - }) - bot = controller.spawn({}) - - return Promise.resolve() - } -} +const _ = require('lodash') + +const globals = require('../globals') + +/** + * Setup TestMyBot and wire it with Botkit + */ +module.exports.wireWithBotkit = (beforeEachCallback) => { + globals.get().configToSet = { + botium: { + Capabilities: { + CONTAINERMODE: 'inprocess' + } + } + } + + let controller = null + let bot = null + + globals.get().hooks.beforeAllPre = (tmb) => { + tmb.driver.on('MESSAGE_SENTTOBOT', (container, mockMsg) => { + let message = null + let postback = null + + if (_.isString(mockMsg)) { + message = { + text: mockMsg, + seq: 1, + is_echo: false, + mid: 1 + } + } else if (mockMsg.messageText) { + message = { + text: mockMsg.messageText, + seq: 1, + is_echo: false, + mid: 1 + } + } else if (mockMsg.sourceData && mockMsg.sourceData.postback) { + postback = mockMsg.sourceData.postback + } else if (mockMsg.sourceData) { + message = { + text: mockMsg.sourceData, + seq: 1, + is_echo: false, + mid: 1 + + } + } else { + return Promise.resolve() + } + + controller.handleWebhookPayload( + { + body: { + entry: [ + { + messaging: [ + { + sender: { id: mockMsg.sender }, + recipient: { id: 1 }, + timestamp: 1, + message: message, + postback: postback + } + ] + } + ] + } + }, null, bot) + }) + } + + globals.get().hooks.beforeEachPre = (tmb) => { + controller = beforeEachCallback() + controller.startTicking() + + controller.on('spawned', (worker) => { + worker.send = (message, cb) => { + if (message.message && message.message.text) { + tmb.container.InjectBotSays({ messageText: message.message.text }) + } else { + tmb.container.InjectBotSays({ sourceData: message }) + } + if (cb) { + cb() + } + } + }) + bot = controller.spawn({}) + } +} diff --git a/src/helpers/jasmine.js b/src/helpers/jasmine.js index a3bfd5f..959a173 100644 --- a/src/helpers/jasmine.js +++ b/src/helpers/jasmine.js @@ -31,19 +31,19 @@ module.exports.setupJasmineTestSuite = (timeout, matcher, tmb) => { describe('TestMyBot Test Suite for ' + packageJson.name, () => { beforeAll((done) => { - tmb.beforeAll().then(done, done.fail) + tmb.beforeAll().then(() => done()).catch(done.fail) }, timeout) beforeEach((done) => { - tmb.beforeEach().then(done, done.fail) + tmb.beforeEach().then(() => done()).catch(done.fail) }, timeout) afterEach((done) => { - tmb.afterEach().then(done, done.fail) + tmb.afterEach().then(() => done()).catch(done.fail) }, timeout) afterAll((done) => { - tmb.afterAll().then(done, done.fail) + tmb.afterAll().then(() => done()).catch(done.fail) }, timeout) module.exports.setupJasmineTestCases(timeout, matcher, tmb) diff --git a/src/readconfig.js b/src/readconfig.js index 4b8257e..bb89726 100644 --- a/src/readconfig.js +++ b/src/readconfig.js @@ -18,7 +18,7 @@ module.exports = (configToSet) => { _.merge(resolvedConfig, configJson) } } catch (err) { - debug(`could not read file testmybot.default.json: ${util.inspect(err)}`) + debug(`warning: could not read file testmybot.default.json: ${util.inspect(err)}`) } try { const contents = fs.readFileSync(configfile) @@ -27,10 +27,13 @@ module.exports = (configToSet) => { _.merge(resolvedConfig, configJson) } } catch (err) { - debug(`could not read file ${configfile}: ${util.inspect(err)}`) + debug(`warning: could not read file ${configfile}: ${util.inspect(err)}`) } if (configToSet) { _.merge(resolvedConfig, configToSet) } + if (globals.get().configToSet) { + _.merge(resolvedConfig, globals.get().configToSet) + } return resolvedConfig } diff --git a/src/testmybot.js b/src/testmybot.js index f20df1d..1a2aa68 100644 --- a/src/testmybot.js +++ b/src/testmybot.js @@ -7,6 +7,7 @@ const BotDriver = require('botium-core').BotDriver const readConfig = require('./readconfig') const ConvoReader = require('./convo') +const globals = require('./globals') module.exports = class TestMyBot { constructor (configToSet = {}) { @@ -22,7 +23,16 @@ module.exports = class TestMyBot { this.container = null } + _callHook (hookName, arg) { + if (globals.get().hooks[hookName]) { + debug(`calling testmybot hook ${hookName}`) + globals.get().hooks[hookName](this, arg) + } + } + beforeAll () { + this._callHook('beforeAllPre') + return new Promise((resolve, reject) => { async.series([ (containerReady) => { @@ -42,6 +52,8 @@ module.exports = class TestMyBot { } afterAll () { + this._callHook('afterAllPre') + let result = Promise.resolve() if (this.container) { result = this.container.Clean() @@ -51,6 +63,7 @@ module.exports = class TestMyBot { } beforeEach () { + this._callHook('beforeEachPre') if (this.container) { return this.container.Start() } else { @@ -59,6 +72,7 @@ module.exports = class TestMyBot { } afterEach () { + this._callHook('afterEachPre') if (this.container) { return this.container.Stop() } else {