@factorypure/client-helpers 1.1.12 → 1.1.13
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/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -527,15 +527,18 @@ export class FilterEngine {
|
|
|
527
527
|
globalScrapeOptions,
|
|
528
528
|
};
|
|
529
529
|
const filterResults = this.evaluateResult(context);
|
|
530
|
-
|
|
530
|
+
// Merge with existing filter_results from batch processing (duplicates, search exclusions, etc.)
|
|
531
|
+
const existingFilterResults = result.filter_results || [];
|
|
532
|
+
const allFilterResults = [...existingFilterResults, ...filterResults];
|
|
533
|
+
const visibilityState = this.calculateVisibility(allFilterResults);
|
|
531
534
|
// Populate new fields
|
|
532
|
-
result.filter_results =
|
|
535
|
+
result.filter_results = allFilterResults;
|
|
533
536
|
result.visibility_state = visibilityState;
|
|
534
537
|
// Maintain backward compatibility with old fields
|
|
535
|
-
result.hide_reasons =
|
|
538
|
+
result.hide_reasons = allFilterResults
|
|
536
539
|
.filter((fr) => fr.severity === FilterSeverity.BLOCK || fr.severity === FilterSeverity.WARNING)
|
|
537
540
|
.map((fr) => fr.message);
|
|
538
|
-
result.hide_override_reasons =
|
|
541
|
+
result.hide_override_reasons = allFilterResults.filter((fr) => fr.metadata?.isOverride).map((fr) => fr.message);
|
|
539
542
|
result.ignore_result = visibilityState === VisibilityState.HIDDEN;
|
|
540
543
|
return result;
|
|
541
544
|
});
|