提交 b03e9056 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

merge

......@@ -136,20 +136,11 @@ function wechaty::runBot() {
echo "Please make sure you had installed all the NPM modules which is depended on your bot script."
# yarn < /dev/null || return $? # yarn will close stdin??? cause `read` command fail after yarn
cwd=$(pwd)
for module in node_modules/*; do
[ -e "$module" ] || continue
module=${module//node_modules\//}
globalModule="/node_modules/$module"
if [ ! -e "$globalModule" ]; then
ln -sf "$cwd/node_modules/$module" /node_modules/
# else
# echo "$globalModule exists"
fi
done
#
# Issue https://github.com/Chatie/wechaty/issues/1478
# As a conclusion: we should better not to link the local node_modules to the Docker global.
#
# wechaty::linkBotNodeModules
}
# echo -n "Linking Wechaty module to bot ... "
......@@ -196,6 +187,24 @@ function wechaty::runBot() {
return "$ret"
}
# Issue https://github.com/Chatie/wechaty/issues/1478
# To Be Tested:
function wechaty::linkBotNodeModules() {
for localModule in /bot/node_modules/*; do
[ -e "$localModule" ] || continue
module=${localModule//\/bot\/node_modules\//}
globalModule="/node_modules/$module"
if [ ! -e "$globalModule" ]; then
ln -sf "$localModule" /node_modules/
# else
# echo "$globalModule exists"
fi
done
}
function wechaty::io-client() {
figlet " Chatie.io "
figlet " Authing By:"
......
{
"name": "wechaty",
"version": "0.19.19",
"version": "0.19.21",
"description": "Wechaty is a Bot SDK for Wechat Personal Account",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
......@@ -82,7 +82,7 @@
"cuid": "^2.1.1",
"express": "^4.16.3",
"file-box": "^0.8.22",
"fs-extra": "^6.0.1",
"fs-extra": "^7.0.0",
"hot-import": "^0.2.1",
"memory-card": "^0.4.9",
"npm-programmatic": "0.0.11",
......@@ -95,7 +95,7 @@
"rxjs": "^6.1.0",
"state-switch": "^0.6.2",
"watchdog": "^0.8.1",
"wechaty-puppet": "^0.8.5",
"wechaty-puppet": "^0.8.6",
"ws": "^5.2.0"
},
"devDependencies": {
......
......@@ -669,27 +669,6 @@ export class Wechaty extends Accessory implements Sayable {
})
break
case 'start':
case 'stop':
// do not emit 'start'/'stop' again for wechaty:
// because both puppet & wechaty should have their own
// `start`/`stop` event seprately
break
// case 'start':
// puppet.removeAllListeners('start')
// puppet.on('start', () => {
// this.emit('start')
// } )
// break
// case 'stop':
// puppet.removeAllListeners('stop')
// puppet.on('stop', () => {
// this.emit('stop')
// } )
// break
case 'friendship':
puppet.removeAllListeners('friendship')
puppet.on('friendship', async friendshipId => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册