@arela/uploader 1.1.1 → 1.1.2
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/package.json
CHANGED
package/src/config/config.js
CHANGED
|
@@ -37,10 +37,10 @@ class Config {
|
|
|
37
37
|
const __dirname = path.dirname(__filename);
|
|
38
38
|
const packageJsonPath = path.resolve(__dirname, '../../package.json');
|
|
39
39
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
40
|
-
return packageJson.version || '1.1.
|
|
40
|
+
return packageJson.version || '1.1.2';
|
|
41
41
|
} catch (error) {
|
|
42
42
|
console.warn('⚠️ Could not read package.json version, using fallback');
|
|
43
|
-
return '1.1.
|
|
43
|
+
return '1.1.2';
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -145,8 +145,15 @@ export const codigoAceptacionExtractor = {
|
|
|
145
145
|
},
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
// 7) Num. E-Document: collects all 13-char
|
|
149
|
-
// `NUM. E-DOCUMENT` / `NUMERO DE E-DOCUMENT` labels.
|
|
148
|
+
// 7) Num. E-Document: collects all 13-char codes following
|
|
149
|
+
// `NUM. E-DOCUMENT` / `NUMERO DE E-DOCUMENT` labels. Real eDocument
|
|
150
|
+
// numbers START WITH A DIGIT (e.g. "0438261FSSN86"); MVE acuse folios
|
|
151
|
+
// ("MNVA26002Q3V5") are also listed under the same label and kept —
|
|
152
|
+
// downstream consumers filter them. The old bare [A-Z0-9]{13} also
|
|
153
|
+
// captured 13-letter words (TRANSPORTISTA), truncated tokens
|
|
154
|
+
// (IDENTIFICACIO[N], CURP prefixes) and RFCs.
|
|
155
|
+
const EDOC_RE = /(?<![A-Z0-9])(?:\d[A-Z0-9]{12}|MNVA[A-Z0-9]{9})(?![A-Z0-9])/g;
|
|
156
|
+
|
|
150
157
|
export const numEDocumentoExtractor = {
|
|
151
158
|
field: 'numEDocumento',
|
|
152
159
|
extract: (source) => {
|
|
@@ -160,14 +167,14 @@ export const numEDocumentoExtractor = {
|
|
|
160
167
|
if (!hasTitle) continue;
|
|
161
168
|
|
|
162
169
|
// Codes on the title line itself
|
|
163
|
-
const codesInLine = line.match(
|
|
170
|
+
const codesInLine = line.match(EDOC_RE) || [];
|
|
164
171
|
extractedCodes.push(...codesInLine);
|
|
165
172
|
|
|
166
173
|
// Codes on the next few lines (e.g. CLAVE/COMPL. table rows)
|
|
167
174
|
for (let j = 1; j <= 10 && i + j < lines.length; j++) {
|
|
168
175
|
const nextLine = lines[i + j];
|
|
169
176
|
if (/NUMERO|OBSERVACIONES/i.test(nextLine)) break;
|
|
170
|
-
const codesInNextLine = nextLine.match(
|
|
177
|
+
const codesInNextLine = nextLine.match(EDOC_RE) || [];
|
|
171
178
|
extractedCodes.push(...codesInNextLine);
|
|
172
179
|
}
|
|
173
180
|
}
|