universal-parcel-scraper 0.841.2-main.4491 → 0.843.0-main.4497
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/data/catalog.json +16 -2
- package/data/detection-golden.json +26 -2
- package/dist/browser/scraper.js +30 -12
- package/dist/carriers/huahan/carrier.json +2 -1
- package/dist/carriers/morning-global/carrier.json +7 -1
- package/dist/carriers/morning-global/numbers.json +4 -1
- package/dist/carriers/sameday/carrier.json +5 -0
- package/dist/carriers/sameday/numbers.json +15 -0
- package/dist/carriers/singapore-post/adapter.js +3 -2
- package/dist/carriers/singapore-post/carrier.json +5 -0
- package/dist/carriers/singapore-post/numbers.json +15 -0
- package/dist/data/catalog.json +16 -2
- package/dist/generated/catalog.d.ts +11 -2
- package/dist/generated/catalog.js +19 -5
- package/dist/server/openapi.json +1 -1
- package/package.json +1 -1
package/data/catalog.json
CHANGED
|
@@ -4190,6 +4190,10 @@
|
|
|
4190
4190
|
"pattern": "^[A-Z]{2}\\d{9}SG$",
|
|
4191
4191
|
"confidence": "high",
|
|
4192
4192
|
"checksum": "s10"
|
|
4193
|
+
},
|
|
4194
|
+
{
|
|
4195
|
+
"pattern": "^CNSGS\\d{10}$",
|
|
4196
|
+
"confidence": "low"
|
|
4193
4197
|
}
|
|
4194
4198
|
]
|
|
4195
4199
|
},
|
|
@@ -19307,7 +19311,8 @@
|
|
|
19307
19311
|
"aliases": [
|
|
19308
19312
|
"HuaHan Express",
|
|
19309
19313
|
"华翰速递",
|
|
19310
|
-
"华翰物流"
|
|
19314
|
+
"华翰物流",
|
|
19315
|
+
"Huanhan Logistics"
|
|
19311
19316
|
],
|
|
19312
19317
|
"countries": [
|
|
19313
19318
|
"CN"
|
|
@@ -24655,7 +24660,12 @@
|
|
|
24655
24660
|
]
|
|
24656
24661
|
}
|
|
24657
24662
|
],
|
|
24658
|
-
"detectionRules": [
|
|
24663
|
+
"detectionRules": [
|
|
24664
|
+
{
|
|
24665
|
+
"pattern": "^BR\\d{9}MG$",
|
|
24666
|
+
"confidence": "low"
|
|
24667
|
+
}
|
|
24668
|
+
]
|
|
24659
24669
|
},
|
|
24660
24670
|
"mrl-global": {
|
|
24661
24671
|
"displayName": "MRL Global",
|
|
@@ -30878,6 +30888,10 @@
|
|
|
30878
30888
|
{
|
|
30879
30889
|
"pattern": "^1[A-Z][A-Z0-9]{2}L[LN]\\d{9,12}$",
|
|
30880
30890
|
"confidence": "low"
|
|
30891
|
+
},
|
|
30892
|
+
{
|
|
30893
|
+
"pattern": "^1XL\\d{11}$",
|
|
30894
|
+
"confidence": "low"
|
|
30881
30895
|
}
|
|
30882
30896
|
]
|
|
30883
30897
|
},
|
|
@@ -22577,6 +22577,17 @@
|
|
|
22577
22577
|
"poste-italiane"
|
|
22578
22578
|
]
|
|
22579
22579
|
},
|
|
22580
|
+
{
|
|
22581
|
+
"input": "1XL00000000002",
|
|
22582
|
+
"carrier": "unknown",
|
|
22583
|
+
"confidence": "low",
|
|
22584
|
+
"candidates": [
|
|
22585
|
+
"sameday"
|
|
22586
|
+
],
|
|
22587
|
+
"asked": [
|
|
22588
|
+
"sameday"
|
|
22589
|
+
]
|
|
22590
|
+
},
|
|
22580
22591
|
{
|
|
22581
22592
|
"input": "1XZ9LL000000000001",
|
|
22582
22593
|
"carrier": "unknown",
|
|
@@ -69196,8 +69207,13 @@
|
|
|
69196
69207
|
{
|
|
69197
69208
|
"input": "BR003081784MG",
|
|
69198
69209
|
"carrier": "unknown",
|
|
69199
|
-
"confidence": "
|
|
69200
|
-
"candidates": [
|
|
69210
|
+
"confidence": "low",
|
|
69211
|
+
"candidates": [
|
|
69212
|
+
"morning-global"
|
|
69213
|
+
],
|
|
69214
|
+
"asked": [
|
|
69215
|
+
"morning-global"
|
|
69216
|
+
]
|
|
69201
69217
|
},
|
|
69202
69218
|
{
|
|
69203
69219
|
"input": "BR257449972818X",
|
|
@@ -71641,6 +71657,14 @@
|
|
|
71641
71657
|
"ecoscooting"
|
|
71642
71658
|
]
|
|
71643
71659
|
},
|
|
71660
|
+
{
|
|
71661
|
+
"input": "CNSGS0000000002",
|
|
71662
|
+
"carrier": "unknown",
|
|
71663
|
+
"confidence": "low",
|
|
71664
|
+
"candidates": [
|
|
71665
|
+
"singapore-post"
|
|
71666
|
+
]
|
|
71667
|
+
},
|
|
71644
71668
|
{
|
|
71645
71669
|
"input": "CNUSUP00035889455",
|
|
71646
71670
|
"carrier": "unknown",
|
package/dist/browser/scraper.js
CHANGED
|
@@ -3670,6 +3670,9 @@ var tt = {
|
|
|
3670
3670
|
pattern: "^[A-Z]{2}\\d{9}SG$",
|
|
3671
3671
|
confidence: "high",
|
|
3672
3672
|
checksum: "s10"
|
|
3673
|
+
}, {
|
|
3674
|
+
pattern: "^CNSGS\\d{10}$",
|
|
3675
|
+
confidence: "low"
|
|
3673
3676
|
}]
|
|
3674
3677
|
},
|
|
3675
3678
|
"japan-post": {
|
|
@@ -14934,7 +14937,8 @@ var tt = {
|
|
|
14934
14937
|
aliases: [
|
|
14935
14938
|
"HuaHan Express",
|
|
14936
14939
|
"华翰速递",
|
|
14937
|
-
"华翰物流"
|
|
14940
|
+
"华翰物流",
|
|
14941
|
+
"Huanhan Logistics"
|
|
14938
14942
|
],
|
|
14939
14943
|
countries: ["CN"],
|
|
14940
14944
|
selectable: !0,
|
|
@@ -18919,7 +18923,10 @@ var tt = {
|
|
|
18919
18923
|
pathPattern: "^/yundan/status\\.php$",
|
|
18920
18924
|
params: ["ydh"]
|
|
18921
18925
|
}],
|
|
18922
|
-
detectionRules: [
|
|
18926
|
+
detectionRules: [{
|
|
18927
|
+
pattern: "^BR\\d{9}MG$",
|
|
18928
|
+
confidence: "low"
|
|
18929
|
+
}]
|
|
18923
18930
|
},
|
|
18924
18931
|
"mrl-global": {
|
|
18925
18932
|
displayName: "MRL Global",
|
|
@@ -23515,13 +23522,20 @@ var tt = {
|
|
|
23515
23522
|
params: ["awb"],
|
|
23516
23523
|
fragment: "^awb=([A-Za-z0-9]+)"
|
|
23517
23524
|
}],
|
|
23518
|
-
detectionRules: [
|
|
23519
|
-
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23523
|
-
|
|
23524
|
-
|
|
23525
|
+
detectionRules: [
|
|
23526
|
+
{
|
|
23527
|
+
pattern: "^1[A-Z]{3,5}\\d{9,12}$",
|
|
23528
|
+
confidence: "low"
|
|
23529
|
+
},
|
|
23530
|
+
{
|
|
23531
|
+
pattern: "^1[A-Z][A-Z0-9]{2}L[LN]\\d{9,12}$",
|
|
23532
|
+
confidence: "low"
|
|
23533
|
+
},
|
|
23534
|
+
{
|
|
23535
|
+
pattern: "^1XL\\d{11}$",
|
|
23536
|
+
confidence: "low"
|
|
23537
|
+
}
|
|
23538
|
+
]
|
|
23525
23539
|
},
|
|
23526
23540
|
"sapx-express": {
|
|
23527
23541
|
displayName: "SAPX Express",
|
|
@@ -29324,7 +29338,7 @@ var tt = {
|
|
|
29324
29338
|
"nz-post-2",
|
|
29325
29339
|
"nz-post-3"
|
|
29326
29340
|
],
|
|
29327
|
-
"singapore-post": ["singapore-post-1"],
|
|
29341
|
+
"singapore-post": ["singapore-post-1", "singapore-post-2"],
|
|
29328
29342
|
"japan-post": [
|
|
29329
29343
|
"japan-post-1",
|
|
29330
29344
|
"japan-post-domestic",
|
|
@@ -29994,7 +30008,7 @@ var tt = {
|
|
|
29994
30008
|
"mng-kargo": [],
|
|
29995
30009
|
"mongol-infinity-post": [],
|
|
29996
30010
|
"montenegro-post": [],
|
|
29997
|
-
"morning-global": [],
|
|
30011
|
+
"morning-global": ["morning-global-1"],
|
|
29998
30012
|
"mrl-global": [],
|
|
29999
30013
|
mtscn: ["mtscn-1"],
|
|
30000
30014
|
mylerz: ["mylerz-1"],
|
|
@@ -30167,7 +30181,11 @@ var tt = {
|
|
|
30167
30181
|
"sahara-express": [],
|
|
30168
30182
|
saia: ["saia-1"],
|
|
30169
30183
|
sailpost: [],
|
|
30170
|
-
sameday: [
|
|
30184
|
+
sameday: [
|
|
30185
|
+
"sameday-1",
|
|
30186
|
+
"sameday-2",
|
|
30187
|
+
"sameday-3"
|
|
30188
|
+
],
|
|
30171
30189
|
"sapx-express": [],
|
|
30172
30190
|
"sat-ukraine": [],
|
|
30173
30191
|
"saudi-post": ["saudi-post-1", "saudi-post-s10"],
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
},
|
|
36
36
|
"expect": {
|
|
37
37
|
"carrier": "unknown",
|
|
38
|
-
"confidence": "
|
|
38
|
+
"confidence": "low",
|
|
39
|
+
"candidates": [
|
|
40
|
+
"morning-global"
|
|
41
|
+
]
|
|
39
42
|
},
|
|
40
43
|
"note": "The archived reply of Morning Global's tracking API, captured with the tracker page's lookup of this number, shows its history from order creation in Hong Kong to out for delivery in Canada."
|
|
41
44
|
}
|
|
@@ -288,6 +288,21 @@
|
|
|
288
288
|
]
|
|
289
289
|
},
|
|
290
290
|
"note": "Made-up number in the shape of an AWB whose three-character client code holds a digit, followed by LL and twelve digits. Sameday's tracker finds such a parcel as written."
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"number": "1XL00000000002",
|
|
294
|
+
"role": "shipment",
|
|
295
|
+
"evidence": "synthetic",
|
|
296
|
+
"derivedFrom": "donated_real",
|
|
297
|
+
"shapeConfirmed": "2026-10-30",
|
|
298
|
+
"expect": {
|
|
299
|
+
"carrier": "unknown",
|
|
300
|
+
"confidence": "low",
|
|
301
|
+
"candidates": [
|
|
302
|
+
"sameday"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"note": "Made-up number in the shape of a parcel the app tracked, which Sameday's tracker answered with its history."
|
|
291
306
|
}
|
|
292
307
|
]
|
|
293
308
|
}
|
|
@@ -30,7 +30,8 @@ function eventTime(value) {
|
|
|
30
30
|
return { local_time: parsed.toISO({ suppressMilliseconds: true, includeOffset: false }) };
|
|
31
31
|
}
|
|
32
32
|
function isPlaceholderScan(raw) {
|
|
33
|
-
return isRecord(raw) && [
|
|
33
|
+
return isRecord(raw) && ['', '-'].includes(clean(raw.statusDescription, 8))
|
|
34
|
+
&& [raw.date, raw.location].every((value) => clean(value, 8) === '-');
|
|
34
35
|
}
|
|
35
36
|
export function parse(payload, trackingNumber) {
|
|
36
37
|
const number = normalizeSingaporePostNumber(trackingNumber);
|
|
@@ -40,7 +41,7 @@ export function parse(payload, trackingNumber) {
|
|
|
40
41
|
if (matches.length !== 1 || !isRecord(matches[0]))
|
|
41
42
|
throw new SchemaError('Singapore Post', 'Singapore Post returned a different or ambiguous shipment');
|
|
42
43
|
const item = matches[0];
|
|
43
|
-
// Speedpost answers a missing item with one row of dashes instead of no rows.
|
|
44
|
+
// Speedpost answers a missing item with one row of dashes, its status dashed or empty, instead of no rows.
|
|
44
45
|
if (item.trackingNumberFound === 'false' && Array.isArray(item.events) && item.events.length <= 1
|
|
45
46
|
&& item.events.every(isPlaceholderScan))
|
|
46
47
|
throw new NotFoundError('Singapore Post');
|
|
@@ -185,6 +185,21 @@
|
|
|
185
185
|
"confidence": "high"
|
|
186
186
|
},
|
|
187
187
|
"note": "A Singapore Post tracking link archived by the Wayback Machine. A checksum-valid SG item the tracker no longer knows."
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"number": "CNSGS0000000002",
|
|
191
|
+
"role": "shipment",
|
|
192
|
+
"evidence": "synthetic",
|
|
193
|
+
"derivedFrom": "donated_real",
|
|
194
|
+
"shapeConfirmed": "2026-10-30",
|
|
195
|
+
"expect": {
|
|
196
|
+
"carrier": "unknown",
|
|
197
|
+
"confidence": "low",
|
|
198
|
+
"candidates": [
|
|
199
|
+
"singapore-post"
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"note": "Made-up number in the shape of two parcels from China the app tracked, which Singapore Post's tracker answered through to delivery."
|
|
188
203
|
}
|
|
189
204
|
]
|
|
190
205
|
}
|
package/dist/data/catalog.json
CHANGED
|
@@ -4190,6 +4190,10 @@
|
|
|
4190
4190
|
"pattern": "^[A-Z]{2}\\d{9}SG$",
|
|
4191
4191
|
"confidence": "high",
|
|
4192
4192
|
"checksum": "s10"
|
|
4193
|
+
},
|
|
4194
|
+
{
|
|
4195
|
+
"pattern": "^CNSGS\\d{10}$",
|
|
4196
|
+
"confidence": "low"
|
|
4193
4197
|
}
|
|
4194
4198
|
]
|
|
4195
4199
|
},
|
|
@@ -19307,7 +19311,8 @@
|
|
|
19307
19311
|
"aliases": [
|
|
19308
19312
|
"HuaHan Express",
|
|
19309
19313
|
"华翰速递",
|
|
19310
|
-
"华翰物流"
|
|
19314
|
+
"华翰物流",
|
|
19315
|
+
"Huanhan Logistics"
|
|
19311
19316
|
],
|
|
19312
19317
|
"countries": [
|
|
19313
19318
|
"CN"
|
|
@@ -24655,7 +24660,12 @@
|
|
|
24655
24660
|
]
|
|
24656
24661
|
}
|
|
24657
24662
|
],
|
|
24658
|
-
"detectionRules": [
|
|
24663
|
+
"detectionRules": [
|
|
24664
|
+
{
|
|
24665
|
+
"pattern": "^BR\\d{9}MG$",
|
|
24666
|
+
"confidence": "low"
|
|
24667
|
+
}
|
|
24668
|
+
]
|
|
24659
24669
|
},
|
|
24660
24670
|
"mrl-global": {
|
|
24661
24671
|
"displayName": "MRL Global",
|
|
@@ -30878,6 +30888,10 @@
|
|
|
30878
30888
|
{
|
|
30879
30889
|
"pattern": "^1[A-Z][A-Z0-9]{2}L[LN]\\d{9,12}$",
|
|
30880
30890
|
"confidence": "low"
|
|
30891
|
+
},
|
|
30892
|
+
{
|
|
30893
|
+
"pattern": "^1XL\\d{11}$",
|
|
30894
|
+
"confidence": "low"
|
|
30881
30895
|
}
|
|
30882
30896
|
]
|
|
30883
30897
|
},
|
|
@@ -2860,6 +2860,9 @@ export declare const CARRIER_CATALOG: {
|
|
|
2860
2860
|
readonly pattern: "^[A-Z]{2}\\d{9}SG$";
|
|
2861
2861
|
readonly confidence: "high";
|
|
2862
2862
|
readonly checksum: "s10";
|
|
2863
|
+
}, {
|
|
2864
|
+
readonly pattern: "^CNSGS\\d{10}$";
|
|
2865
|
+
readonly confidence: "low";
|
|
2863
2866
|
}];
|
|
2864
2867
|
};
|
|
2865
2868
|
readonly "japan-post": {
|
|
@@ -12456,7 +12459,7 @@ export declare const CARRIER_CATALOG: {
|
|
|
12456
12459
|
readonly huahan: {
|
|
12457
12460
|
readonly displayName: "HuaHan Logistics";
|
|
12458
12461
|
readonly color: "#0069e8";
|
|
12459
|
-
readonly aliases: readonly ["HuaHan Express", "华翰速递", "华翰物流"];
|
|
12462
|
+
readonly aliases: readonly ["HuaHan Express", "华翰速递", "华翰物流", "Huanhan Logistics"];
|
|
12460
12463
|
readonly countries: readonly ["CN"];
|
|
12461
12464
|
readonly selectable: true;
|
|
12462
12465
|
readonly timezone: "Asia/Shanghai";
|
|
@@ -15820,7 +15823,10 @@ export declare const CARRIER_CATALOG: {
|
|
|
15820
15823
|
readonly pathPattern: "^/yundan/status\\.php$";
|
|
15821
15824
|
readonly params: readonly ["ydh"];
|
|
15822
15825
|
}];
|
|
15823
|
-
readonly detectionRules: readonly [
|
|
15826
|
+
readonly detectionRules: readonly [{
|
|
15827
|
+
readonly pattern: "^BR\\d{9}MG$";
|
|
15828
|
+
readonly confidence: "low";
|
|
15829
|
+
}];
|
|
15824
15830
|
};
|
|
15825
15831
|
readonly "mrl-global": {
|
|
15826
15832
|
readonly displayName: "MRL Global";
|
|
@@ -19721,6 +19727,9 @@ export declare const CARRIER_CATALOG: {
|
|
|
19721
19727
|
}, {
|
|
19722
19728
|
readonly pattern: "^1[A-Z][A-Z0-9]{2}L[LN]\\d{9,12}$";
|
|
19723
19729
|
readonly confidence: "low";
|
|
19730
|
+
}, {
|
|
19731
|
+
readonly pattern: "^1XL\\d{11}$";
|
|
19732
|
+
readonly confidence: "low";
|
|
19724
19733
|
}];
|
|
19725
19734
|
};
|
|
19726
19735
|
readonly "sapx-express": {
|
|
@@ -4191,6 +4191,10 @@ export const CARRIER_CATALOG = {
|
|
|
4191
4191
|
"pattern": "^[A-Z]{2}\\d{9}SG$",
|
|
4192
4192
|
"confidence": "high",
|
|
4193
4193
|
"checksum": "s10"
|
|
4194
|
+
},
|
|
4195
|
+
{
|
|
4196
|
+
"pattern": "^CNSGS\\d{10}$",
|
|
4197
|
+
"confidence": "low"
|
|
4194
4198
|
}
|
|
4195
4199
|
]
|
|
4196
4200
|
},
|
|
@@ -19308,7 +19312,8 @@ export const CARRIER_CATALOG = {
|
|
|
19308
19312
|
"aliases": [
|
|
19309
19313
|
"HuaHan Express",
|
|
19310
19314
|
"华翰速递",
|
|
19311
|
-
"华翰物流"
|
|
19315
|
+
"华翰物流",
|
|
19316
|
+
"Huanhan Logistics"
|
|
19312
19317
|
],
|
|
19313
19318
|
"countries": [
|
|
19314
19319
|
"CN"
|
|
@@ -24656,7 +24661,12 @@ export const CARRIER_CATALOG = {
|
|
|
24656
24661
|
]
|
|
24657
24662
|
}
|
|
24658
24663
|
],
|
|
24659
|
-
"detectionRules": [
|
|
24664
|
+
"detectionRules": [
|
|
24665
|
+
{
|
|
24666
|
+
"pattern": "^BR\\d{9}MG$",
|
|
24667
|
+
"confidence": "low"
|
|
24668
|
+
}
|
|
24669
|
+
]
|
|
24660
24670
|
},
|
|
24661
24671
|
"mrl-global": {
|
|
24662
24672
|
"displayName": "MRL Global",
|
|
@@ -30879,6 +30889,10 @@ export const CARRIER_CATALOG = {
|
|
|
30879
30889
|
{
|
|
30880
30890
|
"pattern": "^1[A-Z][A-Z0-9]{2}L[LN]\\d{9,12}$",
|
|
30881
30891
|
"confidence": "low"
|
|
30892
|
+
},
|
|
30893
|
+
{
|
|
30894
|
+
"pattern": "^1XL\\d{11}$",
|
|
30895
|
+
"confidence": "low"
|
|
30882
30896
|
}
|
|
30883
30897
|
]
|
|
30884
30898
|
},
|
|
@@ -39328,7 +39342,7 @@ export const DETECTION_RULE_IDS = {
|
|
|
39328
39342
|
"blue-dart": ["blue-dart-1"],
|
|
39329
39343
|
"delhivery": ["delhivery-1"],
|
|
39330
39344
|
"nz-post": ["nz-post-1", "nz-post-2", "nz-post-3"],
|
|
39331
|
-
"singapore-post": ["singapore-post-1"],
|
|
39345
|
+
"singapore-post": ["singapore-post-1", "singapore-post-2"],
|
|
39332
39346
|
"japan-post": ["japan-post-1", "japan-post-domestic", "japan-post-registered"],
|
|
39333
39347
|
"sf-express": ["sf-express-3", "sf-express-1", "sf-express-2", "sf-express-4"],
|
|
39334
39348
|
"sto": ["sto-1", "sto-2"],
|
|
@@ -39845,7 +39859,7 @@ export const DETECTION_RULE_IDS = {
|
|
|
39845
39859
|
"mng-kargo": [],
|
|
39846
39860
|
"mongol-infinity-post": [],
|
|
39847
39861
|
"montenegro-post": [],
|
|
39848
|
-
"morning-global": [],
|
|
39862
|
+
"morning-global": ["morning-global-1"],
|
|
39849
39863
|
"mrl-global": [],
|
|
39850
39864
|
"mtscn": ["mtscn-1"],
|
|
39851
39865
|
"mylerz": ["mylerz-1"],
|
|
@@ -40001,7 +40015,7 @@ export const DETECTION_RULE_IDS = {
|
|
|
40001
40015
|
"sahara-express": [],
|
|
40002
40016
|
"saia": ["saia-1"],
|
|
40003
40017
|
"sailpost": [],
|
|
40004
|
-
"sameday": ["sameday-1", "sameday-2"],
|
|
40018
|
+
"sameday": ["sameday-1", "sameday-2", "sameday-3"],
|
|
40005
40019
|
"sapx-express": [],
|
|
40006
40020
|
"sat-ukraine": [],
|
|
40007
40021
|
"saudi-post": ["saudi-post-1", "saudi-post-s10"],
|
package/dist/server/openapi.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-parcel-scraper",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.843.0-main.4497",
|
|
4
4
|
"description": "Self-hosted parcel tracking: carrier detection, dedicated scrapers and optional universal providers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|