diff --git a/AGENTS.md b/AGENTS.md index c59e577..25a1f0c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # AGENTS.md — @ultime/cli > 给在本仓库工作的 AI 与协作者:入口、可写 / 只读、红线与验收。 -> 适用版本:0.2.x +> 适用版本:0.3.x ## 先读 @@ -27,7 +27,9 @@ - **不发 bin、不做命令发现**:每个产品包自带入口;本包不聚合、不扫描其他包的 bin。 - **不做 IO 策略**:读盘写盘与配置路径由命令自己决定。 - **不引第三方解析库**:`parseArgs` 保持零依赖。 -- **API 变化同步**:`runCli` / `ParsedArgs` / `CliContext` 变化时同步 README、`SKILLS.md` 与测试。 +- **runCli 异步**:命令返回 `number | Promise`;入口必须 `await` 后再赋给 `process.exitCode`。 +- **开发方式**:测试先行;阶段完成先 review 代码与文档;文档简洁、机制优先。 +- **API 变化同步**:`runCli` / `ParsedArgs` / `FlagSpec` / `CliContext` 变化时同步 README、`SKILLS.md` 与测试。 ## 验证 diff --git a/CHANGELOG.md b/CHANGELOG.md index 861ace2..0d069ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 0.3.0 - 2026-11-15 + +### Added + +- `parseArgs(argv, { flags })` 与 `FlagSpec`:命令级声明 `boolean` / `string`,布尔 flag 不再吞后面的 token;`--` 之后全部按 positional 处理。 +- `CommandSpec.flags`:声明后 `runCli` 拒绝未知参数、布尔显式值与带值 flag 缺值,统一报 `USAGE`。 +- `runCli` 支持异步命令与 `mapError`;`help` 支持函数,用于二级命令帮助。 +- 导出 `flagValue` / `flagBool` / `reportError` / `exitCodeOf` 与 `EXIT_OK` / `EXIT_FAIL` / `EXIT_USAGE`。 + +### Changed + +- **Breaking**:`runCli` 返回 `Promise`;入口改为 `process.exitCode = await runCli(...)`。 +- 传入 `flags` schema 时,未声明的 flag 按布尔解析,交给命令校验拒绝;未传 schema 保持旧的自由解析。 +- 空字符串 `--key ""` 保留为值,不再退化成 `true`。 + +### Fixed + +- `--` 不再被当成空名 flag;`--key ''` 与 `--key=` 行为一致。 + ## 0.2.0 - 2026-11-12 ### Added diff --git a/README.md b/README.md index 491a5d9..f635045 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ pnpm add @ultime/cli 包作者只写自己的命令,参数、help、未知命令与退出码交给本包: ```ts -import { runCli, processContext } from '@ultime/cli' +import { flagBool, flagValue, processContext, runCli } from '@ultime/cli' const spec = { name: 'my-cli', @@ -24,25 +24,46 @@ const spec = { usage: 'my-cli ', commands: { build: { - help: 'my-cli build [--check]', + help: 'my-cli build [--check] [--config ]', + flags: { check: 'boolean', config: 'string' }, run: (args, ctx) => { - ctx.out(`check=${Boolean(args.flags.check)}`) + ctx.out(`check=${flagBool(args, 'check')} config=${flagValue(args, 'config') ?? '-'}`) return 0 }, }, }, } -process.exitCode = runCli(spec, process.argv.slice(2), processContext()) +process.exitCode = await runCli(spec, process.argv.slice(2), processContext()) ``` +命令可以返回 `number`,也可以返回 `Promise`;`runCli` 会等待结果。 + ## 出口 | 入口 | 提供 | |---|---| -| `@ultime/cli` | `parseArgs` / `runCli` / `processContext` / `CliError` / `toErrorShape` / `CliContext` / `CliSpec` / `CommandSpec` | +| `@ultime/cli` | `parseArgs` / `flagBool` / `flagValue` / `runCli` / `reportError` / `processContext` / `CliError` / `toErrorShape` / `exitCodeOf` / `EXIT_OK` / `EXIT_FAIL` / `EXIT_USAGE` / `CliContext` / `CliSpec` / `CommandSpec` / `FlagType` / `FlagSpec` / `ParseOptions` / `ParsedArgs` / `CliErrorOptions` / `CliErrorShape` | + +`parseArgs` 只认 `command`、`--flag`、`--key value` / `--key=value`;`-h/--help`、`-v/--version` 与 `--json` 是保留 flag。`--` 之后全部按 positional 处理,`--key ""` 保留空字符串。 + +## 声明参数 + +给命令加 `flags` 后,参数语义由声明决定,未知参数会在执行前被拒绝: + +```ts +commands: { + deploy: { + flags: { 'dry-run': 'boolean', config: 'string' }, + run: (args, ctx) => 0, + }, +} +``` -`parseArgs` 只认 `command`、`--flag`、`--key value` / `--key=value`;`-h/--help`、`-v/--version` 与 `--json` 是保留 flag。 +- `boolean`:永不消费下一个 token,只接受 `--dry-run`; +- `string`:消费下一个 token,支持 `--config path` / `--config=path` / `--config ''`; +- 未声明:传了 schema 时按布尔解析,再由 `runCli` 以 `USAGE` 拒绝;不传 schema 时保持旧的自由解析; +- 同一 flag 在所有命令中的类型必须一致;命令要么全部声明 `flags`,要么全部省略。 ## 错误与退出码 @@ -64,7 +85,9 @@ throw new CliError('缺少 --config', { | 命令返回的码 | 原样透传 | | 命令抛普通异常 | 1,`code: 'ERROR'` | | `CliError` | `exitCode`,默认 2(用法或配置错误) | -| 无命令、未知命令 | 2 | +| 未知命令、未知参数、布尔参数带值、带值参数缺值 | 2 | + +`runCli` 是异步的:版本 / 帮助 / 无命令等分支也会返回 `Promise`。 - 未知命令给最近候选;没有候选时列出可用命令。 - `--json` 时错误只写 stderr: @@ -80,7 +103,7 @@ AI 入口:[`llms.txt`](./llms.txt)(路由)与 [`SKILLS.md`](./SKILLS.md) ## 边界 - **零领域依赖**:不 import 任何领域包,也不认识具体业务对象。 -- **不引第三方解析 / 着色库**:解析用零依赖实现,着色直接用 ANSI。Node 内置 `util.parseArgs` 表达不了自由 `--key value`,暂不切换。 +- **不引第三方解析 / 着色库**:解析用零依赖实现,着色直接用 ANSI。Node 内置 `util.parseArgs` 表达不了自由 `--key value` 与命令级 flag schema,暂不切换。 - **不内置命令、不发 bin**:具体命令由调用方包注册,各自发布自己的 bin;本包不做命令发现与聚合。 - **不做 IO 策略**:读盘写盘、配置路径由命令自己决定;本包只提供 `cwd` 与 `out/err`。 @@ -88,18 +111,19 @@ AI 入口:[`llms.txt`](./llms.txt)(路由)与 [`SKILLS.md`](./SKILLS.md) ```text src/ - args.ts 参数解析(纯函数) + args.ts 参数解析(纯函数)、flag schema 与读取 context.ts 命令上下文(cwd / out / err) - error.ts 机器可读错误与统一转换 - run.ts 命令注册、help、未知命令与退出码 + error.ts 机器可读错误、退出码与统一转换 + run.ts 命令注册、flags 校验、help、未知命令与退出码 index.ts 公共出口 -tests/ 参数、运行时分发与包内容边界 +tests/ 参数、运行时、声明校验与包内容边界 ``` ## 版本与兼容 -- 当前 `0.2.x`;0.x 阶段 API 仍可能调整。 +- 当前 `0.3.x`;0.x 阶段 API 仍可能调整。 - 退出码语义:0 成功 / 1 命令执行失败 / 2 用法或配置错误;这是 0.2 起的新约定,升级时按本节目迁移。 +- 0.3 的破坏性变更:`runCli` 改为异步;声明 `flags` 后未知参数与缺值会被拒绝。迁移方式:入口改成 `process.exitCode = await runCli(...)`,并给命令补 `flags`;不补 `flags` 的命令仍按旧规则解析。 - 破坏性变更写进 [CHANGELOG](./CHANGELOG.md),并在本节目说明迁移方式。 - 发布顺序:本包是基础设施,先于依赖它的包。 diff --git a/SKILLS.md b/SKILLS.md index bd72d0b..6dcc3e2 100644 --- a/SKILLS.md +++ b/SKILLS.md @@ -1,22 +1,36 @@ # @ultime/cli · 可调用能力 > 定位:AI 可调用的通用命令设施。领域命令不在这里。 -> 适用版本:0.2.x -> 同步基线:0.2.x(手写;API 变化时同批更新) +> 适用版本:0.3.x +> 同步基线:0.3.x(手写;API 变化时同批更新) --- ## 入口 ```ts -import { parseArgs, runCli, processContext, CliError } from '@ultime/cli' -import type { ParsedArgs, CliContext, CliSpec, CommandSpec, CliErrorOptions, CliErrorShape } from '@ultime/cli' +import { flagBool, flagValue, parseArgs, processContext, reportError, runCli, CliError } from '@ultime/cli' +import type { + CliContext, + CliSpec, + CommandSpec, + FlagSpec, + FlagType, + ParseOptions, + ParsedArgs, + CliErrorOptions, + CliErrorShape, +} from '@ultime/cli' ``` | 能力 | 输入 | 输出 | |---|---|---| -| `parseArgs(argv)` | 字符串数组 | `{ command, flags, positional }` | -| `runCli(spec, argv, ctx?)` | `CliSpec` + 参数 | 退出码;版本 / 帮助 / 未知命令 / 错误由它处理 | +| `parseArgs(argv, options?)` | 字符串数组 + 可选 `flags` schema | `{ command, flags, positional }` | +| `flagBool(args, name)` | 解析结果 + flag 名 | 是否显式为 `true` | +| `flagValue(args, name)` | 解析结果 + flag 名 | 字符串或 `undefined`;缺值抛 `CliError` | +| `runCli(spec, argv, ctx?)` | `CliSpec` + 参数 | `Promise<退出码>`;版本 / 帮助 / 未知命令 / 校验 / 错误由它处理 | +| `reportError(ctx, error, json)` | 上下文 + 任意异常 + 是否 JSON | 统一错误输出 | +| `exitCodeOf(error)` | 任意异常 | `CliError.exitCode` 或 1 | | `processContext()` | — | `{ cwd, out, err }` | | `CliError(message, options)` | 文案 + `code` / `path` / `hint` / `details` / `exitCode` | 可被 `runCli` 统一输出的错误 | | `toErrorShape(error)` | 任意异常 | `{ code, message, path?, hint?, details? }` | @@ -28,7 +42,12 @@ import type { ParsedArgs, CliContext, CliSpec, CommandSpec, CliErrorOptions, Cli name: string version: string usage: string - commands: Record + commands: Record string) + flags?: Record + run(args, ctx): number | Promise + }> + mapError?: (error: unknown) => CliError | undefined } ``` @@ -36,11 +55,17 @@ import type { ParsedArgs, CliContext, CliSpec, CommandSpec, CliErrorOptions, Cli - 未知命令:`err` 写错误与候选,`out` 写 usage,返回 2; - 无命令:`out` 写 usage,返回 2; +- 未知参数 / 布尔参数带值 / 带值参数缺值:`CliError`(`USAGE`),返回 2; - 普通异常:`err` 写 message,`code: 'ERROR'`,返回 1; - `CliError`:带 `code` / `path` / `hint`,返回 `exitCode`(默认 2); - `--json`:错误以 `{ "error": { … } }` 只写 stderr; - 版本 / 帮助:返回 0,不执行命令。 +## 边界 + +- 参数解析与命令级校验是通用设施;业务 flag 由调用方声明。 +- 声明 `flags` 后未知参数会被拒绝;未声明时保持旧的自由解析。 + ## 反例 - 把 `--check` 当成 cli 内置 flag:它属于调用方的命令。 diff --git a/llms.txt b/llms.txt index 50ffa4d..6506dfb 100644 --- a/llms.txt +++ b/llms.txt @@ -1,6 +1,6 @@ # @ultime/cli · AI 索引 -适用版本:0.2.x +适用版本:0.3.x ## 去哪找 @@ -9,7 +9,7 @@ ## 机器入口 -- 公共出口:`@ultime/cli` 的 `parseArgs` / `runCli` / `processContext` / `CliError` / `toErrorShape` 与类型。 +- 公共出口:`@ultime/cli` 的 `parseArgs` / `flagBool` / `flagValue` / `runCli` / `reportError` / `processContext` / `CliError` / `toErrorShape` / `exitCodeOf` 与类型。 ## 边界 diff --git a/package.json b/package.json index eb81bbf..aceab1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ultime/cli", - "version": "0.2.0", + "version": "0.3.0", "description": "Ultime · cli:通用命令行设施(参数 / 命令注册 / 上下文 / 退出码),零领域依赖", "keywords": [ "argument-parser", @@ -58,7 +58,7 @@ "size-limit": "^14.3.0", "typescript": "^5.9.3", "unplugin-unused": "^0.6.0", - "vite-plus": "1.5.1" + "vite-plus": "1.6.0" }, "size-limit": [ { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d052126..28935a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -189,10 +189,10 @@ importers: version: 5.9.3 unplugin-unused: specifier: ^0.6.0 - version: 0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1) + version: 0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1) vite-plus: - specifier: 1.5.1 - version: 1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1)) + specifier: 1.6.0 + version: 1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1)) packages: @@ -412,289 +412,292 @@ packages: '@emnapi/core': ^1.7.1 || 2.0.0-beta.2 '@emnapi/runtime': ^1.7.1 || 2.0.0-beta.2 - '@oxc-project/runtime@0.157.0': - resolution: {integrity: sha512-srnUknwVoji5JdmU664pA4XyjBJXmgxP8rWlnZhFovzw6XQxaICGWAuScZdlLmIHI+ZRc7WgeiC2CURF4tAszQ==} + '@oxc-project/runtime@0.158.0': + resolution: {integrity: sha512-OYWBlK/wnZHyol5jkvBJadD8KTR6DJfFDRClqrU6kBDQKHd4bXNZALg3qfXk0aFl6F5loSxMT24EZurNWE4MKQ==} engines: {node: ^20.19.0 || >=22.12.0} '@oxc-project/types@0.157.0': resolution: {integrity: sha512-95iTox1qdt6WGWce3xwNOVayByOfLaYAq+qGPpub6NWbBh9sv0GG3+zyfh9ZBCO/jVu5A0EWI+qQI7g6fevjxg==} - '@oxfmt/binding-android-arm-eabi@0.76.0': - resolution: {integrity: sha512-z8x4kittQLPsrJWmfoIJyYqs2gNwceGShoUqAJdFRPw3K4kkkKCFHh3Cr4NFRvZb7DPfDS3+JfBjSm3OIyQaJQ==} + '@oxc-project/types@0.158.0': + resolution: {integrity: sha512-xZ66qA4WmLbTLlxH3mqMd8f9UKbaOzOT0ATwFf4DH/14pMgpUrtqtjyYzOQmgfl2a0iRAAMbQ9G1th/67jRzGw==} + + '@oxfmt/binding-android-arm-eabi@0.78.0': + resolution: {integrity: sha512-1x9NPGQG5WMOOT8spRP4hPbeqwB/P9ayxFo4EUDSle6mLmtYRqE6suXgHr93/S2nnszy77LlIa8klkKdWtHbMw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxfmt/binding-android-arm64@0.76.0': - resolution: {integrity: sha512-Zj9fEQhQSKGj8ZTB+X4q4ho4545xWf7qsvJpwREWnBz5BATEFYtStKRgiwYOZvxQ7ORlBEgSj7pmDzuljfV1mQ==} + '@oxfmt/binding-android-arm64@0.78.0': + resolution: {integrity: sha512-1muYaW9SiPEq8NIPGX0B20oUwCx6HWiCsZem/2jU7UsOzoXLT4YxWq6ybdhwKSKl0PyAfvyMyPF7FsI1To7AdA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxfmt/binding-darwin-arm64@0.76.0': - resolution: {integrity: sha512-jZy8GpUXaWpic5JPMAvLmaBz95Sx0naZl6hptBPLOMiYmZYiME7jAt6pv8o/tjQqPNWKb+7jKzZhrYx6UqM5MQ==} + '@oxfmt/binding-darwin-arm64@0.78.0': + resolution: {integrity: sha512-jl4KJdo8HrVpLmcSYS/7oDXPH8Hzd6VrzgUFRAbY0j6cSRjcDkUnpuAStuNLoqvMtZEi7Rdy68BBriCgWJcy2g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxfmt/binding-darwin-x64@0.76.0': - resolution: {integrity: sha512-U59+a9lVpoRp9enRhTE9GssL3qB1k09CYagRzTfs3dfknopMYV0x0xHZv7Pls3SNMqHlyHR+ufmY76CYafQoLw==} + '@oxfmt/binding-darwin-x64@0.78.0': + resolution: {integrity: sha512-RwOhQgAQi1qV3TeuTfrgGkCWEL3eDFIql/lo4rt2xpGHqyolKa+W5cFbb+M9IvwMwQbplii5Gbv1ZQQPTJlNug==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxfmt/binding-freebsd-x64@0.76.0': - resolution: {integrity: sha512-J1R3YJHPdQJ2RQvzMdTVDWyizhihGiRGGAeEZxtGp629j5pcT5ypSLSiBflopD7o7tmiMD+xlNfhIVmjcHKMVQ==} + '@oxfmt/binding-freebsd-x64@0.78.0': + resolution: {integrity: sha512-MAXydj01mLjMUlnmo7sYVm+7kdBdU9Nwaux2Q1f9oLNqt3CCdego1oMoZ30qDyZQGQXfVJZEU1yRV7mSzwKDVA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxfmt/binding-linux-arm-gnueabihf@0.76.0': - resolution: {integrity: sha512-x9qTg6zHoqeyzmFVlIjSb9WlhZdoXaayMTeQeDeUEfKA484AgPJz7f9chLjDMONA6wUUX0FJxnVHsYgX5Zv0+g==} + '@oxfmt/binding-linux-arm-gnueabihf@0.78.0': + resolution: {integrity: sha512-rz6FVZRiWsq3O2YQgCoqZRwaQQaPQ70NBks4+KINjjPJOjBTd8g/iq6ynS97ode+qKGlhXtpc/xCl8LHzfOjyQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm-musleabihf@0.76.0': - resolution: {integrity: sha512-303gbamm7NDllTtkeaX+8F5Da+KcSBr64mqELQEFg9XgnjfLX3YBCHUcOfgIlVTSybesy43eoeKai8oGr0P6UA==} + '@oxfmt/binding-linux-arm-musleabihf@0.78.0': + resolution: {integrity: sha512-lIK0XJi4JP1FnhuLjR/JWhQHGghZc+ghFNnbZTQC8kxsmrkW3ex8CeF7fp0FT+rEP0Nm6voCYkasL8poVWA9sQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm64-gnu@0.76.0': - resolution: {integrity: sha512-j3UAXzCJoWX9bZLaICj6DfwkI/2fzja9RpiCIbIN+2CQAcKoY+5SH5pQUcECvn32mQm17NSPE9YqTAwYx1seZg==} + '@oxfmt/binding-linux-arm64-gnu@0.78.0': + resolution: {integrity: sha512-o2LJIHfW3ZADOjDVk5c7MM1M8CiAG43GTc4mlJAK23fOHgru4CvnqWedCoCXpIsKokoRdEa7XdQywPGZv1BAiA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-arm64-musl@0.76.0': - resolution: {integrity: sha512-qFZqWVkEzuxWMtUkCtHxsnohXHnUMBQr/ZIxF0KmlCSt8de/bc1lbpVgpqjb3QxCADQHG/O1s3JcowcBF2sqdw==} + '@oxfmt/binding-linux-arm64-musl@0.78.0': + resolution: {integrity: sha512-G+lUaQk94Vo+4byyd8X2+pPXtd7wObpdbvBC8xyozZD0ROSVBI3XpNNR6HECkJq4Q51AwLuJG81f4x+4eqvSrw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-ppc64-gnu@0.76.0': - resolution: {integrity: sha512-ROiAid0UH2GN5lMMX2JTgKlOKx1rN+6a1WxIuBsU3j5A3MuB9U5XkREMW76XBbAImnH45mfOCFcSIwb+drcVYg==} + '@oxfmt/binding-linux-ppc64-gnu@0.78.0': + resolution: {integrity: sha512-r76PAZf9/ZgF/iDRaIf8nLsr4x6ZHe/j2QLmWUjoQ46Sa11qMO68a5u5iux3y8vLzqYTS/xtKO9PjjMfyk5png==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-gnu@0.76.0': - resolution: {integrity: sha512-Oyd/9ObdM2RYkZ7yzF/GyvVdbNgJcRG8BFVwnAVo3ooqzaem4E2p5eTIGB09FecQD+Q5HQEANOTEnIZTO6rBAQ==} + '@oxfmt/binding-linux-riscv64-gnu@0.78.0': + resolution: {integrity: sha512-SQiXTt/c4aVoRXkJvhf4Y/sA1XYe3XjSMDbdX5PiAssBuHERoGtncQXz0KKWkXPejWTKlAL4mZSQZdHOCiw7TA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-musl@0.76.0': - resolution: {integrity: sha512-86DOpmPDR5UzHSOB8y5HlOpYAIBtMx+6L72IyousNx54q1Kz61aykB4ScovFYivZUak+7Ww6tPBUjarluzYKLw==} + '@oxfmt/binding-linux-riscv64-musl@0.78.0': + resolution: {integrity: sha512-VNB3wFUx/rAqwVNW+uyXxb+c0HUrmcS51UPkFMDWJY95c6Tck6u6HOyVLsqiYoC8kh2mGlwanYmjb/R2McvN0A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-s390x-gnu@0.76.0': - resolution: {integrity: sha512-u6omjjFooKfnHLBI+3UtBVInAeuEhoM/RAIw/OiFop2QQgOan5zDfqPR6guMaylt68L60kV+by07Ibp87KDjrw==} + '@oxfmt/binding-linux-s390x-gnu@0.78.0': + resolution: {integrity: sha512-1nbI0Y7SXwx2f4mJmKt58MaDdjAcoaYM90pBMGdcZCsTW2taFW1/MUi3uQGRPAN2n+3PldCdO9m+D6x+gU/heg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-gnu@0.76.0': - resolution: {integrity: sha512-L0/hW1MdMrgsvuLGp9YEQOYOGj5xPHa8wVRtybdd5av03PV4qSpAq3pyfC7sn7UCA8ynRhMRTAa9Kr9nV4LGZg==} + '@oxfmt/binding-linux-x64-gnu@0.78.0': + resolution: {integrity: sha512-I2z2ISPjrl3CSRF5fmQkNnoh46UVU1GjM1V0+COJyNZcj0SDNM4DrPP2/gXCX38YJ1P2BL6sF2VdsJ+pEYEbJQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-musl@0.76.0': - resolution: {integrity: sha512-JNk/7HaPDJjy5kih3vq6b71Qif3tHx1ZFACGBzeHeNzyKaIpar4eFGya89GR398K2rwX0eEVmEq1npBPlEkkmg==} + '@oxfmt/binding-linux-x64-musl@0.78.0': + resolution: {integrity: sha512-YHt5nKKFxT4SruI57FHnEhGRSDuoFqNoAM3moYCClg70mjjS39gBBbdzaZv+N0otdzvQVuHTPu3jFu5tpqC3XQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxfmt/binding-openharmony-arm64@0.76.0': - resolution: {integrity: sha512-MDLrOQPXDuPKvPUCvpP3hC6kO72dsYxfpYiR08Nf5DiM75M0d8+D26JwT4uHDf0bcflvlGHcd58Hn2HpxkHUUQ==} + '@oxfmt/binding-openharmony-arm64@0.78.0': + resolution: {integrity: sha512-WH21lBMU+LYzF7aMeozTZlyc44oa2F+I5OtQ7RwuidCDoAxgTyN1s34rx0PBYrio56+2G88U9VOnYJsyV7VMHQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxfmt/binding-win32-arm64-msvc@0.76.0': - resolution: {integrity: sha512-2CcICDrQKqMAOFuzmts/8Ov5iKb+DW/QrW4MFsl2bnRg86uoiUvtqUkHqNSY19Shegc8pBHiXMSEHDjIg94o0A==} + '@oxfmt/binding-win32-arm64-msvc@0.78.0': + resolution: {integrity: sha512-uNQqHJrtHIiSl8pMbhDktmGpA1hqwldWNO8kbNpNFhVt+BYk4C3Ge8nlJgkRtGjtMam0+542G5UQJJG6lLePbg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxfmt/binding-win32-ia32-msvc@0.76.0': - resolution: {integrity: sha512-NjZLJg+tQpMWVSyeWBBKCpib7H/uLq84ZzxCvY5eqHzSaItuzCECGA9MBiZwmW8fnkBIfppg49Ib//LSCGAp8Q==} + '@oxfmt/binding-win32-ia32-msvc@0.78.0': + resolution: {integrity: sha512-W6omURRT39EHBPH4Z8sUPIOzWVjMbhCCCWcfT0sa6aeC+vOXNyBAJmpQRh5//KfPDX96jJlNith9i4N65wxB+Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxfmt/binding-win32-x64-msvc@0.76.0': - resolution: {integrity: sha512-0vCMaX/qloc7uaKBDRh+62SBW8EqmhS7c8/al+PxD594ao4lyEWdcoEmVoBgnCNVW07GDpg+9uPV7x6ta9mljw==} + '@oxfmt/binding-win32-x64-msvc@0.78.0': + resolution: {integrity: sha512-r9rWKeDVc7lIrj0Us9kP08W7FudYAoWyEdO40qnKk20bHiTbW/z2v4LoIxxUENQyFfApbeV2Gl9XsEgY/tY1dA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@oxlint-tsgolint/darwin-arm64@7.0.2005': - resolution: {integrity: sha512-VqDZxcZVjlonNLuuvraVNgDQt+1ndwa4yJo8OqsK4HYh/61ba9IlMStCVfi/aaIqRoDhNbAKC8gdcTrXqnb+Ug==} + '@oxlint-tsgolint/darwin-arm64@7.0.2006': + resolution: {integrity: sha512-uc0MEHXZUDW23Zmo5X28eSNeSnP17jKnh9GiehpVZqhfy99ks8spyXT5Llar3tjDN7ppnQN0Qd9FK6WNkdD+fQ==} cpu: [arm64] os: [darwin] - '@oxlint-tsgolint/darwin-x64@7.0.2005': - resolution: {integrity: sha512-4kUfLRNYoVpv0Tm3jPYrvxyfOc/LmdvFC3pKZ4tL6K7lA7K/VS81SAtmxRzbYXYSyb3SBWhwsuX+df4neqzxxA==} + '@oxlint-tsgolint/darwin-x64@7.0.2006': + resolution: {integrity: sha512-+x1/pa3S3VMC9cif8XKTOCQUuqRT+wu1Ix+FK5svXa2xbXCuE7+4S0SfmuSnK/mk9AI5+xBxZFhILxmCPUZ1hA==} cpu: [x64] os: [darwin] - '@oxlint-tsgolint/linux-arm64@7.0.2005': - resolution: {integrity: sha512-rhUNcPsBlKvhXtrbhbBUidtRBRdJ8fbEHN9H5Q5N59gby18ruGuDA7KUxl7oRnUzp797uykYQhkBDm+0KpfK/Q==} + '@oxlint-tsgolint/linux-arm64@7.0.2006': + resolution: {integrity: sha512-90v7HX8m54kHXn5DpjNEN18Fb7xwJMREe/wji3USyAf9pTMv7a3qZ3cPoLViIcIzxPLmkcYZIs1j1H3Z2gbVLA==} cpu: [arm64] os: [linux] - '@oxlint-tsgolint/linux-x64@7.0.2005': - resolution: {integrity: sha512-tKs9yinDQZOHygM0e8EJnjTU3mzJtdfkOZP6Udu82iLMePUSHOhTJ9zzU/mSd1hQxURI4LTRRiFhfzC+PzwdNA==} + '@oxlint-tsgolint/linux-x64@7.0.2006': + resolution: {integrity: sha512-/k0wsEqHiA5dWBJYuld3Vecv6bIhKCasxpho/aFkvh870Qox33MuTkKUGWIVm/njAxw7W4pu1a/Xfa3jwuKuPQ==} cpu: [x64] os: [linux] - '@oxlint-tsgolint/win32-arm64@7.0.2005': - resolution: {integrity: sha512-VYPnu1gjfbSv+ROhuyNfMs382D4zQU2ZRc8Uc3nuEZo1k2kf+1KfTrg4hrlWh73h9GI+dUWyo+DYCQzUBlPwcQ==} + '@oxlint-tsgolint/win32-arm64@7.0.2006': + resolution: {integrity: sha512-CQT5sqcLZLNZSWLzUUEjQmp74UX8h1agp3ZJ8pfRktHbx6gfBa8a7CjrnRrZ9VXlwnXVkpw7m5KBO6y+S5MQRA==} cpu: [arm64] os: [win32] - '@oxlint-tsgolint/win32-x64@7.0.2005': - resolution: {integrity: sha512-ekU89cTGy9fpQzuvxIsFHrnoP8XoFjGIRgPEW6eqgY2NYjGy9pwpjF79o04WXRMJFKRrcaVqkZXUUBdLsqpQDw==} + '@oxlint-tsgolint/win32-x64@7.0.2006': + resolution: {integrity: sha512-VZsGowXcp3vQNkjoGeVCOTf4aGrRpRk6bBJWhefnJVPr6z+dX+LKqqHfwaqnFvg66Q2iJpXqklRW38YO21ee+Q==} cpu: [x64] os: [win32] - '@oxlint/binding-android-arm-eabi@1.91.0': - resolution: {integrity: sha512-eOqJUUS1MCqIoUUxMIkuwaqIdKaHr1SXYA0CQI95UUrF8jwQylQH33bBmnqhZfvWXKlRB2Ylx/+Sbk/ctEqzZQ==} + '@oxlint/binding-android-arm-eabi@1.93.0': + resolution: {integrity: sha512-KKw70pbD5Pvq3G2lJ+WQ71XPMjCmg37rkSe2+mDqCRP3PoTSdDMuEi4UOnE8JBtyNM7bek61EC2s0Jt7S7u+Sg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxlint/binding-android-arm64@1.91.0': - resolution: {integrity: sha512-vIJU4lRxK0EhbBt+iR3rkq3pio4I+V5Gshwjei3plNjN+CIq0WxWHzYVI06J9KN8Ar3hyNSFtzJAjVRLZOYpjg==} + '@oxlint/binding-android-arm64@1.93.0': + resolution: {integrity: sha512-fvr1fTUZGelwRxKDt64pf28aL1WaWgviwz3X+E/FcRYvrlEahH0NECRz/c1SY+K+KWmZk5uAf6h1kQnyBkp/2A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxlint/binding-darwin-arm64@1.91.0': - resolution: {integrity: sha512-tLy76MurwAOpQt5QVMkJUgexBSWhB7qdvAYb14bc0xntZS6f55aKicbZoxZ/QlmAbnrdlXeD5+IjwY8EZ9RWTg==} + '@oxlint/binding-darwin-arm64@1.93.0': + resolution: {integrity: sha512-VdvSN9JRf4Es6ZzoAdvEeh8tgKdw8L4H82WmA8MMPVfPdZGCwE/nI27Z1HrRHYQhPxOh4kmnxQEioSUFrOvDaw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxlint/binding-darwin-x64@1.91.0': - resolution: {integrity: sha512-zPeMmjAqm5vXxbTp/JqYuc9gGSbUuEaeCAkFHB4TCRLTlfJGD//Fkx03YvZHCHZJ7ideLiiLcae+3f2I27qnaA==} + '@oxlint/binding-darwin-x64@1.93.0': + resolution: {integrity: sha512-QR1V890Ml0YGRG0F/iV0K9igG+pOhe+VWd+aZnxY849rRHZf3F2gEoQks5+GVHf105X9Mh/6HdShTP5juekG2g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxlint/binding-freebsd-x64@1.91.0': - resolution: {integrity: sha512-psOR9+xGMXn0hj4KY5M2kjSQ1n0TCMdYbPOraoV0iQyl7mw2oBBYGUM2+ma40m1YLVrktTBOta4FjrmcOHDhrg==} + '@oxlint/binding-freebsd-x64@1.93.0': + resolution: {integrity: sha512-jDfIbi30zZaKi+rTvig3sge+Xhi8pFFSgHxb0jzovc4qh8ETm/irKV9c7N/JsuwnYc5sbvf4IC8w1vQQ0IL+BA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxlint/binding-linux-arm-gnueabihf@1.91.0': - resolution: {integrity: sha512-1PNA1j4ETxawvxfz6ueDxWgQgWkXPbv44DWZmC7LR07GqojGFDOwWbosOT6/AYiJr7zMXEhn2dPWMkyFFOFpUQ==} + '@oxlint/binding-linux-arm-gnueabihf@1.93.0': + resolution: {integrity: sha512-qtxZ714ND/koFgVH00QgxlzZiIbRPmguaPhnHRU5DFFtrtEdOrSnZD4U/H2AzXrXkZ59eQbMBnJwbum5XohrIQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm-musleabihf@1.91.0': - resolution: {integrity: sha512-jcNePVpca37lTbHmiPMnVbPAAW0rH9kAoDjsDv6vESEX9pzazIR1q5SyYuc1rQzdjHtc2VVCDN9jDh6tHcOHyA==} + '@oxlint/binding-linux-arm-musleabihf@1.93.0': + resolution: {integrity: sha512-5pJ9NjMvH7WMUqXB6bTTOSemBm39w2cod27Hu3+Yom/GhbTeNXlYcpDx1o4CgBP6fhp0YHG66TNdVaUm6sHjsA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm64-gnu@1.91.0': - resolution: {integrity: sha512-TJi78UX6R+9qZ23ZKtzN6adfW83bjY0NXsCRMBRH6H7IizaMXmZbdRAtjedMkx77bT46YQH0csawsY9lwha8MA==} + '@oxlint/binding-linux-arm64-gnu@1.93.0': + resolution: {integrity: sha512-pRf+7jtbt2fHE23SX7qBxRgnBZicUgsoCK1PVIjnOk+t3a6UBkpt/GrKI99WlxsKUxftz/5nv/kfKvScmYywkw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-arm64-musl@1.91.0': - resolution: {integrity: sha512-OowlLroUTzKq5OBvbu6iegch8SJ2DivXFCukzPWURwvcJhMj7/P0CUGH5qrDlxT1Kh48dcxqYqrvE8qK6xTLKQ==} + '@oxlint/binding-linux-arm64-musl@1.93.0': + resolution: {integrity: sha512-zM8Fd/K8sqGvsBcJBZ3oVZ3ctGWbszA08IaGt5gFFF5RcunppAI/ZnAXbouABvnWeJ//S44KKlfPZnDDbeiphg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxlint/binding-linux-ppc64-gnu@1.91.0': - resolution: {integrity: sha512-QF/5Ge8yGpWg5s4awMNHfVKh1WOmk591Qg082i6CHenXYBa+W1E5RwWZXaKUOw4Ko7CCjqg3TfBc0AzhnqblYg==} + '@oxlint/binding-linux-ppc64-gnu@1.93.0': + resolution: {integrity: sha512-7qKCnvhZKDXJG2pdbLazd2hw4FxjJHbZOFrrbzyy5PdHfPLH9vnNUa1le01A8uItZuYKPBPncH+HCoEiFT4SgA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-gnu@1.91.0': - resolution: {integrity: sha512-dXlsKlNhzJQX1nageGKnvWe1D7uTng249hQM80CG/YPZ8F/VZHbxVLhImgurdWBOmu86XOemValLjrW6QIOM/Q==} + '@oxlint/binding-linux-riscv64-gnu@1.93.0': + resolution: {integrity: sha512-2pgulxC6G8V5wE750NJE/fRkf9aO6i6yoj10wyaR2EdiNtan4OemsOtsQ0ZTXGdY8Q3IoTmlND3GYvjJsvikYg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-musl@1.91.0': - resolution: {integrity: sha512-tznkj5VrWNRUfymkaLcJetgMLbP9suL5ob/m7j0Fdbnm5u3Li/Ezo/YcBixiuwdL1sg0oGpyTe86It0J6T+Lxg==} + '@oxlint/binding-linux-riscv64-musl@1.93.0': + resolution: {integrity: sha512-yWsn6Gg2PnGG5jlyDz5+pHGiMTMiy4adaa4WRMzDgzB8efaShk1JMmTHIBSVLQMh0tYXRs4CN5uJCO79r4Mi4g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxlint/binding-linux-s390x-gnu@1.91.0': - resolution: {integrity: sha512-sNvfLiUYQkVsLNUgIW24AEYTHSd2zZ1vAxXssPdjuQHTtCpRvQihYri6d5z5FY7w/QrcnB5+g9E+/sqmZq8tfA==} + '@oxlint/binding-linux-s390x-gnu@1.93.0': + resolution: {integrity: sha512-WCn5plwp/ezS2RDPQKp0/EXEVRr9/dDexUdRKmsMFqzNM5xBSZ1wbsi3PuMk1VfkMRnI5BuazCsziCWMXRDOlw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-gnu@1.91.0': - resolution: {integrity: sha512-eA25ETvimhUZ89y5BcunNY7yv7qwG2I7V7dFQAU+mIEqZ57gBCXdIERl0yXOEt43zjsw0yK2gRKTc+twF706wQ==} + '@oxlint/binding-linux-x64-gnu@1.93.0': + resolution: {integrity: sha512-F2CGjb9LAkzH+IYTZSzd1klQ1vk5z6Utjax64WeLByCkYXbVDbsun+Oy2hLfW2MDSKCvW+jwy/9ld0EPgdeu+A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-musl@1.91.0': - resolution: {integrity: sha512-4hZ4Z9K+OkcTpAHDoUTMg/8MModbM0aocrl9KnGzp9h5iKqjrXraEUZorYoVCT7xoK93CAHXgTndxRBrOjH/fA==} + '@oxlint/binding-linux-x64-musl@1.93.0': + resolution: {integrity: sha512-plf5DE2objcG8Tf7mXRuRa8tT8rzDkpjqXQtKoGsKHWkpgsialbON1+cCtoSEUTVbQUjXvuAm8vV9+3rR0yCBw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxlint/binding-openharmony-arm64@1.91.0': - resolution: {integrity: sha512-gtqn4b0kLpGe46Qh7NHiR86wZpd+TLaesO106s7V3RG33r63VB94LW5qPKEDJX64osh3xfjnPFn1M0484bC7wQ==} + '@oxlint/binding-openharmony-arm64@1.93.0': + resolution: {integrity: sha512-Kp2yJrKvoTe9FfKdO/xwLNUbs2bYTMKx0+aoQD1s0h/Tx0kSgtHSdGmrk8tTKdluosjFbo88qYRIaNIX43AfFw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxlint/binding-win32-arm64-msvc@1.91.0': - resolution: {integrity: sha512-KQItBdsyHN28U3z/bEek6h9pvG3Uqv564QYO8K1bE/V7YRZgpHlRnfNKVPHkk4sfYKyPzEjCgW80QkImOLvJog==} + '@oxlint/binding-win32-arm64-msvc@1.93.0': + resolution: {integrity: sha512-vigjcHCFsR6KjnWTEVfaCxcMYapEuaK9FZa1MpewwQ1S+Xud3v0okfkj1RySsD6RF1NRHIjSlQSalTnKIaj3nA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxlint/binding-win32-ia32-msvc@1.91.0': - resolution: {integrity: sha512-XFKqbbsQVmTgw+CyBKuzSZtAa45viom1naFfulKmkTFdDyDaBQaBqEz5J61TI8iwBynU+F8q7qPD+9mplZRhEg==} + '@oxlint/binding-win32-ia32-msvc@1.93.0': + resolution: {integrity: sha512-0Ot3BEe/AAr2/uQhe55r8CmPlperYk2mQmxdutOru7oU0kir6IiEVHb1TG3GORRlfra97lPHVDLhgmihiKzLrg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxlint/binding-win32-x64-msvc@1.91.0': - resolution: {integrity: sha512-DmpK0PthG66Bcz5Y4JqNbzXltzyLQtg3ofYpd25+ejm7kQYUM78VL1uIP/ZFct2781mwUyBX37LatFPCTVp35A==} + '@oxlint/binding-win32-x64-msvc@1.93.0': + resolution: {integrity: sha512-ZzzIIVs/Qkm8trUWYKF0OYub5ALlv50/3gsEZbKAvWgz+yNJX6uRmQ8ySPXU2Q0/Y9m4JCOjhpmC8XUYbPHX5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@oxlint/plugins@1.91.0': - resolution: {integrity: sha512-Fh+SOBxMu7/pbSk84WG4BN6npcxxlF4jWNQJ+S4IUNyvSVeQwOVTFQMD/Dx2EqBQ1lVeCADcJ+0rzT1BKQ9cUA==} + '@oxlint/plugins@1.93.0': + resolution: {integrity: sha512-bKWQI1g9jn8bWUZsvhbOLfgva576Fbp1KwoTNSUCMdT9tlTAvQS2JkifX1UrhPPdyN4GHvM20HhvIMqqU1yotQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@polka/url@1.0.0-next.29': @@ -896,8 +899,8 @@ packages: '@vitest/utils@5.1.0': resolution: {integrity: sha512-V+qgCwkvVw+s1t1S5TaoBHsLi5Sz/YmohCMoOu0mZ8ZQst2bKhRYARAQucWpVg8D0mv0x5MHcWXY5QdOsoiGBQ==} - '@voidzero-dev/vite-plus-core@1.5.1': - resolution: {integrity: sha512-34nfvz01DlXmNTRtqOiA2OnI/QsnMZ/XkH2EJYXhXl7D5xloi9EBO87e57Zuo9sgqwDksvtp2gOH72MZZIz0qQ==} + '@voidzero-dev/vite-plus-core@1.6.0': + resolution: {integrity: sha512-0UFh0AVjt3ZynvRk0BTCwysCeURhyZCoEGabEptwOzlvQjV2eGRcf5jPTfLGaKwgw2dKOQYH4vq/N3H7WUdIyw==} engines: {node: ^20.19.0 || ^22.18.0 || >=24.11.0} peerDependencies: '@arethetypeswrong/core': ^0.18.1 @@ -965,54 +968,54 @@ packages: yaml: optional: true - '@voidzero-dev/vite-plus-darwin-arm64@1.5.1': - resolution: {integrity: sha512-hYxibkQivI54eOYpkEgYeXmxbRM+ovO9nYetDL6EJP7XHesuohaT/IpQgOigLlWj6+Bfqs0MTCfDHoS4gmUXcw==} + '@voidzero-dev/vite-plus-darwin-arm64@1.6.0': + resolution: {integrity: sha512-1IiE9eXsnLWesaHEI2l1L38+CChaQ82WJd3GpF+Ud7Kuq+T2x8TebUwLCPYatpTSDDs8z2w1yKAl7quoVZhetA==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [darwin] - '@voidzero-dev/vite-plus-darwin-x64@1.5.1': - resolution: {integrity: sha512-h82GIWf4zkG/UqYYaEtUv1oQWi755QAqG4m9S+ApB4dQvZQkSxsUZfKgBXASz2x6SH/SRcElZipnslTEBAghoA==} + '@voidzero-dev/vite-plus-darwin-x64@1.6.0': + resolution: {integrity: sha512-oSsfR1ACQdFo60cuvInK5AZxPx7TAKyrt7NsUaNVZVj24ALsh+0hjZSRmWkJ3lF8aRtw1Lh8d7bkFXgQcQdKxQ==} engines: {node: '>=20.0.0'} cpu: [x64] os: [darwin] - '@voidzero-dev/vite-plus-linux-arm64-gnu@1.5.1': - resolution: {integrity: sha512-Vg1vugNxq2tI6eV6gn9e3S2QZP1XvCuqyHdhQuBMjPa852+jhUC2Yz1iqzSYthn6CGO7oGRK/Zj6xsvnzjk9Vg==} + '@voidzero-dev/vite-plus-linux-arm64-gnu@1.6.0': + resolution: {integrity: sha512-6m2vRctdtQDl+ARQwGTF9X6hg+JaVFtj4vkvBLy/dWpqiJzseGebJwKUjys8QuhXgcJocn3a+N6oh27vvfINUQ==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [linux] libc: [glibc] - '@voidzero-dev/vite-plus-linux-arm64-musl@1.5.1': - resolution: {integrity: sha512-53lJyznOJmIHT7Q2Bi2v3hB4qr8XqTHVDZsfN1H7JMk1ptCuD7A++OKAsBh8/60xMhKEyCIH713vuzqJVW6drA==} + '@voidzero-dev/vite-plus-linux-arm64-musl@1.6.0': + resolution: {integrity: sha512-ZHx0byqPOQ/WiAxHbfdvTp8HICWAzKje8kfZ6ihLu9ZLQ1nOo0Ri5FAgYTAmLMfMXgU5qZuNFQFdp4k5ONe3jQ==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [linux] libc: [musl] - '@voidzero-dev/vite-plus-linux-x64-gnu@1.5.1': - resolution: {integrity: sha512-aU+cnwcnjDcH11dDe+roQ7GJRjLwt9YtYslcPQg+L1pLUSEuQUjlyfasuCoS8Xhb/Gz/miS3dQ5aZbhMIETk3g==} + '@voidzero-dev/vite-plus-linux-x64-gnu@1.6.0': + resolution: {integrity: sha512-de7/qKZN6y7G2OMnsCcmBXeXyS39G4r5uyiz8jRbxbObj2nqxmlNs48aHqOaKzqiJeSqip+z4ALY/AIAl6h4rw==} engines: {node: '>=20.0.0'} cpu: [x64] os: [linux] libc: [glibc] - '@voidzero-dev/vite-plus-linux-x64-musl@1.5.1': - resolution: {integrity: sha512-x0Ch0s+7y1rCKR/22jjrCL8UfaEXSp3tPedwhPk3wG6VE9bREaeiXCDagymMvWp6VuT3QeW1dTpg4/WrIrjaXQ==} + '@voidzero-dev/vite-plus-linux-x64-musl@1.6.0': + resolution: {integrity: sha512-e+/9mDyhBeoDEwNPt4x8ubHztTsQE9kNHI9cBaE0Y+KIQPTxeV2W3OfPHfI5yTlKWtF8r3KN6kIRlXgaFvkBsw==} engines: {node: '>=20.0.0'} cpu: [x64] os: [linux] libc: [musl] - '@voidzero-dev/vite-plus-win32-arm64-msvc@1.5.1': - resolution: {integrity: sha512-VbVBuOxBYuxd1/1zbGmVpw9ey+N81F3v2E2aZc+OpPx8ZEytMb6b08/yKcJky/WA+fWHV5mkBYP4Kz/WZrByRg==} + '@voidzero-dev/vite-plus-win32-arm64-msvc@1.6.0': + resolution: {integrity: sha512-xo4Ha1xDkmWp8LolKUtCsVifenjK3ReQNuJjcMt1PazAdd9QZR/Qn6Z8E3rbFjnWctSkhxR4wTd43z8Bkxb9vA==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [win32] - '@voidzero-dev/vite-plus-win32-x64-msvc@1.5.1': - resolution: {integrity: sha512-GlljpfSCydZXpiC9GGGLpWAyf0ZoUuOdbzYgTjF+DvHW4ntMWxgd7x1WnynFjMtLN2fp6KJ7mzgz9Y2k1uNW2Q==} + '@voidzero-dev/vite-plus-win32-x64-msvc@1.6.0': + resolution: {integrity: sha512-0tC6Bv1FT6Qz9YikQepOibsZa2HE0kxYSIK1jReQh2/3dBUGz2tHib5+G2rQ7ebkHxmwS9gQHAeMmm07XfemSQ==} engines: {node: '>=20.0.0'} cpu: [x64] os: [win32] @@ -1280,8 +1283,8 @@ packages: resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} engines: {node: '>=12.20.0'} - oxfmt@0.76.0: - resolution: {integrity: sha512-Yo9RIn9lRWTm/U8obHbXUWc39lCpEFXlEggFoPx01zS18OCFi7mAwMmL05+p1AunuJgSkONffWyBHJzpMMCRuQ==} + oxfmt@0.78.0: + resolution: {integrity: sha512-uagX+70mKqh/YqxB6ON/lkxVPH6E1Z7pfP2x6XVRPPyiDCZtX6o1xIEeXAIXJ/2wA5ViX4RFuW+IAQn85yJdWg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -1296,12 +1299,12 @@ packages: vite-plus: optional: true - oxlint-tsgolint@7.0.2005: - resolution: {integrity: sha512-6ccPGu4u4J9bwYPHXBFPee3RZrX3BboRdU7k14zRDDB1lvN3O7J/vPRFdaEfa1+CWx4xnQQOp4ctoaF66oO0uw==} + oxlint-tsgolint@7.0.2006: + resolution: {integrity: sha512-5B3UtH71kycPHUC1kFEIffivEAs49SUmkJuHZOZnTY0NPj4legp0bcsCQucuLVNCoJzDucS68P2C4WIhP+LypQ==} hasBin: true - oxlint@1.91.0: - resolution: {integrity: sha512-vjy/cBZcEFcYh3dbxUoQK+bjc+QaY3ZWo86aJkZ5YAwp/HyiqP7dTdNgbvcIVJafhAH5sZbTqBp4sZcicEZngA==} + oxlint@1.93.0: + resolution: {integrity: sha512-19JMsQFX+YvEbcUTFQxjTwhvs0Ibg0D6CFneSLgpwnACWcY/6LjhpGpkPodh0T5aIT1pjMTLlYaeBFzaVgugTA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -1465,8 +1468,8 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - vite-plus@1.5.1: - resolution: {integrity: sha512-Ckl9Vc5fg3BC8SlxPKujSQz+p1CbFy+5++yrFVbwZRdcpHzj0ExaWuNccKdnW128xGU8ECX6RK7n5YPXSHFWpg==} + vite-plus@1.6.0: + resolution: {integrity: sha512-h6aIA80QcAhICBp2Xga8lPM9jOZm2VvPn7Ls531C7RjD9herrT1rPDUMY72IdFf1XyWDmFVEwO+W3EgXtSSMLQ==} engines: {node: ^22.18.0 || ^24.11.0 || >=26.0.0} hasBin: true peerDependencies: @@ -1703,143 +1706,145 @@ snapshots: '@tybys/wasm-util': 0.10.4 optional: true - '@oxc-project/runtime@0.157.0': {} + '@oxc-project/runtime@0.158.0': {} '@oxc-project/types@0.157.0': {} - '@oxfmt/binding-android-arm-eabi@0.76.0': + '@oxc-project/types@0.158.0': {} + + '@oxfmt/binding-android-arm-eabi@0.78.0': optional: true - '@oxfmt/binding-android-arm64@0.76.0': + '@oxfmt/binding-android-arm64@0.78.0': optional: true - '@oxfmt/binding-darwin-arm64@0.76.0': + '@oxfmt/binding-darwin-arm64@0.78.0': optional: true - '@oxfmt/binding-darwin-x64@0.76.0': + '@oxfmt/binding-darwin-x64@0.78.0': optional: true - '@oxfmt/binding-freebsd-x64@0.76.0': + '@oxfmt/binding-freebsd-x64@0.78.0': optional: true - '@oxfmt/binding-linux-arm-gnueabihf@0.76.0': + '@oxfmt/binding-linux-arm-gnueabihf@0.78.0': optional: true - '@oxfmt/binding-linux-arm-musleabihf@0.76.0': + '@oxfmt/binding-linux-arm-musleabihf@0.78.0': optional: true - '@oxfmt/binding-linux-arm64-gnu@0.76.0': + '@oxfmt/binding-linux-arm64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-arm64-musl@0.76.0': + '@oxfmt/binding-linux-arm64-musl@0.78.0': optional: true - '@oxfmt/binding-linux-ppc64-gnu@0.76.0': + '@oxfmt/binding-linux-ppc64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-riscv64-gnu@0.76.0': + '@oxfmt/binding-linux-riscv64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-riscv64-musl@0.76.0': + '@oxfmt/binding-linux-riscv64-musl@0.78.0': optional: true - '@oxfmt/binding-linux-s390x-gnu@0.76.0': + '@oxfmt/binding-linux-s390x-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-x64-gnu@0.76.0': + '@oxfmt/binding-linux-x64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-x64-musl@0.76.0': + '@oxfmt/binding-linux-x64-musl@0.78.0': optional: true - '@oxfmt/binding-openharmony-arm64@0.76.0': + '@oxfmt/binding-openharmony-arm64@0.78.0': optional: true - '@oxfmt/binding-win32-arm64-msvc@0.76.0': + '@oxfmt/binding-win32-arm64-msvc@0.78.0': optional: true - '@oxfmt/binding-win32-ia32-msvc@0.76.0': + '@oxfmt/binding-win32-ia32-msvc@0.78.0': optional: true - '@oxfmt/binding-win32-x64-msvc@0.76.0': + '@oxfmt/binding-win32-x64-msvc@0.78.0': optional: true - '@oxlint-tsgolint/darwin-arm64@7.0.2005': + '@oxlint-tsgolint/darwin-arm64@7.0.2006': optional: true - '@oxlint-tsgolint/darwin-x64@7.0.2005': + '@oxlint-tsgolint/darwin-x64@7.0.2006': optional: true - '@oxlint-tsgolint/linux-arm64@7.0.2005': + '@oxlint-tsgolint/linux-arm64@7.0.2006': optional: true - '@oxlint-tsgolint/linux-x64@7.0.2005': + '@oxlint-tsgolint/linux-x64@7.0.2006': optional: true - '@oxlint-tsgolint/win32-arm64@7.0.2005': + '@oxlint-tsgolint/win32-arm64@7.0.2006': optional: true - '@oxlint-tsgolint/win32-x64@7.0.2005': + '@oxlint-tsgolint/win32-x64@7.0.2006': optional: true - '@oxlint/binding-android-arm-eabi@1.91.0': + '@oxlint/binding-android-arm-eabi@1.93.0': optional: true - '@oxlint/binding-android-arm64@1.91.0': + '@oxlint/binding-android-arm64@1.93.0': optional: true - '@oxlint/binding-darwin-arm64@1.91.0': + '@oxlint/binding-darwin-arm64@1.93.0': optional: true - '@oxlint/binding-darwin-x64@1.91.0': + '@oxlint/binding-darwin-x64@1.93.0': optional: true - '@oxlint/binding-freebsd-x64@1.91.0': + '@oxlint/binding-freebsd-x64@1.93.0': optional: true - '@oxlint/binding-linux-arm-gnueabihf@1.91.0': + '@oxlint/binding-linux-arm-gnueabihf@1.93.0': optional: true - '@oxlint/binding-linux-arm-musleabihf@1.91.0': + '@oxlint/binding-linux-arm-musleabihf@1.93.0': optional: true - '@oxlint/binding-linux-arm64-gnu@1.91.0': + '@oxlint/binding-linux-arm64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-arm64-musl@1.91.0': + '@oxlint/binding-linux-arm64-musl@1.93.0': optional: true - '@oxlint/binding-linux-ppc64-gnu@1.91.0': + '@oxlint/binding-linux-ppc64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-riscv64-gnu@1.91.0': + '@oxlint/binding-linux-riscv64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-riscv64-musl@1.91.0': + '@oxlint/binding-linux-riscv64-musl@1.93.0': optional: true - '@oxlint/binding-linux-s390x-gnu@1.91.0': + '@oxlint/binding-linux-s390x-gnu@1.93.0': optional: true - '@oxlint/binding-linux-x64-gnu@1.91.0': + '@oxlint/binding-linux-x64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-x64-musl@1.91.0': + '@oxlint/binding-linux-x64-musl@1.93.0': optional: true - '@oxlint/binding-openharmony-arm64@1.91.0': + '@oxlint/binding-openharmony-arm64@1.93.0': optional: true - '@oxlint/binding-win32-arm64-msvc@1.91.0': + '@oxlint/binding-win32-arm64-msvc@1.93.0': optional: true - '@oxlint/binding-win32-ia32-msvc@1.91.0': + '@oxlint/binding-win32-ia32-msvc@1.93.0': optional: true - '@oxlint/binding-win32-x64-msvc@1.91.0': + '@oxlint/binding-win32-x64-msvc@1.93.0': optional: true - '@oxlint/plugins@1.91.0': {} + '@oxlint/plugins@1.93.0': {} '@polka/url@1.0.0-next.29': {} @@ -1953,29 +1958,29 @@ snapshots: '@ultime/checks@0.3.0': {} - '@vitest/browser-preview@5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0)': + '@vitest/browser-preview@5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0)': dependencies: '@testing-library/dom': 10.4.2 '@testing-library/user-event': 14.6.8(@testing-library/dom@10.4.2) - '@vitest/browser': 5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) - vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) + '@vitest/browser': 5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) + vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser@5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0)': + '@vitest/browser@5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0)': dependencies: '@blazediff/core': 1.10.0 - '@vitest/mocker': 5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) + '@vitest/mocker': 5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) '@vitest/ui': 5.1.0(vitest@5.1.0) '@vitest/utils': 5.1.0 magic-string: 1.4.5 pngjs: 7.0.0 sirv: 3.0.2 tinyrainbow: 3.2.0 - vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) + vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) ws: 8.22.1 transitivePeerDependencies: - bufferutil @@ -1983,14 +1988,14 @@ snapshots: - utf-8-validate - vite - '@vitest/mocker@5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))': + '@vitest/mocker@5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))': dependencies: '@jridgewell/trace-mapping': 0.3.31 '@vitest/spy': 5.1.0 estree-walker: 3.0.3 magic-string: 1.4.5 optionalDependencies: - vite: '@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' + vite: '@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' '@vitest/pretty-format@5.1.0': dependencies: @@ -2013,7 +2018,7 @@ snapshots: pathe: 2.0.3 sirv: 3.0.2 tinyrainbow: 3.2.0 - vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) + vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) '@vitest/utils@5.1.0': dependencies: @@ -2021,53 +2026,53 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.2.0 - '@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)': + '@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)': dependencies: - '@oxc-project/runtime': 0.157.0 - '@oxc-project/types': 0.157.0 + '@oxc-project/runtime': 0.158.0 + '@oxc-project/types': 0.158.0 lightningcss: 1.33.0 postcss: 8.5.32 yuku-parser: 0.19.0 optionalDependencies: '@arethetypeswrong/core': 0.18.5 '@types/node': 22.20.5 - '@voidzero-dev/vite-plus-darwin-arm64': 1.5.1 - '@voidzero-dev/vite-plus-darwin-x64': 1.5.1 - '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.5.1 - '@voidzero-dev/vite-plus-linux-arm64-musl': 1.5.1 - '@voidzero-dev/vite-plus-linux-x64-gnu': 1.5.1 - '@voidzero-dev/vite-plus-linux-x64-musl': 1.5.1 - '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.5.1 - '@voidzero-dev/vite-plus-win32-x64-msvc': 1.5.1 + '@voidzero-dev/vite-plus-darwin-arm64': 1.6.0 + '@voidzero-dev/vite-plus-darwin-x64': 1.6.0 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.6.0 + '@voidzero-dev/vite-plus-linux-arm64-musl': 1.6.0 + '@voidzero-dev/vite-plus-linux-x64-gnu': 1.6.0 + '@voidzero-dev/vite-plus-linux-x64-musl': 1.6.0 + '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.6.0 + '@voidzero-dev/vite-plus-win32-x64-msvc': 1.6.0 esbuild: 0.28.2 fsevents: 2.3.3 publint: 0.3.25 tsx: 4.23.15 typescript: 5.9.3 - unplugin-unused: 0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1) + unplugin-unused: 0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1) - '@voidzero-dev/vite-plus-darwin-arm64@1.5.1': + '@voidzero-dev/vite-plus-darwin-arm64@1.6.0': optional: true - '@voidzero-dev/vite-plus-darwin-x64@1.5.1': + '@voidzero-dev/vite-plus-darwin-x64@1.6.0': optional: true - '@voidzero-dev/vite-plus-linux-arm64-gnu@1.5.1': + '@voidzero-dev/vite-plus-linux-arm64-gnu@1.6.0': optional: true - '@voidzero-dev/vite-plus-linux-arm64-musl@1.5.1': + '@voidzero-dev/vite-plus-linux-arm64-musl@1.6.0': optional: true - '@voidzero-dev/vite-plus-linux-x64-gnu@1.5.1': + '@voidzero-dev/vite-plus-linux-x64-gnu@1.6.0': optional: true - '@voidzero-dev/vite-plus-linux-x64-musl@1.5.1': + '@voidzero-dev/vite-plus-linux-x64-musl@1.6.0': optional: true - '@voidzero-dev/vite-plus-win32-arm64-msvc@1.5.1': + '@voidzero-dev/vite-plus-win32-arm64-msvc@1.6.0': optional: true - '@voidzero-dev/vite-plus-win32-x64-msvc@1.5.1': + '@voidzero-dev/vite-plus-win32-x64-msvc@1.6.0': optional: true '@yuku-core/binding-android-arm64@0.19.0': @@ -2258,63 +2263,63 @@ snapshots: obug@3.0.0: {} - oxfmt@0.76.0(vite-plus@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1))): + oxfmt@0.78.0(vite-plus@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1))): dependencies: tinypool: 2.2.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.76.0 - '@oxfmt/binding-android-arm64': 0.76.0 - '@oxfmt/binding-darwin-arm64': 0.76.0 - '@oxfmt/binding-darwin-x64': 0.76.0 - '@oxfmt/binding-freebsd-x64': 0.76.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.76.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.76.0 - '@oxfmt/binding-linux-arm64-gnu': 0.76.0 - '@oxfmt/binding-linux-arm64-musl': 0.76.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.76.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.76.0 - '@oxfmt/binding-linux-riscv64-musl': 0.76.0 - '@oxfmt/binding-linux-s390x-gnu': 0.76.0 - '@oxfmt/binding-linux-x64-gnu': 0.76.0 - '@oxfmt/binding-linux-x64-musl': 0.76.0 - '@oxfmt/binding-openharmony-arm64': 0.76.0 - '@oxfmt/binding-win32-arm64-msvc': 0.76.0 - '@oxfmt/binding-win32-ia32-msvc': 0.76.0 - '@oxfmt/binding-win32-x64-msvc': 0.76.0 - vite-plus: 1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1)) - - oxlint-tsgolint@7.0.2005: + '@oxfmt/binding-android-arm-eabi': 0.78.0 + '@oxfmt/binding-android-arm64': 0.78.0 + '@oxfmt/binding-darwin-arm64': 0.78.0 + '@oxfmt/binding-darwin-x64': 0.78.0 + '@oxfmt/binding-freebsd-x64': 0.78.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.78.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.78.0 + '@oxfmt/binding-linux-arm64-gnu': 0.78.0 + '@oxfmt/binding-linux-arm64-musl': 0.78.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.78.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.78.0 + '@oxfmt/binding-linux-riscv64-musl': 0.78.0 + '@oxfmt/binding-linux-s390x-gnu': 0.78.0 + '@oxfmt/binding-linux-x64-gnu': 0.78.0 + '@oxfmt/binding-linux-x64-musl': 0.78.0 + '@oxfmt/binding-openharmony-arm64': 0.78.0 + '@oxfmt/binding-win32-arm64-msvc': 0.78.0 + '@oxfmt/binding-win32-ia32-msvc': 0.78.0 + '@oxfmt/binding-win32-x64-msvc': 0.78.0 + vite-plus: 1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1)) + + oxlint-tsgolint@7.0.2006: optionalDependencies: - '@oxlint-tsgolint/darwin-arm64': 7.0.2005 - '@oxlint-tsgolint/darwin-x64': 7.0.2005 - '@oxlint-tsgolint/linux-arm64': 7.0.2005 - '@oxlint-tsgolint/linux-x64': 7.0.2005 - '@oxlint-tsgolint/win32-arm64': 7.0.2005 - '@oxlint-tsgolint/win32-x64': 7.0.2005 - - oxlint@1.91.0(oxlint-tsgolint@7.0.2005)(vite-plus@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1))): + '@oxlint-tsgolint/darwin-arm64': 7.0.2006 + '@oxlint-tsgolint/darwin-x64': 7.0.2006 + '@oxlint-tsgolint/linux-arm64': 7.0.2006 + '@oxlint-tsgolint/linux-x64': 7.0.2006 + '@oxlint-tsgolint/win32-arm64': 7.0.2006 + '@oxlint-tsgolint/win32-x64': 7.0.2006 + + oxlint@1.93.0(oxlint-tsgolint@7.0.2006)(vite-plus@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1))): optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.91.0 - '@oxlint/binding-android-arm64': 1.91.0 - '@oxlint/binding-darwin-arm64': 1.91.0 - '@oxlint/binding-darwin-x64': 1.91.0 - '@oxlint/binding-freebsd-x64': 1.91.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.91.0 - '@oxlint/binding-linux-arm-musleabihf': 1.91.0 - '@oxlint/binding-linux-arm64-gnu': 1.91.0 - '@oxlint/binding-linux-arm64-musl': 1.91.0 - '@oxlint/binding-linux-ppc64-gnu': 1.91.0 - '@oxlint/binding-linux-riscv64-gnu': 1.91.0 - '@oxlint/binding-linux-riscv64-musl': 1.91.0 - '@oxlint/binding-linux-s390x-gnu': 1.91.0 - '@oxlint/binding-linux-x64-gnu': 1.91.0 - '@oxlint/binding-linux-x64-musl': 1.91.0 - '@oxlint/binding-openharmony-arm64': 1.91.0 - '@oxlint/binding-win32-arm64-msvc': 1.91.0 - '@oxlint/binding-win32-ia32-msvc': 1.91.0 - '@oxlint/binding-win32-x64-msvc': 1.91.0 - oxlint-tsgolint: 7.0.2005 - vite-plus: 1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1)) + '@oxlint/binding-android-arm-eabi': 1.93.0 + '@oxlint/binding-android-arm64': 1.93.0 + '@oxlint/binding-darwin-arm64': 1.93.0 + '@oxlint/binding-darwin-x64': 1.93.0 + '@oxlint/binding-freebsd-x64': 1.93.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.93.0 + '@oxlint/binding-linux-arm-musleabihf': 1.93.0 + '@oxlint/binding-linux-arm64-gnu': 1.93.0 + '@oxlint/binding-linux-arm64-musl': 1.93.0 + '@oxlint/binding-linux-ppc64-gnu': 1.93.0 + '@oxlint/binding-linux-riscv64-gnu': 1.93.0 + '@oxlint/binding-linux-riscv64-musl': 1.93.0 + '@oxlint/binding-linux-s390x-gnu': 1.93.0 + '@oxlint/binding-linux-x64-gnu': 1.93.0 + '@oxlint/binding-linux-x64-musl': 1.93.0 + '@oxlint/binding-openharmony-arm64': 1.93.0 + '@oxlint/binding-win32-arm64-msvc': 1.93.0 + '@oxlint/binding-win32-ia32-msvc': 1.93.0 + '@oxlint/binding-win32-x64-msvc': 1.93.0 + oxlint-tsgolint: 7.0.2006 + vite-plus: 1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1)) package-manager-detector@1.9.0: {} @@ -2421,12 +2426,12 @@ snapshots: undici-types@6.21.0: {} - unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1): + unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1): dependencies: empathic: 2.1.0 escape-string-regexp: 5.0.0 js-tokens: 10.0.0 - unplugin: 3.7.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(esbuild@0.28.2)(rolldown@1.3.1) + unplugin: 3.7.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(esbuild@0.28.2)(rolldown@1.3.1) transitivePeerDependencies: - '@farmfe/core' - '@rsbuild/core' @@ -2439,7 +2444,7 @@ snapshots: - vite - webpack - unplugin@3.7.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(esbuild@0.28.2)(rolldown@1.3.1): + unplugin@3.7.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(esbuild@0.28.2)(rolldown@1.3.1): dependencies: '@jridgewell/remapping': 2.3.5 '@rolldown/pluginutils': 1.1.0 @@ -2448,36 +2453,36 @@ snapshots: optionalDependencies: esbuild: 0.28.2 rolldown: 1.3.1 - vite: '@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' + vite: '@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' validate-npm-package-name@5.0.1: {} - vite-plus@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1)): + vite-plus@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1)): dependencies: - '@oxc-project/runtime': 0.157.0 - '@oxc-project/types': 0.157.0 - '@oxlint/plugins': 1.91.0 - '@vitest/browser': 5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) - '@vitest/browser-preview': 5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) - '@vitest/mocker': 5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) + '@oxc-project/runtime': 0.158.0 + '@oxc-project/types': 0.158.0 + '@oxlint/plugins': 1.93.0 + '@vitest/browser': 5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) + '@vitest/browser-preview': 5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) + '@vitest/mocker': 5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) '@vitest/pretty-format': 5.1.0 '@vitest/snapshot': 5.1.0 '@vitest/spy': 5.1.0 '@vitest/utils': 5.1.0 - oxfmt: 0.76.0(vite-plus@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1))) - oxlint: 1.91.0(oxlint-tsgolint@7.0.2005)(vite-plus@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.5.1)(esbuild@0.28.2)(rolldown@1.3.1))) - oxlint-tsgolint: 7.0.2005 - vite: '@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' - vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) + oxfmt: 0.78.0(vite-plus@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1))) + oxlint: 1.93.0(oxlint-tsgolint@7.0.2006)(vite-plus@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(@vitest/ui@5.1.0)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0(@voidzero-dev/vite-plus-core@1.6.0)(esbuild@0.28.2)(rolldown@1.3.1))) + oxlint-tsgolint: 7.0.2006 + vite: '@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' + vitest: 5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) optionalDependencies: - '@voidzero-dev/vite-plus-darwin-arm64': 1.5.1 - '@voidzero-dev/vite-plus-darwin-x64': 1.5.1 - '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.5.1 - '@voidzero-dev/vite-plus-linux-arm64-musl': 1.5.1 - '@voidzero-dev/vite-plus-linux-x64-gnu': 1.5.1 - '@voidzero-dev/vite-plus-linux-x64-musl': 1.5.1 - '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.5.1 - '@voidzero-dev/vite-plus-win32-x64-msvc': 1.5.1 + '@voidzero-dev/vite-plus-darwin-arm64': 1.6.0 + '@voidzero-dev/vite-plus-darwin-x64': 1.6.0 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.6.0 + '@voidzero-dev/vite-plus-linux-arm64-musl': 1.6.0 + '@voidzero-dev/vite-plus-linux-x64-gnu': 1.6.0 + '@voidzero-dev/vite-plus-linux-x64-musl': 1.6.0 + '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.6.0 + '@voidzero-dev/vite-plus-win32-x64-msvc': 1.6.0 transitivePeerDependencies: - '@arethetypeswrong/core' - '@astrojs/compiler-rs' @@ -2513,10 +2518,10 @@ snapshots: - vue-tsc - yaml - vitest@5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)): + vitest@5.1.0(@types/node@22.20.5)(@vitest/browser-preview@5.1.0)(@vitest/ui@5.1.0)(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)): dependencies: '@types/chai': 5.2.3 - '@vitest/mocker': 5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) + '@vitest/mocker': 5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)) chai: 6.3.0 es-module-lexer: 2.3.2 expect-type: 1.4.0 @@ -2527,11 +2532,11 @@ snapshots: tinybench: 6.2.3 tinyexec: 1.3.1 tinyglobby: 0.2.17 - vite: '@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' + vite: '@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0)' why-is-node-running: 3.2.1 optionalDependencies: '@types/node': 22.20.5 - '@vitest/browser-preview': 5.1.0(@voidzero-dev/vite-plus-core@1.5.1(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) + '@vitest/browser-preview': 5.1.0(@voidzero-dev/vite-plus-core@1.6.0(@arethetypeswrong/core@0.18.5)(@types/node@22.20.5)(esbuild@0.28.2)(publint@0.3.25)(tsx@4.23.15)(typescript@5.9.3)(unplugin-unused@0.6.0))(vitest@5.1.0) '@vitest/ui': 5.1.0(vitest@5.1.0) transitivePeerDependencies: - msw diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 487d59e..036a37e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,16 +2,16 @@ packages: ['.'] allowBuilds: esbuild: true minimumReleaseAgeExclude: - - '@voidzero-dev/vite-plus-core@1.5.1' - - '@voidzero-dev/vite-plus-darwin-arm64@1.5.1' - - '@voidzero-dev/vite-plus-darwin-x64@1.5.1' - - '@voidzero-dev/vite-plus-linux-arm64-gnu@1.5.1' - - '@voidzero-dev/vite-plus-linux-arm64-musl@1.5.1' - - '@voidzero-dev/vite-plus-linux-x64-gnu@1.5.1' - - '@voidzero-dev/vite-plus-linux-x64-musl@1.5.1' - - '@voidzero-dev/vite-plus-win32-arm64-msvc@1.5.1' - - '@voidzero-dev/vite-plus-win32-x64-msvc@1.5.1' - - vite-plus@1.5.1 + - '@voidzero-dev/vite-plus-core@1.6.0' + - '@voidzero-dev/vite-plus-darwin-arm64@1.6.0' + - '@voidzero-dev/vite-plus-darwin-x64@1.6.0' + - '@voidzero-dev/vite-plus-linux-arm64-gnu@1.6.0' + - '@voidzero-dev/vite-plus-linux-arm64-musl@1.6.0' + - '@voidzero-dev/vite-plus-linux-x64-gnu@1.6.0' + - '@voidzero-dev/vite-plus-linux-x64-musl@1.6.0' + - '@voidzero-dev/vite-plus-win32-arm64-msvc@1.6.0' + - '@voidzero-dev/vite-plus-win32-x64-msvc@1.6.0' + - vite-plus@1.6.0 - '@ultime/checks@0.1.1' - '@ultime/checks@0.2.0' - '@ultime/checks@0.3.0' diff --git a/rules/01-architecture.md b/rules/01-architecture.md index ea6a8b9..a432df1 100644 --- a/rules/01-architecture.md +++ b/rules/01-architecture.md @@ -1,7 +1,7 @@ # 01 · 架构与依赖 > 定位:CLI 设施的职责、依赖方向与目录分工。 -> 适用版本:0.2.x +> 适用版本:0.3.x > 关系:规则索引见 [`README`](./README.md);运行协议见 [`02-runner`](./02-runner.md)。 --- @@ -28,10 +28,10 @@ | 路径 | 职责 | |---|---| -| `src/args.ts` | `command` / `--flag` / `--key value` 解析 | +| `src/args.ts` | `command` / `--flag` / `--key value` 解析、`FlagSpec` 与 flag 读取 | | `src/context.ts` | `CliContext` 与进程实现 | -| `src/error.ts` | `CliError` / `toErrorShape` | -| `src/run.ts` | `runCli`:版本 / 帮助 / 未知命令 / 错误转退出码 | +| `src/error.ts` | `CliError` / `toErrorShape` / 退出码常量 | +| `src/run.ts` | `runCli`:版本 / 帮助 / 未知命令 / flags 校验 / 错误转退出码 | | `src/index.ts` | 公共出口 | ## 反例 diff --git a/rules/02-runner.md b/rules/02-runner.md index 52207b8..8c91200 100644 --- a/rules/02-runner.md +++ b/rules/02-runner.md @@ -1,7 +1,7 @@ # 02 · 参数、命令与退出码 > 定位:`runCli` 的稳定协议。 -> 适用版本:0.2.x +> 适用版本:0.3.x > 关系:架构见 [`01-architecture`](./01-architecture.md)。 --- @@ -16,6 +16,24 @@ 保留 flag:`-h/--help`、`-v/--version` 与 `--json`。`--json` 固定按布尔解析,只表达输出形态;其余 flag 原样交给命令解释。 +`--` 终止 flag 解析,之后的 token 全部按 positional 处理。`--key ""` 保留空字符串;以 `-` 开头的值用 `--key=value` 或 `--` 传入。 + +## 声明参数 + +`CommandSpec.flags` 用 `boolean` / `string` 声明命令参数: + +```ts +deploy: { + flags: { 'dry-run': 'boolean', config: 'string' }, + run: async (args, ctx) => 0, +} +``` + +- 声明 `boolean` 的 flag 永不消费下一个 token; +- 声明 `string` 的 flag 取下一个 token,缺值报 `USAGE`; +- 未声明的 flag 在传 schema 时按布尔解析,由 `runCli` 拒绝; +- 同一 flag 的类型必须跨命令一致;命令要么全部声明,要么全部省略。 + ## 命令注册 ```ts @@ -24,11 +42,15 @@ runCli({ version: '0.1.0', usage: 'my-cli ', commands: { - build: { help: 'my-cli build [--check]', run: (args, ctx) => 0 }, + build: { help: 'my-cli build [--check]', flags: { check: 'boolean' }, run: (args, ctx) => 0 }, }, }, argv, ctx) ``` +- `run` 可返回 `number` 或 `Promise`;`runCli` 返回 `Promise`。 +- `help` 可以是字符串,也可以是 `(args) => string`,用于按 positional 生成二级帮助。 +- `mapError` 把领域错误转成 `CliError`;不返回时保持原异常。 + `help` 缺省时生成 ` [options]`。 ## 错误模型 @@ -43,7 +65,7 @@ runCli({ | `details` | 附加诊断数据,原样进入 JSON | | `exitCode` | 默认 2;业务失败可覆盖为 1 | -普通异常没有字段信息,统一成 `{ code: 'ERROR', message }`。 +普通异常没有字段信息,统一成 `{ code: 'ERROR', message }`。`exitCodeOf` 把 `CliError` 的 `exitCode` 或普通异常的 1 统一取出来;`EXIT_OK` / `EXIT_FAIL` / `EXIT_USAGE` 是稳定常量。 ## 退出码 @@ -53,7 +75,7 @@ runCli({ | 命令返回的码 | 原样透传 | | 命令抛普通异常 | 1,`code: 'ERROR'` | | `CliError` | `exitCode`,默认 2 | -| 无命令、未知命令 | 2 | +| 无命令、未知命令、未知参数、布尔参数带值、带值参数缺值 | 2 | - 未知命令先写 `err`(带最近候选),再输出 usage 到 `out`;`--json` 时不写 stdout。 - 命令自己决定业务错误码;本包不定义领域错误。 diff --git a/rules/03-testing.md b/rules/03-testing.md index 9bdf02b..8d890d5 100644 --- a/rules/03-testing.md +++ b/rules/03-testing.md @@ -1,7 +1,7 @@ # 03 · 测试与验收 > 定位:改 CLI 设施时跑什么、什么算通过。 -> 适用版本:0.2.x +> 适用版本:0.3.x > 关系:协议见 [`02-runner`](./02-runner.md);发布检查见 [`04-release`](./04-release.md)。 --- @@ -18,7 +18,10 @@ pnpm test `tests/infra.test.ts` 覆盖: - 参数:命令、布尔 flag、`key=value`、带值 flag; -- 运行时:版本 / 帮助不执行命令;未知命令与异常都转退出码 1;已注册命令能分发。 +- schema:声明布尔 / 字符串、未知 flag、`--` 终止符与空字符串; +- 校验:未知参数、布尔显式值、字符串缺值、混合声明与类型冲突; +- 运行时:版本 / 帮助不执行命令;异步命令与异常;`mapError`;未知命令与异常都转退出码;已注册命令能分发; +- 辅助出口:`flagBool` / `flagValue` / `reportError` / `exitCodeOf` 与退出码常量。 新增 API 或改变退出码语义,必须补正例与失败例。 diff --git a/rules/04-release.md b/rules/04-release.md index 4268ced..5b06506 100644 --- a/rules/04-release.md +++ b/rules/04-release.md @@ -1,7 +1,7 @@ # 04 · 版本与发布 > 定位:CLI 设施的编译 ESM 形态、发布顺序与检查。 -> 适用版本:0.2.x +> 适用版本:0.3.x > 关系:测试见 [`03-testing`](./03-testing.md)。 --- @@ -28,4 +28,5 @@ ## 兼容 - 0.x 阶段 API 仍可能调整;破坏性变更写进 README「版本与兼容」。 +- 0.3 起 `runCli` 为异步;依赖包发布前先确认入口已 `await`。 - 不内置命令;命令归属变化不影响本包 API。 diff --git a/rules/README.md b/rules/README.md index 1bec8cd..93307fb 100644 --- a/rules/README.md +++ b/rules/README.md @@ -1,7 +1,7 @@ # cli · 开发规则 > 定位:本包开发规范的索引。只写判断、边界与反例;API 事实以 README 为准。 -> 适用版本:0.2.x +> 适用版本:0.3.x > owner:维护者(repo owner)· 复核:2026-11-11 · 到期降级为参考 > 关系:入口见 [`AGENTS.md`](../AGENTS.md);怎么用见 [`README.md`](../README.md)。 diff --git a/src/args.ts b/src/args.ts index 60b6fc9..5bf07e6 100644 --- a/src/args.ts +++ b/src/args.ts @@ -1,27 +1,53 @@ /** - * args.ts — 命令行参数解析(纯函数) + * args.ts — 命令行参数解析(纯函数)与 flag 读取 * --------------------------------------------------------------------------- * 只认三种形态:`command`、`--flag`、`--key value` / `--key=value`; * 不引第三方解析库 —— CLI 必须零依赖可跑。 - * `--json` 是通用输出开关,固定按布尔解析,不吞后面的命令名。 + * 传入 `flags` schema 时,声明为布尔的 flag 永不消费下一个 token; + * 未声明的 flag 也按布尔处理,交给上层校验拒绝。 */ +import { CliError } from './error.ts' + export interface ParsedArgs { command: string flags: Record positional: string[] } +export type FlagType = 'boolean' | 'string' + +/** 命令级 flag 声明:布尔不吞值,字符串取下一个 token。 */ +export type FlagSpec = Record + +export interface ParseOptions { + flags?: FlagSpec +} + /** 通用布尔 flag:只表达输出形态,不承载业务语义。 */ -const BOOLEAN_FLAGS = new Set(['json']) +const RESERVED_BOOLEAN = new Set(['help', 'version', 'json']) + +function isBooleanFlag(name: string, spec: FlagSpec | undefined): boolean { + if (RESERVED_BOOLEAN.has(name)) return true + if (!spec) return false + return spec[name] !== 'string' +} -export function parseArgs(argv: string[]): ParsedArgs { +export function parseArgs(argv: string[], options: ParseOptions = {}): ParsedArgs { const flags: Record = {} const positional: string[] = [] + const spec = options.flags let command = '' for (let i = 0; i < argv.length; i += 1) { const token = argv[i] + if (token === '--') { + for (const rest of argv.slice(i + 1)) { + if (!command) command = rest + else positional.push(rest) + } + break + } if (token === '-h' || token === '--help') { flags.help = true continue @@ -37,12 +63,12 @@ export function parseArgs(argv: string[]): ParsedArgs { flags[body.slice(0, equal)] = body.slice(equal + 1) continue } - if (BOOLEAN_FLAGS.has(body)) { + if (isBooleanFlag(body, spec)) { flags[body] = true continue } const next = argv[i + 1] - if (next && !next.startsWith('-')) { + if (next !== undefined && !next.startsWith('-')) { flags[body] = next i += 1 } else { @@ -56,3 +82,21 @@ export function parseArgs(argv: string[]): ParsedArgs { return { command, flags, positional } } + +/** 读带值 flag;被解析成布尔说明缺值,直接报用法错误。 */ +export function flagValue(args: ParsedArgs, name: string): string | undefined { + const value = args.flags[name] + if (value === true) { + throw new CliError(`--${name} 需要一个值`, { + code: 'USAGE', + path: `--${name}`, + hint: `补上 --${name} `, + }) + } + return value +} + +/** 读布尔 flag:只有显式 true 才算开启,字符串值不误判。 */ +export function flagBool(args: ParsedArgs, name: string): boolean { + return args.flags[name] === true +} diff --git a/src/error.ts b/src/error.ts index e35c31a..ae84c94 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,10 +1,14 @@ /** - * error.ts — 机器可读错误 + * error.ts — 机器可读错误与退出码 * --------------------------------------------------------------------------- * 命令抛 `CliError`,`runCli` 统一转成人类文案或 `--json` 结构; * 普通异常没有字段信息,退化成 `code: 'ERROR'`,退出码 1。 */ +export const EXIT_OK = 0 +export const EXIT_FAIL = 1 +export const EXIT_USAGE = 2 + export interface CliErrorOptions { /** 稳定错误码,例如 `USAGE` / `CONFIG`;上层可追加自己的码。 */ code: string @@ -32,7 +36,7 @@ export class CliError extends Error { this.path = options.path this.hint = options.hint this.details = options.details - this.exitCode = options.exitCode ?? 2 + this.exitCode = options.exitCode ?? EXIT_USAGE } } @@ -56,3 +60,8 @@ export function toErrorShape(error: unknown): CliErrorShape { } return { code: 'ERROR', message: error instanceof Error ? error.message : String(error) } } + +/** 统一退出码:CliError 用自身码,其余按命令执行失败。 */ +export function exitCodeOf(error: unknown): number { + return error instanceof CliError ? error.exitCode : EXIT_FAIL +} diff --git a/src/index.ts b/src/index.ts index 04f66ae..335ec4d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,21 @@ -export { parseArgs, type ParsedArgs } from './args.ts' +export { + flagBool, + flagValue, + parseArgs, + type FlagSpec, + type FlagType, + type ParseOptions, + type ParsedArgs, +} from './args.ts' export { processContext, type CliContext } from './context.ts' -export { CliError, toErrorShape, type CliErrorOptions, type CliErrorShape } from './error.ts' -export { runCli, type CommandSpec, type CliSpec } from './run.ts' +export { + CliError, + EXIT_FAIL, + EXIT_OK, + EXIT_USAGE, + exitCodeOf, + toErrorShape, + type CliErrorOptions, + type CliErrorShape, +} from './error.ts' +export { reportError, runCli, type CliSpec, type CommandSpec } from './run.ts' diff --git a/src/run.ts b/src/run.ts index 5daba0e..15a6a75 100644 --- a/src/run.ts +++ b/src/run.ts @@ -1,18 +1,20 @@ /** * run.ts — 命令注册、退出码与错误输出 * --------------------------------------------------------------------------- - * 通用设施:只负责版本 / 帮助 / 未知命令 / 错误转换; + * 通用设施:只负责版本 / 帮助 / 未知命令 / 参数校验 / 错误转换; * 具体命令由调用方注册,cli 包不出现任何领域命令。 */ -import { parseArgs, type ParsedArgs } from './args.ts' +import { parseArgs, type FlagSpec, type ParsedArgs } from './args.ts' import { processContext, type CliContext } from './context.ts' -import { CliError, toErrorShape } from './error.ts' +import { CliError, EXIT_OK, EXIT_USAGE, exitCodeOf, toErrorShape } from './error.ts' export interface CommandSpec { - /** 单条命令的 help;缺省时生成 ` [options]` */ - help?: string - run: (args: ParsedArgs, ctx: CliContext) => number + /** 单条命令的 help;可以是函数,按 positional 生成二级帮助 */ + help?: string | ((args: ParsedArgs) => string) + /** 命令级 flag 声明;声明后未知参数会被拒绝 */ + flags?: FlagSpec + run: (args: ParsedArgs, ctx: CliContext) => number | Promise } export interface CliSpec { @@ -21,11 +23,16 @@ export interface CliSpec { version: string usage: string commands: Record + /** 把领域错误转成 CliError;返回 undefined 表示保持原样 */ + mapError?: (error: unknown) => CliError | undefined } /** 未知命令的候选阈值:太小漏提示,太大乱提示。 */ const SUGGEST_DISTANCE = 2 +/** 全局保留 flag:不属于任何命令,也不需要命令声明。 */ +const RESERVED_FLAGS = new Set(['help', 'version', 'json']) + function distance(left: string, right: string): number { let previous = Array.from({ length: right.length + 1 }, (_, index) => index) @@ -53,7 +60,68 @@ function nearest(input: string, candidates: string[]): string | undefined { return best?.name } -function reportError(ctx: CliContext, error: unknown, json: boolean): void { +/** 只看自有命令,避免 constructor / __proto__ 等原型键被当成已注册命令。 */ +function commandOf(commands: Record, name: string): CommandSpec | undefined { + return Object.hasOwn(commands, name) ? commands[name] : undefined +} + +/** 汇总所有命令的 flag 声明;全部省略时保持旧的自由解析。 */ +function collectFlags(commands: Record): FlagSpec | undefined { + const specs = Object.values(commands).map((command) => command.flags) + const declared = specs.filter((spec): spec is FlagSpec => spec !== undefined) + if (declared.length === 0) return undefined + if (declared.length !== specs.length) { + throw new Error('runCli: commands 的 flags 必须全部声明或全部省略') + } + + const merged: FlagSpec = {} + for (const spec of declared) { + for (const [name, type] of Object.entries(spec)) { + const existing = merged[name] + if (existing && existing !== type) { + throw new Error(`runCli: flag --${name} 在不同命令中的类型不一致(${existing} / ${type})`) + } + merged[name] = type + } + } + return merged +} + +function validateFlags(args: ParsedArgs, command: CommandSpec): void { + const spec = command.flags + if (!spec) return + + for (const [name, value] of Object.entries(args.flags)) { + if (RESERVED_FLAGS.has(name)) continue + const type = spec[name] + if (!type) { + const available = Object.keys(spec) + .map((key) => `--${key}`) + .join(' / ') + throw new CliError(`未知参数:--${name}`, { + code: 'USAGE', + path: `--${name}`, + hint: `该命令可用参数:${available || '无'}`, + }) + } + if (type === 'boolean' && typeof value === 'string') { + throw new CliError(`布尔参数不接受值:--${name}=${value}`, { + code: 'USAGE', + path: `--${name}`, + hint: `只写 --${name}`, + }) + } + if (type === 'string' && value === true) { + throw new CliError(`--${name} 需要一个值`, { + code: 'USAGE', + path: `--${name}`, + hint: `补上 --${name} `, + }) + } + } +} + +export function reportError(ctx: CliContext, error: unknown, json: boolean): void { const shape = toErrorShape(error) if (json) { ctx.err(JSON.stringify({ error: shape })) @@ -65,29 +133,30 @@ function reportError(ctx: CliContext, error: unknown, json: boolean): void { if (shape.hint) ctx.err(` 提示:${shape.hint}`) } -function exitCodeOf(error: unknown): number { - return error instanceof CliError ? error.exitCode : 1 -} - -export function runCli(spec: CliSpec, argv: string[], ctx: CliContext = processContext()): number { - const args = parseArgs(argv) +export async function runCli(spec: CliSpec, argv: string[], ctx: CliContext = processContext()): Promise { + const args = parseArgs(argv, { flags: collectFlags(spec.commands) }) const json = args.flags.json === true if (args.flags.version) { ctx.out(spec.version) - return 0 + return EXIT_OK } if (args.flags.help) { - const command = args.command ? spec.commands[args.command] : undefined - ctx.out(command ? (command.help ?? `${spec.name} ${args.command} [options]`) : spec.usage) - return 0 + const command = args.command ? commandOf(spec.commands, args.command) : undefined + if (!command) { + ctx.out(spec.usage) + return EXIT_OK + } + const help = command.help + ctx.out(typeof help === 'function' ? help(args) : (help ?? `${spec.name} ${args.command} [options]`)) + return EXIT_OK } if (!args.command) { ctx.out(spec.usage) - return 2 + return EXIT_USAGE } - const command = spec.commands[args.command] + const command = commandOf(spec.commands, args.command) if (!command) { const suggestion = nearest(args.command, Object.keys(spec.commands)) reportError( @@ -100,13 +169,15 @@ export function runCli(spec: CliSpec, argv: string[], ctx: CliContext = processC json, ) if (!json) ctx.out(spec.usage) - return 2 + return EXIT_USAGE } try { - return command.run(args, ctx) + validateFlags(args, command) + return await command.run(args, ctx) } catch (error) { - reportError(ctx, error, json) - return exitCodeOf(error) + const mapped = spec.mapError?.(error) ?? error + reportError(ctx, mapped, json) + return exitCodeOf(mapped) } } diff --git a/tests/infra.test.ts b/tests/infra.test.ts index 3d6ff8b..837b593 100644 --- a/tests/infra.test.ts +++ b/tests/infra.test.ts @@ -1,5 +1,19 @@ import { describe, expect, it } from 'vite-plus/test' -import { CliError, parseArgs, runCli, type CliContext, type CliSpec } from '../src/index.ts' +import { + CliError, + EXIT_FAIL, + EXIT_OK, + EXIT_USAGE, + exitCodeOf, + flagBool, + flagValue, + parseArgs, + reportError, + runCli, + type CliContext, + type CliSpec, + type ParsedArgs, +} from '../src/index.ts' function collector() { const out: string[] = [] @@ -42,6 +56,59 @@ const spec: CliSpec = { }, } +class DomainError extends Error { + constructor( + message: string, + readonly code: string, + readonly path: string, + ) { + super(message) + this.name = 'DomainError' + } +} + +const strict: CliSpec = { + name: 'demo', + version: '1.2.3', + usage: 'demo ', + commands: { + deploy: { + help: 'demo deploy [--dry-run] [--config ] [--force]', + flags: { 'dry-run': 'boolean', config: 'string', force: 'boolean' }, + run: (args, ctx) => { + ctx.out(`${args.positional.join(',')}|${flagBool(args, 'dry-run')}|${flagValue(args, 'config') ?? '-'}`) + return EXIT_OK + }, + }, + status: { + flags: {}, + run: () => EXIT_OK, + }, + slow: { + flags: {}, + run: async () => { + await Promise.resolve() + return 7 + }, + }, + boom: { + flags: {}, + run: async () => { + await Promise.resolve() + throw new CliError('部署失败', { code: 'DEPLOY', details: { step: 'upload' } }) + }, + }, + domain: { + flags: {}, + run: () => { + throw new DomainError('目标不存在', 'DF3006', 'hero') + }, + }, + }, + mapError: (error) => + error instanceof DomainError ? new CliError(error.message, { code: error.code, path: error.path }) : undefined, +} + describe('cli · 参数', () => { it('解析命令、布尔 flag、带值 flag 与 key=value', () => { const args = parseArgs(['build', '--check', '--config=foo.json', '--cwd', 'dir']) @@ -74,79 +141,259 @@ describe('cli · 参数', () => { }) }) +describe('cli · 参数 schema', () => { + const flags = { check: 'boolean', config: 'string' } as const + + it('声明为布尔的 flag 不吞后面的 positional', () => { + expect(parseArgs(['remove', '--delete', 'hero'], { flags: { delete: 'boolean' } })).toEqual({ + command: 'remove', + flags: { delete: true }, + positional: ['hero'], + }) + }) + + it('声明为布尔的 flag 不吞后面的命令', () => { + expect(parseArgs(['--check', 'build'], { flags })).toEqual({ + command: 'build', + flags: { check: true }, + positional: [], + }) + }) + + it('声明为字符串的 flag 取值,空字符串也是值', () => { + expect(parseArgs(['run', '--config', 'a.json'], { flags }).flags).toEqual({ config: 'a.json' }) + expect(parseArgs(['run', '--config', ''], { flags }).flags).toEqual({ config: '' }) + }) + + it('schema 下未声明的 flag 不吞后面的值', () => { + expect(parseArgs(['run', '--unknown', 'value'], { flags })).toEqual({ + command: 'run', + flags: { unknown: true }, + positional: ['value'], + }) + }) + + it('-- 之后全部按 positional 处理', () => { + expect(parseArgs(['note', 'hero', '--', '--not-a-flag', '-x'], { flags: { clear: 'boolean' } })).toEqual({ + command: 'note', + flags: {}, + positional: ['hero', '--not-a-flag', '-x'], + }) + expect(parseArgs(['--', 'build'])).toEqual({ command: 'build', flags: {}, positional: [] }) + }) + + it('--key= 与 --key "" 都保留空字符串', () => { + expect(parseArgs(['run', '--title=']).flags).toEqual({ title: '' }) + expect(parseArgs(['run', '--title', '']).flags).toEqual({ title: '' }) + }) +}) + +describe('cli · 声明与校验', () => { + it('布尔 flag 写在 positional 前也能正确分发', async () => { + const { ctx, out } = collector() + expect(await runCli(strict, ['deploy', '--dry-run', 'target', '--config', 'a.json'], ctx)).toBe(EXIT_OK) + expect(out).toEqual(['target|true|a.json']) + }) + + it('未知参数报用法错误,退出码 2', async () => { + const { ctx, err } = collector() + expect(await runCli(strict, ['deploy', '--titel', 'x'], ctx)).toBe(EXIT_USAGE) + expect(err.join('\n')).toContain('未知参数:--titel') + expect(err.join('\n')).toContain('--config') + }) + + it('带值 flag 缺值报用法错误', async () => { + const { ctx, err } = collector() + expect(await runCli(strict, ['deploy', '--config'], ctx)).toBe(EXIT_USAGE) + expect(err.join('\n')).toContain('--config 需要一个值') + }) + + it('布尔 flag 不接受显式值', async () => { + const { ctx, err } = collector() + expect(await runCli(strict, ['deploy', '--dry-run=false'], ctx)).toBe(EXIT_USAGE) + expect(err.join('\n')).toContain('布尔参数不接受值') + }) + + it('空 schema 不接受业务参数,但保留 --json', async () => { + const denied = collector() + expect(await runCli(strict, ['status', '--verbose'], denied.ctx)).toBe(EXIT_USAGE) + expect(denied.err.join('\n')).toContain('未知参数:--verbose') + + const allowed = collector() + expect(await runCli(strict, ['status', '--json'], allowed.ctx)).toBe(EXIT_OK) + }) + + it('命令可以是异步的', async () => { + expect(await runCli(strict, ['slow'], collector().ctx)).toBe(7) + }) + + it('异步异常也走统一错误输出', async () => { + const { ctx, err } = collector() + expect(await runCli(strict, ['boom'], ctx)).toBe(EXIT_USAGE) + expect(err.join('\n')).toContain('✗ 部署失败') + }) + + it('mapError 把领域错误转成 CliError', async () => { + const { ctx, err } = collector() + expect(await runCli(strict, ['--json', 'domain'], ctx)).toBe(EXIT_USAGE) + expect(JSON.parse(err.join('\n'))).toEqual({ error: { code: 'DF3006', message: '目标不存在', path: 'hero' } }) + }) + + it('help 可以是函数,按 positional 给出二级帮助', async () => { + const { ctx, out } = collector() + const nested: CliSpec = { + name: 'demo', + version: '1.2.3', + usage: 'demo ', + commands: { + new: { + flags: {}, + help: (args) => (args.positional[0] === 'page' ? 'new page help' : 'new help'), + run: () => EXIT_OK, + }, + }, + } + expect(await runCli(nested, ['new', 'page', '--help'], ctx)).toBe(EXIT_OK) + expect(out).toEqual(['new page help']) + }) + + it('flags 必须全部声明或全部省略', async () => { + const mixed: CliSpec = { + name: 'demo', + version: '1.2.3', + usage: 'demo ', + commands: { + legacy: { run: () => EXIT_OK }, + strict: { flags: {}, run: () => EXIT_OK }, + }, + } + await expect(runCli(mixed, ['legacy'], collector().ctx)).rejects.toThrow('flags') + }) + + it('同名 flag 类型冲突直接报错', async () => { + const conflict: CliSpec = { + name: 'demo', + version: '1.2.3', + usage: 'demo ', + commands: { + first: { flags: { value: 'boolean' }, run: () => EXIT_OK }, + second: { flags: { value: 'string' }, run: () => EXIT_OK }, + }, + } + await expect(runCli(conflict, ['first'], collector().ctx)).rejects.toThrow('类型不一致') + }) +}) + +describe('cli · 辅助出口', () => { + it('flagBool / flagValue 读值,缺值时抛 CliError', () => { + const args: ParsedArgs = { command: 'run', flags: { check: true, config: 'a.json' }, positional: [] } + expect(flagBool(args, 'check')).toBe(true) + expect(flagBool(args, 'missing')).toBe(false) + expect(flagValue(args, 'config')).toBe('a.json') + expect(flagValue(args, 'missing')).toBeUndefined() + expect(() => flagValue({ ...args, flags: { config: true } }, 'config')).toThrow(CliError) + }) + + it('exitCodeOf / reportError / 退出码常量可直接复用', () => { + const { ctx, err } = collector() + expect(EXIT_OK).toBe(0) + expect(EXIT_FAIL).toBe(1) + expect(EXIT_USAGE).toBe(2) + expect(exitCodeOf(new Error('boom'))).toBe(EXIT_FAIL) + expect(exitCodeOf(new CliError('bad', { code: 'USAGE' }))).toBe(EXIT_USAGE) + + reportError(ctx, new CliError('缺少 --config', { code: 'USAGE', path: '--config', hint: '补上' }), false) + expect(err).toEqual(['✗ 缺少 --config', ' 位置:--config', ' 提示:补上']) + }) +}) + describe('cli · 运行时', () => { - it('版本与全局帮助不执行命令', () => { + it('版本与全局帮助不执行命令', async () => { const { ctx, out } = collector() - expect(runCli(spec, ['--version'], ctx)).toBe(0) - expect(runCli(spec, ['--help'], ctx)).toBe(0) + expect(await runCli(spec, ['--version'], ctx)).toBe(0) + expect(await runCli(spec, ['--help'], ctx)).toBe(0) expect(out).toEqual(['1.2.3', 'demo ']) }) - it('命令帮助优先于全局 usage', () => { + it('命令帮助优先于全局 usage', async () => { const { ctx, out } = collector() - expect(runCli(spec, ['echo', '--help'], ctx)).toBe(0) + expect(await runCli(spec, ['echo', '--help'], ctx)).toBe(0) expect(out).toEqual(['demo echo [--text]']) }) - it('单命令 help 缺省时按命令名生成', () => { + it('单命令 help 缺省时按命令名生成', async () => { const { ctx, out } = collector() - expect(runCli(spec, ['status', '--help'], ctx)).toBe(0) + expect(await runCli(spec, ['status', '--help'], ctx)).toBe(0) expect(out).toEqual(['demo status [options]']) }) - it('无命令返回 2 并输出 usage', () => { + it('无命令返回 2 并输出 usage', async () => { const { ctx, out } = collector() - expect(runCli(spec, [], ctx)).toBe(2) + expect(await runCli(spec, [], ctx)).toBe(2) expect(out).toEqual(['demo ']) }) - it('未知命令返回 2,并给最近候选', () => { + it('未知命令返回 2,并给最近候选', async () => { const { ctx, err, out } = collector() - expect(runCli(spec, ['statsu'], ctx)).toBe(2) + expect(await runCli(spec, ['statsu'], ctx)).toBe(2) expect(err.join('\n')).toContain('未知命令') expect(err.join('\n')).toContain('是否想用 status') expect(out.join('\n')).toContain('demo ') }) - it('未知命令没有候选时列出可用命令', () => { + it('未知命令没有候选时列出可用命令', async () => { const { ctx, err } = collector() - expect(runCli(spec, ['zzzz'], ctx)).toBe(2) + expect(await runCli(spec, ['zzzz'], ctx)).toBe(2) expect(err.join('\n')).toContain('可用命令:ping / echo') }) - it('普通异常返回 1,不误报成用法错误', () => { + it('原型链上的名字按未知命令处理', async () => { + for (const name of ['constructor', '__proto__', 'toString']) { + const { ctx, err } = collector() + expect(await runCli(spec, [name], ctx)).toBe(2) + expect(err.join('\n')).toContain(`未知命令:${name}`) + } + }) + + it('未知命令的帮助不回显成已注册命令', async () => { + const { ctx, out } = collector() + expect(await runCli(spec, ['constructor', '--help'], ctx)).toBe(0) + expect(out).toEqual(['demo ']) + }) + + it('普通异常返回 1,不误报成用法错误', async () => { const failed = collector() - expect(runCli(spec, ['fail'], failed.ctx)).toBe(1) + expect(await runCli(spec, ['fail'], failed.ctx)).toBe(1) expect(failed.err.join('\n')).toContain('boom') const raw = collector() - expect(runCli(spec, ['raw'], raw.ctx)).toBe(1) + expect(await runCli(spec, ['raw'], raw.ctx)).toBe(1) expect(raw.err.join('\n')).toContain('raw failure') }) - it('CliError 带码、位置与提示,默认退出码 2', () => { + it('CliError 带码、位置与提示,默认退出码 2', async () => { const { ctx, err } = collector() - expect(runCli(spec, ['usage'], ctx)).toBe(2) + expect(await runCli(spec, ['usage'], ctx)).toBe(2) expect(err).toEqual(['✗ 缺少 --config', ' 位置:--config', ' 提示:补上 --config ']) }) - it('CliError 可覆盖退出码', () => { + it('CliError 可覆盖退出码', async () => { const { ctx } = collector() - expect(runCli(spec, ['config'], ctx)).toBe(1) + expect(await runCli(spec, ['config'], ctx)).toBe(1) }) - it('--json 输出机器可读错误,失败不写 stdout', () => { + it('--json 输出机器可读错误,失败不写 stdout', async () => { const { ctx, err, out } = collector() - expect(runCli(spec, ['--json', 'config'], ctx)).toBe(1) + expect(await runCli(spec, ['--json', 'config'], ctx)).toBe(1) expect(out).toEqual([]) expect(JSON.parse(err.join('\n'))).toEqual({ error: { code: 'CONFIG', message: '配置文件无法解析', details: { file: 'a.json' } }, }) }) - it('--json 下未知命令也只写 stderr', () => { + it('--json 下未知命令也只写 stderr', async () => { const { ctx, err, out } = collector() - expect(runCli(spec, ['--json', 'statsu'], ctx)).toBe(2) + expect(await runCli(spec, ['--json', 'statsu'], ctx)).toBe(2) expect(out).toEqual([]) expect(JSON.parse(err.join('\n'))).toEqual({ error: { @@ -158,11 +405,11 @@ describe('cli · 运行时', () => { }) }) - it('分发给注册的命令并保留退出码与上下文', () => { + it('分发给注册的命令并保留退出码与上下文', async () => { const { ctx, out } = collector() - expect(runCli(spec, ['ping'], ctx)).toBe(0) - expect(runCli(spec, ['status'], ctx)).toBe(2) - expect(runCli(spec, ['echo', '--text', 'hi'], ctx)).toBe(0) + expect(await runCli(spec, ['ping'], ctx)).toBe(0) + expect(await runCli(spec, ['status'], ctx)).toBe(2) + expect(await runCli(spec, ['echo', '--text', 'hi'], ctx)).toBe(0) expect(out).toEqual(['pong', 'hi@/demo']) }) })