PageSourceSearch

https://orval.dev/assets/cli-Cact31H8.js

js orval.dev collected 2026-10-03 22:58:28 UTC 20,341 bytes, 47 lines download raw bytes

1import{j as i}from"./main-CuaJztxR.js";let r={title:"CLI",description:"命令行接口参考"},a={contents:[{heading:void 0,content:"从 OpenAPI 规范生成类型安全的客户端。"},{heading:"基础用法",content:"默认情况下,Orval 会查找 orval.config.js 文件。"},{heading:"--input--i",content:"你的 OpenAPI 规范的路径或 URL:"},{heading:"--output--o",content:"生成文件的输出路径:"},{heading:"--config--c",content:"Orval 配置文件的路径:"},{heading:"--project--p",content:"聚焦于配置中的特定 project:"},{heading:"--watch--w",content:"监听文件并在变更时重新生成:"},{heading:"--clean",content:"在重新生成之前清理输出目录:"},{heading:"--clean",content:"type: warn"},{heading:"--clean",content:"这会清理所有输出 target 和 schemas 文件夹。"},{heading:"--formatter",content:"使用指定的 formatter(prettier、biome 或 oxfmt)格式化生成文件:"},{heading:"--tsconfig",content:"指定 tsconfig 的路径:"},{heading:"--log-level",content:"设置日志级别。可选值为 error、warn、info、verbose 或 debug。默认值为 info。与 --verbose 和 --quiet 互斥:"},{heading:"--verbose",content:"--log-level verbose 的快捷方式。与 --log-level 和 --quiet 互斥:"},{heading:"--quiet",content:"--log-level warn 的快捷方式。会输出 error 和 warning;info、verbose 和 debug 会被抑制。与 --log-level 和 --verbose 互斥:"},{heading:"--fail-on-warnings",content:"当生成过程中发出 warning 时,以错误码 1 退出。适合在 CI 流水线中强制要求无 warning 构建:"}],headings:[{id:"基础用法",content:"基础用法"},{id:"选项",content:"选项"},{id:"--input--i",content:"--input, -i"},{id:"--output--o",content:"--output, -o"},{id:"--config--c",content:"--config, -c"},{id:"--project--p",content:"--project, -p"},{id:"--watch--w",content:"--watch, -w"},{id:"--clean",content:"--clean"},{id:"--formatter",content:"--formatter"},{id:"--tsconfig",content:"--tsconfig"},{id:"--log-level",content:"--log-level"},{id:"--verbose",content:"--verbose"},{id:"--quiet",content:"--quiet"},{id:"--fail-on-warnings",content:"--fail-on-warnings"}]};const d=[{depth:2,url:"#基础用法",title:i.jsx(i.Fragment,{children:"基础用法"})},{depth:2,url:"#选项",title:i.jsx(i.Fragment,{children:"选项"})},{depth:3,url:"#--input--i",title:i.jsx(i.Fragment,{children:"--input, -i"})},{depth:3,url:"#--output--o",title:i.jsx(i.Fragment,{children:"--output, -o"})},{depth:3,url:"#--config--c",title:i.jsx(i.Fragment,{children:"--config, -c"})},{depth:3,url:"#--project--p",title:i.jsx(i.Fragment,{children:"--project, -p"})},{depth:3,url:"#--watch--w",title:i.jsx(i.Fragment,{children:"--watch, -w"})},{depth:3,url:"#--clean",title:i.jsx(i.Fragment,{children:"--clean"})},{depth:3,url:"#--formatter",title:i.jsx(i.Fragment,{children:"--formatter"})},{depth:3,url:"#--tsconfig",title:i.jsx(i.Fragment,{children:"--tsconfig"})},{depth:3,url:"#--log-level",title:i.jsx(i.Fragment,{children:"--log-level"})},{depth:3,url:"#--verbose",title:i.jsx(i.Fragment,{children:"--verbose"})},{depth:3,url:"#--quiet",title:i.jsx(i.Fragment,{children:"--quiet"})},{depth:3,url:"#--fail-on-warnings",title:i.jsx(i.Fragment,{children:"--fail-on-warnings"})}];function h(s){const e={code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",span:"span",...s.components},{Callout:n}=e;return n||l("Callout"),i.jsxs(i.Fragment,{children:[i.jsx(e.p,{children:"从 OpenAPI 规范生成类型安全的客户端。"}),`
2`,i.jsx(e.h2,{id:"基础用法",children:"基础用法"}),`
3`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsx(e.span,{className:"line",children:i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"})})})})}),`
4`,i.jsxs(e.p,{children:["默认情况下,Orval 会查找 ",i.jsx(e.code,{children:"orval.config.js"})," 文件。"]}
4),`
5`,i.jsx(e.h2,{id:"选项",children:"选项"}),`
6`,i.jsx(e.h3,{id:"--input--i",children:"--input, -i"}),`
7`,i.jsx(e.p,{children:"你的 OpenAPI 规范的路径或 URL:"}),`
8`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --input"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ./petstore.yaml"})]})})})}),`
9`,i.jsx(e.h3,{id:"--output--o",children:"--output, -o"}),`
10`,i.jsx(e.p,{children:"生成文件的输出路径:"}),`
11`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --output"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ./api/endpoints/petstoreFromFileSpec.ts"})]})})})}),`
12`,i.jsx(e.h3,{id:"--config--c",children:"--config, -c"}),`
13`,i.jsx(e.p,{children:"Orval 配置文件的路径:"}),`
14`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --config"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ./api/orval.config.js"})]})})})}),`
15`,i.jsx(e.h3,{id:"--project--p",children:"--project, -p"}),`
16`,i.jsx(e.p,{children:"聚焦于配置中的特定 project:"}),`
17`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsxs(e.code,{children:[i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --project"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" petstore"})]}),`
18`,i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --project"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" dogstore"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" catstore"})]})]})})}),`
19`,i.jsx(e.h3,{id:"--watch--w",children:"--watch, -w"}),`
20`,i.jsx(e.p,{children:"监听文件并在变更时重新生成:"}),`
21`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes g
21ithub-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsxs(e.code,{children:[i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --watch"})]}),`
22`,i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --watch"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ./src"})]})]})})}),`
23`,i.jsx(e.h3,{id:"--clean",children:"--clean"}),`
24`,i.jsx(e.p,{children:"在重新生成之前清理输出目录:"}),`
25`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsxs(e.code,{children:[i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --clean"})]}),`
26`,i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --clean"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ./src"})]})]})})}),`
27`,i.jsx(n,{type:"warn",children:i.jsx(e.p,{children:"这会清理所有输出 target 和 schemas 文件夹。"})}),`
28`,i.jsx(e.h3,{id:"--formatter",children:"--formatter"}),`
29`,i.jsxs(e.p,{children:["使用指定的 formatter(",i.jsx(e.code,{children:"prettier"}),"、",i.jsx(e.code,{children:"biome"})," 或 ",i.jsx(e.code,{children:"oxfmt"}),")格式化生成文件:"]}),`
30`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsxs(e.code,{children:[i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --formatter"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" prettier"})]}),`
31`,i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --formatter"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" biome"})]}),`
32`,i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --formatter"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" oxfmt"})]})]})})}),`
33`,i.jsx(e.h3,{id:"--tsconfig",children:"--tsconfig"}),`
34`,i.jsx(e.p,{children:"指定 tsconfig 的路径:"}),`
35`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes g
35ithub-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --tsconfig"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ./src/tsconfig.json"})]})})})}),`
36`,i.jsx(e.h3,{id:"--log-level",children:"--log-level"}),`
37`,i.jsxs(e.p,{children:["设置日志级别。可选值为 ",i.jsx(e.code,{children:"error"}),"、",i.jsx(e.code,{children:"warn"}),"、",i.jsx(e.code,{children:"info"}),"、",i.jsx(e.code,{children:"verbose"})," 或 ",i.jsx(e.code,{children:"debug"}),"。默认值为 ",i.jsx(e.code,{children:"info"}),"。与 ",i.jsx(e.code,{children:"--verbose"})," 和 ",i.jsx(e.code,{children:"--quiet"})," 互斥:"]}),`
38`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --log-level"}),i.jsx(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" warn"})]})})})}),`
39`,i.jsx(e.h3,{id:"--verbose",children:"--verbose"}),`
40`,i.jsxs(e.p,{children:[i.jsx(e.code,{children:"--log-level verbose"})," 的快捷方式。与 ",i.jsx(e.code,{children:"--log-level"})," 和 ",i.jsx(e.code,{children:"--quiet"})," 互斥:"]}),`
41`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --verbose"})]})})})}),`
42`,i.jsx(e.h3,{id:"--quiet",children:"--quiet"}),`
43`,i.jsxs(e.p,{children:[i.jsx(e.code,{children:"--log-level warn"})," 的快捷方式。会输出 error 和 warning;info、verbose 和 debug 会被抑制。与 ",i.jsx(e.code,{children:"--log-level"})," 和 ",i.jsx(e.code,{children:"--verbose"})," 互斥:"]}),`
44`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes github-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --quiet"})]})})})}),`
45`,i.jsx(e.h3,{id:"--fail-on-warnings",children:"--fail-on-warnings"}),`
46`,i.jsx(e.p,{children:"当生成过程中发出 warning 时,以错误码 1 退出。适合在 CI 流水线中强制要求无 warning 构建:"}),`
47`,i.jsx(i.Fragment,{children:i.jsx(e.pre,{className:"shiki shiki-themes g
47ithub-light github-dark",style:{"--shiki-light":"#24292e","--shiki-dark":"#e1e4e8","--shiki-light-bg":"#fff","--shiki-dark-bg":"#24292e"},tabIndex:"0",icon:'<svg viewBox="0 0 24 24"><path d="m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" fill="currentColor" /></svg>',children:i.jsx(e.code,{children:i.jsxs(e.span,{className:"line",children:[i.jsx(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"orval"}),i.jsx(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --fail-on-warnings"})]})})})})]})}function c(s={}){const{wrapper:e}=s.components||{};return e?i.jsx(e,{...s,children:i.jsx(h,{...s})}):h(s)}function l(s,e){throw new Error("Expected component `"+s+"` to be defined: you likely forgot to import, pass, or provide it.")}export{c as default,r as frontmatter,a as structuredData,d as toc};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.