diff --git a/dist/buildinfo.json b/dist/buildinfo.json index 0822b3d6..c65c94f0 100644 --- a/dist/buildinfo.json +++ b/dist/buildinfo.json @@ -1 +1 @@ -{"sha":"8ea7c0f","timestamp":1724911785} \ No newline at end of file +{"sha":"1cd65d7","timestamp":1725434971} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 7c64e0e3..1bb3f524 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15,7 +15,7 @@ class ConfigMerger { } static trim(source, lock) { const config = { ...source }; - const keysSet = new Set(source.DEFINE_KEYS || []); + const keysSet = new Set(source?.DEFINE_KEYS || []); for (const key of lock) { keysSet.delete(key); } @@ -212,8 +212,8 @@ const ENV_KEY_MAPPER = { WORKERS_AI_MODEL: "WORKERS_CHAT_MODEL" }; class Environment extends EnvironmentConfig { - BUILD_TIMESTAMP = 1724911785 ; - BUILD_VERSION = "8ea7c0f" ; + BUILD_TIMESTAMP = 1725434971 ; + BUILD_VERSION = "1cd65d7" ; I18N = loadI18n(); PLUGINS_ENV = {}; USER_CONFIG = createAgentUserConfig(); @@ -227,12 +227,14 @@ class Environment extends EnvironmentConfig { this.mergeCommands( "CUSTOM_COMMAND_", "COMMAND_DESCRIPTION_", + "COMMAND_SCOPE_", source, this.CUSTOM_COMMAND ); this.mergeCommands( "PLUGIN_COMMAND_", "PLUGIN_DESCRIPTION_", + "PLUGIN_SCOPE_", source, this.PLUGINS_COMMAND ); @@ -259,13 +261,14 @@ class Environment extends EnvironmentConfig { this.USER_CONFIG.DEFINE_KEYS = []; this.I18N = loadI18n(this.LANGUAGE.toLowerCase()); } - mergeCommands(prefix, descriptionPrefix, source, target) { + mergeCommands(prefix, descriptionPrefix, scopePrefix, source, target) { for (const key of Object.keys(source)) { if (key.startsWith(prefix)) { const cmd = key.substring(prefix.length); target[`/${cmd}`] = { value: source[key], - description: source[`${descriptionPrefix}${cmd}`] + description: source[`${descriptionPrefix}${cmd}`], + scope: source[`${scopePrefix}${cmd}`]?.split(",").map((s) => s.trim()) }; } } @@ -1403,9 +1406,15 @@ class APIClientBase { if (baseURL) { this.baseURL = baseURL; } + while (this.baseURL.endsWith("/")) { + this.baseURL = this.baseURL.slice(0, -1); + } + } + uri(method) { + return `${this.baseURL}/bot${this.token}/${method}`; } jsonRequest(method, params) { - return fetch(`${this.baseURL}/bot${this.token}/${method}`, { + return fetch(this.uri(method), { method: "POST", headers: { "Content-Type": "application/json" @@ -1427,7 +1436,7 @@ class APIClientBase { formData.append(key, JSON.stringify(value)); } } - return fetch(`${this.baseURL}/bot${this.token}/${method}`, { + return fetch(this.uri(method), { method: "POST", body: formData }); @@ -2329,6 +2338,9 @@ async function handlePluginCommand(message, command, raw, template, context) { const sender = MessageSender.from(context.SHARE_CONTEXT.botToken, message); try { const subcommand = raw.substring(command.length).trim(); + if (template.input?.required && !subcommand) { + throw new Error("Missing required input"); + } const DATA = formatInput(subcommand, template.input?.type); const { type, content } = await executeRequest(template, { DATA, @@ -2391,17 +2403,32 @@ function commandsBindScope() { if (!scopeCommandMap[scope]) { scopeCommandMap[scope] = []; } - scopeCommandMap[scope].push(cmd); + scopeCommandMap[scope].push({ + command: cmd.command, + description: ENV.I18N.command.help[cmd.command.substring(1)] || "" + }); + } + } + } + for (const list of [ENV.CUSTOM_COMMAND, ENV.PLUGINS_COMMAND]) { + for (const [cmd, config] of Object.entries(list)) { + if (config.scope) { + for (const scope of config.scope) { + if (!scopeCommandMap[scope]) { + scopeCommandMap[scope] = []; + } + scopeCommandMap[scope].push({ + command: cmd, + description: config.description || "" + }); + } } } } const result = {}; for (const scope in scopeCommandMap) { result[scope] = { - commands: scopeCommandMap[scope].map((command) => ({ - command: command.command, - description: ENV.I18N.command.help[command.command.substring(1)] || "" - })).filter((item) => item.description !== ""), + commands: scopeCommandMap[scope], scope: { type: scope } diff --git a/dist/timestamp b/dist/timestamp index a4606dea..83796380 100644 --- a/dist/timestamp +++ b/dist/timestamp @@ -1 +1 @@ -1724911785 \ No newline at end of file +1725434971 \ No newline at end of file diff --git a/doc/cn/CONFIG.md b/doc/cn/CONFIG.md index c9a536fb..28cfe207 100644 --- a/doc/cn/CONFIG.md +++ b/doc/cn/CONFIG.md @@ -204,20 +204,22 @@ CUSTOM_COMMAND_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "你是一个翻译下 下面是一些自定义指令帮助信息例子 -| 指令描述 | 描述 | 值 | -|-----------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------| -| COMMAND_DESCRIPTION_azure | 切换AI提供商为Azure | `/setenvs {"AI_PROVIDER": "azure"}` | -| COMMAND_DESCRIPTION_workers | 切换AI提供商为Workers | `/setenvs {"AI_PROVIDER": "workers"}` | -| COMMAND_DESCRIPTION_gpt3 | 切换AI提供商为OpenAI GPT-3.5 Turbo | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}` | -| COMMAND_DESCRIPTION_gpt4 | 切换AI提供商为OpenAI GPT-4 | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}` | -| COMMAND_DESCRIPTION_cn2en | 将对话内容翻译成英文 | `/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}` | +| 指令描述 | 描述 | +|-----------------------------|------------------------------| +| COMMAND_DESCRIPTION_azure | 切换AI提供商为Azure | +| COMMAND_DESCRIPTION_workers | 切换AI提供商为Workers | +| COMMAND_DESCRIPTION_gpt3 | 切换AI提供商为OpenAI GPT-3.5 Turbo | +| COMMAND_DESCRIPTION_gpt4 | 切换AI提供商为OpenAI GPT-4 | +| COMMAND_DESCRIPTION_cn2en | 将对话内容翻译成英文 | 如果你是用toml进行配置,可以使用下面的方式: ```toml -COMMAND_DESCRIPTION_azure = '/setenvs {"AI_PROVIDER": "azure"}' -COMMAND_DESCRIPTION_workers = '/setenvs {"AI_PROVIDER": "workers"}' -COMMAND_DESCRIPTION_gpt3 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}' -COMMAND_DESCRIPTION_gpt4 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}' -COMMAND_DESCRIPTION_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}' +COMMAND_DESCRIPTION_azure = '切换AI提供商为Azure' +COMMAND_DESCRIPTION_workers = '切换AI提供商为Workers' +COMMAND_DESCRIPTION_gpt3 = '切换AI提供商为OpenAI GPT-3.5 Turbo' +COMMAND_DESCRIPTION_gpt4 = '切换AI提供商为OpenAI GPT-4' +COMMAND_DESCRIPTION_cn2en = '将对话内容翻译成英文' ``` + +如果你想将自定义命令绑定到telegram的菜单中,你可以添加如下环境变量`COMMAND_SCOPE_azure = "all_private_chats,all_group_chats,all_chat_administrators"`,这样插件就会在所有的私聊,群聊和群组中生效。 diff --git a/doc/cn/PLATFORM.md b/doc/cn/PLATFORM.md index 036fde53..b7dca9a1 100644 --- a/doc/cn/PLATFORM.md +++ b/doc/cn/PLATFORM.md @@ -7,7 +7,7 @@ ### 2. [Vercel](https://vercel.com/) -详情看[Vercel](VERCEL.md)。免费,无需域名,无需服务器。需要配置本地开发环境部署,不能通过复制粘贴部署。无存储服务,需要自己配置数据库。可以使用[Redis Cloud](https://redis.com)的免费redis。可以连接github自动部署,但是需要了解vercel的配置。 +详情看[Vercel](VERCEL.md)。免费,无需域名,无需服务器。需要配置本地开发环境部署,不能通过复制粘贴部署。无存储服务,需要自己配置数据库。可以使用[UpStash Redis](https://upstash.com)的免费redis。可以连接github自动部署,但是需要了解vercel的配置。 ### 3. Local diff --git a/doc/en/CONFIG.md b/doc/en/CONFIG.md index 3434c3f5..a9254c1a 100644 --- a/doc/en/CONFIG.md +++ b/doc/en/CONFIG.md @@ -203,20 +203,22 @@ If you want to add help information for a custom command, you can use environmen The following are some examples of custom command help information. -| Command | Description | Value | -|-----------------------------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| -| COMMAND_DESCRIPTION_azure | Switch AI provider to Azure. | `/setenvs {"AI_PROVIDER": "azure"}` | -| COMMAND_DESCRIPTION_workers | Switch AI provider to Workers | `/setenvs {"AI_PROVIDER": "workers"}` | -| COMMAND_DESCRIPTION_gpt3 | Switch AI provider to OpenAI GPT-3.5 Turbo. | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}` | -| COMMAND_DESCRIPTION_gpt4 | Switch AI provider to OpenAI GPT-4. | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}` | -| COMMAND_DESCRIPTION_cn2en | Translate the conversation content into English. | `/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}` | +| Command | Value | +|-----------------------------|--------------------------------------------------| +| COMMAND_DESCRIPTION_azure | Switch AI provider to Azure. | +| COMMAND_DESCRIPTION_workers | Switch AI provider to Workers | +| COMMAND_DESCRIPTION_gpt3 | Switch AI provider to OpenAI GPT-3.5 Turbo. | +| COMMAND_DESCRIPTION_gpt4 | Switch AI provider to OpenAI GPT-4. | +| COMMAND_DESCRIPTION_cn2en | Translate the conversation content into English. | If you are using TOML for configuration, you can use the following method: ```toml -COMMAND_DESCRIPTION_azure = '/setenvs {"AI_PROVIDER": "azure"}' -COMMAND_DESCRIPTION_workers = '/setenvs {"AI_PROVIDER": "workers"}' -COMMAND_DESCRIPTION_gpt3 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}' -COMMAND_DESCRIPTION_gpt4 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}' -COMMAND_DESCRIPTION_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}' +COMMAND_DESCRIPTION_azure = 'Switch AI provider to Azure.' +COMMAND_DESCRIPTION_workers = 'Switch AI provider to Workers' +COMMAND_DESCRIPTION_gpt3 = 'Switch AI provider to OpenAI GPT-3.5 Turbo.' +COMMAND_DESCRIPTION_gpt4 = 'Switch AI provider to OpenAI GPT-4.' +COMMAND_DESCRIPTION_cn2en = 'Translate the conversation content into English.' ``` + +If you want to bind custom commands to the menu of Telegram, you can add the following environment variable `COMMAND_SCOPE_azure = "all_private_chats,all_group_chats,all_chat_administrators"`, so that the plugin will take effect in all private chats, group chats and groups. \ No newline at end of file diff --git a/doc/en/PLATFORM.md b/doc/en/PLATFORM.md index 621dbeec..647628b9 100644 --- a/doc/en/PLATFORM.md +++ b/doc/en/PLATFORM.md @@ -8,7 +8,7 @@ The easiest way, the deployment method supported by this project by default, see ### 2. [Vercel](https://vercel.com/) -See details at [Vercel](VERCEL.md). It is free, does not require a domain name or server. Deployment requires configuring the local development environment and cannot be done by copying and pasting. There is no storage service, so you need to configure your own database. You can use the free Redis from [Redis Cloud](https://redis.com). It can connect to GitHub for automatic deployment, but you need to understand Vercel's configuration. +See details at [Vercel](VERCEL.md). It is free, does not require a domain name or server. Deployment requires configuring the local development environment and cannot be done by copying and pasting. There is no storage service, so you need to configure your own database. You can use the free Redis from [UpStash Redis](https://upstash.com). It can connect to GitHub for automatic deployment, but you need to understand Vercel's configuration. ### 3. Local diff --git a/package.json b/package.json index 87148e50..cc85bf4d 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,9 @@ "type": "module", "version": "1.9.3", "description": "The easiest and quickest way to deploy your own ChatGPT Telegram bot is to use a single file and simply copy and paste it. There is no need for any dependencies, local development environment configuration, domain names, or servers.", - "author": "TBXark", + "author": "tbxark ", "license": "MIT", + "repository": "git@github.com:TBXark/ChatGPT-Telegram-Workers.git", "exports": { ".": { "types": "./dist/index.d.ts", @@ -23,6 +24,7 @@ "build": "vite build", "build:local": "BUILD_MODE=local vite build", "build:docker": "npm run build:local && cd dist && docker build -t chatgpt-telegram-workers:latest .", + "build:dockerx": "npm run build:local && cd dist && docker build --platform linux/amd64,linux/arm64 -t tbxark/chatgpt-telegram-workers:latest --push .", "build:vercel": "BUILD_MODE=vercel vite build", "build:pack": "BUILD_MODE=pack vite build", "deploy:dist": "wrangler deploy", @@ -36,13 +38,13 @@ "wrangler": "wrangler" }, "dependencies": { - "cloudflare-worker-adapter": "^1.3.2" + "cloudflare-worker-adapter": "^1.3.3" }, "devDependencies": { - "@antfu/eslint-config": "^2.27.3", + "@antfu/eslint-config": "^3.0.0", "@rollup/plugin-node-resolve": "^15.2.3", - "@types/node": "^22.5.1", - "@vercel/node": "^3.2.9", + "@types/node": "^22.5.3", + "@vercel/node": "^3.2.11", "eslint": "^9.8.0", "eslint-plugin-format": "^0.1.2", "rollup-plugin-cleanup": "^3.2.1", @@ -50,9 +52,9 @@ "telegram-bot-api-types": "^7.9.12", "tsx": "^4.19.0", "typescript": "^5.5.4", - "vite": "^5.4.2", + "vite": "^5.4.3", "vite-plugin-checker": "^0.7.2", - "vite-plugin-dts": "^4.0.3", - "wrangler": "^3.72.3" + "vite-plugin-dts": "^4.1.0", + "wrangler": "^3.74.0" } } diff --git a/plugins/README.md b/plugins/README.md index a7aec275..82e1b07d 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -87,6 +87,8 @@ Then enter `/dns A www.baidu.com` in the command line to call the plugin. Where `PLUGIN_COMMAND_dns` is the address of the plugin's json file, and `PLUGIN_DESCRIPTION_dns` is the description of the plugin. `PLUGIN_COMMAND_dns` can be a complete json or a url of a json. +If you want to bind plugin commands to the menu of Telegram, you can add the following environment variable `PLUGIN_SCOPE_dns = "all_private_chats,all_group_chats,all_chat_administrators"`, so that the plugin will take effect in all private chats, group chats and groups. + ## Interpolation Template diff --git a/plugins/README_CN.md b/plugins/README_CN.md index 08185f9b..718ce52d 100644 --- a/plugins/README_CN.md +++ b/plugins/README_CN.md @@ -84,7 +84,9 @@ PLUGIN_DESCRIPTION_dns = "DNS查询 /dns <类型> <域名>" 然后在命令行中输入`/dns A www.baidu.com`即可调用插件 其中`PLUGIN_COMMAND_dns`是插件的json文件地址,`PLUGIN_DESCRIPTION_dns`是插件的描述。 -`PLUGIN_COMMAND_dns`可以是完整的json也可以是一个json的url +`PLUGIN_COMMAND_dns`可以是完整的json也可以是一个json的url。 + +如果你想将插件命令绑定到telegram的菜单中,你可以添加如下环境变量`PLUGIN_SCOPE_dns = "all_private_chats,all_group_chats,all_chat_administrators"`,这样插件就会在所有的私聊,群聊和群组中生效。 ## 插值模板 diff --git a/plugins/dicten.json b/plugins/dicten.json index 734c45f8..f72a3a96 100644 --- a/plugins/dicten.json +++ b/plugins/dicten.json @@ -1,6 +1,9 @@ { "url": "https://api.dictionaryapi.dev/api/v2/entries/en/{{DATA}}", "method": "GET", + "input": { + "required": true + }, "response": { "content": { "input_type": "json", diff --git a/plugins/dns.json b/plugins/dns.json index e86a6bbc..ecadcdb5 100644 --- a/plugins/dns.json +++ b/plugins/dns.json @@ -5,7 +5,8 @@ "accept": "application/dns-json" }, "input": { - "type": "space-separated" + "type": "space-separated", + "required": true }, "query": { "type": "{{DATA[0]}}", diff --git a/src/config/env.ts b/src/config/env.ts index db20817f..e9da1e9c 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -80,6 +80,7 @@ class Environment extends EnvironmentConfig { this.mergeCommands( 'CUSTOM_COMMAND_', 'COMMAND_DESCRIPTION_', + 'COMMAND_SCOPE_', source, this.CUSTOM_COMMAND, ); @@ -88,6 +89,7 @@ class Environment extends EnvironmentConfig { this.mergeCommands( 'PLUGIN_COMMAND_', 'PLUGIN_DESCRIPTION_', + 'PLUGIN_SCOPE_', source, this.PLUGINS_COMMAND, ); @@ -119,13 +121,14 @@ class Environment extends EnvironmentConfig { this.I18N = loadI18n(this.LANGUAGE.toLowerCase()); } - private mergeCommands(prefix: string, descriptionPrefix: string, source: any, target: Record) { + private mergeCommands(prefix: string, descriptionPrefix: string, scopePrefix: string, source: any, target: Record) { for (const key of Object.keys(source)) { if (key.startsWith(prefix)) { const cmd = key.substring(prefix.length); target[`/${cmd}`] = { value: source[key], description: source[`${descriptionPrefix}${cmd}`], + scope: source[`${scopePrefix}${cmd}`]?.split(',').map((s: string) => s.trim()), }; } } diff --git a/src/config/merger.ts b/src/config/merger.ts index 02b69cc8..7d43130d 100644 --- a/src/config/merger.ts +++ b/src/config/merger.ts @@ -18,7 +18,7 @@ export class ConfigMerger { static trim(source: AgentUserConfig, lock: string[]): Record { const config: Record = { ...source }; - const keysSet = new Set(source.DEFINE_KEYS || []); + const keysSet = new Set(source?.DEFINE_KEYS || []); for (const key of lock) { keysSet.delete(key); } diff --git a/src/config/types.ts b/src/config/types.ts index 3f9d1355..2e8cdfb3 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -11,4 +11,5 @@ export interface APIGuard { export interface CommandConfig { value: string; description?: string | null; + scope?: string[] | null; } diff --git a/src/plugins/template.ts b/src/plugins/template.ts index f0d8187f..442ebc2b 100644 --- a/src/plugins/template.ts +++ b/src/plugins/template.ts @@ -39,6 +39,7 @@ export interface RequestTemplate { headers: { [key: string]: string }; // 可选, Key为固定值,Value支持插值 input: { type: TemplateInputType; + required: boolean; // 必选, 是否必须输入 }; query: { [key: string]: string }; // 可选, Key为固定值,Value支持插值 body: { @@ -144,7 +145,7 @@ export async function executeRequest(template: RequestTemplate, data: any): Prom }; } -export function formatInput(input: string, type: TemplateInputType): string | string[] | object { +export function formatInput(input: string, type: TemplateInputType): string | string[] | any { if (type === 'json') { return JSON.parse(input); } else if (type === 'space-separated') { diff --git a/src/telegram/api/index.ts b/src/telegram/api/index.ts index f011a21d..4de7d69c 100644 --- a/src/telegram/api/index.ts +++ b/src/telegram/api/index.ts @@ -4,15 +4,23 @@ import { ENV } from '../../config/env'; class APIClientBase { readonly token: string; readonly baseURL: string = ENV.TELEGRAM_API_DOMAIN; + constructor(token: string, baseURL?: string) { this.token = token; if (baseURL) { this.baseURL = baseURL; } + while (this.baseURL.endsWith('/')) { + this.baseURL = this.baseURL.slice(0, -1); + } + } + + private uri(method: Telegram.BotMethod): string { + return `${this.baseURL}/bot${this.token}/${method}`; } private jsonRequest(method: Telegram.BotMethod, params: T): Promise { - return fetch(`${this.baseURL}/bot${this.token}/${method}`, { + return fetch(this.uri(method), { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -35,7 +43,7 @@ class APIClientBase { formData.append(key, JSON.stringify(value)); } } - return fetch(`${this.baseURL}/bot${this.token}/${method}`, { + return fetch(this.uri(method), { method: 'POST', body: formData, }); diff --git a/src/telegram/command/index.ts b/src/telegram/command/index.ts index 0e938e34..6fc3dd75 100644 --- a/src/telegram/command/index.ts +++ b/src/telegram/command/index.ts @@ -67,6 +67,9 @@ async function handlePluginCommand(message: Telegram.Message, command: string, r const sender = MessageSender.from(context.SHARE_CONTEXT.botToken, message); try { const subcommand = raw.substring(command.length).trim(); + if (template.input?.required && !subcommand) { + throw new Error('Missing required input'); + } const DATA = formatInput(subcommand, template.input?.type); const { type, content } = await executeRequest(template, { DATA, @@ -124,7 +127,7 @@ export async function handleCommandMessage(message: Telegram.Message, context: W } export function commandsBindScope(): Record { - const scopeCommandMap: Record = { + const scopeCommandMap: Record = { all_private_chats: [], all_group_chats: [], all_chat_administrators: [], @@ -138,17 +141,32 @@ export function commandsBindScope(): Record = {}; + const result: Record = {}; for (const scope in scopeCommandMap) { result[scope] = { - commands: scopeCommandMap[scope].map(command => ({ - command: command.command, - description: ENV.I18N.command.help[command.command.substring(1)] || '', - })).filter(item => item.description !== ''), + commands: scopeCommandMap[scope], scope: { type: scope, }, diff --git a/wrangler-example.toml b/wrangler-example.toml index 9e4463b6..9cd056c2 100644 --- a/wrangler-example.toml +++ b/wrangler-example.toml @@ -191,3 +191,9 @@ COMMAND_DESCRIPTION_openai = 'Switch to OpenAI AI provider' CUSTOM_COMMAND_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}' COMMAND_DESCRIPTION_cn2en = 'Switch to Chinese to English translation mode' + +PLUGIN_COMMAND_dns = "https://raw.githubusercontent.com/TBXark/ChatGPT-Telegram-Workers/dev/plugins/dns.json" +PLUGIN_DESCRIPTION_dns = "DNS查询 /dns <类型> <域名>" + +PLUGIN_COMMAND_dicten = "https://raw.githubusercontent.com/TBXark/ChatGPT-Telegram-Workers/dev/plugins/dicten.json" +PLUGIN_DESCRIPTION_dicten = "英文字典 /dicten <单词>" \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index a3e4c5e6..6dcb8bc2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,30 +2,30 @@ # yarn lockfile v1 -"@antfu/eslint-config@^2.27.3": - version "2.27.3" - resolved "https://registry.yarnpkg.com/@antfu/eslint-config/-/eslint-config-2.27.3.tgz#96d3a1018dc1b187bf54fafdb5771f97894bc91b" - integrity sha512-Y2Vh/LvPAaYoyLwCiZHJ7p76LEIGg6debeUA4Qs+KOrlGuXLQWRmdZlC6SB33UDNzXqkFeaXAlEcYUqvYoiMKA== +"@antfu/eslint-config@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@antfu/eslint-config/-/eslint-config-3.0.0.tgz#077759b3af65fdb45020ecacdbf191edc5189e2b" + integrity sha512-3HC35LrsW5kvHyVY2U6yat3Uz20/9Re5137LAKqAtl2tKictef2CmdYk5z+qK4UsaY32MMfg98MhuBbvAvZF1w== dependencies: "@antfu/install-pkg" "^0.4.1" "@clack/prompts" "^0.7.0" "@eslint-community/eslint-plugin-eslint-comments" "^4.4.0" - "@stylistic/eslint-plugin" "^2.6.4" + "@stylistic/eslint-plugin" "^2.6.5" "@typescript-eslint/eslint-plugin" "^8.3.0" "@typescript-eslint/parser" "^8.3.0" - "@vitest/eslint-plugin" "^1.0.5" - eslint-config-flat-gitignore "^0.1.8" + "@vitest/eslint-plugin" "^1.1.0" + eslint-config-flat-gitignore "^0.3.0" eslint-flat-config-utils "^0.3.1" eslint-merge-processors "^0.1.0" eslint-plugin-antfu "^2.3.6" eslint-plugin-command "^0.2.3" - eslint-plugin-import-x "^4.0.0" + eslint-plugin-import-x "^4.1.0" eslint-plugin-jsdoc "^50.2.2" eslint-plugin-jsonc "^2.16.0" eslint-plugin-markdown "^5.1.0" eslint-plugin-n "^17.10.2" eslint-plugin-no-only-tests "^3.3.0" - eslint-plugin-perfectionist "^3.2.0" + eslint-plugin-perfectionist "^3.3.0" eslint-plugin-regexp "^2.6.0" eslint-plugin-toml "^0.11.1" eslint-plugin-unicorn "^55.0.0" @@ -149,10 +149,10 @@ resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240821.1.tgz#256d61b5dd327f2b86fa4a522fe977f97aa188a2" integrity sha512-keC97QPArs6LWbPejQM7/Y8Jy8QqyaZow4/ZdsGo+QjlOLiZRDpAenfZx3CBUoWwEeFwQTl2FLO+8hV1SWFFYw== -"@cloudflare/workers-shared@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@cloudflare/workers-shared/-/workers-shared-0.4.0.tgz#27b982a9a09150950fef63012dead6f5d2f55f84" - integrity sha512-XAFOldVQsbxQ7mjbqX2q1dNIgcLbKSytk41pwuZTn9e0p7OeTpFTosJef8uwosL6CcOAHqcW1f1HJxyjwmtGxw== +"@cloudflare/workers-shared@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@cloudflare/workers-shared/-/workers-shared-0.4.1.tgz#49a1c89ae2f96cdf2c7ac2d1c5bf38d039947617" + integrity sha512-nYh4r8JwOOjYIdH2zub++CmIKlkYFlpxI1nBHimoiHcytJXD/b7ldJ21TtfzUZMCgI78mxVlymMHA/ReaOxKlA== "@cspotcode/source-map-support@0.8.1", "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -602,6 +602,11 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== +"@eslint/compat@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@eslint/compat/-/compat-1.1.1.tgz#5736523f5105c94dfae5f35e31debc38443722cd" + integrity sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA== + "@eslint/config-array@^0.18.0": version "0.18.0" resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" @@ -928,55 +933,18 @@ argparse "~1.0.9" string-argv "~0.3.1" -"@stylistic/eslint-plugin-js@2.6.4", "@stylistic/eslint-plugin-js@^2.6.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.6.4.tgz#52e2b89e1f0878aaeeca3be832287bc060d3a422" - integrity sha512-kx1hS3xTvzxZLdr/DCU/dLBE++vcP97sHeEFX2QXhk1Ipa4K1rzPOLw1HCbf4mU3s+7kHP5eYpDe+QteEOFLug== +"@stylistic/eslint-plugin@^2.6.5": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-2.7.2.tgz#627dc1383214dab01150c9bd114d66335c2c2f5c" + integrity sha512-3DVLU5HEuk2pQoBmXJlzvrxbKNpu2mJ0SRqz5O/CJjyNCr12ZiPcYMEtuArTyPOk5i7bsAU44nywh1rGfe3gKQ== dependencies: - "@types/eslint" "^9.6.0" - acorn "^8.12.1" - eslint-visitor-keys "^4.0.0" - espree "^10.1.0" - -"@stylistic/eslint-plugin-jsx@2.6.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-2.6.4.tgz#8d02c91a26b781740bede271fbb6523cf6ab198d" - integrity sha512-bIvVhdtjmyu3S10V7QRIuawtCZSq9gRmzAX23ucjCOdSFzEwlq+di0IM0riBAvvQerrJL4SM6G3xgyPs8BSXIA== - dependencies: - "@stylistic/eslint-plugin-js" "^2.6.4" - "@types/eslint" "^9.6.0" + "@types/eslint" "^9.6.1" + "@typescript-eslint/utils" "^8.3.0" eslint-visitor-keys "^4.0.0" espree "^10.1.0" estraverse "^5.3.0" picomatch "^4.0.2" -"@stylistic/eslint-plugin-plus@2.6.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-2.6.4.tgz#5447d72bd6754fb74d31ff268ae2cb91037f0406" - integrity sha512-EuRvtxhf7Hv8OoMIePulP/6rBJIgPTu1l5GAm1780WcF1Cl8bOZXIn84Pdac5pNv6lVlzCOFm8MD3VE+2YROuA== - dependencies: - "@types/eslint" "^9.6.0" - -"@stylistic/eslint-plugin-ts@2.6.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.6.4.tgz#06f975ae5f1d866827b2495e0d93b9e005c0579c" - integrity sha512-yxL8Hj6WkObw1jfiLpBzKy5yfxY6vwlwO4miq34ySErUjUecPV5jxfVbOe4q1QDPKemQGPq93v7sAQS5PzM8lA== - dependencies: - "@stylistic/eslint-plugin-js" "2.6.4" - "@types/eslint" "^9.6.0" - "@typescript-eslint/utils" "^8.1.0" - -"@stylistic/eslint-plugin@^2.6.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-2.6.4.tgz#64071a1e3a356b0cf0adf7f9a9b9ebc24ed2cad8" - integrity sha512-euUGnjzH8EOqEYTGk9dB2OBINp0FX1nuO7/k4fO82zNRBIKZgJoDwTLM4Ce+Om6W1Qmh1PrZjCr4jh4tMEXGPQ== - dependencies: - "@stylistic/eslint-plugin-js" "2.6.4" - "@stylistic/eslint-plugin-jsx" "2.6.4" - "@stylistic/eslint-plugin-plus" "2.6.4" - "@stylistic/eslint-plugin-ts" "2.6.4" - "@types/eslint" "^9.6.0" - "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -1025,7 +993,7 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/eslint@^9.6.0": +"@types/eslint@^9.6.0", "@types/eslint@^9.6.1": version "9.6.1" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== @@ -1069,10 +1037,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.11.tgz#cbb15c12ca7c16c85a72b6bdc4d4b01151bb3cae" integrity sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA== -"@types/node@^22.5.1": - version "22.5.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" - integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== +"@types/node@^22.5.3": + version "22.5.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.3.tgz#91a374e42c6e7ccb5893a87f1775f36ce1671d65" + integrity sha512-njripolh85IA9SQGTAqbmnNZTdxv7X/4OYGPz8tgy5JDr8MP+uDBa921GpYEoDDnwm0Hmn5ZPeJgiiSTPoOzkQ== dependencies: undici-types "~6.19.2" @@ -1133,6 +1101,14 @@ "@typescript-eslint/types" "8.3.0" "@typescript-eslint/visitor-keys" "8.3.0" +"@typescript-eslint/scope-manager@8.4.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz#8a13d3c0044513d7960348db6f4789d2a06fa4b4" + integrity sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A== + dependencies: + "@typescript-eslint/types" "8.4.0" + "@typescript-eslint/visitor-keys" "8.4.0" + "@typescript-eslint/type-utils@8.3.0": version "8.3.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz#c1ae6af8c21a27254321016b052af67ddb44a9ac" @@ -1143,7 +1119,7 @@ debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@8.2.0", "@typescript-eslint/types@^8.1.0": +"@typescript-eslint/types@8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.2.0.tgz#dfe9895a2812f7c6bf7af863054c22a67060420c" integrity sha512-6a9QSK396YqmiBKPkJtxsgZZZVjYQ6wQ/TlI0C65z7vInaETuC6HAHD98AGLC8DyIPqHytvNuS8bBVvNLKyqvQ== @@ -1153,6 +1129,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.3.0.tgz#378e62447c2d7028236e55a81d3391026600563b" integrity sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw== +"@typescript-eslint/types@8.4.0", "@typescript-eslint/types@^8.3.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.4.0.tgz#b44d6a90a317a6d97a3e5fabda5196089eec6171" + integrity sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw== + "@typescript-eslint/types@^7.2.0": version "7.18.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9" @@ -1186,6 +1167,20 @@ semver "^7.6.0" ts-api-utils "^1.3.0" +"@typescript-eslint/typescript-estree@8.4.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz#00ed79ae049e124db37315cde1531a900a048482" + integrity sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A== + dependencies: + "@typescript-eslint/types" "8.4.0" + "@typescript-eslint/visitor-keys" "8.4.0" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + "@typescript-eslint/utils@8.3.0": version "8.3.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.3.0.tgz#b10972319deac5959c7a7075d0cf2b5e1de7ec08" @@ -1206,6 +1201,16 @@ "@typescript-eslint/types" "8.2.0" "@typescript-eslint/typescript-estree" "8.2.0" +"@typescript-eslint/utils@^8.3.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.4.0.tgz#35c552a404858c853a1f62ba6df2214f1988afc3" + integrity sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.4.0" + "@typescript-eslint/types" "8.4.0" + "@typescript-eslint/typescript-estree" "8.4.0" + "@typescript-eslint/visitor-keys@8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.2.0.tgz#f6abb3b6508898a117175ddc11f9b9869cc96834" @@ -1222,6 +1227,14 @@ "@typescript-eslint/types" "8.3.0" eslint-visitor-keys "^3.4.3" +"@typescript-eslint/visitor-keys@8.4.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz#1e8a8b8fd3647db1e42361fdd8de3e1679dec9d2" + integrity sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A== + dependencies: + "@typescript-eslint/types" "8.4.0" + eslint-visitor-keys "^3.4.3" + "@upstash/redis@^1.34.0": version "1.34.0" resolved "https://registry.yarnpkg.com/@upstash/redis/-/redis-1.34.0.tgz#f32cd53ebeeafbba7eca10f8597a573d5a2fed0d" @@ -1229,10 +1242,10 @@ dependencies: crypto-js "^4.2.0" -"@vercel/build-utils@8.3.7": - version "8.3.7" - resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-8.3.7.tgz#4859c1d0c605b3392dd5ba82a49ebae755f2ce4c" - integrity sha512-xscYxdzQ2IAMNbXlldbTZv1+YtD/Yq/EXgruqFBTZ/ofh+GIMCig1YrJh2CS6R2B2ja77szUiel//T8lRrDN1g== +"@vercel/build-utils@8.3.9": + version "8.3.9" + resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-8.3.9.tgz#f2b3e1d2bc7be001b8d03bf3036c6f24d5cc7a2d" + integrity sha512-QqJSv4zHnipCJz0MFOFfe2Na630njfj1FWjcD1uaVjjJP1AcKmMbfYl/e0JfOZy6MTE6f0Vk2+Bc4av6jrTaOQ== "@vercel/error-utils@2.0.2": version "2.0.2" @@ -1257,16 +1270,16 @@ node-gyp-build "^4.2.2" resolve-from "^5.0.0" -"@vercel/node@^3.2.9": - version "3.2.9" - resolved "https://registry.yarnpkg.com/@vercel/node/-/node-3.2.9.tgz#bd088cdd4de90d8a2164aed46c577a9344976a46" - integrity sha512-q3HLv+yIU3sOFS82GltdjFiBXt8cRcPmDKD3lI0z4cDLb2FSJeGE4yYqK7FxZmO8E5Hqzrm2uUoy5Mw3XERTmw== +"@vercel/node@^3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vercel/node/-/node-3.2.11.tgz#acc14806d6870cf54994ae8d9ac5f87bdb5d7311" + integrity sha512-mPXz4274IZWr4ARwQKfuuvY2rcB89dG9RAJSbvTmcYmLzZzzj9FfxQj9GbJHoNt+xW3Mm6H5PLGM2R/9nWqaKw== dependencies: "@edge-runtime/node-utils" "2.3.0" "@edge-runtime/primitives" "4.1.0" "@edge-runtime/vm" "3.2.0" "@types/node" "16.18.11" - "@vercel/build-utils" "8.3.7" + "@vercel/build-utils" "8.3.9" "@vercel/error-utils" "2.0.2" "@vercel/nft" "0.27.3" "@vercel/static-config" "3.0.0" @@ -1292,10 +1305,10 @@ json-schema-to-ts "1.6.4" ts-morph "12.0.0" -"@vitest/eslint-plugin@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@vitest/eslint-plugin/-/eslint-plugin-1.0.5.tgz#1a0070d4691e4548789ef54c69899a883d5b0807" - integrity sha512-F4zlKv5S/aG3kiFyJHbkbInKfGuIs3muDnpNfr62g8tV0ALbP/MYjLKWN92olLCtWUb2cKl0pew0gKkkoHEUqw== +"@vitest/eslint-plugin@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@vitest/eslint-plugin/-/eslint-plugin-1.1.0.tgz#4c87f0807b869e0e266a6e36c68e616cef8993e8" + integrity sha512-Ur80Y27Wbw8gFHJ3cv6vypcjXmrx6QHfw+q435h6Q2L+tf+h4Xf5pJTCL4YU/Jps9EVeggQxS85OcUZU7sdXRw== "@volar/language-core@2.4.0", "@volar/language-core@~2.4.0-alpha.18": version "2.4.0" @@ -1386,7 +1399,7 @@ acorn-walk@^8.1.1, acorn-walk@^8.2.0: dependencies: acorn "^8.11.0" -acorn@^8.11.0, acorn@^8.11.3, acorn@^8.12.0, acorn@^8.12.1, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.6.0, acorn@^8.8.0, acorn@^8.9.0: +acorn@^8.11.0, acorn@^8.11.3, acorn@^8.12.0, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.6.0, acorn@^8.8.0, acorn@^8.9.0: version "8.12.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== @@ -1398,13 +1411,6 @@ agent-base@6, agent-base@^6.0.2: dependencies: debug "4" -agent-base@^7.0.2: - version "7.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" - integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== - dependencies: - debug "^4.3.4" - agentkeepalive@^4.1.3: version "4.5.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" @@ -1802,17 +1808,16 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -cloudflare-worker-adapter@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/cloudflare-worker-adapter/-/cloudflare-worker-adapter-1.3.2.tgz#29e8f7068fef1e73b2ce5c98c3f8fbdce60a48da" - integrity sha512-tBkvDwuBSdbjxcBbNPnPvzi/E2Ak88P+8GbJLx5a2ls9pYXYsyUc2gkvaYXOykELDwsnDQNLV/98cGk+6tc1KQ== +cloudflare-worker-adapter@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/cloudflare-worker-adapter/-/cloudflare-worker-adapter-1.3.3.tgz#8604c5a47e6c773dd6406b96b3c923c8a0fed387" + integrity sha512-6WweLDsgb2GZ9XLqkSSdkyAdsmLVDsVu0iwc1gPMhhSORdGAoQ+LWCHvWwyb51PkfkLef+Y1cjRgflUO/r3iSA== dependencies: "@upstash/redis" "^1.34.0" - https-proxy-agent "^7.0.5" ioredis "^5.4.1" - node-fetch "^3.3.2" sqlite3 "^5.1.7" toml "^3.0.0" + undici "^6.19.8" cluster-key-slot@^1.1.0: version "1.1.2" @@ -1883,11 +1888,6 @@ confbox@^0.1.7: resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579" integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== -consola@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" - integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== - console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -1939,11 +1939,6 @@ data-uri-to-buffer@^2.0.0: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz#d296973d5a4897a5dbe31716d118211921f04770" integrity sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA== -data-uri-to-buffer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" - integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== - date-fns@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf" @@ -2343,13 +2338,13 @@ eslint-compat-utils@^0.5.0, eslint-compat-utils@^0.5.1: dependencies: semver "^7.5.4" -eslint-config-flat-gitignore@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/eslint-config-flat-gitignore/-/eslint-config-flat-gitignore-0.1.8.tgz#3a5c0ac6ed7a5d925603263b529d217088ebb005" - integrity sha512-OEUbS2wzzYtUfshjOqzFo4Bl4lHykXUdM08TCnYNl7ki+niW4Q1R0j0FDFDr0vjVsI5ZFOz5LvluxOP+Ew+dYw== +eslint-config-flat-gitignore@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-flat-gitignore/-/eslint-config-flat-gitignore-0.3.0.tgz#23dcbe2d9bd4abcd3593a050b2d0862121328813" + integrity sha512-0Ndxo4qGhcewjTzw52TK06Mc00aDtHNTdeeW2JfONgDcLkRO/n/BteMRzNVpLQYxdCC/dFEilfM9fjjpGIJ9Og== dependencies: + "@eslint/compat" "^1.1.1" find-up-simple "^1.0.0" - parse-gitignore "^2.0.0" eslint-flat-config-utils@^0.3.1: version "0.3.1" @@ -2421,10 +2416,10 @@ eslint-plugin-format@^0.1.2: prettier "^3.3.2" synckit "^0.9.0" -eslint-plugin-import-x@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import-x/-/eslint-plugin-import-x-4.0.0.tgz#c367c27dfab458c92da59e3ff21768cad4e99a09" - integrity sha512-5bWZ+2p3DKlpLSP830cAUmRUoYEnnvuBmSOSlURffEUuXL68uQUX0v2JpoXxyoDRIQWApzbqhnFeHA0XoQWosA== +eslint-plugin-import-x@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import-x/-/eslint-plugin-import-x-4.1.1.tgz#715efe257eddeb5986c68cda73908d019c954280" + integrity sha512-dBEM8fACIFNt4H7GoOaRmnH6evJW6JSTJTYYgmRd3vI4geBTjgDM/JyUDKUwIw0HDSyI+u7Vs3vFRXUo/BOAtA== dependencies: "@typescript-eslint/typescript-estree" "^8.1.0" "@typescript-eslint/utils" "^8.1.0" @@ -2494,13 +2489,13 @@ eslint-plugin-no-only-tests@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz#d9d42ccd4b5d099b4872fb5046cf95441188cfb5" integrity sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q== -eslint-plugin-perfectionist@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-3.2.0.tgz#8f25028692518d60ab4eeab7454894ac42cf106f" - integrity sha512-cX1aztMbSfRWPKJH8CD+gadrbkS+RNH1OGWuNGws8J6rHzYYhawxWTU/yzMYjq2IRJCpBCfhgfa7BHRXQYxLHA== +eslint-plugin-perfectionist@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-3.3.0.tgz#c050fc3413d8aa023bbaca4453f47b411ae84c3d" + integrity sha512-sGgShkEqDBqIZ3WlenGHwLe1cl3vHKTfeh9b1XXAamaxSC7AY4Os0jdNCXnGJW4l0TlpismT5t2r7CXY7sfKlw== dependencies: - "@typescript-eslint/types" "^8.1.0" - "@typescript-eslint/utils" "^8.1.0" + "@typescript-eslint/types" "^8.3.0" + "@typescript-eslint/utils" "^8.3.0" minimatch "^10.0.1" natural-compare-lite "^1.4.0" @@ -2760,14 +2755,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - file-entry-cache@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" @@ -2821,13 +2808,6 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" @@ -3051,14 +3031,6 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -https-proxy-agent@^7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" - integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== - dependencies: - agent-base "^7.0.2" - debug "4" - humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -3527,10 +3499,10 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -miniflare@3.20240821.0: - version "3.20240821.0" - resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-3.20240821.0.tgz#d4fc648ca20c033c4143a8d0ef061dedccad7c2d" - integrity sha512-4BhLGpssQxM/O6TZmJ10GkT3wBJK6emFkZ3V87/HyvQmVt8zMxEBvyw5uv6kdtp+7F54Nw6IKFJjPUL8rFVQrQ== +miniflare@3.20240821.1: + version "3.20240821.1" + resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-3.20240821.1.tgz#a52929883aa413e3b72de1c61865b23ccf70c1e1" + integrity sha512-81qdiryDG7VXzZuoa0EwhkaIYYrn7+StRIrd/2i7SPqPUNICUBjbhFFKqTnvE1+fqIPPB6l8ShKFaFvmnZOASg== dependencies: "@cspotcode/source-map-support" "0.8.1" acorn "^8.8.0" @@ -3719,16 +3691,6 @@ node-addon-api@^7.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch-native@^1.6.4: - version "1.6.4" - resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" - integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== - node-fetch@2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" @@ -3743,15 +3705,6 @@ node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" -node-fetch@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" - integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - node-forge@^1: version "1.3.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" @@ -3844,6 +3797,11 @@ object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== +ohash@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" + integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== + once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -4047,10 +4005,10 @@ postcss-selector-parser@^6.0.15: cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss@^8.4.41: - version "8.4.41" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" - integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== +postcss@^8.4.43: + version "8.4.44" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.44.tgz#d56834ef6508610ba224bb22b2457b2169ed0480" + integrity sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw== dependencies: nanoid "^3.3.7" picocolors "^1.0.1" @@ -4856,7 +4814,7 @@ typescript@^5.5.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== -ufo@^1.5.3: +ufo@^1.5.3, ufo@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== @@ -4873,17 +4831,20 @@ undici@5.28.4, undici@^5.28.4: dependencies: "@fastify/busboy" "^2.0.0" -"unenv@npm:unenv-nightly@1.10.0-1717606461.a117952": - version "1.10.0-1717606461.a117952" - resolved "https://registry.yarnpkg.com/unenv-nightly/-/unenv-nightly-1.10.0-1717606461.a117952.tgz#ff0b97e1e159f84be747271e1d55263b4b3eae7e" - integrity sha512-u3TfBX02WzbHTpaEfWEKwDijDSFAHcgXkayUZ+MVDrjhLFvgAJzFGTSTmwlEhwWi2exyRQey23ah9wELMM6etg== +undici@^6.19.8: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici/-/undici-6.19.8.tgz#002d7c8a28f8cc3a44ff33c3d4be4d85e15d40e1" + integrity sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g== + +"unenv@npm:unenv-nightly@2.0.0-1724863496.70db6f1": + version "2.0.0-1724863496.70db6f1" + resolved "https://registry.yarnpkg.com/unenv-nightly/-/unenv-nightly-2.0.0-1724863496.70db6f1.tgz#6aba0f79b9e3238fc88d3e16e3acd66067dced44" + integrity sha512-r+VIl1gnsI4WQxluruSQhy8alpAf1AsLRLm4sEKp3otCyTIVD6I6wHEYzeQnwsyWgaD4+3BD4A/eqrgOpdTzhw== dependencies: - consola "^3.2.3" defu "^6.1.4" - mime "^3.0.0" - node-fetch-native "^1.6.4" + ohash "^1.1.3" pathe "^1.1.2" - ufo "^1.5.3" + ufo "^1.5.4" unique-filename@^1.1.1: version "1.1.1" @@ -4969,10 +4930,10 @@ vite-plugin-checker@^0.7.2: vscode-languageserver-textdocument "^1.0.1" vscode-uri "^3.0.2" -vite-plugin-dts@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-4.0.3.tgz#0f452be5ea81a50fa27ade4e0f3a0d750873affc" - integrity sha512-+xnTsaONwU2kV6zhRjtbRJSGN41uFR/whqmcb4k4fftLFDJElxthp0PP5Fq8gMeM9ytWMt1yk5gGgekLREWYQQ== +vite-plugin-dts@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-4.1.0.tgz#616ba66a3793e71f12a80c7df2fd9ec5d98e1f35" + integrity sha512-sRlmt9k2q8MrX4F2058N3KmB6WyJ3Ao6QaExOv1X99F3j0GhPziEz1zscWQ1q2r1PeFc96L7GIUu8Pl2DPr2Hg== dependencies: "@microsoft/api-extractor" "7.47.4" "@rollup/pluginutils" "^5.1.0" @@ -4985,13 +4946,13 @@ vite-plugin-dts@^4.0.3: magic-string "^0.30.11" vue-tsc "2.0.29" -vite@^5.4.2: - version "5.4.2" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.2.tgz#8acb6ec4bfab823cdfc1cb2d6c53ed311bc4e47e" - integrity sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA== +vite@^5.4.3: + version "5.4.3" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.3.tgz#771c470e808cb6732f204e1ee96c2ed65b97a0eb" + integrity sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q== dependencies: esbuild "^0.21.3" - postcss "^8.4.41" + postcss "^8.4.43" rollup "^4.20.0" optionalDependencies: fsevents "~2.3.3" @@ -5062,11 +5023,6 @@ vue-tsc@2.0.29: "@vue/language-core" "2.0.29" semver "^7.5.4" -web-streams-polyfill@^3.0.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" - integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -5110,27 +5066,27 @@ workerd@1.20240821.1: "@cloudflare/workerd-linux-arm64" "1.20240821.1" "@cloudflare/workerd-windows-64" "1.20240821.1" -wrangler@^3.72.3: - version "3.72.3" - resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-3.72.3.tgz#e958a77a9a125ff6f72f87493502078547c3ca31" - integrity sha512-EBlJGOcwanbzFkiJkRB47WKhvevh1AZK0ty0MyD0gptsgWnAxBfmFGiBuzOuRXbvH45ZrFrTqgi8c67EwcV1nA== +wrangler@^3.74.0: + version "3.74.0" + resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-3.74.0.tgz#eee36930eaf29eee182369a5d2e1b177ffe2c141" + integrity sha512-wmtb+tQrgb61yN+Wa2JM98G1Gt4tKFRYPw6xwuyzUcA74L+Dum1A13w22/manl9Gq1jA3dPn+7UzT5sYEVHRog== dependencies: "@cloudflare/kv-asset-handler" "0.3.4" - "@cloudflare/workers-shared" "0.4.0" + "@cloudflare/workers-shared" "0.4.1" "@esbuild-plugins/node-globals-polyfill" "^0.2.3" "@esbuild-plugins/node-modules-polyfill" "^0.2.2" blake3-wasm "^2.1.5" chokidar "^3.5.3" date-fns "^3.6.0" esbuild "0.17.19" - miniflare "3.20240821.0" + miniflare "3.20240821.1" nanoid "^3.3.3" path-to-regexp "^6.2.0" resolve "^1.22.8" resolve.exports "^2.0.2" selfsigned "^2.0.1" source-map "^0.6.1" - unenv "npm:unenv-nightly@1.10.0-1717606461.a117952" + unenv "npm:unenv-nightly@2.0.0-1724863496.70db6f1" workerd "1.20240821.1" xxhash-wasm "^1.0.1" optionalDependencies: