@moccona/apicodegen 0.1.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,32 @@
1
1
  import { PluginOption } from "vite";
2
-
3
- //#region src/vite-plugin/index.d.ts
4
2
  type ApiCodeGenPluginOptions = {
5
- /** Human-readable name for this API config (required) */name: string; /** OpenAPI spec file path or URL */
6
- spec?: string; /** Output file path */
7
- output?: string; /** HTTP client adaptor */
8
- adaptor?: 'fetch' | 'axios'; /** Base URL for API endpoints */
9
- baseURL?: string; /** Custom client import source path */
10
- importClientSource?: string; /** Enable verbose logging */
11
- verbose?: boolean; /** Run type check after generation (default: true) */
3
+ /** Human-readable name for this API config (required) */
4
+ name: string;
5
+ /** OpenAPI spec file path or URL */
6
+ spec?: string;
7
+ /** Output file path */
8
+ output?: string;
9
+ /** HTTP client adaptor */
10
+ adaptor?: 'fetch' | 'axios';
11
+ /** Non-2xx handling in generated clients (throw|result; default: as-is) */
12
+ errorMode?: 'throw' | 'result';
13
+ /** Split output into one file per tag (default: single file) */
14
+ splitBy?: 'tag';
15
+ /** Keep only operations carrying at least one of these tags */
16
+ includeTags?: string[];
17
+ /** Drop operations carrying any of these tags */
18
+ excludeTags?: string[];
19
+ /** Keep only paths starting with one of these prefixes */
20
+ includePaths?: string[];
21
+ /** Drop paths starting with one of these prefixes */
22
+ excludePaths?: string[];
23
+ /** Base URL for API endpoints */
24
+ baseURL?: string;
25
+ /** Custom client import source path */
26
+ importClientSource?: string;
27
+ /** Enable verbose logging */
28
+ verbose?: boolean;
29
+ /** Run type check after generation (default: true) */
12
30
  typeCheck?: boolean;
13
31
  /**
14
32
  * Enable on-disk caching of generated code (default: true).
@@ -45,6 +63,5 @@ type ApiCodeGenPluginOptions = {
45
63
  * ```
46
64
  */
47
65
  declare function apiCodeGenPlugin(options: ApiCodeGenPluginOptions[]): PluginOption;
48
- //#endregion
49
66
  export { ApiCodeGenPluginOptions, apiCodeGenPlugin, apiCodeGenPlugin as default };
50
67
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/vite-plugin/index.ts"],"mappings":";;;KAiBY,uBAAA;2DAEX,IAAA,UAFkC;EAIlC,IAAA,WAJkC;EAMlC,MAAA,WAFA;EAIA,OAAA;EAEA,OAAA,WAEA;EAAA,kBAAA,WAIA;EAFA,OAAA,YAaA;EAXA,SAAA;EAWQ;AAiOT;;;;EAtOC,KAAA;EAuOA;;;AACc;EAnOd,QAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;iBAiOe,gBAAA,CACf,OAAA,EAAS,uBAAA,KACP,YAAY"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/vite-plugin/index.ts"],"mappings":";KAkBY;;EAEX;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;EAMA;;;;;EAKA;;;;;;;;;;;;;;;;;;;;;;;;iBAkOe,iBACf,SAAS,4BACP"}