@povio/openapi-codegen-cli 3.1.1 → 3.2.0-rc.10
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 +63 -15
- package/dist/AuthGuard-GbtTDXs0.d.mts +32 -0
- package/dist/AuthGuard-qpAtHaBz.mjs +24 -0
- package/dist/acl.d.mts +6 -20
- package/dist/acl.mjs +8 -13
- package/dist/{auth.context-Bu5KW2sI.mjs → auth.context-COWO6ssl.mjs} +1 -21
- package/dist/auth.d.mts +2 -0
- package/dist/auth.mjs +3 -0
- package/dist/axios.d.mts +2 -0
- package/dist/axios.mjs +2 -0
- package/dist/{config-BU7wVf7U.d.mts → config-DgrOddSC.d.mts} +1 -2
- package/dist/config.d.mts +4 -0
- package/dist/config.mjs +5 -0
- package/dist/{error-handling-DSI86D3u.mjs → error-handling-BeydPL7s.mjs} +21 -51
- package/dist/{error-handling-D-mHJ60d.d.mts → error-handling-LPEPQV1V.d.mts} +3 -42
- package/dist/errors.d.mts +3 -0
- package/dist/errors.mjs +2 -0
- package/dist/generate.runner-CD7mlcJ4.mjs +184 -0
- package/dist/generate.utils-CT-LA-gX.cjs +2267 -0
- package/dist/generateCodeFromOpenAPIDoc-D9W5BtAt.mjs +2097 -0
- package/dist/{generateCodeFromOpenAPIDoc-DseBECa-.mjs → generateCodeFromOpenAPIDoc-DhI7CHeh.cjs} +1349 -2344
- package/dist/generator.d.mts +3 -10
- package/dist/generator.mjs +9 -9
- package/dist/getDataFromOpenAPIDoc-D8w0QElH.mjs +2011 -0
- package/dist/i18n-B_brQh4X.d.mts +38 -0
- package/dist/i18n-D-FesqFb.mjs +36 -0
- package/dist/index.d.mts +12 -200
- package/dist/index.mjs +12 -264
- package/dist/metro.cjs +114 -4959
- package/dist/metro.d.mts +3 -4
- package/dist/metro.mjs +4 -9
- package/dist/native-bindings-BTQGSGhU.mjs +1480 -0
- package/dist/native-rest-interceptor-CAWR8H5Y.mjs +208 -0
- package/dist/native-rest-interceptor-Cz6saoq5.d.mts +46 -0
- package/dist/native.d.mts +3 -0
- package/dist/native.mjs +3 -0
- 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-Co_bG00_.mjs → openapi-codegen.runner-C4TIXQNx.mjs} +4 -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-ykstqlPC.d.mts} +2 -8
- package/dist/{options-CE4Koxof.d.mts → options-KPf-Fti5.d.mts} +6 -1
- package/dist/query.d.mts +3 -0
- package/dist/query.mjs +3 -0
- package/dist/queryConfig.context-CRJOgf19.d.mts +22 -0
- package/dist/queryConfig.context-CldQ5YL9.mjs +34 -0
- package/dist/rest-client-CQyFvqYC.d.mts +55 -0
- package/dist/rest-interceptor-D5NCNTm1.mjs +115 -0
- package/dist/rest-transport.types-DM5-qyOJ.d.mts +66 -0
- package/dist/rest-transport.types-DxitRtsB.mjs +11 -0
- package/dist/rest.d.mts +2 -0
- package/dist/rest.mjs +2 -0
- package/dist/rest.utils-rezWAIYL.d.mts +10 -0
- package/dist/router.context-EPlMBk3G.mjs +21 -0
- package/dist/sh.d.mts +1 -1
- package/dist/sh.mjs +41 -71
- package/dist/tiny.d.mts +1 -3
- package/dist/tiny.mjs +2 -3
- package/dist/useMutationEffects-DIdL8tlx.d.mts +29 -0
- package/dist/useMutationEffects-PB1fvKWM.mjs +68 -0
- package/dist/vite.d.mts +3 -4
- package/dist/vite.mjs +6 -10
- package/dist/workspace.context-XWvQ_7Hg.mjs +26 -0
- package/dist/workspace.context-isVY9ves.d.mts +23 -0
- package/dist/zod.d.mts +2 -7
- package/dist/zod.mjs +2 -4
- package/package.json +73 -26
- package/dist/generate.runner-C1HrS_9G.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-KPf-Fti5.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,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-D9W5BtAt.mjs";
|
|
2
|
+
import { t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-D8w0QElH.mjs";
|
|
3
|
+
import { H as getQueryName, Ht as getNamespaceName, Mn as formatTag, O as getTagImportPath, S as getTsTypeBase, Xt as isMediaTypeAllowed, Zt as isParamMediaTypeAllowed, bt as invalidVariableNameCharactersToCamel, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, u as isMutation, x as getSchemaTsMetaType } from "./native-bindings-BTQGSGhU.mjs";
|
|
4
|
+
import { t as getOpenApiDoc } from "./generate.runner-CD7mlcJ4.mjs";
|
|
4
5
|
//#region src/generators/core/getMetadataFromOpenAPIDoc.ts
|
|
5
6
|
async function getMetadataFromOpenAPIDoc(openApiDoc, options) {
|
|
6
7
|
const { resolver, data } = await getDataFromOpenAPIDoc(openApiDoc, options);
|
|
@@ -28,7 +29,7 @@ async function getMetadataFromOpenAPIDoc(openApiDoc, options) {
|
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
31
|
endpoints.forEach((endpoint) => {
|
|
31
|
-
const generateType =
|
|
32
|
+
const generateType = "queries";
|
|
32
33
|
const tag = formatTag(dataTag);
|
|
33
34
|
queries.push({
|
|
34
35
|
name: getQueryName(endpoint),
|
|
@@ -122,7 +123,6 @@ function getQueryMetadataResponse({ resolver, endpoint }) {
|
|
|
122
123
|
...tsMetaType
|
|
123
124
|
};
|
|
124
125
|
}
|
|
125
|
-
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/generator.ts
|
|
128
128
|
async function getGenerateMetadata({ input, options: genOptions }) {
|
|
@@ -130,15 +130,15 @@ async function getGenerateMetadata({ input, options: genOptions }) {
|
|
|
130
130
|
...DEFAULT_GENERATE_OPTIONS,
|
|
131
131
|
...genOptions
|
|
132
132
|
};
|
|
133
|
-
return await getMetadataFromOpenAPIDoc(await
|
|
133
|
+
return await getMetadataFromOpenAPIDoc(await getOpenApiDoc(input), options);
|
|
134
134
|
}
|
|
135
135
|
async function getGenerateFilesData({ input, options: genOptions }) {
|
|
136
136
|
const options = {
|
|
137
137
|
...DEFAULT_GENERATE_OPTIONS,
|
|
138
138
|
...genOptions
|
|
139
139
|
};
|
|
140
|
-
|
|
140
|
+
const openApiDoc = await getOpenApiDoc(input);
|
|
141
|
+
return generateCodeFromOpenAPIDoc(openApiDoc, options);
|
|
141
142
|
}
|
|
142
|
-
|
|
143
143
|
//#endregion
|
|
144
|
-
export { getGenerateFilesData, getGenerateMetadata };
|
|
144
|
+
export { getGenerateFilesData, getGenerateMetadata };
|