hubot 11.3.4 → 11.5.0
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 +1 -1
- package/src/Response.mjs +2 -1
- package/src/Robot.mjs +5 -1
package/package.json
CHANGED
package/src/Response.mjs
CHANGED
package/src/Robot.mjs
CHANGED
|
@@ -341,6 +341,10 @@ class Robot {
|
|
|
341
341
|
return result
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
+
async loadts (filePath) {
|
|
345
|
+
return this.loadmjs(filePath)
|
|
346
|
+
}
|
|
347
|
+
|
|
344
348
|
async loadjs (filePath) {
|
|
345
349
|
const forImport = this.prepareForImport(filePath)
|
|
346
350
|
const script = (await import(forImport)).default
|
|
@@ -364,7 +368,7 @@ class Robot {
|
|
|
364
368
|
const full = path.join(filepath, path.basename(filename))
|
|
365
369
|
|
|
366
370
|
// see https://github.com/hubotio/hubot/issues/1355
|
|
367
|
-
if (['js', 'mjs'].indexOf(ext) === -1) {
|
|
371
|
+
if (['js', 'mjs', 'ts'].indexOf(ext) === -1) {
|
|
368
372
|
this.logger.debug(`Skipping unsupported file type ${full}`)
|
|
369
373
|
return null
|
|
370
374
|
}
|