wechaty-web-panel 1.0.5 → 1.0.8
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/.github/workflows/npm.yml +47 -0
- package/CHANGELOG.md +5 -0
- package/package.json +7 -4
- package/scripts/generate-package-json.sh +16 -0
- package/scripts/package-publish-config-tag.sh +12 -0
- package/src/common/index.js +0 -1
- package/src/handlers/on-message.js +26 -2
- package/src/index.js +16 -11
- package/src/package-json.js +5 -0
- package/src/proxy/superagent.js +57 -0
- package/src/service/event-dispatch-service.js +4 -4
- package/src/service/msg-filter-service.js +3 -0
- package/src/service/msg-filters.js +44 -0
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.idea/wechat-assistant.iml +0 -12
- package/.idea/workspace.xml +0 -162
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: NPM
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
publish:
|
|
7
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/v'))
|
|
8
|
+
name: Publish
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
- uses: actions/setup-node@v2
|
|
13
|
+
with:
|
|
14
|
+
node-version: 16
|
|
15
|
+
registry-url: https://registry.npmjs.org/
|
|
16
|
+
cache: npm
|
|
17
|
+
cache-dependency-path: package.json
|
|
18
|
+
|
|
19
|
+
- name: Install Dependencies
|
|
20
|
+
run: npm install
|
|
21
|
+
|
|
22
|
+
- name: Generate Package JSON
|
|
23
|
+
run: git update-index --chmod=+x ./scripts/generate-package-json.sh
|
|
24
|
+
|
|
25
|
+
- name: Set Publish Config
|
|
26
|
+
run: git update-index --chmod=+x ./scripts/package-publish-config-tag.sh
|
|
27
|
+
|
|
28
|
+
- name: Check Branch
|
|
29
|
+
id: check-branch
|
|
30
|
+
run: |
|
|
31
|
+
if [[ ${{ github.ref }} =~ ^refs/heads/(master|v[0-9]+\.[0-9]+.*)$ ]]; then
|
|
32
|
+
echo ::set-output name=match::true
|
|
33
|
+
fi # See: https://stackoverflow.com/a/58869470/1123955
|
|
34
|
+
- name: Is A Publish Branch
|
|
35
|
+
if: steps.check-branch.outputs.match == 'true'
|
|
36
|
+
run: |
|
|
37
|
+
NAME=$(npx pkg-jq -r .name)
|
|
38
|
+
VERSION=$(npx pkg-jq -r .version)
|
|
39
|
+
if npx version-exists "$NAME" "$VERSION"
|
|
40
|
+
then echo "$NAME@$VERSION exists on NPM, skipped."
|
|
41
|
+
else npm publish
|
|
42
|
+
fi
|
|
43
|
+
env:
|
|
44
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
45
|
+
- name: Is Not A Publish Branch
|
|
46
|
+
if: steps.check-branch.outputs.match != 'true'
|
|
47
|
+
run: echo 'Not A Publish Branch'
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wechaty-web-panel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@chatie/semver": "^0.4.7",
|
|
34
35
|
"babel-eslint": "^10.1.0",
|
|
35
36
|
"eslint": "^7.4.0",
|
|
36
37
|
"eslint-config-prettier": "^6.11.0",
|
|
@@ -58,8 +59,10 @@
|
|
|
58
59
|
"tencentcloud-sdk-nodejs": "^4.0.30"
|
|
59
60
|
},
|
|
60
61
|
"publishConfig": {
|
|
61
|
-
"registry": " https://registry.npmjs.org/"
|
|
62
|
+
"registry": " https://registry.npmjs.org/",
|
|
63
|
+
"tag": "next",
|
|
64
|
+
"access": "public"
|
|
62
65
|
},
|
|
63
|
-
"_id": "wechaty-web-panel@1.0.
|
|
64
|
-
"_commitid": "
|
|
66
|
+
"_id": "wechaty-web-panel@1.0.6",
|
|
67
|
+
"_commitid": "afa6242"
|
|
65
68
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
SRC_PACKAGE_JSON_TS_FILE='src/package-json.js'
|
|
5
|
+
|
|
6
|
+
[ -f ${SRC_PACKAGE_JSON_TS_FILE} ] || {
|
|
7
|
+
echo ${SRC_PACKAGE_JSON_TS_FILE}" not found"
|
|
8
|
+
exit 1
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
cat <<_SRC_ > ${SRC_PACKAGE_JSON_TS_FILE}
|
|
12
|
+
/**
|
|
13
|
+
* This file was auto generated from scripts/generate-version.sh
|
|
14
|
+
*/
|
|
15
|
+
export const packageJson = $(cat package.json)
|
|
16
|
+
_SRC_
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
VERSION=$(npx pkg-jq -r .version)
|
|
5
|
+
|
|
6
|
+
if npx --package @chatie/semver semver-is-prod $VERSION; then
|
|
7
|
+
npx pkg-jq -i '.publishConfig.tag="latest"'
|
|
8
|
+
echo "production release: publicConfig.tag set to latest."
|
|
9
|
+
else
|
|
10
|
+
npx pkg-jq -i '.publishConfig.tag="next"'
|
|
11
|
+
echo 'development release: publicConfig.tag set to next.'
|
|
12
|
+
fi
|
package/src/common/index.js
CHANGED
|
@@ -182,7 +182,6 @@ async function roomSay(room, contact, msg) {
|
|
|
182
182
|
await delay(500)
|
|
183
183
|
await room.say(obj)
|
|
184
184
|
} else if (msg.type === 4 && msg.url && msg.title && msg.description) {
|
|
185
|
-
console.log('in url')
|
|
186
185
|
let url = new UrlLink({
|
|
187
186
|
description: msg.description,
|
|
188
187
|
thumbnailUrl: msg.thumbUrl,
|
|
@@ -3,6 +3,24 @@ const { getContactTextReply, getRoomTextReply } = require('../common/reply')
|
|
|
3
3
|
const { delay } = require('../lib/index')
|
|
4
4
|
const { dispatchAsync } = require('../service/room-async-service')
|
|
5
5
|
const { allConfig } = require('../common/configDb')
|
|
6
|
+
const { getAibotConfig } = require('../common/aiDb')
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 检测是否属于忽略的消息
|
|
10
|
+
* @param msg 用户信息
|
|
11
|
+
* @param list 需要忽略的列表
|
|
12
|
+
*/
|
|
13
|
+
function checkIgnore(msg, list) {
|
|
14
|
+
if (!list.length) return false
|
|
15
|
+
for (let item of list) {
|
|
16
|
+
const word = item.word
|
|
17
|
+
const type = item.type
|
|
18
|
+
if ((type === 'start' && msg.startsWith(word)) || (type === 'end' && msg.endsWith(word)) || (type === 'equal' && msg === word) || (type === 'include' && msg.includes(word))) {
|
|
19
|
+
return true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return false
|
|
23
|
+
}
|
|
6
24
|
|
|
7
25
|
/**
|
|
8
26
|
* 根据消息类型过滤私聊消息事件
|
|
@@ -11,6 +29,7 @@ const { allConfig } = require('../common/configDb')
|
|
|
11
29
|
*/
|
|
12
30
|
async function dispatchFriendFilterByMsgType(that, msg) {
|
|
13
31
|
try {
|
|
32
|
+
const aibotConfig = await getAibotConfig()
|
|
14
33
|
const type = msg.type()
|
|
15
34
|
const contact = msg.talker() // 发消息人
|
|
16
35
|
const isOfficial = contact.type() === that.Contact.Type.Official
|
|
@@ -21,8 +40,9 @@ async function dispatchFriendFilterByMsgType(that, msg) {
|
|
|
21
40
|
content = msg.text()
|
|
22
41
|
if (!isOfficial) {
|
|
23
42
|
console.log(`发消息人${await contact.name()}:${content}`)
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
const isIgnore = checkIgnore(content.trim(), aibotConfig.ignoreMessages)
|
|
44
|
+
if (content.trim() && !isIgnore) {
|
|
45
|
+
replys = await getContactTextReply(that, contact, content.trim())
|
|
26
46
|
for (let reply of replys) {
|
|
27
47
|
await delay(1000)
|
|
28
48
|
await contactSay(contact, reply)
|
|
@@ -62,6 +82,7 @@ async function dispatchFriendFilterByMsgType(that, msg) {
|
|
|
62
82
|
* @param {*} msg 消息主体
|
|
63
83
|
*/
|
|
64
84
|
async function dispatchRoomFilterByMsgType(that, room, msg) {
|
|
85
|
+
const aibotConfig = await getAibotConfig()
|
|
65
86
|
try {
|
|
66
87
|
const contact = msg.talker() // 发消息人
|
|
67
88
|
const contactName = contact.name()
|
|
@@ -79,6 +100,9 @@ async function dispatchRoomFilterByMsgType(that, room, msg) {
|
|
|
79
100
|
const mentionSelf = content.includes(`@${userSelfName}`)
|
|
80
101
|
if (mentionSelf) {
|
|
81
102
|
content = content.replace(/@[^,,::\s@]+/g, '').trim()
|
|
103
|
+
// 检测是否需要这条消息
|
|
104
|
+
const isIgnore = checkIgnore(content, aibotConfig.ignoreMessages)
|
|
105
|
+
if (isIgnore) return
|
|
82
106
|
replys = await getRoomTextReply(that, content, contactName, contactId, contactAvatar, room)
|
|
83
107
|
for (let reply of replys) {
|
|
84
108
|
await delay(1000)
|
package/src/index.js
CHANGED
|
@@ -25,19 +25,24 @@ module.exports = function WechatyWebPanelPlugin(config = { apiKey, apiSecret })
|
|
|
25
25
|
const initConfig = {
|
|
26
26
|
apiKey: envKey || config.apiKey,
|
|
27
27
|
apiSecret: envSecret || config.apiSecret,
|
|
28
|
+
// 需要忽略的关键词 [{type:'start', word: ''},{type:'end', word: ''},{type:'equal', word: ''},{type:'include', word: ''}]
|
|
29
|
+
ignoreMessages: config.ignoreMessages || [],
|
|
30
|
+
// 需要忽略的事件 ['scan', 'login', 'logout', 'friendship', 'room-join', 'room-topic', 'room-leave', 'message', 'ready', 'heartbeat', 'error']
|
|
31
|
+
ignoreEvents: config.ignoreEvents || [],
|
|
28
32
|
}
|
|
29
33
|
addAibotConfig(initConfig)
|
|
30
34
|
return function (bot) {
|
|
31
|
-
|
|
32
|
-
bot.on('
|
|
33
|
-
bot.on('
|
|
34
|
-
bot.on('
|
|
35
|
-
bot.on('
|
|
36
|
-
bot.on('room-
|
|
37
|
-
bot.on('room-
|
|
38
|
-
bot.on('
|
|
39
|
-
bot.on('
|
|
40
|
-
bot.on('
|
|
41
|
-
bot.on('
|
|
35
|
+
const ignoreEvents = initConfig.ignoreEvents
|
|
36
|
+
if (!ignoreEvents.includes('scan')) bot.on('scan', onScan)
|
|
37
|
+
if (!ignoreEvents.includes('login')) bot.on('login', onLogin)
|
|
38
|
+
if (!ignoreEvents.includes('logout')) bot.on('logout', onLogout)
|
|
39
|
+
if (!ignoreEvents.includes('friendship')) bot.on('friendship', onFriend)
|
|
40
|
+
if (!ignoreEvents.includes('room-join')) bot.on('room-join', onRoomjoin)
|
|
41
|
+
if (!ignoreEvents.includes('room-topic')) bot.on('room-topic', onRoomtopic)
|
|
42
|
+
if (!ignoreEvents.includes('room-leave')) bot.on('room-leave', onRoomleave)
|
|
43
|
+
if (!ignoreEvents.includes('message')) bot.on('message', onMessage)
|
|
44
|
+
if (!ignoreEvents.includes('ready')) bot.on('ready', onReady)
|
|
45
|
+
if (!ignoreEvents.includes('heartbeat')) bot.on('heartbeat', onHeartbeat)
|
|
46
|
+
if (!ignoreEvents.includes('error')) bot.on('error', onError)
|
|
42
47
|
}
|
|
43
48
|
}
|
package/src/proxy/superagent.js
CHANGED
|
@@ -3,6 +3,49 @@ const { getFormatQuery } = require('../lib/index')
|
|
|
3
3
|
const { getAibotConfig } = require('../common/aiDb')
|
|
4
4
|
const { AIBOTK, TXHOST } = require('./config')
|
|
5
5
|
const { allConfig } = require('../common/configDb')
|
|
6
|
+
const axios = require('axios')
|
|
7
|
+
const service = axios.create({
|
|
8
|
+
// 定义统一的请求头部
|
|
9
|
+
headers: {
|
|
10
|
+
'Content-Type': 'application/json',
|
|
11
|
+
},
|
|
12
|
+
// 配置请求超时时间
|
|
13
|
+
timeout: 60000,
|
|
14
|
+
// 如果用的JSONP,可以配置此参数带上cookie凭证,如果是代理和CORS不用设置
|
|
15
|
+
withCredentials: false,
|
|
16
|
+
})
|
|
17
|
+
// 请求拦截
|
|
18
|
+
service.interceptors.request.use((config) => {
|
|
19
|
+
return config
|
|
20
|
+
})
|
|
21
|
+
// 返回拦截
|
|
22
|
+
service.interceptors.response.use(
|
|
23
|
+
(response) => {
|
|
24
|
+
if (response.status === 200) {
|
|
25
|
+
// 获取接口返回结果
|
|
26
|
+
const res = response.data
|
|
27
|
+
// code为0,直接把结果返回回去,这样前端代码就不用在获取一次data.
|
|
28
|
+
if (res.code === 200) {
|
|
29
|
+
if (Array.isArray(res.data)) {
|
|
30
|
+
return Promise.resolve(res.data)
|
|
31
|
+
} else {
|
|
32
|
+
const res = [{ type: 1, content: '回调函数返回参数错误:' + JSON.stringify(res.data) }]
|
|
33
|
+
return Promise.resolve(res)
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
const res = [{ type: 1, content: res.msg }]
|
|
37
|
+
return Promise.resolve(res)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const res = [{ type: 1, content: '回调接口网络错误:' + response.status }]
|
|
41
|
+
return Promise.resolve(res)
|
|
42
|
+
},
|
|
43
|
+
(err) => {
|
|
44
|
+
console.log('err', err)
|
|
45
|
+
const res = [{ type: 1, content: '网络错误,请稍后重试' }]
|
|
46
|
+
return Promise.resolve(res)
|
|
47
|
+
}
|
|
48
|
+
)
|
|
6
49
|
|
|
7
50
|
/**
|
|
8
51
|
* 封装get请求
|
|
@@ -114,8 +157,22 @@ async function aiBotReq(option) {
|
|
|
114
157
|
}
|
|
115
158
|
}
|
|
116
159
|
|
|
160
|
+
async function callbackAibotApi(url, data) {
|
|
161
|
+
const env = await getAibotConfig()
|
|
162
|
+
const { apiKey, apiSecret } = env
|
|
163
|
+
if (!apiKey || !apiSecret) {
|
|
164
|
+
console.warn('未设置apikey或apiSecret,请登录https://wechat.aibotk.com 获取后重试')
|
|
165
|
+
return []
|
|
166
|
+
}
|
|
167
|
+
data = getFormatQuery(apiKey, apiSecret, data)
|
|
168
|
+
let res = await service.post(url, data)
|
|
169
|
+
return res
|
|
170
|
+
}
|
|
171
|
+
|
|
117
172
|
module.exports = {
|
|
118
173
|
req,
|
|
119
174
|
txReq,
|
|
120
175
|
aiBotReq,
|
|
176
|
+
service,
|
|
177
|
+
callbackAibotApi,
|
|
121
178
|
}
|
|
@@ -144,22 +144,22 @@ async function dispatchAiBot(bot, msg, name, id) {
|
|
|
144
144
|
case 0:
|
|
145
145
|
// 天行机器人
|
|
146
146
|
res = await api.getResByTX(msg, id)
|
|
147
|
-
replys = [{ type: 1, res }]
|
|
147
|
+
replys = [{ type: 1, content: res }]
|
|
148
148
|
break
|
|
149
149
|
case 1:
|
|
150
150
|
// 天行图灵机器人
|
|
151
151
|
res = await api.getResByTXTL(msg, id)
|
|
152
|
-
replys = [{ type: 1, res }]
|
|
152
|
+
replys = [{ type: 1, content: res }]
|
|
153
153
|
break
|
|
154
154
|
case 2:
|
|
155
155
|
// 图灵机器人
|
|
156
156
|
res = await api.getResByTL(msg, id)
|
|
157
|
-
replys = [{ type: 1, res }]
|
|
157
|
+
replys = [{ type: 1, content: res }]
|
|
158
158
|
break
|
|
159
159
|
case 3:
|
|
160
160
|
// 微信闲聊
|
|
161
161
|
res = await chatTencent(msg, id)
|
|
162
|
-
replys = [{ type: 1, res }]
|
|
162
|
+
replys = [{ type: 1, content: res }]
|
|
163
163
|
break
|
|
164
164
|
case 5:
|
|
165
165
|
// 微信开放对话平台
|
|
@@ -35,6 +35,7 @@ async function getMsgReply(resArray, { that, msg, name, contact, config, avatar,
|
|
|
35
35
|
async function filterFriendMsg(that, contact, msg) {
|
|
36
36
|
try {
|
|
37
37
|
const config = await allConfig() // 获取配置信息
|
|
38
|
+
console.log('callback', config.callBackEvents)
|
|
38
39
|
const name = contact.name()
|
|
39
40
|
const id = contact.id
|
|
40
41
|
const avatar = await contact.avatar()
|
|
@@ -44,6 +45,7 @@ async function filterFriendMsg(that, contact, msg) {
|
|
|
44
45
|
{ bool: msg.includes(NEWADDFRIEND), method: 'newFriendMsg' },
|
|
45
46
|
{ bool: config.roomJoinKeywords && config.roomJoinKeywords.length > 0, method: 'roomInviteMsg' },
|
|
46
47
|
{ bool: msg.startsWith(REMINDKEY), method: 'scheduleJobMsg' },
|
|
48
|
+
{ bool: config.callBackEvents && config.callBackEvents.length > 0, method: 'callbackEvent' },
|
|
47
49
|
{ bool: config.eventKeywords && config.eventKeywords.length > 0, method: 'eventMsg' },
|
|
48
50
|
{ bool: config.avatarList && config.avatarList.length > 0, method: 'avatarCrop' },
|
|
49
51
|
{ bool: true, method: 'keywordsMsg' },
|
|
@@ -73,6 +75,7 @@ async function filterRoomMsg(that, msg, name, id, avatar, room) {
|
|
|
73
75
|
const config = await allConfig() // 获取配置信息
|
|
74
76
|
const resArray = [
|
|
75
77
|
{ bool: msg === '', method: 'emptyMsg' },
|
|
78
|
+
{ bool: config.callbackEvents && config.callbackEvents.length > 0, method: 'callbackEvent' },
|
|
76
79
|
{ bool: config.eventKeywords && config.eventKeywords.length > 0, method: 'eventMsg' },
|
|
77
80
|
{ bool: config.avatarList && config.avatarList.length > 0, method: 'avatarCrop' },
|
|
78
81
|
{ bool: true, method: 'keywordsMsg' },
|
|
@@ -3,6 +3,7 @@ const { setSchedule, updateSchedule } = require('../proxy/aibotk')
|
|
|
3
3
|
const { contentDistinguish, setLocalSchedule, isRealDate } = require('../lib')
|
|
4
4
|
const { generateAvatar } = require('../puppeteer-paint/lanuch')
|
|
5
5
|
const { addRoom } = require('../common/index')
|
|
6
|
+
const { service, callbackAibotApi } = require('../proxy/superagent')
|
|
6
7
|
|
|
7
8
|
function emptyMsg() {
|
|
8
9
|
let msgArr = [] // 返回的消息列表
|
|
@@ -125,6 +126,48 @@ async function getEventReply(that, event, msg, name, id, avatar, room) {
|
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
/**
|
|
130
|
+
* 回调函数事件
|
|
131
|
+
* @param that
|
|
132
|
+
* @param msg
|
|
133
|
+
* @param name
|
|
134
|
+
* @param id
|
|
135
|
+
* @param config
|
|
136
|
+
* @param room
|
|
137
|
+
* @returns {Promise<AxiosResponse<any>|[]>}
|
|
138
|
+
*/
|
|
139
|
+
async function callbackEvent({ that, msg, name, id, config, room }) {
|
|
140
|
+
try {
|
|
141
|
+
for (let item of config.callBackEvents) {
|
|
142
|
+
for (let key of item.keywords) {
|
|
143
|
+
if ((item.reg === 1 && msg.includes(key)) || (item.reg === 2 && msg === key)) {
|
|
144
|
+
msg = msg.trim()
|
|
145
|
+
const data = {
|
|
146
|
+
uid: id,
|
|
147
|
+
word: msg,
|
|
148
|
+
}
|
|
149
|
+
item.moreData &&
|
|
150
|
+
item.moreData.length &&
|
|
151
|
+
item.moreData.forEach((mItem) => {
|
|
152
|
+
data[mItem.key] = data[mItem.value]
|
|
153
|
+
})
|
|
154
|
+
if (item.type === 100) {
|
|
155
|
+
let res = await service.post(item.customUrl, data)
|
|
156
|
+
return res
|
|
157
|
+
} else if (item.type === 1) {
|
|
158
|
+
let res = await callbackAibotApi(item.postUrl, data)
|
|
159
|
+
return res
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return []
|
|
165
|
+
} catch (e) {
|
|
166
|
+
console.log('error', e)
|
|
167
|
+
return []
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
128
171
|
async function eventMsg({ that, msg, name, id, avatar, config, room }) {
|
|
129
172
|
try {
|
|
130
173
|
for (let item of config.eventKeywords) {
|
|
@@ -248,6 +291,7 @@ async function avatarCrop({ msg, name, config, avatar }) {
|
|
|
248
291
|
}
|
|
249
292
|
|
|
250
293
|
module.exports = {
|
|
294
|
+
callbackEvent,
|
|
251
295
|
avatarCrop,
|
|
252
296
|
emptyMsg,
|
|
253
297
|
officialMsg,
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<HTMLCodeStyleSettings>
|
|
4
|
-
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
-
<option name="HTML_ENFORCE_QUOTES" value="true" />
|
|
6
|
-
</HTMLCodeStyleSettings>
|
|
7
|
-
<JSCodeStyleSettings version="0">
|
|
8
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
9
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
10
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
11
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
12
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
13
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
14
|
-
</JSCodeStyleSettings>
|
|
15
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
16
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
17
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
18
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
19
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
20
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
21
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
22
|
-
</TypeScriptCodeStyleSettings>
|
|
23
|
-
<VueCodeStyleSettings>
|
|
24
|
-
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
25
|
-
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
26
|
-
</VueCodeStyleSettings>
|
|
27
|
-
<codeStyleSettings language="HTML">
|
|
28
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
29
|
-
<indentOptions>
|
|
30
|
-
<option name="INDENT_SIZE" value="2" />
|
|
31
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
32
|
-
<option name="TAB_SIZE" value="2" />
|
|
33
|
-
</indentOptions>
|
|
34
|
-
</codeStyleSettings>
|
|
35
|
-
<codeStyleSettings language="JavaScript">
|
|
36
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
37
|
-
<indentOptions>
|
|
38
|
-
<option name="INDENT_SIZE" value="2" />
|
|
39
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
40
|
-
<option name="TAB_SIZE" value="2" />
|
|
41
|
-
</indentOptions>
|
|
42
|
-
</codeStyleSettings>
|
|
43
|
-
<codeStyleSettings language="TypeScript">
|
|
44
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
45
|
-
<indentOptions>
|
|
46
|
-
<option name="INDENT_SIZE" value="2" />
|
|
47
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
48
|
-
<option name="TAB_SIZE" value="2" />
|
|
49
|
-
</indentOptions>
|
|
50
|
-
</codeStyleSettings>
|
|
51
|
-
<codeStyleSettings language="Vue">
|
|
52
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
53
|
-
<indentOptions>
|
|
54
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
55
|
-
</indentOptions>
|
|
56
|
-
</codeStyleSettings>
|
|
57
|
-
</code_scheme>
|
|
58
|
-
</component>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/wechat-assistant.iml" filepath="$PROJECT_DIR$/.idea/wechat-assistant.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/vcs.xml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
</content>
|
|
9
|
-
<orderEntry type="inheritedJdk" />
|
|
10
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
-
</component>
|
|
12
|
-
</module>
|
package/.idea/workspace.xml
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ChangeListManager">
|
|
4
|
-
<list default="true" id="2e980355-75b9-47a9-b344-f25eda9493b2" name="Default Changelist" comment="feat(模块): 添加了个很棒的功能 fix(模块): 修复了一些 bug docs(模块): 更新了一下文档 UI(模块): 修改了一下样式 chore(模块): 对脚手架做了些更改 locale(模块): 为国际化做了微小的贡献">
|
|
5
|
-
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" />
|
|
6
|
-
<change beforePath="$PROJECT_DIR$/src/proxy/aibotk.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/proxy/aibotk.js" afterDir="false" />
|
|
7
|
-
</list>
|
|
8
|
-
<option name="SHOW_DIALOG" value="false" />
|
|
9
|
-
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
|
-
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
11
|
-
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
12
|
-
</component>
|
|
13
|
-
<component name="FileTemplateManagerImpl">
|
|
14
|
-
<option name="RECENT_TEMPLATES">
|
|
15
|
-
<list>
|
|
16
|
-
<option value="JavaScript File" />
|
|
17
|
-
</list>
|
|
18
|
-
</option>
|
|
19
|
-
</component>
|
|
20
|
-
<component name="Git.Settings">
|
|
21
|
-
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
22
|
-
</component>
|
|
23
|
-
<component name="GitSEFilterConfiguration">
|
|
24
|
-
<file-type-list>
|
|
25
|
-
<filtered-out-file-type name="LOCAL_BRANCH" />
|
|
26
|
-
<filtered-out-file-type name="REMOTE_BRANCH" />
|
|
27
|
-
<filtered-out-file-type name="TAG" />
|
|
28
|
-
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
|
|
29
|
-
</file-type-list>
|
|
30
|
-
</component>
|
|
31
|
-
<component name="ProjectId" id="1Sdxa5yMbi5WuICRRs1uzaabeVd" />
|
|
32
|
-
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
33
|
-
<component name="ProjectViewState">
|
|
34
|
-
<option name="hideEmptyMiddlePackages" value="true" />
|
|
35
|
-
<option name="showLibraryContents" value="true" />
|
|
36
|
-
</component>
|
|
37
|
-
<component name="PropertiesComponent">
|
|
38
|
-
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
39
|
-
<property name="last_opened_file_path" value="$PROJECT_DIR$/test" />
|
|
40
|
-
<property name="node.js.detected.package.eslint" value="true" />
|
|
41
|
-
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
|
42
|
-
<property name="nodejs_package_manager_path" value="npm" />
|
|
43
|
-
<property name="prettierjs.PrettierConfiguration.Package" value="$PROJECT_DIR$/node_modules/prettier" />
|
|
44
|
-
<property name="settings.editor.selected.configurable" value="Settings.JavaScript.Templates" />
|
|
45
|
-
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
|
|
46
|
-
<property name="vue.rearranger.settings.migration" value="true" />
|
|
47
|
-
</component>
|
|
48
|
-
<component name="RecentsManager">
|
|
49
|
-
<key name="CopyFile.RECENT_KEYS">
|
|
50
|
-
<recent name="$PROJECT_DIR$/test" />
|
|
51
|
-
<recent name="$PROJECT_DIR$/src/puppeteer-paint" />
|
|
52
|
-
<recent name="$PROJECT_DIR$" />
|
|
53
|
-
<recent name="$PROJECT_DIR$/koa/bash" />
|
|
54
|
-
<recent name="$PROJECT_DIR$/koa/pubilc/static" />
|
|
55
|
-
</key>
|
|
56
|
-
</component>
|
|
57
|
-
<component name="RunManager">
|
|
58
|
-
<configuration name="index.template.js" type="NodeJSConfigurationType" temporary="true" nameIsGenerated="true" path-to-js-file="$PROJECT_DIR$/test/index.template.js" working-dir="$PROJECT_DIR$/test">
|
|
59
|
-
<method v="2" />
|
|
60
|
-
</configuration>
|
|
61
|
-
<recent_temporary>
|
|
62
|
-
<list>
|
|
63
|
-
<item itemvalue="Node.js.index.template.js" />
|
|
64
|
-
</list>
|
|
65
|
-
</recent_temporary>
|
|
66
|
-
</component>
|
|
67
|
-
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
|
68
|
-
<component name="SvnConfiguration">
|
|
69
|
-
<configuration />
|
|
70
|
-
</component>
|
|
71
|
-
<component name="TaskManager">
|
|
72
|
-
<task active="true" id="Default" summary="Default task">
|
|
73
|
-
<changelist id="2e980355-75b9-47a9-b344-f25eda9493b2" name="Default Changelist" comment="" />
|
|
74
|
-
<created>1571907333721</created>
|
|
75
|
-
<option name="number" value="Default" />
|
|
76
|
-
<option name="presentableId" value="Default" />
|
|
77
|
-
<updated>1571907333721</updated>
|
|
78
|
-
<workItem from="1571907335087" duration="23894000" />
|
|
79
|
-
<workItem from="1572080397328" duration="20008000" />
|
|
80
|
-
<workItem from="1572693868430" duration="9882000" />
|
|
81
|
-
<workItem from="1577423668911" duration="914000" />
|
|
82
|
-
<workItem from="1585558530585" duration="7000" />
|
|
83
|
-
<workItem from="1633951325058" duration="4472000" />
|
|
84
|
-
<workItem from="1634007751134" duration="855000" />
|
|
85
|
-
<workItem from="1634190617563" duration="573000" />
|
|
86
|
-
<workItem from="1634197275631" duration="3148000" />
|
|
87
|
-
<workItem from="1634261726753" duration="259000" />
|
|
88
|
-
<workItem from="1634271782737" duration="2406000" />
|
|
89
|
-
<workItem from="1634278985825" duration="1179000" />
|
|
90
|
-
<workItem from="1634544457610" duration="4850000" />
|
|
91
|
-
<workItem from="1634642615016" duration="19868000" />
|
|
92
|
-
<workItem from="1634781971524" duration="5097000" />
|
|
93
|
-
<workItem from="1636020036226" duration="4142000" />
|
|
94
|
-
<workItem from="1636700616248" duration="611000" />
|
|
95
|
-
<workItem from="1637723811654" duration="126000" />
|
|
96
|
-
<workItem from="1638588076329" duration="34000" />
|
|
97
|
-
<workItem from="1639099930278" duration="1299000" />
|
|
98
|
-
<workItem from="1639129806549" duration="77000" />
|
|
99
|
-
<workItem from="1639464210268" duration="219000" />
|
|
100
|
-
<workItem from="1639473278118" duration="72000" />
|
|
101
|
-
<workItem from="1639486141688" duration="66000" />
|
|
102
|
-
<workItem from="1639539045086" duration="75000" />
|
|
103
|
-
<workItem from="1639712956341" duration="178000" />
|
|
104
|
-
<workItem from="1640929149202" duration="6000" />
|
|
105
|
-
<workItem from="1641278400321" duration="13000" />
|
|
106
|
-
<workItem from="1641442984815" duration="5000" />
|
|
107
|
-
<workItem from="1642212984216" duration="11645000" />
|
|
108
|
-
<workItem from="1642384832300" duration="994000" />
|
|
109
|
-
<workItem from="1642386021423" duration="4268000" />
|
|
110
|
-
<workItem from="1642647009185" duration="3937000" />
|
|
111
|
-
<workItem from="1642657426395" duration="780000" />
|
|
112
|
-
<workItem from="1642678719784" duration="603000" />
|
|
113
|
-
<workItem from="1643094529038" duration="490000" />
|
|
114
|
-
<workItem from="1644319873832" duration="1868000" />
|
|
115
|
-
<workItem from="1645362804718" duration="427000" />
|
|
116
|
-
<workItem from="1645411323461" duration="15523000" />
|
|
117
|
-
<workItem from="1645440841278" duration="516000" />
|
|
118
|
-
<workItem from="1645757384419" duration="2273000" />
|
|
119
|
-
<workItem from="1646963222475" duration="965000" />
|
|
120
|
-
<workItem from="1647008354015" duration="19000" />
|
|
121
|
-
<workItem from="1652011208761" duration="850000" />
|
|
122
|
-
<workItem from="1652418709932" duration="885000" />
|
|
123
|
-
<workItem from="1652420059088" duration="1334000" />
|
|
124
|
-
<workItem from="1652425726426" duration="423000" />
|
|
125
|
-
<workItem from="1652855202656" duration="447000" />
|
|
126
|
-
<workItem from="1653468787592" duration="419000" />
|
|
127
|
-
<workItem from="1655173951557" duration="1402000" />
|
|
128
|
-
<workItem from="1655186504356" duration="87000" />
|
|
129
|
-
<workItem from="1655186988658" duration="336000" />
|
|
130
|
-
<workItem from="1655188201258" duration="26000" />
|
|
131
|
-
<workItem from="1655357894259" duration="3028000" />
|
|
132
|
-
<workItem from="1656644469354" duration="82000" />
|
|
133
|
-
<workItem from="1657611185486" duration="30768000" />
|
|
134
|
-
<workItem from="1657730101683" duration="5453000" />
|
|
135
|
-
<workItem from="1657780584734" duration="4000" />
|
|
136
|
-
<workItem from="1657783060418" duration="100000" />
|
|
137
|
-
<workItem from="1657785079799" duration="18000" />
|
|
138
|
-
<workItem from="1657787236035" duration="654000" />
|
|
139
|
-
<workItem from="1657788805443" duration="1035000" />
|
|
140
|
-
</task>
|
|
141
|
-
<servers />
|
|
142
|
-
</component>
|
|
143
|
-
<component name="TypeScriptGeneratedFilesManager">
|
|
144
|
-
<option name="version" value="3" />
|
|
145
|
-
</component>
|
|
146
|
-
<component name="Vcs.Log.Tabs.Properties">
|
|
147
|
-
<option name="TAB_STATES">
|
|
148
|
-
<map>
|
|
149
|
-
<entry key="MAIN">
|
|
150
|
-
<value>
|
|
151
|
-
<State />
|
|
152
|
-
</value>
|
|
153
|
-
</entry>
|
|
154
|
-
</map>
|
|
155
|
-
</option>
|
|
156
|
-
<option name="oldMeFiltersMigrated" value="true" />
|
|
157
|
-
</component>
|
|
158
|
-
<component name="XSLT-Support.FileAssociations.UIState">
|
|
159
|
-
<expand />
|
|
160
|
-
<select />
|
|
161
|
-
</component>
|
|
162
|
-
</project>
|