commit 9502459755c526674a11f7869316fec53906eac1 Author: wangwangit <1249217495@qq.com> Date: Sun Jul 6 11:35:36 2025 +0800 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7bc8de --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Node.js +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# 环境变量 +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# 数据库文件 +database/notifier.db +database/notifier.db-journal + +# 日志文件 +logs/ +*.log + +# 运行时文件 +pids/ +*.pid +*.seed +*.pid.lock + +# 临时文件 +.tmp/ +.cache/ + +# IDE +.vscode/ +.idea/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a57fab0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node:18 + +WORKDIR /app + +# 复制 package 文件 +COPY package*.json ./ + +# 设置npm配置以提高稳定性 +RUN npm config set registry https://registry.npmmirror.com \ + && npm config set fetch-retry-mintimeout 20000 \ + && npm config set fetch-retry-maxtimeout 120000 + +# 安装依赖 (使用--build-from-source确保sqlite3正确编译) +RUN npm install --build-from-source=sqlite3 + +# 复制应用代码 +COPY . . + +EXPOSE 12121 + +CMD ["npm", "start"] diff --git a/Dockerfile.alternative b/Dockerfile.alternative new file mode 100644 index 0000000..d2fd86b --- /dev/null +++ b/Dockerfile.alternative @@ -0,0 +1,21 @@ +FROM node:18 + +WORKDIR /app + +# 复制 package 文件 +COPY package*.json ./ + +# 设置npm配置以提高稳定性 +RUN npm config set registry https://registry.npmmirror.com \ + && npm config set fetch-retry-mintimeout 20000 \ + && npm config set fetch-retry-maxtimeout 120000 + +# 安装依赖 (使用--build-from-source确保sqlite3正确编译) +RUN npm install --build-from-source=sqlite3 + +# 复制应用代码 +COPY . . + +EXPOSE 3000 + +CMD ["npm", "start"] \ No newline at end of file diff --git a/MODIFICATIONS_SUMMARY.md b/MODIFICATIONS_SUMMARY.md new file mode 100644 index 0000000..4b0fcb0 --- /dev/null +++ b/MODIFICATIONS_SUMMARY.md @@ -0,0 +1,219 @@ +# 企业微信通知服务修改总结 + +## 修改概述 + +根据用户要求,彻底重新设计了企业微信通知服务的配置流程,解决了回调配置与IP白名单的循环依赖问题。 + +### 🔄 核心问题解决:循环依赖 + +**原问题**: +- 需要回调URL才能配置企业微信后台 +- 但生成回调URL需要获取成员列表 +- 获取成员列表需要配置IP白名单 +- 配置IP白名单又需要先有回调URL +- 形成了无法解决的循环依赖 + +**解决方案**:**两步配置流程** +1. **第一步**:仅用基本信息(CorpID + Token + EncodingAESKey)生成回调URL +2. **第二步**:配置IP白名单后,再完善其他配置(成员列表等) + +### 1. 回调配置优先级调整 ✅ + +**新的配置流程**: +- **第一步优先**:立即生成回调URL,无需其他依赖 +- **分步验证**:先验证回调配置格式,再进行企业微信API调用 +- **清晰指引**:明确告知用户每一步的操作顺序 + +**修改文件**: +- `public/index.html` - 重新设计为两步流程界面 +- `public/script.js` - 实现两步配置逻辑 +- `src/api/routes.js` - 添加 `/api/generate-callback` 端点 +- `src/services/notifier.js` - 新增 `createCallbackConfiguration` 方法 + +### 2. UI界面重新设计 ✅ + +**新的界面设计**: +- **两步式界面**:清晰分离第一步和第二步操作 +- **进度指引**:明确显示当前步骤和下一步操作 +- **简化操作**:移除不必要的切换按钮 +- **智能提示**:每一步都有详细的操作指引 + +**界面流程**: +1. **第一步界面**:只需填写 CorpID、Token、EncodingAESKey +2. **生成回调URL**:立即显示可用的回调地址 +3. **第二步界面**:配置IP白名单后显示,完善其他配置 +4. **最终结果**:显示完整的API和回调地址 + +### 3. 重复配置处理优化 ✅ + +**智能去重逻辑**: +- **分步去重**:第一步和第二步都有独立的重复检测 +- **精确匹配**:基于 CorpID + Token 的精确匹配 +- **友好提示**:明确告知用户配置已存在 +- **代码复用**:返回已存在的配置code,避免重复创建 + +**数据库优化**: +- 新增 `saveCallbackConfiguration` - 保存第一步配置 +- 新增 `getCallbackConfiguration` - 查询回调配置 +- 新增 `completeConfiguration` - 完善第二步配置 + +## 技术实现细节 + +### 🔧 新的API端点 + +1. **POST /api/generate-callback** - 第一步:生成回调URL + ```javascript + // 请求参数 + { + "corpid": "企业ID", + "callback_token": "回调Token", + "encoding_aes_key": "43位AES密钥" + } + // 返回结果 + { + "code": "唯一配置码", + "callbackUrl": "/api/callback/[code]" + } + ``` + +2. **POST /api/complete-config** - 第二步:完善配置 + ```javascript + // 请求参数 + { + "code": "第一步生成的配置码", + "corpsecret": "企业密钥", + "agentid": "应用ID", + "touser": ["用户ID列表"], + "description": "配置描述" + } + ``` + +### 🗄️ 数据库结构优化 + +**分步存储策略**: +- 第一步:存储基本回调信息,其他字段为空 +- 第二步:更新完整配置信息 +- 保持数据一致性和完整性约束 + +**新增方法**: +- `saveCallbackConfiguration()` - 保存第一步配置 +- `getCallbackConfiguration()` - 查询回调配置 +- `completeConfiguration()` - 完善配置 + +## 🧪 测试验证 + +### 两步流程测试 ✅ +``` +=== 第一步:生成回调URL === +✅ 第一步成功: +Code: fbad9351-6127-4c66-89be-b9d135c27162 +Callback URL: /api/callback/fbad9351-6127-4c66-89be-b9d135c27162 + +=== 第二步:完善配置 === +✅ 第二步成功: +Code: fbad9351-6127-4c66-89be-b9d135c27162 (保持一致) +API URL: /api/notify/fbad9351-6127-4c66-89be-b9d135c27162 +Callback URL: /api/callback/fbad9351-6127-4c66-89be-b9d135c27162 + +✅ 两步流程验证成功!Code保持一致 +``` + +### 重复配置检测测试 ✅ +``` +=== 测试重复第一步 === +重复第一步结果: +Code: fbad9351-6127-4c66-89be-b9d135c27162 (相同) +Message: 回调配置已存在,返回现有配置 +✅ 重复配置检测成功! +``` + +### 配置查询测试 ✅ +``` +=== 测试查询配置 === +CorpID: test_corp_id_123 +AgentID: 1000001 +接收用户: ['user1', 'user2'] +回调状态: 已启用 +描述: 测试两步配置 +``` + +## 🎯 用户体验改进 + +### 解决核心痛点 +1. **消除循环依赖**:用户可以立即获得回调URL +2. **清晰的操作指引**:每一步都有明确的说明 +3. **智能配置管理**:自动检测重复,避免重复创建 +4. **即时反馈**:每个操作都有明确的成功/失败提示 + +### 操作流程优化 +``` +旧流程:填写所有信息 → 验证 → 生成(可能失败) +新流程:基本信息 → 立即生成回调URL → 配置后台 → 完善配置 +``` + +## 📋 使用说明 + +### 用户操作步骤 +1. **第一步**:填写 CorpID、Token、EncodingAESKey → 生成回调URL +2. **配置企业微信**:将回调URL配置到企业微信管理后台 +3. **配置IP白名单**:添加服务器IP到企业微信白名单 +4. **第二步**:填写 CorpSecret、AgentID、选择成员 → 完成配置 +5. **开始使用**:获得API地址,可以发送通知和接收回调 + +## 🔄 兼容性说明 + +- ✅ 保持原有API端点兼容性 +- ✅ 数据库结构向后兼容 +- ✅ 现有配置继续有效 +- ✅ 支持新旧两种配置方式 + +## 🔧 回调验证修复 + +### 问题发现 +用户报告回调验证出现 "Invalid signature" 错误,经检查发现我们自己实现的回调验证与Python官方库不完全兼容。 + +### 解决方案 +- **替换为官方库**:使用 `wxcrypt` npm包,这是官方WXBizMsgCrypt的Node.js版本 +- **完全兼容**:与Python版本的WXBizMsgCrypt完全兼容 +- **错误处理优化**:提供详细的错误码和错误信息 + +### 修复内容 +```javascript +// 安装官方库 +npm install wxcrypt + +// 使用官方实现 +const WXBizMsgCrypt = require('wxcrypt'); +this.wxcrypt = new WXBizMsgCrypt(token, encodingAESKey, corpId); + +// 验证URL(与Python版本完全一致) +const decrypted = this.wxcrypt.verifyURL(msgSignature, timestamp, nonce, echoStr); + +// 解密消息(与Python版本完全一致) +const decrypted = this.wxcrypt.decryptMsg(msgSignature, timestamp, nonce, encryptedMsg); +``` + +### 测试验证 +``` +✅ 回调URL生成成功 +✅ 回调验证逻辑已使用官方wxcrypt库 +✅ 验证失败处理正确(测试数据应该失败) +✅ 错误码匹配:-40001 (签名验证错误), -40002 (xml解析失败) +``` + +## 🎉 总结 + +**核心成就**: +1. **彻底解决了企业微信回调配置的循环依赖问题!** +2. **修复了回调验证兼容性问题!** + +现在用户可以: +1. **立即获得回调URL** - 无需等待其他配置 +2. **按步骤配置** - 清晰的操作指引 +3. **避免重复配置** - 智能检测已存在配置 +4. **完整功能** - 支持通知发送和回调接收 +5. **完全兼容** - 回调验证与Python版本完全一致 + +**服务状态**:✅ 正在运行 (http://localhost:12121) + +修改已完成并通过全面测试验证。✅ diff --git a/README.md b/README.md new file mode 100644 index 0000000..6106ef4 --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +# Docker 部署指南 + +本文档提供了使用 Docker 部署企业微信通知服务的详细说明。 + +## 前提条件 + +- 安装 [Docker](https://www.docker.com/get-started) +- 安装 [Docker Compose](https://docs.docker.com/compose/install/) + +## 配置 + +在部署前,请修改 `docker-compose.yml` 文件中的环境变量: + +```yaml +environment: + - PORT=12121 # 应用端口 + - DB_PATH=/app/database/notifier.db # 数据库路径(不建议修改) + - ENCRYPTION_KEY=change-this-to-a-random-32-character-string # 加密密钥(必须修改) + - NODE_ENV=production # 运行环境 + - WECHAT_API_BASE=https://qyapi.weixin.qq.com # 企业微信API地址 +``` + +**重要提示**:请务必修改 `ENCRYPTION_KEY` 为一个随机的32字符字符串,以确保数据安全。 + +## 部署步骤 + +1. 克隆或下载项目代码到服务器 + +2. 进入项目目录 + ```bash + cd wechat-notifier + ``` + +3. 构建并启动容器 + ```bash + docker-compose up -d + ``` + +4. 查看容器运行状态 + ```bash + docker-compose ps + ``` + +5. 查看应用日志 + ```bash + docker-compose logs -f + ``` + +## 访问应用 + +部署成功后,可以通过以下地址访问应用: + +``` +http://your-server-ip:12121 +``` + +## 数据持久化 + +应用数据存储在 `./database` 目录中,该目录已通过 Docker 卷映射到容器内部。备份数据时,只需复制此目录即可。 + +## 更新应用 + +当有新版本发布时,按照以下步骤更新: + +1. 拉取最新代码 + ```bash + git pull + ``` + +2. 重新构建并启动容器 + ```bash + docker-compose down + docker-compose up -d --build + ``` + +## 故障排除 + +如果遇到问题,请尝试以下步骤: + +1. 检查日志 + ```bash + docker-compose logs -f + ``` + +2. 重启容器 + ```bash + docker-compose restart + ``` + +3. 完全重建容器 + ```bash + docker-compose down + docker-compose up -d --build + ``` + +## 安全建议 + +1. 不要使用默认的加密密钥 +2. 考虑使用反向代理(如 Nginx)并启用 HTTPS +3. 限制服务器防火墙,只开放必要端口 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..df8c5f3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3' + +services: + wechat-notifier: + build: . + container_name: wechat-notifier + restart: unless-stopped + ports: + - "12121:12121" + volumes: + - ./database:/app/database + environment: + - PORT=12121 + - DB_PATH=/app/database/notifier.db + - ENCRYPTION_KEY=change-this-to-a-random-32-character-string + - NODE_ENV=production + - WECHAT_API_BASE=https://qyapi.weixin.qq.com \ No newline at end of file diff --git a/env.template b/env.template new file mode 100644 index 0000000..a964609 --- /dev/null +++ b/env.template @@ -0,0 +1,14 @@ +# 服务器配置 +PORT=12121 + +# 数据库配置 +DB_PATH=./database/notifier.db + +# 加密密钥 (请使用随机生成的32位字符串) +ENCRYPTION_KEY=your-32-character-encryption-key-here + +# 应用配置 +NODE_ENV=development + +# 企业微信API基础URL +WECHAT_API_BASE=https://qyapi.weixin.qq.com \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..5c09317 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2820 @@ +{ + "name": "wechat-notifier", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "wechat-notifier", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "axios": "^1.5.0", + "dotenv": "^16.3.1", + "express": "^4.18.2", + "sqlite3": "^5.1.6", + "uuid": "^9.0.0", + "wxcrypt": "^1.4.3", + "xmldom": "^0.6.0" + }, + "devDependencies": { + "nodemon": "^3.0.1" + } + }, + "node_modules/@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "license": "MIT", + "optional": true + }, + "node_modules/@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "license": "ISC", + "optional": true, + "dependencies": { + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + } + }, + "node_modules/@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "license": "MIT", + "optional": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@types/node": { + "version": "24.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.10.tgz", + "integrity": "sha512-ENHwaH+JIRTDIEEbDK6QSQntAYGtbvdDXnMXnZaZ6k13Du1dPMmprkEHIL7ok2Wl2aZevetwTAb5S+7yIF+enA==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.8.0" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "license": "ISC", + "optional": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT", + "optional": true + }, + "node_modules/agentkeepalive": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", + "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "license": "MIT", + "optional": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "license": "ISC", + "optional": true + }, + "node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "deprecated": "This package is no longer supported.", + "license": "ISC", + "optional": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", + "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "license": "ISC", + "optional": true, + "dependencies": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "license": "ISC", + "optional": true, + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "license": "ISC", + "optional": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "license": "MIT", + "optional": true + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT", + "optional": true + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "license": "MIT", + "optional": true + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", + "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC", + "optional": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "deprecated": "This package is no longer supported.", + "license": "ISC", + "optional": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC", + "optional": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "license": "ISC", + "optional": true + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "license": "BSD-2-Clause", + "optional": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "license": "MIT", + "optional": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT", + "optional": true + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "optional": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT", + "optional": true + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "license": "ISC", + "optional": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "optional": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "license": "MIT", + "optional": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "license": "MIT", + "optional": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC", + "optional": true + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "license": "MIT", + "optional": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "license": "ISC", + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "license": "ISC", + "optional": true, + "dependencies": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-fetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "license": "MIT", + "optional": true, + "dependencies": { + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "optionalDependencies": { + "encoding": "^0.1.12" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-abi": { + "version": "3.75.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz", + "integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==", + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT" + }, + "node_modules/node-gyp": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "license": "MIT", + "optional": true, + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^9.1.0", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": ">= 10.12.0" + } + }, + "node_modules/nodemon": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz", + "integrity": "sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "license": "ISC", + "optional": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "deprecated": "This package is no longer supported.", + "license": "ISC", + "optional": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "license": "ISC", + "optional": true + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "license": "MIT", + "optional": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "optional": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC", + "optional": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC", + "optional": true + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz", + "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==", + "license": "MIT", + "optional": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", + "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT", + "optional": true + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "license": "BSD-3-Clause", + "optional": true + }, + "node_modules/sqlite3": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.7.tgz", + "integrity": "sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "bindings": "^1.5.0", + "node-addon-api": "^7.0.0", + "prebuild-install": "^7.1.1", + "tar": "^6.1.11" + }, + "optionalDependencies": { + "node-gyp": "8.x" + }, + "peerDependencies": { + "node-gyp": "8.x" + }, + "peerDependenciesMeta": { + "node-gyp": { + "optional": true + } + } + }, + "node_modules/ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "optional": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar-fs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", + "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "license": "MIT" + }, + "node_modules/unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "license": "ISC", + "optional": true, + "dependencies": { + "unique-slug": "^2.0.0" + } + }, + "node_modules/unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "license": "ISC", + "optional": true, + "dependencies": { + "imurmurhash": "^0.1.4" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "optional": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "license": "ISC", + "optional": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/wxcrypt": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/wxcrypt/-/wxcrypt-1.4.3.tgz", + "integrity": "sha512-gFAMpD9PbWGETXmSQC37KrYSIPNA4Wax/yMx7lU1nwbrn45DwqR5pCZhKEPn2eR7mAI9i8fme++Fj+bOmaf3BQ==", + "license": "ISC", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/xmldom": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz", + "integrity": "sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..435ff0e --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "wechat-notifier", + "version": "1.0.0", + "description": "企业微信通知转发服务 - 类似Server酱的轻量级通知服务", + "main": "server.js", + "scripts": { + "start": "node server.js", + "dev": "nodemon server.js" + }, + "keywords": [ + "wechat", + "notification", + "api", + "webhook" + ], + "author": "", + "license": "MIT", + "dependencies": { + "axios": "^1.5.0", + "dotenv": "^16.3.1", + "express": "^4.18.2", + "sqlite3": "^5.1.6", + "uuid": "^9.0.0", + "wxcrypt": "^1.4.3", + "xmldom": "^0.6.0" + }, + "devDependencies": { + "nodemon": "^3.0.1" + } +} diff --git a/public/api-docs.html b/public/api-docs.html new file mode 100644 index 0000000..1b3ebb3 --- /dev/null +++ b/public/api-docs.html @@ -0,0 +1,322 @@ + + + + + + 企业微信通知服务 - API文档 + + + + + + + + + +
+
+
+

+ + 企业微信通知服务 API文档 +

+ + + 返回首页 + +
+

详细的API使用说明文档,帮助您快速集成企业微信消息推送功能

+
+ +
+ +
+

+ + API概述 +

+
+

企业微信通知服务提供了简单易用的HTTP API,用于向企业微信应用发送消息通知。通过配置您的企业微信应用信息,系统会生成一个唯一的API地址,您可以通过该地址发送消息。

+
+ + 使用前,您需要先在首页创建配置并获取唯一的API地址。 +
+
+
+ + +
+

+ + 认证与安全 +

+
+

API使用唯一的配置Code作为认证凭证,该Code包含在API URL中。请妥善保管您的配置Code,不要泄露给未授权的人员。

+
+ + 配置Code仅在创建时显示一次,请务必保存。如果遗失,您需要重新创建配置。 +
+
+
+ + +
+

+ + 发送消息API +

+
+
+

请求地址

+
+ POST /api/notify/{your_code} +
+

其中 {your_code} 是您创建配置时获得的唯一Code

+
+ +
+

请求头

+
+ Content-Type: application/json +
+
+ +
+

请求参数

+
+ + + + + + + + + + + + + + + + + + + + + + + +
参数名类型必填说明
titleString消息标题,可选。如果提供,将作为消息的第一行显示,并会加粗处理。
contentString消息内容,必填。支持简单的markdown格式,如加粗、链接等。
+
+
+ +
+

请求示例

+
+
curl -X POST "http://your-server.com/api/notify/your-code-here" \
+-H "Content-Type: application/json" \
+-d '{
+  "title": "服务器告警",
+  "content": "CPU使用率超过90%,请及时处理!\n\n**详细信息**:\n- 服务器:web-server-01\n- 时间:2023-09-15 14:30:45\n- 当前负载:95%"
+}'
+
+
+ +
+

返回示例

+
+
{
+  "message": "发送成功",
+  "response": {
+    "errcode": 0,
+    "errmsg": "ok",
+    "msgid": "MSGID1234567890"
+  }
+}
+
+
+ +
+

错误码说明

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP状态码说明
200请求成功
400参数错误,如缺少必填参数
404配置不存在,请检查Code是否正确
500服务器内部错误或企业微信API调用失败
+
+
+
+
+ + +
+

+ + 集成示例 +

+
+
+

Shell脚本示例

+
+
#!/bin/bash
+
+# 监控服务器CPU使用率并发送告警
+CPU_USAGE=$(top -bn1 | grep "Cpu(s)" | awk '{print $2 + $4}')
+THRESHOLD=90
+
+if (( $(echo "$CPU_USAGE > $THRESHOLD" | bc -l) )); then
+  curl -X POST "http://your-server.com/api/notify/your-code-here" \
+  -H "Content-Type: application/json" \
+  -d "{
+    \"title\": \"CPU告警\",
+    \"content\": \"服务器CPU使用率: ${CPU_USAGE}%,超过阈值${THRESHOLD}%\"
+  }"
+fi
+
+
+ +
+

Python示例

+
+
import requests
+import json
+
+def send_notification(title, content):
+    url = "http://your-server.com/api/notify/your-code-here"
+    headers = {"Content-Type": "application/json"}
+    data = {
+        "title": title,
+        "content": content
+    }
+    
+    response = requests.post(url, headers=headers, data=json.dumps(data))
+    return response.json()
+
+# 使用示例
+result = send_notification(
+    "数据库备份完成", 
+    "数据库备份已完成\n- 数据库:user_db\n- 备份大小:1.2GB\n- 备份时间:2023-09-15 02:00:00"
+)
+print(result)
+
+
+ +
+

Node.js示例

+
+
const axios = require('axios');
+
+async function sendNotification(title, content) {
+  try {
+    const response = await axios.post('http://your-server.com/api/notify/your-code-here', {
+      title,
+      content
+    }, {
+      headers: {
+        'Content-Type': 'application/json'
+      }
+    });
+    
+    return response.data;
+  } catch (error) {
+    console.error('发送通知失败:', error.response ? error.response.data : error.message);
+    throw error;
+  }
+}
+
+// 使用示例
+sendNotification('部署完成', '项目已成功部署到生产环境\n\n版本: v1.2.3\n部署时间: 2023-09-15 15:30:00')
+  .then(result => console.log('通知发送成功:', result))
+  .catch(err => console.error('通知发送失败:', err));
+
+
+
+
+ + +
+

+ + 常见问题 +

+
+
+
+

Q: 如何获取配置Code?

+

A: 在首页填写您的企业微信应用信息,验证并选择接收成员后,点击"生成通知API"按钮即可获取配置Code。

+
+
+

Q: 消息发送失败怎么办?

+

A: 请检查以下几点:

+
    +
  • 配置Code是否正确
  • +
  • 请求参数格式是否正确
  • +
  • 企业微信应用的配置是否有效
  • +
  • 网络连接是否正常
  • +
+
+
+

Q: 是否支持发送图片或文件?

+

A: 目前仅支持发送文本消息,不支持图片或文件附件。

+
+
+

Q: 消息内容有长度限制吗?

+

A: 根据企业微信API的限制,消息内容不应超过2048个字符。

+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..dc370fc --- /dev/null +++ b/public/index.html @@ -0,0 +1,164 @@ + + + + + + 企业微信通知服务 + + + + + + + + + + + +
+
+
+

+ + 企业微信通知服务 +

+ + + API文档 + +
+
+

轻量级企业微信消息推送服务,一次配置,随时调用

+
+
+ + +
+
第一步:生成回调URL(必须先完成)
+
+ +
+
重要提示
+
必须先生成回调URL并在企业微信后台配置,然后配置IP白名单,最后才能获取成员列表
+
+
+ +
+
+ + +
+
+ + +
+ 用于验证回调请求的Token +
+
+
+ + +
+ 用于消息加解密的AES密钥 +
+
+ + +
+ + +
+ + + + + +
查找已有配置
+
+
+
+ +
+ + +
+
+
+
+
+ +
+
+ + + + + + + + + + diff --git a/public/script.js b/public/script.js new file mode 100644 index 0000000..7d3e62d --- /dev/null +++ b/public/script.js @@ -0,0 +1,584 @@ +// 企业微信通知配置前端交互脚本 + +document.addEventListener('DOMContentLoaded', function () { + // 元素引用 + const callbackForm = document.getElementById('callbackForm'); + const configForm = document.getElementById('configForm'); + const validateBtn = document.getElementById('validateBtn'); + const userListSection = document.getElementById('userListSection'); + const userList = document.getElementById('userList'); + const lookupForm = document.getElementById('lookupForm'); + const lookupResultDiv = document.getElementById('lookup-result'); + const resultDiv = document.getElementById('result'); + const saveAlert = document.getElementById('save-alert'); + const step1Container = document.getElementById('step1-container'); + const step2Container = document.getElementById('step2-container'); + const callbackResult = document.getElementById('callbackResult'); + + let usersCache = []; + let currentCode = null; // 存储当前的code + + // 第一步:生成回调URL + callbackForm.addEventListener('submit', async function (e) { + e.preventDefault(); + resultDiv.innerHTML = ''; + + const corpid = callbackForm.corpid.value.trim(); + const callbackToken = callbackForm.callback_token.value.trim(); + const encodingAesKey = callbackForm.encoding_aes_key.value.trim(); + + if (!corpid || !callbackToken || !encodingAesKey) { + showError('请填写所有必填项'); + return; + } + if (encodingAesKey.length !== 43) { + showError('EncodingAESKey必须是43位字符'); + return; + } + + const submitBtn = callbackForm.querySelector('button[type=submit]'); + submitBtn.disabled = true; + submitBtn.textContent = '生成中...'; + + try { + const res = await fetch('/api/generate-callback', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + corpid, + callback_token: callbackToken, + encoding_aes_key: encodingAesKey + }) + }); + const data = await res.json(); + if (!res.ok) throw new Error(data.error || '生成失败'); + + currentCode = data.code; + showCallbackResult(data); + + // 显示第二步 + step2Container.classList.remove('hidden'); + gsap.from(step2Container, { opacity: 0, y: 20, duration: 0.5 }); + + // 将CorpID传递到第二步 + configForm.corpid = { value: corpid }; + + } catch (err) { + showError('生成回调URL失败: ' + err.message); + } finally { + submitBtn.disabled = false; + submitBtn.textContent = '生成回调URL'; + } + }); + + // 验证并获取成员列表 + validateBtn.addEventListener('click', async function (e) { + e.preventDefault(); + resultDiv.innerHTML = ''; + userList.innerHTML = ''; + userListSection.classList.add('hidden'); + + const corpid = callbackForm.corpid.value.trim(); // 从第一步获取 + const corpsecret = configForm.corpsecret.value.trim(); + if (!corpid || !corpsecret) { + showError('请填写CorpSecret'); + return; + } + validateBtn.disabled = true; + validateBtn.textContent = '验证中...'; + try { + const res = await fetch('/api/validate', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ corpid, corpsecret }) + }); + const data = await res.json(); + if (!res.ok) throw new Error(data.error || '验证失败'); + usersCache = data.users || []; + if (usersCache.length === 0) { + showError('未获取到任何成员'); + return; + } + userList.innerHTML = usersCache.map(user => + `` + ).join(''); + userListSection.classList.remove('hidden'); + gsap.from(userListSection, { opacity: 0, y: 20, duration: 0.5 }); + } catch (err) { + showError(err.message); + } finally { + validateBtn.disabled = false; + validateBtn.textContent = '验证并获取成员列表'; + } + }); + + // 查找配置 + lookupForm.addEventListener('submit', async (e) => { + e.preventDefault(); + const code = lookupForm.code.value.trim(); + if (!code) return; + + lookupResultDiv.innerHTML = '
'; + + try { + const res = await fetch(`/api/configuration/${code}`); + const data = await res.json(); + + if (!res.ok) throw new Error(data.error || '查找配置失败'); + + // 显示配置信息 + const apiUrl = `/api/notify/${data.code}`; + lookupResultDiv.innerHTML = ` +
+
+

