ts-openapi-codegen 2.0.0-beta.9 → 2.0.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/README.md +88 -18
- package/README.rus.md +88 -21
- package/dist/cli/checkAndUpdateConfig/utils/validateAndMigrateConfigData.d.ts.map +1 -1
- package/dist/cli/checkAndUpdateConfig/utils/validateAndMigrateConfigData.js +5 -0
- package/dist/cli/generateOpenApiClient/generateOpenApiClient.d.ts.map +1 -1
- package/dist/cli/generateOpenApiClient/generateOpenApiClient.js +20 -8
- package/dist/cli/index.js +5 -3
- package/dist/cli/previewChanges/previewChanges.d.ts.map +1 -1
- package/dist/cli/previewChanges/previewChanges.js +116 -32
- package/dist/cli/previewChanges/utils/updateOutputPaths.d.ts.map +1 -1
- package/dist/cli/previewChanges/utils/updateOutputPaths.js +6 -0
- package/dist/common/Consts.d.ts.map +1 -1
- package/dist/common/Consts.js +4 -1
- package/dist/common/LoggerMessages.d.ts +1 -0
- package/dist/common/LoggerMessages.d.ts.map +1 -1
- package/dist/common/LoggerMessages.js +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.d.ts +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.js +14 -4
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts +2 -2
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts +2 -2
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts +2 -2
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.d.ts +42 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.js +38 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts +155 -28
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.js +13 -17
- package/dist/common/VersionedSchema/CommonSchemas.d.ts +12 -4
- package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/CommonSchemas.js +15 -7
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts +2 -2
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts +2 -2
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts +2 -2
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts +2 -2
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts +2 -2
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.js +19 -0
- package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts +2 -0
- package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.js +185 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.js +20 -3
- package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.js +19 -1
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts +4 -0
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.js +68 -23
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts +1 -1
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.js +1 -1
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts +10 -0
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.js +33 -15
- package/dist/common/utils/__tests__/convertArrayToObject.test.js +64 -169
- package/dist/common/utils/convertArrayToObject.d.ts.map +1 -1
- package/dist/common/utils/convertArrayToObject.js +51 -14
- package/dist/core/OpenApiClient.d.ts.map +1 -1
- package/dist/core/OpenApiClient.js +12 -1
- package/dist/core/WriteClient.d.ts +8 -1
- package/dist/core/WriteClient.d.ts.map +1 -1
- package/dist/core/WriteClient.js +48 -7
- package/dist/core/__tests__/WriteClient.test.js +2 -0
- package/dist/core/api/v2/parser/getType.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getType.js +2 -1
- package/dist/core/api/v3/parser/getType.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getType.js +2 -1
- package/dist/core/types/base/Templates.model.d.ts +1 -1
- package/dist/core/types/base/Templates.model.d.ts.map +1 -1
- package/dist/core/types/enums/EmptySchemaStrategy.enum.d.ts +6 -0
- package/dist/core/types/enums/EmptySchemaStrategy.enum.d.ts.map +1 -0
- package/dist/core/types/enums/EmptySchemaStrategy.enum.js +9 -0
- package/dist/core/utils/__tests__/getRelativeModelPath.test.d.ts +2 -0
- package/dist/core/utils/__tests__/getRelativeModelPath.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/getRelativeModelPath.test.js +27 -0
- package/dist/core/utils/__tests__/modelHelpers.test.d.ts +2 -0
- package/dist/core/utils/__tests__/modelHelpers.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/modelHelpers.test.js +151 -0
- package/dist/core/utils/__tests__/postProcessModelImports.test.d.ts +2 -0
- package/dist/core/utils/__tests__/postProcessModelImports.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/postProcessModelImports.test.js +67 -0
- package/dist/core/utils/__tests__/postProcessServiceImports.test.d.ts +2 -0
- package/dist/core/utils/__tests__/postProcessServiceImports.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/postProcessServiceImports.test.js +26 -0
- package/dist/core/utils/__tests__/resolveRefPath.test.d.ts +2 -0
- package/dist/core/utils/__tests__/resolveRefPath.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/resolveRefPath.test.js +22 -0
- package/dist/core/utils/__tests__/serviceHelpers.test.d.ts +2 -0
- package/dist/core/utils/__tests__/serviceHelpers.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/serviceHelpers.test.js +121 -0
- package/dist/core/utils/__tests__/writeClientExecutor.test.d.ts +2 -0
- package/dist/core/utils/__tests__/writeClientExecutor.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/writeClientExecutor.test.js +20 -0
- package/dist/core/utils/__tests__/writeClientSchemas.test.js +2 -0
- package/dist/core/utils/getOpenApiSpec.d.ts.map +1 -1
- package/dist/core/utils/getOpenApiSpec.js +14 -1
- package/dist/core/utils/getRelativeModelPath.d.ts +9 -0
- package/dist/core/utils/getRelativeModelPath.d.ts.map +1 -0
- package/dist/core/utils/getRelativeModelPath.js +37 -0
- package/dist/core/utils/modelHelpers.d.ts.map +1 -1
- package/dist/core/utils/modelHelpers.js +37 -3
- package/dist/core/utils/postProcessModelImports.d.ts.map +1 -1
- package/dist/core/utils/postProcessModelImports.js +14 -1
- package/dist/core/utils/postProcessServiceImports.d.ts.map +1 -1
- package/dist/core/utils/postProcessServiceImports.js +1 -2
- package/dist/core/utils/precompileTemplates.js +1 -0
- package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarHelpers.js +25 -0
- package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarTemplates.js +42 -41
- package/dist/core/utils/resolveRefPath.d.ts.map +1 -1
- package/dist/core/utils/resolveRefPath.js +1 -4
- package/dist/core/utils/writeClientExecutor.d.ts +4 -1
- package/dist/core/utils/writeClientExecutor.d.ts.map +1 -1
- package/dist/core/utils/writeClientExecutor.js +17 -2
- package/dist/core/utils/writeClientSchemas.d.ts +4 -1
- package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
- package/dist/core/utils/writeClientSchemas.js +11 -2
- package/dist/templatesCompiled/client/core/ApiError.js +1 -1
- package/dist/templatesCompiled/client/core/ApiResult.js +1 -1
- package/dist/templatesCompiled/client/core/axios/request.js +3 -3
- package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.d.ts +2 -0
- package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.d.ts.map +1 -1
- package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.js +13 -8
- package/dist/templatesCompiled/client/core/executor/requestExecutor.js +1 -1
- package/dist/templatesCompiled/client/core/fetch/request.js +3 -3
- package/dist/templatesCompiled/client/core/functions/catchErrors.js +1 -1
- package/dist/templatesCompiled/client/core/interceptors/withInterceptors.js +1 -1
- package/dist/templatesCompiled/client/core/node/request.js +3 -3
- package/dist/templatesCompiled/client/core/xhr/request.js +3 -3
- package/dist/templatesCompiled/client/exportClient.d.ts +4 -0
- package/dist/templatesCompiled/client/exportClient.d.ts.map +1 -1
- package/dist/templatesCompiled/client/exportClient.js +51 -13
- package/dist/templatesCompiled/client/exportSchema.d.ts +5 -1
- package/dist/templatesCompiled/client/exportSchema.d.ts.map +1 -1
- package/dist/templatesCompiled/client/exportSchema.js +37 -7
- package/dist/templatesCompiled/client/exportService.d.ts +2 -0
- package/dist/templatesCompiled/client/exportService.d.ts.map +1 -1
- package/dist/templatesCompiled/client/exportService.js +70 -30
- package/dist/templatesCompiled/client/indexFull.d.ts +1 -0
- package/dist/templatesCompiled/client/indexFull.d.ts.map +1 -1
- package/dist/templatesCompiled/client/indexFull.js +4 -1
- package/dist/templatesCompiled/client/indexSimple.d.ts +1 -0
- package/dist/templatesCompiled/client/indexSimple.d.ts.map +1 -1
- package/dist/templatesCompiled/client/indexSimple.js +4 -1
- package/dist/templatesCompiled/client/joi/exportSchema.js +5 -5
- package/dist/templatesCompiled/client/joi/partials/joiSchema.js +7 -7
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.js +4 -4
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts +5 -3
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts.map +1 -1
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.js +39 -12
- package/dist/templatesCompiled/client/jsonschema/exportSchema.js +5 -5
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.js +7 -7
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.js +5 -5
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.js +2 -2
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.js +5 -5
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts +3 -1
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts.map +1 -1
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.js +45 -15
- package/dist/templatesCompiled/client/yup/exportSchema.js +3 -3
- package/dist/templatesCompiled/client/yup/partials/yupSchema.js +7 -7
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.js +4 -4
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts +5 -3
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts.map +1 -1
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.js +39 -12
- package/dist/templatesCompiled/client/zod/exportSchema.js +3 -3
- package/dist/templatesCompiled/client/zod/partials/zodSchema.js +7 -7
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts +5 -6
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts.map +1 -1
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.js +14 -28
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts +3 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts.map +1 -1
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.js +32 -8
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts +3 -4
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts.map +1 -1
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.js +9 -23
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts +4 -2
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts.map +1 -1
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.js +18 -7
- package/package.json +2 -2
- package/dist/common/defaultOptions.d.ts +0 -3
- package/dist/common/defaultOptions.d.ts.map +0 -1
- package/dist/common/defaultOptions.js +0 -28
- package/dist/core/utils/advancedDeduplicatePath.d.ts +0 -5
- package/dist/core/utils/advancedDeduplicatePath.d.ts.map +0 -1
- package/dist/core/utils/advancedDeduplicatePath.js +0 -29
|
@@ -27,7 +27,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
27
27
|
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "alias"), { "name": "if", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 66 } } })) != null ? stack1 : "")
|
|
28
28
|
+ " } from '"
|
|
29
29
|
+ ((stack1 = lookupProperty(helpers, "normalizePath").call(alias1, lookupProperty(depth0, "path"), { "name": "normalizePath", "hash": {}, "data": data, "loc": { "start": { "line": 5, "column": 75 }, "end": { "line": 5, "column": 99 } } })) != null ? stack1 : "")
|
|
30
|
-
+ "';\n";
|
|
30
|
+
+ "Schema';\n";
|
|
31
31
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
32
32
|
var stack1;
|
|
33
33
|
return " as "
|
|
@@ -46,7 +46,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
46
46
|
+ "\nimport { z } from 'zod';\n\nexport const "
|
|
47
47
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } }), depth0)) != null ? stack1 : "")
|
|
48
48
|
+ "Schema = "
|
|
49
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
49
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
50
50
|
+ ";\n\nexport type "
|
|
51
51
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 19 } }), depth0)) != null ? stack1 : "")
|
|
52
52
|
+ " = z.infer<typeof "
|
|
@@ -63,5 +63,5 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
63
63
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 19, "column": 81 }, "end": { "line": 19, "column": 85 } }), depth0)) != null ? stack1 : "")
|
|
64
64
|
+ " } | { success: false; error: z.ZodError } {\n const result = "
|
|
65
65
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 20, "column": 22 }, "end": { "line": 20, "column": 26 } }), depth0)) != null ? stack1 : "")
|
|
66
|
-
+ "Schema.safeParse(data);\n if (result.success) {\n return { success: true, data: result.data };\n }\n return { success: false, error: result.error };\n}";
|
|
66
|
+
+ "Schema.safeParse(data);\n if (result.success) {\n return { success: true, data: result.data };\n }\n return { success: false, error: result.error };\n}\n";
|
|
67
67
|
}, "usePartial": true, "useData": true };
|
|
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaInterface"), depth0, { "name": "zodSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
16
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaInterface"), depth0, { "name": "zod/zodSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
17
17
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
18
18
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
19
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -29,7 +29,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
29
29
|
}
|
|
30
30
|
return undefined;
|
|
31
31
|
};
|
|
32
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaEnum"), depth0, { "name": "zodSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
32
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaEnum"), depth0, { "name": "zod/zodSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
33
33
|
}, "6": function (container, depth0, helpers, partials, data) {
|
|
34
34
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
35
35
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -45,7 +45,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
45
45
|
}
|
|
46
46
|
return undefined;
|
|
47
47
|
};
|
|
48
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaArray"), depth0, { "name": "zodSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
48
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaArray"), depth0, { "name": "zod/zodSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
49
49
|
}, "9": function (container, depth0, helpers, partials, data) {
|
|
50
50
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
51
51
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -61,7 +61,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
61
61
|
}
|
|
62
62
|
return undefined;
|
|
63
63
|
};
|
|
64
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaDictionary"), depth0, { "name": "zodSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
64
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaDictionary"), depth0, { "name": "zod/zodSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
65
65
|
}, "12": function (container, depth0, helpers, partials, data) {
|
|
66
66
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
67
67
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -77,7 +77,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
77
77
|
}
|
|
78
78
|
return undefined;
|
|
79
79
|
};
|
|
80
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaComposition"), depth0, { "name": "zodSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
80
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaComposition"), depth0, { "name": "zod/zodSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
81
81
|
}, "15": function (container, depth0, helpers, partials, data) {
|
|
82
82
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
83
83
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -109,7 +109,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
109
109
|
}
|
|
110
110
|
return undefined;
|
|
111
111
|
};
|
|
112
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaReference"), depth0, { "name": "zodSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
112
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaReference"), depth0, { "name": "zod/zodSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
113
113
|
}, "20": function (container, depth0, helpers, partials, data) {
|
|
114
114
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
115
115
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -117,7 +117,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
117
117
|
}
|
|
118
118
|
return undefined;
|
|
119
119
|
};
|
|
120
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaGeneric"), depth0, { "name": "zodSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
120
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaGeneric"), depth0, { "name": "zod/zodSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
121
121
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
122
122
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
123
123
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"10": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
8
|
-
"12": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
3
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
4
|
+
"5": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
5
|
+
"7": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
6
|
+
"9": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
9
7
|
compiler: (string | number)[];
|
|
10
8
|
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
9
|
+
usePartial: boolean;
|
|
11
10
|
useData: boolean;
|
|
12
11
|
};
|
|
13
12
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zodSchemaArray.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaArray.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zodSchemaArray.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaArray.ts"],"names":[],"mappings":";;;;;;;;;;;AAMA,wBA+CmC"}
|
|
@@ -13,41 +13,26 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = lookupProperty(
|
|
17
|
-
}, "
|
|
16
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), lookupProperty(depth0, "link"), { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
17
|
+
}, "3": function (container, depth0, helpers, partials, data) {
|
|
18
18
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
19
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
20
|
return parent[propertyName];
|
|
21
21
|
}
|
|
22
22
|
return undefined;
|
|
23
23
|
};
|
|
24
|
-
return ((stack1 =
|
|
25
|
-
|
|
26
|
-
}, "4": function (container, depth0, helpers, partials, data) {
|
|
27
|
-
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
29
|
-
return parent[propertyName];
|
|
30
|
-
}
|
|
31
|
-
return undefined;
|
|
32
|
-
};
|
|
33
|
-
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "type", { "start": { "line": 1, "column": 71 }, "end": { "line": 1, "column": 80 } }), depth0)) != null ? stack1 : "")
|
|
34
|
-
+ "Schema";
|
|
35
|
-
}, "6": function (container, depth0, helpers, partials, data) {
|
|
36
|
-
var stack1;
|
|
37
|
-
return "z."
|
|
38
|
-
+ ((stack1 = container.lambda(container.strict(depth0, "base", { "start": { "line": 1, "column": 109 }, "end": { "line": 1, "column": 113 } }), depth0)) != null ? stack1 : "")
|
|
39
|
-
+ "()";
|
|
40
|
-
}, "8": function (container, depth0, helpers, partials, data) {
|
|
24
|
+
return ((stack1 = lookupProperty(helpers, "zodBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), { "name": "zodBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 73 } } })) != null ? stack1 : "");
|
|
25
|
+
}, "5": function (container, depth0, helpers, partials, data) {
|
|
41
26
|
var stack1;
|
|
42
27
|
return ".min("
|
|
43
|
-
+ ((stack1 = container.lambda(container.strict(depth0, "minItems", { "start": { "line": 1, "column":
|
|
28
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "minItems", { "start": { "line": 1, "column": 105 }, "end": { "line": 1, "column": 113 } }), depth0)) != null ? stack1 : "")
|
|
44
29
|
+ ")";
|
|
45
|
-
}, "
|
|
30
|
+
}, "7": function (container, depth0, helpers, partials, data) {
|
|
46
31
|
var stack1;
|
|
47
32
|
return ".max("
|
|
48
|
-
+ ((stack1 = container.lambda(container.strict(depth0, "maxItems", { "start": { "line": 1, "column":
|
|
33
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "maxItems", { "start": { "line": 1, "column": 148 }, "end": { "line": 1, "column": 156 } }), depth0)) != null ? stack1 : "")
|
|
49
34
|
+ ")";
|
|
50
|
-
}, "
|
|
35
|
+
}, "9": function (container, depth0, helpers, partials, data) {
|
|
51
36
|
return ".nullable()";
|
|
52
37
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
53
38
|
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
@@ -57,9 +42,10 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
57
42
|
return undefined;
|
|
58
43
|
};
|
|
59
44
|
return "z.array("
|
|
60
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(
|
|
45
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(3, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 80 } } })) != null ? stack1 : "")
|
|
61
46
|
+ ")"
|
|
62
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minItems"), { "name": "if", "hash": {}, "fn": container.program(
|
|
63
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxItems"), { "name": "if", "hash": {}, "fn": container.program(
|
|
64
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(
|
|
65
|
-
|
|
47
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minItems"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 81 }, "end": { "line": 1, "column": 124 } } })) != null ? stack1 : "")
|
|
48
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxItems"), { "name": "if", "hash": {}, "fn": container.program(7, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 124 }, "end": { "line": 1, "column": 167 } } })) != null ? stack1 : "")
|
|
49
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 167 }, "end": { "line": 1, "column": 203 } } })) != null ? stack1 : "")
|
|
50
|
+
+ "\n";
|
|
51
|
+
}, "usePartial": true, "useData": true };
|
|
@@ -6,6 +6,9 @@ declare const _default: {
|
|
|
6
6
|
"7": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
7
7
|
"8": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
8
8
|
"9": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
9
|
+
"10": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
10
|
+
"11": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
11
|
+
"13": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
9
12
|
compiler: (string | number)[];
|
|
10
13
|
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
11
14
|
usePartial: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zodSchemaComposition.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaComposition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zodSchemaComposition.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaComposition.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAMA,wBA8FmC"}
|
|
@@ -14,9 +14,9 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
16
|
return "z.union(["
|
|
17
|
-
+ ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column":
|
|
17
|
+
+ ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 86 } } })) != null ? stack1 : "")
|
|
18
18
|
+ "])"
|
|
19
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column":
|
|
19
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 88 }, "end": { "line": 2, "column": 124 } } })) != null ? stack1 : "")
|
|
20
20
|
+ "\n";
|
|
21
21
|
}, "2": function (container, depth0, helpers, partials, data) {
|
|
22
22
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
@@ -25,8 +25,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
25
25
|
}
|
|
26
26
|
return undefined;
|
|
27
27
|
};
|
|
28
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
29
|
-
+ ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column":
|
|
28
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
29
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 47 }, "end": { "line": 2, "column": 77 } } })) != null ? stack1 : "");
|
|
30
30
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
31
31
|
return ", ";
|
|
32
32
|
}, "5": function (container, depth0, helpers, partials, data) {
|
|
@@ -54,11 +54,35 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
54
54
|
}
|
|
55
55
|
return undefined;
|
|
56
56
|
};
|
|
57
|
-
return "
|
|
58
|
-
+ ((stack1 = lookupProperty(helpers, "
|
|
59
|
-
+ ")"
|
|
60
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 89 }, "end": { "line": 6, "column": 125 } } })) != null ? stack1 : "")
|
|
57
|
+
return ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(10, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 100 } } })) != null ? stack1 : "")
|
|
58
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 100 }, "end": { "line": 6, "column": 136 } } })) != null ? stack1 : "")
|
|
61
59
|
+ "\n";
|
|
60
|
+
}, "10": function (container, depth0, helpers, partials, data) {
|
|
61
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
62
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
63
|
+
return parent[propertyName];
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
};
|
|
67
|
+
return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "first"), { "name": "if", "hash": {}, "fn": container.program(11, data, 0), "inverse": container.program(13, data, 0), "data": data, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 91 } } })) != null ? stack1 : "");
|
|
68
|
+
}, "11": function (container, depth0, helpers, partials, data) {
|
|
69
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
70
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
71
|
+
return parent[propertyName];
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
};
|
|
75
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
76
|
+
}, "13": function (container, depth0, helpers, partials, data) {
|
|
77
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
78
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
79
|
+
return parent[propertyName];
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
82
|
+
};
|
|
83
|
+
return ".and("
|
|
84
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
85
|
+
+ ")";
|
|
62
86
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
63
87
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
64
88
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"6": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
6
|
-
"8": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
3
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
4
|
+
"5": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
7
5
|
compiler: (string | number)[];
|
|
8
6
|
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
7
|
+
usePartial: boolean;
|
|
9
8
|
useData: boolean;
|
|
10
9
|
};
|
|
11
10
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zodSchemaDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaDictionary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zodSchemaDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaDictionary.ts"],"names":[],"mappings":";;;;;;;;;AAMA,wBAiCmC"}
|
|
@@ -13,31 +13,16 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = lookupProperty(
|
|
17
|
-
}, "
|
|
16
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), lookupProperty(depth0, "link"), { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
17
|
+
}, "3": function (container, depth0, helpers, partials, data) {
|
|
18
18
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
19
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
20
|
return parent[propertyName];
|
|
21
21
|
}
|
|
22
22
|
return undefined;
|
|
23
23
|
};
|
|
24
|
-
return ((stack1 =
|
|
25
|
-
|
|
26
|
-
}, "4": function (container, depth0, helpers, partials, data) {
|
|
27
|
-
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
29
|
-
return parent[propertyName];
|
|
30
|
-
}
|
|
31
|
-
return undefined;
|
|
32
|
-
};
|
|
33
|
-
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "type", { "start": { "line": 1, "column": 72 }, "end": { "line": 1, "column": 81 } }), depth0)) != null ? stack1 : "")
|
|
34
|
-
+ "Schema";
|
|
35
|
-
}, "6": function (container, depth0, helpers, partials, data) {
|
|
36
|
-
var stack1;
|
|
37
|
-
return "z."
|
|
38
|
-
+ ((stack1 = container.lambda(container.strict(depth0, "base", { "start": { "line": 1, "column": 110 }, "end": { "line": 1, "column": 114 } }), depth0)) != null ? stack1 : "")
|
|
39
|
-
+ "()";
|
|
40
|
-
}, "8": function (container, depth0, helpers, partials, data) {
|
|
24
|
+
return ((stack1 = lookupProperty(helpers, "zodBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), { "name": "zodBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 64 }, "end": { "line": 1, "column": 86 } } })) != null ? stack1 : "");
|
|
25
|
+
}, "5": function (container, depth0, helpers, partials, data) {
|
|
41
26
|
return ".nullable()";
|
|
42
27
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
43
28
|
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
@@ -46,8 +31,9 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
46
31
|
}
|
|
47
32
|
return undefined;
|
|
48
33
|
};
|
|
49
|
-
return "z.record("
|
|
50
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(
|
|
34
|
+
return "z.record(z.string(), "
|
|
35
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(3, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 93 } } })) != null ? stack1 : "")
|
|
51
36
|
+ ")"
|
|
52
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(
|
|
53
|
-
|
|
37
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 94 }, "end": { "line": 1, "column": 130 } } })) != null ? stack1 : "")
|
|
38
|
+
+ "\n";
|
|
39
|
+
}, "usePartial": true, "useData": true };
|
|
@@ -3,8 +3,10 @@ declare const _default: {
|
|
|
3
3
|
"2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
4
4
|
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
5
5
|
"5": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
6
|
-
"7": (container: any, depth0: any, helpers: any, partials: any, data: any) =>
|
|
7
|
-
"
|
|
6
|
+
"7": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
7
|
+
"8": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
8
|
+
"10": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
9
|
+
"12": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
8
10
|
compiler: (string | number)[];
|
|
9
11
|
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
10
12
|
usePartial: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zodSchemaInterface.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaInterface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zodSchemaInterface.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/zod/partials/zodSchemaInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAMA,wBAwDmC"}
|
|
@@ -24,17 +24,27 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
24
24
|
return " "
|
|
25
25
|
+ ((stack1 = container.lambda(container.strict(depth0, "name", { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }), depth0)) != null ? stack1 : "")
|
|
26
26
|
+ ": "
|
|
27
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
28
|
-
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column":
|
|
29
|
-
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column":
|
|
27
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
28
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 34 }, "end": { "line": 4, "column": 78 } } })) != null ? stack1 : "")
|
|
29
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 78 }, "end": { "line": 4, "column": 107 } } })) != null ? stack1 : "")
|
|
30
30
|
+ "\n";
|
|
31
31
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
32
32
|
return ".optional()";
|
|
33
33
|
}, "5": function (container, depth0, helpers, partials, data) {
|
|
34
34
|
return ",";
|
|
35
35
|
}, "7": function (container, depth0, helpers, partials, data) {
|
|
36
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
38
|
+
return parent[propertyName];
|
|
39
|
+
}
|
|
40
|
+
return undefined;
|
|
41
|
+
};
|
|
42
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "emptySchemaStrategy"), "semantic", { "name": "equals", "hash": {}, "fn": container.program(8, data, 0), "inverse": container.program(10, data, 0), "data": data, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 11, "column": 11 } } })) != null ? stack1 : "");
|
|
43
|
+
}, "8": function (container, depth0, helpers, partials, data) {
|
|
44
|
+
return "}).catchall(z.unknown())\n";
|
|
45
|
+
}, "10": function (container, depth0, helpers, partials, data) {
|
|
36
46
|
return "})\n";
|
|
37
|
-
}, "
|
|
47
|
+
}, "12": function (container, depth0, helpers, partials, data) {
|
|
38
48
|
return ".nullable()";
|
|
39
49
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
40
50
|
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
@@ -44,7 +54,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
44
54
|
return undefined;
|
|
45
55
|
};
|
|
46
56
|
return "z.object({\n"
|
|
47
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "properties"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(7, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line":
|
|
48
|
-
+ "})"
|
|
49
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(
|
|
57
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "properties"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(7, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 12, "column": 7 } } })) != null ? stack1 : "")
|
|
58
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "properties"), { "name": "if", "hash": {}, "fn": container.program(10, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 15, "column": 7 } } })) != null ? stack1 : "")
|
|
59
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(12, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 16, "column": 0 }, "end": { "line": 16, "column": 36 } } })) != null ? stack1 : "")
|
|
60
|
+
+ "\n";
|
|
50
61
|
}, "usePartial": true, "useData": true };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-openapi-codegen",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Library that generates Typescript clients based on the OpenAPI specification. It bases on openapi-typescript-codegen",
|
|
5
5
|
"author": "Alexey Zverev",
|
|
6
6
|
"homepage": "https://github.com/ozonophore/openapi-codegen.git",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"boxen": "^5.1.2",
|
|
68
68
|
"camelcase": "6.2.0",
|
|
69
69
|
"chalk": "^4.1.2",
|
|
70
|
-
"commander": "
|
|
70
|
+
"commander": "9.0.0",
|
|
71
71
|
"configstore": "^5.0.1",
|
|
72
72
|
"diff": "^8.0.2",
|
|
73
73
|
"enquirer": "^2.4.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultOptions.d.ts","sourceRoot":"","sources":["../../src/common/defaultOptions.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,eAAO,MAAM,cAAc,uBAuBV,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.defaultOptions = void 0;
|
|
7
|
-
const joi_1 = __importDefault(require("joi"));
|
|
8
|
-
const HttpClient_enum_1 = require("../core/types/enums/HttpClient.enum");
|
|
9
|
-
const ValidationLibrary_enum_1 = require("../core/types/enums/ValidationLibrary.enum");
|
|
10
|
-
exports.defaultOptions = joi_1.default.object({
|
|
11
|
-
input: joi_1.default.string().required(),
|
|
12
|
-
output: joi_1.default.string().required(),
|
|
13
|
-
httpClient: joi_1.default.string().valid(...Object.values(HttpClient_enum_1.HttpClient)),
|
|
14
|
-
outputCore: joi_1.default.string().optional(),
|
|
15
|
-
outputServices: joi_1.default.string().optional(),
|
|
16
|
-
outputModels: joi_1.default.string().optional(),
|
|
17
|
-
outputSchemas: joi_1.default.string().optional(),
|
|
18
|
-
useOptions: joi_1.default.boolean().optional(),
|
|
19
|
-
useUnionTypes: joi_1.default.boolean().optional(),
|
|
20
|
-
excludeCoreServiceFiles: joi_1.default.boolean().optional(),
|
|
21
|
-
request: joi_1.default.string().optional(),
|
|
22
|
-
interfacePrefix: joi_1.default.string().optional(),
|
|
23
|
-
enumPrefix: joi_1.default.string().optional(),
|
|
24
|
-
typePrefix: joi_1.default.string().optional(),
|
|
25
|
-
useCancelableRequest: joi_1.default.boolean().optional(),
|
|
26
|
-
useSeparatedIndexes: joi_1.default.boolean().optional(),
|
|
27
|
-
validationLibrary: joi_1.default.string().valid(...Object.values(ValidationLibrary_enum_1.ValidationLibrary)).optional(),
|
|
28
|
-
}).unknown(false);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"advancedDeduplicatePath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/advancedDeduplicatePath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA2B5D"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.advancedDeduplicatePath = advancedDeduplicatePath;
|
|
4
|
-
/**
|
|
5
|
-
* Advanced path deduplication - remove consecutive duplicate segments
|
|
6
|
-
*/
|
|
7
|
-
function advancedDeduplicatePath(path) {
|
|
8
|
-
const segments = path.split('/');
|
|
9
|
-
const result = [];
|
|
10
|
-
for (let i = 0; i < segments.length; i++) {
|
|
11
|
-
const segment = segments[i];
|
|
12
|
-
if (segment === '' || segment === '.') {
|
|
13
|
-
continue;
|
|
14
|
-
}
|
|
15
|
-
if (segment === '..') {
|
|
16
|
-
if (result.length > 0) {
|
|
17
|
-
result.pop();
|
|
18
|
-
}
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
// Check if this segment is a duplicate of the previous one
|
|
22
|
-
if (result.length > 0 && result[result.length - 1] === segment) {
|
|
23
|
-
// Skip duplicate segment
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
result.push(segment);
|
|
27
|
-
}
|
|
28
|
-
return result.length > 0 ? '/' + result.join('/') : '';
|
|
29
|
-
}
|