From d342f1459657b89c57be3879523ded2cfc18343d Mon Sep 17 00:00:00 2001 From: dbajpeyi Date: Fri, 7 Feb 2025 14:14:39 +0530 Subject: [PATCH] chore: add debug logs for recategorization --- dist/autofill-debug.js | 1 + dist/autofill.js | 1 + src/Form/Form.js | 1 + swift-package/Resources/assets/autofill-debug.js | 1 + swift-package/Resources/assets/autofill.js | 1 + 5 files changed, 5 insertions(+) diff --git a/dist/autofill-debug.js b/dist/autofill-debug.js index 319e884c0..09af497e0 100644 --- a/dist/autofill-debug.js +++ b/dist/autofill-debug.js @@ -10469,6 +10469,7 @@ class Form { this.decorateInput(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(targetType)].add(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(inputType)].delete(ambiguousInput); + if ((0, _autofillUtils.shouldLog)()) console.log(`Recategorized input from ${inputType} to ${targetType}`, ambiguousInput); } } categorizeInputs() { diff --git a/dist/autofill.js b/dist/autofill.js index 0f86ce0b8..44c9f49b7 100644 --- a/dist/autofill.js +++ b/dist/autofill.js @@ -6106,6 +6106,7 @@ class Form { this.decorateInput(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(targetType)].add(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(inputType)].delete(ambiguousInput); + if ((0, _autofillUtils.shouldLog)()) console.log(`Recategorized input from ${inputType} to ${targetType}`, ambiguousInput); } } categorizeInputs() { diff --git a/src/Form/Form.js b/src/Form/Form.js index aed126d3d..9043044e4 100644 --- a/src/Form/Form.js +++ b/src/Form/Form.js @@ -445,6 +445,7 @@ class Form { this.decorateInput(ambiguousInput); this.inputs[getMainTypeFromType(targetType)].add(ambiguousInput); this.inputs[getMainTypeFromType(inputType)].delete(ambiguousInput); + if (shouldLog()) console.log(`Recategorized input from ${inputType} to ${targetType}`, ambiguousInput); } } diff --git a/swift-package/Resources/assets/autofill-debug.js b/swift-package/Resources/assets/autofill-debug.js index 319e884c0..09af497e0 100644 --- a/swift-package/Resources/assets/autofill-debug.js +++ b/swift-package/Resources/assets/autofill-debug.js @@ -10469,6 +10469,7 @@ class Form { this.decorateInput(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(targetType)].add(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(inputType)].delete(ambiguousInput); + if ((0, _autofillUtils.shouldLog)()) console.log(`Recategorized input from ${inputType} to ${targetType}`, ambiguousInput); } } categorizeInputs() { diff --git a/swift-package/Resources/assets/autofill.js b/swift-package/Resources/assets/autofill.js index 0f86ce0b8..44c9f49b7 100644 --- a/swift-package/Resources/assets/autofill.js +++ b/swift-package/Resources/assets/autofill.js @@ -6106,6 +6106,7 @@ class Form { this.decorateInput(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(targetType)].add(ambiguousInput); this.inputs[(0, _matching.getMainTypeFromType)(inputType)].delete(ambiguousInput); + if ((0, _autofillUtils.shouldLog)()) console.log(`Recategorized input from ${inputType} to ${targetType}`, ambiguousInput); } } categorizeInputs() {