Remove internal hubot package (#13522)

pull/13523/head
Marcos Spessatto Defendi 6 years ago committed by Rodrigo Nascimento
parent 6265f02680
commit 5adc11fe42
  1. 1
      packages/rocketchat-internal-hubot/.npm/package/.gitignore
  2. 7
      packages/rocketchat-internal-hubot/.npm/package/README
  3. 715
      packages/rocketchat-internal-hubot/.npm/package/npm-shrinkwrap.json
  4. 21
      packages/rocketchat-internal-hubot/README.md
  5. 22
      packages/rocketchat-internal-hubot/package.js
  6. 264
      packages/rocketchat-internal-hubot/server/hubot.js
  7. 10
      packages/rocketchat-internal-hubot/server/index.js
  8. 15
      packages/rocketchat-internal-hubot/server/settings.js
  9. 15
      server/startup/migrations/v138.js

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,715 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"accepts": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz",
"integrity": "sha1-5fHzkoxtlf2WVYw27D2dDeSm7Oo=",
"dependencies": {
"mime-db": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo="
}
}
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"async": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
"integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
},
"base64-url": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.1.tgz",
"integrity": "sha1-GZ/WYXAqDnt9yubgaYuwicUvbXg="
},
"basic-auth": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.4.tgz",
"integrity": "sha1-Awk1sB3nyblKgksp8/zLdQ06UpA="
},
"basic-auth-connect": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz",
"integrity": "sha1-/bC0OWLKe0BFanwrtI/hc9otISI="
},
"batch": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz",
"integrity": "sha1-PzQU84AyF0O/wQQvmoP/HVgk1GQ="
},
"body-parser": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.13.3.tgz",
"integrity": "sha1-wIzzMMM1jhUQFqBXRvE/ApyX+pc=",
"dependencies": {
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"mime-db": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc="
},
"qs": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz",
"integrity": "sha1-wx2bdOwn33XlQ6hseHKO2NRiNgc="
},
"type-is": {
"version": "1.6.15",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz",
"integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA="
}
}
},
"bytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-2.1.0.tgz",
"integrity": "sha1-rJPEEOL/ycx89LRks4KJBn9eR7Q="
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg="
},
"cline": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/cline/-/cline-0.8.2.tgz",
"integrity": "sha1-6RHnQaCtLiTSnm+rLPifoyLVnHY="
},
"coffee-script": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.3.tgz",
"integrity": "sha1-Y1XTLPGwTN/2tITl5xF4Ky8MOb4="
},
"commander": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz",
"integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0="
},
"compressible": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.12.tgz",
"integrity": "sha1-xZpcmdt2dn6YdlAOJx72OzSTvWY=",
"dependencies": {
"mime-db": {
"version": "1.32.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.32.0.tgz",
"integrity": "sha512-+ZWo/xZN40Tt6S+HyakUxnSOgff+JEdaneLWIm0Z6LmpCn5DMcZntLyUY5c/rTDog28LhXLKOUZKoTxTCAdBVw=="
}
}
},
"compression": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/compression/-/compression-1.5.2.tgz",
"integrity": "sha1-sDuNhub4rSloPLqN+R3cb/x3s5U="
},
"connect": {
"version": "2.30.2",
"resolved": "https://registry.npmjs.org/connect/-/connect-2.30.2.tgz",
"integrity": "sha1-jam8vooFTT0xjXTf7JA7XDmhtgk=",
"dependencies": {
"mime-db": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo="
},
"qs": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz",
"integrity": "sha1-wx2bdOwn33XlQ6hseHKO2NRiNgc="
},
"type-is": {
"version": "1.6.15",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz",
"integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA="
}
}
},
"connect-multiparty": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/connect-multiparty/-/connect-multiparty-1.2.5.tgz",
"integrity": "sha1-L6vs/cGop3S6GUhNzmYMgYqFVec="
},
"connect-timeout": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/connect-timeout/-/connect-timeout-1.6.2.tgz",
"integrity": "sha1-3ppexh4zoStu2qt7XwYumMWZuI4="
},
"content-disposition": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz",
"integrity": "sha1-QoT+auBjCHRjnkToCkGMKTQTXp4="
},
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"cookie": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.3.tgz",
"integrity": "sha1-5zSlwUF/zkctWu+Cw4HKu2TRpDU="
},
"cookie-parser": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.5.tgz",
"integrity": "sha1-nXVVcPtdF4kHcSJ6AjFNm+fPg1Y="
},
"cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"crc": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/crc/-/crc-3.3.0.tgz",
"integrity": "sha1-+mIuG8OIvyVzCQgta2UgDOZwkLo="
},
"csrf": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz",
"integrity": "sha1-thEg3c7q/JHnbtUxO7XAsmZ7cQo="
},
"csurf": {
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/csurf/-/csurf-1.8.3.tgz",
"integrity": "sha1-I/KhO/HY/OHQyZZYg5RELLqGpWo="
},
"debug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo="
},
"depd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz",
"integrity": "sha1-gK7GTJ1tl+ZcwqnKqTwKpqv3Oqo="
},
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"ee-first": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz",
"integrity": "sha1-ag18YiHkkP7v2S7D9EHJzozQl/Q="
},
"errorhandler": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.4.3.tgz",
"integrity": "sha1-t7cO2PNZ6duICS8tIMD4MUIK2D8=",
"dependencies": {
"accepts": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz",
"integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8="
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"mime-db": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo="
},
"negotiator": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
}
}
},
"escape-html": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz",
"integrity": "sha1-130y+pjjjC9BroXpJ44ODmuhAiw="
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"etag": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz",
"integrity": "sha1-A9MLX2fdbmMtKUXTDWZScxo01dg="
},
"express": {
"version": "3.21.2",
"resolved": "https://registry.npmjs.org/express/-/express-3.21.2.tgz",
"integrity": "sha1-DCkD7lxU5j1lqWFwdkcDVQZlo94="
},
"express-session": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/express-session/-/express-session-1.11.3.tgz",
"integrity": "sha1-XMmPP1/4Ttg1+Ry/CqvQxxB0AK8=",
"dependencies": {
"uid-safe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.0.0.tgz",
"integrity": "sha1-p/PGymSh9qXQTsDvPkw9U2cxcTc="
}
}
},
"finalhandler": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz",
"integrity": "sha1-llpS2ejQXSuFdUhUH7ibU6JJfZs=",
"dependencies": {
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc="
}
}
},
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"fresh": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz",
"integrity": "sha1-ZR+DjiJCTnVm3hYdg1jKoZn4PU8="
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE="
},
"http-errors": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz",
"integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI="
},
"hubot": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/hubot/-/hubot-2.19.0.tgz",
"integrity": "sha1-h8Vy0hD7DV+J91YXeuACDUn/ujY="
},
"hubot-help": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/hubot-help/-/hubot-help-0.2.2.tgz",
"integrity": "sha1-zqF+eCzndrdD9lOTk1s0MMLoGXw="
},
"iconv-lite": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz",
"integrity": "sha1-LstC/SlHRJIiCaLnxATayHk9it4="
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ipaddr.js": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz",
"integrity": "sha1-X6eM8wG4JceKvDBC2BJyMEnqI8c="
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"log": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/log/-/log-1.4.0.tgz",
"integrity": "sha1-S6HYkP3iSbAx3KA7w36q8yVlbxw="
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"merge-descriptors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.0.tgz",
"integrity": "sha1-IWnPdTjhsMyH+4jhUC2EdLv3mGQ="
},
"method-override": {
"version": "2.3.10",
"resolved": "https://registry.npmjs.org/method-override/-/method-override-2.3.10.tgz",
"integrity": "sha1-49r41d7hDdLc59SuiNYrvud0drQ=",
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
}
}
},
"methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
},
"mime": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
"integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM="
},
"mime-db": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz",
"integrity": "sha1-PQxjGA9FjrENMlqqN9fFiuMS6dc="
},
"mime-types": {
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz",
"integrity": "sha1-MQ4VnbI+B3+Lsit0jav6SVcUCqY="
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM="
},
"morgan": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/morgan/-/morgan-1.6.1.tgz",
"integrity": "sha1-X9gYOYxoGcuiinzWZk8pL+HAu/I=",
"dependencies": {
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc="
}
}
},
"ms": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
},
"multiparty": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/multiparty/-/multiparty-3.3.2.tgz",
"integrity": "sha1-Nd5oBNwZZD5SSfPT473GyM4wHT8="
},
"negotiator": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz",
"integrity": "sha1-Jp1cR2gQ7JLtvntsLygxY4T5p+g="
},
"on-finished": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.1.1.tgz",
"integrity": "sha1-+CyhyeOk8yhrG5k4YQ5bhja9PLI="
},
"on-headers": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
"integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
},
"optparse": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/optparse/-/optparse-1.0.4.tgz",
"integrity": "sha1-wGJXnS0F0kPCIaMEpx4Ml5YjzPE="
},
"parseurl": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
"pause": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/pause/-/pause-0.1.0.tgz",
"integrity": "sha1-68ikqGGf8LioGsFRPDQ0/0af23Q="
},
"proxy-addr": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.10.tgz",
"integrity": "sha1-DUCoL4Afw1VWfS7LZe/j8HfxIcU="
},
"qs": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/qs/-/qs-2.2.5.tgz",
"integrity": "sha1-EIirr53MCuWuRbcJ5sa1iIsjkjw="
},
"random-bytes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
"integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs="
},
"range-parser": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz",
"integrity": "sha1-aHKCNTXGkuLCoBA4Jq/YLC4P8XU="
},
"raw-body": {
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz",
"integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=",
"dependencies": {
"bytes": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz",
"integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk="
},
"iconv-lite": {
"version": "0.4.13",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz",
"integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI="
}
}
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk="
},
"response-time": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/response-time/-/response-time-2.3.2.tgz",
"integrity": "sha1-/6cbq5UtYvfB1Jt0NDVfvGjf/Fo=",
"dependencies": {
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
}
}
},
"rndm": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz",
"integrity": "sha1-8z/pz7Urv9UgqhgyO8ZdsRCht2w="
},
"scoped-http-client": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/scoped-http-client/-/scoped-http-client-0.11.0.tgz",
"integrity": "sha1-iH+oKoNg8V1jmlLlBOVjwVfSbXQ="
},
"send": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.13.0.tgz",
"integrity": "sha1-UY+SGusFYK7H3KspkLFM9vPM5d4=",
"dependencies": {
"destroy": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz",
"integrity": "sha1-tDO0ck5x/YVR2YhRdIUcX8N34sk="
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc="
},
"statuses": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz",
"integrity": "sha1-3e1FzBglbVHtQK7BQkidXGECbSg="
}
}
},
"serve-favicon": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.3.2.tgz",
"integrity": "sha1-3UGeJo3gEqtysxnTN/IQUBP5OB8=",
"dependencies": {
"ms": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz",
"integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U="
}
}
},
"serve-index": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.7.3.tgz",
"integrity": "sha1-egV/xu4o3GP2RWbl+lexEahq7NI=",
"dependencies": {
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"mime-db": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo="
}
}
},
"serve-static": {
"version": "1.10.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.10.3.tgz",
"integrity": "sha1-zlpuzTEB/tXsCYJ9rCKpwpv7BTU=",
"dependencies": {
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc="
},
"send": {
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/send/-/send-0.13.2.tgz",
"integrity": "sha1-dl52B8gFVFK7pvCwUllTUJhgNt4="
},
"statuses": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz",
"integrity": "sha1-3e1FzBglbVHtQK7BQkidXGECbSg="
}
}
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
},
"stream-counter": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/stream-counter/-/stream-counter-0.2.0.tgz",
"integrity": "sha1-3tJmVWMZyLDiIoErnPOyb6fZR94="
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8="
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"tsscmp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz",
"integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc="
},
"type-is": {
"version": "1.5.7",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.5.7.tgz",
"integrity": "sha1-uTaKWTzG730GReeLL0xky+zQXpA="
},
"uid-safe": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.4.tgz",
"integrity": "sha1-Otbzg2jG1MjHXsF2I/t5qh0HHYE="
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"utils-merge": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz",
"integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg="
},
"vary": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz",
"integrity": "sha1-meSYFWaihhGN+yuBc1ffeZM3bRA="
},
"vhost": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/vhost/-/vhost-3.0.2.tgz",
"integrity": "sha1-L7HezUxGaqiLD5NBrzPcGv8keNU="
}
}
}

