@takeshape/schema 8.69.0 → 8.70.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/es/schema-util.js +1 -1
- package/es/taxonomies.js +1 -1
- package/es/template-shapes/where.js +2 -2
- package/lib/schema-util.js +1 -1
- package/lib/taxonomies.js +1 -1
- package/lib/template-shapes/where.js +2 -2
- package/package.json +4 -4
package/es/schema-util.js
CHANGED
|
@@ -99,7 +99,7 @@ export function getServiceInfo(projectSchema, shape) {
|
|
|
99
99
|
const depShapes = getShapeDependencies(projectSchema, shape).map(name => projectSchema.shapes[name]);
|
|
100
100
|
const shapesToCheck = [shape, ...depShapes];
|
|
101
101
|
shapesToCheck.forEach(thisShape => {
|
|
102
|
-
createSchemaPropertyList(projectSchema, thisShape
|
|
102
|
+
createSchemaPropertyList(projectSchema, thisShape).forEach(([key, value]) => {
|
|
103
103
|
const resolver = value['@resolver'];
|
|
104
104
|
|
|
105
105
|
if (!isBasicResolver(resolver)) {
|
package/es/taxonomies.js
CHANGED
|
@@ -16,7 +16,7 @@ export function getFirstStringFieldV3(shape, projectSchema) {
|
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const schemaProperties = createSchemaPropertyAccessor(projectSchema, shape
|
|
19
|
+
const schemaProperties = createSchemaPropertyAccessor(projectSchema, shape);
|
|
20
20
|
const {
|
|
21
21
|
order
|
|
22
22
|
} = forms.default;
|
|
@@ -137,7 +137,7 @@ function getConflictingProperties(projectSchema, shapes) {
|
|
|
137
137
|
const allProps = {};
|
|
138
138
|
|
|
139
139
|
for (const shape of Object.values(shapes)) {
|
|
140
|
-
for (const [name, prop] of createSchemaPropertyList(projectSchema, shape
|
|
140
|
+
for (const [name, prop] of createSchemaPropertyList(projectSchema, shape).getNodes()) {
|
|
141
141
|
if (name in allProps && (allProps[name].type !== prop.type || !isEqualRelationship(allProps[name], prop))) {
|
|
142
142
|
conflicts.add(name);
|
|
143
143
|
}
|
|
@@ -303,7 +303,7 @@ export function getFields(typeName, shapes, context) {
|
|
|
303
303
|
};
|
|
304
304
|
|
|
305
305
|
for (const shape of shapes) {
|
|
306
|
-
const nodes = createSchemaPropertyList(projectSchema, shape
|
|
306
|
+
const nodes = createSchemaPropertyList(projectSchema, shape).filterBy(([name, property]) => !skipField(name, property, projectSchema, tooDeep)).getNodes();
|
|
307
307
|
|
|
308
308
|
for (const [name, property] of nodes) {
|
|
309
309
|
Object.assign(result, getPropertyComparisonType(name, property, shape.name, fieldContext));
|
package/lib/schema-util.js
CHANGED
|
@@ -204,7 +204,7 @@ function getServiceInfo(projectSchema, shape) {
|
|
|
204
204
|
const depShapes = getShapeDependencies(projectSchema, shape).map(name => projectSchema.shapes[name]);
|
|
205
205
|
const shapesToCheck = [shape, ...depShapes];
|
|
206
206
|
shapesToCheck.forEach(thisShape => {
|
|
207
|
-
createSchemaPropertyList(projectSchema, thisShape
|
|
207
|
+
createSchemaPropertyList(projectSchema, thisShape).forEach(([key, value]) => {
|
|
208
208
|
const resolver = value['@resolver'];
|
|
209
209
|
|
|
210
210
|
if (!(0, _utils.isBasicResolver)(resolver)) {
|
package/lib/taxonomies.js
CHANGED
|
@@ -27,7 +27,7 @@ function getFirstStringFieldV3(shape, projectSchema) {
|
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const schemaProperties = (0, _schemaUtil.createSchemaPropertyAccessor)(projectSchema, shape
|
|
30
|
+
const schemaProperties = (0, _schemaUtil.createSchemaPropertyAccessor)(projectSchema, shape);
|
|
31
31
|
const {
|
|
32
32
|
order
|
|
33
33
|
} = forms.default;
|
|
@@ -171,7 +171,7 @@ function getConflictingProperties(projectSchema, shapes) {
|
|
|
171
171
|
const allProps = {};
|
|
172
172
|
|
|
173
173
|
for (const shape of Object.values(shapes)) {
|
|
174
|
-
for (const [name, prop] of (0, _schemaUtil.createSchemaPropertyList)(projectSchema, shape
|
|
174
|
+
for (const [name, prop] of (0, _schemaUtil.createSchemaPropertyList)(projectSchema, shape).getNodes()) {
|
|
175
175
|
if (name in allProps && (allProps[name].type !== prop.type || !isEqualRelationship(allProps[name], prop))) {
|
|
176
176
|
conflicts.add(name);
|
|
177
177
|
}
|
|
@@ -337,7 +337,7 @@ function getFields(typeName, shapes, context) {
|
|
|
337
337
|
};
|
|
338
338
|
|
|
339
339
|
for (const shape of shapes) {
|
|
340
|
-
const nodes = (0, _schemaUtil.createSchemaPropertyList)(projectSchema, shape
|
|
340
|
+
const nodes = (0, _schemaUtil.createSchemaPropertyList)(projectSchema, shape).filterBy(([name, property]) => !skipField(name, property, projectSchema, tooDeep)).getNodes();
|
|
341
341
|
|
|
342
342
|
for (const [name, property] of nodes) {
|
|
343
343
|
Object.assign(result, getPropertyComparisonType(name, property, shape.name, fieldContext));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/schema",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.70.0",
|
|
4
4
|
"description": "TakeShape Schema",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"examples"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@takeshape/errors": "8.
|
|
25
|
-
"@takeshape/json-schema": "8.
|
|
26
|
-
"@takeshape/util": "8.
|
|
24
|
+
"@takeshape/errors": "8.70.0",
|
|
25
|
+
"@takeshape/json-schema": "8.70.0",
|
|
26
|
+
"@takeshape/util": "8.70.0",
|
|
27
27
|
"ajv": "^7.0.4",
|
|
28
28
|
"ajv-formats": "^1.5.1",
|
|
29
29
|
"blueimp-md5": "^2.10.0",
|