@takeshape/schema 8.151.0 → 8.151.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"where.d.ts","sourceRoot":"","sources":["../../../src/template-shapes/where.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAC,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEpG,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAsB9C,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,yBAAyB,sBAAgB,OAA0C,CAAC;AAEjG,aAAK,qBAAqB,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5F,aAAK,UAAU,GAAG,KAAK,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;AAExC,cAAM,UAAU;IACd,MAAM,0BAAiC;IACvC,UAAU,cAAqB;IAE/B,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI/B,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IAO/C,UAAU,IAAI,QAAQ;CAiBvB;AAED,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,MAAM,EACN;IAAC,WAAW,EAAE,qBAAqB,EAAE,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;CAAC,CAW1F,CAAC;AACF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CASzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAuB,CAAC;AACrD,eAAO,MAAM,oBAA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EAAE,OAAO,CAAC;CAC5B;AA0BD,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA2BrH;AAYD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,eAAe,GACvB,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CA2FvC;AAkED,wBAAgB,aAAa,CAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,gBAAgB,CA4BrG;AAED,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,KAAK,EAAE,GACtB;IAAC,MAAM,EAAE,YAAY,CAAC;IAAC,YAAY,EAAE,QAAQ,CAAA;CAAC,CAchD"}
@@ -303,7 +303,8 @@ function skipField({
303
303
  exceededRelationshipDepth,
304
304
  isIndexedShape
305
305
  }) {
306
- return Boolean(prop['@sensitive'] || !isIndexedShape && prop['@resolver'] || (0, _utils.isPropertySchemaWithRelationship)(prop) && exceededRelationshipDepth || (name === '_enabled' || name === '_enabledAt') && workflowsEnabled);
306
+ const isRelationship = (0, _utils.isPropertySchemaWithRelationship)(prop);
307
+ return Boolean(prop['@sensitive'] || prop['@resolver'] && !isIndexedShape && !isRelationship || isRelationship && exceededRelationshipDepth || (name === '_enabled' || name === '_enabledAt') && workflowsEnabled);
307
308
  }
308
309
 
309
310
  function getFields(typeName, shapes, context) {
@@ -372,6 +373,7 @@ function getPropertyComparisonType(name, prop, shapeName, context) {
372
373
 
373
374
  const fieldType = getPropType(projectSchema, name, prop) ?? 'string';
374
375
  const typeName = getTypeName(name, prop, shapeName, context);
376
+ const relationship = (0, _relationships.getRelationship)(prop);
375
377
 
376
378
  if ((0, _refs.hasRefProperty)(prop.items ?? prop)) {
377
379
  if (!(0, _refs.hasResolvableRef)(projectSchema, prop.items ?? prop)) {
@@ -393,7 +395,6 @@ function getPropertyComparisonType(name, prop, shapeName, context) {
393
395
 
394
396
  let props;
395
397
  const propOrItems = prop.items ?? prop;
396
- const relationship = (0, _relationships.getRelationship)(prop);
397
398
 
398
399
  if (isId(name)) {
399
400
  props = getFieldTypeComparison('id');
@@ -270,7 +270,8 @@ function skipField({
270
270
  exceededRelationshipDepth,
271
271
  isIndexedShape
272
272
  }) {
273
- return Boolean(prop['@sensitive'] || !isIndexedShape && prop['@resolver'] || isPropertySchemaWithRelationship(prop) && exceededRelationshipDepth || (name === '_enabled' || name === '_enabledAt') && workflowsEnabled);
273
+ const isRelationship = isPropertySchemaWithRelationship(prop);
274
+ return Boolean(prop['@sensitive'] || prop['@resolver'] && !isIndexedShape && !isRelationship || isRelationship && exceededRelationshipDepth || (name === '_enabled' || name === '_enabledAt') && workflowsEnabled);
274
275
  }
275
276
 
276
277
  export function getFields(typeName, shapes, context) {
@@ -339,6 +340,7 @@ export function getPropertyComparisonType(name, prop, shapeName, context) {
339
340
 
340
341
  const fieldType = getPropType(projectSchema, name, prop) ?? 'string';
341
342
  const typeName = getTypeName(name, prop, shapeName, context);
343
+ const relationship = getRelationship(prop);
342
344
 
343
345
  if (hasRefProperty(prop.items ?? prop)) {
344
346
  if (!hasResolvableRef(projectSchema, prop.items ?? prop)) {
@@ -360,7 +362,6 @@ export function getPropertyComparisonType(name, prop, shapeName, context) {
360
362
 
361
363
  let props;
362
364
  const propOrItems = prop.items ?? prop;
363
- const relationship = getRelationship(prop);
364
365
 
365
366
  if (isId(name)) {
366
367
  props = getFieldTypeComparison('id');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/schema",
3
- "version": "8.151.0",
3
+ "version": "8.151.1",
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.151.0",
25
- "@takeshape/json-schema": "8.151.0",
26
- "@takeshape/util": "8.151.0",
24
+ "@takeshape/errors": "8.151.1",
25
+ "@takeshape/json-schema": "8.151.1",
26
+ "@takeshape/util": "8.151.1",
27
27
  "ajv": "^8.10.0",
28
28
  "ajv-formats": "^2.1.1",
29
29
  "blueimp-md5": "^2.10.0",