Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arcgis-lib-downloader

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arcgis-lib-downloader - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

122

arcgis-lib-downloader.js

@@ -1,67 +0,71 @@

'use strict'
module.exports = (name = 'User') => {
return `Hello, ${name}!`
}
// variables
const program = require('commander')
const fetch = require('node-fetch')
const myTable = require('table')
program.version('1.0.3')
let url = "https://developers.arcgis.com/data/downloads.json"
let settings = { method: "Get" };
// 'use strict'
// initializing array we will be using for creation of table
let data = new Array()
let firstLine = ['Key', 'Name', 'Latest Version', 'Other Versions']
data.push(firstLine)
// // variables
// const program = require('commander')
// const fetch = require('node-fetch')
// const myTable = require('table')
// program.version('1.0.3')
// let url = "https://developers.arcgis.com/data/downloads.json"
// let settings = { method: "Get" };
// function actually used to make the table
function makeTable() {
// fetch data from url
fetch(url, settings)
.then(res => res.json())
.then((json) => {
// extract data from .json file and add it to proper position in
// various arrays we will be using
for (var key in json) {
let rowData = new Array()
let extractedName = json[key].name
rowData.push(extractedName)
let extractedProductName = json[key].product_name
rowData.push(extractedProductName)
let extractedCurrVersion = json[key].current_version
rowData.push(extractedCurrVersion)
let extractedDownloads = json[key].downloads
let keyDownloads = new Array()
for (var d in extractedDownloads) {
keyDownloads.push(d)
}
rowData.push(keyDownloads)
data.push(rowData)
}
// configuring what the table will look like
const config = {
columns: {
1: { width: 10, wrapWord: true },
2: { width: 10, wrapWord: true },
3: { width: 10, wrapWord: true },
4: { width: 10, wrapWord: true }
}
};
// // initializing array we will be using for creation of table
// let data = new Array()
// let firstLine = ['Key', 'Name', 'Latest Version', 'Other Versions']
// data.push(firstLine)
// printing out the actual table
console.log(myTable.table(data, config))
})
}
// // function actually used to make the table
// function makeTable() {
// // fetch data from url
// fetch(url, settings)
// .then(res => res.json())
// .then((json) => {
// // extract data from .json file and add it to proper position in
// // various arrays we will be using
// for (var key in json) {
// let rowData = new Array()
// let extractedName = json[key].name
// rowData.push(extractedName)
// let extractedProductName = json[key].product_name
// rowData.push(extractedProductName)
// let extractedCurrVersion = json[key].current_version
// rowData.push(extractedCurrVersion)
// let extractedDownloads = json[key].downloads
// let keyDownloads = new Array()
// for (var d in extractedDownloads) {
// keyDownloads.push(d)
// }
// rowData.push(keyDownloads)
// data.push(rowData)
// }
// // configuring what the table will look like
// const config = {
// columns: {
// 1: { width: 10, wrapWord: true },
// 2: { width: 10, wrapWord: true },
// 3: { width: 10, wrapWord: true },
// 4: { width: 10, wrapWord: true }
// }
// };
// making the option to be able to print out the table of products
program
.option('-lp, --list-products', 'Print out table with ArcGIS prodcuts'
, makeTable)
// // printing out the actual table
// console.log(myTable.table(data, config))
// })
// }
program.parse()
// // making the option to be able to print out the table of products
// program
// .option('-lp, --list-products', 'Print out table with ArcGIS prodcuts'
// , makeTable)
const options = program.opts()
if (options.listproducts !== undefined) options.listproducts
// program.parse()
module.exports = {
makeTable: makeTable
}
// const options = program.opts()
// if (options.listproducts !== undefined) options.listproducts
// module.exports = {
// makeTable: makeTable
// }
{
"name": "arcgis-lib-downloader",
"version": "1.0.8",
"version": "1.0.9",
"description": "npm package for gaining access to ArcGIS programs",

@@ -20,3 +20,3 @@ "main": "app.js",

"author": "Jansen Comadena",
"license": "ISC",
"license": "MIT",
"bugs": {

@@ -23,0 +23,0 @@ "url": "https://github.com/EsriPS/arcgis-lib-downloader/issues"

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