universal-parcel-scraper 0.682.0-main.3237 → 0.682.0-main.3238

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
@@ -28732,6 +28732,10 @@
28732
28732
  {
28733
28733
  "pattern": "^STR(?:TD\\d{9}|TD\\d{16,17}|CA\\d{13})$",
28734
28734
  "confidence": "high"
28735
+ },
28736
+ {
28737
+ "pattern": "^STSH[A-Z]{2}\\d{11}$",
28738
+ "confidence": "low"
28735
28739
  }
28736
28740
  ]
28737
28741
  },
@@ -89535,9 +89535,11 @@
89535
89535
  "carrier": "unknown",
89536
89536
  "confidence": "low",
89537
89537
  "candidates": [
89538
- "colis-prive"
89538
+ "colis-prive",
89539
+ "straightship"
89539
89540
  ],
89540
89541
  "asked": [
89542
+ "straightship",
89541
89543
  "colis-prive"
89542
89544
  ]
89543
89545
  },
@@ -21764,6 +21764,9 @@ var Ze = {
21764
21764
  detectionRules: [{
21765
21765
  pattern: "^STR(?:TD\\d{9}|TD\\d{16,17}|CA\\d{13})$",
21766
21766
  confidence: "high"
21767
+ }, {
21768
+ pattern: "^STSH[A-Z]{2}\\d{11}$",
21769
+ confidence: "low"
21767
21770
  }]
21768
21771
  },
21769
21772
  "sundarban-courier": {
@@ -25435,7 +25438,7 @@ var Ze = {
25435
25438
  starken: [],
25436
25439
  starlinks: ["starlinks-1"],
25437
25440
  steadfast: ["steadfast-1"],
25438
- straightship: ["straightship-1"],
25441
+ straightship: ["straightship-1", "straightship-2"],
25439
25442
  "sundarban-courier": [],
25440
25443
  "surat-kargo": [],
25441
25444
  swiftx: ["swiftx-1"],
@@ -81,6 +81,11 @@
81
81
  "id": "straightship-1",
82
82
  "pattern": "^STR(?:TD\\d{9}|TD\\d{16,17}|CA\\d{13})$",
83
83
  "confidence": "high"
84
+ },
85
+ {
86
+ "id": "straightship-2",
87
+ "pattern": "^STSH[A-Z]{2}\\d{11}$",
88
+ "confidence": "low"
84
89
  }
85
90
  ]
86
91
  }
@@ -189,7 +189,8 @@
189
189
  "carrier": "unknown",
190
190
  "confidence": "low",
191
191
  "candidates": [
192
- "colis-prive"
192
+ "colis-prive",
193
+ "straightship"
193
194
  ]
194
195
  },
195
196
  "note": "An opened capture of Straightship's own tracker shows this parcel's information created under client code SS01."
@@ -9,8 +9,8 @@ export const PROVIDER = 'Straightship';
9
9
  // A page is about 10 kB; a long history of delivery attempts doubles it.
10
10
  export const STRAIGHTSHIP_MAX_BYTES = 512 * 1024;
11
11
  // STRTD and nine, sixteen or seventeen digits, or STRCA and thirteen, as
12
- // `straightship-1` claims them.
13
- const NUMBER = /^STR(?:TD\d{9}|TD\d{16,17}|CA\d{13})$/;
12
+ // `straightship-1` claims them, or STSH, two letters and eleven digits, as `straightship-2` offers them.
13
+ const NUMBER = /^(?:STR(?:TD\d{9}|TD\d{16,17}|CA\d{13})|STSH[A-Z]{2}\d{11})$/;
14
14
  const CLOCK = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/;
15
15
  // The note under the history: "All timestamps are shown in Coordinated Universal Time (UTC)."
16
16
  const UTC_NOTE = /\btimestamps are shown in (?:Coordinated Universal Time|UTC)\b/i;
@@ -26,7 +26,7 @@ const MAX_EVENTS = 100;
26
26
  export function normalizeStraightshipNumber(raw) {
27
27
  const number = raw.length <= 64 ? normalizeTrackingNumber(raw) : '';
28
28
  if (!NUMBER.test(number))
29
- throw new InvalidInputError(PROVIDER, 'Straightship numbers are STRTD or STRCA and digits');
29
+ throw new InvalidInputError(PROVIDER, 'Straightship numbers are STRTD, STRCA or STSH and digits');
30
30
  return number;
31
31
  }
32
32
  const text = (node, maxLength = 300) => clean(node.text(), maxLength);
@@ -28732,6 +28732,10 @@
28732
28732
  {
28733
28733
  "pattern": "^STR(?:TD\\d{9}|TD\\d{16,17}|CA\\d{13})$",
28734
28734
  "confidence": "high"
28735
+ },
28736
+ {
28737
+ "pattern": "^STSH[A-Z]{2}\\d{11}$",
28738
+ "confidence": "low"
28735
28739
  }
28736
28740
  ]
28737
28741
  },
@@ -18362,6 +18362,9 @@ export declare const CARRIER_CATALOG: {
18362
18362
  readonly detectionRules: readonly [{
18363
18363
  readonly pattern: "^STR(?:TD\\d{9}|TD\\d{16,17}|CA\\d{13})$";
18364
18364
  readonly confidence: "high";
18365
+ }, {
18366
+ readonly pattern: "^STSH[A-Z]{2}\\d{11}$";
18367
+ readonly confidence: "low";
18365
18368
  }];
18366
18369
  };
18367
18370
  readonly "sundarban-courier": {
@@ -28733,6 +28733,10 @@ export const CARRIER_CATALOG = {
28733
28733
  {
28734
28734
  "pattern": "^STR(?:TD\\d{9}|TD\\d{16,17}|CA\\d{13})$",
28735
28735
  "confidence": "high"
28736
+ },
28737
+ {
28738
+ "pattern": "^STSH[A-Z]{2}\\d{11}$",
28739
+ "confidence": "low"
28736
28740
  }
28737
28741
  ]
28738
28742
  },
@@ -33756,7 +33760,7 @@ export const DETECTION_RULE_IDS = {
33756
33760
  "starken": [],
33757
33761
  "starlinks": ["starlinks-1"],
33758
33762
  "steadfast": ["steadfast-1"],
33759
- "straightship": ["straightship-1"],
33763
+ "straightship": ["straightship-1", "straightship-2"],
33760
33764
  "sundarban-courier": [],
33761
33765
  "surat-kargo": [],
33762
33766
  "swiftx": ["swiftx-1"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-parcel-scraper",
3
- "version": "0.682.0-main.3237",
3
+ "version": "0.682.0-main.3238",
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",