adstxt-validator 1.2.5 → 1.2.6
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 +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -587,7 +587,8 @@ async function validateWithOptimizedProvider(publisherDomain, records, provider,
|
|
|
587
587
|
records.forEach((record) => {
|
|
588
588
|
if (!record.is_valid)
|
|
589
589
|
return; // Skip invalid records
|
|
590
|
-
|
|
590
|
+
// CRITICAL FIX: Normalize domain by trimming whitespace
|
|
591
|
+
const domain = record.domain.toLowerCase().trim();
|
|
591
592
|
// Initialize arrays if not exists
|
|
592
593
|
if (!domainToSellerIds.has(domain)) {
|
|
593
594
|
domainToSellerIds.set(domain, []);
|
|
@@ -635,7 +636,8 @@ async function validateWithOptimizedProvider(publisherDomain, records, provider,
|
|
|
635
636
|
if (!record.is_valid) {
|
|
636
637
|
return record; // Skip invalid records
|
|
637
638
|
}
|
|
638
|
-
|
|
639
|
+
// CRITICAL FIX: Normalize domain by trimming whitespace (must match the same normalization as above)
|
|
640
|
+
const domain = record.domain.toLowerCase().trim();
|
|
639
641
|
const sellersMap = domainSellersMap.get(domain) || new Map();
|
|
640
642
|
const metadata = domainMetadataMap.get(domain) || {};
|
|
641
643
|
return await validateSingleRecordOptimized(record, publisherDomain, sellersMap, metadata, allEntries);
|