@mediocre/bloodhound
Advanced tools
Comparing version 1.1.7 to 1.2.0
@@ -6,2 +6,3 @@ const async = require('async'); | ||
const geography = require('../util/geography'); | ||
const USPS = require('./usps'); | ||
@@ -45,2 +46,4 @@ // These are all of the status descriptions related to delivery provided by UPS. | ||
function UPS(options) { | ||
const usps = new USPS(options && options.usps); | ||
this.isTrackingNumberValid = function(trackingNumber) { | ||
@@ -112,2 +115,7 @@ // Remove whitespace | ||
if (err) { | ||
// Try USPS for UPS Mail Innovations | ||
if (usps.isTrackingNumberValid(trackingNumber)) { | ||
return usps.track(trackingNumber, callback); | ||
} | ||
if (err.message === 'No tracking information available') { | ||
@@ -114,0 +122,0 @@ return callback(null, results); |
@@ -34,2 +34,7 @@ const NodeGeocoder = require('node-geocoder'); | ||
// Allow UPS to use USPS for UPS Mail Innovations tracking numbers | ||
if (options && options.ups && options.usps) { | ||
options.ups.usps = options.usps; | ||
} | ||
const fedEx = new FedEx(options && options.fedEx); | ||
@@ -36,0 +41,0 @@ const pitneyBowes = new PitneyBowes(options && options.pitneyBowes); |
{ | ||
"description": "Bloodhound is a Node.js package that allows you to retrieve tracking data from shipping carriers (DHL, FedEx, UPS, USPS) in a common format.", | ||
"dependencies": { | ||
"async": "~3.1.0", | ||
"moment-timezone": "~0.5.25", | ||
"node-geocoder": "~3.23.0", | ||
"async": "^3.1.0", | ||
"moment-timezone": "^0.5.25", | ||
"node-geocoder": "^3.25.0", | ||
"petty-cache": "^2.4.1", | ||
"pitney-bowes": "~0.1.1", | ||
"pitney-bowes": "^0.1.1", | ||
"shipping-fedex": "0.2.0", | ||
"tz-lookup": "~6.1.18", | ||
"us-states-normalize": "~1.0.0" | ||
"tz-lookup": "^6.1.18", | ||
"us-states-normalize": "^1.0.0" | ||
}, | ||
@@ -41,3 +41,3 @@ "devDependencies": { | ||
}, | ||
"version": "1.1.7" | ||
"version": "1.2.0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61057
882
+ Addedasync@3.2.6(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addednode-geocoder@3.29.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedasync@3.1.1(transitive)
- Removednode-geocoder@3.23.0(transitive)
Updatedasync@^3.1.0
Updatedmoment-timezone@^0.5.25
Updatednode-geocoder@^3.25.0
Updatedpitney-bowes@^0.1.1
Updatedtz-lookup@^6.1.18
Updatedus-states-normalize@^1.0.0