@povio/openapi-codegen-cli 2.0.8-rc.11 → 2.0.8-rc.12
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as deepMerge, p as DEFAULT_GENERATE_OPTIONS, r as writeGenerateFileData, t as generateCodeFromOpenAPIDoc, x as Profiler } from "./generateCodeFromOpenAPIDoc-
|
|
1
|
+
import { a as deepMerge, p as DEFAULT_GENERATE_OPTIONS, r as writeGenerateFileData, t as generateCodeFromOpenAPIDoc, x as Profiler } from "./generateCodeFromOpenAPIDoc-Bn7F_nBN.mjs";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import SwaggerParser from "@apidevtools/swagger-parser";
|
package/dist/{generateCodeFromOpenAPIDoc-CfeJeQ0w.mjs → generateCodeFromOpenAPIDoc-Bn7F_nBN.mjs}
RENAMED
|
@@ -3873,7 +3873,8 @@ function generateQueries(params) {
|
|
|
3873
3873
|
lines.push("");
|
|
3874
3874
|
lines.push(renderQueryKeys({
|
|
3875
3875
|
resolver,
|
|
3876
|
-
queryEndpoints
|
|
3876
|
+
queryEndpoints,
|
|
3877
|
+
tag
|
|
3877
3878
|
}));
|
|
3878
3879
|
lines.push("");
|
|
3879
3880
|
for (const endpoint of endpoints) {
|
|
@@ -4007,16 +4008,20 @@ function renderQueryJsDocs({ resolver, endpoint, mode }) {
|
|
|
4007
4008
|
lines.push(" */");
|
|
4008
4009
|
return lines.join("\n");
|
|
4009
4010
|
}
|
|
4010
|
-
function renderQueryKeys({ resolver, queryEndpoints }) {
|
|
4011
|
+
function renderQueryKeys({ resolver, queryEndpoints, tag }) {
|
|
4011
4012
|
if (queryEndpoints.length === 0) return "";
|
|
4012
4013
|
const lines = [];
|
|
4013
4014
|
lines.push("export const keys = {");
|
|
4014
4015
|
lines.push(` all: [${QUERIES_MODULE_NAME}] as const,`);
|
|
4015
4016
|
for (const endpoint of queryEndpoints) {
|
|
4016
|
-
lines.push(` ${getEndpointName(endpoint)}: (${renderEndpointParams(resolver, endpoint, {
|
|
4017
|
+
lines.push(` ${getEndpointName(endpoint)}: (${renderEndpointParams(resolver, endpoint, {
|
|
4018
|
+
pathParamsRequiredOnly: true,
|
|
4019
|
+
modelNamespaceTag: tag
|
|
4020
|
+
})}) => [...keys.all, "${endpoint.path}", ${renderEndpointArgs(resolver, endpoint, {})}] as const,`);
|
|
4017
4021
|
if (resolver.options.infiniteQueries && isInfiniteQuery(endpoint, resolver.options)) lines.push(` ${getEndpointName(endpoint)}Infinite: (${renderEndpointParams(resolver, endpoint, {
|
|
4018
4022
|
excludePageParam: true,
|
|
4019
|
-
pathParamsRequiredOnly: true
|
|
4023
|
+
pathParamsRequiredOnly: true,
|
|
4024
|
+
modelNamespaceTag: tag
|
|
4020
4025
|
})}) => [...keys.all, "${endpoint.path}", "infinite", ${renderEndpointArgs(resolver, endpoint, { excludePageParam: true })}] as const,`);
|
|
4021
4026
|
}
|
|
4022
4027
|
lines.push("};");
|
package/dist/generator.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as isMediaTypeAllowed, b as formatTag, c as getSchemaTsMetaType, d as getTagImportPath, f as getQueryName, h as GenerateType, i as getDataFromOpenAPIDoc, l as getTsTypeBase, m as getNamespaceName, o as isMutation, p as DEFAULT_GENERATE_OPTIONS, s as isQuery, t as generateCodeFromOpenAPIDoc, v as isParamMediaTypeAllowed, y as invalidVariableNameCharactersToCamel } from "./generateCodeFromOpenAPIDoc-
|
|
1
|
+
import { _ as isMediaTypeAllowed, b as formatTag, c as getSchemaTsMetaType, d as getTagImportPath, f as getQueryName, h as GenerateType, i as getDataFromOpenAPIDoc, l as getTsTypeBase, m as getNamespaceName, o as isMutation, p as DEFAULT_GENERATE_OPTIONS, s as isQuery, t as generateCodeFromOpenAPIDoc, v as isParamMediaTypeAllowed, y as invalidVariableNameCharactersToCamel } from "./generateCodeFromOpenAPIDoc-Bn7F_nBN.mjs";
|
|
2
2
|
import SwaggerParser from "@apidevtools/swagger-parser";
|
|
3
3
|
|
|
4
4
|
//#region src/generators/core/getMetadataFromOpenAPIDoc.ts
|
package/dist/sh.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { S as VALIDATION_ERROR_TYPE_TITLE, g as groupByType, h as GenerateType, i as getDataFromOpenAPIDoc, n as getOutputFileName, u as getTagFileName, x as Profiler } from "./generateCodeFromOpenAPIDoc-
|
|
3
|
-
import { n as resolveConfig, t as runGenerate } from "./generate.runner-
|
|
2
|
+
import { S as VALIDATION_ERROR_TYPE_TITLE, g as groupByType, h as GenerateType, i as getDataFromOpenAPIDoc, n as getOutputFileName, u as getTagFileName, x as Profiler } from "./generateCodeFromOpenAPIDoc-Bn7F_nBN.mjs";
|
|
3
|
+
import { n as resolveConfig, t as runGenerate } from "./generate.runner-u8B_KeRx.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import yargs from "yargs";
|
|
6
6
|
import { hideBin } from "yargs/helpers";
|
|
@@ -39,7 +39,7 @@ function logBanner(message) {
|
|
|
39
39
|
* Fetch the version from package.json
|
|
40
40
|
*/
|
|
41
41
|
function getVersion() {
|
|
42
|
-
return "2.0.8-rc.
|
|
42
|
+
return "2.0.8-rc.12";
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
//#endregion
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as Profiler } from "./generateCodeFromOpenAPIDoc-
|
|
2
|
-
import { t as runGenerate } from "./generate.runner-
|
|
1
|
+
import { x as Profiler } from "./generateCodeFromOpenAPIDoc-Bn7F_nBN.mjs";
|
|
2
|
+
import { t as runGenerate } from "./generate.runner-u8B_KeRx.mjs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
|
|
5
5
|
//#region src/vite/openapi-codegen.plugin.ts
|