feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility

This commit is contained in:
2026-04-16 20:30:56 +00:00
parent 55bee02a2e
commit 3f37f6538c
60 changed files with 5723 additions and 6678 deletions
+7 -2
View File
@@ -16,10 +16,15 @@ export class DecoderFactory {
* Creates a decoder for the specified XML content
* @param xml XML content to decode
* @param skipValidation Whether to skip EN16931 validation
* @param formatHint Optional pre-detected format to avoid re-detecting large XML inputs
* @returns Appropriate decoder instance
*/
public static createDecoder(xml: string, skipValidation: boolean = false): BaseDecoder {
const format = FormatDetector.detectFormat(xml);
public static createDecoder(
xml: string,
skipValidation: boolean = false,
formatHint?: InvoiceFormat,
): BaseDecoder {
const format = formatHint ?? FormatDetector.detectFormat(xml);
switch (format) {
case InvoiceFormat.UBL: