universal-parcel-scraper 0.802.2-main.4316 → 0.802.3-main.4319
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.
|
@@ -791,11 +791,14 @@ const POLAND_POST_RELAY = /^International Postal System$/i;
|
|
|
791
791
|
* have the digits and offset of Poczta Polska's own tracker. Its relays from
|
|
792
792
|
* abroad, with no place or at the "International Postal System", put
|
|
793
793
|
* Poland's offset on the other country's clock, which its tracker leaves
|
|
794
|
-
* without one.
|
|
794
|
+
* without one. La Poste's scans it files at a country alone ("Country:
|
|
795
|
+
* Poland", "PL99999") have La Poste's clock as UTC digits shifted into
|
|
796
|
+
* Poland's offset: taken as given, they came two hours after La Poste's own.
|
|
795
797
|
*/
|
|
796
798
|
function ownOffset(name, date, location = '') {
|
|
797
799
|
const key = nameKey(name);
|
|
798
|
-
const own = key === 'gofoexpress'
|
|
800
|
+
const own = key === 'gofoexpress'
|
|
801
|
+
|| (key === 'polandpost' && location !== '' && !POLAND_POST_RELAY.test(location) && !countryCode(location));
|
|
799
802
|
const offset = own && typeof date === 'string' ? /[+-]\d{2}:\d{2}$/.exec(date.trim())?.[0] : undefined;
|
|
800
803
|
return offset && !/^[+-]00:00$/.test(offset) ? offset : null;
|
|
801
804
|
}
|
|
@@ -16,8 +16,8 @@ export const SUB_STAGES = {
|
|
|
16
16
|
Exception_Rejected: 'exception', Exception_Delayed: 'exception', Exception_Lost: 'exception',
|
|
17
17
|
Exception_Destroyed: 'exception', Exception_Cancel: 'exception',
|
|
18
18
|
};
|
|
19
|
-
// Correios Brazil's export unit abroad receiving the item, which 17TRACK files as information received.
|
|
20
|
-
const SCANNED = /^objeto recebido na unidade de exporta(?:ção|cao) no pa(?:í|i)s de origem\.?$/i;
|
|
19
|
+
// Correios Brazil's posting and its export unit abroad receiving the item, which 17TRACK files as information received.
|
|
20
|
+
const SCANNED = /^objeto (?:postado|recebido na unidade de exporta(?:ção|cao) no pa(?:í|i)s de origem)\.?$/i;
|
|
21
21
|
/**
|
|
22
22
|
* The stage a scan's `sub_status` gives it over the stage its wording got
|
|
23
23
|
* (`pending` when no rule read it), or undefined when the code does not
|
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.802.
|
|
3
|
+
"version": "0.802.3-main.4319",
|
|
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",
|