ts-openapi-codegen 2.0.0-beta.8 → 2.0.0-beta.9
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/cli/checkAndUpdateConfig/checkConfig.d.ts +2 -1
- package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts.map +1 -1
- package/dist/cli/checkAndUpdateConfig/checkConfig.js +14 -6
- package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts +2 -1
- package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts.map +1 -1
- package/dist/cli/checkAndUpdateConfig/updateConfig.js +13 -5
- package/dist/cli/generateOpenApiClient/generateOpenApiClient.d.ts.map +1 -1
- package/dist/cli/generateOpenApiClient/generateOpenApiClient.js +4 -5
- package/dist/cli/index.js +5 -5
- package/dist/cli/initOpenApiConfig/init.d.ts.map +1 -1
- package/dist/cli/initOpenApiConfig/init.js +5 -13
- package/dist/cli/initOpenApiConfig/initConfig.js +3 -3
- package/dist/cli/previewChanges/previewChanges.d.ts.map +1 -1
- package/dist/cli/previewChanges/previewChanges.js +12 -5
- package/dist/cli/schemas/base.d.ts +6 -1
- package/dist/cli/schemas/base.d.ts.map +1 -1
- package/dist/cli/schemas/base.js +10 -6
- package/dist/cli/schemas/checkConfig.d.ts +1 -1
- package/dist/cli/schemas/generate.d.ts +1 -25
- package/dist/cli/schemas/generate.d.ts.map +1 -1
- package/dist/cli/schemas/generate.js +21 -32
- package/dist/cli/schemas/index.d.ts +2 -1
- package/dist/cli/schemas/index.d.ts.map +1 -1
- package/dist/cli/schemas/index.js +1 -0
- package/dist/cli/schemas/init.d.ts +5 -5
- package/dist/cli/schemas/init.d.ts.map +1 -1
- package/dist/cli/schemas/init.js +4 -5
- package/dist/cli/schemas/previewChanges.d.ts +9 -0
- package/dist/cli/schemas/previewChanges.d.ts.map +1 -0
- package/dist/cli/schemas/previewChanges.js +11 -0
- package/dist/cli/schemas/updateConfig.d.ts +1 -1
- package/dist/common/Consts.d.ts +2 -0
- package/dist/common/Consts.d.ts.map +1 -1
- package/dist/common/Consts.js +4 -1
- package/dist/common/LoggerMessages.js +1 -1
- package/dist/common/TRawOptions.d.ts +1 -1
- package/dist/common/TRawOptions.d.ts.map +1 -1
- package/dist/common/Validation/formatZodError.d.ts +10 -0
- package/dist/common/Validation/formatZodError.d.ts.map +1 -0
- package/dist/{cli/validation/errorFormatter.js → common/Validation/formatZodError.js} +14 -13
- package/dist/common/Validation/index.d.ts +3 -0
- package/dist/common/Validation/index.d.ts.map +1 -0
- package/dist/{cli/validation → common/Validation}/index.js +2 -2
- package/dist/{cli/validation/validateCLIOptions.d.ts → common/Validation/validateZodOptions.d.ts} +4 -4
- package/dist/common/Validation/validateZodOptions.d.ts.map +1 -0
- package/dist/{cli/validation/validateCLIOptions.js → common/Validation/validateZodOptions.js} +7 -10
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.d.ts +6 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.js +8 -14
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts +28 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.js +25 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts +36 -6
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.js +33 -37
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts +37 -6
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.js +30 -37
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts +40 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.js +36 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts +65 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.js +31 -0
- package/dist/common/VersionedSchema/CommonSchemas.d.ts +53 -30
- package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/CommonSchemas.js +47 -72
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts +25 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.js +34 -17
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts +25 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.js +28 -19
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts +25 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.js +29 -2
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts +25 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.js +30 -14
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts +23 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.js +33 -18
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts +3 -2
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.js +18 -11
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts +22 -5
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.js +30 -12
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts +22 -5
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.js +27 -13
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts +22 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.js +28 -2
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts +22 -5
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.js +31 -12
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts +3 -2
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.js +15 -9
- package/dist/common/VersionedSchema/Types.d.ts +5 -5
- package/dist/common/VersionedSchema/Types.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts +16 -0
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.js +85 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.d.ts +2 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.js +23 -0
- package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.d.ts +2 -0
- package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.js +75 -0
- package/dist/common/VersionedSchema/Utils/buildVersionedSchema.d.ts +12 -0
- package/dist/common/VersionedSchema/Utils/buildVersionedSchema.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/buildVersionedSchema.js +13 -0
- package/dist/common/VersionedSchema/Utils/compareShapes.d.ts +16 -0
- package/dist/common/VersionedSchema/Utils/compareShapes.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/compareShapes.js +30 -0
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts +2 -1
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.js +5 -5
- package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts +2 -2
- package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.js +15 -7
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts +2 -2
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.js +16 -3
- package/dist/common/VersionedSchema/Utils/getUniqueObjectKeys.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/getUniqueObjectKeys.js +19 -2
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts +2 -1
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.js +10 -9
- package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.d.ts +4 -0
- package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.d.ts.map +1 -0
- package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.js +43 -0
- package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.d.ts +4 -0
- package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.d.ts.map +1 -0
- package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.js +21 -0
- package/dist/core/Context.d.ts +6 -5
- package/dist/core/Context.d.ts.map +1 -1
- package/dist/core/Context.js +69 -26
- package/dist/core/OpenApiClient.d.ts.map +1 -1
- package/dist/core/OpenApiClient.js +12 -8
- package/dist/core/api/v2/Parser.d.ts +1 -1
- package/dist/core/api/v2/Parser.d.ts.map +1 -1
- package/dist/core/api/v2/Parser.js +2 -2
- package/dist/core/api/v2/parser/getModel.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getModel.js +2 -5
- package/dist/core/api/v2/parser/getModelProperties.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getModelProperties.js +1 -3
- package/dist/core/api/v2/parser/getModels.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getModels.js +1 -2
- package/dist/core/api/v2/parser/getOperationParameter.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getOperationParameter.js +2 -5
- package/dist/core/api/v2/parser/getOperationParameters.js +1 -1
- package/dist/core/api/v2/parser/getOperationResponse.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getOperationResponse.js +1 -3
- package/dist/core/api/v2/parser/getOperationResponses.js +1 -1
- package/dist/core/api/v2/parser/getServices.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getServices.js +4 -3
- package/dist/core/api/v2/parser/getType.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getType.js +2 -2
- package/dist/core/api/v3/Parser.d.ts +1 -1
- package/dist/core/api/v3/Parser.d.ts.map +1 -1
- package/dist/core/api/v3/Parser.js +2 -2
- package/dist/core/api/v3/parser/getModel.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getModel.js +2 -5
- package/dist/core/api/v3/parser/getModelProperties.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getModelProperties.js +1 -3
- package/dist/core/api/v3/parser/getModels.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getModels.js +1 -2
- package/dist/core/api/v3/parser/getOperation.js +1 -1
- package/dist/core/api/v3/parser/getOperationParameter.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getOperationParameter.js +2 -5
- package/dist/core/api/v3/parser/getOperationParameters.js +1 -1
- package/dist/core/api/v3/parser/getOperationRequestBody.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getOperationRequestBody.js +1 -3
- package/dist/core/api/v3/parser/getOperationResponse.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getOperationResponse.js +1 -3
- package/dist/core/api/v3/parser/getOperationResponses.js +1 -1
- package/dist/core/api/v3/parser/getServices.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getServices.js +4 -3
- package/dist/core/api/v3/parser/getType.js +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/utils/__tests__/isSubdirectory.test.js +2 -2
- package/dist/core/utils/serviceHelpers.d.ts.map +1 -1
- package/dist/core/utils/serviceHelpers.js +32 -6
- package/dist/core/utils/validateRawOptions.d.ts +3 -0
- package/dist/core/utils/validateRawOptions.d.ts.map +1 -0
- package/dist/core/utils/validateRawOptions.js +15 -0
- package/dist/templatesCompiled/client/exportService.js +1 -1
- package/dist/templatesCompiled/client/partials/exportComposition.d.ts +2 -0
- package/dist/templatesCompiled/client/partials/exportComposition.d.ts.map +1 -1
- package/dist/templatesCompiled/client/partials/exportComposition.js +17 -9
- package/package.json +1 -1
- package/dist/cli/validation/errorFormatter.d.ts +0 -6
- package/dist/cli/validation/errorFormatter.d.ts.map +0 -1
- package/dist/cli/validation/index.d.ts +0 -3
- package/dist/cli/validation/index.d.ts.map +0 -1
- package/dist/cli/validation/validateCLIOptions.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.d.ts +0 -6
- package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.js +0 -7
- package/dist/common/VersionedSchema/Utils/joiHandlers.d.ts +0 -6
- package/dist/common/VersionedSchema/Utils/joiHandlers.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/joiHandlers.js +0 -59
- package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.d.ts +0 -3
- package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.js +0 -12
- package/dist/common/VersionedSchema/Utils/traverseObjectStructure.d.ts +0 -3
- package/dist/common/VersionedSchema/Utils/traverseObjectStructure.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/traverseObjectStructure.js +0 -31
- package/dist/common/schemas/configSchemas.d.ts +0 -91
- package/dist/common/schemas/configSchemas.d.ts.map +0 -1
- package/dist/common/schemas/configSchemas.js +0 -131
- package/dist/common/utils/__tests__/__mock__/mockJoiSchema.d.ts +0 -19
- package/dist/common/utils/__tests__/__mock__/mockJoiSchema.d.ts.map +0 -1
- package/dist/common/utils/__tests__/__mock__/mockJoiSchema.js +0 -14
- package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.d.ts +0 -2
- package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.js +0 -38
- package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.d.ts +0 -2
- package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.js +0 -20
- package/dist/common/utils/__tests__/mergeObjectSchemas.test.d.ts +0 -2
- package/dist/common/utils/__tests__/mergeObjectSchemas.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/mergeObjectSchemas.test.js +0 -35
- package/dist/common/utils/__tests__/migrationForMultiOptions.test.d.ts +0 -2
- package/dist/common/utils/__tests__/migrationForMultiOptions.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/migrationForMultiOptions.test.js +0 -112
- package/dist/common/utils/__tests__/migrationForOptions.test.d.ts +0 -2
- package/dist/common/utils/__tests__/migrationForOptions.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/migrationForOptions.test.js +0 -56
- package/dist/core/utils/__tests__/getRelativeModelPath.test.d.ts +0 -2
- package/dist/core/utils/__tests__/getRelativeModelPath.test.d.ts.map +0 -1
- package/dist/core/utils/__tests__/getRelativeModelPath.test.js +0 -21
- package/dist/core/utils/getRelativeModelPath.d.ts +0 -9
- package/dist/core/utils/getRelativeModelPath.d.ts.map +0 -1
- package/dist/core/utils/getRelativeModelPath.js +0 -37
package/dist/common/Consts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_OUTPUT_API_DIR = exports.DEFAULT_CUSTOM_REQUEST_PATH = exports.DEFAULT_SPECS_DIR = exports.APP_LOGGER = exports.COMMON_DEFAULT_OPTIONS_VALUES = exports.DEFAULT_OPENAPI_CONFIG_FILENAME = void 0;
|
|
3
|
+
exports.DEFAULT_DIFF_CHANGES_DIR = exports.DEFAULT_PREVIEW_CHANGES_DIR = exports.DEFAULT_OUTPUT_API_DIR = exports.DEFAULT_CUSTOM_REQUEST_PATH = exports.DEFAULT_SPECS_DIR = exports.APP_LOGGER = exports.COMMON_DEFAULT_OPTIONS_VALUES = exports.DEFAULT_OPENAPI_CONFIG_FILENAME = void 0;
|
|
4
4
|
const HttpClient_enum_1 = require("../core/types/enums/HttpClient.enum");
|
|
5
5
|
const ValidationLibrary_enum_1 = require("../core/types/enums/ValidationLibrary.enum");
|
|
6
6
|
const Enums_1 = require("./Enums");
|
|
@@ -16,6 +16,7 @@ exports.COMMON_DEFAULT_OPTIONS_VALUES = {
|
|
|
16
16
|
httpClient: HttpClient_enum_1.HttpClient.FETCH,
|
|
17
17
|
useOptions: false,
|
|
18
18
|
useUnionTypes: false,
|
|
19
|
+
includeSchemasFiles: false,
|
|
19
20
|
excludeCoreServiceFiles: false,
|
|
20
21
|
request: '',
|
|
21
22
|
interfacePrefix: 'I',
|
|
@@ -36,3 +37,5 @@ exports.APP_LOGGER = new Logger_1.Logger({
|
|
|
36
37
|
exports.DEFAULT_SPECS_DIR = 'openapi/';
|
|
37
38
|
exports.DEFAULT_CUSTOM_REQUEST_PATH = './src/custom/request.ts';
|
|
38
39
|
exports.DEFAULT_OUTPUT_API_DIR = './generated';
|
|
40
|
+
exports.DEFAULT_PREVIEW_CHANGES_DIR = './.ts-openapi-codegen-preview-changes';
|
|
41
|
+
exports.DEFAULT_DIFF_CHANGES_DIR = './.ts-openapi-codegen-diff-changes';
|
|
@@ -10,7 +10,7 @@ exports.LOGGER_MESSAGES = {
|
|
|
10
10
|
GENERATION: {
|
|
11
11
|
STARTED: (count) => `Generation has begun. Total number of specification files: ${count}`,
|
|
12
12
|
FINISHED: 'Generation has been finished',
|
|
13
|
-
FINISHED_WITH_DURATION: (duration) => `Generation completed in ${duration}
|
|
13
|
+
FINISHED_WITH_DURATION: (duration) => `Generation completed in ${duration} sec`,
|
|
14
14
|
DURATION_FOR_FILE: (file, duration) => `Duration for "${file}": ${duration} sec`,
|
|
15
15
|
NO_OPTIONS: 'No options provided for generation',
|
|
16
16
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { flatOptionsSchema, rawOptionsSchema } from
|
|
2
|
+
import { flatOptionsSchema, rawOptionsSchema } from './VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas';
|
|
3
3
|
export type TRawOptions = z.infer<typeof rawOptionsSchema>;
|
|
4
4
|
export type TFlatOptions = z.infer<typeof flatOptionsSchema>;
|
|
5
5
|
export type TStrictFlatOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TRawOptions.d.ts","sourceRoot":"","sources":["../../src/common/TRawOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"TRawOptions.d.ts","sourceRoot":"","sources":["../../src/common/TRawOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAC,gBAAgB,EAAE,MAAM,+DAA+D,CAAC;AAEnH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG;KAC5B,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAC5D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ZodError } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Форматирует Zod ошибку в читаемое сообщение для CLI
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatZodError(error: ZodError): string[];
|
|
6
|
+
/**
|
|
7
|
+
* Форматирует путь к полю в читаемый формат
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatZodPath(path: (string | number | symbol)[]): string;
|
|
10
|
+
//# sourceMappingURL=formatZodError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatZodError.d.ts","sourceRoot":"","sources":["../../../src/common/Validation/formatZodError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,EAAE,CAYxD;AAkFD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CA2BxE"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatZodError = formatZodError;
|
|
4
|
+
exports.formatZodPath = formatZodPath;
|
|
4
5
|
/**
|
|
5
6
|
* Форматирует Zod ошибку в читаемое сообщение для CLI
|
|
6
7
|
*/
|
|
7
|
-
function
|
|
8
|
+
function formatZodError(error) {
|
|
8
9
|
if (!error || error.issues.length === 0) {
|
|
9
|
-
return
|
|
10
|
+
return [];
|
|
10
11
|
}
|
|
11
12
|
const messages = [];
|
|
12
13
|
for (const issue of error.issues) {
|
|
13
|
-
messages.push(
|
|
14
|
+
messages.push(formatZodIssue(issue));
|
|
14
15
|
}
|
|
15
|
-
return messages
|
|
16
|
+
return messages;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Форматирует отдельную Zod issue в читаемое сообщение
|
|
19
20
|
*/
|
|
20
|
-
function
|
|
21
|
-
const path =
|
|
21
|
+
function formatZodIssue(issue) {
|
|
22
|
+
const path = formatZodPath(issue.path);
|
|
22
23
|
const message = issue.message;
|
|
23
24
|
// Если issue имеет кастомное сообщение, используем его
|
|
24
25
|
if (issue.code === 'custom') {
|
|
@@ -27,7 +28,7 @@ function formatIssue(issue) {
|
|
|
27
28
|
// Форматируем стандартные ошибки с использованием type guards
|
|
28
29
|
if (issue.code === 'invalid_type') {
|
|
29
30
|
if ('received' in issue && issue.received === 'undefined') {
|
|
30
|
-
const fieldName =
|
|
31
|
+
const fieldName = formatZodPath(issue.path).replace(/^--/, '');
|
|
31
32
|
return `${path}: "${fieldName}" is required`;
|
|
32
33
|
}
|
|
33
34
|
if ('expected' in issue && 'received' in issue) {
|
|
@@ -35,7 +36,7 @@ function formatIssue(issue) {
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
if (issue.code === 'invalid_format' && 'format' in issue) {
|
|
38
|
-
const fieldName =
|
|
39
|
+
const fieldName = formatZodPath(issue.path).replace(/^--/, '');
|
|
39
40
|
const format = issue.format;
|
|
40
41
|
if (format === 'email') {
|
|
41
42
|
return `${path}: "${fieldName}" must be a valid email`;
|
|
@@ -46,7 +47,7 @@ function formatIssue(issue) {
|
|
|
46
47
|
return `${path}: "${fieldName}" has invalid format: ${format}`;
|
|
47
48
|
}
|
|
48
49
|
if (issue.code === 'too_small' && 'minimum' in issue && 'type' in issue) {
|
|
49
|
-
const fieldName =
|
|
50
|
+
const fieldName = formatZodPath(issue.path).replace(/^--/, '');
|
|
50
51
|
const type = issue.type;
|
|
51
52
|
const minimum = issue.minimum;
|
|
52
53
|
if (type === 'string') {
|
|
@@ -60,7 +61,7 @@ function formatIssue(issue) {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
if (issue.code === 'too_big' && 'maximum' in issue && 'type' in issue) {
|
|
63
|
-
const fieldName =
|
|
64
|
+
const fieldName = formatZodPath(issue.path).replace(/^--/, '');
|
|
64
65
|
const type = issue.type;
|
|
65
66
|
const maximum = issue.maximum;
|
|
66
67
|
if (type === 'string') {
|
|
@@ -74,7 +75,7 @@ function formatIssue(issue) {
|
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
if (issue.code === 'invalid_value') {
|
|
77
|
-
const fieldName =
|
|
78
|
+
const fieldName = formatZodPath(issue.path).replace(/^--/, '');
|
|
78
79
|
return `${path}: "${fieldName}" has invalid value`;
|
|
79
80
|
}
|
|
80
81
|
if (issue.code === 'unrecognized_keys' && 'keys' in issue) {
|
|
@@ -86,7 +87,7 @@ function formatIssue(issue) {
|
|
|
86
87
|
/**
|
|
87
88
|
* Форматирует путь к полю в читаемый формат
|
|
88
89
|
*/
|
|
89
|
-
function
|
|
90
|
+
function formatZodPath(path) {
|
|
90
91
|
if (path.length === 0) {
|
|
91
92
|
return 'root';
|
|
92
93
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/Validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./formatZodError"), exports);
|
|
18
|
+
__exportStar(require("./validateZodOptions"), exports);
|
package/dist/{cli/validation/validateCLIOptions.d.ts → common/Validation/validateZodOptions.d.ts}
RENAMED
|
@@ -7,21 +7,21 @@ export type ValidationResult<T> = {
|
|
|
7
7
|
data: T;
|
|
8
8
|
} | {
|
|
9
9
|
success: false;
|
|
10
|
-
|
|
10
|
+
errors: string[];
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Валидирует данные с помощью Zod схемы и возвращает отформатированный результат
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function validateZodOptions<T>(schema: ZodSchema<T>, data: unknown): ValidationResult<T>;
|
|
16
16
|
/**
|
|
17
17
|
* Валидирует данные с помощью Zod схемы и возвращает raw результат
|
|
18
18
|
* (полезно когда нужен доступ к ZodError для дополнительной обработки)
|
|
19
19
|
*/
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function validateZodOptionsRaw<T>(schema: ZodSchema<T>, data: unknown): {
|
|
21
21
|
success: true;
|
|
22
22
|
data: T;
|
|
23
23
|
} | {
|
|
24
24
|
success: false;
|
|
25
25
|
error: ZodError;
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=
|
|
27
|
+
//# sourceMappingURL=validateZodOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateZodOptions.d.ts","sourceRoot":"","sources":["../../../src/common/Validation/validateZodOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAI1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEpG;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAc9F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAQ9I"}
|
package/dist/{cli/validation/validateCLIOptions.js → common/Validation/validateZodOptions.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.validateZodOptions = validateZodOptions;
|
|
4
|
+
exports.validateZodOptionsRaw = validateZodOptionsRaw;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const
|
|
6
|
+
const formatZodError_1 = require("./formatZodError");
|
|
7
7
|
/**
|
|
8
8
|
* Валидирует данные с помощью Zod схемы и возвращает отформатированный результат
|
|
9
9
|
*/
|
|
10
|
-
function
|
|
10
|
+
function validateZodOptions(schema, data) {
|
|
11
11
|
try {
|
|
12
12
|
const result = schema.parse(data);
|
|
13
13
|
return { success: true, data: result };
|
|
@@ -16,20 +16,17 @@ function validateCLIOptions(schema, data) {
|
|
|
16
16
|
if (error instanceof zod_1.ZodError) {
|
|
17
17
|
return {
|
|
18
18
|
success: false,
|
|
19
|
-
|
|
19
|
+
errors: (0, formatZodError_1.formatZodError)(error),
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
success: false,
|
|
24
|
-
error: error instanceof Error ? error.message : 'Unknown validation error',
|
|
25
|
-
};
|
|
22
|
+
throw new Error(error instanceof Error ? error.message : 'Unknown validation error');
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
25
|
/**
|
|
29
26
|
* Валидирует данные с помощью Zod схемы и возвращает raw результат
|
|
30
27
|
* (полезно когда нужен доступ к ZodError для дополнительной обработки)
|
|
31
28
|
*/
|
|
32
|
-
function
|
|
29
|
+
function validateZodOptionsRaw(schema, data) {
|
|
33
30
|
const result = schema.safeParse(data);
|
|
34
31
|
if (result.success) {
|
|
35
32
|
return { success: true, data: result.data };
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { VersionedSchema } from '../Types';
|
|
2
3
|
/**
|
|
3
4
|
* Unified array of all versioned schemas with prefixed versions.
|
|
4
5
|
* This allows migration from any old schema version to the latest unified schema.
|
|
5
6
|
* Reuses existing schema arrays to avoid code duplication.
|
|
7
|
+
*
|
|
8
|
+
* ВАЖНО!
|
|
9
|
+
* После обновления allVersionedSchemas необходимо обновить файл compatibilityCases
|
|
10
|
+
* src/common/VersionedSchema/Utils/__mocks__/compatibilityCases.ts
|
|
6
11
|
*/
|
|
7
|
-
export declare const allVersionedSchemas: VersionedSchema<
|
|
12
|
+
export declare const allVersionedSchemas: VersionedSchema<z.ZodTypeAny>[];
|
|
8
13
|
//# sourceMappingURL=AllVersionedSchemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllVersionedSchemas.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AllVersionedSchemas.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAgB3C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,EAS9D,CAAC"}
|
|
@@ -4,8 +4,7 @@ exports.allVersionedSchemas = void 0;
|
|
|
4
4
|
const Enums_1 = require("../Enums");
|
|
5
5
|
const MultiOptionsVersionedSchemas_1 = require("../MultiOptionsVersioned/MultiOptionsVersionedSchemas");
|
|
6
6
|
const OptionsVersionedSchemas_1 = require("../OptionsVersioned/OptionsVersionedSchemas");
|
|
7
|
-
const
|
|
8
|
-
const UnifiedOptionsSchemaV2_1 = require("./UnifiedOptionsSchemaV2");
|
|
7
|
+
const UnifiedVersionedSchemas_1 = require("./UnifiedVersionedSchemas");
|
|
9
8
|
/**
|
|
10
9
|
* Adds a prefix to all version strings in a versioned schema array.
|
|
11
10
|
*/
|
|
@@ -19,21 +18,16 @@ function addVersionPrefix(schemas, prefix) {
|
|
|
19
18
|
* Unified array of all versioned schemas with prefixed versions.
|
|
20
19
|
* This allows migration from any old schema version to the latest unified schema.
|
|
21
20
|
* Reuses existing schema arrays to avoid code duplication.
|
|
21
|
+
*
|
|
22
|
+
* ВАЖНО!
|
|
23
|
+
* После обновления allVersionedSchemas необходимо обновить файл compatibilityCases
|
|
24
|
+
* src/common/VersionedSchema/Utils/__mocks__/compatibilityCases.ts
|
|
22
25
|
*/
|
|
23
26
|
exports.allVersionedSchemas = [
|
|
24
27
|
// OPTIONS schemas with prefix
|
|
25
|
-
...addVersionPrefix(OptionsVersionedSchemas_1.optionsVersionedSchemas,
|
|
28
|
+
...addVersionPrefix(OptionsVersionedSchemas_1.optionsVersionedSchemas, Enums_1.EVersionedSchemaType.OPTIONS),
|
|
26
29
|
// MULTI_OPTIONS schemas with prefix
|
|
27
|
-
...addVersionPrefix(MultiOptionsVersionedSchemas_1.multiOptionsVersionedSchema,
|
|
30
|
+
...addVersionPrefix(MultiOptionsVersionedSchemas_1.multiOptionsVersionedSchema, Enums_1.EVersionedSchemaType.MULTI_OPTIONS),
|
|
28
31
|
// UNIFIED_OPTIONS schemas (latest)
|
|
29
|
-
|
|
30
|
-
version: 'UNIFIED_v1',
|
|
31
|
-
schema: UnifiedOptionsSchemaV1_1.unifiedOptionsSchemaV1,
|
|
32
|
-
type: Enums_1.EVersionedSchemaType.UNIFIED_OPTIONS,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
version: 'UNIFIED_v2',
|
|
36
|
-
schema: UnifiedOptionsSchemaV2_1.unifiedOptionsSchemaV2,
|
|
37
|
-
type: Enums_1.EVersionedSchemaType.UNIFIED_OPTIONS,
|
|
38
|
-
}
|
|
32
|
+
...addVersionPrefix(UnifiedVersionedSchemas_1.unifiedVersionedSchemas, Enums_1.EVersionedSchemaType.UNIFIED_OPTIONS)
|
|
39
33
|
];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpClient } from '../../../core/types/enums/HttpClient.enum';
|
|
3
|
+
import { ELogLevel, ELogOutput } from '../../Enums';
|
|
4
|
+
export declare const unifiedOptionsShape: z.ZodObject<{
|
|
5
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6
|
+
input: z.ZodString;
|
|
7
|
+
request: z.ZodOptional<z.ZodString>;
|
|
8
|
+
sortByRequired: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
interfacePrefix: z.ZodOptional<z.ZodString>;
|
|
12
|
+
enumPrefix: z.ZodOptional<z.ZodString>;
|
|
13
|
+
typePrefix: z.ZodOptional<z.ZodString>;
|
|
14
|
+
output: z.ZodString;
|
|
15
|
+
outputCore: z.ZodOptional<z.ZodString>;
|
|
16
|
+
outputServices: z.ZodOptional<z.ZodString>;
|
|
17
|
+
outputModels: z.ZodOptional<z.ZodString>;
|
|
18
|
+
outputSchemas: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
input: z.ZodOptional<z.ZodString>;
|
|
21
|
+
output: z.ZodOptional<z.ZodString>;
|
|
22
|
+
httpClient: z.ZodEnum<typeof HttpClient>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const debugSettingsShape: z.ZodObject<{
|
|
25
|
+
logLevel: z.ZodOptional<z.ZodEnum<typeof ELogLevel>>;
|
|
26
|
+
logTarget: z.ZodOptional<z.ZodEnum<typeof ELogOutput>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
//# sourceMappingURL=UnifiedBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnifiedBase.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAapD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;iBAK9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.debugSettingsShape = exports.unifiedOptionsShape = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const HttpClient_enum_1 = require("../../../core/types/enums/HttpClient.enum");
|
|
6
|
+
const Enums_1 = require("../../Enums");
|
|
7
|
+
const CommonSchemas_1 = require("../CommonSchemas");
|
|
8
|
+
const unifiedItemSchema = zod_1.z
|
|
9
|
+
.object({
|
|
10
|
+
...CommonSchemas_1.outputPathsSchema.shape,
|
|
11
|
+
...CommonSchemas_1.additionalParametersSchemaV2.shape,
|
|
12
|
+
...CommonSchemas_1.experimentalParametersSchemaV2.shape,
|
|
13
|
+
input: zod_1.z.string().min(1),
|
|
14
|
+
request: zod_1.z.string().optional(),
|
|
15
|
+
});
|
|
16
|
+
exports.unifiedOptionsShape = zod_1.z.object({
|
|
17
|
+
items: zod_1.z.array(unifiedItemSchema).min(1).optional(),
|
|
18
|
+
input: zod_1.z.string().optional(),
|
|
19
|
+
output: zod_1.z.string().optional(),
|
|
20
|
+
httpClient: zod_1.z.enum(HttpClient_enum_1.HttpClient),
|
|
21
|
+
});
|
|
22
|
+
exports.debugSettingsShape = zod_1.z.object({
|
|
23
|
+
logLevel: zod_1.z.enum(Enums_1.ELogLevel).optional(),
|
|
24
|
+
logTarget: zod_1.z.enum(Enums_1.ELogOutput).optional(),
|
|
25
|
+
});
|
|
@@ -1,7 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const unifiedOptionsSchemaV1: z.ZodObject<{
|
|
3
|
+
sortByRequired: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
+
useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
request: z.ZodOptional<z.ZodString>;
|
|
7
|
+
interfacePrefix: z.ZodOptional<z.ZodString>;
|
|
8
|
+
enumPrefix: z.ZodOptional<z.ZodString>;
|
|
9
|
+
typePrefix: z.ZodOptional<z.ZodString>;
|
|
10
|
+
useOptions: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
useUnionTypes: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
excludeCoreServiceFiles: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
includeSchemasFiles: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
outputCore: z.ZodOptional<z.ZodString>;
|
|
15
|
+
outputServices: z.ZodOptional<z.ZodString>;
|
|
16
|
+
outputModels: z.ZodOptional<z.ZodString>;
|
|
17
|
+
outputSchemas: z.ZodOptional<z.ZodString>;
|
|
18
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
19
|
+
input: z.ZodString;
|
|
20
|
+
request: z.ZodOptional<z.ZodString>;
|
|
21
|
+
sortByRequired: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
interfacePrefix: z.ZodOptional<z.ZodString>;
|
|
25
|
+
enumPrefix: z.ZodOptional<z.ZodString>;
|
|
26
|
+
typePrefix: z.ZodOptional<z.ZodString>;
|
|
27
|
+
output: z.ZodString;
|
|
28
|
+
outputCore: z.ZodOptional<z.ZodString>;
|
|
29
|
+
outputServices: z.ZodOptional<z.ZodString>;
|
|
30
|
+
outputModels: z.ZodOptional<z.ZodString>;
|
|
31
|
+
outputSchemas: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
input: z.ZodOptional<z.ZodString>;
|
|
34
|
+
output: z.ZodOptional<z.ZodString>;
|
|
35
|
+
httpClient: z.ZodEnum<typeof import("../../..").HttpClient>;
|
|
36
|
+
}, z.core.$strip>;
|
|
7
37
|
//# sourceMappingURL=UnifiedOptionsSchemaV1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedOptionsSchemaV1.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"UnifiedOptionsSchemaV1.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAOtB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,CAAC"}
|
|
@@ -1,41 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.unifiedOptionsSchemaV1 = void 0;
|
|
7
|
-
const
|
|
8
|
-
const HttpClient_enum_1 = require("../../../core/types/enums/HttpClient.enum");
|
|
4
|
+
const zod_1 = require("zod");
|
|
9
5
|
const CommonSchemas_1 = require("../CommonSchemas");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
6
|
+
const UnifiedBase_1 = require("./UnifiedBase");
|
|
7
|
+
const outputPathsSchemaWithoutOutput = CommonSchemas_1.outputPathsSchema.omit({ output: true });
|
|
8
|
+
exports.unifiedOptionsSchemaV1 = zod_1.z.object({
|
|
9
|
+
...UnifiedBase_1.unifiedOptionsShape.shape,
|
|
10
|
+
...outputPathsSchemaWithoutOutput.shape,
|
|
11
|
+
...CommonSchemas_1.specialParametersSchemasV2.shape,
|
|
12
|
+
...CommonSchemas_1.additionalParametersSchemaV2.shape,
|
|
13
|
+
...CommonSchemas_1.experimentalParametersSchemaV2.shape,
|
|
14
|
+
});
|
|
15
|
+
/*
|
|
16
|
+
type TUnified = {
|
|
17
|
+
httpClient: HttpClient.FETCH | HttpClient.XHR | HttpClient.NODE | HttpClient.AXIOS;
|
|
18
|
+
useCancelableRequest: boolean | undefined;
|
|
19
|
+
sortByRequired: boolean | undefined;
|
|
20
|
+
useSeparatedIndexes: boolean | undefined;
|
|
21
|
+
request: string | undefined;
|
|
22
|
+
interfacePrefix: string | undefined;
|
|
23
|
+
enumPrefix: string | undefined;
|
|
24
|
+
typePrefix: string | undefined;
|
|
25
|
+
useOptions: boolean | undefined;
|
|
26
|
+
useUnionTypes: boolean | undefined;
|
|
27
|
+
excludeCoreServiceFiles: boolean | undefined;
|
|
28
|
+
includeSchemasFiles: boolean | undefined;
|
|
29
|
+
outputCore: string | undefined;
|
|
30
|
+
outputServices: string | undefined;
|
|
31
|
+
outputModels: string | undefined;
|
|
32
|
+
outputSchemas: string | undefined;
|
|
33
|
+
items: { ... 13 more }[] | undefined;
|
|
34
|
+
input: string | undefined;
|
|
35
|
+
output: string | undefined;
|
|
36
|
+
}
|
|
37
|
+
*/
|
|
@@ -1,7 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const unifiedOptionsSchemaV2: z.ZodObject<{
|
|
3
|
+
useOptions: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
+
useUnionTypes: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
excludeCoreServiceFiles: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
validationLibrary: z.ZodOptional<z.ZodEnum<typeof import("../../../core/types/enums/ValidationLibrary.enum").ValidationLibrary>>;
|
|
7
|
+
sortByRequired: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
request: z.ZodOptional<z.ZodString>;
|
|
11
|
+
interfacePrefix: z.ZodOptional<z.ZodString>;
|
|
12
|
+
enumPrefix: z.ZodOptional<z.ZodString>;
|
|
13
|
+
typePrefix: z.ZodOptional<z.ZodString>;
|
|
14
|
+
includeSchemasFiles: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
outputCore: z.ZodOptional<z.ZodString>;
|
|
16
|
+
outputServices: z.ZodOptional<z.ZodString>;
|
|
17
|
+
outputModels: z.ZodOptional<z.ZodString>;
|
|
18
|
+
outputSchemas: z.ZodOptional<z.ZodString>;
|
|
19
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
input: z.ZodString;
|
|
21
|
+
request: z.ZodOptional<z.ZodString>;
|
|
22
|
+
sortByRequired: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
interfacePrefix: z.ZodOptional<z.ZodString>;
|
|
26
|
+
enumPrefix: z.ZodOptional<z.ZodString>;
|
|
27
|
+
typePrefix: z.ZodOptional<z.ZodString>;
|
|
28
|
+
output: z.ZodString;
|
|
29
|
+
outputCore: z.ZodOptional<z.ZodString>;
|
|
30
|
+
outputServices: z.ZodOptional<z.ZodString>;
|
|
31
|
+
outputModels: z.ZodOptional<z.ZodString>;
|
|
32
|
+
outputSchemas: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>>>;
|
|
34
|
+
input: z.ZodOptional<z.ZodString>;
|
|
35
|
+
output: z.ZodOptional<z.ZodString>;
|
|
36
|
+
httpClient: z.ZodEnum<typeof import("../../..").HttpClient>;
|
|
37
|
+
}, z.core.$strip>;
|
|
7
38
|
//# sourceMappingURL=UnifiedOptionsSchemaV2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedOptionsSchemaV2.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"UnifiedOptionsSchemaV2.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGjC,CAAC"}
|
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.unifiedOptionsSchemaV2 = void 0;
|
|
7
|
-
const
|
|
8
|
-
const HttpClient_enum_1 = require("../../../core/types/enums/HttpClient.enum");
|
|
4
|
+
const zod_1 = require("zod");
|
|
9
5
|
const CommonSchemas_1 = require("../CommonSchemas");
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.optional(),
|
|
40
|
-
}), CommonSchemas_1.outputPathsSchema, // outputCore, outputServices, etc. for single-item mode
|
|
41
|
-
CommonSchemas_1.specialParametersSchemasV3, CommonSchemas_1.additionalParametersSchemaV2, CommonSchemas_1.experimentalParametersSchemaV2).xor('items', 'input');
|
|
6
|
+
const UnifiedOptionsSchemaV1_1 = require("./UnifiedOptionsSchemaV1");
|
|
7
|
+
exports.unifiedOptionsSchemaV2 = zod_1.z.object({
|
|
8
|
+
...UnifiedOptionsSchemaV1_1.unifiedOptionsSchemaV1.shape,
|
|
9
|
+
...CommonSchemas_1.specialParametersSchemasV3.shape,
|
|
10
|
+
});
|
|
11
|
+
/*
|
|
12
|
+
type TUnified = {
|
|
13
|
+
output: string;
|
|
14
|
+
useOptions: boolean | undefined;
|
|
15
|
+
useUnionTypes: boolean | undefined;
|
|
16
|
+
excludeCoreServiceFiles: boolean | undefined;
|
|
17
|
+
validationLibrary: ValidationLibrary.NONE | ValidationLibrary.ZOD | ValidationLibrary.JOI | ValidationLibrary.YUP | ValidationLibrary.JSONSCHEMA | undefined;
|
|
18
|
+
useCancelableRequest: boolean | undefined;
|
|
19
|
+
sortByRequired: boolean | undefined;
|
|
20
|
+
useSeparatedIndexes: boolean | undefined;
|
|
21
|
+
request: string | undefined;
|
|
22
|
+
interfacePrefix: string | undefined;
|
|
23
|
+
enumPrefix: string | undefined;
|
|
24
|
+
typePrefix: string | undefined;
|
|
25
|
+
includeSchemasFiles: boolean | undefined;
|
|
26
|
+
outputCore: string | undefined;
|
|
27
|
+
outputServices: string | undefined;
|
|
28
|
+
outputModels: string | undefined;
|
|
29
|
+
outputSchemas: string | undefined;
|
|
30
|
+
items: { ... 13 more }[] | undefined;
|
|
31
|
+
input: string | undefined;
|
|
32
|
+
httpClient: HttpClient.FETCH | HttpClient.XHR | HttpClient.NODE | HttpClient.AXIOS | undefined;
|
|
33
|
+
}
|
|
34
|
+
*/
|