fix: 移除不再使用的依赖项 '@kevisual/hot-api' 和 '@nut-tree-fork/nut-js'

This commit is contained in:
2025-12-17 21:33:06 +08:00
parent 73d98a1209
commit 22de8cad52
4 changed files with 23 additions and 31 deletions

View File

@@ -75,8 +75,6 @@
"access": "public"
},
"dependencies": {
"@kevisual/hot-api": "^0.0.3",
"@nut-tree-fork/nut-js": "^4.2.6",
"eventemitter3": "^5.0.1",
"lowdb": "^7.0.1",
"lru-cache": "^11.2.4",

View File

@@ -1,19 +1,19 @@
import { app } from '@/app.ts';
import { Hotkeys } from '@kevisual/hot-api';
import { useContextKey } from '@kevisual/context';
app.route({
path: 'key-sender',
// middleware: ['admin-auth']
}).define(async (ctx) => {
let keys = ctx.query.keys;
if (keys.includes(' ')) {
keys = keys.replace(/\s+/g, '+');
}
const hotKeys: Hotkeys = useContextKey('hotkeys', () => new Hotkeys());
if (typeof keys === 'string') {
await hotKeys.pressHotkey({
hotkey: keys,
});
}
ctx.body = 'ok';
}).addTo(app);
// import { Hotkeys } from '@kevisual/hot-api';
// import { useContextKey } from '@kevisual/context';
// app.route({
// path: 'key-sender',
// // middleware: ['admin-auth']
// }).define(async (ctx) => {
// let keys = ctx.query.keys;
// if (keys.includes(' ')) {
// keys = keys.replace(/\s+/g, '+');
// }
// const hotKeys: Hotkeys = useContextKey('hotkeys', () => new Hotkeys());
// if (typeof keys === 'string') {
// await hotKeys.pressHotkey({
// hotkey: keys,
// });
// }
// ctx.body = 'ok';
// }).addTo(app);