@ -1,21 +0,0 @@
Meteor doesn't interact really well with NPM and the NPM module
loading mechanism which hubot uses for its scripts. So we've
split out most of hubot's scripts into this separate module.
To add a new hubot script:
* **If it is packaged in npm** (probably via the
[hubot-scripts organization on github](https://github.com/hubot-scripts)),
just add it to the `package.json`, for example with:
```
$ npm install --save hubot-pugme
```
* **If it is included in the old [hubot-scripts repository](https://github.com/github/hubot-scripts/tree/master/src/scripts)**,
just add it to the admin settings:
```
redis-brain.coffee,shipit.coffee,whatis.coffee,<new-script-name>.coffee
```
* **If it is a custom script**, or a forked/tweaked version of a
script, add it to the `scripts/` directory.

@ -1,22 +0,0 @@
Package.describe({
name: 'rocketchat:internal-hubot',
version: '0.0.1',
summary: 'Internal Hubot for Rocket.Chat',
git: '',
});
Package.onUse(function(api) {
api.use([
'ecmascript',
'tracker',
'rocketchat:lib',
'templating',
]);
api.mainModule('server/index.js', 'server');
});
// It needs to be here cuz they are coffee files and need to be compiled
Npm.depends({
hubot: '2.19.0',
'hubot-help': '0.2.2',
});

@ -1,264 +0,0 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import _ from 'underscore';
import s from 'underscore.string';
import 'coffeescript/register';
const Hubot = Npm.require('hubot');
// Start a hubot, connected to our chat room.
// 'use strict'
// Log messages?
const DEBUG = false;
export let InternalHubot = {};
const sendHelper = Meteor.bindEnvironment((robot, envelope, strings, map) => {
while (strings.length > 0) {
const string = strings.shift();
if (typeof(string) === 'function') {
string();
} else {
try {
map(string);
} catch (err) {
if (DEBUG) { console.error(`Hubot error: ${ err }`); }
robot.logger.error(`RocketChat send error: ${ err }`);
}
}
}
});
// Monkey-patch Hubot to support private messages
Hubot.Response.prototype.priv = (...strings) => this.robot.adapter.priv(this.envelope, ...strings);
// More monkey-patching
Hubot.Robot.prototype.loadAdapter = () => {}; // disable
export {
Hubot,
};
// grrrr, Meteor.bindEnvironment doesn't preserve `this` apparently
const bind = function(f) {
const g = Meteor.bindEnvironment((self, ...args) => f.apply(self, args));
return function(...args) { return g(this, ...Array.from(args)); };
};
class Robot extends Hubot.Robot {
constructor(...args) {
super(...(args || []));
this.hear = bind(this.hear);
this.respond = bind(this.respond);
this.enter = bind(this.enter);
this.leave = bind(this.leave);
this.topic = bind(this.topic);
this.error = bind(this.error);
this.catchAll = bind(this.catchAll);
this.user = Meteor.users.findOne({ username: this.name }, { fields: { username: 1 } });
}
loadAdapter() { return false; }
hear(regex, callback) { return super.hear(regex, Meteor.bindEnvironment(callback)); }
respond(regex, callback) { return super.respond(regex, Meteor.bindEnvironment(callback)); }
enter(callback) { return super.enter(Meteor.bindEnvironment(callback)); }
leave(callback) { return super.leave(Meteor.bindEnvironment(callback)); }
topic(callback) { return super.topic(Meteor.bindEnvironment(callback)); }
error(callback) { return super.error(Meteor.bindEnvironment(callback)); }
catchAll(callback) { return super.catchAll(Meteor.bindEnvironment(callback)); }
}
export class RocketChatAdapter extends Hubot.Adapter {
// Public: Raw method for sending data back to the chat source. Extend this.
//
// envelope - A Object with message, room and user details.
// strings - One or more Strings for each message to send.
//
// Returns nothing.
send(envelope, ...strings) {
if (DEBUG) { console.log('ROCKETCHATADAPTER -> send'.blue); }
// console.log envelope, strings
return sendHelper(this.robot, envelope, strings, (string) => {
if (DEBUG) { console.log(`send ${ envelope.room }: ${ string } (${ envelope.user.id })`); }
return RocketChat.sendMessage(InternalHubot.user, { msg: string }, { _id: envelope.room });
});
}
// Public: Raw method for sending emote data back to the chat source.
//
// envelope - A Object with message, room and user details.
// strings - One or more Strings for each message to send.
//
// Returns nothing.
emote(envelope, ...strings) {
if (DEBUG) { console.log('ROCKETCHATADAPTER -> emote'.blue); }
return sendHelper(this.robot, envelope, strings, (string) => {
if (DEBUG) { console.log(`emote ${ envelope.rid }: ${ string } (${ envelope.u.username })`); }
if (envelope.message.private) { return this.priv(envelope, `*** ${ string } ***`); }
return Meteor.call('sendMessage', {
msg: string,
rid: envelope.rid,
action: true,
}
);
});
}
// Priv: our extension -- send a PM to user
priv(envelope, ...strings) {
if (DEBUG) { console.log('ROCKETCHATADAPTER -> priv'.blue); }
return sendHelper(this.robot, envelope, strings, function(string) {
if (DEBUG) { console.log(`priv ${ envelope.room }: ${ string } (${ envelope.user.id })`); }
return Meteor.call('sendMessage', {
u: {
username: RocketChat.settings.get('InternalHubot_Username'),
},
to: `${ envelope.user.id }`,
msg: string,
rid: envelope.room,
});
});
}
// Public: Raw method for building a reply and sending it back to the chat
// source. Extend this.
//
// envelope - A Object with message, room and user details.
// strings - One or more Strings for each reply to send.
//
// Returns nothing.
reply(envelope, ...strings) {
if (DEBUG) { console.log('ROCKETCHATADAPTER -> reply'.blue); }
if (envelope.message.private) {
return this.priv(envelope, ...strings);
} else {
return this.send(envelope, ...strings.map((str) => `${ envelope.user.name }: ${ str }`));
}
}
// Public: Raw method for setting a topic on the chat source. Extend this.
//
// envelope - A Object with message, room and user details.
// strings - One more more Strings to set as the topic.
//
// Returns nothing.
topic(/* envelope, ...strings*/) {
if (DEBUG) { return console.log('ROCKETCHATADAPTER -> topic'.blue); }
}
// Public: Raw method for playing a sound in the chat source. Extend this.
//
// envelope - A Object with message, room and user details.
// strings - One or more strings for each play message to send.
//
// Returns nothing
play(/* envelope, ...strings*/) {
if (DEBUG) { return console.log('ROCKETCHATADAPTER -> play'.blue); }
}
// Public: Raw method for invoking the bot to run. Extend this.
//
// Returns nothing.
run() {
if (DEBUG) { console.log('ROCKETCHATADAPTER -> run'.blue); }
this.robot.emit('connected');
return this.robot.brain.mergeData({});
}
// @robot.brain.emit 'loaded'
// Public: Raw method for shutting the bot down. Extend this.
//
// Returns nothing.
close() {
if (DEBUG) { return console.log('ROCKETCHATADAPTER -> close'.blue); }
}
}
export const InternalHubotReceiver = (message) => {
if (DEBUG) { console.log(message); }
if (message.u.username !== InternalHubot.name) {
const room = RocketChat.models.Rooms.findOneById(message.rid);
const enabledForC = RocketChat.settings.get('InternalHubot_EnableForChannels');
const enabledForD = RocketChat.settings.get('InternalHubot_EnableForDirectMessages');
const enabledForP = RocketChat.settings.get('InternalHubot_EnableForPrivateGroups');
const subscribedToP = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(room._id, InternalHubot.user._id);
if (
(room.t === 'c' && enabledForC)
|| (room.t === 'd' && enabledForD)
|| (room.t === 'p' && enabledForP && subscribedToP)
) {
const InternalHubotUser = new Hubot.User(message.u.username, { room: message.rid });
const InternalHubotTextMessage = new Hubot.TextMessage(InternalHubotUser, message.msg, message._id);
InternalHubot.adapter.receive(InternalHubotTextMessage);
}
}
return message;
};
export class HubotScripts {
constructor(robot) {
const modulesToLoad = [
'hubot-help/src/help.coffee',
];
const customPath = RocketChat.settings.get('InternalHubot_PathToLoadCustomScripts');
HubotScripts.load(`${ __meteor_bootstrap__.serverDir }/npm/node_modules/meteor/rocketchat_internal-hubot/node_modules/`, modulesToLoad, robot);
HubotScripts.load(customPath, RocketChat.settings.get('InternalHubot_ScriptsToLoad').split(',') || [], robot);
}
static load(path, scriptsToLoad, robot) {
if (!path || !scriptsToLoad) {
return;
}
scriptsToLoad.forEach((scriptFile) => {
try {
scriptFile = s.trim(scriptFile);
if (scriptFile === '') {
return;
}
// delete require.cache[require.resolve(path+scriptFile)];
const fn = Npm.require(path + scriptFile);
if (typeof(fn) === 'function') {
fn(robot);
} else {
fn.default(robot);
}
robot.parseHelp(path + scriptFile);
console.log(`Loaded ${ scriptFile }`.green);
} catch (e) {
console.log(`Can't load ${ scriptFile }`.red);
console.log(e);
}
});
}
}
const init = _.debounce(Meteor.bindEnvironment(() => {
if (RocketChat.settings.get('InternalHubot_Enabled')) {
InternalHubot = new Robot(null, null, false, RocketChat.settings.get('InternalHubot_Username'));
InternalHubot.alias = 'bot';
InternalHubot.adapter = new RocketChatAdapter(InternalHubot);
new HubotScripts(InternalHubot);
InternalHubot.run();
return RocketChat.callbacks.add('afterSaveMessage', InternalHubotReceiver, RocketChat.callbacks.priority.LOW, 'InternalHubot');
} else {
InternalHubot = {};
return RocketChat.callbacks.remove('afterSaveMessage', 'InternalHubot');
}
}), 1000);
Meteor.startup(function() {
init();
RocketChat.models.Settings.findByIds(['InternalHubot_Username', 'InternalHubot_Enabled', 'InternalHubot_ScriptsToLoad', 'InternalHubot_PathToLoadCustomScripts']).observe({
changed() {
return init();
},
});
// TODO useful when we have the ability to invalidate `require` cache
// RocketChat.RateLimiter.limitMethod('reloadInternalHubot', 1, 5000, {
// userId(/*userId*/) { return true; }
// });
// Meteor.methods({
// reloadInternalHubot: () => init()
// });
});

@ -1,10 +0,0 @@
import './settings';
import { Hubot, HubotScripts, InternalHubot, InternalHubotReceiver, RocketChatAdapter } from './hubot';
export {
Hubot,
HubotScripts,
InternalHubot,
InternalHubotReceiver,
RocketChatAdapter,
};

@ -1,15 +0,0 @@
import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.settings.addGroup('InternalHubot', function() {
this.add('InternalHubot_Enabled', false, { type: 'boolean', i18nLabel: 'Enabled' });
this.add('InternalHubot_Username', 'rocket.cat', { type: 'string', i18nLabel: 'Username', i18nDescription: 'InternalHubot_Username_Description', public: true });
this.add('InternalHubot_ScriptsToLoad', '', { type: 'string' });
this.add('InternalHubot_PathToLoadCustomScripts', '', { type: 'string' });
this.add('InternalHubot_EnableForChannels', true, { type: 'boolean' });
this.add('InternalHubot_EnableForDirectMessages', false, { type: 'boolean' });
this.add('InternalHubot_EnableForPrivateGroups', false, { type: 'boolean' });
// this.add('InternalHubot_reload', 'reloadInternalHubot', {
// type: 'action',
// actionText: 'reload'
// });
});

@ -0,0 +1,15 @@
import { Migrations } from 'meteor/rocketchat:migrations';
import { Settings } from 'meteor/rocketchat:models';
Migrations.add({
version: 138,
up() {
Settings.remove({ _id: 'InternalHubot_Enabled' });
Settings.remove({ _id: 'InternalHubot_Username' });
Settings.remove({ _id: 'InternalHubot_ScriptsToLoad' });
Settings.remove({ _id: 'InternalHubot_PathToLoadCustomScripts' });
Settings.remove({ _id: 'InternalHubot_EnableForChannels' });
Settings.remove({ _id: 'InternalHubot_EnableForPrivateGroups' });
Settings.remove({ _id: 'InternalHubot_EnableForDirectMessages' });
},
});
Loading…
Cancel
Save