ts-openapi-codegen 2.0.0-beta.0 → 2.0.0-beta.2
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 +145 -55
- package/README.rus.md +144 -54
- package/dist/cli/index.js +2 -1
- package/dist/common/Consts.d.ts.map +1 -1
- package/dist/common/Consts.js +2 -1
- package/dist/common/TRawOptions.d.ts +2 -1
- package/dist/common/TRawOptions.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.js +8 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.js +7 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts.map +1 -0
- package/dist/common/VersionedSchema/{UnifiedOptionsVersioned → AllVersionedSchemas}/UnifiedOptionsSchemaV1.js +2 -2
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts +7 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.js +42 -0
- package/dist/common/VersionedSchema/CommonSchemas.d.ts +1 -0
- package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/CommonSchemas.js +8 -1
- package/dist/common/defaultOptions.d.ts.map +1 -1
- package/dist/common/defaultOptions.js +2 -1
- package/dist/common/utils/__tests__/convertArrayToObject.test.js +5 -6
- package/dist/common/utils/convertArrayToObject.d.ts.map +1 -1
- package/dist/common/utils/convertArrayToObject.js +1 -2
- package/dist/core/OpenApiClient.d.ts.map +1 -1
- package/dist/core/OpenApiClient.js +6 -4
- package/dist/core/WriteClient.d.ts +3 -12
- package/dist/core/WriteClient.d.ts.map +1 -1
- package/dist/core/WriteClient.js +20 -22
- package/dist/core/__tests__/WriteClient.test.js +8 -1
- package/dist/core/types/enums/ValidationLibrary.enum.d.ts +8 -0
- package/dist/core/types/enums/ValidationLibrary.enum.d.ts.map +1 -0
- package/dist/core/types/enums/ValidationLibrary.enum.js +11 -0
- package/dist/core/utils/__mocks__/templates.d.ts +3 -0
- package/dist/core/utils/__mocks__/templates.d.ts.map +1 -0
- package/dist/core/utils/__mocks__/templates.js +33 -0
- package/dist/core/utils/__tests__/writeClientCore.test.js +2 -25
- package/dist/core/utils/__tests__/writeClientFullIndex.test.js +2 -25
- package/dist/core/utils/__tests__/writeClientModels.test.js +2 -25
- package/dist/core/utils/__tests__/writeClientSchemas.test.js +4 -25
- package/dist/core/utils/__tests__/writeClientServices.test.js +2 -25
- package/dist/core/utils/precompileTemplates.js +6 -0
- package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarHelpers.js +74 -0
- package/dist/core/utils/registerHandlebarTemplates.d.ts +8 -0
- package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarTemplates.js +88 -0
- package/dist/core/utils/writeClientCore.d.ts.map +1 -1
- package/dist/core/utils/writeClientCore.js +3 -0
- package/dist/core/utils/writeClientSchemas.d.ts +2 -0
- package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
- package/dist/core/utils/writeClientSchemas.js +14 -2
- package/dist/templatesCompiled/client/core/legacy-request-adapter.d.ts +8 -0
- package/dist/templatesCompiled/client/core/legacy-request-adapter.d.ts.map +1 -0
- package/dist/templatesCompiled/client/core/legacy-request-adapter.js +18 -0
- package/dist/templatesCompiled/client/core/request-executor.d.ts +7 -0
- package/dist/templatesCompiled/client/core/request-executor.d.ts.map +1 -0
- package/dist/templatesCompiled/client/core/request-executor.js +11 -0
- package/dist/templatesCompiled/client/exportService.d.ts.map +1 -1
- package/dist/templatesCompiled/client/exportService.js +46 -50
- package/dist/templatesCompiled/client/joi/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/joi/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/exportSchema.js +71 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchema.js +129 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaArray.d.ts +16 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaArray.js +84 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.d.ts +18 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.js +96 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaDictionary.d.ts +14 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaDictionary.js +72 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaEnum.d.ts +14 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaEnum.js +74 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.d.ts +35 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.js +201 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts +14 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.js +50 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaReference.js +25 -0
- package/dist/templatesCompiled/client/jsonschema/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/jsonschema/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/exportSchema.js +69 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.js +129 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.d.ts +16 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.js +74 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.d.ts +16 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.js +84 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.d.ts +13 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.js +56 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaEnum.d.ts +12 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaEnum.js +49 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaGeneric.d.ts +29 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaGeneric.js +175 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts +15 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.js +63 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaReference.js +25 -0
- package/dist/templatesCompiled/client/yup/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/yup/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/exportSchema.js +73 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchema.js +129 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaArray.d.ts +16 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaArray.js +84 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.d.ts +18 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.js +96 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaDictionary.d.ts +14 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaDictionary.js +72 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaEnum.d.ts +14 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaEnum.js +74 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.d.ts +34 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.js +201 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts +14 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.js +50 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaReference.js +25 -0
- package/dist/templatesCompiled/client/zod/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/zod/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/exportSchema.js +67 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchema.js +129 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts +14 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.js +65 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts +15 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.js +70 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts +12 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.js +53 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaEnum.d.ts +15 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaEnum.js +86 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.d.ts +34 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.js +193 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts +14 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.js +50 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaReference.js +25 -0
- package/package.json +12 -3
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsMigrationPlan.d.ts +0 -3
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsMigrationPlan.d.ts.map +0 -1
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsMigrationPlan.js +0 -28
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsSchemaV1.d.ts.map +0 -1
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsVersionedSchemas.d.ts +0 -3
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsVersionedSchemas.d.ts.map +0 -1
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsVersionedSchemas.js +0 -10
- /package/dist/common/VersionedSchema/{UnifiedOptionsVersioned → AllVersionedSchemas}/UnifiedOptionsSchemaV1.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
+
"2": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
4
|
+
"4": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
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) => string;
|
|
7
|
+
"9": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
8
|
+
"11": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
9
|
+
compiler: (string | number)[];
|
|
10
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
11
|
+
useData: boolean;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=yupSchemaDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yupSchemaDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/yup/partials/yupSchemaDictionary.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,wBAsEiB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// This is an automatically generated file for the hbs template.
|
|
4
|
+
// You don't need to change it, run npm run build:hbs to update it.
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint: disable */
|
|
7
|
+
/* eslint: disable */
|
|
8
|
+
// @ts-nocheck
|
|
9
|
+
exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
10
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
12
|
+
return parent[propertyName];
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
};
|
|
16
|
+
return ((stack1 = lookupProperty(helpers, "isBasicType").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "link"), { "name": "isBasicType", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.program(4, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 183 } } })) != null ? stack1 : "");
|
|
17
|
+
}, "2": function (container, depth0, helpers, partials, data) {
|
|
18
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
|
+
return parent[propertyName];
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
};
|
|
24
|
+
return ((stack1 = lookupProperty(helpers, "yupBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(lookupProperty(depth0, "link"), "base"), { "name": "yupBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 3, "column": 56 }, "end": { "line": 3, "column": 83 } } })) != null ? stack1 : "");
|
|
25
|
+
}, "4": function (container, depth0, helpers, partials, data) {
|
|
26
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
28
|
+
return parent[propertyName];
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
};
|
|
32
|
+
return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(lookupProperty(depth0, "link"), "alias"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.program(7, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 91 }, "end": { "line": 3, "column": 167 } } })) != null ? stack1 : "");
|
|
33
|
+
}, "5": function (container, depth0, helpers, partials, data) {
|
|
34
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
36
|
+
return parent[propertyName];
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
};
|
|
40
|
+
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "alias", { "start": { "line": 3, "column": 112 }, "end": { "line": 3, "column": 122 } }), depth0)) != null ? stack1 : "")
|
|
41
|
+
+ "Schema";
|
|
42
|
+
}, "7": function (container, depth0, helpers, partials, data) {
|
|
43
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
45
|
+
return parent[propertyName];
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
};
|
|
49
|
+
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "type", { "start": { "line": 3, "column": 142 }, "end": { "line": 3, "column": 151 } }), depth0)) != null ? stack1 : "")
|
|
50
|
+
+ "Schema";
|
|
51
|
+
}, "9": function (container, depth0, helpers, partials, data) {
|
|
52
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
53
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
54
|
+
return parent[propertyName];
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
};
|
|
58
|
+
return ((stack1 = lookupProperty(helpers, "yupBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), { "name": "yupBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 3, "column": 191 }, "end": { "line": 3, "column": 213 } } })) != null ? stack1 : "");
|
|
59
|
+
}, "11": function (container, depth0, helpers, partials, data) {
|
|
60
|
+
return ".nullable()";
|
|
61
|
+
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
62
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
63
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
64
|
+
return parent[propertyName];
|
|
65
|
+
}
|
|
66
|
+
return undefined;
|
|
67
|
+
};
|
|
68
|
+
return "yup.lazy(() => yup.object().test('dictionary', 'Must be a dictionary', function(value: any) {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return false;\n const itemSchema = "
|
|
69
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(9, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 220 } } })) != null ? stack1 : "")
|
|
70
|
+
+ ";\n const dict = value as Record<string, any>;\n for (const key in dict) {\n if (Object.prototype.hasOwnProperty.call(dict, key)) {\n try {\n itemSchema.validateSync(dict[key]);\n } catch {\n return false;\n }\n }\n }\n return true;\n}))"
|
|
71
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(11, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 15, "column": 3 }, "end": { "line": 15, "column": 39 } } })) != null ? stack1 : "");
|
|
72
|
+
}, "useData": true };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
+
"2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
4
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
5
|
+
"4": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
6
|
+
"6": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
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
|
+
compiler: (string | number)[];
|
|
10
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
11
|
+
useData: boolean;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=yupSchemaEnum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yupSchemaEnum.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/yup/partials/yupSchemaEnum.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,wBAuEiB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// This is an automatically generated file for the hbs template.
|
|
4
|
+
// You don't need to change it, run npm run build:hbs to update it.
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint: disable */
|
|
7
|
+
/* eslint: disable */
|
|
8
|
+
// @ts-nocheck
|
|
9
|
+
exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
10
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
12
|
+
return parent[propertyName];
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
};
|
|
16
|
+
return ((stack1 = lookupProperty(helpers, "isNumericEnum").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "enum"), { "name": "isNumericEnum", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.program(8, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 14, "column": 18 } } })) != null ? stack1 : "");
|
|
17
|
+
}, "2": function (container, depth0, helpers, partials, data) {
|
|
18
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
|
+
return parent[propertyName];
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
};
|
|
24
|
+
return "yup.number().oneOf([\n"
|
|
25
|
+
+ ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "enum"), { "name": "each", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 6, "column": 9 } } })) != null ? stack1 : "")
|
|
26
|
+
+ "])"
|
|
27
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(6, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 38 } } })) != null ? stack1 : "")
|
|
28
|
+
+ "\n";
|
|
29
|
+
}, "3": function (container, depth0, helpers, partials, data) {
|
|
30
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
32
|
+
return parent[propertyName];
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
};
|
|
36
|
+
return " "
|
|
37
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "value", { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 12 } }), depth0)) != null ? stack1 : "")
|
|
38
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(4, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 5, "column": 44 } } })) != null ? stack1 : "")
|
|
39
|
+
+ "\n";
|
|
40
|
+
}, "4": function (container, depth0, helpers, partials, data) {
|
|
41
|
+
return ",";
|
|
42
|
+
}, "6": function (container, depth0, helpers, partials, data) {
|
|
43
|
+
return ".nullable()";
|
|
44
|
+
}, "8": function (container, depth0, helpers, partials, data) {
|
|
45
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
46
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
47
|
+
return parent[propertyName];
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
};
|
|
51
|
+
return "yup.string().oneOf([\n"
|
|
52
|
+
+ ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "enum"), { "name": "each", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 12, "column": 9 } } })) != null ? stack1 : "")
|
|
53
|
+
+ "])"
|
|
54
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(6, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 38 } } })) != null ? stack1 : "")
|
|
55
|
+
+ "\n";
|
|
56
|
+
}, "10": function (container, depth0, helpers, partials, data) {
|
|
57
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
59
|
+
return parent[propertyName];
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
};
|
|
63
|
+
return "yup.mixed()"
|
|
64
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(6, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 47 } } })) != null ? stack1 : "")
|
|
65
|
+
+ "\n";
|
|
66
|
+
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
67
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
68
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
69
|
+
return parent[propertyName];
|
|
70
|
+
}
|
|
71
|
+
return undefined;
|
|
72
|
+
};
|
|
73
|
+
return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "enum"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(10, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 17, "column": 7 } } })) != null ? stack1 : "");
|
|
74
|
+
}, "useData": true };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
3
|
+
"2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
4
|
+
"4": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
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) => any;
|
|
7
|
+
"9": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
8
|
+
"11": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
9
|
+
"12": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
10
|
+
"13": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
11
|
+
"15": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
12
|
+
"16": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
13
|
+
"18": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
14
|
+
"19": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
15
|
+
"21": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
16
|
+
"23": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
17
|
+
"24": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
18
|
+
"25": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
19
|
+
"27": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
20
|
+
"29": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
21
|
+
"31": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
22
|
+
"32": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
23
|
+
"34": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
24
|
+
"35": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
25
|
+
"37": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
26
|
+
"38": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
27
|
+
"40": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
28
|
+
"41": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
29
|
+
compiler: (string | number)[];
|
|
30
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
31
|
+
useData: boolean;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
//# sourceMappingURL=yupSchemaGeneric.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yupSchemaGeneric.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/yup/partials/yupSchemaGeneric.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAsNiB"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// This is an automatically generated file for the hbs template.
|
|
4
|
+
// You don't need to change it, run npm run build:hbs to update it.
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint: disable */
|
|
7
|
+
/* eslint: disable */
|
|
8
|
+
// @ts-nocheck
|
|
9
|
+
exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
10
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
12
|
+
return parent[propertyName];
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
};
|
|
16
|
+
return "yup.string()"
|
|
17
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minLength"), { "name": "if", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 12 }, "end": { "line": 2, "column": 57 } } })) != null ? stack1 : "")
|
|
18
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxLength"), { "name": "if", "hash": {}, "fn": container.program(4, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 57 }, "end": { "line": 2, "column": 102 } } })) != null ? stack1 : "")
|
|
19
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "pattern"), { "name": "if", "hash": {}, "fn": container.program(6, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 102 }, "end": { "line": 2, "column": 149 } } })) != null ? stack1 : "")
|
|
20
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "format"), { "name": "if", "hash": {}, "fn": container.program(8, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 149 }, "end": { "line": 2, "column": 362 } } })) != null ? stack1 : "")
|
|
21
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(21, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 362 }, "end": { "line": 2, "column": 398 } } })) != null ? stack1 : "")
|
|
22
|
+
+ "\n";
|
|
23
|
+
}, "2": function (container, depth0, helpers, partials, data) {
|
|
24
|
+
var stack1;
|
|
25
|
+
return ".min("
|
|
26
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "minLength", { "start": { "line": 2, "column": 37 }, "end": { "line": 2, "column": 46 } }), depth0)) != null ? stack1 : "")
|
|
27
|
+
+ ")";
|
|
28
|
+
}, "4": function (container, depth0, helpers, partials, data) {
|
|
29
|
+
var stack1;
|
|
30
|
+
return ".max("
|
|
31
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "maxLength", { "start": { "line": 2, "column": 82 }, "end": { "line": 2, "column": 91 } }), depth0)) != null ? stack1 : "")
|
|
32
|
+
+ ")";
|
|
33
|
+
}, "6": function (container, depth0, helpers, partials, data) {
|
|
34
|
+
var stack1;
|
|
35
|
+
return ".matches(/"
|
|
36
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "pattern", { "start": { "line": 2, "column": 130 }, "end": { "line": 2, "column": 137 } }), depth0)) != null ? stack1 : "")
|
|
37
|
+
+ "/)";
|
|
38
|
+
}, "8": function (container, depth0, helpers, partials, data) {
|
|
39
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
41
|
+
return parent[propertyName];
|
|
42
|
+
}
|
|
43
|
+
return undefined;
|
|
44
|
+
};
|
|
45
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "date-time", { "name": "equals", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.program(11, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 163 }, "end": { "line": 2, "column": 355 } } })) != null ? stack1 : "");
|
|
46
|
+
}, "9": function (container, depth0, helpers, partials, data) {
|
|
47
|
+
return ".date()";
|
|
48
|
+
}, "11": function (container, depth0, helpers, partials, data) {
|
|
49
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
51
|
+
return parent[propertyName];
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
54
|
+
};
|
|
55
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "date", { "name": "equals", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.program(12, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 200 }, "end": { "line": 2, "column": 344 } } })) != null ? stack1 : "");
|
|
56
|
+
}, "12": function (container, depth0, helpers, partials, data) {
|
|
57
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
59
|
+
return parent[propertyName];
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
};
|
|
63
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "email", { "name": "equals", "hash": {}, "fn": container.program(13, data, 0), "inverse": container.program(15, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 236 }, "end": { "line": 2, "column": 344 } } })) != null ? stack1 : "");
|
|
64
|
+
}, "13": function (container, depth0, helpers, partials, data) {
|
|
65
|
+
return ".email()";
|
|
66
|
+
}, "15": function (container, depth0, helpers, partials, data) {
|
|
67
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
68
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
69
|
+
return parent[propertyName];
|
|
70
|
+
}
|
|
71
|
+
return undefined;
|
|
72
|
+
};
|
|
73
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "uri", { "name": "equals", "hash": {}, "fn": container.program(16, data, 0), "inverse": container.program(18, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 274 }, "end": { "line": 2, "column": 344 } } })) != null ? stack1 : "");
|
|
74
|
+
}, "16": function (container, depth0, helpers, partials, data) {
|
|
75
|
+
return ".url()";
|
|
76
|
+
}, "18": 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 ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "uuid", { "name": "equals", "hash": {}, "fn": container.program(19, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 308 }, "end": { "line": 2, "column": 344 } } })) != null ? stack1 : "");
|
|
84
|
+
}, "19": function (container, depth0, helpers, partials, data) {
|
|
85
|
+
return ".uuid()";
|
|
86
|
+
}, "21": function (container, depth0, helpers, partials, data) {
|
|
87
|
+
return ".nullable()";
|
|
88
|
+
}, "23": function (container, depth0, helpers, partials, data) {
|
|
89
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
90
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
91
|
+
return parent[propertyName];
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
};
|
|
95
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "number", { "name": "equals", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.program(31, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 19, "column": 0 } } })) != null ? stack1 : "");
|
|
96
|
+
}, "24": function (container, depth0, helpers, partials, data) {
|
|
97
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
98
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
99
|
+
return parent[propertyName];
|
|
100
|
+
}
|
|
101
|
+
return undefined;
|
|
102
|
+
};
|
|
103
|
+
return "yup.number()"
|
|
104
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(25, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 12 }, "end": { "line": 4, "column": 53 } } })) != null ? stack1 : "")
|
|
105
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(27, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 53 }, "end": { "line": 4, "column": 94 } } })) != null ? stack1 : "")
|
|
106
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(29, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 94 }, "end": { "line": 6, "column": 9 } } })) != null ? stack1 : "")
|
|
107
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(21, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 45 } } })) != null ? stack1 : "")
|
|
108
|
+
+ "\n";
|
|
109
|
+
}, "25": function (container, depth0, helpers, partials, data) {
|
|
110
|
+
var stack1;
|
|
111
|
+
return ".min("
|
|
112
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "minimum", { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 42 } }), depth0)) != null ? stack1 : "")
|
|
113
|
+
+ ")";
|
|
114
|
+
}, "27": function (container, depth0, helpers, partials, data) {
|
|
115
|
+
var stack1;
|
|
116
|
+
return ".max("
|
|
117
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "maximum", { "start": { "line": 4, "column": 76 }, "end": { "line": 4, "column": 83 } }), depth0)) != null ? stack1 : "")
|
|
118
|
+
+ ")";
|
|
119
|
+
}, "29": function (container, depth0, helpers, partials, data) {
|
|
120
|
+
var stack1, alias1 = container.strict, alias2 = container.lambda;
|
|
121
|
+
return ".test('multipleOf', 'Must be a multiple of "
|
|
122
|
+
+ ((stack1 = alias2(alias1(depth0, "multipleOf", { "start": { "line": 4, "column": 158 }, "end": { "line": 4, "column": 168 } }), depth0)) != null ? stack1 : "")
|
|
123
|
+
+ "', function(value) {\n return value == null || value % "
|
|
124
|
+
+ ((stack1 = alias2(alias1(depth0, "multipleOf", { "start": { "line": 5, "column": 39 }, "end": { "line": 5, "column": 49 } }), depth0)) != null ? stack1 : "")
|
|
125
|
+
+ " === 0;\n})";
|
|
126
|
+
}, "31": function (container, depth0, helpers, partials, data) {
|
|
127
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
128
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
129
|
+
return parent[propertyName];
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
};
|
|
133
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "integer", { "name": "equals", "hash": {}, "fn": container.program(32, data, 0), "inverse": container.program(34, data, 0), "data": data, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 19, "column": 0 } } })) != null ? stack1 : "");
|
|
134
|
+
}, "32": function (container, depth0, helpers, partials, data) {
|
|
135
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
136
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
137
|
+
return parent[propertyName];
|
|
138
|
+
}
|
|
139
|
+
return undefined;
|
|
140
|
+
};
|
|
141
|
+
return "yup.number().integer()"
|
|
142
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(25, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 63 } } })) != null ? stack1 : "")
|
|
143
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(27, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 63 }, "end": { "line": 8, "column": 104 } } })) != null ? stack1 : "")
|
|
144
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(29, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 104 }, "end": { "line": 10, "column": 9 } } })) != null ? stack1 : "")
|
|
145
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(21, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 45 } } })) != null ? stack1 : "")
|
|
146
|
+
+ "\n";
|
|
147
|
+
}, "34": function (container, depth0, helpers, partials, data) {
|
|
148
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
149
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
150
|
+
return parent[propertyName];
|
|
151
|
+
}
|
|
152
|
+
return undefined;
|
|
153
|
+
};
|
|
154
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "boolean", { "name": "equals", "hash": {}, "fn": container.program(35, data, 0), "inverse": container.program(37, data, 0), "data": data, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 19, "column": 0 } } })) != null ? stack1 : "");
|
|
155
|
+
}, "35": function (container, depth0, helpers, partials, data) {
|
|
156
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
157
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
158
|
+
return parent[propertyName];
|
|
159
|
+
}
|
|
160
|
+
return undefined;
|
|
161
|
+
};
|
|
162
|
+
return "yup.boolean()"
|
|
163
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(21, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 49 } } })) != null ? stack1 : "")
|
|
164
|
+
+ "\n";
|
|
165
|
+
}, "37": function (container, depth0, helpers, partials, data) {
|
|
166
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
167
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
168
|
+
return parent[propertyName];
|
|
169
|
+
}
|
|
170
|
+
return undefined;
|
|
171
|
+
};
|
|
172
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "File", { "name": "equals", "hash": {}, "fn": container.program(38, data, 0), "inverse": container.program(40, data, 0), "data": data, "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 19, "column": 0 } } })) != null ? stack1 : "");
|
|
173
|
+
}, "38": function (container, depth0, helpers, partials, data) {
|
|
174
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
175
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
176
|
+
return parent[propertyName];
|
|
177
|
+
}
|
|
178
|
+
return undefined;
|
|
179
|
+
};
|
|
180
|
+
return "yup.mixed()"
|
|
181
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(21, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 47 } } })) != null ? stack1 : "")
|
|
182
|
+
+ "\n";
|
|
183
|
+
}, "40": function (container, depth0, helpers, partials, data) {
|
|
184
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
185
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
186
|
+
return parent[propertyName];
|
|
187
|
+
}
|
|
188
|
+
return undefined;
|
|
189
|
+
};
|
|
190
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "null", { "name": "equals", "hash": {}, "fn": container.program(41, data, 0), "inverse": container.program(38, data, 0), "data": data, "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 19, "column": 0 } } })) != null ? stack1 : "");
|
|
191
|
+
}, "41": function (container, depth0, helpers, partials, data) {
|
|
192
|
+
return "yup.mixed().oneOf([null])\n";
|
|
193
|
+
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
194
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
195
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
196
|
+
return parent[propertyName];
|
|
197
|
+
}
|
|
198
|
+
return undefined;
|
|
199
|
+
};
|
|
200
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "string", { "name": "equals", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(23, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 19, "column": 11 } } })) != null ? stack1 : "");
|
|
201
|
+
}, "useData": true };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
+
"2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
4
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
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) => string;
|
|
7
|
+
"9": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
8
|
+
compiler: (string | number)[];
|
|
9
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
10
|
+
usePartial: boolean;
|
|
11
|
+
useData: boolean;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=yupSchemaInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yupSchemaInterface.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/yup/partials/yupSchemaInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,wBA4CmC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// This is an automatically generated file for the hbs template.
|
|
4
|
+
// You don't need to change it, run npm run build:hbs to update it.
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint: disable */
|
|
7
|
+
/* eslint: disable */
|
|
8
|
+
// @ts-nocheck
|
|
9
|
+
exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
10
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
12
|
+
return parent[propertyName];
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
};
|
|
16
|
+
return ((stack1 = lookupProperty(helpers, "each").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 9 } } })) != null ? stack1 : "");
|
|
17
|
+
}, "2": function (container, depth0, helpers, partials, data) {
|
|
18
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
|
+
return parent[propertyName];
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
};
|
|
24
|
+
return " "
|
|
25
|
+
+ ((stack1 = container.lambda(container.strict(depth0, "name", { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }), depth0)) != null ? stack1 : "")
|
|
26
|
+
+ ": "
|
|
27
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchema"), depth0, { "name": "yupSchema", "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": 30 }, "end": { "line": 4, "column": 74 } } })) != 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": 74 }, "end": { "line": 4, "column": 103 } } })) != null ? stack1 : "")
|
|
30
|
+
+ "\n";
|
|
31
|
+
}, "3": function (container, depth0, helpers, partials, data) {
|
|
32
|
+
return ".optional()";
|
|
33
|
+
}, "5": function (container, depth0, helpers, partials, data) {
|
|
34
|
+
return ",";
|
|
35
|
+
}, "7": function (container, depth0, helpers, partials, data) {
|
|
36
|
+
return "})\n";
|
|
37
|
+
}, "9": function (container, depth0, helpers, partials, data) {
|
|
38
|
+
return ".nullable()";
|
|
39
|
+
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
40
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
41
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
42
|
+
return parent[propertyName];
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
};
|
|
46
|
+
return "yup.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": 8, "column": 7 } } })) != null ? stack1 : "")
|
|
48
|
+
+ "})"
|
|
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": 9, "column": 2 }, "end": { "line": 9, "column": 38 } } })) != null ? stack1 : "");
|
|
50
|
+
}, "usePartial": true, "useData": true };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
3
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
4
|
+
compiler: (string | number)[];
|
|
5
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
6
|
+
useData: boolean;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=yupSchemaReference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yupSchemaReference.d.ts","sourceRoot":"","sources":["../../../../../src/templatesCompiled/client/yup/partials/yupSchemaReference.ts"],"names":[],"mappings":";;;;;;;AAMA,wBAmBiB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// This is an automatically generated file for the hbs template.
|
|
4
|
+
// You don't need to change it, run npm run build:hbs to update it.
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint: disable */
|
|
7
|
+
/* eslint: disable */
|
|
8
|
+
// @ts-nocheck
|
|
9
|
+
exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
10
|
+
var stack1;
|
|
11
|
+
return ((stack1 = container.lambda(container.strict(depth0, "alias", { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } }), depth0)) != null ? stack1 : "")
|
|
12
|
+
+ "Schema";
|
|
13
|
+
}, "3": function (container, depth0, helpers, partials, data) {
|
|
14
|
+
var stack1;
|
|
15
|
+
return ((stack1 = container.lambda(container.strict(depth0, "type", { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 45 } }), depth0)) != null ? stack1 : "")
|
|
16
|
+
+ "Schema";
|
|
17
|
+
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
18
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
|
+
return parent[propertyName];
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
};
|
|
24
|
+
return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "alias"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(3, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 61 } } })) != null ? stack1 : "");
|
|
25
|
+
}, "useData": true };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
+
"2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
4
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
5
|
+
compiler: (string | number)[];
|
|
6
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
7
|
+
usePartial: boolean;
|
|
8
|
+
useData: boolean;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=exportSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportSchema.d.ts","sourceRoot":"","sources":["../../../../src/templatesCompiled/client/zod/exportSchema.ts"],"names":[],"mappings":";;;;;;;;;AAMA,wBA8DmC"}
|