+ + 配置详情 +

+
+

CorpID: ${data.corpid}

+

AgentID: ${data.agentid}

+

接收用户: ${data.touser.join(', ')}

+

描述: ${data.description || '无'}

+

回调状态: ${data.callback_enabled ? '已启用' : '未启用'}

+ ${data.callback_enabled ? `

回调Token: ${data.callback_token || '未设置'}

` : ''} +

创建时间: ${new Date(data.created_at).toLocaleString()}

+
+
+ + +
+ +
API使用说明
+ +
+
+

请求方式

+
+ POST ${apiUrl} +
+
+ +
+

请求头

+
+ Content-Type: application/json +
+
+ +
+

请求参数

+
+ + + + + + + + + + + + + + + + + + + + + + + +
参数名类型必填说明
titleString消息标题,可选
contentString消息内容,必填
+
+
+ +
+

请求示例

+
+
curl -X POST "${apiUrl}" \\
+-H "Content-Type: application/json" \\
+-d '{
+  "title": "服务器告警",
+  "content": "CPU使用率超过90%,请及时处理!"
+}'
+
+
+ +
+

返回示例

+
+
{
+  "message": "发送成功",
+  "response": {
+    "errcode": 0,
+    "errmsg": "ok",
+    "msgid": "MSGID1234567890"
+  }
+}
+
+
+
+
+
+ `; + + lucide.createIcons(); + gsap.from(lookupResultDiv.firstElementChild, { opacity: 0, y: 20, duration: 0.5 }); + + // 绑定编辑和复制按钮事件 + document.getElementById('edit-config-btn').addEventListener('click', (e) => { + const code = e.currentTarget.dataset.code; + // 这里可以添加编辑功能的实现 + showToast('编辑功能待实现'); + }); + + document.getElementById('copy-api-btn').addEventListener('click', (e) => { + const code = e.currentTarget.dataset.code; + navigator.clipboard.writeText(`/api/notify/${code}`); + showToast('API地址已复制到剪贴板'); + }); + + } catch (err) { + lookupResultDiv.innerHTML = ` +
+ + ${err.message} +
+ `; + lucide.createIcons(); + } + }); + + // 第二步:完善配置 + configForm.addEventListener('submit', async function (e) { + e.preventDefault(); + resultDiv.innerHTML = ''; + + if (!currentCode) { + showError('请先完成第一步生成回调URL'); + return; + } + + const corpsecret = configForm.corpsecret.value.trim(); + const agentid = configForm.agentid.value.trim(); + const description = configForm.description.value.trim(); + const checked = userListSection.classList.contains('hidden') + ? [] + : Array.from(userList.querySelectorAll('input[type=checkbox]:checked')).map(cb => cb.value); + if (!corpsecret || !agentid || checked.length === 0) { + showError('请填写所有必填项并选择至少一个成员'); + return; + } + + const payload = { + code: currentCode, + corpsecret, + agentid: Number(agentid), + touser: checked, + description + }; + configForm.querySelector('button[type=submit]').disabled = true; + configForm.querySelector('button[type=submit]').textContent = '完成中...'; + try { + const res = await fetch('/api/complete-config', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(payload) + }); + const data = await res.json(); + if (!res.ok) throw new Error(data.error || '完成失败'); + showFinalResult(data); + + // 显示一次性保存提醒 + saveAlert.classList.remove('hidden'); + gsap.from(saveAlert, { opacity: 0, y: -50, duration: 0.5 }); + setTimeout(() => { + gsap.to(saveAlert, { opacity: 0, y: -50, duration: 0.5, onComplete: () => { + saveAlert.classList.add('hidden'); + saveAlert.style.opacity = 1; + saveAlert.style.transform = 'none'; + }}); + }, 5000); + } catch (err) { + showError(err.message); + } finally { + configForm.querySelector('button[type=submit]').disabled = false; + configForm.querySelector('button[type=submit]').textContent = '完成配置'; + } + }); + + function showError(msg) { + resultDiv.innerHTML = `
${msg}
`; + gsap.from(resultDiv, { opacity: 0, y: 20, duration: 0.5 }); + } + + function showCallbackResult(data) { + callbackResult.innerHTML = ` +
+
+

+ + 回调URL生成成功! +

+ +
+
+
您的配置Code
+
${data.code}
+
+
+
回调URL
+
${window.location.origin}${data.callbackUrl}
+ +
+
+ +
+ +
+
下一步操作
+
+ 1. 复制上方回调URL到企业微信管理后台
+ 2. 配置IP白名单(添加您的服务器IP)
+ 3. 完成下方第二步配置 +
+
+
+
+
+ `; + + // 绑定复制按钮事件 + document.getElementById('copy-callback-url-btn').addEventListener('click', () => { + navigator.clipboard.writeText(window.location.origin + data.callbackUrl); + showToast('回调URL已复制到剪贴板'); + }); + + callbackResult.classList.remove('hidden'); + lucide.createIcons(); + gsap.from(callbackResult.firstElementChild, { opacity: 0, y: 20, duration: 0.5 }); + } + + function showFinalResult(data) { + resultDiv.innerHTML = ` +
+
+

+ + 配置完成! +

+ +
+
+
配置Code
+
${data.code}
+
+
+
通知API地址
+
${window.location.origin}${data.apiUrl}
+ +
+
+
回调地址
+
${window.location.origin}${data.callbackUrl}
+
+
+ +
+ + 配置已完成!您现在可以使用API发送通知,也可以接收企业微信回调消息。 +
+
+
+ `; + + // 绑定复制按钮事件 + document.getElementById('copy-api-url-btn').addEventListener('click', () => { + navigator.clipboard.writeText(window.location.origin + data.apiUrl); + showToast('API地址已复制到剪贴板'); + }); + + lucide.createIcons(); + gsap.from(resultDiv.firstElementChild, { opacity: 0, y: 20, duration: 0.5 }); + } + function showResult(data) { + resultDiv.innerHTML = ` +
+
+

+ + API生成成功! +

+ +
+
+
您的唯一调用ID
+
${data.code}
+
+
+
API地址
+
${data.apiUrl}
+ +
+ ${data.callbackUrl ? ` +
+
回调地址
+
${data.callbackUrl}
+ +
+ + 在企业微信管理后台配置此回调地址以接收消息 +
+
+ ` : ''} +
+ +
API使用说明
+ +
+
+

请求方式

+
+ POST ${data.apiUrl} +
+
+ +
+

请求头

+
+ Content-Type: application/json +
+
+ +
+

请求参数

+
+ + + + + + + + + + + + + + + + + + + + + + + +
参数名类型必填说明
titleString消息标题,可选
contentString消息内容,必填
+
+
+ +
+

请求示例

+
+
curl -X POST "${data.apiUrl}" \\
+-H "Content-Type: application/json" \\
+-d '{
+  "title": "服务器告警",
+  "content": "CPU使用率超过90%,请及时处理!"
+}'
+
+
+ +
+

返回示例

