orval 8.14.0 → 8.15.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/bin/orval.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as description, i as startWatcher, l as name, n as loadConfigFile, r as generateSpec, s as normalizeOptions, t as findConfigFile, u as version } from "../config-
|
|
2
|
+
import { c as description, i as startWatcher, l as name, n as loadConfigFile, r as generateSpec, s as normalizeOptions, t as findConfigFile, u as version } from "../config-CVTlXJY3.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { Option, program } from "@commander-js/extra-typings";
|
|
5
5
|
import { ErrorWithTag, OutputClient, OutputMode, SupportedFormatter, getWarningCount, isString, log, logError, resetWarnings, setVerbose, startMessage } from "@orval/core";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { FormDataArrayHandling, GetterPropType, NamingConvention, OutputClient, OutputHttpClient, OutputMockType, OutputMode, PropertySortOrder, RefComponentSuffix, SupportedFormatter, asyncReduce, collectReferencedComponents, conventionName, createSuccessMessage, dynamicImport, fixCrossDirectoryImports, fixRegularSchemaImports, generateComponentDefinition, generateDependencyImports, generateMutator, generateParameterDefinition, generateSchemasDefinition, generateVerbsOptions, getBaseUrlRuntimeImports, getFileInfo, getFullRoute, getImportExtension, getMockFileExtensionByTypeName, getRefInfo, getRoute, isBoolean, isComponentRef, isFunction, isNullish, isObject, isReference, isString, isUrl, jsDoc, log, logError, logVerbose, logWarning, pascal, removeFilesAndEmptyFolders, resolveInstalledVersions, resolveRef, resolveValue, splitSchemasByType, upath, writeGeneratedFile, writeSchemas, writeSingleMode, writeSplitMode, writeSplitTagsMode, writeTagsMode } from "@orval/core";
|
|
2
|
+
import { FormDataArrayHandling, GetterPropType, NamingConvention, OutputClient, OutputHttpClient, OutputMockType, OutputMode, PropertySortOrder, RefComponentSuffix, SupportedFormatter, asyncReduce, buildDynamicScope, collectReferencedComponents, conventionName, createSuccessMessage, dynamicImport, fixCrossDirectoryImports, fixRegularSchemaImports, generateComponentDefinition, generateDependencyImports, generateMutator, generateParameterDefinition, generateSchemasDefinition, generateVerbsOptions, getBaseUrlRuntimeImports, getFileInfo, getFullRoute, getImportExtension, getMockFileExtensionByTypeName, getRefInfo, getRoute, isBoolean, isComponentRef, isFunction, isNullish, isObject, isReference, isString, isUrl, jsDoc, log, logError, logVerbose, logWarning, pascal, removeFilesAndEmptyFolders, resolveInstalledVersions, resolveRef, resolveValue, splitSchemasByType, upath, writeGeneratedFile, writeSchemas, writeSingleMode, writeSplitMode, writeSplitTagsMode, writeTagsMode } from "@orval/core";
|
|
3
3
|
import { bundle } from "@scalar/json-magic/bundle";
|
|
4
4
|
import { fetchUrls, parseJson, parseYaml, readFiles } from "@scalar/json-magic/bundle/plugins/node";
|
|
5
5
|
import { upgrade, validate } from "@scalar/openapi-parser";
|
|
@@ -29,7 +29,7 @@ import { createJiti } from "jiti";
|
|
|
29
29
|
//#region package.json
|
|
30
30
|
var name = "orval";
|
|
31
31
|
var description = "A swagger client generator for typescript";
|
|
32
|
-
var version = "8.
|
|
32
|
+
var version = "8.15.0";
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/client.ts
|
|
35
35
|
const DEFAULT_CLIENT = OutputClient.AXIOS;
|
|
@@ -1247,6 +1247,7 @@ function normalizeHooks(hooks) {
|
|
|
1247
1247
|
function normalizeHonoOptions(hono = {}, workspace) {
|
|
1248
1248
|
return {
|
|
1249
1249
|
...hono.handlers ? { handlers: path.resolve(workspace, hono.handlers) } : {},
|
|
1250
|
+
handlerGenerationStrategy: hono.handlerGenerationStrategy ?? "smart",
|
|
1250
1251
|
compositeRoute: hono.compositeRoute ? path.resolve(workspace, hono.compositeRoute) : "",
|
|
1251
1252
|
validator: hono.validator ?? true,
|
|
1252
1253
|
validatorOutputPath: hono.validatorOutputPath ? path.resolve(workspace, hono.validatorOutputPath) : ""
|
|
@@ -1289,6 +1290,8 @@ function normalizeQueryOptions(queryOptions = {}, outputWorkspace, globalOptions
|
|
|
1289
1290
|
...isNullish(queryOptions.shouldExportQueryKey) ? {} : { shouldExportQueryKey: queryOptions.shouldExportQueryKey },
|
|
1290
1291
|
...isNullish(globalOptions.shouldFilterQueryKey) ? {} : { shouldFilterQueryKey: globalOptions.shouldFilterQueryKey },
|
|
1291
1292
|
...isNullish(queryOptions.shouldFilterQueryKey) ? {} : { shouldFilterQueryKey: queryOptions.shouldFilterQueryKey },
|
|
1293
|
+
...isNullish(globalOptions.queryKeyFilter) ? {} : { queryKeyFilter: globalOptions.queryKeyFilter },
|
|
1294
|
+
...isNullish(queryOptions.queryKeyFilter) ? {} : { queryKeyFilter: queryOptions.queryKeyFilter },
|
|
1292
1295
|
...isNullish(globalOptions.shouldExportHttpClient) ? {} : { shouldExportHttpClient: globalOptions.shouldExportHttpClient },
|
|
1293
1296
|
...isNullish(queryOptions.shouldExportHttpClient) ? {} : { shouldExportHttpClient: queryOptions.shouldExportHttpClient },
|
|
1294
1297
|
...isNullish(globalOptions.shouldExportMutatorHooks) ? {} : { shouldExportMutatorHooks: globalOptions.shouldExportMutatorHooks },
|
|
@@ -1402,14 +1405,19 @@ const generateReusableSchemaSet = (refs, context, options) => {
|
|
|
1402
1405
|
const seen = new Set(refs);
|
|
1403
1406
|
const entries = [];
|
|
1404
1407
|
for (const ref of queue) {
|
|
1405
|
-
const
|
|
1408
|
+
const schemaName = ref.slice(21);
|
|
1409
|
+
const schema = componentSchemas[schemaName];
|
|
1406
1410
|
if (!schema) continue;
|
|
1407
1411
|
const name = resolveSchemaName(ref, context);
|
|
1408
|
-
const
|
|
1412
|
+
const scopedContext = {
|
|
1413
|
+
...context,
|
|
1414
|
+
dynamicScope: buildDynamicScope(schemaName, schema, context)
|
|
1415
|
+
};
|
|
1416
|
+
const parsed = parseZodValidationSchemaDefinition(generateZodValidationSchemaDefinition(schema, scopedContext, name, options.strict, options.isZodV4, {
|
|
1409
1417
|
required: true,
|
|
1410
1418
|
useReusableSchemas: true,
|
|
1411
1419
|
emitMeta: options.generateMeta
|
|
1412
|
-
}),
|
|
1420
|
+
}), scopedContext, options.coerce ?? false, options.strict, options.isZodV4, void 0, options.paramsMutator ? {
|
|
1413
1421
|
mutator: options.paramsMutator,
|
|
1414
1422
|
operationId: "",
|
|
1415
1423
|
location: "schema",
|
|
@@ -2262,4 +2270,4 @@ async function loadConfigFile(configFilePath) {
|
|
|
2262
2270
|
//#endregion
|
|
2263
2271
|
export { defineConfig as a, description as c, startWatcher as i, name as l, loadConfigFile as n, defineTransformer as o, generateSpec as r, normalizeOptions as s, findConfigFile as t, version as u };
|
|
2264
2272
|
|
|
2265
|
-
//# sourceMappingURL=config-
|
|
2273
|
+
//# sourceMappingURL=config-CVTlXJY3.mjs.map
|