@povio/openapi-codegen-cli 3.1.0 → 3.2.0-rc.3
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/README.md +21 -14
- package/dist/acl.d.mts +6 -20
- package/dist/acl.mjs +3 -8
- package/dist/{auth.context-Bu5KW2sI.mjs → auth.context-YFWzkwoN.mjs} +3 -5
- package/dist/{config-BU7wVf7U.d.mts → config-mWuUhYNE.d.mts} +1 -2
- package/dist/{error-handling-D-mHJ60d.d.mts → error-handling-CNOHs4Fc.d.mts} +1 -4
- package/dist/{error-handling-DSI86D3u.mjs → error-handling-DDIXMA-R.mjs} +1 -7
- package/dist/generate.runner-wLYGEefS.mjs +1676 -0
- package/dist/generate.utils-1rU0zIjA.cjs +2283 -0
- package/dist/generateCodeFromOpenAPIDoc-C_DFpWCZ.mjs +2004 -0
- package/dist/{generateCodeFromOpenAPIDoc-CbQ9gQss.mjs → generateCodeFromOpenAPIDoc-wCGWkmv1.cjs} +1311 -2363
- package/dist/generator.d.mts +3 -10
- package/dist/generator.mjs +8 -9
- package/dist/getDataFromOpenAPIDoc-Dm8V5UY9.mjs +2011 -0
- package/dist/index.d.mts +9 -48
- package/dist/index.mjs +4 -11
- package/dist/metro.cjs +114 -4923
- package/dist/metro.d.mts +3 -4
- package/dist/metro.mjs +4 -9
- package/dist/openapi-codegen-native-darwin-arm64.node +0 -0
- package/dist/openapi-codegen-native-linux-x64.node +0 -0
- package/dist/openapi-codegen-native-win32-x64.node +0 -0
- package/dist/{openapi-codegen.runner-BqOhUduF.mjs → openapi-codegen.runner-Bd03hQJd.mjs} +3 -5
- package/dist/{openapi-source.runner-wLs5vqw6.mjs → openapi-source.runner-BZ6ZLgRO.mjs} +19 -10
- package/dist/{openapi-source.runner-BSIrB6ny.d.mts → openapi-source.runner-DmJoXvFj.d.mts} +2 -8
- package/dist/{options-CE4Koxof.d.mts → options-B47gUU4P.d.mts} +5 -1
- package/dist/sh.d.mts +1 -1
- package/dist/sh.mjs +35 -71
- package/dist/tiny.d.mts +1 -3
- package/dist/tiny.mjs +2 -3
- package/dist/vite.d.mts +3 -4
- package/dist/vite.mjs +6 -10
- package/dist/zod.d.mts +2 -7
- package/dist/zod.mjs +2 -4
- package/package.json +28 -26
- package/dist/generate.runner-DnUDkoAZ.mjs +0 -90
package/dist/generator.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as GenerateFileData, t as GenerateOptions } from "./options-
|
|
1
|
+
import { n as GenerateFileData, t as GenerateOptions } from "./options-B47gUU4P.mjs";
|
|
2
2
|
import { OpenAPIV3 } from "openapi-types";
|
|
3
|
-
|
|
4
3
|
//#region src/generators/types/metadata.d.ts
|
|
5
4
|
interface GenerateParams {
|
|
6
5
|
input: string;
|
|
@@ -53,13 +52,7 @@ interface GenerateMetadata {
|
|
|
53
52
|
}
|
|
54
53
|
//#endregion
|
|
55
54
|
//#region src/generator.d.ts
|
|
56
|
-
declare function getGenerateMetadata({
|
|
57
|
-
|
|
58
|
-
options: genOptions
|
|
59
|
-
}: GenerateParams): Promise<GenerateMetadata>;
|
|
60
|
-
declare function getGenerateFilesData({
|
|
61
|
-
input,
|
|
62
|
-
options: genOptions
|
|
63
|
-
}: GenerateParams): Promise<GenerateFileData[]>;
|
|
55
|
+
declare function getGenerateMetadata({ input, options: genOptions }: GenerateParams): Promise<GenerateMetadata>;
|
|
56
|
+
declare function getGenerateFilesData({ input, options: genOptions }: GenerateParams): Promise<GenerateFileData[]>;
|
|
64
57
|
//#endregion
|
|
65
58
|
export { getGenerateFilesData, getGenerateMetadata };
|
package/dist/generator.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-C_DFpWCZ.mjs";
|
|
2
|
+
import { t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-Dm8V5UY9.mjs";
|
|
3
|
+
import { $t as isParamMediaTypeAllowed, H as getQueryName, Mn as formatTag, O as getTagImportPath, Qt as isMediaTypeAllowed, S as getTsTypeBase, Tt as invalidVariableNameCharactersToCamel, Wt as getNamespaceName, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, t as getOpenApiDoc, u as isMutation, x as getSchemaTsMetaType } from "./generate.runner-wLYGEefS.mjs";
|
|
4
4
|
//#region src/generators/core/getMetadataFromOpenAPIDoc.ts
|
|
5
5
|
async function getMetadataFromOpenAPIDoc(openApiDoc, options) {
|
|
6
6
|
const { resolver, data } = await getDataFromOpenAPIDoc(openApiDoc, options);
|
|
@@ -28,7 +28,7 @@ async function getMetadataFromOpenAPIDoc(openApiDoc, options) {
|
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
endpoints.forEach((endpoint) => {
|
|
31
|
-
const generateType =
|
|
31
|
+
const generateType = "queries";
|
|
32
32
|
const tag = formatTag(dataTag);
|
|
33
33
|
queries.push({
|
|
34
34
|
name: getQueryName(endpoint),
|
|
@@ -122,7 +122,6 @@ function getQueryMetadataResponse({ resolver, endpoint }) {
|
|
|
122
122
|
...tsMetaType
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
|
|
126
125
|
//#endregion
|
|
127
126
|
//#region src/generator.ts
|
|
128
127
|
async function getGenerateMetadata({ input, options: genOptions }) {
|
|
@@ -130,15 +129,15 @@ async function getGenerateMetadata({ input, options: genOptions }) {
|
|
|
130
129
|
...DEFAULT_GENERATE_OPTIONS,
|
|
131
130
|
...genOptions
|
|
132
131
|
};
|
|
133
|
-
return await getMetadataFromOpenAPIDoc(await
|
|
132
|
+
return await getMetadataFromOpenAPIDoc(await getOpenApiDoc(input), options);
|
|
134
133
|
}
|
|
135
134
|
async function getGenerateFilesData({ input, options: genOptions }) {
|
|
136
135
|
const options = {
|
|
137
136
|
...DEFAULT_GENERATE_OPTIONS,
|
|
138
137
|
...genOptions
|
|
139
138
|
};
|
|
140
|
-
|
|
139
|
+
const openApiDoc = await getOpenApiDoc(input);
|
|
140
|
+
return generateCodeFromOpenAPIDoc(openApiDoc, options);
|
|
141
141
|
}
|
|
142
|
-
|
|
143
142
|
//#endregion
|
|
144
|
-
export { getGenerateFilesData, getGenerateMetadata };
|
|
143
|
+
export { getGenerateFilesData, getGenerateMetadata };
|