universal-parcel-scraper 0.133.2-main.1113 → 0.133.3-main.1118
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 +3 -0
- package/dist/browser/scraper.js +3 -2
- package/dist/carriers/uniuni/carrier.json +3 -1
- package/dist/core/catalog/handoff.js +11 -5
- package/dist/data/catalog.json +3 -0
- package/dist/generated/catalog.d.ts +1 -0
- package/dist/generated/catalog.js +3 -0
- package/dist/providers/parcelsapp/adapter.js +4 -2
- package/dist/server/openapi.json +1 -1
- package/package.json +1 -1
package/data/catalog.json
CHANGED
package/dist/browser/scraper.js
CHANGED
|
@@ -2600,6 +2600,7 @@ var De = {
|
|
|
2600
2600
|
uniuni: {
|
|
2601
2601
|
displayName: "UniUni",
|
|
2602
2602
|
color: "#f68841",
|
|
2603
|
+
aliases: ["UNI Express"],
|
|
2603
2604
|
countries: ["CA", "US"],
|
|
2604
2605
|
selectable: !0,
|
|
2605
2606
|
timezone: "UTC",
|
|
@@ -12325,8 +12326,8 @@ function Mc(e, t, n) {
|
|
|
12325
12326
|
e.confidence === "high" && (i = e.carrier, a = "reference");
|
|
12326
12327
|
}
|
|
12327
12328
|
if (!i && !n.delivery_tracking_number && ["aliexpress", "intl-post"].includes(e) && xt(t) && (!s || ["ch", "switzerland"].includes(s.trim().toLowerCase())) && (i = "swiss-post", a = "reference"), !i && !n.delivery_tracking_number && Ac(e)) {
|
|
12328
|
-
let n = y(t)
|
|
12329
|
-
|
|
12329
|
+
let n = y(t), r = is(s), o = n.confidence === "high" && n.carrier !== e && !v(t) ? n.carrier : null, c = r ? o ? [o].filter((e) => h[e]?.countries?.includes(r)) : n.candidates.includes(e) ? n.candidates.filter((t) => t !== e && h[t]?.countries?.[0] === r) : [] : [];
|
|
12330
|
+
c.length === 1 && (i = c[0], a = "reference");
|
|
12330
12331
|
}
|
|
12331
12332
|
return !i || i === e || !/^[A-Z0-9]{4,40}$/.test(o) || !jc(i, o) ? null : {
|
|
12332
12333
|
carrier: i,
|
|
@@ -56,13 +56,19 @@ export function deliveryHandoff(carrier, number, result) {
|
|
|
56
56
|
basis = 'reference';
|
|
57
57
|
}
|
|
58
58
|
// An origin that follows the parcel under its delivery carrier's number has
|
|
59
|
-
// no second reference to name.
|
|
60
|
-
//
|
|
59
|
+
// no second reference to name. That carrier delivers where the parcel goes:
|
|
60
|
+
// the one carrier that issues the shape (an S10's issuer does not deliver
|
|
61
|
+
// it), else the only one at home there that the catalog lists beside the
|
|
62
|
+
// origin for the shape.
|
|
61
63
|
if (!target && !result.delivery_tracking_number && followsPartnerNumbers(carrier)) {
|
|
62
|
-
const
|
|
64
|
+
const detected = detectCarrierMatch(number);
|
|
63
65
|
const country = countryCode(destination);
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
+
const issuer = detected.confidence === 'high' && detected.carrier !== carrier && !isValidS10TrackingNumber(number)
|
|
67
|
+
? detected.carrier : null;
|
|
68
|
+
const local = !country ? []
|
|
69
|
+
: issuer ? [issuer].filter((candidate) => CARRIER_DEFINITIONS[candidate]?.countries?.includes(country))
|
|
70
|
+
: detected.candidates.includes(carrier) ? detected.candidates.filter((candidate) => candidate !== carrier
|
|
71
|
+
&& CARRIER_DEFINITIONS[candidate]?.countries?.[0] === country) : [];
|
|
66
72
|
if (local.length === 1) {
|
|
67
73
|
target = local[0];
|
|
68
74
|
basis = 'reference';
|
package/dist/data/catalog.json
CHANGED
|
@@ -2083,6 +2083,7 @@ export declare const CARRIER_CATALOG: {
|
|
|
2083
2083
|
readonly uniuni: {
|
|
2084
2084
|
readonly displayName: "UniUni";
|
|
2085
2085
|
readonly color: "#f68841";
|
|
2086
|
+
readonly aliases: readonly ["UNI Express"];
|
|
2086
2087
|
readonly countries: readonly ["CA", "US"];
|
|
2087
2088
|
readonly selectable: true;
|
|
2088
2089
|
readonly timezone: "UTC";
|
|
@@ -178,11 +178,13 @@ const HOME_CLOCKS = {
|
|
|
178
178
|
* (2026-10-10): Korea Post's page, Bring's offsets (in Denmark too) and
|
|
179
179
|
* Parcelforce's for Royal Mail; Japan Post's, which its portal gives as local
|
|
180
180
|
* times, at 10:27 for a delivery in Japan that Cainiao dates 10:27 GMT+9 and
|
|
181
|
-
* Ship24 01:27Z (2026-10-11).
|
|
182
|
-
*
|
|
181
|
+
* Ship24 01:27Z (2026-10-11). Pekaes' are the offset-less digits its own
|
|
182
|
+
* history gives and its page labels Polish time (2026-10-13). Their home
|
|
183
|
+
* clock is a guess, which a location in another country rules out.
|
|
183
184
|
*/
|
|
184
185
|
const HOME_COUNTRIES = {
|
|
185
186
|
southkoreapost: 'Asia/Seoul', postennorgenorwaypost: 'Europe/Oslo', royalmail: 'Europe/London', japanpost: 'Asia/Tokyo',
|
|
187
|
+
pekaes: 'Europe/Warsaw',
|
|
186
188
|
};
|
|
187
189
|
const UNITED_STATES = /^(?:us|usa|united states(?: of america)?)$/i;
|
|
188
190
|
const POSTAL_CODE = /\s*\b(?:\d{5}(?:-\d{4})?|[A-Z]\d[A-Z] ?\d[A-Z]\d)$/i;
|
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.133.
|
|
3
|
+
"version": "0.133.3-main.1118",
|
|
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",
|