diff --git a/.eslintrc b/.eslintrc index a68adee3..64eaa1eb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,7 +5,8 @@ }, "extends": [ "airbnb-base", - "prettier" + "prettier", + "typescript" ], "parser": "@typescript-eslint/parser", "plugins": [ diff --git a/TODO.md b/TODO.md index 124d486d..24ac38a7 100644 --- a/TODO.md +++ b/TODO.md @@ -2,19 +2,19 @@ ## Packages -- [x] @kotori-bot/webui -- [x] @kotori-bot/kotori-plugin-webui -- [x] @kotori-bot/kotori-plugin-adapter-sandbox -- [x] @kotori-bot/kotori-plugin-adapter-mail -- [x] @kotori-bot/kotori-plugin-adapter-telegram -- [x] kotori-plugin-adapter-minecraft -- [x] kotori-plugin-requester -- [x] kotori-plugin-grouper -- [x] kotori-plugin-manger -- [x] @kotori-bot/kotori-plugin-alias -- [x] create-kotori +- [] @kotori-bot/webui +- [] @kotori-bot/kotori-plugin-webui +- [] @kotori-bot/kotori-plugin-adapter-sandbox +- [] @kotori-bot/kotori-plugin-adapter-mail +- [] @kotori-bot/kotori-plugin-adapter-telegram +- [] kotori-plugin-adapter-minecraft +- [] kotori-plugin-requester +- [] kotori-plugin-grouper +- [] kotori-plugin-manger +- [] @kotori-bot/kotori-plugin-alias +- [] create-kotori ## Features -- [x] ctx.filter() -- [x] message.schedule() +- [] ctx.filter() +- [] message.schedule() diff --git a/kotori.db b/kotori.db index a3a96425..15c737cc 100644 Binary files a/kotori.db and b/kotori.db differ diff --git a/modules/status/src/index.ts b/modules/status/src/index.ts index f366a4d4..63698fc5 100644 --- a/modules/status/src/index.ts +++ b/modules/status/src/index.ts @@ -3,7 +3,7 @@ * @Blog: https://hotaru.icu * @Date: 2023-07-11 14:18:27 * @LastEditors: Hotaru biyuehuya@gmail.com - * @LastEditTime: 2024-02-11 20:20:33 + * @LastEditTime: 2024-02-15 17:21:28 */ import { Context, Tsu } from 'kotori-bot'; import os from 'os'; @@ -49,7 +49,7 @@ function dealRam() { function dealCpu() { const cpuData = os.cpus(); - let rate: number = 0; + let rate = 0; const ratearr: number[] = []; cpuData.forEach((key) => { const { times } = key; diff --git a/modules/webui/README.md b/modules/webui/README.md new file mode 100644 index 00000000..5d0d9313 --- /dev/null +++ b/modules/webui/README.md @@ -0,0 +1,19 @@ +# kotori-bot-admin-server + +This is a website management system specifically designed for the kotori-bot project +Web repository: [https://github.com/BIYUEHU/kotori-bot-admin-web](https://github.com/BIYUEHU/kotori-bot-admin-web) + +**Version:** 1.1.0 +**Author:** hotaru +**License:** GPL-3.0 + +## List of command + +- /login - Get Kotori-Amdin login url^^ + +## Lang Support + +- ja_JP +- en_US +- zh_TW +- zh_CN diff --git a/modules/webui/locales/en_US.json b/modules/webui/locales/en_US.json new file mode 100644 index 00000000..11cf99f1 --- /dev/null +++ b/modules/webui/locales/en_US.json @@ -0,0 +1,4 @@ +{ + "kotori_bot_admin_server.help.login": "Get Kotori-Amdin login url", + "kotori_bot_admin_server.msg.login.info": "Here are your login url:\nhttp://127.0.0.1:%port%%path%\n%face_address%:%port%%path%\nLogin url will expire after[%expire_time%Second], dont give others" +} diff --git a/modules/webui/locales/ja_JP.json b/modules/webui/locales/ja_JP.json new file mode 100644 index 00000000..59263e69 --- /dev/null +++ b/modules/webui/locales/ja_JP.json @@ -0,0 +1,4 @@ +{ + "kotori_bot_admin_server.help.login": "Kotori-Amdinログインアドレスの取得", + "kotori_bot_admin_server.msg.login.info": "これがあなたのログイン先です:\nhttp://127.0.0.1:%port%%path%\n%face_address%:%port%%path%\nログインアドレスは[%expire_time%秒]後に期限切れになりますので、他人に漏らさないでください" +} diff --git a/modules/webui/locales/zh_CN.json b/modules/webui/locales/zh_CN.json new file mode 100644 index 00000000..0334b5cd --- /dev/null +++ b/modules/webui/locales/zh_CN.json @@ -0,0 +1,4 @@ +{ + "kotori_bot_admin_server.help.login": "获取Kotori-Amdin后台一键登录地址", + "kotori_bot_admin_server.msg.login.info": "以下是您的BOT后台管理的一键登录地址:\nhttp://127.0.0.1:%port%%path%\n%face_address%:%port%%path%\n登录地址将在[%expire_time%秒]后过期,请勿泄露给他人" +} diff --git a/modules/webui/locales/zh_TW.json b/modules/webui/locales/zh_TW.json new file mode 100644 index 00000000..f93770ea --- /dev/null +++ b/modules/webui/locales/zh_TW.json @@ -0,0 +1,4 @@ +{ + "kotori_bot_admin_server.help.login": "獲取Kotori-Amdin後臺一鍵登錄地址", + "kotori_bot_admin_server.msg.login.info": "以下是您的BOT後臺管理的一鍵登錄地址:\nhttp://127.0.0.1:%port%%path%\n%face_address%:%port%%path%\n登錄地址將在[%expire_time%秒]後過期,請勿泄露給他人" +} diff --git a/modules/webui/package.json b/modules/webui/package.json new file mode 100644 index 00000000..3d7bab31 --- /dev/null +++ b/modules/webui/package.json @@ -0,0 +1,35 @@ +{ + "name": "@kotori-bot/kotori-plugin-webui", + "version": "1.0.0", + "description": "webui plugin", + "main": "lib/index.js", + "scripts": { + "build": "tsc --build" + }, + "keywords": [ + "kotori", + "chatbot", + "kotori-plugin" + ], + "license": "GPL-3.0", + "files": [ + "lib", + "locales", + "LICENSE", + "README.md" + ], + "author": "Hotaru ", + "peerDependencies": { + "kotori-bot": "workspace:^" + }, + "kotori": { + "meta": { + "language": [ + "en_US", + "ja_JP", + "zh_TW", + "zh_CN" + ] + } + } +} \ No newline at end of file diff --git a/modules/webui/src/common.ts b/modules/webui/src/common.ts new file mode 100644 index 00000000..e5032af9 --- /dev/null +++ b/modules/webui/src/common.ts @@ -0,0 +1,26 @@ +import { getUuid } from 'kotori-bot'; +import os from 'os'; + +type Code = 500 | 501 | 502; + +export function response(code: Code, data?: T) { + return { code, data }; +} +export function getToken() { + return getUuid().replaceAll('-', ''); +} + +export function getRamRate() { + const total = os.totalmem() / (1024 * 3); + return ((total - os.freemem() / (1024 * 3)) / total) * 100; +} + +export function getCpuRate() { + let rate = 0; + os.cpus().forEach((key) => { + const { times } = key; + const usage = (1 - times.idle / (times.idle + times.user + times.nice + times.sys + times.irq)) * 100; + rate += usage; + }); + return rate; +} diff --git a/modules/webui/src/const.ts b/modules/webui/src/const.ts new file mode 100644 index 00000000..5314cbb4 --- /dev/null +++ b/modules/webui/src/const.ts @@ -0,0 +1,2 @@ +export const DEFAULT_USERNAME = 'kotori'; +export const DEFAULT_PASSWORD = '123456'; diff --git a/modules/webui/src/index.ts b/modules/webui/src/index.ts new file mode 100644 index 00000000..37c8c05b --- /dev/null +++ b/modules/webui/src/index.ts @@ -0,0 +1,99 @@ +import { type Adapter, type Context, Symbols, ModuleConfig, Tsu, stringRightSplit, PLUGIN_PREFIX } from 'kotori-bot'; +import path from 'path'; +import { getCpuRate, getRamRate, getToken } from './common'; +import { DEFAULT_PASSWORD, DEFAULT_USERNAME } from './const'; + +export const inject = ['server', 'file']; + +export const config = Tsu.Object({ + username: Tsu.String().default(DEFAULT_USERNAME), + password: Tsu.String().default(DEFAULT_PASSWORD) +}); + +export function main(ctx: Context, con: Tsu.infer) { + const app = ctx.server; + app.use(app.static(path.join('/web'))); + app.use(app.json()); + + /* eslint @typescript-eslint/no-explicit-any: 0 */ + app.all('*', (req: any, res: any, next: any) => { + if (req.path !== '/api/info') ctx.logger.label(req.method).trace(req.path); + res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Headers', 'Content-Type'); + res.header('Access-Control-Allow-Methods', '*'); + res.header('Content-Type', 'application/json;charset=utf-8'); + next(); + }); + + const router = app.router(); + + router.get('/bots', (_, res) => { + const bots: (Adapter['status'] & { platform: string; identity: string; id: string | number; lang: string })[] = []; + ctx[Symbols.bot].forEach((bot) => + bot.forEach((api) => + bots.push({ + ...api.adapter.status, + platform: api.adapter.platform, + identity: api.adapter.identity, + id: api.adapter.selfId, + lang: api.adapter.config.lang + }) + ) + ); + res.status(200).json(bots); + }); + + router.get('/modules', (_, res) => { + const modules: [object, ModuleConfig][] = []; + ctx[Symbols.modules].forEach((module) => modules.push([module[0].pkg, module[1]])); + res.status(200).json(modules); + }); + + router.get('/data', (_, res) => { + res.status(200).json({ + midwares: ctx[Symbols.midware].size, + commands: ctx[Symbols.command].size, + regexps: ctx[Symbols.regexp].size, + bots: ctx[Symbols.bot].size, + adapters: ctx[Symbols.adapter].size, + modules: ctx[Symbols.modules].size, + dir: ctx.baseDir.root, + pkg: ctx.pkg, + node: process.version + }); + }); + + router.get('/info', (_, res) => { + res.status(200).json({ cpu: getCpuRate(), ram: getRamRate() }); + }); + + router.get('/login', (req, res) => { + const { user, pwd } = req.query; + if (user === con.username && pwd === con.password) { + const token = getToken(); + ctx.file.save('token', token); + res.status(200).json({ token, default: con.username === DEFAULT_USERNAME && con.password === DEFAULT_PASSWORD }); + } else { + res.status(200).json({}); + } + }); + + router.get('/config', (req, res) => { + const { type, id } = req.query; + if (type === 'module') { + if (typeof id === 'string') { + const split = id.split('/'); + const handle = stringRightSplit(split.length > 1 ? split[1] : split[0], PLUGIN_PREFIX); + res.status(200).json(handle in ctx.config.plugin ? ctx.config.plugin[handle] : {}); + } else { + res.status(200).json({}); + } + } else if (type === 'adapter') { + res.status(200).json(typeof id === 'string' && id in ctx.config.adapter ? ctx.config.adapter[id] : {}); + } else { + res.status(200).json(ctx.config); + } + }); + + app.use('/api', router); +} diff --git a/modules/webui/tsconfig.json b/modules/webui/tsconfig.json new file mode 100644 index 00000000..fe2bbf83 --- /dev/null +++ b/modules/webui/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib" + }, + "references": [ + { + "path": "../../packages/kotori" + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 5e6e8b3e..d81030a2 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,11 @@ "@types/inquirer": "^9.0.7", "@types/js-beautify": "^1.14.3", "@types/node": "^20.8.7", - "@typescript-eslint/eslint-plugin": "^6.4.0", - "@typescript-eslint/parser": "^6.4.0", "conventional-changelog-cli": "^4.1.0", "eslint": "^8.47.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.0.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint-config-typescript": "^3.0.0", "execa": "^8.0.1", "inquirer": "^9.2.12", "prettier": "^3.0.2", @@ -53,4 +51,4 @@ "version": "pnpm exec conventional-changelog -p angular -i CHANGELOG.md -s -r 0", "release": "pnpm exec release" } -} +} \ No newline at end of file diff --git a/packages/loader/package.json b/packages/loader/package.json index a0e93740..2024a89c 100644 --- a/packages/loader/package.json +++ b/packages/loader/package.json @@ -5,14 +5,6 @@ "license": "GPL-3.0", "main": "lib/index.js", "author": "Hotaru ", - "dependencies": { - "@kotori-bot/core": "workspace:^", - "@kotori-bot/logger": "workspace:^", - "express": "^4.18.2", - "knex": "^3.1.0", - "mysql": "^2.18.1", - "sqlite3": "^5.1.7" - }, "keywords": [ "kotori", "chatbot", @@ -31,7 +23,18 @@ "url": "git+https://github.com/kotorijs/kotori.git" }, "homepage": "https://kotori.js.org", + "dependencies": { + "@kotori-bot/core": "workspace:^", + "@kotori-bot/logger": "workspace:^", + "express": "^4.18.2", + "knex": "^3.1.0", + "sqlite3": "^5.1.7" + }, "devDependencies": { - "@types/express": "^4.17.21" + "@types/body-parser": "^1.19.5", + "@types/connect": "^3.4.38", + "@types/express": "^4.17.21", + "@types/express-serve-static-core": "^4.17.43", + "@types/serve-static": "^1.15.5" } -} +} \ No newline at end of file diff --git a/packages/loader/src/service/server.ts b/packages/loader/src/service/server.ts index a230d826..9910c800 100644 --- a/packages/loader/src/service/server.ts +++ b/packages/loader/src/service/server.ts @@ -6,21 +6,29 @@ interface ServerConfig { } export class Server extends Service { - private server?: ReturnType['listen']>; + private app: ReturnType; - private app?: ReturnType; + private server?: ReturnType['listen']>; constructor(ctx: Context, config: ServerConfig = { port: 720 }) { super(ctx, config, 'server'); - } - start() { - if (this.server) return; this.app = express(); this.app.get('/', (_, res) => { res.setHeader('Content-type', 'text/html'); res.send(/* html */ `

Welcome to kotori!

`); }); + this.get = this.app.get.bind(this.app); + this.post = this.app.post.bind(this.app); + this.patch = this.app.patch.bind(this.app); + this.put = this.app.put.bind(this.app); + this.delete = this.app.delete.bind(this.app); + this.use = this.app.use.bind(this.app); + this.all = this.app.all.bind(this.app); + } + + start() { + if (this.server) return; this.server = this.app.listen(this.config.port); this.ctx.logger.label('server').info(`server start at http://127.0.0.1:${this.config.port}`); } @@ -29,6 +37,26 @@ export class Server extends Service { if (!this.server) return; this.server.close(); } + + get: Server['app']['get']; + + post: Server['app']['post']; + + patch: Server['app']['patch']; + + put: Server['app']['put']; + + delete: Server['app']['delete']; + + all: Server['app']['all']; + + use: Server['app']['use']; + + router = express.Router; + + json = express.json; + + static = express.static; } export default Server; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 935fa076..6d1f6318 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: eslint-config-prettier: specifier: ^9.0.0 version: 9.1.0(eslint@8.56.0) + eslint-config-typescript: + specifier: ^3.0.0 + version: 3.0.0(@typescript-eslint/eslint-plugin@6.19.0)(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.2.2) eslint-plugin-prettier: specifier: ^5.0.0 version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.4) @@ -231,6 +234,12 @@ importers: specifier: workspace:^ version: link:../../packages/kotori + modules/webui: + dependencies: + kotori-bot: + specifier: workspace:^ + version: link:../../packages/kotori + packages/core: dependencies: '@kotori-bot/i18n': @@ -286,17 +295,26 @@ importers: version: 4.18.2 knex: specifier: ^3.1.0 - version: 3.1.0(mysql@2.18.1)(sqlite3@5.1.7) - mysql: - specifier: ^2.18.1 - version: 2.18.1 + version: 3.1.0(sqlite3@5.1.7) sqlite3: specifier: ^5.1.7 version: 5.1.7 devDependencies: + '@types/body-parser': + specifier: ^1.19.5 + version: 1.19.5 + '@types/connect': + specifier: ^3.4.38 + version: 3.4.38 '@types/express': specifier: ^4.17.21 version: 4.17.21 + '@types/express-serve-static-core': + specifier: ^4.17.43 + version: 4.17.43 + '@types/serve-static': + specifier: ^1.15.5 + version: 1.15.5 packages/logger: dependencies: @@ -896,6 +914,7 @@ packages: /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + requiresBuild: true /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} @@ -1038,14 +1057,11 @@ packages: /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + requiresBuild: true /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - /bignumber.js@9.0.0: - resolution: {integrity: sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==} - dev: false - /bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} dependencies: @@ -1081,6 +1097,7 @@ packages: /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + requiresBuild: true dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 @@ -1280,6 +1297,7 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + requiresBuild: true /confusing-browser-globals@1.0.11: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} @@ -1441,10 +1459,6 @@ packages: engines: {node: '>= 0.6'} dev: false - /core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - dev: false - /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} requiresBuild: true @@ -1611,6 +1625,7 @@ packages: /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + requiresBuild: true /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} @@ -1767,6 +1782,20 @@ packages: eslint: 8.56.0 dev: true + /eslint-config-typescript@3.0.0(@typescript-eslint/eslint-plugin@6.19.0)(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.2.2): + resolution: {integrity: sha512-CwC2cQ29OLE1OUw0k+Twpc6wpCdenG8rrErl89sWrzmMpWfkulyeQS1HJhhjU0B3Tb4k41zdei4LtX26x5m60Q==} + peerDependencies: + '@typescript-eslint/eslint-plugin': '>=1.8.0' + '@typescript-eslint/parser': '>=1.8.0' + eslint: '>=6.0.0' + typescript: '*' + dependencies: + '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.2.2) + eslint: 8.56.0 + typescript: 5.2.2 + dev: true + /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: @@ -2372,6 +2401,7 @@ packages: /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + requiresBuild: true /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -2532,6 +2562,7 @@ packages: /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + requiresBuild: true /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} @@ -2657,6 +2688,7 @@ packages: /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} + requiresBuild: true /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -2766,16 +2798,13 @@ packages: call-bind: 1.0.5 dev: true - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - dev: false - /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + requiresBuild: true /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} @@ -2851,7 +2880,7 @@ packages: json-buffer: 3.0.1 dev: true - /knex@3.1.0(mysql@2.18.1)(sqlite3@5.1.7): + /knex@3.1.0(sqlite3@5.1.7): resolution: {integrity: sha512-GLoII6hR0c4ti243gMs5/1Rb3B+AjwMOfjYm97pu0FOQa7JH56hgBxYf5WK2525ceSbBY1cjeZ9yk99GPMB6Kw==} engines: {node: '>=16'} hasBin: true @@ -2888,7 +2917,6 @@ packages: getopts: 2.3.0 interpret: 2.2.0 lodash: 4.17.21 - mysql: 2.18.1 pg-connection-string: 2.6.2 rechoir: 0.8.0 resolve-from: 5.0.0 @@ -2956,6 +2984,7 @@ packages: /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} + requiresBuild: true dependencies: yallist: 4.0.0 @@ -3074,6 +3103,7 @@ packages: /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + requiresBuild: true dependencies: brace-expansion: 1.1.11 @@ -3181,16 +3211,6 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /mysql@2.18.1: - resolution: {integrity: sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==} - engines: {node: '>= 0.6'} - dependencies: - bignumber.js: 9.0.0 - readable-stream: 2.3.7 - safe-buffer: 5.1.2 - sqlstring: 2.3.1 - dev: false - /napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} dev: false @@ -3580,10 +3600,6 @@ packages: hasBin: true dev: false - /process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: false - /promise-inflight@1.0.1: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} requiresBuild: true @@ -3694,18 +3710,6 @@ packages: strip-bom: 3.0.0 dev: true - /readable-stream@2.3.7: - resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: false - /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -3771,6 +3775,7 @@ packages: /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true + requiresBuild: true dependencies: glob: 7.2.3 @@ -3801,10 +3806,6 @@ packages: isarray: 2.0.5 dev: true - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: false - /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -3915,6 +3916,7 @@ packages: /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + requiresBuild: true /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} @@ -4022,11 +4024,6 @@ packages: - supports-color dev: false - /sqlstring@2.3.1: - resolution: {integrity: sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==} - engines: {node: '>= 0.6'} - dev: false - /ssri@8.0.1: resolution: {integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==} engines: {node: '>= 8'} @@ -4044,6 +4041,7 @@ packages: /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + requiresBuild: true dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 @@ -4074,20 +4072,16 @@ packages: es-abstract: 1.22.3 dev: true - /string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - dependencies: - safe-buffer: 5.1.2 - dev: false - /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + requiresBuild: true dependencies: safe-buffer: 5.2.1 /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + requiresBuild: true dependencies: ansi-regex: 5.0.1 @@ -4487,6 +4481,7 @@ packages: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true + requiresBuild: true dependencies: isexe: 2.0.0 @@ -4513,6 +4508,7 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + requiresBuild: true /ws@8.16.0: resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==}