@granular-software/sdk 0.4.39 → 0.4.41

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/dist/cli/index.js CHANGED
@@ -14865,6 +14865,9 @@ var filterByMetamodelPackage = defineMetamodelPackage({
14865
14865
  propertyFields: [`filter_by { scalar_type operators }`]
14866
14866
  },
14867
14867
  readPropertySummary(rawProperty) {
14868
+ if (rawProperty.filterBy === false || rawProperty.filter_by_disabled === true) {
14869
+ return { filterBy: false };
14870
+ }
14868
14871
  const operators = Array.isArray(rawProperty.filter_by?.operators) ? rawProperty.filter_by.operators.filter(
14869
14872
  (value) => typeof value === "string" && value.length > 0
14870
14873
  ) : [];
@@ -14877,7 +14880,7 @@ var filterByMetamodelPackage = defineMetamodelPackage({
14877
14880
  },
14878
14881
  domain: {
14879
14882
  applyToPropertyIR(propertyIR, propertySummary) {
14880
- const operators = propertySummary.filterBy?.operators || [];
14883
+ const operators = propertySummary.filterBy && typeof propertySummary.filterBy === "object" ? propertySummary.filterBy.operators || [] : [];
14881
14884
  if (operators.length === 0) return propertyIR;
14882
14885
  return {
14883
14886
  ...propertyIR,
package/dist/index.js CHANGED
@@ -11727,6 +11727,9 @@ var filterByMetamodelPackage = defineMetamodelPackage({
11727
11727
  propertyFields: [`filter_by { scalar_type operators }`]
11728
11728
  },
11729
11729
  readPropertySummary(rawProperty) {
11730
+ if (rawProperty.filterBy === false || rawProperty.filter_by_disabled === true) {
11731
+ return { filterBy: false };
11732
+ }
11730
11733
  const operators = Array.isArray(rawProperty.filter_by?.operators) ? rawProperty.filter_by.operators.filter(
11731
11734
  (value) => typeof value === "string" && value.length > 0
11732
11735
  ) : [];
@@ -11739,7 +11742,7 @@ var filterByMetamodelPackage = defineMetamodelPackage({
11739
11742
  },
11740
11743
  domain: {
11741
11744
  applyToPropertyIR(propertyIR, propertySummary) {
11742
- const operators = propertySummary.filterBy?.operators || [];
11745
+ const operators = propertySummary.filterBy && typeof propertySummary.filterBy === "object" ? propertySummary.filterBy.operators || [] : [];
11743
11746
  if (operators.length === 0) return propertyIR;
11744
11747
  return {
11745
11748
  ...propertyIR,