yuppi 1.3.13 → 1.3.15
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 +3 -7
- package/dist/main.js +2 -2
- package/dist/main.mjs +2 -2
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -282,7 +282,7 @@ Convert your Yuppi schema into [JSON Schema](https://json-schema.org).
|
|
|
282
282
|
> properties: {
|
|
283
283
|
> display_name: {
|
|
284
284
|
> type: "string",
|
|
285
|
-
> maxLength: 32
|
|
285
|
+
> maxLength: 32
|
|
286
286
|
> },
|
|
287
287
|
> username: {
|
|
288
288
|
> type: "string",
|
|
@@ -292,14 +292,10 @@ Convert your Yuppi schema into [JSON Schema](https://json-schema.org).
|
|
|
292
292
|
> },
|
|
293
293
|
> email: {
|
|
294
294
|
> type: "string",
|
|
295
|
-
> pattern: "^[a-zA-Z0-9._-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}$"
|
|
295
|
+
> pattern: "^[a-zA-Z0-9._-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}$"
|
|
296
296
|
> }
|
|
297
297
|
> },
|
|
298
|
-
> required: [
|
|
299
|
-
> "display_name",
|
|
300
|
-
> "username",
|
|
301
|
-
> "email"
|
|
302
|
-
> ],
|
|
298
|
+
> required: [ "display_name", "username", "email" ],
|
|
303
299
|
> additionalProperties: false
|
|
304
300
|
> }
|
|
305
301
|
> */
|
package/dist/main.js
CHANGED
|
@@ -56,8 +56,8 @@ var convertToJSONSchema = (schema) => {
|
|
|
56
56
|
schema2 = base(schema2, key, config);
|
|
57
57
|
return schema2;
|
|
58
58
|
} else if (config.type === "number") {
|
|
59
|
-
let exclusive_minimum
|
|
60
|
-
let exclusive_maximum
|
|
59
|
+
let exclusive_minimum;
|
|
60
|
+
let exclusive_maximum;
|
|
61
61
|
if (config.positive === true && config.min === void 0) exclusive_minimum = 0;
|
|
62
62
|
if (config.negative === true && config.max === void 0) exclusive_maximum = 0;
|
|
63
63
|
schema2 = config.integer === true ? import_typebox.Type.Integer({ enum: config.enum, minimum: config.min, maximum: config.max, exclusiveMinimum: exclusive_minimum, exclusiveMaximum: exclusive_maximum, positive: config.positive, negative: config.negative, default: config.default }) : import_typebox.Type.Number({ enum: config.enum, minimum: config.min, maximum: config.max, exclusiveMinimum: exclusive_minimum, exclusiveMaximum: exclusive_maximum, positive: config.positive, negative: config.negative, default: config.default });
|
package/dist/main.mjs
CHANGED
|
@@ -25,8 +25,8 @@ var convertToJSONSchema = (schema) => {
|
|
|
25
25
|
schema2 = base(schema2, key, config);
|
|
26
26
|
return schema2;
|
|
27
27
|
} else if (config.type === "number") {
|
|
28
|
-
let exclusive_minimum
|
|
29
|
-
let exclusive_maximum
|
|
28
|
+
let exclusive_minimum;
|
|
29
|
+
let exclusive_maximum;
|
|
30
30
|
if (config.positive === true && config.min === void 0) exclusive_minimum = 0;
|
|
31
31
|
if (config.negative === true && config.max === void 0) exclusive_maximum = 0;
|
|
32
32
|
schema2 = config.integer === true ? Type.Integer({ enum: config.enum, minimum: config.min, maximum: config.max, exclusiveMinimum: exclusive_minimum, exclusiveMaximum: exclusive_maximum, positive: config.positive, negative: config.negative, default: config.default }) : Type.Number({ enum: config.enum, minimum: config.min, maximum: config.max, exclusiveMinimum: exclusive_minimum, exclusiveMaximum: exclusive_maximum, positive: config.positive, negative: config.negative, default: config.default });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuppi",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"description": "Schemas that can be converted to Yup and JSON Schema.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/keift/yuppi",
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
"lint": "eslint ./"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sinclair/typebox": "^0.34.
|
|
18
|
+
"@sinclair/typebox": "^0.34.46",
|
|
19
19
|
"@types/lodash.merge": "^4.6.9",
|
|
20
|
-
"@types/node": "latest",
|
|
21
20
|
"json-schema-to-typescript": "^15.0.4",
|
|
22
21
|
"lodash.merge": "^4.6.2",
|
|
23
22
|
"yup": "^1.7.1"
|