@genapi/presets 3.3.0 → 3.5.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.
- package/dist/axios/index.d.mts +9 -0
- package/dist/axios/index.mjs +9 -7
- package/dist/axios/js/config/index.d.mts +3 -0
- package/dist/axios/js/config/index.mjs +3 -18
- package/dist/axios/js/index.d.mts +5 -0
- package/dist/axios/js/index.mjs +5 -31
- package/dist/axios/js/parser/index.d.mts +3 -0
- package/dist/axios/js/parser/index.mjs +3 -77
- package/dist/axios/ts/config/index.d.mts +3 -0
- package/dist/axios/ts/config/index.mjs +3 -22
- package/dist/axios/ts/index.d.mts +5 -0
- package/dist/axios/ts/index.mjs +5 -31
- package/dist/axios/ts/parser/index.d.mts +3 -0
- package/dist/axios/ts/parser/index.mjs +3 -76
- package/dist/axios-CG6HLmR9.mjs +13 -0
- package/dist/chunk-BL35Yyzp.mjs +12 -0
- package/dist/config-B6UDPRkS.mjs +12 -0
- package/dist/config-B89EoGE7.mjs +21 -0
- package/dist/config-BJZnXcL3.mjs +14 -0
- package/dist/config-CDvaM7ZL.mjs +19 -0
- package/dist/config-CwmGeydd.mjs +19 -0
- package/dist/config-DdUVYIe0.mjs +19 -0
- package/dist/config-Dm0OCPw8.mjs +19 -0
- package/dist/config-Dp9C4aUE.mjs +21 -0
- package/dist/config-IeVj3de_.mjs +21 -0
- package/dist/config-aVU8JEKy.mjs +21 -0
- package/dist/fetch/index.d.mts +9 -0
- package/dist/fetch/index.mjs +9 -7
- package/dist/fetch/js/config/index.d.mts +3 -0
- package/dist/fetch/js/config/index.mjs +3 -13
- package/dist/fetch/js/index.d.mts +5 -0
- package/dist/fetch/js/index.mjs +5 -31
- package/dist/fetch/js/parser/index.d.mts +3 -0
- package/dist/fetch/js/parser/index.mjs +3 -83
- package/dist/fetch/ts/config/index.d.mts +3 -0
- package/dist/fetch/ts/config/index.mjs +3 -11
- package/dist/fetch/ts/index.d.mts +5 -0
- package/dist/fetch/ts/index.mjs +5 -31
- package/dist/fetch/ts/parser/index.d.mts +3 -0
- package/dist/fetch/ts/parser/index.mjs +3 -79
- package/dist/fetch-DDSgFojK.mjs +13 -0
- package/dist/got/index.d.mts +9 -0
- package/dist/got/index.mjs +9 -7
- package/dist/got/js/config/index.d.mts +3 -0
- package/dist/got/js/config/index.mjs +3 -18
- package/dist/got/js/index.d.mts +5 -0
- package/dist/got/js/index.mjs +5 -31
- package/dist/got/js/parser/index.d.mts +3 -0
- package/dist/got/js/parser/index.mjs +3 -82
- package/dist/got/ts/config/index.d.mts +3 -0
- package/dist/got/ts/config/index.mjs +3 -22
- package/dist/got/ts/index.d.mts +5 -0
- package/dist/got/ts/index.mjs +5 -31
- package/dist/got/ts/parser/index.d.mts +3 -0
- package/dist/got/ts/parser/index.mjs +3 -82
- package/dist/got-DhRc0hx6.mjs +13 -0
- package/dist/index.d-B-u-rHVf.d.mts +7 -0
- package/dist/index.d-B5ex0iL6.d.mts +18 -0
- package/dist/index.d-B6ea0pDX.d.mts +7 -0
- package/dist/index.d-B9YjsDSU.d.mts +7 -0
- package/dist/index.d-BCl4h5vb.d.mts +18 -0
- package/dist/index.d-BEPmcVlv.d.mts +12 -0
- package/dist/{axios/ts/parser/index.d.ts → index.d-BVDe1tFu.d.mts} +5 -3
- package/dist/index.d-Ba1tOHnm.d.mts +18 -0
- package/dist/{fetch/ts/parser/index.d.ts → index.d-BvMhV1lw.d.mts} +5 -3
- package/dist/index.d-C-mKHl9s.d.mts +7 -0
- package/dist/index.d-C-mT1tVI.d.mts +12 -0
- package/dist/index.d-C10wnMdy.d.mts +14 -0
- package/dist/index.d-C38NRU-q.d.mts +18 -0
- package/dist/index.d-CGbHzQH8.d.mts +18 -0
- package/dist/{axios/js/parser/index.d.ts → index.d-Ch6ZYMn0.d.mts} +5 -3
- package/dist/index.d-CozwYURq.d.mts +14 -0
- package/dist/index.d-D0ou41dA.d.mts +18 -0
- package/dist/index.d-D6AeBSov.d.mts +14 -0
- package/dist/index.d-D9OXwZhj.d.mts +7 -0
- package/dist/index.d-DBNQTE-q.d.mts +18 -0
- package/dist/index.d-DD5okdfE.d.mts +12 -0
- package/dist/index.d-DD9vtQSr.d.mts +14 -0
- package/dist/index.d-DT6dJ1Sg.d.mts +14 -0
- package/dist/index.d-DTsMFJM4.d.mts +18 -0
- package/dist/index.d-DgSgg69k.d.mts +18 -0
- package/dist/index.d-DkWb7AYg.d.mts +7 -0
- package/dist/index.d-DlncPuTy.d.mts +7 -0
- package/dist/index.d-DndBUrRi.d.mts +18 -0
- package/dist/index.d-Dsok7fEc.d.mts +7 -0
- package/dist/index.d-Dx6IWWI4.d.mts +7 -0
- package/dist/index.d-YNb6GO8o.d.mts +12 -0
- package/dist/index.d-qxp4tWxk.d.mts +7 -0
- package/dist/index.d-sEb0cOvU.d.mts +12 -0
- package/dist/index.d-xT7aQSB2.d.mts +14 -0
- package/dist/{fetch/js/parser/index.d.ts → index.d-yppv-kCz.d.mts} +5 -3
- package/dist/index.d.mts +47 -0
- package/dist/index.mjs +46 -20
- package/dist/js-CfKFwY21.mjs +19 -0
- package/dist/js-CqtsolD8.mjs +19 -0
- package/dist/js-DxwOJyF7.mjs +19 -0
- package/dist/js-nNB2l-OU.mjs +19 -0
- package/dist/js-t1rqZHU4.mjs +19 -0
- package/dist/ky/index.d.mts +9 -0
- package/dist/ky/index.mjs +9 -7
- package/dist/ky/js/config/index.d.mts +3 -0
- package/dist/ky/js/config/index.mjs +3 -18
- package/dist/ky/js/index.d.mts +5 -0
- package/dist/ky/js/index.mjs +5 -31
- package/dist/ky/js/parser/index.d.mts +3 -0
- package/dist/ky/js/parser/index.mjs +3 -79
- package/dist/ky/ts/config/index.d.mts +3 -0
- package/dist/ky/ts/config/index.mjs +3 -22
- package/dist/ky/ts/index.d.mts +5 -0
- package/dist/ky/ts/index.mjs +5 -31
- package/dist/ky/ts/parser/index.d.mts +3 -0
- package/dist/ky/ts/parser/index.mjs +3 -78
- package/dist/ky-tkF4RP6y.mjs +13 -0
- package/dist/ofetch/index.d.mts +9 -0
- package/dist/ofetch/index.mjs +9 -7
- package/dist/ofetch/js/config/index.d.mts +3 -0
- package/dist/ofetch/js/config/index.mjs +3 -18
- package/dist/ofetch/js/index.d.mts +5 -0
- package/dist/ofetch/js/index.mjs +5 -31
- package/dist/ofetch/js/parser/index.d.mts +3 -0
- package/dist/ofetch/js/parser/index.mjs +3 -78
- package/dist/ofetch/ts/config/index.d.mts +3 -0
- package/dist/ofetch/ts/config/index.mjs +3 -22
- package/dist/ofetch/ts/index.d.mts +5 -0
- package/dist/ofetch/ts/index.mjs +5 -31
- package/dist/ofetch/ts/parser/index.d.mts +3 -0
- package/dist/ofetch/ts/parser/index.mjs +3 -76
- package/dist/ofetch-D17IUjVF.mjs +13 -0
- package/dist/parser-8NB1Nfwt.mjs +63 -0
- package/dist/parser-B-nJrHKw.mjs +68 -0
- package/dist/parser-BGXx6lbG.mjs +66 -0
- package/dist/parser-BkWqv1qf.mjs +69 -0
- package/dist/parser-CAdkVm2b.mjs +77 -0
- package/dist/parser-CSJYNO0a.mjs +69 -0
- package/dist/parser-CaRC8JQj.mjs +67 -0
- package/dist/parser-GwoAS3rw.mjs +62 -0
- package/dist/parser-ZdK3ZwJM.mjs +69 -0
- package/dist/parser-aevzlGBk.mjs +72 -0
- package/dist/ts-4mi0Q-kd.mjs +19 -0
- package/dist/ts-B0VNlOAi.mjs +19 -0
- package/dist/ts-BLbY66M1.mjs +19 -0
- package/dist/ts-BrqtDsf2.mjs +19 -0
- package/dist/ts-DjVYemin.mjs +19 -0
- package/package.json +15 -15
- package/dist/axios/index.d.ts +0 -9
- package/dist/axios/js/config/index.d.ts +0 -5
- package/dist/axios/js/index.d.ts +0 -18
- package/dist/axios/ts/config/index.d.ts +0 -5
- package/dist/axios/ts/index.d.ts +0 -18
- package/dist/fetch/index.d.ts +0 -9
- package/dist/fetch/js/config/index.d.ts +0 -5
- package/dist/fetch/js/index.d.ts +0 -18
- package/dist/fetch/ts/config/index.d.ts +0 -5
- package/dist/fetch/ts/index.d.ts +0 -18
- package/dist/got/index.d.ts +0 -9
- package/dist/got/js/config/index.d.ts +0 -5
- package/dist/got/js/index.d.ts +0 -18
- package/dist/got/js/parser/index.d.ts +0 -12
- package/dist/got/ts/config/index.d.ts +0 -5
- package/dist/got/ts/index.d.ts +0 -18
- package/dist/got/ts/parser/index.d.ts +0 -12
- package/dist/index-BoRNV5uE.d.ts +0 -8
- package/dist/index-C-Of8dmT.d.ts +0 -8
- package/dist/index-DUlkpebX.d.ts +0 -8
- package/dist/index-doIz4HN1.d.ts +0 -8
- package/dist/index-ln0OpJQY.d.ts +0 -8
- package/dist/index.d.ts +0 -48
- package/dist/ky/index.d.ts +0 -9
- package/dist/ky/js/config/index.d.ts +0 -5
- package/dist/ky/js/index.d.ts +0 -18
- package/dist/ky/js/parser/index.d.ts +0 -12
- package/dist/ky/ts/config/index.d.ts +0 -5
- package/dist/ky/ts/index.d.ts +0 -18
- package/dist/ky/ts/parser/index.d.ts +0 -12
- package/dist/ofetch/index.d.ts +0 -9
- package/dist/ofetch/js/config/index.d.ts +0 -5
- package/dist/ofetch/js/index.d.ts +0 -18
- package/dist/ofetch/js/parser/index.d.ts +0 -12
- package/dist/ofetch/ts/config/index.d.ts +0 -5
- package/dist/ofetch/ts/index.d.ts +0 -18
- package/dist/ofetch/ts/parser/index.d.ts +0 -12
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { config } from "./config-CwmGeydd.mjs";
|
|
2
|
+
import { parser } from "./parser-8NB1Nfwt.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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { config$2 as config } from "./config-BJZnXcL3.mjs";
|
|
2
|
+
import { parser$2 as parser } from "./parser-CAdkVm2b.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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { config$8 as config } from "./config-Dm0OCPw8.mjs";
|
|
2
|
+
import { parser$8 as parser } from "./parser-CaRC8JQj.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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { config$6 as config } from "./config-DdUVYIe0.mjs";
|
|
2
|
+
import { parser$6 as parser } from "./parser-CSJYNO0a.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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { config$3 as config } from "./config-CDvaM7ZL.mjs";
|
|
2
|
+
import { parser$3 as parser } from "./parser-BkWqv1qf.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$3, dest$1 as dest$3, generate$1 as generate$3, js_default as js_default$2, original$1 as original$3 };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../index.d-BVDe1tFu.mjs";
|
|
2
|
+
import "../index.d-C-mKHl9s.mjs";
|
|
3
|
+
import { openapiPipeline$5 as openapiPipeline } from "../index.d-DTsMFJM4.mjs";
|
|
4
|
+
import "../index.d-yppv-kCz.mjs";
|
|
5
|
+
import "../index.d-B-u-rHVf.mjs";
|
|
6
|
+
import { openapiPipeline$7 as openapiPipeline$1 } from "../index.d-DBNQTE-q.mjs";
|
|
7
|
+
import "../index.d-C-mT1tVI.mjs";
|
|
8
|
+
|
|
9
|
+
export { openapiPipeline as js, openapiPipeline$1 as ts };
|
package/dist/ky/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import "../config-DdUVYIe0.mjs";
|
|
2
|
+
import "../parser-CSJYNO0a.mjs";
|
|
3
|
+
import { js_default$3 as js_default } from "../js-nNB2l-OU.mjs";
|
|
4
|
+
import "../config-IeVj3de_.mjs";
|
|
5
|
+
import "../parser-B-nJrHKw.mjs";
|
|
6
|
+
import { ts_default$4 as ts_default } from "../ts-BrqtDsf2.mjs";
|
|
7
|
+
import "../ky-tkF4RP6y.mjs";
|
|
8
|
+
|
|
9
|
+
export { js_default as js, ts_default as ts };
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function config(userConfig) {
|
|
5
|
-
userConfig.import = userConfig.import || {};
|
|
6
|
-
userConfig.output = userConfig.output || {};
|
|
7
|
-
userConfig.import.http = userConfig.import.http || "ky";
|
|
8
|
-
userConfig.output = replaceMainext(userConfig.output) || "src/api/index.js";
|
|
9
|
-
const configRead = _config(userConfig);
|
|
10
|
-
configRead.graphs.imports.push({
|
|
11
|
-
name: "http",
|
|
12
|
-
value: userConfig.import.http
|
|
13
|
-
});
|
|
14
|
-
return configRead;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
config
|
|
18
|
-
};
|
|
1
|
+
import { config$6 as config } from "../../../config-DdUVYIe0.mjs";
|
|
2
|
+
|
|
3
|
+
export { config };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { parser$12 as parser } from "../../index.d-BVDe1tFu.mjs";
|
|
2
|
+
import { config$13 as config } from "../../index.d-C-mKHl9s.mjs";
|
|
3
|
+
import { compiler$15 as compiler, dest$15 as dest, generate$15 as generate, openapiPipeline$5 as openapiPipeline, original$15 as original } from "../../index.d-DTsMFJM4.mjs";
|
|
4
|
+
|
|
5
|
+
export { compiler, config, openapiPipeline as default, dest, generate, original, parser };
|
package/dist/ky/js/index.mjs
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const process = pipeline(
|
|
7
|
-
(userConfig2) => config(userConfig2),
|
|
8
|
-
(configRead) => original(configRead),
|
|
9
|
-
(configRead) => parser(configRead),
|
|
10
|
-
(configRead) => compiler(configRead),
|
|
11
|
-
(configRead) => generate(configRead),
|
|
12
|
-
(configRead) => dest(configRead)
|
|
13
|
-
);
|
|
14
|
-
return process(userConfig);
|
|
15
|
-
}
|
|
16
|
-
openapiPipeline.config = config;
|
|
17
|
-
openapiPipeline.original = original;
|
|
18
|
-
openapiPipeline.parser = parser;
|
|
19
|
-
openapiPipeline.compiler = compiler;
|
|
20
|
-
openapiPipeline.generate = generate;
|
|
21
|
-
openapiPipeline.dest = dest;
|
|
22
|
-
var js_default = openapiPipeline;
|
|
23
|
-
export {
|
|
24
|
-
compiler,
|
|
25
|
-
config,
|
|
26
|
-
js_default as default,
|
|
27
|
-
dest,
|
|
28
|
-
generate,
|
|
29
|
-
original,
|
|
30
|
-
parser
|
|
31
|
-
};
|
|
1
|
+
import { config$6 as config } from "../../config-DdUVYIe0.mjs";
|
|
2
|
+
import { parser$6 as parser } from "../../parser-CSJYNO0a.mjs";
|
|
3
|
+
import { compiler$6 as compiler, dest$6 as dest, generate$6 as generate, js_default$3 as js_default, original$6 as original } from "../../js-nNB2l-OU.mjs";
|
|
4
|
+
|
|
5
|
+
export { compiler, config, js_default as default, dest, generate, original, parser };
|
|
@@ -1,79 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
parseHeaderCommits,
|
|
5
|
-
parseMethodMetadata,
|
|
6
|
-
parseMethodParameters,
|
|
7
|
-
parseOpenapiSpecification,
|
|
8
|
-
transformBaseURL,
|
|
9
|
-
transformBodyStringify,
|
|
10
|
-
transformDefinitions,
|
|
11
|
-
transformParameters,
|
|
12
|
-
transformQueryParams,
|
|
13
|
-
transformUrlSyntax,
|
|
14
|
-
traversePaths
|
|
15
|
-
} from "@genapi/parser";
|
|
16
|
-
function parser(configRead) {
|
|
17
|
-
const source = parseOpenapiSpecification(configRead.source);
|
|
18
|
-
const comments = parseHeaderCommits(source);
|
|
19
|
-
const interfaces = [];
|
|
20
|
-
const functions = [];
|
|
21
|
-
transformBaseURL(source, {
|
|
22
|
-
configRead
|
|
23
|
-
});
|
|
24
|
-
transformDefinitions(source.definitions, {
|
|
25
|
-
interfaces
|
|
26
|
-
});
|
|
27
|
-
transformPaths(source.paths, {
|
|
28
|
-
configRead,
|
|
29
|
-
functions,
|
|
30
|
-
interfaces
|
|
31
|
-
});
|
|
32
|
-
configRead.graphs.comments = comments;
|
|
33
|
-
configRead.graphs.functions = functions;
|
|
34
|
-
configRead.graphs.interfaces = interfaces;
|
|
35
|
-
return configRead;
|
|
36
|
-
}
|
|
37
|
-
function transformPaths(paths, { configRead, functions, interfaces }) {
|
|
38
|
-
traversePaths(paths, (config) => {
|
|
39
|
-
const { parameters, interfaces: attachInters, options } = parseMethodParameters(config);
|
|
40
|
-
let { name, description, url, responseType } = parseMethodMetadata(config);
|
|
41
|
-
interfaces.push(...attachInters);
|
|
42
|
-
parameters.push({
|
|
43
|
-
name: "config",
|
|
44
|
-
type: "import('ky').Options",
|
|
45
|
-
required: false
|
|
46
|
-
});
|
|
47
|
-
options.push(["...", "config"]);
|
|
48
|
-
if (configRead.config.baseURL)
|
|
49
|
-
options.unshift(["prefixUrl", "baseURL"]);
|
|
50
|
-
transformParameters(parameters, {
|
|
51
|
-
syntax: "ecmascript",
|
|
52
|
-
configRead,
|
|
53
|
-
description,
|
|
54
|
-
interfaces,
|
|
55
|
-
responseType,
|
|
56
|
-
generic: "import('ky').KyResponse<{__type__}>"
|
|
57
|
-
});
|
|
58
|
-
transformBodyStringify("body", { options, parameters });
|
|
59
|
-
transformQueryParams("query", { optionKey: "searchParams", options });
|
|
60
|
-
url = transformUrlSyntax(url);
|
|
61
|
-
functions.push({
|
|
62
|
-
export: true,
|
|
63
|
-
async: true,
|
|
64
|
-
name,
|
|
65
|
-
description,
|
|
66
|
-
parameters,
|
|
67
|
-
body: [
|
|
68
|
-
`const response = await http(${url}, {
|
|
69
|
-
${literalFieldsToString(options)}
|
|
70
|
-
})`,
|
|
71
|
-
"return response.json()"
|
|
72
|
-
]
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
parser,
|
|
78
|
-
transformPaths
|
|
79
|
-
};
|
|
1
|
+
import { parser$6 as parser, transformPaths$6 as transformPaths } from "../../../parser-CSJYNO0a.mjs";
|
|
2
|
+
|
|
3
|
+
export { parser, transformPaths };
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
userConfig.import = userConfig.import || {};
|
|
5
|
-
userConfig.import.http = userConfig.import.http || "ky";
|
|
6
|
-
const configRead = _config(userConfig);
|
|
7
|
-
configRead.graphs.imports.push({
|
|
8
|
-
name: "http",
|
|
9
|
-
names: userConfig.import.http === "ky" ? ["Options"] : void 0,
|
|
10
|
-
value: userConfig.import.http
|
|
11
|
-
});
|
|
12
|
-
if (userConfig.import.http !== "ky") {
|
|
13
|
-
configRead.graphs.imports.push({
|
|
14
|
-
names: ["Options"],
|
|
15
|
-
value: "ky"
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return configRead;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
config
|
|
22
|
-
};
|
|
1
|
+
import { config$9 as config } from "../../../config-IeVj3de_.mjs";
|
|
2
|
+
|
|
3
|
+
export { config };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { parser$10 as parser } from "../../index.d-yppv-kCz.mjs";
|
|
2
|
+
import { config$12 as config } from "../../index.d-B-u-rHVf.mjs";
|
|
3
|
+
import { compiler$17 as compiler, dest$17 as dest, generate$17 as generate, openapiPipeline$7 as openapiPipeline, original$17 as original } from "../../index.d-DBNQTE-q.mjs";
|
|
4
|
+
|
|
5
|
+
export { compiler, config, openapiPipeline as default, dest, generate, original, parser };
|
package/dist/ky/ts/index.mjs
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const process = pipeline(
|
|
7
|
-
(userConfig2) => config(userConfig2),
|
|
8
|
-
(configRead) => original(configRead),
|
|
9
|
-
(configRead) => parser(configRead),
|
|
10
|
-
(configRead) => compiler(configRead),
|
|
11
|
-
(configRead) => generate(configRead),
|
|
12
|
-
(configRead) => dest(configRead)
|
|
13
|
-
);
|
|
14
|
-
return process(userConfig);
|
|
15
|
-
}
|
|
16
|
-
openapiPipeline.config = config;
|
|
17
|
-
openapiPipeline.original = original;
|
|
18
|
-
openapiPipeline.parser = parser;
|
|
19
|
-
openapiPipeline.compiler = compiler;
|
|
20
|
-
openapiPipeline.generate = generate;
|
|
21
|
-
openapiPipeline.dest = dest;
|
|
22
|
-
var ts_default = openapiPipeline;
|
|
23
|
-
export {
|
|
24
|
-
compiler,
|
|
25
|
-
config,
|
|
26
|
-
ts_default as default,
|
|
27
|
-
dest,
|
|
28
|
-
generate,
|
|
29
|
-
original,
|
|
30
|
-
parser
|
|
31
|
-
};
|
|
1
|
+
import { config$9 as config } from "../../config-IeVj3de_.mjs";
|
|
2
|
+
import { parser$9 as parser } from "../../parser-B-nJrHKw.mjs";
|
|
3
|
+
import { compiler$9 as compiler, dest$9 as dest, generate$9 as generate, original$9 as original, ts_default$4 as ts_default } from "../../ts-BrqtDsf2.mjs";
|
|
4
|
+
|
|
5
|
+
export { compiler, config, ts_default as default, dest, generate, original, parser };
|
|
@@ -1,78 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
parseHeaderCommits,
|
|
5
|
-
parseMethodMetadata,
|
|
6
|
-
parseMethodParameters,
|
|
7
|
-
parseOpenapiSpecification,
|
|
8
|
-
transformBaseURL,
|
|
9
|
-
transformBodyStringify,
|
|
10
|
-
transformDefinitions,
|
|
11
|
-
transformParameters,
|
|
12
|
-
transformQueryParams,
|
|
13
|
-
transformUrlSyntax,
|
|
14
|
-
traversePaths
|
|
15
|
-
} from "@genapi/parser";
|
|
16
|
-
function parser(configRead) {
|
|
17
|
-
const source = parseOpenapiSpecification(configRead.source);
|
|
18
|
-
const comments = parseHeaderCommits(source);
|
|
19
|
-
const interfaces = [];
|
|
20
|
-
const functions = [];
|
|
21
|
-
transformBaseURL(source, {
|
|
22
|
-
configRead
|
|
23
|
-
});
|
|
24
|
-
transformDefinitions(source.definitions, {
|
|
25
|
-
interfaces
|
|
26
|
-
});
|
|
27
|
-
transformPaths(source.paths, {
|
|
28
|
-
configRead,
|
|
29
|
-
functions,
|
|
30
|
-
interfaces
|
|
31
|
-
});
|
|
32
|
-
configRead.graphs.comments = comments;
|
|
33
|
-
configRead.graphs.functions = functions;
|
|
34
|
-
configRead.graphs.interfaces = interfaces;
|
|
35
|
-
return configRead;
|
|
36
|
-
}
|
|
37
|
-
function transformPaths(paths, { configRead, functions, interfaces }) {
|
|
38
|
-
traversePaths(paths, (config) => {
|
|
39
|
-
const { parameters, interfaces: attachInters, options } = parseMethodParameters(config);
|
|
40
|
-
let { name, description, url, responseType } = parseMethodMetadata(config);
|
|
41
|
-
interfaces.push(...attachInters);
|
|
42
|
-
parameters.push({
|
|
43
|
-
name: "config",
|
|
44
|
-
type: "Options",
|
|
45
|
-
required: false
|
|
46
|
-
});
|
|
47
|
-
options.push(["...", "config"]);
|
|
48
|
-
if (configRead.config.baseURL)
|
|
49
|
-
options.unshift(["prefixUrl", "baseURL"]);
|
|
50
|
-
const { spaceResponseType } = transformParameters(parameters, {
|
|
51
|
-
syntax: "typescript",
|
|
52
|
-
configRead,
|
|
53
|
-
description,
|
|
54
|
-
interfaces,
|
|
55
|
-
responseType
|
|
56
|
-
});
|
|
57
|
-
transformBodyStringify("body", { options, parameters });
|
|
58
|
-
transformQueryParams("query", { optionKey: "searchParams", options });
|
|
59
|
-
url = transformUrlSyntax(url);
|
|
60
|
-
functions.push({
|
|
61
|
-
export: true,
|
|
62
|
-
async: true,
|
|
63
|
-
name,
|
|
64
|
-
description,
|
|
65
|
-
parameters,
|
|
66
|
-
body: [
|
|
67
|
-
`const response = await http(${url}, {
|
|
68
|
-
${literalFieldsToString(options)}
|
|
69
|
-
})`,
|
|
70
|
-
`return response.json<${spaceResponseType}>()`
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
parser,
|
|
77
|
-
transformPaths
|
|
78
|
-
};
|
|
1
|
+
import { parser$9 as parser, transformPaths$9 as transformPaths } from "../../../parser-B-nJrHKw.mjs";
|
|
2
|
+
|
|
3
|
+
export { parser, transformPaths };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __export } from "./chunk-BL35Yyzp.mjs";
|
|
2
|
+
import { js_default$3 as js_default } from "./js-nNB2l-OU.mjs";
|
|
3
|
+
import { ts_default$4 as ts_default } from "./ts-BrqtDsf2.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 };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../index.d-DT6dJ1Sg.mjs";
|
|
2
|
+
import "../index.d-B6ea0pDX.mjs";
|
|
3
|
+
import { openapiPipeline$3 as openapiPipeline } from "../index.d-C38NRU-q.mjs";
|
|
4
|
+
import "../index.d-CozwYURq.mjs";
|
|
5
|
+
import "../index.d-DlncPuTy.mjs";
|
|
6
|
+
import { openapiPipeline$6 as openapiPipeline$1 } from "../index.d-DgSgg69k.mjs";
|
|
7
|
+
import "../index.d-DD5okdfE.mjs";
|
|
8
|
+
|
|
9
|
+
export { openapiPipeline as js, openapiPipeline$1 as ts };
|
package/dist/ofetch/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import "../config-Dm0OCPw8.mjs";
|
|
2
|
+
import "../parser-CaRC8JQj.mjs";
|
|
3
|
+
import { js_default$4 as js_default } from "../js-DxwOJyF7.mjs";
|
|
4
|
+
import "../config-Dp9C4aUE.mjs";
|
|
5
|
+
import "../parser-BGXx6lbG.mjs";
|
|
6
|
+
import { ts_default$3 as ts_default } from "../ts-B0VNlOAi.mjs";
|
|
7
|
+
import "../ofetch-D17IUjVF.mjs";
|
|
8
|
+
|
|
9
|
+
export { js_default as js, ts_default as ts };
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function config(userConfig) {
|
|
5
|
-
userConfig.import = userConfig.import || {};
|
|
6
|
-
userConfig.output = userConfig.output || {};
|
|
7
|
-
userConfig.import.http = userConfig.import.http || "ofetch";
|
|
8
|
-
userConfig.output = replaceMainext(userConfig.output) || "src/api/index.js";
|
|
9
|
-
const configRead = _config(userConfig);
|
|
10
|
-
configRead.graphs.imports.push({
|
|
11
|
-
name: "ofetch",
|
|
12
|
-
value: userConfig.import.http
|
|
13
|
-
});
|
|
14
|
-
return configRead;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
config
|
|
18
|
-
};
|
|
1
|
+
import { config$8 as config } from "../../../config-Dm0OCPw8.mjs";
|
|
2
|
+
|
|
3
|
+
export { config };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { parser$11 as parser } from "../../index.d-DT6dJ1Sg.mjs";
|
|
2
|
+
import { config$10 as config } from "../../index.d-B6ea0pDX.mjs";
|
|
3
|
+
import { compiler$13 as compiler, dest$13 as dest, generate$13 as generate, openapiPipeline$3 as openapiPipeline, original$13 as original } from "../../index.d-C38NRU-q.mjs";
|
|
4
|
+
|
|
5
|
+
export { compiler, config, openapiPipeline as default, dest, generate, original, parser };
|
package/dist/ofetch/js/index.mjs
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const process = pipeline(
|
|
7
|
-
(userConfig2) => config(userConfig2),
|
|
8
|
-
(configRead) => original(configRead),
|
|
9
|
-
(configRead) => parser(configRead),
|
|
10
|
-
(configRead) => compiler(configRead),
|
|
11
|
-
(configRead) => generate(configRead),
|
|
12
|
-
(configRead) => dest(configRead)
|
|
13
|
-
);
|
|
14
|
-
return process(userConfig);
|
|
15
|
-
}
|
|
16
|
-
openapiPipeline.config = config;
|
|
17
|
-
openapiPipeline.original = original;
|
|
18
|
-
openapiPipeline.parser = parser;
|
|
19
|
-
openapiPipeline.compiler = compiler;
|
|
20
|
-
openapiPipeline.generate = generate;
|
|
21
|
-
openapiPipeline.dest = dest;
|
|
22
|
-
var js_default = openapiPipeline;
|
|
23
|
-
export {
|
|
24
|
-
compiler,
|
|
25
|
-
config,
|
|
26
|
-
js_default as default,
|
|
27
|
-
dest,
|
|
28
|
-
generate,
|
|
29
|
-
original,
|
|
30
|
-
parser
|
|
31
|
-
};
|
|
1
|
+
import { config$8 as config } from "../../config-Dm0OCPw8.mjs";
|
|
2
|
+
import { parser$8 as parser } from "../../parser-CaRC8JQj.mjs";
|
|
3
|
+
import { compiler$8 as compiler, dest$8 as dest, generate$8 as generate, js_default$4 as js_default, original$8 as original } from "../../js-DxwOJyF7.mjs";
|
|
4
|
+
|
|
5
|
+
export { compiler, config, js_default as default, dest, generate, original, parser };
|
|
@@ -1,78 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
parseHeaderCommits,
|
|
5
|
-
parseMethodMetadata,
|
|
6
|
-
parseMethodParameters,
|
|
7
|
-
parseOpenapiSpecification,
|
|
8
|
-
transformBaseURL,
|
|
9
|
-
transformDefinitions,
|
|
10
|
-
transformParameters,
|
|
11
|
-
transformQueryParams,
|
|
12
|
-
transformUrlSyntax,
|
|
13
|
-
traversePaths
|
|
14
|
-
} from "@genapi/parser";
|
|
15
|
-
function parser(configRead) {
|
|
16
|
-
const source = parseOpenapiSpecification(configRead.source);
|
|
17
|
-
const comments = parseHeaderCommits(source);
|
|
18
|
-
const interfaces = [];
|
|
19
|
-
const functions = [];
|
|
20
|
-
transformBaseURL(source, {
|
|
21
|
-
configRead
|
|
22
|
-
});
|
|
23
|
-
transformDefinitions(source.definitions, {
|
|
24
|
-
interfaces
|
|
25
|
-
});
|
|
26
|
-
transformPaths(source.paths, {
|
|
27
|
-
configRead,
|
|
28
|
-
functions,
|
|
29
|
-
interfaces
|
|
30
|
-
});
|
|
31
|
-
configRead.graphs.comments = comments;
|
|
32
|
-
configRead.graphs.functions = functions;
|
|
33
|
-
configRead.graphs.interfaces = interfaces;
|
|
34
|
-
return configRead;
|
|
35
|
-
}
|
|
36
|
-
function transformPaths(paths, { configRead, functions, interfaces }) {
|
|
37
|
-
traversePaths(paths, (config) => {
|
|
38
|
-
const { parameters, interfaces: attachInters, options } = parseMethodParameters(config, {
|
|
39
|
-
formData: "body",
|
|
40
|
-
query: "params"
|
|
41
|
-
});
|
|
42
|
-
let { name, description, url, responseType, body } = parseMethodMetadata(config);
|
|
43
|
-
interfaces.push(...attachInters);
|
|
44
|
-
parameters.push({
|
|
45
|
-
name: "options",
|
|
46
|
-
type: "import('ofetch').FetchOptions",
|
|
47
|
-
required: false
|
|
48
|
-
});
|
|
49
|
-
options.push(["...", "options"]);
|
|
50
|
-
options.unshift(["method", `"${config.method}"`]);
|
|
51
|
-
if (configRead.config.baseURL)
|
|
52
|
-
options.unshift("baseURL");
|
|
53
|
-
transformParameters(parameters, {
|
|
54
|
-
syntax: "ecmascript",
|
|
55
|
-
configRead,
|
|
56
|
-
description,
|
|
57
|
-
interfaces,
|
|
58
|
-
responseType
|
|
59
|
-
});
|
|
60
|
-
url = transformQueryParams("query", { body, options, url });
|
|
61
|
-
url = transformUrlSyntax(url, { baseURL: configRead.config.baseURL });
|
|
62
|
-
functions.push({
|
|
63
|
-
export: true,
|
|
64
|
-
async: true,
|
|
65
|
-
name,
|
|
66
|
-
description,
|
|
67
|
-
parameters,
|
|
68
|
-
body: [
|
|
69
|
-
...body,
|
|
70
|
-
`return ofetch(${url}, {${literalFieldsToString(options)}})`
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
parser,
|
|
77
|
-
transformPaths
|
|
78
|
-
};
|
|
1
|
+
import { parser$8 as parser, transformPaths$8 as transformPaths } from "../../../parser-CaRC8JQj.mjs";
|
|
2
|
+
|
|
3
|
+
export { parser, transformPaths };
|