easyppk
Version:
simple CLI tool ppk processing
53 lines (37 loc) • 946 B
JavaScript
// var shell = require('shelljs')
// var path = require('path')
var _results = []
var app = {}
module.exports = app
/**
* Initialize processing
*/
app.initialize = function (path, cb) {
// TODO: verify user has a session
// TODO: verify it has the correect data / find all files
// TODO: post the data to the cloud
// TODO: return results
console.log('Initializing processing...')
console.log('Found files inside ', path)
console.log('List of files: [Object]')
console.log('Publishing...')
console.log('Successful, please wait...')
_results.push({
fileName: 'name.ant', filePath:'path_here'
})
cb(null, _results, 'SUCCESS')
}
/**
* Status
*/
app.status = function (path, cb) {
// TODO: REST call to check on status / return JSON
cb(results, path, null)
}
/**
* Download
*/
app.download = function (path, cb) {
// TODO: select processed data to be downloaded
cb(results, path, null)
}