Socket
Socket
Sign inDemoInstall

delivery-tracker

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delivery-tracker - npm Package Compare versions

Comparing version 0.4.0 to 0.6.0

lib/courier/auspost.js

2

bin/index.js

@@ -8,3 +8,3 @@ #! /usr/bin/env node

.arguments('<tracecode>')
.option('-c, --courier <courier>', 'Courier', /^(KOREAPOST|ECARGO|FEDEX)$/i, 'KOREAPOST')
.option('-c, --courier <courier>', 'Courier Namespace', /^(KOREAPOST|ECARGO|FEDEX)$/i, 'KOREAPOST')
.action(function (tracecode) {

@@ -11,0 +11,0 @@ if (!tracker.COURIER[program.courier]) {

@@ -0,1 +1,13 @@

# 0.6.0
* add exception logic when one package is shipped via multiple carriers. (Pantos)
* update test logic.
# 0.5.0
* add australia post.
* add pantos.
# 0.4.1
* add a status value to the fedex checkpoint message information.
* change the delimiter of checkpoint message.
# 0.4.0

@@ -2,0 +14,0 @@ * add command line.

@@ -49,3 +49,3 @@ 'use strict'

cols.eq(6).text().trim()
].join('\n')
].join(' - ')

@@ -52,0 +52,0 @@ var checkpoint = {

@@ -49,6 +49,9 @@ 'use strict'

for (var i = 0, len = eventList.length; i < len; i++) {
var message = [eventList[i].status]
eventList[i].scanDetails && message.push(eventList[i].scanDetails)
var checkpoint = {
courier: courier,
location: eventList[i].scanLocation,
message: eventList[i].scanDetails,
message: message.join(' - '),
status: tracker.STATUS.IN_TRANSIT,

@@ -74,9 +77,9 @@ time: [eventList[i].date, eventList[i].time].join('T') + eventList[i].gmtOffset

trace: function (packageList) {
var result = []
var results = []
for (var i = 0, len = packageList.length; i < len; i++) {
result.push(normalize(packageList[i]))
results.push(normalize(packageList[i]))
}
return result
return results
}

@@ -83,0 +86,0 @@ }

@@ -109,3 +109,3 @@ 'use strict'

location: cols.eq(2).text().trim(),
message: message.join('\n'),
message: message.join(' - '),
status: tracker.STATUS.IN_TRANSIT,

@@ -112,0 +112,0 @@ time: moment(cols.eq(0).text().trim(), 'HH:mm DD-MMM-YYYY').format('YYYY-MM-DDTHH:mm:ss')

@@ -45,2 +45,10 @@ 'use strict'

NAME: 'FedEx'
},
AUSPOST: {
CODE: 'auspost',
NAME: 'Australia Post'
},
PANTOS: {
CODE: 'pantos',
NAME: 'Pantos'
}

@@ -47,0 +55,0 @@ },

{
"name": "delivery-tracker",
"version": "0.4.0",
"version": "0.6.0",
"author": {

@@ -30,3 +30,6 @@ "name": "egg",

"ecargo",
"fedex"
"fedex",
"pantos",
"auspost",
"australia post"
],

@@ -47,7 +50,9 @@ "license": "MIT",

"dependencies": {
"async": "^2.1.4",
"cheerio": "^0.22.0",
"commander": "^2.9.0",
"moment": "^2.17.1",
"request": "^2.79.0"
"request": "^2.79.0",
"xml2js": "^0.4.17"
}
}

@@ -14,5 +14,7 @@ # delivery-tracker

---- | ---- | ----
Korea Post | @egg- | https://trace.epost.go.kr//xtts/tt/epost/ems/ems_eng.jsp
Ecargo | @egg- | http://web.ecargo.asia/script/users/tracking.php
FedEx | @egg- | https://www.fedex.com/apps/fedextrack/?action=track
Korea Post | @egg- | http://www.koreapost.go.kr/
Ecargo | @egg- | http://ecargo.asia/script/users/main.php
FedEx | @egg- | https://www.fedex.com/
Australia Post | @egg- | https://auspost.com.au/
Pantos | @egg- | http://www.epantos.com/

@@ -90,2 +92,4 @@ ## Installation

FEDEX | fedex | FedEx
AUSPOST | auspost | Australia Post
PANTOS | pantos | Pantos

@@ -164,2 +168,35 @@ ### STATUS

}
// PANTOS
{
"courier": {
"code": "pantos",
"name": "Pantos"
},
"number": "DELIVEREDNUM-AUSPOST",
"status": "Delivered",
"checkpoints": [
{
"courier": {
"code": "auspost",
"name": "Australia Post"
},
"location": "Canning Vale, WA",
"message": "Delivered",
"status": "Delivered",
"time": "2017-01-03T15:24:00+08:00"
},
// ...
{
"courier": {
"code": "pantos",
"name": "Pantos"
},
"location": "KRICN",
"message": "Pick-Up (Pick-Up)",
"status": "InfoReceived",
"time": "2016-12-20T11:25"
}
]
}
```

@@ -185,3 +222,3 @@

1. Fort it
1. Fork it
1. Create your feature branch.

@@ -188,0 +225,0 @@ 1. Commit your changes.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc