@genapi/presets 3.7.0 → 4.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.
Files changed (215) hide show
  1. package/README.md +108 -0
  2. package/dist/_shared/schema/compiler.d.mts +10 -0
  3. package/dist/_shared/schema/compiler.mjs +68 -0
  4. package/dist/_shared/schema/config.d.mts +12 -0
  5. package/dist/_shared/schema/config.mjs +45 -0
  6. package/dist/_shared/schema/index.d.mts +4 -0
  7. package/dist/_shared/schema/index.mjs +5 -0
  8. package/dist/_shared/schema/parser.d.mts +14 -0
  9. package/dist/_shared/schema/parser.mjs +49 -0
  10. package/dist/axios/index.d.mts +8 -8
  11. package/dist/axios/index.mjs +11 -8
  12. package/dist/axios/js/config/index.d.mts +4 -1
  13. package/dist/axios/js/config/index.mjs +18 -1
  14. package/dist/axios/js/index.d.mts +16 -3
  15. package/dist/axios/js/index.mjs +16 -4
  16. package/dist/axios/js/parser/index.d.mts +5 -2
  17. package/dist/axios/js/parser/index.mjs +38 -2
  18. package/dist/axios/ts/config/index.d.mts +4 -1
  19. package/dist/axios/ts/config/index.mjs +20 -1
  20. package/dist/axios/ts/index.d.mts +16 -3
  21. package/dist/axios/ts/index.mjs +16 -4
  22. package/dist/axios/ts/parser/index.d.mts +5 -2
  23. package/dist/axios/ts/parser/index.mjs +37 -2
  24. package/dist/chunk-DQk6qfdC.mjs +18 -0
  25. package/dist/fetch/index.d.mts +9 -8
  26. package/dist/fetch/index.mjs +13 -8
  27. package/dist/fetch/js/config/index.d.mts +4 -1
  28. package/dist/fetch/js/config/index.mjs +12 -1
  29. package/dist/fetch/js/index.d.mts +16 -3
  30. package/dist/fetch/js/index.mjs +16 -4
  31. package/dist/fetch/js/parser/index.d.mts +5 -2
  32. package/dist/fetch/js/parser/index.mjs +52 -2
  33. package/dist/fetch/schema/compiler/index.d.mts +6 -0
  34. package/dist/fetch/schema/compiler/index.mjs +7 -0
  35. package/dist/fetch/schema/config/index.d.mts +6 -0
  36. package/dist/fetch/schema/config/index.mjs +7 -0
  37. package/dist/fetch/schema/index.d.mts +19 -0
  38. package/dist/fetch/schema/index.mjs +18 -0
  39. package/dist/fetch/schema/parser/index.d.mts +2 -0
  40. package/dist/fetch/schema/parser/index.mjs +3 -0
  41. package/dist/fetch/ts/config/index.d.mts +4 -1
  42. package/dist/fetch/ts/config/index.mjs +10 -1
  43. package/dist/fetch/ts/index.d.mts +16 -3
  44. package/dist/fetch/ts/index.mjs +16 -4
  45. package/dist/fetch/ts/parser/index.d.mts +5 -2
  46. package/dist/fetch/ts/parser/index.mjs +47 -2
  47. package/dist/got/index.d.mts +8 -8
  48. package/dist/got/index.mjs +11 -8
  49. package/dist/got/js/config/index.d.mts +4 -1
  50. package/dist/got/js/config/index.mjs +18 -1
  51. package/dist/got/js/index.d.mts +16 -3
  52. package/dist/got/js/index.mjs +16 -4
  53. package/dist/got/js/parser/index.d.mts +5 -2
  54. package/dist/got/js/parser/index.mjs +44 -2
  55. package/dist/got/ts/config/index.d.mts +4 -1
  56. package/dist/got/ts/config/index.mjs +20 -1
  57. package/dist/got/ts/index.d.mts +16 -3
  58. package/dist/got/ts/index.mjs +16 -4
  59. package/dist/got/ts/parser/index.d.mts +5 -2
  60. package/dist/got/ts/parser/index.mjs +44 -2
  61. package/dist/index.d.mts +21 -50
  62. package/dist/index.mjs +15 -43
  63. package/dist/ky/index.d.mts +8 -8
  64. package/dist/ky/index.mjs +11 -8
  65. package/dist/ky/js/config/index.d.mts +4 -1
  66. package/dist/ky/js/config/index.mjs +18 -1
  67. package/dist/ky/js/index.d.mts +16 -3
  68. package/dist/ky/js/index.mjs +16 -4
  69. package/dist/ky/js/parser/index.d.mts +5 -2
  70. package/dist/ky/js/parser/index.mjs +44 -2
  71. package/dist/ky/ts/config/index.d.mts +4 -1
  72. package/dist/ky/ts/config/index.mjs +20 -1
  73. package/dist/ky/ts/index.d.mts +16 -3
  74. package/dist/ky/ts/index.mjs +16 -4
  75. package/dist/ky/ts/parser/index.d.mts +5 -2
  76. package/dist/ky/ts/parser/index.mjs +43 -2
  77. package/dist/ofetch/index.d.mts +9 -8
  78. package/dist/ofetch/index.mjs +13 -8
  79. package/dist/ofetch/js/config/index.d.mts +4 -1
  80. package/dist/ofetch/js/config/index.mjs +18 -1
  81. package/dist/ofetch/js/index.d.mts +16 -3
  82. package/dist/ofetch/js/index.mjs +16 -4
  83. package/dist/ofetch/js/parser/index.d.mts +5 -2
  84. package/dist/ofetch/js/parser/index.mjs +42 -2
  85. package/dist/ofetch/schema/compiler/index.d.mts +6 -0
  86. package/dist/ofetch/schema/compiler/index.mjs +7 -0
  87. package/dist/ofetch/schema/config/index.d.mts +6 -0
  88. package/dist/ofetch/schema/config/index.mjs +10 -0
  89. package/dist/ofetch/schema/index.d.mts +19 -0
  90. package/dist/ofetch/schema/index.mjs +18 -0
  91. package/dist/ofetch/schema/parser/index.d.mts +2 -0
  92. package/dist/ofetch/schema/parser/index.mjs +3 -0
  93. package/dist/ofetch/ts/config/index.d.mts +4 -1
  94. package/dist/ofetch/ts/config/index.mjs +19 -1
  95. package/dist/ofetch/ts/index.d.mts +16 -3
  96. package/dist/ofetch/ts/index.mjs +16 -4
  97. package/dist/ofetch/ts/parser/index.d.mts +5 -2
  98. package/dist/ofetch/ts/parser/index.mjs +41 -2
  99. package/dist/{index.d-Ceqrd7FN.d.mts → tanstack/colada/config/index.d.mts} +2 -3
  100. package/dist/tanstack/colada/config/index.mjs +16 -0
  101. package/dist/tanstack/colada/index.d.mts +18 -0
  102. package/dist/tanstack/colada/index.mjs +17 -0
  103. package/dist/tanstack/colada/parser/index.d.mts +6 -0
  104. package/dist/tanstack/colada/parser/index.mjs +71 -0
  105. package/dist/tanstack/index.d.mts +10 -0
  106. package/dist/tanstack/index.mjs +14 -0
  107. package/dist/{index.d-7vIBcqWp.d.mts → tanstack/react/config/index.d.mts} +2 -3
  108. package/dist/tanstack/react/config/index.mjs +16 -0
  109. package/dist/tanstack/react/index.d.mts +18 -0
  110. package/dist/tanstack/react/index.mjs +17 -0
  111. package/dist/tanstack/react/parser/index.d.mts +6 -0
  112. package/dist/tanstack/react/parser/index.mjs +75 -0
  113. package/dist/{index.d-C5ya5SE3.d.mts → tanstack/vue/config/index.d.mts} +2 -3
  114. package/dist/tanstack/vue/config/index.mjs +16 -0
  115. package/dist/tanstack/vue/index.d.mts +18 -0
  116. package/dist/tanstack/vue/index.mjs +17 -0
  117. package/dist/tanstack/vue/parser/index.d.mts +6 -0
  118. package/dist/tanstack/vue/parser/index.mjs +71 -0
  119. package/dist/uni/index.d.mts +8 -8
  120. package/dist/uni/index.mjs +11 -8
  121. package/dist/uni/js/config/index.d.mts +4 -1
  122. package/dist/uni/js/config/index.mjs +18 -1
  123. package/dist/uni/js/index.d.mts +16 -3
  124. package/dist/uni/js/index.mjs +16 -4
  125. package/dist/uni/js/parser/index.d.mts +5 -2
  126. package/dist/uni/js/parser/index.mjs +38 -2
  127. package/dist/uni/ts/config/index.d.mts +4 -1
  128. package/dist/uni/ts/config/index.mjs +20 -1
  129. package/dist/uni/ts/index.d.mts +16 -3
  130. package/dist/uni/ts/index.mjs +16 -4
  131. package/dist/uni/ts/parser/index.d.mts +5 -2
  132. package/dist/uni/ts/parser/index.mjs +37 -2
  133. package/package.json +26 -6
  134. package/dist/axios-C--VNFKW.mjs +0 -13
  135. package/dist/chunk-BL35Yyzp.mjs +0 -12
  136. package/dist/config-B89EoGE7.mjs +0 -21
  137. package/dist/config-BGwXcXx1.mjs +0 -21
  138. package/dist/config-BHBub1xl.mjs +0 -12
  139. package/dist/config-BJZnXcL3.mjs +0 -14
  140. package/dist/config-C94x0Nge.mjs +0 -21
  141. package/dist/config-CEngTpXa.mjs +0 -21
  142. package/dist/config-CwmGeydd.mjs +0 -19
  143. package/dist/config-DdUVYIe0.mjs +0 -19
  144. package/dist/config-DgC2f2AO.mjs +0 -19
  145. package/dist/config-Dm0OCPw8.mjs +0 -19
  146. package/dist/config-Dn-mxTew.mjs +0 -19
  147. package/dist/config-aVU8JEKy.mjs +0 -21
  148. package/dist/fetch-TYDXDaTS.mjs +0 -13
  149. package/dist/got-D5A7dJdZ.mjs +0 -13
  150. package/dist/index.d-1kS19nJx.d.mts +0 -18
  151. package/dist/index.d-1qaowKKm.d.mts +0 -18
  152. package/dist/index.d-42t92mX0.d.mts +0 -7
  153. package/dist/index.d-B0xaEiBX.d.mts +0 -18
  154. package/dist/index.d-B1m7PaBv.d.mts +0 -14
  155. package/dist/index.d-B6j2V4Az.d.mts +0 -18
  156. package/dist/index.d-BCWDJjEV.d.mts +0 -7
  157. package/dist/index.d-BN2_wiGD.d.mts +0 -18
  158. package/dist/index.d-BNkgVflG.d.mts +0 -14
  159. package/dist/index.d-BY4lF6QY.d.mts +0 -7
  160. package/dist/index.d-BxDzXRov.d.mts +0 -12
  161. package/dist/index.d-BxQraJfG.d.mts +0 -18
  162. package/dist/index.d-Bxgqqjp3.d.mts +0 -7
  163. package/dist/index.d-C0EKSJ26.d.mts +0 -7
  164. package/dist/index.d-C6gpVbqC.d.mts +0 -12
  165. package/dist/index.d-CFvCqVRj.d.mts +0 -7
  166. package/dist/index.d-CJ27pjS6.d.mts +0 -7
  167. package/dist/index.d-CM3KHaZM.d.mts +0 -12
  168. package/dist/index.d-CTkBXgsL.d.mts +0 -7
  169. package/dist/index.d-CXNw0ZkA.d.mts +0 -14
  170. package/dist/index.d-C_cfONoz.d.mts +0 -14
  171. package/dist/index.d-Cgflcv1m.d.mts +0 -18
  172. package/dist/index.d-CmW7DwIV.d.mts +0 -18
  173. package/dist/index.d-DDTGaUmA.d.mts +0 -14
  174. package/dist/index.d-DHMHzs8Q.d.mts +0 -14
  175. package/dist/index.d-DJv4EMYu.d.mts +0 -7
  176. package/dist/index.d-DOPIfZ0r.d.mts +0 -12
  177. package/dist/index.d-Dd6ZDpp9.d.mts +0 -12
  178. package/dist/index.d-DgbGF4C3.d.mts +0 -12
  179. package/dist/index.d-DmOkv7N9.d.mts +0 -18
  180. package/dist/index.d-DpQbWiOh.d.mts +0 -14
  181. package/dist/index.d-Dvtsr9g-.d.mts +0 -14
  182. package/dist/index.d-LlaJb0pD.d.mts +0 -18
  183. package/dist/index.d-RZUAACu-.d.mts +0 -14
  184. package/dist/index.d-SxIr6Uhl.d.mts +0 -18
  185. package/dist/index.d-TD1X3MeU.d.mts +0 -14
  186. package/dist/index.d-mJ3Pcxey.d.mts +0 -14
  187. package/dist/index.d-mXlHJ3vm.d.mts +0 -18
  188. package/dist/index.d-xPgxVw9l.d.mts +0 -14
  189. package/dist/js-BHy43BOA.mjs +0 -19
  190. package/dist/js-CsFu-S2j.mjs +0 -19
  191. package/dist/js-SMul0x9Q.mjs +0 -19
  192. package/dist/js-Swp-o6ZG.mjs +0 -19
  193. package/dist/js-jTe7QP2M.mjs +0 -19
  194. package/dist/js-rCsJDgHU.mjs +0 -19
  195. package/dist/ky--lXnn0gU.mjs +0 -13
  196. package/dist/ofetch-qhtvI1gy.mjs +0 -13
  197. package/dist/parser-820U-7tY.mjs +0 -79
  198. package/dist/parser-BEbsKXRG.mjs +0 -74
  199. package/dist/parser-BMWMb1tW.mjs +0 -65
  200. package/dist/parser-BMaYANAS.mjs +0 -70
  201. package/dist/parser-BOXlubkg.mjs +0 -64
  202. package/dist/parser-B_pvME5o.mjs +0 -71
  203. package/dist/parser-By1vGa1J.mjs +0 -65
  204. package/dist/parser-C267rNUI.mjs +0 -71
  205. package/dist/parser-CFUtEOtZ.mjs +0 -69
  206. package/dist/parser-CedZCyxl.mjs +0 -68
  207. package/dist/parser-OUoEsF2d.mjs +0 -64
  208. package/dist/parser-kk99DwsW.mjs +0 -71
  209. package/dist/ts-B-VDMOmJ.mjs +0 -19
  210. package/dist/ts-CBFVpM-p.mjs +0 -19
  211. package/dist/ts-CBWxAza5.mjs +0 -19
  212. package/dist/ts-CKsdt6vA.mjs +0 -19
  213. package/dist/ts-Cnuezdyy.mjs +0 -19
  214. package/dist/ts-ILF3D-J-.mjs +0 -19
  215. package/dist/uni-CQMaFViG.mjs +0 -13
@@ -1,18 +0,0 @@
1
- import { parser$19 as parser } from "./index.d-Dvtsr9g-.mjs";
2
- import { config$15 as config } from "./index.d-Ceqrd7FN.mjs";
3
- import { compiler, compiler as compiler$1, dest, dest as dest$1, generate, generate as generate$1, original, original as original$1 } from "@genapi/pipeline";
4
- import { ApiPipeline } from "@genapi/shared";
5
-
6
- //#region src/ky/ts/index.d.ts
7
- declare function openapiPipeline(userConfig: ApiPipeline.Config): Promise<void>;
8
- declare namespace openapiPipeline {
9
- var config: typeof config;
10
- var original: typeof original;
11
- var parser: typeof parser;
12
- var compiler: typeof compiler;
13
- var generate: typeof generate;
14
- var dest: typeof dest;
15
- }
16
-
17
- //#endregion
18
- export { compiler$1 as compiler$23, dest$1 as dest$23, generate$1 as generate$23, openapiPipeline as openapiPipeline$11, original$1 as original$23 };
@@ -1,14 +0,0 @@
1
- import { ApiPipeline, StatementFunction, StatementInterface } from "@genapi/shared";
2
- import { Paths } from "openapi-specification-types";
3
-
4
- //#region src/got/ts/parser/index.d.ts
5
- interface PathsTransformOptions {
6
- configRead: ApiPipeline.ConfigRead;
7
- interfaces: StatementInterface[];
8
- functions: StatementFunction[];
9
- }
10
- declare function parser(configRead: ApiPipeline.ConfigRead): ApiPipeline.ConfigRead<ApiPipeline.Config>;
11
- declare function transformPaths(paths: Paths): void;
12
-
13
- //#endregion
14
- export { PathsTransformOptions as PathsTransformOptions$3, parser as parser$15, transformPaths as transformPaths$15 };
@@ -1,14 +0,0 @@
1
- import { ApiPipeline, StatementFunction, StatementInterface } from "@genapi/shared";
2
- import { Paths } from "openapi-specification-types";
3
-
4
- //#region src/fetch/ts/parser/index.d.ts
5
- interface PathsTransformOptions {
6
- configRead: ApiPipeline.ConfigRead;
7
- interfaces: StatementInterface[];
8
- functions: StatementFunction[];
9
- }
10
- declare function parser(configRead: ApiPipeline.ConfigRead): ApiPipeline.ConfigRead<ApiPipeline.Config>;
11
- declare function transformPaths(paths: Paths): void;
12
-
13
- //#endregion
14
- export { PathsTransformOptions as PathsTransformOptions$5, parser as parser$17, transformPaths as transformPaths$17 };
@@ -1,18 +0,0 @@
1
- import { parser$21 as parser } from "./index.d-xPgxVw9l.mjs";
2
- import { config$23 as config } from "./index.d-C5ya5SE3.mjs";
3
- import { compiler, compiler as compiler$1, dest, dest as dest$1, generate, generate as generate$1, original, original as original$1 } from "@genapi/pipeline";
4
- import { ApiPipeline } from "@genapi/shared";
5
-
6
- //#region src/uni/js/index.d.ts
7
- declare function openapiPipeline(userConfig: ApiPipeline.Config): Promise<void>;
8
- declare namespace openapiPipeline {
9
- var config: typeof config;
10
- var original: typeof original;
11
- var parser: typeof parser;
12
- var compiler: typeof compiler;
13
- var generate: typeof generate;
14
- var dest: typeof dest;
15
- }
16
-
17
- //#endregion
18
- export { compiler$1 as compiler$18, dest$1 as dest$18, generate$1 as generate$18, openapiPipeline as openapiPipeline$6, original$1 as original$18 };
@@ -1,14 +0,0 @@
1
- import { ApiPipeline, StatementFunction, StatementInterface } from "@genapi/shared";
2
- import { Paths } from "openapi-specification-types";
3
-
4
- //#region src/uni/js/parser/index.d.ts
5
- interface PathsTransformOptions {
6
- configRead: ApiPipeline.ConfigRead;
7
- interfaces: StatementInterface[];
8
- functions: StatementFunction[];
9
- }
10
- declare function parser(configRead: ApiPipeline.ConfigRead): ApiPipeline.ConfigRead<ApiPipeline.Config>;
11
- declare function transformPaths(paths: Paths): void;
12
-
13
- //#endregion
14
- export { PathsTransformOptions as PathsTransformOptions$9, parser as parser$21, transformPaths as transformPaths$21 };
@@ -1,19 +0,0 @@
1
- import { config$6 as config } from "./config-DdUVYIe0.mjs";
2
- import { parser$6 as parser } from "./parser-B_pvME5o.mjs";
3
- import pipeline, { compiler as compiler$1, dest as dest$1, generate as generate$1, original as original$1 } from "@genapi/pipeline";
4
-
5
- //#region src/ky/js/index.ts
6
- function openapiPipeline(userConfig) {
7
- const process = pipeline((userConfig$1) => config(userConfig$1), (configRead) => original$1(configRead), (configRead) => parser(configRead), (configRead) => compiler$1(configRead), (configRead) => generate$1(configRead), (configRead) => dest$1(configRead));
8
- return process(userConfig);
9
- }
10
- openapiPipeline.config = config;
11
- openapiPipeline.original = original$1;
12
- openapiPipeline.parser = parser;
13
- openapiPipeline.compiler = compiler$1;
14
- openapiPipeline.generate = generate$1;
15
- openapiPipeline.dest = dest$1;
16
- var js_default = openapiPipeline;
17
-
18
- //#endregion
19
- export { compiler$1 as compiler$6, dest$1 as dest$6, generate$1 as generate$6, js_default as js_default$3, original$1 as original$6 };
@@ -1,19 +0,0 @@
1
- import { config$4 as config } from "./config-DgC2f2AO.mjs";
2
- import { parser$4 as parser } from "./parser-C267rNUI.mjs";
3
- import pipeline, { compiler as compiler$1, dest as dest$1, generate as generate$1, original as original$1 } from "@genapi/pipeline";
4
-
5
- //#region src/got/js/index.ts
6
- function openapiPipeline(userConfig) {
7
- const process = pipeline((userConfig$1) => config(userConfig$1), (configRead) => original$1(configRead), (configRead) => parser(configRead), (configRead) => compiler$1(configRead), (configRead) => generate$1(configRead), (configRead) => dest$1(configRead));
8
- return process(userConfig);
9
- }
10
- openapiPipeline.config = config;
11
- openapiPipeline.original = original$1;
12
- openapiPipeline.parser = parser;
13
- openapiPipeline.compiler = compiler$1;
14
- openapiPipeline.generate = generate$1;
15
- openapiPipeline.dest = dest$1;
16
- var js_default = openapiPipeline;
17
-
18
- //#endregion
19
- export { compiler$1 as compiler$4, dest$1 as dest$4, generate$1 as generate$4, js_default as js_default$2, original$1 as original$4 };
@@ -1,19 +0,0 @@
1
- import { config } from "./config-CwmGeydd.mjs";
2
- import { parser } from "./parser-By1vGa1J.mjs";
3
- import pipeline, { compiler as compiler$1, dest as dest$1, generate as generate$1, original as original$1 } from "@genapi/pipeline";
4
-
5
- //#region src/axios/js/index.ts
6
- function openapiPipeline(userConfig) {
7
- const process = pipeline((userConfig$1) => config(userConfig$1), (configRead) => original$1(configRead), (configRead) => parser(configRead), (configRead) => compiler$1(configRead), (configRead) => generate$1(configRead), (configRead) => dest$1(configRead));
8
- return process(userConfig);
9
- }
10
- openapiPipeline.config = config;
11
- openapiPipeline.original = original$1;
12
- openapiPipeline.parser = parser;
13
- openapiPipeline.compiler = compiler$1;
14
- openapiPipeline.generate = generate$1;
15
- openapiPipeline.dest = dest$1;
16
- var js_default = openapiPipeline;
17
-
18
- //#endregion
19
- export { compiler$1 as compiler, dest$1 as dest, generate$1 as generate, js_default, original$1 as original };
@@ -1,19 +0,0 @@
1
- import { config$8 as config } from "./config-Dm0OCPw8.mjs";
2
- import { parser$8 as parser } from "./parser-CFUtEOtZ.mjs";
3
- import pipeline, { compiler as compiler$1, dest as dest$1, generate as generate$1, original as original$1 } from "@genapi/pipeline";
4
-
5
- //#region src/ofetch/js/index.ts
6
- function openapiPipeline(userConfig) {
7
- const process = pipeline((userConfig$1) => config(userConfig$1), (configRead) => original$1(configRead), (configRead) => parser(configRead), (configRead) => compiler$1(configRead), (configRead) => generate$1(configRead), (configRead) => dest$1(configRead));
8
- return process(userConfig);
9
- }
10
- openapiPipeline.config = config;
11
- openapiPipeline.original = original$1;
12
- openapiPipeline.parser = parser;
13
- openapiPipeline.compiler = compiler$1;
14
- openapiPipeline.generate = generate$1;
15
- openapiPipeline.dest = dest$1;
16
- var js_default = openapiPipeline;
17
-
18
- //#endregion
19
- export { compiler$1 as compiler$8, dest$1 as dest$8, generate$1 as generate$8, js_default as js_default$4, original$1 as original$8 };
@@ -1,19 +0,0 @@
1
- import { config$2 as config } from "./config-BJZnXcL3.mjs";
2
- import { parser$2 as parser } from "./parser-820U-7tY.mjs";
3
- import pipeline, { compiler as compiler$1, dest as dest$1, generate as generate$1, original as original$1 } from "@genapi/pipeline";
4
-
5
- //#region src/fetch/js/index.ts
6
- function openapiPipeline(userConfig) {
7
- const process = pipeline((userConfig$1) => config(userConfig$1), (configRead) => original$1(configRead), (configRead) => parser(configRead), (configRead) => compiler$1(configRead), (configRead) => generate$1(configRead), (configRead) => dest$1(configRead));
8
- return process(userConfig);
9
- }
10
- openapiPipeline.config = config;
11
- openapiPipeline.original = original$1;
12
- openapiPipeline.parser = parser;
13
- openapiPipeline.compiler = compiler$1;
14
- openapiPipeline.generate = generate$1;
15
- openapiPipeline.dest = dest$1;
16
- var js_default = openapiPipeline;
17
-
18
- //#endregion
19
- export { compiler$1 as compiler$2, dest$1 as dest$2, generate$1 as generate$2, js_default as js_default$1, original$1 as original$2 };
@@ -1,19 +0,0 @@
1
- import { config$10 as config } from "./config-Dn-mxTew.mjs";
2
- import { parser$10 as parser } from "./parser-BMWMb1tW.mjs";
3
- import pipeline, { compiler as compiler$1, dest as dest$1, generate as generate$1, original as original$1 } from "@genapi/pipeline";
4
-
5
- //#region src/uni/js/index.ts
6
- function openapiPipeline(userConfig) {
7
- const process = pipeline((userConfig$1) => config(userConfig$1), (configRead) => original$1(configRead), (configRead) => parser(configRead), (configRead) => compiler$1(configRead), (configRead) => generate$1(configRead), (configRead) => dest$1(configRead));
8
- return process(userConfig);
9
- }
10
- openapiPipeline.config = config;
11
- openapiPipeline.original = original$1;
12
- openapiPipeline.parser = parser;
13
- openapiPipeline.compiler = compiler$1;
14
- openapiPipeline.generate = generate$1;
15
- openapiPipeline.dest = dest$1;
16
- var js_default = openapiPipeline;
17
-
18
- //#endregion
19
- export { compiler$1 as compiler$10, dest$1 as dest$10, generate$1 as generate$10, js_default as js_default$5, original$1 as original$10 };
@@ -1,13 +0,0 @@
1
- import { __export } from "./chunk-BL35Yyzp.mjs";
2
- import { js_default$3 as js_default } from "./js-BHy43BOA.mjs";
3
- import { ts_default$3 as ts_default } from "./ts-ILF3D-J-.mjs";
4
-
5
- //#region src/ky/index.ts
6
- var ky_exports = {};
7
- __export(ky_exports, {
8
- js: () => js_default,
9
- ts: () => ts_default
10
- });
11
-
12
- //#endregion
13
- export { ky_exports };
@@ -1,13 +0,0 @@
1
- import { __export } from "./chunk-BL35Yyzp.mjs";
2
- import { js_default$4 as js_default } from "./js-Swp-o6ZG.mjs";
3
- import { ts_default$4 as ts_default } from "./ts-CKsdt6vA.mjs";
4
-
5
- //#region src/ofetch/index.ts
6
- var ofetch_exports = {};
7
- __export(ofetch_exports, {
8
- js: () => js_default,
9
- ts: () => ts_default
10
- });
11
-
12
- //#endregion
13
- export { ofetch_exports };
@@ -1,79 +0,0 @@
1
- import { literalFieldsToString, parseHeaderCommits, parseMethodMetadata, parseMethodParameters, parseOpenapiSpecification, transformBaseURL, transformBodyStringify, transformDefinitions, transformHeaderOptions, transformParameters, transformQueryParams, transformUrlSyntax, traversePaths } from "@genapi/parser";
2
- import { inject, provide } from "@genapi/shared";
3
-
4
- //#region src/fetch/js/parser/index.ts
5
- function parser(configRead) {
6
- const source = parseOpenapiSpecification(configRead.source);
7
- const comments = parseHeaderCommits(source);
8
- const interfaces = [];
9
- const functions = [];
10
- provide({
11
- interfaces,
12
- functions
13
- });
14
- transformBaseURL(source);
15
- transformDefinitions(source.definitions);
16
- transformPaths(source.paths);
17
- configRead.graphs.comments = comments;
18
- configRead.graphs.functions = functions;
19
- configRead.graphs.interfaces = interfaces;
20
- return configRead;
21
- }
22
- function transformPaths(paths) {
23
- const { configRead, functions, interfaces } = inject();
24
- traversePaths(paths, (config) => {
25
- /**
26
-
27
- * function params/function options/function use interfaces
28
-
29
- */
30
- const { parameters, interfaces: attachInters, options } = parseMethodParameters(config, { formData: "body" });
31
- let { name, description, url, responseType, body } = parseMethodMetadata(config);
32
- interfaces.push(...attachInters);
33
- parameters.push({
34
- name: "config",
35
- type: "RequestInit",
36
- required: false
37
- });
38
- if (config.method.toLowerCase() !== "get") options.unshift(["method", `"${config.method}"`]);
39
- transformHeaderOptions("body", {
40
- options,
41
- parameters
42
- });
43
- options.push(["...", "config"]);
44
- transformParameters(parameters, {
45
- syntax: "ecmascript",
46
- configRead,
47
- description,
48
- interfaces,
49
- responseType
50
- });
51
- transformBodyStringify("body", {
52
- options,
53
- parameters
54
- });
55
- url = transformQueryParams("query", {
56
- body,
57
- options,
58
- url
59
- });
60
- url = transformUrlSyntax(url, { baseURL: configRead.config.baseURL });
61
- functions.push({
62
- export: true,
63
- async: true,
64
- name,
65
- description,
66
- parameters,
67
- body: [
68
- ...body,
69
- `const response = await fetch(${url}, {
70
- ${literalFieldsToString(options)}
71
- })`,
72
- "return response.json()"
73
- ]
74
- });
75
- });
76
- }
77
-
78
- //#endregion
79
- export { parser as parser$2, transformPaths as transformPaths$2 };
@@ -1,74 +0,0 @@
1
- import { parseHeaderCommits, parseMethodMetadata, parseMethodParameters, parseOpenapiSpecification, transformBaseURL, transformBodyStringify, transformDefinitions, transformFetchBody, transformHeaderOptions, transformParameters, transformQueryParams, transformUrlSyntax, traversePaths } from "@genapi/parser";
2
- import { inject, provide } from "@genapi/shared";
3
-
4
- //#region src/fetch/ts/parser/index.ts
5
- function parser(configRead) {
6
- const source = parseOpenapiSpecification(configRead.source);
7
- const comments = parseHeaderCommits(source);
8
- const interfaces = [];
9
- const functions = [];
10
- provide({
11
- interfaces,
12
- functions
13
- });
14
- transformBaseURL(source);
15
- transformDefinitions(source.definitions);
16
- transformPaths(source.paths);
17
- configRead.graphs.comments = comments;
18
- configRead.graphs.functions = functions;
19
- configRead.graphs.interfaces = interfaces;
20
- return configRead;
21
- }
22
- function transformPaths(paths) {
23
- const { configRead, functions, interfaces } = inject();
24
- traversePaths(paths, (config) => {
25
- /**
26
-
27
- * function params/function options/function use interfaces
28
-
29
- */
30
- const { parameters, interfaces: attachInters, options } = parseMethodParameters(config);
31
- let { name, description, url, responseType, body } = parseMethodMetadata(config);
32
- interfaces.push(...attachInters);
33
- parameters.push({
34
- name: "config",
35
- type: "RequestInit",
36
- required: false
37
- });
38
- if (config.method.toLowerCase() !== "get") options.unshift(["method", `"${config.method}"`]);
39
- transformHeaderOptions("body", {
40
- options,
41
- parameters
42
- });
43
- options.push(["...", "config"]);
44
- const { spaceResponseType } = transformParameters(parameters, {
45
- syntax: "typescript",
46
- configRead,
47
- description,
48
- interfaces,
49
- responseType
50
- });
51
- transformBodyStringify("body", {
52
- options,
53
- parameters
54
- });
55
- url = transformQueryParams("query", {
56
- body,
57
- options,
58
- url
59
- });
60
- url = transformUrlSyntax(url, { baseURL: configRead.config.baseURL });
61
- const fetch = transformFetchBody(url, options, spaceResponseType);
62
- functions.push({
63
- export: true,
64
- async: true,
65
- name,
66
- description,
67
- parameters,
68
- body: [...body, ...fetch]
69
- });
70
- });
71
- }
72
-
73
- //#endregion
74
- export { parser as parser$3, transformPaths as transformPaths$3 };
@@ -1,65 +0,0 @@
1
- import { literalFieldsToString, parseHeaderCommits, parseMethodMetadata, parseMethodParameters, parseOpenapiSpecification, transformBaseURL, transformDefinitions, transformParameters, transformUrlSyntax, traversePaths } from "@genapi/parser";
2
- import { inject, provide } from "@genapi/shared";
3
-
4
- //#region src/uni/js/parser/index.ts
5
- function parser(configRead) {
6
- const source = parseOpenapiSpecification(configRead.source);
7
- const comments = parseHeaderCommits(source);
8
- const interfaces = [];
9
- const functions = [];
10
- provide({
11
- interfaces,
12
- functions
13
- });
14
- transformBaseURL(source);
15
- transformDefinitions(source.definitions);
16
- transformPaths(source.paths);
17
- configRead.graphs.comments = comments;
18
- configRead.graphs.functions = functions;
19
- configRead.graphs.interfaces = interfaces;
20
- return configRead;
21
- }
22
- function transformPaths(paths) {
23
- const { configRead, functions, interfaces } = inject();
24
- traversePaths(paths, (config) => {
25
- /**
26
-
27
- * function params/function options/function use interfaces
28
-
29
- */
30
- const { parameters, interfaces: attachInters, options } = parseMethodParameters(config, {
31
- body: "data",
32
- query: "params"
33
- });
34
- let { name, description, url, responseType } = parseMethodMetadata(config);
35
- options.push(["...", "config"]);
36
- interfaces.push(...attachInters);
37
- parameters.push({
38
- type: "import('@uni-helper/uni-network').UnConfig<never>",
39
- name: "config",
40
- required: false
41
- });
42
- options.unshift("url");
43
- options.unshift(["method", `"${config.method}"`]);
44
- if (configRead.config.baseURL) options.unshift("baseURL");
45
- transformParameters(parameters, {
46
- syntax: "ecmascript",
47
- configRead,
48
- description,
49
- interfaces,
50
- responseType,
51
- generic: "import('@uni-helper/uni-network').UnResponse<{__type__}>"
52
- });
53
- url = transformUrlSyntax(url);
54
- functions.push({
55
- export: true,
56
- name,
57
- description,
58
- parameters,
59
- body: [`const url = ${url}`, `return http.request({ ${literalFieldsToString(options)} })`]
60
- });
61
- });
62
- }
63
-
64
- //#endregion
65
- export { parser as parser$10, transformPaths as transformPaths$10 };
@@ -1,70 +0,0 @@
1
- import { literalFieldsToString, parseHeaderCommits, parseMethodMetadata, parseMethodParameters, parseOpenapiSpecification, transformBaseURL, transformBodyStringify, transformDefinitions, transformParameters, transformQueryParams, transformUrlSyntax, traversePaths } from "@genapi/parser";
2
- import { inject, provide } from "@genapi/shared";
3
-
4
- //#region src/ky/ts/parser/index.ts
5
- function parser(configRead) {
6
- const source = parseOpenapiSpecification(configRead.source);
7
- const comments = parseHeaderCommits(source);
8
- const interfaces = [];
9
- const functions = [];
10
- provide({
11
- interfaces,
12
- functions
13
- });
14
- transformBaseURL(source);
15
- transformDefinitions(source.definitions);
16
- transformPaths(source.paths);
17
- configRead.graphs.comments = comments;
18
- configRead.graphs.functions = functions;
19
- configRead.graphs.interfaces = interfaces;
20
- return configRead;
21
- }
22
- function transformPaths(paths) {
23
- const { configRead, functions, interfaces } = inject();
24
- traversePaths(paths, (config) => {
25
- /**
26
-
27
- * function params/function options/function use interfaces
28
-
29
- */
30
- const { parameters, interfaces: attachInters, options } = parseMethodParameters(config);
31
- let { name, description, url, responseType } = parseMethodMetadata(config);
32
- interfaces.push(...attachInters);
33
- parameters.push({
34
- name: "config",
35
- type: "Options",
36
- required: false
37
- });
38
- options.push(["...", "config"]);
39
- if (configRead.config.baseURL) options.unshift(["prefixUrl", "baseURL"]);
40
- const { spaceResponseType } = transformParameters(parameters, {
41
- syntax: "typescript",
42
- configRead,
43
- description,
44
- interfaces,
45
- responseType
46
- });
47
- transformBodyStringify("body", {
48
- options,
49
- parameters
50
- });
51
- transformQueryParams("query", {
52
- optionKey: "searchParams",
53
- options
54
- });
55
- url = transformUrlSyntax(url);
56
- functions.push({
57
- export: true,
58
- async: true,
59
- name,
60
- description,
61
- parameters,
62
- body: [`const response = await http(${url}, {
63
- ${literalFieldsToString(options)}
64
- })`, `return response.json<${spaceResponseType}>()`]
65
- });
66
- });
67
- }
68
-
69
- //#endregion
70
- export { parser as parser$7, transformPaths as transformPaths$7 };
@@ -1,64 +0,0 @@
1
- import { literalFieldsToString, parseHeaderCommits, parseMethodMetadata, parseMethodParameters, parseOpenapiSpecification, transformBaseURL, transformDefinitions, transformParameters, transformUrlSyntax, traversePaths } from "@genapi/parser";
2
- import { inject, provide } from "@genapi/shared";
3
-
4
- //#region src/uni/ts/parser/index.ts
5
- function parser(configRead) {
6
- const source = parseOpenapiSpecification(configRead.source);
7
- const comments = parseHeaderCommits(source);
8
- const interfaces = [];
9
- const functions = [];
10
- provide({
11
- interfaces,
12
- functions
13
- });
14
- transformBaseURL(source);
15
- transformDefinitions(source.definitions);
16
- transformPaths(source.paths);
17
- configRead.graphs.comments = comments;
18
- configRead.graphs.functions = functions;
19
- configRead.graphs.interfaces = interfaces;
20
- return configRead;
21
- }
22
- function transformPaths(paths) {
23
- const { configRead, functions, interfaces } = inject();
24
- traversePaths(paths, (config) => {
25
- /**
26
-
27
- * function params/function options/function use interfaces
28
-
29
- */
30
- const { parameters, interfaces: attachInters, options } = parseMethodParameters(config, {
31
- body: "data",
32
- query: "params"
33
- });
34
- let { name, description, url, responseType } = parseMethodMetadata(config);
35
- options.push(["...", "config"]);
36
- interfaces.push(...attachInters);
37
- parameters.push({
38
- name: "config",
39
- type: "UnConfig<never>",
40
- required: false
41
- });
42
- options.unshift("url");
43
- options.unshift(["method", `"${config.method}"`]);
44
- if (configRead.config.baseURL) options.unshift("baseURL");
45
- const { spaceResponseType } = transformParameters(parameters, {
46
- syntax: "typescript",
47
- configRead,
48
- description,
49
- interfaces,
50
- responseType
51
- });
52
- url = transformUrlSyntax(url);
53
- functions.push({
54
- export: true,
55
- name,
56
- description,
57
- parameters,
58
- body: [`const url = ${url}`, `return http.request<${spaceResponseType}>({ ${literalFieldsToString(options)} })`]
59
- });
60
- });
61
- }
62
-
63
- //#endregion
64
- export { parser as parser$11, transformPaths as transformPaths$11 };
@@ -1,71 +0,0 @@
1
- import { literalFieldsToString, parseHeaderCommits, parseMethodMetadata, parseMethodParameters, parseOpenapiSpecification, transformBaseURL, transformBodyStringify, transformDefinitions, transformParameters, transformQueryParams, transformUrlSyntax, traversePaths } from "@genapi/parser";
2
- import { inject, provide } from "@genapi/shared";
3
-
4
- //#region src/ky/js/parser/index.ts
5
- function parser(configRead) {
6
- const source = parseOpenapiSpecification(configRead.source);
7
- const comments = parseHeaderCommits(source);
8
- const interfaces = [];
9
- const functions = [];
10
- provide({
11
- interfaces,
12
- functions
13
- });
14
- transformBaseURL(source);
15
- transformDefinitions(source.definitions);
16
- transformPaths(source.paths);
17
- configRead.graphs.comments = comments;
18
- configRead.graphs.functions = functions;
19
- configRead.graphs.interfaces = interfaces;
20
- return configRead;
21
- }
22
- function transformPaths(paths) {
23
- const { configRead, functions, interfaces } = inject();
24
- traversePaths(paths, (config) => {
25
- /**
26
-
27
- * function params/function options/function use interfaces
28
-
29
- */
30
- const { parameters, interfaces: attachInters, options } = parseMethodParameters(config);
31
- let { name, description, url, responseType } = parseMethodMetadata(config);
32
- interfaces.push(...attachInters);
33
- parameters.push({
34
- name: "config",
35
- type: "import('ky').Options",
36
- required: false
37
- });
38
- options.push(["...", "config"]);
39
- if (configRead.config.baseURL) options.unshift(["prefixUrl", "baseURL"]);
40
- transformParameters(parameters, {
41
- syntax: "ecmascript",
42
- configRead,
43
- description,
44
- interfaces,
45
- responseType,
46
- generic: "import('ky').KyResponse<{__type__}>"
47
- });
48
- transformBodyStringify("body", {
49
- options,
50
- parameters
51
- });
52
- transformQueryParams("query", {
53
- optionKey: "searchParams",
54
- options
55
- });
56
- url = transformUrlSyntax(url);
57
- functions.push({
58
- export: true,
59
- async: true,
60
- name,
61
- description,
62
- parameters,
63
- body: [`const response = await http(${url}, {
64
- ${literalFieldsToString(options)}
65
- })`, "return response.json()"]
66
- });
67
- });
68
- }
69
-
70
- //#endregion
71
- export { parser as parser$6, transformPaths as transformPaths$6 };