Compare commits

...

12 Commits

Author SHA1 Message Date
whyour b733937691 更新版本 v2.17.12 2024-10-26 14:59:36 +08:00
whyour 0d9eba4b6e 定时任务外漏标签改为 10 个 2024-10-26 14:49:02 +08:00
whyour 20c6a1e8bf 移除任务执行前后的脚本参数 2024-10-26 14:12:58 +08:00
qiaoyun680 56bc2f0b1d 改进ntfy通知,将中文标题进行编码后发送 (#2541)
* 1.改进ntfy通知,将中文标题进行编码后发送,可以直接展示中文标题;2.改进notify.py和notify.js中ntfy的推送;
---------

Co-authored-by: qiaoyun680 <qiaoyun680>
2024-10-23 16:38:51 +08:00
Easy ecc55883f0 优化Server酱Key相关的逻辑 (#2538)
* 优化sendkey的兼容

* 对title和desp encode
2024-10-22 21:49:07 +08:00
qiaoyun680 185fd2ff91 增加 ntfy 通知 (#2537)
Co-authored-by: qiaoyun680 <qiaoyun680>
2024-10-22 21:47:38 +08:00
whyour 3822c37fa0 修复登录日志保存 2024-10-19 00:18:24 +08:00
whyour 4244502949 增加 log 图标样式 2024-10-13 21:24:17 +08:00
Easy 71dd82f74e 适配Server酱APP分支(Server酱³),移除已废弃的旧版api入口 (#2524) 2024-10-10 22:09:00 +08:00
whyour 6ea8d361fd 修复 mac 时间格式化 2024-09-29 22:47:57 +08:00
whyour 3f71f9acdb 修复任务命令带有 -m 参数时,日志目录生成异常 2024-09-29 22:27:52 +08:00
whyour 418695c4aa 定时任务支持复制 2024-09-24 23:33:04 +08:00
27 changed files with 1628 additions and 210 deletions
+10 -5
View File
@@ -469,13 +469,18 @@ export async function getUniqPath(
command: string,
id: string,
): Promise<string> {
let suffix = '';
if (/^\d+$/.test(id)) {
id = `_${id}`;
} else {
id = '';
suffix = `_${id}`;
}
let items = command.split(/ +/);
const maxTimeCommandIndex = items.findIndex((x) => x === '-m');
if (maxTimeCommandIndex !== -1) {
items = items.slice(maxTimeCommandIndex + 2);
}
const items = command.split(/ +/);
let str = items[0];
if (items[0] === TASK_COMMAND) {
str = items[1];
@@ -499,7 +504,7 @@ export async function getUniqPath(
str = `${tempStr}_${str.slice(slashIndex + 1)}`;
}
return `${str}${id}`;
return `${str}${suffix}`;
}
export function safeJSONParse(value?: string) {
+8 -1
View File
@@ -20,6 +20,7 @@ export enum NotificationMode {
'feishu' = 'feishu',
'webhook' = 'webhook',
'chronocat' = 'Chronocat',
'ntfy' = 'ntfy',
}
abstract class NotificationBaseInfo {
@@ -139,6 +140,11 @@ export class LarkNotification extends NotificationBaseInfo {
public larkKey = '';
}
export class NtfyNotification extends NotificationBaseInfo {
public ntfyUrl = '';
public ntfyTopic = '';
public ntfyPriority = '';
}
export interface NotificationInfo
extends GoCqHttpBotNotification,
GotifyNotification,
@@ -158,5 +164,6 @@ export interface NotificationInfo
PushMeNotification,
WebhookNotification,
ChronocatNotification,
LarkNotification {}
LarkNotification,
NtfyNotification {}
+4 -4
View File
@@ -4,10 +4,10 @@ import config from '../config';
import path from 'path';
const levelMap: Record<string, string> = {
info: '🔵',
warn: '🟡',
error: '🔴',
debug: '🔶'
info: '\ue6f5',
warn: '\ue880',
error: '\ue602',
debug: '\ue67f'
}
const customFormat = winston.format.combine(
+34 -5
View File
@@ -35,6 +35,7 @@ export default class NotificationService {
['webhook', this.webhook],
['lark', this.lark],
['chronocat', this.chronocat],
['ntfy', this.ntfy],
]);
private title = '';
@@ -151,14 +152,16 @@ export default class NotificationService {
private async serverChan() {
const { serverChanKey } = this.params;
const url = serverChanKey.startsWith('SCT')
? `https://sctapi.ftqq.com/${serverChanKey}.send`
: `https://sc.ftqq.com/${serverChanKey}.send`;
const matchResult = serverChanKey.match(/^sctp(\d+)t/i);
const url = matchResult && matchResult[1]
? `https://${matchResult[1]}.push.ft07.com/send/${serverChanKey}.send`
: `https://sctapi.ftqq.com/${serverChanKey}.send`;
try {
const res: any = await got
.post(url, {
...this.gotOption,
body: `title=${this.title}&desp=${this.content}`,
body: `title=${encodeURIComponent(this.title)}&desp=${encodeURIComponent(this.content)}`,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
})
.json();
@@ -516,7 +519,7 @@ export default class NotificationService {
} catch (error: any) {
throw new Error(error.response ? error.response.body : error);
}
}
}
private async pushPlus() {
const { pushPlusToken, pushPlusUser } = this.params;
@@ -661,6 +664,32 @@ export default class NotificationService {
}
}
private async ntfy() {
const { ntfyUrl, ntfyTopic, ntfyPriority } = this.params;
// 编码函数
const encodeRfc2047 = (text: string, charset: string = 'UTF-8'): string => {
const encodedText = Buffer.from(text).toString('base64');
return `=?${charset}?B?${encodedText}?=`;
};
try {
const encodedTitle = encodeRfc2047(this.title);
const res: any = await got
.post(`${ntfyUrl || 'https://ntfy.sh'}/${ntfyTopic}`, {
...this.gotOption,
body: `${this.content}`,
headers: { 'Title': encodedTitle, 'Priority': `${ntfyPriority || '3'}` },
});
if (res.statusCode === 200) {
return true;
} else {
throw new Error(JSON.stringify(res));
}
} catch (error: any) {
throw new Error(error.response ? error.response.body : error);
}
}
private async chronocat() {
const { chronocatURL, chronocatQQ, chronocatToken } = this.params;
try {
+1 -1
View File
@@ -217,7 +217,7 @@ export default class UserService {
(a, b) => b.info!.timestamp! - a.info!.timestamp!,
);
if (result.length > 100) {
const ids = result.slice(0, result.length - 100).map((x) => x.id!);
const ids = result.slice(100).map((x) => x.id!);
await SystemModel.destroy({
where: { id: ids },
});
+2
View File
@@ -106,6 +106,8 @@
"moment": "2.30.1",
"@ant-design/icons": "^4.7.0",
"@ant-design/pro-layout": "6.38.22",
"@codemirror/view": "^6.34.1",
"@codemirror/state": "^6.4.1",
"@monaco-editor/react": "4.2.1",
"@react-hook/resize-observer": "^1.2.6",
"react-router-dom": "6.26.1",
+187 -159
View File
@@ -145,6 +145,12 @@ devDependencies:
'@ant-design/pro-layout':
specifier: 6.38.22
version: 6.38.22(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0)
'@codemirror/state':
specifier: ^6.4.1
version: 6.4.1
'@codemirror/view':
specifier: ^6.34.1
version: 6.34.1
'@monaco-editor/react':
specifier: 4.2.1
version: 4.2.1(monaco-editor@0.33.0)(react-dom@18.2.0)(react@18.2.0)
@@ -225,10 +231,10 @@ devDependencies:
version: 8.3.4
'@uiw/codemirror-extensions-langs':
specifier: ^4.21.9
version: 4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/language-data@6.3.1)(@codemirror/language@6.9.0)(@codemirror/legacy-modes@6.3.3)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10)
version: 4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/language-data@6.3.1)(@codemirror/language@6.10.3)(@codemirror/legacy-modes@6.3.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10)
'@uiw/react-codemirror':
specifier: ^4.21.9
version: 4.21.9(@babel/runtime@7.23.1)(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.9.0)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.2.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.16.0)(codemirror@6.0.1)(react-dom@18.2.0)(react@18.2.0)
version: 4.21.9(@babel/runtime@7.23.1)(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.10.3)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.1)(codemirror@6.0.1)(react-dom@18.2.0)(react@18.2.0)
'@umijs/max':
specifier: ^4.0.72
version: 4.0.72(@types/node@17.0.45)(@types/react-dom@18.2.4)(@types/react@18.2.8)(prettier@2.8.8)(react-dom@18.2.0)(react@18.2.0)(sockjs-client@1.6.1)(typescript@5.2.2)(webpack@5.85.1)
@@ -2814,7 +2820,7 @@ packages:
tinycolor2: 1.6.0
dev: true
/@codemirror/autocomplete@6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4):
/@codemirror/autocomplete@6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.0.4):
resolution: {integrity: sha512-Fbwm0V/Wn3BkEJZRhr0hi5BhCo5a7eBL6LYaliPjOSwCyfOpnjXY59HruSxOUNV+1OYer0Tgx1zRNQttjXyDog==}
peerDependencies:
'@codemirror/language': ^6.0.0
@@ -2822,18 +2828,32 @@ packages:
'@codemirror/view': ^6.0.0
'@lezer/common': ^1.0.0
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.0.4
dev: true
/@codemirror/autocomplete@6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3):
resolution: {integrity: sha512-Fbwm0V/Wn3BkEJZRhr0hi5BhCo5a7eBL6LYaliPjOSwCyfOpnjXY59HruSxOUNV+1OYer0Tgx1zRNQttjXyDog==}
peerDependencies:
'@codemirror/language': ^6.0.0
'@codemirror/state': ^6.0.0
'@codemirror/view': ^6.0.0
'@lezer/common': ^1.0.0
dependencies:
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.2.3
dev: true
/@codemirror/commands@6.2.4:
resolution: {integrity: sha512-42lmDqVH0ttfilLShReLXsDfASKLXzfyC36bzwcqzox9PlHulMcsUOfHXNo2X2aFMVNUoQ7j+d4q5bnfseYoOA==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.0.4
dev: true
@@ -2842,25 +2862,25 @@ packages:
dependencies:
'@codemirror/lang-html': 6.4.5
'@codemirror/lang-javascript': 6.1.9
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@codemirror/lang-cpp@6.0.2:
resolution: {integrity: sha512-6oYEYUKHvrnacXxWxYa6t4puTlbN3dgV662BDfSH8+MfjQjVmP697/KYTDOqpxgerkvoNm7q5wlFMBeX8ZMocg==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@lezer/cpp': 1.1.1
dev: true
/@codemirror/lang-css@6.2.1(@codemirror/view@6.16.0):
/@codemirror/lang-css@6.2.1(@codemirror/view@6.34.1):
resolution: {integrity: sha512-/UNWDNV5Viwi/1lpr/dIXJNWiwDxpw13I4pTUAsNxZdg6E0mI2kTQb0P2iHczg1Tu+H4EBgJR+hYhKiHKko7qg==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.0.4)
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@lezer/common': 1.0.4
'@lezer/css': 1.1.3
transitivePeerDependencies:
@@ -2870,12 +2890,12 @@ packages:
/@codemirror/lang-html@6.4.5:
resolution: {integrity: sha512-dUCSxkIw2G+chaUfw3Gfu5kkN83vJQN8gfQDp9iEHsIZluMJA0YJveT12zg/28BJx+uPsbQ6VimKCgx3oJrZxA==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.16.0)
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.0.4)
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.34.1)
'@codemirror/lang-javascript': 6.1.9
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.0.4
'@lezer/css': 1.1.3
'@lezer/html': 1.3.6
@@ -2884,18 +2904,18 @@ packages:
/@codemirror/lang-java@6.0.1:
resolution: {integrity: sha512-OOnmhH67h97jHzCuFaIEspbmsT98fNdhVhmA3zCxW0cn7l8rChDhZtwiwJ/JOKXgfm4J+ELxQihxaI7bj7mJRg==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@lezer/java': 1.0.4
dev: true
/@codemirror/lang-javascript@6.1.9:
resolution: {integrity: sha512-z3jdkcqOEBT2txn2a87A0jSy6Te3679wg/U8QzMeftFt+4KA6QooMwfdFzJiuC3L6fXKfTXZcDocoaxMYfGz0w==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/language': 6.9.0
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.0.4)
'@codemirror/language': 6.10.3
'@codemirror/lint': 6.4.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.0.4
'@lezer/javascript': 1.4.5
dev: true
@@ -2903,16 +2923,16 @@ packages:
/@codemirror/lang-json@6.0.1:
resolution: {integrity: sha512-+T1flHdgpqDDlJZ2Lkil/rLiRy684WMLc74xUnjJH48GQdfJo/pudlTRreZmKwzP8/tGdKf83wlbAdOCzlJOGQ==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@lezer/json': 1.0.1
dev: true
/@codemirror/lang-less@6.0.1(@codemirror/view@6.16.0):
/@codemirror/lang-less@6.0.1(@codemirror/view@6.34.1):
resolution: {integrity: sha512-ABcsKBjLbyPZwPR5gePpc8jEKCQrFF4pby2WlMVdmJOOr7OWwwyz8DZonPx/cKDE00hfoSLc8F7yAcn/d6+rTQ==}
dependencies:
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.16.0)
'@codemirror/language': 6.9.0
'@lezer/highlight': 1.1.6
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.34.1)
'@codemirror/language': 6.10.3
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
transitivePeerDependencies:
- '@codemirror/view'
@@ -2921,8 +2941,8 @@ packages:
/@codemirror/lang-lezer@6.0.1:
resolution: {integrity: sha512-WHwjI7OqKFBEfkunohweqA5B/jIlxaZso6Nl3weVckz8EafYbPZldQEKSDb4QQ9H9BUkle4PVELP4sftKoA0uQ==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@lezer/common': 1.0.4
'@lezer/lezer': 1.1.2
dev: true
@@ -2930,11 +2950,11 @@ packages:
/@codemirror/lang-markdown@6.2.0:
resolution: {integrity: sha512-deKegEQVzfBAcLPqsJEa+IxotqPVwWZi90UOEvQbfa01NTAw8jNinrykuYPTULGUj+gha0ZG2HBsn4s5d64Qrg==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.0.4)
'@codemirror/lang-html': 6.4.5
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.0.4
'@lezer/markdown': 1.1.0
dev: true
@@ -2943,17 +2963,17 @@ packages:
resolution: {integrity: sha512-ublojMdw/PNWa7qdN5TMsjmqkNuTBD3k6ndZ4Z0S25SBAiweFGyY68AS3xNcIOlb6DDFDvKlinLQ40vSLqf8xA==}
dependencies:
'@codemirror/lang-html': 6.4.5
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@lezer/common': 1.0.4
'@lezer/php': 1.0.1
dev: true
/@codemirror/lang-python@6.1.3(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4):
/@codemirror/lang-python@6.1.3(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3):
resolution: {integrity: sha512-S9w2Jl74hFlD5nqtUMIaXAq9t5WlM0acCkyuQWUUSvZclk1sV+UfnpFiZzuZSG+hfEaOmxKR5UxY/Uxswn7EhQ==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/language': 6.9.0
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3
'@lezer/python': 1.1.8
transitivePeerDependencies:
- '@codemirror/state'
@@ -2964,29 +2984,29 @@ packages:
/@codemirror/lang-rust@6.0.1:
resolution: {integrity: sha512-344EMWFBzWArHWdZn/NcgkwMvZIWUR1GEBdwG8FEp++6o6vT6KL9V7vGs2ONsKxxFUPXKI0SPcWhyYyl2zPYxQ==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@lezer/rust': 1.0.1
dev: true
/@codemirror/lang-sass@6.0.2(@codemirror/view@6.16.0):
/@codemirror/lang-sass@6.0.2(@codemirror/view@6.34.1):
resolution: {integrity: sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==}
dependencies:
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.16.0)
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.34.1)
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@lezer/common': 1.0.4
'@lezer/sass': 1.0.3
transitivePeerDependencies:
- '@codemirror/view'
dev: true
/@codemirror/lang-sql@6.5.4(@codemirror/view@6.16.0)(@lezer/common@1.0.4):
/@codemirror/lang-sql@6.5.4(@codemirror/view@6.34.1)(@lezer/common@1.2.3):
resolution: {integrity: sha512-5Gq7fYtT/5HbNyIG7a8vYaqOYQU3JbgtBe3+derkrFUXRVcjkf8WVgz++PIbMFAQsOFMDdDR+uiNM8ZRRuXH+w==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@lezer/highlight': 1.1.6
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
transitivePeerDependencies:
- '@codemirror/view'
@@ -2998,53 +3018,53 @@ packages:
dependencies:
'@codemirror/lang-html': 6.4.5
'@codemirror/lang-javascript': 6.1.9
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@codemirror/lang-wast@6.0.1:
resolution: {integrity: sha512-sQLsqhRjl2MWG3rxZysX+2XAyed48KhLBHLgq9xcKxIJu3npH/G+BIXW5NM5mHeDUjG0jcGh9BcjP0NfMStuzA==}
dependencies:
'@codemirror/language': 6.9.0
'@lezer/highlight': 1.1.6
'@codemirror/language': 6.10.3
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@codemirror/lang-xml@6.0.2(@codemirror/view@6.16.0):
/@codemirror/lang-xml@6.0.2(@codemirror/view@6.34.1):
resolution: {integrity: sha512-JQYZjHL2LAfpiZI2/qZ/qzDuSqmGKMwyApYmEUUCTxLM4MWS7sATUEfIguZQr9Zjx/7gcdnewb039smF6nC2zw==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.0.4)
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@lezer/common': 1.0.4
'@lezer/xml': 1.0.2
transitivePeerDependencies:
- '@codemirror/view'
dev: true
/@codemirror/language-data@6.3.1(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4):
/@codemirror/language-data@6.3.1(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3):
resolution: {integrity: sha512-p6jhJmvhGe1TG1EGNhwH7nFWWFSTJ8NDKnB2fVx5g3t+PpO0+63R7GJNxjS0TmmH3cdMxZbzejsik+rlEh1EyQ==}
dependencies:
'@codemirror/lang-angular': 0.1.2
'@codemirror/lang-cpp': 6.0.2
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.16.0)
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.34.1)
'@codemirror/lang-html': 6.4.5
'@codemirror/lang-java': 6.0.1
'@codemirror/lang-javascript': 6.1.9
'@codemirror/lang-json': 6.0.1
'@codemirror/lang-less': 6.0.1(@codemirror/view@6.16.0)
'@codemirror/lang-less': 6.0.1(@codemirror/view@6.34.1)
'@codemirror/lang-markdown': 6.2.0
'@codemirror/lang-php': 6.0.1
'@codemirror/lang-python': 6.1.3(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/lang-python': 6.1.3(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-rust': 6.0.1
'@codemirror/lang-sass': 6.0.2(@codemirror/view@6.16.0)
'@codemirror/lang-sql': 6.5.4(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/lang-sass': 6.0.2(@codemirror/view@6.34.1)
'@codemirror/lang-sql': 6.5.4(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-vue': 0.1.2
'@codemirror/lang-wast': 6.0.1
'@codemirror/lang-xml': 6.0.2(@codemirror/view@6.16.0)
'@codemirror/language': 6.9.0
'@codemirror/lang-xml': 6.0.2(@codemirror/view@6.34.1)
'@codemirror/language': 6.10.3
'@codemirror/legacy-modes': 6.3.3
transitivePeerDependencies:
- '@codemirror/state'
@@ -3052,13 +3072,13 @@ packages:
- '@lezer/common'
dev: true
/@codemirror/language@6.9.0:
resolution: {integrity: sha512-nFu311/0ne/qGuGCL3oKuktBgzVOaxCHZPZv1tLSZkNjPYxxvkjSbzno3MlErG2tgw1Yw1yF8BxMCegeMXqpiw==}
/@codemirror/language@6.10.3:
resolution: {integrity: sha512-kDqEU5sCP55Oabl6E7m5N+vZRoc0iWqgDVhEKifcHzPzjqCegcO4amfrYVL9PmPZpl4G0yjkpTpUO/Ui8CzO8A==}
dependencies:
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.2.3
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
style-mod: 4.0.3
dev: true
@@ -3066,43 +3086,43 @@ packages:
/@codemirror/legacy-modes@6.3.3:
resolution: {integrity: sha512-X0Z48odJ0KIoh/HY8Ltz75/4tDYc9msQf1E/2trlxFaFFhgjpVHjZ/BCXe1Lk7s4Gd67LL/CeEEHNI+xHOiESg==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
dev: true
/@codemirror/lint@6.4.0:
resolution: {integrity: sha512-6VZ44Ysh/Zn07xrGkdtNfmHCbGSHZzFBdzWi0pbd7chAQ/iUcpLGX99NYRZTa7Ugqg4kEHCqiHhcZnH0gLIgSg==}
dependencies:
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
crelt: 1.0.6
dev: true
/@codemirror/search@6.5.1:
resolution: {integrity: sha512-4jupk4JwkeVbrN2pStY74q6OJEYqwosB4koA66nyLeVedadtX9MHI38j2vbYmnfDGurDApP3OZO46MrWalcjiQ==}
dependencies:
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
crelt: 1.0.6
dev: true
/@codemirror/state@6.2.1:
resolution: {integrity: sha512-RupHSZ8+OjNT38zU9fKH2sv+Dnlr8Eb8sl4NOnnqz95mCFTZUaiRP8Xv5MeeaG0px2b8Bnfe7YGwCV3nsBhbuw==}
/@codemirror/state@6.4.1:
resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==}
dev: true
/@codemirror/theme-one-dark@6.1.2:
resolution: {integrity: sha512-F+sH0X16j/qFLMAfbciKTxVOwkdAS336b7AXTKOZhy8BR3eH/RelsnLgLFINrpST63mmN2OuwUt0W2ndUgYwUA==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@lezer/highlight': 1.1.6
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/highlight': 1.2.1
dev: true
/@codemirror/view@6.16.0:
resolution: {integrity: sha512-1Z2HkvkC3KR/oEZVuW9Ivmp8TWLzGEd8T8TA04TTwPvqogfkHBdYSlflytDOqmkUxM2d1ywTg7X2dU5mC+SXvg==}
/@codemirror/view@6.34.1:
resolution: {integrity: sha512-t1zK/l9UiRqwUNPm+pdIT0qzJlzuVckbTEMVNFhfWkGiBQClstzg+78vedCvLSX0xJEZ6lwZbPpnljL7L6iwMQ==}
dependencies:
'@codemirror/state': 6.2.1
style-mod: 4.0.3
'@codemirror/state': 6.4.1
style-mod: 4.1.2
w3c-keyname: 2.2.8
dev: true
@@ -3911,22 +3931,26 @@ packages:
resolution: {integrity: sha512-lZHlk8p67x4aIDtJl6UQrXSOP6oi7dQR3W/geFVrENdA1JDaAJWldnVqVjPMJupbTKbzDfFcePfKttqVidS/dg==}
dev: true
/@lezer/common@1.2.3:
resolution: {integrity: sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==}
dev: true
/@lezer/cpp@1.1.1:
resolution: {integrity: sha512-eS1M3L3U2mDowoFVPG7tEp01SWu9/68Nx3HEBgLJVn3N9ku7g5S7WdFv0jzmcTipAyONYfZJ+7x4WRkfdB2Ung==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/css@1.1.3:
resolution: {integrity: sha512-SjSM4pkQnQdJDVc80LYzEaMiNy9txsFbI7HsMgeVF28NdLaAdHNtQ+kB/QqDUzRBV/75NTXjJ/R5IdC8QQGxMg==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/highlight@1.1.6:
resolution: {integrity: sha512-cmSJYa2us+r3SePpRCjN5ymCqCPv+zyXmDl0ciWtVaNiORT/MxM7ZgOMQZADD0o51qOaOg24qc/zBViOIwAjJg==}
/@lezer/highlight@1.2.1:
resolution: {integrity: sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA==}
dependencies:
'@lezer/common': 1.0.4
dev: true
@@ -3935,83 +3959,83 @@ packages:
resolution: {integrity: sha512-Kk9HJARZTc0bAnMQUqbtuhFVsB4AnteR2BFUWfZV7L/x1H0aAKz6YabrfJ2gk/BEgjh9L3hg5O4y2IDZRBdzuQ==}
dependencies:
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/java@1.0.4:
resolution: {integrity: sha512-POc53LHf2AuNeRXjqZbXNu88GKj0KZTjjSx0L7tYeXlrEHF+3NAQx+dEwKVuCbkl0ZMtpRy2VsDYOV7KKV0oyg==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/javascript@1.4.5:
resolution: {integrity: sha512-FmBUHz8K1V22DgjTd6SrIG9owbzOYZ1t3rY6vGEmw+e2RVBd7sqjM8uXEVRFmfxKFn1Mx2ABJehHjrN3G2ZpmA==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/json@1.0.1:
resolution: {integrity: sha512-nkVC27qiEZEjySbi6gQRuMwa2sDu2PtfjSgz0A4QF81QyRGm3kb2YRzLcOPcTEtmcwvrX/cej7mlhbwViA4WJw==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/lezer@1.1.2:
resolution: {integrity: sha512-O8yw3CxPhzYHB1hvwbdozjnAslhhR8A5BH7vfEMof0xk3p+/DFDfZkA9Tde6J+88WgtwaHy4Sy6ThZSkaI0Evw==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/lr@1.3.10:
resolution: {integrity: sha512-BZfVvf7Re5BIwJHlZXbJn9L8lus5EonxQghyn+ih8Wl36XMFBPTXC0KM0IdUtj9w/diPHsKlXVgL+AlX2jYJ0Q==}
dependencies:
'@lezer/common': 1.0.4
'@lezer/common': 1.2.3
dev: true
/@lezer/markdown@1.1.0:
resolution: {integrity: sha512-JYOI6Lkqbl83semCANkO3CKbKc0pONwinyagBufWBm+k4yhIcqfCF8B8fpEpvJLmIy7CAfwiq7dQ/PzUZA340g==}
dependencies:
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
dev: true
/@lezer/php@1.0.1:
resolution: {integrity: sha512-aqdCQJOXJ66De22vzdwnuC502hIaG9EnPK2rSi+ebXyUd+j7GAX1mRjWZOVOmf3GST1YUfUCu6WXDiEgDGOVwA==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/python@1.1.8:
resolution: {integrity: sha512-1T/XsmeF57ijrjpC0Zmrf9YeO5mn2zC1XeSNrOnc0KB+6PgxJ5m7kWKt0CnwyS74oHQXbJxUUL+QDQJR26c1Gw==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/rust@1.0.1:
resolution: {integrity: sha512-j+ToFKM6Wpglv3OQ4ebHYdYIMT2dh0ziCCV0rTf47AWiHOVhR0WjaKrBq+yuvDQNEhr5sxPxVI7+naJIgpqcsQ==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/sass@1.0.3:
resolution: {integrity: sha512-n4l2nVOB7gWiGU/Cg2IVxpt2Ic9Hgfgy/7gk+p/XJibAsPXs0lSbsfGwQgwsAw9B/euYo3oS6lEFr9WytoqcZg==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@lezer/xml@1.0.2:
resolution: {integrity: sha512-dlngsWceOtQBMuBPw5wtHpaxdPJ71aVntqjbpGkFtWsp4WtQmCnuTjQGocviymydN6M18fhj6UQX3oiEtSuY7w==}
dependencies:
'@lezer/highlight': 1.1.6
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
@@ -4100,7 +4124,7 @@ packages:
/@nextjournal/lang-clojure@1.0.0:
resolution: {integrity: sha512-gOCV71XrYD0DhwGoPMWZmZ0r92/lIHsqQu9QWdpZYYBwiChNwMO4sbVMP7eTuAqffFB2BTtCSC+1skSH9d3bNg==}
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@nextjournal/lezer-clojure': 1.0.0
dev: true
@@ -4706,7 +4730,7 @@ packages:
engines: {node: '>=14.0.0'}
dev: true
/@replit/codemirror-lang-csharp@6.1.0(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/lr@1.3.10):
/@replit/codemirror-lang-csharp@6.1.0(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/lr@1.3.10):
resolution: {integrity: sha512-Dtyk9WVrdPPgkgTp8MUX9HyXd87O7UZnFrE647gjHUZY8p0UN+z0m6dPfk6rJMsTTvMcl7YbDUykxfeqB6EQOQ==}
peerDependencies:
'@codemirror/autocomplete': ^6.0.0
@@ -4717,16 +4741,16 @@ packages:
'@lezer/highlight': ^1.0.0
'@lezer/lr': ^1.0.0
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.2.3
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@replit/codemirror-lang-nix@6.0.1(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/lr@1.3.10):
/@replit/codemirror-lang-nix@6.0.1(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/lr@1.3.10):
resolution: {integrity: sha512-lvzjoYn9nfJzBD5qdm3Ut6G3+Or2wEacYIDJ49h9+19WSChVnxv4ojf+rNmQ78ncuxIt/bfbMvDLMeMP0xze6g==}
peerDependencies:
'@codemirror/autocomplete': ^6.0.0
@@ -4737,24 +4761,24 @@ packages:
'@lezer/highlight': ^1.0.0
'@lezer/lr': ^1.0.0
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.2.3
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/@replit/codemirror-lang-solidity@6.0.1(@codemirror/language@6.9.0):
/@replit/codemirror-lang-solidity@6.0.1(@codemirror/language@6.10.3):
resolution: {integrity: sha512-kDnak0xZelGmvzJwKTpMTl6gYSfFq9hnxrkbLaMV0CARq/MFvDQJmcmYon/k8uZqXy6DfzewKDV8tx9kY2WUZg==}
peerDependencies:
'@codemirror/language': ^6.0.0
dependencies:
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
dev: true
/@replit/codemirror-lang-svelte@6.0.0(@codemirror/autocomplete@6.9.0)(@codemirror/lang-css@6.2.1)(@codemirror/lang-html@6.4.5)(@codemirror/lang-javascript@6.1.9)(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10):
/@replit/codemirror-lang-svelte@6.0.0(@codemirror/autocomplete@6.9.0)(@codemirror/lang-css@6.2.1)(@codemirror/lang-html@6.4.5)(@codemirror/lang-javascript@6.1.9)(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10):
resolution: {integrity: sha512-U2OqqgMM6jKelL0GNWbAmqlu1S078zZNoBqlJBW+retTc5M4Mha6/Y2cf4SVg6ddgloJvmcSpt4hHrVoM4ePRA==}
peerDependencies:
'@codemirror/autocomplete': ^6.0.0
@@ -4769,15 +4793,15 @@ packages:
'@lezer/javascript': ^1.2.0
'@lezer/lr': ^1.0.0
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.16.0)
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.34.1)
'@codemirror/lang-html': 6.4.5
'@codemirror/lang-javascript': 6.1.9
'@codemirror/language': 6.9.0
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@lezer/common': 1.0.4
'@lezer/highlight': 1.1.6
'@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
'@lezer/common': 1.2.3
'@lezer/highlight': 1.2.1
'@lezer/javascript': 1.4.5
'@lezer/lr': 1.3.10
dev: true
@@ -5816,7 +5840,7 @@ packages:
eslint-visitor-keys: 3.4.1
dev: true
/@uiw/codemirror-extensions-basic-setup@4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/commands@6.2.4)(@codemirror/language@6.9.0)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0):
/@uiw/codemirror-extensions-basic-setup@4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/commands@6.2.4)(@codemirror/language@6.10.3)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1):
resolution: {integrity: sha512-TQT6aF8brxZpFnk/K4fm/K/9k9eF3PMav/KKjHlYrGUT8BTNk/qL+ximLtIzvTUhmBFchjM1lrqSJdvpVom7/w==}
peerDependencies:
'@codemirror/autocomplete': '>=6.0.0'
@@ -5827,16 +5851,16 @@ packages:
'@codemirror/state': '>=6.0.0'
'@codemirror/view': '>=6.0.0'
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/commands': 6.2.4
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@codemirror/lint': 6.4.0
'@codemirror/search': 6.5.1
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
dev: true
/@uiw/codemirror-extensions-langs@4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/language-data@6.3.1)(@codemirror/language@6.9.0)(@codemirror/legacy-modes@6.3.3)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10):
/@uiw/codemirror-extensions-langs@4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/language-data@6.3.1)(@codemirror/language@6.10.3)(@codemirror/legacy-modes@6.3.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10):
resolution: {integrity: sha512-s1VT1rss0iyvrtRl7BZtC5H7U5uQtCKTaD8wxjQrgZz5un9wHVvy9twU97aJGQR0FwbKWqK8/1iiICRJTRCoZA==}
peerDependencies:
'@codemirror/language-data': '>=6.0.0'
@@ -5844,29 +5868,29 @@ packages:
dependencies:
'@codemirror/lang-angular': 0.1.2
'@codemirror/lang-cpp': 6.0.2
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.16.0)
'@codemirror/lang-css': 6.2.1(@codemirror/view@6.34.1)
'@codemirror/lang-html': 6.4.5
'@codemirror/lang-java': 6.0.1
'@codemirror/lang-javascript': 6.1.9
'@codemirror/lang-json': 6.0.1
'@codemirror/lang-less': 6.0.1(@codemirror/view@6.16.0)
'@codemirror/lang-less': 6.0.1(@codemirror/view@6.34.1)
'@codemirror/lang-lezer': 6.0.1
'@codemirror/lang-markdown': 6.2.0
'@codemirror/lang-php': 6.0.1
'@codemirror/lang-python': 6.1.3(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/lang-python': 6.1.3(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-rust': 6.0.1
'@codemirror/lang-sass': 6.0.2(@codemirror/view@6.16.0)
'@codemirror/lang-sql': 6.5.4(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/lang-sass': 6.0.2(@codemirror/view@6.34.1)
'@codemirror/lang-sql': 6.5.4(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-vue': 0.1.2
'@codemirror/lang-wast': 6.0.1
'@codemirror/lang-xml': 6.0.2(@codemirror/view@6.16.0)
'@codemirror/language-data': 6.3.1(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/lang-xml': 6.0.2(@codemirror/view@6.34.1)
'@codemirror/language-data': 6.3.1(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/legacy-modes': 6.3.3
'@nextjournal/lang-clojure': 1.0.0
'@replit/codemirror-lang-csharp': 6.1.0(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/lr@1.3.10)
'@replit/codemirror-lang-nix': 6.0.1(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/lr@1.3.10)
'@replit/codemirror-lang-solidity': 6.0.1(@codemirror/language@6.9.0)
'@replit/codemirror-lang-svelte': 6.0.0(@codemirror/autocomplete@6.9.0)(@codemirror/lang-css@6.2.1)(@codemirror/lang-html@6.4.5)(@codemirror/lang-javascript@6.1.9)(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)(@lezer/highlight@1.1.6)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10)
'@replit/codemirror-lang-csharp': 6.1.0(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/lr@1.3.10)
'@replit/codemirror-lang-nix': 6.0.1(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/lr@1.3.10)
'@replit/codemirror-lang-solidity': 6.0.1(@codemirror/language@6.10.3)
'@replit/codemirror-lang-svelte': 6.0.0(@codemirror/autocomplete@6.9.0)(@codemirror/lang-css@6.2.1)(@codemirror/lang-html@6.4.5)(@codemirror/lang-javascript@6.1.9)(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/javascript@1.4.5)(@lezer/lr@1.3.10)
codemirror-lang-mermaid: 0.2.2
transitivePeerDependencies:
- '@codemirror/autocomplete'
@@ -5879,7 +5903,7 @@ packages:
- '@lezer/lr'
dev: true
/@uiw/react-codemirror@4.21.9(@babel/runtime@7.23.1)(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.9.0)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.2.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.16.0)(codemirror@6.0.1)(react-dom@18.2.0)(react@18.2.0):
/@uiw/react-codemirror@4.21.9(@babel/runtime@7.23.1)(@codemirror/autocomplete@6.9.0)(@codemirror/language@6.10.3)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.1)(codemirror@6.0.1)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-aeLegPz2iCvqJjhzXp2WUMqpMZDqxsTnF3rX9kGRlfY6vQLsrjoctj0cQ29uxEtFYJChOVjtCOtnQUlyIuNAHQ==}
peerDependencies:
'@babel/runtime': '>=7.11.0'
@@ -5897,11 +5921,11 @@ packages:
dependencies:
'@babel/runtime': 7.23.1
'@codemirror/commands': 6.2.4
'@codemirror/state': 6.2.1
'@codemirror/state': 6.4.1
'@codemirror/theme-one-dark': 6.1.2
'@codemirror/view': 6.16.0
'@uiw/codemirror-extensions-basic-setup': 4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/commands@6.2.4)(@codemirror/language@6.9.0)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)
codemirror: 6.0.1(@lezer/common@1.0.4)
'@codemirror/view': 6.34.1
'@uiw/codemirror-extensions-basic-setup': 4.21.9(@codemirror/autocomplete@6.9.0)(@codemirror/commands@6.2.4)(@codemirror/language@6.10.3)(@codemirror/lint@6.4.0)(@codemirror/search@6.5.1)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)
codemirror: 6.0.1(@lezer/common@1.2.3)
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
transitivePeerDependencies:
@@ -7755,21 +7779,21 @@ packages:
/codemirror-lang-mermaid@0.2.2:
resolution: {integrity: sha512-AqSzkQgfWsjBbifio3dy/zDj6WXEw4g52Mq6bltIWLMWryWWRMpFwjQSlHtCGOol1FENYObUF5KI4ofiv8bjXA==}
dependencies:
'@codemirror/language': 6.9.0
'@lezer/highlight': 1.1.6
'@codemirror/language': 6.10.3
'@lezer/highlight': 1.2.1
'@lezer/lr': 1.3.10
dev: true
/codemirror@6.0.1(@lezer/common@1.0.4):
/codemirror@6.0.1(@lezer/common@1.2.3):
resolution: {integrity: sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==}
dependencies:
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.9.0)(@codemirror/state@6.2.1)(@codemirror/view@6.16.0)(@lezer/common@1.0.4)
'@codemirror/autocomplete': 6.9.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/commands': 6.2.4
'@codemirror/language': 6.9.0
'@codemirror/language': 6.10.3
'@codemirror/lint': 6.4.0
'@codemirror/search': 6.5.1
'@codemirror/state': 6.2.1
'@codemirror/view': 6.16.0
'@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1
transitivePeerDependencies:
- '@lezer/common'
dev: true
@@ -15670,6 +15694,10 @@ packages:
resolution: {integrity: sha512-78Jv8kYJdjbvRwwijtCevYADfsI0lGzYJe4mMFdceO8l75DFFDoqBhR1jVDicDRRaX4//g1u9wKeo+ztc2h1Rw==}
dev: true
/style-mod@4.1.2:
resolution: {integrity: sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==}
dev: true
/style-search@0.1.0:
resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==}
dev: true
+11 -1
View File
@@ -211,7 +211,17 @@ export FSKEY=""
export QMSG_KEY=""
export QMSG_TYPE=""
## 20. 自定义通知
## 20.Ntfy
## 官方文档: https://docs.ntfy.sh
## ntfy_url 填写ntfy地址,如https://ntfy.sh
## ntfy_topic 填写ntfy的消息应用topic
## ntfy_priority 填写推送消息优先级,默认为3
export NTFY_URL=""
export NTFY_TOPIC=""
export NTFY_PRIORITY="3"
## 21. 自定义通知
## 自定义通知 接收回调的URL
export WEBHOOK_URL=""
## WEBHOOK_BODY 和 WEBHOOK_HEADERS 多个参数时,直接换行或者使用 $'\n' 连接多行字符串,比如 export dd="line 1"$'\n'"line 2"
+53 -4
View File
@@ -95,6 +95,10 @@ const push_config = {
WEBHOOK_HEADERS: '', // 自定义通知 请求头
WEBHOOK_METHOD: '', // 自定义通知 请求方法
WEBHOOK_CONTENT_TYPE: '', // 自定义通知 content-type
NTFY_URL: '', // ntfy地址,如https://ntfy.sh,默认为https://ntfy.sh
NTFY_TOPIC: '', // ntfy的消息应用topic
NTFY_PRIORITY: '3', // 推送消息优先级,默认为3
};
for (const key in push_config) {
@@ -224,11 +228,13 @@ function serverNotify(text, desp) {
if (PUSH_KEY) {
// 微信server酱推送通知一个\n不会换行,需要两个\n才能换行,故做此替换
desp = desp.replace(/[\n\r]/g, '\n\n');
const matchResult = PUSH_KEY.match(/^sctp(\d+)t/i);
const options = {
url: PUSH_KEY.includes('SCT')
? `https://sctapi.ftqq.com/${PUSH_KEY}.send`
: `https://sc.ftqq.com/${PUSH_KEY}.send`,
body: `text=${text}&desp=${desp}`,
url: matchResult && matchResult[1]
? `https://${matchResult[1]}.push.ft07.com/send/${PUSH_KEY}.send`
: `https://sctapi.ftqq.com/${PUSH_KEY}.send`,
body: `text=${encodeURIComponent(text)}&desp=${encodeURIComponent(desp)}`,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
@@ -1188,6 +1194,48 @@ function webhookNotify(text, desp) {
});
}
function ntfyNotify(text, desp) {
function encodeRFC2047(text) {
const encodedBase64 = Buffer.from(text).toString('base64');
return `=?utf-8?B?${encodedBase64}?=`;
}
return new Promise((resolve) => {
const { NTFY_URL, NTFY_TOPIC, NTFY_PRIORITY } = push_config;
if (NTFY_TOPIC) {
const options = {
url: `${NTFY_URL || 'https://ntfy.sh'}/${NTFY_TOPIC}`,
body: `${desp}`,
headers: {
'Title': `${encodeRFC2047(text)}`,
'Priority': NTFY_PRIORITY || '3'
},
timeout,
};
$.post(options, (err, resp, data) => {
try {
if (err) {
console.log('Ntfy 通知调用API失败😞\n', err);
} else {
if (data.id) {
console.log('Ntfy 发送通知消息成功🎉\n');
} else {
console.log(`Ntfy 发送通知消息异常 ${JSON.stringify(data)}`);
}
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve(data);
}
});
} else {
resolve();
}
});
}
function parseString(input, valueFormatFn) {
const regex = /(\w+):\s*((?:(?!\n\w+:).)*)/g;
const matches = {};
@@ -1316,6 +1364,7 @@ async function sendNotify(text, desp, params = {}) {
chronocatNotify(text, desp), // Chronocat
webhookNotify(text, desp), // 自定义通知
qmsgNotify(text, desp), // 自定义通知
ntfyNotify(text, desp), // Ntfy
]);
}
+51 -6
View File
@@ -116,7 +116,11 @@ push_config = {
'WEBHOOK_BODY': '', # 自定义通知 请求体
'WEBHOOK_HEADERS': '', # 自定义通知 请求头
'WEBHOOK_METHOD': '', # 自定义通知 请求方法
'WEBHOOK_CONTENT_TYPE': '' # 自定义通知 content-type
'WEBHOOK_CONTENT_TYPE': '', # 自定义通知 content-type
'NTFY_URL': '', # ntfy地址,如https://ntfy.sh
'NTFY_TOPIC': '', # ntfy的消息应用topic
'NTFY_PRIORITY':'3', # 推送消息优先级,默认为3
}
# fmt: on
@@ -298,10 +302,14 @@ def serverJ(title: str, content: str) -> None:
print("serverJ 服务启动")
data = {"text": title, "desp": content.replace("\n", "\n\n")}
if push_config.get("PUSH_KEY").find("SCT") != -1:
url = f'https://sctapi.ftqq.com/{push_config.get("PUSH_KEY")}.send'
match = re.match(r'sctp(\d+)t', push_config.get("PUSH_KEY"))
if match:
num = match.group(1)
url = f'https://{num}.push.ft07.com/send/{push_config.get("PUSH_KEY")}.send'
else:
url = f'https://sc.ftqq.com/{push_config.get("PUSH_KEY")}.send'
url = f'https://sctapi.ftqq.com/{push_config.get("PUSH_KEY")}.send'
response = requests.post(url, data=data).json()
if response.get("errno") == 0 or response.get("code") == 0:
@@ -777,6 +785,42 @@ def chronocat(title: str, content: str) -> None:
print(f"QQ群消息:{ids}推送失败!")
def ntfy(title: str, content: str) -> None:
"""
通过 Ntfy 推送消息
"""
def encode_rfc2047(text: str) -> str:
"""将文本编码为符合 RFC 2047 标准的格式"""
encoded_bytes = base64.b64encode(text.encode('utf-8'))
encoded_str = encoded_bytes.decode('utf-8')
return f'=?utf-8?B?{encoded_str}?='
if not push_config.get("NTFY_TOPIC"):
print("ntfy 服务的 NTFY_TOPIC 未设置!!\n取消推送")
return
print("ntfy 服务启动")
priority = '3'
if not push_config.get("NTFY_PRIORITY"):
print("ntfy 服务的NTFY_PRIORITY 未设置!!默认设置为3")
else:
priority = push_config.get("NTFY_PRIORITY")
# 使用 RFC 2047 编码 title
encoded_title = encode_rfc2047(title)
data = content.encode(encoding='utf-8')
headers = {
"Title": encoded_title, # 使用编码后的 title
"Priority": priority
}
url = push_config.get("NTFY_URL") + "/" + push_config.get("NTFY_TOPIC")
response = requests.post(url, data=data, headers=headers)
if response.status_code == 200: # 使用 response.status_code 进行检查
print("Ntfy 推送成功!")
else:
print("Ntfy 推送失败!错误信息:", response.text)
def parse_headers(headers):
if not headers:
return {}
@@ -937,7 +981,8 @@ def add_notify_function():
notify_function.append(chronocat)
if push_config.get("WEBHOOK_URL") and push_config.get("WEBHOOK_METHOD"):
notify_function.append(custom_notify)
if push_config.get("NTFY_TOPIC"):
notify_function.append(ntfy)
if not notify_function:
print(f"无推送渠道,请检查通知变量是否正确")
return notify_function
@@ -979,4 +1024,4 @@ def main():
if __name__ == "__main__":
main()
main()
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -125,7 +125,8 @@ run_concurrent() {
fi
handle_env_split
single_log_time=$(date "+%Y-%m-%d-%H-%M-%S.%3N")
time=$(date "+$mtime_format")
single_log_time=$(format_log_time "$mtime_format" "$time")
cd $dir_scripts
local relative_path="${file_param%/*}"
+3 -3
View File
@@ -29,7 +29,7 @@ function run() {
file_task_before_js,
dir_scripts,
task_before,
PREV_NODE_OPTIONS
PREV_NODE_OPTIONS,
} = process.env;
try {
@@ -62,10 +62,10 @@ function run() {
}
} catch (error) {
if (!error.message.includes('spawnSync /bin/sh E2BIG')) {
console.log(` run task before error: `, error);
console.log(`\ue926 run task before error: `, error);
} else {
console.log(
` The environment variable is too large. It is recommended to use task_before.js instead of task_before.sh\n`,
`\ue926 The environment variable is too large. It is recommended to use task_before.js instead of task_before.sh\n`,
);
}
if (task_before) {
+2 -2
View File
@@ -72,10 +72,10 @@ def run():
except OSError as error:
error_message = str(error)
if "Argument list too long" not in error_message:
print(f" run task before error: {error}")
print(f"\ue926 run task before error: {error}")
else:
print(
" The environment variable is too large. It is recommended to use task_before.py instead of task_before.sh\n"
"\ue926 The environment variable is too large. It is recommended to use task_before.py instead of task_before.sh\n"
)
if task_before:
print("执行前置命令结束")
+3 -3
View File
@@ -340,7 +340,7 @@ format_log_time() {
local time="$2"
if [[ $is_macos -eq 1 ]]; then
echo $(date -j -f "$format" "$time" "+%Y-%m-%d-%H-%M-%S-%3N")
echo $(python3 -c 'from datetime import datetime; print(datetime.now().strftime("%Y-%m-%d-%H-%M-%S-%f")[:-3])')
else
echo $(date -d "$time" "+%Y-%m-%d-%H-%M-%S-%3N")
fi
@@ -453,7 +453,7 @@ run_task_before() {
if [[ ${task_before:=} ]]; then
echo -e "执行前置命令\n"
eval "${task_before%;}" "$@"
eval "${task_before%;}"
echo -e "\n执行前置命令结束\n"
fi
}
@@ -463,7 +463,7 @@ run_task_after() {
if [[ ${task_after:=} ]]; then
echo -e "\n执行后置命令\n"
eval "${task_after%;}" "$@"
eval "${task_after%;}"
echo -e "\n执行后置命令结束"
fi
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16
View File
@@ -8,6 +8,13 @@
url('../assets/fonts/SourceCodePro-Regular.ttf') format('truetype');
}
@font-face {
font-family: Log;
src: url('../assets/fonts/log.woff2') format('woff2'),
url('../assets/fonts/log.woff') format('woff'),
url('../assets/fonts/log.ttf') format('truetype');
}
body {
// 禁止手机页面下拉刷新
overflow: hidden;
@@ -52,6 +59,11 @@ body {
width: 100%;
padding: 24px;
overflow-y: auto;
code,
span {
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo,
Courier, monospace, Log;
}
}
}
@@ -63,6 +75,10 @@ body {
}
}
.ͼ1 .cm-scroller {
font-family: monospace, Log;
}
.monaco-editor:not(.rename-box) {
height: calc(100vh - 128px) !important;
height: calc(100vh - var(--vh-offset, 0px) - 128px) !important;
+2
View File
@@ -388,6 +388,8 @@
"SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定": "The SMTP login password may also be a special passphrase, depending on the specific email service provider's instructions",
"PushMe的Keyhttps://push.i-i.me/": "PushMe key, https://push.i-i.me/",
"自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口": "The self built PushMeServer message interface address, for example: http://127.0.0.1:3010 If left blank, use the official message interface",
"ntfy的url地址,例如 https://ntfy.sh'": "The URL address of ntfy, for example, https://ntfy.sh.",
"ntfy的消息应用topic": "The topic for ntfy's messaging application.",
"请求方法": "Request Method",
"请求头Content-Type": "Request Header Content-Type",
"请求链接以http或者https开头。url或者body中必须包含$title$content可选,对应api内容的位置": "Request URL should start with http or https. URL or body must contain $title, $content is optional and corresponds to the API content position.",
+2
View File
@@ -388,6 +388,8 @@
"SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定": "SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定",
"PushMe的Keyhttps://push.i-i.me/": "PushMe的Keyhttps://push.i-i.me/",
"自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口": "自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口",
"ntfy的url地址,例如 https://ntfy.sh": "ntfy的url地址,例如 https://ntfy.sh",
"ntfy的消息应用topic": "ntfy的消息应用topic",
"请求方法": "请求方法",
"请求头Content-Type": "请求头Content-Type",
"请求链接以http或者https开头。url或者body中必须包含$title$content可选,对应api内容的位置": "请求链接以http或者https开头。url或者body中必须包含$title$content可选,对应api内容的位置",
+10 -4
View File
@@ -36,6 +36,7 @@ import {
PlusOutlined,
UnorderedListOutlined,
CheckOutlined,
CopyOutlined,
} from '@ant-design/icons';
import config from '@/utils/config';
import { PageContainer } from '@ant-design/pro-layout';
@@ -57,10 +58,11 @@ import { useVT } from 'virtualizedtableforantd4';
import { ICrontab, OperationName, OperationPath, CrontabStatus } from './type';
import Name from '@/components/name';
import dayjs from 'dayjs';
import { noop } from 'lodash';
import { noop, omit } from 'lodash';
const { Text, Paragraph, Link } = Typography;
const { Search } = Input;
const SHOW_TAB_COUNT = 10;
const Crontab = () => {
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
@@ -620,6 +622,7 @@ const Crontab = () => {
icon:
record.isDisabled === 1 ? <CheckCircleOutlined /> : <StopOutlined />,
},
{ label: intl.get('复制'), key: 'copy', icon: <CopyOutlined /> },
{ label: intl.get('删除'), key: 'delete', icon: <DeleteOutlined /> },
{
label: record.isPinned === 1 ? intl.get('取消置顶') : intl.get('置顶'),
@@ -655,6 +658,9 @@ const Crontab = () => {
case 'edit':
editCron(record, index);
break;
case 'copy':
editCron(omit(record, 'id'), index);
break;
case 'enableOrDisable':
enabledOrDisabledCron(record, index);
break;
@@ -800,7 +806,7 @@ const Crontab = () => {
useEffect(() => {
if (viewConf && enabledCronViews && enabledCronViews.length > 0) {
const view = enabledCronViews.slice(4).find((x) => x.id === viewConf.id);
const view = enabledCronViews.slice(SHOW_TAB_COUNT).find((x) => x.id === viewConf.id);
setMoreMenuActive(!!view);
}
}, [viewConf, enabledCronViews]);
@@ -830,7 +836,7 @@ const Crontab = () => {
viewAction(key);
},
items: [
...[...enabledCronViews].slice(4).map((x) => ({
...[...enabledCronViews].slice(SHOW_TAB_COUNT).map((x) => ({
label: (
<Space style={{ display: 'flex', justifyContent: 'space-between' }}>
<span>{x.name}</span>
@@ -950,7 +956,7 @@ const Crontab = () => {
}
onTabClick={tabClick}
items={[
...[...enabledCronViews].slice(0, 4).map((x) => ({
...[...enabledCronViews].slice(0, SHOW_TAB_COUNT).map((x) => ({
key: x.id,
label: x.name,
})),
+4 -4
View File
@@ -21,9 +21,9 @@ const CronModal = ({
const handleOk = async (values: any) => {
setLoading(true);
const method = cron ? 'put' : 'post';
const method = cron?.id ? 'put' : 'post';
const payload = { ...values };
if (cron) {
if (cron?.id) {
payload.id = cron.id;
}
try {
@@ -34,7 +34,7 @@ const CronModal = ({
if (code === 200) {
message.success(
cron ? intl.get('更新任务成功') : intl.get('创建任务成功'),
cron?.id ? intl.get('更新任务成功') : intl.get('创建任务成功'),
);
handleCancel(data);
}
@@ -50,7 +50,7 @@ const CronModal = ({
return (
<Modal
title={cron ? intl.get('编辑任务') : intl.get('创建任务')}
title={cron?.id ? intl.get('编辑任务') : intl.get('创建任务')}
open={visible}
forceRender
centered
+16 -1
View File
@@ -1,3 +1,4 @@
import intl from 'react-intl-universal';
import React, { useRef, useState } from 'react';
import CodeMirror from '@uiw/react-codemirror';
import { Button, DatePicker, Empty, message, Spin } from 'antd';
@@ -9,6 +10,13 @@ import { request } from '@/utils/http';
import config from '@/utils/config';
import { useRequest } from 'ahooks';
import moment from 'moment';
import {
systemLogDebugHighlightPlugin,
systemLogErrorHighlightPlugin,
systemLogInfoHighlightPlugin,
systemLogTheme,
systemLogWarnHighlightPlugin,
} from '@/utils/codemirror/systemLog';
const { RangePicker } = DatePicker;
@@ -83,7 +91,7 @@ const SystemLog = ({ height, theme }: any) => {
deleteLog();
}}
>
{intl.get('清空日志')}
</Button>
</div>
{systemLogData ? (
@@ -94,6 +102,13 @@ const SystemLog = ({ height, theme }: any) => {
onCreateEditor={(view) => {
editorRef.current = view;
}}
extensions={[
systemLogDebugHighlightPlugin,
systemLogErrorHighlightPlugin,
systemLogInfoHighlightPlugin,
systemLogWarnHighlightPlugin,
systemLogTheme,
]}
readOnly={true}
theme={theme.includes('dark') ? 'dark' : 'light'}
/>
+174
View File
@@ -0,0 +1,174 @@
import {
Decoration,
EditorView,
ViewPlugin,
ViewUpdate,
} from '@codemirror/view';
import { RangeSet, RangeSetBuilder } from '@codemirror/state';
const infoWord = /\[\ue6f5info\]/g;
const debugWord = /\[\ue67fdebug\]/g;
const warnWord = /\[\ue880warn\]/g;
const errorWord = /\[\ue602error\]/g;
const customWordClassMap = {
info: 'system-log-info',
warn: 'system-warn-info',
error: 'system-error-info',
debug: 'system-debug-info',
};
export const systemLogInfoHighlightPlugin = ViewPlugin.fromClass(
class {
decorations: RangeSet<Decoration>;
constructor(view: EditorView) {
this.decorations = this.getDecorations(view);
}
update(update: ViewUpdate) {
if (update.docChanged) {
this.decorations = this.getDecorations(update.view);
}
}
getDecorations(view: EditorView) {
const builder = new RangeSetBuilder<Decoration>();
const doc = view.state.doc.toString();
let match;
while ((match = infoWord.exec(doc)) !== null) {
const deco = Decoration.mark({
class: customWordClassMap.info,
});
builder.add(match.index, match.index + match[0].length, deco);
}
return builder.finish();
}
},
{
decorations: (v) => v.decorations,
},
);
export const systemLogWarnHighlightPlugin = ViewPlugin.fromClass(
class {
decorations: RangeSet<Decoration>;
constructor(view: EditorView) {
this.decorations = this.getDecorations(view);
}
update(update: ViewUpdate) {
if (update.docChanged) {
this.decorations = this.getDecorations(update.view);
}
}
getDecorations(view: EditorView) {
const builder = new RangeSetBuilder<Decoration>();
const doc = view.state.doc.toString();
let match;
while ((match = warnWord.exec(doc)) !== null) {
const deco = Decoration.mark({
class: customWordClassMap.warn,
});
builder.add(match.index, match.index + match[0].length, deco);
}
return builder.finish();
}
},
{
decorations: (v) => v.decorations,
},
);
export const systemLogDebugHighlightPlugin = ViewPlugin.fromClass(
class {
decorations: RangeSet<Decoration>;
constructor(view: EditorView) {
this.decorations = this.getDecorations(view);
}
update(update: ViewUpdate) {
if (update.docChanged) {
this.decorations = this.getDecorations(update.view);
}
}
getDecorations(view: EditorView) {
const builder = new RangeSetBuilder<Decoration>();
const doc = view.state.doc.toString();
let match;
while ((match = debugWord.exec(doc)) !== null) {
const deco = Decoration.mark({
class: customWordClassMap.debug,
});
builder.add(match.index, match.index + match[0].length, deco);
}
return builder.finish();
}
},
{
decorations: (v) => v.decorations,
},
);
export const systemLogErrorHighlightPlugin = ViewPlugin.fromClass(
class {
decorations: RangeSet<Decoration>;
constructor(view: EditorView) {
this.decorations = this.getDecorations(view);
}
update(update: ViewUpdate) {
if (update.docChanged) {
this.decorations = this.getDecorations(update.view);
}
}
getDecorations(view: EditorView) {
const builder = new RangeSetBuilder<Decoration>();
const doc = view.state.doc.toString();
let match;
while ((match = errorWord.exec(doc)) !== null) {
const deco = Decoration.mark({
class: customWordClassMap.error,
});
builder.add(match.index, match.index + match[0].length, deco);
}
return builder.finish();
}
},
{
decorations: (v) => v.decorations,
},
);
export const systemLogTheme = EditorView.baseTheme({
'.system-log-info': {
color: '#2196F3',
},
'.system-warn-info': {
color: '#FFB827',
},
'.system-error-info': {
color: '#FA5151',
},
'.system-debug-info': {
color: '#009A29',
},
});
+14
View File
@@ -84,6 +84,7 @@ export default {
},
notificationModes: [
{ value: 'gotify', label: 'Gotify' },
{ value: 'ntfy', label: 'Ntfy' },
{ value: 'goCqHttpBot', label: 'GoCqHttpBot' },
{ value: 'serverChan', label: intl.get('Server酱') },
{ value: 'pushDeer', label: 'PushDeer' },
@@ -118,6 +119,19 @@ export default {
},
{ label: 'gotifyPriority', tip: intl.get('推送消息的优先级') },
],
ntfy: [
{
label: 'ntfyUrl',
tip: intl.get('ntfy的url地址,例如 https://ntfy.sh'),
required: true,
},
{
label: 'ntfyTopic',
tip: intl.get('ntfy的消息应用topic'),
required: true,
},
{ label: 'ntfyPriority', tip: intl.get('推送消息的优先级') },
],
chat: [
{
label: 'chatUrl',
+9 -6
View File
@@ -1,8 +1,11 @@
version: 2.17.11
version: 2.17.12
changeLogLink: https://t.me/jiao_long/422
publishTime: 2024-09-13 23:00
publishTime: 2024-10-26 15:30
changeLog: |
1. 修复无法获取设置的环境变量 PYTHONPATH 和 NODE_OPTIONS
2. 修复定时任务视图过多时,无法看到视图管理
3. 修复自定义通知 json 解析
4. 修复可能产生目录遍历攻击 API
1. 定时任务支持复制
2. 增加 ntfy 通知
3. 适配Server酱APP分支(Server酱³),移除已废弃的旧版api入口
4. 修复任务命令带有 -m 参数时,日志目录生成异常
5. 修复登录日志无法自动保存
6. 移除任务执行前后的脚本参数
7. 定时任务外漏视图改为 10 个