botium-core 1.15.4 → 1.15.5

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": "botium-core",
3
- "version": "1.15.4",
3
+ "version": "1.15.5",
4
4
  "description": "The Selenium for Chatbots",
5
5
  "main": "index.js",
6
6
  "module": "dist/botium-es.js",
@@ -550,7 +550,8 @@ module.exports = class SimpleRestContainer {
550
550
  fetch(requestOptions.uri, requestOptions).then(async (bodyRaw) => {
551
551
  let body
552
552
  try {
553
- if (bodyRaw.headers.get('content-type').includes('application/json')) {
553
+ const contentType = bodyRaw.headers.get('content-type')
554
+ if (contentType && contentType.includes('application/json')) {
554
555
  try {
555
556
  body = await bodyRaw.json()
556
557
  } catch (err) {
@@ -158,7 +158,8 @@ module.exports = class MediaInput {
158
158
  const baseDir = this._getBaseDir(convo)
159
159
  return args.reduce((e, arg) => {
160
160
  if (this._isWildcard(arg)) {
161
- const mediaFiles = globSync(arg, { cwd: baseDir })
161
+ // we need to escape brackets to find files
162
+ const mediaFiles = globSync(arg.replace(/[()[\]{}]/g, '\\$&'), { cwd: baseDir })
162
163
  mediaFiles.forEach(mf => {
163
164
  e.push({
164
165
  name: 'MEDIA',