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 CHANGED
@@ -3057,6 +3057,9 @@
3057
3057
  "uniuni": {
3058
3058
  "displayName": "UniUni",
3059
3059
  "color": "#f68841",
3060
+ "aliases": [
3061
+ "UNI Express"
3062
+ ],
3060
3063
  "countries": [
3061
3064
  "CA",
3062
3065
  "US"
@@ -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).candidates, r = is(s), o = r && n.includes(e) ? n.filter((t) => t !== e && h[t]?.countries?.[0] === r) : [];
12329
- o.length === 1 && (i = o[0], a = "reference");
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,
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "id": "uniuni",
3
3
  "displayName": "UniUni",
4
- "aliases": [],
4
+ "aliases": [
5
+ "UNI Express"
6
+ ],
5
7
  "region": {
6
8
  "countries": [
7
9
  "CA",
@@ -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. The catalog lists that carrier beside the
60
- // origin for the shape; it has to be the only one at home where the parcel goes.
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 candidates = detectCarrierMatch(number).candidates;
64
+ const detected = detectCarrierMatch(number);
63
65
  const country = countryCode(destination);
64
- const local = country && candidates.includes(carrier) ? candidates.filter((candidate) => candidate !== carrier
65
- && CARRIER_DEFINITIONS[candidate]?.countries?.[0] === country) : [];
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';
@@ -3057,6 +3057,9 @@
3057
3057
  "uniuni": {
3058
3058
  "displayName": "UniUni",
3059
3059
  "color": "#f68841",
3060
+ "aliases": [
3061
+ "UNI Express"
3062
+ ],
3060
3063
  "countries": [
3061
3064
  "CA",
3062
3065
  "US"
@@ -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";
@@ -3058,6 +3058,9 @@ export const CARRIER_CATALOG = {
3058
3058
  "uniuni": {
3059
3059
  "displayName": "UniUni",
3060
3060
  "color": "#f68841",
3061
+ "aliases": [
3062
+ "UNI Express"
3063
+ ],
3061
3064
  "countries": [
3062
3065
  "CA",
3063
3066
  "US"
@@ -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). Their home clock is a guess, which a location
182
- * in another country rules out.
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;
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Universal Parcel Scraper",
5
- "version": "0.133.1"
5
+ "version": "0.133.3"
6
6
  },
7
7
  "paths": {
8
8
  "/health": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-parcel-scraper",
3
- "version": "0.133.2-main.1113",
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",