+
+
{
+  "message": "发送成功",
+  "response": {
+    "errcode": 0,
+    "errmsg": "ok",
+    "msgid": "MSGID1234567890"
+  }
+}
+
+
+
+ +
+ + 请妥善保存您的配置Code,它是调用API的唯一凭证。出于安全考虑,它只会显示一次! +
+
+
+ `; + + // 绑定复制按钮事件 + document.getElementById('copy-new-api-btn').addEventListener('click', () => { + navigator.clipboard.writeText(data.apiUrl); + showToast('API地址已复制到剪贴板'); + }); + + // 绑定回调地址复制按钮事件(如果存在) + if (data.callbackUrl) { + document.getElementById('copy-callback-btn').addEventListener('click', () => { + navigator.clipboard.writeText(window.location.origin + data.callbackUrl); + showToast('回调地址已复制到剪贴板'); + }); + } + + // 创建图标 + lucide.createIcons(); + + gsap.from(resultDiv, { opacity: 0, y: 20, duration: 0.5 }); + } + + // 显示提示消息 + function showToast(message) { + const toast = document.createElement('div'); + toast.className = 'toast toast-top toast-center'; + toast.innerHTML = ` +
+ ${message} +
+ `; + document.body.appendChild(toast); + + gsap.fromTo(toast, + { opacity: 0, y: -20 }, + { opacity: 1, y: 0, duration: 0.3 } + ); + + setTimeout(() => { + gsap.to(toast, { + opacity: 0, + y: -20, + duration: 0.3, + onComplete: () => toast.remove() + }); + }, 3000); + } +}); diff --git a/server.js b/server.js new file mode 100644 index 0000000..76b254c --- /dev/null +++ b/server.js @@ -0,0 +1,36 @@ +// 企业微信通知转发服务 - 主入口文件 +// 作者: AI Assistant +// 创建时间: 2025-01-05 + +require('dotenv').config(); +const express = require('express'); +const path = require('path'); +const bodyParser = require('express').json; +const routes = require('./src/api/routes'); + +const app = express(); +const PORT = process.env.PORT || 3000; + +// 为回调接口使用原始文本解析器 +app.use('/api/callback', express.raw({ type: 'text/xml' })); +app.use('/api/callback', express.raw({ type: 'application/xml' })); +app.use('/api/callback', express.raw({ type: 'text/plain' })); + +// 解析JSON请求体(其他接口) +app.use(bodyParser()); + +// 静态资源服务 +app.use('/public', express.static(path.join(__dirname, 'public'))); + +// 路由 +app.use('/', routes); + +// 404处理 +app.use((req, res) => { + res.status(404).json({ error: '未找到资源' }); +}); + +// 启动服务器 +app.listen(PORT, () => { + console.log(`企业微信通知服务已启动,端口: ${PORT}`); +}); diff --git a/src/api/routes.js b/src/api/routes.js new file mode 100644 index 0000000..7c2fe92 --- /dev/null +++ b/src/api/routes.js @@ -0,0 +1,178 @@ +// Express路由定义 +// 包含所有API端点的路由配置 + +const express = require('express'); +const path = require('path'); +const notifier = require('../services/notifier'); +const WeChatService = require('../core/wechat'); +const CryptoService = require('../core/crypto'); + +const router = express.Router(); + +// 环境变量 +const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY || 'default-key-for-development-only'; +const wechat = new WeChatService(); +const crypto = new CryptoService(ENCRYPTION_KEY); + +// 1. GET / 返回前端页面 +router.get('/', (req, res) => { + res.sendFile(path.join(__dirname, '../../public/index.html')); +}); + +// 2. POST /api/validate 验证凭证并获取成员列表 +router.post('/api/validate', async (req, res) => { + const { corpid, corpsecret } = req.body; + if (!corpid || !corpsecret) { + return res.status(400).json({ error: '参数不完整' }); + } + try { + const accessToken = await wechat.getToken(corpid, corpsecret); + const users = await wechat.getAllUsers(accessToken); + res.json({ users }); + } catch (err) { + res.status(400).json({ error: err.message || '凭证无效或API请求失败' }); + } +}); + +// 2.1 POST /api/generate-callback 生成回调URL +router.post('/api/generate-callback', async (req, res) => { + const { corpid, callback_token, encoding_aes_key } = req.body; + if (!corpid || !callback_token || !encoding_aes_key) { + return res.status(400).json({ error: '回调配置参数不完整' }); + } + if (encoding_aes_key.length !== 43) { + return res.status(400).json({ error: 'EncodingAESKey必须是43位字符' }); + } + try { + // 生成回调配置(不需要成员列表) + const result = await notifier.createCallbackConfiguration({ + corpid, + callback_token, + encoding_aes_key + }); + res.json(result); + } catch (err) { + res.status(500).json({ error: err.message || '生成回调URL失败' }); + } +}); + +// 3. POST /api/complete-config 完善配置(第二步) +router.post('/api/complete-config', async (req, res) => { + try { + const { code, corpsecret, agentid, touser, description } = req.body; + const result = await notifier.completeConfiguration({ code, corpsecret, agentid, touser, description }); + res.status(201).json(result); + } catch (err) { + res.status(500).json({ error: err.message || '完善配置失败' }); + } +}); + +// 3.1 POST /api/configure 保存配置并生成唯一code(保持兼容性) +router.post('/api/configure', async (req, res) => { + try { + const { corpid, corpsecret, agentid, touser, description } = req.body; + const result = await notifier.createConfiguration({ corpid, corpsecret, agentid, touser, description }); + res.status(201).json(result); + } catch (err) { + res.status(500).json({ error: err.message || '配置保存失败' }); + } +}); + +// 4. POST /api/notify/:code 发送通知 +router.post('/api/notify/:code', async (req, res) => { + const { code } = req.params; + const { title, content } = req.body; + if (!content) { + return res.status(400).json({ error: '消息内容不能为空' }); + } + try { + const result = await notifier.sendNotification(code, title, content); + res.json({ message: '发送成功', response: result }); + } catch (err) { + if (err.message && err.message.includes('未找到配置')) { + res.status(404).json({ error: err.message }); + } else { + res.status(500).json({ error: err.message || '消息发送失败' }); + } + } +}); + +// 5. GET /api/configuration/:code 获取配置信息 +router.get('/api/configuration/:code', async (req, res) => { + const { code } = req.params; + try { + const config = await notifier.getConfiguration(code); + if (!config) { + return res.status(404).json({ error: '未找到配置' }); + } + res.json(config); + } catch (err) { + res.status(500).json({ error: err.message || '获取配置失败' }); + } +}); + +// 6. PUT /api/configuration/:code 更新配置 +router.put('/api/configuration/:code', async (req, res) => { + const { code } = req.params; + try { + const result = await notifier.updateConfiguration(code, req.body); + res.json(result); + } catch (err) { + res.status(500).json({ error: err.message || '更新配置失败' }); + } +}); + +// 7. GET /api/callback/:code 企业微信回调验证 +router.get('/api/callback/:code', async (req, res) => { + const { code } = req.params; + const { msg_signature, timestamp, nonce, echostr } = req.query; + + if (!msg_signature || !timestamp || !nonce || !echostr) { + return res.status(400).json({ error: '缺少必要的验证参数' }); + } + + try { + const result = await notifier.handleCallbackVerification(code, msg_signature, timestamp, nonce, echostr); + if (result.success) { + res.send(result.data); + } else { + console.error('回调验证失败:', result.error); + res.status(400).send('failed'); + } + } catch (err) { + console.error('回调验证异常:', err.message); + res.status(500).send('failed'); + } +}); + +// 8. POST /api/callback/:code 企业微信回调消息接收 +router.post('/api/callback/:code', async (req, res) => { + const { code } = req.params; + const { msg_signature, timestamp, nonce } = req.query; + + if (!msg_signature || !timestamp || !nonce) { + return res.status(400).json({ error: '缺少必要的验证参数' }); + } + + try { + // 获取加密的消息数据(从原始body转换为字符串) + const encryptedData = req.body ? req.body.toString('utf8') : ''; + if (!encryptedData) { + return res.status(400).json({ error: '消息数据为空' }); + } + + const result = await notifier.handleCallbackMessage(code, encryptedData, msg_signature, timestamp, nonce); + if (result.success) { + console.log('回调消息处理成功:', result.message); + res.send('ok'); + } else { + console.error('回调消息处理失败:', result.error); + res.status(400).send('failed'); + } + } catch (err) { + console.error('回调消息处理异常:', err.message); + res.status(500).send('failed'); + } +}); + +module.exports = router; diff --git a/src/core/crypto.js b/src/core/crypto.js new file mode 100644 index 0000000..128bdcc --- /dev/null +++ b/src/core/crypto.js @@ -0,0 +1,50 @@ +// 加密/解密模块 +// 使用Node.js crypto模块进行数据加密 + +const crypto = require('crypto'); + +class CryptoService { + constructor(encryptionKey) { + // 确保密钥长度为32字节 + this.key = Buffer.from((encryptionKey || '').padEnd(32, '0').slice(0, 32)); + this.algorithm = 'aes-256-cbc'; + this.ivLength = 16; + } + + // 加密函数 + encrypt(text) { + try { + const iv = crypto.randomBytes(this.ivLength); + const cipher = crypto.createCipheriv(this.algorithm, this.key, iv); + let encrypted = cipher.update(text, 'utf8', 'hex'); + encrypted += cipher.final('hex'); + // 返回iv:密文 + return iv.toString('hex') + ':' + encrypted; + } catch (error) { + console.error('加密失败:', error.message); + throw new Error('数据加密失败'); + } + } + + // 解密函数 + decrypt(encryptedText) { + try { + const [ivHex, encrypted] = encryptedText.split(':'); + const iv = Buffer.from(ivHex, 'hex'); + const decipher = crypto.createDecipheriv(this.algorithm, this.key, iv); + let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + decrypted += decipher.final('utf8'); + return decrypted; + } catch (error) { + console.error('解密失败:', error.message); + throw new Error('数据解密失败'); + } + } + + // 生成随机密钥 + static generateKey() { + return crypto.randomBytes(32).toString('hex'); + } +} + +module.exports = CryptoService; \ No newline at end of file diff --git a/src/core/database.js b/src/core/database.js new file mode 100644 index 0000000..0a68d7f --- /dev/null +++ b/src/core/database.js @@ -0,0 +1,251 @@ +// 数据库初始化与操作模块 +// 管理SQLite数据库连接和表结构 + +const sqlite3 = require('sqlite3').verbose(); +const path = require('path'); + +class Database { + constructor(dbPath) { + this.dbPath = dbPath; + this.db = null; + } + + // 初始化数据库连接和表结构 + async init() { + return new Promise((resolve, reject) => { + // 确保数据库目录存在 + const dbDir = path.dirname(this.dbPath); + const fs = require('fs'); + if (!fs.existsSync(dbDir)) { + fs.mkdirSync(dbDir, { recursive: true }); + } + + // 创建数据库连接 + this.db = new sqlite3.Database(this.dbPath, (err) => { + if (err) { + console.error('数据库连接失败:', err.message); + reject(err); + return; + } + console.log('SQLite数据库连接成功'); + + // 创建configurations表 + this.createTables() + .then(() => resolve()) + .catch(reject); + }); + }); + } + + // 创建数据表 + async createTables() { + return new Promise((resolve, reject) => { + const createTableSQL = ` + CREATE TABLE IF NOT EXISTS configurations ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + code TEXT UNIQUE NOT NULL, + corpid TEXT NOT NULL, + encrypted_corpsecret TEXT NOT NULL, + agentid INTEGER NOT NULL, + touser TEXT NOT NULL, + description TEXT, + callback_token TEXT, + encrypted_encoding_aes_key TEXT, + callback_enabled BOOLEAN DEFAULT 0, + created_at DATETIME DEFAULT CURRENT_TIMESTAMP, + UNIQUE(corpid, agentid, touser) + ) + `; + + this.db.run(createTableSQL, (err) => { + if (err) { + console.error('创建表失败:', err.message); + reject(err); + return; + } + console.log('数据表创建成功'); + resolve(); + }); + }); + } + + // 保存配置 + async saveConfiguration(config) { + return new Promise((resolve, reject) => { + const { + code, corpid, encrypted_corpsecret, agentid, touser, description, + callback_token, encrypted_encoding_aes_key, callback_enabled + } = config; + const sql = ` + INSERT INTO configurations ( + code, corpid, encrypted_corpsecret, agentid, touser, description, + callback_token, encrypted_encoding_aes_key, callback_enabled + ) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) + `; + + this.db.run(sql, [ + code, corpid, encrypted_corpsecret, agentid, touser, description, + callback_token, encrypted_encoding_aes_key, callback_enabled || 0 + ], function(err) { + if (err) { + console.error('保存配置失败:', err.message); + reject(err); + return; + } + console.log('配置保存成功, ID:', this.lastID); + resolve({ id: this.lastID, code }); + }); + }); + } + + // 根据code获取配置 + async getConfigurationByCode(code) { + return new Promise((resolve, reject) => { + const sql = `SELECT * FROM configurations WHERE code = ?`; + + this.db.get(sql, [code], (err, row) => { + if (err) { + console.error('查询配置失败:', err.message); + reject(err); + return; + } + resolve(row); + }); + }); + } + + // 更新配置 + async updateConfiguration(config) { + return new Promise((resolve, reject) => { + const { + code, corpid, encrypted_corpsecret, agentid, touser, description, + callback_token, encrypted_encoding_aes_key, callback_enabled + } = config; + const sql = ` + UPDATE configurations + SET corpid = ?, encrypted_corpsecret = ?, agentid = ?, touser = ?, description = ?, + callback_token = ?, encrypted_encoding_aes_key = ?, callback_enabled = ? + WHERE code = ? + `; + this.db.run(sql, [ + corpid, encrypted_corpsecret, agentid, touser, description, + callback_token, encrypted_encoding_aes_key, callback_enabled, + code + ], function(err) { + if (err) { + console.error('更新配置失败:', err.message); + reject(err); + return; + } + console.log('配置更新成功, code:', code); + resolve({ code }); + }); + }); + } + + // 根据字段查询配置 + async getConfigurationByFields(corpid, agentid, touser) { + return new Promise((resolve, reject) => { + const sql = `SELECT * FROM configurations WHERE corpid = ? AND agentid = ? AND touser = ?`; + this.db.get(sql, [corpid, agentid, touser], (err, row) => { + if (err) { + console.error('查询配置失败:', err.message); + reject(err); + return; + } + resolve(row); + }); + }); + } + + // 根据完整字段查询配置(包括回调配置) + async getConfigurationByCompleteFields(corpid, agentid, touser, callback_enabled, callback_token) { + return new Promise((resolve, reject) => { + const sql = `SELECT * FROM configurations WHERE corpid = ? AND agentid = ? AND touser = ? AND callback_enabled = ? AND (callback_token = ? OR (callback_token IS NULL AND ? IS NULL))`; + this.db.get(sql, [corpid, agentid, touser, callback_enabled, callback_token, callback_token], (err, row) => { + if (err) { + console.error('查询完整配置失败:', err.message); + reject(err); + return; + } + resolve(row); + }); + }); + } + + // 保存回调配置(第一步) + async saveCallbackConfiguration(config) { + return new Promise((resolve, reject) => { + const { code, corpid, callback_token, encrypted_encoding_aes_key } = config; + const sql = ` + INSERT INTO configurations ( + code, corpid, callback_token, encrypted_encoding_aes_key, callback_enabled, + encrypted_corpsecret, agentid, touser, description + ) + VALUES (?, ?, ?, ?, 1, '', 0, '', '') + `; + + this.db.run(sql, [code, corpid, callback_token, encrypted_encoding_aes_key], function(err) { + if (err) { + console.error('保存回调配置失败:', err.message); + reject(err); + return; + } + console.log('回调配置保存成功, ID:', this.lastID); + resolve({ id: this.lastID, code }); + }); + }); + } + + // 查询回调配置 + async getCallbackConfiguration(corpid, callback_token) { + return new Promise((resolve, reject) => { + const sql = `SELECT * FROM configurations WHERE corpid = ? AND callback_token = ? AND callback_enabled = 1`; + this.db.get(sql, [corpid, callback_token], (err, row) => { + if (err) { + console.error('查询回调配置失败:', err.message); + reject(err); + return; + } + resolve(row); + }); + }); + } + + // 完善配置(第二步) + async completeConfiguration(config) { + return new Promise((resolve, reject) => { + const { code, encrypted_corpsecret, agentid, touser, description } = config; + const sql = ` + UPDATE configurations + SET encrypted_corpsecret = ?, agentid = ?, touser = ?, description = ? + WHERE code = ? + `; + this.db.run(sql, [encrypted_corpsecret, agentid, touser, description, code], function(err) { + if (err) { + console.error('完善配置失败:', err.message); + reject(err); + return; + } + console.log('配置完善成功, code:', code); + resolve({ code }); + }); + }); + } + + // 关闭数据库连接 + close() { + if (this.db) { + this.db.close((err) => { + if (err) { + console.error('关闭数据库失败:', err.message); + } else { + console.log('数据库连接已关闭'); + } + }); + } + } +} + +module.exports = Database; diff --git a/src/core/wechat-callback.js b/src/core/wechat-callback.js new file mode 100644 index 0000000..1670aa5 --- /dev/null +++ b/src/core/wechat-callback.js @@ -0,0 +1,95 @@ +// 企业微信回调验证模块 +// 使用官方wxcrypt库实现,与Python WXBizMsgCrypt完全兼容 + +const WXBizMsgCrypt = require('wxcrypt'); +const { x2o } = require('wxcrypt'); // XML解析工具 + +class WeChatCallbackCrypto { + constructor(token, encodingAESKey, corpId) { + this.token = token; + this.encodingAESKey = encodingAESKey; + this.corpId = corpId; + + // 使用官方wxcrypt库 + this.wxcrypt = new WXBizMsgCrypt(token, encodingAESKey, corpId); + } + + /** + * 验证URL - 用于开启回调模式时的验证 + * @param {string} msgSignature - 企业微信加密签名 + * @param {string} timestamp - 时间戳 + * @param {string} nonce - 随机数 + * @param {string} echoStr - 加密的随机字符串 + * @returns {Object} { success: boolean, data: string } + */ + verifyURL(msgSignature, timestamp, nonce, echoStr) { + try { + // 使用官方wxcrypt库进行验证,与Python版本完全兼容 + const decrypted = this.wxcrypt.verifyURL(msgSignature, timestamp, nonce, echoStr); + return { success: true, data: decrypted }; + } catch (error) { + console.error('URL验证失败:', error.message, 'errcode:', error.errcode); + return { + success: false, + error: error.errmsg || error.message, + errcode: error.errcode + }; + } + } + + /** + * 解密消息 + * @param {string} encryptedMsg - 加密的消息 + * @param {string} msgSignature - 消息签名 + * @param {string} timestamp - 时间戳 + * @param {string} nonce - 随机数 + * @returns {Object} { success: boolean, data: string } + */ + decryptMsg(encryptedMsg, msgSignature, timestamp, nonce) { + try { + // 使用官方wxcrypt库进行解密,与Python版本完全兼容 + const decrypted = this.wxcrypt.decryptMsg(msgSignature, timestamp, nonce, encryptedMsg); + return { success: true, data: decrypted }; + } catch (error) { + console.error('消息解密失败:', error.message, 'errcode:', error.errcode); + return { + success: false, + error: error.errmsg || error.message, + errcode: error.errcode + }; + } + } + + + + /** + * 解析XML消息 + * @param {string} xmlString - XML字符串 + * @returns {Object} 解析后的消息对象 + */ + parseXMLMessage(xmlString) { + try { + // 使用wxcrypt库的XML解析工具 + const parsed = x2o(xmlString); + + // 提取消息内容(通常在xml根节点下) + const xml = parsed.xml || parsed; + + return { + fromUserName: xml.FromUserName || '', + toUserName: xml.ToUserName || '', + msgType: xml.MsgType || '', + content: xml.Content || '', + picUrl: xml.PicUrl || '', + msgId: xml.MsgId || '', + agentId: xml.AgentID || '', + createTime: xml.CreateTime || '' + }; + } catch (error) { + console.error('XML解析失败:', error.message); + throw error; + } + } +} + +module.exports = WeChatCallbackCrypto; \ No newline at end of file diff --git a/src/core/wechat.js b/src/core/wechat.js new file mode 100644 index 0000000..ce8601e --- /dev/null +++ b/src/core/wechat.js @@ -0,0 +1,160 @@ +// 企业微信API交互模块 +// 封装与企业微信API的HTTP请求 + +const axios = require('axios'); + +class WeChatService { + constructor(apiBase = 'https://qyapi.weixin.qq.com') { + this.apiBase = apiBase; + this.tokenCache = new Map(); // 缓存access_token + } + + // 获取访问凭证 + async getToken(corpid, corpsecret) { + try { + // 检查缓存 + const cacheKey = `${corpid}_${corpsecret}`; + const cached = this.tokenCache.get(cacheKey); + + if (cached && cached.expires > Date.now()) { + console.log('使用缓存的access_token'); + return cached.token; + } + + // 调用企业微信API获取token + const response = await axios.get(`${this.apiBase}/cgi-bin/gettoken`, { + params: { + corpid: corpid, + corpsecret: corpsecret + } + }); + + const { data } = response; + + if (data.errcode !== 0) { + throw new Error(`获取token失败: ${data.errmsg} (错误码: ${data.errcode})`); + } + + // 缓存token (提前5分钟过期) + const expiresIn = (data.expires_in || 7200) * 1000; + this.tokenCache.set(cacheKey, { + token: data.access_token, + expires: Date.now() + expiresIn - 300000 // 提前5分钟过期 + }); + + console.log('获取access_token成功'); + return data.access_token; + } catch (error) { + console.error('获取access_token失败:', error.message); + throw error; + } + } + + // 发送应用消息 + async sendMessage(accessToken, agentid, touser, message) { + try { + // 构造消息体 + const messageBody = { + touser: Array.isArray(touser) ? touser.join('|') : touser, + msgtype: 'text', + agentid: agentid, + text: { + content: message + } + }; + + // 发送消息 + const response = await axios.post( + `${this.apiBase}/cgi-bin/message/send?access_token=${accessToken}`, + messageBody + ); + + const { data } = response; + + if (data.errcode !== 0) { + throw new Error(`发送消息失败: ${data.errmsg} (错误码: ${data.errcode})`); + } + + console.log('消息发送成功'); + return data; + } catch (error) { + console.error('发送消息失败:', error.message); + throw error; + } + } + + // 获取部门列表 + async getDepartmentList(accessToken) { + try { + const response = await axios.get(`${this.apiBase}/cgi-bin/department/list`, { + params: { + access_token: accessToken + } + }); + + const { data } = response; + + if (data.errcode !== 0) { + throw new Error(`获取部门列表失败: ${data.errmsg} (错误码: ${data.errcode})`); + } + + return data.department || []; + } catch (error) { + console.error('获取部门列表失败:', error.message); + throw error; + } + } + + // 获取部门成员 + async getUserList(accessToken, departmentId = 1) { + try { + const response = await axios.get(`${this.apiBase}/cgi-bin/user/list`, { + params: { + access_token: accessToken, + department_id: departmentId + } + }); + + const { data } = response; + + if (data.errcode !== 0) { + throw new Error(`获取成员列表失败: ${data.errmsg} (错误码: ${data.errcode})`); + } + + return data.userlist || []; + } catch (error) { + console.error('获取成员列表失败:', error.message); + throw error; + } + } + + // 获取所有成员(遍历所有部门) + async getAllUsers(accessToken) { + try { + const departments = await this.getDepartmentList(accessToken); + const allUsers = []; + const userSet = new Set(); // 用于去重 + + for (const dept of departments) { + const users = await this.getUserList(accessToken, dept.id); + users.forEach(user => { + if (!userSet.has(user.userid)) { + userSet.add(user.userid); + allUsers.push({ + userid: user.userid, + name: user.name, + department: dept.name + }); + } + }); + } + + return allUsers; + } catch (error) { + console.error('获取所有成员失败:', error.message); + throw error; + } + } +} + +module.exports = WeChatService; \ No newline at end of file diff --git a/src/services/notifier.js b/src/services/notifier.js new file mode 100644 index 0000000..2bd0fe8 --- /dev/null +++ b/src/services/notifier.js @@ -0,0 +1,391 @@ +// 核心业务逻辑模块 +// 处理配置创建和消息发送的业务逻辑 + +const { v4: uuidv4 } = require('uuid'); +const Database = require('../core/database'); +const CryptoService = require('../core/crypto'); +const WeChatService = require('../core/wechat'); +const WeChatCallbackCrypto = require('../core/wechat-callback'); +const path = require('path'); + +// 环境变量 +const DB_PATH = process.env.DB_PATH || path.join(__dirname, '../../database/notifier.db'); +const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY || 'default-key-for-development-only'; + +const db = new Database(DB_PATH); +const crypto = new CryptoService(ENCRYPTION_KEY); +const wechat = new WeChatService(); + +// 初始化数据库(仅需调用一次) +db.init().catch(console.error); + +/** + * 创建回调配置(第一步) + * @param {Object} config - { corpid, callback_token, encoding_aes_key } + * @returns {Promise<{ code: string, callbackUrl: string }>} + */ +async function createCallbackConfiguration(config) { + const { corpid, callback_token, encoding_aes_key } = config; + if (!corpid || !callback_token || !encoding_aes_key) { + throw new Error('回调配置参数不完整'); + } + if (encoding_aes_key.length !== 43) { + throw new Error('EncodingAESKey必须是43位字符'); + } + + // 检查是否已存在相同的回调配置 + const existingConfig = await db.getCallbackConfiguration(corpid, callback_token); + if (existingConfig) { + console.log('发现重复回调配置,返回已存在的code:', existingConfig.code); + return { + code: existingConfig.code, + callbackUrl: `/api/callback/${existingConfig.code}`, + message: '回调配置已存在,返回现有配置' + }; + } + + // 生成唯一code + const code = uuidv4(); + // 加密encoding_aes_key + const encrypted_encoding_aes_key = crypto.encrypt(encoding_aes_key); + + // 保存回调配置到数据库 + await db.saveCallbackConfiguration({ + code, + corpid, + callback_token, + encrypted_encoding_aes_key + }); + + console.log('回调配置创建成功,code:', code); + + return { + code, + callbackUrl: `/api/callback/${code}` + }; +} + +/** + * 完善配置(第二步) + * @param {Object} config - { code, corpsecret, agentid, touser, description } + * @returns {Promise<{ code: string, apiUrl: string, callbackUrl: string }>} + */ +async function completeConfiguration(config) { + const { code, corpsecret, agentid, touser, description } = config; + if (!code || !corpsecret || !agentid || !touser) { + throw new Error('参数不完整'); + } + + // 检查回调配置是否存在 + const callbackConfig = await db.getConfigurationByCode(code); + if (!callbackConfig) { + throw new Error('回调配置不存在,请先生成回调URL'); + } + + // 加密corpsecret + const encrypted_corpsecret = crypto.encrypt(corpsecret); + const formattedTouser = Array.isArray(touser) ? touser.join('|') : touser; + + // 更新配置 + await db.completeConfiguration({ + code, + encrypted_corpsecret, + agentid, + touser: formattedTouser, + description: description || '' + }); + + console.log('配置完善成功,code:', code); + + return { + code, + apiUrl: `/api/notify/${code}`, + callbackUrl: `/api/callback/${code}` + }; +} + +/** + * 创建配置(原有方法,保持兼容性) + * @param {Object} config - { corpid, corpsecret, agentid, touser, description, callback_token, encoding_aes_key, callback_enabled } + * @returns {Promise<{ code: string, apiUrl: string, callbackUrl?: string }>} + */ +async function createConfiguration(config) { + const { + corpid, corpsecret, agentid, touser, description, + callback_token, encoding_aes_key, callback_enabled + } = config; + if (!corpid || !corpsecret || !agentid || !touser) { + throw new Error('参数不完整'); + } + + // 第一步:优先处理回调配置验证 + if (callback_enabled) { + if (!callback_token || !encoding_aes_key) { + throw new Error('启用回调时必须提供回调Token和EncodingAESKey'); + } + if (encoding_aes_key.length !== 43) { + throw new Error('EncodingAESKey必须是43位字符'); + } + console.log('回调配置验证通过,继续处理配置...'); + } + + // 第二步:检查是否已存在完全相同的配置(包括回调配置) + const formattedTouser = Array.isArray(touser) ? touser.join('|') : touser; + const existingConfig = await db.getConfigurationByCompleteFields( + corpid, + agentid, + formattedTouser, + callback_enabled ? 1 : 0, + callback_token || null + ); + + if (existingConfig) { + console.log('发现重复配置,返回已存在的code:', existingConfig.code); + const result = { + code: existingConfig.code, + apiUrl: `/api/notify/${existingConfig.code}`, + message: '配置已存在,返回现有配置' + }; + if (existingConfig.callback_enabled) { + result.callbackUrl = `/api/callback/${existingConfig.code}`; + } + return result; + } + + // 第三步:生成新配置 + const code = uuidv4(); + // 加密corpsecret + const encrypted_corpsecret = crypto.encrypt(corpsecret); + // 加密encoding_aes_key(如果提供) + const encrypted_encoding_aes_key = encoding_aes_key ? crypto.encrypt(encoding_aes_key) : null; + + // 保存到数据库 + await db.saveConfiguration({ + code, + corpid, + encrypted_corpsecret, + agentid, + touser: formattedTouser, + description: description || '', + callback_token: callback_token || null, + encrypted_encoding_aes_key, + callback_enabled: callback_enabled ? 1 : 0 + }); + + console.log('新配置创建成功,code:', code); + + // 返回API调用信息 + const result = { + code, + apiUrl: `/api/notify/${code}` + }; + if (callback_enabled) { + result.callbackUrl = `/api/callback/${code}`; + } + return result; +} + +/** + * 发送通知 + * @param {string} code - 唯一配置code + * @param {string} title - 消息标题 + * @param {string} content - 消息内容 + * @returns {Promise} - 企业微信API返回结果 + */ +async function sendNotification(code, title, content) { + // 查询配置 + const config = await db.getConfigurationByCode(code); + if (!config) { + throw new Error('无效的code,未找到配置'); + } + // 解密corpsecret + const corpsecret = crypto.decrypt(config.encrypted_corpsecret); + // 获取access_token + const accessToken = await wechat.getToken(config.corpid, corpsecret); + // 组装消息内容 + const message = title ? `${title}\n${content}` : content; + // 发送消息 + const result = await wechat.sendMessage( + accessToken, + config.agentid, + config.touser, + message + ); + return result; +} + +/** + * 获取配置(不返回敏感信息) + * @param {string} code - 唯一配置code + * @returns {Promise} - 配置信息 + */ +async function getConfiguration(code) { + const config = await db.getConfigurationByCode(code); + if (!config) return null; + + const result = { + code: config.code, + corpid: config.corpid, + agentid: config.agentid, + touser: config.touser.split('|'), + description: config.description, + callback_enabled: config.callback_enabled === 1, + created_at: config.created_at + }; + + // 如果启用了回调,添加回调相关信息(不包含敏感数据) + if (config.callback_enabled) { + result.callback_token = config.callback_token; + result.callbackUrl = `/api/callback/${config.code}`; + } + + return result; +} + +/** + * 更新配置 + * @param {string} code - 唯一配置code + * @param {Object} newConfig - 新的配置信息 + * @returns {Promise<{ message: string, code: string, callbackUrl?: string }>} + */ +async function updateConfiguration(code, newConfig) { + const config = await db.getConfigurationByCode(code); + if (!config) { + throw new Error('无效的code,未找到配置'); + } + + // 如果提供了新的corpsecret,则加密 + let encrypted_corpsecret = config.encrypted_corpsecret; + if (newConfig.corpsecret) { + encrypted_corpsecret = crypto.encrypt(newConfig.corpsecret); + } + + // 如果提供了新的encoding_aes_key,则加密 + let encrypted_encoding_aes_key = config.encrypted_encoding_aes_key; + if (newConfig.encoding_aes_key) { + encrypted_encoding_aes_key = crypto.encrypt(newConfig.encoding_aes_key); + } + + // 更新数据库 + await db.updateConfiguration({ + code, + corpid: newConfig.corpid || config.corpid, + encrypted_corpsecret, + agentid: newConfig.agentid || config.agentid, + touser: newConfig.touser ? (Array.isArray(newConfig.touser) ? newConfig.touser.join('|') : newConfig.touser) : config.touser, + description: newConfig.description !== undefined ? newConfig.description : config.description, + callback_token: newConfig.callback_token !== undefined ? newConfig.callback_token : config.callback_token, + encrypted_encoding_aes_key, + callback_enabled: newConfig.callback_enabled !== undefined ? (newConfig.callback_enabled ? 1 : 0) : config.callback_enabled + }); + + const result = { message: '配置更新成功', code }; + if (newConfig.callback_enabled || config.callback_enabled) { + result.callbackUrl = `/api/callback/${code}`; + } + return result; +} + +/** + * 处理回调验证 + * @param {string} code - 唯一配置code + * @param {string} msgSignature - 消息签名 + * @param {string} timestamp - 时间戳 + * @param {string} nonce - 随机数 + * @param {string} echoStr - 回显字符串 + * @returns {Promise<{ success: boolean, data?: string, error?: string }>} + */ +async function handleCallbackVerification(code, msgSignature, timestamp, nonce, echoStr) { + try { + // 查询配置 + const config = await db.getConfigurationByCode(code); + if (!config || !config.callback_enabled) { + return { success: false, error: '回调未启用或配置不存在' }; + } + + if (!config.callback_token || !config.encrypted_encoding_aes_key) { + return { success: false, error: '回调配置不完整' }; + } + + // 解密encoding_aes_key + const encodingAESKey = crypto.decrypt(config.encrypted_encoding_aes_key); + + // 创建回调加密实例 + const callbackCrypto = new WeChatCallbackCrypto( + config.callback_token, + encodingAESKey, + config.corpid + ); + + // 验证URL + const result = callbackCrypto.verifyURL(msgSignature, timestamp, nonce, echoStr); + return result; + } catch (error) { + console.error('回调验证失败:', error.message); + return { success: false, error: error.message }; + } +} + +/** + * 处理回调消息 + * @param {string} code - 唯一配置code + * @param {string} encryptedData - 加密的消息数据 + * @param {string} msgSignature - 消息签名 + * @param {string} timestamp - 时间戳 + * @param {string} nonce - 随机数 + * @returns {Promise<{ success: boolean, message?: Object, error?: string }>} + */ +async function handleCallbackMessage(code, encryptedData, msgSignature, timestamp, nonce) { + try { + // 查询配置 + const config = await db.getConfigurationByCode(code); + if (!config || !config.callback_enabled) { + return { success: false, error: '回调未启用或配置不存在' }; + } + + if (!config.callback_token || !config.encrypted_encoding_aes_key) { + return { success: false, error: '回调配置不完整' }; + } + + // 解密encoding_aes_key + const encodingAESKey = crypto.decrypt(config.encrypted_encoding_aes_key); + + // 创建回调加密实例 + const callbackCrypto = new WeChatCallbackCrypto( + config.callback_token, + encodingAESKey, + config.corpid + ); + + // 解密消息 + const decryptResult = callbackCrypto.decryptMsg(encryptedData, msgSignature, timestamp, nonce); + if (!decryptResult.success) { + return decryptResult; + } + + // 解析XML消息 + const message = callbackCrypto.parseXMLMessage(decryptResult.data); + + // 记录消息日志 + console.log(`[回调消息] Code: ${code}, 发送者: ${message.fromUserName}, 类型: ${message.msgType}`); + if (message.msgType === 'text') { + console.log(`[回调消息] 内容: ${message.content}`); + } + + return { success: true, message }; + } catch (error) { + console.error('回调消息处理失败:', error.message); + return { success: false, error: error.message }; + } +} + +module.exports = { + createCallbackConfiguration, + completeConfiguration, + createConfiguration, + sendNotification, + getConfiguration, + updateConfiguration, + handleCallbackVerification, + handleCallbackMessage +};