commit 86c7e4359cc41342762d63b5cd3ed9a0114f5b14 Author: Matrix Bot Project Date: Fri Nov 20 23:23:04 2026 +0800 Release room-scoped Matrix bot plugins and room configuration diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cef2684 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,17 @@ +node_modules +dist +coverage +coverage-integration +data +*.db +*.db-journal +*.db-wal +*.db-shm +.env +.env.* +!.env.example +.git +.gitignore +*.md +# 实际配置含密码,不打进镜像;运行时由 compose volume 挂载 +config/bots.yaml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9beb85f --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +DATABASE_URL="file:./dev.db" +BOT_CONFIG_PATH="./config/bots.yaml" +DRY_RUN=true +BOT_PASSWORD="replace-me" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a022fa9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +node_modules +dist +coverage +coverage-integration +*.db +*.db-journal +*.db-wal +*.db-shm +.env +.env.* +!.env.example + +# 实际配置(含账号密码),不进版本库;从 config/bots.example.yaml 复制后填写 +config/bots.yaml + +# 本地运行数据目录(SQLite 等),只保留占位文件 +/data/* +!/data/.gitkeep diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..be7127d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +# Use glibc for compatibility with the native encryption and database engines. +FROM node:22-slim AS build +WORKDIR /app +# openssl: Prisma 引擎;ca-certificates: postinstall 从 github 下载加密二进制。 +RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates \ + && rm -rf /var/lib/apt/lists/* +COPY package*.json ./ +RUN npm ci +COPY src ./src +COPY prisma ./prisma +COPY tsconfig*.json nest-cli.json ./ +RUN npm run prisma:generate && npm run build + +FROM node:22-slim AS runtime +WORKDIR /app +ENV NODE_ENV=production +RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates \ + && rm -rf /var/lib/apt/lists/* +COPY package*.json ./ +RUN npm ci --omit=dev +COPY --from=build /app/dist ./dist +COPY --from=build /app/node_modules/.prisma ./node_modules/.prisma +COPY --from=build /app/node_modules/@prisma ./node_modules/@prisma +COPY prisma ./prisma +COPY config/bots.example.yaml ./config/bots.example.yaml +COPY docker-entrypoint.sh ./ +RUN chmod +x docker-entrypoint.sh +# 数据目录(运行时由 compose 把宿主 ./data 挂载到此;含 SQLite 与加密 store)。 +RUN mkdir -p /app/data /app/plugins +ENTRYPOINT ["./docker-entrypoint.sh"] diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..ae49d0d --- /dev/null +++ b/README.en.md @@ -0,0 +1,126 @@ +# Matrix plugin bot + +[中文](README.md) + +A NestJS / TypeScript host for room-scoped Matrix plugins. The host owns account sessions, encryption, command routing, permissions, localization, scheduling and storage. Installed plugins can be enabled or disabled from a managed room without restarting the host. + +Built-in plugins: + +- `checkin` / `签到`: calendar-day check-ins, read-only reports and optional inactive-member cleanup. +- `room-manager` / `成员管理` / `权限同步`: independent business roles, optional Matrix power mapping and membership reconciliation. + +## Commands + +Commands accept `!`, `!` or `/`. Some Matrix clients intercept slash commands; use `!` when a slash command is not sent as a room message. English command words are case-insensitive. Chinese aliases and English aliases invoke the same handlers. Replies use the room's configured language; administrators can change it with `!language en` or `!语言 中文`. + +**The ASCII `!` and fullwidth `!` prefixes are interchangeable** for both English and Chinese commands. Send any one command in a row for the same result. + +| Action | ASCII + English | Fullwidth + English | ASCII + Chinese | Fullwidth + Chinese | +| --- | --- | --- | --- | --- | +| Check in | `!checkin` | `!checkin` | `!签到` | `!签到` | +| View your record | `!list` | `!list` | `!查询` | `!查询` | +| Show help | `!help` | `!help` | `!帮助` | `!帮助` | + +`签到` and `帮助` also work as standalone messages. Queries require a prefix. + +### Host commands + +| English | 中文 | Permission | +| --- | --- | --- | +| `!help` | `!帮助` or `帮助` | Everyone; help lists commands currently available | +| `!ping` | `!在线` | Everyone | +| `!echo ` | `!复述 <文本>` | Everyone | +| `!plugin list` / `!plugin status` | `!插件 列表` / `!插件 状态` | Everyone; error detail is admin-only | +| `!plugin enable ` | `!插件 启用 <名称>` | Administrator | +| `!plugin disable ` | `!插件 停用 <名称>` / `!插件 禁用 <名称>` | Administrator | +| `!language zh-CN` / `!language en` | `!语言 中文` / `!语言 英文` | Administrator | +| `!audit` | `!操作记录` | Administrator; latest 10 of up to 200 retained entries per room | + +An administrator is a user in the room's `admins` list or with a native Matrix power level at least `adminPowerLevel` (default 100). Lookup failures deny access. Business roles do not grant administrator privileges. + +Administrators can inspect the current room ID, language, timezone and report settings with `/config` or `!config`. `!config language en` applies immediately. `!config reports off` applies the next time the check-in plugin starts. + +If a domainless room ID was configured with an extra server suffix, send `!config` in the actual room, then `!config bind`. Recovery requires a unique candidate, a sender listed in `admins` with sufficient native room power, and bot membership in the actual room but not the configured room. The database stores the correction for the next service start and keeps the original data scope. The command requires a readable message and cannot restore missing encryption keys. + +### Check-in commands + +| English | 中文 | Effect | +| --- | --- | --- | +| `!checkin` | `!签到` or `签到` | Check in once per local calendar date | +| `!list` | `!查询` | Read own summary | +| `!list ` / `!list all` | `!查询 <用户ID>` / `!查询 全部` | Other users and all records require administrator access | +| `!list [userId\|all] --raw` | `!查询 [用户ID\|全部] --原始` | Administrator; JSON summary | +| `!report daily [YYYY-MM-DD]` | `!日报 [YYYY-MM-DD]` | Administrator; read-only report | +| `!report monthly [YYYY-MM]` | `!月报 [YYYY-MM]` | Administrator; read-only report | +| `!cleanup preview` | `!清理 预览` | Administrator; preview candidates | +| `!cleanup confirm ` | `!清理 确认 <确认码>` | Administrator; execute the previewed candidates after revalidation | + +Check-ins are unique by account, room, user and calendar date. Day boundaries use the room's explicit `timeZone` (default `Asia/Shanghai`), independently of report scheduling. Reports never clear records. Levels use the total number of known check-ins: Bronze 1–7, Silver 8–14, Gold 15–29, Platinum 30–44, Diamond 45+. + +Scheduled daily reports cover the preceding calendar date at 03:00; monthly reports cover the preceding month at 00:05 on the first day. The plugin checks due periods once per minute. Checkpoints survive restarts; after downtime it sends the latest due report with a catch-up notice rather than flooding the room with every missed report. Historical dates remain queryable. Initial activation establishes a checkpoint without sending old reports. Sending and checkpointing are not a distributed transaction: a crash between them can duplicate a notification, but cannot duplicate check-ins or reset counts. + +Daily reports compare historical check-ins with **current** membership, not a historical membership snapshot. Legacy migration preserves only the history actually available in the old schema; see [upgrade notes](docs/UPGRADE.md). + +`cleanupEnabled` permits explicit preview/confirmation. `autoCleanup` additionally permits automatic daily cleanup after 03:00. Both default to false. Automatic cleanup is not run in the enable hook; the next scheduled check may run it if it is explicitly enabled and due. Members with no known check-in, members who checked in today, listed exemptions and administrators are excluded. Permission read failures skip the member. Cleanup removes members from the current control room and never deletes their check-in history. + +### Membership commands + +| English | 中文 | Effect | +| --- | --- | --- | +| `!access status` | `!成员管理 状态` | Show mode and automatic action switches | +| `!role set core\|member\|restricted` | `!身份 设置 <用户ID> 核心\|普通\|受限` | Preview an independent business-role change | +| `!access preview [userId]` / `!access reconcile [userId]` | `!成员管理 预览 [用户ID]` / `!成员管理 核对 [用户ID]` | Preview reconciliation | +| `!access confirm ` | `!成员管理 确认 <确认码>` | Apply a preview after rechecking current state | + +All membership commands require administrator access. Confirmations are bound to the initiating administrator, room and plugin; expire after five minutes; are single-use; and are invalidated when the plugin is re-enabled. A new preview replaces that administrator's previous preview for the same operation. + +| Business role | Intended membership | +| --- | --- | +| `core` / 核心 | Invite to work rooms 1 and 2; remove from lost room | +| `member` / 普通 | Remove from work room 1; invite to work room 2; remove from lost room | +| `restricted` / 受限 | Remove from work rooms 1 and 2; invite to lost room | + +Invitations require acceptance by recipients. The bot needs suitable native permissions in each target room. Automatic membership changes are disabled by default. `syncOnJoin`, `syncOnLeave` and `autoReconcile` are independent switches; `autoReconcile` checks current state on enable and every 15 minutes. Previously observed members can be checked after a missed leave when leave synchronization is enabled. Members never observed by this version cannot be inferred from missing history. + +The default `business` mode keeps business roles separate from Matrix moderation powers. Optional `matrix` mode maps powers to membership: `>= levelA` is core, `levelB <= power < levelA` is member, `<= levelC` is restricted. Intermediate values between C and B only remove from the lost room. `syncPowerChanges` is available only in matrix mode. Changing power in the control room still changes the user's native Matrix rights; use business mode when only group access should change. + +`autoCleanup` does not control this plugin. Turning off inactive-member cleanup does not disable separately enabled leave or power synchronization. + +The old `!reset`, `!test ...` and `!level ...` commands return a retirement notice and perform no reset, cleanup or rank mutation. + +## Configuration and deployment + +Copy `.env.example` to `.env` and `config/bots.example.yaml` to `config/bots.yaml`, then supply the deployment's account credentials and room IDs. The configuration accepts multiple accounts and rooms. A room remains managed even when all of its business plugins are disabled. Configure the bot as a member of each control and target room before enabling the relevant features. + +Runtime enable/disable choices and reply language are stored in the database and take precedence over initial configuration defaults after restart. Plugin-specific configuration, room permissions and timezones remain server configuration; changes take effect after restart. Commands do not install packages, accept code or modify server files. + +The following starts the real service when `DRY_RUN=false`: + +```sh +docker compose up -d --build +``` + +For a local installation, install dependencies, generate Prisma's client, initialize a dedicated database and build the application before starting it. `.env` is consumed by Docker Compose; direct Node/Nest startup requires exporting the corresponding environment variables. `DRY_RUN=true` suppresses Matrix transport calls but still initializes storage, migrates legacy data and starts scheduled tasks; use the isolated tests below for validation without touching runtime state. + +Persistent data: + +- `./data`: application SQLite database and plugin states. +- `matrix-crypto` volume: Matrix sessions, device credentials and encryption state. +- `./config`: read-only runtime configuration mount. +- `./plugins`: read-only mount for optional trusted external plugins. + +Back up application storage and encryption/session storage together before upgrading. Keep a single active process per account/database deployment: per-room execution queues and single-use confirmations are coordinated within one process. Daily record uniqueness is additionally enforced by the database, but multiple replicas of the same scheduler are not supported. + +## Development and verification + +```sh +npm ci +npm run prisma:generate +npm run typecheck +npm run build +npm run test:all +``` + +Tests use fake Matrix transports, blocked network APIs and unique temporary SQLite databases. Runtime configuration files are unavailable to tests. Prisma CLI test subprocesses use `RUST_LOG=info` to avoid the Prisma 5.22 error-parser issue with missing SQLite files under `RUST_LOG=warn`. Test cleanup tolerates initialization failure. + +See [plugin development](docs/PLUGINS.md) for the API and a complete external plugin example. New trusted modules require a service restart to be discovered; enabling/disabling already installed plugins does not. Hot replacement of module code and sandboxing untrusted third-party code are not provided. diff --git a/README.md b/README.md new file mode 100644 index 0000000..31040f9 --- /dev/null +++ b/README.md @@ -0,0 +1,155 @@ +# Matrix 插件机器人 + +[English](README.en.md) + +基于 NestJS / TypeScript 的多账号、多房间插件平台。核心统一处理 Matrix 登录、加密、消息分发、权限、中英文命令、定时任务和存储。已安装插件可以在群内启停,不需要重启机器人。 + +内置插件: + +- **签到 `checkin`**:按业务日期签到、查询统计、可选的长期未签到成员清理。 +- **成员管理 `room-manager`**:独立业务身份、可选的 Matrix 权限映射及跨群成员同步。 + +## 管理与使用 + +所有命令支持 `!`、`!` 和 `/` 前缀。部分 Matrix 客户端会拦截斜杠命令,遇到这种情况使用 `!`。英文命令不区分大小写,中英文别名执行同一个处理函数。默认回复中文,可由管理员用 `!语言 英文` 切换;配置及语言设置按房间隔离。 + +**英文半角 `!` 和中文全角 `!` 可以互换**,与命令使用中文还是英文无关。每行四种写法效果相同,任选一条发送即可。 + +| 操作 | 半角 + 中文 | 全角 + 中文 | 半角 + 英文 | 全角 + 英文 | +| --- | --- | --- | --- | --- | +| 签到 | `!签到` | `!签到` | `!checkin` | `!checkin` | +| 查自己的签到记录 | `!查询` | `!查询` | `!list` | `!list` | +| 查看帮助 | `!帮助` | `!帮助` | `!help` | `!help` | + +单独发送 `签到` 或 `帮助` 也可以。查询请带前缀。 + +管理员指房间 `admins` 名单中的用户,或原生 Matrix 权限分达到 `adminPowerLevel` 的用户(默认 100)。读取权限失败时拒绝管理操作。业务身份不会赋予 Matrix 管理权限。 + +### 平台命令 + +| 中文 | English | 权限与效果 | +| --- | --- | --- | +| `!帮助` 或 `帮助` | `!help` | 显示当前已启用功能中有权使用的命令 | +| `!在线` | `!ping` | 回复 pong | +| `!复述 <文本>` | `!echo ` | 复述文本 | +| `!插件 列表` / `!插件 状态` | `!plugin list` / `!plugin status` | 查看插件状态;错误详情仅管理员可见 | +| `!插件 启用 <名称>` | `!plugin enable ` | 管理员;启用当前房间的插件 | +| `!插件 停用 <名称>` / `!插件 禁用 <名称>` | `!plugin disable ` | 管理员;停止插件并保留数据 | +| `!语言 中文` / `!语言 英文` | `!language zh-CN` / `!language en` | 管理员;保存房间回复语言 | +| `!操作记录` | `!audit` | 管理员;查看最近 10 条操作,房间最多保留 200 条 | + +插件名称可用 `签到` / `checkin`、`成员管理` / `权限同步` / `room-manager`。即使所有业务插件均停用,平台管理命令仍然可用。 + +管理员可用 `/config`(`!配置`)查看当前房间 ID、语言、时区和报表设置。`!配置 语言 英文` 立即生效;`!配置 报表 关` 在签到插件下次启动时生效。 + +如果配置给一个无域名的房间 ID 误加了 `:域名`,可在实际房间发送 `!配置` 查看提示,再发 `!配置 绑定`。仅限配置 `admins` 名单内且达到该房间管理权限阈值的人。机器人必须已加入该房间,没有加入旧 ID 对应的房间,且候选房间必须唯一。绑定保存到数据库,保留原配置和数据范围,服务下次启动时使用正确的 ID。此命令需要机器人能够读到消息;缺失的历史解密密钥需要单独处理。 + +### 签到命令 + +| 中文 | English | 权限与效果 | +| --- | --- | --- | +| `签到` 或 `!签到` | `!checkin` | 普通成员;当日签到 | +| `!查询` | `!list` | 普通成员;查询自己的签到摘要 | +| `!查询 <用户ID>` / `!查询 全部` | `!list ` / `!list all` | 查询其他人或全部记录需要管理员权限 | +| `!查询 [用户ID] --原始` | `!list [userId] --raw` | 管理员;返回 JSON 摘要,也可指定全部 / all | +| `!日报 [YYYY-MM-DD]` | `!report daily [YYYY-MM-DD]` | 管理员;只读查询,不重置、不踢人 | +| `!月报 [YYYY-MM]` | `!report monthly [YYYY-MM]` | 管理员;只读查询,不清零 | +| `!清理 预览` | `!cleanup preview` | 管理员;预览长期未签到候选人 | +| `!清理 确认 <确认码>` | `!cleanup confirm ` | 管理员;重新校验后执行预览过的名单 | + +签到按“账号、房间、用户、业务日期”唯一记录。业务日期以配置的 `timeZone` 为准,默认北京时间;午夜即可开始新一天签到,不依赖日报执行。重复发送、切换中英文或重复查询报表都不会增加次数。 + +等级按累计已知签到次数计算:青铜 1–7、白银 8–14、黄金 15–29、铂金 30–44、钻石 45 次及以上。它只用于展示,不决定群权限。旧数据缺少完整历史时不会虚构累计次数,详见升级说明。 + +自动日报在配置时区的每天 03:00 统计前一天,月报在每月 1 日 00:05 统计上月。插件每分钟检查一次到期任务,并保存发送进度。停机后补发最新一期及补发范围说明,不连续刷出所有漏发报表;历史日期仍可查询。首次启用只建立进度,不补发此前报表。 + +报表不删除签到记录。日报的成员名单依据**当前群成员**,不是历史成员快照。发送消息与保存进度并非原子操作,若进程在两者之间退出,恢复后可能重复发送通知,但不会重复记签到或清零统计。 + +### 成员管理命令 + +以下命令均要求管理员权限。 + +| 中文 | English | 效果 | +| --- | --- | --- | +| `!成员管理 状态` | `!access status` | 查看模式与各项自动操作开关 | +| `!身份 设置 <用户ID> 核心/普通/受限` | `!role set core/member/restricted` | 预览业务身份变更;角色参数只填写其中一个值 | +| `!成员管理 预览 [用户ID]` / `!成员管理 核对 [用户ID]` | `!access preview [userId]` / `!access reconcile [userId]` | 预览状态差异,不执行成员操作 | +| `!成员管理 确认 <确认码>` | `!access confirm ` | 重新校验后执行预览中的操作 | + +默认采用独立业务身份,不通过提升原生权限来分配工作群: + +| 身份 | 目标成员状态 | +| --- | --- | +| 核心 / core | 邀请进入工作群 1、2,从失联群移出 | +| 普通 / member | 从工作群 1 移出,邀请进入工作群 2,从失联群移出 | +| 受限 / restricted | 从工作群 1、2 移出,邀请进入失联群 | + +邀请仍需成员接受。机器人需要在目标群中具备相应权限。机器人自身不会被清理或同步;原生管理员不会被成员同步移除。 + +确认码只对发起预览的管理员、当前房间和当前插件有效,五分钟后过期且只能使用一次。新的同类预览替换旧预览,重新启用插件会使旧确认码失效。执行前会检查成员状态、权限和预览是否仍适用,不会把新出现的操作加入原预览名单。 + +## 自动操作开关 + +所有成员变更自动化默认关闭,各开关互相独立。 + +| 配置 | 作用 | +| --- | --- | +| `checkin.cleanupEnabled` | 允许通过预览和确认进行未签到清理 | +| `checkin.autoCleanup` | 额外允许每天 03:00 后自动清理;必须同时开启 cleanupEnabled | +| `room-manager.syncOnJoin` | 加入管理群时按规则同步 | +| `room-manager.syncOnLeave` | 离开管理群时移出工作群并邀请进入失联群 | +| `room-manager.syncPowerChanges` | 按原生权限变化同步;仅 matrix 模式可用 | +| `room-manager.autoReconcile` | 启用时及每 15 分钟按当前状态重新核对 | + +自动清理不会在签到插件的启用钩子中执行;如果明确开启了自动清理且任务到期,后续定时检查可能执行它。豁免名单、管理员、机器人自身、当天已签到和从未有过已知签到记录的成员不会成为清理对象。权限读取失败会跳过并记录。 + +成员管理的自动核对可以补偿已观察到成员的漏处理事件;与离群联动共同开启时,也能处理停机期间这些成员的离群。没有被当前版本观察过的历史成员无法凭空恢复。**关闭签到清理不会关闭成员管理的离群或权限联动。** + +可选 `mode: matrix` 使用原生权限映射:分数达到 A 为核心,B 至 A 之间为普通,达到或低于 C 为受限;C 与 B 之间只从失联群移出。必须满足 `levelA > levelB > levelC`。改变原生权限仍会影响该用户在控制群的管理能力;只想改变工作群准入时使用默认 business 模式。 + +旧 `!reset`、`!test ...`、`!level ...` 仅回复停用说明,不再重置数据、清理成员或手动修改签到等级。 + +## 部署配置 + +复制 `.env.example` 为 `.env`,复制 `config/bots.example.yaml` 为 `config/bots.yaml`,填写部署使用的账号及房间信息。机器人应事先加入管理群和所需目标群。配置支持多个账号、多个房间;每个插件实例的数据按账号和房间隔离。 + +运行时保存的插件启停状态和回复语言优先于配置中的初始默认值。插件规则、管理员名单、房间及时间设置仍由服务器配置管理,修改后重启生效。聊天命令不会下载安装代码,也不会修改服务器文件。 + +以下命令会启动服务,`DRY_RUN=false` 时连接真实 Matrix: + +```sh +docker compose up -d --build +``` + +本地直接使用 Node/Nest 启动时,需要先安装依赖、生成 Prisma 客户端、初始化专用数据库并构建,同时将所需变量导出到进程环境。`.env` 由 Docker Compose 读取;直接启动应用不会自动把该文件全部导入环境。 + +`DRY_RUN=true` 只抑制 Matrix 传输,仍会初始化数据库、运行旧数据迁移并注册定时任务。验证代码请使用下面的隔离测试,不要把 dry-run 当作完全只读检查。 + +持久化内容包括: + +- `./data`:应用数据库、插件数据和启停状态。 +- `matrix-crypto` 卷:Matrix 登录会话、设备凭据及加密状态。 +- `./config`:只读挂载的运行配置。 +- `./plugins`:只读挂载的外部插件目录。 + +升级前应一致备份应用数据及会话加密数据。每套账号及数据库部署只运行一个活动进程;每个房间的命令、事件、定时任务和插件启停在进程内串行协调。数据库额外保证每日签到唯一,但暂不支持多个副本共同执行同一套定时任务及确认操作。 + +## 测试与扩展 + +```sh +npm ci +npm run prisma:generate +npm run typecheck +npm run build +npm run test:all +``` + +测试使用模拟 Matrix、被拦截的网络接口及独立临时 SQLite 数据库,不读取运行配置。测试中的 Prisma CLI 子进程固定使用 `RUST_LOG=info`,绕过 Prisma 5.22 在 `warn` 日志级别下解析新建数据库错误的问题。初始化失败时清理步骤也不会继续访问未创建的数据库对象。 + +新插件无需修改应用模块、消息分发或会话管理代码。放入已配置目录并重启发现后,就能通过插件命令启用。已安装插件的启停无需重启;插件代码热替换和不可信代码沙箱暂未提供。 + +- [升级与旧数据迁移](docs/UPGRADE.md) +- [插件 API 与开发说明](docs/PLUGINS.md) +- [可运行的外部插件示例](examples/greeting.plugin.js) + +目前内置签到和成员管理,RSS 订阅可在此接口上独立扩展,尚未内置 RSS 拉取和解析功能。 diff --git a/config/bots.example.yaml b/config/bots.example.yaml new file mode 100644 index 0000000..17ad7ec --- /dev/null +++ b/config/bots.example.yaml @@ -0,0 +1,45 @@ +accounts: + main: + homeServer: "https://matrix.example.org" + userId: "@bot:example.org" + password: "env(BOT_PASSWORD)" + +# Only server-installed, trusted modules are loaded from these directories. +pluginDirectories: + - "./plugins" + +rooms: + - account: main + roomId: "!control:example.org" + locale: zh-CN + timeZone: Asia/Shanghai + adminPowerLevel: 100 + admins: [] + plugins: + checkin: + enabled: true + config: + reportsEnabled: true + cleanupEnabled: false + autoCleanup: false + kickDays: 30 + whitelist: [] + room-manager: + enabled: false + config: + workRoom1: "!work1:example.org" + workRoom2: "!work2:example.org" + lostRoom: "!lost:example.org" + mode: business + syncPowerChanges: false + syncOnJoin: false + syncOnLeave: false + autoReconcile: false + levelA: 50 + levelB: 0 + levelC: -1 + +# For an existing v1 database, explicitly assign the shared check-in data. +# legacyCheckinTarget: +# account: main +# roomId: "!control:example.org" diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..be4d1b0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +services: + daily-bot: + build: . + container_name: daily-bot-nest + # 仅在异常退出(非 0)时重启。凭据错误会延迟退出以节流,避免无限高频重登。 + restart: on-failure + env_file: .env + environment: + # SQLite 落到挂载卷,保证容器重建后数据不丢。 + DATABASE_URL: "file:/app/data/prod.db" + TZ: "Asia/Shanghai" + # DRY_RUN 由 .env 控制(true=本地不连 Matrix 仅装配验证)。 + volumes: + # 业务数据(Prisma 的 prod.db):宿主 ./data <-> 容器 /app/data,方便直接查看。 + - ./data:/app/data + # Keep encryption state and session credentials in a persistent named volume. + - matrix-crypto:/app/data/matrix + # 配置热改:改完重启容器即可生效。 + - ./config:/app/config:ro + - ./plugins:/app/plugins:ro + +volumes: + # 命名卷:加密会话与设备密钥持久化于此,容器重建/重启不丢,device 固定不再重新验证。 + matrix-crypto: diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 0000000..53c02f4 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +# 启动前确保数据库表已就绪(SQLite/Postgres 均适用)。 +# 幂等:已存在则无操作。 +echo "[entrypoint] syncing database schema..." +RUST_LOG=info node node_modules/prisma/build/index.js db push --skip-generate + +echo "[entrypoint] starting daily-bot-nest..." +exec node dist/main.js diff --git a/docs/PLUGINS.md b/docs/PLUGINS.md new file mode 100644 index 0000000..a8e6593 --- /dev/null +++ b/docs/PLUGINS.md @@ -0,0 +1,45 @@ +# Plugin API v1 + +## Loading + +Built-in plugin files are discovered recursively under the compiled `dist/plugins` directory. External directories are listed in `pluginDirectories`. Entry files end in `.plugin.js` and export a default manifest via CommonJS (`exports.default = ...`). TypeScript built-ins use `.plugin.ts` during development and compile to JavaScript. External TypeScript plugins must be compiled first. External dependencies should be packaged alongside the plugin or installed by the server operator. + +A manifest declares: + +- `apiVersion: 1`, a unique lowercase `id`, a `version`, optional name aliases and bilingual `description`. +- `validate(config)`, returning validated configuration or throwing an error. +- Optional `allowedRooms(config)`, declaring additional target rooms for membership actions and reads. +- `create(context, config)`, returning an instance with a command list and optional `start`, `stop`, `onMember` and `onPowerLevel` hooks. + +Duplicate plugin IDs/name aliases and incompatible manifests reject discovery. Command alias collisions reject that plugin's activation before its start hook runs. A failed activation cancels registered jobs and leaves the host's management commands available. Installed plugins with missing required configuration appear as failed until configuration is corrected and activation is retried. + +Plugins are trusted code running in the host process. Context room checks and abort signals prevent accidental use outside declared scopes, but are not a security sandbox. Only operators install files; chat commands cannot fetch packages or execute uploaded code. + +## Context + +The public interfaces live in `src/core/plugin/types.ts`. The context provides: + +- `account`, `botUserId`, `roomId`, `locale`, `timeZone`, `adminPowerLevel`, `signal`, `now()`. +- `t({ 'zh-CN': ..., en: ... }, values)` for shared interpolation and language selection. +- `db.get/set/create/remove/entries`, already isolated to the account/room/plugin instance. `create` is atomic and returns false for an existing key. +- `send(text)` and `reply(message, text)` to the current room. +- `members(roomId?)`, `power(userId)`, `isAdmin(userId)`; lookup failures propagate from members/power while administrative checks deny on failure. +- `kick(roomId, userId, reason)` and `invite(roomId, userId)` to declared rooms. +- `schedule(name, cron, callback)` using the room timezone. The host serializes callbacks with commands, lifecycle changes and events. +- `audit(action, actor, details)` for room-scoped administrative history. + +Use `context.schedule` instead of unmanaged timers. Disable waits behind already running room work, unregisters scheduled callbacks, aborts the instance signal, calls `stop` and retains data. Async work started outside host callbacks must observe the abort signal and release its resources in `stop`. A stalled plugin can stall its room; plugins should use bounded I/O and cancellation. A process shutdown additionally prevents new transport operations while queues drain. + +Use `context.t` and declarative command aliases instead of branching on language in handlers. `context.locale` is a live getter so an enabled plugin sees language changes immediately. + +## Commands + +Each command declares `id`, `paths`, optional exact `bare` aliases, optional `admin: true`, localized `description` and `usage`, and `run(invocation)`. + +The host matches the longest registered command path, normalizes command words and fullwidth prefixes, preserves quoted arguments and recognizes `--raw` / `--原始`. The handler receives `{ message, args, raw }`. Prefix-free aliases must match the entire message, preventing ordinary conversation from accidentally executing a command. The host handles the primary administrator check, help generation and errors. Plugins should also validate arguments and recheck permissions immediately before delayed or confirmed mutations. + +## Complete example + +Copy `examples/greeting.plugin.js` into an external directory listed in configuration. After restarting to discover the file, use `!plugin enable greeting` or `!插件 启用 问候`. Then `!greet World` and `!问候 世界` invoke the same handler. `!language en` changes the response language without reinstalling the plugin. No changes to the application module, dispatcher or session manager are needed. + +A future RSS plugin can use the same API to register subscription commands, persist subscriptions/deduplication keys and schedule polling. Feed retrieval and parsing belong inside that plugin. The host does not currently include an RSS feed parser or subscription implementation. diff --git a/docs/UPGRADE.md b/docs/UPGRADE.md new file mode 100644 index 0000000..1d41ba0 --- /dev/null +++ b/docs/UPGRADE.md @@ -0,0 +1,36 @@ +# Upgrade from static modules + +## Behavior changes + +- `rooms` replaces static bot-module registration. The host discovers plugin manifests automatically. +- A room's plugin state and reply language persist. After the first activation, stored choices override configuration defaults. +- Check-in day boundaries are local midnight in the configured timezone. Reports no longer reset daily or monthly data. +- Manual report queries are read-only. Legacy reset, test and manual-level commands no longer execute their previous behavior. +- Other-user, all-user and raw check-in queries require administrator access. +- Cleanup requires `cleanupEnabled`; automatic cleanup additionally requires `autoCleanup`. The legacy `autoKick` field is not carried forward as authorization for the new cleanup workflow. +- Membership management defaults to independent business roles. All automatic membership switches default to false. To retain native power mapping, explicitly choose `mode: matrix` and the required synchronization switches. +- Native administrators are exempt from membership removals. Failed permission lookups do not authorize removals. +- Startup does not announce each plugin. Re-enabling a plugin may deliver due report notifications, and explicitly enabled membership reconciliation can run on enable. +- Old command events preceding the current Matrix session process are ignored to avoid replaying administrative actions. Optional reconciliation works from current membership state. + +## Configuration + +Use the example `rooms` format for new deployments. The legacy `bots` format is normalized into one plugin instance per account/room, but it should be replaced during upgrade. Do not mix `rooms` and `bots` in one file. Reports are local to each plugin instance; the old `mainRoom` aggregation setting is no longer used. + +For a legacy `checkin` bot bound to exactly one account and one room, the migration target is inferred. When shared records previously covered multiple rooms, select exactly one destination explicitly: + +```yaml +legacyCheckinTarget: + account: main + roomId: "!control:example.org" +``` + +The destination must exist in `rooms` and have a configured `checkin` plugin. New room configurations using an old database also need this target. Migration refuses an ambiguous destination, an already populated destination without a migration marker, malformed source records or reassignment after a completed migration. + +## Data conversion + +The old table used `checkin` as a shared storage scope. Version 2 scopes records by account, room and plugin. Migration copies records and writes its completion marker in one transaction; it leaves the original rows intact. + +The legacy schema contains the current monthly count and last check-in timestamp, not a complete daily or lifetime history. Migration preserves the known monthly count as a baseline and the last check-in date as a non-counting daily record. This prevents double counting or a second check-in on that date. Earlier daily dates and earlier monthly totals cannot be reconstructed. The displayed cumulative total is therefore the known baseline plus new records, not an invented lifetime total. Legacy levels are recalculated from that known total. Source data remains available for an explicit future reconciliation if additional history is available. + +Take a consistent backup before the first upgraded startup. A code rollback alone does not copy new v2 activity back into legacy records; restore a compatible backup or explicitly reconcile subsequent activity. Migration runs during service initialization, before Matrix sessions start. diff --git a/examples/greeting.plugin.js b/examples/greeting.plugin.js new file mode 100644 index 0000000..fcdb3a4 --- /dev/null +++ b/examples/greeting.plugin.js @@ -0,0 +1,23 @@ +const description = { 'zh-CN': '问候示例', en: 'Greeting example' }; +exports.default = { + apiVersion: 1, + id: 'greeting', + aliases: ['问候'], + version: '1.0.0', + description, + validate(config) { return config; }, + create(ctx) { + return { + commands: [{ + id: 'greeting.send', + paths: [['greet'], ['问候']], + description, + usage: { 'zh-CN': '!问候 <名字>', en: '!greet ' }, + async run({ message, args }) { + await ctx.reply(message, ctx.t({ 'zh-CN': '你好,{name}!', en: 'Hello, {name}!' }, + { name: args.join(' ') || 'World' })); + }, + }], + }; + }, +}; diff --git a/jest.integration.config.js b/jest.integration.config.js new file mode 100644 index 0000000..518e658 --- /dev/null +++ b/jest.integration.config.js @@ -0,0 +1,15 @@ +/** @type {import('jest').Config} */ +module.exports = { + moduleFileExtensions: ['js', 'json', 'ts'], + rootDir: 'src', + testRegex: '\\.integration\\.spec\\.ts$', + transform: { + '^.+\\.ts$': 'ts-jest', + }, + collectCoverageFrom: ['**/*.(t|j)s'], + coverageDirectory: '../coverage-integration', + testEnvironment: 'node', + setupFilesAfterEnv: ['/test/no-network.ts'], + // 集成测试串行执行,避免多个测试同时写同一个 SQLite 文件 + maxWorkers: 1, +}; diff --git a/nest-cli.json b/nest-cli.json new file mode 100644 index 0000000..2f068a1 --- /dev/null +++ b/nest-cli.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true, + "tsConfigPath": "tsconfig.build.json" + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..33fa1d2 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8978 @@ +{ + "name": "daily-bot-nest", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "daily-bot-nest", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@nestjs/common": "^10.4.4", + "@nestjs/core": "^10.4.4", + "@nestjs/platform-express": "^10.4.4", + "@nestjs/schedule": "^4.1.1", + "@prisma/client": "^5.20.0", + "cron": "^3.1.7", + "js-yaml": "^4.1.0", + "matrix-bot-sdk": "^0.8.0", + "prisma": "^5.20.0", + "reflect-metadata": "^0.2.2", + "rxjs": "^7.8.1", + "zod": "^3.23.8" + }, + "devDependencies": { + "@nestjs/cli": "^10.4.5", + "@nestjs/schematics": "^10.1.4", + "@nestjs/testing": "^10.4.4", + "@types/jest": "^29.5.13", + "@types/js-yaml": "^4.0.9", + "@types/node": "^22.7.4", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "ts-loader": "^9.5.1", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.6.2" + } + }, + "node_modules/@angular-devkit/core": { + "version": "17.3.11", + "resolved": "https://registry.npmmirror.com/@angular-devkit/core/-/core-17.3.11.tgz", + "integrity": "sha512-vTNDYNsLIWpYk2I969LMQFH29GTsLzxNk/0cLw5q56ARF0v5sIWfHYwGTS88jdDqIpuuettcSczbxeA7EuAmqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.12.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.1", + "picomatch": "4.0.1", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/core/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmmirror.com/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@angular-devkit/schematics": { + "version": "17.3.11", + "resolved": "https://registry.npmmirror.com/@angular-devkit/schematics/-/schematics-17.3.11.tgz", + "integrity": "sha512-I5wviiIqiFwar9Pdk30Lujk8FczEEc18i22A5c6Z9lbmhPQdTroDnEQdsfXjy404wPe8H62s0I15o4pmMGfTYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "jsonc-parser": "3.2.1", + "magic-string": "0.30.8", + "ora": "5.4.1", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics-cli": { + "version": "17.3.11", + "resolved": "https://registry.npmmirror.com/@angular-devkit/schematics-cli/-/schematics-cli-17.3.11.tgz", + "integrity": "sha512-kcOMqp+PHAKkqRad7Zd7PbpqJ0LqLaNZdY1+k66lLWmkEBozgq8v4ASn/puPWf9Bo0HpCiK+EzLf0VHE8Z/y6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "ansi-colors": "4.1.3", + "inquirer": "9.2.15", + "symbol-observable": "4.0.0", + "yargs-parser": "21.1.1" + }, + "bin": { + "schematics": "bin/schematics.js" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/inquirer": { + "version": "9.2.15", + "resolved": "https://registry.npmmirror.com/inquirer/-/inquirer-9.2.15.tgz", + "integrity": "sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ljharb/through": "^2.3.12", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^3.2.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmmirror.com/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@babel/core/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.29.7.tgz", + "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", + "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", + "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.29.7.tgz", + "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@babel/traverse/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmmirror.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@borewit/text-codec": { + "version": "0.2.2", + "resolved": "https://registry.npmmirror.com/@borewit/text-codec/-/text-codec-0.2.2.tgz", + "integrity": "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmmirror.com/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "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/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmmirror.com/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@ljharb/through": { + "version": "2.3.14", + "resolved": "https://registry.npmmirror.com/@ljharb/through/-/through-2.3.14.tgz", + "integrity": "sha512-ajBvlKpWucBB17FuQYUShqpqy8GRgYEpJW0vWJbUu1CV9lWyrDCapy0lScU8T8Z6qn49sSwJB3+M+evYIdGg+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@matrix-org/matrix-sdk-crypto-nodejs": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/@matrix-org/matrix-sdk-crypto-nodejs/-/matrix-sdk-crypto-nodejs-0.4.0.tgz", + "integrity": "sha512-+qqgpn39XFSbsD0dFjssGO9vHEP7sTyfs8yTpt8vuqWpUpF20QMwpCZi0jpYw7GxjErNTsMshopuo8677DfGEA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "https-proxy-agent": "^7.0.5", + "node-downloader-helper": "^2.1.9" + }, + "engines": { + "node": ">= 22" + } + }, + "node_modules/@nestjs/cli": { + "version": "10.4.9", + "resolved": "https://registry.npmmirror.com/@nestjs/cli/-/cli-10.4.9.tgz", + "integrity": "sha512-s8qYd97bggqeK7Op3iD49X2MpFtW4LVNLAwXFkfbRxKME6IYT7X0muNTJ2+QfI8hpbNx9isWkrLWIp+g5FOhiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "@angular-devkit/schematics-cli": "17.3.11", + "@nestjs/schematics": "^10.0.1", + "chalk": "4.1.2", + "chokidar": "3.6.0", + "cli-table3": "0.6.5", + "commander": "4.1.1", + "fork-ts-checker-webpack-plugin": "9.0.2", + "glob": "10.4.5", + "inquirer": "8.2.6", + "node-emoji": "1.11.0", + "ora": "5.4.1", + "tree-kill": "1.2.2", + "tsconfig-paths": "4.2.0", + "tsconfig-paths-webpack-plugin": "4.2.0", + "typescript": "5.7.2", + "webpack": "5.97.1", + "webpack-node-externals": "3.0.0" + }, + "bin": { + "nest": "bin/nest.js" + }, + "engines": { + "node": ">= 16.14" + }, + "peerDependencies": { + "@swc/cli": "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0", + "@swc/core": "^1.3.62" + }, + "peerDependenciesMeta": { + "@swc/cli": { + "optional": true + }, + "@swc/core": { + "optional": true + } + } + }, + "node_modules/@nestjs/cli/node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nestjs/cli/node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@nestjs/cli/node_modules/webpack": { + "version": "5.97.1", + "resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/@nestjs/common": { + "version": "10.4.22", + "resolved": "https://registry.npmmirror.com/@nestjs/common/-/common-10.4.22.tgz", + "integrity": "sha512-fxJ4v85nDHaqT1PmfNCQ37b/jcv2OojtXTaK1P2uAXhzLf9qq6WNUOFvxBrV4fhQek1EQoT1o9oj5xAZmv3NRw==", + "license": "MIT", + "dependencies": { + "file-type": "20.4.1", + "iterare": "1.2.1", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/core": { + "version": "10.4.22", + "resolved": "https://registry.npmmirror.com/@nestjs/core/-/core-10.4.22.tgz", + "integrity": "sha512-6IX9+VwjiKtCjx+mXVPncpkQ5ZjKfmssOZPFexmT+6T9H9wZ3svpYACAo7+9e7Nr9DZSoRZw3pffkJP7Z0UjaA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.3.0", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, + "node_modules/@nestjs/platform-express": { + "version": "10.4.22", + "resolved": "https://registry.npmmirror.com/@nestjs/platform-express/-/platform-express-10.4.22.tgz", + "integrity": "sha512-ySSq7Py/DFozzZdNDH67m/vHoeVdphDniWBnl6q5QVoXldDdrZIHLXLRMPayTDh5A95nt7jjJzmD4qpTbNQ6tA==", + "license": "MIT", + "dependencies": { + "body-parser": "1.20.4", + "cors": "2.8.5", + "express": "4.22.1", + "multer": "2.0.2", + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0" + } + }, + "node_modules/@nestjs/schedule": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/@nestjs/schedule/-/schedule-4.1.2.tgz", + "integrity": "sha512-hCTQ1lNjIA5EHxeu8VvQu2Ed2DBLS1GSC6uKPYlBiQe6LL9a7zfE9iVSK+zuK8E2odsApteEBmfAQchc8Hx0Gg==", + "license": "MIT", + "dependencies": { + "cron": "3.2.1", + "uuid": "11.0.3" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/@nestjs/schedule/node_modules/cron": { + "version": "3.2.1", + "resolved": "https://registry.npmmirror.com/cron/-/cron-3.2.1.tgz", + "integrity": "sha512-w2n5l49GMmmkBFEsH9FIDhjZ1n1QgTMOCMGuQtOXs5veNiosZmso6bQGuqOJSYAXXrG84WQFVneNk+Yt0Ua9iw==", + "license": "MIT", + "dependencies": { + "@types/luxon": "~3.4.0", + "luxon": "~3.5.0" + } + }, + "node_modules/@nestjs/schematics": { + "version": "10.2.3", + "resolved": "https://registry.npmmirror.com/@nestjs/schematics/-/schematics-10.2.3.tgz", + "integrity": "sha512-4e8gxaCk7DhBxVUly2PjYL4xC2ifDFexCqq1/u4TtivLGXotVk0wHdYuPYe1tHTHuR1lsOkRbfOCpkdTnigLVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "comment-json": "4.2.5", + "jsonc-parser": "3.3.1", + "pluralize": "8.0.0" + }, + "peerDependencies": { + "typescript": ">=4.8.2" + } + }, + "node_modules/@nestjs/schematics/node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nestjs/testing": { + "version": "10.4.22", + "resolved": "https://registry.npmmirror.com/@nestjs/testing/-/testing-10.4.22.tgz", + "integrity": "sha512-HO9aPus3bAedAC+jKVAA8jTdaj4fs5M9fing4giHrcYV2txe9CvC1l1WAjwQ9RDhEHdugjY4y+FZA/U/YqPZrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + } + } + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmmirror.com/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@prisma/client": { + "version": "5.22.0", + "resolved": "https://registry.npmmirror.com/@prisma/client/-/client-5.22.0.tgz", + "integrity": "sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.13" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/debug": { + "version": "5.22.0", + "resolved": "https://registry.npmmirror.com/@prisma/debug/-/debug-5.22.0.tgz", + "integrity": "sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "5.22.0", + "resolved": "https://registry.npmmirror.com/@prisma/engines/-/engines-5.22.0.tgz", + "integrity": "sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/fetch-engine": "5.22.0", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/engines-version": { + "version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "resolved": "https://registry.npmmirror.com/@prisma/engines-version/-/engines-version-5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2.tgz", + "integrity": "sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "5.22.0", + "resolved": "https://registry.npmmirror.com/@prisma/fetch-engine/-/fetch-engine-5.22.0.tgz", + "integrity": "sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "5.22.0", + "resolved": "https://registry.npmmirror.com/@prisma/get-platform/-/get-platform-5.22.0.tgz", + "integrity": "sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0" + } + }, + "node_modules/@selderee/plugin-htmlparser2": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz", + "integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==", + "license": "MIT", + "dependencies": { + "domhandler": "^5.0.3", + "selderee": "^0.11.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.10", + "resolved": "https://registry.npmmirror.com/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmmirror.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tokenizer/inflate": { + "version": "0.2.7", + "resolved": "https://registry.npmmirror.com/@tokenizer/inflate/-/inflate-0.2.7.tgz", + "integrity": "sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "fflate": "^0.8.2", + "token-types": "^6.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@tokenizer/inflate/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@tokenizer/inflate/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmmirror.com/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmmirror.com/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmmirror.com/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmmirror.com/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmmirror.com/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmmirror.com/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmmirror.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.25", + "resolved": "https://registry.npmmirror.com/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "^1" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.8", + "resolved": "https://registry.npmmirror.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz", + "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmmirror.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmmirror.com/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/js-yaml": { + "version": "4.0.9", + "resolved": "https://registry.npmmirror.com/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/luxon": { + "version": "3.4.2", + "resolved": "https://registry.npmmirror.com/@types/luxon/-/luxon-3.4.2.tgz", + "integrity": "sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==", + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmmirror.com/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.19.19", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.19.19.tgz", + "integrity": "sha512-dyh/xO2Fh5bYrfWaaqGrRQQGkNdmYw6AmaAUvYeUMNTWQtvb796ikLdmTchRmOlOiIJ1TDXfWgVx1QkUlQ6Hew==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/qs": { + "version": "6.15.1", + "resolved": "https://registry.npmmirror.com/@types/qs/-/qs-6.15.1.tgz", + "integrity": "sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==", + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmmirror.com/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.10", + "resolved": "https://registry.npmmirror.com/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.6", + "resolved": "https://registry.npmmirror.com/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmmirror.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/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/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/another-json": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/another-json/-/another-json-0.2.0.tgz", + "integrity": "sha512-/Ndrl68UQLhnCdsAzEXLMFuOR546o2qbYRqCglaNHbjXrwG1ayTcdwr3zkSGOGtGXDyR5X9nCFfnyG2AFJIsqg==", + "license": "Apache-2.0" + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmmirror.com/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmmirror.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/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/anymatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/array-timsort": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/array-timsort/-/array-timsort-1.0.3.tgz", + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "license": "MIT" + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmmirror.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "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/baseline-browser-mapping": { + "version": "2.10.33", + "resolved": "https://registry.npmmirror.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.33.tgz", + "integrity": "sha512-bA6+tcSLpz2tIEdDXZPpPTIuxBcC4+w6SieaYyfigIa4h8GlFxbA17v22Vx3JUtuZQj9SgOsnbK+aTBzyDyEuw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/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/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.4", + "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "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.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "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.15", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/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/browserslist": { + "version": "4.28.2", + "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "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/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.9", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "get-intrinsic": "^1.3.0", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001793", + "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz", + "integrity": "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "license": "Apache-2.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmmirror.com/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/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/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmmirror.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmmirror.com/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmmirror.com/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/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/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/comment-json": { + "version": "4.2.5", + "resolved": "https://registry.npmmirror.com/comment-json/-/comment-json-4.2.5.tgz", + "integrity": "sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-timsort": "^1.0.3", + "core-util-is": "^1.0.3", + "esprima": "^4.0.1", + "has-own-prop": "^2.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmmirror.com/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cron": { + "version": "3.5.0", + "resolved": "https://registry.npmmirror.com/cron/-/cron-3.5.0.tgz", + "integrity": "sha512-0eYZqCnapmxYcV06uktql93wNWdlTmmBFP2iYz+JPVcQqlyFYcn1lFuIk4R54pkOmE7mcldTAPZv6X5XA4Q46A==", + "license": "MIT", + "dependencies": { + "@types/luxon": "~3.4.0", + "luxon": "~3.5.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dayjs": { + "version": "1.11.21", + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.21.tgz", + "integrity": "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/dedent": { + "version": "1.7.2", + "resolved": "https://registry.npmmirror.com/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/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/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "license": "MIT", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.366", + "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.366.tgz", + "integrity": "sha512-OlRuhb688YTCzzU3gXPLn6nGyd+F+53INE1qaKKlu6kETErE8FYsyDh0XqXEU+uBRn0MpCzz2vfNwORhkap8qg==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmmirror.com/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.22.1", + "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.22.1.tgz", + "integrity": "sha512-6QEuw3zoX1SJQc7b87aBXke/no+mG2bTBgw29gWMQonLmpEkWoCAVkl+M49e48AZlWzxiDzDZzYdp6kobcyLww==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-2.1.0.tgz", + "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmmirror.com/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "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.14.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/express/node_modules/path-to-regexp": { + "version": "0.1.13", + "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.13.tgz", + "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", + "license": "MIT" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "license": "MIT" + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fflate": { + "version": "0.8.3", + "resolved": "https://registry.npmmirror.com/fflate/-/fflate-0.8.3.tgz", + "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==", + "license": "MIT" + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/file-type": { + "version": "20.4.1", + "resolved": "https://registry.npmmirror.com/file-type/-/file-type-20.4.1.tgz", + "integrity": "sha512-hw9gNZXUfZ02Jo0uafWLaFVPter5/k2rfcrjFJJHX/77xtSDOfJuEFb6oKlFV86FLP1SuyHMW1PSk0U9M5tKkQ==", + "license": "MIT", + "dependencies": { + "@tokenizer/inflate": "^0.2.6", + "strtok3": "^10.2.0", + "token-types": "^6.0.0", + "uint8array-extras": "^1.4.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/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.2", + "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "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.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/fork-ts-checker-webpack-plugin": { + "version": "9.0.2", + "resolved": "https://registry.npmmirror.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-9.0.2.tgz", + "integrity": "sha512-Uochze2R8peoN1XqlSi/rGUkDQpRogtLFocP9+PGu68zk1BDAKXfdeCdyVZpgTk8V8WFVQXdEz426VKjXLO1Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.16.7", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cosmiconfig": "^8.2.0", + "deepmerge": "^4.2.2", + "fs-extra": "^10.0.0", + "memfs": "^3.4.1", + "minimatch": "^3.0.4", + "node-abort-controller": "^3.0.1", + "schema-utils": "^3.1.1", + "semver": "^7.3.5", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">=12.13.0", + "yarn": ">=1.0.0" + }, + "peerDependencies": { + "typescript": ">3.6.0", + "webpack": "^5.11.0" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs-monkey": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/fs-monkey/-/fs-monkey-1.1.0.tgz", + "integrity": "sha512-QMUezzXWII9EV5aTFXW1UBVUO77wYPpjqIF8/AviUCThNeSYZykpoTixUeaNNBwmCev0AMDWMAni+f8Hxb1IFw==", + "dev": true, + "license": "Unlicense" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "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.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/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-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/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/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmmirror.com/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/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/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "license": "BSD-2-Clause" + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.1.1.tgz", + "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.9", + "resolved": "https://registry.npmmirror.com/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmmirror.com/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/har-validator/node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/har-validator/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-own-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/has-own-prop/-/has-own-prop-2.0.0.tgz", + "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/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/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmmirror.com/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/html-to-text": { + "version": "9.0.5", + "resolved": "https://registry.npmmirror.com/html-to-text/-/html-to-text-9.0.5.tgz", + "integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==", + "license": "MIT", + "dependencies": { + "@selderee/plugin-htmlparser2": "^0.11.0", + "deepmerge": "^4.3.1", + "dom-serializer": "^2.0.0", + "htmlparser2": "^8.0.2", + "selderee": "^0.11.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/htmlencode": { + "version": "0.0.4", + "resolved": "https://registry.npmmirror.com/htmlencode/-/htmlencode-0.0.4.tgz", + "integrity": "sha512-0uDvNVpzj/E2TfvLLyyXhKBRvF1y84aZsyRxRXFsQobnHaL4pcaXk+Y9cnFlvnxrBLeXDNq/VJBD+ngdBgQG1w==", + "license": "MIT" + }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "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.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/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.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmmirror.com/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmmirror.com/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-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/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-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/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-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "license": "MIT" + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "license": "MIT" + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "license": "ISC", + "engines": { + "node": ">=6" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmmirror.com/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "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/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "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/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.2.0.tgz", + "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/launder": { + "version": "1.7.1", + "resolved": "https://registry.npmmirror.com/launder/-/launder-1.7.1.tgz", + "integrity": "sha512-mU6WRz5EusL9ZZuiZ5SO4Y6C0P9PAUR9iwdb6bzj4KDihm28DiHFw+/yk9DBH4f+Pv1wuzQ4e2jV3oQ7mkIqvw==", + "license": "MIT", + "dependencies": { + "dayjs": "^1.11.7" + } + }, + "node_modules/leac": { + "version": "0.6.0", + "resolved": "https://registry.npmmirror.com/leac/-/leac-0.6.0.tgz", + "integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==", + "license": "MIT", + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/loader-runner": { + "version": "4.3.2", + "resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.2.tgz", + "integrity": "sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lowdb": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/lowdb/-/lowdb-1.0.0.tgz", + "integrity": "sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.3", + "is-promise": "^2.1.0", + "lodash": "4", + "pify": "^3.0.0", + "steno": "^0.4.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmmirror.com/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/magic-string": { + "version": "0.30.8", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmmirror.com/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/matrix-bot-sdk": { + "version": "0.8.0", + "resolved": "https://registry.npmmirror.com/matrix-bot-sdk/-/matrix-bot-sdk-0.8.0.tgz", + "integrity": "sha512-sCY5UvZfsZhJdCjSc8wZhGhIHOe5cSFSILxx9Zp5a/NEXtmQ6W/bIhefIk4zFAZXetFwXsgvKh1960k1hG5WDw==", + "license": "MIT", + "dependencies": { + "@matrix-org/matrix-sdk-crypto-nodejs": "^0.4.0", + "@types/express": "^4.17.20", + "another-json": "^0.2.0", + "async-lock": "^1.4.0", + "chalk": "4", + "express": "^4.18.2", + "glob-to-regexp": "^0.4.1", + "hash.js": "^1.1.7", + "html-to-text": "^9.0.5", + "htmlencode": "^0.0.4", + "lowdb": "1", + "lru-cache": "^10.0.1", + "mkdirp": "^3.0.1", + "morgan": "^1.10.0", + "postgres": "^3.4.1", + "request": "^2.88.2", + "request-promise": "^4.2.6", + "sanitize-html": "^2.11.0" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/matrix-bot-sdk/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/matrix-bot-sdk/node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "3.5.3", + "resolved": "https://registry.npmmirror.com/memfs/-/memfs-3.5.3.tgz", + "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", + "dev": true, + "license": "Unlicense", + "dependencies": { + "fs-monkey": "^1.0.4" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/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/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "license": "ISC" + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/morgan": { + "version": "1.11.0", + "resolved": "https://registry.npmmirror.com/morgan/-/morgan-1.11.0.tgz", + "integrity": "sha512-zSkVu3t18r39pw4ixfBKvfZi3y2UOqr7d4WYwcj3m8nXpEQK4rPO6GLzs/CExoRgmX3y9EjmmcXqv6jq0SK46g==", + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.4.1", + "on-headers": "~1.1.0" + }, + "engines": { + "node": ">= 0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/multer": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.6.0", + "concat-stream": "^2.0.0", + "mkdirp": "^0.5.6", + "object-assign": "^4.1.1", + "type-is": "^1.6.18", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmmirror.com/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/nanoid": { + "version": "3.3.12", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-downloader-helper": { + "version": "2.1.11", + "resolved": "https://registry.npmmirror.com/node-downloader-helper/-/node-downloader-helper-2.1.11.tgz", + "integrity": "sha512-882fH2C9AWdiPCwz/2beq5t8FGMZK9Dx8TJUOIxzMCbvG7XUKM5BuJwN5f0NKo4SCQK6jR4p2TPm54mYGdGchQ==", + "license": "MIT", + "bin": { + "ndh": "bin/ndh" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmmirror.com/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.47", + "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.47.tgz", + "integrity": "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-srcset": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/parse-srcset/-/parse-srcset-1.0.2.tgz", + "integrity": "sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==", + "license": "MIT" + }, + "node_modules/parseley": { + "version": "0.12.1", + "resolved": "https://registry.npmmirror.com/parseley/-/parseley-0.12.1.tgz", + "integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==", + "license": "MIT", + "dependencies": { + "leac": "^0.6.0", + "peberminta": "^0.9.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmmirror.com/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/peberminta": { + "version": "0.9.0", + "resolved": "https://registry.npmmirror.com/peberminta/-/peberminta-0.9.0.tgz", + "integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==", + "license": "MIT", + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.1.tgz", + "integrity": "sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss": { + "version": "8.5.15", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postgres": { + "version": "3.4.9", + "resolved": "https://registry.npmmirror.com/postgres/-/postgres-3.4.9.tgz", + "integrity": "sha512-GD3qdB0x1z9xgFI6cdRD6xu2Sp2WCOEoe3mtnyB5Ee0XrrL5Pe+e4CCnJrRMnL1zYtRDZmQQVbvOttLnKDLnaw==", + "license": "Unlicense", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prisma": { + "version": "5.22.0", + "resolved": "https://registry.npmmirror.com/prisma/-/prisma-5.22.0.tgz", + "integrity": "sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/engines": "5.22.0" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=16.13" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmmirror.com/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmmirror.com/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/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmmirror.com/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/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.3", + "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/readdirp/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmmirror.com/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "license": "Apache-2.0" + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmmirror.com/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmmirror.com/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request-promise": { + "version": "4.2.6", + "resolved": "https://registry.npmmirror.com/request-promise/-/request-promise-4.2.6.tgz", + "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", + "deprecated": "request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "license": "ISC", + "dependencies": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "license": "ISC", + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.5", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.5.5.tgz", + "integrity": "sha512-mzR4sElr1bfCaPJe7m8ilJ6ZXdDaGoObcYR0ZHSsktM/Lt21MVHj5De30GQH2eiZ1qGRTO7LCAzQsUeXTNexWQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmmirror.com/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/sanitize-html": { + "version": "2.17.4", + "resolved": "https://registry.npmmirror.com/sanitize-html/-/sanitize-html-2.17.4.tgz", + "integrity": "sha512-2HW7v2ol/uAM7sX4hbD8Z59OGWmAPrvjL8E71UWlBcj6m+kcF6ilQBLny+cIgY214QJeJT5tQuxKKqX0SQqjGQ==", + "license": "MIT", + "dependencies": { + "deepmerge": "^4.2.2", + "escape-string-regexp": "^4.0.0", + "htmlparser2": "^10.1.0", + "is-plain-object": "^5.0.0", + "launder": "^1.7.1", + "parse-srcset": "^1.0.2", + "postcss": "^8.3.11" + } + }, + "node_modules/sanitize-html/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/sanitize-html/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sanitize-html/node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/selderee": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/selderee/-/selderee-0.11.0.tgz", + "integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==", + "license": "MIT", + "dependencies": { + "parseley": "^0.12.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmmirror.com/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/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.1", + "resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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": "4.1.0", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmmirror.com/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", + "license": "ISC", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/steno": { + "version": "0.4.4", + "resolved": "https://registry.npmmirror.com/steno/-/steno-0.4.4.tgz", + "integrity": "sha512-EEHMVYHNXFHfGtgjNITnka0aHhiAlo93F7z2/Pwd+g0teG9CnM3JIINM7hVVB5/rhw9voufD7Wukwgtw2uqh6w==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.3" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/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-length": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "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.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strtok3": { + "version": "10.3.5", + "resolved": "https://registry.npmmirror.com/strtok3/-/strtok3-10.3.5.tgz", + "integrity": "sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==", + "license": "MIT", + "dependencies": { + "@tokenizer/token": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser": { + "version": "5.48.0", + "resolved": "https://registry.npmmirror.com/terser/-/terser-5.48.0.tgz", + "integrity": "sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.6.1", + "resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-5.6.1.tgz", + "integrity": "sha512-201R5j+sJpK8nFWwKVyNfZot8FaJbLZDq5evriVzbV1wDtSXDjRUDRfJzHpAaxFDMEhsZL1QkeqM61wgsS3KaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@minify-html/node": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "@swc/css": { + "optional": true + }, + "@swc/html": { + "optional": true + }, + "clean-css": { + "optional": true + }, + "cssnano": { + "optional": true + }, + "csso": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "html-minifier-terser": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "postcss": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/terser/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/terser/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "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/through": { + "version": "2.3.8", + "resolved": "https://registry.npmmirror.com/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmmirror.com/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/token-types": { + "version": "6.1.2", + "resolved": "https://registry.npmmirror.com/token-types/-/token-types-6.1.2.tgz", + "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", + "license": "MIT", + "dependencies": { + "@borewit/text-codec": "^0.2.1", + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-jest": { + "version": "29.4.11", + "resolved": "https://registry.npmmirror.com/ts-jest/-/ts-jest-29.4.11.tgz", + "integrity": "sha512-IrFl7l9AuB/qrNw5quqvAv/hmKMb8dhWOH4jQOGo0Oq8tCeo1O86/iTFG1FaRimgUkF13l4PcepO8ATFT6Ns4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.9", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.8.0", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <7" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-loader": { + "version": "9.6.0", + "resolved": "https://registry.npmmirror.com/ts-loader/-/ts-loader-9.6.0.tgz", + "integrity": "sha512-dsJO0S+T7grTDWTc4a0nTygXGjKncVUpx8Y+af8EvI/D5WgTJby5UEk5eoMCB9EcLQmnvitqh99MqtjtHgAwFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4", + "source-map": "^0.7.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "loader-utils": "*", + "typescript": "*", + "webpack": "^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "loader-utils": { + "optional": true + } + } + }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tsconfig-paths-webpack-plugin": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.2.0.tgz", + "integrity": "sha512-zbem3rfRS8BgeNK50Zz5SIQgXzLafiHjOwUAvk/38/o1jHn/V5QAgVUcz884or7WYcPaH3N2CIfUc2u0ul7UcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.7.0", + "tapable": "^2.2.1", + "tsconfig-paths": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmmirror.com/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/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmmirror.com/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmmirror.com/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/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "license": "MIT", + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/uint8array-extras": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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": "11.0.3", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-11.0.3.tgz", + "integrity": "sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmmirror.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/watchpack": { + "version": "2.5.1", + "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.5.1.tgz", + "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/webpack": { + "version": "5.107.2", + "resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.107.2.tgz", + "integrity": "sha512-v7RhXaJbpMlV0D7hC7lb2EbnxkoeUqf9qhKr6lozx3Q48pmFrqqNRmZFUEGmi7pSwm6fCQ2H1IjvCkHqdpVdjQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.16.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.28.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.22.0", + "es-module-lexer": "^2.1.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "loader-runner": "^4.3.2", + "mime-db": "^1.54.0", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "terser-webpack-plugin": "^5.5.0", + "watchpack": "^2.5.1", + "webpack-sources": "^3.5.0" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-node-externals": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz", + "integrity": "sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-sources": { + "version": "3.5.0", + "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.5.0.tgz", + "integrity": "sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmmirror.com/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a52cfef --- /dev/null +++ b/package.json @@ -0,0 +1,66 @@ +{ + "name": "daily-bot-nest", + "version": "0.1.0", + "description": "Multi-room Matrix bot platform built with NestJS", + "license": "MIT", + "scripts": { + "build": "nest build", + "start": "nest start", + "start:dev": "nest start --watch", + "start:prod": "node dist/main.js", + "lint": "eslint \"src/**/*.ts\" --fix", + "test": "jest", + "test:integration": "jest --config jest.integration.config.js", + "prisma:generate": "prisma generate", + "prisma:push": "prisma db push", + "typecheck": "tsc --noEmit --incremental false", + "test:all": "npm test -- --runInBand && npm run test:integration" + }, + "dependencies": { + "@nestjs/common": "^10.4.4", + "@nestjs/core": "^10.4.4", + "@nestjs/platform-express": "^10.4.4", + "@nestjs/schedule": "^4.1.1", + "@prisma/client": "^5.20.0", + "cron": "^3.1.7", + "js-yaml": "^4.1.0", + "matrix-bot-sdk": "^0.8.0", + "prisma": "^5.20.0", + "reflect-metadata": "^0.2.2", + "rxjs": "^7.8.1", + "zod": "^3.23.8" + }, + "devDependencies": { + "@nestjs/cli": "^10.4.5", + "@nestjs/schematics": "^10.1.4", + "@nestjs/testing": "^10.4.4", + "@types/jest": "^29.5.13", + "@types/js-yaml": "^4.0.9", + "@types/node": "^22.7.4", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "ts-loader": "^9.5.1", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.6.2" + }, + "jest": { + "moduleFileExtensions": [ + "js", + "json", + "ts" + ], + "rootDir": "src", + "testRegex": "(?/test/no-network.ts" + ] + } +} diff --git a/plugins/.gitkeep b/plugins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..8a98a8f --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,23 @@ +generator client { + provider = "prisma-client-js" + // 用 docker compose 在目标机本地构建,native 即正确目标,无需多架构。 + binaryTargets = ["native"] +} + +datasource db { + // 起步用 SQLite,零运维。切换 Postgres 只需改 provider + url。 + provider = "sqlite" + url = env("DATABASE_URL") +} + +/// 通用 KV 状态表,对应 Rust 版 Sled 的 `scope:id` 模式。 +/// botName 充当 scope,实现各 bot 数据隔离。 +model BotState { + botName String + key String + valueJson String + updatedAt DateTime @updatedAt + + @@id([botName, key]) + @@map("bot_state") +} diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 0000000..5a7d0b4 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1,9 @@ +# scripts/ 下默认忽略一切(read-history 等会含解密后的私密数据/导出目录, +# 以及未来新增的临时脚本),只放行 cross-sign 的源码。 +* +!.gitignore +!cross-sign/ +!cross-sign/** +!test-network-guard.cjs +# 但 cross-sign 下的依赖仍不提交。 +cross-sign/node_modules/ diff --git a/scripts/cross-sign/README.md b/scripts/cross-sign/README.md new file mode 100644 index 0000000..aecc36f --- /dev/null +++ b/scripts/cross-sign/README.md @@ -0,0 +1,43 @@ +# cross-sign 一次性工具 + +给 bot 设备做 **cross-signing(交叉签名)**,让它在 Element 设备列表里显示为 +「已验证」(绿盾),并触发你的其它设备自动向 bot 分享房间密钥(从而能解部分旧消息)。 + +## 为什么需要它 + +bot 主程序用的是 `matrix-bot-sdk`,其底层加密内核 +(`@matrix-org/matrix-sdk-crypto-nodejs@0.4.0`)**不支持设备验证 / cross-signing**, +所以你在 Element 里点「验证」会一直卡在「等待对方接受」。 + +本工具改用官方 **`matrix-js-sdk`**(支持完整验证)临时登录一次,从你的 +Secret Storage(4S)取出 cross-signing 私钥,直接给目标设备签名 —— 等价于 +Element 里 SAS 对暗号成功后的那一步。签完立即登出并删除这个临时设备。 +**bot 运行时完全不受影响。** + +## 前提 + +你的 Matrix 账号必须**已设置过 cross-signing + 安全密钥(Security Key)或安全短语** +(Element → 设置 → 安全与隐私 → 加密)。 + +## 用法 + +```bash +cd scripts/cross-sign +npm install # 首次需要 +node ./cross-sign.mjs +``` + +然后按提示**交互式粘贴**即可(无需任何环境变量 / 配置文件): + +1. 输入账号域名或 API 地址 +2. 输入完整的 Matrix 用户 ID,例如 `@bot:example.org` +3. 账号密码 —— **粘贴时不回显** +4. 安全密钥(base58,如 `EsTc ...`)—— 不回显;直接回车则改填安全短语 +5. 输入要签名的设备 ID。留空后还需输入 `ALL` 才会签名所有未验证设备。 + +跑一次即可,之后无需再跑(除非 bot 重新登录产生了新设备)。 + +## 注意 + +- 密码、恢复密钥/短语只在本机脚本内使用,不会上传任何第三方;输入时不回显。 +- 过程中会**短暂**出现一个名为 `cross-sign-temp (可删)` 的临时设备,脚本结束会自动删除。 diff --git a/scripts/cross-sign/cross-sign.mjs b/scripts/cross-sign/cross-sign.mjs new file mode 100644 index 0000000..5ff189e --- /dev/null +++ b/scripts/cross-sign/cross-sign.mjs @@ -0,0 +1,238 @@ +/** + * 一次性交互脚本:用你的「恢复密钥 / 安全短语」给 bot 设备做 cross-signing。 + * + * 背景:bot 跑的 matrix-bot-sdk(底层 crypto 0.4.0)不支持设备验证, + * 所以在 Element 里点「验证」会一直卡住。本脚本用官方 matrix-js-sdk + * 临时登录一次,从你的 Secret Storage(4S)取出 cross-signing 私钥, + * 直接给目标设备签名(等价于 Element 里 SAS 验证成功后的那一步), + * 签完立刻登出这个临时设备。bot 运行时完全不动。 + * + * 用法:node ./cross-sign.mjs 然后按提示粘贴即可。 + */ +import { createClient, AutoDiscovery } from 'matrix-js-sdk'; +import { decodeRecoveryKey } from 'matrix-js-sdk/lib/crypto-api/recovery-key.js'; +import { pbkdf2 } from 'node:crypto'; +import { promisify } from 'node:util'; +import { createInterface } from 'node:readline'; +import { stdin, stdout } from 'node:process'; + +const pbkdf2Async = promisify(pbkdf2); + +function fail(msg) { + console.error(`❌ ${msg}`); + process.exit(1); +} + +/** 普通提问;支持默认值(直接回车采用) */ +function ask(question, def) { + const rl = createInterface({ input: stdin, output: stdout }); + const suffix = def ? ` [${def}]` : ''; + return new Promise((resolve) => { + rl.question(`${question}${suffix}: `, (ans) => { + rl.close(); + resolve((ans.trim() || def || '').trim()); + }); + }); +} + +/** 隐藏输入(粘贴时不回显),用于密码 / 恢复密钥 */ +function askSecret(question) { + return new Promise((resolve) => { + // 先把提示语打印出来(可见),再静音后续按键回显 + stdout.write(`${question}: `); + const rl = createInterface({ input: stdin, output: stdout }); + rl._writeToOutput = function (str) { + // 仅放行换行,其余按键不回显 + if (str.includes('\n')) rl.output.write('\n'); + }; + rl.question('', (ans) => { + rl.close(); + resolve(ans.trim()); + }); + }); +} + +let RECOVERY_KEY = ''; +let SECURITY_PHRASE = ''; +let PASSWORD = ''; +let TARGET_DEVICE_ID = ''; + +async function main() { + console.log('=== bot 设备 cross-signing 工具 ===\n'); + + const homeserverInput = await ask('账号域名或 API 地址'); + if (!homeserverInput) fail('必须输入账号域名或 API 地址。'); + const userId = await ask('账号 user id'); + if (!userId) fail('必须输入账号 ID。'); + PASSWORD = await askSecret('账号密码(粘贴,不回显)'); + if (!PASSWORD) fail('必须输入密码。'); + + console.log( + '\n签名需要你的「安全密钥」或「安全短语」二选一。安全密钥优先,直接回车切到安全短语。', + ); + RECOVERY_KEY = await askSecret('安全密钥(base58,如 EsTc...;不回显)'); + if (RECOVERY_KEY) { + try { + decodeRecoveryKey(RECOVERY_KEY.replace(/\s+/g, '')); + } catch { + fail('安全密钥格式不对(应是 EsTx... 的 base58,4 字符一组共 12 组)。'); + } + } else { + SECURITY_PHRASE = await askSecret('安全短语(不回显)'); + if (!SECURITY_PHRASE) fail('安全密钥和安全短语必须至少提供一个。'); + } + + TARGET_DEVICE_ID = await ask('要签名的设备 ID'); + if (!TARGET_DEVICE_ID && await ask('签名所有未验证设备?输入 ALL 确认') !== 'ALL') { + fail('未选择签名目标。'); + } + + // 1) 解析真实 API 地址(支持裸域名 well-known 发现) + const baseUrl = await resolveBaseUrl(homeserverInput); + console.log(`\n🔗 homeserver API: ${baseUrl}`); + + // 2) 临时登录(产生一个临时设备,结束后登出删除) + const loginClient = createClient({ baseUrl }); + console.log('🔑 临时登录中...'); + const login = await loginClient.login('m.login.password', { + identifier: { type: 'm.id.user', user: userId }, + password: PASSWORD, + initial_device_display_name: 'cross-sign-temp (可删)', + }); + const accessToken = login.access_token; + const deviceId = login.device_id; + const realUserId = login.user_id; + console.log(`✅ 临时设备已登录: ${deviceId}`); + + // 3) 构建带 crypto 的 client,提供 secret storage 取钥回调 + const client = createClient({ + baseUrl, + accessToken, + userId: realUserId, + deviceId, + cryptoCallbacks: { getSecretStorageKey }, + }); + + let signedOk = false; + try { + await client.initRustCrypto({ useIndexedDB: false }); + const crypto = client.getCrypto(); + if (!crypto) fail('crypto 初始化失败。'); + + console.log('🔄 启动同步(拉取设备列表 / secret storage)...'); + await client.startClient({ initialSyncLimit: 1 }); + await waitForSync(client); + + // 4) 从 4S 导入 cross-signing 私钥(不重置已有密钥) + console.log('📥 从 Secret Storage 导入 cross-signing 私钥...'); + await crypto.bootstrapCrossSigning({ + authUploadDeviceSigningKeys: async (makeRequest) => { + await makeRequest({ + type: 'm.login.password', + identifier: { type: 'm.id.user', user: realUserId }, + password: PASSWORD, + }); + }, + }); + if (!(await crypto.isCrossSigningReady())) { + fail( + 'cross-signing 未就绪——恢复密钥/短语可能不对,或账号未设置过 cross-signing。', + ); + } + console.log('✅ cross-signing 私钥就绪。'); + + // 5) 确定要签名的设备 + const targets = await resolveTargets(crypto, realUserId, deviceId); + if (targets.length === 0) { + console.log('ℹ️ 没有需要签名的设备(可能都已验证)。'); + } + for (const dev of targets) { + console.log(`✍️ 签名设备 ${dev} ...`); + await crypto.crossSignDevice(dev); + const st = await crypto.getDeviceVerificationStatus(realUserId, dev); + console.log(` → crossSigningVerified=${st?.crossSigningVerified ?? '?'}`); + } + signedOk = true; + } finally { + // 6) 清理:登出临时设备(删除它),停止 client + try { + client.stopClient(); + } catch {} + try { + console.log('🧹 登出并删除临时设备...'); + await client.logout(true); + console.log('✅ 临时设备已删除。'); + } catch (e) { + console.warn('⚠️ 登出临时设备失败(可手动在 Element 删除):', e?.message); + } + } + + if (signedOk) { + console.log('\n🎉 完成!刷新 Element 设备列表即可看到目标设备已验证(绿盾)。'); + } + process.exit(signedOk ? 0 : 1); +} + +/** secret storage 取钥回调:用恢复密钥或安全短语派生 4S 密钥 */ +async function getSecretStorageKey({ keys }) { + const keyId = Object.keys(keys)[0]; + const info = keys[keyId]; + let privateKey; + if (RECOVERY_KEY) { + privateKey = decodeRecoveryKey(RECOVERY_KEY.replace(/\s+/g, '')); + } else { + const pp = info?.passphrase; + if (!pp?.salt || !pp?.iterations) { + fail('该账号的 4S 没有 passphrase 信息,请改用安全密钥。'); + } + privateKey = new Uint8Array( + await pbkdf2Async(SECURITY_PHRASE, pp.salt, pp.iterations, 32, 'sha512'), + ); + } + return [keyId, privateKey]; +} + +/** 决定签名目标:指定了 TARGET_DEVICE_ID 就只签它;否则签名所有未交叉验证的自有设备(除临时设备) */ +async function resolveTargets(crypto, userId, tempDeviceId) { + if (TARGET_DEVICE_ID) return [TARGET_DEVICE_ID]; + const map = await crypto.getUserDeviceInfo([userId], true); + const devices = map.get(userId); + const out = []; + if (!devices) return out; + for (const devId of devices.keys()) { + if (devId === tempDeviceId) continue; + const st = await crypto.getDeviceVerificationStatus(userId, devId); + if (!st?.crossSigningVerified) out.push(devId); + } + return out; +} + +/** well-known 发现:裸域名 → 真实 API 地址 */ +async function resolveBaseUrl(input) { + if (/^https?:\/\//.test(input)) return input.replace(/\/$/, ''); + const res = await AutoDiscovery.findClientConfig(input); + const url = res?.['m.homeserver']?.base_url; + if (!url) fail(`无法从 ${input} 发现 homeserver,请直接填完整 API 地址。`); + return url.replace(/\/$/, ''); +} + +/** 等待首次同步完成 */ +function waitForSync(client) { + return new Promise((resolve, reject) => { + const to = setTimeout(() => reject(new Error('同步超时(60s)')), 60_000); + client.once('sync', function handler(state) { + if (state === 'PREPARED') { + clearTimeout(to); + resolve(); + } else if (state === 'ERROR') { + clearTimeout(to); + reject(new Error('同步出错')); + } + }); + }); +} + +main().catch((e) => { + console.error('💥 出错:', e); + process.exit(1); +}); diff --git a/scripts/cross-sign/package-lock.json b/scripts/cross-sign/package-lock.json new file mode 100644 index 0000000..7974a85 --- /dev/null +++ b/scripts/cross-sign/package-lock.json @@ -0,0 +1,216 @@ +{ + "name": "cross-sign-tool", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "cross-sign-tool", + "version": "1.0.0", + "dependencies": { + "matrix-js-sdk": "^34.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@matrix-org/matrix-sdk-crypto-wasm": { + "version": "9.1.0", + "resolved": "https://registry.npmmirror.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-9.1.0.tgz", + "integrity": "sha512-CtPoNcoRW6ehwxpRQAksG3tR+NJ7k4DV02nMFYTDwQtie1V4R8OTY77BjEIs97NOblhtS26jU8m1lWsOBEz0Og==", + "license": "Apache-2.0", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@matrix-org/olm": { + "version": "3.2.15", + "resolved": "https://registry.npmmirror.com/@matrix-org/olm/-/olm-3.2.15.tgz", + "integrity": "sha512-S7lOrndAK9/8qOtaTq/WhttJC/o4GAzdfK0MUPpo8ApzsJEC0QjtwrkC3KBXdFP1cD1MXi/mlKR7aaoVMKgs6Q==", + "license": "Apache-2.0" + }, + "node_modules/@types/events": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/@types/events/-/events-3.0.3.tgz", + "integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==", + "license": "MIT" + }, + "node_modules/@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmmirror.com/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "license": "MIT" + }, + "node_modules/another-json": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/another-json/-/another-json-0.2.0.tgz", + "integrity": "sha512-/Ndrl68UQLhnCdsAzEXLMFuOR546o2qbYRqCglaNHbjXrwG1ayTcdwr3zkSGOGtGXDyR5X9nCFfnyG2AFJIsqg==", + "license": "Apache-2.0" + }, + "node_modules/base-x": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/base-x/-/base-x-5.0.1.tgz", + "integrity": "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg==", + "license": "MIT" + }, + "node_modules/bs58": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/bs58/-/bs58-6.0.0.tgz", + "integrity": "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==", + "license": "MIT", + "dependencies": { + "base-x": "^5.0.0" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/jwt-decode": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/jwt-decode/-/jwt-decode-4.0.0.tgz", + "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmmirror.com/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/matrix-events-sdk": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz", + "integrity": "sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==", + "license": "Apache-2.0" + }, + "node_modules/matrix-js-sdk": { + "version": "34.13.0", + "resolved": "https://registry.npmmirror.com/matrix-js-sdk/-/matrix-js-sdk-34.13.0.tgz", + "integrity": "sha512-AAU8ZdCawca+7ucQfdcC3LA85OtCTV7QeqcjvKt/ZZhU3xL9VoawuoRQ+4R6H8KZnqyJmT4j7bdeC0jG4qcqLg==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime": "^7.12.5", + "@matrix-org/matrix-sdk-crypto-wasm": "^9.0.0", + "@matrix-org/olm": "3.2.15", + "another-json": "^0.2.0", + "bs58": "^6.0.0", + "content-type": "^1.0.4", + "jwt-decode": "^4.0.0", + "loglevel": "^1.7.1", + "matrix-events-sdk": "0.0.1", + "matrix-widget-api": "^1.10.0", + "oidc-client-ts": "^3.0.1", + "p-retry": "4", + "sdp-transform": "^2.14.1", + "unhomoglyph": "^1.0.6", + "uuid": "11" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/matrix-widget-api": { + "version": "1.17.0", + "resolved": "https://registry.npmmirror.com/matrix-widget-api/-/matrix-widget-api-1.17.0.tgz", + "integrity": "sha512-5FHoo3iEP3Bdlv5jsYPWOqj+pGdFQNLWnJLiB0V7Ygne7bb+Gsj3ibyFyHWC6BVw+Z+tSW4ljHpO17I9TwStwQ==", + "license": "Apache-2.0", + "dependencies": { + "@types/events": "^3.0.0", + "events": "^3.2.0" + } + }, + "node_modules/oidc-client-ts": { + "version": "3.5.0", + "resolved": "https://registry.npmmirror.com/oidc-client-ts/-/oidc-client-ts-3.5.0.tgz", + "integrity": "sha512-l2q8l9CTCTOlbX+AnK4p3M+4CEpKpyQhle6blQkdFhm0IsBqsxm15bYaSa11G7pWdsYr6epdsRZxJpCyCRbT8A==", + "license": "Apache-2.0", + "dependencies": { + "jwt-decode": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmmirror.com/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "license": "MIT", + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmmirror.com/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/sdp-transform": { + "version": "2.15.0", + "resolved": "https://registry.npmmirror.com/sdp-transform/-/sdp-transform-2.15.0.tgz", + "integrity": "sha512-KrOH82c/W+GYQ0LHqtr3caRpM3ITglq3ljGUIb8LTki7ByacJZ9z+piSGiwZDsRyhQbYBOBJgr2k6X4BZXi3Kw==", + "license": "MIT", + "bin": { + "sdp-verify": "checker.js" + } + }, + "node_modules/unhomoglyph": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/unhomoglyph/-/unhomoglyph-1.0.6.tgz", + "integrity": "sha512-7uvcWI3hWshSADBu4JpnyYbTVc7YlhF5GDW/oPD5AxIxl34k4wXR3WDkPnzLxkN32LiTCTKMQLtKVZiwki3zGg==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "11.1.1", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + } + } +} diff --git a/scripts/cross-sign/package.json b/scripts/cross-sign/package.json new file mode 100644 index 0000000..ecd0cfd --- /dev/null +++ b/scripts/cross-sign/package.json @@ -0,0 +1,10 @@ +{ + "name": "cross-sign-tool", + "private": true, + "version": "1.0.0", + "type": "module", + "description": "一次性脚本:用恢复密钥给 bot 设备做 cross-signing(变已验证)。", + "dependencies": { + "matrix-js-sdk": "^34.0.0" + } +} diff --git a/scripts/test-network-guard.cjs b/scripts/test-network-guard.cjs new file mode 100644 index 0000000..2083106 --- /dev/null +++ b/scripts/test-network-guard.cjs @@ -0,0 +1,18 @@ +const blocked = () => { throw new Error('Network access is disabled in test subprocesses'); }; +require('node:http').request = blocked; +require('node:http').get = blocked; +require('node:https').request = blocked; +require('node:https').get = blocked; +require('node:net').Socket.prototype.connect = blocked; +require('node:tls').connect = blocked; +global.fetch = blocked; +const fs = require('node:fs'); +const exists = fs.existsSync.bind(fs); +const read = fs.readFileSync.bind(fs); +const privateConfiguration = path => typeof path === 'string' && + (/(^|\/)\.env(?:\..*)?$/.test(path) || /(^|\/)config\/bots\.yaml$/.test(path)); +fs.existsSync = path => privateConfiguration(path) ? false : exists(path); +fs.readFileSync = (path, ...args) => { + if (privateConfiguration(path)) throw new Error('Runtime configuration is unavailable in tests'); + return read(path, ...args); +}; diff --git a/src/app.module.ts b/src/app.module.ts new file mode 100644 index 0000000..2f17775 --- /dev/null +++ b/src/app.module.ts @@ -0,0 +1,15 @@ +import { Module } from '@nestjs/common'; +import { ConfigModule } from './config/config.module'; +import { DbModule } from './core/db/db.module'; +import { MatrixModule } from './core/matrix/matrix.module'; +import { BotModule } from './core/bot/bot.module'; + +@Module({ + imports: [ + ConfigModule, + DbModule, + MatrixModule, + BotModule, + ], +}) +export class AppModule {} diff --git a/src/config/config.integration.spec.ts b/src/config/config.integration.spec.ts new file mode 100644 index 0000000..f91b152 --- /dev/null +++ b/src/config/config.integration.spec.ts @@ -0,0 +1,204 @@ +import { resolve } from 'node:path'; +import { ConfigService } from './config.service'; + +const FIXTURE_PATH = resolve(__dirname, '../test/fixtures/bots.test.yaml'); +const MISSING_PATH = resolve(__dirname, '../test/fixtures/nonexistent.yaml'); + +function makeService(configPath: string): ConfigService { + process.env.BOT_CONFIG_PATH = configPath; + return new ConfigService(); +} + +describe('ConfigService (integration)', () => { + afterEach(() => { + delete process.env.BOT_CONFIG_PATH; + delete process.env.TEST_ACCOUNT_PW; + }); + + it('loads and validates a well-formed config file', () => { + const svc = makeService(FIXTURE_PATH); + const cfg = svc.all; + + expect(Object.keys(cfg.accounts)).toEqual( + expect.arrayContaining(['main', 'checkin']), + ); + expect(cfg.bots).toHaveLength(1); + expect(cfg.bots[0].name).toBe('checkin'); + expect(cfg.bots[0].rooms).toEqual(['!testroom:example.com']); + }); + + it('exposes bots and getAccount helpers', () => { + const svc = makeService(FIXTURE_PATH); + + expect(svc.bots[0].account).toBe('checkin'); + + const acc = svc.getAccount('main'); + expect(acc.homeServer).toBe('https://matrix.example.com'); + expect(acc.userId).toBe('@testbot:example.com'); + }); + + it('throws a user-friendly error when config file does not exist', () => { + const svc = makeService(MISSING_PATH); + expect(() => svc.all).toThrow(/配置文件不存在/); + expect(() => svc.all).toThrow(/bots.example.yaml/); + }); + + it('resolves env() references from environment variables', () => { + // Write a temp config that uses env() ref, then verify it resolves. + const { writeFileSync, unlinkSync } = require('node:fs'); + const tmpPath = resolve(__dirname, '../test/fixtures/bots.envref.tmp.yaml'); + writeFileSync( + tmpPath, + ` +accounts: + bot: + homeServer: "https://matrix.example.com" + userId: "@bot:example.com" + password: "env(TEST_ACCOUNT_PW)" +bots: + - name: test + account: bot + rooms: + - "!room:example.com" + config: {} +`, + ); + process.env.TEST_ACCOUNT_PW = 'secret-from-env'; + const svc = makeService(tmpPath); + try { + const acc = svc.getAccount('bot'); + expect(acc.password).toBe('secret-from-env'); + } finally { + unlinkSync(tmpPath); + } + }); + + it('throws when an env() referenced variable is not set', () => { + const { writeFileSync, unlinkSync } = require('node:fs'); + const tmpPath = resolve(__dirname, '../test/fixtures/bots.envmissing.tmp.yaml'); + writeFileSync( + tmpPath, + ` +accounts: + bot: + homeServer: "https://matrix.example.com" + userId: "@bot:example.com" + password: "env(MISSING_ENV_VAR_XYZ)" +bots: + - name: test + account: bot + rooms: + - "!room:example.com" + config: {} +`, + ); + delete process.env.MISSING_ENV_VAR_XYZ; + const svc = makeService(tmpPath); + try { + expect(() => svc.all).toThrow(/MISSING_ENV_VAR_XYZ/); + } finally { + unlinkSync(tmpPath); + } + }); + + it('rejects config with an invalid homeServer URL', () => { + const { writeFileSync, unlinkSync } = require('node:fs'); + const tmpPath = resolve(__dirname, '../test/fixtures/bots.badurl.tmp.yaml'); + writeFileSync( + tmpPath, + ` +accounts: + bot: + homeServer: "not-a-url" + userId: "@bot:example.com" + password: "secret" +bots: + - name: test + account: bot + rooms: + - "!room:example.com" + config: {} +`, + ); + const svc = makeService(tmpPath); + try { + expect(() => svc.all).toThrow(); + } finally { + unlinkSync(tmpPath); + } + }); + + it('rejects config with malformed userId', () => { + const { writeFileSync, unlinkSync } = require('node:fs'); + const tmpPath = resolve(__dirname, '../test/fixtures/bots.baduser.tmp.yaml'); + writeFileSync( + tmpPath, + ` +accounts: + bot: + homeServer: "https://matrix.example.com" + userId: "not-a-matrix-id" + password: "secret" +bots: + - name: test + account: bot + rooms: + - "!room:example.com" + config: {} +`, + ); + const svc = makeService(tmpPath); + try { + expect(() => svc.all).toThrow(/userId/); + } finally { + unlinkSync(tmpPath); + } + }); + + it('rejects config where bot room IDs are malformed', () => { + const { writeFileSync, unlinkSync } = require('node:fs'); + const tmpPath = resolve(__dirname, '../test/fixtures/bots.badroom.tmp.yaml'); + writeFileSync( + tmpPath, + ` +accounts: + bot: + homeServer: "https://matrix.example.com" + userId: "@bot:example.com" + password: "secret" +bots: + - name: test + account: bot + rooms: + - "not-a-room-id" + config: {} +`, + ); + const svc = makeService(tmpPath); + try { + expect(() => svc.all).toThrow(/roomId/); + } finally { + unlinkSync(tmpPath); + } + }); + + it('caches the parsed config on subsequent accesses', () => { + const svc = makeService(FIXTURE_PATH); + const first = svc.all; + const second = svc.all; + expect(first).toBe(second); // same object reference + }); + + it('reports isDryRun based on DRY_RUN env var', () => { + const svc = makeService(FIXTURE_PATH); + + process.env.DRY_RUN = 'true'; + expect(svc.isDryRun).toBe(true); + + process.env.DRY_RUN = 'false'; + expect(svc.isDryRun).toBe(false); + + delete process.env.DRY_RUN; + expect(svc.isDryRun).toBe(false); + }); +}); diff --git a/src/config/config.module.ts b/src/config/config.module.ts new file mode 100644 index 0000000..89f309b --- /dev/null +++ b/src/config/config.module.ts @@ -0,0 +1,9 @@ +import { Global, Module } from '@nestjs/common'; +import { ConfigService } from './config.service'; + +@Global() +@Module({ + providers: [ConfigService], + exports: [ConfigService], +}) +export class ConfigModule {} diff --git a/src/config/config.service.ts b/src/config/config.service.ts new file mode 100644 index 0000000..a20b504 --- /dev/null +++ b/src/config/config.service.ts @@ -0,0 +1,91 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import * as yaml from 'js-yaml'; +import { + AccountConfig, + BotConfig, + RootConfig, + rootConfigSchema, +} from './schema'; + +/** + * 加载并校验 bots.yaml。 + * 支持把配置里的 "env(VAR_NAME)" 解析为对应环境变量值,避免明文密码入库。 + * 采用惰性加载,确保即使在其它 provider 构造期被读取也已就绪。 + */ +@Injectable() +export class ConfigService { + private readonly logger = new Logger(ConfigService.name); + private config?: RootConfig; + + private ensureLoaded(): RootConfig { + if (this.config) return this.config; + const path = resolve(process.env.BOT_CONFIG_PATH ?? './config/bots.yaml'); + let raw: string; + try { + raw = readFileSync(path, 'utf8'); + } catch (err: unknown) { + if ((err as NodeJS.ErrnoException).code === 'ENOENT') { + throw new Error( + `配置文件不存在: ${path}\n` + + `请复制示例文件并填写配置:\n` + + ` cp config/bots.example.yaml config/bots.yaml\n` + + `然后根据注释修改真实账号、房间等信息。`, + ); + } + throw err; + } + const parsed = yaml.load(raw); + const resolved = this.resolveEnvRefs(parsed); + this.config = rootConfigSchema.parse(resolved); + this.logger.log( + `已加载配置: ${Object.keys(this.config.accounts).length} 个账号, ${this.config.rooms.length} 个管理房间`, + ); + return this.config; + } + + get all(): RootConfig { + return this.ensureLoaded(); + } + + get bots(): BotConfig[] { + return this.ensureLoaded().bots; + } + + getAccount(name: string): AccountConfig { + const acc = this.ensureLoaded().accounts[name]; + if (!acc) { + throw new Error(`未找到账号配置: ${name}`); + } + return acc; + } + + get isDryRun(): boolean { + return (process.env.DRY_RUN ?? 'false').toLowerCase() === 'true'; + } + + /** 递归把字符串里的 env(VAR) 替换为 process.env.VAR。 */ + private resolveEnvRefs(value: unknown): unknown { + if (typeof value === 'string') { + const match = value.match(/^env\((.+)\)$/); + if (match) { + const envVal = process.env[match[1]]; + if (envVal === undefined) { + throw new Error(`配置引用了未设置的环境变量: ${match[1]}`); + } + return envVal; + } + return value; + } + if (Array.isArray(value)) { + return value.map((v) => this.resolveEnvRefs(v)); + } + if (value && typeof value === 'object') { + return Object.fromEntries( + Object.entries(value).map(([k, v]) => [k, this.resolveEnvRefs(v)]), + ); + } + return value; + } +} diff --git a/src/config/schema.spec.ts b/src/config/schema.spec.ts new file mode 100644 index 0000000..8e83439 --- /dev/null +++ b/src/config/schema.spec.ts @@ -0,0 +1,37 @@ +import { rootConfigSchema } from './schema'; +const accounts = { test: { userId: '@bot:example.org', password: 'fixture', homeServer: 'https://example.org' } }; +const room = { account: 'test', roomId: '!room:example.org' }; +describe('room configuration', () => { + it('supports empty plugin sets, explicit timezone and language', () => { + const config = rootConfigSchema.parse({ accounts, rooms: [room] }); + expect(config.rooms[0]).toMatchObject({ locale: 'zh-CN', timeZone: 'Asia/Shanghai', plugins: {} }); + }); + it('rejects duplicate routes, unknown accounts and invalid timezones', () => { + expect(() => rootConfigSchema.parse({ accounts, rooms: [room, room] })).toThrow(); + expect(() => rootConfigSchema.parse({ accounts, rooms: [{ ...room, account: 'missing' }] })).toThrow(); + expect(() => rootConfigSchema.parse({ accounts, rooms: [{ ...room, timeZone: 'Invalid/Zone' }] })).toThrow(); + }); + it('normalizes a single legacy room and infers an unambiguous migration target', () => { + const config = rootConfigSchema.parse({ accounts, bots: [{ name: 'checkin', account: 'test', rooms: [room.roomId], config: {} }] }); + expect(config.legacyCheckinTarget).toEqual(room); + expect(config.rooms[0].plugins.checkin.enabled).toBe(true); + }); + it('does not guess where shared legacy multi-room data belongs', () => { + const config = rootConfigSchema.parse({ accounts, bots: [{ name: 'checkin', account: 'test', rooms: [room.roomId, '!other:example.org'] }] }); + expect(config.legacyCheckinTarget).toBeUndefined(); + }); + it('rejects mixed old and new room configuration', () => { + expect(() => rootConfigSchema.parse({ accounts, rooms: [room], bots: [{ name: 'checkin', account: 'test', rooms: [room.roomId] }] })).toThrow(); + }); +}); + +it('preserves domainless room IDs in managed rooms, legacy bindings and migration targets', () => { + const id = '!' + 'A'.repeat(43); + const target = { account: 'test', roomId: id }; + const modern = rootConfigSchema.parse({ accounts, rooms: [target], legacyCheckinTarget: target }); + expect(modern.rooms[0].roomId).toBe(id); + expect(modern.legacyCheckinTarget).toEqual(target); + const legacy = rootConfigSchema.parse({ accounts, bots: [{ name: 'checkin', account: 'test', rooms: [id] }] }); + expect(legacy.rooms[0].roomId).toBe(id); + expect(() => rootConfigSchema.parse({ accounts, rooms: [{ ...target, roomId: '!short' }] })).toThrow(); +}); diff --git a/src/config/schema.ts b/src/config/schema.ts new file mode 100644 index 0000000..6103b7f --- /dev/null +++ b/src/config/schema.ts @@ -0,0 +1,80 @@ +import { z } from 'zod'; + +// Preserve the exact server-supplied ID for routing, including domainless v12 IDs. +export const matrixRoomId = z.string().regex(/^!(?:[A-Za-z0-9_-]{43}|[^\s:]+:[^\s]+)$/, 'Invalid roomId'); + +const accountSchema = z.object({ + homeServer: z.string().url(), + userId: z.string().regex(/^@.+:.+$/, 'userId 必须是 @user:server 形式'), + password: z.string().min(1), +}); + +const botSchema = z.object({ + name: z.string().min(1), + account: z.string().min(1), + rooms: z.array(matrixRoomId).min(1), + config: z.record(z.any()).default({}), +}); + +export const roomSchema = z.object({ + account: z.string().min(1), + roomId: matrixRoomId, + locale: z.enum(['zh-CN', 'en']).default('zh-CN'), + timeZone: z.string().default('Asia/Shanghai').refine((value) => { + try { new Intl.DateTimeFormat('en', { timeZone: value }); return true; } + catch { return false; } + }, 'Invalid timeZone'), + adminPowerLevel: z.number().int().min(1).default(100), + admins: z.array(z.string().regex(/^@.+:.+$/)).default([]), + plugins: z.record(z.object({ + enabled: z.boolean().default(false), config: z.record(z.unknown()).default({}), + })).default({}), +}); +export const rootConfigSchema = z.object({ + accounts: z.record(accountSchema), + rooms: z.array(roomSchema).default([]), + bots: z.array(botSchema).default([]), + pluginDirectories: z.array(z.string().min(1)).default([]), + legacyCheckinTarget: z.object({ account: z.string(), roomId: matrixRoomId }).optional(), +}).transform((config, ctx) => { + if (config.rooms.length && config.bots.length) { + ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Use rooms or legacy bots, not both' }); + return z.NEVER; + } + const rooms = [...config.rooms]; + for (const bot of config.bots) { + for (const roomId of bot.rooms) { + let room = rooms.find((r) => r.account === bot.account && r.roomId === roomId); + if (!room) { + room = roomSchema.parse({ account: bot.account, roomId, + adminPowerLevel: bot.config.adminPowerLevel, admins: bot.config.admins }); + rooms.push(room); + } + if (room.plugins[bot.name]) { + ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Duplicate plugin in legacy room' }); + return z.NEVER; + } + const { mainRoom, adminPowerLevel, admins, ...options } = bot.config; + room.plugins[bot.name] = { enabled: true, config: options }; + } + } + const keys = new Set(); + for (const room of rooms) { + const key = JSON.stringify([room.account, room.roomId]); + if (!config.accounts[room.account] || keys.has(key)) { + ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Unknown account or duplicate room' }); + return z.NEVER; + } + keys.add(key); + } + if (!rooms.length) ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'At least one managed room is required' }); + const legacy = config.bots.filter((b) => b.name === 'checkin'); + const inferred = legacy.length === 1 && legacy[0].rooms.length === 1 + ? { account: legacy[0].account, roomId: legacy[0].rooms[0] } : undefined; + return { ...config, rooms, legacyCheckinTarget: config.legacyCheckinTarget ?? inferred }; +}); + +export type AccountConfig = z.infer; +export type BotConfig = z.infer; +export type RootConfig = z.infer; +export type RoomConfig = z.infer; diff --git a/src/core/bot/bot-platform.service.ts b/src/core/bot/bot-platform.service.ts new file mode 100644 index 0000000..1dcf800 --- /dev/null +++ b/src/core/bot/bot-platform.service.ts @@ -0,0 +1,23 @@ +import { Injectable, OnApplicationBootstrap, OnApplicationShutdown } from '@nestjs/common'; +import { ConfigService } from '../../config/config.service'; +import { SessionManager } from '../matrix/session-manager.service'; +import { PluginManager } from '../plugin/plugin-manager.service'; +import { Dispatcher } from './dispatcher.service'; + +@Injectable() +export class BotPlatformService implements OnApplicationBootstrap, OnApplicationShutdown { + constructor(private readonly config: ConfigService, private readonly sessions: SessionManager, + private readonly plugins: PluginManager, private readonly dispatcher: Dispatcher) {} + async onApplicationBootstrap(): Promise { + for (const account of new Set(this.config.all.rooms.map((room) => room.account))) { + this.sessions.ensureSession(account, this.dispatcher); + } + await this.plugins.initialize(); + await this.sessions.startAll(); + await this.plugins.start(); + } + async onApplicationShutdown(): Promise { + await this.plugins.stop(); + await this.sessions.stopAll(); + } +} diff --git a/src/core/bot/bot.module.ts b/src/core/bot/bot.module.ts new file mode 100644 index 0000000..21fe09d --- /dev/null +++ b/src/core/bot/bot.module.ts @@ -0,0 +1,7 @@ +import { Module } from '@nestjs/common'; +import { BotPlatformService } from './bot-platform.service'; +import { Dispatcher } from './dispatcher.service'; +import { PluginManager } from '../plugin/plugin-manager.service'; + +@Module({ providers: [PluginManager, Dispatcher, BotPlatformService] }) +export class BotModule {} diff --git a/src/core/bot/dispatcher.service.ts b/src/core/bot/dispatcher.service.ts new file mode 100644 index 0000000..2559e71 --- /dev/null +++ b/src/core/bot/dispatcher.service.ts @@ -0,0 +1,22 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { InboundMessage, MemberEvent, PowerLevelEvent } from '../command/types'; +import { MatrixEventSink } from '../matrix/types'; +import { PluginManager } from '../plugin/plugin-manager.service'; + +@Injectable() +export class Dispatcher implements MatrixEventSink { + private readonly logger = new Logger(Dispatcher.name); + constructor(private readonly plugins: PluginManager) {} + async onMessage(message: InboundMessage): Promise { + try { await this.plugins.onMessage(message); } + catch { this.logger.error('Message processing failed'); } + } + async onMember(event: MemberEvent): Promise { + try { await this.plugins.onEvent(event); } + catch { this.logger.error('Member event processing failed'); } + } + async onPowerLevel(event: PowerLevelEvent): Promise { + try { await this.plugins.onEvent(event); } + catch { this.logger.error('Power event processing failed'); } + } +} diff --git a/src/core/command/command-parser.spec.ts b/src/core/command/command-parser.spec.ts new file mode 100644 index 0000000..224aa4b --- /dev/null +++ b/src/core/command/command-parser.spec.ts @@ -0,0 +1,49 @@ +import { parseCommand, tokenize, CommandError } from './command-parser'; +import { InboundMessage } from './types'; + +const raw: InboundMessage = { + eventId: 'e', + account: 'a', + roomId: '!r:hs', + userId: '@u:hs', + text: '', + timestampMs: 0, +}; + +describe('command-parser', () => { + it('parses command and positional args', () => { + const ast = parseCommand(raw, 'deploy service-a region-cn'); + expect(ast.command).toBe('deploy'); + expect(ast.args).toEqual(['service-a', 'region-cn']); + expect(ast.options).toEqual({}); + }); + + it('parses --key=value and --key value', () => { + const ast = parseCommand(raw, 'deploy --env=prod --region cn'); + expect(ast.options.env).toBe('prod'); + expect(ast.options.region).toBe('cn'); + }); + + it('treats trailing flag as true', () => { + const ast = parseCommand(raw, 'sync --dry-run --limit=10 --verbose'); + expect(ast.options['dry-run']).toBe('true'); + expect(ast.options.limit).toBe('10'); + expect(ast.options.verbose).toBe('true'); + }); + + it('handles quotes', () => { + expect(tokenize('send "hello world" \'to room\'')).toEqual([ + 'send', + 'hello world', + 'to room', + ]); + }); + + it('throws on unterminated quote', () => { + expect(() => tokenize('cmd "oops')).toThrow(CommandError); + }); + + it('throws on empty command', () => { + expect(() => parseCommand(raw, ' ')).toThrow(CommandError); + }); +}); diff --git a/src/core/command/command-parser.ts b/src/core/command/command-parser.ts new file mode 100644 index 0000000..5c55bd5 --- /dev/null +++ b/src/core/command/command-parser.ts @@ -0,0 +1,92 @@ +import { InboundMessage, ParsedCommand } from './types'; + +export class CommandError extends Error {} + +/** + * 命令解析器,移植自 Rust 版 command_parser: + * - 支持单/双引号、双引号内反斜杠转义 + * - --key=value / --key value / --flag(无值则为 "true") + * 第一个 token 为命令名,其余为位置参数。 + */ +export function tokenize(input: string): string[] { + const tokens: string[] = []; + let buf = ''; + let inSingle = false; + let inDouble = false; + + for (let i = 0; i < input.length; i++) { + const ch = input[i]; + if (ch === "'" && !inDouble) { + inSingle = !inSingle; + } else if (ch === '"' && !inSingle) { + inDouble = !inDouble; + } else if (ch === '\\' && inDouble) { + const next = input[i + 1]; + if (next === undefined) { + throw new CommandError('dangling escape'); + } + buf += next; + i++; + } else if (/\s/.test(ch) && !inSingle && !inDouble) { + if (buf.length > 0) { + tokens.push(buf); + buf = ''; + } + } else { + buf += ch; + } + } + + if (inSingle || inDouble) { + throw new CommandError('unterminated quote'); + } + if (buf.length > 0) { + tokens.push(buf); + } + return tokens; +} + +export function parseCommand(raw: InboundMessage, text: string): ParsedCommand { + const tokens = tokenize(text); + if (tokens.length === 0) { + throw new CommandError('empty command'); + } + + const command = tokens[0]; + const args: string[] = []; + const options: Record = {}; + + let i = 1; + while (i < tokens.length) { + const token = tokens[i]; + if (token.startsWith('--')) { + const body = token.slice(2); + if (body.length === 0) { + throw new CommandError('invalid option: --'); + } + const eq = body.indexOf('='); + if (eq >= 0) { + const key = body.slice(0, eq); + if (key.length === 0) { + throw new CommandError(`invalid option key in '--${body}'`); + } + options[key] = body.slice(eq + 1); + i++; + continue; + } + const next = tokens[i + 1]; + if (next !== undefined && !next.startsWith('-')) { + options[body] = next; + i += 2; + } else { + options[body] = 'true'; + i++; + } + continue; + } + args.push(token); + i++; + } + + return { raw, command, args, options }; +} diff --git a/src/core/command/command-router.spec.ts b/src/core/command/command-router.spec.ts new file mode 100644 index 0000000..392547f --- /dev/null +++ b/src/core/command/command-router.spec.ts @@ -0,0 +1,23 @@ +import { Command, CommandRouter } from './command-router'; +import { message } from '../../test/fakes'; +const command: Command = { id: 'checkin', paths: [['checkin'], ['签到']], bare: ['签到'], + description: { 'zh-CN': '签到', en: 'check in' }, usage: { 'zh-CN': '!签到', en: '!checkin' }, run: async () => undefined }; + +describe('shared command aliases', () => { + it.each(['签到', '!签到', '!签到', '/签到', '/checkin', '!CHECKIN', '!checkin'])('%s resolves to the same command', (text) => { + expect(new CommandRouter([command]).match(message(text))?.command.id).toBe('checkin'); + }); + it('does not parse normal conversation as commands', () => { + expect(new CommandRouter([command]).match(message('今天已经签到了吗'))).toBeUndefined(); + expect(new CommandRouter([command]).match(message('checkin'))).toBeUndefined(); + }); + it('matches longest registered paths and preserves quoted arguments', () => { + const nested = { ...command, id: 'query', paths: [['签到', '查询']], bare: [] }; + const result = new CommandRouter([command, nested]).match(message('!签到 查询 "value with spaces" --原始'))!; + expect(result.command.id).toBe('query'); + expect(result.invocation).toMatchObject({ args: ['value with spaces'], raw: true }); + }); + it('rejects alias collisions instead of dispatching multiple handlers', () => { + expect(() => new CommandRouter([command, { ...command, id: 'other' }])).toThrow('Duplicate'); + }); +}); diff --git a/src/core/command/command-router.ts b/src/core/command/command-router.ts new file mode 100644 index 0000000..682b127 --- /dev/null +++ b/src/core/command/command-router.ts @@ -0,0 +1,52 @@ +import { InboundMessage } from './types'; +import { tokenize } from './command-parser'; +import { Text } from '../i18n/i18n'; + +export interface Invocation { message: InboundMessage; args: string[]; raw: boolean; } +export interface Command { + id: string; + paths: string[][]; + bare?: string[]; + admin?: boolean; + description: Text; + usage: Text; + run(invocation: Invocation): Promise; +} +const normalize = (s: string) => s.normalize('NFKC').toLowerCase(); + +/** A single alias registry serves every plugin, including multi-word commands. */ +export class CommandRouter { + private readonly commands = new Map(); + private readonly bare = new Map(); + constructor(readonly definitions: Command[]) { + for (const command of definitions) { + for (const path of command.paths) { + if (!path.length || path.some((p) => !p || /\s/.test(p))) throw new Error('Invalid command path'); + const key = path.map(normalize).join(' '); + if (this.commands.has(key)) throw new Error(`Duplicate command: ${key}`); + this.commands.set(key, command); + } + for (const alias of command.bare ?? []) { + const key = normalize(alias); + if (this.bare.has(key)) throw new Error(`Duplicate bare command: ${key}`); + this.bare.set(key, command); + } + } + } + match(message: InboundMessage): { command: Command; invocation: Invocation } | undefined { + const text = message.text.trim(); + const bare = this.bare.get(normalize(text)); + if (bare) return { command: bare, invocation: { message, args: [], raw: false } }; + if (!/^[!!//]/.test(text)) return undefined; + const tokens = tokenize(text.slice(1)); + for (let length = tokens.length; length > 0; length--) { + const command = this.commands.get(tokens.slice(0, length).map(normalize).join(' ')); + if (!command) continue; + const args = tokens.slice(length); + const raw = args.some((a) => ['--raw', '--原始'].includes(normalize(a))); + return { command, invocation: { message, raw, + args: args.filter((a) => !['--raw', '--原始'].includes(normalize(a))) } }; + } + return undefined; + } +} diff --git a/src/core/command/types.ts b/src/core/command/types.ts new file mode 100644 index 0000000..04267e7 --- /dev/null +++ b/src/core/command/types.ts @@ -0,0 +1,42 @@ +/** 归一化的入站消息(与底层 Matrix 事件解耦,便于测试与将来接入其它 IM)。 */ +export interface InboundMessage { + eventId: string; + account: string; + roomId: string; + userId: string; + text: string; + timestampMs: number; +} + +/** 成员加入/离开等事件。 */ +export interface MemberEvent { + account: string; + roomId: string; + userId: string; + membership: 'join' | 'leave' | 'invite' | 'ban'; +} + +/** 房间权限变更事件 */ +export interface PowerLevelEvent { + account: string; + roomId: string; + users: Record; + prevUsers: Record; + defaultPower: number; +} + +/** 解析后的命令。 */ +export interface ParsedCommand { + raw: InboundMessage; + command: string; + args: string[]; + options: Record; +} + +/** bot 注册的定时任务。 */ +export interface CronSpec { + /** 标准 5/6 段 cron 表达式。 */ + cron: string; + run: () => Promise; + name?: string; +} diff --git a/src/core/db/bot-store.integration.spec.ts b/src/core/db/bot-store.integration.spec.ts new file mode 100644 index 0000000..79ac978 --- /dev/null +++ b/src/core/db/bot-store.integration.spec.ts @@ -0,0 +1,100 @@ +import { PrismaService } from './prisma.service'; +import { BotStore } from './bot-store'; +import { testDatabase } from '../../test/database'; +let database: Awaited> | undefined; +let prismaService: PrismaService; +beforeAll(async () => { database = await testDatabase(); prismaService = database.prisma; }); +afterAll(async () => { await database?.close(); }); +afterEach(async () => { await database?.prisma.botState.deleteMany(); }); + +describe('BotStore (integration with real SQLite)', () => { + it('returns null for a key that has never been set', async () => { + const store = new BotStore(prismaService, 'testbot'); + expect(await store.get('missing')).toBeNull(); + }); + + it('persists and retrieves a value with set/get round-trip', async () => { + const store = new BotStore(prismaService, 'testbot'); + const data = { foo: 'bar', num: 42 }; + await store.set('mykey', data); + expect(await store.get('mykey')).toEqual(data); + }); + + it('overwrites an existing value on set', async () => { + const store = new BotStore(prismaService, 'testbot'); + await store.set('key', { v: 1 }); + await store.set('key', { v: 2 }); + expect(await store.get<{ v: number }>('key')).toEqual({ v: 2 }); + }); + + it('removes an existing entry', async () => { + const store = new BotStore(prismaService, 'testbot'); + await store.set('todelete', 'value'); + await store.remove('todelete'); + expect(await store.get('todelete')).toBeNull(); + }); + + it('does not throw when removing a non-existent key', async () => { + const store = new BotStore(prismaService, 'testbot'); + await expect(store.remove('ghost')).resolves.toBeUndefined(); + }); + + it('returns an empty array from entries() when no keys exist', async () => { + const store = new BotStore(prismaService, 'emptybot'); + expect(await store.entries()).toEqual([]); + }); + + it('entries() returns all key-value pairs for the bot scope', async () => { + const store = new BotStore(prismaService, 'testbot'); + await store.set('a', 1); + await store.set('b', 2); + await store.set('c', 3); + const entries = await store.entries(); + expect(entries).toHaveLength(3); + expect(entries).toEqual( + expect.arrayContaining([ + ['a', 1], + ['b', 2], + ['c', 3], + ]), + ); + }); + + it('isolates data between different bot scopes', async () => { + const storeA = new BotStore(prismaService, 'botA'); + const storeB = new BotStore(prismaService, 'botB'); + + await storeA.set('shared-key', 'from-A'); + await storeB.set('shared-key', 'from-B'); + + expect(await storeA.get('shared-key')).toBe('from-A'); + expect(await storeB.get('shared-key')).toBe('from-B'); + + const entriesA = await storeA.entries(); + const entriesB = await storeB.entries(); + expect(entriesA).toHaveLength(1); + expect(entriesB).toHaveLength(1); + }); + + it('persists complex nested objects', async () => { + const store = new BotStore(prismaService, 'testbot'); + const complex = { + isCheckinToday: true, + level: 'Gold', + checkinUnixMs: 1717000000000, + checkinTimesInMonth: 15, + checkinDays: [1, 3, 5, 7], + }; + await store.set('@user:hs', complex); + expect(await store.get('@user:hs')).toEqual(complex); + }); + + it('handles multiple distinct keys in the same bot scope', async () => { + const store = new BotStore(prismaService, 'testbot'); + await store.set('user1', { count: 1 }); + await store.set('user2', { count: 2 }); + + expect(await store.get<{ count: number }>('user1')).toEqual({ count: 1 }); + expect(await store.get<{ count: number }>('user2')).toEqual({ count: 2 }); + }); +}); diff --git a/src/core/db/bot-store.ts b/src/core/db/bot-store.ts new file mode 100644 index 0000000..8f146f7 --- /dev/null +++ b/src/core/db/bot-store.ts @@ -0,0 +1,49 @@ +import { PrismaService } from './prisma.service'; + +/** + * 按 botName 隔离的 KV 存储,对应 Rust 版 DailyBotStore 的 `scope:id` 语义。 + * 每个 bot 通过 BotContext.db 拿到一个已绑定自身 name 的实例,互不串数据。 + */ +export class BotStore { + constructor( + private readonly prisma: PrismaService, + private readonly botName: string, + ) {} + + async get(key: string): Promise { + const row = await this.prisma.botState.findUnique({ + where: { botName_key: { botName: this.botName, key } }, + }); + return row ? (JSON.parse(row.valueJson) as T) : null; + } + + async set(key: string, value: T): Promise { + const valueJson = JSON.stringify(value); + await this.prisma.botState.upsert({ + where: { botName_key: { botName: this.botName, key } }, + create: { botName: this.botName, key, valueJson }, + update: { valueJson }, + }); + } + + async remove(key: string): Promise { + await this.prisma.botState.deleteMany({ where: { botName: this.botName, key } }); + } + + async create(key: string, value: T): Promise { + try { + await this.prisma.botState.create({ data: { botName: this.botName, key, valueJson: JSON.stringify(value) } }); + return true; + } catch (error) { + if ((error as { code?: string }).code === 'P2002') return false; + throw error; + } + } + + async entries(): Promise> { + const rows = await this.prisma.botState.findMany({ + where: { botName: this.botName }, + }); + return rows.map((r) => [r.key, JSON.parse(r.valueJson) as T]); + } +} diff --git a/src/core/db/db.module.ts b/src/core/db/db.module.ts new file mode 100644 index 0000000..5b26063 --- /dev/null +++ b/src/core/db/db.module.ts @@ -0,0 +1,9 @@ +import { Global, Module } from '@nestjs/common'; +import { PrismaService } from './prisma.service'; + +@Global() +@Module({ + providers: [PrismaService], + exports: [PrismaService], +}) +export class DbModule {} diff --git a/src/core/db/prisma.service.ts b/src/core/db/prisma.service.ts new file mode 100644 index 0000000..f80a886 --- /dev/null +++ b/src/core/db/prisma.service.ts @@ -0,0 +1,16 @@ +import { Injectable, OnModuleDestroy, OnModuleInit } from '@nestjs/common'; +import { PrismaClient } from '@prisma/client'; + +@Injectable() +export class PrismaService + extends PrismaClient + implements OnModuleInit, OnModuleDestroy +{ + async onModuleInit(): Promise { + await this.$connect(); + } + + async onModuleDestroy(): Promise { + await this.$disconnect(); + } +} diff --git a/src/core/i18n/i18n.ts b/src/core/i18n/i18n.ts new file mode 100644 index 0000000..7c8834b --- /dev/null +++ b/src/core/i18n/i18n.ts @@ -0,0 +1,25 @@ +export type Locale = 'zh-CN' | 'en'; +export type Text = Record; +export type Messages = Record; + +export function translate(text: Text, locale: Locale, values: Record = {}): string { + return text[locale].replace(/\{(\w+)\}/g, (_, key: string) => String(values[key] ?? `{${key}}`)); +} + +export function choice(value: string | undefined, choices: Record): T | undefined { + const normalized = value?.normalize('NFKC').toLowerCase(); + return (Object.keys(choices) as T[]).find((key) => + [key, ...choices[key]].some((alias) => alias.toLowerCase() === normalized)); +} + +export const common = { + denied: { 'zh-CN': '无权限:此操作仅管理员可用。', en: 'Permission denied: administrators only.' }, + failed: { 'zh-CN': '操作未完成,请查看插件状态或联系维护人员。', en: 'Operation failed. Check plugin status or contact maintenance.' }, + unknown: { 'zh-CN': '未知命令,请发送 !帮助。', en: 'Unknown command. Send !help.' }, + usage: { 'zh-CN': '用法:{usage}', en: 'Usage: {usage}' }, + expired: { 'zh-CN': '确认码无效、已使用或已过期,请重新预览。', en: 'Invalid, used or expired confirmation. Preview again.' }, + empty: { 'zh-CN': '暂无记录。', en: 'No records.' }, + preview: { 'zh-CN': '预览(尚未执行):\n{details}\n5 分钟内由同一管理员发送:{command}', en: 'Preview (not executed):\n{details}\nThe same administrator can confirm within 5 minutes: {command}' }, + done: { 'zh-CN': '执行结果:\n{details}', en: 'Results:\n{details}' }, + removed: { 'zh-CN': '旧的重置、测试和手动等级命令已停用。请使用 !日报、!月报 或 !清理 预览。', en: 'Legacy reset, test and manual level commands are retired. Use !report daily, !report monthly or !cleanup preview.' }, +} satisfies Messages; diff --git a/src/core/matrix/matrix-session.spec.ts b/src/core/matrix/matrix-session.spec.ts new file mode 100644 index 0000000..549cb27 --- /dev/null +++ b/src/core/matrix/matrix-session.spec.ts @@ -0,0 +1,37 @@ +jest.mock('matrix-bot-sdk', () => ({})); +jest.mock('@matrix-org/matrix-sdk-crypto-nodejs', () => ({})); +import { MatrixSession } from './matrix-session'; +import { MatrixEventSink } from './types'; + +describe('Matrix transport failure semantics without connecting', () => { + const config = { userId: '@bot:example.org', password: 'fixture', homeServer: 'https://example.org' }; + const sink: MatrixEventSink = { onMessage: jest.fn(), onMember: jest.fn(), onPowerLevel: jest.fn() }; + it('rejects mutations and permission reads before the session is ready', async () => { + const session = new MatrixSession('test', config, sink, false); + await expect(session.send('!room:example.org', 'text')).rejects.toThrow('not ready'); + await expect(session.kick('!room:example.org', '@member:example.org')).rejects.toThrow('not ready'); + await expect(session.getPowerLevel('!room:example.org', '@member:example.org')).rejects.toThrow('not ready'); + }); + it('propagates lookup failures rather than granting an apparent low permission level', async () => { + const session = new MatrixSession('test', config, sink, false); + Object.assign(session, { client: { + getRoomStateEvent: async () => { throw new Error('Unavailable'); }, + getJoinedRoomMembers: async () => { throw new Error('Unavailable'); }, + } }); + await expect(session.getPowerLevel('!room:example.org', '@member:example.org')).rejects.toThrow('Unavailable'); + await expect(session.getJoinedMembers('!room:example.org')).rejects.toThrow('Unavailable'); + }); + it('filters replayed commands and self messages before dispatch', () => { + const handlers = new Map void>(); + const session = new MatrixSession('test', config, sink, false); + (session as any).registerHandlers({ on: (name: string, fn: (...args: any[]) => void) => handlers.set(name, fn) }); + const onMessage = handlers.get('room.message')!; + jest.mocked(sink.onMessage).mockClear(); + const event = { event_id: '$event', sender: '@member:example.org', content: { msgtype: 'm.text', body: '!plugin enable checkin' }, origin_server_ts: 1 }; + onMessage('!room:example.org', event); + onMessage('!room:example.org', { ...event, sender: config.userId, origin_server_ts: Date.now() + 10 }); + expect(sink.onMessage).not.toHaveBeenCalled(); + onMessage('!room:example.org', { ...event, origin_server_ts: Date.now() + 10 }); + expect(sink.onMessage).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/core/matrix/matrix-session.ts b/src/core/matrix/matrix-session.ts new file mode 100644 index 0000000..a123db7 --- /dev/null +++ b/src/core/matrix/matrix-session.ts @@ -0,0 +1,463 @@ +import { Logger } from '@nestjs/common'; +import * as fs from 'fs'; +import * as path from 'path'; +import { + MatrixAuth, + MatrixClient, + RustSdkCryptoStorageProvider, + SimpleFsStorageProvider, +} from 'matrix-bot-sdk'; +import { StoreType } from '@matrix-org/matrix-sdk-crypto-nodejs'; +import { AccountConfig } from '../../config/schema'; +import { InboundMessage, MemberEvent } from '../command/types'; +import { MatrixEventSink, MatrixTransport } from './types'; + +interface PersistedCreds { + accessToken: string; + userId: string; + deviceId?: string; + baseUrl: string; +} + +/** + * 包装一个 matrix-bot-sdk client = 一个 Matrix 账号会话。 + * 负责:登录、sync、把底层事件归一化后交给 sink;并提供出站能力。 + * + * 端到端加密(E2EE):使用 matrix-bot-sdk + @matrix-org/matrix-sdk-crypto-nodejs + * 的原生 Rust 加密内核,加密状态持久化到 SQLite(每账号一个目录), + * 加密房收发的消息会被自动加/解密。 + * + * 登录策略:首次用密码登录拿 accessToken/deviceId 并落盘,之后复用, + * 避免每次启动都重新登录(产生新设备、触发限流、丢失加密会话)。 + * + * dryRun=true 时不连接网络,send/kick 仅记日志,便于本地/CI 启动验证。 + */ +export class MatrixSession implements MatrixTransport { + private readonly logger: Logger; + private client?: MatrixClient; + private selfUserId?: string; + private started = false; + private readonly acceptEventsAfter = Date.now(); + /** 记录 bot 自己刚发出的 event_id,sync 回流时跳过,避免回应自己(支持与用户同账号自测)。 */ + private readonly recentSentEventIds = new Set(); + + get userId(): string { return this.selfUserId ?? this.cfg.userId; } + + constructor( + public readonly account: string, + private readonly cfg: AccountConfig, + private readonly sink: MatrixEventSink, + private readonly dryRun: boolean, + // 只同步这些房间(各 bot 关注房间的并集)。为空则同步全部(不推荐: + // 账号若加入大量加密房,初始 sync 会拉取并尝试解密海量历史 → 内存暴涨被 OOM)。 + private readonly watchRoomIds: string[] = [], + ) { + this.logger = new Logger(`MatrixSession:${account}`); + } + + async start(): Promise { + if (this.started) return; + this.started = true; + + if (this.dryRun) { + this.logger.warn( + `[dry-run] 跳过登录,账号 ${this.cfg.userId} 不会真正连接`, + ); + return; + } + + const accDir = this.accountDir(); + fs.mkdirSync(accDir, { recursive: true }); + + const storage = new SimpleFsStorageProvider(path.join(accDir, 'state.json')); + const crypto = new RustSdkCryptoStorageProvider( + path.join(accDir, 'crypto'), + StoreType.Sqlite, + ); + + let client = await this.buildClient(accDir, storage, crypto); + this.registerHandlers(client); + + const syncFilter = this.buildSyncFilter(); + + try { + await client.start(syncFilter); + } catch (err) { + // accessToken 失效(如服务端登出该设备):清除凭据与加密状态后重登一次。 + if (this.isTokenError(err)) { + this.logger.warn( + `账号 ${this.cfg.userId} 的 accessToken 已失效,清除本地凭据后重新登录。`, + ); + this.clearCreds(accDir); + client = await this.loginAndBuild(accDir, storage, crypto); + this.registerHandlers(client); + await client.start(syncFilter); + } else { + throw err; + } + } + + this.client = client; + this.selfUserId = await client.getUserId(); + const whoami = await client.getWhoAmI().catch(() => undefined); + this.logger.log( + `账号 ${this.selfUserId} 已登录并开始 sync` + + (whoami?.device_id ? `(device=${whoami.device_id})` : '') + + `,E2EE=${client.crypto ? '已启用' : '未启用'}` + + (this.watchRoomIds.length + ? `,仅同步 ${this.watchRoomIds.length} 个房间` + : ',同步全部房间'), + ); + } + + async getJoinedRooms(): Promise { + if (this.dryRun) return []; + if (!this.client) throw new Error('Matrix session is not ready'); + return this.client.getJoinedRooms(); + } + + async stop(): Promise { + this.client?.stop(); + } + + /** + * 构造 sync filter:用房间白名单把同步范围限制在各 bot 关注的房间, + * 避免账号加入的其它(尤其大型加密)房间被拉取、解密历史而耗尽内存。 + * to-device / account_data 不过滤,保证 E2EE 密钥分发正常。 + * 返回 undefined 表示不限制(同步全部房间)。 + */ + private buildSyncFilter(): Record | undefined { + if (!this.watchRoomIds.length) return undefined; + return { + room: { + rooms: this.watchRoomIds, + timeline: { limit: 20, lazy_load_members: true }, + state: { lazy_load_members: true }, + }, + }; + } + + /** + * 构建 client:优先复用落盘的 accessToken;无则用密码登录一次并落盘。 + */ + private async buildClient( + accDir: string, + storage: SimpleFsStorageProvider, + crypto: RustSdkCryptoStorageProvider, + ): Promise { + const creds = this.readCreds(accDir); + if (creds?.accessToken && creds.baseUrl) { + this.logger.log(`复用已保存的登录凭据(${creds.userId})`); + return new MatrixClient(creds.baseUrl, creds.accessToken, storage, crypto); + } + return this.loginAndBuild(accDir, storage, crypto); + } + + /** + * 用密码登录一次,拿到 accessToken/baseUrl/deviceId 落盘,返回长期使用的 client。 + * matrix-bot-sdk 的 MatrixAuth 会自行做 .well-known 发现并返回正确的 + * homeserverUrl(裸域名 example.org → matrix.example.org),无需手动发现。 + */ + private async loginAndBuild( + accDir: string, + storage: SimpleFsStorageProvider, + crypto: RustSdkCryptoStorageProvider, + ): Promise { + const loggedIn = await this.passwordLoginWithRetry(); + + const baseUrl = loggedIn.homeserverUrl; + const accessToken = loggedIn.accessToken; + const userId = await loggedIn.getUserId(); + const whoami = await loggedIn.getWhoAmI().catch(() => undefined); + + this.logger.log(`账号 ${userId} 密码登录成功,凭据已保存,后续复用`); + + this.writeCreds(accDir, { + accessToken, + userId, + deviceId: whoami?.device_id, + baseUrl, + }); + + // 复用已注册事件/加密状态的 storage、crypto,生成长期使用的 client。 + return new MatrixClient(baseUrl, accessToken, storage, crypto); + } + + /** + * 密码登录,带 429 限流处理: + * 登录被限流时,读 retry_after_ms 在【进程内】等待后重试,而非抛错退出。 + * 关键原因:若让进程崩溃退出,容器(restart: on-failure)会立刻重启并再次登录, + * 每次新登录都会刷新/延长服务端的登录限流窗口,陷入"反复登录→反复限流"的死循环。 + * 进程内等待则只占用一次登录配额,等窗口过去即可成功,随后凭据落盘不再登录。 + */ + private async passwordLoginWithRetry(): Promise { + // MatrixAuth 不会自动做服务器发现,它直接拿传入地址打 /login。 + // 必须先用 .well-known 把账号域名(https://example.org)解析成真实 API 域名 + // (https://matrix.example.org),否则会打到裸域名的落地页入口被限流(429)。 + const baseUrl = await this.discoverBaseUrl(this.cfg.homeServer); + const auth = new MatrixAuth(baseUrl); + const maxWaitMs = 10 * 60_000; // 单次等待上限 10 分钟,避免异常超长阻塞。 + for (let attempt = 1; ; attempt++) { + try { + return await auth.passwordLogin( + this.cfg.userId, + this.cfg.password, + '🤖 签到机器人 (daily-bot-nest)', + ); + } catch (err) { + const e = err as { + errcode?: string; + statusCode?: number; + retryAfterMs?: number; + }; + const isRateLimited = + e?.errcode === 'M_LIMIT_EXCEEDED' || e?.statusCode === 429; + if (!isRateLimited) throw err; + + const waitMs = Math.min( + Math.max((e.retryAfterMs ?? 30_000) + 1_000, 5_000), + maxWaitMs, + ); + this.logger.warn( + `账号 ${this.cfg.userId} 登录被限流(429),${Math.ceil( + waitMs / 1000, + )} 秒后在进程内重试(第 ${attempt} 次)。` + + ' 不退出进程,避免容器重启反复登录刷新限流窗口。', + ); + await new Promise((resolve) => setTimeout(resolve, waitMs)); + } + } + } + + /** + * 通过 /.well-known/matrix/client 自动发现真实的 homeserver API 地址。 + * 例如账号域名 https://example.org 会被解析为 https://matrix.example.org。 + * 这是 Matrix 标准的服务器发现机制(Element 等客户端均如此)。 + * 若配置里已经是真实 API 地址,发现通常返回同值;发现失败则回退原值。 + */ + private async discoverBaseUrl(configured: string): Promise { + const trimmed = configured.replace(/\/$/, ''); + try { + const res = await fetch(`${trimmed}/.well-known/matrix/client`, { + method: 'GET', + }); + if (res.ok) { + const data = (await res.json()) as { + 'm.homeserver'?: { base_url?: string }; + }; + const baseUrl = data['m.homeserver']?.base_url?.replace(/\/$/, ''); + if (baseUrl) { + if (baseUrl !== trimmed) { + this.logger.log( + `服务器发现: ${configured} → ${baseUrl}(来自 .well-known)`, + ); + } + return baseUrl; + } + } + this.logger.warn( + `服务器发现未返回有效地址(HTTP ${res.status}),回退使用 ${configured}`, + ); + } catch (err) { + this.logger.warn( + `服务器发现失败,回退使用 ${configured}: ${(err as Error).message}`, + ); + } + return trimmed; + } + + private accountDir(): string { + const base = process.env.DATA_DIR ?? './data'; + return path.resolve(base, 'matrix', this.account); + } + + private credsPath(accDir: string): string { + return path.join(accDir, 'creds.json'); + } + + private readCreds(accDir: string): PersistedCreds | undefined { + try { + const raw = fs.readFileSync(this.credsPath(accDir), 'utf8'); + return JSON.parse(raw) as PersistedCreds; + } catch { + return undefined; + } + } + + private writeCreds(accDir: string, creds: PersistedCreds): void { + fs.writeFileSync(this.credsPath(accDir), JSON.stringify(creds, null, 2), { + mode: 0o600, + }); + } + + private clearCreds(accDir: string): void { + try { + fs.rmSync(this.credsPath(accDir), { force: true }); + } catch { + /* ignore */ + } + // 旧 device 已失效,其加密会话不可再用,清空加密 store 让新设备重新建立。 + try { + fs.rmSync(path.join(accDir, 'crypto'), { recursive: true, force: true }); + } catch { + /* ignore */ + } + } + + private isTokenError(err: unknown): boolean { + const e = err as { errcode?: string; statusCode?: number }; + return ( + e?.errcode === 'M_UNKNOWN_TOKEN' || + e?.errcode === 'M_MISSING_TOKEN' || + e?.statusCode === 401 + ); + } + + async send( + roomId: string, + text: string, + replyToEventId?: string, + ): Promise { + if (this.dryRun) { + this.logger.log(`[dry-run] send → ${roomId}: ${text}`); + return 'dry-run-event-id'; + } + if (!this.client) throw new Error('Matrix session is not ready'); + const content: Record = { msgtype: 'm.text', body: text }; + if (replyToEventId) { + content['m.relates_to'] = { + 'm.in_reply_to': { event_id: replyToEventId }, + }; + } + // 加密房间下 sendMessage 会自动加密;返回 event_id。 + const eventId = await this.client.sendMessage(roomId, content); + this.rememberSent(eventId); + return eventId; + } + + /** 登记 bot 自己发出的 event_id,用于在 sync 回流时去重(有界,防内存泄漏)。 */ + private rememberSent(eventId?: string): void { + if (!eventId) return; + this.recentSentEventIds.add(eventId); + if (this.recentSentEventIds.size > 500) { + const oldest = this.recentSentEventIds.values().next().value; + if (oldest) this.recentSentEventIds.delete(oldest); + } + } + + async kick(roomId: string, userId: string, reason?: string): Promise { + if (this.dryRun) { + this.logger.log( + `[dry-run] kick ${userId} from ${roomId} (${reason ?? ''})`, + ); + return; + } + if (!this.client) throw new Error('Matrix session is not ready'); + await this.client.kickUser(userId, roomId, reason); + } + + async invite(roomId: string, userId: string): Promise { + if (this.dryRun) { + this.logger.log(`[dry-run] invite ${userId} to ${roomId}`); + return; + } + if (!this.client) throw new Error('Matrix session is not ready'); + await this.client.inviteUser(userId, roomId); + } + + async getMemberCount(roomId: string): Promise { + return (await this.getJoinedMembers(roomId)).length; + } + + async getJoinedMembers(roomId: string): Promise { + if (this.dryRun) return []; + if (!this.client) throw new Error('Matrix session is not ready'); + return this.client.getJoinedRoomMembers(roomId); + } + + /** 读取用户在房间内的 power level:取 m.room.power_levels 的 users[userId],回落 users_default。 */ + async getPowerLevel(roomId: string, userId: string): Promise { + if (this.dryRun) return 0; + if (!this.client) throw new Error('Matrix session is not ready'); + const pl = (await this.client.getRoomStateEvent( + roomId, + 'm.room.power_levels', + '', + )) as { users?: Record; users_default?: number }; + const users = pl?.users ?? {}; + const value = users[userId] ?? pl?.users_default ?? 0; + if (typeof value !== 'number' || !Number.isFinite(value)) throw new Error('Invalid power level'); + return value; + } + + private registerHandlers(client: MatrixClient): void { + // room.message:已自动解密的房间消息(明文与加密房统一在此回调)。 + client.on('room.message', (roomId: string, event: Record) => { + const sender = event['sender'] as string | undefined; + const eventId = event['event_id'] as string | undefined; + if (sender === this.cfg.userId || sender === this.selfUserId) return; + if (typeof event['origin_server_ts'] !== 'number' || event['origin_server_ts'] < this.acceptEventsAfter) return; + // 去重:仅跳过 bot 自己刚发出的消息,用户同账号发的命令仍会处理。 + if (eventId && this.recentSentEventIds.has(eventId)) { + this.recentSentEventIds.delete(eventId); + return; + } + const content = (event['content'] ?? {}) as Record; + this.logger.debug?.( + `收到消息 room=${roomId} from=${sender} type=${content['msgtype']}: ${String(content['body'] ?? '').slice(0, 60)}`, + ); + if (content['msgtype'] !== 'm.text') return; + + const msg: InboundMessage = { + eventId: (event['event_id'] as string) ?? '', + account: this.account, + roomId, + userId: sender ?? '', + text: (content['body'] as string) ?? '', + timestampMs: (event['origin_server_ts'] as number) ?? Date.now(), + }; + void this.sink.onMessage(msg); + }); + + // room.event:所有房间事件;在此筛成员变更及权限变更。 + client.on('room.event', (roomId: string, event: Record) => { + if (typeof event['origin_server_ts'] !== 'number' || event['origin_server_ts'] < this.acceptEventsAfter) return; + const type = event['type']; + const content = (event['content'] ?? {}) as Record; + + if (type === 'm.room.member') { + const ev: MemberEvent = { + account: this.account, + roomId, + userId: (event['state_key'] as string) ?? '', + membership: content['membership'] as MemberEvent['membership'], + }; + void this.sink.onMember(ev); + } else if (type === 'm.room.power_levels') { + const users = (content['users'] ?? {}) as Record; + const prevContent = (event['unsigned']?.['prev_content'] ?? event['prev_content'] ?? {}) as Record; + const prevUsers = (prevContent['users'] ?? {}) as Record; + const defaultPower = (content['users_default'] as number) ?? 0; + + void this.sink.onPowerLevel({ + account: this.account, + roomId, + users, + prevUsers, + defaultPower, + }); + } + }); + + // 解密失败:最常见是历史消息(bot 加入前的消息,发送方不会共享旧密钥) + // 或密钥尚未送达,属正常现象,降为 debug 避免刷屏;库损坏等异常另行排查。 + client.on( + 'room.failed_decryption', + (roomId: string, event: Record, e: Error) => { + this.logger.debug( + `房间 ${roomId} 事件 ${event?.['event_id']} 解密失败: ${e?.message}`, + ); + }, + ); + } +} diff --git a/src/core/matrix/matrix.module.ts b/src/core/matrix/matrix.module.ts new file mode 100644 index 0000000..915771a --- /dev/null +++ b/src/core/matrix/matrix.module.ts @@ -0,0 +1,9 @@ +import { Global, Module } from '@nestjs/common'; +import { SessionManager } from './session-manager.service'; + +@Global() +@Module({ + providers: [SessionManager], + exports: [SessionManager], +}) +export class MatrixModule {} diff --git a/src/core/matrix/session-manager.service.ts b/src/core/matrix/session-manager.service.ts new file mode 100644 index 0000000..8200ea1 --- /dev/null +++ b/src/core/matrix/session-manager.service.ts @@ -0,0 +1,61 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { ConfigService } from '../../config/config.service'; +import { recoveryRooms } from '../plugin/room-binding'; +import { MatrixSession } from './matrix-session'; +import { MatrixEventSink } from './types'; + +/** + * 管理所有 Matrix 账号会话。 + * 多个 bot 引用同一 account ⇒ 只建一个 MatrixSession(共享账号); + * 引用不同 account ⇒ 各自独立会话(独立身份)。 + */ +@Injectable() +export class SessionManager { + private readonly logger = new Logger(SessionManager.name); + private readonly sessions = new Map(); + + constructor(private readonly config: ConfigService) {} + + /** 按需创建并缓存某账号的会话(去重)。 */ + ensureSession(account: string, sink: MatrixEventSink): MatrixSession { + const existing = this.sessions.get(account); + if (existing) return existing; + + const accCfg = this.config.getAccount(account); + // 聚合所有使用该账号的 bot 关注的房间(去重),限制 sync 范围。 + const watchRoomIds = [ + ...new Set([ + ...this.config.all.rooms + .filter((room) => room.account === account) + .map((room) => room.roomId), + ...recoveryRooms(this.config.all.rooms, account).keys(), + ]), + ]; + const session = new MatrixSession( + account, + accCfg, + sink, + this.config.isDryRun, + watchRoomIds, + ); + this.sessions.set(account, session); + return session; + } + + get(account: string): MatrixSession | undefined { + return this.sessions.get(account); + } + + async startAll(): Promise { + for (const [account, session] of this.sessions) { + this.logger.log(`启动会话: ${account}`); + await session.start(); + } + } + + async stopAll(): Promise { + for (const session of this.sessions.values()) { + await session.stop(); + } + } +} diff --git a/src/core/matrix/types.ts b/src/core/matrix/types.ts new file mode 100644 index 0000000..4b4616d --- /dev/null +++ b/src/core/matrix/types.ts @@ -0,0 +1,21 @@ +import { InboundMessage, MemberEvent, PowerLevelEvent } from '../command/types'; + +/** bot 与 Matrix 交互的统一出站能力(BotContext 内部依赖它)。 */ +export interface MatrixTransport { + readonly account: string; + readonly userId: string; + send(roomId: string, text: string, replyToEventId?: string): Promise; + kick(roomId: string, userId: string, reason?: string): Promise; + invite(roomId: string, userId: string): Promise; + getMemberCount(roomId: string): Promise; + getJoinedMembers(roomId: string): Promise; + /** Permission lookups reject on failure; callers must not treat errors as level zero. */ + getPowerLevel(roomId: string, userId: string): Promise; +} + +/** 归一化事件回调,由 SessionManager 注册,转交 Dispatcher。 */ +export interface MatrixEventSink { + onMessage(msg: InboundMessage): Promise; + onMember(ev: MemberEvent): Promise; + onPowerLevel(ev: PowerLevelEvent): Promise; +} diff --git a/src/core/plugin/calendar.ts b/src/core/plugin/calendar.ts new file mode 100644 index 0000000..59c2d75 --- /dev/null +++ b/src/core/plugin/calendar.ts @@ -0,0 +1,18 @@ +export function localDate(date: Date, timeZone: string): string { + const parts = new Intl.DateTimeFormat('en-CA', { timeZone, year: 'numeric', month: '2-digit', day: '2-digit' }).formatToParts(date); + const get = (type: string) => parts.find((p) => p.type === type)!.value; + return `${get('year')}-${get('month')}-${get('day')}`; +} +export function localMinutes(date: Date, timeZone: string): number { + const parts = new Intl.DateTimeFormat('en-GB', { timeZone, hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }).formatToParts(date); + return Number(parts.find((p) => p.type === 'hour')!.value) * 60 + Number(parts.find((p) => p.type === 'minute')!.value); +} +export function shiftDate(date: string, days: number): string { + const value = new Date(`${date}T12:00:00Z`); + value.setUTCDate(value.getUTCDate() + days); + return value.toISOString().slice(0, 10); +} +export function validDate(value: string): boolean { + return /^\d{4}-\d{2}-\d{2}$/.test(value) && Number.isFinite(Date.parse(value)) && new Date(value).toISOString().slice(0, 10) === value; +} +export function previousMonth(date: string): string { return shiftDate(`${date.slice(0, 7)}-01`, -1).slice(0, 7); } diff --git a/src/core/plugin/catalog.spec.ts b/src/core/plugin/catalog.spec.ts new file mode 100644 index 0000000..7697039 --- /dev/null +++ b/src/core/plugin/catalog.spec.ts @@ -0,0 +1,38 @@ +import { mkdtempSync, writeFileSync, rmSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import { tmpdir } from 'node:os'; +import { loadPlugins } from './catalog'; +import { RoomRuntime } from './room-runtime'; +import { roomSchema } from '../../config/schema'; +import { FakeTransport, FakeScheduler, memoryStores, message } from '../../test/fakes'; + +describe('plugin discovery', () => { + it('discovers built-in plugins without a registration list', () => { + expect(loadPlugins([resolve(__dirname, '../../plugins')]).map((p) => p.id)).toEqual(['checkin', 'room-manager']); + }); + it('loads a new server-installed module without changing core imports', () => { + const dir = mkdtempSync(join(tmpdir(), 'bot-plugin-')); + try { + writeFileSync(join(dir, 'sample.plugin.js'), `exports.default = { apiVersion: 1, id: 'sample', version: '1', description: { 'zh-CN': '示例', en: 'Example' }, validate: c => c, create: () => ({ commands: [] }) };`); + expect(loadPlugins([dir]).map((p) => p.id)).toEqual(['sample']); + expect(() => loadPlugins([dir, dir])).toThrow('Duplicate'); + } finally { rmSync(dir, { recursive: true, force: true }); } + }); + it('rejects incompatible API versions', () => { + const dir = mkdtempSync(join(tmpdir(), 'bot-plugin-')); + try { + writeFileSync(join(dir, 'bad.plugin.js'), `exports.default = { apiVersion: 2, id: 'bad' };`); + expect(() => loadPlugins([dir])).toThrow('Invalid plugin'); + } finally { rmSync(dir, { recursive: true, force: true }); } + }); + it('runs the external example with the unchanged host and bilingual commands', async () => { + const transport = new FakeTransport(); + const runtime = new RoomRuntime(roomSchema.parse({ account: 'test', roomId: '!control:example.org' }), + loadPlugins([resolve(__dirname, '../../../examples')]), transport, memoryStores(), new FakeScheduler()); + await runtime.start(); await runtime.message(message('!插件 启用 问候', '@admin:example.org')); + await runtime.message(message('!问候 世界')); expect(transport.sent.at(-1)?.text).toBe('你好,世界!'); + await runtime.message(message('!language en', '@admin:example.org')); + await runtime.message(message('!greet World')); expect(transport.sent.at(-1)?.text).toBe('Hello, World!'); + await runtime.stop(); + }); +}); diff --git a/src/core/plugin/catalog.ts b/src/core/plugin/catalog.ts new file mode 100644 index 0000000..37558ba --- /dev/null +++ b/src/core/plugin/catalog.ts @@ -0,0 +1,30 @@ +import { readdirSync } from 'node:fs'; +import { join } from 'node:path'; +import { PluginDefinition } from './types'; + +/** Loads trusted server-installed modules. Chat commands never download or evaluate code. */ +export function loadPlugins(directories: string[]): PluginDefinition[] { + const definitions: PluginDefinition[] = []; + const aliases = new Set(); + const visit = (directory: string) => { + for (const entry of readdirSync(directory, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) { + const file = join(directory, entry.name); + if (entry.isDirectory()) { visit(file); continue; } + if (!/\.plugin\.(js|ts)$/.test(entry.name) || entry.name.endsWith('.d.ts')) continue; + const definition = require(file).default as PluginDefinition; + if (definition?.apiVersion !== 1 || !/^[a-z][a-z0-9-]*$/.test(definition.id) || + typeof definition.version !== 'string' || typeof definition.create !== 'function' || + typeof definition.validate !== 'function' || !definition.description?.en || !definition.description?.['zh-CN']) { + throw new Error(`Invalid plugin manifest: ${entry.name}`); + } + for (const alias of [definition.id, ...(definition.aliases ?? [])]) { + const key = alias.normalize('NFKC').toLowerCase(); + if (aliases.has(key)) throw new Error(`Duplicate plugin alias: ${alias}`); + aliases.add(key); + } + definitions.push(definition); + } + }; + directories.forEach(visit); + return definitions; +} diff --git a/src/core/plugin/confirmation.ts b/src/core/plugin/confirmation.ts new file mode 100644 index 0000000..e69aad3 --- /dev/null +++ b/src/core/plugin/confirmation.ts @@ -0,0 +1,22 @@ +import { randomBytes } from 'node:crypto'; +import { PluginContext } from './types'; + +interface Pending { actor: string; expires: number; payload: T; } +export class Confirmations { + constructor(private readonly ctx: PluginContext, private readonly kind: string) {} + async preview(actor: string, payload: T): Promise { + const token = randomBytes(8).toString('hex'); + // One plan per actor and operation bounds storage and invalidates older plans. + await this.ctx.db.set(`pending:${this.kind}:${actor}`, { + actor, token, expires: this.ctx.now().getTime() + 300_000, payload, + }); + return token; + } + async consume(actor: string, token: string): Promise { + const key = `pending:${this.kind}:${actor}`; + const plan = await this.ctx.db.get & { token: string }>(key); + if (!plan || plan.token !== token || plan.expires <= this.ctx.now().getTime()) return undefined; + await this.ctx.db.remove(key); + return plan.payload; + } +} diff --git a/src/core/plugin/migrate-checkin.ts b/src/core/plugin/migrate-checkin.ts new file mode 100644 index 0000000..83d0a74 --- /dev/null +++ b/src/core/plugin/migrate-checkin.ts @@ -0,0 +1,38 @@ +import { RootConfig } from '../../config/schema'; +import { PrismaService } from '../db/prisma.service'; +import { localDate } from './calendar'; +import { pluginScope } from './room-runtime'; + +/** Copies the legacy scope atomically. Source rows are retained for rollback. */ +export async function migrateCheckin(prisma: PrismaService, config: RootConfig): Promise { + const source = await prisma.botState.findMany({ where: { botName: 'checkin' } }); + if (!source.length) return; + const target = config.legacyCheckinTarget; + const room = target && config.rooms.find((r) => r.account === target.account && r.roomId === target.roomId); + if (!target || !room || !room.plugins.checkin) { + throw new Error('Legacy check-in data requires an explicit legacyCheckinTarget with a configured checkin plugin'); + } + const scope = pluginScope(target.account, target.roomId, 'checkin'); + await prisma.$transaction(async (tx) => { + const marker = await tx.botState.findUnique({ where: { botName_key: { botName: '$migrations', key: 'checkin-v2' } } }); + if (marker) { + if (JSON.parse(marker.valueJson).scope !== scope) throw new Error('Legacy check-in data was already assigned to another room'); + return; + } + if (await tx.botState.count({ where: { botName: scope } })) throw new Error('Migration target already contains data; explicit reconciliation is required'); + for (const row of source) { + if (!/^@.+:.+$/.test(row.key)) throw new Error('Unexpected legacy check-in key'); + const old = JSON.parse(row.valueJson) as { checkinTimesInMonth?: number; checkinUnixMs?: number }; + const count = old.checkinTimesInMonth ?? 0, lastAt = old.checkinUnixMs ?? 0; + if (!Number.isInteger(count) || count < 0 || !Number.isFinite(lastAt) || lastAt < 0 || (count > 0 && !lastAt)) { + throw new Error('Invalid legacy check-in record'); + } + const date = lastAt ? localDate(new Date(lastAt), room.timeZone) : ''; + await tx.botState.create({ data: { botName: scope, key: `legacy:${row.key}`, + valueJson: JSON.stringify({ userId: row.key, count, month: date.slice(0, 7), lastAt }) } }); + if (date) await tx.botState.create({ data: { botName: scope, key: `day:${JSON.stringify([row.key, date])}`, + valueJson: JSON.stringify({ userId: row.key, date, at: lastAt, counted: false }) } }); + } + await tx.botState.create({ data: { botName: '$migrations', key: 'checkin-v2', valueJson: JSON.stringify({ scope, records: source.length }) } }); + }, { timeout: 30_000 }); +} diff --git a/src/core/plugin/plugin-manager.service.ts b/src/core/plugin/plugin-manager.service.ts new file mode 100644 index 0000000..793b92a --- /dev/null +++ b/src/core/plugin/plugin-manager.service.ts @@ -0,0 +1,63 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { resolve } from 'node:path'; +import { ConfigService } from '../../config/config.service'; +import { PrismaService } from '../db/prisma.service'; +import { BotStore } from '../db/bot-store'; +import { SessionManager } from '../matrix/session-manager.service'; +import { loadPlugins } from './catalog'; +import { RoomConfig } from '../../config/schema'; +import { bindingKey, recoveryRooms, recoverBinding } from './room-binding'; +import { RoomRuntime } from './room-runtime'; +import { PluginScheduler } from './scheduler'; +import { migrateCheckin } from './migrate-checkin'; +import { InboundMessage, MemberEvent, PowerLevelEvent } from '../command/types'; + +@Injectable() +export class PluginManager { + private readonly logger = new Logger(PluginManager.name); + private readonly rooms = new Map(); + private readonly candidates = new Map(); + private get bindings() { return new BotStore(this.prisma, '$room-bindings'); } + constructor(private readonly config: ConfigService, private readonly prisma: PrismaService, private readonly sessions: SessionManager) {} + + async initialize(): Promise { + const definitions = loadPlugins([resolve(__dirname, '../../plugins'), ...this.config.all.pluginDirectories.map((p) => resolve(p))]); + await migrateCheckin(this.prisma, this.config.all); + for (const account of new Set(this.config.all.rooms.map((room) => room.account))) { + for (const [id, room] of recoveryRooms(this.config.all.rooms, account)) { + this.candidates.set(JSON.stringify([account, id]), room); + } + } + for (const room of this.config.all.rooms) { + const session = this.sessions.get(room.account); + if (!session) throw new Error('Missing account session'); + const saved = await this.bindings.get<{ id: string }>(bindingKey(room)); + if (saved && this.candidates.get(JSON.stringify([room.account, saved.id])) !== room) { + throw new Error('Room binding conflicts with configured rooms or recovery policy'); + } + const effective = { ...room, roomId: saved?.id ?? room.roomId }; + this.rooms.set(JSON.stringify([room.account, effective.roomId]), new RoomRuntime(effective, definitions, + session, (scope) => new BotStore(this.prisma, scope), new PluginScheduler(), undefined, room.roomId)); + } + } + async start(): Promise { + for (const runtime of this.rooms.values()) { + await runtime.start(); + for (const state of runtime.status()) if (state.state === 'failed') this.logger.error(`Plugin failed to start: ${state.id}`); + } + } + async stop(): Promise { + for (const runtime of this.rooms.values()) await runtime.stop(); + } + async onMessage(msg: InboundMessage): Promise { + const key = JSON.stringify([msg.account, msg.roomId]); + const runtime = this.rooms.get(key); + if (runtime) return runtime.message(msg); + const candidate = this.candidates.get(key); + const session = this.sessions.get(msg.account); + if (candidate && session) await recoverBinding(candidate, msg, this.bindings, session); + } + async onEvent(event: MemberEvent | PowerLevelEvent): Promise { + await this.rooms.get(JSON.stringify([event.account, event.roomId]))?.event(event); + } +} diff --git a/src/core/plugin/room-binding.spec.ts b/src/core/plugin/room-binding.spec.ts new file mode 100644 index 0000000..ed4dbdd --- /dev/null +++ b/src/core/plugin/room-binding.spec.ts @@ -0,0 +1,36 @@ +import { roomSchema } from '../../config/schema'; +import { memoryStores, message } from '../../test/fakes'; +import { recoverBinding, bindingKey, recoveryRooms } from './room-binding'; + +const id = '!' + 'A'.repeat(43); +const admin = '@admin:example.org'; +const room = roomSchema.parse({ account: 'test', admins: [admin], roomId: id + ':example.org' }); +const msg = message('/config bind', admin, id); +function fixture() { + return { store: memoryStores()('bindings'), transport: { getJoinedRooms: jest.fn(async () => [id]), + getPowerLevel: jest.fn(async () => 100), send: jest.fn(async () => '$event') } }; +} +it('shows the recovery command before binding the event room and recording its actor', async () => { + const { store, transport } = fixture(); + await recoverBinding(room, { ...msg, text: '!配置' }, store, transport); + expect(await store.get(bindingKey(room))).toBeNull(); + expect(transport.send.mock.calls[0]).toContain(id); + await recoverBinding(room, msg, store, transport); + expect(await store.get(bindingKey(room))).toEqual({ id, actor: admin }); +}); +it('refuses unlisted senders, insufficient power and ambiguous joined rooms', async () => { + const { transport, store } = fixture(); + await recoverBinding(room, { ...msg, userId: '@other:example.org' }, store, transport); + transport.getPowerLevel.mockResolvedValueOnce(50); + await recoverBinding(room, msg, store, transport); + transport.getJoinedRooms.mockResolvedValueOnce([room.roomId, id]); + await recoverBinding(room, msg, store, transport); + await recoverBinding(room, { ...msg, text: '/config bind !other:example.org' }, store, transport); + expect(await store.entries()).toEqual([]); + expect(transport.send).not.toHaveBeenCalled(); +}); +it('excludes overlapping candidates and explicit routes from recovery', () => { + expect(recoveryRooms([room], 'test').get(id)).toBe(room); + expect(recoveryRooms([room, { ...room, roomId: id }], 'test').size).toBe(0); + expect(recoveryRooms([room, { ...room, roomId: id + ':other.example.org' }], 'test').size).toBe(0); +}); diff --git a/src/core/plugin/room-binding.ts b/src/core/plugin/room-binding.ts new file mode 100644 index 0000000..e2bfc33 --- /dev/null +++ b/src/core/plugin/room-binding.ts @@ -0,0 +1,42 @@ +import { RoomConfig } from '../../config/schema'; +import { InboundMessage } from '../command/types'; +import { translate } from '../i18n/i18n'; +import { Store } from './types'; + +// Handle the specific migration mistake without widening synchronization to all joined rooms. +export function recoveryId(room: RoomConfig): string | undefined { + if (!room.admins.length) return undefined; + return /^(![A-Za-z0-9_-]{43}):/.exec(room.roomId)?.[1]; +} + +export function recoveryRooms(rooms: RoomConfig[], account: string): Map { + const withinAccount = rooms.filter((room) => room.account === account); + const candidates = new Map(); + for (const room of withinAccount) { + const id = recoveryId(room); + if (!id || withinAccount.some((other) => other !== room && (other.roomId === id || other.roomId.startsWith(`${id}:`)))) continue; + candidates.set(id, room); + } + return candidates; +} + +export interface BindingTransport { + getJoinedRooms(): Promise; + getPowerLevel(roomId: string, userId: string): Promise; + send(roomId: string, text: string, eventId?: string): Promise; +} +export const bindingKey = (room: RoomConfig) => JSON.stringify([room.account, room.roomId]); +export async function recoverBinding(room: RoomConfig, msg: InboundMessage, store: Store, transport: BindingTransport): Promise { + if (room.account !== msg.account || recoveryId(room) !== msg.roomId || !room.admins.includes(msg.userId)) return; + const match = /^[!!//](?:config|配置)(?:\s+(bind|绑定))?$/iu.exec(msg.text.trim()); + if (!match) return; + const joined = await transport.getJoinedRooms(); + if (!joined.includes(msg.roomId) || joined.includes(room.roomId)) return; + if (!(await transport.getPowerLevel(msg.roomId, msg.userId) >= room.adminPowerLevel)) return; + if (match[1]) { + await store.set(bindingKey(room), { id: msg.roomId, actor: msg.userId }); + await transport.send(msg.roomId, translate({ 'zh-CN': '已保存此房间 ID,服务下次启动时生效。', en: 'Room ID saved. It takes effect at the next service start.' }, room.locale), msg.eventId); + } else { + await transport.send(msg.roomId, translate({ 'zh-CN': '当前房间 {id} 与配置不一致。发送 !配置 绑定 保存当前房间,重启后生效。', en: 'Current room {id} differs from configuration. Send !config bind to use this room at the next start.' }, room.locale, { id: msg.roomId }), msg.eventId); + } +} diff --git a/src/core/plugin/room-runtime.spec.ts b/src/core/plugin/room-runtime.spec.ts new file mode 100644 index 0000000..89f04df --- /dev/null +++ b/src/core/plugin/room-runtime.spec.ts @@ -0,0 +1,158 @@ +import { roomSchema } from '../../config/schema'; +import checkin from '../../plugins/checkin/checkin.plugin'; +import { FakeScheduler, FakeTransport, memoryStores, message } from '../../test/fakes'; +import { PluginContext, PluginDefinition } from './types'; +import { RoomRuntime, pluginScope } from './room-runtime'; + +const admin = '@admin:example.org'; +function setup(definitions: PluginDefinition[] = [checkin]) { + const store = memoryStores(), transport = new FakeTransport(), scheduler = new FakeScheduler(); + const config = roomSchema.parse({ account: 'test', roomId: '!control:example.org' }); + const runtime = new RoomRuntime(config, definitions, transport, store, scheduler); + return { runtime, config, transport, scheduler, store }; +} +const stub = (create: PluginDefinition['create']): PluginDefinition => ({ + apiVersion: 1, id: 'sample', aliases: ['示例'], version: '1', description: { 'zh-CN': '示例', en: 'sample' }, validate: (c) => c, create, +}); + +describe('room plugin lifecycle', () => { + it.each(['!', '!'])('supports %s with Chinese and English host and plugin commands', async (prefix) => { + const { runtime, transport } = setup(); + await runtime.start(); + await runtime.message(message(`${prefix}插件 启用 签到`, admin)); + expect(runtime.status()[0].state).toBe('enabled'); + await runtime.message(message(`${prefix}checkin`)); + expect(transport.sent.at(-1)?.text).toContain('签到成功'); + await runtime.message(message(`${prefix}签到`)); + expect(transport.sent.at(-1)?.text).toContain('已签到'); + for (const query of ['查询', 'list']) { + await runtime.message(message(`${prefix}${query}`)); + expect(transport.sent.at(-1)?.text).toContain('本月 1 次'); + } + for (const help of ['帮助', 'help']) { + await runtime.message(message(`${prefix}${help}`)); + expect(transport.sent.at(-1)?.text).toContain('今日签到'); + } + await runtime.message(message(`${prefix}plugin disable checkin`, admin)); + expect(runtime.status()[0].state).toBe('disabled'); + await runtime.stop(); + }); + it('keeps management commands available with all plugins disabled', async () => { + const { runtime, transport } = setup(); await runtime.start(); + await runtime.message(message('/plugin list')); + expect(transport.sent.at(-1)?.text).toContain('已停用'); + await runtime.message(message('/plugin enable checkin', admin)); + await runtime.message(message('签到')); + expect(transport.sent.at(-1)?.text).toContain('签到成功'); + await runtime.stop(); + }); + it('rejects non-admin lifecycle commands and failed permission reads', async () => { + const { runtime, transport } = setup(); await runtime.start(); + await runtime.message(message('!插件 启用 签到')); expect(runtime.status()[0].state).toBe('disabled'); + transport.powerFailures.add(admin); + await runtime.message(message('!plugin enable checkin', admin)); + expect(runtime.status()[0].state).toBe('disabled'); expect(transport.sent.at(-1)?.text).toContain('无权限'); + }); + it('stops jobs, preserves data, restores disabled state and keeps bilingual aliases', async () => { + const { runtime, config, store, transport, scheduler } = setup(); await runtime.start(); + await runtime.message(message('!插件 启用 签到', admin)); await runtime.message(message('/checkin')); + expect(scheduler.jobs.size).toBe(1); expect(scheduler.zones).toEqual(['Asia/Shanghai']); + await runtime.message(message('!plugin disable checkin', admin)); expect(scheduler.jobs.size).toBe(0); + await runtime.message(message('!checkin')); expect(transport.sent.at(-1)?.text).toContain('未知'); + await runtime.stop(); + const restarted = new RoomRuntime(config, [checkin], transport, store, scheduler); await restarted.start(); + expect(restarted.status()[0].state).toBe('disabled'); + await restarted.message(message('!插件 启用 checkin', admin)); await restarted.message(message('签到')); + expect(transport.sent.at(-1)?.text).toContain('已签到'); await restarted.stop(); + }); + it('persists reply language and shares all command handlers across languages', async () => { + const { runtime, config, store, transport, scheduler } = setup(); await runtime.start(); + await runtime.message(message('!语言 英文', admin)); await runtime.message(message('!插件 启用 签到', admin)); + await runtime.message(message('签到')); expect(transport.sent.at(-1)?.text).toContain('Checked in'); await runtime.stop(); + const restarted = new RoomRuntime(config, [checkin], transport, store, scheduler); await restarted.start(); + await restarted.message(message('!帮助', admin)); expect(transport.sent.at(-1)?.text).toContain('Enable a plugin'); await restarted.stop(); + }); + it('isolates records by account and room and ignores messages outside its route', async () => { + const { runtime, config, store, transport, scheduler } = setup(); await runtime.start(); + const otherConfig = { ...config, roomId: '!other:example.org' }; + const other = new RoomRuntime(otherConfig, [checkin], transport, store, scheduler); await other.start(); + await runtime.message(message('!plugin enable checkin', admin)); await runtime.message(message('签到')); + await other.message(message('!plugin enable checkin', admin, otherConfig.roomId)); await other.message(message('签到', undefined, otherConfig.roomId)); + expect(transport.sent.at(-1)?.text).toContain('签到成功'); + const count = transport.sent.length; await runtime.message(message('!ping', admin, otherConfig.roomId)); expect(transport.sent).toHaveLength(count); + expect(pluginScope('another', config.roomId, 'checkin')).not.toBe(pluginScope('test', config.roomId, 'checkin')); + await runtime.stop(); await other.stop(); + }); + it('never executes retired reset/test/level commands', async () => { + const { runtime, transport, store, config } = setup(); await runtime.start(); await runtime.message(message('!plugin enable checkin', admin)); + await runtime.message(message('签到')); + const scope = store(pluginScope('test', config.roomId, 'checkin')); const before = await scope.entries(); + for (const text of ['!reset', '!test daily', '!test monthly', '!level super @member:example.org']) await runtime.message(message(text, admin)); + expect(await scope.entries()).toEqual(before); expect(transport.kicks).toHaveLength(0); await runtime.stop(); + }); + it('rolls back jobs after failed start and leaves core commands usable', async () => { + const broken = stub((ctx) => ({ commands: [], start: async () => { ctx.schedule('job', '* * * * * *', async () => undefined); throw new Error('broken'); } })); + const { runtime, scheduler, transport } = setup([broken]); await runtime.start(); + await runtime.message(message('!plugin enable sample', admin)); expect(scheduler.jobs.size).toBe(0); expect(runtime.status()[0].state).toBe('failed'); + await runtime.message(message('!ping')); expect(transport.sent.at(-1)?.text).toBe('pong'); + }); + it('rejects command collisions before running start hooks', async () => { + const start = jest.fn(); + const duplicate = stub(() => ({ start, commands: [{ id: 'bad', paths: [['ping']], description: { 'zh-CN': '重复', en: 'duplicate' }, + usage: { 'zh-CN': '!ping', en: '!ping' }, run: async () => undefined }] })); + const { runtime } = setup([duplicate]); await runtime.start(); await runtime.message(message('!plugin enable sample', admin)); + expect(start).not.toHaveBeenCalled(); expect(runtime.status()[0].state).toBe('failed'); + }); + it('serializes events with disable and revokes stale plugin capabilities', async () => { + let context!: PluginContext; let release!: () => void; let entered!: () => void; + const enteredPromise = new Promise((resolve) => { entered = resolve; }); + const blocked = new Promise((resolve) => { release = resolve; }); + const plugin = stub((ctx) => { context = ctx; return { commands: [], onMember: async () => { entered(); await blocked; await ctx.send('completed'); } }; }); + const { runtime, transport } = setup([plugin]); await runtime.start(); await runtime.message(message('!plugin enable sample', admin)); + const event = runtime.event({ account: 'test', roomId: '!control:example.org', userId: '@member:example.org', membership: 'join' }); + await enteredPromise; + const disable = runtime.message(message('!plugin disable sample', admin)); + release(); await event; await disable; + expect(transport.sent.some((s) => s.text === 'completed')).toBe(true); + await expect(context.send('late')).rejects.toThrow('stopped'); + await expect(context.db.set('late', true)).rejects.toThrow('stopped'); + }); + it('enforces additional-room capabilities and protects its own account', async () => { + let context!: PluginContext; + const sample = stub((ctx) => { context = ctx; return { commands: [] }; }); + const { runtime, transport } = setup([sample]); await runtime.start(); await runtime.message(message('!plugin enable sample', admin)); + await expect(context.kick('!outside:example.org', '@member:example.org', 'test')).rejects.toThrow('scope'); + await expect(context.kick(context.roomId, transport.userId, 'test')).rejects.toThrow('own account'); + await expect(context.invite(context.roomId, transport.userId)).rejects.toThrow('own account'); + expect(transport.kicks).toHaveLength(0); expect(transport.invites).toHaveLength(0); await runtime.stop(); + }); + it('coalesces overlapping scheduled ticks instead of queuing duplicate work', async () => { + let release!: () => void; let enter!: () => void; + const ready = new Promise((resolve) => { enter = resolve; }); + const blocked = new Promise((resolve) => { release = resolve; }); + const run = jest.fn(async () => { enter(); await blocked; }); + const sample = stub((ctx) => ({ commands: [], start: async () => { ctx.schedule('slow', '* * * * * *', run); } })); + const { runtime, scheduler } = setup([sample]); await runtime.start(); await runtime.message(message('!plugin enable sample', admin)); + const first = scheduler.tick(); await ready; await scheduler.tick(); release(); await first; + expect(run).toHaveBeenCalledTimes(1); await runtime.stop(); + }); +}); + +it('restricts config changes to administrators and restores report preferences after restart', async () => { + const validate = jest.fn((options: Record) => options); + const def = { ...stub(() => ({ commands: [] })), id: 'checkin', validate }; + const { runtime, transport, config, store, scheduler } = setup([def]); + await runtime.start(); + await runtime.message(message('/config reports off')); + expect(transport.sent.at(-1)?.text).toContain('无权限'); + await runtime.message(message('!配置 报表 关', admin)); + await runtime.message(message('/config language en', admin)); + await runtime.stop(); + const restarted = new RoomRuntime(config, [def], transport, store, scheduler); + await restarted.start(); + await restarted.message(message('/config', admin)); + expect(transport.sent.at(-1)?.text).toContain(`Current room ${config.roomId}`); + await restarted.message(message('/plugin enable checkin', admin)); + expect(validate).toHaveBeenCalledWith({ reportsEnabled: false }); + await restarted.stop(); +}); diff --git a/src/core/plugin/room-runtime.ts b/src/core/plugin/room-runtime.ts new file mode 100644 index 0000000..ae5237c --- /dev/null +++ b/src/core/plugin/room-runtime.ts @@ -0,0 +1,323 @@ +import { randomUUID } from 'node:crypto'; +import { Logger } from '@nestjs/common'; +import { ZodError } from 'zod'; +import { RoomConfig } from '../../config/schema'; +import { Command, CommandRouter, Invocation } from '../command/command-router'; +import { CommandError } from '../command/command-parser'; +import { InboundMessage, MemberEvent, PowerLevelEvent } from '../command/types'; +import { choice, common, Locale, Text, translate } from '../i18n/i18n'; +import { MatrixTransport } from '../matrix/types'; +import { Plugin, PluginContext, PluginDefinition, Store } from './types'; +import { SerialQueue } from './serial-queue'; +import { Scheduler } from './scheduler'; + +interface Instance { + definition: PluginDefinition; plugin?: Plugin; state: 'disabled' | 'enabled' | 'failed'; + lastError?: Text; controller: AbortController; disposers: Array<() => void>; +} +export const pluginScope = (account: string, room: string, id: string) => JSON.stringify(['plugin-v2', account, room, id]); +const texts = { + help: { 'zh-CN': '帮助', en: 'Help' }, + ping: { 'zh-CN': '检查响应', en: 'Check responsiveness' }, + echo: { 'zh-CN': '复述文本', en: 'Echo text' }, + list: { 'zh-CN': '列出插件和运行状态', en: 'List plugins and runtime status' }, + enable: { 'zh-CN': '启用当前房间的插件', en: 'Enable a plugin in this room' }, + disable: { 'zh-CN': '停用当前房间的插件,保留数据', en: 'Disable a plugin in this room, retaining data' }, + language: { 'zh-CN': '设置房间回复语言', en: 'Set room reply language' }, + audit: { 'zh-CN': '查看最近管理操作', en: 'View recent administrative actions' }, + changed: { 'zh-CN': '{plugin}:{state}', en: '{plugin}: {state}' }, + unknownPlugin: { 'zh-CN': '未安装该插件,请先查看 !插件 列表。', en: 'Plugin not installed. See !plugin list.' }, + languageSet: { 'zh-CN': '回复语言已设为中文。', en: 'Reply language set to English.' }, + enabled: { 'zh-CN': '已启用', en: 'enabled' }, + disabled: { 'zh-CN': '已停用', en: 'disabled' }, + failed: { 'zh-CN': '启动失败', en: 'failed to start' }, + lastError: { 'zh-CN': '最近错误:{error}', en: 'Last error: {error}' }, +} satisfies Record; + +export class RoomRuntime { + private readonly logger = new Logger(RoomRuntime.name); + private readonly queue = new SerialQueue(); + private readonly instances = new Map(); + private readonly system: Store; + private locale: Locale; + private ready = false; + private stopped = false; + private readonly coreController = new AbortController(); + + constructor(readonly config: RoomConfig, private readonly definitions: PluginDefinition[], + private readonly transport: MatrixTransport, private readonly store: (scope: string) => Store, + private readonly scheduler: Scheduler, private readonly now: () => Date = () => new Date(), + private readonly storageRoomId = config.roomId) { + this.locale = config.locale; + this.system = store(pluginScope(config.account, storageRoomId, '$system')); + for (const definition of definitions) this.instances.set(definition.id, + { definition, state: 'disabled', controller: new AbortController(), disposers: [] }); + } + + async start(): Promise { + await this.queue.run(async () => { + const savedLocale = await this.system.get('locale'); + this.locale = savedLocale === 'en' || savedLocale === 'zh-CN' ? savedLocale : this.config.locale; + for (const id of Object.keys(this.config.plugins)) { + if (!this.instances.has(id)) throw new Error(`Configured plugin is not installed: ${id}`); + } + for (const [id] of this.instances) { + const saved = await this.system.get(`enabled:${id}`); + if (saved ?? this.config.plugins[id]?.enabled ?? false) { + try { await this.enable(id); } catch { /* Failed plugins remain visible and can be retried. */ } + } + } + this.ready = true; + }); + } + + status() { + return [...this.instances].map(([id, i]) => ({ id, state: i.state, lastError: i.lastError, version: i.definition.version })); + } + + async stop(): Promise { + this.stopped = true; + await this.queue.run(async () => { + this.ready = false; + for (const instance of this.instances.values()) { + try { await this.dispose(instance); } + catch { await this.audit('plugin.stop.failed', 'system', { plugin: instance.definition.id }); } + } + this.coreController.abort(); + }); + } + + private async dispose(instance: Instance): Promise { + instance.controller.abort(); + instance.disposers.splice(0).forEach((dispose) => dispose()); + try { await instance.plugin?.stop?.(); } + finally { instance.plugin = undefined; instance.state = 'disabled'; } + } + + private async enable(id: string): Promise { + const instance = this.instances.get(id)!; + if (instance.state === 'enabled') return; + instance.controller = new AbortController(); + const configured = this.config.plugins[id]?.config ?? {}; + const reportOverride = id === 'checkin' ? await this.system.get('config:reports') : null; + const configuration = reportOverride === null ? configured : { ...configured, reportsEnabled: reportOverride }; + try { + const parsed = instance.definition.validate(configuration); + const context = this.context(id, instance, instance.definition.allowedRooms?.(parsed)); + for (const [key] of await context.db.entries()) if (key.startsWith('pending:')) await context.db.remove(key); + instance.plugin = instance.definition.create(context, parsed); + // Validate aliases before starting any jobs or initialization hooks. + new CommandRouter([...this.commands(), ...instance.plugin.commands]); + instance.state = 'enabled'; + await instance.plugin.start?.(); + await this.system.set(`enabled:${id}`, true); + instance.lastError = undefined; + } catch (error) { + await this.dispose(instance).catch(() => undefined); + instance.state = 'failed'; + const fields = error instanceof ZodError ? error.issues.map((issue) => issue.path.join('.') || 'config').join(', ') : ''; + instance.lastError = fields + ? { 'zh-CN': `配置项无效:${fields}`, en: `Invalid configuration fields: ${fields}` } + : { 'zh-CN': '插件初始化失败,请检查配置或命令冲突。', en: 'Plugin initialization failed; check configuration or command collisions.' }; + this.logger.error(`Plugin initialization failed: ${id}${fields ? ` (${fields})` : ''}`); + await this.audit('plugin.enable.failed', 'system', { plugin: id }); + throw error; + } + } + + private async disable(id: string): Promise { + // Persist intent first, so a failed stop hook cannot re-enable the plugin on restart. + await this.system.set(`enabled:${id}`, false); + await this.dispose(this.instances.get(id)!); + } + + private async isAdmin(userId: string): Promise { + if (this.config.admins.includes(userId)) return true; + try { return await this.transport.getPowerLevel(this.config.roomId, userId) >= this.config.adminPowerLevel; } + catch { return false; } + } + + private async audit(action: string, actor: string, details: Record): Promise { + await this.system.set(`audit:${this.now().toISOString()}:${randomUUID()}`, { at: this.now().toISOString(), action, actor, details }); + const entries = (await this.system.entries()).filter(([key]) => key.startsWith('audit:')).sort(([a], [b]) => b.localeCompare(a)); + for (const [key] of entries.slice(200)) await this.system.remove(key); + } + + private context(id: string, instance?: Instance, additionalRooms: string[] = []): PluginContext { + const runtime = this; + const allowed = new Set([this.config.roomId, ...additionalRooms]); + const signal = (instance?.controller ?? this.coreController).signal; + const check = (roomId = this.config.roomId) => { + if (signal.aborted || this.stopped) throw new Error('Plugin stopped'); + if (!allowed.has(roomId)) throw new Error('Room outside plugin scope'); + }; + const storage = this.store(pluginScope(this.config.account, this.storageRoomId, id)); + const scopedStore: Store = { + get: async (key) => { check(); return storage.get(key); }, + set: async (key, value) => { check(); await storage.set(key, value); }, + create: async (key, value) => { check(); return storage.create(key, value); }, + remove: async (key) => { check(); await storage.remove(key); }, + entries: async () => { check(); return storage.entries(); }, + }; + return { + account: this.config.account, botUserId: this.transport.userId, roomId: this.config.roomId, timeZone: this.config.timeZone, adminPowerLevel: this.config.adminPowerLevel, + get locale() { return runtime.locale; }, signal, + db: scopedStore, now: this.now, + t: (text, values) => translate(text, this.locale, values), + send: async (text) => { check(); return this.transport.send(this.config.roomId, text); }, + reply: async (msg, text) => { + check(); + if (msg.account !== this.config.account || msg.roomId !== this.config.roomId) throw new Error('Reply outside plugin scope'); + return this.transport.send(this.config.roomId, text, msg.eventId); + }, + isAdmin: async (userId) => { check(); return this.isAdmin(userId); }, + members: async (roomId = this.config.roomId) => { check(roomId); return this.transport.getJoinedMembers(roomId); }, + power: async (userId) => { check(); return this.transport.getPowerLevel(this.config.roomId, userId); }, + kick: async (roomId, userId, reason) => { + check(roomId); if (userId === this.transport.userId) throw new Error('Cannot remove own account'); + await this.transport.kick(roomId, userId, reason); + }, + invite: async (roomId, userId) => { + check(roomId); if (userId === this.transport.userId) throw new Error('Cannot invite own account'); + await this.transport.invite(roomId, userId); + }, + schedule: (name, cron, run) => { + if (!instance) throw new Error('Missing plugin instance'); + check(); + let pending = false; + const dispose = this.scheduler.register(cron, this.config.timeZone, async () => { + if (pending) return; + pending = true; + try { + await this.queue.run(async () => { + if (!this.ready || this.stopped || instance.state !== 'enabled' || signal.aborted) return; + try { await run(); } catch { + instance.lastError = { 'zh-CN': `定时任务失败:${name}`, en: `Scheduled task failed: ${name}` }; + await this.audit('plugin.task.failed', 'system', { plugin: id, task: name }); + } + }); + } finally { pending = false; } + }); + instance.disposers.push(dispose); + }, + audit: async (action, actor, details) => { check(); await this.audit(action, actor, { ...details, plugin: id }); }, + }; + } + + private coreCommands(): Command[] { + const ctx = this.context('$core'); + const reply = async (inv: Invocation, text: string) => { await ctx.reply(inv.message, text); }; + const usage = (inv: Invocation, id: string) => reply(inv, ctx.t(common.usage, { + usage: ctx.t(this.coreCommands().find((command) => command.id === id)!.usage), + })); + const toggle = (enabled: boolean) => async (inv: Invocation) => { + if (inv.args.length !== 1) return usage(inv, enabled ? 'plugin.enable' : 'plugin.disable'); + const name = inv.args[0].normalize('NFKC').toLowerCase(); + const definition = this.definitions.find((d) => [d.id, ...(d.aliases ?? [])].some((a) => a.toLowerCase() === name)); + if (!definition) return reply(inv, ctx.t(texts.unknownPlugin)); + await this.audit(enabled ? 'plugin.enable.requested' : 'plugin.disable.requested', inv.message.userId, { plugin: definition.id }); + if (enabled) await this.enable(definition.id); else await this.disable(definition.id); + await reply(inv, ctx.t(texts.changed, { plugin: definition.id, state: ctx.t(enabled ? texts.enabled : texts.disabled) })); + }; + return [ + { id: 'config', paths: [['config'], ['配置']], admin: true, + description: { 'zh-CN': '查看当前房间配置', en: 'Show current room settings' }, + usage: { 'zh-CN': '!配置', en: '!config' }, run: async (inv) => { + const reports = await this.system.get('config:reports') ?? this.config.plugins.checkin?.config.reportsEnabled ?? true; + await reply(inv, ctx.t({ + 'zh-CN': '当前房间 {room}\n语言 {locale},时区 {zone},自动报表 {reports}(下次启用签到时使用)\n!配置 语言 中文|英文\n!配置 报表 开|关', + en: 'Current room {room}\nLanguage {locale}, timezone {zone}, scheduled reports {reports} (at next check-in activation)\n!config language zh-CN|en\n!config reports on|off', + }, { room: ctx.roomId, locale: ctx.locale, zone: ctx.timeZone, reports: ctx.t(reports ? texts.enabled : texts.disabled) })); + } }, + { id: 'config.bind', paths: [['config', 'bind'], ['配置', '绑定']], admin: true, + description: { 'zh-CN': '核对当前房间绑定', en: 'Check current room binding' }, + usage: { 'zh-CN': '!配置 绑定', en: '!config bind' }, run: async (inv) => { + await reply(inv, ctx.t({ 'zh-CN': '当前房间 {room} 已绑定。', en: 'Room {room} is already bound.' }, { room: ctx.roomId })); + } }, + { id: 'config.reports', paths: [['config', 'reports'], ['配置', '报表']], admin: true, + description: { 'zh-CN': '设置签到定时报表', en: 'Configure scheduled check-in reports' }, + usage: { 'zh-CN': '!配置 报表 开|关', en: '!config reports on|off' }, run: async (inv) => { + const state = choice(inv.args[0], { on: ['开'], off: ['关'] }); + if (!state || inv.args.length !== 1) return usage(inv, 'config.reports'); + await this.system.set('config:reports', state === 'on'); + await this.audit('config.reports', inv.message.userId, { state }); + await reply(inv, ctx.t({ 'zh-CN': '已保存,签到插件下次启动时生效。', en: 'Saved for the next check-in plugin start.' })); + } }, + { id: 'help', paths: [['help'], ['帮助']], bare: ['帮助'], description: texts.help, + usage: { 'zh-CN': '!帮助', en: '!help' }, run: async (inv) => { + const admin = await this.isAdmin(inv.message.userId); + await reply(inv, this.commands().filter((c) => !c.admin || admin).map((c) => + `${ctx.t(c.usage)} — ${ctx.t(c.description)}`).join('\n')); + } }, + { id: 'ping', paths: [['ping'], ['在线']], description: texts.ping, usage: { 'zh-CN': '!在线', en: '!ping' }, run: (inv) => reply(inv, 'pong') }, + { id: 'echo', paths: [['echo'], ['复述']], description: texts.echo, usage: { 'zh-CN': '!复述 <文本>', en: '!echo ' }, run: (inv) => reply(inv, inv.args.join(' ') || '…') }, + { id: 'plugin.list', paths: [['plugin', 'list'], ['插件', '列表'], ['plugin', 'status'], ['插件', '状态']], description: texts.list, + usage: { 'zh-CN': '!插件 列表', en: '!plugin list' }, run: async (inv) => { + const admin = await this.isAdmin(inv.message.userId); + await reply(inv, this.status().map((s) => `${s.id} ${s.version}: ${ctx.t(texts[s.state])}${admin && s.lastError ? `\n${ctx.t(texts.lastError, { error: ctx.t(s.lastError) })}` : ''}`).join('\n')); + } }, + { id: 'plugin.enable', paths: [['plugin', 'enable'], ['插件', '启用'], ['plugin', '启用'], ['插件', 'enable']], admin: true, + description: texts.enable, usage: { 'zh-CN': '!插件 启用 <名称>', en: '!plugin enable ' }, run: toggle(true) }, + { id: 'plugin.disable', paths: [['plugin', 'disable'], ['插件', '停用'], ['插件', '禁用'], ['plugin', '停用'], ['插件', 'disable']], admin: true, + description: texts.disable, usage: { 'zh-CN': '!插件 停用 <名称>', en: '!plugin disable ' }, run: toggle(false) }, + { id: 'language', paths: [['language'], ['语言'], ['config', 'language'], ['配置', '语言']], admin: true, description: texts.language, + usage: { 'zh-CN': '!语言 中文|英文', en: '!language zh-CN|en' }, run: async (inv) => { + const locale = choice(inv.args[0], { 'zh-CN': ['中文', 'zh'], en: ['英文', 'english'] }); + if (!locale || inv.args.length !== 1) return usage(inv, 'language'); + await this.system.set('locale', locale); this.locale = locale; + await this.audit('language.set', inv.message.userId, { locale }); + await reply(inv, ctx.t(texts.languageSet)); + } }, + { id: 'audit', paths: [['audit'], ['操作记录']], admin: true, description: texts.audit, + usage: { 'zh-CN': '!操作记录', en: '!audit' }, run: async (inv) => { + const rows = (await this.system.entries()).filter(([key]) => key.startsWith('audit:')).sort(([a], [b]) => b.localeCompare(a)).slice(0, 10); + await reply(inv, rows.length ? rows.map(([, row]) => JSON.stringify(row)).join('\n') : ctx.t(common.empty)); + } }, + { id: 'retired', paths: [['reset'], ['test'], ['level'], ['重置']], description: common.removed, + usage: { 'zh-CN': '旧命令已停用', en: 'Legacy commands retired' }, run: (inv) => reply(inv, ctx.t(common.removed)) }, + ]; + } + + private commands(): Command[] { + return [...this.coreCommands(), ...[...this.instances.values()].filter((i) => i.state === 'enabled').flatMap((i) => i.plugin?.commands ?? [])]; + } + + async message(message: InboundMessage): Promise { + if (!this.ready || this.stopped || message.account !== this.config.account || message.roomId !== this.config.roomId) return; + await this.queue.run(async () => { + if (this.stopped) return; + const ctx = this.context('$core'); + try { + const matched = new CommandRouter(this.commands()).match(message); + if (!matched) { + if (/^[!!//]/.test(message.text.trim())) await ctx.reply(message, ctx.t(common.unknown)); + return; + } + if (matched.command.admin && !await this.isAdmin(message.userId)) { + await ctx.reply(message, ctx.t(common.denied)); return; + } + await matched.command.run(matched.invocation); + } catch (error) { + await this.audit('command.failed', message.userId, { kind: error instanceof CommandError ? 'syntax' : 'execution' }); + await ctx.reply(message, ctx.t(common.failed)).catch(() => undefined); + } + }); + } + + async event(event: MemberEvent | PowerLevelEvent): Promise { + if (!this.ready || this.stopped || event.account !== this.config.account || event.roomId !== this.config.roomId) return; + await this.queue.run(async () => { + if (this.stopped) return; + for (const [id, instance] of this.instances) { + if (instance.state !== 'enabled') continue; + try { + if ('membership' in event) await instance.plugin?.onMember?.(event); + else await instance.plugin?.onPowerLevel?.(event); + } catch { + instance.lastError = { 'zh-CN': '事件处理失败', en: 'Event handler failed' }; + await this.audit('plugin.event.failed', 'system', { plugin: id }); + } + } + }); + } +} diff --git a/src/core/plugin/scheduler.ts b/src/core/plugin/scheduler.ts new file mode 100644 index 0000000..aa58b83 --- /dev/null +++ b/src/core/plugin/scheduler.ts @@ -0,0 +1,11 @@ +import { CronJob } from 'cron'; + +export interface Scheduler { + register(cron: string, timeZone: string, run: () => Promise): () => void; +} +export class PluginScheduler implements Scheduler { + register(cron: string, timeZone: string, run: () => Promise): () => void { + const job = new CronJob(cron, () => { void run().catch(() => undefined); }, null, true, timeZone); + return () => job.stop(); + } +} diff --git a/src/core/plugin/serial-queue.ts b/src/core/plugin/serial-queue.ts new file mode 100644 index 0000000..0f4a502 --- /dev/null +++ b/src/core/plugin/serial-queue.ts @@ -0,0 +1,8 @@ +export class SerialQueue { + private tail: Promise = Promise.resolve(); + run(task: () => Promise): Promise { + const result = this.tail.then(task); + this.tail = result.catch(() => undefined); + return result; + } +} diff --git a/src/core/plugin/types.ts b/src/core/plugin/types.ts new file mode 100644 index 0000000..a622aad --- /dev/null +++ b/src/core/plugin/types.ts @@ -0,0 +1,49 @@ +import { Command } from '../command/command-router'; +import { InboundMessage, MemberEvent, PowerLevelEvent } from '../command/types'; +import { Locale, Text } from '../i18n/i18n'; + +export interface Store { + get(key: string): Promise; + set(key: string, value: T): Promise; + create(key: string, value: T): Promise; + remove(key: string): Promise; + entries(): Promise>; +} +export interface PluginContext { + readonly account: string; + readonly botUserId: string; + readonly roomId: string; + readonly timeZone: string; + readonly adminPowerLevel: number; + readonly locale: Locale; + readonly signal: AbortSignal; + readonly db: Store; + now(): Date; + t(text: Text, values?: Record): string; + send(text: string): Promise; + reply(message: InboundMessage, text: string): Promise; + isAdmin(userId: string): Promise; + members(roomId?: string): Promise; + power(userId: string): Promise; + kick(roomId: string, userId: string, reason: string): Promise; + invite(roomId: string, userId: string): Promise; + schedule(name: string, cron: string, run: () => Promise): void; + audit(action: string, actor: string, details: Record): Promise; +} +export interface Plugin { + commands: Command[]; + start?(): Promise; + stop?(): Promise; + onMember?(event: MemberEvent): Promise; + onPowerLevel?(event: PowerLevelEvent): Promise; +} +export interface PluginDefinition { + apiVersion: 1; + id: string; + aliases?: string[]; + version: string; + description: Text; + validate(config: Record): Record; + allowedRooms?(config: Record): string[]; + create(context: PluginContext, config: Record): Plugin; +} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..292d31a --- /dev/null +++ b/src/main.ts @@ -0,0 +1,26 @@ +import 'reflect-metadata'; +import { Logger } from '@nestjs/common'; +import { NestFactory } from '@nestjs/core'; +import { LogLevel, LogService } from 'matrix-bot-sdk'; +import { AppModule } from './app.module'; + +// 静音 matrix-bot-sdk 的 debug/info 噪音,只保留 warn/error。 +// 可用 MATRIX_LOG_LEVEL 覆盖(trace/debug/info/warn/error)。 +LogService.setLevel( + LogLevel.fromString(process.env.MATRIX_LOG_LEVEL ?? 'WARN', LogLevel.WARN), +); +LogService.muteModule('Metrics'); + +async function bootstrap(): Promise { + const app = await NestFactory.createApplicationContext(AppModule, { + abortOnError: true, + }); + app.enableShutdownHooks(); + Logger.log('daily-bot-nest 已启动。Ctrl+C 退出。', 'Bootstrap'); +} + +bootstrap().catch((err) => { + // eslint-disable-next-line no-console + console.error('启动失败:', err); + process.exit(1); +}); diff --git a/src/plugins/checkin/checkin.integration.spec.ts b/src/plugins/checkin/checkin.integration.spec.ts new file mode 100644 index 0000000..f952043 --- /dev/null +++ b/src/plugins/checkin/checkin.integration.spec.ts @@ -0,0 +1,74 @@ +import { testDatabase } from '../../test/database'; +import { FakeContext, message } from '../../test/fakes'; +import { BotStore } from '../../core/db/bot-store'; +import { pluginScope } from '../../core/plugin/room-runtime'; +import { CheckinPlugin, checkinConfig } from './checkin.plugin'; +import { CommandRouter } from '../../core/command/command-router'; +import { migrateCheckin } from '../../core/plugin/migrate-checkin'; +import { rootConfigSchema } from '../../config/schema'; + +let database: Awaited> | undefined; +beforeAll(async () => { database = await testDatabase(); }); +afterAll(async () => { await database?.close(); }); +afterEach(async () => { await database?.prisma.botState.deleteMany(); }); +const roomId = '!control:example.org'; +const user = '@member:example.org'; +const config = () => rootConfigSchema.parse({ accounts: { test: { userId: '@bot:example.org', password: 'fixture', homeServer: 'https://example.org' } }, + rooms: [{ account: 'test', roomId, plugins: { checkin: { enabled: true } } }], legacyCheckinTarget: { account: 'test', roomId } }); +function plugin(room = roomId, account = 'test') { + const ctx = new FakeContext(new BotStore(database!.prisma, pluginScope(account, room, 'checkin'))); + const bot = new CheckinPlugin(ctx, checkinConfig.parse({})); + const router = new CommandRouter(bot.commands); + return { ctx, bot, run: async (text: string, actor = user) => { + const match = router.match(message(text, actor))!; await match.command.run(match.invocation); + } }; +} + +describe('check-in with isolated SQLite', () => { + it('enforces unique user/date records across concurrent plugin instances', async () => { + const a = plugin(), b = plugin(); + await Promise.all([a.run('签到'), b.run('!checkin'), a.run('!签到')]); + expect(await a.bot.records()).toHaveLength(1); + expect((await b.bot.stats()).get(user)?.total).toBe(1); + }); + it('keeps room and account data separate in the same database', async () => { + const a = plugin(), b = plugin('!second:example.org'), c = plugin(roomId, 'second-account'); + await a.run('签到'); await b.run('签到'); + expect((await a.bot.stats()).get(user)?.total).toBe(1); + expect((await b.bot.stats()).get(user)?.total).toBe(1); + expect((await c.bot.stats()).size).toBe(0); + }); + it('uses native room permissions for administration instead of removed level commands', async () => { + const a = plugin(); await a.run('签到'); + await a.run('!查询 全部', '@member:example.org'); expect(a.ctx.transport.sent.at(-1)?.text).toContain('无权限'); + await a.run('!查询 全部 --原始', '@admin:example.org'); expect(JSON.parse(a.ctx.transport.sent.at(-1)!.text)[0].total).toBe(1); + }); + it('migrates legacy data once, preserves source and avoids counting today twice', async () => { + const legacy = new BotStore(database!.prisma, 'checkin'); + await legacy.set(user, { checkinTimesInMonth: 8, checkinUnixMs: Date.parse('2026-01-15T01:00:00Z'), isCheckinToday: true }); + await migrateCheckin(database!.prisma, config()); await migrateCheckin(database!.prisma, config()); + const a = plugin(); await a.run('签到'); + expect((await a.bot.stats()).get(user)).toMatchObject({ total: 8, month: 8, today: true }); + expect(await legacy.get(user)).not.toBeNull(); + a.ctx.date = new Date('2026-02-01T01:00:00Z'); await a.run('签到'); + expect((await a.bot.stats()).get(user)).toMatchObject({ total: 9, month: 1 }); + }); + it('refuses ambiguous targets, existing destination data and reassignment', async () => { + const legacy = new BotStore(database!.prisma, 'checkin'); + await legacy.set(user, { checkinTimesInMonth: 1, checkinUnixMs: Date.parse('2026-01-15T01:00:00Z') }); + await expect(migrateCheckin(database!.prisma, { ...config(), legacyCheckinTarget: undefined })).rejects.toThrow('explicit'); + const a = plugin(); await a.run('签到'); + await expect(migrateCheckin(database!.prisma, config())).rejects.toThrow('already contains'); + await database!.prisma.botState.deleteMany({ where: { botName: pluginScope('test', roomId, 'checkin') } }); + await migrateCheckin(database!.prisma, config()); + const other = config(); other.rooms[0].roomId = '!second:example.org'; other.legacyCheckinTarget!.roomId = '!second:example.org'; + await expect(migrateCheckin(database!.prisma, other)).rejects.toThrow('another room'); + }); + it('rolls back the whole migration when a legacy record is invalid', async () => { + const legacy = new BotStore(database!.prisma, 'checkin'); + await legacy.set(user, { checkinTimesInMonth: 1, checkinUnixMs: Date.parse('2026-01-15T01:00:00Z') }); + await legacy.set('@invalid:example.org', { checkinTimesInMonth: -1 }); + await expect(migrateCheckin(database!.prisma, config())).rejects.toThrow('Invalid'); + expect(await database!.prisma.botState.count({ where: { botName: pluginScope('test', roomId, 'checkin') } })).toBe(0); + }); +}); diff --git a/src/plugins/checkin/checkin.plugin.ts b/src/plugins/checkin/checkin.plugin.ts new file mode 100644 index 0000000..7da091c --- /dev/null +++ b/src/plugins/checkin/checkin.plugin.ts @@ -0,0 +1,235 @@ +import { z } from 'zod'; +import { Command, Invocation } from '../../core/command/command-router'; +import { common, choice, Text } from '../../core/i18n/i18n'; +import { Plugin, PluginContext, PluginDefinition } from '../../core/plugin/types'; +import { Confirmations } from '../../core/plugin/confirmation'; +import { localDate, localMinutes, previousMonth, shiftDate, validDate } from '../../core/plugin/calendar'; +import { messages as m } from './messages'; + +export const checkinConfig = z.object({ + reportsEnabled: z.boolean().default(true), + cleanupEnabled: z.boolean().default(false), + autoCleanup: z.boolean().default(false), + kickDays: z.number().int().min(1).default(30), + whitelist: z.array(z.string().regex(/^@.+:.+$/)).default([]), +}).refine((c) => !c.autoCleanup || c.cleanupEnabled, 'autoCleanup requires cleanupEnabled'); +type Config = z.infer; +export interface CheckinRecord { userId: string; date: string; at: number; counted?: boolean; } +export interface LegacyBaseline { userId: string; count: number; month: string; lastAt: number; } +interface Stats { userId: string; total: number; month: number; today: boolean; lastAt: number; } +interface Periods { daily: string; monthly: string; cleanup: string; } +const levels: Array<[number, Text]> = [ + [7, { 'zh-CN': '青铜', en: 'Bronze' }], [14, { 'zh-CN': '白银', en: 'Silver' }], + [29, { 'zh-CN': '黄金', en: 'Gold' }], [44, { 'zh-CN': '铂金', en: 'Platinum' }], + [Infinity, { 'zh-CN': '钻石', en: 'Diamond' }], +]; +export const recordKey = (userId: string, date: string) => `day:${JSON.stringify([userId, date])}`; + +export class CheckinPlugin implements Plugin { + readonly commands: Command[]; + private readonly plans: Confirmations; + constructor(private readonly ctx: PluginContext, private readonly config: Config) { + this.plans = new Confirmations(ctx, 'cleanup'); + this.commands = [ + { id: 'checkin', paths: [['checkin'], ['签到']], bare: ['签到'], description: m.checkin, + usage: { 'zh-CN': '!签到', en: '!checkin' }, run: (inv) => this.checkin(inv) }, + { id: 'checkin.list', paths: [['list'], ['查询'], ['签到', '查询']], description: m.list, + usage: { 'zh-CN': '!查询 [用户ID|全部] [--原始]', en: '!list [userId|all] [--raw]' }, run: (inv) => this.list(inv) }, + { id: 'checkin.daily', paths: [['report', 'daily'], ['日报'], ['统计', '日报']], description: m.daily, admin: true, + usage: { 'zh-CN': '!日报 [YYYY-MM-DD]', en: '!report daily [YYYY-MM-DD]' }, run: (inv) => this.daily(inv) }, + { id: 'checkin.monthly', paths: [['report', 'monthly'], ['月报'], ['统计', '月报']], description: m.monthly, admin: true, + usage: { 'zh-CN': '!月报 [YYYY-MM]', en: '!report monthly [YYYY-MM]' }, run: (inv) => this.monthly(inv) }, + { id: 'checkin.cleanup.preview', paths: [['cleanup', 'preview'], ['清理', '预览']], description: m.cleanupPreview, admin: true, + usage: { 'zh-CN': '!清理 预览', en: '!cleanup preview' }, run: (inv) => this.preview(inv) }, + { id: 'checkin.cleanup.confirm', paths: [['cleanup', 'confirm'], ['清理', '确认']], description: m.cleanupConfirm, admin: true, + usage: { 'zh-CN': '!清理 确认 <确认码>', en: '!cleanup confirm ' }, run: (inv) => this.confirm(inv) }, + ]; + } + + async start(): Promise { + await this.settle(false); + this.ctx.schedule('period-reports', '0 * * * * *', () => this.settle(true)); + } + + private today(): string { return localDate(this.ctx.now(), this.ctx.timeZone); } + private async reply(inv: Invocation, text: string): Promise { await this.ctx.reply(inv.message, text); } + private usage(inv: Invocation, id: string): Promise { + return this.reply(inv, this.ctx.t(common.usage, { usage: this.ctx.t(this.commands.find((command) => command.id === id)!.usage) })); + } + private async admin(inv: Invocation): Promise { + if (await this.ctx.isAdmin(inv.message.userId)) return true; + await this.reply(inv, this.ctx.t(common.denied)); return false; + } + + async records(): Promise { + return (await this.ctx.db.entries()).filter(([key]) => key.startsWith('day:')).map(([, value]) => value); + } + async stats(month = this.today().slice(0, 7)): Promise> { + const result = new Map(); + const get = (id: string) => { + if (!result.has(id)) result.set(id, { userId: id, total: 0, month: 0, today: false, lastAt: 0 }); + return result.get(id)!; + }; + const baselines = (await this.ctx.db.entries()).filter(([key]) => key.startsWith('legacy:')); + for (const [, base] of baselines) { + const stat = get(base.userId); + stat.total += base.count; stat.month += base.month === month ? base.count : 0; + stat.lastAt = Math.max(stat.lastAt, base.lastAt); + } + for (const record of await this.records()) { + const stat = get(record.userId); + if (record.counted !== false) { + stat.total++; if (record.date.startsWith(month)) stat.month++; + } + stat.today ||= record.date === this.today(); + stat.lastAt = Math.max(stat.lastAt, record.at); + } + return result; + } + + private level(total: number): string { return this.ctx.t(levels.find(([max]) => total <= max)![1]); } + private async checkin(inv: Invocation): Promise { + if (inv.args.length) return this.usage(inv, 'checkin'); + const date = this.today(); + const record = { userId: inv.message.userId, date, at: this.ctx.now().getTime() }; + const inserted = await this.ctx.db.create(recordKey(record.userId, date), record); + if (!inserted) return this.reply(inv, this.ctx.t(m.duplicate, { date })); + const stat = (await this.stats()).get(record.userId)!; + await this.reply(inv, this.ctx.t(m.checked, { date, month: stat.month, total: stat.total, level: this.level(stat.total) })); + } + + private async list(inv: Invocation): Promise { + const target = inv.args[0] ?? inv.message.userId; + const all = choice(target, { all: ['全部', '所有'] }) === 'all'; + if ((all || target !== inv.message.userId || inv.raw) && !await this.admin(inv)) return; + if (inv.args.length > 1 || (!all && !/^@.+:.+$/.test(target))) { + return this.usage(inv, 'checkin.list'); + } + const stats = await this.stats(); + const rows = all ? [...stats.values()] : [stats.get(target)].filter((s): s is Stats => !!s); + await this.reply(inv, !rows.length ? this.ctx.t(common.empty) : inv.raw ? JSON.stringify(rows, null, 2) : + rows.map((stat) => this.ctx.t(m.row, { user: stat.userId, today: this.ctx.t(stat.today ? m.yes : m.no), + month: stat.month, total: stat.total, level: this.level(stat.total) })).join('\n')); + } + + async dailyText(date: string): Promise { + const members = await this.ctx.members(); + const users = new Set((await this.records()).filter((r) => r.date === date).map((r) => r.userId)); + return this.ctx.t(m.reportDay, { date, count: users.size, members: members.length, + missing: members.filter((id) => !users.has(id)).join('\n') || '—' }); + } + async monthlyText(month: string): Promise { + const rows = [...(await this.stats(month)).values()].filter((s) => s.month > 0).sort((a, b) => b.month - a.month || a.userId.localeCompare(b.userId)); + return this.ctx.t(m.reportMonth, { month, rows: rows.map((s, index) => `${index + 1}. ${s.userId}: ${s.month}`).join('\n') || this.ctx.t(common.empty) }); + } + private async daily(inv: Invocation): Promise { + if (!await this.admin(inv)) return; + const date = inv.args[0] ?? this.today(); + if (inv.args.length > 1 || !validDate(date)) return this.usage(inv, 'checkin.daily'); + await this.reply(inv, await this.dailyText(date)); + } + private async monthly(inv: Invocation): Promise { + if (!await this.admin(inv)) return; + const month = inv.args[0] ?? this.today().slice(0, 7); + if (inv.args.length > 1 || !validDate(`${month}-01`)) return this.usage(inv, 'checkin.monthly'); + await this.reply(inv, await this.monthlyText(month)); + } + + async cleanupCandidates(): Promise<{ users: string[]; skipped: string[] }> { + const members = await this.ctx.members(); + const stats = await this.stats(); + const users: string[] = [], skipped: string[] = []; + for (const user of members) { + if (user === this.ctx.botUserId) continue; + const stat = stats.get(user); + if (!stat?.lastAt || stat.today || this.config.whitelist.includes(user) || + this.ctx.now().getTime() - stat.lastAt < this.config.kickDays * 86_400_000) continue; + try { + // Read explicitly: a failed lookup must never be interpreted as a low power level. + const power = await this.ctx.power(user); + if (power >= this.ctx.adminPowerLevel || await this.ctx.isAdmin(user)) continue; + users.push(user); + } catch { skipped.push(user); } + } + return { users, skipped }; + } + private async preview(inv: Invocation): Promise { + if (!await this.admin(inv)) return; + if (!this.config.cleanupEnabled) return this.reply(inv, this.ctx.t(m.disabled)); + if (inv.args.length) return this.usage(inv, 'checkin.cleanup.preview'); + const plan = await this.cleanupCandidates(); + const token = await this.plans.preview(inv.message.userId, plan.users); + await this.reply(inv, this.ctx.t(common.preview, { + details: [...plan.users, ...plan.skipped.map((user) => this.ctx.t(m.skipped, { user }))].join('\n') || this.ctx.t(common.empty), + command: `!cleanup confirm ${token} / !清理 确认 ${token}`, + })); + } + private async confirm(inv: Invocation): Promise { + if (!await this.admin(inv)) return; + if (!this.config.cleanupEnabled) return this.reply(inv, this.ctx.t(m.disabled)); + const users = inv.args.length === 1 ? await this.plans.consume(inv.message.userId, inv.args[0]) : undefined; + if (!users) return this.reply(inv, this.ctx.t(common.expired)); + await this.reply(inv, this.ctx.t(common.done, { details: await this.executeCleanup(users, inv.message.userId) })); + } + private async executeCleanup(planned: string[], actor: string): Promise { + const current = await this.cleanupCandidates(); + const results: string[] = []; + for (const user of planned) { + if (!current.users.includes(user)) { results.push(this.ctx.t(m.changed, { user })); continue; } + try { + // Recheck privilege immediately before each individual mutation. + if (await this.ctx.power(user) >= this.ctx.adminPowerLevel || await this.ctx.isAdmin(user)) { + results.push(this.ctx.t(m.changed, { user })); continue; + } + await this.ctx.audit('cleanup.kick.requested', actor, { user }); + await this.ctx.kick(this.ctx.roomId, user, this.ctx.t(m.kickReason, { days: this.config.kickDays })); + await this.ctx.audit('cleanup.kick.completed', actor, { user }); + results.push(this.ctx.t(m.kicked, { user })); + } catch { + await this.ctx.audit('cleanup.kick.failed', actor, { user }); + results.push(this.ctx.t(m.kickFailed, { user })); + } + } + return results.join('\n') || this.ctx.t(common.empty); + } + + async settle(allowCleanup: boolean): Promise { + const date = this.today(), minutes = localMinutes(this.ctx.now(), this.ctx.timeZone); + const daily = shiftDate(date, minutes >= 180 ? -1 : -2); + const monthly = date.endsWith('-01') && minutes < 5 ? previousMonth(`${previousMonth(date)}-01`) : previousMonth(date); + const saved = await this.ctx.db.get('periods'); + if (!saved) { await this.ctx.db.set('periods', { daily, monthly, cleanup: date }); return; } + if (saved.daily < daily) { + if (this.config.reportsEnabled) { + const prefix = shiftDate(saved.daily, 1) < daily ? this.ctx.t(m.catchup, { from: shiftDate(saved.daily, 1), to: daily }) + '\n' : ''; + await this.ctx.send(prefix + await this.dailyText(daily)); + } + saved.daily = daily; + await this.ctx.db.set('periods', saved); + } + if (saved.monthly < monthly) { + if (this.config.reportsEnabled) await this.ctx.send(this.ctx.t(m.catchup, { from: saved.monthly, to: monthly }) + '\n' + await this.monthlyText(monthly)); + saved.monthly = monthly; + await this.ctx.db.set('periods', saved); + } + if (allowCleanup && this.config.autoCleanup && saved.cleanup < date && minutes >= 180) { + // Automatic cleanup is separate from reporting and never runs in the enable hook. + const plan = await this.cleanupCandidates(); + const results: string[] = []; + if (plan.users.length) results.push(await this.executeCleanup(plan.users, 'scheduler')); + if (plan.skipped.length) { + await this.ctx.audit('cleanup.lookup.failed', 'scheduler', { users: plan.skipped }); + results.push(...plan.skipped.map((user) => this.ctx.t(m.skipped, { user }))); + } + if (results.length) await this.ctx.send(results.join('\n')); + saved.cleanup = date; + await this.ctx.db.set('periods', saved); + } + } +} + +export default { + apiVersion: 1, id: 'checkin', aliases: ['签到'], version: '2.0.0', description: m.description, + validate: (config) => checkinConfig.parse(config), + create: (ctx, config) => new CheckinPlugin(ctx, checkinConfig.parse(config)), +} satisfies PluginDefinition; diff --git a/src/plugins/checkin/checkin.spec.ts b/src/plugins/checkin/checkin.spec.ts new file mode 100644 index 0000000..5a6204c --- /dev/null +++ b/src/plugins/checkin/checkin.spec.ts @@ -0,0 +1,133 @@ +import definition, { CheckinPlugin, checkinConfig, recordKey } from './checkin.plugin'; +import { CommandRouter } from '../../core/command/command-router'; +import { FakeContext, message } from '../../test/fakes'; + +function setup(config: Record = {}) { + const ctx = new FakeContext(); + const plugin = new CheckinPlugin(ctx, checkinConfig.parse(config)); + const router = new CommandRouter(plugin.commands); + const run = async (text: string, user = '@member:example.org') => { + const match = router.match(message(text, user)); + if (!match) throw new Error('Missing command'); + await match.command.run(match.invocation); + }; + return { ctx, plugin, run }; +} +const admin = '@admin:example.org', member = '@member:example.org'; +const last = (ctx: FakeContext) => ctx.transport.sent.at(-1)!.text; + +describe('date-based check-in plugin', () => { + it('Chinese and English commands share the atomic daily record', async () => { + const { ctx, plugin, run } = setup(); + await Promise.all([run('签到'), run('/checkin'), run('!签到')]); + expect((await plugin.records())).toHaveLength(1); + expect((await plugin.stats()).get(member)).toMatchObject({ total: 1, month: 1, today: true }); + expect(ctx.transport.sent.filter((s) => s.text.includes('签到成功'))).toHaveLength(1); + }); + it('starts a new day at midnight in the configured timezone without a report/reset', async () => { + const { ctx, plugin, run } = setup(); + ctx.date = new Date('2026-01-15T15:59:59Z'); await run('!checkin'); + ctx.date = new Date('2026-01-15T16:00:00Z'); await run('!checkin'); + expect((await plugin.records()).map((r) => r.date)).toEqual(['2026-01-15', '2026-01-16']); + expect((await plugin.stats()).get(member)?.total).toBe(2); + }); + it('monthly and daily reports preserve all records and counters', async () => { + const { ctx, run } = setup(); await run('!checkin'); + const before = await ctx.db.entries(); + await run('!日报', admin); await run('!report monthly', admin); await run('!月报', admin); + expect(await ctx.db.entries()).toEqual(before); + }); + it('uses lifetime known records for levels across month boundaries', async () => { + const { ctx, plugin, run } = setup(); + for (let day = 0; day < 45; day++) { + ctx.date = new Date(Date.UTC(2026, 0, 1 + day, 2)); await run('!签到'); + } + expect((await plugin.stats()).get(member)).toMatchObject({ total: 45, month: 14 }); + expect(last(ctx)).toContain('钻石'); + }); + it('allows own summary but restricts all, other users and raw data', async () => { + const { ctx, run } = setup(); await run('签到'); await run('!查询'); + expect(last(ctx)).toContain(member); + for (const query of ['!list all', '!查询 全部', '!list @other:example.org', '!list --raw']) { + await run(query); expect(last(ctx)).toContain('无权限'); + } + await run('!查询 全部 --原始', admin); expect(JSON.parse(last(ctx))[0].total).toBe(1); + }); + it('supports English replies through the same resources', async () => { + const { ctx, run } = setup(); ctx.locale = 'en'; await run('签到'); + expect(last(ctx)).toContain('Checked in'); await run('!签到'); expect(last(ctx)).toContain('Already'); + }); + it('rejects invalid dates and prevents monthly report access by members', async () => { + const { ctx, run } = setup(); await run('!日报 2026-02-30', admin); expect(last(ctx)).toContain('用法:!日报'); + await run('!月报'); expect(last(ctx)).toContain('无权限'); + }); + it('catches up reports once without deleting history or executing cleanup on enable', async () => { + const { ctx, plugin, run } = setup({ cleanupEnabled: true, autoCleanup: true }); + await run('!checkin'); await plugin.start(); + ctx.date = new Date('2026-03-03T02:00:00Z'); + await plugin.settle(false); + const count = ctx.transport.sent.length; + expect(ctx.transport.kicks).toHaveLength(0); + expect(last(ctx)).toContain('2026-02'); + await plugin.settle(false); expect(ctx.transport.sent).toHaveLength(count); + expect((await plugin.stats('2026-01')).get(member)?.month).toBe(1); + }); +}); + +describe('cleanup previews and confirmation', () => { + async function inactive(config: Record = {}) { + const result = setup({ cleanupEnabled: true, ...config }); + await result.run('签到'); result.ctx.date = new Date('2026-03-01T02:00:00Z'); + return result; + } + const token = (ctx: FakeContext) => /cleanup confirm ([a-f0-9]+)/.exec(last(ctx))![1]; + it('is disabled by default', async () => { + const { ctx, run } = setup(); await run('!清理 预览', admin); + expect(last(ctx)).toContain('未启用'); expect(ctx.transport.kicks).toHaveLength(0); + }); + it('previews without kicking; requires the same administrator and consumes the token', async () => { + const { ctx, run } = await inactive(); + await run('!清理 预览', admin); const code = token(ctx); + expect(ctx.transport.kicks).toHaveLength(0); + ctx.transport.powers.set('@second:example.org', 100); + await run(`!cleanup confirm ${code}`, '@second:example.org'); expect(ctx.transport.kicks).toHaveLength(0); + await run(`!清理 确认 ${code}`, admin); expect(ctx.transport.kicks).toHaveLength(1); + await run(`!cleanup confirm ${code}`, admin); expect(last(ctx)).toContain('无效'); + }); + it('rechecks check-in and privileges at confirmation', async () => { + const { ctx, run } = await inactive(); + await run('!cleanup preview', admin); const code = token(ctx); + await run('签到'); await run(`!cleanup confirm ${code}`, admin); + expect(ctx.transport.kicks).toHaveLength(0); + }); + it('expires previews and refuses a demoted administrator', async () => { + const { ctx, run } = await inactive(); await run('!cleanup preview', admin); const code = token(ctx); + ctx.transport.powers.set(admin, 0); await run(`!cleanup confirm ${code}`, admin); + expect(last(ctx)).toContain('无权限'); + ctx.transport.powers.set(admin, 100); ctx.date = new Date(ctx.date.getTime() + 300_001); + await run(`!cleanup confirm ${code}`, admin); expect(last(ctx)).toContain('过期'); + expect(ctx.transport.kicks).toHaveLength(0); + }); + it('skips permission lookup failures, protected users and never-checked members', async () => { + const { ctx, plugin } = await inactive(); + ctx.transport.powerFailures.add(member); + ctx.transport.memberMap.set(ctx.roomId, [member, '@new:example.org']); + expect(await plugin.cleanupCandidates()).toEqual({ users: [], skipped: [member] }); + ctx.transport.powerFailures.clear(); ctx.transport.powers.set(member, 100); + expect((await plugin.cleanupCandidates()).users).toEqual([]); + }); + it('does not turn a failed member lookup into an empty successful report', async () => { + const { ctx, plugin } = setup(); ctx.transport.memberFailures.add(ctx.roomId); + await expect(plugin.dailyText('2026-01-15')).rejects.toThrow('Unavailable'); + }); + it('validates automation prerequisites', () => { + expect(() => definition.validate({ autoCleanup: true })).toThrow(); + expect(recordKey(member, '2026-01-15')).not.toBe(recordKey('@other:example.org', '2026-01-15')); + }); + it('never includes its own account in cleanup candidates', async () => { + const { ctx, plugin, run } = setup({ cleanupEnabled: true }); + await run('签到', ctx.botUserId); ctx.date = new Date('2026-03-01T02:00:00Z'); + ctx.transport.memberMap.set(ctx.roomId, [ctx.botUserId]); + expect(await plugin.cleanupCandidates()).toEqual({ users: [], skipped: [] }); + }); +}); diff --git a/src/plugins/checkin/messages.ts b/src/plugins/checkin/messages.ts new file mode 100644 index 0000000..ca4a27a --- /dev/null +++ b/src/plugins/checkin/messages.ts @@ -0,0 +1,24 @@ +import { Messages } from '../../core/i18n/i18n'; +export const messages = { + description: { 'zh-CN': '按日期签到、统计与成员清理', en: 'Daily check-in, reports and membership cleanup' }, + checkin: { 'zh-CN': '今日签到', en: 'Check in for today' }, + list: { 'zh-CN': '查询签到;他人、全部和原始数据仅管理员可查', en: 'Check-in records; others, all and raw data require admin access' }, + daily: { 'zh-CN': '查询日报,不修改数据', en: 'Read daily report without changing data' }, + monthly: { 'zh-CN': '查询月报,不修改数据', en: 'Read monthly report without changing data' }, + cleanupPreview: { 'zh-CN': '预览长期未签到清理名单', en: 'Preview inactive-member cleanup' }, + cleanupConfirm: { 'zh-CN': '执行已预览的清理名单', en: 'Execute a previously previewed cleanup' }, + checked: { 'zh-CN': '{date} 签到成功。本月 {month} 次,累计已知记录 {total} 次,等级:{level}。', en: 'Checked in for {date}. This month: {month}; known total: {total}; level: {level}.' }, + duplicate: { 'zh-CN': '{date} 已签到,无需重复。', en: 'Already checked in for {date}.' }, + row: { 'zh-CN': '{user}:今日 {today},本月 {month} 次,累计已知记录 {total} 次,等级 {level}', en: '{user}: today {today}, month {month}, known total {total}, level {level}' }, + yes: { 'zh-CN': '已签到', en: 'checked in' }, + no: { 'zh-CN': '未签到', en: 'not checked in' }, + reportDay: { 'zh-CN': '{date} 日报\n已签到 {count} 人;当前群成员 {members} 人。\n按当前成员核对,未找到当日记录:\n{missing}', en: 'Daily report {date}\nChecked in: {count}; current members: {members}.\nCurrent members without a record for this date:\n{missing}' }, + reportMonth: { 'zh-CN': '{month} 月报\n{rows}', en: 'Monthly report {month}\n{rows}' }, + skipped: { 'zh-CN': '{user}:权限读取失败,已跳过', en: '{user}: permission lookup failed; skipped' }, + kickReason: { 'zh-CN': '连续至少 {days} 天未签到', en: 'No check-in for at least {days} days' }, + kicked: { 'zh-CN': '{user}:已移出', en: '{user}: removed' }, + kickFailed: { 'zh-CN': '{user}:移出失败,待人工复核', en: '{user}: removal failed; review required' }, + changed: { 'zh-CN': '{user}:状态已变化,已跳过', en: '{user}: eligibility changed; skipped' }, + disabled: { 'zh-CN': '成员清理未启用。请由维护人员配置 cleanupEnabled。', en: 'Membership cleanup is disabled. Configure cleanupEnabled first.' }, + catchup: { 'zh-CN': '补发统计:{from} 至 {to} 期间的最新一期;完整历史仍可按日期查询。', en: 'Catch-up: latest report for the interval {from} through {to}. Full history remains available by date.' }, +} satisfies Messages; diff --git a/src/plugins/room-manager/messages.ts b/src/plugins/room-manager/messages.ts new file mode 100644 index 0000000..c702068 --- /dev/null +++ b/src/plugins/room-manager/messages.ts @@ -0,0 +1,25 @@ +import { Messages } from '../../core/i18n/i18n'; +export const messages = { + description: { 'zh-CN': '业务身份与跨房间成员管理', en: 'Business roles and cross-room membership management' }, + status: { 'zh-CN': '查看成员管理模式和自动操作开关', en: 'Show membership mode and automation switches' }, + role: { 'zh-CN': '预览业务身份调整', en: 'Preview a business-role change' }, + preview: { 'zh-CN': '预览成员状态核对结果', en: 'Preview membership reconciliation' }, + confirm: { 'zh-CN': '确认已预览的成员操作', en: 'Confirm previewed membership actions' }, + mode: { 'zh-CN': '模式:{mode}\n权限变更同步:{power}\n入群同步:{join}\n离群联动:{leave}\n定时核对:{reconcile}', en: 'Mode: {mode}\nPower-change sync: {power}\nJoin sync: {join}\nLeave sync: {leave}\nPeriodic reconciliation: {reconcile}' }, + business: { 'zh-CN': '独立业务身份', en: 'independent business roles' }, + matrix: { 'zh-CN': 'Matrix 权限映射', en: 'Matrix power-level mapping' }, + on: { 'zh-CN': '开启', en: 'on' }, + off: { 'zh-CN': '关闭', en: 'off' }, + wrongMode: { 'zh-CN': '当前采用 Matrix 权限映射;业务身份命令仅在 business 模式可用。', en: 'Matrix mapping is active. Business-role commands require business mode.' }, + core: { 'zh-CN': '核心成员', en: 'core member' }, + member: { 'zh-CN': '普通成员', en: 'member' }, + restricted: { 'zh-CN': '受限成员', en: 'restricted member' }, + intermediate: { 'zh-CN': '中间权限', en: 'intermediate power' }, + invite: { 'zh-CN': '发送邀请', en: 'send invitation' }, + kick: { 'zh-CN': '移出', en: 'remove' }, + roleChange: { 'zh-CN': '{user} → {role}', en: '{user} → {role}' }, + failed: { 'zh-CN': '{user}:读取失败或操作失败,待复核', en: '{user}: lookup or operation failed; review required' }, + skipped: { 'zh-CN': '{user}:状态变化、管理员豁免或不在管理群,已跳过', en: '{user}: changed state, administrator exemption or not in control room; skipped' }, + action: { 'zh-CN': '{user}:{action} {room}', en: '{user}: {action} {room}' }, + reason: { 'zh-CN': '按已配置的成员管理规则同步', en: 'Reconciled according to configured membership policy' }, +} satisfies Messages; diff --git a/src/plugins/room-manager/room-manager.plugin.ts b/src/plugins/room-manager/room-manager.plugin.ts new file mode 100644 index 0000000..3997901 --- /dev/null +++ b/src/plugins/room-manager/room-manager.plugin.ts @@ -0,0 +1,212 @@ +import { z } from 'zod'; +import { Command, Invocation } from '../../core/command/command-router'; +import { MemberEvent, PowerLevelEvent } from '../../core/command/types'; +import { choice, common } from '../../core/i18n/i18n'; +import { Confirmations } from '../../core/plugin/confirmation'; +import { Plugin, PluginContext, PluginDefinition } from '../../core/plugin/types'; +import { messages as m } from './messages'; + +import { matrixRoomId } from '../../config/schema'; +export const roomManagerConfig = z.object({ + workRoom1: matrixRoomId, workRoom2: matrixRoomId, lostRoom: matrixRoomId, + mode: z.enum(['business', 'matrix']).default('business'), + levelA: z.number().int().default(50), levelB: z.number().int().default(0), levelC: z.number().int().default(-1), + syncPowerChanges: z.boolean().default(false), + syncOnJoin: z.boolean().default(false), syncOnLeave: z.boolean().default(false), + autoReconcile: z.boolean().default(false), +}).refine((c) => c.levelA > c.levelB && c.levelB > c.levelC, 'Require levelA > levelB > levelC') + .refine((c) => new Set([c.workRoom1, c.workRoom2, c.lostRoom]).size === 3, 'Target rooms must be distinct') + .refine((c) => !c.syncPowerChanges || c.mode === 'matrix', 'syncPowerChanges requires matrix mode'); +type Config = z.infer; +type Role = 'core' | 'member' | 'restricted' | 'intermediate'; +type Action = { user: string; room: string; type: 'invite' | 'kick' }; +type PlanRow = { user: string; role: Role; previous: Role | null; member: boolean; actions: Action[] }; +type Plan = { rows: PlanRow[]; assign: boolean }; + +export class RoomManagerPlugin implements Plugin { + readonly commands: Command[]; + private readonly plans: Confirmations; + constructor(private readonly ctx: PluginContext, private readonly config: Config) { + if ([config.workRoom1, config.workRoom2, config.lostRoom].includes(ctx.roomId)) throw new Error('Control room must differ from target rooms'); + this.plans = new Confirmations(ctx, 'membership'); + this.commands = [ + { id: 'access.status', paths: [['access', 'status'], ['成员管理', '状态']], admin: true, description: m.status, + usage: { 'zh-CN': '!成员管理 状态', en: '!access status' }, run: async (inv) => { + await this.reply(inv, ctx.t(m.mode, { mode: ctx.t(m[config.mode]), power: ctx.t(config.syncPowerChanges ? m.on : m.off), + join: ctx.t(config.syncOnJoin ? m.on : m.off), leave: ctx.t(config.syncOnLeave ? m.on : m.off), reconcile: ctx.t(config.autoReconcile ? m.on : m.off) })); + } }, + { id: 'role.set', paths: [['role', 'set'], ['身份', '设置']], admin: true, description: m.role, + usage: { 'zh-CN': '!身份 设置 <用户ID> 核心|普通|受限', en: '!role set core|member|restricted' }, run: (inv) => this.rolePreview(inv) }, + { id: 'access.preview', paths: [['access', 'preview'], ['access', 'reconcile'], ['成员管理', '预览'], ['成员管理', '核对']], admin: true, description: m.preview, + usage: { 'zh-CN': '!成员管理 预览 [用户ID]', en: '!access preview [userId]' }, run: (inv) => this.preview(inv) }, + { id: 'access.confirm', paths: [['access', 'confirm'], ['成员管理', '确认']], admin: true, description: m.confirm, + usage: { 'zh-CN': '!成员管理 确认 <确认码>', en: '!access confirm ' }, run: (inv) => this.confirm(inv) }, + ]; + } + async start(): Promise { + if (this.config.autoReconcile) { + this.ctx.schedule('membership-reconciliation', '0 */15 * * * *', () => this.reconcile()); + await this.reconcile(); + } + } + private async reply(inv: Invocation, text: string): Promise { await this.ctx.reply(inv.message, text); } + private usage(inv: Invocation, id: string): Promise { + return this.reply(inv, this.ctx.t(common.usage, { usage: this.ctx.t(this.commands.find((command) => command.id === id)!.usage) })); + } + private async admin(inv: Invocation): Promise { + if (await this.ctx.isAdmin(inv.message.userId)) return true; + await this.reply(inv, this.ctx.t(common.denied)); return false; + } + private mapPower(power: number): Role { + if (power >= this.config.levelA) return 'core'; + if (power >= this.config.levelB) return 'member'; + return power > this.config.levelC ? 'intermediate' : 'restricted'; + } + private async desired(user: string, isMember: boolean): Promise { + if (!isMember) return this.config.syncOnLeave ? 'restricted' : undefined; + return this.config.mode === 'matrix' ? this.mapPower(await this.ctx.power(user)) : + await this.ctx.db.get(`role:${user}`) ?? 'member'; + } + private operations(user: string, role: Role): Action[] { + const { workRoom1: first, workRoom2: second, lostRoom: lost } = this.config; + const table: Record> = { + core: [[first, 'invite'], [second, 'invite'], [lost, 'kick']], + member: [[first, 'kick'], [second, 'invite'], [lost, 'kick']], + restricted: [[first, 'kick'], [second, 'kick'], [lost, 'invite']], + intermediate: [[lost, 'kick']], + }; + return table[role].map(([room, type]) => ({ user, room, type })); + } + private async row(user: string, members: string[], override?: Role): Promise { + if (user === this.ctx.botUserId) return undefined; + const member = members.includes(user); + if (override && !member && override !== 'restricted') return undefined; + const role = override ?? await this.desired(user, member); + if (!role) return undefined; + const previous = await this.ctx.db.get(`role:${user}`); + const power = await this.ctx.power(user); + const admin = power >= this.ctx.adminPowerLevel || await this.ctx.isAdmin(user); + const actions: Action[] = []; + for (const action of this.operations(user, role)) { + if (action.type === 'kick' && admin) continue; + const joined = (await this.ctx.members(action.room)).includes(user); + if (action.type === 'kick' ? joined : !joined) actions.push(action); + } + return { user, role, previous, member, actions }; + } + private async collect(user?: string, role?: Role): Promise<{ rows: PlanRow[]; notes: string[] }> { + const members = await this.ctx.members(); + const known = (await this.ctx.db.entries()).filter(([key]) => key.startsWith('role:') || key.startsWith('seen:')).map(([key]) => key.slice(5)); + const users = user ? [user] : [...new Set([...members, ...known])].filter((id) => id !== this.ctx.botUserId); + const rows: PlanRow[] = [], notes: string[] = []; + for (const id of users) { + try { + const row = await this.row(id, members, role); + if (row) rows.push(row); else if (user) notes.push(this.ctx.t(m.skipped, { user: id })); + } catch { notes.push(this.ctx.t(m.failed, { user: id })); } + } + return { rows, notes }; + } + private async showPlan(inv: Invocation, role?: Role): Promise { + const result = await this.collect(inv.args[0], role); + const token = await this.plans.preview(inv.message.userId, { rows: result.rows, assign: !!role }); + const lines = result.rows.flatMap((row) => [ + ...(role ? [this.ctx.t(m.roleChange, { user: row.user, role: this.ctx.t(m[row.role]) })] : []), + ...row.actions.map((a) => this.describe(a)), + ]); + await this.reply(inv, this.ctx.t(common.preview, { details: [...lines, ...result.notes].join('\n') || this.ctx.t(common.empty), + command: `!access confirm ${token} / !成员管理 确认 ${token}` })); + } + private async rolePreview(inv: Invocation): Promise { + if (!await this.admin(inv)) return; + if (this.config.mode !== 'business') return this.reply(inv, this.ctx.t(m.wrongMode)); + const role = choice(inv.args[1], { core: ['核心', '核心成员'], member: ['普通', '普通成员'], restricted: ['受限', '受限成员'] }); + if (inv.args.length !== 2 || !/^@.+:.+$/.test(inv.args[0]) || !role) { + return this.usage(inv, 'role.set'); + } + await this.showPlan(inv, role); + } + private async preview(inv: Invocation): Promise { + if (!await this.admin(inv)) return; + if (inv.args.length > 1 || (inv.args[0] && !/^@.+:.+$/.test(inv.args[0]))) { + return this.usage(inv, 'access.preview'); + } + await this.showPlan(inv); + } + private describe(action: Action): string { + return this.ctx.t(m.action, { user: action.user, action: this.ctx.t(m[action.type]), room: action.room }); + } + private async execute(plan: Plan, actor: string): Promise { + const result: string[] = []; + for (const row of plan.rows) { + try { + const members = await this.ctx.members(); + const previous = await this.ctx.db.get(`role:${row.user}`); + const desired = plan.assign ? row.role : await this.desired(row.user, members.includes(row.user)); + if (previous !== row.previous || members.includes(row.user) !== row.member || desired !== row.role) { + result.push(this.ctx.t(m.skipped, { user: row.user })); continue; + } + if (plan.assign) { + await this.ctx.audit('role.set', actor, { user: row.user, role: row.role }); + await this.ctx.db.set(`role:${row.user}`, row.role); + result.push(this.ctx.t(m.roleChange, { user: row.user, role: this.ctx.t(m[row.role]) })); + } + if (row.member) await this.ctx.db.set(`seen:${row.user}`, true); + // Execute only actions shown in the preview, never add new targets at confirmation. + for (const action of row.actions) { + try { + const stillMember = (await this.ctx.members()).includes(row.user); + if (stillMember !== row.member || (!plan.assign && await this.desired(row.user, stillMember) !== row.role)) { + result.push(this.ctx.t(m.skipped, { user: row.user })); break; + } + const joined = (await this.ctx.members(action.room)).includes(action.user); + if (action.type === 'kick' ? !joined : joined) continue; + const power = await this.ctx.power(action.user); + if (action.type === 'kick' && (power >= this.ctx.adminPowerLevel || await this.ctx.isAdmin(action.user))) { + result.push(this.ctx.t(m.skipped, { user: action.user })); continue; + } + await this.ctx.audit(`membership.${action.type}.requested`, actor, { user: action.user, room: action.room }); + if (action.type === 'kick') await this.ctx.kick(action.room, action.user, this.ctx.t(m.reason)); + else await this.ctx.invite(action.room, action.user); + await this.ctx.audit(`membership.${action.type}.completed`, actor, { user: action.user, room: action.room }); + result.push(this.describe(action)); + } catch { + await this.ctx.audit(`membership.${action.type}.failed`, actor, { user: action.user, room: action.room }); + result.push(this.ctx.t(m.failed, { user: action.user })); + } + } + } catch { + await this.ctx.audit('membership.lookup.failed', actor, { user: row.user }); + result.push(this.ctx.t(m.failed, { user: row.user })); + } + } + return result; + } + private async confirm(inv: Invocation): Promise { + if (!await this.admin(inv)) return; + const plan = inv.args.length === 1 ? await this.plans.consume(inv.message.userId, inv.args[0]) : undefined; + if (!plan) return this.reply(inv, this.ctx.t(common.expired)); + const result = await this.execute(plan, inv.message.userId); + await this.reply(inv, this.ctx.t(common.done, { details: result.join('\n') || this.ctx.t(common.empty) })); + } + private async reconcile(user?: string): Promise { + const { rows, notes } = await this.collect(user); + const result = await this.execute({ rows, assign: false }, 'scheduler'); + if (result.length || notes.length) await this.ctx.send(this.ctx.t(common.done, { details: [...result, ...notes].join('\n') })); + } + async onMember(event: MemberEvent): Promise { + if ((event.membership === 'join' && this.config.syncOnJoin) || + (event.membership === 'leave' && this.config.syncOnLeave)) await this.reconcile(event.userId); + } + async onPowerLevel(_event: PowerLevelEvent): Promise { + // Reconcile current state, including users_default changes omitted by a users-only diff. + if (this.config.syncPowerChanges) await this.reconcile(); + } +} + +export default { + apiVersion: 1, id: 'room-manager', aliases: ['成员管理', '权限同步'], version: '2.0.0', description: m.description, + validate: (config) => roomManagerConfig.parse(config), + allowedRooms: (config) => { const c = roomManagerConfig.parse(config); return [c.workRoom1, c.workRoom2, c.lostRoom]; }, + create: (ctx, config) => new RoomManagerPlugin(ctx, roomManagerConfig.parse(config)), +} satisfies PluginDefinition; diff --git a/src/plugins/room-manager/room-manager.spec.ts b/src/plugins/room-manager/room-manager.spec.ts new file mode 100644 index 0000000..588af76 --- /dev/null +++ b/src/plugins/room-manager/room-manager.spec.ts @@ -0,0 +1,88 @@ +import { CommandRouter } from '../../core/command/command-router'; +import { FakeContext, message } from '../../test/fakes'; +import definition, { RoomManagerPlugin, roomManagerConfig } from './room-manager.plugin'; + +const admin = '@admin:example.org', member = '@member:example.org'; +const config = { workRoom1: '!work1:example.org', workRoom2: '!work2:example.org', lostRoom: '!lost:example.org' }; +function setup(extra: Record = {}) { + const ctx = new FakeContext(), plugin = new RoomManagerPlugin(ctx, roomManagerConfig.parse({ ...config, ...extra })); + const router = new CommandRouter(plugin.commands); + const run = async (text: string, user = admin) => { + const match = router.match(message(text, user))!; await match.command.run(match.invocation); + }; + return { ctx, plugin, run }; +} +const last = (ctx: FakeContext) => ctx.transport.sent.at(-1)!.text; +const token = (ctx: FakeContext) => /access confirm ([a-f0-9]+)/.exec(last(ctx))![1]; + +describe('membership plugin', () => { + it('defaults to business roles with every automatic mutation switch off', async () => { + const { ctx, plugin } = setup(); await plugin.start(); + await plugin.onMember({ ...message(''), membership: 'leave' }); + await plugin.onMember({ ...message(''), membership: 'join' }); + await plugin.onPowerLevel({ account: ctx.account, roomId: ctx.roomId, users: { [member]: -1 }, prevUsers: {}, defaultPower: 0 }); + expect(ctx.scheduler.jobs.size).toBe(0); expect(ctx.transport.kicks).toHaveLength(0); expect(ctx.transport.invites).toHaveLength(0); + }); + it('business roles do not grant native Matrix management power and require confirmation', async () => { + const { ctx, run } = setup(); await run(`!身份 设置 ${member} 核心`); const code = token(ctx); + expect(await ctx.db.get(`role:${member}`)).toBeNull(); expect(ctx.transport.invites).toHaveLength(0); + await run(`!access confirm ${code}`); + expect(await ctx.db.get(`role:${member}`)).toBe('core'); expect(ctx.transport.powers.get(member)).toBeUndefined(); + expect(ctx.transport.invites.map((i) => i.room)).toEqual([config.workRoom1, config.workRoom2]); + }); + it('requires the previewing administrator and expires tokens', async () => { + const { ctx, run } = setup(); await run(`!role set ${member} restricted`); const code = token(ctx); + ctx.transport.powers.set('@other-admin:example.org', 100); + await run(`!access confirm ${code}`, '@other-admin:example.org'); expect(last(ctx)).toContain('无效'); + ctx.date = new Date(ctx.date.getTime() + 300_001); + await run(`!access confirm ${code}`); expect(last(ctx)).toContain('过期'); expect(ctx.transport.invites).toHaveLength(0); + }); + it('does not apply a stale preview if the member leaves the control room', async () => { + const { ctx, run } = setup(); await run(`!role set ${member} core`); const code = token(ctx); + ctx.transport.memberMap.set(ctx.roomId, []); + await run(`!access confirm ${code}`); expect(ctx.transport.invites).toHaveLength(0); expect(await ctx.db.get(`role:${member}`)).toBeNull(); + }); + it('preview and reconciliation never mutate membership until confirmed', async () => { + const { ctx, run } = setup(); ctx.transport.memberMap.set(config.workRoom1, [member]); + await run('!access reconcile'); const code = token(ctx); + expect(ctx.transport.kicks).toHaveLength(0); + await run(`!成员管理 确认 ${code}`); expect(ctx.transport.kicks).toEqual([{ room: config.workRoom1, user: member }]); + }); + it('skips unreadable privileges and newly promoted administrators at execution', async () => { + const { ctx, run } = setup(); ctx.transport.memberMap.set(config.workRoom1, [member]); + await run('!access preview'); const code = token(ctx); + ctx.transport.powerFailures.add(member); await run(`!access confirm ${code}`); + expect(ctx.transport.kicks).toHaveLength(0); expect(ctx.transport.invites).toHaveLength(0); + }); + it('maps intermediate integer power levels using the configured ranges', async () => { + const { ctx, run } = setup({ mode: 'matrix' }); ctx.transport.powers.set(member, 25); + ctx.transport.memberMap.set(config.workRoom1, [member]); + await run('!access preview'); const code = token(ctx); await run(`!access confirm ${code}`); + expect(ctx.transport.kicks).toEqual([{ room: config.workRoom1, user: member }]); + expect(ctx.transport.invites).toEqual([{ room: config.workRoom2, user: member }]); + }); + it('reconciles members affected by users_default changes when explicitly enabled', async () => { + const { ctx, plugin } = setup({ mode: 'matrix', syncPowerChanges: true }); + ctx.transport.powers.set(member, -1); ctx.transport.memberMap.set(config.workRoom1, [member]); + await plugin.onPowerLevel({ account: ctx.account, roomId: ctx.roomId, users: {}, prevUsers: {}, defaultPower: -1 }); + expect(ctx.transport.kicks).toHaveLength(1); expect(ctx.transport.invites).toContainEqual({ room: config.lostRoom, user: member }); + }); + it('can recover a missed leave for previously observed members when both switches are enabled', async () => { + const { ctx, plugin } = setup({ syncOnLeave: true, autoReconcile: true }); + await plugin.start(); ctx.transport.memberMap.set(ctx.roomId, []); ctx.transport.memberMap.set(config.workRoom2, [member]); + await ctx.scheduler.tick(); expect(ctx.transport.kicks).toContainEqual({ room: config.workRoom2, user: member }); + }); + it('validates distinct rooms, threshold ordering and mode-dependent switches', () => { + expect(() => definition.validate({ ...config, workRoom2: config.workRoom1 })).toThrow(); + expect(() => definition.validate({ ...config, levelA: 0 })).toThrow(); + expect(() => definition.validate({ ...config, syncPowerChanges: true })).toThrow(); + }); + it('never reconciles its own account or emits no-op periodic notifications', async () => { + const { ctx, plugin } = setup({ autoReconcile: true }); + ctx.transport.memberMap.set(ctx.roomId, [ctx.botUserId]); + ctx.transport.memberMap.set(config.workRoom1, [ctx.botUserId]); + await plugin.start(); await ctx.scheduler.tick(); + expect(ctx.transport.kicks).toHaveLength(0); expect(ctx.transport.invites).toHaveLength(0); + expect(ctx.transport.sent).toHaveLength(0); + }); +}); diff --git a/src/test/database.ts b/src/test/database.ts new file mode 100644 index 0000000..d0fa541 --- /dev/null +++ b/src/test/database.ts @@ -0,0 +1,30 @@ +import { execFileSync } from 'node:child_process'; +import { mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { resolve, join } from 'node:path'; +import { PrismaService } from '../core/db/prisma.service'; + +export async function testDatabase(): Promise<{ prisma: PrismaService; close(): Promise }> { + const directory = mkdtempSync(join(tmpdir(), 'bot-test-')); + const url = `file:${join(directory, 'test.db')}`; + const root = resolve(__dirname, '../..'); + let prisma: PrismaService | undefined; + try { + execFileSync(process.execPath, [require.resolve('prisma'), 'db', 'push', '--skip-generate', '--schema', resolve(root, 'prisma/schema.prisma')], { + cwd: directory, + env: { ...process.env, DATABASE_URL: url, RUST_LOG: 'info', CHECKPOINT_DISABLE: '1', PRISMA_HIDE_UPDATE_MESSAGE: '1', + NODE_OPTIONS: `--require=${JSON.stringify(resolve(root, 'scripts/test-network-guard.cjs'))}` }, + stdio: 'pipe', timeout: 30_000, + }); + prisma = new PrismaService({ datasources: { db: { url } } }); + await prisma.onModuleInit(); + const client = prisma; + return { prisma: client, close: async () => { + try { await client.onModuleDestroy(); } finally { rmSync(directory, { recursive: true, force: true }); } + } }; + } catch (error) { + await prisma?.onModuleDestroy().catch(() => undefined); + rmSync(directory, { recursive: true, force: true }); + throw error; + } +} diff --git a/src/test/fakes.ts b/src/test/fakes.ts new file mode 100644 index 0000000..c0355e0 --- /dev/null +++ b/src/test/fakes.ts @@ -0,0 +1,85 @@ +import { InboundMessage } from '../core/command/types'; +import { translate, Locale } from '../core/i18n/i18n'; +import { PluginContext, Store } from '../core/plugin/types'; +import { MatrixTransport } from '../core/matrix/types'; +import { Scheduler } from '../core/plugin/scheduler'; + +export class MemoryStore implements Store { + private readonly data = new Map(); + async get(key: string): Promise { return this.data.has(key) ? structuredClone(this.data.get(key)) as T : null; } + async set(key: string, value: T): Promise { this.data.set(key, structuredClone(value)); } + async create(key: string, value: T): Promise { + if (this.data.has(key)) return false; + this.data.set(key, structuredClone(value)); return true; + } + async remove(key: string): Promise { this.data.delete(key); } + async entries(): Promise> { return structuredClone([...this.data]) as Array<[string, T]>; } +} +export function memoryStores(): (scope: string) => MemoryStore { + const stores = new Map(); + return (scope) => { if (!stores.has(scope)) stores.set(scope, new MemoryStore()); return stores.get(scope)!; }; +} +export class FakeScheduler implements Scheduler { + readonly jobs = new Set<() => Promise>(); + readonly zones: string[] = []; + register(_cron: string, timeZone: string, run: () => Promise): () => void { + this.jobs.add(run); this.zones.push(timeZone); return () => { this.jobs.delete(run); }; + } + async tick(): Promise { for (const job of [...this.jobs]) await job(); } +} +export class FakeTransport implements MatrixTransport { + readonly account = 'test'; + readonly userId = '@bot:example.org'; + readonly sent: Array<{ room: string; text: string }> = []; + readonly kicks: Array<{ room: string; user: string }> = []; + readonly invites: Array<{ room: string; user: string }> = []; + readonly memberMap = new Map([['!control:example.org', ['@member:example.org']]]); + readonly powers = new Map([['@admin:example.org', 100]]); + readonly powerFailures = new Set(); + readonly memberFailures = new Set(); + async send(room: string, text: string): Promise { this.sent.push({ room, text }); return 'event'; } + async kick(room: string, user: string): Promise { + this.kicks.push({ room, user }); this.memberMap.set(room, (this.memberMap.get(room) ?? []).filter((id) => id !== user)); + } + async invite(room: string, user: string): Promise { this.invites.push({ room, user }); } + async getJoinedMembers(room: string): Promise { + if (this.memberFailures.has(room)) throw new Error('Unavailable'); + return [...(this.memberMap.get(room) ?? [])]; + } + async getMemberCount(room: string): Promise { return (await this.getJoinedMembers(room)).length; } + async getPowerLevel(_room: string, user: string): Promise { + if (this.powerFailures.has(user)) throw new Error('Unavailable'); + return this.powers.get(user) ?? 0; + } +} +export class FakeContext implements PluginContext { + readonly account = 'test'; + readonly botUserId = '@bot:example.org'; + readonly roomId = '!control:example.org'; + readonly timeZone = 'Asia/Shanghai'; + readonly adminPowerLevel = 100; + locale: Locale = 'zh-CN'; + readonly controller = new AbortController(); + readonly signal = this.controller.signal; + readonly scheduler = new FakeScheduler(); + readonly transport = new FakeTransport(); + readonly audits: Array<{ action: string; actor: string; details: Record }> = []; + date = new Date('2026-01-15T02:00:00Z'); + constructor(readonly db: Store = new MemoryStore()) {} + now = (): Date => new Date(this.date); + t: PluginContext['t'] = (text, values) => translate(text, this.locale, values); + send = (text: string) => this.transport.send(this.roomId, text); + reply = (_message: InboundMessage, text: string) => this.send(text); + isAdmin = async (user: string) => { + try { return await this.power(user) >= this.adminPowerLevel; } catch { return false; } + }; + members = (room = this.roomId) => this.transport.getJoinedMembers(room); + power = (user: string) => this.transport.getPowerLevel(this.roomId, user); + kick = (room: string, user: string, _reason: string) => this.transport.kick(room, user); + invite = (room: string, user: string) => this.transport.invite(room, user); + schedule = (_name: string, cron: string, run: () => Promise) => { this.scheduler.register(cron, this.timeZone, run); }; + audit: PluginContext['audit'] = async (action, actor, details) => { this.audits.push({ action, actor, details }); }; +} +export function message(text: string, userId = '@member:example.org', roomId = '!control:example.org'): InboundMessage { + return { text, userId, roomId, account: 'test', eventId: '$test', timestampMs: Date.parse('2026-01-15T02:00:00Z') }; +} diff --git a/src/test/fixtures/bots.test.yaml b/src/test/fixtures/bots.test.yaml new file mode 100644 index 0000000..447da93 --- /dev/null +++ b/src/test/fixtures/bots.test.yaml @@ -0,0 +1,22 @@ +accounts: + main: + homeServer: "https://matrix.example.com" + userId: "@testbot:example.com" + password: "test-password-main" + checkin: + homeServer: "https://matrix.example.com" + userId: "@checkin-test:example.com" + password: "test-password-checkin" + +bots: + - name: checkin + account: checkin + rooms: + - "!testroom:example.com" + config: + mainRoom: "!testroom:example.com" + kickDays: 30 + autoKick: false + adminPowerLevel: 100 + admins: [] + whitelist: [] diff --git a/src/test/no-network.ts b/src/test/no-network.ts new file mode 100644 index 0000000..2dafdab --- /dev/null +++ b/src/test/no-network.ts @@ -0,0 +1,22 @@ +// Tests use injected transports. Any accidental network call fails immediately. +import { Logger } from '@nestjs/common'; +Logger.overrideLogger(false); +const blocked = () => { throw new Error('Network access is disabled in tests'); }; +jest.spyOn(require('node:http'), 'request').mockImplementation(blocked); +jest.spyOn(require('node:http'), 'get').mockImplementation(blocked); +jest.spyOn(require('node:https'), 'request').mockImplementation(blocked); +jest.spyOn(require('node:https'), 'get').mockImplementation(blocked); +jest.spyOn(require('node:net').Socket.prototype, 'connect').mockImplementation(blocked); +jest.spyOn(require('node:tls'), 'connect').mockImplementation(blocked); +global.fetch = jest.fn(blocked); + +const fs = require('node:fs'); +const exists = fs.existsSync.bind(fs); +const read = fs.readFileSync.bind(fs); +const privateConfiguration = (path: unknown) => typeof path === 'string' && + (/(^|\/)\.env(?:\..*)?$/.test(path) || /(^|\/)config\/bots\.yaml$/.test(path)); +jest.spyOn(fs, 'existsSync').mockImplementation((path: unknown) => privateConfiguration(path) ? false : exists(path)); +jest.spyOn(fs, 'readFileSync').mockImplementation((path: unknown, ...args: unknown[]) => { + if (privateConfiguration(path)) throw new Error('Runtime configuration is unavailable in tests'); + return read(path, ...args); +}); diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..b319010 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "dist", "src/test", "**/*.spec.ts"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..eacf083 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strict": true, + "strictNullChecks": true, + "noImplicitAny": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "paths": { + "@core/*": ["src/core/*"], + "@config/*": ["src/config/*"], + "@plugins/*": ["src/plugins/*"] + } + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +}