@dnax/core 0.1.14 → 0.1.16

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.
Files changed (2) hide show
  1. package/lib/schema.ts +6 -6
  2. package/package.json +1 -1
package/lib/schema.ts CHANGED
@@ -14,14 +14,14 @@ function buildSchema(col: Collection) {
14
14
  }
15
15
 
16
16
  if (f?.type == "uuid" && f?.random?.toNumber) {
17
- propertySchema[f.name] = v.string();
17
+ // propertySchema[f.name] = v.string();
18
18
  }
19
19
 
20
20
  if (f?.type == "random" && f?.random?.toNumber) {
21
- propertySchema[f.name] = v.number();
21
+ // propertySchema[f.name] = v.number();
22
22
  }
23
23
  if (f?.type == "random" && !f?.random?.toNumber) {
24
- propertySchema[f.name] = v.string();
24
+ // propertySchema[f.name] = v.string();
25
25
  }
26
26
 
27
27
  if (f?.type.match(/(string|richText|textarea)/)) {
@@ -86,7 +86,7 @@ function buildSchema(col: Collection) {
86
86
  }
87
87
 
88
88
  if (f?.type == "random") {
89
- propertySchema[f.name] = v.any();
89
+ // propertySchema[f.name] = v.any();
90
90
  }
91
91
 
92
92
  if (f?.type == "password") {
@@ -106,9 +106,9 @@ function buildSchema(col: Collection) {
106
106
  items = [...new Set(items)];
107
107
 
108
108
  if (f?.enum?.multiple) {
109
- propertySchema[f.name] = v.string().valid([...items]);
109
+ propertySchema[f.name] = v.array().items(v.string().valid(...items));
110
110
  } else {
111
- propertySchema[f.name] = v.string().valid([...items]);
111
+ propertySchema[f.name] = v.string().valid(...items);
112
112
  }
113
113
  }
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "devDependencies": {