hubot 11.3.3 → 11.4.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 +2 -2
- package/src/Robot.mjs +6 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hubot",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"author": "hubot",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"connect-multiparty": "^2.2.0",
|
|
19
|
-
"express": "^4.
|
|
19
|
+
"express": "^4.21.2",
|
|
20
20
|
"express-basic-auth": "^1.2.1",
|
|
21
21
|
"pino": "^8.11.0"
|
|
22
22
|
},
|
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
|
}
|
|
@@ -664,9 +668,8 @@ class Robot {
|
|
|
664
668
|
} else {
|
|
665
669
|
this.setupNullRouter()
|
|
666
670
|
}
|
|
671
|
+
await this.adapter.run()
|
|
667
672
|
this.emit('running')
|
|
668
|
-
|
|
669
|
-
return await this.adapter.run()
|
|
670
673
|
}
|
|
671
674
|
|
|
672
675
|
// Public: Gracefully shutdown the robot process
|