@whyour/qinglong 2.17.12-rc.2 → 2.17.13
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/README-en.md +1 -1
- package/README.md +2 -2
- package/docker/docker-compose.yml +3 -8
- package/package.json +37 -40
- package/sample/config.sample.sh +21 -2
- package/sample/notify.js +90 -8
- package/sample/notify.py +77 -6
- package/shell/start.sh +6 -1
- package/static/build/config/util.js +4 -1
- package/static/build/data/notify.js +16 -1
- package/static/build/loaders/express.js +3 -3
- package/static/build/loaders/update.js +2 -2
- package/static/build/schedule/index.js +0 -1
- package/static/build/services/notify.js +50 -4
- package/static/build/services/schedule.js +1 -1
- package/static/build/services/system.js +2 -2
- package/static/dist/{827.efeeec44.async.js → 105.85a5c47a.async.js} +1 -1
- package/static/dist/{4588.46a3a31e.async.js → 1083.f86ce804.async.js} +1 -1
- package/static/dist/1149.33cb7e7a.async.js +1 -0
- package/static/dist/119.89e2d610.async.js +1 -0
- package/static/dist/{9631.042017c3.async.js → 1352.ab6da08e.async.js} +1 -1
- package/static/dist/1690.f0290540.async.js +1 -0
- package/static/dist/1742.6cbe5aca.async.js +1 -0
- package/static/dist/1765.d8e002d7.async.js +1 -0
- package/static/dist/1885.e0d00d2d.async.js +1 -0
- package/static/dist/2081.d0d781b1.async.js +1 -0
- package/static/dist/2096.383c1047.async.js +1 -0
- package/static/dist/2237.4d3def87.async.js +1 -0
- package/static/dist/2325.dfa32834.async.js +1 -0
- package/static/dist/2338.d678967d.async.js +1 -0
- package/static/dist/255.12f03ab2.async.js +1 -0
- package/static/dist/2625.675b6a18.chunk.css +1 -0
- package/static/dist/2634.a765cd37.async.js +1 -0
- package/static/dist/{8605.f56664b9.async.js → 2742.4852aac8.async.js} +1 -1
- package/static/dist/2821.be3dc88e.async.js +1 -0
- package/static/dist/2890.9e373f5b.async.js +1 -0
- package/static/dist/{4658.8a9e2830.async.js → 3034.6413c38e.async.js} +1 -1
- package/static/dist/3382.a584a111.async.js +1 -0
- package/static/dist/{2755.f6377d52.async.js → 3383.041eee73.async.js} +1 -1
- package/static/dist/3390.fb4b6851.async.js +1 -0
- package/static/dist/3481.333c2962.async.js +1 -0
- package/static/dist/3600.7637c822.async.js +1 -0
- package/static/dist/4046.7fbcfa02.async.js +1 -0
- package/static/dist/4642.260d2a8e.async.js +1 -0
- package/static/dist/4799.2c2c56e5.async.js +1 -0
- package/static/dist/4865.98e5a005.async.js +1 -0
- package/static/dist/4902.54ecbdb5.async.js +1 -0
- package/static/dist/5171.7fc6d0a2.async.js +1 -0
- package/static/dist/5312.5545b3ed.async.js +1 -0
- package/static/dist/5481.624d0e07.async.js +1 -0
- package/static/dist/5520.ff2cfd6b.async.js +1 -0
- package/static/dist/{8167.8f9d5e88.async.js → 5653.4fce7ce8.async.js} +1 -1
- package/static/dist/5970.10ac4f16.async.js +1 -0
- package/static/dist/6013.2d7bb12a.async.js +1 -0
- package/static/dist/6016.9c379049.async.js +1 -0
- package/static/dist/6035.5889ddc7.async.js +1 -0
- package/static/dist/6159.55cb068a.async.js +1 -0
- package/static/dist/{5394.de174420.async.js → 6247.b550d996.async.js} +1 -1
- package/static/dist/6341.673fb65c.async.js +1 -0
- package/static/dist/6439.7ef6c5e3.async.js +1 -0
- package/static/dist/{6141.db67ebff.async.js → 6541.a6d499de.async.js} +1 -1
- package/static/dist/6646.5fc37228.async.js +1 -0
- package/static/dist/6707.801b886b.async.js +1 -0
- package/static/dist/6872.42f939f1.async.js +1 -0
- package/static/dist/691.187a388c.async.js +1 -0
- package/static/dist/{1667.94045304.async.js → 7025.f4080d63.async.js} +1 -1
- package/static/dist/7285.d561cf26.async.js +1 -0
- package/static/dist/7355.5e5e573b.async.js +1 -0
- package/static/dist/7384.065ccae2.async.js +1 -0
- package/static/dist/739.6be5552a.async.js +1 -0
- package/static/dist/7528.d8b76d8a.async.js +1 -0
- package/static/dist/7802.6b73f16a.async.js +1 -0
- package/static/dist/{9120.ef78d517.async.js → 8060.8b699029.async.js} +1 -1
- package/static/dist/{8078.4add9375.async.js → 8078.8586c875.async.js} +1 -1
- package/static/dist/8142.e3e82eda.async.js +1 -0
- package/static/dist/852.15be2189.async.js +1 -0
- package/static/dist/8528.3dffc548.async.js +1 -0
- package/static/dist/872.10bd0974.async.js +1 -0
- package/static/dist/872.3fffed15.chunk.css +1 -0
- package/static/dist/8982.d2dba153.async.js +1 -0
- package/static/dist/9065.df8d5dcc.async.js +1 -0
- package/static/dist/9066.605168f8.async.js +1 -0
- package/static/dist/955.3c9481f7.async.js +1 -0
- package/static/dist/9730.30083c91.async.js +1 -0
- package/static/dist/9761.627ca3b5.async.js +1 -0
- package/static/dist/index.html +8 -7
- package/static/dist/layouts__index.1fce90e0.chunk.css +1 -0
- package/static/dist/layouts__index.c164d41f.async.js +1 -0
- package/static/dist/preload_helper.2e4c8e3f.js +1 -0
- package/static/dist/src__pages__404.6871535b.async.js +1 -0
- package/static/dist/src__pages__config__index.39b5f99f.async.js +1 -0
- package/static/dist/src__pages__crontab__detail.6f7c3205.async.js +1 -0
- package/static/dist/src__pages__crontab__index.7163c445.async.js +1 -0
- package/static/dist/src__pages__crontab__logModal.c88ea3b7.async.js +1 -0
- package/static/dist/src__pages__crontab__modal.328fee41.async.js +1 -0
- package/static/dist/{src__pages__crontab__type.a798cac7.async.js → src__pages__crontab__type.5895ed02.async.js} +1 -1
- package/static/dist/src__pages__crontab__viewCreateModal.ffcf7a24.async.js +1 -0
- package/static/dist/src__pages__crontab__viewManageModal.c71ebc5a.async.js +1 -0
- package/static/dist/src__pages__dependence__index.edec638b.async.js +1 -0
- package/static/dist/src__pages__dependence__logModal.f123e2ac.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.9fd1176b.async.js +1 -0
- package/static/dist/{src__pages__dependence__type.860703e8.async.js → src__pages__dependence__type.bdac3725.async.js} +1 -1
- package/static/dist/src__pages__diff__index.8ba53a1e.async.js +1 -0
- package/static/dist/src__pages__env__editNameModal.c35e96f9.async.js +1 -0
- package/static/dist/src__pages__env__index.c799138c.async.js +1 -0
- package/static/dist/src__pages__env__modal.3b0ca9a6.async.js +1 -0
- package/static/dist/src__pages__error__index.0221fcd9.async.js +1 -0
- package/static/dist/src__pages__initialization__index.346725d1.async.js +1 -0
- package/static/dist/src__pages__log__index.2fd615f2.async.js +1 -0
- package/static/dist/src__pages__login__index.1dd6e684.async.js +1 -0
- package/static/dist/src__pages__script__editModal.28caeb56.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.1155d34c.async.js +1 -0
- package/static/dist/src__pages__script__index.b893a14e.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.dabfccfd.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.04d43882.async.js +1 -0
- package/static/dist/src__pages__script__setting.9d5ad53c.async.js +1 -0
- package/static/dist/src__pages__setting__about.3a1a6f3b.async.js +1 -0
- package/static/dist/src__pages__setting__appModal.7b3bff1e.async.js +1 -0
- package/static/dist/src__pages__setting__checkUpdate.0dfdaf7c.async.js +1 -0
- package/static/dist/src__pages__setting__dependence.a9b7ed43.async.js +1 -0
- package/static/dist/src__pages__setting__index.636a04c7.async.js +1 -0
- package/static/dist/src__pages__setting__loginLog.fc87584a.async.js +1 -0
- package/static/dist/src__pages__setting__notification.97b1d997.async.js +1 -0
- package/static/dist/src__pages__setting__other.34ccb2e8.async.js +1 -0
- package/static/dist/src__pages__setting__progress.75143dca.async.js +1 -0
- package/static/dist/src__pages__setting__security.c777fb87.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.63e9c69d.async.js +1 -0
- package/static/dist/src__pages__subscription__index.69a6de02.async.js +1 -0
- package/static/dist/src__pages__subscription__logModal.b3c7c02c.async.js +1 -0
- package/static/dist/src__pages__subscription__modal.aefaf070.async.js +1 -0
- package/static/dist/umi.916b40e1.js +1 -0
- package/static/dist/umi.a4d14b92.css +1 -0
- package/version.yaml +8 -10
- package/static/dist/1186.39086229.async.js +0 -1
- package/static/dist/1431.36b64dc5.async.js +0 -1
- package/static/dist/1467.6163d4ee.async.js +0 -1
- package/static/dist/2099.a46e32fc.async.js +0 -1
- package/static/dist/2182.59dcf306.chunk.css +0 -1
- package/static/dist/2260.6c4d0bd0.async.js +0 -1
- package/static/dist/2393.3d8adf53.async.js +0 -1
- package/static/dist/2618.7a71aedf.async.js +0 -1
- package/static/dist/2715.292538bc.async.js +0 -1
- package/static/dist/2796.9a52d80e.async.js +0 -1
- package/static/dist/2899.03668225.async.js +0 -1
- package/static/dist/29.32a92099.async.js +0 -1
- package/static/dist/3435.2670d41f.async.js +0 -1
- package/static/dist/3435.d2d0a2c7.chunk.css +0 -1
- package/static/dist/3669.d39d1a9d.async.js +0 -1
- package/static/dist/380.33bc8989.async.js +0 -1
- package/static/dist/3800.f0507af4.async.js +0 -1
- package/static/dist/4039.badd6267.async.js +0 -1
- package/static/dist/4124.980265f2.async.js +0 -1
- package/static/dist/4163.17026fe1.async.js +0 -1
- package/static/dist/419.908ca086.async.js +0 -1
- package/static/dist/4424.a840b858.async.js +0 -1
- package/static/dist/4645.d909733e.async.js +0 -1
- package/static/dist/4674.1b3db685.async.js +0 -1
- package/static/dist/4925.9b770864.async.js +0 -1
- package/static/dist/5310.4cd7a0c1.async.js +0 -1
- package/static/dist/5484.68655765.async.js +0 -1
- package/static/dist/573.21675f9c.async.js +0 -1
- package/static/dist/5830.9be47cbb.async.js +0 -1
- package/static/dist/6035.48d17c03.async.js +0 -1
- package/static/dist/6064.a5141a7d.async.js +0 -1
- package/static/dist/641.f0614d96.async.js +0 -1
- package/static/dist/6712.05e15d48.async.js +0 -1
- package/static/dist/6805.ae3d4019.async.js +0 -1
- package/static/dist/694.0baa21db.async.js +0 -1
- package/static/dist/6986.6a4ae181.async.js +0 -1
- package/static/dist/7346.7096e3b3.async.js +0 -1
- package/static/dist/7362.e740709d.async.js +0 -1
- package/static/dist/7393.ea2d5ba3.async.js +0 -1
- package/static/dist/745.3be9ce9f.async.js +0 -1
- package/static/dist/7742.51617038.async.js +0 -1
- package/static/dist/7787.b041d555.async.js +0 -1
- package/static/dist/7987.5bace809.async.js +0 -1
- package/static/dist/8298.978b54ae.async.js +0 -1
- package/static/dist/833.87a694db.async.js +0 -1
- package/static/dist/8430.0291dda0.async.js +0 -1
- package/static/dist/8432.d8d0ade6.async.js +0 -1
- package/static/dist/858.1a385b25.async.js +0 -1
- package/static/dist/8934.55adca8f.async.js +0 -1
- package/static/dist/9065.a1341834.async.js +0 -1
- package/static/dist/9504.22415050.async.js +0 -1
- package/static/dist/9673.ac17e45d.async.js +0 -1
- package/static/dist/9847.d72d4b37.async.js +0 -1
- package/static/dist/layouts__index.2f94d49c.async.js +0 -1
- package/static/dist/layouts__index.35164d74.chunk.css +0 -1
- package/static/dist/src__pages__404.e1ca45fd.async.js +0 -1
- package/static/dist/src__pages__config__index.c778a0e0.async.js +0 -1
- package/static/dist/src__pages__crontab__detail.34c9ca68.async.js +0 -1
- package/static/dist/src__pages__crontab__index.f196124c.async.js +0 -1
- package/static/dist/src__pages__crontab__logModal.91357c7c.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.6fa9520e.async.js +0 -1
- package/static/dist/src__pages__crontab__viewCreateModal.1fe0e251.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.c6dcfcf8.async.js +0 -1
- package/static/dist/src__pages__dependence__index.aca3926b.async.js +0 -1
- package/static/dist/src__pages__dependence__logModal.07786c7c.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.e67d0ff6.async.js +0 -1
- package/static/dist/src__pages__diff__index.82b124a8.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.38d65f05.async.js +0 -1
- package/static/dist/src__pages__env__index.f545d035.async.js +0 -1
- package/static/dist/src__pages__env__modal.6fad122b.async.js +0 -1
- package/static/dist/src__pages__error__index.c5c8ed46.async.js +0 -1
- package/static/dist/src__pages__initialization__index.a26591c2.async.js +0 -1
- package/static/dist/src__pages__log__index.bc06b12f.async.js +0 -1
- package/static/dist/src__pages__login__index.e4257741.async.js +0 -1
- package/static/dist/src__pages__script__editModal.be12c9e5.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.e7f7fea1.async.js +0 -1
- package/static/dist/src__pages__script__index.4fdb14ad.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.436dedbf.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.f65940c2.async.js +0 -1
- package/static/dist/src__pages__script__setting.b4891488.async.js +0 -1
- package/static/dist/src__pages__setting__about.d7cea886.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.48994718.async.js +0 -1
- package/static/dist/src__pages__setting__checkUpdate.0dd2f8d5.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.b6d378b3.async.js +0 -1
- package/static/dist/src__pages__setting__index.45c54c51.async.js +0 -1
- package/static/dist/src__pages__setting__loginLog.4ba597ea.async.js +0 -1
- package/static/dist/src__pages__setting__notification.7df85f89.async.js +0 -1
- package/static/dist/src__pages__setting__other.2c4534ef.async.js +0 -1
- package/static/dist/src__pages__setting__progress.57907231.async.js +0 -1
- package/static/dist/src__pages__setting__security.e26348a7.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.a77a9995.async.js +0 -1
- package/static/dist/src__pages__subscription__index.0f0a7c0a.async.js +0 -1
- package/static/dist/src__pages__subscription__logModal.8d68bb96.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.26538bfd.async.js +0 -1
- package/static/dist/umi.8a0eaca6.css +0 -1
- package/static/dist/umi.ae45a508.js +0 -1
package/README-en.md
CHANGED
|
@@ -126,7 +126,7 @@ curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
|
|
126
126
|
npm install -g node-pre-gyp pnpm@8.3.1
|
|
127
127
|
npm install -g @whyour/qinglong
|
|
128
128
|
qinglong
|
|
129
|
-
# Add the environment variables QL_DIR and QL_DATA_DIR when prompted
|
|
129
|
+
# Add the environment variables QL_DIR and QL_DATA_DIR when prompted, QL_DATA_DIR must end with /data.
|
|
130
130
|
export QL_DIR=""
|
|
131
131
|
export QL_DATA_DIR=""
|
|
132
132
|
# Run again
|
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ docker run -dit \
|
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
90
|
# curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
|
|
91
|
-
mkdir qinglong
|
|
91
|
+
mkdir qinglong && cd $_
|
|
92
92
|
wget https://raw.githubusercontent.com/whyour/qinglong/master/docker/docker-compose.yml
|
|
93
93
|
|
|
94
94
|
# 启动
|
|
@@ -128,7 +128,7 @@ curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
|
|
128
128
|
npm install -g node-pre-gyp pnpm@8.3.1
|
|
129
129
|
npm install -g @whyour/qinglong
|
|
130
130
|
qinglong
|
|
131
|
-
# 根据提示增加环境变量 QL_DIR 和 QL_DATA_DIR
|
|
131
|
+
# 根据提示增加环境变量 QL_DIR 和 QL_DATA_DIR,QL_DATA_DIR 必须以 /data 结尾
|
|
132
132
|
export QL_DIR=""
|
|
133
133
|
export QL_DATA_DIR=""
|
|
134
134
|
# 再次执行
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
version: '2'
|
|
2
1
|
services:
|
|
3
2
|
web:
|
|
4
|
-
#
|
|
5
|
-
image: whyour/qinglong:latest
|
|
6
|
-
# debian-slim 基础镜像版本
|
|
7
|
-
# image: whyour/qinglong:debian
|
|
3
|
+
image: whyour/qinglong:latest # 基于 Debian 的版本:whyour/qinglong:debian
|
|
8
4
|
volumes:
|
|
9
5
|
- ./data:/ql/data
|
|
10
6
|
ports:
|
|
11
|
-
- "
|
|
7
|
+
- "5700:5700"
|
|
12
8
|
environment:
|
|
13
|
-
# 部署路径非必须,以斜杠开头和结尾,比如 /test/
|
|
14
|
-
QlBaseUrl: '/'
|
|
9
|
+
QlBaseUrl: '/' # 部署路径非必须,以斜杠开头和结尾,比如 /test/
|
|
15
10
|
restart: unless-stopped
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whyour/qinglong",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.13",
|
|
4
4
|
"description": "Timed task management platform supporting Python3, JavaScript, Shell, Typescript",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -73,61 +73,59 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@grpc/grpc-js": "^1.
|
|
76
|
+
"@grpc/grpc-js": "^1.12.3",
|
|
77
77
|
"@otplib/preset-default": "^12.0.1",
|
|
78
|
-
"@sentry/node": "^8.
|
|
79
|
-
"body-parser": "^1.
|
|
80
|
-
"celebrate": "^15.0.
|
|
81
|
-
"chokidar": "^
|
|
78
|
+
"@sentry/node": "^8.42.0",
|
|
79
|
+
"body-parser": "^1.20.3",
|
|
80
|
+
"celebrate": "^15.0.3",
|
|
81
|
+
"chokidar": "^4.0.1",
|
|
82
82
|
"cors": "^2.8.5",
|
|
83
|
-
"cron-parser": "^4.
|
|
84
|
-
"cross-spawn": "^7.0.
|
|
85
|
-
"dayjs": "^1.11.
|
|
86
|
-
"dotenv": "^16.
|
|
87
|
-
"express": "^4.
|
|
88
|
-
"express-jwt": "^
|
|
89
|
-
"express-rate-limit": "^7.
|
|
90
|
-
"express-urlrewrite": "^
|
|
83
|
+
"cron-parser": "^4.9.0",
|
|
84
|
+
"cross-spawn": "^7.0.6",
|
|
85
|
+
"dayjs": "^1.11.13",
|
|
86
|
+
"dotenv": "^16.4.6",
|
|
87
|
+
"express": "^4.21.1",
|
|
88
|
+
"express-jwt": "^8.4.1",
|
|
89
|
+
"express-rate-limit": "^7.4.1",
|
|
90
|
+
"express-urlrewrite": "^2.0.3",
|
|
91
91
|
"form-data": "^4.0.0",
|
|
92
92
|
"got": "^11.8.2",
|
|
93
93
|
"hpagent": "^1.2.0",
|
|
94
|
-
"http-proxy-middleware": "^
|
|
94
|
+
"http-proxy-middleware": "^3.0.3",
|
|
95
95
|
"iconv-lite": "^0.6.3",
|
|
96
96
|
"js-yaml": "^4.1.0",
|
|
97
|
-
"jsonwebtoken": "^
|
|
97
|
+
"jsonwebtoken": "^9.0.2",
|
|
98
98
|
"lodash": "^4.17.21",
|
|
99
99
|
"multer": "1.4.5-lts.1",
|
|
100
100
|
"nedb": "^1.8.0",
|
|
101
101
|
"node-schedule": "^2.1.0",
|
|
102
|
-
"nodemailer": "^6.
|
|
102
|
+
"nodemailer": "^6.9.16",
|
|
103
103
|
"p-queue-cjs": "7.3.4",
|
|
104
|
-
"protobufjs": "^7.
|
|
104
|
+
"protobufjs": "^7.4.0",
|
|
105
105
|
"pstree.remy": "^1.1.8",
|
|
106
|
-
"reflect-metadata": "^0.
|
|
107
|
-
"sequelize": "^6.
|
|
108
|
-
"serve-handler": "^6.1.
|
|
106
|
+
"reflect-metadata": "^0.2.2",
|
|
107
|
+
"sequelize": "^6.37.5",
|
|
108
|
+
"serve-handler": "^6.1.6",
|
|
109
109
|
"sockjs": "^0.3.24",
|
|
110
110
|
"sqlite3": "git+https://github.com/whyour/node-sqlite3.git#v1.0.3",
|
|
111
|
-
"toad-scheduler": "^
|
|
111
|
+
"toad-scheduler": "^3.0.1",
|
|
112
112
|
"typedi": "^0.10.0",
|
|
113
|
-
"uuid": "^
|
|
114
|
-
"winston": "^3.
|
|
115
|
-
"winston-daily-rotate-file": "^
|
|
116
|
-
"yargs": "^17.3.1",
|
|
117
|
-
"tough-cookie": "^4.0.0",
|
|
113
|
+
"uuid": "^11.0.3",
|
|
114
|
+
"winston": "^3.17.0",
|
|
115
|
+
"winston-daily-rotate-file": "^5.0.0",
|
|
118
116
|
"request-ip": "3.3.0",
|
|
119
117
|
"ip2region": "2.3.0"
|
|
120
118
|
},
|
|
121
119
|
"devDependencies": {
|
|
122
120
|
"moment": "2.30.1",
|
|
123
|
-
"@ant-design/icons": "^
|
|
121
|
+
"@ant-design/icons": "^5.0.1",
|
|
124
122
|
"@ant-design/pro-layout": "6.38.22",
|
|
125
123
|
"@codemirror/view": "^6.34.1",
|
|
126
124
|
"@codemirror/state": "^6.4.1",
|
|
127
125
|
"@monaco-editor/react": "4.2.1",
|
|
128
|
-
"@react-hook/resize-observer": "^
|
|
126
|
+
"@react-hook/resize-observer": "^2.0.2",
|
|
129
127
|
"react-router-dom": "6.26.1",
|
|
130
|
-
"@sentry/react": "^8.
|
|
128
|
+
"@sentry/react": "^8.42.0",
|
|
131
129
|
"@types/body-parser": "^1.19.2",
|
|
132
130
|
"@types/cors": "^2.8.12",
|
|
133
131
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -153,16 +151,16 @@
|
|
|
153
151
|
"@types/request-ip": "0.0.41",
|
|
154
152
|
"@uiw/codemirror-extensions-langs": "^4.21.9",
|
|
155
153
|
"@uiw/react-codemirror": "^4.21.9",
|
|
156
|
-
"@umijs/max": "^4.
|
|
154
|
+
"@umijs/max": "^4.3.36",
|
|
157
155
|
"@umijs/ssr-darkreader": "^4.9.45",
|
|
158
156
|
"ahooks": "^3.7.8",
|
|
159
157
|
"ansi-to-react": "^6.1.6",
|
|
160
158
|
"antd": "^4.24.8",
|
|
161
|
-
"antd-img-crop": "^4.
|
|
159
|
+
"antd-img-crop": "^4.23.0",
|
|
162
160
|
"axios": "^1.4.0",
|
|
163
161
|
"compression-webpack-plugin": "9.2.0",
|
|
164
162
|
"concurrently": "^7.0.0",
|
|
165
|
-
"react-hotkeys-hook": "^4.
|
|
163
|
+
"react-hotkeys-hook": "^4.6.1",
|
|
166
164
|
"file-saver": "2.0.2",
|
|
167
165
|
"lint-staged": "^13.0.3",
|
|
168
166
|
"monaco-editor": "0.33.0",
|
|
@@ -173,14 +171,14 @@
|
|
|
173
171
|
"qrcode.react": "^1.0.1",
|
|
174
172
|
"query-string": "^7.1.1",
|
|
175
173
|
"rc-tween-one": "^3.0.6",
|
|
176
|
-
"rc-virtual-list": "3.
|
|
177
|
-
"react": "18.
|
|
174
|
+
"rc-virtual-list": "3.15.0",
|
|
175
|
+
"react": "18.3.1",
|
|
178
176
|
"react-copy-to-clipboard": "^5.1.0",
|
|
179
177
|
"react-diff-viewer": "^3.1.1",
|
|
180
|
-
"react-dnd": "^
|
|
181
|
-
"react-dnd-html5-backend": "^
|
|
182
|
-
"react-dom": "18.
|
|
183
|
-
"react-intl-universal": "^2.
|
|
178
|
+
"react-dnd": "^16.0.1",
|
|
179
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
180
|
+
"react-dom": "18.3.1",
|
|
181
|
+
"react-intl-universal": "^2.12.0",
|
|
184
182
|
"react-split-pane": "^0.1.92",
|
|
185
183
|
"sockjs-client": "^1.6.0",
|
|
186
184
|
"ts-node": "^10.9.2",
|
|
@@ -189,7 +187,6 @@
|
|
|
189
187
|
"typescript": "5.2.2",
|
|
190
188
|
"vh-check": "^2.0.5",
|
|
191
189
|
"virtualizedtableforantd4": "1.3.0",
|
|
192
|
-
"webpack": "^5.70.0",
|
|
193
190
|
"yorkie": "^2.0.0"
|
|
194
191
|
}
|
|
195
192
|
}
|
package/sample/config.sample.sh
CHANGED
|
@@ -117,6 +117,16 @@ export PUSH_PLUS_TOKEN=""
|
|
|
117
117
|
## 下方填写您的一对多推送的 "群组编码" ,(一对多推送下面->您的群组(如无则新建)->群组编码)
|
|
118
118
|
## 1. 需订阅者扫描二维码 2、如果您是创建群组所属人,也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送
|
|
119
119
|
export PUSH_PLUS_USER=""
|
|
120
|
+
## 发送模板,支持html,txt,json,markdown,cloudMonitor,jenkins,route,pay
|
|
121
|
+
export PUSH_PLUS_TEMPLATE="html"
|
|
122
|
+
## 发送渠道,支持wechat,webhook,cp,mail,sms
|
|
123
|
+
export PUSH_PLUS_CHANNEL="wechat"
|
|
124
|
+
## webhook编码,可在pushplus公众号上扩展配置出更多渠道
|
|
125
|
+
export PUSH_PLUS_WEBHOOK=""
|
|
126
|
+
## 发送结果回调地址,会把推送最终结果通知到这个地址上
|
|
127
|
+
export PUSH_PLUS_CALLBACKURL=""
|
|
128
|
+
## 好友令牌,微信公众号渠道填写好友令牌,企业微信渠道填写企业微信用户id
|
|
129
|
+
export PUSH_PLUS_TO=""
|
|
120
130
|
|
|
121
131
|
## 9. 微加机器人
|
|
122
132
|
## 官方网站:http://www.weplusbot.com
|
|
@@ -220,8 +230,17 @@ export NTFY_URL=""
|
|
|
220
230
|
export NTFY_TOPIC=""
|
|
221
231
|
export NTFY_PRIORITY="3"
|
|
222
232
|
|
|
223
|
-
|
|
224
|
-
##
|
|
233
|
+
## 21. wxPusher
|
|
234
|
+
## 官方文档: https://wxpusher.zjiecode.com/docs/
|
|
235
|
+
## 管理后台: https://wxpusher.zjiecode.com/admin/
|
|
236
|
+
## wxPusher 的 appToken
|
|
237
|
+
export WXPUSHER_APP_TOKEN=""
|
|
238
|
+
## wxPusher 的 topicIds,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行
|
|
239
|
+
export WXPUSHER_TOPIC_IDS=""
|
|
240
|
+
## wxPusher 的 用户ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行
|
|
241
|
+
export WXPUSHER_UIDS=""
|
|
242
|
+
|
|
243
|
+
## 22. 自定义通知
|
|
225
244
|
## 自定义通知 接收回调的URL
|
|
226
245
|
export WEBHOOK_URL=""
|
|
227
246
|
## WEBHOOK_BODY 和 WEBHOOK_HEADERS 多个参数时,直接换行或者使用 $'\n' 连接多行字符串,比如 export dd="line 1"$'\n'"line 2"
|
package/sample/notify.js
CHANGED
|
@@ -40,9 +40,15 @@ const push_config = {
|
|
|
40
40
|
CHAT_URL: '', // synology chat url
|
|
41
41
|
CHAT_TOKEN: '', // synology chat token
|
|
42
42
|
|
|
43
|
-
// 官方文档:
|
|
44
|
-
PUSH_PLUS_TOKEN: '', //
|
|
45
|
-
PUSH_PLUS_USER: '', //
|
|
43
|
+
// 官方文档:https://www.pushplus.plus/
|
|
44
|
+
PUSH_PLUS_TOKEN: '', // pushplus 推送的用户令牌
|
|
45
|
+
PUSH_PLUS_USER: '', // pushplus 推送的群组编码
|
|
46
|
+
PUSH_PLUS_TEMPLATE: 'html', // pushplus 发送模板,支持html,txt,json,markdown,cloudMonitor,jenkins,route,pay
|
|
47
|
+
PUSH_PLUS_CHANNEL: 'wechat', // pushplus 发送渠道,支持wechat,webhook,cp,mail,sms
|
|
48
|
+
PUSH_PLUS_WEBHOOK: '', // pushplus webhook编码,可在pushplus公众号上扩展配置出更多渠道
|
|
49
|
+
PUSH_PLUS_CALLBACKURL: '', // pushplus 发送结果回调地址,会把推送最终结果通知到这个地址上
|
|
50
|
+
PUSH_PLUS_TO: '', // pushplus 好友令牌,微信公众号渠道填写好友令牌,企业微信渠道填写企业微信用户id
|
|
51
|
+
|
|
46
52
|
|
|
47
53
|
// 微加机器人,官方网站:https://www.weplusbot.com/
|
|
48
54
|
WE_PLUS_BOT_TOKEN: '', // 微加机器人的用户令牌
|
|
@@ -99,6 +105,12 @@ const push_config = {
|
|
|
99
105
|
NTFY_URL: '', // ntfy地址,如https://ntfy.sh,默认为https://ntfy.sh
|
|
100
106
|
NTFY_TOPIC: '', // ntfy的消息应用topic
|
|
101
107
|
NTFY_PRIORITY: '3', // 推送消息优先级,默认为3
|
|
108
|
+
|
|
109
|
+
// 官方文档: https://wxpusher.zjiecode.com/docs/
|
|
110
|
+
// 管理后台: https://wxpusher.zjiecode.com/admin/
|
|
111
|
+
WXPUSHER_APP_TOKEN: '', // wxpusher 的 appToken
|
|
112
|
+
WXPUSHER_TOPIC_IDS: '', // wxpusher 的 主题ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行
|
|
113
|
+
WXPUSHER_UIDS: '', // wxpusher 的 用户ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行
|
|
102
114
|
};
|
|
103
115
|
|
|
104
116
|
for (const key in push_config) {
|
|
@@ -765,7 +777,7 @@ function iGotNotify(text, desp, params = {}) {
|
|
|
765
777
|
|
|
766
778
|
function pushPlusNotify(text, desp) {
|
|
767
779
|
return new Promise((resolve) => {
|
|
768
|
-
const { PUSH_PLUS_TOKEN, PUSH_PLUS_USER } = push_config;
|
|
780
|
+
const { PUSH_PLUS_TOKEN, PUSH_PLUS_USER, PUSH_PLUS_TEMPLATE, PUSH_PLUS_CHANNEL, PUSH_PLUS_WEBHOOK, PUSH_PLUS_CALLBACKURL, PUSH_PLUS_TO } = push_config;
|
|
769
781
|
if (PUSH_PLUS_TOKEN) {
|
|
770
782
|
desp = desp.replace(/[\n\r]/g, '<br>'); // 默认为html, 不支持plaintext
|
|
771
783
|
const body = {
|
|
@@ -773,6 +785,11 @@ function pushPlusNotify(text, desp) {
|
|
|
773
785
|
title: `${text}`,
|
|
774
786
|
content: `${desp}`,
|
|
775
787
|
topic: `${PUSH_PLUS_USER}`,
|
|
788
|
+
template: `${PUSH_PLUS_TEMPLATE}`,
|
|
789
|
+
channel: `${PUSH_PLUS_CHANNEL}`,
|
|
790
|
+
webhook: `${PUSH_PLUS_WEBHOOK}`,
|
|
791
|
+
callbackUrl: `${PUSH_PLUS_CALLBACKURL}`,
|
|
792
|
+
to: `${PUSH_PLUS_TO}`
|
|
776
793
|
};
|
|
777
794
|
const options = {
|
|
778
795
|
url: `https://www.pushplus.plus/send`,
|
|
@@ -786,7 +803,7 @@ function pushPlusNotify(text, desp) {
|
|
|
786
803
|
try {
|
|
787
804
|
if (err) {
|
|
788
805
|
console.log(
|
|
789
|
-
`
|
|
806
|
+
`pushplus 发送${
|
|
790
807
|
PUSH_PLUS_USER ? '一对多' : '一对一'
|
|
791
808
|
}通知消息失败😞\n`,
|
|
792
809
|
err,
|
|
@@ -794,13 +811,13 @@ function pushPlusNotify(text, desp) {
|
|
|
794
811
|
} else {
|
|
795
812
|
if (data.code === 200) {
|
|
796
813
|
console.log(
|
|
797
|
-
`
|
|
814
|
+
`pushplus 发送${
|
|
798
815
|
PUSH_PLUS_USER ? '一对多' : '一对一'
|
|
799
|
-
}
|
|
816
|
+
}通知请求成功🎉,可根据流水号查询推送结果:${data.data}\n注意:请求成功并不代表推送成功,如未收到消息,请到pushplus官网使用流水号查询推送最终结果`,
|
|
800
817
|
);
|
|
801
818
|
} else {
|
|
802
819
|
console.log(
|
|
803
|
-
`
|
|
820
|
+
`pushplus 发送${
|
|
804
821
|
PUSH_PLUS_USER ? '一对多' : '一对一'
|
|
805
822
|
}通知消息异常 ${data.msg}\n`,
|
|
806
823
|
);
|
|
@@ -1235,6 +1252,70 @@ function ntfyNotify(text, desp) {
|
|
|
1235
1252
|
});
|
|
1236
1253
|
}
|
|
1237
1254
|
|
|
1255
|
+
function wxPusherNotify(text, desp) {
|
|
1256
|
+
return new Promise((resolve) => {
|
|
1257
|
+
const { WXPUSHER_APP_TOKEN, WXPUSHER_TOPIC_IDS, WXPUSHER_UIDS } = push_config;
|
|
1258
|
+
if (WXPUSHER_APP_TOKEN) {
|
|
1259
|
+
// 处理topic_ids,将分号分隔的字符串转为数组
|
|
1260
|
+
const topicIds = WXPUSHER_TOPIC_IDS ? WXPUSHER_TOPIC_IDS.split(';')
|
|
1261
|
+
.map(id => id.trim())
|
|
1262
|
+
.filter(id => id)
|
|
1263
|
+
.map(id => parseInt(id)) : [];
|
|
1264
|
+
|
|
1265
|
+
// 处理uids,将分号分隔的字符串转为数组
|
|
1266
|
+
const uids = WXPUSHER_UIDS ? WXPUSHER_UIDS.split(';')
|
|
1267
|
+
.map(uid => uid.trim())
|
|
1268
|
+
.filter(uid => uid) : [];
|
|
1269
|
+
|
|
1270
|
+
// topic_ids uids 至少有一个
|
|
1271
|
+
if (!topicIds.length && !uids.length) {
|
|
1272
|
+
console.log("wxpusher 服务的 WXPUSHER_TOPIC_IDS 和 WXPUSHER_UIDS 至少设置一个!!\n取消推送");
|
|
1273
|
+
return resolve();
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
const body = {
|
|
1277
|
+
appToken: WXPUSHER_APP_TOKEN,
|
|
1278
|
+
content: `<h1>${text}</h1><br/><div style='white-space: pre-wrap;'>${desp}</div>`,
|
|
1279
|
+
summary: text,
|
|
1280
|
+
contentType: 2,
|
|
1281
|
+
topicIds: topicIds,
|
|
1282
|
+
uids: uids,
|
|
1283
|
+
verifyPayType: 0
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1286
|
+
const options = {
|
|
1287
|
+
url: 'https://wxpusher.zjiecode.com/api/send/message',
|
|
1288
|
+
body: JSON.stringify(body),
|
|
1289
|
+
headers: {
|
|
1290
|
+
'Content-Type': 'application/json'
|
|
1291
|
+
},
|
|
1292
|
+
timeout
|
|
1293
|
+
};
|
|
1294
|
+
|
|
1295
|
+
$.post(options, (err, resp, data) => {
|
|
1296
|
+
try {
|
|
1297
|
+
if (err) {
|
|
1298
|
+
console.log('wxpusher发送通知消息失败!\n', err);
|
|
1299
|
+
} else {
|
|
1300
|
+
if (data.code === 1000) {
|
|
1301
|
+
console.log('wxpusher发送通知消息完成!');
|
|
1302
|
+
} else {
|
|
1303
|
+
console.log(`wxpusher发送通知消息异常:${data.msg}`);
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
} catch (e) {
|
|
1307
|
+
$.logErr(e, resp);
|
|
1308
|
+
} finally {
|
|
1309
|
+
resolve(data);
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
} else {
|
|
1313
|
+
console.log('wxpusher 服务的 WXPUSHER_APP_TOKEN 未设置!!\n取消推送');
|
|
1314
|
+
resolve();
|
|
1315
|
+
}
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1238
1319
|
|
|
1239
1320
|
function parseString(input, valueFormatFn) {
|
|
1240
1321
|
const regex = /(\w+):\s*((?:(?!\n\w+:).)*)/g;
|
|
@@ -1365,6 +1446,7 @@ async function sendNotify(text, desp, params = {}) {
|
|
|
1365
1446
|
webhookNotify(text, desp), // 自定义通知
|
|
1366
1447
|
qmsgNotify(text, desp), // 自定义通知
|
|
1367
1448
|
ntfyNotify(text, desp), // Ntfy
|
|
1449
|
+
wxPusherNotify(text, desp), // wxpusher
|
|
1368
1450
|
]);
|
|
1369
1451
|
}
|
|
1370
1452
|
|
package/sample/notify.py
CHANGED
|
@@ -72,8 +72,13 @@ push_config = {
|
|
|
72
72
|
'CHAT_URL': '', # synology chat url
|
|
73
73
|
'CHAT_TOKEN': '', # synology chat token
|
|
74
74
|
|
|
75
|
-
'PUSH_PLUS_TOKEN': '', #
|
|
76
|
-
'PUSH_PLUS_USER': '', #
|
|
75
|
+
'PUSH_PLUS_TOKEN': '', # pushplus 推送的用户令牌
|
|
76
|
+
'PUSH_PLUS_USER': '', # pushplus 推送的群组编码
|
|
77
|
+
'PUSH_PLUS_TEMPLATE': 'html', # pushplus 发送模板,支持html,txt,json,markdown,cloudMonitor,jenkins,route,pay
|
|
78
|
+
'PUSH_PLUS_CHANNEL': 'wechat', # pushplus 发送渠道,支持wechat,webhook,cp,mail,sms
|
|
79
|
+
'PUSH_PLUS_WEBHOOK': '', # pushplus webhook编码,可在pushplus公众号上扩展配置出更多渠道
|
|
80
|
+
'PUSH_PLUS_CALLBACKURL': '', # pushplus 发送结果回调地址,会把推送最终结果通知到这个地址上
|
|
81
|
+
'PUSH_PLUS_TO': '', # pushplus 好友令牌,微信公众号渠道填写好友令牌,企业微信渠道填写企业微信用户id
|
|
77
82
|
|
|
78
83
|
'WE_PLUS_BOT_TOKEN': '', # 微加机器人的用户令牌
|
|
79
84
|
'WE_PLUS_BOT_RECEIVER': '', # 微加机器人的消息接收者
|
|
@@ -121,6 +126,10 @@ push_config = {
|
|
|
121
126
|
'NTFY_URL': '', # ntfy地址,如https://ntfy.sh
|
|
122
127
|
'NTFY_TOPIC': '', # ntfy的消息应用topic
|
|
123
128
|
'NTFY_PRIORITY':'3', # 推送消息优先级,默认为3
|
|
129
|
+
|
|
130
|
+
'WXPUSHER_APP_TOKEN': '', # wxpusher 的 appToken 官方文档: https://wxpusher.zjiecode.com/docs/ 管理后台: https://wxpusher.zjiecode.com/admin/
|
|
131
|
+
'WXPUSHER_TOPIC_IDS': '', # wxpusher 的 主题ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行
|
|
132
|
+
'WXPUSHER_UIDS': '', # wxpusher 的 用户ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行
|
|
124
133
|
}
|
|
125
134
|
# fmt: on
|
|
126
135
|
|
|
@@ -364,26 +373,35 @@ def chat(title: str, content: str) -> None:
|
|
|
364
373
|
|
|
365
374
|
def pushplus_bot(title: str, content: str) -> None:
|
|
366
375
|
"""
|
|
367
|
-
通过
|
|
376
|
+
通过 pushplus 推送消息。
|
|
368
377
|
"""
|
|
369
378
|
if not push_config.get("PUSH_PLUS_TOKEN"):
|
|
370
379
|
print("PUSHPLUS 服务的 PUSH_PLUS_TOKEN 未设置!!\n取消推送")
|
|
371
380
|
return
|
|
372
381
|
print("PUSHPLUS 服务启动")
|
|
373
382
|
|
|
374
|
-
url = "
|
|
383
|
+
url = "https://www.pushplus.plus/send"
|
|
375
384
|
data = {
|
|
376
385
|
"token": push_config.get("PUSH_PLUS_TOKEN"),
|
|
377
386
|
"title": title,
|
|
378
387
|
"content": content,
|
|
379
388
|
"topic": push_config.get("PUSH_PLUS_USER"),
|
|
389
|
+
"template": push_config.get("PUSH_PLUS_TEMPLATE"),
|
|
390
|
+
"channel": push_config.get("PUSH_PLUS_CHANNEL"),
|
|
391
|
+
"webhook": push_config.get("PUSH_PLUS_WEBHOOK"),
|
|
392
|
+
"callbackUrl": push_config.get("PUSH_PLUS_CALLBACKURL"),
|
|
393
|
+
"to": push_config.get("PUSH_PLUS_TO")
|
|
380
394
|
}
|
|
381
395
|
body = json.dumps(data).encode(encoding="utf-8")
|
|
382
396
|
headers = {"Content-Type": "application/json"}
|
|
383
397
|
response = requests.post(url=url, data=body, headers=headers).json()
|
|
384
398
|
|
|
385
|
-
|
|
386
|
-
|
|
399
|
+
code = response["code"]
|
|
400
|
+
if code == 200:
|
|
401
|
+
print("PUSHPLUS 推送请求成功,可根据流水号查询推送结果:"+ response["data"])
|
|
402
|
+
print("注意:请求成功并不代表推送成功,如未收到消息,请到pushplus官网使用流水号查询推送最终结果")
|
|
403
|
+
elif code == 900 or code == 903 or code == 905 or code == 999 :
|
|
404
|
+
print(response["msg"])
|
|
387
405
|
|
|
388
406
|
else:
|
|
389
407
|
url_old = "http://pushplus.hxtrip.com/send"
|
|
@@ -821,6 +839,57 @@ def ntfy(title: str, content: str) -> None:
|
|
|
821
839
|
else:
|
|
822
840
|
print("Ntfy 推送失败!错误信息:", response.text)
|
|
823
841
|
|
|
842
|
+
|
|
843
|
+
def wxpusher_bot(title: str, content: str) -> None:
|
|
844
|
+
"""
|
|
845
|
+
通过 wxpusher 推送消息。
|
|
846
|
+
支持的环境变量:
|
|
847
|
+
- WXPUSHER_APP_TOKEN: appToken
|
|
848
|
+
- WXPUSHER_TOPIC_IDS: 主题ID, 多个用英文分号;分隔
|
|
849
|
+
- WXPUSHER_UIDS: 用户ID, 多个用英文分号;分隔
|
|
850
|
+
"""
|
|
851
|
+
if not push_config.get("WXPUSHER_APP_TOKEN"):
|
|
852
|
+
print("wxpusher 服务的 WXPUSHER_APP_TOKEN 未设置!!\n取消推送")
|
|
853
|
+
return
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
url = "https://wxpusher.zjiecode.com/api/send/message"
|
|
857
|
+
|
|
858
|
+
# 处理topic_ids和uids,将分号分隔的字符串转为数组
|
|
859
|
+
topic_ids = []
|
|
860
|
+
if push_config.get("WXPUSHER_TOPIC_IDS"):
|
|
861
|
+
topic_ids = [int(id.strip()) for id in push_config.get("WXPUSHER_TOPIC_IDS").split(";") if id.strip()]
|
|
862
|
+
|
|
863
|
+
uids = []
|
|
864
|
+
if push_config.get("WXPUSHER_UIDS"):
|
|
865
|
+
uids = [uid.strip() for uid in push_config.get("WXPUSHER_UIDS").split(";") if uid.strip()]
|
|
866
|
+
|
|
867
|
+
# topic_ids uids 至少有一个
|
|
868
|
+
if not topic_ids and not uids:
|
|
869
|
+
print("wxpusher 服务的 WXPUSHER_TOPIC_IDS 和 WXPUSHER_UIDS 至少设置一个!!\n取消推送")
|
|
870
|
+
return
|
|
871
|
+
|
|
872
|
+
print("wxpusher 服务启动")
|
|
873
|
+
|
|
874
|
+
data = {
|
|
875
|
+
"appToken": push_config.get("WXPUSHER_APP_TOKEN"),
|
|
876
|
+
"content": f"<h1>{title}</h1><br/><div style='white-space: pre-wrap;'>{content}</div>",
|
|
877
|
+
"summary": title,
|
|
878
|
+
"contentType": 2,
|
|
879
|
+
"topicIds": topic_ids,
|
|
880
|
+
"uids": uids,
|
|
881
|
+
"verifyPayType": 0
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
headers = {"Content-Type": "application/json"}
|
|
885
|
+
response = requests.post(url=url, json=data, headers=headers).json()
|
|
886
|
+
|
|
887
|
+
if response.get("code") == 1000:
|
|
888
|
+
print("wxpusher 推送成功!")
|
|
889
|
+
else:
|
|
890
|
+
print(f"wxpusher 推送失败!错误信息:{response.get('msg')}")
|
|
891
|
+
|
|
892
|
+
|
|
824
893
|
def parse_headers(headers):
|
|
825
894
|
if not headers:
|
|
826
895
|
return {}
|
|
@@ -983,6 +1052,8 @@ def add_notify_function():
|
|
|
983
1052
|
notify_function.append(custom_notify)
|
|
984
1053
|
if push_config.get("NTFY_TOPIC"):
|
|
985
1054
|
notify_function.append(ntfy)
|
|
1055
|
+
if push_config.get("WXPUSHER_APP_TOKEN") and (push_config.get("WXPUSHER_TOPIC_IDS") or push_config.get("WXPUSHER_UIDS")):
|
|
1056
|
+
notify_function.append(wxpusher_bot)
|
|
986
1057
|
if not notify_function:
|
|
987
1058
|
print(f"无推送渠道,请检查通知变量是否正确")
|
|
988
1059
|
return notify_function
|
package/shell/start.sh
CHANGED
|
@@ -23,7 +23,12 @@ if [[ ! $QL_DIR ]]; then
|
|
|
23
23
|
fi
|
|
24
24
|
|
|
25
25
|
if [[ ! $QL_DATA_DIR ]]; then
|
|
26
|
-
echo -e "请先手动设置数据存储目录 export QL_DATA_DIR
|
|
26
|
+
echo -e "请先手动设置数据存储目录 export QL_DATA_DIR 环境变量,目录必须以斜杠开头的绝对路径,并且以 /data 结尾,例如 /ql/data 并手动添加到系统环境变量"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
if [[ $QL_DATA_DIR != */data ]]; then
|
|
31
|
+
echo -e "QL_DATA_DIR 必须以 /data 结尾,例如 /ql/data,如果有历史数据,请新建 data 目录,把历史数据放到 data 目录中"
|
|
27
32
|
exit 1
|
|
28
33
|
fi
|
|
29
34
|
|
|
@@ -173,11 +173,14 @@ function getPlatform(userAgent) {
|
|
|
173
173
|
else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) {
|
|
174
174
|
system = 'ios'; // ios系统
|
|
175
175
|
}
|
|
176
|
+
else if (testUa(/openharmony/g)) {
|
|
177
|
+
system = 'openharmony'; // openharmony系统
|
|
178
|
+
}
|
|
176
179
|
let platform = 'desktop';
|
|
177
180
|
if (system === 'windows' || system === 'macos' || system === 'linux') {
|
|
178
181
|
platform = 'desktop';
|
|
179
182
|
}
|
|
180
|
-
else if (system === 'android' || system === 'ios' || testUa(/mobile/g)) {
|
|
183
|
+
else if (system === 'android' || system === 'ios' || system === 'openharmony' || testUa(/mobile/g)) {
|
|
181
184
|
platform = 'mobile';
|
|
182
185
|
}
|
|
183
186
|
return platform;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NtfyNotification = exports.LarkNotification = exports.WebhookNotification = exports.ChronocatNotification = exports.PushMeNotification = exports.EmailNotification = exports.WePlusBotNotification = exports.PushPlusNotification = exports.IGotNotification = exports.AibotkNotification = exports.WeWorkAppNotification = exports.WeWorkBotNotification = exports.DingtalkBotNotification = exports.TelegramBotNotification = exports.BarkNotification = exports.ChatNotification = exports.PushDeerNotification = exports.ServerChanNotification = exports.GoCqHttpBotNotification = exports.GotifyNotification = exports.NotificationMode = void 0;
|
|
3
|
+
exports.WxPusherBotNotification = exports.NtfyNotification = exports.LarkNotification = exports.WebhookNotification = exports.ChronocatNotification = exports.PushMeNotification = exports.EmailNotification = exports.WePlusBotNotification = exports.PushPlusNotification = exports.IGotNotification = exports.AibotkNotification = exports.WeWorkAppNotification = exports.WeWorkBotNotification = exports.DingtalkBotNotification = exports.TelegramBotNotification = exports.BarkNotification = exports.ChatNotification = exports.PushDeerNotification = exports.ServerChanNotification = exports.GoCqHttpBotNotification = exports.GotifyNotification = exports.NotificationMode = void 0;
|
|
4
4
|
var NotificationMode;
|
|
5
5
|
(function (NotificationMode) {
|
|
6
6
|
NotificationMode["gotify"] = "gotify";
|
|
@@ -23,6 +23,7 @@ var NotificationMode;
|
|
|
23
23
|
NotificationMode["webhook"] = "webhook";
|
|
24
24
|
NotificationMode["chronocat"] = "Chronocat";
|
|
25
25
|
NotificationMode["ntfy"] = "ntfy";
|
|
26
|
+
NotificationMode["wxPusherBot"] = "wxPusherBot";
|
|
26
27
|
})(NotificationMode || (exports.NotificationMode = NotificationMode = {}));
|
|
27
28
|
class NotificationBaseInfo {
|
|
28
29
|
}
|
|
@@ -137,6 +138,11 @@ class PushPlusNotification extends NotificationBaseInfo {
|
|
|
137
138
|
super(...arguments);
|
|
138
139
|
this.pushPlusToken = '';
|
|
139
140
|
this.pushPlusUser = '';
|
|
141
|
+
this.pushPlusTemplate = '';
|
|
142
|
+
this.pushplusChannel = '';
|
|
143
|
+
this.pushplusWebhook = '';
|
|
144
|
+
this.pushplusCallbackUrl = '';
|
|
145
|
+
this.pushplusTo = '';
|
|
140
146
|
}
|
|
141
147
|
}
|
|
142
148
|
exports.PushPlusNotification = PushPlusNotification;
|
|
@@ -202,4 +208,13 @@ class NtfyNotification extends NotificationBaseInfo {
|
|
|
202
208
|
}
|
|
203
209
|
}
|
|
204
210
|
exports.NtfyNotification = NtfyNotification;
|
|
211
|
+
class WxPusherBotNotification extends NotificationBaseInfo {
|
|
212
|
+
constructor() {
|
|
213
|
+
super(...arguments);
|
|
214
|
+
this.wxPusherBotAppToken = '';
|
|
215
|
+
this.wxPusherBotTopicIds = '';
|
|
216
|
+
this.wxPusherBotUids = '';
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.WxPusherBotNotification = WxPusherBotNotification;
|
|
205
220
|
//# sourceMappingURL=notify.js.map
|
|
@@ -31,7 +31,7 @@ const body_parser_1 = __importDefault(require("body-parser"));
|
|
|
31
31
|
const cors_1 = __importDefault(require("cors"));
|
|
32
32
|
const api_1 = __importDefault(require("../api"));
|
|
33
33
|
const config_1 = __importDefault(require("../config"));
|
|
34
|
-
const express_jwt_1 =
|
|
34
|
+
const express_jwt_1 = require("express-jwt");
|
|
35
35
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
36
36
|
const util_1 = require("../config/util");
|
|
37
37
|
const typedi_1 = __importDefault(require("typedi"));
|
|
@@ -52,11 +52,11 @@ exports.default = ({ app }) => {
|
|
|
52
52
|
target: `http://0.0.0.0:${config_1.default.publicPort}/api`,
|
|
53
53
|
changeOrigin: true,
|
|
54
54
|
pathRewrite: { '/api/public': '' },
|
|
55
|
-
|
|
55
|
+
logger: logger_1.default,
|
|
56
56
|
}));
|
|
57
57
|
app.use(body_parser_1.default.json({ limit: '50mb' }));
|
|
58
58
|
app.use(body_parser_1.default.urlencoded({ limit: '50mb', extended: true }));
|
|
59
|
-
app.use((0, express_jwt_1.
|
|
59
|
+
app.use((0, express_jwt_1.expressjwt)({
|
|
60
60
|
secret: config_1.default.secret,
|
|
61
61
|
algorithms: ['HS384'],
|
|
62
62
|
}).unless({
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const body_parser_1 = __importDefault(require("body-parser"));
|
|
7
7
|
const celebrate_1 = require("celebrate");
|
|
8
8
|
const cors_1 = __importDefault(require("cors"));
|
|
9
|
-
const express_jwt_1 =
|
|
9
|
+
const express_jwt_1 = require("express-jwt");
|
|
10
10
|
const typedi_1 = __importDefault(require("typedi"));
|
|
11
11
|
const config_1 = __importDefault(require("../config"));
|
|
12
12
|
const system_1 = __importDefault(require("../services/system"));
|
|
@@ -16,7 +16,7 @@ exports.default = ({ app }) => {
|
|
|
16
16
|
app.use((0, cors_1.default)());
|
|
17
17
|
app.use(body_parser_1.default.json({ limit: '50mb' }));
|
|
18
18
|
app.use(body_parser_1.default.urlencoded({ limit: '50mb', extended: true }));
|
|
19
|
-
app.use((0, express_jwt_1.
|
|
19
|
+
app.use((0, express_jwt_1.expressjwt)({
|
|
20
20
|
secret: config_1.default.secret,
|
|
21
21
|
algorithms: ['HS384'],
|
|
22
22
|
}));
|
|
@@ -19,7 +19,6 @@ server.bindAsync(`0.0.0.0:${config_1.default.cronPort}`, grpc_js_1.ServerCredent
|
|
|
19
19
|
if (err) {
|
|
20
20
|
throw err;
|
|
21
21
|
}
|
|
22
|
-
server.start();
|
|
23
22
|
logger_1.default.debug(`✌️ 定时服务启动成功!`);
|
|
24
23
|
console.debug(`✌️ 定时服务启动成功!`);
|
|
25
24
|
(_a = process.send) === null || _a === void 0 ? void 0 : _a.call(process, 'ready');
|