vovk-cli 0.0.1-draft.253 → 0.0.1-draft.255
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.
|
@@ -88,14 +88,11 @@ export async function generate({ isEnsuringClient = false, projectInfo, forceNot
|
|
|
88
88
|
};
|
|
89
89
|
let hasMixins = false;
|
|
90
90
|
if (Object.keys(allOpenAPIMixins).length) {
|
|
91
|
-
const mixins = Object.fromEntries(Object.entries(await normalizeOpenAPIMixins({ mixinModules: allOpenAPIMixins })).map(([mixinName,
|
|
91
|
+
const mixins = Object.fromEntries(Object.entries(await normalizeOpenAPIMixins({ mixinModules: allOpenAPIMixins })).map(([mixinName, conf]) => {
|
|
92
92
|
return [
|
|
93
93
|
mixinName,
|
|
94
94
|
openAPIToVovkSchema({
|
|
95
|
-
|
|
96
|
-
apiRoot,
|
|
97
|
-
getModuleName,
|
|
98
|
-
getMethodName,
|
|
95
|
+
...conf,
|
|
99
96
|
mixinName,
|
|
100
97
|
}).segments[mixinName],
|
|
101
98
|
];
|
|
@@ -87,6 +87,7 @@ export default function getConfig({ configPath, cwd }: {
|
|
|
87
87
|
apiRoot?: string;
|
|
88
88
|
getModuleName?: "nestjs-operation-id" | (string & {}) | "api" | import("vovk/mjs/types").GetOpenAPINameFn;
|
|
89
89
|
getMethodName?: "nestjs-operation-id" | "camel-case-operation-id" | "auto" | import("vovk/mjs/types").GetOpenAPINameFn;
|
|
90
|
+
errorMessageKey?: string;
|
|
90
91
|
};
|
|
91
92
|
};
|
|
92
93
|
} | null;
|
|
@@ -20,7 +20,7 @@ async function getOpenApiSpecRemote(openApiSpecUrl) {
|
|
|
20
20
|
}
|
|
21
21
|
export async function normalizeOpenAPIMixins({ mixinModules, cwd = process.cwd(), }) {
|
|
22
22
|
if (mixinModules) {
|
|
23
|
-
const modules = await Promise.all(Object.entries(mixinModules).map(async ([mixinName, { source, apiRoot, getModuleName, getMethodName }]) => {
|
|
23
|
+
const modules = await Promise.all(Object.entries(mixinModules).map(async ([mixinName, { source, apiRoot, getModuleName, getMethodName, errorMessageKey }]) => {
|
|
24
24
|
let openAPIObject;
|
|
25
25
|
if ('url' in source) {
|
|
26
26
|
openAPIObject = await getOpenApiSpecRemote(source.url);
|
|
@@ -39,6 +39,7 @@ export async function normalizeOpenAPIMixins({ mixinModules, cwd = process.cwd()
|
|
|
39
39
|
apiRoot,
|
|
40
40
|
getModuleName,
|
|
41
41
|
getMethodName,
|
|
42
|
+
errorMessageKey,
|
|
42
43
|
mixinName,
|
|
43
44
|
};
|
|
44
45
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vovk-cli",
|
|
3
|
-
"version": "0.0.1-draft.
|
|
3
|
+
"version": "0.0.1-draft.255",
|
|
4
4
|
"bin": {
|
|
5
5
|
"vovk": "./dist/index.mjs"
|
|
6
6
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://vovk.dev",
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"vovk": "^3.0.0-draft.
|
|
38
|
+
"vovk": "^3.0.0-draft.292"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
41
|
"vovk-python": "^0.0.1-draft.41"
|